/* START Telerik.Sitefinity.Resources.Scripts.jquery-migrate-1.2.1.min.js */
/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
jQuery.migrateMute === void 0 && (jQuery.migrateMute = !0), function (e, t, n) { function r(n) { var r = t.console; i[n] || (i[n] = !0, e.migrateWarnings.push(n), r && r.warn && !e.migrateMute && (r.warn("JQMIGRATE: " + n), e.migrateTrace && r.trace && r.trace())) } function a(t, a, i, o) { if (Object.defineProperty) try { return Object.defineProperty(t, a, { configurable: !0, enumerable: !0, get: function () { return r(o), i }, set: function (e) { r(o), i = e } }), n } catch (s) { } e._definePropertyBroken = !0, t[a] = i } var i = {}; e.migrateWarnings = [], !e.migrateMute && t.console && t.console.log && t.console.log("JQMIGRATE: Logging is active"), e.migrateTrace === n && (e.migrateTrace = !0), e.migrateReset = function () { i = {}, e.migrateWarnings.length = 0 }, "BackCompat" === document.compatMode && r("jQuery is not compatible with Quirks Mode"); var o = e("", { size: 1 }).attr("size") && e.attrFn, s = e.attr, u = e.attrHooks.value && e.attrHooks.value.get || function () { return null }, c = e.attrHooks.value && e.attrHooks.value.set || function () { return n }, l = /^(?:input|button)$/i, d = /^[238]$/, p = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, f = /^(?:checked|selected)$/i; a(e, "attrFn", o || {}, "jQuery.attrFn is deprecated"), e.attr = function (t, a, i, u) { var c = a.toLowerCase(), g = t && t.nodeType; return u && (4 > s.length && r("jQuery.fn.attr( props, pass ) is deprecated"), t && !d.test(g) && (o ? a in o : e.isFunction(e.fn[a]))) ? e(t)[a](i) : ("type" === a && i !== n && l.test(t.nodeName) && t.parentNode && r("Can't change the 'type' of an input or button in IE 6/7/8"), !e.attrHooks[c] && p.test(c) && (e.attrHooks[c] = { get: function (t, r) { var a, i = e.prop(t, r); return i === !0 || "boolean" != typeof i && (a = t.getAttributeNode(r)) && a.nodeValue !== !1 ? r.toLowerCase() : n }, set: function (t, n, r) { var a; return n === !1 ? e.removeAttr(t, r) : (a = e.propFix[r] || r, a in t && (t[a] = !0), t.setAttribute(r, r.toLowerCase())), r } }, f.test(c) && r("jQuery.fn.attr('" + c + "') may use property instead of attribute")), s.call(e, t, a, i)) }, e.attrHooks.value = { get: function (e, t) { var n = (e.nodeName || "").toLowerCase(); return "button" === n ? u.apply(this, arguments) : ("input" !== n && "option" !== n && r("jQuery.fn.attr('value') no longer gets properties"), t in e ? e.value : null) }, set: function (e, t) { var a = (e.nodeName || "").toLowerCase(); return "button" === a ? c.apply(this, arguments) : ("input" !== a && "option" !== a && r("jQuery.fn.attr('value', val) no longer sets properties"), e.value = t, n) } }; var g, h, v = e.fn.init, m = e.parseJSON, y = /^([^<]*)(<[\w\W]+>)([^>]*)$/; e.fn.init = function (t, n, a) { var i; return t && "string" == typeof t && !e.isPlainObject(n) && (i = y.exec(e.trim(t))) && i[0] && ("<" !== t.charAt(0) && r("$(html) HTML strings must start with '<' character"), i[3] && r("$(html) HTML text after last tag is ignored"), "#" === i[0].charAt(0) && (r("HTML string cannot start with a '#' character"), e.error("JQMIGRATE: Invalid selector string (XSS)")), n && n.context && (n = n.context), e.parseHTML) ? v.call(this, e.parseHTML(i[2], n, !0), n, a) : v.apply(this, arguments) }, e.fn.init.prototype = e.fn, e.parseJSON = function (e) { return e || null === e ? m.apply(this, arguments) : (r("jQuery.parseJSON requires a valid JSON string"), null) }, e.uaMatch = function (e) { e = e.toLowerCase(); var t = /(chrome)[ \/]([\w.]+)/.exec(e) || /(webkit)[ \/]([\w.]+)/.exec(e) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e) || /(msie) ([\w.]+)/.exec(e) || 0 > e.indexOf("compatible") && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e) || []; return { browser: t[1] || "", version: t[2] || "0" } }, e.browser || (g = e.uaMatch(navigator.userAgent), h = {}, g.browser && (h[g.browser] = !0, h.version = g.version), h.chrome ? h.webkit = !0 : h.webkit && (h.safari = !0), e.browser = h), a(e, "browser", e.browser, "jQuery.browser is deprecated"), e.sub = function () { function t(e, n) { return new t.fn.init(e, n) } e.extend(!0, t, this), t.superclass = this, t.fn = t.prototype = this(), t.fn.constructor = t, t.sub = this.sub, t.fn.init = function (r, a) { return a && a instanceof e && !(a instanceof t) && (a = t(a)), e.fn.init.call(this, r, a, n) }, t.fn.init.prototype = t.fn; var n = t(document); return r("jQuery.sub() is deprecated"), t }, e.ajaxSetup({ converters: { "text json": e.parseJSON } }); var b = e.fn.data; e.fn.data = function (t) { var a, i, o = this[0]; return !o || "events" !== t || 1 !== arguments.length || (a = e.data(o, t), i = e._data(o, t), a !== n && a !== i || i === n) ? b.apply(this, arguments) : (r("Use of jQuery.fn.data('events') is deprecated"), i) }; var j = /\/(java|ecma)script/i, w = e.fn.andSelf || e.fn.addBack; e.fn.andSelf = function () { return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"), w.apply(this, arguments) }, e.clean || (e.clean = function (t, a, i, o) { a = a || document, a = !a.nodeType && a[0] || a, a = a.ownerDocument || a, r("jQuery.clean() is deprecated"); var s, u, c, l, d = []; if (e.merge(d, e.buildFragment(t, a).childNodes), i) for (c = function (e) { return !e.type || j.test(e.type) ? o ? o.push(e.parentNode ? e.parentNode.removeChild(e) : e) : i.appendChild(e) : n }, s = 0; null != (u = d[s]) ; s++) e.nodeName(u, "script") && c(u) || (i.appendChild(u), u.getElementsByTagName !== n && (l = e.grep(e.merge([], u.getElementsByTagName("script")), c), d.splice.apply(d, [s + 1, 0].concat(l)), s += l.length)); return d }); var Q = e.event.add, x = e.event.remove, k = e.event.trigger, N = e.fn.toggle, T = e.fn.live, M = e.fn.die, S = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess", C = RegExp("\\b(?:" + S + ")\\b"), H = /(?:^|\s)hover(\.\S+|)\b/, A = function (t) { return "string" != typeof t || e.event.special.hover ? t : (H.test(t) && r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"), t && t.replace(H, "mouseenter$1 mouseleave$1")) }; e.event.props && "attrChange" !== e.event.props[0] && e.event.props.unshift("attrChange", "attrName", "relatedNode", "srcElement"), e.event.dispatch && a(e.event, "handle", e.event.dispatch, "jQuery.event.handle is undocumented and deprecated"), e.event.add = function (e, t, n, a, i) { e !== document && C.test(t) && r("AJAX events should be attached to document: " + t), Q.call(this, e, A(t || ""), n, a, i) }, e.event.remove = function (e, t, n, r, a) { x.call(this, e, A(t) || "", n, r, a) }, e.fn.error = function () { var e = Array.prototype.slice.call(arguments, 0); return r("jQuery.fn.error() is deprecated"), e.splice(0, 0, "error"), arguments.length ? this.bind.apply(this, e) : (this.triggerHandler.apply(this, e), this) }, e.fn.toggle = function (t, n) { if (!e.isFunction(t) || !e.isFunction(n)) return N.apply(this, arguments); r("jQuery.fn.toggle(handler, handler...) is deprecated"); var a = arguments, i = t.guid || e.guid++, o = 0, s = function (n) { var r = (e._data(this, "lastToggle" + t.guid) || 0) % o; return e._data(this, "lastToggle" + t.guid, r + 1), n.preventDefault(), a[r].apply(this, arguments) || !1 }; for (s.guid = i; a.length > o;) a[o++].guid = i; return this.click(s) }, e.fn.live = function (t, n, a) { return r("jQuery.fn.live() is deprecated"), T ? T.apply(this, arguments) : (e(this.context).on(t, this.selector, n, a), this) }, e.fn.die = function (t, n) { return r("jQuery.fn.die() is deprecated"), M ? M.apply(this, arguments) : (e(this.context).off(t, this.selector || "**", n), this) }, e.event.trigger = function (e, t, n, a) { return n || C.test(e) || r("Global events are undocumented and deprecated"), k.call(this, e, t, n || document, a) }, e.each(S.split("|"), function (t, n) { e.event.special[n] = { setup: function () { var t = this; return t !== document && (e.event.add(document, n + "." + e.guid, function () { e.event.trigger(n, null, t, !0) }), e._data(this, n, e.guid++)), !1 }, teardown: function () { return this !== document && e.event.remove(document, n + "." + e._data(this, n)), !1 } } }) }(jQuery, window);
/* END Telerik.Sitefinity.Resources.Scripts.jquery-migrate-1.2.1.min.js */
/* START Telerik.Sitefinity.Resources.Scripts.Kendo.kendo.all.min.js */
/** 
 * Kendo UI v2020.1.114 (http://www.telerik.com/kendo-ui)                                                                                                                                               
 * Copyright 2020 Progress Software Corporation and/or one of its subsidiaries or affiliates. 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?j[t].substring(0,n)+e:e}function a(e){var t=e.css(be.support.transitions.css+"box-shadow")||e.css("box-shadow"),n=t?t.match(Ee)||[0,0,0,0,0]:[0,0,0,0,0],i=Se.max(+n[3],+(n[4]||0));return{left:-n[1]+i,right:+n[1]+i,bottom:+n[2]+i}}function s(n,i){var o,r,a,s,d,c,u=De.browser,h=be._outerWidth,p=be._outerHeight,f=n.parent(),g=h(t);return f.removeClass("k-animation-container-sm"),f.hasClass("k-animation-container")?l(n,i):(r=n[0].style.width,a=n[0].style.height,s=Ae.test(r),d=Ae.test(a),c=n.hasClass("k-tooltip")||n.is(".k-menu-horizontal.k-context-menu"),o=s||d,!s&&(!i||i&&r||c)&&(r=i?h(n)+1:h(n)),(!d&&(!i||i&&a)||n.is(".k-menu-horizontal.k-context-menu"))&&(a=p(n)),n.wrap(e("



-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(";"),T&&t[1])t=t[1],L=!0;else if(0===e&&t[2]){if(t=t[2],t.indexOf(v)==-1&&t.indexOf(_)==-1)return t}else t=t[0];if(U=t.indexOf("%"),j=t.indexOf("$"),x=U!=-1,y=j!=-1,x&&(e*=100),y&&"\\"===t[j-1]&&(t=t.split("\\").join(""),y=!1),(y||x)&&(r=y?r.currency:r.percent,a=r[g],d=r.decimals,k=r.symbol),B=t.indexOf(m)>-1,B&&(t=t.replace(p,f)),H=t.indexOf(g),P=t.length,H!=-1)if(A=(""+e).split("e"),A=A[1]?l(e,Math.abs(A[1])):A[0],A=A.split(g)[1]||f,O=t.lastIndexOf(_)-H,N=t.lastIndexOf(v)-H,V=O>-1,W=N>-1,R=A.length,V||W||(t=t.substring(0,H)+t.substring(H+1),P=t.length,H=-1,R=0),V&&O>N)R=O;else if(N>O)if(W&&R>N){for(K=l(e,N,T);K.charAt(K.length-1)===_&&N>0&&N>O;)N--,K=l(e,N,T);R=N}else V&&RO?O:N,N=t.lastIndexOf(v),O=t.lastIndexOf(_),$=N==-1&&O!=-1?O:N!=-1&&O==-1?N:N>O?N:O,G==P&&($=G),G!=-1){for(F=(""+e).split(g),D=F[0],A=F[1]||f,I=D.length,E=A.length,T&&e*-1>=0&&(T=!1),e=t.substring(0,G),T&&!L&&(e+="-"),R=G;R-1&&(e+=D,R=H),H===R){e+=(A?a:f)+A,R+=$-H+1;continue}z===_?(e+=z,M=z):z===v&&(e+=M)}if(B&&(e=s(e,G+(T&&!L?1:0),Math.max($,I+G),r)),$>=G&&(e+=t.substring($+1)),y||x){for(F=f,R=0,P=e.length;R=p){for(s=a,l=[];s>-1;)if(d=r.substring(s-p,s),d&&l.push(d),s-=p,c=h.shift(),p=c!==n?c:p,0===p){s>0&&l.push(r.substring(0,s));break}r=l.reverse().join(o[m]),e=e.substring(0,t)+r+e.substring(i)}return e},l=function(e,t,n){return t=t||0,e=(""+e).split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t))),n&&(e=-e),e=(""+e).split("e"),e=+(e[0]+"e"+(e[1]?+e[1]-t:-t)),e.toFixed(Math.min(t,20))},d=function(e,t,i){if(t){if("[object Date]"===k.call(e))return o(e,t,i);if(typeof e===Pe)return a(e,t,i)}return e!==n?e:""},be.format=function(e){var t=arguments;return e.replace(Ie,function(e,n,i){var o=t[parseInt(n,10)+1];return d(o,i?i.substring(1):"")})},be._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},be._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},be._round=l,be._outerWidth=function(t,n){return e(t).outerWidth(n||!1)||0},be._outerHeight=function(t,n){return e(t).outerHeight(n||!1)||0},be.toString=d}(),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 a(e){for(var t=0,n=e.length,i=[];t0&&(L-=1),t},T=function(t){var n=w[t]||RegExp("^\\d{1,"+t+"}"),i=e.substr(H,t).match(n);return i?(i=i[0],H+=i.length,parseInt(i,10)):null},D=function(t,n){for(var i,o,r,a=0,s=t.length,l=0,d=0;al&&(l=o,d=a);return l?(H+=l,d+1):null},A=function(){var t=!1;return e.charAt(H)===i[L]&&(H++,t=!0),t},I=a.calendars.standard,E=null,M=null,F=null,R=null,P=null,z=null,B=null,L=0,H=0,N=!1,O=new Date,V=I.twoDigitYearMax||2029,W=O.getFullYear();for(i||(i="d"),h=I.patterns[i],h&&(i=h),i=i.split(""),u=i.length;L2)continue;if(F=c<3?T(2):D(I._lowerDays[3==c?"namesAbbr":"names"],!0),null===F||t(F,1,31))return null}else if("M"===d){if(c=S("M"),I._lowerMonths||(I._lowerMonths=s(I.months)),M=c<3?T(2):D(I._lowerMonths[3==c?"namesAbbr":"names"],!0),null===M||t(M,1,12))return null;M-=1}else if("y"===d){if(c=S("y"),E=T(c),null===E)return null;2==c&&("string"==typeof V&&(V=W+parseInt(V,10)),E=W-W%100+E,E>V&&(E-=100))}else if("h"===d){if(S("h"),R=T(2),12==R&&(R=0),null===R||t(R,0,11))return null}else if("H"===d){if(S("H"),R=T(2),null===R||t(R,0,23))return null}else if("m"===d){if(S("m"),P=T(2),null===P||t(P,0,59))return null}else if("s"===d){if(S("s"),z=T(2),null===z||t(z,0,59))return null}else if("f"===d){if(c=S("f"),C=e.substr(H,c).match(w[3]),B=T(c),null!==B&&(B=parseFloat("0."+C[0],10),B=be._round(B,3),B*=1e3),null===B||t(B,0,999))return null}else if("t"===d){if(c=S("t"),_=I.AM,b=I.PM,1===c&&(_=o(_),b=o(b)),p=D(b),!p&&!D(_))return null}else if("z"===d){if(m=!0,c=S("z"),"Z"===e.substr(H,1)){A();continue}if(v=e.substr(H,6).match(c>2?g:f),!v)return null;if(v=v[0].split(":"),k=v[0],y=v[1],!y&&k.length>3&&(H=k.length-2,y=k.substring(H),k=k.substring(0,H)),k=parseInt(k,10),t(k,-12,13))return null;if(c>2&&(y=v[0][0]+y,y=parseInt(y,10),isNaN(y)||t(y,-59,59)))return null}else if("'"===d)N=!0,A();else if(!A())return null;return l&&!/^\s*$/.test(e.substr(H))?null:(x=null!==R||null!==P||z||null,null===E&&null===M&&null===F&&x?(E=W,M=O.getMonth(),F=O.getDate()):(null===E&&(E=W),null===F&&(F=1)),p&&R<12&&(R+=12),m?(k&&(R+=-k),y&&(P+=-y),e=new Date(Date.UTC(E,M,F,R,P,z,B))):(e=new Date(E,M,F,R,P,z,B),r(e,R)),E<100&&e.setFullYear(E),e.getDate()!==F&&m===n?null:e)}function d(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 c(e){var t,n,i,o=Se.max(_.length,b.length),r=e.calendar||e.calendars.standard,a=r.patterns,s=[];for(i=0;i0?null:(c=c>-1,e.indexOf(l)>-1||n&&n.toLowerCase().indexOf("c")>-1?(r=s,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],""),c=!0)):e.indexOf(d)>-1&&(o=!0,r=a,l=d),e=e.replace("-","").replace(l,"").replace(h," ").split(r[","].replace(h," ")).join("").replace(r["."],"."),e=parseFloat(e),isNaN(e)?e=null:c&&(e*=-1),e&&o&&(e/=100),e)}}(),function(){var i,o,r,a,s,l,d,c,h,p,f,g;De._scrollbar=n,De.scrollbar=function(e){if(isNaN(De._scrollbar)||e){var t,n=document.createElement("div");return n.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",n.innerHTML=" ",document.body.appendChild(n),De._scrollbar=t=n.offsetWidth-n.scrollWidth,document.body.removeChild(n),t}return De._scrollbar},De.isRtl=function(t){return e(t).closest(".k-rtl").length>0},i=document.createElement("table");try{i.innerHTML="",De.tbodyInnerHtml=!0}catch(m){De.tbodyInnerHtml=!1}De.touch="ontouchstart"in t,o=document.documentElement.style,r=De.transitions=!1,a=De.transforms=!1,s="HTMLElement"in t?HTMLElement.prototype:[],De.hasHW3D="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix||"MozPerspective"in o||"msPerspective"in o,De.cssFlexbox="flexWrap"in o||"WebkitFlexWrap"in o||"msFlexWrap"in o,ke(["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(),a={css:"ms"!=e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},n&&(r=a,r.event=r.event?r.event+"TransitionEnd":"transitionend"),!1}),i=null,De.transforms=a,De.transitions=r,De.devicePixelRatio=t.devicePixelRatio===n?1:t.devicePixelRatio;try{De.screenWidth=t.outerWidth||t.screen?t.screen.availWidth:t.innerWidth,De.screenHeight=t.outerHeight||t.screen?t.screen.availHeight:t.innerHeight}catch(m){De.screenWidth=t.screen.availWidth,De.screenHeight=t.screen.availHeight}De.detectOS=function(e){var n,i,o=!1,r=[],a=!/mobile safari/i.test(e),s={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/},d={tablet:/playbook|ipad|fire/i},c={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 s)if(s.hasOwnProperty(i)&&(r=e.match(s[i]))){if("windows"==i&&"plugins"in navigator)return!1;o={},o.device=i,o.tablet=u(i,d,!1),o.browser=u(e,c,"default"),o.name=u(i,l),o[o.name]=!0,o.majorVersion=r[2],o.minorVersion=(r[3]||"0").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!==He||typeof t.cordova!==He,o.appMode=t.navigator.standalone||/file|local|wmapp/.test(t.location.protocol)||o.cordova,o.android&&(De.devicePixelRatio<1.5&&o.flatVersion<400||a)&&(De.screenWidth>800||De.screenHeight>800)&&(o.tablet=i);break}return o},l=De.mobileOS=De.detectOS(navigator.userAgent),De.wpDevicePixelRatio=l.wp?screen.width/320:0,De.hasNativeScrolling=!1,(l.ios||l.android&&l.majorVersion>2||l.wp)&&(De.hasNativeScrolling=l),De.delayedClick=function(){if(De.touch){if(l.ios)return!0;if(l.android)return!De.browser.chrome||!(De.browser.version<32)&&!(e("meta[name=viewport]").attr("content")||"").match(/user-scalable=no/i)}return!1},De.mouseAndTouchPresent=De.touch&&!(De.mobileOS.ios||De.mobileOS.android),De.detectBrowser=function(e){var t,n=!1,i=[],o={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(t in o)if(o.hasOwnProperty(t)&&(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},De.browser=De.detectBrowser(navigator.userAgent),De.detectClipboardAccess=function(){var e={copy:!!document.queryCommandSupported&&document.queryCommandSupported("copy"),cut:!!document.queryCommandSupported&&document.queryCommandSupported("cut"),paste:!!document.queryCommandSupported&&document.queryCommandSupported("paste")};return De.browser.chrome&&(e.paste=!1,De.browser.version>=43&&(e.copy=!0,e.cut=!0)),e},De.clipboard=De.detectClipboardAccess(),De.zoomLevel=function(){var e,n,i;try{return e=De.browser,n=0,i=document.documentElement,e.msie&&11==e.version&&i.scrollHeight>i.clientHeight&&!De.touch&&(n=De.scrollbar()),De.touch?i.clientWidth/t.innerWidth:e.msie&&e.version>=10?((top||t).document.documentElement.offsetWidth+n)/(top||t).innerWidth:1}catch(o){return 1}},De.cssBorderSpacing=n!==o.borderSpacing&&!(De.browser.msie&&De.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),De.mobileOS&&(n+=" k-mobile"),De.cssFlexbox||(n+=" k-no-flexbox"),i.addClass(n)}(De.browser),De.eventCapture=document.documentElement.addEventListener,d=document.createElement("input"),De.placeholder="placeholder"in d,De.propertyChangeEvent="onpropertychange"in d,De.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],n=t.length,i="test",o={},r=0;rt.field?1:e.field/g,J=function(e){return e.target},De.touch&&(J=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},ke(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,n){e.fn[n]=function(e){return this.bind(n,e)}})),De.touch?De.mobileOS?(De.mousedown="touchstart",De.mouseup="touchend",De.mousemove="touchmove",De.mousecancel="touchcancel",De.click="touchend",De.resize="orientationchange"):(De.mousedown="mousedown touchstart",De.mouseup="mouseup touchend",De.mousemove="mousemove touchmove",De.mousecancel="mouseleave touchcancel",De.click="click",De.resize="resize"):De.pointers?(De.mousemove="pointermove",De.mousedown="pointerdown",De.mouseup="pointerup",De.mousecancel="pointercancel",De.click="pointerup",De.resize="orientationchange resize"):De.msPointers?(De.mousemove="MSPointerMove",De.mousedown="MSPointerDown",De.mouseup="MSPointerUp",De.mousecancel="MSPointerCancel",De.click="MSPointerUp",De.resize="orientationchange resize"):(De.mousemove="mousemove",De.mousedown="mousedown",De.mouseup="mouseup",De.mousecancel="mouseleave",De.click="click",De.resize="resize"),Z=function(e,t){var n,i,o,r,a=t||"d",s=1;for(i=0,o=e.length;i0||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 be.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}}),ne=te.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}})}})}}),be.dimensions=function(e,t){var n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}},be.notify=Ce,ie=/template$/i,oe=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,re=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]+\]$/,ae=/([A-Z])/g,be.initWidget=function(i,o,r){var a,s,l,d,c,u,h,p,f,g,m,v,_;if(r?r.roles&&(r=r.roles):r=be.ui.roles,i=i.nodeType?i:i[0],u=i.getAttribute("data-"+be.ns+"role")){f=u.indexOf(".")===-1,l=f?r[u]:be.getter(u)(t),m=e(i).data(),v=l?"kendo"+l.fn.options.prefix+l.fn.options.name:"",g=f?RegExp("^kendo.*"+u+"$","i"):RegExp("^"+v+"$","i");for(_ in m)if(_.match(g)){if(_!==v)return m[_];a=m[_]}if(l){for(p=T(i,"dataSource"),o=e.extend({},D(i,l.fn.options),o),p&&(o.dataSource=typeof p===Re?be.getter(p)(t):p),d=0,c=l.fn.events.length;d{1}",l,be.ui.progress.messages.loading)).width(i.width).height(i.height).css("top",i.top).css(r,Math.abs(s)+a).prependTo(t)):d&&d.remove()},plugin:function(t,i,o){var r,a,s,l,d=t.fn.options.name;for(i=i||be.ui,o=o||"",i[d]=t,i.roles[d.toLowerCase()]=t,r="getKendo"+o+d,d="kendo"+o+d,a={name:d,widget:t,prefix:o||""},be.widgets.push(a),s=0,l=be._widgetRegisteredCallbacks.length;s=0&&(d=[be.getter(l)(t)]),i=0,o=d.length;i-1)}}),de=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],ce="label, input, [data-rel=external]",ue={setupMouseMute:function(){var t,n=0,i=de.length,o=document.documentElement;if(!ue.mouseTrap&&De.eventCapture)for(ue.mouseTrap=!0,ue.bustClick=!1,ue.captureMouse=!1,t=function(t){ue.captureMouse&&("click"===t.type?ue.bustClick&&!e(t.target).is(ce)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};n-1&&this[0]!==document.documentElement&&(ue.setupMouseMute(),o=2===t.length?null:t[1],r=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,ge.call(this,{touchstart:ue.muteMouse,touchend:ue.unMuteMouse},o,{bustClick:r})),typeof n===Re&&(e=a.data("handler"),n=e[n],t[t.length-1]=function(t){n.call(e,t)}),t[0]=i,ge.apply(a,t),a)},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),be.jQuery=F,be.eventMap=he,be.timezone=function(){function e(e,t){var n,i,o,r=t[3],a=t[4],s=t[5],l=t[8];return l||(t[8]=l={}),l[e]?l[e]:(isNaN(a)?0===a.indexOf("last")?(n=new Date(Date.UTC(e,c[r]+1,1,s[0]-24,s[1],s[2],0)),i=u[a.substr(4,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-o-(i>o?7:0))):a.indexOf(">=")>=0?(n=new Date(Date.UTC(e,c[r],a.substr(5),s[0],s[1],s[2],0)),i=u[a.substr(0,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-o+(i=0&&(n=new Date(Date.UTC(e,c[r],a.substr(5),s[0],s[1],s[2],0)),i=u[a.substr(0,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-o-(i>o?7:0))):n=new Date(Date.UTC(e,c[r],a,s[0],s[1],s[2],0)),l[e]=n)}function t(t,n,i){var o,r,a,s;return(n=n[i])?(a=new Date(t).getUTCFullYear(),n=jQuery.grep(n,function(e){var t=e[0],n=e[1];return t<=a&&(n>=a||t==a&&"only"==n||"max"==n)}),n.push(t),n.sort(function(t,n){return"number"!=typeof t&&(t=+e(a,t)),"number"!=typeof n&&(n=+e(a,n)),t-n}),s=n[jQuery.inArray(t,n)-1]||n[n.length-1],isNaN(s)?s: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,a=t[n];if("string"==typeof a&&(a=t[a]),!a)throw Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(i=a.length-1;i>=0&&(o=a[i][3],!(o&&e>o));i--);if(r=a[i+1],!r)throw Error('Timezone "'+n+'" not found on '+e+".");return r}function i(e,i,o,r){typeof e!=Pe&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var a=n(e,i,r);return{zone:a,rule:t(e,o,a[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,be.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,a=o[2];return a.indexOf("/")>=0?a.split("/")[r&&+r[6]?1:0]:a.indexOf("%s")>=0?a.replace("%s",r&&"-"!=r[7]?r[7]:""):a}function a(e,t,n){var i,o,r,a=n;return typeof t==Re&&(t=this.offset(e,t)),typeof n==Re&&(n=this.offset(e,n)),o=e.getTimezoneOffset(),e=new Date(e.getTime()+6e4*(t-n)),r=e.getTimezoneOffset(),typeof a==Re&&(a=this.offset(e,a)),i=r-o+(n-a),new Date(e.getTime()+6e4*i)}function s(e,t){return this.convert(e,e.getTimezoneOffset(),t)}function l(e,t){return this.convert(e,t,e.getTimezoneOffset())}function d(e){return this.apply(new Date(e),"Etc/UTC")}var c={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:a,apply:s,remove:l,abbr:r,toLocalDate:d}}(),be.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 a(e,t){return 1!==t?f(i(e,t,-1),4):f(e,4-(e.getDay()||7))}function s(e,t){var n=new Date(e.getFullYear(),0,1,(-6)),i=a(e,t),o=i.getTime()-n.getTime(),r=Math.floor(o/k);return 1+Math.floor(r/7)}function l(e,t){var i,o,r;return t===n&&(t=be.culture().calendar.firstDay),i=f(e,-7),o=f(e,7),r=s(e,t),0===r?s(i,t)+1:53===r&&s(o,t)>1?1:r}function d(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function c(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function u(e){return b(e).getTime()-d(b(e))}function h(e,t,n){var i,o=u(t),r=u(n);return!e||o==r||(t>=n&&(n+=k),i=u(e),o>i&&(i+=k),r=o&&i<=r)}function p(e,t,n){var i,o=t.getTime(),r=n.getTime();return o>=r&&(r+=k),i=e.getTime(),i>=o&&i<=r}function f(t,n){var i=t.getHours();return t=new Date(t),g(t,n*k),e(t,i),t}function g(e,t,n){var i,o=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-o,e.setTime(e.getTime()+i*w))}function m(t,n){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e(t,n.getHours()),t}function v(){return d(new Date)}function _(e){return d(e).getTime()==v().getTime()}function b(e){var t=new Date(1980,1,1,0,0,0);return e&&t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}var w=6e4,k=864e5;return{adjustDST:e,dayOfWeek:i,setDayOfWeek:t,getDate:d,isInDateRange:p,isInTimeRange:h,isToday:_,nextDay:function(e){return f(e,1)},previousDay:function(e){return f(e,-1)},toUtcTime:c,MS_PER_DAY:k,MS_PER_HOUR:60*w,MS_PER_MINUTE:w,setTime:g,setHours:m,addDays:f,today:v,toInvariantTime:b,firstDayOfMonth:o,lastDayOfMonth:r,weekInYear:l,getMilliseconds:u}}(),be.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;nt?o():i=setTimeout(o,t-s),n):o()},o.cancel=function(){clearTimeout(i)},o)},be.caret=function(t,i,o){var r,a,s,l,d,c=i!==n;if(o===n&&(o=i),t[0]&&(t=t[0]),!c||!t.disabled){try{t.selectionStart!==n?c?(t.focus(),a=De.mobileOS,a.wp||a.android?setTimeout(function(){t.setSelectionRange(i,o)},0):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),l=s.text.length,d=l+r.text.length,i=[l,d]))}catch(u){i=[]}return i}},be.compileMobileDirective=function(e,n){var i=t.angular;return e.attr("data-"+be.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()}]),be.widgetInstance(e,be.mobile.ui)},be.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},be.cycleForm=function(e){function t(e){var t=be.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!=be.keys.TAB||e.shiftKey||(e.preventDefault(),t(n))}),n.on("keydown",function(e){e.keyCode==be.keys.TAB&&e.shiftKey&&(e.preventDefault(),t(i))})},be.focusElement=function(n){var i=[],o=n.parentsUntil("body").filter(function(e,t){var n=be.getComputedStyles(t,["overflow"]);return"visible"!==n.overflow}).add(t);o.each(function(t,n){i[t]=e(n).scrollTop()});try{n[0].setActive()}catch(r){n[0].focus()}o.each(function(t,n){e(n).scrollTop(i[t])})},be.matchesMedia=function(e){var n=be._bootstrapToMedia(e)||e;return De.matchMedia&&t.matchMedia(n).matches},be._bootstrapToMedia=function(e){return{xs:"(max-width: 576px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"}[e]},be.fileGroupMap={audio:[".aif",".iff",".m3u",".m4a",".mid",".mp3",".mpa",".wav",".wma",".ogg",".wav",".wma",".wpl"],video:[".3g2",".3gp",".avi",".asf",".flv",".m4u",".rm",".h264",".m4v",".mkv",".mov",".mp4",".mpg",".rm",".swf",".vob",".wmv"],image:[".ai",".dds",".heic",".jpe","jfif",".jif",".jp2",".jps",".eps",".bmp",".gif",".jpeg",".jpg",".png",".ps",".psd",".svg",".svgz",".tif",".tiff"],txt:[".doc",".docx",".log",".pages",".tex",".wpd",".wps",".odt",".rtf",".text",".txt",".wks"],presentation:[".key",".odp",".pps",".ppt",".pptx"],data:[".xlr",".xls",".xlsx"],programming:[".tmp",".bak",".msi",".cab",".cpl",".cur",".dll",".dmp",".drv",".icns",".ico",".link",".sys",".cfg",".ini",".asp",".aspx",".cer",".csr",".css",".dcr",".htm",".html",".js",".php",".rss",".xhtml"],pdf:[".pdf"],config:[".apk",".app",".bat",".cgi",".com",".exe",".gadget",".jar",".wsf"],zip:[".7z",".cbr",".gz",".sitx",".arj",".deb",".pkg",".rar",".rpm",".tar.gz",".z",".zip",".zipx"],"disc-image":[".dmg",".iso",".toast",".vcd",".bin",".cue",".mdf"]},be.getFileGroup=function(e,t){var i,o,r=be.fileGroupMap,a=Object.keys(r),s="file";if(e===n)return"";if(""===e)return"folder";for(i=0;i-1)return t?"file-"+a[i]:a[i];return s},be.getFileSizeMessage=function(e){var t,n=["Bytes","KB","MB","GB","TB"];return 0===e?"0 Byte":(t=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10),Math.round(e/Math.pow(1024,t),2)+" "+n[t])},function(){function n(t,n,i,o){var r,a,s=e("").attr({action:i,method:"POST",target:o}),l=be.antiForgeryTokens();l.fileName=n,r=t.split(";base64,"),l.contentType=r[0].replace("data:",""),l.base64=r[1];for(a in l)l.hasOwnProperty(a)&&e("").attr({value:l[a],name:a,type:"hidden"}).appendTo(s);s.appendTo("body").submit().remove()}function i(e,t){var n,i,o,r,a,s=e;if("string"==typeof e){for(n=e.split(";base64,"),i=n[0],o=atob(n[1]),r=new Uint8Array(o.length),a=0;a-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 a(e){return e.replace(/^(#)?/,"#")}function s(e){return e.replace(/^(#(!)?)?/,"#!")}var l=window.kendo,d="change",c="back",u="same",h=l.support,p=window.location,f=window.history,g=50,m=l.support.browser.msie,v=/^#*/,_=window.document,b=l.Class.extend({back:function(){m?setTimeout(function(){f.back()}):f.back()},forward:function(){m?setTimeout(function(){f.forward()}):f.forward()},length:function(){return f.length},replaceLocation:function(e){p.replace(e)}}),w=b.extend({init:function(e){this.root=e},navigate:function(e){f.pushState({},_.title,n(e,this.root))},replace:function(e){f.replaceState({},_.title,n(e,this.root))},normalize:function(e){return r(this.root,e)},current:function(){var e=p.pathname;return p.search&&(e+=p.search),r(this.root,e)},change:function(t){e(window).bind("popstate.kendo",t)},stop:function(){e(window).unbind("popstate.kendo")},normalizeCurrent:function(e){var t,r=e.root,a=p.pathname,s=o(i(e.hashBang));r===a+"/"&&(t=r),r===a&&s&&(t=n(s.replace(v,""),r)),t&&f.pushState({},_.title,t)}}),k=b.extend({init:function(e){this._id=l.guid(),this.prefix=i(e),this.fix=e?s:a},navigate:function(e){p.hash=this.fix(e)},replace:function(e){this.replaceLocation(this.fix(e))},normalize:function(e){return e.indexOf(this.prefix)<0?e:e.split(this.prefix)[1]},change:function(t){h.hashChange?e(window).on("hashchange."+this._id,t):this._interval=setInterval(t,g)},stop:function(){e(window).off("hashchange."+this._id),clearInterval(this._interval)},current:function(){return o(this.prefix)},normalizeCurrent:function(e){var t=p.pathname,n=e.root;return!(!e.pushState||n===t)&&(this.replaceLocation(n+this.prefix+r(n,t)),!0)}}),y=l.Observable.extend({start:function(t){if(t=t||{},this.bind([d,c,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 k(e.hashBang)},stop:function(){this._started&&(this.adapter.stop(),this.unbind(d),this._started=!1)},change:function(e){this.bind(d,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(d,{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,a=this.backCalled,s=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:s,to:n})?(e.forward(),this.current=s,t):this.trigger(d,{url:n,backButtonPressed:!a})?(r?e.forward():(e.back(),this.historyLength--),this.current=s,t):(r?this.locations.pop():this.locations.push(n),t))}});l.History=y,l.History.HistoryAdapter=b,l.History.HashAdapter=k,l.History.PushStateAdapter=w,l.absoluteURL=n,l.history=new y}(window.kendo.jQuery),function(){function e(e,t){return t?e:"([^/]+)"}function t(t,n){return RegExp("^"+t.replace(f,"\\$&").replace(u,"(?:$1)?").replace(h,e).replace(p,"(.*?)")+"$",n?"i":"")}function n(e){return e.replace(/(\?.*)|(#.*)/g,"")}var i=window.kendo,o=i.history,r=i.Observable,a="init",s="routeMissing",l="change",d="back",c="same",u=/\((.*?)\)/g,h=/(\(\?)?:\w+/g,p=/\*\w+/g,f=/[\-{}\[\]+?.,\\\^$|#\s]/g,g=i.Class.extend({init:function(e,n,i){e instanceof RegExp||(e=t(e,i)),this.route=e,this._callback=n},callback:function(e,t,o){var r,a,s=0,l=i.parseQueryStringParams(e);if(l._back=t,e=n(e),r=this.route.exec(e).slice(1),a=r.length,o)for(;s3?"substringof"!==i?d="{0}({2},"+d+")":(d="{0}("+d+",{2})","doesnotcontain"===c&&(o?(d="{0}({2},'{1}') eq -1",i="indexof"):d+=" eq false")):d="{2} {0} "+d,i=g.format(d,i,u,s))),p.push(i);return i=p.join(" "+f+" "),p.length>1&&(i="("+i+")"),i}function i(e){for(var t in e)0===t.indexOf("@odata")&&delete e[t]}function o(){return Math.floor(65536*(1+Math.random())).toString(16).substr(1)}function r(e){return e+o()+"-"+o()+"-"+o()}function a(e,t){var n=v+"--"+e;return t&&(n+="--"),n}function s(e,t,n,i){var o=e.options[i].url,r=g.format("{0} ",n);return b(o)?r+o(t):r+o}function l(e,t){var n="";return n+=a(e,!1),n+=v+"Content-Type: application/http",n+=v+"Content-Transfer-Encoding: binary",n+=v+"Content-ID: "+t}function d(e){var t="";return t+=v+"Content-Type: application/json;odata=minimalmetadata",t+=v+"Prefer: return=representation",t+=_+g.stringify(e)}function c(e,t,n,i,o,r){var a,c="";for(a=0;a=200&&i<=299?(r=t.match(/\{.*\}/gm),r&&d[d.length-1].models.push(JSON.parse(r[0]))):d[d.length-1].passed=!1);return d}var g=window.kendo,m=e.extend,v="\r\n",_="\r\n\r\n",b=g.isFunction,w={eq:"eq",neq:"ne",
gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith",isnull:"eq",isnotnull:"ne",isnullorempty:"eq",isnotnullorempty:"ne",isempty:"eq",isnotempty:"ne"},k=m({},w,{contains:"contains"}),y={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)}},x={read:{dataType:"jsonp"}};m(!0,g.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,o,r,a;if(e=e||{},t=t||"read",a=(this.options||x)[t],a=a?a.dataType:"json","read"===t){i={$inlinecount:"allpages"},"json"!=a&&(i.$format="json");for(r in e)y[r]?y[r](i,e[r],n):i[r]=e[r]}else{if("json"!==a)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(r in e)o=e[r],"number"==typeof o&&(e[r]=o+"");i=g.stringify(e)}}return i}}}}),m(!0,g.data,{schemas:{"odata-v4":{type:"json",data:function(t){if(e.isArray(t)){for(var n=0;n=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:c,readers:{xml:c}})}(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,a={};for(r in o)a[r]=o[r];a.field=i?n+"."+o.field:n,t==ze&&e._notifyChange&&e._notifyChange(a),e.trigger(t,a)}}function i(t,n){if(t===n)return!0;var o,r=e.type(t),a=e.type(n);if(r!==a)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],ve(n)&&n.field&&n.field===t)return n;if(n===t)return n}return null}function r(e){this.data=e||[]}function a(e,n){if(e){var i=typeof e===Ae?{field:e,dir:n}:e,o=be(i)?i:i!==t?[i]:[];return we(o,function(e){return!!e.dir})}}function s(e,n){var i,o,r,a={};if(e)for(i=typeof e===Ae?{field:e,dir:n}:e,o=be(i)?i:i!==t?[i]:[],r=0;rt.field?1:e.field=t.length)););s0&&(t=this[n--]);n>=0;n--)t=e(t,this[n],n,this);return t},filter:function(e,t){for(var n,i=0,o=[],r=this.length,a=t||window;i=0;if(a)for(n=e.split("."),i="";n.length>1;){if(i+=n.shift(),o=Ce.getter(i,!0)(r),o instanceof Q)return o.set(n.join("."),t),a;i+="."}return Ce.setter(e)(r,t),a},set:function(e,t){var n=this,i=!1,o=e.indexOf(".")>=0,r=Ce.getter(e,!0)(n);return r!==t&&(r instanceof Te&&this._handlers[e]&&(this._handlers[e].get&&r.unbind(Le,this._handlers[e].get),r.unbind(ze,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(ze,{field:e}))),i},parent:xe,wrap:function(e,t,i){var o,r,a,s,l=this,d=et.call(e);return null==e||"[object Object]"!==d&&"[object Array]"!==d||(a=e instanceof it,s=e instanceof de,"[object Object]"!==d||s||a?("[object Array]"===d||a||s)&&(a||s||(e=new it(e)),r=n(l,ze,t,!1),e.bind(ze,r),l._handlers[t]={change:r}):(e instanceof Q||(e=new Q(e)),o=n(l,Le,t,!0),e.bind(Le,o),r=n(l,ze,t,!0),e.bind(ze,r),l._handlers[t]={get:o,change:r}),e.parent=i),e}}),X={number:function(e){return typeof e===Ae&&"null"===e.toLowerCase()?null:Ce.parseFloat(e)},date:function(e){return typeof e===Ae&&"null"===e.toLowerCase()?null:Ce.parseDate(e)},"boolean":function(e){return typeof e===Ae?"null"===e.toLowerCase()?null:"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return typeof e===Ae&&"null"===e.toLowerCase()?null:null!=e?e+"":e},"default":function(e){return e}},J={string:"",number:0,date:new Date,"boolean":!1,"default":""},Z=Q.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;i0&&(u._initializers=f),i=e.extend(u),i.define=function(e){return Z.define(i,e)},u.fields&&(i.fields=u.fields,i.idField=u.idField),i},ee={selector:function(e){return Se(e)?e:je(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:eo?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=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,o){return n("==",e,t,i,o)},neq:function(e,t,i,o){return n("!=",e,t,i,o)},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)"},isnullorempty:function(e){return"("+e+" === null) || ("+e+" === '')"},isnotnullorempty:function(e){return"("+e+" !== null) && ("+e+" !== '')"}}}(),r.filterExpr=function(e){var n,i,o,a,s,l,d=[],c={and:" && ",or:" || "},u=[],h=[],p=e.filters;for(n=0,i=p.length;n":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain",isnull:"isnull",isempty:"isempty",isnotempty:"isnotempty"},r.normalizeFilter=d,r.compareFilters=p,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(Y(this.data,e))},order:function(e,t,n){var i={dir:t};return e&&(e.compare?i.compare=e.compare:i.field=e),new r(n?this.data.sort(ee.create(i)):this.data.slice(0).sort(ee.create(i)))},orderBy:function(e,t){return this.order(e,"asc",t)},orderByDescending:function(e,t){return this.order(e,"desc",t)},sort:function(e,t,n,i){var o,r,s=a(e,t),l=[];if(n=n||ee,s.length){for(o=0,r=s.length;o0&&(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){var t,n,i,o,a,s,l,d,c,u,h=this;if(_e(e)||!this.data.length)return new r([]);for(t=e.field,n=e.skipItemSorting?this.data:this._sortForGrouping(t,e.dir||"asc"),i=Ce.accessor(t),a=i.get(n[0],t),s={field:t,value:a,items:[]},u=[s],d=0,c=n.length;di&&(w(i)||k(i))&&(e=i),e}},r.normalizeGroup=g,r.normalizeSort=a,r.process=function(e,n,i){var o,s,l,d,c,u,h,p,f,_,b,w;return n=n||{},o=n.group,s=v(g(o||[])),l=new r(e),d=m(o||[]),c=a(n.sort||[]),u=s?c:d.concat(c),f=n.filterCallback,_=n.filter,b=n.skip,w=n.take,u&&i&&(l=l.sort(u,t,t,i)),_&&(l=l.filter(_),f&&(l=f(l)),p=l.toArray().length),u&&(i||(l=l.sort(u)),o&&(e=l.toArray())),s?(l=l.group(o,e),b!==t&&w!==t&&(l=new r(E(l.toArray())).range(b,w),h=Y(d,function(e){return ge({},e,{skipItemSorting:!0})}),l=l.group(h,e))):(b!==t&&w!==t&&(l=l.range(b,w)),o&&(l=l.group(o,e))),{total:p,data:l.toArray()}},re=De.extend({init:function(e){this.data=e.data},read:function(e){e.success(this.data)},update:function(e){e.success(e.data)},create:function(e){e.success(e.data)},destroy:function(e){e.success(e.data)}}),ae=De.extend({init:function(e){var t,n=this;e=n.options=ge({},n.options,e),ye(We,function(t,n){typeof e[n]===Ae&&(e[n]={url:e[n]})}),n.cache=e.cache?se.create(e.cache):{find:xe,add:xe},t=e.parameterMap,e.submit&&(n.submit=e.submit),Se(e.push)&&(n.push=e.push),n.push||(n.push=Ue),n.parameterMap=Se(t)?t:function(e){var n={};return ye(e,function(e,i){e in t&&(e=t[e],ve(e)&&(i=e.value(i),e=e.key)),n[e]=i}),n}},options:{parameterMap:Ue},create:function(e){return ke(this.setup(e,Me))},read:function(n){var i,o,r,a=this,s=a.cache;n=a.setup(n,Fe),i=n.success||xe,o=n.error||xe,r=s.find(n.data),r!==t?i(r):(n.success=function(e){s.add(n.data,e),i(e)},e.ajax(n))},update:function(e){return ke(this.setup(e,Re))},destroy:function(e){return ke(this.setup(e,Pe))},setup:function(e,t){e=e||{};var n,i=this,o=i.options[t],r=Se(o.data)?o.data(e.data):o.data;return e=ge(!0,{},o,e),n=ge(!0,{},r,e.data),e.data=i.parameterMap(n,t),Se(e.url)&&(e.url=e.url(n)),e}}),se=De.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[qe(e)]=n)},find:function(e){return this._store[qe(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[qe(e)]}}),se.create=function(e){var t={inmemory:function(){return new se}};return ve(e)&&Se(e.find)?e:e===!0?new se:t[e]()},le=De.extend({init:function(e){var t,n,i,o,r,a,s,l,d,c,u,h,p,f,g=this;e=e||{};for(t in e)n=e[t],g[t]=typeof n===Ae?je(n):n;o=e.modelBase||Z,ve(g.model)&&(g.model=i=o.define(g.model)),r=me(g.data,g),g._dataAccessFunction=r,g.model&&(a=me(g.groups,g),s=me(g.serialize,g),l={},d={},c={},u={},h=!1,i=g.model,i.fields&&(ye(i.fields,function(e,t){var n;p=e,ve(t)&&t.field?p=t.field:typeof t===Ae&&(p=t),ve(t)&&t.from&&(n=t.from),h=h||n&&n!==e||p!==e,f=n||p,d[e]=f.indexOf(".")!==-1?je(f,!0):je(f),c[e]=je(e),l[n||p]=e,u[e]=n||p}),!e.serialize&&h&&(g.serialize=T(s,i,x,c,l,u))),g._dataAccessFunction=r,g._wrapDataAccessBase=D(i,C,d,l,u),g.data=T(r,i,C,d,l,u),g.groups=T(a,i,S,d,l,u))},errors:function(e){return e?e.errors:null},parse:Ue,data:Ue,total:function(e){return e.length},groups:Ue,aggregates:function(){return{}},serialize:function(e){return e}}),de=Te.extend({init:function(e){var n,i,o,r=this;e&&(i=e.data),e=r.options=ge({},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=a(e.sort),r._filter=d(e.filter),r._group=g(e.group),r._aggregate=e.aggregate,r._total=e.total,r._shouldDetachObservableParents=!0,Te.fn.init.call(r),r.transport=ce.create(e,i,r),Se(r.transport.push)&&r.transport.push({pushCreate:me(r._pushCreate,r),pushUpdate:me(r._pushUpdate,r),pushDestroy:me(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,qe(r.reader.serialize(e)))}}):r._storage=e.offlineStorage),r.reader=new Ce.data.readers[e.schema.type||"json"](e.schema),n=r.reader.model||{},r._detachObservableParents(),r._data=r._observe(r._data),r._online=!0,r.bind(["push",He,ze,Ne,Be,Ve,Oe],e)},options:{data:null,schema:{modelBase:Z},offlineStorage:null,serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,batch:!1,inPlaceSort:!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 M(e);if(!t)for(var n=0;n-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){var t=this,n=t.options,i=t._getCurrentRangeSpan();t._eachItem(t._pristineData,e),n.serverPaging&&n.useRanges&&ye(i,function(n,i){t._eachItem(i.pristineData,e)})},_eachItem:function(e,t){e&&e.length&&(this._isServerGrouped()?R(e,t):t(e))},_pristineForModel:function(e){var t,n,i=function(i){if(n=H(i,e),n>-1)return t=i[n],!0};return this._eachPristineItem(i),t},_cancelModel:function(e){var t=this,n=this._pristineForModel(e);this._eachItem(this._data,function(i){var o=N(i,e);o>=0&&(!n||e.isNew()&&!n.__state__?(t._modelCanceled(e),i.splice(o,1),t._removeModelFromRanges(e)):(i[o].accept(n),"update"==n.__state__&&(i[o].dirty=!0)))})},_modelCanceled:xe,_submit:function(t,n){var i=this;i.trigger(Ne,{type:"submit"}),i.trigger(Oe),i.transport.submit(ge({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;rp._total&&(p._pageSize=p._total,p.options.pageSize&&p.options.pageSize>p._pageSize&&(p._pageSize=p.options.pageSize)),p._aggregate&&f.serverAggregates&&(p._aggregateResult=p._readAggregates(e)),e=p._readData(e),p._destroyed=[]}else{for(e=p._readData(e),n=[],o={},r=p.reader.model,a=r?r.idField:"id",s=0;s=0;t--)n=e[t],n.hasSubgroups?this._clearEmptyGroups(n.items):n.items&&!n.items.length&&Qe.apply(n.parent(),[t,1])},_queryProcess:function(e,t){return this.options.inPlaceSort?r.process(e,t,this.options.inPlaceSort):r.process(e,t)},_mergeState:function(n){var i=this;return n!==t&&(i._pageSize=n.pageSize,i._page=n.page,i._sort=n.sort,i._filter=n.filter,i._group=n.group,i._aggregate=n.aggregate,i._skip=i._currentRangeStart=n.skip,i._take=n.take,i._skip===t&&(i._skip=i._currentRangeStart=i.skip(),n.skip=i.skip()),i._take===t&&i._pageSize!==t&&(i._take=i._pageSize,n.take=i._take),n.sort&&(i._sort=n.sort=a(n.sort),i._sortFields=s(n.sort)),n.filter&&(i._filter=n.filter=i.options.accentFoldingFiltering&&!e.isEmptyObject(n.filter)?e.extend({},d(n.filter),{accentFoldingFiltering:i.options.accentFoldingFiltering}):d(n.filter)),n.group&&(i._group=n.group=g(n.group)),n.aggregate&&(i._aggregate=n.aggregate=f(n.aggregate))),n},query:function(n){var i,o,r,a=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates;return a||(this._data===t||0===this._data.length)&&!this._destroyed.length?(this.options.endless&&(o=n.pageSize-this.pageSize(),o>0?(o=this.pageSize(),n.page=n.pageSize/o,n.pageSize=o):(n.page=1,this.options.endless=!1)),this.read(this._mergeState(n))):(r=this.trigger(Ne,{type:"read"}),r||(this.trigger(Oe),i=this._queryProcess(this._data,this._mergeState(n)),this._setFilterTotal(i.total,!0),this._aggregateResult=this._calculateAggregates(i.dataToAggregate||this._data,n),this.view(i.data),this.trigger(Ve,{type:"read"}),this.trigger(ze,{items:i.data})),e.Deferred().resolve(r).promise())},_setFilterTotal:function(e,n){var i=this;i.options.serverFiltering||(e!==t?i._total=e:n&&(i._total=i._data.length))},fetch:function(e){var t=this,n=function(n){n!==!0&&Se(e)&&e.call(t)};return this._query().done(n)},_query:function(e){var t=this;return t.query(ge({},{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=Ge.max(Ge.min(Ge.max(e,1),i.totalPages()),1),i._query(i._pageableQueryOptions({page:e})),t):(n=i.skip(),n!==t?Ge.round((n||0)/(i.take()||1))+1:t)},pageSize:function(e){var n=this;return e!==t?(n._query(n._pageableQueryOptions({pageSize:e,page:1})),t):n.take()},sort:function(e){var n=this;return e!==t?(n.trigger("sort"),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 _e(e)&&(e=this._emptyAggregates(this.aggregate())),e},_emptyAggregates:function(e){var t,n,i={};if(!_e(e))for(t={},be(e)||(e=[e]),n=0;n=o;i--)n=r[i],t={value:e.get?e.get(n.field):e[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 Ge.ceil((e.total()||0)/t)},inRange:function(e,t){var n=this,i=Ge.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,i){this._currentRequestTimeStamp=this._timeStamp(),this._skipRequestsInProgress=!0,e=Ge.min(e||0,this.total()),i=Se(i)?i:xe;var o,r=this,a=Ge.max(Ge.floor(e/n),0)*n,s=Ge.min(a+n,r.total());return o=r._findRange(e,Ge.min(e+n,r.total())),o.length||0===r.total()?(r._processRangeData(o,e,n,a,s),i(),t):(n!==t&&(r._rangeExists(a,s)?aa&&s=i.start&&e<=i.end){for(p=0,r=o;r=i.start&&(d=i.data,c=i.end,k||(w.inPlaceSort?u=v._queryProcess(i.data,{filter:v.filter()}):(g=m(v.group()||[]).concat(a(v.sort()||[])),u=v._queryProcess(i.data,{sort:g,filter:v.filter()})),h=d=u.data,u.total!==t&&(c=u.total)),s=0,e+p>i.start&&(s=e+p-i.start),l=h.length,c>n&&(l-=c-n),p+=l-s,b=v._mergeGroups(b,d,s,l),n<=i.end&&p==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]),I(o,r,n,i),e.concat(r)}return e.concat(t.slice(n,i))},_processRangeData:function(e,n,i,o,r){var a,s,l,d,c=this;c._pending=t,c._skip=n>c.skip()?Ge.min(r,(c.totalPages()-1)*c.take()):o,c._currentRangeStart=n,c._take=i,a=c.options.serverPaging,s=c.options.serverSorting,l=c.options.serverFiltering,d=c.options.serverAggregates;try{c.options.serverPaging=!0,c._isServerGrouped()||c.group()&&c.group().length||(c.options.serverSorting=!0),c.options.serverFiltering=!0,c.options.serverPaging=!0,c.options.serverAggregates=!0,a&&(c._detachObservableParents(),c._data=e=c._observe(e)),c._process(e)}finally{c.options.serverPaging=a,c.options.serverSorting=s,c.options.serverFiltering=l,c.options.serverAggregates=d}},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(a){var s,l,d,c=!1,u={start:e,end:t,data:[],timestamp:o._timeStamp()};if(o._dequeueRequest(),o.trigger(Ve,{response:a,type:"read"}),a=o.reader.parse(a),d=o._readData(a),d.length){for(s=0,l=o._ranges.length;s=o._currentRequestTimeStamp||!o._skipRequestsInProgress)&&(n&&d.length?n():o.trigger(ze,{}))}},prefetch:function(e,t,n){var i=this,o=Ge.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(Ne,{type:"read"})?i._dequeueRequest():i.transport.read({data:i._params(r),success:i._prefetchSuccessHandler(e,o,n),error:function(){var e=Je.call(arguments);i.error.apply(i,e)}})})},100))},_multiplePrefetch:function(e,t,n){var i=this,o=Ge.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(Ne,{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=t)return!0;return!1},_getCurrentRangeSpan:function(){var e,t,n=this,i=n._ranges,o=n.currentRangeStart(),r=o+(n.take()||0),a=[],s=i.length;for(t=0;t=o||e.start>=o&&e.start<=r)&&a.push(e);return a},_removeModelFromRanges:function(e){var t,n,i,o=this;for(n=0,i=this._ranges.length;n=e){o._getByUid(t.uid,n.data)||(o._isServerGrouped()?n.data.splice(e,0,o._wrapInEmptyGroup(t)):n.data.splice(e,0,t));break}o._updateRangesLength()},_updateRangesLength:function(){var e,t,n=this,i=n._ranges||[],o=i.length,r=!1,a=0,s=0;for(t=0;t0?this.filter(this._hierarchicalFilter):(this.options.filter=this._hierarchicalFilter,this._filter=d(this.options.filter),this._hierarchicalFilter=null)),t},remove:function(e){var t,n=e.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),t=de.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:G("success"),data:G("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),de.fn.insert.call(this,e,t)},filter:function(e){return e===t?this._filter:(!this.options.serverFiltering&&this._markHierarchicalQuery(e)&&(e={logic:"or",filters:[e,{field:"_matchFilter",operator:"equals",value:!0}]}),this.trigger("reset"),this._query({filter:e,page:1}),t)},_markHierarchicalQuery:function(t){var n,i,o,a,s,l=this.options.accentFoldingFiltering;return t=l?e.extend({},d(t),{accentFoldingFiltering:l}):d(t),t&&0!==t.filters.length?(n=r.filterExpr(t),o=n.fields,a=n.operators,i=s=Function("d, __f, __o","return "+n.expression),(o.length||a.length)&&(s=function(e){return i(e,o,a)}),this._updateHierarchicalFilter(s),!0):(this._updateHierarchicalFilter(function(){return!0}),!1)},_updateHierarchicalFilter:function(e){var t,n,i=this._data,o=!1;for(n=0;n=this.total()?(this.trigger("endreached",{index:e}),null):this.useRanges?this.useRanges?((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=Ge.max(Ge.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=Ge.max(Ge.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}}),fe=Ce.Observable.extend({init:function(e,t){var n=this;Ce.Observable.fn.init.call(n),this.dataSource=e,this.batchSize=t,this._total=0,this.buffer=new pe(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,a=[];for(i.offset>o&&i.at(i.offset-1),n=0;n0&&(n=n.get(o.substring(0,i))),e.start(n),r=n!==e.source?r.call(n,e.source):r.call(n),e.stop(n)),n&&n!==e.source&&(e.currentSource=n,n.unbind(N,e._change).bind(N,e._change)),e.stop(e.source),r},set:function(e){var t=this.currentSource||this.source,n=C.getter(this.path)(t);"function"==typeof n?t!==this.source?n.call(t,this.source,e):n.call(t,e):t.set(this.path,e)},destroy:function(){this.observable&&(this.source.unbind(N,this._change),this.currentSource&&this.currentSource.unbind(N,this._change)),this.unbind()}}),g=f.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 M(e,t)}}),m=f.extend({init:function(e,t,n){var i=this;f.fn.init.call(i,e,t),i.template=n},render:function(e){var t;return this.start(this.source),t=C.render(this.template,e),this.stop(this.source),t}}),v=E.extend({init:function(e,t,n){this.element=e,this.bindings=t,this.options=n},bind:function(e,t){var n=this;e=t?e[t]:e,e.bind(N,function(e){n.refresh(t||e)}),n.refresh(t)},destroy:function(){}}),_=v.extend({dataType:function(){var e=this.element.getAttribute("data-type")||this.element.type||"text";return e.toLowerCase()},parsedValue:function(){return this._parseValue(this.element.value,this.dataType())},_parseValue:function(e,t){return"date"==t?e=C.parseDate(e,"yyyy-MM-dd"):"datetime-local"==t?e=C.parseDate(e,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==t?e=C.parseFloat(e):"boolean"==t&&(e=e.toLowerCase(),e=null!==C.parseFloat(e)?!!C.parseFloat(e):"true"===e.toLowerCase()),e}}),I.attr=v.extend({refresh:function(e){this.element.setAttribute(e,this.bindings.attr[e].get())}}),I.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)}}),I.style=v.extend({refresh:function(e){this.element.style[e]=this.bindings.style[e].get()||""}}),I.enabled=v.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),I.readonly=v.extend({refresh:function(){this.bindings.readonly.get()?this.element.setAttribute("readonly","readonly"):this.element.removeAttribute("readonly")}}),I.disabled=v.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),I.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])}}),I.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))}}),I.visible=v.extend({refresh:function(){this.element.style.display=this.bindings.visible.get()?"":"none"}}),I.invisible=v.extend({refresh:function(){this.element.style.display=this.bindings.invisible.get()?"none":""}}),I.html=v.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),I.value=_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=M(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[F].set(this.parsedValue()),this._initChange=!1},refresh:function(){var e,t;this._initChange||(e=this.bindings[F].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)}}),I.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('#:{1}#',e.valueField||e.textField,e.textField||e.valueField):"#:data#":"tbody"==n?"#:data#":"ul"==n||"ol"==n?"#:data#":"#:data#",t=C.template(t)),t},add:function(t,n){var i,o,r,s,l=this.container(),d=l.cloneNode(!1),c=l.children[t];if(e(d).html(C.render(this.template(),n)),d.children.length)for(i=this.bindings.source._parents(),o=0,r=n.length;o-1?e.splice(t,1):e.push(o)}else this.bindings[z].set(o)},refresh:function(){var e,n,i=this.bindings[z].get(),o=i,r=this.dataType(),a=this.element;if("checkbox"==a.type)if(o instanceof D){if(e=-1,i=this.parsedValue(),i instanceof Date){for(n=0;n=0}else a.checked=o;else"radio"==a.type&&("date"==r?i=C.toString(i,"yyyy-MM-dd"):"datetime-local"==r&&(i=C.toString(i,"yyyy-MM-ddTHH:mm:ss")),a.checked=null!==i&&t!==i&&a.value===""+i)},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)}})},I.select={source:I.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=p(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=M(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;n1&&(l.direction=t&&o?he[s].reverse:s),n[a[0]]=l}):T(e,function(e){var i=this.direction;i&&t&&!O.test(e)&&(this.direction=he[i].reverse),n[e]=this}),n},F&&D(S,{transition:function(t,n,i){var r,s,l,d,c=0,u=t.data("keys")||[];i=D({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,d=function(){l||(l=!0,s&&(clearTimeout(s),s=null),t.removeData(te).dequeue().css(ae,"").css(ae),i.complete.call(t))},i.duration=e.fx?e.fx.speeds[i.duration]||i.duration:i.duration,r=a(t,n),e.merge(u,o(r)),e.hasOwnProperty("uniqueSort")?t.data("keys",e.uniqueSort(u)).height():t.data("keys",e.unique(u)).height(),t.css(ae,i.exclusive+" "+i.duration+"ms "+i.ease).css(ae),t.css(r).css(se),F.event&&(t.one(F.event,d),0!==i.duration&&(c=500)),s=setTimeout(d,i.duration+c),t.data(te,s),t.data(re,d)},stopQueue:function(e,t,n){var i,o=e.data("keys"),r=!n&&o,a=e.data(re);return r&&(i=C.getComputedStyles(e[0],o)),a&&a(),r&&e.css(i),e.removeData("keys").stop(t)}}),p=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,s,l,d,c,u=this,h=t.length,p=u.element,f=u.options,g=e.Deferred(),m={},v={};for(u.effects=t,g.done(e.proxy(u,"complete")),p.data("animating",!0),i=0;i=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=y,S.Transition=x,S.createEffect=d,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(R)||[];return{type:t[1],direction:t[3],reverse:"reverse"===t[5]}}var i=window.kendo,o=i.attr,r=i.ui,a=i.attrValue,s=i.directiveSelector,l=i.Observable,d=i.ui.Widget,c=i.roleSelector,u="SCRIPT",h="init",p="transitionStart",f="transitionEnd",g="show",m="hide",v="attach",_="detach",b=/unrecognized expression/,w=/]*>(([\u000a\u000d\u2028\u2029]|.)*)<\/body>/i,k="loadStart",y="loadComplete",x="showStart",C="sameViewRequested",S="viewShow",T="viewTypeDetermined",D="after",A={content:"k-content",view:"k-view",stretchedView:"k-stretched-view",widget:"k-widget",header:"k-header",footer:"k-footer"},I=i.ui.Widget.extend({init:function(t,n){var o=this;n=n||{},o.id=i.guid(),l.fn.init.call(o),this.options=e.extend({},this.options,n),o.content=t,o.options.renderOnInit&&d.fn.init.call(o,o._createElement(),n),o.options.wrapInSections&&o._renderSections(),o.tagName=n.tagName||"div",o.model=n.model,o._wrap=n.wrap!==!1,this._evalTemplate=n.evalTemplate||!1,o._fragments={},o.bind([h,g,m,p,f],n)},options:{name:"View",renderOnInit:!1,wrapInSections:!1,detachOnHide:!0,detachOnDestroy:!0},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(h)),t&&(n._eachFragment(v),n.trigger(g)),n.element},clone:function(){return new E(this)},triggerBeforeShow:function(){return!0},triggerBeforeHide:function(){return!0},showStart:function(){var e=this,t=e.render();t&&t.css("display",""),this.trigger(x,{view:this})},showEnd:function(){},hideEnd:function(){this.hide()},beforeTransition:function(e){this.trigger(p,{type:e})},afterTransition:function(e){this.trigger(f,{type:e})},hide:function(){this.options.detachOnHide&&(this._eachFragment(_),e(this.element).detach()),this.trigger(m)},destroy:function(){var e=this,t=e.element;t&&(d.fn.destroy.call(e),i.unbind(t),i.destroy(t),e.options.detachOnDestroy&&t.remove())},purge:function(){var t=this;t.destroy(),e(t.element).add(t.content).add(t.wrapper).off().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,r=this,a="<"+r.tagName+" />";try{n=e(document.getElementById(r.content)||r.content),n[0].tagName===u&&(n=n.html())}catch(s){b.test(s.message)&&(n=r.content)}return"string"==typeof n?(n=n.replace(/^\s+|\s+$/g,""),r._evalTemplate&&(n=i.template(n)(r.model||{})),t=e(a).append(n),r._wrap||(t=t.contents())):(t=n,r._evalTemplate&&(o=e(i.template(e("").append(t.clone(!0)).html())(r.model||{})),e.contains(document,t[0])&&t.replaceWith(o),t=o),r._wrap&&(t=t.wrapAll(a).parent())),t},_renderSections:function(){var e=this;e.options.wrapInSections&&(e._wrapper(),e._createContent(),e._createHeader(),e._createFooter())},_wrapper:function(){var e,t=this,n=t.content;t.wrapper=n.is(c("view"))?t.content:n.wrap("').parent(),e=t.wrapper,e.attr("id",t.id),e.addClass(A.view),e.addClass(A.widget),e.attr("role","view")},_createContent:function(){var t,n=this,i=e(n.wrapper),r=c("content");i.children(r)[0]||(t=i.children().filter(function(){var t=e(this);if(!t.is(c("header"))&&!t.is(c("footer")))return t}),t.wrap("')),this.contentElement=i.children(c("content")),this.contentElement.addClass(A.stretchedView).addClass(A.content)},_createHeader:function(){var e=this,t=e.wrapper;this.header=t.children(c("header")).addClass(A.header)},_createFooter:function(){var e=this,t=e.wrapper;this.footer=t.children(c("footer")).addClass(A.footer)}}),E=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}),M=I.extend({init:function(e,t){I.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 P(i),t.bind("accepted",function(e){e.view.render(i)}),t}}),F=I.extend({attach:function(e,t){e.element.find(t).replaceWith(this.render())},detach:function(){}}),R=/^(\w+)(:(\w+))?( (\w+))?$/,P=l.extend({init:function(e){l.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,a=e===r.view?e.clone():r.view,s=r.history,l=s[s.length-2]||{},d=l.id===o,c=t||(d?s[s.length-1].transition:e.transition),u=n(c);return r.running&&r.effect.stop(),"none"===c&&(c=null),r.trigger("accepted",{view:e}),r.view=e,r.previous=a,r.running=!0,d?s.pop():s.push({id:o,transition:c}),a?(c&&i.effects.enabled?(e.element.addClass("k-fx-hidden"),e.showStart(),d&&!t&&(u.reverse=!u.reverse),r.effect=i.fx(e.element).replace(a.element,u.type).beforeTransition(function(){e.beforeTransition("show"),a.beforeTransition("hide")}).afterTransition(function(){e.afterTransition("show"),a.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)},destroy:function(){var e=this,t=e.view;t&&t.destroy&&t.destroy()}}),z=l.extend({init:function(t){var n,o,r=this;l.fn.init.call(r),r.options=t,e.extend(r,t),r.sandbox=e(""),o=r.container,n=r._hideViews(o),r.rootView=n.first(),r.layouts={},r.viewContainer=new i.ViewContainer(r.container),r.viewContainer.bind("accepted",function(e){e.view.params=r.params}),r.viewContainer.bind("complete",function(e){r.trigger(S,{view:e.view})}),r.viewContainer.bind(D,function(){r.trigger(D)}),this.bind(this.events,t)},events:[x,D,S,k,y,C,T],destroy:function(){var e,t=this,n=t.viewContainer;i.destroy(t.container);for(e in t.layouts)this.layouts[e].destroy();n&&n.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(C),!1;this.trigger(x);var o=this,r=o._findViewElement(e),a=i.widgetInstance(r);return o.url=e.replace(/^#/,""),o.params=n,a&&a.reload&&(a.purge(),r=[]),this.trigger(T,{remote:0===r.length,url:e}),!r[0]||(a||(a=o._createView(r)),o.viewContainer.show(a,t,e))},append:function(e,t){var n,i,r=this.sandbox,a=(t||"").split("?")[0],s=this.container;return w.test(e)&&(e=RegExp.$1),r[0].innerHTML=e,s.append(r.children("script, style")),n=this._hideViews(r),i=n.first(),i.length||(n=i=r.wrapInner("").children()),a&&i.hide().attr(o("url"),a),s.append(n),this._createView(i)},_locate:function(e){return this.$angular?s(e):c(e)},_findViewElement:function(e){var t,n=e.split("?")[0];return n?(t=this.container.children("["+o("url")+"='"+n+"']"),t[0]||n.indexOf("/")!==-1||(t=this.container.children("#"===n.charAt(0)?n:"#"+n)),t[0]||(t=this._findViewElementById(e)),t):this.rootView},_findViewElementById:function(e){var t=this.container.children("[id='"+e+"']");return t},_createView:function(e){return this._createSpaView(e)},_createMobileView:function(e){return i.initWidget(e,{defaultTransition:this.transition,loader:this.loader,container:this.container,getLayout:this.getLayoutProxy,modelScope:this.modelScope,reload:a(e,"reload")},r.roles)},_createSpaView:function(e){var t=(this.options||{}).viewOptions||{};return new i.View(e,{renderOnInit:t.renderOnInit,wrap:t.wrap||!1,wrapInSections:t.wrapInSections,detachOnHide:t.detachOnHide,detachOnDestroy:t.detachOnDestroy})},_hideViews:function(e){return e.children(this._locate("view")).hide()}});i.ViewEngine=z,i.ViewContainer=P,i.Fragment=F,i.Layout=M,i.View=I,i.ViewClone=E}(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 a(e,t){for(h.innerHTML=t;h.firstChild;)e.appendChild(h.firstChild)}function s(e){return new r(e)}function l(e,t,n){return new i(e,t,n)}function d(e){return new o(e)}function c(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;t2)return void this.render({appendChild:function(n){e.replaceChild(n,t.node)}},u);for(i=0;i/g,">").replace(/\"/g,""").replace(/\'/g,"'")}function l(e,t){var n,i="";for(n=0;n"+s(e)+"":''+s(e.src)+""}function u(e){var t=Math.floor(e/26)-1;return(t>=0?u(t):"")+String.fromCharCode(65+e%26)}function h(e,t){return u(t)+(e+1)}function p(e,t){return"$"+u(t)+"$"+(e+1)}function f(e){var t=e.frozenRows||(e.freezePane||{}).rowSplit||1;return t-1}function g(e){var t=7;return e/t-Math.floor(128/t)/256}function m(e){return.75*e}function v(e){return(e+"").replace(/[\x00-\x09\x0B\x0C\x0E-\x1F]/g,"").replace(/\r?\n/g,"\r\n")}function _(e){var t=e.length;return e.forEach(function(e){e.index&&e.index>=t&&(t=e.index+1)}),t}function b(e){var t=e;return t.length<6&&(t=t.replace(/(\w)/g,function(e,t){return t+t})),t=t.substring(1).toUpperCase(),t.length<8&&(t="FF"+t),t}function w(e){var t="thin";return 2===e?t="medium":3===e&&(t="thick"),t}function k(e,t){var n="";return t&&(n+="<"+e+' style="'+w(t.size)+'">',t.color&&(n+=''),n+=""+e+">"),n}function y(e){return""+k("left",e.left)+k("right",e.right)+k("top",e.top)+k("bottom",e.bottom)+""}function x(e,t){var n,i,o,r=[],a=[];for(C(e,function(e,t){var n={_source:e,index:t,height:e.height,level:e.level,cells:[]};r.push(n),a[t]=n}),n=S(r).slice(0),i={rowData:r,rowsByIndex:a,mergedCells:t},o=0;o1||r>1)&&T(t.mergedCells,s+":"+h(p+o-1,a+r-1)),o>1)for(d=p+1;d\r',Q=K+'\n            \n               \n               \n               \n',X=function(e){var t=e.creator,n=e.lastModifiedBy,i=e.created,o=e.modified;return K+'\n \n   '+s(t)+"\n   "+s(n)+'\n   '+s(i)+'\n   '+s(o)+"\n"},J=function(e){var t=e.sheets;return K+'\n\n  Microsoft Excel\n  0\n  false\n  \n    \n      \n        Worksheets\n\n      \n        '+t.length+'\n\n\n\n  \n    '+d(t,function(e,t){return e.options.title?""+s(e.options.title)+"":"Sheet"+(t+1)+""})+"\n\n  false\n  false\n  false\n  14.0300\n"},Z=function(e){var t=e.sheetCount,n=e.commentFiles,i=e.drawingFiles;return K+'\n\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  '+l(t,function(e){return''})+"\n  "+d(n,function(e){return''})+"\n  "+d(i,function(e){return'';
})+'\n  \n  \n'},ee=function(e){var t=e.sheets,n=e.filterNames,i=e.userNames;return K+'\n\n  \n  \n  \n    \n\n  \n  '+d(t,function(e,t){var n=e.options,i=n.name||n.title||"Sheet"+(t+1);return''})+"\n\n  "+(n.length||i.length?"\n    \n      "+d(n,function(e){return'\n         '+s(B(e.name))+"!"+s(e.from)+":"+s(e.to)+""})+"\n      "+d(i,function(e){return'\n         "+s(e.value)+""})+"\n":"")+'\n  \n'},te=function(e){var t=e.frozenColumns,n=e.frozenRows,i=e.columns,o=e.defaults,r=e.data,a=e.index,l=e.mergeCells,u=e.autoFilter,p=e.filter,f=e.showGridLines,v=e.hyperlinks,_=e.validations,b=e.defaultCellStyleId,w=e.rtl,k=e.legacyDrawing,y=e.drawing,x=e.lastRow,C=e.lastCol;return K+'\n\n   \n\n   \n     \n     "+(n||t?'\n       ':"")+'\n\n\n\n   \n\n   "+(null!=b||i&&i.length>0?"\n     \n       "+(i&&i.length?"":'\n          ")+"\n       "+d(i,function(e,t){var n="number"==typeof e.index?e.index+1:t+1;return 0===e.width?"':""})+"\n":"")+"\n\n   \n     "+d(r,function(e,t){var n="number"==typeof e.index?e.index+1:t+1;return'\n         \n           "+d(e.data,function(e){return'\n             \n               "+(null!=e.formula?c(e.formula):"")+"\n               "+(null!=e.value?""+s(e.value)+"":"")+"\n"})+"\n\n       "})+"\n\n\n   "+(u?'':p?z(p):"")+"\n\n   "+(l.length?'\n     \n       '+d(l,function(e){return''})+"\n":"")+"\n\n   "+(_.length?"\n     \n       "+d(_,function(e){return'\n         \n           "+(e.formula1?""+s(e.formula1)+"":"")+"\n           "+(e.formula2?""+s(e.formula2)+"":"")+"\n"})+"\n":"")+"\n\n   "+(v.length?"\n     \n       "+d(v,function(e){return'\n         '})+"\n":"")+'\n\n   \n   '+(y?'':"")+"\n   "+(k?'':"")+"\n"},ne=function(e){var t=e.count;return K+'\n\n  '+l(t,function(e){return'\n    '})+'\n  \n  \n'},ie=function(e){var t=e.hyperlinks,n=e.comments,i=e.sheetIndex,o=e.drawings;return K+'\n\n  '+d(t,function(e){return'\n    '})+"\n  "+(n.length?'\n    \n    ':"")+"\n  "+(o.length?'\n    ':"")+"\n"},oe=function(e){var t=e.comments;return K+'\n\n  \n    \n\n  \n    '+d(t,function(e){return'\n      \n        \n          \n            \n              \n              \n              \n              \n\n            '+s(e.text)+"\n\n\n"})+"\n\n"},re=function(e){var t=e.comments;return'\n  \n  '+d(t,function(e){return'\n    \n      \n      \n        \n        \n        '+e.anchor+"\n        False\n        "+e.row+"\n        "+e.col+"\n\n"})+"\n"},ae=function(e){return K+'\n\n  '+d(e,function(e,t){return'\n    \n      \n        '+e.col+"\n        "+e.colOffset+"\n        "+e.row+"\n        "+e.rowOffset+'\n\n      \n      \n        \n          \n          \n\n        \n          \n          \n            \n\n\n        \n          \n            \n\n\n\n      \n'})+"\n"},se=function(e){return K+'\n\n  '+d(e,function(e){return'\n    '})+"\n"},le=function(e){var t=e.count,n=e.uniqueCount,i=e.indexes;return K+'\n\n  '+d(Object.keys(i),function(e){return'\n    '+s(e.substring(1))+""})+"\n"},de=function(e){var t=e.formats,n=e.fonts,i=e.fills,o=e.borders,r=e.styles;return K+'\n\n  \n  '+d(t,function(e,t){return'\n    '})+'\n\n  \n    \n       \n       \n       \n       \n       \n\n    '+d(n,function(e){return'\n    \n      \n      '+(e.bold?"":"")+"\n      "+(e.italic?"":"")+"\n      "+(e.underline?"":"")+"\n      "+(e.color?'':'')+"\n      "+(e.fontFamily?'\n        \n        \n      ':'\n        \n        \n        \n      ')+"\n"})+'\n\n  \n      \n      \n    '+d(i,function(e){return"\n      "+(e.background?'\n        \n          \n              \n\n\n      ':"")})+'\n\n  \n    \n    '+d(o,y)+'\n\n  \n    \n\n  \n    \n    '+d(r,function(e){return'\n      \n        "+(e.textAlign||e.verticalAlign||e.wrap?"\n        \n        ":"")+"\n\n    "})+'\n\n  \n    \n\n  \n  \n'},ce=kendo.Class.extend({init:function(t,n,i,o){this.options=t,this._strings=n,this._styles=i,this._borders=o,this._validations={},this._comments=[],this._drawings=t.drawings||[],this._hyperlinks=(this.options.hyperlinks||[]).map(function(t,n){return e.extend({},t,{rId:"link"+n})})},relsToXML:function(){var e=this._hyperlinks,t=this._comments,n=this._drawings;if(e.length||t.length||n.length)return ie({hyperlinks:e,comments:t,sheetIndex:this.options.sheetIndex,drawings:n})},toXML:function(e){var t,n,i,o,r,a,s,l,d,c=this,u=this.options.mergedCells||[],p=this.options.rows||[],g=x(p,u);this._readCells(g),t=this.options.filter,t&&"number"==typeof t.from&&"number"==typeof t.to?t={from:h(f(this.options),t.from),to:h(f(this.options),t.to)}:t&&t.ref&&t.columns&&(n=t,t=null),i=[];for(o in this._validations)Object.prototype.hasOwnProperty.call(c._validations,o)&&i.push(c._validations[o]);return r=null,this.options.defaultCellStyle&&(r=this._lookupStyle(this.options.defaultCellStyle)),a=this.options.freezePane||{},s=this.options.defaults||{},l=this.options.rows?this._getLastRow():1,d=this.options.rows?this._getLastCol():1,te({frozenColumns:this.options.frozenColumns||a.colSplit,frozenRows:this.options.frozenRows||a.rowSplit,columns:this.options.columns,defaults:s,data:g,index:e,mergeCells:u,autoFilter:t,filter:n,showGridLines:this.options.showGridLines,hyperlinks:this._hyperlinks,validations:i,defaultCellStyleId:r,rtl:void 0!==this.options.rtl?this.options.rtl:s.rtl,legacyDrawing:this._comments.length?"vml"+this.options.sheetIndex:null,drawing:this._drawings.length?"drw"+this.options.sheetIndex:null,lastRow:l,lastCol:d})},commentsXML:function(){if(this._comments.length)return oe({comments:this._comments})},drawingsXML:function(e){var t,n;if(this._drawings.length)return t={},n=this._drawings.map(function(n){var i=A(n.topLeftCell),o=t[n.image];return o||(o=t[n.image]={rId:"img"+n.image,target:e[n.image].target}),{col:i.col,colOffset:I(n.offsetX),row:i.row,rowOffset:I(n.offsetY),width:I(n.width),height:I(n.height),imageId:o.rId}}),{main:ae(n),rels:se(t)}},legacyDrawing:function(){if(this._comments.length)return re({comments:this._comments})},_lookupString:function(e){var t,n="$"+e,i=this._strings.indexes[n];return void 0!==i?t=i:(t=this._strings.indexes[n]=this._strings.uniqueCount,this._strings.uniqueCount++),this._strings.count++,t},_lookupStyle:function(e){var t,n=JSON.stringify(e);return"{}"===n?0:(t=a(n,this._styles),t<0&&(t=this._styles.push(n)-1),t+1)},_lookupBorder:function(e){var t,n=JSON.stringify(e);if("{}"!==n)return t=a(n,this._borders),t<0&&(t=this._borders.push(n)-1),t+1},_readCells:function(e){var t,n,i,o,r,a=this;for(t=0;t\n  '+d(n,function(e){return'\n    \n      '+i[e.filter](e)+"\n\n  "})+"\n"},ve=function(e){var t=e.logic,n=e.criteria;return"\n\n"+d(n,function(e){var t=z.customOperator(e),n=z.customValue(e);return"'})+"\n"},_e=function(e){var t=e.type;return''},be=function(e){var t=e.type,n=e.value;return''},we=function(e){var t=e.blanks,n=e.values;return"\n    "+d(n,function(e){return'\n      '})+"\n"},z.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()]},z.customValue=function(e){function t(e){return e.replace(/([*?])/g,"~$1")}switch(e.operator.toLowerCase()){case"startswith":case"doesnotstartwith":return t(e.value)+"*";case"endswith":case"doesnotendwith":return"*"+t(e.value);case"contains":case"doesnotcontain":return"*"+t(e.value)+"*";default:return e.value}},z.dynamicFilterType=function(e){return{quarter1:"Q1",quarter2:"Q2",quarter3:"Q3",quarter4:"Q4",january:"M1",february:"M2",march:"M3",april:"M4",may:"M5",june:"M6",july:"M7",august:"M8",september:"M9",october:"M10",november:"M11",december:"M12"}[e.toLowerCase()]||e},kendo.deepExtend(kendo.ooxml,{IntlService:V,Workbook:fe,Worksheet:ce})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("ooxml/main.min",["kendo.core.min","ooxml/kendo-ooxml.min"],e)}(function(){!function(e){var t=kendo.ooxml.Workbook;kendo.ooxml.IntlService.register({toString:kendo.toString}),kendo.ooxml.Workbook=t.extend({toDataURL:function(){var e=t.fn.toDataURL.call(this);if("string"!=typeof e)throw Error("The toDataURL method can be used only with jsZip 2. Either include jsZip 2 or use the toDataURLAsync method.");return e},toDataURLAsync:function(){var n=e.Deferred(),i=t.fn.toDataURL.call(this);return"string"==typeof i?i=n.resolve(i):i&&i.then&&i.then(function(e){n.resolve(e)},function(){n.reject()}),n.promise()}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.ooxml.min",["ooxml/main.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("excel/kendo-excel.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return e.title+": "+e.value}function n(e,t){var n,i=[];for(n=0;n0),n})},_leafColumns:function(e){var t,n=this,i=[];for(t=0;th?u.push({id:e,level:h}):i=t;)i=e.pop(),r.push(o._hierarchyFooter(o.aggregates[i.id],i.level+1,n));return r},_hasFooterTemplate:function(){var e,t=this.columns;for(e=0;e0&&(e.field||e.columns)},_visibleColumns:function(e){var t=this;return e.filter(function(e){var n=!e.hidden;return n&&e.columns&&(n=t._visibleColumns(e.columns).length>0),n})},_headerRow:function(t,i){var o=this,r=t.cells.map(function(n){return e.extend(n,{colSpan:n.colSpan>1?n.colSpan:1,rowSpan:t.rowSpan>1&&!n.colSpan?t.rowSpan:1})});return this.hierarchy&&(r[0].colSpan=this._depth()+1),{type:"header",cells:n(i.length,function(){return e.extend({background:"#7a7a7a",color:"#fff"},o.options.headerPaddingCellOptions)}).concat(r)}},_prependHeaderRows:function(e){var t,n=this,i=this.groups,o=[{rowSpan:1,cells:[],index:0}];for(this._prepareHeaderRows(o,this.options.columns),t=o.length-1;t>=0;t--)e.unshift(n._headerRow(o[t],i))},_prepareHeaderRows:function(t,n,i,o){var r,a,s,l=this,d=o||t[t.length-1],c=t[d.index+1],u=0;for(r=0;rr&&(r=n));return o+r},_freezePane:function(){var e=this._visibleColumns(this.options.columns||[]),t=this._visibleColumns(this._trimColumns(this._leafColumns(e.filter(function(e){return e.locked})))).length;return{rowSplit:this._headerDepth(e),colSplit:t?t+this.groups.length:0}},_cell:function(t,n){return e.extend({value:n.value(t)},n.cellOptions)},_depth:function(){var e=0;return e=this.hierarchy?this.hierarchy.depth:this.groups.length},_columns:function(){var e=this._depth(),t=n(e,function(){return{width:20}});return t.concat(this.columns.map(function(e){return{width:parseInt(e.width,10),autoWidth:!e.width}}))}}),kendo.deepExtend(kendo.excel,{ExcelExporter:s,TemplateService:a})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("excel/main.min",["kendo.core.min","kendo.data.min","excel/kendo-excel.min"],e)}(function(){
return function(e,t){var n=t.excel.ExcelExporter,i=e.extend;t.excel.TemplateService.register({compile:t.template}),t.ExcelExporter=t.Class.extend({init:function(e){var n,o,r,a;if(this.options=e,n=e.dataSource,n instanceof t.data.DataSource){if(n.filter()||(n.options.filter=void 0),this.dataSource=new n.constructor(i({},n.options,{page:e.allPages?0:n.page(),filter:n.filter(),pageSize:e.allPages?n.total():n.pageSize()||n.total(),sort:n.sort(),group:n.group(),aggregate:n.aggregate()})),o=n.data(),o.length>0){if(e.hierarchy)for(r=0;rt&&(t=n);o.depth=t+1}else o=!1;return{hierarchy:o}},workbook:function(){return e.Deferred(e.proxy(function(t){this.dataSource.fetch().then(e.proxy(function(){var e=new n(i({},this.options,this._hierarchy(),{data:this.dataSource.view(),groups:this.dataSource.group(),aggregates:this.dataSource.aggregates()})).workbook();t.resolve(e,this.dataSource.view())},this))},this)).promise()}})}(kendo.jQuery,kendo),kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("excel/mixins.min",["excel/main.min","kendo.ooxml.min"],e)}(function(){return function(e,t){t.ExcelMixin={extend:function(t){t.events.push("excelExport"),t.options.excel=e.extend(t.options.excel,this.options),t.saveAsExcel=this.saveAsExcel},options:{proxyURL:"",allPages:!1,filterable:!1,fileName:"Export.xlsx",collapsible:!1},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,collapsible:n.collapsible});i.workbook().then(e.proxy(function(e,i){if(!this.trigger("excelExport",{workbook:e,data:i})){var o=new t.ooxml.Workbook(e);o.toDataURLAsync().then(function(i){t.saveAs({dataURI:i,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.excel.min",["excel/main.min","excel/mixins.min"],e)}(function(){},"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){function t(e){return e&&o(e.done)&&o(e.fail)}function n(e){return e&&o(e.then)&&o(e["catch"])}var i=window.kendo,o=i.isFunction,r=i.data.RemoteTransport.extend({init:function(e){var o,r=e&&e.signalr?e.signalr:{},a=r.promise;if(!a)throw Error('The "promise" option must be set.');if(!t(a)&&!n(a))throw Error('The "promise" option must be a Promise.');if(this.promise=a,o=r.hub,!o)throw Error('The "hub" option must be set.');if("function"!=typeof o.on||"function"!=typeof o.invoke)throw Error('The "hub" option is not a valid SignalR hub proxy.');this.hub=o,i.data.RemoteTransport.fn.init.call(this,e)},push:function(e){var t=this.options.signalr.client||{};t.create&&this.hub.on(t.create,e.pushCreate),t.update&&this.hub.on(t.update,e.pushUpdate),t.destroy&&this.hub.on(t.destroy,e.pushDestroy)},_crud:function(o,r){var a,s,l=this.hub,d=this.promise,c=this.options.signalr.server;if(!c||!c[r])throw Error(i.format('The "server.{0}" option must be set.',r));a=[c[r]],s=this.parameterMap(o.data,r),e.isEmptyObject(s)||a.push(s),t(d)?d.done(function(){l.invoke.apply(l,a).done(o.success).fail(o.error)}):n(d)&&d.then(function(){l.invoke.apply(l,a).then(o.success)["catch"](o.error)})},read:function(e){this._crud(e,"read")},create:function(e){this._crud(e,"create")},update:function(e){this._crud(e,"update")},destroy:function(e){this._crud(e,"destroy")}});e.extend(!0,i.data,{transports:{signalr:r}})}(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,a;if(null==e||"none"===e)return null;if(e instanceof l)return e;if(a=e.toLowerCase(),i=s(a))return a="transparent"===i[1]?new d(1,1,1,0):n(r[i[1]],t),a.match=[i[1]],a;if((i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(a))?o=new c(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(a))?o=new c(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(a))?o=new c(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(a))?o=new c(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(a))?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(a))&&(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: "+a);return o}var i,o,r,a,s,l,d,c,u,h,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"},a=o.browser,s=function(e){var t,n=Object.keys(r);return n.push("transparent"),t=RegExp("^("+n.join("|")+")(\\W|$)","i"),s=function(e){return t.exec(e)},t.exec(e)},l=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 a.msie&&a.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 c(e.r,e.g,e.b,e.a)),e}}),d=l.extend({init:function(e,t,n,i){l.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,a=Math.min(i,o,r),s=Math.max(i,o,r),l=s-a,d=s;return 0===l?new u(0,0,d,this.a):(0!==s?(t=l/s,e=i===s?(o-r)/l:o===s?2+(r-i)/l:4+(i-o)/l,e*=60,e<0&&(e+=360)):(t=0,e=-1),new u(e,t,d,this.a))},toHSL:function(){var e,t,n,i=this,o=i.r,r=i.g,a=i.b,s=Math.max(o,r,a),l=Math.min(o,r,a),d=(s+l)/2;if(s===l)e=t=0;else switch(n=s-l,t=d>.5?n/(2-s-l):n/(s+l),s){case o:e=(r-a)/n+(r255?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 c(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 u(e,t,n,null!=i?i:1)},p.fromHSL=function(e,t,n,i){return new h(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){return(e+"").replace(s,l)}function n(e){var t,n=[];for(t in e)n.push(t+e[t]);return n.sort().join("")}function i(e){var t,n=2166136261;for(t=0;t>>0}function o(){return{width:0,height:0,baseline:0}}function r(e,t,n){return u.current.measure(e,t,n)}var a,s,l,d,c,u;window.kendo.util=window.kendo.util||{},a=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=/\r?\n|\r|\t/g,l=" ",d={baselineMarkerSize:1},"undefined"!=typeof document&&(c=document.createElement("div"),c.style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: pre!important;"),u=kendo.Class.extend({init:function(t){this._cache=new a(1e3),this.options=e.extend({},d,t)},measure:function(e,r,a){var s,l,d,u,h,p,f,g,m;if(void 0===a&&(a={}),!e)return o();if(s=n(r),l=i(e+s),d=this._cache.get(l))return d;u=o(),h=a.box||c,p=this._baselineMarker().cloneNode(!1);for(f in r)g=r[f],void 0!==g&&(h.style[f]=g);return m=a.normalizeText!==!1?t(e):e+"",h.textContent=m,h.appendChild(p),document.body.appendChild(h),m.length&&(u.width=h.offsetWidth-this.options.baselineMarkerSize,u.height=h.offsetHeight,u.baseline=p.offsetTop+this.options.baselineMarkerSize),u.width>0&&u.height>0&&this._cache.put(l,u),h.parentNode.removeChild(h),u},_baselineMarker:function(){var e=document.createElement("div");return e.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",e}}),u.current=new u,kendo.deepExtend(kendo.util,{LRUCache:a,TextMetrics:u,measureText:r,objectKey:n,hashKey:i,normalizeText:t})}(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>>6),i+=on(128|63&n)):n<65536&&(i+=on(224|n>>>12),i+=on(128|n>>>6&63),i+=on(128|63&n));return i}function s(e){for(var t,n,i,o,r,s,l,d="",c=0,u=a(e);c>2,r=(3&t)<<4|n>>4,s=(15&n)<<2|i>>6,l=63&i,isNaN(n)?s=l=64:isNaN(i)&&(l=64),d=d+nn.charAt(o)+nn.charAt(r)+nn.charAt(s)+nn.charAt(l);return d}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 d(e){return void 0===e&&(e={}),e.touch?e.touch.initialTouch:e.target}function c(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 p(e,t){function n(e,n){for(var i=[],o=0,r=0,a=0;o=0&&u<=1&&h>=0&&h<=1)return new dn(e.x+h*o,e.y+h*a)}function z(e,t,n,i,o,a){var s=m((o-e)/n,3),l=m((a-t)/i,3);return m(r(Math.atan2(l,s)))}function B(e){var t,n,i,o,a,s,l,d,c,u,h,p,g,v,_,b,w,k,y,x,C,S,T,D,A,I=e.x1,E=e.y1,M=e.x2,F=e.y2,R=e.rx,P=e.ry,z=e.largeArc,B=e.swipe,L=e.rotation;return void 0===L&&(L=0),t=f(L),n=Math.cos(t),i=Math.sin(t),o=n*(I-M)/2+i*(E-F)/2,a=-i*(I-M)/2+n*(E-F)/2,s=z!==B?1:-1,l=Math.pow(o,2),d=Math.pow(a,2),c=Math.pow(R,2),u=Math.pow(P,2),h=l/c+d/u,h>1&&(h=Math.sqrt(l/c+d/u),R=h*R,c=Math.pow(R,2),P=h*P,u=Math.pow(P,2)),p=s*Math.sqrt((c*u-c*d-u*l)/(c*d+u*l)),isNaN(p)&&(p=0),g=p*(R*a)/P,v=-p*(P*o)/R,_=n*g-i*v+(I+M)/2,b=i*g+n*v+(E+F)/2,w=(o-g)/R,k=(a-v)/P,y=-(o+g)/R,x=-(a+v)/P,C=(k>=0?1:-1)*r(Math.acos(w/Math.sqrt(w*w+k*k))),S=m((w*y+k*x)/(Math.sqrt(w*w+k*k)*Math.sqrt(y*y+x*x)),10),T=(w*x-k*y>=0?1:-1)*r(Math.acos(S)),!B&&T>0&&(T-=360),B&&T<0&&(T+=360),D=C+T,A=D>=0?1:-1,D=Math.abs(D)%360*A,{center:new dn(_,b),startAngle:C,endAngle:D,radiusX:R,radiusY:P,xRotation:L}}function L(e,t){for(var n=e;nt.y,o&&((0===s[r]||1===s[r])&&n.bottomRight().x>t.x||00?n.x-o:r-n.x)/(r-o)+a-n.y>=0),i?1:0}function K(e){var t,n=e.length,i=en,o=tn;for(t=0;t1)for(o=new dn,r=e[0].bbox,a=1;as?d.length?(l.push(d),d=[],u(),c=a):(u(),l.push(d),d=[],c=0):(u(),c+=a));return d.length&&l.push(d),l}function pe(e,t,n,i,o){var r,a,s,l,d=he(e,t,o),c=t.origin.clone(),u=[];for(r=0;r"+o.render()+"",o.destroy(),i}function Ee(e,t){var n,i,o,r,a,s,l=t.segments;if(0!==l.length){for(n=l[0],i=n.anchor(),e.moveTo(i.x,i.y),o=1;ot._zIndex?-1:0}function Fe(e,t){var n,i,o;for(n=0;n=r-y)&&(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 c(e){var t,i,o,a,s,l,u;if("TABLE"==e.tagName&&He(e,{tableLayout:"fixed"}),!d(e)){for(t=rt(e),i=parseFloat(at(t,"padding-bottom")),o=parseFloat(at(t,"border-bottom-width")),a=y,y+=i+o,s=!0,l=e.firstChild;l;l=l.nextSibling)if(1==l.nodeType){if(s=!1,Ao(l,n)){h(l);continue}if(!r){c(l);continue}if(!/^(?:static|relative)$/.test(at(rt(l),"position")))continue;u=f(l),1==u?h(l):u&&d(l)?h(l):c(l)}else 3==l.nodeType&&r&&(g(l,s),s=!1);y=a}}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,a,l;return 1==e.nodeType&&e!==w&&u(e)?h(e.parentNode):(t=Ne(e,"table"),n=t&&t.querySelector("colgroup"),s.repeatHeaders&&(i=t&&t.querySelector("thead"),o=Ne(e,".k-grid.k-widget"),o&&o.querySelector(".k-auto-scrollable")&&(r=o.querySelector(".k-grid-header"))),a=p(),l=_.createRange(),l.setStartBefore(w),l.setEndBefore(e),a.appendChild(l.extractContents()),w.parentNode.insertBefore(a,w),m(e.parentNode),t&&(t=Ne(e,"table"),s.repeatHeaders&&i&&t.insertBefore(i.cloneNode(!0),t.firstChild),n&&t.insertBefore(n.cloneNode(!0),t.firstChild)),void(s.repeatHeaders&&r&&(o=Ne(e,".k-grid.k-widget"),o.insertBefore(r.cloneNode(!0),o.firstChild))))}function p(){var e=_.createElement("KENDO-PDF-PAGE");return He(e,{display:"block",boxSizing:"content-box",width:o?o+"px":"auto",padding:a.top+"px "+a.right+"px "+a.bottom+"px "+a.left+"px",position:"relative",height:r?r+"px":"auto",overflow:r||o?"hidden":"visible",clear:"both"}),s&&s.pageClassName&&(e.className=s.pageClassName),b.push(e),e}function f(e){var t,n,i=e.getBoundingClientRect();return 0===i.width||0===i.height?0:(t=w.getBoundingClientRect().top,n=r-y,i.height>n?3:i.top-t>n?1:i.bottom-t>n?2:0)}function g(e,t){var n,i,o,r,a;/\S/.test(e.data)&&(n=e.data.length,i=_.createRange(),i.selectNodeContents(e),o=f(i),o&&(r=e,1==o?h(t?e.parentNode:e):(!function s(t,n,o){return i.setEnd(e,n),t==n||n==o?n:f(i)?s(t,t+n>>1,n):s(n,n+o>>1,o)}(0,n>>1,n),!/\S/.test(""+i)&&t?h(e.parentNode):(r=e.splitText(i.endOffset),a=p(),i.setStartBefore(w),a.appendChild(i.extractContents()),w.parentNode.insertBefore(a,w),m(r.parentNode))),g(r)))}function m(e){var t=Ne(e,"li");
t&&(t.setAttribute("kendo-no-bullet","1"),m(t.parentNode))}var v=i(s.template),_=t.ownerDocument,b=[],w=s._destructive?t:Io(t),k=_.createElement("KENDO-PDF-DOCUMENT"),y=0;ze(w.querySelectorAll("tfoot")).forEach(function(e){e.parentNode.appendChild(e)}),ze(w.querySelectorAll("ol")).forEach(function(e){ze(e.children).forEach(function(e,t){e.setAttribute("kendo-split-index",t)})}),He(k,{display:"block",position:"absolute",boxSizing:"content-box",left:"-10000px",top:"-10000px"}),o&&(He(k,{width:o+"px",paddingLeft:a.left+"px",paddingRight:a.right+"px"}),He(w,{overflow:"hidden"})),t.parentNode.insertBefore(k,t),k.appendChild(w),s.beforePageBreak?setTimeout(function(){s.beforePageBreak(k,l)},15):setTimeout(l,15)}var r,a;if(t||(t={}),r=$t(),!e)return r.reject("No element to export");if("function"!=typeof window.getComputedStyle)throw Error("window.getComputedStyle is missing.  You are using an unsupported browser, or running in IE8 compatibility mode.  Drawing HTML is supported in Chrome, Firefox, Safari and IE9+.");return kendo.pdf.defineFont(We(e.ownerDocument)),a=Oe(t.scale||1),Je(e,function(){var i,s=t&&t.forcePageBreak,l=t&&t.paperSize&&"auto"!=t.paperSize,d=kendo.pdf.getPaperOptions(function(e,n){return"paperSize"==e?l?t[e]:"A4":e in t?t[e]:n}),c=l&&d.paperSize[0],u=l&&d.paperSize[1],h=t.margin&&d.margin,p=!!h;s||u?(h||(h={left:0,top:0,right:0,bottom:0}),c&&(c/=a.x),u&&(u/=a.y),h.left/=a.x,h.right/=a.x,h.top/=a.y,h.bottom/=a.y,i=new Jn({pdf:{multiPage:!0,paperSize:l?d.paperSize:"auto",_ignoreMargin:p}}),o(function(e){if(t.progress){var o=!1,a=0;!function s(){if(a0&&o(e,l,d,c,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,a;for(null==e&&(e=document),r={},a=0;a0);return n}function et(e,t,n){var i,o;Co=Object.create(Co),Co[e.tagName.toLowerCase()]={element:e,style:t},i=at(t,"text-decoration"),i&&"none"!=i&&(o=at(t,"color"),i.split(/\s+/g).forEach(function(e){Co[e]||(Co[e]=o)})),ot(t)&&(Co._stackingContext={element:e,group:n})}function tt(){Co=Object.getPrototypeOf(Co)}function nt(e){if(null!=Co._clipbox){var t=e.bbox(Co._matrix);Co._clipbox=Co._clipbox?un.intersect(Co._clipbox,t):t}}function it(){var e=Co._clipbox;return null==e||(e?0===e.width()||0===e.height():void 0)}function ot(e){function t(t){return at(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 at(e,t,n){var i=e.getPropertyValue(t);return null!=i&&""!==i||(ko.webkit?i=e.getPropertyValue("-webkit-"+t):ko.mozilla?i=e.getPropertyValue("-moz-"+t):ko.opera?i=e.getPropertyValue("-o-"+t):To&&(i=e.getPropertyValue("-ms-"+t))),arguments.length>2&&(null==i||""===i)?n:i}function st(e,t,n,i){e.setProperty(t,n,i),ko.webkit?e.setProperty("-webkit-"+t,n,i):ko.mozilla?e.setProperty("-moz-"+t,n,i):ko.opera?e.setProperty("-o-"+t,n,i):To&&(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(at(e,t+"-width")),style:at(e,t+"-style"),color:Qe(at(e,t+"-color"),!0)}}function dt(e,t){var n=e.style.cssText,i=t();return e.style.cssText=n,i}function ct(e,t){var n=at(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,a,s;return"string"==typeof t?(i=rt(n),o=parseFloat(at(i,t.replace("*","top"))),r=parseFloat(at(i,t.replace("*","right"))),a=parseFloat(at(i,t.replace("*","bottom"))),s=parseFloat(at(i,t.replace("*","left")))):"number"==typeof t&&(o=r=a=s=t),{top:e.top+o,right:e.right-r,bottom:e.bottom-a,left:e.left+s,width:e.right-e.left-r-s,height:e.bottom-e.top-a-o}}function pt(e){var t,n,i=at(e,"transform");return"none"==i?null:(t=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(i),t?(n=at(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 ft(e){return 180*e/Math.PI%360}function gt(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 mt(e,t){return t=new ln(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 Sn([t,n],i).curvePoints(),r=1;r0?(o=e.className,e.className+=" kendo-pdf-hide-pseudo-elements",Dt(e,t),e.className=o,i.forEach(function(t){e.removeChild(t)})):Dt(e,t)))}function Dt(e,t){function i(t){var n,i,o,r,a,s;if(/^td$/i.test(e.tagName)&&(n=Co.table,n&&"collapse"==at(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(),a=n.element.rows[0].cells[0],s=a.getBoundingClientRect(),s.top==r.top||s.left==r.left)return ze(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,a,s,l){function d(t,n,o){var r=Math.PI/2*t/(t+i),a={x:n.x-t,y:n.y-i},s=new jn({fill:{color:e},stroke:null}).moveTo(0,0);mt(s,o),_t(s,0,n.y,{startAngle:-90,endAngle:-ft(r),radiusX:n.x,radiusY:n.y}),a.x>0&&a.y>0?(s.lineTo(a.x*Math.cos(r),n.y-a.y*Math.sin(r)),_t(s,0,n.y,{startAngle:-ft(r),endAngle:-90,radiusX:a.x,radiusY:a.y,anticlockwise:!0})):a.x>0?s.lineTo(a.x,i).lineTo(0,i):s.lineTo(a.x,i).lineTo(a.x,0),u.append(s.close())}if(!(i<=0)){var c,u=new Jn;mt(u,l),t.append(u),bt(a),bt(s),c=new jn({fill:{color:e},stroke:null}),u.append(c),c.moveTo(a.x?Math.max(a.x,o):0,0).lineTo(n-(s.x?Math.max(s.x,r):0),0).lineTo(n-Math.max(s.x,r),i).lineTo(Math.max(a.x,o),i).close(),a.x&&d(o,a,[-1,0,0,1,a.x,0]),s.x&&d(r,s,[1,0,0,1,n-s.x,0])}}function r(e){var n,i,o=new Jn;for(vt(o,yt(e,D,A,E,I)),t.append(o),F&&(n=new jn({fill:{color:F.toCssRgba()},stroke:null}),n.moveTo(e.left,e.top).lineTo(e.right,e.top).lineTo(e.right,e.bottom).lineTo(e.left,e.bottom).close(),o.append(n)),i=d.length;--i>=0;)a(o,e,d[i],c[i%c.length],u[i%u.length],h[i%h.length],p[i%p.length])}function a(t,n,i,o,r,a,s){function l(t,n,i,l,d){function c(){for(;m.origin.x>n.left;)m.origin.x-=i}function u(){for(;m.origin.y>n.top;)m.origin.y-=l}function h(){for(;m.origin.x0&&d.height>0&&l(t,n,d.width,d.height,function(e,t){e.append(new Qn(i.url,t))})}else{if("linear"!=i.type)return;l(t,n,n.width,n.height,At(i))}}function s(){function i(n){dt(e,function(){e.style.position="relative";var i=e.ownerDocument.createElement(yo);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;n0&&(i&&"ltr"==M||a&&"rtl"==M),d=C.width>0&&(a&&"ltr"==M||i&&"rtl"==M),0!==x.width||0!==T.width||0!==C.width||0!==S.width)){if(x.color==C.color&&x.color==S.color&&x.color==T.color&&x.width==C.width&&x.width==S.width&&x.width==T.width&&l&&d)return n=ht(n,x.width/2),c=kt(e,n,x.width/2),c.options.stroke={color:x.color,width:x.width},void t.append(c);if(0===D.x&&0===A.x&&0===E.x&&0===I.x&&x.width<2&&T.width<2&&C.width<2&&S.width<2)return x.width>0&&t.append(new jn({stroke:{width:x.width,color:x.color}}).moveTo(n.left,n.top+x.width/2).lineTo(n.right,n.top+x.width/2)),S.width>0&&t.append(new jn({stroke:{width:S.width,color:S.color}}).moveTo(n.left,n.bottom-S.width/2).lineTo(n.right,n.bottom-S.width/2)),l&&t.append(new jn({stroke:{width:T.width,color:T.color}}).moveTo(n.left+T.width/2,n.top).lineTo(n.left+T.width/2,n.bottom)),void(d&&t.append(new jn({stroke:{width:C.width,color:C.color}}).moveTo(n.right-C.width/2,n.top).lineTo(n.right-C.width/2,n.bottom)));u=wt(n,D,A,E,I),h=u.tl,p=u.tr,f=u.br,g=u.bl,o(x.color,n.width,x.width,T.width,C.width,h,p,[1,0,0,1,n.left,n.top]),o(S.color,n.width,S.width,C.width,T.width,f,g,[-1,0,0,-1,n.right,n.bottom]),o(T.color,n.height,T.width,S.width,x.width,s(g),s(h),[0,-1,1,0,n.left,n.bottom]),o(C.color,n.height,C.width,x.width,S.width,s(p),s(f),[0,1,-1,0,n.right,n.top])}}var d,c,u,h,p,f,g,m,v,_,b,w,k,y=rt(e),x=lt(y,"top"),C=lt(y,"right"),S=lt(y,"bottom"),T=lt(y,"left"),D=ct(y,"top-left"),A=ct(y,"top-right"),I=ct(y,"bottom-left"),E=ct(y,"bottom-right"),M=at(y,"direction"),F=at(y,"background-color");if(F=Qe(F),d=Eo(at(y,"background-image")),c=Mo(at(y,"background-repeat")),u=Mo(at(y,"background-position")),h=Mo(at(y,"background-origin")),p=Mo(at(y,"background-size")),To&&(f=y.textOverflow,"ellipsis"==f&&(g=e.style.textOverflow,e.style.textOverflow="clip")),ko.msie&&ko.version<10&&(u=Mo(e.currentStyle.backgroundPosition)),m=ht(e.getBoundingClientRect(),"border-*-width",e),function(){var e,n,i,o,r,a,s,l=at(y,"clip"),d=/^\s*rect\((.*)\)\s*$/.exec(l);d&&(e=d[1].split(/[ ,]+/g),n="auto"==e[0]?m.top:parseFloat(e[0])+m.top,i="auto"==e[1]?m.right:parseFloat(e[1])+m.left,o="auto"==e[2]?m.bottom:parseFloat(e[2])+m.top,r="auto"==e[3]?m.left:parseFloat(e[3])+m.left,a=new Jn,s=(new jn).moveTo(r,n).lineTo(i,n).lineTo(i,o).lineTo(r,o).close(),vt(a,s),t.append(a),t=a,nt(s))}(),w=at(y,"display"),"table-row"==w)for(v=[],_=0,b=e.children;_0&&"list-item"==w&&!e.getAttribute("kendo-no-bullet")&&s(v[0]),function(){function n(){var n=kt(e,m,"padding"),i=new Jn;vt(i,n),t.append(i),t=i,nt(n)}Ft(e)?n():/^(hidden|auto|scroll)/.test(at(y,"overflow"))?n():/^(hidden|auto|scroll)/.test(at(y,"overflow-x"))?n():/^(hidden|auto|scroll)/.test(at(y,"overflow-y"))&&n()}(),It(e,t)||Bt(e,t),To&&"ellipsis"==f&&(e.style.textOverflow=g),t}function At(e){return function(t,n){var i,o,r,a,s,l,d,c,u,h,p,f,g,m=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,m);break;case"top right":case"right top":i=Math.atan2(v,m);break;case"bottom left":case"left bottom":i=Math.PI+Math.atan2(v,m);break;case"bottom right":case"right bottom":i=Math.PI-Math.atan2(v,m)}e.reverse&&(i-=Math.PI),i%=2*Math.PI,i<0&&(i+=2*Math.PI),o=Math.abs(m*Math.sin(i))+Math.abs(v*Math.cos(i)),r=Math.atan(m*Math.tan(i)/v),a=Math.sin(r),s=Math.cos(r),l=Math.abs(a)+Math.abs(s),d=l/2*a,c=l/2*s,i>Math.PI/2&&i<=3*Math.PI/2&&(d=-d,c=-c),u=[],h=0,p=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}),f=[.5-d,.5+c],g=[.5+d,.5-c],t.append(jn.fromRect(n).stroke(null).fill(new si({start:f,end:g,stops:p,userSpace:!1})));break;case"radial":window.console&&window.console.log&&window.console.log("Radial gradients are not yet supported in HTML renderer")}}}function It(e,t){var n,i,o,r;return e._kendoExportVisual?n=e._kendoExportVisual():window.kendo&&window.kendo.jQuery&&e.getAttribute(window.kendo.attr("role"))&&(i=window.kendo.widgetInstance(window.kendo.jQuery(e)),i&&(i.exportDOMVisual||i.exportVisual)&&(n=i.exportDOMVisual?i.exportDOMVisual():i.exportVisual())),!!n&&(o=new Jn,o.children.push(n),r=e.getBoundingClientRect(),o.transform(A().translate(r.left,r.top)),t.append(o),!0)}function Et(e,t,n){var i=ut(e),o=new un([i.left,i.top],[i.width,i.height]),r=new Qn(t,o);vt(r,kt(e,i,"content")),n.append(r)}function Mt(e,t){var n=rt(e),i=rt(t),o=parseFloat(at(n,"z-index")),r=parseFloat(at(i,"z-index")),a=at(n,"position"),s=at(i,"position");return isNaN(o)&&isNaN(r)?/static|absolute/.test(a)&&/static|absolute/.test(s)?0:"static"==a?-1:"static"==s?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 Ft(e){return/^(?:textarea|select|input)$/i.test(e.tagName)}function Rt(e){return e.selectedOptions&&e.selectedOptions.length>0?e.selectedOptions[0]:e.options[e.selectedIndex]}function Pt(e,t){var n=rt(e),i=at(n,"color"),o=e.getBoundingClientRect();"checkbox"==e.type?(t.append(jn.fromRect(new un([o.left+1,o.top+1],[o.width-2,o.height-2])).stroke(i,1)),e.checked&&t.append((new jn).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 kn(new gn([(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 kn(new gn([(o.left+o.right)/2,(o.top+o.bottom)/2],Math.min(o.width-8,o.height-8)/2)).fill(i).stroke(null)))}function zt(e,t){var n,i,o,r,a,s=e.tagName.toLowerCase();if("input"==s&&("checkbox"==e.type||"radio"==e.type))return Pt(e,t);if(n=e.parentNode,i=e.ownerDocument,o=i.createElement(yo),o.style.cssText=St(rt(e)),"input"==s&&(o.style.whiteSpace="pre"),"select"!=s&&"textarea"!=s||(o.style.overflow="auto"),"select"==s)if(e.multiple)for(a=0;a=c)return!0;if(g.setStart(t,d),g.setEnd(t,d+1),e=i(g),n=!1,(v||_>1)&&(f=l.substr(d).search(/\s/),f>=0&&(g.setEnd(t,d+f),o=i(g),o.bottom==e.bottom&&(e=o,n=!0,d+=f))),!n){if(f=function m(n,o,r){g.setEnd(t,o);var a=i(g);return a.bottom!=e.bottom&&n>1,o):a.right!=e.right?(e=a,o>1,r):o):o}(d,Math.min(c,d+k),c),f==d)return!0;if(d=f,f=(""+g).search(/\s+$/),0===f)return!1;f>0&&(g.setEnd(t,g.startOffset+f),e=i(g))}if(To&&(e=g.getClientRects()[0]),a=""+g,/^(?:pre|pre-wrap)$/i.test(b)){if(/\t/.test(a)){for(s=0,f=p;f=0;)h="        ".substr(0,8-(s+f)%8),a=a.substr(0,f)+h+a.substr(f+1)}}else a=a.replace(/\s+/g," ");n||(y=e.bottom),r(a,e)}function r(e,t){var i,o,r;switch(To&&!isNaN(h)&&(i=Ro(p),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}),w){case"uppercase":e=e.toUpperCase();break;case"lowercase":e=e.toLowerCase();break;case"capitalize":e=e.replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()})}r=new Do(e,new un([t.left,t.top],[t.width,t.height]),{font:p,fill:{color:f}}),n.append(r)}function a(e){function t(t,i){var o,r;t&&(o=u/12,r=new jn({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 s,l,d,c,u,h,p,f,g,m,v,_,b,w,k,y,x,C,S,T;if(!it()&&(s=rt(e),!(parseFloat(at(s,"text-indent"))<-500)&&(l=t.data,d=0,c=l.search(/\S\s*$/)+1,c&&(u=at(s,"font-size"),h=at(s,"line-height"),p=[at(s,"font-style"),at(s,"font-variant"),at(s,"font-weight"),u,at(s,"font-family")].join(" "),u=parseFloat(u),h=parseFloat(h),0!==u)))){for(f=at(s,"color"),g=e.ownerDocument.createRange(),m=at(s,"text-align"),v="justify"==m,_=at(s,"column-count",1),b=at(s,"white-space"),w=at(s,"text-transform"),k=e.getBoundingClientRect().width/u*5,0===k&&(k=500),y=null,x=Co.underline,C=Co["line-through"],S=Co.overline,T=x||C||S;!o(););T&&(g.selectNode(t),ze(g.getClientRects()).forEach(a))}}function Ht(e,t,n){var i,o,r,a,s,l;for("auto"!=n?(i=Co._stackingContext.group,n=parseFloat(n)):(i=t,n=0),o=i.children,r=0;rn);++r);return a=new Jn,i.insert(r,a),a._dom_zIndex=n,i!==t&&Co._clipbox&&(s=Co._matrix.invert(),l=Co._clipbox.transformCopy(s),vt(a,jn.fromRect(l))),a}function Nt(e,t){var n,i,o,r,a,s,l=rt(e);Ke(l),/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(e.tagName)||null!=Co._clipbox&&(n=parseFloat(at(l,"opacity")),i=at(l,"visibility"),o=at(l,"display"),0!==n&&"hidden"!=i&&"none"!=o&&(r=pt(l),s=at(l,"z-index"),(r||n<1)&&"auto"==s&&(s=0),a=Ht(e,t,s),n<1&&a.opacity(n*a.opacity()),et(e,l,a),r?dt(e,function(){var t,n,i,o;st(e.style,"transform","none","important"),st(e.style,"transition","none","important"),"static"==at(l,"position")&&st(e.style,"position","relative","important"),t=e.getBoundingClientRect(),n=t.left+r.origin[0],i=t.top+r.origin[1],o=[1,0,0,1,-n,-i],o=Ot(o,r.matrix),o=Ot(o,[1,0,0,1,n,i]),o=mt(a,o),Co._matrix=Co._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],a=e[4],s=e[5],l=t[0],d=t[1],c=t[2],u=t[3],h=t[4],p=t[5];return[n*l+i*c,n*d+i*u,o*l+r*c,o*d+r*u,a*l+s*c+h,a*d+s*u+p]}var Vt,Wt,Ut,jt,qt,Gt,$t,Yt,Kt,Qt,Xt,Jt,Zt,en,tn,nn,on,rn,an,sn,ln,dn,cn,un,hn,pn,fn,gn,mn,vn,_n,bn,wn,kn,yn,xn,Cn,Sn,Tn,Dn,An,In,En,Mn,Fn,Rn,Pn,zn,Bn,Ln,Hn,Nn,On,Vn,Wn,Un,jn,qn,Gn,$n,Yn,Kn,Qn,Xn,Jn,Zn,ei,ti,ni,ii,oi,ri,ai,si,li,di,ci,ui,hi,pi,fi,gi,mi,vi,_i,bi,wi,ki,yi,xi,Ci,Si,Ti,Di,Ai,Ii,Ei,Mi,Fi,Ri,Pi,zi,Bi,Li,Hi,Ni,Oi,Vi,Wi,Ui,ji,qi,Gi,$i,Yi,Ki,Qi,Xi,Ji,Zi,eo,to,no,io,oo,ro,ao,so,lo,co,uo,ho,po,fo,go,mo,vo,_o,bo,wo,ko,yo,xo,Co,So,To,Do,Ao,Io,Eo,Mo,Fo,Ro,Po;window.kendo=window.kendo||{},Vt=kendo.drawing,Wt=Vt.util,Ut=kendo.Class,jt=kendo.util,qt=kendo.support,Gt=qt.browser,$t=Wt.createPromise,Yt=Wt.promiseAll,Kt={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=0,s=this,l=e;if(a){for(n=l.split("."),i=this.prefix;n.length>1;)l=n.shift(),i+=l+".",o=s[l],o||(o=new sn({},i),o.addObserver(r),s[l]=o),s=o;l=n[0]}s._clear(l),s[l]=t},_clear:function(e){var t=this[e];t&&t.removeObserver&&t.removeObserver(this)},_wrap:function(e,t){var n=an.call(e),o=e;return null!==o&&i(o)&&"[object Object]"===n&&(e instanceof sn||e instanceof Ut||(o=new sn(o,this.prefix+t+".")),o.addObserver(this)),o}}),Kt.extend(sn.prototype),ln=Ut.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 ln(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,a=e.f,s=t*o-n*i;return 0===s?null:new ln(o/s,-n/s,-i/s,t/s,(i*a-o*r)/s,(n*r-t*a)/s)},clone:function(){return new ln(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=m(this.a,e),this.b=m(this.b,e),this.c=m(this.c,e),this.d=m(this.d,e),this.e=m(this.e,e),this.f=m(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;t0&&!c(e.color)},_clippedBBox:function(e){return this.bbox(e)}}),pn.prototype.nodeType="Element",Kt.extend(pn.prototype),fn=Math.PI/2,gn=Ut.extend({init:function(e,t){void 0===e&&(e=new dn),void 0===t&&(t=0),this.setCenter(e),this.setRadius(t)},setCenter:function(e){return this._observerField("center",dn.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 gn(this.center.clone(),this.radius)},pointAt:function(e){return this._pointAt(f(e))},bbox:function(e){var t,n,i,o,r=this,a=I(this.center,this.radius,this.radius,e),s=dn.maxPoint(),l=dn.minPoint();for(t=0;t<4;t++)n=r._pointAt(a.x+t*fn).transformCopy(e),i=r._pointAt(a.y+t*fn).transformCopy(e),o=new dn(n.x,i.y),s=dn.min(s,o),l=dn.max(l,o);return un.fromPoints(s,l)},_pointAt:function(e){var t=this,n=t.center,i=t.radius;return new dn(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(gn.prototype,["radius"]),Kt.extend(gn.prototype),mn="Gradient",vn={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")}},_n=""+ln.IDENTITY,bn={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:_n;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})}},wn="#000",kn=pn.extend({init:function(e,t){void 0===e&&(e=new gn),void 0===t&&(t={}),pn.fn.init.call(this,t),this.geometry(e),i(this.options.stroke)||this.stroke(wn)},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)}}),kn.prototype.nodeType="Circle",vn.extend(kn.prototype),bn.extend(kn.prototype),M(kn.prototype,["geometry"]),yn=10,xn=45,Cn=Math.pow,Sn=Ut.extend({init:function(e,t){void 0===e&&(e=new dn),void 0===t&&(t={}),this.setCenter(e),this.radiusX=t.radiusX,this.radiusY=t.radiusY||t.radiusX,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.anticlockwise=t.anticlockwise||!1,this.xRotation=t.xRotation},clone:function(){return new Sn(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},setCenter:function(e){return this._observerField("center",dn.create(e)),this.geometryChange(),this},getCenter:function(){return this.center},pointAt:function(e){var t=this.center,n=f(e);return new dn(t.x+this.radiusX*Math.cos(n),t.y+this.radiusY*Math.sin(n))},curvePoints:function(){var e,t,n,i,o=this,r=this.startAngle,a=this.anticlockwise?-1:1,s=[this.pointAt(r)],l=this._arcInterval(),d=l.endAngle-l.startAngle,c=Math.ceil(d/xn),u=d/c,h=r;for(this.xRotation&&(e=A().rotate(this.xRotation,this.center)),t=1;t<=c;t++)n=h+a*u,i=o._intervalCurvePoints(h,n,e),s.push(i.cp1,i.cp2,i.p2),h=n;return s},bbox:function(e){for(var t,n,i=this,o=this._arcInterval(),a=o.startAngle,s=o.endAngle,l=I(this.center,this.radiusX,this.radiusY,e),d=r(l.x),c=r(l.y),u=this.pointAt(s).transformCopy(e),h=L(d,a),p=L(c,a),f=this.pointAt(a).transformCopy(e),g=dn.min(f,u),m=dn.max(f,u);hi||o&&n===i)&&(i+=360),{startAngle:n,endAngle:i}},_intervalCurvePoints:function(e,t,n){var i=this.pointAt(e),o=this.pointAt(t),r=this._derivativeAt(e),a=this._derivativeAt(t),s=(f(t)-f(e))/3,l=new dn(i.x+s*r.x,i.y+s*r.y),d=new dn(o.x-s*a.x,o.y-s*a.y);return n&&(i.transform(n),o.transform(n),l.transform(n),d.transform(n)),{p1:i,cp1:l,cp2:d,p2:o}},_derivativeAt:function(e){var t=f(e);return new dn(-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,a=this,s=a.center,l=a.radiusX,d=a.radiusY,c=s.distanceTo(e),u=Math.atan2(e.y-s.y,e.x-s.x),h=l*d/Math.sqrt(Cn(l,2)*Cn(Math.sin(u),2)+Cn(d,2)*Cn(Math.cos(u),2)),p=this.pointAt(this.startAngle).round(yn),f=this.pointAt(this.endAngle).round(yn),g=P(s,e.round(yn),p,f);return r<180?t=g&&R(s.distanceTo(g),c)&&R(c,h):(n=z(s.x,s.y,l,d,e.x,e.y),360!==n&&(n=(360+n)%360),i=o.startAngle<=n&&n<=o.endAngle,t=i&&R(c,h)||!i&&(!g||g.equals(e))),t},_isOnPath:function(e,t){var n,i=this._arcInterval(),o=this.center,r=z(o.x,o.y,this.radiusX,this.radiusY,e.x,e.y);return 360!==r&&(r=(360+r)%360),n=i.startAngle<=r&&r<=i.endAngle,n&&this.pointAt(r).distanceTo(e)<=t}}),Sn.fromPoints=function(e,t,n,i,o,r,a){var s=B({x1:e.x,y1:e.y,x2:t.x,y2:t.y,rx:n,ry:i,largeArc:o,swipe:r,rotation:a});return new Sn(s.center,{startAngle:s.startAngle,endAngle:s.endAngle,radiusX:s.radiusX,radiusY:s.radiusY,xRotation:s.xRotation,anticlockwise:0===r})},T(Sn.prototype,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]),Kt.extend(Sn.prototype),Tn=[].push,Dn=[].pop,An=[].splice,In=[].shift,En=[].slice,Mn=[].unshift,Fn=Ut.extend({init:function(e){void 0===e&&(e=[]),this.length=0,this._splice(0,e.length,e)},elements:function(e){return e?(this._splice(0,this.length,e),this._change(),this):this.slice(0)},push:function(){var e=arguments,t=Tn.apply(this,e);return this._add(e),t},slice:function(){return En.call(this)},pop:function(){var e=this.length,t=Dn.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=In.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;t1)&&(o=0),r=Math.min(Math.max(c,u),1),(r>1||r<0)&&(r=1),{min:o,max:r}},_intersectionsTo:function(e,t){var n;return n=this.controlOut()&&e.controlIn()?$([this.anchor(),this.controlOut(),e.controlIn(),e.anchor()],t,this.bboxTo(e)):Y(this.anchor(),e.anchor(),t)},_isOnCurveTo:function(e,t,n,i){var o,r,a,s,l,d,c,u=this.bboxTo(e).expand(n,n);if(u.containsPoint(t))return o=this.anchor(),r=this.controlOut(),a=e.controlIn(),s=e.anchor(),"start"===i&&o.distanceTo(t)<=n?!O(o,r,t):"end"===i&&s.distanceTo(t)<=n?!O(s,a,t):(l=[o,r,a,s],!(!G(l,t,"x","y",n)&&!G(l,t,"y","x",n))||(d=A().rotate(45,t),c=[o.transformCopy(d),r.transformCopy(d),a.transformCopy(d),s.transformCopy(d)],G(c,t,"x","y",n)||G(c,t,"y","x",n)))},_isOnLineTo:function(e,t,n){var i=this.anchor(),o=e.anchor(),a=r(Math.atan2(o.y-i.y,o.x-i.x)),s=new un([i.x,i.y-n/2],[i.distanceTo(o),n]);return s.containsPoint(t.transformCopy(A().rotate(-a,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)}}),N(zn.prototype,["anchor","controlIn","controlOut"]),Kt.extend(zn.prototype),Bn=pn.extend({init:function(e){pn.fn.init.call(this,e),this.paths=new Rn,this.paths.addObserver(this),i(this.options.stroke)||this.stroke("#000")},moveTo:function(e,t){var n=new jn;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,r){return this.paths.length>0&&u(this.paths).arcTo(e,t,n,i,o,r),this},close:function(){return this.paths.length>0&&u(this.paths).close(),this},_bbox:function(e){return Q(this.paths,!0,e)},rawBBox:function(){return Q(this.paths,!1)},_containsPoint:function(e){var t,n=this.paths;for(t=0;t2&&(s="l",d.splice(0,2))),Ln[s])Ln[s](i,{parameters:d,position:o,isRelative:l,previousCommand:n}),a&&a.toLowerCase()===Wn&&i.close();else if(s!==Vn)throw Error("Error while parsing SVG path. Unsupported command: "+s);n=s}),i}}),Un.current=new Un,jn=pn.extend({init:function(e){pn.fn.init.call(this,e),this.segments=new Rn,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 dn(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,a,s,l,d;return this.segments.length>0&&(r=u(this.segments),a=r.anchor(),s=f(e),l=new dn(a.x-n*Math.cos(s),a.y-i*Math.sin(s)),d=new Sn(l,{startAngle:e,endAngle:t,radiusX:n,radiusY:i,anticlockwise:o}),this._addArcSegments(d)),this},arcTo:function(e,t,n,i,o,r){var a,s,l;return this.segments.length>0&&(a=u(this.segments),s=a.anchor(),l=Sn.fromPoints(s,e,t,n,i,o,r),this._addArcSegments(l)),this},_addArcSegments:function(e){var t,n,i=this;for(this.suspend(),t=e.curvePoints(),n=1;n1){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,a=r.length;if(1===a)n=r[0].anchor().transformCopy(e),t=new un(n,cn.ZERO);else if(a>0)for(i=1;i0)for(t.moveTo(n[0].x,n[0].y),e=1;e=0&&(this.children.splice(t,1),e.parent=null,this.childrenChange("remove",[e],t)),this},removeAt:function(e){if(0<=e&&e=0;n--)t(e[n],n)},ni=Jn.extend({init:function(t,n){Jn.fn.init.call(this,e.extend({},Zn,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"),e.reverse?(this.forEach=ti,this.justifyAlign=oe):(this.forEach=ei,this.justifyAlign=ie)},reflow:function(){var e,t,n,i,o,r,a,s,l,d,c,u,h,p,f,g,m,v,_,b,w,k,y,x,C=this;if(this._rect&&0!==this.children.length){for(this._initMap(),this.options.transform&&this.transform(null),e=this.options,t=this._rect,n=this._initGroups(),i=n.groups,o=n.groupsSize,r=this._fieldMap,a=r.sizeField,s=r.groupsSizeField,l=r.groupAxis,d=r.groupsAxis,c=new dn,u=new dn,h=new cn,p=ie(o,t,e.alignContent,d,s),v=function(t,n){var i=g.elements[n];u[l]=f,u[d]=ie(t.size[s],m,e.alignItems,d,s),ne(u,t,i),f+=t.size[a]+e.spacing},_=0;_t.size[a]&&(b=t.size[a]/m.size[a],w=m.topLeft().scale(b,b),k=m.size[s]*b,y=ie(k,t,e.alignContent,d,s),x=A(),"x"===l?x.translate(t.origin.x-w.x,y-w.y):x.translate(y-w.x,t.origin.y-w.y),x.scale(b,b),this.transform(x))}},_initGroups:function(){var e,t,n,i=this,o=this,r=o.options,a=o.children,s=r.lineSpacing,l=r.wrap,d=r.spacing,c=this._fieldMap.sizeField,u=this._newGroup(),h=[],p=function(){h.push(u),f+=u.lineSize+s},f=-s;for(e=0;ei._rect.size[c]?0===u.bboxes.length?(i._addToGroup(u,n,t),p(),u=i._newGroup()):(p(),u=i._newGroup(),i._addToGroup(u,n,t)):i._addToGroup(u,n,t));return u.bboxes.length&&p(),{groups:h,groupsSize:f}},_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:[]}}}),ii=pn.extend({init:function(e,t){void 0===e&&(e=new un),void 0===t&&(t={}),pn.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)}}),ii.prototype.nodeType="Rect",vn.extend(ii.prototype),bn.extend(ii.prototype),M(ii.prototype,["geometry"]),oi=Fn.extend({_change:function(){this.optionsChange({field:"stops"})}}),ri=Ut.extend({init:function(e,t,n){this.options=new sn({offset:e,color:t,opacity:i(n)?n:1}),this.options.addObserver(this)}}),ri.create=function(e){if(i(e)){var t;return t=e instanceof ri?e:e.length>1?new ri(e[0],e[1],e[2]):new ri(e.offset,e.color,e.opacity)}},_e(ri.prototype,["offset","color","opacity"]),Kt.extend(ri.prototype),ai=Ut.extend({init:function(e){void 0===e&&(e={}),this.stops=new oi(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=0&&this.stops.splice(t,1)}}),ai.prototype.nodeType="Gradient",Kt.extend(ai.prototype),e.extend(ai.prototype,{optionsChange:function(e){this.trigger("optionsChange",{field:"gradient"+(e?"."+e.field:""),value:this})},geometryChange:function(){this.optionsChange()}}),si=ai.extend({init:function(e){void 0===e&&(e={}),ai.fn.init.call(this,e),this.start(e.start||new dn),this.end(e.end||new dn(1,0))}}),N(si.prototype,["start","end"]),li=ai.extend({init:function(e){void 0===e&&(e={}),ai.fn.init.call(this,e),this.center(e.center||new dn),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}}),N(li.prototype,["center"]),di={swing:be,linear:we,easeOutElastic:ke},ci=Ut.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;o0||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,a=o.top;return{left:r+parseInt(n,10),top:a+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 dn(i,o)}}),gi.create=function(e,t){return pi.current.create(e,t)},gi.support={},mi=Ut.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",yi=document.createElement("div"),xi="undefined"!=typeof DOMParser,yi.innerHTML=ki,xi&&yi.firstChild.namespaceURI!==_i&&(wi=function(e,t){var n=new DOMParser,i=n.parseFromString(t,"text/xml"),o=document.adoptNode(i.documentElement);e.innerHTML="",e.appendChild(o)})),Ci=wi,Si="transform",Ti={clip:"clip-path",fill:"fill"},Di=mi.extend({init:function(e,t){mi.fn.init.call(this,e),this.definitions={},this.options=t},destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),mi.fn.destroy.call(this)},load:function(e,t){var n,o,r,a,s,l=this;for(n=0;n0&&a.load(r),s=l.element,s&&a.attachTo(s,t)},root:function(){for(var e=this;e.parent;)e=e.parent;return e},attachTo:function(e,t){var n,o=document.createElement("div");Ci(o,""+this.render()+""),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"},renderOffset:function(){return ye("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)}}),Ii=Di.extend({init:function(e){Di.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"+this.renderChildren()+""},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}}),Mi=Ii.extend({template:function(){return""+this.renderChildren()+""},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}}),Fi=Di.extend({init:function(e){Di.fn.init.call(this),this.srcElement=e,this.id=e.id,this.load([e])},template:function(){return""+this.renderChildren()+""}}),Ri=Di.extend({init:function(){Di.fn.init.call(this),this.definitionMap={}},attachTo:function(e){this.element=e},template:function(){return""+this.renderChildren()+""},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=Fi:"fill"===e&&(t instanceof si?n=Ei:t instanceof li&&(n=Mi)),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,a=t.id,s=r[a];s?s.count++:(n=this.createDefinition(e,t),r[a]={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]))}}),Pi=Di.extend({init:function(e){Di.fn.init.call(this),this.options=e,this.defs=new Ri},attachTo:function(e){this.element=e,this.defs.attachTo(e.firstElementChild)},clear:function(){mi.prototype.clear.call(this)},template:function(){return this.defs.render()+this.renderChildren()},definitionChange:function(e){this.defs.definitionChange(e)}}),zi="rtl",Bi=gi.extend({init:function(t,n){gi.fn.init.call(this,t,n),this._root=new Pi(e.extend({rtl:w(t,"direction").direction===zi},this.options)),Ci(this.element,this._template()),this._rootElement=this.element.firstElementChild,De(this._rootElement),this._root.attachTo(this._rootElement),_(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()},destroy:function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,x(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),gi.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){gi.fn.draw.call(this,e),this._root.load([e])},clear:function(){gi.fn.clear.call(this),this._root.clear()},svg:function(){return""+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""+this._root.render()+""}}),Bi.prototype.type="svg","undefined"!=typeof document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(gi.support.svg=!0,pi.current.register("svg",Bi,10)),Li=Di.extend({template:function(){return""+this.renderChildren()+""},optionsChange:function(e){"transform"===e.field&&this.transformChange(e.value),Di.fn.optionsChange.call(this,e)}}),vi.Group=Li,Hi={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]},Ni="solid",Oi="butt",Vi={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},Wi=" ",Ui=Di.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=Vi[e.field];t&&this.attr(t,e.value)}Di.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,a=this,s=e.segments,l=s.length;if(l>0){for(t=[],o=1;o"}}),vi.Path=Ui,ji=Ui.extend({renderData:function(){return this.printPath(this.srcElement.toPath())}}),vi.Arc=ji,qi=Ui.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""}}),vi.Circle=qi,Gi=Ui.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""}}),vi.Rect=Gi,$i=Ui.extend({geometryChange:function(){this.allAttr(this.mapPosition()),this.invalidate()},optionsChange:function(e){"src"===e.field&&this.allAttr(this.mapSource()),Ui.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""}}),vi.Image=$i,Yi=/&(?:[a-zA-Z]+|#\d+);/g,"undefined"!=typeof document&&(Ae._element=document.createElement("span")),Ki=Ui.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&&Ui.fn.content.call(this,this.srcElement.content()),Ui.fn.optionsChange.call(this,e)},mapStyle:function(e){var t=Ui.fn.mapStyle.call(this,e),n=this.srcElement.options.font;return e&&(n=kendo.htmlEncode(n)),t.push(["font",n],["white-space","pre"]),t},pos:function(){var e=this.srcElement.position(),t=this.srcElement.measure();return e.clone().setY(e.y+t.baseline)},renderContent:function(){var e=this.srcElement.content();return e=Ae(e),e=kendo.htmlEncode(e),jt.normalizeText(e)},renderTextAnchor:function(){var e;return!(this.options||{}).rtl||Gt.msie||Gt.edge||(e="end"),ye("text-anchor",e)},template:function(){return""+this.renderContent()+""}}),vi.Text=Ki,Qi=Ui.extend({renderData:function(){var e,t,n=this,i=this.srcElement.paths;if(i.length>0){for(e=[],t=0;t0&&s.load(a,t,n),i(t)?l.insertAt(s,t):l.append(s)},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}}),to=eo.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;n0;)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 ro(new un([n*ao,i*ao],[ao,ao]))),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;n1||e[1].length>1},getSectors:function(e){var t,n,i=e.bottomRight(),o=Math.floor(i.x/ao),r=Math.floor(i.y/ao),a=[[],[]];for(t=Math.floor(e.origin.x/ao);t<=o;t++)a[0].push(t);for(n=Math.floor(e.origin.y/ao);n<=r;n++)a[1].push(n);return a}}),uo=Ut.extend({init:function(e){e.bind("mouseenter",this._mouseenter.bind(this)),e.bind("mouseleave",this._mouseleave.bind(this)),this.element=e.element},clear:function(){this._resetCursor()},destroy:function(){this._resetCursor(),delete this.element},_mouseenter:function(e){var t=this._shapeCursor(e);t?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(t)):this._resetCursor()},_mouseleave:function(){this._resetCursor()},_shapeCursor:function(e){for(var t=e.element;t&&!i(t.options.cursor);)t=t.parent;if(t)return t.options.cursor},_getCursor:function(){if(this.element)return this.element.style.cursor},_setCursor:function(e){this.element&&(this.element.style.cursor=e,this._current=e)},_resetCursor:function(){this._current&&(this._setCursor(this._defaultCursor||""),delete this._current)}}),ho=gi.extend({init:function(e,t){var n,i;gi.fn.init.call(this,e,t),this.element.innerHTML=this._template(this),n=this.element.firstElementChild,i=y(e),n.width=i.width,n.height=i.height,this._rootElement=n,this._root=new io(n),this._mouseTrackHandler=this._trackMouse.bind(this),_(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},destroy:function(){gi.fn.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),x(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},draw:function(e){gi.fn.draw.call(this,e),this._root.load([e],void 0,this.options.cors),this._searchTree&&this._searchTree.add([e])},clear:function(){gi.fn.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.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,n=this,i=n._root,o=n._rootElement,r=[];return i.traverse(function(e){e.loading&&r.push(e.loading)}),e=$t(),t=function(){i._invalidate();try{var t=o.toDataURL();e.resolve(t)}catch(n){e.reject(n)}},Yt(r).then(t,t),e},suspendTracking:function(){gi.fn.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},resumeTracking:function(){var e,t,n;if(gi.fn.resumeTracking.call(this),!this._searchTree){for(this._searchTree=new co,e=this._root.childNodes,t=[],n=0;n"},_enableTracking:function(){this._searchTree=new co,this._cursor=new uo(this),gi.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"}))}}),ho.prototype.type="canvas","undefined"!=typeof document&&document.createElement("canvas").getContext&&(gi.support.canvas=!0,pi.current.register("canvas",ho,20)),po=eo.extend({renderTo:function(e){e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),this.renderPoints(e,this.srcElement),this.setLineDash(e),this.setLineCap(e),this.setLineJoin(e),this.setFill(e),this.setStroke(e),e.restore()},setFill:function(e){var t=this.srcElement.options.fill,n=!1;return t&&("Gradient"===t.nodeType?(this.setGradientFill(e,t),n=!0):c(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,a=this.srcElement.rawBBox();t instanceof si?(i=t.start(),o=t.end(),n=e.createLinearGradient(i.x,i.y,o.x,o.y)):t instanceof li&&(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(a.width(),0,0,a.height(),a.origin.x,a.origin.y),e.fillStyle=n,e.fill(),e.restore()},setStroke:function(e){var t=this.srcElement.options.stroke;if(t&&!c(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!==Ni&&(t=Hi[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!==Ni?e.lineCap=Oi: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){Ee(e,t)}}),Zi.Path=po,fo=po.extend({renderPoints:function(e){var t=this.srcElement.toPath();Ee(e,t)}}),Zi.Arc=fo,go=po.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)}}),Zi.Circle=go,mo=po.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)}}),Zi.Rect=mo,vo=po.extend({init:function(e,t){po.fn.init.call(this,e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=$t();var 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=$t(),this.img.src=this.srcElement.src()):po.fn.optionsChange.call(this,e)},onLoad:function(){this.loading.resolve(),this.invalidate()},onError:function(){this.loading.reject(Error("Unable to load image '"+this.img.src+"'. Check for connectivity and verify CORS headers."))},drawImage:function(e){var t=this.srcElement.rect(),n=t.topLeft();e.drawImage(this.img,n.x,n.y,t.width(),t.height())}}),Zi.Image=vo,_o=po.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,e.textAlign="left",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()}}),Zi.Text=_o,bo=po.extend({renderPoints:function(e){var t,n=this.srcElement.paths;for(t=0;ts&&(a.push(o(t.substring(s,l))),s=l+u[0].length),l+=u[0].length):l++;return s0)&&t.preventDefault()}).on("mouseleave"+U,function(){o._hovered=!1}),o.wrapper=e(),n.animation===!1&&(n.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),W(n.animation.open,{complete:function(){o.wrapper.css({overflow:I}),o._activated=!0,o._trigger(_)}}),W(n.animation.close,{complete:function(){o._animationClose()}}),o._mousedownProxy=function(e){o._mousedown(e)},o._resizeProxy=u.mobileOS.android?function(e){setTimeout(function(){o._resize(e)},600)}:function(e){o._resize(e)},n.toggleTarget&&e(n.toggleTarget).on(n.toggleEvent+U,e.proxy(o.toggle,o))},events:[g,_,m,v],options:{name:"Popup",toggleEvent:"click",origin:x+" "+w,position:y+" "+w,anchor:T,appendTo:null,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,adjustSize:{width:0,height:0},animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},_animationClose:function(){var e=this,t=e.wrapper.data(D);e.wrapper.hide(),t&&e.wrapper.css(t),e.options.anchor!=T&&e._hideDirClass(),e._closing=!1,e._trigger(v)},destroy:function(){var t,n=this,i=n.options,o=n.element.off(U);d.fn.destroy.call(n),i.toggleTarget&&e(i.toggleTarget).off(U),i.modal||(B.off(n.downEvent,n._mousedownProxy),n._toggleResize(!1)),s.destroy(n.element.children()),o.removeData(),i.appendTo[0]===document.body&&(t=o.parent(".k-animation-container"),t[0]?t.remove():o.remove())},open:function(t,n){var i,o,r=this,a={isFixed:!isNaN(parseInt(n,10)),x:t,y:n},l=r.element,d=r.options,c=e(d.anchor),h=l[0]&&l.hasClass("km-widget");if(!r.visible()){if(d.copyAnchorStyles&&(h&&"font-size"==j[0]&&j.shift(),l.css(s.getComputedStyles(c[0],j))),l.data("animating")||r._trigger(g))return;r._activated=!1,d.modal||(B.off(r.downEvent,r._mousedownProxy).on(r.downEvent,r._mousedownProxy),r._toggleResize(!1),r._toggleResize(!0)),r.wrapper=o=s.wrap(l,d.autosize).css({overflow:S,display:"block",position:C}).attr("aria-hidden",!1),u.mobileOS.android&&o.css(V,"translatez(0)"),o.css(A),e(d.appendTo)[0]==document.body&&o.css(y,"-10000px"),r.flipped=r._position(a),i=r._openAnimation(),d.anchor!=T&&r._showDirClass(i),l.data(E,i.effects).kendoStop(!0).kendoAnimate(i).attr("aria-hidden",!1)}},_location:function(t){var n,i,o=this,r=o.element,a=o.options,l=e(a.anchor),d=r[0]&&r.hasClass("km-widget");return a.copyAnchorStyles&&(d&&"font-size"==j[0]&&j.shift(),r.css(s.getComputedStyles(l[0],j))),o.wrapper=n=s.wrap(r,a.autosize).css({overflow:S,display:"block",position:C}),u.mobileOS.android&&n.css(V,"translatez(0)"),n.css(A),e(a.appendTo)[0]==document.body&&n.css(y,"-10000px"),o._position(t||{}),i=n.offset(),{width:s._outerWidth(n),height:s._outerHeight(n),left:i.left,top:i.top}},_openAnimation:function(){var e=W(!0,{},this.options.animation.open);return e.effects=s.parseEffects(e.effects,this.flipped),e},_hideDirClass:function(){var t=e(this.options.anchor),n=((t.attr("class")||"").match(R)||["","down"])[1],i=F+"-"+n;t.removeClass(i).children(P).removeClass(M).removeClass(i),this.element.removeClass(F+"-"+s.directions[n].reverse)},_showDirClass:function(t){var n=t.effects.slideIn?t.effects.slideIn.direction:"down",i=F+"-"+n;e(this.options.anchor).addClass(i).children(P).addClass(M).addClass(i),this.element.addClass(F+"-"+s.directions[n].reverse)},position:function(){this.visible()&&(this.flipped=this._position())},toggle:function(){var e=this;e[e.visible()?m:g]()},visible:function(){return this.element.is(":"+I)},close:function(n){var i,o,r,a,l=this,d=l.options;if(l.visible()){if(i=l.wrapper[0]?l.wrapper:s.wrap(l.element).hide(),l._toggleResize(!1),l._closing||l._trigger(m))return l._toggleResize(!0),t;l.element.find(".k-popup").each(function(){var t=e(this),i=t.data("kendoPopup");i&&i.close(n)}),B.off(l.downEvent,l._mousedownProxy),n?o={hide:!0,effects:{}}:(o=W(!0,{},d.animation.close),r=l.element.data(E),a=o.effects,!a&&!s.size(a)&&r&&s.size(r)&&(o.effects=r,o.reverse=!0),l._closing=!0),l.element.kendoStop(!0).attr("aria-hidden",!0),i.css({overflow:S}).attr("aria-hidden",!0),l.element.kendoAnimate(o),n&&l._animationClose()}},_trigger:function(e){return this.trigger(e,{type:e})},_resize:function(e){var t=this;u.resize.indexOf(e.type)!==-1?(clearTimeout(t._resizeTimeout),t._resizeTimeout=setTimeout(function(){t._position(),t._resizeTimeout=null},50)):(!t._hovered||t._activated&&t.element.hasClass("k-list-container"))&&t.close()},_toggleResize:function(e){var t=e?"on":"off",n=u.resize;u.mobileOS.ios||u.mobileOS.android||(n+=" "+N),e&&!this.scrollableParents&&(this.scrollableParents=this._scrollableParents()),this.scrollableParents&&this.scrollableParents.length&&this.scrollableParents[t](N,this._resizeProxy),H[t](n,this._resizeProxy)},_mousedown:function(t){var i=this,o=i.element[0],r=i.options,a=e(r.anchor)[0],l=r.toggleTarget,d=s.eventTarget(t),c=e(d).closest(".k-popup"),u=c.parent().parent(".km-shim").length;c=c[0],!u&&c&&c!==i.element[0]||"popover"!==e(t.target).closest("a").data("rel")&&(n(o,d)||n(a,d)||l&&n(e(l)[0],d)||i.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,a){var s=0;return a=a||t,r!==o&&r!==b&&o!==b&&(e+a>i&&(s+=-(n+t)),e+s<0&&(s+=n+t)),s},_scrollableParents:function(){return e(this.options.anchor).parentsUntil("body").filter(function(e,t){return s.isScrollable(t)})},_position:function(t){var n,i,o,r,a,l,d,c,g,m,v,_,b,w,k,y,x,S=this,T=S.element,I=S.wrapper,E=S.options,M=e(E.viewport),F=u.zoomLevel(),R=!!(M[0]==window&&window.innerWidth&&F<=1.02),P=e(E.anchor),z=E.origin.toLowerCase().split(" "),B=E.position.toLowerCase().split(" "),L=S.collisions,H=10002,N=0,O=document.documentElement;if(a=E.viewport===window?{top:window.pageYOffset||document.documentElement.scrollTop||0,left:window.pageXOffset||document.documentElement.scrollLeft||0}:M.offset(),R?(l=window.innerWidth,d=window.innerHeight):(l=M.width(),d=M.height()),R&&O.scrollHeight-O.clientHeight>0&&(c=E.isRtl?-1:1,l-=c*s.support.scrollbar()),n=P.parents().filter(I.siblings()),n[0])if(o=Math.max(+n.css("zIndex"),0))H=o+10;else for(i=P.parentsUntil(n),r=i.length;N=0&&e(n).is(":visible")&&!e(n).is("[disabled]")});return this.element.is("[tabindex]")&&t.push(this.element[0]),t},_sortFocusableElements:function(e){var t,n;return i?t=e.sort(function(e,t){return e.tabIndex-t.tabIndex}):(n="__k_index",e.each(function(e,t){t.setAttribute(n,e)}),t=e.sort(function(e,t){return e.tabIndex===t.tabIndex?parseInt(e.getAttribute(n),10)-parseInt(t.getAttribute(n),10):e.tabIndex-t.tabIndex}),e.removeAttr(n)),t},_nextFocusable:function(e,t){var n=t.length,i=t.index(e.target);return t.get((i+(e.shiftKey?-1:1))%n)},_focus:function(e){return"IFRAME"==e.nodeName?(e.contentWindow.document.body.focus(),t):(e.focus(),"INPUT"==e.nodeName&&e.setSelectionRange&&this._haveSelectionRange(e)&&e.setSelectionRange(0,e.value.length),t)},_haveSelectionRange:function(e){var t=e.type.toLowerCase();return"text"===t||"search"===t||"url"===t||"tel"===t||"password"===t}}),l.Popup.TabKeyTrap=a}(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,a=o.limitValue,s=o.eventCoordinates,l=n._outerWidth,d=n._outerHeight,c=e.proxy,u='',h='close',p=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=c(this._showEvent,this),this._surfaceLeaveHandler=c(this._surfaceLeave,this),this._mouseleaveHandler=c(this._mouseleave,this),this._mousemoveHandler=c(this._mousemove,this),this.surface.bind("click",this._showHandler),this.surface.bind("mouseenter",this._showHandler),this.surface.bind("mouseleave",this._mouseleaveHandler),this.surface.bind("mousemove",this._mousemoveHandler),this.surface.element.on("mouseleave"+t,this._surfaceLeaveHandler),this.element.on("click"+t,".k-tooltip-button",c(this._hideClick,this)),this.element.on("mouseleave"+t,c(this._tooltipLeave,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),this.element.off("mouseleave"+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,d=this.surface,c=d._instance._elementOffset(),u=d.getSize(),h=d._instance._offset,p=e.bbox(),f=n.width,g=n.height,m=0,v=0;return p.origin.translate(c.left,c.top),h&&p.origin.translate(-h.x,-h.y),"cursor"==r&&i?(o=s(i),m=o.x-f/2,v=o.y-g-l):"left"==r?(m=p.origin.x-f-l,v=p.center().y-g/2):"right"==r?(m=p.bottomRight().x+l,v=p.center().y-g/2):"bottom"==r?(m=p.center().x-f/2,v=p.bottomRight().y+l):(m=p.center().x-f/2,v=p.origin.y-g-l),{left:a(m,c.left,c.left+u.width),top:a(v,c.top,c.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,a,s=this._current;clearTimeout(this._timeout),s&&(s.shape===t&&n.shared||s.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),a=this._measure(n),r.visible()&&r.close(!0),this._current={options:n,elementSize:a,shape:t,target:e,position:this._position(n.shared?t:e,n,a,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=d(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},_tooltipLeave:function(){var e=this,t=e._current;t&&t.options.autoHide&&(e._timeout=setTimeout(function(){e.hide()},t.options.hideDelay||0))}});n.drawing.SurfaceTooltip=p}(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,a=i.ui.Widget,s=i.deepExtend,l=e.proxy;i.support.svg=r.support.svg,i.support.canvas=r.support.canvas,n=a.extend({init:function(e,n){a.fn.init.call(this,e,{}),this.options=s({},this.options,n),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),a.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(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/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 a(t,n){var i,o,r,a,s=e();for(r=0,a=t.length;r#=message#',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!(E(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()),a=o(i);return a?(t=Math.pow(10,a),Math.floor((r-n)*t)%(i*t)/Math.pow(100,a)===0):(r-n)%i===0}return!0},email:function(e){return I(e,"[type=email],["+l.attr("type")+"=email]",g)},url:function(e){return I(e,"[type=url],["+l.attr("type")+"=url]",m)},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(){d.fn.destroy.call(this),this.element.off(c)},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(y)&&t.element.on("submit"+c,D(t._submit,t)),t.options.validateOnBlur&&(t.element.is(v)?(t.element.on(w+c,function(){t._checkElement(t.element)}),t.element.is(_)&&t.element.on("click"+c,function(){t._checkElement(t.element)})):(t.element.on(w+c,t._inputSelector,function(){t._checkElement(e(this))}),t.element.on("click"+c,t._checkboxSelector,function(){t._checkElement(e(this))})))},validate:function(){var e,t,n,i,o=!1,r=this.value();if(this._errors={},this.element.is(v))o=this.validateInput(this.element);else{for(i=!1,e=this.element.find(this._inputSelector),t=0,n=e.length;t1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var e=this.touches;e.length>0;)e.pop().dispose()},_isMoved:function(){return e.grep(this.touches,function(e){return e.isMoved()}).length},_select:function(e){this.allowSelection&&!this.trigger(_,{event:e})||e.preventDefault()},_start:function(t){var n,o,r=this,a=0,s=r.filter,l=i(t),d=l.length,c=t.which;if(!(c&&c>1||r._maxTouchesReached()))for(P.current=null,r.currentTarget=t.currentTarget,r.stopPropagation&&t.stopPropagation();a1){for(n=0;nthis.max||eo,e||t.trigger(P,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(P,e)},rescale:function(e){this.x.rescale(e),this.y.rescale(e),this.refresh()},centerCoordinates:function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},refresh:function(){var e=this;e.x.update(),e.y.update(),e.enabled=e.x.enabled||e.y.enabled,e.minScale=e.forcedMinScale||Math.min(e.x.minScale,e.y.minScale),e.fitScale=Math.max(e.x.minScale,e.y.minScale),e.trigger(P)}}),$=C.extend({init:function(e){var t=this;D(t,e),C.fn.init.call(t)},outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},dragMove:function(e){var t=this,n=t.dimension,i=t.axis,o=t.movable,r=o[i]+e;n.enabled&&((rn.max&&e>0)&&(e*=t.resistance),o.translateAxis(i,e),t.trigger(P,t))}}),Y=y.extend({init:function(t){var n,i,o,r,a=this;D(a,{elastic:!0},t),o=a.elastic?.5:0,r=a.movable,a.x=n=new $({axis:"x",dimension:a.dimensions.x,resistance:o,movable:r}),a.y=i=new $({axis:"y",dimension:a.dimensions.y,resistance:o,movable:r}),a.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(e){a.gesture=e,a.offset=a.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,s,l=a.gesture,d=l.center,c=e.center,u=e.distance/l.distance,h=a.dimensions.minScale,p=a.dimensions.maxScale;r.scale<=h&&u<1&&(u+=.8*(1-u)),r.scale*u>=p&&(u=p/r.scale),o=r.x+a.offset.left,s=r.y+a.offset.top,t={x:(o-d.x)*u+c.x-o,y:(s-d.y)*u+c.y-s},r.scaleWith(u),n.dragMove(t.x),i.dragMove(t.y),a.dimensions.rescale(r.scale),a.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";p=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+")"},f=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(p(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=p(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(P))},_saveCoordinates:function(e){this.coordinates=e}}),g=x.extend({init:function(e,t){var n,i=this;x.fn.init.call(i,e,t),n=i.options.group,n in E?E[n].push(i):E[n]=[i]},events:[V,W,U],options:{name:"DropTarget",group:"default"},destroy:function(){s(E,this)},_trigger:function(e,t){var n=this,i=I[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(W,e)},_drop:function(e){var t=this,n=I[t.options.group];n&&(n.dropped=!t._trigger(U,e))}}),g.destroyGroup=function(e){var t,n=E[e]||M[e];if(n){for(t=0;tk.height(),n=w.body.scrollWidth>k.width()):(t=l.offsetHeight<=l.scrollHeight,n=l.offsetWidth<=l.scrollWidth),o=l.scrollTop+c.y,r=t&&o>0&&o0&&at.max?t.max:t.min;e._moveTo(n)},_moveTo:function(e){this.transition.moveTo({location:e,duration:m,ease:p.easeOutExpo})}}),F=f.extend({init:function(e){var t=this;n.effects.Animation.fn.init.call(this),s(t,e,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return g(this.offset.y)');s(n,t,{element:o,elementSize:0,movable:new c(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:i?"width":"height"}),n.scrollMovable.bind(T,a(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,a=Math.round(-o[t]*r),s=Math.round(i*r);r>=1?this.element.css("display","none"):this.element.css("display",""),a+s>i?s=i-a:a<0&&(s+=a,a=0),e.elementSize!=s&&(e.element.css(e.size,s+"px"),e.elementSize=s),e.movable.moveAxis(t,a)},show:function(){this.element.css({opacity:v,visibility:"visible"})},hide:function(){this.alwaysVisible||this.element.css({opacity:0})}}),P=l.extend({init:function(i,o){var r,d,p,f,m,v,_,b,w,k=this;return l.fn.init.call(k,i,o),i=k.element,(k._native=k.options.useNative&&n.support.hasNativeScrolling)?(i.addClass("km-native-scroller").prepend(''),s(k,{scrollElement:i,fixedContainer:i.children().first()}),t):(i.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('').prepend(''),r=i.children().eq(1),d=new n.TapCapture(i),p=new c(r),f=new h({element:r,container:i,forcedEnabled:k.options.zoom}),m=this.options.avoidScrolling,v=new n.UserEvents(i,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:k.options.zoom,supportDoubleTap:k.options.supportDoubleTap,start:function(t){f.refresh();var n=g(t.x.velocity),i=g(t.y.velocity),o=2*n>=i,r=e.contains(k.fixedContainer[0],t.event.target),a=2*i>=n;!r&&!m(t)&&k.enabled&&(f.x.enabled&&o||f.y.enabled&&a)?v.capture():v.cancel()}}),_=new u({movable:p,dimensions:f,userEvents:v,elastic:k.options.elastic}),b=new E({movable:p,dimensions:f,userEvents:v,tapCapture:d}),w=new F({moveTo:function(e){k.scrollTo(e.x,e.y)}}),p.bind(T,function(){k.scrollTop=-p.y,k.scrollLeft=-p.x,k.trigger(A,{scrollTop:k.scrollTop,scrollLeft:k.scrollLeft})}),k.options.mousewheelScrolling&&i.on("DOMMouseScroll mousewheel",a(this,"_wheelScroll")),s(k,{movable:p,dimensions:f,zoomSnapBack:b,animatedScroller:w,userEvents:v,pane:_,tapCapture:d,pulled:!1,enabled:!0,scrollElement:r,scrollTop:0,scrollLeft:0,fixedContainer:i.children().first()}),k._initAxis("x"),k._initAxis("y"),k._wheelEnd=function(){k._wheel=!1,k.userEvents.end(0,k._wheelY)},f.refresh(),k.options.pullToRefresh&&k._initPullToRefresh(),t)},_wheelScroll:function(e){if(!e.ctrlKey){this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50);var t=n.wheelDeltaY(e);t&&(this._wheelY+=t,this.userEvents.move(0,this._wheelY)),e.preventDefault()}},makeVirtual:function(){this.dimensions.y.makeVirtual()},virtualSize:function(e,t){this.dimensions.y.virtualSize(e,t)},height:function(){return this.dimensions.y.size},scrollHeight:function(){return this.scrollElement[0].scrollHeight},scrollWidth:function(){return this.scrollElement[0].scrollWidth},options:{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}},events:[S,A,D],_resize:function(){this._native||this.contentResized()},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),e.pullToRefresh&&t._initPullToRefresh()},reset:function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},contentResized:function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},zoomOut:function(){var e=this.dimensions;e.refresh(),this._scale(e.fitScale),this.movable.moveTo(e.centerCoordinates())},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},scrollTo:function(e,t){this._native?(this.scrollElement.scrollLeft(g(e)),this.scrollElement.scrollTop(g(t))):(this.dimensions.refresh(),this.movable.moveTo({x:e,y:t}))},animatedScrollTo:function(e,t,n){var i,o;this._native?this.scrollTo(e,t):(i={x:this.movable.x,y:this.movable.y},o={x:e,y:t},this.animatedScroller.setCoordinates(i,o),this.animatedScroller.setCallback(n),this.animatedScroller.start())},pullHandled:function(){var e=this;e.refreshHint.removeClass(C),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd(),e.userEvents.cancel()},destroy:function(){l.fn.destroy.call(this),this.userEvents&&this.userEvents.destroy()},_scale:function(e){this.dimensions.rescale(e),this.movable.scaleTo(e)},_initPullToRefresh:function(){var e=this;e.dimensions.y.forceEnabled(),e.pullTemplate=n.template(e.options.messages.pullTemplate),e.releaseTemplate=n.template(e.options.messages.releaseTemplate),e.refreshTemplate=n.template(e.options.messages.refreshTemplate),e.scrollElement.prepend(''+e.pullTemplate({})+""),e.refreshHint=e.scrollElement.children().first(),e.hintContainer=e.refreshHint.children(".km-template"),e.pane.y.bind("change",a(e._paneChange,e)),e.userEvents.bind("end",a(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/k>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],a=new R({axis:e,movable:n,dimension:i,container:t.element,alwaysVisible:t.options.visibleScrollHints});i.bind(T,function(){a.refresh()}),r.bind(T,function(){a.show()}),t[e+"inertia"]=new M({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(){a.hide(),t.trigger("scrollEnd",{axis:e,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft})}})}});r.plugin(P)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.groupable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,o=n._outerWidth,r=n.attr,a=e.extend,s=e.each,l=e.proxy,d=!1,c="dir",u="field",h="title",p="asc",f="desc",g="group-sort",m=".kendoGroupable",v="change",_=n.template('${data.title ? data.title: data.field}',{useWithBlock:!1}),b=function(t){var i=t.attr(n.attr("title"));return i&&(i=n.htmlEncode(i)),e('').html(i||t.attr(n.attr("field"))).prepend('')},w=e(''),k=i.extend({init:function(s,u){var h,_,k=this,y=n.guid(),x=l(k._intializePositions,k),C=k._dropCuePositions=[];i.fn.init.call(k,s,u),d=n.support.isRtl(s),_=d?"right":"left",k.draggable=h=k.options.draggable||new n.ui.Draggable(k.element,{filter:k.options.draggableElements,hint:b,group:y}),k.groupContainer=e(k.options.groupContainer,k.element).kendoDropTarget({group:h.options.group,dragenter:function(e){k._canDrag(e.draggable.currentTarget)&&(e.draggable.hint.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus"),w.css(_,0).appendTo(k.groupContainer))},dragleave:function(e){e.draggable.hint.find(".k-drag-status").removeClass("k-i-plus").addClass("k-i-cancel"),w.remove()},drop:function(t){var i,o=t.draggable.currentTarget,r=o.attr(n.attr("field")),s=o.attr(n.attr("title")),l=k.indicator(r),c=k._dropCuePositions,u=c[c.length-1],h=a({},k.options.sort,o.data(g)),p=h.dir;(o.hasClass("k-group-indicator")||k._canDrag(o))&&(u?(i=k._dropCuePosition(n.getOffset(w).left+parseInt(u.element.css("marginLeft"),10)*(d?-1:1)+parseInt(u.element.css("marginRight"),10)),i&&k._canDrop(e(l),i.element,i.left)&&(i.before?i.element.before(l||k.buildIndicator(r,s,p)):i.element.after(l||k.buildIndicator(r,s,p)),k._setIndicatorSortOptions(r,h),k._change())):(k.groupContainer.empty(),k.groupContainer.append(k.buildIndicator(r,s,p)),k._setIndicatorSortOptions(r,h),k._change()))}}).kendoDraggable({filter:"div.k-group-indicator",hint:b,group:h.options.group,
dragcancel:l(k._dragCancel,k),dragstart:function(e){var t=e.currentTarget,n=parseInt(t.css("marginLeft"),10),i=t.position(),r=d?i.left-n:i.left+o(t);x(),w.css("left",r).appendTo(k.groupContainer),this.hint.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus")},dragend:function(){k._dragEnd(this)},drag:l(k._drag,k)}).on("click"+m,".k-button",function(t){t.preventDefault(),k._removeIndicator(e(this).parent())}).on("click"+m,".k-link",function(t){var n=e(this).parent(),i=n.attr(r(c))===p?f:p;n.attr(r(c),i),k._change(),t.preventDefault()}),h.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){k._dragEnd(this)},dragcancel:l(k._dragCancel,k),dragstart:function(e){var n,i,r;return k.options.allowDrag||k._canDrag(e.currentTarget)?(x(),C.length?(n=C[C.length-1].element,i=parseInt(n.css("marginRight"),10),r=n.position().left+o(n)+i):r=0,t):(e.preventDefault(),t)},drag:l(k._drag,k)}),k.dataSource=k.options.dataSource,k.dataSource&&k._refreshHandler?k.dataSource.unbind(v,k._refreshHandler):k._refreshHandler=l(k.refresh,k),k.dataSource&&(k.dataSource.bind("change",k._refreshHandler),k.refresh())},refresh:function(){var t,n=this,i=n.dataSource,o=i.group()||[],l=r(u),d=r(h);n.groupContainer&&(n.groupContainer.empty(),s(o,function(i,o){var r=o.field,s=o.dir,c=n.element.find(n.options.filter).filter(function(){return e(this).attr(l)===r});t=n.buildIndicator(r,c.attr(d),s),n.groupContainer.append(t),n._setIndicatorSortOptions(r,a({},n.options.sort,{dir:s,compare:o.compare}))})),n._invalidateGroupContainer()},destroy:function(){var e=this;i.fn.destroy.call(e),e.groupContainer.off(m),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"},sort:{dir:p,compare:null}},indicator:function(t){var i=e(".k-group-indicator",this.groupContainer);return e.grep(i,function(i){return e(i).attr(n.attr("field"))===t})[0]},buildIndicator:function(e,t,i){var o=this,r=_({ns:n.ns,field:e.replace(/"/g,"'"),title:t,dir:i||(o.options.sort||{}).dir||p});return r},_setIndicatorSortOptions:function(t,n){var i=e(this.indicator(t));i.data(g,n)},aggregates:function(){var t,i,o,r=this;return r.element.find(r.options.filter).map(function(){var r=e(this),a=r.attr(n.attr("aggregates")),s=r.attr(n.attr("field"));if(a&&""!==a)for(t=a.split(","),a=[],i=0,o=t.length;i=r&&!d||te.right})[0],t&&(t={left:d?t.element.position().left+o(t.element)+s:t.element.position().left-a,element:t.element,before:!0})),t},_drag:function(e){var t=this._dropCuePosition(e.x.location);t&&w.css({left:t.left,right:"auto"})},_canDrag:function(e){var t=e.attr(n.attr("field"));return"false"!=e.attr(n.attr("groupable"))&&t&&(e.hasClass("k-group-indicator")||!this.indicator(t))},_canDrop:function(e,t,n){var i=e.next(),o=e[0]!==t[0]&&(!i[0]||t[0]!==i[0]||!d&&n>i.position().left||d&&n'),t.find(u.options.filter).kendoDropTarget({group:u.options.group,dragenter:function(e){var t,i,s,l;h._draggable&&(t=this.element,s=!h._dropTargetAllowed(t)||h._isLastDraggable(),n(e.draggable.hint,s),s||(i=a(t),l=i.left,c.inSameContainer&&!c.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:a(h.reorderDropCue).left>a(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=a(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;s.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(c)}(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,a=n.isFunction,s=e.extend,l="horizontal",d="vertical",c="start",u="resize",h="resizeend",p=o.extend({init:function(e,t){var n=this;o.fn.init.call(n,e,t),n.orientation=n.options.orientation.toLowerCase()!=d?l:d,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,c],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 a(o)?o(e):o!==t?n._initialElementPosition+o-i:o},_min:function(e){var n=this,i=n.options.min;return a(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=a(i)?e(i(o)):i,n.hint.css({position:"absolute"}).css(n._position,n._initialElementPosition).appendTo(n.element)),n.trigger(c,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,a=i._initialElementPosition+(e[i._positionMouse].location-i._initialMousePosition);n=r!==t?Math.max(r,a):a,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,s(e,{position:n}))},_stop:function(t){var n=this;n.hint&&n.hint.remove(),n.resizing=!1,n.trigger(h,s(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(p)}(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,a=r.ui.Widget,s=r._outerWidth,l=r._outerHeight,d="start",c="beforeMove",u="move",h="end",p="change",f="cancel",g="sort",m="remove",v="receive",_=">*",b=-1,w=a.extend({init:function(e,t){var n=this;a.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:[d,c,u,h,p,f],options:{name:"Sortable",hint:null,placeholder:null,filter:_,holdToDrag:!1,disabled:null,container:null,connectWith:null,handler:null,cursorOffset:null,axis:null,ignore:null,autoScroll:!1,cursor:"auto",moveOnDragEnter:!1},destroy:function(){this.draggable.destroy(),a.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,a=this.options.placeholder,s=this.placeholder=e(r.isFunction(a)?a.call(this,n):a);i&&n.is(i)?t.preventDefault():o&&!e(t.initialTarget).is(o)?t.preventDefault():this.trigger(d,{item:n,draggableEvent:t})?t.preventDefault():(n.css("display","none"),n.before(s),this._setCursor())},_dragcancel:function(){this._cancel(),this.trigger(f,{item:this.draggedElement}),this._resetCursor()},_drag:function(n){var i,o,r,a,s,l=this.draggedElement,d=this._findTarget(n),c={left:n.x.location,top:n.y.location},u={x:n.x.delta,y:n.y.delta},h=this.options.axis,p=this.options.moveOnDragEnter,f={item:l,list:this,draggableEvent:n};if("x"===h||"y"===h)return this._movementByAxis(h,c,u[h],f),t;if(d){if(i=this._getElementCenter(d.element),o={left:Math.round(c.left-i.left),top:Math.round(c.top-i.top)},e.extend(f,{target:d.element}),d.appendToBottom)return this._movePlaceholder(d,null,f),t;if(d.appendAfterHidden&&this._movePlaceholder(d,"next",f),this._isFloating(d.element)?u.x<0&&p||!p&&o.left<0?r="prev":(u.x>0&&p||!p&&o.left>0)&&(r="next"):u.y<0&&p||!p&&o.top<0?r="prev":(u.y>0&&p||!p&&o.top>0)&&(r="next"),r){for(s="prev"===r?jQuery.fn.prev:jQuery.fn.next,a=s.call(d.element);a.length&&!a.is(":visible");)a=s.call(a);a[0]!=this.placeholder[0]&&this._movePlaceholder(d,r,f)}}},_dragend:function(n){var i,o,r,a,s=this.placeholder,l=this.draggedElement,d=this.indexOf(l),c=this.indexOf(s),u=this.options.connectWith;return this._resetCursor(),r={action:g,item:l,oldIndex:d,newIndex:c,draggableEvent:n},c>=0?o=this.trigger(h,r):(i=s.parents(u).getKendoSortable(),r.action=m,a=e.extend({},r,{action:v,oldIndex:b,newIndex:i.indexOf(s)}),o=!(!this.trigger(h,r)&&!i.trigger(h,a))),o||c===d?(this._cancel(),t):(s.replaceWith(l),l.show(),this.draggable.dropped=!0,r={action:this.indexOf(l)!=b?g:m,item:l,oldIndex:d,newIndex:this.indexOf(l),draggableEvent:n},this.trigger(p,r),i&&(a=e.extend({},r,{action:v,oldIndex:b,newIndex:i.indexOf(l)}),i.trigger(p,a)),t)},_findTarget:function(n){var i,o,r=this._findElementUnderCursor(n),a=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}):a?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,a,s=e(this.options.connectWith);for(a=0;a0&&a-r>0&&this._movePlaceholder({element:s,sortable:this},"next",o))},_movePlaceholder:function(e,t,n){var i=this.placeholder;e.sortable.trigger(c,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("r||n.bottomspan,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up,label.k-checkbox-label.k-no-text,.k-icon.k-i-collapse,.k-icon.k-i-expand,span.k-numeric-wrap,.k-focusable",v=o.support.browser.msie,_=!1;!function(e){!function(){e('').on("click",">*",function(){_=!0}).find("span").trigger("click").end().off()}()}(e),i=r.extend({init:function(t,n){var i,s=this;r.fn.init.call(s,t,n),s._marquee=e(""),s._lastActive=null,s.element.addClass(u),s.relatedTarget=s.options.relatedTarget,i=s.options.multiple,this.options.aria&&i&&s.element.attr("aria-multiselectable",!0),s.userEvents=new o.UserEvents(s.element,{global:!0,allowSelection:!0,filter:(_?"":"."+u+" ")+s.options.filter,tap:a(s._tap,s),touchAction:i?"none":"pan-x pan-y"}),i&&s.userEvents.bind("start",a(s._start,s)).bind("move",a(s._move,s)).bind("end",a(s._end,s)).bind("select",a(s._select,s))},events:[h,f],options:{name:"Selectable",filter:">*",inputSelectors:m,multiple:!1,relatedTarget:e.noop},_isElement:function(e){var t,n=this.element,i=n.length,o=!1;for(e=e[0],t=0;te.x.location?e.x.location:e.x.startLocation,top:e.y.startLocation>e.y.location?e.y.location:e.y.startLocation,width:s(e.x.initialDelta),height:s(e.y.initialDelta)};t._marquee.css(n),t._invalidateSelectables(n,e.event.ctrlKey||e.event.metaKey),e.preventDefault()},_end:function(e){var t,n=this;n._marquee.remove(),n._unselect(n.element.find(n.options.filter+"."+g)).removeClass(g),t=n.element.find(n.options.filter+"."+c),t=t.add(n.relatedTarget(t)),n.value(t,e),n._lastActive=n._downTarget,n._items=null},_invalidateSelectables:function(e,t){var i,o,r,a,s=this._downTarget[0],l=this._items;for(i=0,o=l.length;i0?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(c),o||(i.addClass(d),this.options.aria&&i.attr(l,!0))},_notify:function(e,t){return t=t||{},this.trigger(e,t)},_unselect:function(e){if(!this.trigger(f,{element:e}))return e.removeClass(d),this.options.aria&&e.attr(l,!1),e},_select:function(t){this._allowSelection(t.event.target)&&(!v||v&&!e(o._activeElement()).is(this.options.inputSelectors))&&t.preventDefault()},_allowSelection:function(t){return!e(t).is(this.options.inputSelectors)||(this.userEvents.cancel(),this._downTarget=null,!1)},resetTouchEvents:function(){this.userEvents.cancel()},clear:function(){var e=this.element.find(this.options.filter+"."+d);this._unselect(e)},selectRange:function(t,n,i){var o,r,a,s=this;for(s.clear(),s.element.length>1&&(a=s.options.continuousItems()),a&&a.length||(a=s.element.find(s.options.filter)),t=e.inArray(e(t)[0],a),n=e.inArray(e(n)[0],a),t>n&&(r=t,t=n,n=r),s.options.useAllItems||(n+=s.element.length-1),o=t;o<=n;o++)s._selectElement(a[o]);s._notify(h,i)},destroy:function(){var e=this;r.fn.destroy.call(e),e.element.off(p),e.userEvents.destroy(),e._marquee=e._lastActive=e.element=e.userEvents=null}}),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("chat/messageBox.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,o=e.extend,r=e.proxy,a=".",s=".kendoChat",l=n.keys,d='',c='',u={input:"k-input",button:"k-button",buttonFlat:"k-flat",buttonIcon:"k-button-icon",buttonSend:"k-button-send",buttonToggle:"k-button-toggle",iconAdd:"k-icon k-i-add",hidden:"k-hidden"},h=i.extend({init:function(e,t){i.fn.init.call(this,e,t),this._wrapper(),this._attachEvents(),this._typing=!1},events:[],options:{messages:{placeholder:"Type a message...",toggleButton:"Toggle toolbar",sendButton:"Send message"}},destroy:function(){i.fn.destroy.call(this),this.input&&(this.input.off(s),this.input.remove(),this.input=null),this.element.off(s),this.element.empty()},_wrapper:function(){var t=h.styles,i=this.options,o=i.messages,r="inputId_"+n.guid();e("").addClass(t.hidden).html(o.placeholder).attr("for",r).appendTo(this.element),this.input=e("").addClass(t.input).attr("id",r).attr("placeholder",o.placeholder).appendTo(this.element),i.toolbar&&i.toolbar.toggleable&&i.toolbar.buttons&&i.toolbar.buttons.length&&e("").addClass(t.button).addClass(t.buttonFlat).addClass(t.buttonIcon).addClass(t.buttonToggle).attr("type","button").append(e(c)).appendTo(this.element).attr("title",o.toggleButton).attr("aria-label",o.toggleButton),e("").addClass(t.button).addClass(t.buttonFlat).addClass(t.buttonIcon).addClass(t.buttonSend).append(e(d)).appendTo(this.element).attr("title",o.sendButton).attr("aria-label",o.sendButton)},_attachEvents:function(){var e=h.styles;this.input.on("keydown"+s,r(this._keydown,this)).on("input"+s,r(this._input,this)).on("focusout"+s,r(this._inputFocusout,this)),this.element.on("click"+s,a+e.buttonSend,r(this._buttonClick,this)),this.element.on("click"+s,a+e.buttonToggle,r(this._toggleToolbar,this))},_input:function(){var e=this.input.val(),t=e.length>0;this._triggerTyping(t)},_keydown:function(e){var t=e.keyCode;switch(t){case l.ENTER:e.preventDefault(),this._sendMessage()}},_buttonClick:function(e){e.preventDefault(),this._sendMessage()},_sendMessage:function(){var e,t=this.input.val();t.length&&(this._triggerTyping(!1),e={text:t},this.trigger("sendMessage",e),this.input.val(""))},_inputFocusout:function(){this._triggerTyping(!1)},_triggerTyping:function(e){e?this._typing||(this.trigger("typingStart",{}),this._typing=!0):this._typing&&(this.trigger("typingEnd",{}),this._typing=!1)},_toggleToolbar:function(e){this.trigger("toggleToolbar",{originalEvent:e})}});o(!0,h,{styles:u}),o(n,{chat:{ChatMessageBox:h}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("chat/toolbar.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,o=e.extend,r=e.proxy,a=".",s=".kendoChat",l="kButtonName",d="chatToolbarScrollLeft",c="chatToolbarScrollRight",u=":visible",h={effects:"expand:vertical",duration:200},p={expand:{show:!0},collapse:{hide:!0}},f={button:"k-button",buttonFlat:"k-flat",buttonList:"k-button-list",scrollButton:"k-scroll-button",scrollButtonLeft:"k-scroll-button-left",scrollButtonRight:"k-scroll-button-right",scrollButtonLeftIcon:"k-icon k-i-arrow-chevron-left",scrollButtonRightIcon:"k-icon k-i-arrow-chevron-right",buttonIcon:"k-button-icon"},g=i.extend({init:function(e,t){var n,a;t=o({},t,{name:"ChatToolbar"}),n=t.toolbar,a=n.buttons&&n.buttons.length,i.fn.init.call(this,e,t),a&&this._createButtonList(),a&&n.scrollable&&this.buttonsWidth()>this.element.width()&&this._initScrolling(),this._setupAnimation(),a&&n.toggleable&&this.toggle(!0),this.element.on("click"+s,r(this._onClick,this))},events:["click"],destroy:function(){i.fn.destroy.call(this),this.element.off(s),this.element.empty()},_createButtonList:function(){var t,n,i=this,o=g.styles,r=i.options.toolbar.buttons,a=e("");for(t=0;t");return"string"==typeof t&&(t={name:t}),i.attr(t.attr||{}).attr("title",t.text||t.name).attr("aria-label",t.text||t.name).attr("type","button").addClass(t.name).data(l,t.name).addClass(n.button),t.iconClass&&(i.addClass(n.buttonIcon),i.prepend("")),i},_onClick:function(t){var n=g.styles,i=e(t.target).closest(a+n.button);i.is(a+n.scrollButton)&&!this._scrolling&&this._scroll(i.data(l)),i.data(l)&&this.trigger("click",{button:i[0],name:i.data(l),originalEvent:t})},_initScrolling:function(){var e=g.styles;this.scrollButtonLeft=this._createButton({name:d,iconClass:e.scrollButtonLeftIcon,attr:{"class":e.scrollButton+" "+e.scrollButtonLeft}}),this.scrollButtonRight=this._createButton({name:c,iconClass:e.scrollButtonRightIcon,attr:{"class":e.scrollButton+" "+e.scrollButtonRight}}),this.element.prepend(this.scrollButtonLeft),this.element.append(this.scrollButtonRight),this._refreshScrollButtons(),this.element.on("keydown"+s,r(this._refreshScrollButtons,this))},_scroll:function(e){var t=this,n=t.buttonWidth(),i=this.maxScrollSize(),o=e===d?n*-1:n,r=this.currentScrollLeft(),a=r+o;a=Math.min(Math.max(a,0),i),e!==d&&e!==c||(t.buttonList.scrollLeft(a),t._refreshScrollButtons(a))},_refreshScrollButtons:function(e){var n=this.maxScrollSize(),i=e===t||isNaN(parseInt(e,10))?this.currentScrollLeft():e;(this.scrollButtonLeft||this.scrollButtonRight)&&(this.scrollButtonLeft.toggle(0!==i),this.scrollButtonRight.toggle(i!==n))},_setupAnimation:function(){var e=this.options.toolbar.animation,t=o({},h),n=o({reverse:!0,hide:!0},h);e=e===!1?o(!0,{},p):o(!0,{expand:t,collapse:n},e),this.options.toolbar.animation=e},_animationComplete:function(){this._refreshScrollButtons()},currentScrollLeft:function(){return Math.round(this.buttonList.scrollLeft())},maxScrollSize:function(){return Math.round(this.buttonList[0].scrollWidth-this.buttonList[0].clientWidth)},buttons:function(){var e=g.styles;return this.buttonList?this.buttonList.children(a+e.button):null},buttonWidth:function(){return Math.round(this.buttons().last().outerWidth(!0))},buttonsWidth:function(){var e=0;return this.buttons()&&(e=this.buttonWidth()*this.buttons().length),e},toggle:function(e){var t=this.options.toolbar.animation;e&&(t=o(!0,{},p)),t.expand.complete=r(this._animationComplete,this),t.collapse.complete=r(this._animationComplete,this),this.element.is(u)?this.element.kendoStop().kendoAnimate(t.collapse):this.element.kendoStop().kendoAnimate(t.expand)}});o(!0,g,{styles:f}),o(n.chat,{ChatToolBar:g})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("chat/view.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n,i,o,r,a=window.kendo,s=a.ui.Widget,l=e.extend,d=e.proxy,c=".",u=" ",h=".kendoChat",p=a.template('#:text## if (url) { ##:text## } #'),f=a.template('# if (url) { ##:text## } #'),g=a.template('#= kendo.toString(kendo.parseDate(timestamp), "HH:mm:ss") ##:text#'),m=a.template('#:text#'),v=a.template('# for (var i = 0; i < suggestedActions.length; i++) { ##:suggestedActions[i].title## } #'),_=a.template('# if (typeof images !== "undefined" && images.length > 0) { ##:images[0].alt## } ## if (typeof title !== "undefined") { ##:title## } ## if (typeof subtitle !== "undefined") { ##:subtitle## } ## if (typeof text !== "undefined") { ##:text## } ## if (typeof buttons !== "undefined" && buttons.length > 0) { ## for (var i = 0; i < buttons.length; i++) { ##:buttons[i].title## } ## } #');
l(a.chat,{Templates:{},Components:{}}),a.chat.registerTemplate=function(e,t){a.chat.Templates[e]=a.template(t)},a.chat.getTemplate=function(e){return a.chat.Templates[e]||g},a.chat.registerTemplate("text",g),a.chat.registerTemplate("message",g),a.chat.registerTemplate("typing",m),a.chat.registerTemplate("suggestedAction",v),a.chat.registerTemplate("heroCard",_),a.chat.registerTemplate("application/vnd.microsoft.card.hero",_),a.chat.registerComponent=function(e,t){a.chat.Components[e]=t},a.chat.getComponent=function(e){return a.chat.Components[e]||null},n=a.chat.Component=a.Class.extend({init:function(t,n){this.element=e(""),this.options=t,this.view=n},destroy:function(){a.destroy(this.element)}}),i=n.extend({init:function(e,t){n.fn.init.call(this,e,t),this.element.kendoCalendar({change:function(){t.trigger("suggestedAction",{text:a.toString(this.value(),"d"),type:"message"})}})},destroy:function(){}}),a.chat.registerComponent("calendar",i),o={wrapper:"k-widget k-chat",messageList:"k-avatars",messageListContent:"k-message-list-content",messageTime:"k-message-time",messageGroup:"k-message-group",message:"k-message",only:"k-only",first:"k-first",middle:"k-middle",last:"k-last",author:"k-author",avatar:"k-avatar",noAvatar:"k-no-avatar",self:"k-alt",button:"k-button",iconButton:"k-button-icon",buttonPrimary:"k-flat k-primary",scrollButtonIcon:"k-icon",scrollButtonIconLeft:"k-i-arrow-chevron-left",scrollButtonIconRight:"k-i-arrow-chevron-right",typingIndicator:"k-typing-indicator",typingIndicatorBubble:"k-typing-indicator-bubble",bubble:"k-bubble",suggestedActions:"k-quick-replies",suggestedAction:"k-quick-reply",cardWrapper:"k-card-container",cardDeckScrollWrap:"k-card-deck-scrollwrap",cardDeck:"k-card-deck",cardList:"k-card-list",card:"k-card",cardRich:"k-card-type-rich",cardBody:"k-card-body",cardImage:"k-card-image",cardTitle:"k-card-title",cardSubtitle:"k-card-subtitle",cardActions:"k-card-actions",cardActionsVertical:"k-card-actions-vertical",cardAction:"k-card-action",selected:"k-state-selected"},r=a.chat.ChatView=s.extend({init:function(e,t){s.fn.init.call(this,e,t),this._list(),this._lastSender=null,this.typingParticipants=[],this._attachEvents(),this._scrollable()},events:[],options:{messages:{isTyping:" is typing.",areTyping:" are typing.",and:" and "}},destroy:function(){s.fn.destroy.call(this),this._scrollDraggable&&this._scrollDraggable.destroy(),this.element.empty(),this.element.off(h),this.list=null,this._lastSender=null},_list:function(){var t=r.styles;this.element.addClass(t.messageList).attr("aria-live","polite"),this.list=e("").addClass(t.messageListContent).appendTo(this.element)},_attachEvents:function(){var e=r.styles;this.element.on("click"+h,d(this._listClick,this)).on("click"+h,c+e.message,d(this._messageClick,this)).on("click"+h,c+e.suggestedAction,d(this._suggestedActionClick,this)).on("click"+h,c+e.cardAction+u+c+e.button,d(this._cardActionClick,this))},_scrollable:function(){var e=r.styles;this.element.on("click"+h,c+e.cardDeckScrollWrap+u+c+e.button,d(this._scrollButtonClick,this))},_scrollButtonClick:function(t){var n=r.styles,i=e(t.currentTarget),o=0!==i.find(c+n.scrollButtonIconLeft).length,a=i.siblings(c+n.cardDeck),s=a.find(c+n.card).last(),l=s.outerWidth(!0);a.scrollLeft(o?a.scrollLeft()-l:a.scrollLeft()+l)},getTemplate:function(e){return a.chat.getTemplate(e)},getComponent:function(e){return a.chat.getComponent(e)},renderMessage:function(e,t){e.timestamp||(e.timestamp=new Date),e.text||(e.text="");var n=this._renderTemplate(e.type,e);this._renderBubble(e.type,n,t),"typing"==e.type?this.typingParticipants.length>0&&this._removeTypingParticipant(t):this._lastSender=t.id},renderSuggestedActions:function(e){this._removeSuggestedActions();var t=this._renderTemplate("suggestedAction",{suggestedActions:e});this.list.append(t),this._scrollToBottom()},renderAttachments:function(e){var t,n,i=this._renderAttachmentWrapper(e.attachmentLayout),o="carousel"===e.attachmentLayout?i.find(c+r.styles.cardDeck):i,a=e.attachments;if(a.length){for(t=0;t");return"carousel"===t?(a.addClass(o.cardDeckScrollWrap),n=this._renderScrollButton(o.scrollButtonIconLeft),a.append(n),a.append(e("").addClass(o.cardDeck)),i=this._renderScrollButton(o.scrollButtonIconRight),a.append(i)):a.addClass(o.cardList),a},_renderScrollButton:function(t){var n=r.styles;return e("").addClass(n.button).addClass(n.iconButton).append(e("").addClass(n.scrollButtonIcon).addClass(t))},_removeSuggestedActions:function(){this.list.find(c+r.styles.suggestedActions).remove()},_listClick:function(t){var n=r.styles,i=e(t.target);i.hasClass(n.message)||i.parents(c+n.message).length||this._clearSelection()},_messageClick:function(t){this._clearSelection(),e(t.currentTarget).addClass(r.styles.selected)},_suggestedActionClick:function(t){var n=e(t.target).data("value")||"";this.trigger("actionClick",{text:n}),this._removeSuggestedActions()},_cardActionClick:function(t){var n=e(t.target).data("value")||"";this.trigger("actionClick",{text:n})},_renderBubble:function(e,t,n){this._removeSuggestedActions(),this._removeTypingIndicator();var i=this._getMessageGroup(n,e);this._appendToGroup(i,t,e),this._scrollToBottom()},_renderTemplate:function(t,n){var i,o,a,s,d=this.getComponent(t);return d?(o=new d(n,this),i=o.element):(a=this.getTemplate(t),s=l(!0,{},n,{styles:r.styles}),i=e(a(s))),i},_getMessageGroup:function(t,n){var i,o=r.styles,a=this._getMessageGroupTemplate(t,n),s="typing"==n?this.element:this.list;return t.id===this._lastSender&&null!==this._lastSender&&"typing"!==n&&(i=this.list.find(c+o.messageGroup).last(),i.length)?i:e(a({text:t.name,url:t.iconUrl,styles:o})).appendTo(s)},_getMessageGroupTemplate:function(e,t){var n=e.id===this.options.user.id,i=n?f:p;return"typing"==t&&(i=m),i},_appendToGroup:function(e,t,n){var i=r.styles,o=e.find(c+i.message),a=o.length,s=this.element.find(c+i.typingIndicator);s.length&&"typing"==n||(t.addClass(0===a?i.only:i.last),o.filter(c+i.only).removeClass(i.only).addClass(i.first),o.filter(c+i.last).removeClass(i.last).addClass(i.middle),e.append(t))},_renderTypingIndicator:function(t){var n,i,r=this.element.find(c+o.typingIndicatorBubble);this._addTypingParticipant(t),r.length?(i=this._composeTypingParticipantsText(this.typingParticipants),n=r.find(c+o.author).first(),n.text(i)):e(m({text:t.name+this.options.messages.isTyping,styles:o})).appendTo(this.element),this._scrollToBottom()},_addTypingParticipant:function(e){var t,n=!1;for(t=0;t";this.wrapper=this.element.addClass(e.wrapper).append(o),t.toolbar&&t.toolbar.buttons&&t.toolbar.buttons.length&&this.wrapper.find(r+e.toolbarBoxWrapper).show(),n&&this.wrapper.height(n),i&&this.wrapper.css("max-width",i)},_view:function(){var e=this,t=s.styles,i=o(!0,{},this.options),a=this.wrapper.find(r+t.viewWrapper+"");this.view=new n.chat.ChatView(a,i),this.view.bind("actionClick",function(t){e.trigger("actionClick",t),e.postMessage(t.text)})},_messageBox:function(){var e=this,t=s.styles,i=o(!0,{},this.options),a=this.wrapper.find(r+t.messageBoxWrapper+"");this.messageBox=new n.chat.ChatMessageBox(a,i),this.messageBox.bind("typingStart",function(t){e.trigger("typingStart",t)}).bind("typingEnd",function(t){e.trigger("typingEnd",t)}).bind("sendMessage",function(t){e.trigger("sendMessage",t),e.postMessage(t.text)}).bind("toggleToolbar",function(){e.toggleToolbar()})},_toolbar:function(){var e=this,i=s.styles,a=o(!0,{},e.options),l=e.wrapper.find(r+i.toolbarBoxWrapper+"");a.toolbar.scrollable===t&&(this.options.toolbar.scrollable=a.toolbar.scrollable=!0),a.toolbar.toggleable===t&&(this.options.toolbar.toggleable=a.toolbar.toggleable=!1),e.toolbar=new n.chat.ChatToolBar(l,a),e.toolbar.bind("click",function(t){e.trigger("toolClick",{sender:e,name:t.name,button:t.button,messageBox:e.messageBox.input[0],originalEvent:t.originalEvent})})},postMessage:function(e){var t=o(!0,{},{text:e,type:"message",timestamp:new Date,from:this.getUser()});this.trigger("post",t),this.renderMessage(t,t.from)},renderMessage:function(e,t){this.view.renderMessage(e,t)},renderSuggestedActions:function(e){this.view.renderSuggestedActions(e)},renderAttachments:function(e,t){this.view.renderAttachments(e,t)},toggleToolbar:function(e){this.toolbar.toggle(e)},renderUserTypingIndicator:function(e){this.view._renderTypingIndicator(e)},clearUserTypingIndicator:function(e){this.view._removeTypingParticipant(e)},removeTypingIndicator:function(){this.view._removeTypingIndicator()}});n.ui.plugin(s),o(!0,s,{styles:a})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.badge.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,o=n.ui,r="k-badge-primary",a="k-badge-secondary",s="k-badge-info",l="k-badge-success",d="k-badge-warning",c="k-badge-error",u="k-badge-outline",h="k-badge-pill",p="function",f="string",g=i.extend({init:function(o,r){var a,s=this;i.fn.init.call(s,o,r),r=e.extend(!0,{},r),a=r.type||"primary",s.element=e(o).addClass("k-badge").addClass(s.classPerType[a]),"outline"==r.look&&s.element.addClass(u),"rectangle"!=r.appearance&&s.element.addClass(h),t===r.visible||r.visible||s.element.hide(),s._setInitialValue(),n.notify(s)},options:{name:"Badge",value:"",visible:!0,appearance:"rectangle",template:null,type:"secondary",look:null},classPerType:{primary:r,info:s,success:l,warning:d,error:c,secondary:a},value:function(e){var i=this;return e?(i.element.html(n.htmlEncode(i._createContent(e))),i._value=e,t):i._value},_createContent:function(e){var t,i=this.options.template,o=typeof i;return t=o==p?i(e):o===f?n.template(i)({value:e}):e},_setInitialValue:function(){var e=this,t=e.options.value||e.element.html();/\S/.test(t)||(t=""),e._value=t,e.element.html(n.htmlEncode(e._createContent(t)))},hide:function(){this.element.hide()},show:function(){this.element.show()},setOptions:function(e){var t=this;t.element.removeClass(function(e,n){n.indexOf("k-")>=0&&t.element.removeClass(n)}),t.init(t.element,e)}});o.plugin(g)}(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","kendo.badge.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,o=n.ui,r=e.proxy,a=n.keys,s="click",l=n.support.mousedown,d=n.support.mouseup,c="mouseout",u="k-button",h="k-button-icon",p="k-button-icontext",f=".kendoButton",g="disabled",m="k-state-disabled",v="k-state-focused",_="k-state-active",b="k-badge-overlay",w=i.extend({init:function(e,t){var o=this;i.fn.init.call(o,e,t),e=o.wrapper=o.element,t=o.options,e.addClass(u).attr("role","button"),t.enable=t.enable&&t.enabled&&!e.attr(g),o.enable(t.enable),t.enable&&o._tabindex(),t.badge&&o.createBadge(t.badge),o.iconElement(),e.on(s+f,r(o._click,o)).on("focus"+f,r(o._focus,o)).on("blur"+f,r(o._blur,o)).on("keydown"+f,r(o._keydown,o)).on("keyup"+f,r(o._removeActive,o)).on(l+f,r(o._addActive,o)).on(d+f+" "+c+f,r(o._removeActive,o)),n.notify(o)},destroy:function(){var e=this;e.wrapper.off(f),e.badge&&e.badge.destroy(),i.fn.destroy.call(e)},events:[s],options:{name:"Button",icon:"",iconClass:"",spriteCssClass:"",imageUrl:"",enable:!0,enabled:!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(v)},_blur:function(){var e=this;e.element.removeClass(v),setTimeout(function(){e.element.removeClass(_)})},_keydown:function(e){var t=this;e.keyCode!=a.ENTER&&e.keyCode!=a.SPACEBAR||(t._addActive(),t._isNativeButton()||(e.keyCode==a.SPACEBAR&&e.preventDefault(),t._click(e)))},_removeActive:function(){this.element.removeClass(_)},_addActive:function(){this.options.enable&&this.element.addClass(_)},iconElement:function(){var t,n,i,o=this,r=o.element,a=o.options,s=a.icon,l=a.iconClass,d=a.spriteCssClass,c=a.imageUrl;(d||c||s||l)&&(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?h:p)),c?(n=r.children("img.k-image").first(),n[0]||(n=e('icon').prependTo(r)),n.attr("src",c)):s||l?(t=r.children("span.k-icon").first(),t[0]||(t=e("").prependTo(r)),t.attr("class",s?"k-icon k-i-"+s:l)):d&&(t=r.children("span.k-sprite").first(),t[0]||(t=e('').prependTo(r)),t.addClass(d))},enable:function(e){var n=this,i=n.element;e===t&&(e=!0),e=!!e,n.options.enable=e,i.toggleClass(m,!e).attr("aria-disabled",!e).attr(g,!e),e&&n._tabindex();try{i.blur()}catch(o){}},createBadge:function(t){var n=this,i=e("").appendTo(n.element);t.overlay!==!1&&n.element.addClass(b),n.badge="string"==typeof t||"number"==typeof t?new o.Badge(i,{value:t}):"boolean"==typeof t?new o.Badge(i):new o.Badge(i,t)}});n.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.buttongroup.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t,n){var i=e("").appendTo(n);n.badge="string"==typeof t||"number"==typeof t?new o.Badge(i,{value:t,appearance:"rectangle"}):"boolean"==typeof t?new o.Badge(i):new o.Badge(i,t)}var i=window.kendo,o=i.ui,r=o.Widget,a=i.keys,s=e.proxy,l=i.template,d=".kendoButtonGroup",c="k-widget",u="k-button-group",h="k-button",p="k-button-icontext",f="k-button-icon",g="k-state-active",m="k-state-focused",v="k-state-disabled",_="select",b="click",w="keydown",k="focus",y="blur",x="mousedown",C={item:l('#= icon(iconClass) ##= image(item) ##= text #'),image:l('icon'),icon:l(''),empty:l("")},S=r.extend({init:function(t,n){var i=this;r.fn.init.call(i,t,n),i.wrapper=i.element,i.options.items&&i._renderItems(i.options.items),i.selectedIndices=[],i.element.addClass(c+" "+u).attr("role","group").attr("tabindex",i.element.attr("tabindex")||"0").children().each(function(){var t=e(this);i._updateClasses.bind(i)(t)}),i._enable=!0,i.options.enable&&i.options.enabled||(i._enable=!1,i.element.attr("aria-disabled",!0).addClass(v)),i.select(i.options.index),i.element.on(b+d,"."+h,s(i._click,i)).on(k+d,s(i._focus,i)).on(w+d,s(i._keyDown,i)).on(y+d,function(){i.preventFocus=!1,i.element.find("."+h).removeClass(m)}).on(x+d,function(){i.preventFocus=!0})},events:[_],options:{name:"ButtonGroup",selection:"single",index:-1,enable:!0,enabled:!0},current:function(){return this.element.find("."+g)},_renderItems:function(t){var o=this;t.forEach(function(t){var r=e(C.item({image:t.imageUrl?C.image:C.empty,icon:t.imageUrl||!t.iconClass&&!t.icon?C.empty:C.icon,iconClass:t.iconClass||"k-icon k-i-"+t.icon,item:t,text:t.text?t.encoded===!1?t.text:i.htmlEncode(t.text):""}));t.attributes&&r.attr(t.attributes),t.selected&&r.addClass(g),(t.iconClass||t.icon||t.imageUrl)&&r.addClass(t.text?"k-button-icontext":"k-button-icon"),t.badge&&n(t.badge,r),r.appendTo(o.element)})},_focus:function(){var t=e(this.element);this.preventFocus||(t.find("."+g).length?t.find("."+g).first().focus().addClass(m):t.children().first().focus().addClass(m))},_keyDown:function(t){var n,o=this,r=e(o.element),s=r.find("."+h),l=r.find("."+m),d=s.index(l),c=i.support.isRtl(o.element);t.keyCode===a.LEFT&&!c||t.keyCode===a.RIGHT&&c?(l.removeClass(m),n=0===d?s.eq(s.length-1):e(s[d-1]),n.focus().addClass(m),t.preventDefault()):t.keyCode===a.LEFT&&c||t.keyCode===a.RIGHT&&!c?(l.removeClass(m),n=d+1===s.length?s.eq(0):e(s[d+1]),n.focus().addClass(m),t.preventDefault()):t.keyCode!==a.ENTER&&t.keyCode!==a.SPACEBAR||(o._select(l),t.preventDefault())},select:function(n){var i,o=this,r=-1;n!==t&&n!==-1&&(o.element.find("."+h).removeClass(m),"number"==typeof n?(r=n,n=o.element.children().eq(n)):n.nodeType&&(n=e(n),r=n.index()),"multiple"===o.options.selection?(i="true"===n.attr("aria-pressed"),n.attr("aria-pressed",!i).toggleClass(g),o.selectedIndices.indexOf(r)===-1?o.selectedIndices.push(r):o.selectedIndices.splice(o.selectedIndices.indexOf(r),1)):(o.selectedIndices=[],o.current().attr("aria-pressed",!1).removeClass(g),n.attr("aria-pressed",!0).addClass(g),o.selectedIndices.push(r)),o.trigger(_,{indices:o.selectedIndices}))},badge:function(e,o){var r,a=this.element,s=isNaN(e)?a.find(e):a.children().eq(e),l=o||0===o;if(s.length){if(r=s.children(".k-badge").eq(0).data("kendoBadge"),!r&&l)return n({value:i.htmlEncode(o)},s),i.htmlEncode(o);if(l)r.value(i.htmlEncode(o));else if(o===!1)return r.element.empty().remove(),r.destroy(),t;return r?r.value():null}},enable:function(e){t===e&&(e=!0),this.element.attr("aria-disabled",!e).toggleClass(v,!e),this._enable=this.options.enable=e},destroy:function(){var t=this;t.element.off(d),t.element.find(".k-badge").each(function(){e(this).data("kendoBadge").destroy()}),r.fn.destroy.call(t)},_updateClasses:function(t){var o=i.attrValue(t,"icon"),r=i.attrValue(t,"badge"),a=t.find("img").addClass("k-image"),s=!0;t.attr("aria-pressed",!1).attr("role","button").addClass(h),(t.is("[disabled]")||t.hasClass(v))&&t.addClass(v).attr("aria-disabled",!0).removeAttr("disabled"),t.is("."+g)&&(t.removeClass(g),(!t.hasClass(v)&&"single"===this.options.selection||"multiple"===this.options.selection)&&this.select(t[0])),!a[0]&&o&&t.prepend(e(C.icon("k-icon k-i-"+o))),t.contents().filter(function(){return!e(this).hasClass("k-icon")&&!e(this).hasClass("k-image")}).each(function(){(1==this.nodeType||3==this.nodeType&&e.trim(this.nodeValue).length>0)&&(s=!1)}),(a[0]||o)&&t.addClass(s?f:p),(r||0===r)&&n(r,t)},_click:function(t){var n=e(t.target).closest("."+h);t.isDefaultPrevented()||this._select(n)},_select:function(e){var n=e;return this.element.find("."+h).removeClass(m),!this._enable||n.is("."+v)?(n.addClass(m),t):(this.select(e[0]),n.addClass(m),t)}});o.plugin(S)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.breadcrumb.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,o=e.extend,r=e.isPlainObject,a=e.proxy,s=".kendoBreadcrumb",l="aria-hidden",d="aria-label",c="click",u="focus",h="blur",p="keydown",f="change",g=".",m={widget:"k-widget k-breadcrumb",overlay:"k-breadcrumb-container",textbox:"k-textbox",link:"k-breadcrumb-link",item:"k-breadcrumb-item",delimiter:"k-breadcrumb-delimiter-icon",rootItem:"k-breadcrumb-root-item",rootLink:"k-breadcrumb-root-link",overflowIcon:"k-breadcrumb-overflow-icon",focused:"k-state-focused",hidden:"k-hidden",inputWrapper:"k-breadcrumb-input-container"},v=i.extend({init:function(e,t){var o=this;t=t||{},i.fn.init.call(o,e,t),o._wrapper(),t.editable&&(o._editable(),o._tabindex()),o.wrapper.on(c+s,"a:not(.k-state-disabled)",a(o._click,o)),t.value||t.bindToLocation||!t.items?o._value():t.items&&o.items(t.items),o._resizeHandler=n.onResize(function(){o.resize(!0)})},options:{editable:!1,navigational:!1,bindToLocation:!1,items:null,name:"Breadcrumb",gap:0,rootIcon:"home",delimiterIcon:"arrow-chevron-right",messages:{rootTitle:"Go to root"}},events:[f,c],destroy:function(){var e=this;i.fn.destroy.call(e),n.unbindResize(e._resizeHandler),e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(s)},items:function(e){var n=this;return e===t?n.options.items:(n.options.items=e,n._segments=e,n.refresh(),t)},_update:function(e){var t=this;e!==t.value()&&(t._generateSegments(e),t.refresh(),t.trigger(f,{sender:this,value:e}))},_generateSegments:function(e){var n,i,o=this,r=o.options,a=r.items,s=o._split(e);if(!a)return o.options.items=o._segments=s,t;for(o._segments=[],i=0;i-1&&a[i]&&a[i].text===s[i]?a[i]:s[i])},_click:function(t){var n=this,i=n.options,o=e(t.target).closest(g+m.item),r=o.prevAll().addBack(),a=n._getItems(r),s=n._path(a),l=n._segments[o.index()];i.navigational||t.preventDefault(),n.trigger(c,{sender:n,originalEvent:t,isRoot:"rootitem"===l.type,item:l})||n._update(s)},_getItems:function(t){var n=this;return e.map(t,function(t){return n._segments[e(t).index()]||t.innerText})},_edit:function(){var e=this,t=e.input;e.oldValue=e.value(),e.inputWrapper.css("height",e.wrapper.height()),e.overlay.hide(),e.input.val(e.value()),e.input.attr(l,!1),e.inputWrapper.show(),setTimeout(function(){t.select()})},_blur:function(e){var t=this,n=t.input,i=t.inputWrapper,o=t.wrapper,r=t.overlay,a=n.val().replace(/\/{2,}/g,"/");r.is(":visible")||(e&&(a=t.oldValue),n.attr(l,!0),i.hide(),r.show(),n.val(""),t._update(a),o.removeClass(m.focused))},_keydown:function(e){var t=this,i=e.keyCode,o=i===n.keys.ENTER,r=i===n.keys.ESC;(o||r)&&(t._blur(r),setTimeout(function(){t.overlay.find("a:first").focus()}))},isNavigational:function(e){var t=e.hasClass(m.textbox)||e.closest(g+m.item);return e[0]!==this.wrapper[0]&&(t&&!e.hasClass("k-breadcrumb-last-item"))},_wrapperKeydown:function(t){var i=this,o=e(t.target),r=i.isNavigational(o);t.keyCode!==n.keys.ENTER||r||i._edit()},_wrapperClick:function(t){var n=this,i=e(t.target),o=n.isNavigational(i);o||this._edit()},_wrapperFocus:function(t){e(t.target).addClass(m.focused)},_wrapperBlur:function(t){e(t.target).removeClass(m.focused)},_wrapper:function(){var t=this,n=this.element,i=n.is("input");t.wrapper=i?n.wrap(e("")).parent():n,i?(t.element.wrap(e("").addClass(m.inputWrapper)).addClass(m.textbox).parent().hide(),t.inputWrapper=t.wrapper.find(g+m.inputWrapper)):t.inputWrapper=t.wrapper.append(e("").addClass(m.inputWrapper)).find(g+m.inputWrapper).hide(),t.wrapper.addClass(m.widget),t.wrapper.attr(d,"Breadcrumb"),t.overlay=t.wrapper.append(e("").addClass(m.overlay)).find(g+m.overlay)},_editable:function(){var t=this,n=t.element,i=n.is("input");t.input=i?t.element:e(""),t.inputWrapper.append(t.input),t.input.addClass(m.textbox).attr(l,!0),t.input.on(h+s,a(t._blur,t,!1)).on(p+s,a(t._keydown,t)),t.wrapper.on(u+s,a(t._wrapperFocus,t)).on(h+s,a(t._wrapperBlur,t)).on(p+s,a(t._wrapperKeydown,t)).on(c+s,a(t._wrapperClick,t))},_value:function(){var e=this,t=e.options;e.value(t.value?t.value:t.bindToLocation?window.location.href.replace(/http(s?):\/\//,"").replace(/\/$/,""):"")},_split:function(e){return e.split("/").filter(function(e,t){return!(t>0&&""===e)})},isRtl:function(){return n.support.isRtl(this.wrapper)},refresh:function(){var i,a,s,l,d=this,c=d.options,u=c.messages,h=d.options.delimiterIcon,p="",f="",g=""===d.value(),v=d._segments;for("arrow-chevron-right"==h&&d.isRtl()&&(h="arrow-chevron-left"),a=0,s=v.length;a1,href:c.navigational?i.href:"#",delimiterIcon:h,itemClass:i.itemClass||"",linkClass:i.linkClass||"",showIcon:i.showIcon===t?"rootitem"===i.type&&"item"!==i.type:i.showIcon,showText:i.showText===t?"item"===i.type&&"rootitem"!==i.type:i.showText}),"rootitem"===i.type&&(i.itemClass+=" k-breadcrumb-root-item",i.linkClass+=" "+m.rootLink)),"rootitem"===i.type&&""===i.text&&(i.title=u.rootTitle),f+=f.match(/\/$/)?"":"/",p+=n.template(this.itemTemplate)(i));this.overlay.empty().append(e(p)),this.resize(!0)},itemTemplate:'#if(showIcon) {##}##if(showText) {##:text##}##if(renderDelimiter) {##}##if(type === "rootitem" && renderDelimiter) {##}#',_displayOverflowIcons:function(e){var t=this,n=t.wrapper.find(g+m.rootItem);e?n.find(g+m.delimiter).addClass(m.overflowIcon).removeClass(m.hidden):n.find(g+m.overflowIcon).removeClass(m.overflowIcon).last().addClass(m.hidden)},_shrinkItems:function(){var t,i,o=this,r=o.wrapper,a=o.overlay,s=o.overlay.find(g+m.item+":visible:not(.k-breadcrumb-root-item)"),l=r.width()-o.options.gap;if(1!=s.length)for(i=0;i=l){if(i==s.length-1)break;t.hide(),o._displayOverflowIcons(!0)}},_showItem:function(e,t,i){return!!(e.length&&i>t+n._outerWidth(e,!0))&&(e.show(),!0)},_stretchItems:function(){var t,i,o,r=this,a=r.wrapper,s=r.overlay,l=r.overlay.find(g+m.item+":hidden:not(.k-breadcrumb-root-item)"),d=a.width()-r.options.gap;for(l.length||r._displayOverflowIcons(!1),o=l.length-1;o>=0&&(t=e(l[o]),i=n._outerWidth(s),!(i>d)&&this._showItem(t,i,d));o--);},_resize:function(){this._shrinkItems(),this._stretchItems()},getSize:function(){return n.dimensions(this.wrapper)},value:function(e){var n=this;return e!==t?(n._generateSegments(e),n.refresh(),t):n._path(n._segments)},_path:function(t){return e.map(t,function(e){var t=r(e)?e.text:e;return"/"===t?"":t}).join("/")}});n.ui.plugin(v)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.switch.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,o=".kendoSwitch",r=i.Widget,a=n.support,s="change",l={widget:"k-switch k-widget",container:"k-switch-container",handle:"k-switch-handle",checked:"k-switch-on",checkedLabel:"k-switch-label-on",unchecked:"k-switch-off",uncheckedLabel:"k-switch-label-off",disabled:"k-state-disabled",readonly:"k-state-readonly",active:"k-state-active"},d="disabled",c="aria-disabled",u="readonly",h="aria-readonly",p="aria-checked",f="checked",g=a.click+o,m=a.pointers?"pointerup":"touchend",v="keydown"+o,_="_label",b=e.proxy,w=n.template(''),k=n.template("#=checked##=unchecked#"),y=r.extend({init:function(t,i){var o,a=this;r.fn.init.call(a,t,i),i=a.options,t=a.element[0],t.type="checkbox",o=e(w({styles:l})),a.wrapper=a.element.wrap(o).parent(),a.wrapper.append(e(k({styles:l,checked:i.messages.checked,unchecked:i.messages.unchecked}))).addClass(t.className),a.wrapper.on(g,b(a._click,a)).on(m,b(a._touchEnd,a)).on(v,b(a._keydown,a)),a.options.enabled&&a._tabindex(),a._initSettings(),a._aria(),n.notify(a,n.ui)},setOptions:function(n){var i,o,r=this,a=n.messages;r.options=e.extend(r.options,n),a&&a.checked!==t&&(i=r.wrapper.find("."+l.checkedLabel),i.text(a.checked)),a&&a.unchecked!==t&&(o=r.wrapper.find("."+l.uncheckedLabel),o.text(a.unchecked)),n.width&&r.wrapper.css({width:n.width}),n.enabled!==t&&r.enable(n.enabled),n.readonly!==t&&r.readonly(n.readonly),r.check(n.checked)},_initSettings:function(){var e=this,t=e.element[0],n=e.options;n.width&&e.wrapper.css({width:n.width}),null===n.checked&&(n.checked=t.checked),e.check(n.checked),n.enabled=n.enabled&&!e.element.attr(d),e.enable(n.enabled),n.readonly=n.readonly||!!e.element.attr(u),e.readonly(n.readonly)},_aria:function(){var t,i=this,o=i.element,r=i.wrapper,a=o.attr("id"),s=e('label[for="'+a+'"]'),l=o.attr("aria-label"),d=o.attr("aria-labelledby");l?r.attr("aria-label",l):d?r.attr("aria-labelledby",d):s.length&&(t=s.attr("id"),t||(t=(a||n.guid())+_,s.attr("id",t)),r.attr("aria-labelledby",t))},events:[s],options:{name:"Switch",messages:{checked:"On",unchecked:"Off"},width:null,checked:null,enabled:!0,readonly:!1},check:function(e){var n=this,i=n.element[0];return e===t?i.checked:(i.checked!==e&&(n.options.checked=i.checked=e),n.wrapper.attr(p,e).toggleClass(l.checked,e).toggleClass(l.unchecked,!e),
e?n.element.attr(f,f):n.element.removeAttr(f),t)},value:function(e){return"string"==typeof e&&(e="true"===e),this.check.apply(this,[e])},destroy:function(){r.fn.destroy.call(this),this.wrapper.off(o)},toggle:function(){var e=this;e.check(!e.element[0].checked)},enable:function(e){var n=this.element,i=this.wrapper;t===e&&(e=!0),this.options.enabled=e,e?(n.removeAttr(d),i.removeAttr(c)):(n.attr(d,d),i.attr(c,!0)),i.toggleClass(l.disabled,!e)},readonly:function(e){var n=this,i=n.element,o=n.wrapper;t===e&&(e=!0),n.options.readonly=e,e?(i.attr(u,!0),o.attr(h,!0)):(i.removeAttr(u),o.removeAttr(h)),o.toggleClass(l.readonly,e)},_check:function(){var e=this,n=e.element[0].checked=!e.element[0].checked;return e.wrapper.focus(),!e.options.enabled||e.options.readonly||e.trigger(s,{checked:n})?(e.element[0].checked=!n,t):(e.check(n),t)},_keydown:function(e){e.keyCode===n.keys.SPACEBAR&&(this._check(),e.preventDefault())},_isTouch:function(e){return/touch/.test(e.type)||e.originalEvent&&/touch/.test(e.originalEvent.pointerType)},_click:function(e){this._isTouch(e)||1!==e.which||this._check()},_touchEnd:function(e){this._isTouch(e)&&(this._check(),e.preventDefault())}});i.plugin(y)}(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:d.ns,numeric:i,title:o||""})}function i(e,t,n){return T({className:e.substring(1),text:t,wrapClassName:n||""})}function o(e,t,n,i){e.find(t).parent().attr(d.attr("page"),n).attr("tabindex",-1).toggleClass("k-state-disabled",i)}function r(e,t){o(e,p,1,t<=1)}function a(e,t){o(e,g,Math.max(1,t-1),t<=1)}function s(e,t,n){o(e,m,Math.min(n,t+1),t>=n)}function l(e,t,n){o(e,f,n,t>=n)}var d=window.kendo,c=d.ui,u=c.Widget,h=e.proxy,p=".k-i-arrow-end-left",f=".k-i-arrow-end-right",g=".k-i-arrow-60-left",m=".k-i-arrow-60-right",v="k-pager-lg k-pager-md k-pager-sm",_="change",b=".kendoPager",w="click",k="keydown",y="disabled",x="down",C=e(document.documentElement),S=Number.MAX_VALUE,T=d.template(''),D=u.extend({init:function(t,n){var o,c,v,y,C=this,S=null;u.fn.init.call(C,t,n),n=C.options,C._createDataSource(n),C.linkTemplate=d.template(C.options.linkTemplate),C.selectTemplate=d.template(C.options.selectTemplate),C.currentPageTemplate=d.template(C.options.currentPageTemplate),o=C.page(),c=C.totalPages(),C._refreshHandler=h(C.refresh,C),C.dataSource.bind(_,C._refreshHandler),C.downEvent=d.applyEventMap(x,d.guid()),n.previousNext&&(C.element.find(p).length||(C.element.append(i(p,n.messages.first,"k-pager-first")),r(C.element,o,c)),C.element.find(g).length||(C.element.append(i(g,n.messages.previous)),a(C.element,o,c))),n.numeric&&(C.list=C.element.find(".k-pager-numbers"),C.list.length||(C.list=e('').appendTo(C.element)),n.dataSource&&!n.dataSource.total()&&C.list.empty().append(C.currentPageTemplate({text:0})).append(C.selectTemplate({text:0})),C.list.wrap('')),n.input&&(C.element.find(".k-pager-input").length||C.element.append(''+n.messages.page+''+d.format(n.messages.of,c)+""),C.element.on(k+b,".k-pager-input input",h(C._keydown,C))),n.previousNext&&(C.element.find(m).length||(C.element.append(i(m,n.messages.next)),s(C.element,o,c)),C.element.find(f).length||(C.element.append(i(f,n.messages.last,"k-pager-last")),l(C.element,o,c))),n.pageSizes&&(C.element.find(".k-pager-sizes").length||(v=n.pageSizes.length?n.pageSizes:["all",5,10,20],y=e.map(v,function(e){return e.toLowerCase&&"all"===e.toLowerCase()?""+n.messages.allPages+"":""+e+""}),e(''+n.messages.itemsPerPage+"").appendTo(C.element).find("select").html(y.join("")).end().appendTo(C.element)),C.element.find(".k-pager-sizes select").val(C.pageSize()),d.ui.DropDownList&&C.element.find(".k-pager-sizes select").show().kendoDropDownList(),C.element.on(_+b,".k-pager-sizes select",h(C._change,C))),n.refresh&&(C.element.find(".k-pager-refresh").length||C.element.append(''),C.element.on(w+b,".k-pager-refresh",h(C._refreshClick,C))),n.info&&(C.element.find(".k-pager-info").length||C.element.append('')),C.element.on(w+b,"a",h(C._click,C)).addClass("k-pager-wrap k-widget k-floatwrap"),C.element.on(w+b,".k-current-page",h(C._toggleActive,C)),n.autoBind&&C.refresh(),C._resizeHandler=h(C.resize,C,!0),e(window).on("resize"+b,C._resizeHandler),S=C._getWidthSizeClass(C.element.width()),S&&C.element.addClass(S),d.notify(C)},destroy:function(){var t=this;u.fn.destroy.call(t),t.element.off(b),t.dataSource.unbind(_,t._refreshHandler),t._refreshHandler=null,e(window).off("resize"+b,this._resizeHandler),d.destroy(t.element),t.element=t.list=null},events:[_],options:{name:"Pager",selectTemplate:'#=text#',currentPageTemplate:'#=text#',linkTemplate:'#=text#',buttonCount:10,autoBind:!0,numeric:!0,info:!0,input:!1,previousNext:!0,pageSizes:!1,refresh:!1,responsive:!0,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(_,t._refreshHandler),t.dataSource=t.options.dataSource=e,e.bind(_,t._refreshHandler),t.options.autoBind&&e.fetch()},_resize:function(e){var t,n;e.width&&(t=this._getWidthSizeClass(e.width),n=this.element,t?n.hasClass(t)||(n.removeClass(v),n.addClass(t)):n.removeClass(v))},_createDataSource:function(e){this.dataSource=d.data.DataSource.create(e.dataSource)},refresh:function(t){var i,o,c,u,h,p,f=this,g=1,m=f.page(),v="",_=f.options,b=f.pageSize(),w=f._collapsedTotal(),k=f.dataSource.total(),x=f.totalPages(),T=f.linkTemplate,D=_.buttonCount;if(C.unbind(f.downEvent,e.proxy(f._hideList,f)),!t||"itemchange"!=t.action){if(_.numeric){for(m>D&&(c=m%D,g=0===c?m-D+1:m-c+1),o=Math.min(g+D-1,x),g>1&&(v+=n(T,g-1,"...",!1,_.messages.morePages)),i=g;i<=o;i++)v+=n(i==m?f.selectTemplate:T,i,i,!0);o0?d.format(_.messages.display,f.dataSource.options.endless?1:Math.min((m-1)*(f.dataSource.pageSize()||0)+1,w),Math.min(m*b,w),k):_.messages.empty,f.element.find(".k-pager-info").html(v)),_.input&&f.element.find(".k-pager-input").html(f.options.messages.page+''+d.format(_.messages.of,x)).find("input").val(m).attr(y,k<1).toggleClass("k-state-disabled",k<1),_.previousNext&&(r(f.element,m,x),a(f.element,m,x),s(f.element,m,x),l(f.element,m,x)),_.pageSizes&&(u=f.element.find(".k-pager-sizes option[value='all']").length>0,h=u&&(b===this.dataSource.total()||b==S),p=b,h&&(b="all",p=_.messages.allPages),f.element.find(".k-pager-sizes select").val(b).attr("aria-label",b).filter("["+d.attr("role")+"=dropdownlist]").kendoDropDownList("value",b).kendoDropDownList("text",p))}},_collapsedTotal:function(){return this.dataSource.total()},_keydown:function(e){if(e.keyCode===d.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 n=e.currentTarget.value,i=parseInt(n,10),o=this.dataSource;isNaN(i)?"all"==(n+"").toLowerCase()&&(o._pageSize=t,o._take=t,o._skip=0,o.fetch()):o.pageSize(i)},_toggleActive:function(){var t=this;t.list.hasClass("k-state-expanded")?C.unbind(t.downEvent,e.proxy(t._hideList,t)):C.bind(t.downEvent,e.proxy(t._hideList,t)),t.list.toggleClass("k-state-expanded")},_hideList:function(t){var n=this,i=d.eventTarget(t);e.contains(n.list[0],i)||(C.unbind(n.downEvent,e.proxy(n._hideList,n)),n.list.removeClass("k-state-expanded"))},_click:function(t){var n=e(t.currentTarget);t.preventDefault(),n.is(".k-state-disabled")||this.page(parseInt(n.attr(d.attr("page")),10))},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?(this.trigger("pageChange",{index:e})||(this.dataSource.page(e),this.trigger(_,{index:e})),t):this.dataSource.total()>0?this.dataSource.page():0},_getWidthSizeClass:function(e){var t=this,n=v.split(" ");return t.options.responsive?e<=480?n[2]:e<=640?n[1]:e<=1024?n[0]:null:null}});c.plugin(D)}(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,a=window.setTimeout,s="click",l="show",d="hide",c="k-notification",u=".k-notification-wrap .k-i-close",h="k-hiding",p="info",f="success",g="warning",m="error",v="top",_="left",b="bottom",w="right",k="up",y=".kendoNotification",x='',C='#=content#',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,d],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,a={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},s=null!==n?_:w;switch(e){case"down":i=b+" "+s,o=v+" "+s,delete a.paddingBottom;break;case w:i=v+" "+w,o=v+" "+_,delete a.paddingRight;break;case _:i=v+" "+_,o=v+" "+w,delete a.paddingLeft;break;case k:i=v+" "+s,o=b+" "+s,delete a.paddingTop;break;default:null!==t?(i=b+" "+s,o=v+" "+s,delete a.paddingBottom):(i=v+" "+s,o=b+" "+s,delete a.paddingTop)}r._popupOrigin=i,r._popupPosition=o,r._popupPaddings=a},_attachPopupEvents:function(e,t){function n(e){e.on(s+y,function(){o._hidePopup(t)})}var i,o=this,r=e.allowHideAfter,l=!isNaN(r)&&r>0;e.hideOnClick?t.bind("activate",function(){l?a(function(){n(t.element)},r):n(t.element)}):e.button&&(i=t.element.find(u),l?a(function(){n(i)},r):n(i))},_showPopup:function(t,i){var o,s,l=this,d=i.autoHideAfter,c=i.position.left,p=i.position.top;s=e("."+l._guid+":not(."+h+")").last(),o=new n.ui.Popup(t,{anchor:s[0]?s:document.body,origin:l._popupOrigin,position:l._popupPosition,animation:i.animation,copyAnchorStyles:!1,modal:!0,collision:"",isRtl:l._isRtl,close:function(){l._triggerHide(this.element)},deactivate:function(e){e.sender.element.off(y),e.sender.element.find(u).off(y),e.sender.destroy()}}),l._attachPopupEvents(i,o),t.removeClass("k-group k-reset"),s[0]?o.open():(null===c&&(c=e(window).width()-t.outerWidth()-i.position.right),null===p&&(p=e(window).height()-t.outerHeight()-i.position.bottom),o.open(c,p)),o.wrapper.addClass(l._guid).css(r({margin:0,zIndex:10050},l._popupPaddings)),i.position.pinned?(o.wrapper.css("position","fixed"),s[0]&&l._togglePin(o.wrapper,!0)):s[0]||l._togglePin(o.wrapper,!1),d>0&&a(function(){l._hidePopup(o)},d)},_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(s+y,o(i._hideStatic,i,t))}var i=this,r=e.allowHideAfter,l=!isNaN(r)&&r>0;e.hideOnClick?l?a(function(){n(t)},r):n(t):e.button&&(l?a(function(){n(t.find(u))},r):n(t.find(u)))},_showStatic:function(t,n){var i,o=this,r=n.autoHideAfter,s=n.animation,l=n.stacking==k||n.stacking==_?"prependTo":"appendTo";t.removeClass("k-popup").addClass(o._guid)[l](n.appendTo).hide().kendoAnimate(s.open||!1),i=o.getNotifications(),i.each(function(t,i){o._attachStaticEvents(n,e(i)),r>0&&a(function(){o._hideStatic(e(i))},r)})},_hideStatic:function(e){e.kendoAnimate(r(this.options.animation.close||!1,{complete:function(){e.off(y).find(u).off(y),e.remove()}})),this._triggerHide(e)},_triggerHide:function(e){this.trigger(d,{element:e}),this.angular("cleanup",function(){return{elements:e}})},show:function(i,o,a){var s,d,u=this,h=u.options,f=e(x);return o||(o=p),null!==i&&i!==t&&""!==i&&(n.isFunction(i)&&(i=i()),d={typeIcon:o,content:""},s=e.isPlainObject(i)?r(d,i):r(d,{content:i}),f.addClass(c+"-"+o).toggleClass(c+"-button",h.button).toggleClass(c+"-closable",h.button).attr("data-role","alert").css({width:h.width,height:h.height}).append(u._getCompiled(o,a)(s)),u.angular("compile",function(){return{elements:f,data:[{dataItem:s}]}}),e(h.appendTo)[0]?u._showStatic(f,h):u._showPopup(f,h),u.trigger(l,{element:f})),u},showText:function(e,t){this.show(e,t,!0)},info:function(e){return this.show(e,p)},success:function(e){return this.show(e,f)},warning:function(e){return this.show(e,g)},error:function(e){return this.show(e,m)},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("."+c)},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(y).find(u).off(y)}});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","kendo.fx.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(a.ns+"title");if(t)return e.attr("title",t),e.removeData(a.ns+"title"),!0}function o(e){var t=e.attr("title");if(t)return e.data(a.ns+"title",t),e.attr("title",""),!0}function r(e){for(;e.length&&!e.is("body")&&!o(e);)e=e.parent()}var a=window.kendo,s=a.ui.Widget,l=a.ui.Popup,d=a.isFunction,c=e.isPlainObject,u=e.extend,h=e.proxy,p=e(document),f=a.isLocalUrl,g="_tt_active",m="aria-describedby",v="show",_="hide",b="error",w="contentLoad",k="requestStart",y="k-content-frame",x='#if (!autoHide) {#  #}##if (callout){ ##}#',C=a.template("This page requires frames in order to show content"),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"},I={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}},E=function(e){return e.target.data(a.ns+"title")},M=s.extend({init:function(e,t){var n,i=this;s.fn.init.call(i,e,t),n=i.options.position.match(/left|right/)?"horizontal":"vertical",i.dimensions=I[n],i._documentKeyDownHandler=h(i._documentKeyDown,i),i.element.on(i.options.showOn+S,i.options.filter,h(i._showOn,i)),(this._isShownOnMouseEnter()||this._isShownOnClick())&&i.element.on("mouseenter"+S,i.options.filter,h(i._mouseenter,i)),this.options.autoHide&&this._isShownOnMouseEnter()&&i.element.on("mouseleave"+S,i.options.filter,h(i._mouseleave,i)),this.options.autoHide&&this._isShownOnFocus()&&i.element.on("blur"+S,i.options.filter,h(i._blur,i))},options:{name:"Tooltip",filter:"",content:E,showAfter:100,hideAfter:100,callout:!0,offset:0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{duration:40,hide:!0}}},events:[v,_,w,b,k],_isShownOnFocus:function(){return this.options.showOn&&this.options.showOn.match(/focus/)},_isShownOnMouseEnter:function(){return this.options.showOn&&this.options.showOn.match(/mouseenter/)},_isShownOnClick:function(){return this.options.showOn&&this.options.showOn.match(/click/)},_mouseenter:function(t){r(e(t.currentTarget))},_showOn:function(t){var n=this,i=e(t.currentTarget);n._isShownOnClick()&&!n._isShownOnMouseEnter()?n._show(i):n._isShownOnFocus()?(r(i),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;c(i)&&i.url?("iframe"in n.options||(r=!f(i.url)),n.trigger(k,{options:i,target:e}),r?(o.hide(),t=o.find("."+y)[0],t?t.src=i.url||t.src:o.html(C({content:i})),o.find("."+y).off("load"+S).on("load"+S,function(){n.trigger(w),o.show()})):(o.empty(),a.ui.progress(o,!0),n._ajaxRequest(i))):i&&d(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){a.ui.progress(t.content,!1),t.trigger(b,{status:n,xhr:e})},success:h(function(e){a.ui.progress(t.content,!1),t.content.html(e),t.trigger(w)},t)},e))},_documentKeyDown:function(e){e.keyCode===a.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(m),this.element.removeAttr("id").attr("aria-hidden",!0),p.off("keydown"+S,t._documentKeyDownHandler)}),t.popup._hovered=!0,t.popup.open()},_initPopup:function(){var n=this,i=n.options,o=e(a.template(x)({callout:i.callout&&"center"!==i.position,dir:A[i.position],autoHide:i.autoHide}));n.popup=new l(o,u({autosize:!0,activate:function(){var e=this.options.anchor,o=e[0].id||n.element[0].id;o&&(e.attr(m,o+g),this.element.attr("id",o+g)),i.callout?n._positionCallout():n._offset(n.options.position,n.options.offset),this.element.removeAttr("aria-hidden"),p.on("keydown"+S,n._documentKeyDownHandler),n.trigger(v),n.popup._hovered=t},close:function(){n.trigger(_)},copyAnchorStyles:!1,animation:i.animation},T[i.position])),o.css({width:i.width,height:i.height}),n.content=o.find(".k-tooltip-content"),n.arrow=o.find(".k-callout"),i.autoHide&&this._isShownOnMouseEnter()?o.on("mouseleave"+S,h(n._mouseleave,n)):o.on("click"+S,".k-tooltip-button",h(n._closeButtonClick,n))},_closeButtonClick:function(e){e.preventDefault(),this.hide()},_mouseleave:function(e){var t=this;clearTimeout(t.timeout),t.timeout=setTimeout(function(){t._closePopup(e.currentTarget)},t.options.hideAfter)},_blur:function(e){this._closePopup(e.currentTarget)},_closePopup:function(t){this.popup&&!this.popup._hovered?this.popup.close():n(e(t))},target:function(){return this.popup?this.popup.options.anchor:null},_positionCallout:function(){var t=this,n=t.options.position,i=t.dimensions,o=i.offset,r=t.popup,a=r.options.anchor,s=e(a).offset(),l=e(r.element).offset(),d=A[r.flipped?D[n]:n],c=s[o]-l[o]+e(a)[i.size]()/2;t._offset(n,t.options.offset),t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-"+d).css(o,c)},destroy:function(){var e=this.popup;e&&(e.element.off(S),e.destroy()),clearTimeout(this.timeout),this.element.off(S),p.off("keydown"+S,this._documentKeyDownHandler),s.fn.destroy.call(this)},_offset:function(e,t){var n=this,i="top"==e||"left"==e,o=n.popup.flipped,r=i&&o||!i&&!o?1:-1,s=i?"margin-"+e:"margin-"+D[e],l=a._outerWidth(n.arrow)/2+t;n.popup.wrapper.css(s,l*r+"px")}});a.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.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?("boolean"!=typeof e&&(e="true"===e.toLowerCase()),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,a=t.length,s=e.length,l=[],d=[];if(s)for(o=0;o').attr({tabIndex:-1,"aria-hidden":!0}),o.list=e("").append(o.ul).on("mousedown"+r,L(o._listMousedown,o)),i=t.attr(k),i||(i=c.guid()),o.list.attr(k,i+"-list"),o.ul.attr(k,i+"_listbox"),n.columns&&n.columns.length&&(o.ul.removeClass("k-list").addClass("k-grid-list"),o._columnsHeader()),o._header(),o._noData(),o._footer(),o._accessors(),o._initValue()},options:{valuePrimitive:!1,footerTemplate:"",headerTemplate:"",noDataTemplate:!0,messages:{noData:"No data found.",clear:"clear"}},setOptions:function(e){f.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable),e.columns&&e.columns.length&&this._columnsHeader(),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData()},focus:function(){this._focused.focus()},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_header:function(){var n,i=this,o=e(i.header),r=i.options.headerTemplate;return this._angularElement(o,"cleanup"),c.destroy(o),o.remove(),r?(n="function"!=typeof r?c.template(r):r,o=e(n({})),i.header=o[0]?o:null,i.list.prepend(o),this._angularElement(i.header,"compile"),t):(i.header=null,t)},_columnsHeader:function(){var t,n,i,o,r,a,s,l,d,u,h,f=this,g=e(f.columnsHeader);for(this._angularElement(g,"cleanup"),c.destroy(g),g.remove(),t="",n="",i="",o=0;o",i+="",i+=l(r),i+="";n+="",i+="",t+=n,t+=i,t+="",f.columnsHeader=g=e(t),f.list.prepend(g),this._angularElement(f.columnsHeader,"compile")},_noData:function(){var n=this,i=e(n.noData),o=n.options.noDataTemplate===!0?n.options.messages.noData:n.options.noDataTemplate;return n.angular("cleanup",function(){return{elements:i}}),c.destroy(i),i.remove(),o?(n.noData=e('').appendTo(n.list),n.noDataTemplate="function"!=typeof o?c.template(o):o,t):(n.noData=null,t)},_footer:function(){var n=this,i=e(n.footer),o=n.options.footerTemplate;return this._angularElement(i,"cleanup"),c.destroy(i),i.remove(),o?(n.footer=e('').appendTo(n.list),n.footerTemplate="function"!=typeof o?c.template(o):o,t):(n.footer=null,t)},_listOptions:function(t){var n=this,i=n.options,o=i.virtual,r={change:L(n._listChange,n)},a=L(n._listBound,n);return o="object"==typeof o?o:{},t=e.extend({autoBind:!1,selectable:!0,dataSource:n.dataSource,click:L(n._click,n),activate:L(n._activateItem,n),columns:i.columns,deactivate:L(n._deactivateItem,n),dataBinding:function(){n.trigger("dataBinding")},dataBound:a,height:i.height,dataValueField:i.dataValueField,dataTextField:i.dataTextField,groupTemplate:i.groupTemplate,fixedGroupTemplate:i.fixedGroupTemplate,template:i.template},t,o,r),t.template||(t.template="#:"+c.expr(t.dataTextField,"data")+"#"),i.$angular&&(t.$angular=i.$angular),t},_initList:function(){var e=this,t=e._listOptions({selectedItemChange:L(e._listChange,e)});e.listView=e.options.virtual?new c.ui.VirtualList(e.ul,t):new c.ui.StaticList(e.ul,t),e.listView.bind("listBound",L(e._listBound,e)),e._setListValue()},_setListValue:function(e){e=e||this.options.value,e!==t&&this.listView.value(e).done(L(this._updateSelectionState,this))},_updateSelectionState:e.noop,_listMousedown:function(e){this.filterInput&&this.filterInput[0]===e.target||e.preventDefault()},_isFilterEnabled:function(){var e=this.options.filter;return e&&"none"!==e},_hideClear:function(){var e=this;e._clear&&e._clear.addClass(O)},_showClear:function(){this._clear&&this._clear.removeClass(O)},_clearValue:function(){this._clearText(),this._accessor(""),this.listView.value([]),this._isSelect&&(this._customOption=t),this._isFilterEnabled()&&!this.options.enforceMinLength&&(this._filter({word:"",open:!1}),this.options.highlightFirst&&this.listView.focus(0)),this._change()},_clearText:function(){this.text("")},_clearFilter:function(){this.options.virtual||this.listView.bound(!1),this._filterSource()},_filterSource:function(e,t){var n,i,o=this,r=o.options,l=r.filterFields&&e&&e.logic&&e.filters&&e.filters.length,d=o.dataSource,c=B({},d.filter()||{}),u=e||c.filters&&c.filters.length&&!e,h=s(c,r.dataTextField);if(this._clearFilterExpressions(c),!e&&!h||!o.trigger("filtering",{filter:e}))return n={filters:[],logic:"and"},l?n.filters.push(e):this._pushFilterExpression(n,e),a(c)&&(n.logic===c.logic?n.filters=n.filters.concat(c.filters):n.filters.push(c)),o._cascading&&this.listView.setDSFilter(n),i=B({},{page:u?1:d.page(),pageSize:u?d.options.pageSize:d.pageSize(),sort:d.sort(),filter:d.filter(),group:d.group(),aggregate:d.aggregate()},{filter:n}),d[t?"read":"query"](d._mergeState(i))},_pushFilterExpression:function(e,t){a(t)&&""!==t.value&&e.filters.push(t)},_clearFilterExpressions:function(e){var t,n;if(e.filters){for(n=0;n').attr({role:"button",tabIndex:-1})),t.options.clearButton||t._clear.remove(),this._hideClear()},search:function(t){var n=this.options;t="string"==typeof t?t:this._inputValue(),clearTimeout(this._typingTimeout),(!n.enforceMinLength&&!t.length||t.length>=n.minLength)&&(this._state="filter",this.listView&&(this.listView._emptySearch=!e.trim(t).length),this._isFilterEnabled()?this._filter({word:t,open:!0}):this._searchByWord(t))},current:function(e){return this._focus(e)},items:function(){return this.ul[0].children},destroy:function(){var e=this,t=e.ns;f.fn.destroy.call(e),e._unbindDataSource(),e.listView.destroy(),e.list.off(t),e.popup.destroy(),e._form&&e._form.off("reset",e._resetHandler)},dataItem:function(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=c.getter,o=t.attr(c.attr("text-field")),r=t.attr(c.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"),n._ariaLabel()},_ariaLabel:function(){var t,n=this,i=n._focused,o=n.element,r=o.attr("id"),a=e('label[for="'+r+'"]'),s=o.attr("aria-label"),l=o.attr("aria-labelledby");i!==o&&(s?i.attr("aria-label",s):l?i.attr("aria-labelledby",l):a.length&&(t=a.attr("id")||n._generateLabelId(a,r||c.guid()),i.attr("aria-labelledby",t)))},_generateLabelId:function(e,t){var n=t+A;return e.attr("id",n),n},_blur:function(){var e=this;e._change(),e.close()},_change:function(){var e,i=this,o=i.selectedIndex,r=i.options.value,a=i.value();i._isSelect&&!i.listView.bound()&&r&&(a=r),a!==n(i._old,typeof a)&&a!==n(i._oldText,typeof a)?e=!0:i._valueBeforeCascade!==t&&i._valueBeforeCascade!==n(i._old,typeof i._valueBeforeCascade)&&i._userTriggered?e=!0:o===t||o===i._oldIndex||i.listView.isFiltered()||(e=!0),e&&(i._valueBeforeCascade=i._old=null===i._old||""===i._old||""===a?a:i.dataItem()?i.options.dataValueField?i.dataItem()[i.options.dataValueField]:i.dataItem():null,i._oldIndex=o,i._oldText=i.text&&i.text(),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+=h(n,!0)}),t},_height:function(n){var i,o,r,a=this,s=a.list,l=a.options.height,d=a.popup.visible();if(n||a.options.noDataTemplate){if(o=s.add(s.parent(".k-animation-container")).show(),!s.is(":visible"))return o.hide(),t;l=a.listView.content[0].scrollHeight>l?l:"auto",o.height(l),"auto"!==l&&(i=a._offsetHeight(),r=h(e(a.footer))||0,l=l-i-r),a.listView.content.height(l),d||o.hide()}return l},_openHandler:function(e){this._adjustListWidth(),this.trigger(I)?e.preventDefault():(this._focused.attr("aria-expanded",!0),this.ul.attr("aria-hidden",!1))},_adjustListWidth:function(){var e,t,n=this,i=n.list,o=i[0].style.width,r=n.wrapper;if(i.data(V)||!o)return e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=parseFloat(e&&e.width)||b(r),e&&N.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),o="border-box"!==i.css("box-sizing")?t-(b(i)-i.width()):t,i.css({fontFamily:r.css("font-family"),width:n.options.autoWidth?"auto":o,minWidth:o,whiteSpace:n.options.autoWidth?"nowrap":"normal"}).data(V,o),!0},_closeHandler:function(e){this.trigger(E)?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(T),i=0,o="right";n[0]&&"none"!==n[0].style.display&&("auto"!==e&&(i=c.support.scrollbar()),this.element.parents(".k-rtl").length&&(o="left"),i+=parseFloat(t.css("border-"+o+"-width"),10)+parseFloat(t.children(".k-group").css("padding-"+o),10),n.css("padding-"+o,i))},_calculatePopupHeight:function(e){var t=this._height(this.dataSource.flatView().length||e);this._calculateGroupPadding(t),this._calculateColumnsHeaderPadding(t)},_calculateColumnsHeaderPadding:function(e){var t,n,i;this.options.columns&&this.options.columns.length&&(t=this,n=m.isRtl(t.wrapper),i=c.support.scrollbar(),t.columnsHeader.css(n?"padding-left":"padding-right","auto"!==e?i:0))},_refreshScroll:function(){var e=this.listView,t=e.element.height()>e.content.height();this.options.autoWidth&&e.content.css({overflowX:"hidden",overflowY:t?"scroll":"auto"})},_resizePopup:function(e){this.options.virtual||(this.popup.element.is(":visible")?this._calculatePopupHeight(e):(this.popup.one("open",function(e){return L(function(){this._calculatePopupHeight(e)},this)}.call(this,e)),this.popup.one("activate",L(this._refreshScroll,this))))},_popup:function(){var e=this;e.popup=new u.Popup(e.list,B({},e.options.popup,{anchor:e.wrapper,open:L(e._openHandler,e),close:L(e._closeHandler,e),animation:e.options.animation,isRtl:m.isRtl(e.wrapper),autosize:e.options.autoWidth}))},_makeUnselectable:function(){U&&this.list.find("*").not(".k-textbox").attr("unselectable","on")},_toggleHover:function(t){e(t.currentTarget).toggleClass(C,"mouseenter"===t.type)},_toggle:function(e,n){var i=this,o=m.mobileOS&&(m.touch||m.MSPointers||m.pointers);e=e!==t?e:!i.popup.visible(),n||o||i._focused[0]===_()||(i._prevent=!0,i._focused.focus(),i._prevent=!1),i[e?I:E]()},_triggerCascade:function(){var e=this;e._cascadeTriggered&&e.value()===n(e._cascadedValue,typeof e.value())||(e._cascadedValue=e.value(),e._cascadeTriggered=!0,e.trigger(M,{userTriggered:e._userTriggered}))},_triggerChange:function(){this._valueBeforeCascade!==this.value()&&this.trigger(y)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(P,e._requestStartHandler).unbind(z,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")}});B(G,{inArray:function(e,t){var n,i,o=t.children;if(!e||e.parentNode!==t)return-1;for(n=0,i=o.length;n"),n._customOption=o,i.append(o)),o.text(t),o[0].selected=!0},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(S),e._focused.attr("aria-busy",!1),e._busy=null,e._showClear()},_showBusy:function(e){var t=this;e.isDefaultPrevented()||(t._request=!0,t._busy||(t._busy=setTimeout(function(){t._arrowIcon&&(t._focused.attr("aria-busy",!0),t._arrowIcon.addClass(S),t._hideClear())},100)))},_requestEnd:function(){this._request=!1,this._hideBusy()},_dataSource:function(){var t,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=L(n._showBusy,n),n._requestEndHandler=L(n._requestEnd,n),n._errorHandler=L(n._hideBusy,n)),n.dataSource=c.data.DataSource.create(r).bind(P,n._requestStartHandler).bind(z,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,a,s,l,d=this,c=d.listView,u=e.keyCode,h=u===g.DOWN;if(u===g.UP||h){if(e.altKey)d.toggle(h);else{if(!c.bound()&&!d.ul[0].firstChild)return d._fetch||(d.dataSource.one(y,function(){d._fetch=!1,d._move(e)}),d._fetch=!0,d._filterSource()),e.preventDefault(),!0;if(o=d._focus(),d._fetch||o&&!o.hasClass("k-state-selected")||(h?(d._nextItem(),d._focus()||d._lastItem()):(d._prevItem(),d._focus()||d._firstItem())),n=c.dataItemByIndex(c.getElementIndex(d._focus())),d.trigger(F,{dataItem:n,item:d._focus()}))return d._focus(o),t;d._select(d._focus(),!0).done(function(){d.popup.visible()||d._blur(),d._cascadedValue=null===d._cascadedValue?d.value():d.dataItem()?d.dataItem()[d.options.dataValueField]||d.dataItem():null})}e.preventDefault(),i=!0}else if(u===g.ENTER||u===g.TAB){if(d.popup.visible()&&e.preventDefault(),o=d._focus(),n=d.dataItem(),d.popup.visible()||n&&d.text()===d._text(n)||(o=null),r=d.filterInput&&d.filterInput[0]===_(),o){if(n=c.dataItemByIndex(c.getElementIndex(o)),s=!0,n&&(s=d._value(n)!==G.unifyType(d.value(),typeof d._value(n))),s&&d.trigger(F,{dataItem:n,item:o}))return;a=d._select(o)}else d.input&&((d._syncValueAndText()||d._isSelect)&&d._accessor(d.input.val()),d.listView.value(d.input.val()));d._focusElement&&d._focusElement(d.wrapper),r&&u===g.TAB?d.wrapper.focusout():a&&"function"==typeof a.done?a.done(function(){d._blur()}):d._blur(),d.close(),i=!0}else u===g.ESC?(d.popup.visible()&&e.preventDefault(),d.close(),i=!0):!d.popup.visible()||u!==g.PAGEDOWN&&u!==g.PAGEUP||(e.preventDefault(),l=u===g.PAGEDOWN?1:-1,c.scrollWith(l*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,a,s,l,d=this,c=d.element,u=c[0],h=e.length,p="",f=0;for(n&&(p=n);f",s!==t&&(r+=v(s)),r+="",p+=r;c.html(p),i!==t&&(u.value=i,u.value&&!i&&(u.selectedIndex=-1)),u.selectedIndex!==-1&&(r=o(u),r&&r.setAttribute(R,R))},_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,o=this.options.name;if(this.options.cascadeFrom){if(t=e("#"+this.options.cascadeFrom),n=t.data("kendo"+o),!n)for(i=0;i").parent(),this.header=this.content.before('').prev(),this.bound(!1),this._optionID=c.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=L(function(){var e=this;clearTimeout(e._scrollId),e._scrollId=setTimeout(function(){e._renderHeader()},50)},this)},options:{name:"StaticList",dataValueField:null,valuePrimitive:!1,selectable:!0,template:null,groupTemplate:null,fixedGroupTemplate:null},events:["click",y,"activate","deactivate","dataBinding","dataBound","selectedItemChange"],setDataSource:function(t){var n,i=this,o=t||{};o=e.isArray(o)?{data:o}:o,o=c.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=L(i.refresh,i),i.setDSFilter(o.filter()),i.dataSource=o.bind(y,i._refreshHandler),i._fixedHeader()},_touchHandlers:function(){var t,n,i=this,o=function(e){return(e.originalEvent||e).changedTouches[0].pageY};i.element.on("touchstart"+l,function(e){t=o(e)}),i.element.on("touchend"+l,function(r){r.isDefaultPrevented()||(n=o(r),Math.abs(n-t)<10&&(i._touchTriggered=!0,i._triggerClick(e(r.target).closest(D).get(0))))})},skip:function(){return this.dataSource.skip()},setOptions:function(e){f.fn.setOptions.call(this,e),this._getter(),this._templates(),this._render()},destroy:function(){this.element.off(l),this._refreshHandler&&this.dataSource.unbind(y,this._refreshHandler),clearTimeout(this._scrollId),f.fn.destroy.call(this)},dataItemByIndex:function(e){return this.dataSource.flatView()[e]},screenHeight:function(){return this.content[0].clientHeight},scrollToIndex:function(e){var t=this.element[0].children[e];t&&this.scroll(t)},scrollWith:function(e){this.content.scrollTop(this.content.scrollTop()+e)},scroll:function(e){if(e){e[0]&&(e=e[0]);var t=this.content[0],n=e.offsetTop,i=e.offsetHeight,o=t.scrollTop,r=t.clientHeight,a=n+i;o>n?o=n:a>o+r&&(o=a-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,a=r._optionID;return n===t?r._current:(n=i(r._get(n)),n=e(this.element[0].children[n]),r._current&&(r._current.removeClass(x).removeAttr(k),r.trigger("deactivate")),o=!!n[0],o&&(n.addClass(x),r.scroll(n),n.attr("id",a)),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,a,s=this,l=s.options.selectable,d="multiple"!==l&&l!==!1,c=s._selectedIndices,u=[this.element.find(".k-state-selected").index()],h=[],p=[];return n===t?c.slice():(n=s._get(n),1===n.length&&n[0]===-1&&(n=[]),r=e.Deferred().resolve(),a=s.isFiltered(),a&&!d&&s._deselectFiltered(n)?r:d&&!a&&e.inArray(i(n),c)!==-1&&e.inArray(i(n),u)!==-1?(s._dataItems.length&&s._view.length&&(s._dataItems=[s._view[c[0]].item]),r):(o=s._deselect(n),p=o.removed,n=o.indices,n.length&&(d&&(n=[i(n)]),h=s._select(n)),(h.length||p.length)&&(s._valueComparer=null,s.trigger(y,{added:h,removed:p})),r))},removeAt:function(e){return this._selectedIndices.splice(e,1),this._values.splice(e,1),this._valueComparer=null,{position:e,dataItem:this._dataItems.splice(e,1)[0]}},setValue:function(t){t=e.isArray(t)||t instanceof w?t.slice(0):[t],this._values=t,this._valueComparer=null},value:function(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(D)},_click:function(e){return this._touchTriggered?(this._touchTriggered=!1,t):(e.isDefaultPrevented()||this._triggerClick(e.currentTarget),t)},_triggerClick:function(t){this.trigger("click",{item:e(t)})||this.select(t)},_valueExpr:function(e,t){var i,o,r=this,a=0,s=[];if(!r._valueComparer||r._valueType!==e){for(r._valueType=e;a-1&&(a.push(this.removeAt(o)),e(r[i]).removeClass("k-state-selected"));return!!a.length&&(this.trigger(y,{added:[],removed:a}),!0)},_select:function(t){var n,o,r=this,a=r.element[0].children,s=r._view,l=[],d=0;for(i(t)!==-1&&r.focus(t);d'+n(e)+""}):n=c.template('${'+c.expr(t.dataTextField,"data")+"}",{useWithBlock:!1}),n},_templates:function(){var e,t,n,i,o,r=this.options,a={template:r.template,groupTemplate:r.groupTemplate,fixedGroupTemplate:r.fixedGroupTemplate};if(r.columns)for(t=0;ti||!a.nextSibling)break;a=a.nextSibling}else{if(a.offsetTop<=i||!a.previousSibling)break;a=a.previousSibling}return this._view[e(a).data("offset-index")]},_fixedHeader:function(){this.isGrouped()&&this.templates.fixedGroupTemplate?(this.header.show(),this.content.scroll(this._onScroll)):(this.header.hide(),this.content.off("scroll",this._onScroll))},_renderHeader:function(){var e,t=this.templates.fixedGroupTemplate;t&&(e=this._firstVisibleItem(),e&&(""+e.group).length&&this.header.html(t(e.group)))},_renderItem:function(e){var t='',t+=a?this._renderColumns(n):this.templates.template(n),i&&e.newGroup?t+=a?''+this.templates.groupTemplate(e.group)+"":''+this.templates.groupTemplate(e.group)+"":r&&a&&(t+=""),t+""},_renderColumns:function(e){var t,n,i,o,r="";for(t=0;t",r+=this.templates["column"+t](e),r+="";return r},_render:function(){var e,t,n,i,o="",r=0,a=0,s=[],l=this.dataSource.view(),d=this.value(),c=this.isGrouped();if(c)for(r=0;rs&&(o=s),r+"-"+o}function i(e){var t,n=0,i=e.min,o=e.max,r=e.start,a=e.setter,l=e.build,d=e.weekNumberBuild,c=e.cells||12,u=e.isWeekColumnVisible,h=e.perRow||4,p=e.otherMonth,g=e.lastDayOfMonth,m=e.weekNumber||q,v=e.content||W,_=e.empty||U,b=e.otherMonthCellTemplate||j,w=e.html||'';for(u&&(w+=m(d(r)));n0&&n%h===0&&(w+='',u&&(w+=m(p||+r<=+g?d(r):{weekNumber:" "}))),r=f(r.getFullYear(),r.getMonth(),r.getDate()),P(r,0),t=l(r,n,e.disableDates),w+=t.cssClass.indexOf(ce)===-1||p?s(r,i,o)?v(t):_(t):b(t),a(r,1);return w+""}function o(e,t,n){var i=e.getFullYear(),o=t.getFullYear(),r=o,a=0;return n&&(o-=o%n,r=o-o%n+n-1),i>r?a=1:ii?i=new Re((+t)):n=+t&&+e<=+n}function l(e,t){return e.slice(t).concat(e.slice(0,t))}function d(e,t,n){t=t instanceof Re?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function c(e,t){var n,i,o;return+t<+e&&(n=+e,D.views[0].setDate(e,t),D.views[0].setDate(t,new Date(n))),i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),o=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),Math.ceil((+o-+i)/A.date.MS_PER_DAY)}function u(e,t,n,i){var o,r;for(o=0;o<=t;o++)r=new Date(n.getTime()),r=new Date(r.setDate(r.getDate()+o)),i(r)||e.push(r)}function h(t){var n=e(this).hasClass("k-state-disabled");n||e(this).toggleClass(se,ke.indexOf(t.type)>-1||t.type==be)}function p(e){e.preventDefault()}function f(e,t,n){var i=new Re(e,t,n);return i.setFullYear(e,t,n),i}function g(e){return N(e).calendars.standard}function m(e){var n=Pe[e.start],i=Pe[e.depth],o=N(e.culture);e.format=L(e.format||o.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=ne),(i===t||i>n)&&(e.depth=ne),null===e.dates&&(e.dates=[])}function v(e){$&&e.find("*").attr("unselectable","on")}function _(e,t){e.addClass("k-"+t)}function b(e,t){for(var n=0,i=t.length;n-1;"+d;else{for(o=0;o-1&&s.push(a);n="var found = date && window.kendo.jQuery.inArray(date.getDay(),["+s+"]) > -1;"+d}return i=Function("date",n)}function S(e,t){return e instanceof Date&&t instanceof Date&&(e=e.getTime(),t=t.getTime()),e===t}function T(t){var n=e(t).attr(A.attr(ae)).split("/");return n=f(n[0],n[1],n[2])}var D,A=window.kendo,I=A.support,E=A.ui,M=E.Widget,F=A.keys,R=A.parseDate,P=A.date.adjustDST,z=A.date.weekInYear,B=A.ui.Selectable,L=A._extractFormat,H=A.template,N=A.getCulture,O=A.support.transitions,V=O?O.css+"transform-origin":"",W=H('#=data.value#',{useWithBlock:!1}),U=H('',{useWithBlock:!1}),j=H('',{useWithBlock:!1}),q=H('#= data.weekNumber #',{useWithBlock:!1}),G=A.support.browser,$=G.msie&&G.version<9,Y=A._outerWidth,K=".kendoCalendar",Q="click"+K,X="keydown"+K,J="id",Z="min",ee="left",te="slideIn",ne="month",ie="century",oe="change",re="navigate",ae="value",se="k-state-hover",le="k-state-disabled",de="k-state-focused",ce="k-other-month",ue=' class="'+ce+'"',he="k-out-of-range",pe="k-nav-today",fe="td:has(.k-link)",ge="td:has(.k-link):not(."+le+"):not(."+he+")",me="td:not(:has(.k-link))",ve="k-state-selected",_e="blur"+K,be="focus",we=be+K,ke=I.touch?"touchstart":"mouseenter",ye=I.touch?"touchstart"+K:"mouseenter"+K,xe=I.touch?"touchend"+K+" touchmove"+K:"mouseleave"+K,Ce=6e4,Se=864e5,Te="_prevArrow",De="_nextArrow",Ae="aria-disabled",Ie="aria-selected",Ee="aria-label",Me=e.proxy,Fe=e.extend,Re=Date,Pe={month:0,year:1,decade:2,century:3},ze=M.extend({init:function(t,n){var i,o,s=this;M.fn.init.call(s,t,n),t=s.wrapper=s.element,n=s.options,n.url=A.unescape(n.url),s.options.disableDates=y(s.options.disableDates),s._templates(),s._selectable(),s._header(),s._viewWrapper(),s._footer(s.footer),o=t.addClass("k-widget k-calendar "+(n.weekNumber?" k-week-number":"")).on(ye+" "+xe,fe,h).on(X,"table.k-content",Me(s._move,s)).on(Q,fe,function(t){var i=t.currentTarget.firstChild,o=T(i);i.href.indexOf("#")!=-1&&t.preventDefault(),"month"==s._view.name&&s.options.disableDates(o)||"month"==s._view.name&&"single"!=n.selectable||s._click(e(i))}).on("mouseup"+K,"table.k-content, .k-footer",function(){s._focusView(s.options.focusOnNav!==!1)}).attr(J),o&&(s._cellID=o+"_cell_selected"),s._isMultipleSelection()&&s.options.weekNumber&&t.on(Q,me,function(t){var n=e(t.currentTarget).closest("tr").find(ge).first(),i=s.selectable._lastActive=e(t.currentTarget).closest("tr").find(ge).last();s.selectable.selectRange(n,i,{event:t}),s._current=s._value=T(i.find("a")),s._class(de,s._current)}),m(n),i=R(n.value,n.format,n.culture),s._selectDates=[],s._index=Pe[n.start],s._current=new Re((+a(i,n.min,n.max))),s._addClassProxy=function(){if(s._active=!0,s._cell.hasClass(le)){var e=s._view.toDateString(r());s._cell=s._cellByDate(e)}s._cell.addClass(de)},s._removeClassProxy=function(){s._active=!1,s._cell.removeClass(de)},s.value(i),s._isMultipleSelection()&&n.selectDates.length>0&&s.selectDates(n.selectDates),A.notify(s)},options:{name:"Calendar",value:null,min:new Re(1900,0,1),max:new Re(2099,11,31),dates:[],disableDates:null,url:"",culture:"",footer:"",format:"",month:{},weekNumber:!1,selectable:"single",selectDates:[],start:ne,depth:ne,animation:{horizontal:{effects:te,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}},messages:{weekColumnHeader:""}},events:[oe,re],setOptions:function(e){var t=this;m(e),e.disableDates=y(e.disableDates),t._destroySelectable(),M.fn.setOptions.call(t,e),t._templates(),t._selectable(),t._viewWrapper(),t._footer(t.footer),t._index=Pe[t.options.start],t.navigate(),e.weekNumber&&t.element.addClass("k-week-number")},destroy:function(){var e=this,t=e._today;e.element.off(K),e._title.off(K),e[Te].off(K),e[De].off(K),e._destroySelectable(),A.destroy(e._table),t&&A.destroy(t.off(K)),M.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.trigger("focus")},min:function(e){return this._option(Z,e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(Te,-1)},navigateToFuture:function(){this._navigate(De,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass(le)||e.navigate(e._current,++t);
},navigateDown:function(e){var n=this,i=n._index,o=n.options.depth;if(e)return i===Pe[o]?(S(n._value,n._current)&&S(n._value,e)||(n.value(e),n.trigger(oe)),t):(n.navigate(e,--i),t)},navigate:function(n,i){var o,r,s,l,d,c,u,h,p,f,g,m,b,w,k,y;i=isNaN(i)?Pe[i]:i,o=this,r=o.options,s=r.culture,l=r.min,d=r.max,c=o._title,u=o._table,h=o._oldTable,p=o._current,f=n&&+n>+p,g=i!==t&&i!==o._index,n||(n=p),o._current=n=new Re((+a(n,l,d))),i===t?i=o._index:o._index=i,o._view=b=D.views[i],w=b.compare,k=i===Pe[ie],c.toggleClass(le,k).attr(Ae,k),k=w(n,l)<1,o[Te].toggleClass(le,k).attr(Ae,k),o[Te].hasClass(le)&&o[Te].removeClass(se),k=w(n,d)>-1,o[De].toggleClass(le,k).attr(Ae,k),o[De].hasClass(le)&&o[De].removeClass(se),u&&h&&h.data("animating")&&(h.kendoStop(!0,!0),u.kendoStop(!0,!0)),o._oldTable=u,u&&!o._changeView||(c.html(b.title(n,l,d,s)),o._table=m=e(b.content(Fe({min:l,max:d,date:n,url:r.url,dates:r.dates,format:r.format,otherMonth:!0,culture:s,disableDates:r.disableDates,isWeekColumnVisible:r.weekNumber,messages:r.messages},o[b.name]))),_(m,b.name),v(m),y=u&&u.data("start")===m.data("start"),o._animate({from:u,to:m,vertical:g,future:f,replace:y}),o.trigger(re),o._focus(n)),i===Pe[r.depth]&&o._selectDates.length>0&&o._visualizeSelectedDatesInView(),"single"===o.options.selectable&&i===Pe[r.depth]&&o._value&&!o.options.disableDates(o._value)&&o._class("k-state-selected",o._value),o._class(de,n),!u&&o._cell&&o._cell.removeClass(de),o._changeView=!0},selectDates:function(n){var i,o,r=this;return n===t?r._selectDates:(o=n.map(function(e){return e.getTime()}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(e){return new Date(e)}),i=e.grep(o,function(e){if(e)return+r._validateValue(new Date(e.setHours(0,0,0,0)))===+e}),r._selectDates=i.length>0?i:0===o.length?o:r._selectDates,r._visualizeSelectedDatesInView(),t)},value:function(e){var n,i=this,o=i._view,r=i._view;return e===t?i._value:(e=i._validateValue(e),e&&i._isMultipleSelection()&&(n=new Date((+e)),n.setHours(0,0,0,0),i._selectDates=[n],i.selectable._lastActive=null),o&&null===e&&i._cell?i._cell.removeClass(ve):(i._changeView=!e||r&&0!==r.compare(e,i._current),i.navigate(e)),t)},_validateValue:function(e){var n=this,i=n.options,o=i.min,r=i.max;return null===e&&(n._current=f(n._current.getFullYear(),n._current.getMonth(),n._current.getDate())),e=R(e,i.format,i.culture),null!==e&&(e=new Re((+e)),s(e,o,r)||(e=null)),null!==e&&n.options.disableDates(new Date((+e)))?n._value===t&&(n._value=null):n._value=e,n._value},_visualizeSelectedDatesInView:function(){var t,n=this,i={};e.each(n._selectDates,function(e,t){i[A.calendar.views[0].toDateString(t)]=t}),n.selectable.clear(),t=n._table.find(fe).filter(function(t,n){return i[e(n.firstChild).attr(A.attr(ae))]}),t.length>0&&n.selectable._selectElement(t,!0)},_isMultipleSelection:function(){var e=this;return"multiple"===e.options.selectable},_selectable:function(){var e,t,n=this;n._isMultipleSelection()&&(e=n.options.selectable,t=B.parseOptions(e),t.multiple&&n.element.attr("aria-multiselectable","true"),n.selectable=new B(n.wrapper,{aria:!0,inputSelectors:"input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up",multiple:t.multiple,filter:"table.k-month:eq(0) "+ge,change:Me(n._onSelect,n),relatedTarget:Me(n._onRelatedTarget,n)}))},_onRelatedTarget:function(e){var t=this;t.selectable.options.multiple&&e.is(ge)&&(t._current=T(e.find("a")),t._class(de,T(e.find("a"))))},_onSelect:function(n){var i=this,o=n,r=B.parseOptions(i.options.selectable);return r.multiple?(o.event.ctrlKey||o.event.metaKey?e(o.event.currentTarget).is(ge)?i._toggleSelection(e(o.event.currentTarget)):(i._cellsBySelector(ge).each(function(t,n){var o=T(e(n).find("a"));i._deselect(o)}),i._addSelectedCellsToArray()):o.event.shiftKey?i._rangeSelection(i._cell):e(o.event.currentTarget).is(fe)?i.value(T(e(o.event.currentTarget).find("a"))):(i._selectDates=[],i._addSelectedCellsToArray()),i.trigger(oe),t):(e(o.event.currentTarget).is("td")&&!e(o.event.currentTarget).hasClass("k-state-selected")?e(o.event.currentTarget).addClass("k-state-selected"):i._click(e(o.event.currentTarget).find("a")),t)},_destroySelectable:function(){var e=this;e.selectable&&(e.selectable.destroy(),e.selectable=null)},_toggleSelection:function(e){var t=this,n=T(e.find("a"));e.hasClass("k-state-selected")?t._selectDates.push(n):t._deselect(n)},_rangeSelection:function(e,t){var n,i=this,o=t||T(i.selectable.value().first().find("a")),r=T(e.find("a"));i.selectable._lastActive||i._value?o=i.selectable._lastActive?T(i.selectable._lastActive.find("a")):new Date((+i._value)):i.selectable._lastActive=t?i._cellByDate(i._view.toDateString(t),ge):i.selectable.value().first(),i._selectDates=[],n=c(o,r),u(i._selectDates,n,o,i.options.disableDates),i._visualizeSelectedDatesInView()},_cellsBySelector:function(e){var t=this;return t._table.find(e)},_addSelectedCellsToArray:function(){var t=this;t.selectable.value().each(function(n,i){var o=T(e(i.firstChild));t.options.disableDates(o)||t._selectDates.push(o)})},_deselect:function(e){var t=this,n=t._selectDates.map(Number).indexOf(+e);n!=-1&&t._selectDates.splice(n,1)},_dateInView:function(e){var t=this,n=T(t._cellsBySelector(ge+":first").find("a")),i=T(t._cellsBySelector(ge+":last").find("a"));return+e<=+i&&+e>=+n},_isNavigatable:function(e,t){var n,i,o=this,r=o.options.disableDates;return"month"==o._view.name?!r(e):(i=o.wrapper.find("."+de).index(),n=o.wrapper.find(".k-content td:eq("+(i+t)+")"),n.is(ge)||!r(e))},_move:function(n){var i,o,r,l,d,c=this,u=c.options,h=n.keyCode,p=c._view,g=c._index,m=c.options.min,v=c.options.max,_=new Re((+c._current)),b=A.support.isRtl(c.wrapper),w=c.options.disableDates;return n.target===c._table[0]&&(c._active=!0),h==F.RIGHT&&!b||h==F.LEFT&&b?(i=1,o=!0):h==F.LEFT&&!b||h==F.RIGHT&&b?(i=-1,o=!0):h==F.UP?(i=0===g?-7:-4,o=!0):h==F.DOWN?(i=0===g?7:4,o=!0):h==F.SPACEBAR?(i=0,o=!0):h!=F.HOME&&h!=F.END||(r=h==F.HOME?"first":"last",l=p[r](_),_=new Re(l.getFullYear(),l.getMonth(),l.getDate(),_.getHours(),_.getMinutes(),_.getSeconds(),_.getMilliseconds()),_.setFullYear(l.getFullYear()),o=!0),n.ctrlKey||n.metaKey?h==F.RIGHT&&!b||h==F.LEFT&&b?(c.navigateToFuture(),o=!0):h==F.LEFT&&!b||h==F.RIGHT&&b?(c.navigateToPast(),o=!0):h==F.UP?(c.navigateUp(),o=!0):h==F.DOWN?(c._click(e(c._cell[0].firstChild)),o=!0):h!=F.ENTER&&h!=F.SPACEBAR||!c._isMultipleSelection()||(c._keyboardToggleSelection(n),d=T(e(c._cell[0]).find("a")),c._class(de,d)):n.shiftKey?(i!==t||r)&&(r||p.setDate(_,i),s(_,m,v)||(_=a(_,u.min,u.max)),w(_)&&(_=c._nextNavigatable(_,i)),m=f(m.getFullYear(),m.getMonth(),m.getDate()),c._isMultipleSelection()?c._keyboardRangeSelection(n,_):c._focus(_)):(h==F.ENTER||h==F.SPACEBAR?("month"==p.name&&c._isMultipleSelection()?(c.value(T(e(c._cell.find("a")))),c.selectable._lastActive=e(c._cell[0]),c.trigger(oe)):c._click(e(c._cell[0].firstChild)),o=!0):h==F.PAGEUP?(o=!0,c.navigateToPast()):h==F.PAGEDOWN&&(o=!0,c.navigateToFuture()),(i||r)&&(r||p.setDate(_,i),m=f(m.getFullYear(),m.getMonth(),m.getDate()),s(_,m,v)||(_=a(_,u.min,u.max)),c._isNavigatable(_,i)||(_=c._nextNavigatable(_,i)),c._isMultipleSelection()?c._dateInView(_)?(c._current=_,c._class(de,_)):c.navigate(_):c._focus(_))),o&&n.preventDefault(),c._current},_keyboardRangeSelection:function(e,n){var i,o,r=this;return r._dateInView(n)?(r.selectable.options.filter=r.wrapper.find("table").length>1&&+n>+r._current?"table.k-month:eq(1) "+ge:"table.k-month:eq(0) "+ge,r._class(de,n),r._current=n,r._rangeSelection(r._cellByDate(r._view.toDateString(n),ge),n),r.trigger(oe),r.selectable.options.filter="table.k-month:eq(0) "+ge,t):(r._selectDates=[],i=r.selectable._lastActive?T(r.selectable._lastActive.find("a")):n,o=c(i,new Date((+n))),u(r._selectDates,o,i,r.options.disableDates),r.navigate(n),r._current=n,r.selectable._lastActive=r.selectable._lastActive||r._cellByDate(r._view.toDateString(n),ge),r.trigger(oe),t)},_keyboardToggleSelection:function(t){var n=this;t.currentTarget=n._cell[0],n.selectable._lastActive=e(n._cell[0]),e(n._cell[0]).hasClass(ve)?(n.selectable._unselect(e(n._cell[0])),n.selectable.trigger(oe,{event:t})):n.selectable.value(e(n._cell[0]),{event:t})},_nextNavigatable:function(e,t){var n=this,i=!0,o=n._view,r=n.options.min,a=n.options.max,l=n.options.disableDates,d=new Date(e.getTime());for(o.setDate(d,-t);i;){if(o.setDate(e,t),!s(e,r,a)){e=d;break}i=l(e)}return e},_animate:function(e){var t=this,n=e.from,i=e.to,o=t._active,r=t.element.children(".k-calendar-view");n?n.parent().data("animating")?(n.off(K),n.parent().kendoStop(!0,!0).remove(),n.remove(),r.append(i),t._focusView(o)):!n.is(":visible")||t.options.animation===!1||e.replace?(i.insertAfter(n),n.off(K).remove(),t._focusView(o)):t[e.vertical?"_vertical":"_horizontal"](n,i,e.future):(r.append(i),t._bindTable(i))},_horizontal:function(e,t,n){var i=this,o=i._active,r=i.options.animation.horizontal,a=r.effects,s=Y(e);a&&a.indexOf(te)!=-1&&(e.add(t).css({width:s}),e.wrap(""),i._focusView(o,e),e.parent().css({position:"relative",width:2*s,"float":ee,"margin-left":n?0:-s}),t[n?"insertAfter":"insertBefore"](e),Fe(r,{effects:te+":"+(n?"right":ee),complete:function(){e.off(K).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,a=r.effects,s=o._active;a&&a.indexOf("zoom")!=-1&&(t.insertBefore(e),e.css({position:"absolute",width:t.width()}),V&&(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(V,i)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.off(K).remove(),o._oldTable=null,o._focusView(s)}}),t.kendoStop(!0,!0).kendoAnimate(r))},_cellByDate:function(t,n){return this._table.find(n?n:"td:not(."+ce+")").filter(function(){return e(this.firstChild).attr(A.attr(ae))===t})},_class:function(e,t){var n,i=this,o=i._cellID,r=i._cell,a=i._view.toDateString(t);r&&r.length&&(r[0].removeAttribute(Ie),r[0].removeAttribute(Ee),r[0].removeAttribute(J)),t&&"month"==i._view.name&&(n=i.options.disableDates(t)),i._cellsBySelector(i._isMultipleSelection()?fe:"td:not(."+ce+")").removeClass(e),r=i._cellByDate(a,"multiple"==i.options.selectable?fe:"td:not(."+ce+")").attr(Ie,!0),(e===de&&!i._active&&i.options.focusOnNav!==!1||n)&&(e=""),r.addClass(e),r[0]&&(i._cell=r),o&&(r.attr(J,o),i._table[0].removeAttribute("aria-activedescendant"),i._table.attr("aria-activedescendant",o))},_bindTable:function(e){e.on(we,this._addClassProxy).on(_e,this._removeClassProxy)},_click:function(e){var t=this,n=t.options,i=new Date((+t._current)),o=T(e);P(o,0),"month"==t._view.name&&t.options.disableDates(o)&&(o=t._value),t._view.setDate(i,o),t.navigateDown(a(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(de,e))},_focusView:function(e,t){e&&this.focus(t)},_viewWrapper:function(){var t=this,n=t.element,i=n.children(".k-calendar-view");i[0]||(i=e("").insertAfter(n.find(".k-header")))},_footer:function(n){var i=this,o=r(),a=i.element,s=a.find(".k-footer");return n?(s[0]||(s=e('').appendTo(a)),i._today=s.show().find(".k-link").html(n(o)).attr("title",A.toString(o,"D",i.options.culture)),i._toggle(),t):(i._toggle(!1),s.hide(),t)},_header:function(){var e,t=this,n=t.element;n.find(".k-header")[0]||n.html(''),e=n.find(".k-link").on(ye+" "+xe+" "+we+" "+_e,h).on(Q+" touchend"+K,function(){return!1}),t._title=e.eq(1).on(Q+" touchend"+K,function(){t._active=t.options.focusOnNav!==!1,t.navigateUp()}),t[Te]=e.eq(0).on(Q+" touchend"+K,function(){t._active=t.options.focusOnNav!==!1,t.navigateToPast()}),t[De]=e.eq(2).on(Q+" touchend"+K,function(){t._active=t.options.focusOnNav!==!1,t.navigateToFuture()})},_navigate:function(e,t){var n,i=this,o=i._index+1,r=new Re((+i._current));i._isMultipleSelection()&&(n=i._table.find("td:not(.k-other-month):not(.k-out-of-range)").has(".k-link").first(),r=T(n.find("a")),i._current=new Date((+r))),e=i[e],e.hasClass(le)||(o>3?r.setFullYear(r.getFullYear()+100*t):D.views[o].setDate(r,t),i.navigate(r))},_option:function(e,n){var i,o=this,r=o.options,a=o._value||o._current;return n===t?r[e]:(n=R(n,r.format,r.culture),n&&(r[e]=new Re((+n)),i=e===Z?n>a:a>n,(i||k(a,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()),a=n._today;e===t&&(e=s(r(),i.min,i.max)),a&&(a.off(Q),e&&!o?a.addClass(pe).removeClass(le).on(Q,Me(n._todayClick,n)):a.removeClass(pe).addClass(le).on(Q,p))},_todayClick:function(e){var t=this,n=Pe[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._isMultipleSelection()&&(t._selectDates=[o],t.selectable._lastActive=null),t._value=o,t.navigate(o,n),t.trigger(oe))},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month,o=i.content,r=i.weekNumber,a=i.empty,s='#= kendo.toString(data,"D","'+t.culture+'") #';e.month={content:H(''+(o||"#=data.value#")+"",{useWithBlock:!!o}),empty:H(''+(a||" ")+"",{useWithBlock:!!a}),weekNumber:H(''+(r||"#= data.weekNumber #")+"",{useWithBlock:!!r})},n&&n!==!0&&(s=n),e.footer=n!==!1?H(s,{useWithBlock:!1}):null}});E.plugin(ze),D={firstDayOfMonth:function(e){return f(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t=t||A.culture().calendar;var n=t.firstDay,i=new Re(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());for(i.setFullYear(e.getFullYear());i.getDay()!=n;)D.setTime(i,-1*Se);return i},setTime:function(e,t){var n=e.getTimezoneOffset(),i=new Re(e.getTime()+t),o=i.getTimezoneOffset()-n;e.setTime(i.getTime()+o*Ce)},views:[{name:ne,title:function(e,t,n,i){return g(i).months.names[e.getMonth()]+" "+e.getFullYear()},content:function(e){var t=this,n=0,o=e.min,a=e.max,s=e.date,d=e.dates,c=e.format,u=e.culture,h=e.url,p=e.showHeader,m=e.otherMonth,v=e.isWeekColumnVisible,_=h&&d[0],w=g(u),k=w.firstDay,y=w.days,x=l(y.names,k),C=l(y.namesShort,k),S=D.firstVisibleDay(s,w),T=t.first(s),I=t.last(s),E=t.toDateString,M=r(),F='';for(F+=p?''+this.title(s,o,a,u)+'':'',v&&(F+=''+e.messages.weekColumnHeader+"");n<7;n++)F+=''+C[n]+"";return P(M,0),M=+M,i({cells:42,perRow:7,html:F+='',start:S,isWeekColumnVisible:v,weekNumber:e.weekNumber,min:f(o.getFullYear(),o.getMonth(),o.getDate()),max:f(a.getFullYear(),a.getMonth(),a.getDate()),otherMonth:m,content:e.content,lastDayOfMonth:I,empty:e.empty,setter:t.setDate,disableDates:e.disableDates,build:function(e,t,n){var i=[],o=e.getDay(),r="",a="#";return(eI)&&i.push(ce),n(e)&&i.push(le),+e===M&&i.push("k-today"),0!==o&&6!==o||i.push("k-weekend"),_&&b(+e,d)&&(a=h.replace("{0}",A.toString(e,c,u)),r=" k-action-link"),{date:e,dates:d,ns:A.ns,title:A.toString(e,"D",u),value:e.getDate(),dateString:E(e),cssClass:i[0]?' class="'+i.join(" ")+'"':"",linkClass:r,url:a}},weekNumberBuild:function(e){return{weekNumber:z(e,A.culture().calendar.firstDay),currentDate:e}}})},first:function(e){return D.firstDayOfMonth(e)},last:function(e){var t=f(e.getFullYear(),e.getMonth()+1,0),n=D.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(),a=t.getFullYear();return n=o>a?1:or?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof Re?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):D.setTime(e,t*Se),P(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=g(e.culture).months.namesAbbr,n=this.toDateString,o=e.min,r=e.max,a="";return e.showHeader&&(a+='',a+=this.title(e.date),a+=''),i({min:f(o.getFullYear(),o.getMonth(),1),max:f(r.getFullYear(),r.getMonth(),1),start:f(e.date.getFullYear(),0,1),html:a,setter:this.setDate,build:function(e){return{value:t[e.getMonth()],ns:A.ns,dateString:n(e),cssClass:""}}})},first:function(e){return f(e.getFullYear(),0,e.getDate())},last:function(e){return f(e.getFullYear(),11,e.getDate())},compare:function(e,t){return o(e,t)},setDate:function(e,t){var n,i=e.getHours();t instanceof Re?(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)),P(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,o="";return e.showHeader&&(o+='',o+=this.title(e.date,e.min,e.max),o+=''),i({start:f(t-t%10-1,0,1),min:f(e.min.getFullYear(),0,1),max:f(e.max.getFullYear(),0,1),otherMonth:e.otherMonth,html:o,setter:this.setDate,build:function(e,t){return{value:e.getFullYear(),ns:A.ns,dateString:n(e),cssClass:0===t||11==t?ue:""}}})},first:function(e){var t=e.getFullYear();return f(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return f(t-t%10+9,e.getMonth(),e.getDate())},compare:function(e,t){return o(e,t,10)},setDate:function(e,t){d(e,t,1)},toDateString:function(e){return e.getFullYear()+"/0/1"}},{name:ie,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,a=n,s=o,l="";return a-=a%10,s-=s%10,s-a<10&&(s=a+9),e.showHeader&&(l+='',l+=this.title(e.date,e.min,e.max),l+=''),i({start:f(t-t%100-10,0,1),min:f(a,0,1),max:f(s,0,1),otherMonth:e.otherMonth,html:l,setter:this.setDate,build:function(e,t){var i=e.getFullYear(),a=i+9;return io&&(a=o),{ns:A.ns,value:i+" - "+a,dateString:r(e),cssClass:0===t||11==t?ue:""}}})},first:function(e){var t=e.getFullYear();return f(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return f(t-t%100+99,e.getMonth(),e.getDate())},compare:function(e,t){return o(e,t,100)},setDate:function(e,t){d(e,t,10)},toDateString:function(e){var t=e.getFullYear();return t-t%10+"/0/1"}}]},D.isEqualDatePart=w,D.isEqualDate=S,D.makeUnselectable=v,D.restrictValue=a,D.isInRange=s,D.addClassToViewContainer=_,D.normalize=m,D.viewsEnum=Pe,D.disabled=y,D.toDateObject=T,D.getToday=r,D.createDate=f,A.calendar=D}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dateinput.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e,t,n,i){var o,r,a,s,l=e[i+e.length-n.length];if(e=e.substring(0,i+e.length-n.length),n=n.substring(0,i),o=[],e===n&&i>0)return o.push([t[i-1],n[i-1]]),o;if(0===e.indexOf(n)&&(0===n.length||t[n.length-1]!==t[n.length])){for(a="",r=n.length;r=0&&(a=t[r],o.push([a,""]));return o}if(" "===n[n.length-1]||n[n.length-1]===l)return[[t[i-1]," "]];if(0===n.indexOf(e)||w.indexOf(t[i-1])===-1){for(s=t[0],r=Math.max(0,e.length-1);r=0){s=t[r];break}return[[s,n[i-1]]]}return[[t[i-1],n[i-1]]]}var i,o=window,r=o.kendo,a=r.caret,s=r.ui,l=s.Widget,d=r.keys,c=".kendoDateInput",u=e.proxy,h={}.toString,p=(r.support.propertyChangeEvent?"propertychange.kendoDateInput input":"input")+c,f="k-state-disabled",g="k-state-default",m="k-state-invalid",v="disabled",_="readonly",b="change",w="dMyHhmftsz",k=l.extend({init:function(t,n){var i,o,a=this;l.fn.init.call(a,t,n),t=a.element,n=a.options,n.format=r._extractFormat(n.format||r.getCulture(n.culture).calendars.standard.patterns.d),n.min=r.parseDate(t.attr("min"))||r.parseDate(n.min),n.max=r.parseDate(t.attr("max"))||r.parseDate(n.max),i=(t.parent().attr("class")||"").indexOf("k-picker-wrap")>=0,i?a.wrapper=t.parent():(a.wrapper=t.wrap("").parent(),a.wrapper.addClass(t[0].className),a.wrapper[0].style.cssText=t[0].style.cssText,t.css({width:"100%",height:t[0].style.height})),a._inputWrapper=e(a.wrapper[0]),e("").insertAfter(t),a._form(),a.element.addClass(i?" ":"k-textbox").attr("autocomplete","off").on("focusout"+c,function(){a._change()});try{t[0].setAttribute("type","text")}catch(s){t[0].type="text"}o=t.is("[disabled]")||e(a.element).parents("fieldset").is(":disabled"),o?a.enable(!1):a.readonly(t.is("[readonly]")),a.value(a.options.value||t.val()),r.notify(a)},options:{name:"DateInput",culture:"",value:"",format:"",min:new Date(1900,0,1),max:new Date(2099,11,31),messages:{year:"year",month:"month",day:"day",weekday:"day of the week",hour:"hours",minute:"minutes",second:"seconds",dayperiod:"AM/PM"}},events:[b],min:function(e){return e===t?this.options.min:(this.options.min=e,t)},max:function(e){return e===t?this.options.max:(this.options.max=e,t)},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),this._unbindInput(),this._bindInput(),this._updateElementValue()},destroy:function(){var e=this;e.element.off(c),e._formElement&&e._formElement.off("reset",e._resetHandler),l.fn.destroy.call(e)},value:function(e){return e===t?this._dateTime.getDateObject():(null===e&&(e=""),"[object Date]"!==h.call(e)&&(e=r.parseDate(e,this.options.format,this.options.culture)),e&&!e.getTime()&&(e=null),this._dateTime=new i(e,this.options.format,this.options.culture,this.options.messages),this._updateElementValue(),this._oldValue=e,t)},_updateElementValue:function(){var e=this._dateTime.toPair(this.options.format,this.options.culture,this.options.messages);this.element.val(e[0]),this._oldText=e[0],this._format=e[1]},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_bindInput:function(){var e=this;e.element.on("focusout"+c,function(){e._change()}).on("paste"+c,u(e._paste,e)).on("keydown"+c,u(e._keydown,e)).on(p,u(e._input,e)).on("mouseup"+c,u(e._mouseUp,e)).on("DOMMouseScroll"+c+" mousewheel"+c,u(e._scroll,e))},_unbindInput:function(){this.element.off("keydown"+c).off("paste"+c).off("focusout"+c).off(p).off("mouseup"+c).off("DOMMouseScroll"+c+" mousewheel"+c)},_editable:function(e){var t=this,n=t.element,i=e.disable,o=e.readonly,r=t.wrapper;t._unbindInput(),o||i?(i&&(r.addClass(f).removeClass(g),n.attr(v,i),n&&n.length&&n[0].removeAttribute(_)),o&&n.attr(_,o)):(r.addClass(g).removeClass(f),n&&n.length&&(n[0].removeAttribute(v),n[0].removeAttribute(_)),t._bindInput())},_change:function(){var e=this,t=e._oldValue,n=e.value();n&&e.min()&&ne.max()&&(e.value(e.max()),n=e.value()),(t&&n&&n.getTime()!==t.getTime()||t&&!n||!t&&n)&&(e._oldValue=n,e.trigger(b),e.element.trigger(b))},_input:function(){var e,t,i,o,s,l,d,c=this,u=c.element[0],h=!1;if(r._activeElement()===u){if(e=n(this._oldText,this._format,this.element[0].value,a(this.element[0])[0]),t=1===e.length&&" "===e[0][1],!t)for(i=0;i0?37:39:(e.wheelDelta||-e.detail)>0?38:40,this._keydown(t),e.returnValue=!1,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()}},_form:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form"),r=n[0].value;!r&&t.options.value&&(r=t.options.value),o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(r)})},t._formElement=o.on("reset",t._resetHandler))},_paste:function(e){e.preventDefault()},_keydown:function(e){var t,n,i,o,s,l,c,u=e.keyCode;if(37==u||39==u)for(e.preventDefault(),t=a(this.element[0]),t[0]!=t[1]&&this._selectNearestSegment(),n=37==u?-1:1,i=n==-1?a(this.element[0])[0]-1:a(this.element[0])[1]+1;i>=0&&i=0){this._selectSegment(this._format[i]);break}i+=n}38!=u&&40!=u||(e.preventDefault(),t=a(this.element[0]),o=this._format[t[0]],w.indexOf(o)>=0&&(s=1,"m"==o&&(s=this.options.interval||1),this._dateTime.modifyPart(o,38==u?1*s:s*-1),this._updateElementValue(),this._selectSegment(o),this.element.trigger(b))),r.support.browser.msie&&r.support.browser.version<10&&(l=e.keyCode?e.keyCode:e.which,8!==l&&46!==l||(c=this,setTimeout(function(){c._input()},0))),u===d.ENTER&&this._change()},_selectNearestSegment:function(){var e,n,i=a(this.element[0]),o=i[0];for(e=o,n=o-1;e=0;e++,n--){if(e=0&&w.indexOf(this._format[n])!==-1)return this._selectSegment(this._format[n]),t}},_selectSegment:function(e){var t,n=-1,i=0;for(t=0;t99&&(o=Math.floor(o/10)),o=_?a(o):e;break;case"fff":o=_?a(u.getMilliseconds(),3):e;break;case"tt":o=g?u.getHours()<12?S.AM[0]:S.PM[0]:k.dayperiod;break;case"zzz":n=u.getTimezoneOffset(),i=n<0,o=(""+Math.abs(n/60)).split(".")[0],n=Math.abs(n)-60*o,o=(i?"+":"-")+a(o),o+=":"+a(n);break;case"z":case"zz":o=u.getTimezoneOffset()/60,i=o<0,o=(""+Math.abs(o)).split(".")[0],o=(i?"+":"-")+("zz"===e?a(o):o)}if(o=o!==t?o:e.slice(1,e.length-1),D){for(o=""+o,r="","ddd"==e&&(e="EEE"),"dddd"==e&&(e="EEEE"),s=0;s0&&(l(e,!0),u=i)},this.parsePart=function(e,t){var n,i,o,r,a,s,d,c,_;if(!t)return l(e,!1),!0;switch(n=new Date(u&&u.getTime?u.getTime():u),e){case"d":if(o=(f?10*n.getDate():0)+parseInt(t,10),isNaN(o))return;for(;o>31;)o=parseInt((""+o).slice(1),10);if(o<1)f=!1;else{if(n.setDate(o),n.getMonth()!==u.getMonth())return;f=!0}break;case"M":if(r=(p?10*(n.getMonth()+1):0)+parseInt(t,10),isNaN(r)){for(a=S.months.names,b+=t.toLowerCase();b.length>0;){for(s=0;s12;)r=parseInt((""+r).slice(1),10);r<1?p=!1:(n.setMonth(r-1),n.getMonth()!==r-1&&(n.setDate(1),n.setMonth(r-1)),p=!0);break;case"y":if(d=(h?10*n.getFullYear():0)+parseInt(t,10),isNaN(d))return;for(;d>9999;)d=parseInt((""+d).slice(1),10);d<1?h=!1:(n.setFullYear(d),h=!0);break;case"h":if(i=(g?10*(n.getHours()%12||12):0)+parseInt(t,10),isNaN(i))return;for(;i>12;)i=parseInt((""+i).slice(1),10);n.setHours(12*Math.floor(n.getHours()/12)+i%12),g=!0;break;case"H":if(i=(g?10*n.getHours():0)+parseInt(t,10),isNaN(i))return;for(;i>23;)i=parseInt((""+i).slice(1),10);n.setHours(i),g=!0;break;case"m":if(c=(m?10*n.getMinutes():0)+parseInt(t,10),isNaN(c))return;for(;c>59;)c=parseInt((""+c).slice(1),10);n.setMinutes(c),m=!0;break;case"s":if(_=(v?10*n.getSeconds():0)+parseInt(t,10),isNaN(_))return;for(;_>59;)_=parseInt((""+_).slice(1),10);n.setSeconds(_),v=!0;break;case"t":if(g){for(w+=t.toLowerCase();w.length>0;){if(0===S.AM[0].toLowerCase().indexOf(w)&&n.getHours()>=12||0===S.PM[0].toLowerCase().indexOf(w)&&n.getHours()<12)return n.setHours((n.getHours()+12)%24),u=n,!0;w=w.substring(1,w.length)}return!1}}return u=n,!0},this.toPair=function(e,t,n){return e?(t=r.getCulture(t),S=t.calendars.standard,e=S.patterns[e]||e,T=S.days,C=S.months,k=n,[e.replace(x,s(!1)),e.replace(x,s(!0))]):["",""]},this.getDateObject=function(){return h&&p&&f&&g&&m&&v&&_?new Date(u.getTime()):null},e)u=new Date(e.getTime());else for(u=new Date,d=this.toPair(n,i,o)[1],c=0;c",f="",g=".kendoDatePicker",m="click"+g,v=c.mouseAndTouchPresent?r.applyEventMap("up",g.slice(1)):m,_="open",b="close",w="change",k="disabled",y="readonly",x="k-state-default",C="k-state-focused",S="k-state-selected",T="k-state-disabled",D="k-state-hover",A="mouseenter"+g+" mouseleave"+g,I="mousedown"+g,E="id",M="min",F="max",R="month",P="aria-disabled",z="aria-expanded",B="aria-hidden",L=r.calendar,H=L.isInRange,N=L.restrictValue,O=L.isEqualDatePart,V=e.extend,W=e.proxy,U=Date,j=function(t){
var n,i=this,o=document.body,s=e(p).attr(B,"true").addClass("k-calendar-container").appendTo(o);i.options=t=t||{},n=t.id,n&&(n+="_dateview",s.attr(E,n),i._dateViewID=n),i.popup=new a.Popup(s,V(t.popup,t,{name:"Popup",isRtl:r.support.isRtl(t.anchor)})),i.div=s,i.value(t.value)};j.prototype={_calendar:function(){var t,n=this,o=n.calendar,s=n.options;o||(t=e(p).attr(E,r.guid()).appendTo(n.popup.element).on(I,i).on(m,"td:has(.k-link)",W(n._click,n)),n.calendar=o=new a.Calendar(t),n._setOptions(s),r.calendar.makeUnselectable(o.element),o.navigate(n._value||n._current,s.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=L.disabled(n)),this.options=V(t,e,{change:t.change,close:t.close,open:t.open}),this.calendar&&this._setOptions(this.options)},destroy:function(){this.popup.destroy()},open:function(){var e,t=this;t._calendar(),e=t.popup._hovered,t.popup._hovered=!0,t.popup.open(),setTimeout(function(){t.popup._hovered=e},1)},close:function(){this.popup.close()},min:function(e){this._option(M,e)},max:function(e){this._option(F,e)},toggle:function(){var e=this;e[e.popup.visible()?b:_]()},move:function(e){var t=this,n=e.keyCode,i=t.calendar,o=e.ctrlKey&&n==d.DOWN||n==d.ENTER,r=!1;if(e.altKey)n==d.DOWN?(t.open(),e.preventDefault(),r=!0):n==d.UP&&(t.close(),e.preventDefault(),r=!0);else if(t.popup.visible()){if(n==d.ESC||o&&i._cell.hasClass(S))return t.close(),e.preventDefault(),!0;n!=d.SPACEBAR&&(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 U((+N(e,i.min,i.max))),n&&n.value(e)},_click:function(e){e.currentTarget.className.indexOf(S)!==-1&&(this.calendar.trigger("change"),this.close())},_option:function(e,t){var n=this,i=n.calendar;n.options[e]=t,i&&i[e](t)}},j.normalize=n,r.DateView=j,o=s.extend({init:function(t,i){var o,a,d=this;s.fn.init.call(d,t,i),t=d.element,i=d.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),d._initialOptions=V({},i),d._wrapper(),d.dateView=new j(V({},i,{id:t.attr(E),anchor:d.wrapper,change:function(){d._change(this.value()),d.close()},close:function(e){d.trigger(b)?e.preventDefault():(t.attr(z,!1),a.attr(B,!0))},open:function(e){var n,i=d.options;d.trigger(_)?e.preventDefault():(d.element.val()!==d._oldText&&(n=l(t.val(),i.parseFormats,i.culture),d.dateView[n?"current":"value"](n)),t.attr(z,!0),a.attr(B,!1),d._updateARIA(n))}})),a=d.dateView.div,d._icon();try{t[0].setAttribute("type","text")}catch(c){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":d.dateView._dateViewID,autocomplete:"off"}),d._reset(),d._template(),o=t.is("[disabled]")||e(d.element).parents("fieldset").is(":disabled"),o?d.enable(!1):d.readonly(t.is("[readonly]")),d._createDateInput(i),d._old=d._update(i.value||d.element.val()),d._oldText=t.val(),r.notify(d)},events:[_,b,w],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:R,depth:R,animation:{},month:{},dates:[],disableDates:null,ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#',dateInput:!1,weekNumber:!1},setOptions:function(e){var t=this,i=t._value;s.fn.setOptions.call(t,e),e=t.options,e.min=l(e.min),e.max=l(e.max),n(e),t.dateView.setOptions(e),t._createDateInput(e),t._dateInput||t.element.val(r.toString(i,e.format,e.culture)),i&&t._updateARIA(i)},_editable:function(e){var t=this,n=t._dateIcon.off(g),o=t.element.off(g),r=t._inputWrapper.off(g),a=e.readonly,s=e.disable;a||s?(r.addClass(s?T:x).removeClass(s?x:T),o.attr(k,s).attr(y,a).attr(P,s)):(r.addClass(x).removeClass(T).on(A,t._toggleHover),o&&o.length&&(o[0].removeAttribute(k),o[0].removeAttribute(y)),o.attr(P,!1).on("keydown"+g,W(t._keydown,t)).on("focusout"+g,W(t._blur,t)).on("focus"+g,function(){t._inputWrapper.addClass(C)}),n.on(v,W(t._click,t)).on(I,i))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this._dateInput&&this._dateInput._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this._dateInput&&this._dateInput._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;s.fn.destroy.call(e),e.dateView.destroy(),e.element.off(g),e._dateIcon.off(g),e._inputWrapper.off(g),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option(M,e)},max:function(e){return this._option(F,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(D,"mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&(e._change(t),t||e.dateView.current(r.calendar.getToday())),e._inputWrapper.removeClass(C)},_click:function(e){var t=this;t.dateView.toggle(),t._focusElement(e.type)},_focusElement:function(e){var t=this.element;c.touch&&(!c.mouseAndTouchPresent||(e||"").match(/touch/i))||t[0]===h()||t.trigger("focus")},_change:function(e){var t,n,i,o=this,a=o.element.val();e=o._update(e),t=!r.calendar.isEqualDate(o._old,e),n=t&&!o._typing,i=a!==o.element.val(),(n||i)&&o.element.trigger(w),t&&(o._old=e,o._oldText=o.element.val(),o.trigger(w)),o._typing=!1},_keydown:function(e){var t=this,n=t.dateView,i=t.element.val(),o=!1;n.popup.visible()||e.keyCode!=d.ENTER||i===t._oldText?(o=n.move(e),t._updateARIA(n._current),o?t._dateInput&&e.stopImmediatePropagation&&e.stopImmediatePropagation():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('').insertAfter(i)),n._dateIcon=t.attr({role:"button","aria-controls":n.dateView._dateViewID})},_option:function(e,n){var i=this,o=i.options;return n===t?o[e]:(n=l(n,o.parseFormats,o.culture),n&&(o[e]=new U((+n)),i.dateView[e](n)),t)},_update:function(e){var t,n=this,i=n.options,o=i.min,a=i.max,s=n._value,d=l(e,i.parseFormats,i.culture),c=null===d&&null===s||d instanceof Date&&s instanceof Date;return i.disableDates(d)&&(d=null,n._old||n.element.val()||(e=null)),+d===+s&&c?(t=r.toString(d,i.format,i.culture),t!==e&&n.element.val(null===d?e:t),d):(null!==d&&O(d,o)?d=N(d,o,a):H(d,o,a)||(d=null),n._value=d,n.dateView.value(d),n._dateInput&&d?n._dateInput.value(d||e):n.element.val(r.toString(d||e,i.format,i.culture)),n._updateARIA(d),d)},_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").addClass(i[0].className),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=t.options,a=o.disableDates,s=o.parseFormats.length?o.parseFormats:null,l=t._initialOptions.value,d=i?e("#"+i):n.closest("form"),c=n[0].defaultValue;l&&a&&a(l)&&(l=null),c&&r.parseDate(c,s,o.culture)||!l||n.attr("value",r.toString(l,o.format,o.culture)),d[0]&&(t._resetHandler=function(){t.value(l||n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=d.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=u(this.options.ARIATemplate)},_createDateInput:function(e){this._dateInput&&(this._dateInput.destroy(),this._dateInput=null),e.dateInput&&(this._dateInput=new a.DateInput(this.element,{culture:e.culture,format:e.format,min:e.min,max:e.max}))},_updateARIA:function(e){var t,n=this,i=n.dateView.calendar;n.element&&n.element.length&&n.element[0].removeAttribute("aria-activedescendant"),i&&(t=i._cell,t.attr("aria-label",n._ariaTemplate({current:e||i.current()})),n.element.attr("aria-activedescendant",t.attr("id")))}}),a.plugin(o)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.drawer.min",["kendo.userevents.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,o=i.Widget,r="show",a="hide",s="itemClick",l="push",d="overlay",c="left",u="right",h=n.ui.Widget.extend({init:function(t,i){var r,a,s=this;o.fn.init.call(this,t,i),i=s.options,s._element(t),s._wrapper(t),s.position(),s._mode(),i.mini&&s._miniMode(),s._initDrawerItems(),i.mini&&i.mode!=l&&s._setBodyOffset(),r=this.userEvents=new n.UserEvents(i.mode!=l?e(document.body):this.drawerContainer,{fastTap:!0,allowSelection:!0}),a=function(t){e.contains(s.drawerItemsWrapper[0],t.event.target)&&s._itemClick(t),s.visible&&!s.trigger("hide",{sender:this})&&(s.hide(),t.preventDefault())},this.options.swipeToOpen?(r.bind("start",function(e){s._start(e)}),r.bind("move",function(e){s._update(e)}),r.bind("end",function(e){s._end(e)}),r.bind("tap",a)):r.bind("press",a),i.minHeight&&i.mode==l&&s.drawerContainer.css("min-height",i.minHeight)},_element:function(){var t=this,n=t.element,i=t.options,o=t.contentElement=n.children().first();t.drawerElement=e(i.template),o.addClass("k-drawer-content"),n.addClass("k-widget k-drawer")},_wrapper:function(){var t=this.options,n=this.drawerElement,i=this.element,o=this.contentElement,r=this.drawerItemsWrapper=n.wrap("").parent(),a=this.drawerWrapper=r.wrap("").parent(),s=this.drawerContainer=i.wrap("").parent();t.mini?t.mini.width&&a.width(t.mini.width):a.width(0),t.mode===l?s.append(o):t.mode===d&&(s.after(o),e(document.body).prepend(s)),i.append(a)},_setBodyOffset:function(){var t=this.element.outerWidth();this.leftPositioned?e(document.body).css("padding-left",t):e(document.body).css("padding-right",t)},_initDrawerItems:function(){var e=this.drawerItemsWrapper,t=e.find("[data-role='drawer-item']"),n=e.find("[data-role='drawer-separator']");t.addClass("k-drawer-item"),n.addClass("k-drawer-item k-drawer-separator"),this._selectedItemIndex>=0&&(t.removeClass("k-state-selected"),t.eq(this._selectedItemIndex).addClass("k-state-selected"))},_mode:function(){var t,n=this.options,i=this.drawerContainer;n.mode==l?i.addClass("k-drawer-"+l):(i.addClass("k-drawer-"+d),t=this.overlayContainer=e(''),t.hide(),i.prepend(t))},_miniMode:function(){var t=this.options,n=this.drawerContainer,i=t.mini.width,o=this._miniTemplate=t.mini.template&&e(t.mini.template),r=this.drawerItemsWrapper,a=this.drawerWrapper;n.addClass("k-drawer-mini"),o&&r.html(o),i&&a.width(i),this.minWidth=t.mini.width||this.drawerWrapper.width()},show:function(){var e=this.drawerWrapper,t=this.drawerContainer,n=this.options,i=t.hasClass("k-drawer-expanded"),o=this._miniTemplate,r=this.drawerElement,a=this.drawerItemsWrapper;i||(t.addClass("k-drawer-expanded"),this.visible=!0),o&&(a.html(r),this._initDrawerItems(),this._selectItem()),e.width(n.width),n.mode===d&&(this.overlayContainer.show(),this.visible=!0)},hide:function(){var e=this,t=e.drawerWrapper,n=e.drawerContainer,i=this.options,o=this.drawerItemsWrapper,r=this._miniTemplate,a=i.mini&&i.mini.width;this._miniTemplate&&(o.html(r),e._initDrawerItems(),this._selectItem()),t.width(i.mini?a?a:"":0),this.visible&&(n.removeClass("k-drawer-expanded"),this.visible=!1),i.mode===d&&this.overlayContainer.hide()},position:function(e){var t=this,n=t.options,i=e||n.position,o=t.drawerContainer;i==u?(o.removeClass("k-drawer-"+c),o.addClass("k-drawer-"+u)):(o.removeClass("k-drawer-"+u),o.addClass("k-drawer-"+c)),this.leftPositioned=i===c},_start:function(e){var i=this,o=this.options,r=this.drawerWrapper,a=this.drawerItemsWrapper,s=e.sender;return Math.abs(e.x.velocity)i.width/2,s=.8;o.css("transition","all .3s ease-out"),t=this.leftPositioned?n>-s&&(n>s||a):n0?n=e(t.event.target).find(".k-drawer-item"):e(t.event.target).closest(".k-drawer-item").length>0?n=e(t.event.target).closest(".k-drawer-item"):e(t.event.target).hasClass(".k-drawer-item")&&(n=e(t.event.target)),i.drawerItemsWrapper.find(".k-drawer-item").removeClass("k-state-selected"),i._selectItem(n)},destroy:function(){var t=this.options;t.mode!=l&&(this.leftPositioned?e(document.body).css("padding-left",0):e(document.body).css("padding-right",0)),o.fn.destroy.call(this),this.userEvents.destroy(),n.destroy(this.element),this.element=this.drawerWrapper=this.drawerElement=this.drawerContainer=this.drawerItemsWrapper=this._miniTemplate=null},options:{name:"Drawer",position:c,mode:"overlay",swipeToOpen:!0,width:280,mini:!1,template:""},events:[a,r,s]});n.ui.plugin(h)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.multiviewcalendar.min",["kendo.core.min","kendo.selectable.min","kendo.calendar.min"],e)}(function(){return function(e,t){function n(t){var n=e(this).hasClass("k-state-disabled");n||e(this).toggleClass(N,Y.indexOf(t.type)>-1||t.type==$)}function i(e,t,n,i){var o,r;for(o=0;o<=t;o++)r=new Date(n.getTime()),r=new Date(r.setDate(r.getDate()+o)),i(r)||e.push(r)}function o(e,t){var n,i,o;return+t<+e&&(n=+e,s.views[0].setDate(e,t),s.views[0].setDate(t,new Date(n))),i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),o=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),Math.ceil((+o-+i)/a.date.MS_PER_DAY)}function r(e,n,i){var o;return"month"===n?(o=new ie(e.getFullYear(),e.getMonth()+i,e.getDate()),o.setFullYear(e.getFullYear()),(Math.abs(o.getMonth()-e.getMonth())>i||i>10)&&(o.setMonth(e.getMonth()+i),o=s.views[0].last(o)),o):"year"===n?(o=new ie(1,e.getMonth(),e.getDate()),o.setFullYear(e.getFullYear()+i),Math.abs(o.getFullYear()-e.getFullYear())>i&&(o=new ie(1,e.getMonth(),1),o.setFullYear(e.getFullYear()+i),o=s.views[1].last(o)),o):"decade"===n?(o=new ie(1,e.getMonth(),e.getDate()),o.setFullYear(e.getFullYear()+10*i),Math.abs(o.getFullYear()-e.getFullYear())>10*i&&(o=new ie(1,e.getMonth(),1),o.setFullYear(e.getFullYear()+10*i),o=s.views[2].last(o)),o):"century"===n?(o=new ie(1,e.getMonth(),e.getDate()),o.setFullYear(e.getFullYear()+100*i),Math.abs(o.getFullYear()-e.getFullYear())>100*i&&(o=new ie(1,e.getMonth(),1),o.setFullYear(e.getFullYear()+100*i),o=s.views[3].last(o)),o):t}var a=window.kendo,s=a.calendar,l=a.support,d=s.isInRange,c=s.toDateObject,u=s.createDate,h=s.isEqualDate,p=s.getToday,f=a.keys,g=a.ui,m=g.Widget,v=g.Selectable,_=a.template,b=l.mobileOS,w=".kendoMultiViewCalendar",k="click",y="keydown",x="id",C="min",S="month",T=".",D="century",A="decade",I="change",E="navigate",M="value",F="k-state-focused",R="k-state-selected",P="k-range-mid",z="k-range-split-end",B="k-range-split-start",L="k-range-start",H="k-range-end",N="k-state-hover",O="k-state-disabled",V="k-nav-today",W="k-other-month",U="k-out-of-range",j="td:has(.k-link):not(."+U+")",q="td:has(.k-link):not(."+O+"):not(."+U+")",G="blur",$="focus",Y=l.touch?"touchstart":"mouseenter",K=l.touch?"touchend"+w+" touchmove"+w:"mouseleave"+w,Q="_prevArrow",X="_nextArrow",J="aria-selected",Z="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",ee="aria-disabled",te="aria-label",ne=e.proxy,ie=Date,oe={month:0,year:1,decade:2,century:3},re=m.extend({init:function(e,t){var n=this;m.fn.init.call(n,e,t),n.userEvents=new a.UserEvents(n.element,{global:!0,allowSelection:!0,filter:n.options.filter,tap:ne(n._tap,n),touchAction:"none"})},events:[I],options:{name:"RangeSelectable",filter:">*",inputSelectors:Z,multiple:!1,dragToSelect:!0,relatedTarget:e.noop},destroy:function(){var e=this;m.fn.destroy.call(e),e.userEvents.destroy(),e._lastActive=e.element=e.userEvents=e._start=e._end=null},_allowSelection:function(t){return!e(t).is(this.options.inputSelectors)||(this.userEvents.cancel(),!1)},start:function(e){return e===t?this._start:(e.addClass(L+" "+R),this._start=e,t)},end:function(e){return e===t?this._start:(e.addClass(H+" "+R),this._end=e,t)},mid:function(t){var n=this.element.find("table.k-month");t.addClass(P),n.each(function(){var t=e(this),n=t.find(q+":last"),i=t.find(q+":first");n.hasClass(P)&&n.addClass(z),i.hasClass(P)&&i.addClass(B)})},clear:function(e){this.element.find(j).removeClass(H+" "+R+" "+L+" "+P+" "+z+" "+B),e&&(this._start=this._end=null)},selectFrom:function(t){var n=this,i=n.element.find(j),o=e.inArray(e(t)[0],i);n.clear(),n.start(t),i=i.filter(function(e){return e>o}),n.mid(i)},selectTo:function(t){var n=this,i=n.element.find(j),o=e.inArray(e(t)[0],i);n.clear(),i=i.filter(function(e){return ea&&(s=i,i=n,n=s,s=r,r=a,a=s),l.clear(),n.addClass(L+" "+R),l._start=n,o=o.filter(function(e){return e>r&&e+c(e(a).find("a"))?(s.clear(),s.start(a),s.trigger(I),t):(i=i.filter(function(e){return e>o&&e-1,i&&o?a._navContainer&&(a._navContainer.remove(),a._navContainer=null):(a._navContainer||(a._navContainer=e('').appendTo(a.header),a[Q]=a._navContainer.find(".k-prev-view"),a[X]=a._navContainer.find(".k-next-view")),a[Q].toggleClass(O,i).attr(ee,i),a[Q].hasClass(O)&&a[Q].removeClass(N),a[X].toggleClass(O,o).attr(ee,o),a[X].hasClass(O)&&a[X].removeClass(N))},_mouseEnter:function(t){var n,i,o,r,a=this,s=e(t.currentTarget);if(s.addClass(N),a.rangeSelectable&&"month"===a._currentView.name&&(n=a.selectRange(),n.start&&!n.end)){if(a._dateInViews(a.selectRange().start)){if(i=a.element.find(a.rangeSelectable.options.filter),o=e.inArray(e(a.rangeSelectable._start)[0],i),r=e.inArray(e(s)[0],i),o>r)return;a.rangeSelectable.range(a.rangeSelectable._start,s)}else+c(a.element.find(j+":first").find("a"))>+n.start&&a.rangeSelectable.selectTo(s);a.rangeSelectable._end=null}},_move:function(n,i){var o,r,s,l,h,p,g=this,m=g.options,v=n.keyCode,_=g._index,b=m.min,w=m.max,k=g.element.find(T+F),y=k.closest("table"),x=new ie((+(g._current||c(k.find("a"))))),C=a.support.isRtl(g.wrapper),S=!1;if(v==f.RIGHT&&!C||v==f.LEFT&&C?(o=1,r=!0):v==f.LEFT&&!C||v==f.RIGHT&&C?(o=-1,r=!0):v==f.UP?(o=0===_?-7:-4,r=!0):v==f.DOWN?(o=0===_?7:4,r=!0):v==f.SPACEBAR?(o=0,r=!0):v==f.HOME?(r=!0,l=y.find(q).eq(0),l.hasClass(F)?(y=y.prev(),y.length?g._focusCell(y.find(q).eq(0)):(S=g[Q]&&!g[Q].hasClass(O),g._navigate(Q,-1,i),g._focusCell(g.element.find("table:first "+q+":first")))):g._focusCell(l)):v==f.END&&(r=!0,l=y.find(q).last(),l.hasClass(F)?(y=y.next(),y.length?g._focusCell(y.find(q).last()):(S=g[X]&&!g[X].hasClass(O),g._navigate(X,1,i),g._focusCell(g.element.find("table:last "+q+":last")))):g._focusCell(l)),n.ctrlKey||n.metaKey)v==f.RIGHT&&!C||v==f.LEFT&&C?(S=g[X]&&!g[X].hasClass(O),g._navigate(X,1,i),r=!0):v==f.LEFT&&!C||v==f.RIGHT&&C?(S=g[Q]&&!g[Q].hasClass(O),g._navigate(Q,-1,i),r=!0):v==f.UP?(S=!g._title.hasClass(O),g.navigateUp(),g._focusCell(g._cellByDate(g._current),!i),r=!0):v==f.DOWN?("month"===g._currentView.name?g.value(x):(g.navigateDown(x),g._focusCell(g._cellByDate(g._current),!i),S=!0),r=!0):v!=f.ENTER&&v!=f.SPACEBAR||"multiple"===m.selectable&&g._toggleSelection(n);else if(n.shiftKey&&"single"!==m.selectable){if(o!==t||s){if(s||g._currentView.setDate(x,o),"month"!==g._currentView.name)return;m.disableDates(x)&&(x=g._nextNavigatable(x,o)),b=u(b.getFullYear(),b.getMonth(),b.getDate()),d(x,b,w)&&(g._dateInViews(x)||(o>0?(S=g[X]&&!g[X].hasClass(O),g._navigate(X,1,i)):(S=g[Q]&&!g[Q].hasClass(O),g._navigate(Q,-1,i))),l=g._cellByDate(x),g._current=x,g.selectable&&(g._selectRange(c((g.selectable._lastActive||k).find("a")),x),g.selectable._lastActive||(g.selectable._lastActive=k),g.trigger(I),g._focusCell(l)),g.rangeSelectable&&(h=c((g.rangeSelectable._lastActive||k).find("a")),g._dateInViews(h)?(g.rangeSelectable._lastActive=g.rangeSelectable._end&&g.rangeSelectable._end.is(T+F)?g.rangeSelectable._start:g._cellByDate(h),g.rangeSelectable.range(g.rangeSelectable._lastActive,l)):+h>+x?(g.rangeSelectable._end=g.rangeSelectable._lastActive,g.rangeSelectable.selectFrom(l)):g.rangeSelectable.selectTo(l),g.rangeSelectable.change(),g._focusCell(l)))}}else v==f.ENTER||v==f.SPACEBAR?("month"===g._currentView.name?(g.selectable&&(g.selectable._lastActive=g._cellByDate(x)),g.value(x),g.rangeSelectable&&g.rangeSelectable.change()):g._click(e(g._cell[0].firstChild),i),r=!0):v!=f.PAGEUP&&v!=f.PAGEDOWN||(r=!0,p=y.find(q).index(k),y=v==f.PAGEUP?y.prev():y.next(),y.length||(v==f.PAGEUP?(S=g[Q]&&!g[Q].hasClass(O),g.navigateToPast(),y=g.element.find("table:first")):(S=g[X]&&!g[X].hasClass(O),g.navigateToFuture(),y=g.element.find("table:last"))),l=y.find(q).eq(p),g._focusCell(l.length?l:y.find(q).last())),(o||s)&&(s||g._currentView.setDate(x,o),b=u(b.getFullYear(),b.getMonth(),b.getDate()),d(x,b,w)&&(g.selectable&&m.disableDates(x)&&(x=g._nextNavigatable(x,o)),g._dateInViews(x)||(o>0?(S=g[X]&&!g[X].hasClass(O),g._navigate(X,1,i)):(S=g[Q]&&!g[Q].hasClass(O),g._navigate(X,-1,i))),l=g._cellByDate(x),g._current=x,g._focusCell(l,!i)));return S&&g.trigger(E),r&&n.preventDefault(),g._current},_visualizeSelectedDatesInView:function(){var t,n=this,i={};e.each(n._selectDates,function(e,t){i[a.calendar.views[0].toDateString(t)]=t}),n.selectable.clear(),t=n.element.find("table").find(j).filter(function(t,n){return i[e(n.firstChild).attr(a.attr(M))]}),t.length>0&&n.selectable._selectElement(t,!0)},_nextNavigatable:function(e,t){var n=this,i=!0,o=n._currentView,r=n.options.min,a=n.options.max,s=n.options.disableDates,l=new Date(e.getTime());for(o.setDate(l,-t);i;){if(o.setDate(e,t),!d(e,r,a)){e=l;break}i=s(e)}return e},_toggleSelection:function(t){var n=this;n.selectable._lastActive=e(n._cell[0]),e(n._cell[0]).hasClass(R)?(n.selectable._unselect(e(n._cell[0])),n.selectable.trigger(I,{event:t})):n.selectable.value(e(n._cell[0]),{event:t})},_option:function(e,n){var i,o=this,r=o.options,s=o._value||o._current;return n===t?r[e]:(n=a.parseDate(n,r.format,r.culture),n&&(r[e]=new ie((+n)),i=e===C?n>s:s>n,i&&(o._value=null),o.navigate(o._value),o._toggle()),t)},_cellByDate:function(t){return t instanceof Date&&(t=this._currentView.toDateString(t)),this.element.find("table").find("td:not(."+W+")").filter(function(){return e(this.firstChild).attr(a.attr(M))===t})},_selectable:function(){var e=this,t=e.options.selectable;e.selectable&&(e.selectable.destroy(),e.selectable=null),e.rangeSelectable&&(e.rangeSelectable.destroy(),e.rangeSelectable=null),"range"===t.toLowerCase()?e.rangeSelectable=new re(e.wrapper,{filter:"table.k-month "+q,change:ne(e._rangeSelection,e)}):e.selectable=new v(e.wrapper,{aria:!0,dragToSelect:!1,inputSelectors:"input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up",multiple:v.parseOptions(t).multiple,filter:"table.k-content "+q,change:ne(e._selection,e),relatedTarget:ne(e._onRelatedTarget,e),unselect:ne(e._unselecting,e)})},_onRelatedTarget:function(e){var t=this;t.selectable.options.multiple&&e.is(q)&&e.length>1&&t._focusCell(e.first(),!0)},_getFirstViewDate:function(e){var t,n,i,o=this,a=o.options,s=[],l=new Date((+o._current));for(i=0;i+a.max){+t<=+a.max&&s.push({start:t,end:new Date((+a.max))});break}s.push({start:t,end:n}),l=new Date((+r(n,e.name,1)))}for(l=new Date((+o._current)),i=0;i=+a.min&&s.push({start:new Date((+a.min)),end:n});break}s.push({start:t,end:n}),l=new Date((+r(t,e.name,-1)))}for(t=s[0].start,i=0;i+s[i].start&&(t=s[i].start);return new Date((+t))},_canRenderNextView:function(e){var t=e.getFullYear(),n=e.getMonth(),i=e.getDate(),o=this.options.max,r=o.getFullYear(),a=o.getMonth();return t=+i},_fillRange:function(e,t){var n,r=this;r._selectDates=[],n=o(e,t),i(r._selectDates,n,e,r.options.disableDates)},_selectRange:function(e,t){var n,i=this;+t<+e&&(n=t,t=e,e=n),i._fillRange(e,t),i._visualizeSelectedDatesInView()},_header:function(){var t,i=this,o=i.element,r=o.find(".k-calendar-header");r.length||(r=e('').prependTo(o)),i.header=r,r.on(Y+w+" "+K+" "+$+w+" "+G+w,".k-button",n).on("click",function(){return!1}).on(k+w,".k-button.k-title",function(){i.navigateUp(),i._focusCell(i._cellByDate(i._current),!0),i.trigger(E)}).on(k+w,".k-button.k-prev-view",function(e){e.preventDefault(),i.navigateToPast(),i.trigger(E)}).on(k+w,".k-button.k-next-view",function(e){e.preventDefault(),i.navigateToFuture(),i.trigger(E)}),t=r.find(".k-button"),i._title=t.filter(".k-title"),i._navContainer=r.find(".k-calendar-nav"),i[Q]=t.filter(".k-prev-view"),i[X]=t.filter(".k-next-view")},_wrapper:function(){this.tablesWrapper=e('').insertAfter(this.element[0].firstChild)},_templates:function(){var e=this,t=e.options,n=t.month,i=n.content,o=n.weekNumber,r=n.empty;e.month={content:_(''+(i||"#=data.value#")+"",{useWithBlock:!!i}),empty:_('":' class="k-out-of-range">')+(r||"")+"",{useWithBlock:!!r}),weekNumber:_(''+(o||"#= data.weekNumber #")+"",{useWithBlock:!!o})}},_footer:function(){var n=this,i=n.options,o=i.footer!==!1?a.template(n.options.footer||'#= kendo.toString(data,"D","'+i.culture+'") #',{useWithBlock:!1}):null,r=p(),s=n.element,l=s.find(".k-footer");return o?(l[0]||(l=e('').appendTo(s)),n._today=l.show().find(".k-link").html(o(r)).attr("title",a.toString(r,"D",n.options.culture)),n._toggle(),t):(n._toggle(!1),l.hide(),t)},_navigate:function(e,t,n){var i,o=this,r=o._index+1,a=new ie((+o._current)),l=new ie((+o._current));e=o[e],i=o._cellByDate(a).closest("table").index(),t>0?i=1-i:i+=1,e&&e.hasClass(O)||(r>3?a.setFullYear(a.getFullYear()+100*(t*i)):s.views[r].setDate(a,t*i),o.navigate(a),o._dateInViews(l)?(o._focusCell(o._cellByDate(l),!n),o._current=l):(r>3?l.setFullYear(l.getFullYear()+100*t):s.views[r].setDate(l,t),o._focusCell(o._cellByDate(l),!n),o._current=l))},_toggle:function(e){var n=this,i=n.options,o="range"!==i.selectable&&n.options.disableDates(p()),r=n._today;e===t&&(e=d(p(),i.min,i.max)),r&&(r.off(k+w),e&&!o?r.addClass(V).removeClass(O).on(k+w,ne(n._todayClick,n)):r.removeClass(V).addClass(O).on(k+w,function(e){e.preventDefault()}))},_click:function(e,t){var n=this,i=n.options,o=new Date((+n._current)),r=c(e);a.date.adjustDST(r,0),n._currentView.setDate(o,r),n._current=r,n._currentView.name!==i.depth?(n.navigateDown(s.restrictValue(o,i.min,i.max)),n._focusCell(n._cellByDate(n._current),!t),n.trigger(E)):n._focusCell(e.closest("td"),!t)},_blur:function(){var e=this;e._cell&&e._cell.removeClass(F)},_focus:function(t){var n=this,i=e(t.currentTarget),o=n._cell;o&&e.contains(i[0],o[0])||(o=i.find(q+":first")),n._focusCell(o)},_focusCell:function(e,t){var n=this,i=n._cellID,o=e.closest("table");n._cell&&n._cell.length&&(n._cell[0].removeAttribute(J),n._cell[0].removeAttribute(te),n._cell.removeClass(F),n._cell[0].removeAttribute(x),n._cell.closest("table")[0].removeAttribute("aria-activedescendant")),n._cell=e,t&&o.trigger("focus"),i&&(e.attr(x,i),o.attr("aria-activedescendant",i)),e.attr(J,!0).addClass(F),e.length&&"month"==n._currentView.name&&(n._current=c(e.find("a")))},_todayClick:function(e){var t=this,n=t.options.disableDates,i=p(),o=!1;e.preventDefault(),n(i)||(t._value=i,"multiple"===t.options.selectable&&(t._selectDates=[i]),"range"===t.options.selectable&&(t.rangeSelectable.clear(!0),t._range={start:i,end:null}),"month"==t._currentView.name&&t._dateInViews(i)||(o=!0),t.navigate(i,t.options.depth),"single"===t.options.selectable&&(t.selectable._lastActive=null),o&&t.trigger(E),t.trigger(I))},_validateValue:function(e){var n=this,i=n.options,o=i.min,r=i.max;return e=a.parseDate(e,i.format,i.culture),null!==e&&(e=new ie((+e)),d(e,o,r)||(e=null)),null!==e&&n.options.disableDates(new Date((+e)))?n._value===t&&(n._value=null):n._value=e,n._value},clearSelection:function(){var e=this;e.selectable&&e.element.find(T+R).removeClass(R),e.rangeSelectable&&e.rangeSelectable.clear(!0)},_restoreSelection:function(){var e,n=this,i=n.options.selectable;if(n._currentView.name===n.options.depth){if(n._preventChange=!0,"range"===i){if(e=n.selectRange(),!e||!e.start)return n._preventChange=!1,t;n.selectRange(e)}"single"===i&&n.value()&&n.selectable.value(n._cellByDate(n.value())),"multiple"===i&&n._visualizeSelectedDatesInView(),n._preventChange=!1}},value:function(e){var n,i=this;return e===t?i._value:(e=i._validateValue(e),i.clearSelection(),e&&!i._dateInViews(e)&&i.navigate(e),null!==e&&i._currentView.name===S&&(n=i._cellByDate(e),i.selectable&&i.selectable.value(n),i.rangeSelectable&&(i.rangeSelectable.start(n),i.rangeSelectable._lastActive=n)),t)},selectDates:function(n){var i,o,r=this;return n===t?r._selectDates:(o=n.map(function(e){return e.getTime()}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(e){return new Date(e)}),i=e.grep(o,function(e){if(e)return+r._validateValue(new Date(e.setHours(0,0,0,0)))===+e}),r._selectDates=i.length>0?i:0===o.length?o:r._selectDates,r._visualizeSelectedDatesInView(),t)},selectRange:function(e){var n,i,o,r=this;return e===t?r._range:(r._range=e,e.start&&(o=r._visibleRange(),n=r._dateInViews(e.start),i=e.end&&r._dateInViews(e.end),!n&&i&&r.rangeSelectable.selectTo(r._cellByDate(e.end)),n&&i&&r.rangeSelectable.range(r._cellByDate(e.start),r._cellByDate(e.end)),e.end&&n&&!i&&r.rangeSelectable.selectFrom(r._cellByDate(e.start)),!e.end&&n&&r.rangeSelectable.start(r._cellByDate(e.start)),+o.start>+e.start&&+o.end<+e.end&&r.rangeSelectable.mid(r.element.find(q))),t)}});a.ui.plugin(ae)}(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 a(e,t,n){var i=document.createElement(n||"div");return t&&(i.className=t),e.appendChild(i),i}function s(){var t,n=e('');return n.css({position:"absolute",left:"-200000px",visibility:"hidden"}),n.appendTo(document.body),t=parseFloat(b.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 d(e,t){var n=(e.listScreens-1-e.threshold)*t,i=e.threshold*t;return function(e,t,o){return t>o?t-e.topi}}function c(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){b.support.browser.msie&&b.support.browser.version<10?e.style.top=t+"px":(e.style.webkitTransform="translateY("+t+"px)",e.style.transform="translateY("+t+"px)")}function p(t,n){return function(i,o){for(var r=0,a=i.length;r0?(n=e.splice(0,t),e.push.apply(e,n)):(n=e.splice(t,-t),e.unshift.apply(e,n)),n}function g(n,i,o){var r=o.template;n=e(n),i.item||(r=o.placeholderTemplate),0===i.index&&this.header&&i.group&&this.header.html(o.fixedGroupTemplate(i.group)),this.angular("cleanup",function(){return{elements:[n]}}),n.attr("data-uid",i.item?i.item.uid:"").attr("data-offset-index",i.index),n.html(this.options.columns&&this.options.columns.length&&i.item?m(this.options,i.item,o):r(i.item||{})),n.toggleClass(z,i.current),n.toggleClass(P,i.selected),n.toggleClass("k-first",i.newGroup),n.toggleClass("k-last",i.isLastGroupedItem),n.toggleClass("k-loading-item",!i.item),0!==i.index&&i.newGroup&&e("").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 m(e,t,n){var i,o,r,a,s="";for(i=0;i",s+=n["column"+i](t),s+="";return s}function v(e,t){var n,i,o,r,a=t.length,s=e.length,l=[],d=[];if(s)for(o=0;o").parent(),o.wrapper=o.content.wrap("").parent(),o.header=o.content.before("").prev(),n.columns&&n.columns.length&&o.element.removeClass(A),o.element.on("mouseenter"+U,"li:not(.k-loading-item)",function(){e(this).addClass(B)}).on("mouseleave"+U,"li",function(){e(this).removeClass(B)}),o._values=i(o.options.value),o._selectedDataItems=[],o._selectedIndexes=[],o._rangesList={},o._promisesList=[],o._optionID=b.guid(),o._templates(),o.setDataSource(n.dataSource),o.content.on("scroll"+U,b.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:"#:data#",mapValueTo:"index",valueMapper:null},events:[L,H,N,O,V,W],setOptions:function(e){k.fn.setOptions.call(this,e),this._selectProxy&&this.options.selectable===!1?this.element.off(H,"."+E,this._selectProxy):!this._selectProxy&&this.options.selectable&&this._selectable(),this._templates(),this.refresh()},items:function(){return e(this._items)},destroy:function(){this.wrapper.off(U),this.dataSource.unbind(L,this._refreshHandler),k.fn.destroy.call(this)},setDataSource:function(t){var n,i=this,o=t||{};o=e.isArray(o)?{data:o}:o,o=b.data.DataSource.create(o),i.dataSource?(i.dataSource.unbind(L,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(L,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(N))},_getValues:function(t){var n=this._valueGetter;return e.map(t,function(e){return n(e)})},_highlightSelectedItems:function(){var e,t;for(e=0;e0?(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)&&ti&&(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,a=r+o,s=n+i;return t=r===n-o||a>n&&r=n&&r<=n+(i-o)?"inScreen":"outScreen"},_templates:function(){var e,t,n,i,o=this.options,r={template:o.template,placeholderTemplate:o.placeholderTemplate,groupTemplate:o.groupTemplate,fixedGroupTemplate:o.fixedGroupTemplate};if(o.columns)for(e=0;e0;)n=document.createElement("li"),n.tabIndex=-1,n.className=E+" "+M,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;to.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(c(n,t._onScroll),u(t._reorderList(t._items,e.proxy(g,t)))),t._renderItems(),t._calculateGroupPadding(t._screenHeight),t._calculateColumnsHeaderPadding()},_setHeight:function(e){var t,n,i=this.heightContainer;if(i?t=i.offsetHeight:i=this.heightContainer=a(this.content[0],F),e!==t)for(i.innerHTML="";e>0;)n=Math.min(e,25e4),a(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?(l=t,d=e):(l=f(t,c),d=c>0?e.slice(-c):e.slice(0,-c)),n(l,d,i.bound()),r=a}},_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(H+U,"."+E,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-1&&(l.push(this.removeAt(o)),e(a[i]).removeClass("k-state-selected"))}return l},_getSkip:function(e,t){var n=e=r.minLength)&&(o._open=!0,o._mute(function(){this.listView.value([])}),o._filterSource({value:a?d?t.toLocaleLowerCase(d):t.toLowerCase():t,operator:r.filter,field:r.dataTextField,ignoreCase:a}),o.one("close",e.proxy(o._unifySeparators,o))),o._toggleCloseVisibility()},suggest:function(e){var i,o=this,r=o._last,a=o._accessor(),d=o.element[0],c=s(d)[0],p=o._separator(),f=a.split(p),g=n(c,a,p),m=c,v=o.dataSource.options.accentFoldingFiltering;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):""),c<=0&&(c=(v?a.toLocaleLowerCase(v):a.toLowerCase()).indexOf(v?e.toLocaleLowerCase(v):e.toLowerCase())+1),i=a.substring(0,c).lastIndexOf(p),i=i>-1?c-(i+p.length):c,a=f[g].substring(0,i),e&&(e=""+e,i=(v?e.toLocaleLowerCase(v):e.toLowerCase()).indexOf(v?a.toLocaleLowerCase(v):a.toLowerCase()),i>-1&&(e=e.substring(i+a.length),m=c+e.length,a+=e),p&&""!==f[f.length-1]&&f.push("")),f[g]=a,o._accessor(f.join(p||"")),d===l()&&s(d,c,m),t)},value:function(e){return e===t?this._accessor():(this.listView.value(e),this._accessor(e),this._old=this._accessor(),this._oldText=this._accessor(),this._toggleCloseVisibility(),t)},_click:function(e){var 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(),s(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(),a=r.length,s=n.dataSource._group.length,d=n.element[0]===l();n._renderFooter(),n._renderNoData(),n._toggleNoData(!a),n._toggleHeader(!!s&&!!a),n._resizePopup(),i.position(),a&&o.suggest&&d&&n.suggest(r[0]),n._open&&(n._open=!1,e=n._allowOpening()?"open":"close",n._typingTimeout&&!d&&(e="close"),a&&(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(s(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},_preselect:function(e,t){this._inputValue(t),this._accessor(e),this._old=this.oldText=this._accessor(),this.listView.setValue(e),this._placeholder()},_change:function(){var e=this,t=e._unifySeparators().value(),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(m),n&&e.trigger(m),e.typing=!1,e._toggleCloseVisibility()},_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,a=i.popup.visible(),s=r.focus();if(i._last=o,o===h.DOWN)a?this._move(s?"focusNext":"focusFirst"):i.value()&&i._filterSource({value:i.ignoreCase?i.value().toLowerCase():i.value(),operator:i.options.filter,field:i.options.dataTextField,ignoreCase:i.ignoreCase}).done(function(){i._allowOpening()&&(i._resetFocusItem(),i.popup.open())}),e.preventDefault();else if(o===h.UP)a&&this._move(s?"focusPrev":"focusLast"),e.preventDefault();else if(o===h.HOME)this._move("focusFirst");else if(o===h.END)this._move("focusLast");else if(o===h.ENTER||o===h.TAB){if(o===h.ENTER&&a&&e.preventDefault(),a&&s){if(t=r.dataItemByIndex(r.getElementIndex(s)),i.trigger("select",{dataItem:t,item:s}))return;this._select(s)}this._blur()}else o===h.ESC?(a?e.preventDefault():i._clearValue(),i.close()):!i.popup.visible()||o!==h.PAGEDOWN&&o!==h.PAGEUP?(i.popup._hovered=!0,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(!d){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||s(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('').insertAfter(this.element)},_clearButton:function(){u.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.element),this.wrapper.addClass("k-autocomplete-clearable"))},_toggleHover:function(t){e(t.currentTarget).toggleClass(C,"mouseenter"===t.type)},_toggleCloseVisibility:function(){this.value()?this._showClear():this._hideClear()},_wrapper:function(){var t,n=this,i=n.element,o=i[0];t=i.parent(),t.is("span.k-widget")||(t=i.wrap("").parent()),t.attr("tabindex",-1),t.attr("role","presentation"),t[0].style.cssText=o.style.cssText,i.css({width:"",height:o.style.height}),n._focused=n.element,n.wrapper=t.addClass("k-widget k-autocomplete").addClass(o.className),n._inputWrapper=e(t[0])},_clearValue:function(){u.fn._clearValue.call(this),this.element.focus()}});c.plugin(A)}(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","kendo.virtuallist.min"],e)}(function(){return function(e,t){function n(e,t,n){for(var i,o=0,r=t.length-1;o=t&&(e-=t),e}function o(e,t){for(var n=0;n0;e.popup.visible()||(e.listView.bound()&&e._state!==T?e._allowOpening()&&(e._focusFilter=!0,e.popup.one("activate",e._focusInputHandler),e.popup._hovered=!0,e.popup.open(),e._resizeFilterInput(),e._focusItem()):(e._open=!0,e._state="rebind",e.filterInput&&(e.filterInput.val(""),e._prev=""),e.filterInput&&1!==e.options.minLength&&!t?(e.refresh(),e.popup.one("activate",e._focusInputHandler),e.popup.open(),e._resizeFilterInput()):e._filterSource()))},_focusInput:function(){this._focusElement(this.filterInput)},_resizeFilterInput:function(){var e,t,n=this.filterInput,i=this._prevent;n&&(e=this.filterInput[0]===c(),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(v,n._valueSetter),n._valueSetter=A(function(){n.value(e)},n),o.one(v,n._valueSetter),t):(n._isFilterEnabled()&&i.bound()&&i.isFiltered()?n._clearFilter():n._fetchData(),i.value(e).done(function(){n._old=n._valueBeforeCascade=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,a=i.optionLabelTemplate;return o?(a||(a="#:",a+="string"==typeof o?"data":r.expr(i.dataTextField,"data"),a+="#"),"function"!=typeof a&&(a=r.template(a)),n.optionLabelTemplate=a,n.hasOptionLabel()||(n.optionLabel=e('').prependTo(n.list)),n.optionLabel.html(a(o)).off().on(y,A(n._click,n)).on(x,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 n=this,i=n.options.optionLabel;return n.hasOptionLabel()?e.isPlainObject(i)?new u(i):n._assignInstance(n._optionLabelText(),""):t},_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=''+r._text(i)+""),r._options(e,i,n),n!==s.unifyType(r._accessor(),typeof n)&&(r._customOption=null,r._custom(n)))},_listBound:function(){var e,t=this,n=t._initialIndex,i=t._state===S,o=t.dataSource.flatView();t._presetValue=!1,t._renderFooter(),t._renderNoData(),t._toggleNoData(!o.length),t._resizePopup(!0),t.popup.position(),t._buildOptions(o),t._makeUnselectable(),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()},_attachFocusHandlers:function(){var e=this,t=e.wrapper;t.on("focusin"+f,A(e._focusinHandler,e)).on("focusout"+f,A(e._focusoutHandler,e)),e.filterInput&&e.filterInput.on("focusin"+f,A(e._focusinHandler,e)).on("focusout"+f,A(e._focusoutHandler,e))},_focusHandler:function(){this.wrapper.focus()},_focusinHandler:function(){this._inputWrapper.addClass(_),this._prevent=!1},_focusoutHandler:function(){var e=this,t=window.self!==window.top;e._prevent||(clearTimeout(e._typingTimeout),d.mobileOS.ios&&t?e._change():e._blur(),e._inputWrapper.removeClass(_),e._prevent=!0,e._open=!1,e.element.blur())},_wrapperMousedown:function(){this._prevent=!!this.filterInput},_wrapperClick:function(e){e.preventDefault(),this.popup.unbind("activate",this._focusInputHandler),this._focused=this.wrapper,this._prevent=!1,this._toggle()},_editable:function(e){var t=this,n=t.element,i=e.disable,o=e.readonly,a=t.wrapper.add(t.filterInput).off(p),s=t._inputWrapper.off(x);o||i?i?(a.removeAttr(C),s.addClass(w).removeClass(b)):s.addClass(b).removeClass(w):(n.removeAttr(g).removeAttr(m),s.addClass(b).removeClass(w).on(x,t._toggleHover),a.attr(C,a.data(C)).attr(k,!1).on("keydown"+p,A(t._keydown,t)).on(r.support.mousedown+p,A(t._wrapperMousedown,t)).on("paste"+p,A(t._filterPaste,t)),t.wrapper.on("click"+p,A(t._wrapperClick,t)),t.filterInput?a.on("input"+p,A(t._search,t)):a.on("keypress"+p,A(t._keypress,t))),n.attr(g,i).attr(m,o),a.attr(k,i)},_keydown:function(e){var n,i,o,r=this,a=e.keyCode,s=e.altKey,l=r.popup.visible();if(r.filterInput&&(n=r.filterInput[0]===c()),a===h.LEFT?(a=h.UP,i=!0):a===h.RIGHT&&(a=h.DOWN,i=!0),!i||!n){if(e.keyCode=a,(s&&a===h.UP||a===h.ESC)&&r._focusElement(r.wrapper),r._state===S&&a===h.ESC&&(r._clearFilter(),r._open=!1,r._state=T),a===h.ENTER&&r._typingTimeout&&r.filterInput&&l)return e.preventDefault(),t;if(a!==h.SPACEBAR||n||(r.toggle(!l),e.preventDefault()),i=r._move(e),!i){if((!l||!r.filterInput)&&(o=r._focus(),a===h.HOME?(i=!0,r._firstItem()):a===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()}),e.preventDefault()}s||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,a=r.dataSource.flatView(),s=a.length+(r.hasOptionLabel()?1:0),l=o(r._word,r._last),d=r.selectedIndex;for(d===-1?d=0:(d+=l?1:0,d=i(d,s)),a=a.toJSON?a.toJSON():a.slice(),a=r._shuffleData(a,d),n=0;n-1&&(t-=1):a.hasClass("k-list-optionlabel")&&(t=-1)),r){for(n=this.dataSource.flatView(),o=0;o',this.filterInput=e('').attr({placeholder:this.element.attr("placeholder"),title:this.element.attr("title"),role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),this.list.prepend(e('').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('').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("").parent(),e[0].style.cssText=i.style.cssText,e[0].title=i.title),t._focused=t.wrapper=e.addClass("k-widget k-dropdown").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(D)}},_textAccessor:function(n){var i,o=null,r=this.valueTemplate,a=this._optionLabelText(),s=this.span;if(n===t)return s.text();e.isPlainObject(n)||n instanceof u?o=n:a&&a===n&&(o=this.options.optionLabel),o||(o=this._assignInstance(n,this._accessor())),this.hasOptionLabel()&&(o!==a&&this._text(o)!==a||(r=this.optionLabelTemplate,"string"!=typeof this.options.optionLabel||this.options.optionLabelTemplate||(o=a))),i=function(){return{elements:s.get(),data:[{dataItem:o}]}},this.angular("cleanup",i);try{s.html(r(o))}catch(l){s.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}});a.plugin(I)}(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,a="visibility",s="k-state-hover",l="input,a:not(.k-in),textarea,.k-multiselect-wrap,select,button,a.k-button>.k-icon,button.k-button>.k-icon,span.k-icon.k-i-arrow-60-right,span.k-icon.k-i-arrow-45-down-right";i.HierarchicalDragAndDrop=n.Class.extend({init:function(t,a){this.element=t,this.hovered=t,this.options=r({dragstart:e.noop,drag:e.noop,drop:e.noop,dragend:e.noop},a),this._draggable=new i.Draggable(t,{ignore:l,filter:a.filter,autoScroll:a.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:a.$angular})},_hint:function(e){return""+this.options.hintText(e)+""},_removeTouchHover:function(){n.support.touch&&this.hovered&&(this.hovered.find("."+s).removeClass(s),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("").css(a,"hidden").appendTo(this.element):e()},drag:function(t){var i,o,r,l,d,c,u,h,p,f,g,m=this.options,v=this.source,_=this.dropTarget=e(n.eventTarget(t)),b=_.closest(m.allowedContainers);b.length?v[0]==_[0]||m.contains(v[0],_[0])?g="k-i-cancel":(g="k-i-insert-middle",p=m.itemFromTarget(_),i=p.item,i.length?(this._removeTouchHover(),o=n._outerHeight(i),l=p.content,m.reorderable?(d=o/(l.length>0?4:2),r=n.getOffset(i).top,c=t.y.location").prependTo(t)),!o.length&&i.length?o=e("").prependTo(n):i.length&&i.children().length||(o.remove(),i.remove()),r.length&&e("").appendTo(n).append(r),s.length||(s=t.children("a").eq(0).addClass("k-in k-link"),s.length||(s=e("")),s.appendTo(n),n.length&&a(n[0].nextSibling,s[0])))}var l,d,c,u,h,p=window.kendo,f=p.ui,g=p.data,m=e.extend,v=p.template,_=e.isArray,b=f.Widget,w=g.HierarchicalDataSource,k=e.proxy,y=p.keys,x=".kendoTreeView",C=".kendoTreeViewTemp",S="select",T="check",D="navigate",A="expand",I="change",E="error",M="checked",F="indeterminate",R="collapse",P="dragstart",z="drag",B="drop",L="dragend",H="dataBound",N="click",O="undefined",V="k-state-hover",W="k-treeview",U=":visible",j=".k-item",q="string",G="aria-checked",$="aria-selected",Y="aria-disabled",K="k-state-disabled",Q={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},X=function(e){return e instanceof p.jQuery||window.jQuery&&e instanceof window.jQuery},J=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&typeof e.nodeName===q};d=n(".k-group"),c=n(".k-group,.k-content"),u=function(e){return e.children("div").children(".k-icon")},h=/k-sprite/,l=p.ui.DataBoundWidget.extend({init:function(e,t){var n,i=this,o=!1,r=t&&!!t.dataSource;_(t)&&(t={
dataSource:t}),t&&typeof t.loadOnDemand==O&&_(t.dataSource)&&(t.loadOnDemand=!1),b.prototype.init.call(i,e,t),e=i.element,t=i.options,i._dataSourceUids={},n=e.is("ul")&&e||e.hasClass(W)&&e.children("ul"),o=!r&&n.length,o&&(t.dataSource.list=n),i._animation(),i._accessors(),i._templates(),e.hasClass(W)?(i.wrapper=e,i.root=e.children("ul").eq(0)):(i._wrapper(),n&&(i.root=e,i._group(i.wrapper))),i._tabindex(),i.wrapper.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=p.format("{0}_tv_active",i.element[0].id)),p.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(V)}).on("mouseleave"+x,n,function(){e(this).removeClass(V)}).on(N+x,n,k(t._click,t)).on("dblclick"+x,".k-in:not(.k-state-disabled)",k(t._toggleButtonClick,t)).on(N+x,".k-i-expand,.k-i-collapse",k(t._toggleButtonClick,t)).on("keydown"+x,k(t._keydown,t)).on("keypress"+x,k(t._keypress,t)).on("focus"+x,k(t._focus,t)).on("blur"+x,k(t._blur,t)).on("mousedown"+x,".k-in,.k-checkbox-wrapper :checkbox,.k-i-expand,.k-i-collapse",k(t._mousedown,t)).on("change"+x,".k-checkbox-wrapper :checkbox",k(t._checkboxChange,t)).on("click"+x,".checkbox-span",k(t._checkboxLabelClick,t)).on("click"+x,".k-request-retry",k(t._retryRequest,t)).on("click"+x,".k-link.k-state-disabled",function(e){e.preventDefault()}).on("click"+x,function(n){var i=e(n.target);i.is(":kendoFocusable")||i.find("input,select,textarea,button,object").is(":kendoFocusable")||t.focus()})},_checkboxLabelClick:function(t){var n=e(t.target.previousSibling);n.is("[disabled]")||(n.prop("checked",!n.prop("checked")),n.trigger("change"))},_syncHtmlAndDataSource:function(e,t){e=e||this.root,t=t||this.dataSource;var n,i,r,a,s,l=t.view(),d=p.attr("uid"),c=p.attr("expanded"),u=this.options.checkboxes,h=e.children("li");for(n=0;n0?"after":"before"},dragstart:function(e){return t.trigger(P,{sourceNode:e[0]})},drag:function(e){t.trigger(z,{originalEvent:e.originalEvent,sourceNode:e.source[0],dropTarget:e.target[0],pageY:e.pageY,pageX:e.pageX,statusClass:e.status,setStatusClass:e.setStatus})},drop:function(n){var i=e(n.dropTarget),o=i.closest("a");return o&&o.attr("href")&&t._tempPreventNavigation(o),t.trigger(B,{originalEvent:n.originalEvent,sourceNode:n.source,destinationNode:n.destination,valid:n.valid,setValid:function(e){this.valid=e,n.setValid(e)},dropTarget:n.dropTarget,dropPosition:n.position})},dragend:function(e){function n(n){t.options.checkboxes&&t.options.checkboxes.checkChildren&&t.updateIndeterminate(),t.trigger(L,{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)},_tempPreventNavigation:function(e){e.on(N+x+C,function(t){t.preventDefault(),e.off(N+x+C)})},_hintText:function(e){return this.templates.dragClue({item:this.dataItem(e),treeview:this.options})},_templates:function(){var e=this,t=e.options,n=k(e._fieldAccessor,e);t.template&&typeof t.template==q?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={setAttributes:function(e){var t,n="",i=e.attr||{};for(t in i)i.hasOwnProperty(t)&&"class"!==t&&(n+=t+'="'+i[t]+'" ');return n},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("#= data.renderItems(data) #"),itemContent:i("# var imageUrl = "+n("imageUrl")+"(data.item); ## var spriteCssClass = "+n("spriteCssClass")+"(data.item); ## if (imageUrl) { ## } ## if (spriteCssClass) { ## } ##= data.treeview.template(data) #"),itemElement:i("# var item = data.item, r = data.r; ## var url = "+n("url")+"(item); ## if (item.hasChildren) { ## } ## if (data.treeview.checkboxes) { ##= data.treeview.checkboxes.template(data) ## } ## var tag = url ? 'a' : 'span'; ## var textAttr = url ? ' href=\\'' + url + '\\'' : ''; #<#=tag# class='#= r.textClass(item, !!url) #'#= textAttr #>#= r.itemContent(data) ##=tag#>"),item:i("# var item = data.item, r = data.r; ##= r.itemElement(data) #'),loading:i(" #: data.messages.loading #"),retry:i("#: data.messages.requestFailed # #: data.messages.retry #")}},items:function(){return this.element.find(".k-item > div:first-child")},setDataSource:function(t){var n=this.options;n.dataSource=t,this._dataSourceUids={},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=k(this.refresh,this),this._errorHandler=k(this._error,this),this.dataSource.bind(I,this._refreshHandler),this.dataSource.bind(E,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(I,this._refreshHandler),e.unbind(E,this._errorHandler))},_dataSource:function(e){function t(e){for(var n=0;n1){for(i=1;in.clientHeight&&(i.push(n),o.push(n.scrollTop));while(n!=r);for(p.focusElement(t),e=0;et&&e(o).is(":visible")&&0===e(o).text().toLowerCase().indexOf(n)});return o.eq(0).closest(j)},_click:function(t){var n,i=this,o=e(t.currentTarget),r=c(o.closest(j)),a=o.attr("href");n=a?"#"==a||a.indexOf("#"+this.element.id+"-")>=0:r.length&&!r.children().length,n&&t.preventDefault(),o.hasClass(".k-state-selected")||i._trigger(S,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("").parent(),t=i):(e=i,t=e.children("ul").eq(0)),n.wrapper=e.addClass(o),n.root=t},_getSelectedNode:function(){return this.element.find(".k-state-selected").closest(j)},_group:function(e){var t=this,n=e.hasClass(W),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=m({length:r.length},n),r.each(function(t,r){r=e(r),i={index:t,expanded:o._expanded(r)},s(r),o._updateNodeClasses(r,n,i),o._group(r)})},_checkboxes:function(){var e,t=this.options,n=t.checkboxes;n&&(e="",n=m({template:e},t.checkboxes),typeof n.template==q&&(n.template=v(n.template)),t.checkboxes=n)},_updateNodeClasses:function(e,t,n){var i,o,r=e.children("div"),a=e.children("ul"),s=this.templates;e.hasClass("k-treeview")||(n=n||{},n.expanded=typeof n.expanded!=O?n.expanded:this._expanded(e),n.index=typeof n.index!=O?n.index:e.index(),n.enabled=typeof n.enabled!=O?n.enabled:!r.children(".k-in").hasClass("k-state-disabled"),t=t||{},t.firstLevel=typeof t.firstLevel!=O?t.firstLevel:e.parent().parent().hasClass(W),t.length=typeof t.length!=O?t.length:e.parent().children().length,e.removeClass("k-first k-last").addClass(s.wrapperCssClass(t,n)),r.removeClass("k-top k-mid k-bot").addClass(s.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(s.textClass(n,o)),(a.length||"true"==e.attr("data-hasChildren"))&&(r.children(".k-icon").removeClass("k-i-expand k-i-collapse").addClass(s.toggleButtonClass(n)),a.addClass("k-group")))},_processNodes:function(t,n){var i,o=this,r=o.element.find(t);for(i=0;i=s.length?t.appendTo(n):t.insertBefore(s.eq(e))},l),l||(this._updateNodeClasses(n,{},{expanded:!l}),d(n).css("display","block"))},_refreshChildren:function(e,t,n){var i,o,r,a=this.options,l=a.loadOnDemand,c=a.checkboxes&&a.checkboxes.checkChildren;if(d(e).empty(),t.length)for(this._appendItems(n,t,e),o=d(e).children(),l&&c&&this._bubbleIndeterminate(o.last()),i=0;i0&&n&&n.length?(o&&(o[0].id===a&&o.removeAttr("id"),o.find(".k-in:first").removeClass("k-state-focused")),o=i._current=e(n,r).closest(j),o.find(".k-in:first").addClass("k-state-focused"),a=o[0].id||a,a&&(i.wrapper.removeAttr("aria-activedescendant"),o.attr("id",a),i.wrapper.attr("aria-activedescendant",a)),t):(o||(o=i._nextVisible(e())),o)},select:function(n){var i=this,o=i.element;return arguments.length?(n=e(n,o).closest(j),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(I),t):o.find(".k-state-selected").closest(j)},_toggle:function(e,t,n){var i,o=this.options,r=c(e),a=n?"expand":"collapse";r.data("animating")||(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(m({reset:!0},o.animation[a],{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.wrapper.find(".k-checkbox-wrapper :checkbox").off(x),e._unbindDataSource(),e.dragging&&e.dragging.destroy(),e._dataSourceUids={},p.destroy(e.element),e.root=e.wrapper=e.element=null},_expanded:function(e,n,i){var o,r=p.attr("expanded"),a=n,s=a?"expand":"collapse";return 1==arguments.length?(o=this._dataItem(e),"true"===e.attr(r)||o&&o.expanded):(o=this.dataItem(e),c(e).data("animating")||!i&&this._trigger(s,e)||(a?(e.attr(r,"true"),e.attr("aria-expanded","true")):(e.removeAttr(r),e.attr("aria-expanded","false")),o&&(o.set("expanded",a),a=o.expanded)),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[Q.text],r=i.level(),a=o.length,s=o[Math.min(r,a-1)];return n?(i.set(s,n),t):i[s]},_objectOrSelf:function(t){return e(t).closest("[data-role=treeview]").data("kendoTreeView")||this},_dataSourceMove:function(t,n,i,o){var r,a=this._objectOrSelf(i||n),s=a.dataSource,l=e.Deferred().resolve().promise();return i&&i[0]!=a.element[0]&&(r=a.dataItem(i),r.loaded()||(a._progress(i,!0),l=r.load()),i!=this.root&&(s=r.children,s&&s instanceof w||(r._initChildren(),r.loaded(!0),s=r.children))),t=this._toObservableData(t),o.call(a,s,t,l)},_toObservableData:function(t){var n,i,o=t;return(X(t)||J(t))&&(n=this._objectOrSelf(t).dataSource,i=e(t).attr(p.attr("uid")),o=n.getByUid(i),o&&(o=n.remove(o))),o},_insert:function(e,t,n){t instanceof p.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;if(!(n&&t instanceof jQuery&&n[0]===t[0]))return n=n&&n.length?n:null,n&&(o=d(n)),this._dataSourceMove(t,o,n,function(t,o,r){function a(){n&&l._expanded(n,!0,!0);var e=t.data(),i=Math.max(e.length,0);return l._insert(e,o,i)}var s,l=this;return r.done(function(){s=a(),(i=i||e.noop)(s)}),s||null})},_remove:function(t,n){var i,o,r,a=this;return t=e(t,a.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")&&(s(i),a._updateNodeClasses(i)),a._updateNodeClasses(o),a._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(j)},findByUid:function(t){var n,i,o=this.element.find(".k-item"),r=p.attr("uid");for(i=0;i").attr({tabIndex:-1,"aria-hidden":!0}),this.list=e("").append(this.tree),this._header(),this._noData(),this._footer(),this._reset(),this._popup(),this.popup.one("open",P(this._popupOpen,this)),this._clearButton(),this._filterHeader(),this._treeview(),this._renderFooter(),this._checkAll(),this._enable(),this._toggleCloseVisibility(),this.options.autoBind||(o=n.text||"",this._isNullorUndefined(n.value)?o?this._textAccessor(o):n.placeholder&&this._placeholder(!0):this._preselect(n.value)),a=e(this.element).parents("fieldset").is(":disabled"),a&&this.enable(!1),this._valueMethodCalled=!1,r.notify(this)},_preselect:function(e,t){this._selection._preselect(e,t)},_setTreeViewOptions:function(t){var n={autoBind:t.autoBind,checkboxes:t.checkboxes,dataImageUrlField:t.dataImageUrlField,dataSpriteCssClassField:t.dataSpriteCssClassField,dataTextField:t.dataTextField,dataUrlField:t.dataUrlField,loadOnDemand:t.loadOnDemand};this.options.treeview=e.extend({},n,this.options.treeview),t.template&&(this.options.treeview.template=t.template)},_dataSource:function(){var t=this.options.dataSource;this.dataSource=r.data.HierarchicalDataSource.create(t),t&&e.extend(this.options.treeview,{dataSource:this.dataSource})},_popupOpen:function(){var e=this.popup;e.wrapper=r.wrap(e.element)},_getSelection:function(){return this._isMultipleSelection()?new a.DropDownTree.MultipleSelection(this):new a.DropDownTree.SingleSelection(this)},setDataSource:function(e){this._isDataSourceSet=!0,this._tags&&(this._noInitialValue=!0,this.setValue([]),this._tags.empty(),this.span.show(),this._multipleTags.empty()),this.dataSource=e,this.treeview.setDataSource(e),this._isDataSourceSet=!1},_isMultipleSelection:function(){return this.options&&(this.options.treeview.checkboxes||this.options.checkboxes)},options:{name:"DropDownTree",animation:{},autoBind:!0,autoClose:!0,autoWidth:!1,clearButton:!0,dataTextField:"",dataValueField:"",dataImageUrlField:"",dataSpriteCssClassField:"",dataUrlField:"",delay:500,enabled:!0,enforceMinLength:!1,filter:"none",height:200,ignoreCase:!0,index:0,loadOnDemand:!1,messages:{singleTag:"item(s) selected",clear:"clear",deleteTag:"delete",noData:"No data found."},minLength:1,checkboxes:!1,noDataTemplate:!0,placeholder:"",checkAll:!1,checkAllTemplate:"Check all",tagMode:"multiple",template:null,text:null,treeview:{},valuePrimitive:!1,footerTemplate:"",headerTemplate:"",value:null,valueTemplate:null,popup:null},events:["open","close","dataBound",F,"select","filtering"],focus:function(){this.wrapper.focus()},dataItem:function(e){return this.treeview.dataItem(e)},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this._toggleCloseVisibility()},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this._toggleCloseVisibility()},toggle:function(e){this._toggle(e)},open:function(){var e=this.popup;this.options.autoBind||this.dataSource.data().length||(this.treeview._progress(!0),this._isFilterEnabled()?this._search():this.dataSource.fetch()),!e.visible()&&this._allowOpening()&&(this._isMultipleSelection()&&e.element.addClass("k-multiple-selection"),e.element.addClass("k-popup-dropdowntree"),e.one("activate",this._focusInputHandler),e._hovered=!0,e.open())},close:function(){this.popup.close()},search:function(t){var n,i=this.options;if(clearTimeout(this._typingTimeout),!i.enforceMinLength&&!t.length||t.length>=i.minLength){if(n=this._getFilter(t),this.trigger("filtering",{filter:n})||e.isArray(this.options.dataTextField))return;this._filtering=!0,this.treeview.dataSource.filter(n)}},_getFilter:function(e){return{field:this.options.dataTextField,operator:this.options.filter,value:e,ignoreCase:this.options.ignoreCase}},refresh:function(){var t=this.treeview.dataSource.flatView();this._renderFooter(),this._renderNoData(),this.filterInput&&this.checkAll&&this.checkAll.toggle(!this.filterInput.val().length),this.tree.toggle(!!t.length),e(this.noData).toggle(!t.length)},setOptions:function(e){s.fn.setOptions.call(this,e),this._setTreeViewOptions(e),this._dataSource(),this.options.treeview&&this.treeview.setOptions(this.options.treeview),e.height&&this.tree&&this.tree.css("max-height",e.height),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData(),this.span&&(this._isMultipleSelection()||this.span.hasClass("k-readonly"))&&this._placeholder(!0),this._inputTemplate(),this._accessors(),this._filterHeader(),this._checkAll(),this._enable(),e&&(e.enable||e.enabled)&&this.enable(!0),this._clearButton()},destroy:function(){r.ui.Widget.fn.destroy.call(this),this.treeview&&this.treeview.destroy(),this.popup.destroy(),this.wrapper.off(p),this._clear.off(p),this._inputWrapper.off(p),this.filterInput&&this.filterInput.off(p),this.tagList&&this.tagList.off(p),r.unbind(this.tagList),this.options.checkAll&&this.checkAll&&this.checkAll.off(p),this._form&&this._form.off("reset",this._resetHandler)},setValue:function(t){t=e.isArray(t)||t instanceof d?t.slice(0):[t],this._values=t},items:function(){return this.treeview.items()},value:function(e){var n=this;if(e)if(n.filterInput&&n.dataSource._filter)n._filtering=!0,n.dataSource.filter({});else if(!n.dataSource.data().length||!n.treeview.dataSource.data().length)return n.dataSource.fetch(function(){n.options.loadOnDemand?n._selection._setValue(e):n.one("allNodesAreLoaded",function(){n._selection._setValue(e)})}),t;return n._selection._setValue(e)},text:function(e){var n,i=this.options.ignoreCase;return e=null===e?"":e,e===t||this._isMultipleSelection()?this._textAccessor():"string"!=typeof e?(this._textAccessor(e),t):(n=i?e:e.toLowerCase(),this._selectItemByText(n),this._textAccessor(n),t)},_header:function(){var n,i=this,o=e(i.header),a=i.options.headerTemplate;return this._angularElement(o,"cleanup"),r.destroy(o),o.remove(),a?(n="function"!=typeof a?r.template(a):a,o=e(n({})),i.header=o[0]?o:null,i.list.prepend(o),this._angularElement(i.header,"compile"),t):(i.header=null,t)},_noData:function(){var n=this,i=e(n.noData),o=n.options.noDataTemplate===!0?n.options.messages.noData:n.options.noDataTemplate;return n.angular("cleanup",function(){return{elements:i}}),r.destroy(i),i.remove(),o?(n.noData=e('').appendTo(n.list),n.noDataTemplate="function"!=typeof o?r.template(o):o,t):(n.noData=null,t)},_renderNoData:function(){var e=this,t=e.noData;t&&(this._angularElement(t,"cleanup"),t.children(":first").html(e.noDataTemplate({instance:e})),this._angularElement(t,"compile"))},_footer:function(){var n=this,i=e(n.footer),o=n.options.footerTemplate;return this._angularElement(i,"cleanup"),r.destroy(i),i.remove(),o?(n.footer=e('').appendTo(n.list),n.footerTemplate="function"!=typeof o?r.template(o):o,t):(n.footer=null,t)},_renderFooter:function(){var e=this,t=e.footer;t&&(this._angularElement(t,"cleanup"),t.html(e.footerTemplate({instance:e})),this._angularElement(t,"compile"))},_enable:function(){var e=this,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]"))},_adjustListWidth:function(){var e,t,n=this,i=n.list,o=i[0].style.width,r=n.wrapper;if(i.data(v)||!o)return e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=parseFloat(e&&e.width)||b(r),e&&_.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),o="border-box"!==i.css("box-sizing")?t-(b(i)-i.width()):t,i.css({fontFamily:r.css("font-family"),width:n.options.autoWidth?"auto":o,minWidth:o,whiteSpace:n.options.autoWidth?"nowrap":"normal"}).data(v,o),!0},_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))},_popup:function(){var e=this;e.popup=new a.Popup(e.list,u({},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),autosize:e.options.autoWidth}))},_angularElement:function(e,t){e&&this.angular(t,function(){return{elements:e}})},_allowOpening:function(){return this.options.noDataTemplate||this.treeview.dataSource.flatView().length},_placeholder:function(e){this.span&&this.span.toggleClass("k-readonly",e).text(e?this.options.placeholder:"")},_currentValue:function(e){var t=this._value(e);return t||0===t||(t=e),t},_checkValue:function(n){var i,o,r,a,s="",l=-1,d=this.value(),u="multiple"===this.options.tagMode;if((n||0===n)&&(n.level&&(n._level=n.level()),s=this._currentValue(n),l=d.indexOf(s)),n.checked){if(i=e.grep(this._tags,function(e){return e.uid===n._tagUid}),i.length)return;o=new c(n.toJSON()),n._tagUid=o.uid,this._tags.push(o),1===this._tags.length&&(this.span.hide(),u||this._multipleTags.push(o)),l===-1&&(d.push(s),this.setValue(d))}else{if(r=this._tags.find(function(e){return e.uid===n._tagUid}),a=this._tags.indexOf(r),a===-1)return this._treeViewCheckAllCheck(n),t;this._tags.splice(a,1),0===this._tags.length&&(this.span.show(),u||this._multipleTags.splice(0,1)),l!==-1&&(d.splice(l,1),this.setValue(d))}this._treeViewCheckAllCheck(n),this._preventChangeTrigger||this._valueMethodCalled||this._noInitialValue||this.trigger(F),this.options.autoClose&&this.popup.visible()&&(this.close(),this.wrapper.focus()),this.popup.position(),this._toggleCloseVisibility(),this._updateSelectedOptions()},_updateSelectedOptions:function(){var e,t,n,i,o;if("select"===this.element[0].tagName.toLowerCase()){if(e=this._tags,t="",n=null,i=null,e.length)for(o=0;o",n!==t&&(o+=r.htmlEncode(n)),o+=""},_selectValue:function(e){var t="",n="";(e||0===e)&&(e.level&&(e._level=e.level()),n=this._text(e)||e,t=this._currentValue(e)),null===t&&(t=""),this.setValue(t),this._textAccessor(n,e),this._accessor(t),this._preventChangeTrigger||this._valueMethodCalled||this.trigger(F),this._valueMethodCalled=!1,this.options.autoClose&&this.popup.visible()&&(this.close(),this.wrapper.focus()),this.popup.position(),this._toggleCloseVisibility()},_clearClick:function(e){e.stopPropagation(),this._clearTextAndValue()},_clearTextAndValue:function(){this.setValue([]),this._clearInput(),this._clearText(),this._selection._clearValue(),this.popup.position(),this._toggleCloseVisibility()},_clearText:function(){this.options.placeholder?this._placeholder(!0):this.span&&this.span.html("")},_inputTemplate:function(){var t=this.options.valueTemplate;t=t?r.template(t):e.proxy(r.template("#:this._text(data)#",{useWithBlock:!1}),this),this.valueTemplate=t},_assignInstance:function(e,t){var i=this.options.dataTextField,o={};return i?(n(o,i.split(w),e),n(o,this.options.dataValueField.split(w),t),o=new c(o)):o=e,o},_textAccessor:function(n,i){var o,r=this.valueTemplate,a=this.span;if(n===t)return a.text();a.removeClass("k-readonly"),!i&&(e.isPlainObject(n)||n instanceof c)&&(i=n),i||(i=this._assignInstance(n,this._accessor())),o=function(){return{elements:a.get(),data:[{dataItem:i}]}},this.angular("cleanup",o);try{a.html(r(i))}catch(s){a&&a.html("")}this.angular("compile",o)},_accessors:function(){var t=this.element,n=this.options,i=r.getter,o=t.attr(r.attr("text-field")),a=t.attr(r.attr("value-field")),s=function(t){var n,o;return e.isArray(t)?(n=t.length,o=e.map(t,function(e){return function(t){return t[e]}}),function(e){var t=e._level;if(t||0===t)return o[Math.min(t,n-1)](e)}):i(t)};!n.dataTextField&&o&&(n.dataTextField=o),!n.dataValueField&&a&&(n.dataValueField=a),n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value",this._text=s(n.dataTextField),this._value=s(n.dataValueField)},_accessor:function(e,t){return this._accessorInput(e,t)},_accessorInput:function(e){var n=this.element[0];return e===t?n.value:(null===e&&(e=""),n.value=e,t)},_clearInput:function(){var e=this.element[0];e.value=""},_clearButton:function(){var t=this.options.messages.clear;this._clear||(this._clear=e('').attr({role:"button",tabIndex:-1})),this.options.clearButton?(this._clear.insertAfter(this.span),this.wrapper.addClass("k-dropdowntree-clearable")):this.options.clearButton||this._clear.remove()},_toggleCloseVisibility:function(){var e=this.element.attr(y),t=this.value()&&!this._isMultipleSelection()||this.value().length,n=this.element.val()&&this.element.val()!==this.options.placeholder;e||!t&&!n?this._hideClear():this._showClear()},_showClear:function(){this._clear&&this._clear.removeClass(m)},_hideClear:function(){this._clear&&this._clear.addClass(m)},_openHandler:function(e){this._adjustListWidth(),this.trigger(E)?e.preventDefault():(this.wrapper.attr("aria-expanded",!0),this.tree.attr("aria-hidden",!1).attr("role","tree"))},_closeHandler:function(e){this.trigger(M)?e.preventDefault():(this.wrapper.attr("aria-expanded",!1),this.tree.attr("aria-hidden",!0))},_treeview:function(){var e=this;e.options.height&&e.tree.css("max-height",e.options.height),e.tree.attr("id",r.guid()),e.treeview=new l(e.tree,u({},e.options.treeview),e),e.dataSource=e.treeview.dataSource,e.treeview.bind("select",function(t){e.trigger("select",t)})},_treeViewDataBound:function(e){var n,i,o;return e.node&&this._prev&&this._prev.length&&e.sender.expand(e.node),this._filtering?(e.node||(this._filtering=!1),this._isMultipleSelection()||this._deselectItem(e),t):(this.treeview||(this.treeview=e.sender),e.node?(i=e.sender.dataItem(e.node),i&&(o=i.children.data(),this._checkLoadedItems(o))):(n=e.sender.dataSource.data(),this._checkLoadedItems(n),this._noInitialValue&&(this._noInitialValue=!1)),this.trigger("dataBound",e),t)},_deselectItem:function(e){var t,n,i=[];for(e.node?(t=e.sender.dataItem(e.node),t&&(i=t.children.data())):i=e.sender.dataSource.data(),n=0;n',this.filterInput=e('').attr({placeholder:this.element.attr("placeholder"),title:this.element.attr("title"),role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),this.filterInput.on("input",P(this._filterChange,this)),e('').insertBefore(this.tree).append(this.filterInput.add(t)))},_filterChange:function(){this.filterInput&&this._search()},_disableCheckChildren:function(){this._isMultipleSelection()&&this.options.treeview.checkboxes&&this.options.treeview.checkboxes.checkChildren&&(this.options.treeview.checkboxes.checkChildren=!1)},_checkAll:function(){this.checkAll&&(this.checkAll.find(".k-checkbox-label, .k-checkbox").off(p),this.checkAll.remove(),this.checkAll=null),this._isMultipleSelection()&&this.options.checkAll&&(this.checkAll=e('Check All').insertBefore(this.tree),this.checkAll.find(".k-checkbox-label").html(r.template(this.options.checkAllTemplate)({instance:this})),this.checkAll.find(".k-checkbox-label").on(I+p,P(this._clickCheckAll,this)),this.checkAll.find(".k-checkbox").on("change"+p,P(this._changeCheckAll,this)).on("keydown"+p,P(this._keydownCheckAll,this)),this._disabledCheckedItems=[],this._disabledUnCheckedItems=[],this._getAllChecked(),this._allItemsAreUnchecked||this._checkCheckAll())},_changeCheckAll:function(){var e=this.checkAll.find(".k-checkbox"),t=e.prop("checked");_.msie||_.edge||this._updateCheckAll(t)},_updateCheckAll:function(e){var t=this.checkAll.find(".k-checkbox");this._toggleCheckAllItems(e),t.prop("checked",e),this._disabledCheckedItems.length&&this._disabledUnCheckedItems.length?t.prop("indeterminate",!0):this._disabledCheckedItems.length?t.prop("indeterminate",!e):this._disabledUnCheckedItems.length?t.prop("indeterminate",e):t.prop("indeterminate",!1),this._disabledCheckedItems=[],this._disabledUnCheckedItems=[]},_keydownCheckAll:function(e){var n=e.keyCode,i=e.altKey;return i&&n===f.UP||n===f.ESC?(this.close(),this.wrapper.focus(),e.preventDefault(),t):(n===f.UP&&(this.filterInput?this.filterInput.focus():this.wrapper.focus(),e.preventDefault()),n===f.DOWN&&(this.tree&&this.tree.is(":visible")&&this.tree.focus(),e.preventDefault()),n===f.SPACEBAR&&(_.msie||_.edge)&&(this._clickCheckAll(),e.preventDefault()),t)},_clickCheckAll:function(){var e=this.checkAll.find(".k-checkbox"),t=e.prop("checked");this._updateCheckAll(!t),e.focus()},_dfs:function(e,t,n){for(var i=0;i").parent(),e[0].style.cssText=i.style.cssText,e[0].title=i.title),t._focused=t.wrapper=e.addClass("k-widget k-dropdowntree").addClass(i.className).css("display","").attr({accesskey:n.attr("accesskey"),unselectable:"on",role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),n.hide().removeAttr("accesskey")},_span:function(){var t,n=this._dropdowntree,i=n.wrapper,o="span.k-input";t=i.find(o),t[0]||(i.append('').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")},_setValue:function(e){var n,i=this._dropdowntree;return e===t||null===e?(n=i._values.slice()[0],e="object"==typeof n?n:i._accessor()||n,e===t||null===e?"":e):(i._valueMethodCalled=!0,0===e.length?(i._clearTextAndValue(),i._valueMethodCalled=!1,t):(i._selectItemByValue(e),i._toggleCloseVisibility(),t))},_clearValue:function(){var e=this._dropdowntree,t=e.treeview.select();e.treeview.dataItem(t)&&(e.treeview.dataItem(t).set("selected",!1),e._valueMethodCalled||e.trigger(F))},_checkLoadedItem:function(e,t){var n=this._dropdowntree;n._isNullorUndefined(t)||""===t?!t&&e.selected&&n.treeview.select(n.treeview.findByUid(e.uid)):n._valueComparer(e,t)?(n._preventChangeTrigger=!0,e.set("selected",!0),n._preventChangeTrigger=!1):e.selected&&n.treeview.select(n.treeview.findByUid(e.uid))}}),o=r.Class.extend({init:function(e){this._dropdowntree=e},_initWrapper:function(){var t=this._dropdowntree;this._tagTemplate(),t.element.attr("multiple","multiple").hide(),this._wrapper(),t._tags=new d([]),t._multipleTags=new d([]),this._tagList(),t.span=e('').insertAfter(t.tagList),t._inputWrapper=e(t.wrapper[0].firstChild)},_preselect:function(t,n){var i=this._dropdowntree,o=n||i.options.value;e.isArray(t)||t instanceof r.data.ObservableArray||(t=[t]),(e.isPlainObject(t[0])||t[0]instanceof r.data.ObservableObject||!i.options.dataValueField)&&(i.dataSource.data(t),i.value(o))},_tagTemplate:function(){var e=this._dropdowntree,t=e.options,n=t.valueTemplate,i="multiple"===t.tagMode,o=t.messages.singleTag;n=n?r.template(n):e.valueTemplate,e.valueTemplate=function(t){return i?''+n(t)+'':''+o+""}},_wrapper:function(){var t=this._dropdowntree,n=t.element,i=n.parent("span.k-dropdowntree");i[0]||(i=n.wrap('').parent(),i[0].style.cssText=n[0].style.cssText,i[0].title=n[0].title,e('').insertBefore(n)),t.wrapper=i.addClass(n[0].className).css("display","").attr({role:"listbox","aria-activedescendant":r.guid(),"aria-haspopup":!0,"aria-expanded":!1}),t._innerWrapper=e(i[0].firstChild)},_tagList:function(){var t,n,i,o=this._dropdowntree,a=o._innerWrapper.children("ul");a[0]||(t="multiple"===o.options.tagMode,n=t?"tags":"multipleTag",a=e('').appendTo(o._innerWrapper)),o.tagList=a,o.tagList.attr("id",r.guid()+"_tagList"),o.wrapper.attr("aria-owns",o.tagList.attr("id")),i=r.observable({multipleTag:o._multipleTags,tags:o._tags,tagTemplate:o.valueTemplate}),r.bind(o.tagList,i),o.tagList.attr("data-stop",!0)},_setValue:function(e){var n=this._dropdowntree,i=n._values;return e===t||null===e?n._values.slice():(n.setValue(e),n._valueMethodCalled=!0,e.length?(this._removeValues(i,e),n._checkItemByValue(e)):n._clearTextAndValue(),n._valueMethodCalled=!1,n._toggleCloseVisibility(),t)},_removeValues:function(e,t){var n,i,o=this._dropdowntree,r=this._getNewValues(e,t);for(n=0;n0,i=!e.ul.find(e.listView.focus()).length;e.popup.visible()||(!e.listView.bound()&&t!==C||t===S?(e._open=!0,e._state=T,1!==e.options.minLength&&!n||n&&e.value()&&e.selectedIndex===-1?(e.refresh(),e._openPopup(),this.options.virtual||e.listView.bound(!1)):e._filterSource()):e._allowOpening()&&(e.popup._hovered=!0,e._openPopup(),e.options.virtual?e._focusItem():i&&e.options.highlightFirst&&e.listView.focus(0)))},_scrollToFocusedItem:function(){var e=this.listView;e.scrollToIndex(e.getElementIndex(e.focus()))},_openPopup:function(){this.popup.one("activate",A(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===T&&(i._state=""),i._customOption=t,i._options(e,"",i.value()),n&&n[0].selected&&!i.listView._emptySearch&&i._custom(n.val()))},_updateSelection:function(){var n,i=this,o=i.listView,r=i._initialIndex,a=null!==r&&r>-1,s=i._state===C;return s?(e(o.focus()).removeClass("k-state-selected"),t):(i._fetch||(o.value().length||(a?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._value(n)!==i.element[0].value&&i._accessor(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]===d(),i=e.dataSource.flatView(),o=e.listView.skip(),r=i.length,a=e.dataSource._group?e.dataSource._group.length:0,s=o===t||0===o;e._presetValue=!1,e._renderFooter(),e._renderNoData(),e._toggleNoData(!r),e._toggleHeader(!!a&&!!r),e._resizePopup(),e.popup.position(),e._buildOptions(i),e._makeUnselectable(),e._updateSelection(),i.length&&s&&(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-1&&(s+=e.substring(n+s.length))):s=s.substring(0,l),s.length===l&&e||(r.value=s,r===d()&&a(r,l,s.length)),t)},text:function(e){var n,i,r,a,s,l;return e=null===e?"":e,n=this,i=n.input[0],r=n.options.ignoreCase,a=e,e===t?i.value:n.options.autoBind!==!1||n.listView.bound()?(s=n.dataItem(),s&&n._text(s).replace&&n._text(s).replace(I,"")===e&&(l=n._value(s),l===o.unifyType(n._old,typeof l))?(n._triggerCascade(),t):(r&&(a=a.toLowerCase()),n.dataItem()&&n._text(n.dataItem())===e||(n._select(function(e){return e=n._text(e),r&&(e=(e+"").toLowerCase()),e===a}).done(function(){n.selectedIndex<0&&(i.value=e,n.options.syncValueAndText&&n._accessor(e),n._cascadeTriggered=!0,n._triggerCascade()),n._prev=i.value}),n._toggleCloseVisibility()),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||o._selectedDataItems&&o._selectedDataItems.length||(n._accessor(e),n.input.val(e),n._placeholder(!0)),n._old=n._valueBeforeCascade=n._accessor(),n._oldIndex=n.selectedIndex,n._prev=n.input.val(),n._state===C&&(n._state=S),n._toggleCloseVisibility()})),t)},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(_),e._focused.attr("aria-busy",!1),e._busy=null,e._toggleCloseVisibility()},_click:function(e){var n=this,i=e.item,r=n.listView.dataItemByIndex(n.listView.getElementIndex(i)),a=!0;return e.preventDefault(),r&&(a=n._value(r)!==o.unifyType(n.value(),typeof n._value(r)),a||n.input.val(n._text(r))),a&&n.trigger("select",{dataItem:r,item:i})?(n.close(),t):(n._userTriggered=!0,n._select(i).done(function(){n._blur()}),t)},_syncValueAndText:function(){return this.options.syncValueAndText},_inputValue:function(){return this.text()},_searchByWord:function(e){var n,i=this,o=i.options,r=i.dataSource,a=o.ignoreCase,s=function(n){var o=i._text(n);if(o!==t)return o+="",(""===o||""!==e)&&(a&&(o=o.toLowerCase()),0===o.indexOf(e))};return a&&(e=e.toLowerCase()),i.ul[0].firstChild?(this.listView.focus(this._get(s)),n=this.listView.focus(),n&&(o.suggest&&i.suggest(n),this.open()),this.options.highlightFirst&&!e&&this.listView.focusFirst(),t):(r.one(v,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,a=i.wrapper,s="input.k-input",d=o.name||"";d&&(d='name="'+d+'_input" '),t=a.find(s),t[0]||(a.append('').append(i.element),t=a.find(s)),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:"",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(a[0].firstChild),i._arrow=a.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(){o.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-combobox-clearable"))},_keydown:function(e){var t,n,i,r=this,a=e.keyCode;if(r._last=a,clearTimeout(r._typingTimeout),r._typingTimeout=null,a===c.HOME)r._firstItem();else if(a===c.END)r._lastItem();else if(a===c.ENTER||a===c.TAB&&r.popup.visible())if(t=r.listView.focus(),n=r.dataItem(),i=!0,r.popup.visible()||n&&r.text()===r._text(n)||(t=null),t){if(r.popup.visible()&&e.preventDefault(),n=r.listView.dataItemByIndex(r.listView.getElementIndex(t)),n&&(i=r._value(n)!==o.unifyType(r.value(),typeof r._value(n))),i&&r.trigger("select",{dataItem:n,item:t}))return;r._userTriggered=!0,r._select(t).done(function(){r._blur(),r._valueBeforeCascade=r._old=r.value()})}else(r._syncValueAndText()||r._isSelect)&&r._accessor(r.input.val()),r.listView.value(r.input.val()),r._blur();else a==c.TAB||r._move(e)?a===c.ESC&&!r.popup.visible()&&r.text()&&r._clearValue():r._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]!==d()||a(o[0],0,0)}}},_search:function(){var e=this;clearTimeout(e._typingTimeout),e._typingTimeout=setTimeout(function(){var t=e.text();e._prev!==t&&(e._prev=t,"none"===e.options.filter&&e.options.virtual&&e.listView.select(-1),e.search(t),e._toggleCloseVisibility()),e._typingTimeout=null},e.options.delay)},_setText:function(e){this.input.val(e),this._prev=e},_wrapper:function(){var e=this,t=e.element,n=t.parent();n.is("span.k-widget")||(n=t.hide().wrap("").parent(),n[0].style.cssText=t[0].style.cssText),e.wrapper=n.addClass("k-widget k-combobox").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,this._toggleCloseVisibility()},_clearText:function(){this._old=this.value(),this.text("")},_clearValue:function(){r.fn._clearValue.call(this),this.input.focus()}});i.plugin(E)}(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","kendo.virtuallist.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,a=e.extend({A:65},i.keys),s=i._activeElement,l=i.data.ObservableArray,d=e.proxy,c="id",u="li",h="accept",p="filter",f="rebind",g="open",m="close",v="change",_="progress",b="select",w="deselect",k="aria-disabled",y="k-state-focused",x="k-state-selected",C="k-hidden",S="k-state-hover",T="k-state-disabled",D="k-no-click",A="disabled",I="readonly",E="off",M=".kendoMultiSelect",F="click"+M,R="keydown"+M,P="mouseenter"+M,z="mouseleave"+M,B=P+" "+z,L=/"/g,H=e.isArray,N=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],O=r.extend({init:function(t,n){var o,a,s=this;s.ns=M,r.fn.init.call(s,t,n),s._optionsMap={},s._customOptions={},s._wrapper(),s._tagList(),s._input(),s._textContainer(),s._loader(),s._clearButton(),s._tabindex(s.input),t=s.element.attr("multiple","multiple").hide(),n=s.options,n.placeholder||(n.placeholder=t.data("placeholder")),o=t.attr(c),o&&(s._tagID=o+"_tag_active",o+="_taglist",s.tagList.attr(c,o),s.input.attr("aria-describedby",o)),s._initialOpen=!0,s._ariaLabel(),s._ariaSetLive(),s._dataSource(),s._ignoreCase(),s._popup(),s._tagTemplate(),s.requireValueMapper(s.options),s._initList(),s._reset(),s._enable(),s._placeholder(),n.autoBind?s.dataSource.fetch():n.value&&s._preselect(n.value),a=e(s.element).parents("fieldset").is(":disabled"),a&&s.enable(!1),s._ariaSetSize(s.value().length),i.notify(s),s._toggleCloseVisibility()},options:{name:"MultiSelect",tagMode:"multiple",enabled:!0,autoBind:!0,autoClose:!0,highlightFirst:!0,dataTextField:"",dataValueField:"",filter:"startswith",ignoreCase:!0,minLength:1,messages:{singleTag:"item(s) selected",clear:"clear",deleteTag:"delete",noData:"No data found."},enforceMinLength:!1,delay:100,value:null,maxSelectedItems:null,placeholder:"",height:200,animation:{},virtual:!1,itemTemplate:"",tagTemplate:"",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0,autoWidth:!1,popup:null},events:[g,m,v,b,w,"filtering","dataBinding","dataBound"],setDataSource:function(e){this.options.dataSource=e,this._state="",this._dataSource(),this.persistTagList=!1,this.listView.setDataSource(this.dataSource),this.options.autoBind&&this.dataSource.fetch()},setOptions:function(e){var t=this._listOptions(e);r.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(this.tagList.attr(c)),this._tagTemplate(),this._placeholder(),this._clearButton()},currentTag:function(e){var n=this;return e===t?n._currentTag:(n._currentTag&&(n._currentTag.removeClass(y).removeAttr(c),n._currentTag.find(".k-select").attr("aria-hidden",!0),n.input.removeAttr("aria-activedescendant")),e&&(e.addClass(y).attr(c,n._tagID),e.find(".k-select").removeAttr("aria-hidden"),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(){this.popup.visible()&&r.fn._activateItem.call(this),this.currentTag(null)},_listOptions:function(t){var n=this,o=r.fn._listOptions.call(n,e.extend(t,{selectedItemChange:d(n._selectedItemChange,n),selectable:"multiple"})),a=this.options.itemTemplate||this.options.template,s=o.itemTemplate||a||o.template;return s||(s="#:"+i.expr(o.dataTextField,"data")+"#"),o.template=s,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===f&&(this._state=""),n=0;nr&&(e=e.slice(0,r)),a&&n._clearFilter(),i.value(e),n._old=n._valueBeforeCascade=e.slice(),a||n._fetchData(),n._ariaSetSize(n.value().length),n._toggleCloseVisibility(),t)},_preselect:function(t,n){var o=this;H(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=H(o)?{data:o}:o,o.select=t,o.fields=[{field:n.dataTextField},{field:n.dataValueField}],e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._progressHandler=d(e._showBusy,e),e._errorHandler=d(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)}):H(t)||t instanceof l?H(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)),e.popup.position(),e._ariaSetSize(t.length),e._toggleCloseVisibility()},_click:function(e){var t=this,n=e.item;e.preventDefault(),t._select(n).done(function(){t._activeItem=n,t._change(),t._close()})},_getActiveItem:function(){return this._activeItem||e(this.listView.items()[this._getSelectedIndices().length-1])||this.listView.focus()},_getSelectedIndices:function(){return this.listView._selectedIndices||this.listView._selectedIndexes},_keydown:function(n){var o,r,s,l,d=this,c=n.keyCode,u=d._currentTag,p=d.listView,f=d.input.val(),g=i.support.isRtl(d.wrapper),m=d.popup.visible(),v=0;if(c!==a.ENTER&&(this._multipleSelection=!1),c===a.DOWN){if(n.preventDefault(),!m)return d.open(),p.focus()||p.focusFirst(),t;p.focus()?(!d._activeItem&&n.shiftKey&&(d._activeItem=p.focus(),v=-1),o=p.getElementIndex(d._getActiveItem().first()),p.focusNext(),p.focus()?n.shiftKey&&(this._multipleSelection=!0,d._selectRange(o,p.getElementIndex(p.focus().first())+v)):p.focusLast()):p.focusFirst()}else if(c===a.UP)m&&(!d._activeItem&&n.shiftKey&&(d._activeItem=p.focus(),v=1),o=p.getElementIndex(d._getActiveItem().first()),p.focusPrev(),p.focus()?n.shiftKey&&(this._multipleSelection=!0,d._selectRange(o,p.getElementIndex(p.focus().first())+v)):d.close()),n.preventDefault();else if(c===a.LEFT&&!g||c===a.RIGHT&&g)f||(u=u?u.prev():e(d.tagList[0].lastChild),u[0]&&d.currentTag(u));else if(c===a.RIGHT&&!g||c===a.LEFT&&g)!f&&u&&(u=u.next(),d.currentTag(u[0]?u:null));else if(n.ctrlKey&&!n.altKey&&c===a.A&&m&&!d.options.virtual)this._multipleSelection=!0,this._getSelectedIndices().length===p.items().length&&(d._activeItem=null),p.items().length&&d._selectRange(0,p.items().length-1);else if(c===a.ENTER&&m){if(!p.focus())return;if(n.preventDefault(),this._multipleSelection&&(this._multipleSelection=!1,p.focus().hasClass(x)))return d._close(),t;d._select(p.focus()).done(function(){d._change(),d._close()})}else if(c===a.SPACEBAR&&n.ctrlKey&&m)d._activeItem&&p.focus()&&p.focus()[0]===d._activeItem[0]&&(d._activeItem=null),e(p.focus()).hasClass(x)||(d._activeItem=p.focus()),d._select(p.focus()).done(function(){d._change()}),n.preventDefault();else if(c===a.SPACEBAR&&n.shiftKey&&m)r=p.getElementIndex(d._getActiveItem()),s=p.getElementIndex(p.focus()),r!==t&&s!==t&&d._selectRange(r,s),n.preventDefault();else if(c===a.ESC)m?n.preventDefault():(d.tagList.children().each(function(t,n){d._removeTag(e(n),!1)}),d._change()),d.close();else if(c===a.HOME)m?p.focus()?(n.ctrlKey&&n.shiftKey&&!d.options.virtual&&d._selectRange(p.getElementIndex(p.focus()[0]),0),p.focusFirst()):d.close():f||(u=d.tagList[0].firstChild,u&&d.currentTag(e(u)));else if(c===a.END)m?p.focus()?(n.ctrlKey&&n.shiftKey&&!d.options.virtual&&d._selectRange(p.getElementIndex(p.focus()[0]),p.element.children().length-1),p.focusLast()):d.close():f||(u=d.tagList[0].lastChild,u&&d.currentTag(e(u)));else if(c!==a.DELETE&&c!==a.BACKSPACE||f)!d.popup.visible()||c!==a.PAGEDOWN&&c!==a.PAGEUP?(clearTimeout(d._typingTimeout),setTimeout(function(){d._scale()}),d._search()):(n.preventDefault(),l=c===a.PAGEDOWN?1:-1,p.scrollWith(l*p.screenHeight()));else{if(d._state=h,"single"===d.options.tagMode)return d._clearSingleTagValue(),d._change(),d._close(),t;c!==a.BACKSPACE||u||(u=e(d.tagList[0].lastChild)),u&&u[0]&&d._removeTag(u,!0)}},_hideBusy:function(){var e=this;clearTimeout(e._busy),e.input.attr("aria-busy",!1),e._loading.addClass(C),e._request=!1,e._busy=null,e._toggleCloseVisibility()},_showBusyHandler:function(){this.input.attr("aria-busy",!0),this._loading.removeClass(C),this._hideClear()},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(d(e._showBusyHandler,e),100))},_placeholder:function(e,n){var o=this,r=o.input,a=s(),l=o.options.placeholder,d=r.val(),c=r[0]===a,u=d.length;c&&!o.options.autoClose&&d!==l||(u=0,d=""),e===t&&(e=!1,r[0]!==a&&(e=!o.listView.selectedDataItems()[0])),o._prev=d,r.toggleClass("k-readonly",e).val(e?l:d),c&&!n&&i.caret(r[0],u,u),o._scale()},_scale:function(){var e,t=this,n=t.wrapper.find(".k-multiselect-wrap"),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="",n!==t&&(r+=i.htmlEncode(n)),r+=""},_render:function(e){var t,n,i,o,r,a,s=this.listView.selectedDataItems(),l=this.listView.value(),d=e.length,c="";for(l.length!==s.length&&(s=this._buildSelectedItems(l)),r={},a={},o=0;othis.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}})}})},updatePersistTagList:function(e,t){this.persistTagList.added&&this.persistTagList.added.length===t.length&&this.persistTagList.removed&&this.persistTagList.removed.length===e.length?this.persistTagList=!1:(this.listView._removedAddedIndexes=this._old.slice(),this.persistTagList={added:e,removed:t})},_selectValue:function(e,n){var i,o,r,a=this,s=a.dataSource.total(),l=a.tagList,d=a._value;if(this.persistTagList)return this.updatePersistTagList(e,n),t;if(a._angularTagItems("cleanup"),"multiple"===a.options.tagMode){for(r=n.length-1;r>-1;r--)i=n[r],l.children().length&&(l[0].removeChild(l[0].children[i.position]),a._setOption(d(i.dataItem),!1));for(r=0;r-1;r--)a._setOption(d(n[r].dataItem),!1);for(r=0;r=i;o--)c.push(o);for(null!==l&&c.length>l&&(c=c.slice(0,l)),o=0;o').appendTo(t._innerWrapper)),n.removeAttr("accesskey"),t._focused=t.input=o.attr({accesskey:i,autocomplete:E,role:"listbox",title:n[0].title,"aria-expanded":!1,"aria-haspopup":"listbox","aria-autocomplete":"list"})},_tagList:function(){var t=this,n=t._innerWrapper.children("ul");n[0]||(n=e('').appendTo(t._innerWrapper)),t.tagList=n},_tagTemplate:function(){var e,t=this,n=t.options,o=n.tagTemplate,r=n.dataSource,a="multiple"===n.tagMode,s=n.messages.singleTag;t.element[0].length&&!r&&(n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value"),e=a?i.template("#:"+i.expr(n.dataTextField,"data")+"#",{
useWithBlock:!1}):i.template("#:values.length# "+s),t.tagTextTemplate=o=o?i.template(o):e,t.tagTemplate=function(e){return''+o(e)+''}},_loader:function(){this._loading=e('').insertAfter(this.input)},_clearButton:function(){r.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-multiselect-clearable"))},_textContainer:function(){var t=i.getComputedStyles(this.input[0],N);t.position="absolute",t.visibility="hidden",t.top=-3333,t.left=-3333,this._span=e("").css(t).appendTo(this.wrapper)},_wrapper:function(){var t=this,n=t.element,i=n.parent("span.k-multiselect");i[0]||(i=n.wrap('').parent(),i[0].style.cssText=n[0].style.cssText,i[0].title=n[0].title,e('').insertBefore(n)),t.wrapper=i.addClass(n[0].className).css("display",""),t._innerWrapper=e(i[0].firstChild)},_ariaSetSize:function(e){var t=this,n=t.tagList.children();e&&n.length&&n.attr("aria-setsize",e)},_ariaSetLive:function(){var e=this;e.ul.attr("aria-live",e._isFilterEnabled()?"polite":"off")}});o.plugin(O)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.multicolumncombobox.min",["kendo.combobox.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,o=i.ComboBox,r=/^\d+(\.\d+)?%$/i,a="k-dropdowngrid",s="k-dropdowngrid-popup k-popup-flush",l=o.extend({init:function(e,t){o.fn.init.call(this,e,t),this.list.addClass(s),this._allColumnsWidthsAreSet(this.options)?this.list.width(this._calculateDropDownWidth(this.options)):this.options.dropDownWidth&&this.list.width(this.options.dropDownWidth)},options:{name:"MultiColumnComboBox",ns:".kendoMultiColumnComboBox",columns:[],dropDownWidth:null,filterFields:[]},setOptions:function(e){o.fn.setOptions.call(this,e),this._allColumnsWidthsAreSet(e)?this.list.width(this._calculateDropDownWidth(e)):this.options.dropDownWidth&&this.list.width(this.options.dropDownWidth)},_allColumnsWidthsAreSet:function(e){var t,n,i=e.columns;if(!i||!i.length)return!1;for(t=0;t"}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",""}function o(e,t){var n,i="",o=S.floor(c(t/e.smallStep))+1;for(n=0;n";return i+=""}function r(e,t){var n=t.is("input")?1:2,i=2==n?e.leftDragHandleTitle:e.dragHandleTitle;return""+(n>1?"":"")+""}function a(e){return function(t){return t+e}}function s(e){return function(){return e}}function l(e){return(e+"").replace(".",g.cultures.current.numberFormat["."])}function d(e){var t=""+e,n=0;return t=t.split("."),t[1]&&(n=t[1].length),n=n>10?10:n}function c(e){var t,n;return e=parseFloat(e,10),t=d(e),n=S.pow(10,t||0),S.round(e*n)/n}function u(e,n){var i=y(e.getAttribute(n));return null===i&&(i=t),i}function h(e){return typeof e!==Q}function p(e){return 1e4*e}var f,g=window.kendo,m=g.ui.Widget,v=g.ui.Draggable,_=g._outerWidth,b=g._outerHeight,w=e.extend,k=g.format,y=g.parseFloat,x=e.proxy,C=e.isArray,S=Math,T=g.support,D=T.pointers,A=T.msPointers,I="change",E="slide",M=".slider",F="touchstart"+M+" mousedown"+M,R=D?"pointerdown"+M:A?"MSPointerDown"+M:F,P="touchend"+M+" mouseup"+M,z=D?"pointerup":A?"MSPointerUp"+M:P,B="moveSelection",L="keydown"+M,H="click"+M,N="mouseover"+M,O="focus"+M,V="blur"+M,W=".k-draghandle",U=".k-slider-track",j=".k-tick",q="k-state-selected",G="k-state-focused",$="k-state-default",Y="k-state-disabled",K="disabled",Q="undefined",X="tabindex",J=g.getTouches,Z=m.extend({init:function(e,t){var n,i=this;if(m.fn.init.call(i,e,t),t=i.options,i._isHorizontal="horizontal"==t.orientation,i._isRtl=i._isHorizontal&&g.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(U),i._setTrackDivWidth(),i._maxSelection=i._trackDiv[i._sizeFn](),i._sliderItemsInit(),i._reset(),i._tabindex(i.wrapper.find(W)),i[t.enabled?"enable":"disable"](),n=g.support.isRtl(i.wrapper)?-1:1,i._keyMap={37:a(-1*n*t.smallStep),40:a(-t.smallStep),39:a(1*n*t.smallStep),38:a(+t.smallStep),35:s(t.max),36:s(t.min),33:a(+t.largeStep),34:a(-t.largeStep)},g.notify(i)},events:[I,E],options:{enabled:!0,min:0,max:10,smallStep:1,largeStep:5,orientation:"horizontal",tickPlacement:"both",tooltip:{enabled:!0,format:"{0}"}},_distance:function(){return c(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 g.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,a=t.length-1,s=i.wrapper.find(j),l=0,d=2,c=s.length,u=0;for(n=0;n=3)for(o._isHorizontal||o._isRtl||(a=e.makeArray(a).reverse()),s=0;s"+t.attr("title")+""),0!==s&&s!==a.length-1&&t.css("line-height",t[o._sizeFn]()+"px"))},_calculateItemsWidth:function(e){var t,n,i,o=this,r=o.options,a=parseFloat(o._trackDiv.css(o._sizeFn))+1,s=o._distance(),l=a/s;for(s/r.smallStep-S.floor(s/r.smallStep)>0&&(a-=s%r.smallStep*l),t=a/e,n=[],i=0;i=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(W).attr("aria-valuenow",e).attr("aria-valuetext",t)},_clearTimer:function(){clearTimeout(this.timeout),clearInterval(this.timer)},_keydown:function(e){var t=this;e.keyCode in t._keyMap&&(t._clearTooltipTimeout(),t._setValueInRange(t._keyMap[e.keyCode](t.options.value)),t._drag._updateTooltip(t.value()),e.preventDefault())},_setValueInRange:function(e){var n=this,i=n.options;return e=c(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;Z.fn.destroy.call(e),e.wrapper.off(M).find(".k-button").off(M).end().find(W).off(M).end().find(j+", "+U).off(M).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(c(o/n.smallStep)),a=parseInt(t._pixelSteps[r],10),s=t._trackDiv.find(".k-slider-selection"),l=parseInt(t._outerSize(e)/2,10),d=t._isRtl?2:0;s[t._sizeFn](t._isRtl?t._maxSelection-a:a),e.css(t._position,a-l-d)}i(n.value),t.bind([E,B],function(e){i(parseFloat(e.value,10))}),t.bind(I,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),e.on("dragstart",function(e){e.preventDefault()})},ee.Drag.prototype={dragstart:function(e){this.owner._activeDragHandle=this,this.draggable.userEvents.cancel(),this._dragstart(e),this.dragend()},_dragstart:function(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,a="",s=e(window);r.enabled&&(r.template&&(t=i.tooltipTemplate=g.template(r.template)),e(".k-slider-tooltip").remove(),i.tooltipDiv=e("").appendTo(document.body),a=o._getFormattedValue(i.val||o.value(),i),i.type||(n="k-callout-"+(o._isHorizontal?"s":"e"),i.tooltipInnerDiv="",a+=i.tooltipInnerDiv),i.tooltipDiv.html(a),i._scrollOffset={top:s.scrollTop(),left:s.scrollLeft()},i.moveTooltip())},drag:function(e){var t,n=this,i=n.owner,o=e.x.location,r=e.y.location,a=n.dragableArea.startPoint,s=n.dragableArea.endPoint;e.preventDefault(),n.val=i._isHorizontal?i._isRtl?n.constrainValue(o,a,s,o=s):n.constrainValue(r,s,a,r<=s),n.oldVal!=n.val&&(n.oldVal=n.val,n.type?("firstHandle"==n.type?n.selectionStart=n.valn.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(E,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(c(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,a=r.owner,s=0,l=0,d=r.element,c=g.getOffset(d),u=8,h=e(window),p=r.tooltipDiv.find(".k-callout"),f=_(r.tooltipDiv),m=b(r.tooltipDiv);r.type?(t=a.wrapper.find(W),c=g.getOffset(t.eq(0)),n=g.getOffset(t.eq(1)),a._isHorizontal?(s=n.top,l=c.left+(n.left-c.left)/2):(s=c.top+(n.top-c.top)/2,l=n.left),o=_(t.eq(0))+2*u):(s=c.top,l=c.left,o=_(d)+2*u),a._isHorizontal?(l-=parseInt((f-a._outerSize(d))/2,10),s-=m+u+(p.length?p.height():0)):(s-=parseInt((m-a._outerSize(d))/2,10),l-=f+u+(p.length?p.width():0)),a._isHorizontal?(i=r._flip(s,m,o,b(h)+r._scrollOffset.top),s+=i,l+=r._fit(l,f,_(h)+r._scrollOffset.left)):(i=r._flip(l,f,o,_(h)+r._scrollOffset.left),s+=r._fit(s,m,b(h)+r._scrollOffset.top),l+=i),i>0&&p&&(p.removeClass(),p.addClass("k-callout k-callout-"+(a._isHorizontal?"n":"w"))),r.tooltipDiv.css({top:s,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=to.selectionEnd?(d=r.selectionStart,c=s,u=o._lastHandleDrag):s-r.selectionStart<=r.selectionEnd-s?(d=s,c=r.selectionEnd,u=o._firstHandleDrag):(d=r.selectionStart,c=s,u=o._lastHandleDrag),u.dragstart(n),o._setValueInRange(d,c),o._focusWithMouse(u.element)}},o.wrapper.find(j+", "+U).on(R,i).end().on(R,function(){e(document.documentElement).one("selectstart",g.preventDefault)}).on(z,function(){o._activeDragHandle&&o._activeDragHandle._end()}),o.wrapper.find(W).attr(X,0).on(P,function(){o._setTooltipTimeout()}).on(H,function(e){o._focusWithMouse(e.target),e.preventDefault()}).on(O,x(o._focus,o)).on(V,x(o._blur,o)),o.wrapper.find(W).off(L,g.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+", "+U).off(R).off(z),e.wrapper.find(W).attr(X,-1).off(P).off(L).off(H).off(O).off(V),e.options.enabled=!1},_keydown:function(e,t){var n,i,o,r=this,a=r.options.selectionStart,s=r.options.selectionEnd;e.keyCode in r._keyMap&&(r._clearTooltipTimeout(),"firstHandle"==t?(o=r._activeHandleDrag=r._firstHandleDrag,a=r._keyMap[e.keyCode](a),a>s&&(s=a)):(o=r._activeHandleDrag=r._lastHandleDrag,s=r._keyMap[e.keyCode](s),a>s&&(a=s)),r._setValueInRange(c(a),c(s)),n=Math.max(a,r.options.selectionStart),i=Math.min(s,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(I,{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,a=o.selectionEnd;return isNaN(e)&&isNaN(n)?[r,a]:(e=c(e),n=c(n),e>=o.min&&e<=o.max&&n>=o.min&&n<=o.max&&e<=n&&(r==e&&a==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(W),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(W).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;Z.fn.destroy.call(e),e.wrapper.off(M).find(j+", "+U).off(M).end().find(W).off(M),e._firstHandleDrag.draggable.destroy(),e._lastHandleDrag.draggable.destroy()}}),f.Selection=function(e,t,n){function i(i){i=i||[];var r=i[0]-n.min,a=i[1]-n.min,s=S.ceil(c(r/n.smallStep)),l=S.ceil(c(a/n.smallStep)),d=t._pixelSteps[s],u=t._pixelSteps[l],h=parseInt(t._outerSize(e.eq(0))/2,10),p=t._isRtl?2:0;e.eq(0).css(t._position,d-h-p).end().eq(1).css(t._position,u-h-p),o(d,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([I,E,B],function(e){i(e.values)})},g.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.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=c(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 a(e,t){return function(){return e.apply(t,arguments)}}var s=window.kendo,l=s.ui,d=l.Widget,c=s.parseColor,u=s.Color,h=s.keys,p="background-color",f="k-state-selected",g="000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7",m="FFFFFF,FFCCFF,FF99FF,FF66FF,FF33FF,FF00FF,CCFFFF,CCCCFF,CC99FF,CC66FF,CC33FF,CC00FF,99FFFF,99CCFF,9999FF,9966FF,9933FF,9900FF,FFFFCC,FFCCCC,FF99CC,FF66CC,FF33CC,FF00CC,CCFFCC,CCCCCC,CC99CC,CC66CC,CC33CC,CC00CC,99FFCC,99CCCC,9999CC,9966CC,9933CC,9900CC,FFFF99,FFCC99,FF9999,FF6699,FF3399,FF0099,CCFF99,CCCC99,CC9999,CC6699,CC3399,CC0099,99FF99,99CC99,999999,996699,993399,990099,FFFF66,FFCC66,FF9966,FF6666,FF3366,FF0066,CCFF66,CCCC66,CC9966,CC6666,CC3366,CC0066,99FF66,99CC66,999966,996666,993366,990066,FFFF33,FFCC33,FF9933,FF6633,FF3333,FF0033,CCFF33,CCCC33,CC9933,CC6633,CC3333,CC0033,99FF33,99CC33,999933,996633,993333,990033,FFFF00,FFCC00,FF9900,FF6600,FF3300,FF0000,CCFF00,CCCC00,CC9900,CC6600,CC3300,CC0000,99FF00,99CC00,999900,996600,993300,990000,66FFFF,66CCFF,6699FF,6666FF,6633FF,6600FF,33FFFF,33CCFF,3399FF,3366FF,3333FF,3300FF,00FFFF,00CCFF,0099FF,0066FF,0033FF,0000FF,66FFCC,66CCCC,6699CC,6666CC,6633CC,6600CC,33FFCC,33CCCC,3399CC,3366CC,3333CC,3300CC,00FFCC,00CCCC,0099CC,0066CC,0033CC,0000CC,66FF99,66CC99,669999,666699,663399,660099,33FF99,33CC99,339999,336699,333399,330099,00FF99,00CC99,009999,006699,003399,000099,66FF66,66CC66,669966,666666,663366,660066,33FF66,33CC66,339966,336666,333366,330066,00FF66,00CC66,009966,006666,003366,000066,66FF33,66CC33,669933,666633,663333,660033,33FF33,33CC33,339933,336633,333333,330033,00FF33,00CC33,009933,006633,003333,000033,66FF00,66CC00,669900,666600,663300,660000,33FF00,33CC00,339900,336600,333300,330000,00FF00,00CC00,009900,006600,003300,000000",v="#ffffff",_={apply:"Apply",cancel:"Cancel",noColor:"no color",clearColor:"Clear color",previewInput:"Color Hexadecimal Code"},b=".kendoColorTools",w="click"+b,k="keydown"+b,y=s.support.browser,x=y.msie&&y.version<9,C=d.extend({init:function(e,t){var n,i=this;d.fn.init.call(i,e,t),e=i.element,t=i.options,i._value=t.value=c(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=c(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(""),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,d.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,d=this;if(C.fn.init.call(d,t,n),t=d.wrapper=d.element,n=d.options,i=n.palette,"websafe"==i?(i=m,n.columns=18):"basic"==i&&(i=g),"string"==typeof i&&(i=i.split(",")),e.isArray(i)&&(i=e.map(i,function(e){return c(e)})),d._selectedID=(n.ariaId||s.guid())+"_selected",t.addClass("k-widget k-colorpalette").attr("role","grid").attr("aria-readonly","true").append(e(d._template({colors:i,columns:n.columns,tileSize:n.tileSize,value:d._value,id:n.ariaId}))).on(w,".k-item",function(t){d._select(e(t.currentTarget).css(p))}).attr("tabIndex",d._tabIndex).on(k,a(d._keydown,d)),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&&!this.wrapper.is("[unselectable='on']")&&this.wrapper.focus()},options:{name:"ColorPalette",columns:10,tileSize:null,palette:"basic"},_onEnable:function(e){e?this.wrapper.attr("tabIndex",this._tabIndex):this.wrapper.removeAttr("tabIndex")},_keydown:function(t){var n,i,a=this.wrapper,s=a.find(".k-item"),l=s.filter("."+f).get(0),d=t.keyCode;if(d==h.LEFT?n=o(s,l,-1):d==h.RIGHT?n=o(s,l,1):d==h.DOWN?n=o(s,l,this.options.columns):d==h.UP?n=o(s,l,-this.options.columns):d==h.ENTER?(r(t),
l&&this._select(e(l).css(p))):d==h.ESC&&this._cancel(),n){r(t),this._current(n);try{i=c(n.css(p)),this._triggerSelect(i)}catch(u){}}},_current:function(t){this.wrapper.find("."+f).removeClass(f).attr("aria-selected",!1).removeAttr("id"),e(t).addClass(f).attr("aria-selected",!0).attr("id",this._selectedID),this.element.removeAttr("aria-activedescendant").attr("aria-activedescendant",this._selectedID)},_updateUI:function(t){var n=null;this.wrapper.find(".k-item").each(function(){var i=c(e(this).css(p));if(i&&i.equals(t))return n=this,!1}),this._current(n)},_template:s.template('# for (var i = 0; i < colors.length; ++i) { ## var selected = colors[i].equals(value); ## if (i && i % columns == 0) { ## } ## } #')}),T=C.extend({init:function(t,n){var i=this;C.fn.init.call(i,t,n),n=i.options,n.messages=n.options?e.extend(i.options.messages,n.options.messages):i.options.messages,t=i.element,i.wrapper=t.addClass("k-widget k-flatcolorpicker").append(i._template(n)),i._hueElements=e(".k-hsv-rectangle, .k-alpha-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||c("#f00")),t.find("input.k-color-value").on(k,function(t){var n,o,r=this;if(t.keyCode==h.ENTER)try{n=c(r.value),o=i.color(),i._select(n,n.equals(o))}catch(a){e(r).addClass("k-state-error")}else i.options.autoupdate&&setTimeout(function(){var e=c(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,o=i.find(".k-hue-slider"),r=i.find(".k-alpha-slider");o.attr("aria-label","hue saturation"),n._hueSlider=o.kendoSlider({min:0,max:360,tickPlacement:"none",showButtons:!1,slide:e,change:e}).data("kendoSlider"),r.attr("aria-label","opacity"),n._opacitySlider=r.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,a=this.width,s=this.height;o=o<0?0:o>a?a:o,r=r<0?0:r>s?s:r,t._svChange(o/a,1-r/s)}var t=this,n=t.element,i=n.find(".k-hsv-rectangle"),o=i.find(".k-draghandle").attr("tabIndex",0).on(k,a(t._keydown,t));t._hsvEvents=new s.UserEvents(i,{global:!0,press:function(t){this.offset=s.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(),a=o.height(),s=this._hsvHandle.position();return null==e&&(e=this._hueSlider.value()),null==t&&(t=s.left/r),null==n&&(n=1-s.top/a),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.attr("title",n.options.messages.previewInput),this._colorAsText.removeClass("k-state-error"),n._selectedColor.css(p,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(p,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:s.template('# if (preview) { ## if (clearButton && !_standalone) { ## } ## } ## if (clearButton && !_standalone && !preview) { ##: messages.clearColor ## } ## if (opacity) { ## } ## if (buttons) { ##: messages.apply # #: messages.cancel ## } #')}),D=d.extend({init:function(t,n){var i,o,r,a,s,l=this;d.fn.init.call(l,t,n),n=l.options,t=l.element,i=t.attr("value")||t.val(),i=i?c(i,!0):c(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"),a=t.attr("id"),a&&(r=r.add('label[for="'+a+'"]')),r.click(function(e){l.open(),e.preventDefault()})),l._tabIndex=t.attr("tabIndex")||0,l.enable(!t.attr("disabled")),s=t.attr("accesskey"),s&&(t.attr("accesskey",null),o.attr("accesskey",s)),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,d.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(k,a(t._keydown,t)).on(w,".k-select",a(t.toggle,t)).on(w,t.options.toolIcon?".k-tool-icon":".k-selected-color",function(){t.trigger("activate")}):t.close()},_template:s.template('# if (toolIcon) { ## } else { ## } #'),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=s.template(this.options.ARIATemplate)),this.wrapper.attr("aria-label",this._ariaTemplate(t)),this._triggerSelect(e),this.wrapper.find(".k-selected-color").css(p,e?e.toDisplay():v),this._noColorIcon()[t?"hide":"show"]()},_keydown:function(e){var t=e.keyCode;this._getPopup().visible()?(t==h.ESC?this._selector._cancel():this._selector._keydown(e),r(e)):t!=h.ENTER&&t!=h.DOWN||(this.open(),r(e))},_getPopup:function(){var t,i,o,r,a=this,l=a._popup;return l||(t=a.options,i=t.palette?S:T,t._standalone=!1,delete t.select,delete t.change,delete t.cancel,o=s.guid(),r=a._selector=new i(e('').appendTo(document.body),t),a.wrapper.attr("aria-owns",o),a._popup=l=r.wrapper.kendoPopup({anchor:a.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,a.value(null),a.element.val(null),a._updateUI(null),r._colorAsText.val(""),r._hsvHandle.css({top:"0px",left:"0px"}),r._selectedColor.css(p,v),a.trigger("change",{value:a.value()}),e.preventDefault()}}),r.bind({select:function(e){a._updateUI(c(e.value)),delete r.options._clearedColor},change:function(){r.options._clearedColor||a._select(r.color()),a.close()},cancel:function(){r.options._clearedColor&&!a.value()&&r.value()&&a._select(r.color(),!0),a.close()}}),l.bind({close:function(e){var t,i,o,s;return a.trigger("close")?(e.preventDefault(),n):(a.wrapper.children(".k-picker-wrap").removeClass("k-state-focused"),t=r._selectOnHide(),i=r.value(),o=a.value(),s=r.options,t?s._clearedColor&&!o||a._select(t):(setTimeout(function(){a.wrapper&&!a.wrapper.is("[unselectable='on']")&&a.wrapper.focus()}),!s._closing&&s._clearedColor&&!o&&i?a._select(i,!0):a._updateUI(a.color())),n)},open:function(e){a.trigger("open")?e.preventDefault():a.wrapper.children(".k-picker-wrap").addClass("k-state-focused")},activate:function(){r._select(a.color(),!0),r.focus(),a.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''}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,a=o.keys,s=o.ui,l=s.Widget,d=o._activeElement,c=o._extractFormat,u=o.parseFloat,h=o.support.placeholder,p=o.getCulture,f="change",g="disabled",m="readonly",v="k-input",_="spin",b=".kendoNumericTextBox",w="touchend",k="mouseleave"+b,y="mouseenter"+b+" "+k,x="k-state-default",C="k-state-focused",S="k-state-hover",T="focus",D=".",A="k-icon",I="k-state-selected",E="k-state-disabled",M="k-state-invalid",F="aria-disabled",R=/^(-)?(\d*)$/,P=null,z=e.proxy,B=e.extend,L=l.extend({init:function(n,i){var r,a,s,d,u,h,p=this,f=i&&i.step!==t;l.fn.init.call(p,n,i),i=p.options,n=p.element.on("focusout"+b,z(p._focusout,p)).attr("role","spinbutton"),i.placeholder=i.placeholder||n.attr("placeholder"),r=p.min(n.attr("min")),a=p.max(n.attr("max")),s=p._parse(n.attr("step")),i.min===P&&r!==P&&(i.min=r),i.max===P&&a!==P&&(i.max=a),f||s===P||(i.step=s),p._initialOptions=B({},i),h=n.attr("type"),p._reset(),p._wrapper(),p._arrows(),p._validation(),p._input(),o.support.mobileOS?p._text.on(w+b+" "+T+b,function(){o.support.browser.edge?p._text.one(T+b,function(){p._toggleText(!1),n.focus()}):(p._toggleText(!1),n.focus())}):p._text.on(T+b,z(p._click,p)),n.attr("aria-valuemin",i.min!==P?i.min*i.factor:i.min).attr("aria-valuemax",i.max!==P?i.max*i.factor:i.max),i.format=c(i.format),d=i.value,d==P&&(d="number"==h?parseFloat(n.val()):n.val()),p.value(d),u=n.is("[disabled]")||e(p.element).parents("fieldset").is(":disabled"),u?p.enable(!1):p.readonly(n.is("[readonly]")),p.angular("compile",function(){return{elements:p._text.get()}}),o.notify(p)},options:{name:"NumericTextBox",decimals:P,restrictDecimals:!1,min:P,max:P,value:P,step:1,round:!0,culture:"",format:"n",spinners:!0,placeholder:"",factor:1,upArrowText:"Increase value",downArrowText:"Decrease value"},events:[f,_],_editable:function(e){var t=this,n=t.element,i=e.disable,o=e.readonly,r=t._text.add(n),a=t._inputWrapper.off(y);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),n.off("keydown"+b).off("keypress"+b).off("keyup"+b).off("paste"+b),o||i?(a.addClass(i?E:x).removeClass(i?x:E),r.attr(g,i).attr(m,o).attr(F,i)):(a.addClass(x).removeClass(E).on(y,t._toggleHover),r.removeAttr(g).removeAttr(m).attr(F,!1),t._upArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(I)}),t._downArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(I)}),t.element.on("keydown"+b,z(t._keydown,t)).on("keypress"+b,z(t._keypress,t)).on("keyup"+b,z(t._keyup,t)).on("paste"+b,z(t._paste,t)))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},setOptions:function(e){var n=this;l.fn.setOptions.call(n,e),n._arrowsWrap.toggle(n.options.spinners),n._inputWrapper.toggleClass("k-expand-padding",!n.options.spinners),n._text.prop("placeholder",n.options.placeholder),n._placeholder(n.options.placeholder),n.element.attr({"aria-valuemin":n.options.min!==P?n.options.min*n.options.factor:n.options.min,"aria-valuemax":n.options.max!==P?n.options.max*n.options.factor:n.options.max}),n.options.format=c(n.options.format),e.value!==t&&n.value(e.value)},destroy:function(){var e=this;e.element.add(e._text).add(e._upArrow).add(e._downArrow).add(e._inputWrapper).off(b),e._upArrowEventHandler.destroy(),e._downArrowEventHandler.destroy(),e._form&&e._form.off("reset",e._resetHandler),l.fn.destroy.call(e)},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},step:function(e){return this._option("step",e)},value:function(e){var 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===P?e:(i!==P&&eo&&(e=o),e)},_arrows:function(){var t,i=this,r=function(){clearTimeout(i._spinning),t.removeClass(I)},a=i.options,s=a.spinners,l=i.element;t=l.siblings("."+A),t[0]||(t=e(n("increase",a.upArrowText)+n("decrease",a.downArrowText)).insertAfter(l),i._arrowsWrap=t.wrapAll('').parent()),s||(t.parent().toggle(s),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})},_validation:function(){var t=this,n=t.element;t._validationIcon=e("").hide().insertAfter(n)},_blur:function(){var e=this;e._toggleText(!0),e._change(e.element.val())},_click:function(e){var t=this;clearTimeout(t._focusing),t._focusing=setTimeout(function(){var n,i,o,a=e.target,s=r(a)[0],l=a.value.substring(0,s),d=t._format(t.options.format),c=d[","],u=0;c&&(i=RegExp("\\"+c,"g"),o=RegExp("(^(-)$)|(^(-)?([\\d\\"+c+"]+)(\\"+d[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,n=t.options.factor;n&&1!==n&&(e=o.parseFloat(e),null!==e&&(e/=n)),t._update(e),e=t._value,t._old!=e&&(t._old=e,t._typing||t.element.trigger(f),t.trigger(f)),t._typing=!1},_culture:function(e){return e||p(this.options.culture)},_focusin:function(){var e=this;e._inputWrapper.addClass(C),e._toggleText(!1),e.element[0].focus()},_focusout:function(){var e=this;clearTimeout(e._focusing),e._inputWrapper.removeClass(C).removeClass(S),e._blur(),e._removeInvalidState()},_format:function(e,t){var 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],a=r.accessKey,s=n.wrapper;t=s.find(D+o),t[0]||(t=e('').insertBefore(r).addClass(o));try{r.setAttribute("type","text")}catch(l){r.type="text"}t[0].title=r.title,t[0].tabIndex=r.tabIndex,t[0].style.cssText=r.style.cssText,t.prop("placeholder",i.placeholder),a&&(t.attr("accesskey",a),r.accessKey=""),n._text=t.addClass(r.className).attr({role:"spinbutton","aria-valuemin":i.min!==P?i.min*i.factor:i.min,"aria-valuemax":i.max!==P?i.max*i.factor:i.max,autocomplete:"off"})},_keydown:function(e){var t=this,n=e.keyCode;t._key=n,n==a.DOWN?t._step(-1):n==a.UP?t._step(1):n==a.ENTER?t._change(t.element.val()):n!=a.TAB&&(t._typing=!0)},_keypress:function(e){var t,n,i,o,s,l,d,c,u,h,p;0===e.which||e.metaKey||e.ctrlKey||e.keyCode===a.BACKSPACE||e.keyCode===a.ENTER||(t=this,n=t.options.min,i=t.element,o=r(i),s=o[0],l=o[1],d=String.fromCharCode(e.which),c=t._format(t.options.format),u=t._key===a.NUMPAD_DOT,h=i.val(),u&&(d=c[D]),h=h.substring(0,s)+d+h.substring(l),p=t._numericRegex(c).test(h),p&&u?(i.val(h),r(i,s+d.length),e.preventDefault()):(null!==n&&n>=0&&"-"===h.charAt(0)||!p)&&(t._addInvalidState(),e.preventDefault()),t._key=0)},_keyup:function(){this._removeInvalidState()},_addInvalidState:function(){var e=this;e._inputWrapper.addClass(M),e._validationIcon.show()},_removeInvalidState:function(){var e=this;e._inputWrapper.removeClass(M),e._validationIcon.hide()},_numericRegex:function(e){var t=this,n=e[D],i=t.options.decimals,o="*";return n===D&&(n="\\"+n),i===P&&(i=e.decimals),0===i&&t.options.restrictDecimals?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);e===P?t._update(i):(n.value=(""+e).replace(D,o[D]),t._adjust(e)===e&&t._numericRegex(o).test(n.value)||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._value,o=t._parse(n.val())||0,r=t.options.decimals||2;d()!=n[0]&&t._focusin(),t.options.factor&&o&&(o/=t.options.factor),o=+(o+t.options.step*e).toFixed(r),o=t._adjust(o),t._update(o),t._typing=!1,i!==o&&t.trigger(_)},_toggleHover:function(t){e(t.currentTarget).toggleClass(S,"mouseenter"===t.type)},_toggleText:function(e){var t=this;t._text.toggle(e),t.element.toggle(!e)},_parse:function(e,t){return u(e,this._culture(t),this.options.format)},_round:function(e,t){var n=this.options.round?o._round:i;return n(e,t)},_update:function(e){var t,n=this,i=n.options,r=i.factor,a=i.format,s=i.decimals,l=n._culture(),d=n._format(a,l);s===P&&(s=d.decimals),e=n._parse(e,l),t=e!==P,t&&(e=parseFloat(n._round(e,s),10)),n._value=e=n._adjust(e),n._placeholder(o.toString(e,a,l)),t?(r&&(e=parseFloat(n._round(e*r,s),10)),e=""+e,e.indexOf("e")!==-1&&(e=n._round(+e,s)),e=e.replace(D,d[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.element.attr("title")||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('').parent(),t=t.wrap("").parent()),t[0].style.cssText=o.style.cssText,o.style.width="",n.wrapper=t.addClass("k-widget k-numerictextbox").addClass(o.className).css("display",""),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value),t.max(t._initialOptions.max),t.min(t._initialOptions.min)})},t._form=o.on("reset",t._resetHandler))}});s.plugin(L)}(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,a;if(e&&e.length)for(a=[],t=0,n=e.length;t1?[]:n.filters?e.map(n.filters,function(e){return a(e)}):n.value!==t?[n.value]:[]}function s(e,n){for(var i,o,r=d.getter(n,!0),a=[],s=0,l={};s#=messages.info##=messages.isTrue##=messages.isFalse##=messages.filter##=messages.clear#',D='#=messages.info##=messages.filter##=messages.clear#',A='#=messages.info##for(var op in operators){##=operators[op]##}##if(values){##}else{##}##if(extra){##=messages.and##=messages.or##for(var op in operators){##=operators[op]##}##if(values){##}else{##}##}##=messages.filter##=messages.clear#',I='#=messages.filter# #=messages.into# #=title##=messages.info##=messages.operator##for(var op in operators){##=operators[op]##}##=messages.value##if(values){##=messages.selectValue##for(var val in values){##=values[val].text##}##}else{##}##if(extra){##=messages.and##=messages.or##=messages.additionalOperator##for(var op in operators){##=operators[op]##}##=messages.additionalValue##if(values){##=messages.selectValue##for(var val in values){##=values[val].text##}##}else{##}##}##=messages.clear#',E='#=messages.filter# #=messages.into# #=title##=messages.info##=messages.isTrue##=messages.isFalse##=messages.clear#',M=S.extend({
init:function(t,n){var i,o,r,a,s=this,l="string";S.fn.init.call(s,t,n),i=s.operators=n.operators||{},t=s.element,n=s.options,n.appendToElement||(r=t.addClass("k-with-icon k-filterable").find(".k-grid-filter"),r[0]||(r=t.prepend('').find(".k-grid-filter")),r.attr("tabindex",-1).on("click"+b,u(s._click,s))),s.link=r||e(),s.dataSource=R.create(n.dataSource),s.field=n.field||t.attr(d.attr("field")),s.model=s.dataSource.reader.model,s._parse=function(e){return null!=e?e+"":e},s.model&&s.model.fields&&(a=s.model.fields[s.field],a&&(l=a.type||"string",a.parse&&(s._parse=u(a.parse,a)))),n.values&&(l="enums"),s.type=l,i=i[l]||n.operators[l];for(o in i)break;s._defaultFilter=function(){return{field:s.field,operator:o||"eq",value:""}},s._refreshHandler=u(s.refresh,s),s.dataSource.bind(_,s._refreshHandler),n.appendToElement?s._init():s.refresh()},_init:function(){var t,n=this,i=n.options.ui,o=C(i);n.pane=n.options.pane,n.pane&&(n._isMobile=!0),o||(t=i||y[n.type]),n._isMobile?n._createMobileForm(t):n._createForm(t),n.form.on("submit"+b,u(n._submit,n)).on("reset"+b,u(n._reset,n)),o&&n.form.find(".k-textbox").removeClass("k-textbox").each(function(){i(e(this))}),n.form.find("["+d.attr("role")+"=numerictextbox]").removeClass("k-textbox").end().find("["+d.attr("role")+"=datetimepicker]").removeClass("k-textbox").end().find("["+d.attr("role")+"=timepicker]").removeClass("k-textbox").end().find("["+d.attr("role")+"=datepicker]").removeClass("k-textbox"),n.refresh(),n.trigger(g,{field:n.field,container:n.form}),d.cycleForm(n.form)},_createForm:function(t){var n=this,o=n.options,r=n.operators||{},a=n.type,s=C(n.options.ui);r=r[a]||o.operators[a],n.form=e('').html(d.template("boolean"===a?s?D:T:A)({field:n.field,format:o.format,ns:d.ns,messages:o.messages,extra:o.extra,operators:r,type:a,role:t,values:i(o.values)})),o.appendToElement?(n.element.append(n.form),n.popup=n.element.closest(".k-popup").data(f)):n.popup=n.form[f]({anchor:n.link,open:u(n._open,n),activate:u(n._activate,n),close:function(){n.options.closeCallback&&n.options.closeCallback(n.element)}}).data(f),n.form.on("keydown"+b,u(n._keydown,n))},_createMobileForm:function(t){var n=this,o=n.options,r=n.operators||{},a=d.guid(),s=n.type;r=r[s]||o.operators[s],n.form=e("").html(d.template("boolean"===s?E:I)({field:n.field,title:o.title||n.field,format:o.format,ns:d.ns,messages:o.messages,extra:o.extra,operators:r,filterMenuGuid:a,type:s,role:t,inputType:x[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-header-done",function(e){n.form.submit(),e.preventDefault()}).on("click",".k-header-cancel",function(e){n._closeForm(),e.preventDefault()}).on("click",".k-clear",function(e){n._mobileClear(),e.preventDefault()}),n.view.bind("showStart",function(){n.refresh()})},refresh:function(){var e=this,t=e.dataSource.filter()||{filters:[],logic:"and"},n=[e._defaultFilter()],i=e._defaultFilter().operator;(e.options.extra||"isnull"!==i&&"isnullorempty"!==i&&"isnotnullorempty"!==i&&"isnotnull"!==i&&"isempty"!==i&&"isnotempty"!==i)&&n.push(e._defaultFilter()),e.filterModel=d.observable({logic:"and",filters:n}),e.form&&d.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;S.fn.destroy.call(e),e.form&&(d.unbind(e.form),d.destroy(e.form),e.form.unbind(b),e.popup&&(e.popup.destroy(),e.popup=null),e.form=null),e.view&&(e.view.purge(),e.view=null),e.link.unbind(b),e._refreshHandler&&(e.dataSource.unbind(_,e._refreshHandler),e.dataSource=null),e.element=e.link=e._refreshHandler=e.filterModel=null},_bind:function(e){var t,n,i,o,r=this,a=e.filters,s=!1,l=0,d=r.filterModel;for(t=0,n=a.length;t1?e:s[0])):(l.filters=s,l.logic=a)),l},filter:function(e){var t=this._stripFilters(e.filters);t.length&&this.trigger("change",{filter:{logic:e.logic,filters:t},field:this.field})||(e=this._merge(e),e.filters.length&&this.dataSource.filter(e))},clear:function(){var e=this,t=e.dataSource.filter()||{filters:[]};this.trigger("change",{filter:null,field:e.field})||e._removeFilter(t)},_mobileClear:function(){var t,n,i,o,r,a=this,s=a.view.element;"boolean"===a.type?(t=s.find("[type='radio']:checked"),n=t.val(),t.val(""),t.trigger("change"),t.val(n),t.prop("checked",!1)):(i=s.find("select"),i.each(function(t,n){var i=e(n);i.val(i.find("option:first").val()),i.trigger("change")}),"string"!==a.type&&"date"!==a.type&&"number"!==a.type||(o=s.find(".k-value-input"),o.each(function(t,n){var i=e(n);i.val(""),i.trigger("change")})),a.options.extra&&(r=s.find("[name=logic]").first(),r.prop("checked",!0),r.trigger("change")))},_removeFilter:function(t){var n=this;t.filters=e.grep(t.filters,function(e){return e.filters?(e.filters=o(e.filters,n.field),e.filters.length):e.field!=n.field}),t.filters.length||(t=null),n.dataSource.filter(t)},_submit:function(t){var n,i,o;t.preventDefault(),t.stopPropagation(),n=this.filterModel.toJSON(),i=e.grep(n.filters,function(e){return""!==e.value&&null!==e.value}),this._checkForNullOrEmptyFilter(n)||i&&i.length?this.filter(n):(o=this.dataSource.filter(),o&&(o.filters.push(n),n=o),this._removeFilter(n)),this._closeForm()},_checkForNullOrEmptyFilter:function(e){var t,n,i;return!!(e&&e.filters&&e.filters.length)&&(t=!1,n=!1,e.filters[0]&&(i=e.filters[0].operator,t="isnull"==i||"isnotnull"==i||"isnotempty"==i||"isempty"==i||"isnullorempty"==i||"isnotnullorempty"==i),e.filters[1]&&(i=e.filters[1].operator,n="isnull"==i||"isnotnull"==i||"isnotempty"==i||"isempty"==i||"isnullorempty"==i||"isnotnullorempty"==i),!this.options.extra&&t||this.options.extra&&(t||n))},_reset:function(){this.clear(),this.options.search&&this.container&&this.container.find("label").parent().show(),this._closeForm()},_closeForm:function(){this._isMobile?this.pane.navigate("",this.options.animations.right):this.popup.close()},_click:function(e){e.preventDefault(),e.stopPropagation(),this.popup||this.pane||this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle()},_open:function(){var t;e(".k-filter-menu").not(this.form).each(function(){t=e(this).data(f),t&&t.close()})},_activate:function(){this.form.find(":kendoFocusable:first").focus(),this.trigger(m,{field:this.field,container:this.form})},_keydown:function(e){e.keyCode==d.keys.ESC&&this.popup.close()},events:[g,"change",m],options:{name:"FilterMenu",extra:!0,appendToElement:!1,type:"string",operators:{string:{eq:w,neq:k,startswith:"Starts with",contains:"Contains",doesnotcontain:"Does not contain",endswith:"Ends with",isnull:"Is null",isnotnull:"Is not null",isempty:"Is empty",isnotempty:"Is not empty",isnullorempty:"Has no value",isnotnullorempty:"Has value"},number:{eq:w,neq:k,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:w,neq:k,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:w,neq:k,isnull:"Is null",isnotnull:"Is not null"}},messages:{info:"Show items with value that:",title:"Show items with value that:",isTrue:"is true",isFalse:"is false",filter:"Filter",clear:"Clear",and:"And",or:"Or",selectValue:"-Select value-",operator:"Operator",value:"Value",additionalValue:"Additional value",additionalOperator:"Additional operator",logic:"Filters logic",cancel:"Cancel",done:"Done",into:"in"},animations:{left:"slide",right:"slide:right"}}}),F=".kendoFilterMultiCheck",R=d.data.DataSource,P='#=messages.filter# #=messages.into# #=title##if(search){##}##=messages.checkAll##=messages.clearAll##if(messages.selectedItemsFormat){##}#',z=S.extend({init:function(t,n){var i,o;S.fn.init.call(this,t,n),n=this.options,this.element=e(t),i=this.field=this.options.field||this.element.attr(d.attr("field")),o=n.checkSource,this._foreignKeyValues()?(this.checkSource=R.create(n.values),this.checkSource.fetch()):n.forceUnique?(o=e.extend(!0,{},n.dataSource.options),delete o.pageSize,this.checkSource=R.create(o),this.checkSource.reader.data=l(this.checkSource.reader.data,this.field)):this.checkSource=R.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=function(e){return"string"==typeof e&&"null"===e.toLowerCase()?null:parseFloat(e)}: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(_,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('').find(".k-grid-filter")),this._link=t.attr("tabindex",-1).on("click"+b,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(s(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(_,this.checkChangeHandler)),this.form.on("keydown"+F,u(this._keydown,this)).on("submit"+F,u(this._filter,this)).on("reset"+F,u(this._reset,this)),this.trigger(g,{field:this.field,container:this.form})},_attachProgress:function(){var e=this;this._progressHandler=function(){c.progress(e.container,!0)},this._progressHideHandler=function(){c.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&&(this._isMobile?this.view.element.find(".k-select-all")[0].style.visibility=o?"hidden":"":(r[0].parentNode.style.display=o?"none":"",e++));e=0?"":"none",e++},_activate:function(){this.form.find(":kendoFocusable:first").focus(),this.trigger(m,{field:this.field,container:this.form})},_createForm:function(){var t,n=this.options,i="",o=this;this._isMobile||(i+="",n.search&&(i+=""),i+="",n.messages.selectedItemsFormat&&(i+=""+d.format(n.messages.selectedItemsFormat,0)+""),i+="",i+=""+n.messages.filter+"",i+=""+n.messages.clear+"",i+="",i+="",this.form=e('').html(i),this.container=this.form.find(".k-multicheck-wrap")),this._isMobile?(o.form=e("").html(d.template(P)({field:o.field,title:n.title||o.field,ns:d.ns,messages:n.messages,search:n.search,checkAll:n.checkAll})),o.view=o.pane.append(o.form.html()),o.form=o.view.element.find("form"),t=this.view.element,this.container=t.find(".k-multicheck-wrap"),t.on("click",".k-header-done",function(e){o.form.submit(),e.preventDefault()}).on("click",".k-header-cancel",function(e){o._closeForm(),e.preventDefault()}).on("click",".k-clear-all",function(e){o._mobileCheckAll(!1),e.preventDefault()}).on("click",".k-select-all",function(e){o._mobileCheckAll(!0),e.preventDefault()}),o.view.bind("showStart",function(){o.refresh()})):n.appendToElement?(this.popup=this.element.closest(".k-popup").data(f),this.element.append(this.form)):o.popup=o.form.kendoPopup({anchor:o._link,open:u(o._open,o),activate:u(o._activate,o),close:function(){o.options.closeCallback&&o.options.closeCallback(o.element)}}).data(f),n.search&&(this.searchTextBox=this.form.find(".k-textbox > input"),this.searchTextBox.on("input",u(this._input,this)))},createCheckAllItem:function(){var t=this.options,n=d.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(_+F,this.checkAllHandler)},updateCheckAllState:function(){if(this.options.messages.selectedItemsFormat&&this.form.find(".k-filter-selected-items").text(d.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(s(this.dataSource.data(),this.field)),this.container.empty()),this.container.is(":empty")&&this.createCheckBoxes(),this.checkValues(i),this.trigger(v))},getFilterArray:function(){var t,n=e.extend(!0,{},{filters:[],logic:"and"},this.dataSource.filter());return r(n,this.field),t=a(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=d.template(i.itemTemplate(o)),n=d.render(t,e),i.checkAll&&!this._isMobile&&this.createCheckAllItem(),this.container.on(_+F,":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,a=!1;if(!e(i).is(".k-check-all"))for(o=n._parse(e(i).val()),r=0;r#:kendo.format('"+(i?i:"{0}")+"', "+n+")#":"#:kendo.format('"+(i?i:"{0}")+"', "+n+")#"},checkAll:!0,search:!1,ignoreCase:!0,appendToElement:!1,messages:{checkAll:"Select All",clearAll:"Clear All",clear:"Clear",filter:"Filter",search:"Search",cancel:"Cancel",selectedItemsFormat:"{0} items selected",done:"Done",into:"in"},forceUnique:!0,animations:{left:"slide",right:"slide:right"}},events:[g,v,"change",m]});e.extend(z.fn,{_click:M.fn._click,_keydown:M.fn._keydown,_reset:M.fn._reset,_closeForm:M.fn._closeForm,_removeFilter:M.fn._removeFilter,clear:M.fn.clear,_merge:M.fn._merge}),c.plugin(M),c.plugin(z)}(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","kendo.data.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]=S.directions[e].reverse):(i.origin[0]=e,i.position[0]=S.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(U).addClass(Z),t.children("a").addClass(G).children(U).addClass(Z),t.filter(":not([disabled])").addClass(xe),t.filter(".k-separator").empty().append(" "),t.filter("li[disabled]").addClass(Te).removeAttr("disabled").attr("aria-disabled",!0),t.filter("[role]").length||t.attr("role","menuitem"),t.children($).length||t.contents().filter(function(){return!(this.nodeName.match(V)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll(""),a(t),l(t)}function a(t){t=e(t),t.find("> .k-link > [class*=k-i-arrow-60]:not(.k-sprite)").remove(),t.filter(":has(.k-menu-group)").children(".k-link:not(:has([class*=k-i-arrow]:not(.k-sprite)))").each(function(){var t=e(this),n=s(t);t.append("")})}function s(e){var t,n=e.parent().parent(),i=S.support.isRtl(n);return t=n.hasClass(q+"-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(J),t.filter(".k-last:not(:last-child)").removeClass(K),t.filter(":first-child").addClass(J),t.filter(":last-child").addClass(K)}function d(e){var t,n;if(e&&e.length)for(t in e)n=e.eq(t),n.find("ul").length?n.attr("aria-haspopup",!0):n.removeAttr("aria-haspopup")}function c(e){if(!e.hasClass(q))return e.parentsUntil("."+q,"li")}function u(t,n){var i=p(n);i&&h(t,i),n.items&&e(t).children("ul").children("li").each(function(e){u(this,n.items[e])})}function h(t,n){e(t).children(".k-link").data({selectHandler:n})}function p(e){var t=e.select,n=S.isFunction;return t&&n(t)?t:null}function f(e){return e?"li[data-groupparent='"+e+"']":"li[data-groupparent]"}function g(e){var t=e?"[data-group='"+e+"']":"[data-group]";return"ul"+t+",div"+t}function m(t,n){var i=t.find(f()),o=[];return i.each(function(i,r){var a,s;for(r=e(r),a=r.data(we),s=t;a;)s=n.find(g(a)+":visible"),s.length&&o.push(s),r=s.find(f()),a=r.data(we)}),o}function v(t,n){var i=t.data(be);return i?n.find(f(i)):e([])}function _(t,n){var i=t.data(we);return i?n.children(Ee).children(g(i)):e([])}function b(t,n){var i,o,r=[],a=function(e){for(;e.parentNode&&!n.is(e.parentNode);)r.push(e.parentNode),e=e.parentNode},s=t[0]||t;for(a(s),i=r[r.length-1];e(i).is(Ee)&&(o=e(i).children("ul"),s=v(o,n)[0]);)r.push(s),a(s),i=r[r.length-1];return r}function w(e){var t=0;return e.wheelDelta&&(t=-e.wheelDelta/120,t=t>0?Math.ceil(t):Math.floor(t)),e.detail&&(t=Math.round(e.detail/3)),t}function k(e,t){for(var n=0,i=e.parentNode;i&&!isNaN(i[t]);)n+=i[t],i=i.parentNode;return n}function y(e){return se&&e.originalEvent&&e.originalEvent.pointerType in We}function x(e){var t=e.originalEvent;return A&&/touch/i.test(t.type||"")}function C(e){e.contents().filter(function(){return"LI"!=this.nodeName}).remove()}var S=window.kendo,T=S.ui,D=S._activeElement,A=S.support.touch&&S.support.mobileOS,I=e.isArray,E=S.data.HierarchicalDataSource,M="mousedown",F="click",R=30,P=50,z=e.extend,B=e.proxy,L=e.each,H=S.template,N=S.keys,O=T.Widget,V=/^(ul|a|div)$/i,W=".kendoMenu",U="img",j="open",q="k-menu",G="k-link k-menu-link",$=".k-link",Y=".k-menu-expand-arrow",K="k-last",Q="close",X="timer",J="k-first",Z="k-image",ee="select",te="zIndex",ne="activate",ie="deactivate",oe="touchstart"+W+" MSPointerDown"+W+" pointerdown"+W,re=S.support.pointers,ae=S.support.msPointers,se=ae||re,le="change",de="error",ce=S.support.touch?"touchstart":"",ue=re?"pointerover":ae?"MSPointerOver":"mouseenter",he=re?"pointerout":ae?"MSPointerOut":"mouseleave",pe="DOMMouseScroll"+W+" mousewheel"+W,fe=S.support.resize+W,ge="scrollWidth",me="scrollHeight",ve="offsetWidth",_e="offsetHeight",be="group",we="groupparent",ke=e(document.documentElement),ye="kendoPopup",xe="k-state-default",Ce="k-state-hover",Se="k-state-focused",Te="k-state-disabled",De="k-state-selected",Ae=".k-menu",Ie=".k-menu-group",Ee=".k-animation-container",Me=Ie+","+Ee,Fe=":not(.k-list) > .k-item",Re=".k-item.k-state-disabled",Pe=".k-item",ze=".k-item:not(.k-state-disabled)",Be=".k-item:not(.k-state-disabled) > .k-link",Le=":not(.k-item.k-separator)",He=Pe+Le+":eq(0)",Ne=Pe+Le+":last",Oe="div:not(.k-animation-container,.k-list-container)",Ve=".k-menu-scroll-button",We={2:1,touch:1},Ue="string",je="dataBound",qe={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField",imageAttr:"dataImageAttrField",content:"dataContentField"},Ge={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+=" "+De),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&&e.toJSON?e.toJSON():{};i["class"]?i["class"]+=" "+Z:i["class"]=Z;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 G},arrowClass:function(e,t){var n="k-icon";return n+=t.horizontal?" k-i-arrow-60-down":" k-i-arrow-60-right"},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:" "}},$e=S.ui.DataBoundWidget.extend({init:function(e,t){var n=this;O.fn.init.call(n,e,t),e=n.wrapper=n.element,t=n.options,n._accessors(),n._templates(),n._dataSource(),n._updateClasses(),n._animations(t),n.nextItemZIndex=100,n._tabindex(),n._initOverflow(t),n._attachMenuEventsHandlers(),t.openOnClick&&(n.clicked=!1),e.attr("role","menubar"),e[0].id&&(n._ariaId=S.format("{0}_mn_active",e[0].id)),S.notify(n)},events:[j,Q,ne,ie,ee,je],options:{name:"Menu",animation:{open:{duration:200},close:{duration:100}},orientation:"horizontal",direction:"default",openOnClick:!1,closeOnClick:!0,hoverDelay:100,scrollable:!1,popupCollision:t},_initData:function(){var e=this;e.dataSource&&(e.angular("cleanup",function(){return{elements:e.element.children()}}),e.element.empty(),e.append(e.dataSource.view(),e.element),e.angular("compile",function(){return{elements:e.element.children()}}))},_attachMenuEventsHandlers:function(){var t=this,n=t.element,i=t.options,o=t._overflowWrapper();(o||n).on(oe,Pe,B(t._focusHandler,t)).on(F+W,Re,!1).on(F+W,Pe,B(t._click,t)).on(oe+" "+M+W,".k-content",B(t._preventClose,t)).on(ue+W,ze,B(t._mouseenter,t)).on(he+W,ze,B(t._mouseleave,t)).on(M+W,ze,B(t._mousedown,t)).on(ce+W+" "+ue+W+" "+he+W+" "+M+W+" "+F+W,Be,B(t._toggleHover,t)),n.on("keydown"+W,B(t._keydown,t)).on("focus"+W,B(t._focus,t)).on("focus"+W,".k-content",B(t._focus,t)).on("blur"+W,B(t._removeHoverItem,t)).on("blur"+W,"[tabindex]",B(t._checkActiveElement,t)),o&&o.on(he+W,Me,B(t._mouseleavePopup,t)).on(ue+W,Me,B(t._mouseenterPopup,t)),i.openOnClick&&(t._documentClickHandler=B(t._documentClick,t),e(document).click(t._documentClickHandler))},_detachMenuEventsHandlers:function(){var t=this,n=t._overflowWrapper();n&&n.off(W),t.element.off(W),t._documentClickHandler&&e(document).unbind("click",t._documentClickHandler)},_initOverflow:function(t){var n,i,o,r,a=this,s="horizontal"==t.orientation;t.scrollable&&(a._openedPopups={},a._scrollWrapper=a.element.wrap("").parent(),s&&C(a.element),n=e(a.templates.scrollButton({direction:s?"left":"up"})),i=e(a.templates.scrollButton({direction:s?"right":"down"})),n.add(i).appendTo(a._scrollWrapper),a._initScrolling(a.element,n,i,s),o=a.element.outerWidth(),r=a.element[0].style.width,r="auto"===r?"":r,s&&e(window).on(fe,S.throttle(function(){a._setOverflowWrapperWidth(o,r),a._toggleScrollButtons(a.element,n,i,s)},100)),a._setOverflowWrapperWidth(o,r),a._toggleScrollButtons(a.element,n,i,s))},_overflowWrapper:function(){return this._scrollWrapper||this._popupsWrapper},_setOverflowWrapperWidth:function(e,t){var n,i,o,r,a=this,s=a._scrollWrapper.css("width");a._scrollWrapper.css({width:""}),n=a._scrollWrapper.outerWidth(),a._scrollWrapper.css({width:s}),i=a.element.outerWidth(),o=a.element[0].offsetWidth-a.element[0].clientWidth,i!=n&&n>0&&(r=t?Math.min(e,n):n,a.element.width(r-o),a._scrollWrapper.width(r))},_reinitOverflow:function(e){var t=this,n=e.scrollable&&!t.options.scrollable||!e.scrollable&&t.options.scrollable||e.scrollable&&t.options.scrollable&&e.scrollable.distance!=t.options.scrollable.distance||e.orientation!=t.options.orientation;n&&(t._detachMenuEventsHandlers(),t._destroyOverflow(),t._initOverflow(e),t._attachMenuEventsHandlers())},_destroyOverflow:function(){var n=this,i=n._overflowWrapper();i&&(i.off(W),i.find(Ve).off(W).remove(),i.children(Ee).each(function(t,n){var o,r=e(n).children(Ie);r.off(pe),o=v(r,i),o.length&&o.append(n)}),i.find(f()).removeAttr("data-groupparent"),i.find(g()).removeAttr("data-group"),n.element.off(pe),e(window).off(fe),i.contents().unwrap(),n._scrollWrapper=n._popupsWrapper=n._openedPopups=t)},_initScrolling:function(t,n,i,o){var r=this,a=r.options.scrollable,s=e.isNumeric(a.distance)?a.distance:P,l=s/2,d="-="+s,c="+="+s,u="-="+2*s,h="+="+2*s,p=!1,f=!1,g=function(e){var a=o?{scrollLeft:e}:{scrollTop:e};t.finish().animate(a,"fast","linear",function(){p&&g(e)}),r._toggleScrollButtons(t,n,i,o)},m=function(e){p||f||(g(e.data.direction),p=!0)},v=function(a){var s=o?{scrollLeft:a.data.direction}:{scrollTop:a.data.direction};f=x(a)||y(a),t.stop().animate(s,"fast","linear",function(){f?(r._toggleScrollButtons(t,n,i,o),p=!0):e(a.currentTarget).trigger(ue)}),p=!1,a.stopPropagation(),a.preventDefault()};n.on(ue+W,{direction:d},m).on(S.eventMap.down+W,{direction:u},v),i.on(ue+W,{direction:c},m).on(S.eventMap.down+W,{direction:h},v),n.add(i).on(he+W,function(){t.stop(),p=!1,r._toggleScrollButtons(t,n,i,o)}),t.on(pe,function(e){var a,s,d,c;e.ctrlKey||e.shiftKey||e.altKey||(a=w(e.originalEvent),s=Math.abs(a)*l,d=(a>0?"+=":"-=")+s,c=o?{scrollLeft:d}:{scrollTop:d},r._closeChildPopups(t),t.finish().animate(c,"fast","linear",function(){r._toggleScrollButtons(t,n,i,o)}),e.preventDefault())})},_toggleScrollButtons:function(e,t,n,i){var o=i?e.scrollLeft():e.scrollTop(),r=i?ge:me,a=i?ve:_e;t.toggle(0!==o),n.toggle(oul").addClass("k-menu-group").attr("role","menu"),o=o.filter("li"),o.add(a.find("> li")).each(function(){r(this)})),{items:o,group:i}},remove:function(e){var t,n,i,o,r;return e=this.attemptGetItem(e),t=this,n=e.parentsUntil(t.element,Fe),i=e.parent("ul:not(.k-menu)"),e.remove(),i&&!i.children(Fe).length&&(o=c(i),r=i.parent(Ee),r.length?r.remove():i.remove(),d(o)),n.length&&(n=n.eq(0),a(n),l(n)),t},_openAfterLoad:function(e,t){var n=this;t.loaded()?(n.open(e),n._loading=!1):t.one(le,function(){e.find(Y).removeClass("k-i-loading"),n._loading&&(n.open(e),n._loading=!1)})},open:function(o){var r,a,s,l=this,d=l.options,c="horizontal"==d.orientation,u=d.direction,h=S.support.isRtl(l.wrapper),p=l._overflowWrapper();return o=(p||l.element).find(o),r=l.dataSource&&l.dataSource.getByUid(o.data(S.ns+"uid")),r&&r.hasChildren&&!r.loaded()&&!l._loading?(l._loading=!0,o.find(Y).addClass("k-i-loading"),r.load(),l._openAfterLoad(o,r),t):(/^(top|bottom|default)$/.test(u)&&(u=h?c?(u+" left").replace("default","bottom"):"left":c?(u+" right").replace("default","bottom"):"right"),a=">.k-popup:visible,>.k-animation-container>.k-popup:visible",s=function(){var t=e(this).data(ye);t&&l.close(e(this).closest("li.k-item"),!0)},o.siblings().find(a).each(s),p&&o.find(a).each(s),l.options.openOnClick&&(l.clicked=!0),o.each(function(){var o=e(this);clearTimeout(o.data(X)),o.data(X,setTimeout(function(){var r,a,s,g,m,v,_,b,w,k,y=o.find(".k-menu-group:first:hidden");!y[0]&&p&&(a=l._getPopup(o),y=a&&a.element),y.is(":visible")||y[0]&&l._triggerEvent({item:o[0],type:j})===!1&&(!y.find(".k-menu-group")[0]&&y.children(".k-item").length>1?(s=e(window).height(),g=function(){y.css({maxHeight:s-(S._outerHeight(y)-y.height())-S.getShadows(y).bottom,overflow:"auto"})},S.support.browser.msie&&S.support.browser.version<=7?setTimeout(g,0):g()):y.css({maxHeight:"",overflow:""}),o.data(te,o.css(te)),m=l.nextItemZIndex++,o.css(te,m),l.options.scrollable&&o.parent().siblings(Ve).css({zIndex:++m}),r=y.data(ye),v=o.parent().hasClass(q),_=v&&c,b=i(u,v,h),w=d.animation.open.effects,k=w!==t?w:"slideIn:"+n(u,v),r?(r=y.data(ye),r.options.origin=b.origin,r.options.position=b.position,r.options.animation.open.effects=k):r=y.kendoPopup({activate:function(){l._triggerEvent({item:this.wrapper.parent(),type:ne})},deactivate:function(e){l._closing=!1,e.sender.element.removeData("targetTransform").css({opacity:""}),l._triggerEvent({item:this.wrapper.parent(),type:ie})},origin:b.origin,position:b.position,collision:d.popupCollision!==t?d.popupCollision:_?"fit":"fit flip",anchor:o,appendTo:p||o,animation:{open:z(!0,{effects:k},d.animation.open),close:d.animation.close},open:B(l._popupOpen,l),close:function(e){var t,n;l._closing=!0,t=e.sender.wrapper.parent(),p&&(n=e.sender.element.data(be),n&&(t=(p||l.element).find(f(n))),e.sender.wrapper.children(Ve).hide()),l._triggerEvent({item:t[0],type:Q})?e.preventDefault():(t.css(te,t.data(te)),t.removeData(te),l.options.scrollable&&t.parent().siblings(Ve).css({zIndex:""}),(A||se||S.support.mouseAndTouchPresent)&&(t.removeClass(Ce),l._removeHoverItem()))}}).data(ye),y.removeAttr("aria-hidden"),l._configurePopupOverflow(r,o),r._hovered=!0,r.open(),l._initPopupScrolling(r))},l.options.hoverDelay))}),l)},_configurePopupOverflow:function(e,t){var n,i=this;i.options.scrollable&&(i._wrapPopupElement(e),t.attr("data-groupparent")||(n=(new Date).getTime(),t.attr("data-groupparent",n),e.element.attr("data-group",n)))},_wrapPopupElement:function(e){e.element.parent().is(Ee)||(e.wrapper=S.wrap(e.element,e.options.autosize).css({overflow:"hidden",display:"block",position:"absolute"}))},_initPopupScrolling:function(e,t,n){var i=this;i.options.scrollable&&e.element[0].scrollHeight>e.element[0].offsetHeight&&i._initPopupScrollButtons(e,t,n)},_initPopupScrollButtons:function(t,n,i){var o=this,r=t.wrapper.children(Ve),a=o.options.animation,s=(a&&a.open&&a.open.duration||0)+R;setTimeout(function(){var a,s;r.length||(a=e(o.templates.scrollButton({direction:n?"left":"up"})),s=e(o.templates.scrollButton({direction:n?"right":"down"})),r=a.add(s).appendTo(t.wrapper),o._initScrolling(t.element,a,s,n),i||r.on(ue+W,function(){var n=o._overflowWrapper();e(m(t.element,n)).each(function(e,t){var i=n.find(f(t.data(be)));o.close(i)})}).on(he+W,function(){setTimeout(function(){e.isEmptyObject(o._openedPopups)&&o._closeParentPopups(t.element)},R)})),o._toggleScrollButtons(t.element,r.first(),r.last(),n)},s)},_popupOpen:function(e){this._keyTriggered||e.sender.element.children("."+Se).removeClass(Se),this.options.scrollable&&this._setPopupHeight(e.sender)},_setPopupHeight:function(t,n){var i,o,r,a,s,l,d,c,u,h=t.element,p=h.add(h.parent(Ee));p.height(h.hasClass(q)&&this._initialHeight||""),i=t._location(n),o=e(window).height(),r=i.height,a=n?0:Math.max(i.top,0),s=n?0:k(this._overflowWrapper()[0],"scrollTop"),l=window.innerHeight-o,d=o-S.getShadows(h).bottom+l,c=d+s>r+a,c||(u=Math.min(d,d-a+s),p.css({overflow:"hidden",height:u+"px"}))},close:function(t,n){var i,o,r=this,a=r._overflowWrapper(),s=a||r.element;return t=s.find(t),t.length||(t=s.find(">.k-item")),i=function(t){var n=!1;return e.isEmptyObject(r._openedPopups)?n:(e(m(t,a)).each(function(e,t){return n=!!r._openedPopups[""+t.data(be)],!n}),n)},o=function(e){var t=e.data(we);return!a||!t||!r._openedPopups[""+t]},t.each(function(){var s=e(this);!n&&r._isRootItem(s)&&(r.clicked=!1),clearTimeout(s.data(X)),s.data(X,setTimeout(function(){var e=r._getPopup(s);if(e&&(o(s)||r._forceClose)){if(!r._forceClose&&i(e.element))return;e.close(),e.element.attr("aria-hidden",!0),a&&r._forceClose&&t.last().is(s[0])&&delete r._forceClose}},r.options.hoverDelay))}),r},_getPopup:function(e){var t,n,i=this,o=e.find(".k-menu-group:not(.k-list-container):not(.k-calendar-container):first:visible").data(ye),r=i._overflowWrapper();return!o&&r&&(t=e.data(we),t&&(n=r.find(g(t)),o=n.data(ye))),o},_toggleDisabled:function(t,n){this.element.find(t).each(function(){e(this).toggleClass(xe,n).toggleClass(Te,!n).attr("aria-disabled",!n)})},_toggleHover:function(t){var n=e(S.eventTarget(t)||t.target).closest(Fe),i=t.type==ue||M.indexOf(t.type)!==-1;n.siblings().removeClass(Ce),n.parents("li."+Te).length||n.toggleClass(Ce,i||"mousedown"==t.type||"pointerover"==t.type||t.type==ce),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,S._activeElement())||!t||o(r,t.currentTarget))||n.close(r)},0),this._closurePrevented=!1},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(Se)&&(e.removeClass(Se),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 "+q).addClass(q+"-"+this.options.orientation),t.find("li > ul").filter(function(){return!S.support.matchesSelector.call(this,n)}).addClass("k-group k-menu-group").attr("role","menu").attr("aria-hidden",t.is(":visible")).parent("li").attr("aria-haspopup","true").end().find("li > div").addClass("k-content").attr("tabindex","-1"),e=t.find("> li,.k-menu-group > li"),t.removeClass("k-menu-init"),e.each(function(){r(this)})},_mouseenter:function(t){var n=this,i=e(t.currentTarget),r=n._itemHasChildren(i),a=i.data(we)||i.parent().data(be),s=y(t);a&&(n._openedPopups[""+a]=!0),n._closing||t.delegateTarget!=i.parents(Ae)[0]&&t.delegateTarget!=i.parents(".k-menu-scroll-wrapper,.k-popups-wrapper")[0]||(n._keyTriggered=!1,n.options.openOnClick.rootMenuItems&&n._isRootItem(i.closest(Fe))||n.options.openOnClick.subMenuItems&&!n._isRootItem(i.closest(Fe))||(!(n.options.openOnClick===!1||n.options.openOnClick.rootMenuItems===!1&&n._isRootItem(i.closest(Fe))||n.options.openOnClick.subMenuItems===!1&&!n._isRootItem(i.closest(Fe))||n.clicked)||A||s&&n._isRootItem(i.closest(Fe))||!o(t.currentTarget,t.relatedTarget)&&r&&n.open(i),(n.options.openOnClick===!0&&n.clicked||A)&&i.siblings().each(B(function(e,t){n.close(t,!0)},n))))},_mousedown:function(t){var n=this,i=e(t.currentTarget);(n.options.openOnClick.subMenuItems&&!n._isRootItem(i)||A)&&i.siblings().each(B(function(e,t){n.close(t,!0)},n))},_mouseleave:function(n){var i=this,r=e(n.currentTarget),a=r.data(we),s=r.children(Ee).length||r.children(Ie).length||a,l=e(window);return a&&delete i._openedPopups[""+a],r.parentsUntil(Ee,".k-list-container,.k-calendar-container")[0]?(n.stopImmediatePropagation(),t):i.options.openOnClick!==!1&&(i.options.openOnClick.rootMenuItems||!i._isRootItem(r))&&(i.options.openOnClick.subMenuItems||i._isRootItem(r))||A||y(n)||o(n.currentTarget,n.relatedTarget||n.target)||!s||o(n.currentTarget,S._activeElement())?((S.support.browser.msie&&!n.toElement&&!n.relatedTarget&&!y(n)||n.clientX<0||n.clientY<0||n.clientY>l.height()||n.clientX>l.width())&&i.close(r),t):(i.close(r,!0),i._loading=!1,t)},_mouseenterPopup:function(t){var n,i=this,o=e(t.currentTarget);o.parent().is(Ee)||(o=o.children("ul"),n=o.data(be),n&&(i._openedPopups[""+n]=!0))},_mouseleavePopup:function(t){var n=this,i=e(t.currentTarget);!y(t)&&i.is(Ee)&&n._closePopups(i.children("ul"))},_closePopups:function(t){var n,i=this,o=i._overflowWrapper(),r=t.data(be);r&&(delete i._openedPopups[""+r],n=o.find(f(r)),setTimeout(function(){if(i.options.openOnClick)i._closeChildPopups(t);else if(e.isEmptyObject(i._openedPopups)){var o=i._innerPopup(t);i._closeParentPopups(o)}else i.close(n,!0)},0))},_closeChildPopups:function(t){var n=this,i=n._overflowWrapper();e(m(t,i)).each(function(){var e=i.find(f(this.data(be)));n.close(e,!0)})},_innerPopup:function(e){var t=this._overflowWrapper(),n=m(e,t);return n[n.length-1]||e},_closeParentPopups:function(e){var t=this,n=t._overflowWrapper(),i=e.data(be),o=n.find(f(i));for(i=o.parent().data(be),t.close(o,!0);i&&!t._openedPopups[i]&&!o.parent().is(Ae);)o=n.find(f(i)),t.close(o,!0),i=o.parent().data(be)},_click:function(n){for(var i,o,r,a,s,l,d=this,c=d.options,u=e(S.eventTarget(n)),h=u[0],p=u[0]?u[0].nodeName.toUpperCase():"",f="INPUT"==p||"SELECT"==p||"BUTTON"==p||"LABEL"==p,m=u.closest($),v=u.closest(Fe),_=v[0],b=m.attr("href"),w=u.attr("href"),k=e("").attr("href"),x=!!b&&b!==k,C=x&&!!b.match(/^#/),T=!!w&&w!==k,D=d._overflowWrapper();h&&h.parentNode!=_;)h=h.parentNode;if(!e(h).is(Oe)){if(v.hasClass(Te))return n.preventDefault(),t;if(n.handled||!d._triggerSelect(u,_)||f||n.preventDefault(),n.handled=!0,o=v.children(Me),D&&(s=v.data(we),s&&(o=D.find(g(s)))),r=o.is(":visible"),a=c.openOnClick&&r&&d._isRootItem(v),c.closeOnClick&&(!x||C)&&(!o.length||a))return v.removeClass(Ce).css("height"),d._oldHoverItem=d._findRootParent(v),l=d._parentsUntil(m,d.element,Fe),d._forceClose=!!D,d.close(l),d.clicked=!1,"MSPointerUp".indexOf(n.type)!=-1&&n.preventDefault(),t;x&&n.enterKey&&m[0].click(),(d._isRootItem(v)&&c.openOnClick!==!1||c.openOnClick.subMenuItems||S.support.touch||y(n)&&d._isRootItem(v.closest(Fe)))&&(x||f||T||n.preventDefault(),d.clicked=!0,i=o.is(":visible")?Q:j,(c.closeOnClick||i!=Q)&&d[i](v))}},_parentsUntil:function(n,i,o){var r,a,s=this._overflowWrapper();return s?(r=b(n,s),a=[],e(r).each(function(){var n=e(this);return!n.is(i)&&(n.is(o)&&a.push(this),t)}),e(a)):n.parentsUntil(i,o)},_triggerSelect:function(e,t){var n,i,o,r;return e=e.is(".k-link")?e:e.closest(".k-link"),n=e.data("selectHandler"),n&&(i=this._getEventData(e),n.call(this,i)),o=i&&i.isDefaultPrevented(),r=this._triggerEvent({item:t,type:ee}),o||r},_getEventData:function(e){var t={sender:this,target:e,_defaultPrevented:!1,preventDefault:function(){this._defaultPrevented=!0},isDefaultPrevented:function(){return this._defaultPrevented}};return t},_documentClick:function(e){var t=this;o((t._overflowWrapper()||t.element)[0],e.target)||(t.clicked=!1)},_focus:function(n){var i=this,o=n.target,r=i._hoverItem(),a=D();return o==i.wrapper[0]||e(o).is(":kendoFocusable")?(a===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(Se),i.wrapper.focus(),t)},_keydown:function(e){var n,i,o,r=this,a=e.keyCode,s=r._oldHoverItem,l=S.support.isRtl(r.wrapper);if(e.target==e.currentTarget||a==N.ESC){if(s||(s=r._oldHoverItem=r._hoverItem()),i=r._itemBelongsToVertival(s),o=r._itemHasChildren(s),r._keyTriggered=!0,a==N.RIGHT)n=r[l?"_itemLeft":"_itemRight"](s,i,o);else if(a==N.LEFT)n=r[l?"_itemRight":"_itemLeft"](s,i,o);else if(a==N.DOWN)n=r._itemDown(s,i,o);else if(a==N.UP)n=r._itemUp(s,i,o);else if(a==N.HOME)r._moveHover(s,s.parent().children().first()),e.preventDefault();else if(a==N.END)r._moveHover(s,s.parent().children().last()),e.preventDefault();else if(a==N.ESC)n=r._itemEsc(s,i);else if(a==N.ENTER||a==N.SPACEBAR)n=s.children(".k-link"),n.length>0&&(r._click({target:n[0],preventDefault:function(){},enterKey:!0}),o&&!s.hasClass(Te)?(r.open(s),r._moveHover(s,r._childPopupElement(s).children().first())):r._moveHover(s,r._findRootParent(s)));else if(a==N.TAB)return n=r._findRootParent(s),r._moveHover(s,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&&e.length&&e[0].nodeType)&&(e.children(".k-menu-group, div.k-animation-container").length>0||!!e.data(we)&&!!this._overflowWrapper().children(g(e.data(we))))},_moveHover:function(t,n){var i=this,o=i._ariaId;t.length&&n.length&&t.removeClass(Se),n.length&&(n[0].id&&(o=n[0].id),n.addClass(Se),i._oldHoverItem=n,o&&(i.element.removeAttr("aria-activedescendant"),e("#"+o).removeAttr("id"),n.attr("id",o),i.element.attr("aria-activedescendant",o)),i._scrollToItem(n))},_findRootParent:function(e){return this._isRootItem(e)?e:this._parentsUntil(e,Ae,"li.k-item").last()},_isRootItem:function(e){return e.parent().hasClass(q)},_itemRight:function(e,t,n){var i,o,r,a,s=this;return t?n&&!e.hasClass(Te)?(s.open(e),i=s._childPopupElement(e).children().first()):"horizontal"==s.options.orientation&&(o=s._findRootParent(e),r=s._overflowWrapper(),r&&(a=_(o,r),s._closeChildPopups(a)),s.close(o),i=o.nextAll(He)):(i=e.nextAll(He),i.length||(i=e.prevAll(Ne)),s.close(e)),i&&!i.length?i=s.wrapper.children(".k-item").first():i||(i=[]),s._moveHover(e,i),i},_itemLeft:function(e,t){var n,i,o=this;return t?(n=e.parent().closest(".k-item"),i=o._overflowWrapper(),!n.length&&i&&(n=v(e.parent(),i)),o.close(n),o._isRootItem(n)&&"horizontal"==o.options.orientation&&(n=n.prevAll(He))):(n=e.prevAll(He),n.length||(n=e.nextAll(Ne)),o.close(e)),n.length||(n=o.wrapper.children(".k-item").last()),o._moveHover(e,n),n},_itemDown:function(e,t,n){var i,o=this;if(t)i=e.nextAll(He);else{if(!n||e.hasClass(Te))return;o.open(e),i=o._childPopupElement(e).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(He),!n.length&&e.length?n=e.parent().children().last():e.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_scrollToItem:function(e){var t,n,i,o,r,a,s,l,d,c,u,h,p=this;p.options.scrollable&&e&&e.length&&(t=e.parent(),n=!!t.hasClass(q)&&"horizontal"==p.options.orientation,i=n?"scrollLeft":"scrollTop",o=n?S._outerWidth:S._outerHeight,r=t[i](),a=o(e),s=e[0][n?"offsetLeft":"offsetTop"],l=o(t),d=t.siblings(Ve),c=d.length?o(d.first()):0,r+ls-c&&(u=s-c),isNaN(u)||(h={},h[i]=u,t.finish().animate(h,"fast","linear",function(){p._toggleScrollButtons(t,d.first(),d.last(),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},_childPopupElement:function(e){var t=e.find(".k-menu-group"),n=this._overflowWrapper();return!t.length&&n&&(t=_(e,n)),t},_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(S.eventTarget(t)).closest(Fe);i.hasClass(Te)||setTimeout(function(){n._moveHover([],i),i.children(".k-content")[0]&&i.parent().closest(".k-item").removeClass(Se)},200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})},_dataSource:function(e){var t=this,n=e?e.dataSource:t.options.dataSource;n&&(n=I(n)?{data:n}:n,t._unbindDataSource(),n.fields||(n.fields=[{field:"uid"},{field:"text"},{field:"url"},{field:"cssClass"},{field:"spriteCssClass"},{field:"imageUrl"},{field:"imageAttr"},{field:"attr"},{field:"contentAttr"},{field:"content"},{field:"encoded"},{field:"items"},{field:"select"}]),t.dataSource=E.create(n),t._bindDataSource(),t.dataSource.fetch())},_bindDataSource:function(){this._refreshHandler=B(this.refresh,this),this._errorHandler=B(this._error,this),this.dataSource.bind(le,this._refreshHandler),this.dataSource.bind(de,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(le,this._refreshHandler),e.unbind(de,this._errorHandler))},_error:function(){},findByUid:function(e){var t=this._overflowWrapper()||this.element;return t.find("["+S.attr("uid")+"="+e+"]")},refresh:function(t){var n=this,i=t.node,o=t.action,r=i?n.findByUid(i.uid):n.element,a=t.items,s=t.index,l=e.proxy(n._updateItem,n),d=e.proxy(n._removeItem,n);"add"==o?n._appendItems(a,s,r):"remove"==o?a.forEach(d):"itemchange"==o?a.forEach(l):"itemloaded"===o?n.append(t.items,r):this._initData(),this.trigger(je,{item:r,dataItem:i})},_appendItems:function(e,t,n){var i=this,o=n.find(Pe).eq(t);o.length?i.insertBefore(e,o):i.append(e,n)},_removeItem:function(e){var t=this,n=t.findByUid(e.uid);t.remove(n)},_updateItem:function(e){var t=this,n=t.findByUid(e.uid),i=n.next(),o=e.parentNode();t.remove(n),i.length?t.insertBefore(e,i):t.append(e,o&&t.findByUid(o.uid))},_accessors:function(){var e,t,n,i=this,o=i.options,r=i.element;for(e in qe)t=o[qe[e]],n=r.attr(S.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),I(t)||(t=[t]),o[qe[e]]=t},_fieldAccessor:function(t){var n=this.options[qe[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 "+S.expr(e)+"}"}).join(",")+"];",o+="if(item.level){return levels[Math.min(item.level(), "+i+"-1)](item);}else",o+="{return levels["+i+"-1](item)}"),o+="})"},_templates:function(){var e=this,t=e.options,n=B(e._fieldAccessor,e);t.template&&typeof t.template==Ue?t.template=H(t.template):t.template||(t.template=H("# var text = "+n("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")),e.templates={content:H("#var contentHtml = "+n("content")+"(item);##= contentHtml || '' #"),group:H("#= renderItems(data) #"),itemWrapper:H("# var url = "+n("url")+"(item); ## var imageUrl = "+n("imageUrl")+"(item); ## var imgAttributes = "+n("imageAttr")+"(item);## var tag = url ? 'a' : 'span' #<#= tag # class='#= textClass(item) #' #if(url){#href='#= url #'#}#># if (imageUrl) { ## } ##= sprite(item) ##= data.menu.options.template(data) ##= arrow(data) ##= tag #>"),item:H("#var contentHtml = "+n("content")+"(item);##= itemWrapper(data) ##if (item.hasChildren || item.items) { ##= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl || contentHtml) { ##= renderContent(data) ## } #"),scrollButton:H(""),arrow:H(""),sprite:H("# var spriteCssClass = "+n("spriteCssClass")+"(data); if(spriteCssClass) {##}#"),empty:H("")}},renderItem:function(e){var t,n,i=this;return e=z({menu:i,group:{}},e),t=i.templates.empty,n=e.item,i.templates.item(z(e,{sprite:i.templates.sprite,itemWrapper:i.templates.itemWrapper,renderContent:i.renderContent,arrow:n.items||n.content||n[i.options.dataContentField[0]]?i.templates.arrow:t,subGroup:i.renderGroup},Ge))},renderGroup:function(e){var t=this,n=t.templates||e.menu.templates;return n.group(z({renderItems:function(e){for(var t="",n=0,i=e.items,o=i?i.length:0,r=z({length:o},e.group);n").parent(),"horizontal"==t.options.orientation&&C(t.element),e.appendTo&&e.appendTo.append(t._popupsWrapper),t._initialHeight=t.element[0].style.height,t._initialWidth=t.element[0].style.width)},options:{name:"ContextMenu",filter:null,showOn:"contextmenu",orientation:"vertical",alignToAnchor:!1,copyAnchorStyles:!0,target:"body"},events:[j,Q,ne,ie,ee],setOptions:function(t){var n=this;$e.fn.setOptions.call(n,t),n.target.off(n.showOn+W+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(),$e.fn.setOptions.call(this,t)},destroy:function(){var e=this;e.target.off(e.options.showOn+W+e._marker),ke.off(S.support.mousedown+W+e._marker,e._closeProxy),e.userEvents&&e.userEvents.destroy(),$e.fn.destroy.call(e)},open:function(n,i){var r,a,s=this;return n=e(n)[0],o(s.element[0],e(n)[0])||s._itemHasChildren(e(n))?$e.fn.open.call(s,n):s._triggerEvent({item:s.element,type:j})===!1&&(s.popup.visible()&&s.options.filter&&(s.popup.close(!0),s.popup.element.kendoStop(!0)),i!==t?(r=s._overflowWrapper(),r&&(a=r.offset(),n-=a.left,i-=a.top),s.popup.wrapper.hide(),s._configurePopupScrolling(n,i),s.popup.open(n,i)):(s.popup.options.anchor=(n?n:s.popup.anchor)||s.target,s.popup.element.kendoStop(!0),s._configurePopupScrolling(),s.popup.open()),ke.off(s.popup.downEvent,s.popup._mousedownProxy),ke.on(S.support.mousedown+W+s._marker,s._closeProxy)),s},_configurePopupScrolling:function(e,n){var i=this,o=i.popup,r="horizontal"==i.options.orientation;i.options.scrollable&&(i._wrapPopupElement(o),o.element.parent().css({position:"",height:""}),o.element.css({visibility:"hidden",display:"",position:""}),r?i._setPopupWidth(o,isNaN(e)?t:{isFixed:!0,x:e,y:n}):i._setPopupHeight(o,isNaN(e)?t:{isFixed:!0,x:e,y:n}),o.element.css({visibility:"",display:"none",position:"absolute"}),i._initPopupScrollButtons(o,r,!0),o.element.siblings(Ve).hide())},_setPopupWidth:function(t,n){var i,o,r,a,s,l,d,c,u=t.element,h=u.add(u.parent(Ee));h.width(this._initialWidth||""),i=t._location(n),o=e(window).width(),r=i.width,a=Math.max(i.left,0),s=n?0:k(this._overflowWrapper()[0],"scrollLeft"),l=S.getShadows(u),d=o-l.left-l.right,c=d+s>r+a,c||h.css({overflow:"hidden",width:d-a+s+"px"})},close:function(){var t=this;o(t.element[0],e(arguments[0])[0])||t._itemHasChildren(arguments[0])?$e.fn.close.call(t,arguments[0]):t.popup.visible()&&t._triggerEvent({item:t.element,type:Q})===!1&&(t.popup.close(),ke.off(S.support.mousedown+W+t._marker,t._closeProxy),t.unbind(ee,t._closeTimeoutProxy))},_showHandler:function(t){var n,i=t,r=this,a=r.options,s=e(S.support.mobileOS?i.target:i.currentTarget);t.event&&(i=t.event,i.pageX=t.x.location,i.pageY=t.y.location),o(r.element[0],t.relatedTarget||t.target)||(r._eventOrigin=i,i.preventDefault(),i.stopImmediatePropagation(),r.element.find("."+Se).removeClass(Se),(a.filter&&s.is(a.filter)||!a.filter)&&(a.alignToAnchor?(r.popup.options.anchor=i.currentTarget,r.open(i.currentTarget)):(r.popup.options.anchor=i.currentTarget,r._targetChild?(n=r.target.offset(),r.open(i.pageX-n.left,i.pageY-n.top)):r.open(i.pageX,i.pageY))))},_closeHandler:function(t){var n,i=this,r=e(t.relatedTarget||t.target),a=r.closest(i.target.selector)[0]==i.target[0],s=r.closest(Pe),l=i._itemHasChildren(s),d=i._overflowWrapper(),c=o(i.element[0],r[0])||d&&o(d[0],r[0]);i._eventOrigin=t,n=3!==t.which,i.popup.visible()&&(n&&a||!a)&&(i.options.closeOnClick&&!l&&c||!c)&&(c?(this.unbind(ee,this._closeTimeoutProxy),i.bind(ee,i._closeTimeoutProxy)):i.close())},_wire:function(){var e=this,t=e.options,n=e.target;e._showProxy=B(e._showHandler,e),e._closeProxy=B(e._closeHandler,e),e._closeTimeoutProxy=B(e.close,e),n[0]&&(S.support.mobileOS&&"contextmenu"==t.showOn?(e.userEvents=new S.UserEvents(n,{filter:t.filter,allowSelection:!1}),n.on(t.showOn+W+e._marker,!1),e.userEvents.bind("hold",e._showProxy)):t.filter?n.on(t.showOn+W+e._marker,t.filter,e._showProxy):n.on(t.showOn+W+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,z({type:n.type,item:n.item||this.element[0],target:o},r?{event:r}:{}))},_popup:function(){var t=this,n=t._overflowWrapper();t._triggerProxy=B(t._triggerEvent,t),t.popup=t.element.addClass("k-context-menu").kendoPopup({autosize:"horizontal"===t.options.orientation,anchor:t.target||"body",copyAnchorStyles:t.options.copyAnchorStyles,collision:t.options.popupCollision||"fit",animation:t.options.animation,activate:t._triggerProxy,deactivate:t._triggerProxy,appendTo:n||t.options.appendTo,close:n?function(t){e(m(t.sender.element,n)).each(function(e,t){var n=t.data(ye);n&&n.close(!0)})}:e.noop}).data(ye),t._targetChild=o(t.target[0],t.popup.element[0])}});T.plugin($e),T.plugin(Ye)}(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(/ /gi,"")}function i(e,t){var n,i,o,r={};for(n=0,i=e.length;n0?t.insertAfter(n.children().eq(e-1)):n.prepend(t)}function s(e){var t,n,i={};for(n=0;n').find(".k-header-column-menu")),o.link=i.attr("tabindex",-1).on("click"+T,u(o._click,o)),o.wrapper=e(''),o._refreshHandler=u(o.refresh,o),o.dataSource.bind(b,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(w,{field:e.field,container:e.wrapper})},events:[w,k,"sort","filtering"],options:{name:"ColumnMenu",messages:{sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filter:"Filter",column:"Column",columns:"Columns",columnVisibility:"Column Visibility",clear:"Clear",cancel:"Cancel",done:"Done",settings:"Edit 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(d.template(I)({uid:d.guid(),ns:d.ns,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns,lockedColumns:t.lockedColumns})),e.popup=e.wrapper[x]({anchor:e.link,open:u(e._open,e),activate:u(e._activate,e),deactivate:u(e._deactivate,e),close:function(){e.menu._closing=!0,e.options.closeCallback&&e.options.closeCallback(e.element)}}).data(x),e.menu=e.wrapper.children()[S]({orientation:"vertical",closeOnClick:!1,open:function(){e._updateMenuItems()}}).data(S)},_deactivate:function(){this.menu._closing=!1},_createMobileMenu:function(){var e,t=this,n=t.options,i=d.template(E)({ns:d.ns,field:t.field,title:t.title||t.field,messages:n.messages,sortable:n.sortable,filterable:n.filterable,columns:t._ownerColumns(),showColumns:n.columns,lockedColumns:n.lockedColumns});t.view=t.pane.append(i),t.view.state={columns:{}},t.wrapper=t.view.element.find(".k-column-menu"),t.menu=new M(t.wrapper.children(),{pane:t.pane,columnMenu:t}),t.menu.element.on("transitionend"+T,function(e){e.stopPropagation()}),e=t.view.wrapper&&t.view.wrapper[0]?t.view.wrapper:t.view.element,e.on("click",".k-header-done",function(e){e.preventDefault(),t.menu._applyChanges(),t.menu._cancelChanges(!1),t.close()}),e.on("click",".k-header-cancel",function(e){e.preventDefault(),t.menu._cancelChanges(!0),t.close()}),t.view.bind("showStart",function(){var e=t.view||{columns:{}};t.options.lockedColumns&&t._updateLockedColumns(),e.element.find(".k-sort-asc.k-state-selected").length?e.state.initialSort="asc":e.element.find(".k-sort-desc.k-state-selected").length&&(e.state.initialSort="desc")})},_angularItems:function(t){var n=this;n.angular(t,function(){var t=n.wrapper.find(".k-columns-item input["+d.attr("field")+"]").map(function(){return e(this).closest("li")}),i=f(n._ownerColumns(),function(e){return{column:e._originalObject}});return{elements:t,data:i}})},destroy:function(){var e=this;e._angularItems("cleanup"),D.fn.destroy.call(e),e.filterMenu&&e.filterMenu.destroy(),e._refreshHandler&&e.dataSource.unbind(b,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(T),e.menu.destroy()),e.wrapper.off(T),e.popup&&e.popup.destroy(),e.view&&e.view.purge(),e.link.off(T),e.owner=null,e.wrapper=null,e.element=null},close:function(){this.menu.close(),this.popup&&(this.popup.close(),this.popup.element.off("keydown"+T))},_click:function(e){var t,n=this;e.preventDefault(),e.stopPropagation(),t=this.options,t.filter&&this.element.is(!t.filter)||(this.popup||this.pane?n._updateMenuItems():this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle())},_updateMenuItems:function(){var e=this;e._setMenuItemsVisibility(),e._reorderMenuItems()},_setMenuItemsVisibility:function(){var e=this;e._eachRenderedMenuItem(function(e,t,n){t.matchesMedia===!1?n.hide():n.show()})},_reorderMenuItems:function(){var e=this;e._eachRenderedMenuItem(function(e,t,n,i){n[0]&&n.index()!==e&&a(e,n,i)})},_eachRenderedMenuItem:function(t){var i,a,d,c,u,h,f,g=this,m=p(o(g.owner.columns),function(e){var t=!0,i=n(e.title||"");return e.menu!==!1&&(e.field||i.length)||(t=!1),t}).map(function(e){return{field:e.field,title:e.title,matchesMedia:e.matchesMedia}}),v=g._isMobile&&g.view?e(g.view.element).find(".k-columns-item").children("ul"):e(g.wrapper).find(".k-menu-group").first(),_=v.find("span."+(this._isMobile?"k-listgroup-form-field-wrapper":"k-menu-link")),b=l(_,v.find("input[type=checkbox]")),w=s(m);for(h=0;h#if(sortable){#${messages.sortAscending}${messages.sortDescending}#if(showColumns || filterable){##}##}##if(showColumns){#${messages.columns}#for (var idx = 0; idx < columns.length; idx++) {##=columns[idx].title##}##if(filterable || lockedColumns){##}##}##if(filterable){#${messages.filter}#if(lockedColumns){##}##}##if(lockedColumns){#${messages.lock}${messages.unlock}#}#',E='${messages.settings}#=messages.column#: ${title}#if(sortable){#${messages.sortAscending}${messages.sortDescending}#}##if(lockedColumns){#${messages.lock}${messages.unlock}#}##if(filterable){#${messages.filter}#}##if(showColumns){#${messages.columnVisibility}#for (var idx = 0; idx < columns.length; idx++) {##=columns[idx].title##}##}##=messages.clear#',M=D.extend({init:function(e,t){var n=this;D.fn.init.call(n,e,t),n._createCheckBoxes(),n.element.on("click"+T,"li.k-item:not(.k-separator):not(.k-state-disabled):not(:has(.k-switch))","_click")},events:[y],_click:function(n){var i=this;return e(n.target).is("[type=checkbox]")||n.preventDefault(),e(n.target).hasClass("k-clear")?(i._cancelChanges(!0),t):e(n.target).hasClass("k-filterable")?(i._cancelChanges(!0),i.trigger(y,{item:n.currentTarget}),t):(i._updateSelectedItems(n.currentTarget),t)},_updateSelectedItems:function(t){var n,i,o,r=this,a=e(t),s=r.options.columnMenu.view.state||{columns:{}},l=a.prop("id");a.hasClass("k-filter-item")||(s[l]=!s[l],(a.hasClass("k-sort-asc")||a.hasClass("k-sort-desc"))&&(a.hasClass("k-sort-asc")?(n="asc",i=r.element.find(".k-sort-desc")):(n="desc",i=r.element.find(".k-sort-asc")),o=i.prop("id"),n!==s.initialSort||a.hasClass("k-state-selected")||(s[l]=!1),s[o]&&(s[o]=!1),i.removeClass(m)),a.hasClass(m)?a.removeClass(m):a.addClass(m))},_cancelChanges:function(e){var t,n,i,o,r=this,a=r.options.columnMenu,s=a.view,l=s.state||{columns:{}},d=l.columns;if(r.element.find("."+m).removeClass(m),a.refresh(),e){t=[];for(n in d)d.hasOwnProperty(n)&&d[n]===!0&&(i=s.element.find("#"+n),t.push(i[0]));for(o=t.length-1;o>=0;o--)r.trigger(y,{item:t[o]});a.options.lockedColumns&&a._updateLockedColumns()}r.options.columnMenu.view.state={columns:{}}},_applyChanges:function(){var e,t,n=this,i=n.options.columnMenu.view,o=i.state||{columns:{}};for(e in o)o.hasOwnProperty(e)&&"initialSort"!==e&&"columns"!==e&&o[e]===!0&&(t=i.element.find("#"+e),t.hasClass(m)?t.removeClass(m):t.addClass(m),n.trigger(y,{item:t[0]}))},_createCheckBoxes:function(){var e=this;e.element.find(".k-columns-item").find("[type='checkbox']").kendoSwitch({messages:{checked:"",unchecked:""},change:function(t){var n=t.sender.element.closest(".k-item"),i=e.options.columnMenu.view.state||{columns:{}},o=n.prop("id");i.columns[o]=!i.columns[o],e.trigger(y,{item:n})}})},_destroyCheckBoxes:function(){var e,t,n=this,i=n.element.find(".k-columns-item").find("[type='checkbox']");for(t=0;ta?1:otable"):t.parent().hasClass("k-grid-header-locked")&&(t=t.closest(".k-grid").find(".k-grid-content-locked > table"))),t}var o=window.kendo,r=o.ui,a=r.Widget,s="dir",l="asc",d="single",c="field",u="desc",h=".kendoColumnSorter",p=".k-link",f="aria-sort",g=e.proxy,m=a.extend({init:function(e,t){var n,i=this;a.fn.init.call(i,e,t),i._refreshHandler=g(i.refresh,i),i.dataSource=i.options.dataSource.bind("change",i._refreshHandler),i.directions=i.options.initialDirection===l?[l,u]:[u,l],n=i.element.find(p),n[0]||(n=i.element.wrapInner('').find(p)),i.link=n,i.element.on("click"+h,g(i._click,i))},options:{name:"ColumnSorter",mode:d,allowUnsort:!0,compare:null,filter:"",initialDirection:l,showIndexes:!1},events:["change"],destroy:function(){var e=this;a.fn.destroy.call(e),e.element.off(h),e.dataSource.unbind("change",e._refreshHandler),e._refreshHandler=e.element=e.link=e.dataSource=null},refresh:function(r){if(!r||"itemchange"!==r.action&&"sync"!==r.action){var a,d,h,p,g,m=this,v=m.dataSource.sort()||[],_=m.element,b=_.attr(o.attr(c)),w=(m.dataSource._sortFields||{})[b];_.removeAttr(o.attr(s)),_.removeAttr(f),w&&(a=w.dir,_.attr(o.attr(s),a),g=w.index),_.is("th")&&w&&(d=i(_),d&&(_.attr(o.attr("index"))?(h=n(_.closest("table")),p=h.index(_)):p=_.parent().children(":visible").index(_),d.find("col:not(.k-group-col):not(.k-hierarchy-col)").eq(p).toggleClass("k-sorted",a!==t))),_.toggleClass("k-sorted",a!==t),_.find(".k-i-sort-asc-sm,.k-i-sort-desc-sm,.k-sort-order").remove(),a===l?(e('').appendTo(m.link),_.attr(f,"ascending")):a===u&&(e('').appendTo(m.link),_.attr(f,"descending")),m.options.showIndexes&&v.length>1&&g&&e('').html(g).appendTo(m.link)}},_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 n,i,r=this,a=r.element,l=a.attr(o.attr(c)),u=a.attr(o.attr(s)),h=r.options,p=null===r.options.compare?t:r.options.compare,f=r.dataSource.sort()||[];if(e.preventDefault(),(!h.filter||a.is(h.filter))&&(u=this._toggleSortDirection(u),!this.trigger("change",{sort:{field:l,dir:u,compare:p}}))){if(h.mode===d)f=[{field:l,dir:u,compare:p}];else if("multiple"===h.mode){for(n=0,i=f.length;n=0?v[u]=t:p(i)||(o=l.getCulture(),"number"==typeof i&&o.name.length?(r=o.numberFormat,a=(""+i).replace(m,r[m]),v[t]=a):v[t]=f(i)?i.value||t:i),v[l.attr(t+"-msg")]=i.message,v.autocomplete=_;return g(d,x)>=0&&(v[u]=d),v[h]=("boolean"===d?"checked:":"value:")+e.field,v}function r(e,t){var n=e.attr("id");return n&&(t.id=n,e.removeAttr("id")),t}function a(e){var t,n,i,o,r,a;if(e&&e.length)for(a=[],t=0,n=e.length;t|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,w='#=message#',k="change",y="equalSet",x=["url","email","number","date","boolean"],C={number:function(t,n){var i=o(n);e('').attr(i).appendTo(t).kendoNumericTextBox({format:n.format}),e("').hide().appendTo(t)},date:function(t,n){var i=o(n),r=n.format;r&&(r=l._extractFormat(r)),i[l.attr("format")]=r,e('').attr(i).appendTo(t).kendoDatePicker({format:n.format}),e("').hide().appendTo(t)},string:function(t,n){var i=o(n);e('').attr(i).appendTo(t)},"boolean":function(t,n){var i=o(n);e('').attr(i).appendTo(t)},values:function(t,n){var i=o(n),r=l.stringify(a(n.values));e("').attr(i).appendTo(t),e("').hide().appendTo(t)}},S={number:function(t,n){var i=o(n);i=r(t,i),e('').attr(i).appendTo(t)},date:function(t,n){var i=o(n);i=r(t,i),e('').attr(i).appendTo(t)},string:function(t,n){var i=o(n);i=r(t,i),e('').attr(i).appendTo(t)},"boolean":function(t,n){var i=o(n);i=r(t,i),e('').attr(i).appendTo(t)},values:function(t,n){var i,a=o(n),s=n.values,l=e("");a=r(t,a);for(i in s)e(''+s[i].text+"").appendTo(l);l.attr(a).appendTo(t)}},T=c.extend({init:function(t,n){var i=this;n.target&&(n.$angular=n.target.options.$angular,n.target.pane&&(i._isMobile=!0)),c.fn.init.call(i,t,n),i._validateProxy=e.proxy(i._validate,i),i.refresh()},events:[k],options:{name:"Editable",editors:C,mobileEditors:S,clearContainer:!0,errorTemplate:w,skipFocus:!1},editor:function(e,t){var i=this,o=i._isMobile?S:i.options.editors,r=f(e),a=r?e.field:e,s=i.options.model||{},d=r&&e.values,c=d?"values":n(t),h=r&&e.editor,p=h?e.editor:o[c],g=i.element.find("["+l.attr("container-for")+"="+a.replace(b,"\\$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,u(!0,{},r?e:{field:a},{model:s}))},_validate:function(t){var n,i=this,o=t.value,r=i._validationEventInProgress,a={},s=l.attr("bind"),d=t.field.replace(b,"\\$1"),c=RegExp("(value|checked)\\s*:\\s*"+d+"\\s*(,|$)");a[t.field]=t.value,n=e(":input["+s+'*="'+d+'"]',i.element).filter("["+l.attr("validate")+"!='false']").filter(function(){return c.test(e(this).attr(s))}),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(k,{values:a}))&&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),e.options.model.unbind(y,e._validateProxy),l.unbind(e.element),e.validatable&&e.validatable.destroy(),l.destroy(e.element),e.element.removeData("kendoValidator"),e.element.is("["+l.attr("role")+"=editable]")&&e.element.removeAttr(l.attr("role"))},refresh:function(){var n,o,r,a,d,c,u,p,g=this,m=g.options.fields||[],v=g.options.clearContainer?g.element.empty():g.element,_=g.options.model||{},b={};for(e.isArray(m)||(m=[m]),n=0,o=m.length;n=0}function a(t){for(var n,i,o={top:t.offsetTop,left:t.offsetLeft},r=t.offsetParent;r;)o.top+=r.offsetTop,o.left+=r.offsetLeft,n=e(r).css("overflowX"),i=e(r).css("overflowY"),"auto"!==i&&"scroll"!==i||(o.top-=r.scrollTop),"auto"!==n&&"scroll"!==n||(o.left-=r.scrollLeft),r=r.offsetParent;return o}function s(e){var t=this;t.owner=e,t._preventDragging=!1,t._draggable=new h(e.wrapper,{filter:">"+I,group:e.wrapper.id+"-resizing",dragstart:v(t.dragstart,t),drag:v(t.drag,t),dragend:v(t.dragend,t)}),t._draggable.userEvents.bind("press",v(t.addOverlay,t)),t._draggable.userEvents.bind("release",v(t.removeOverlay,t))}function l(e,t){var n=this;n.owner=e,n._preventDragging=!1,n._draggable=new h(e.wrapper,{filter:t,group:e.wrapper.id+"-moving",dragstart:v(n.dragstart,n),drag:v(n.drag,n),dragend:v(n.dragend,n),dragcancel:v(n.dragcancel,n)}),n._draggable.userEvents.stopPropagation=!1}var d=window.kendo,c=d.ui.Widget,u=d.ui.Popup.TabKeyTrap,h=d.ui.Draggable,p=e.isPlainObject,f=d._activeElement,g=d._outerWidth,m=d._outerHeight,v=e.proxy,_=e.extend,b=e.each,w=d.template,k="body",y=".kendoWindow",x=".kendoWindowModal",C=".k-window",S=".k-window-title",T=S+"bar",D=".k-window-content",A=".k-dialog-content",I=".k-resize-handle",E=".k-overlay",M="k-content-frame",F="k-i-loading",R="k-state-hover",P="k-state-focused",z="k-window-maximized",B=":visible",L="hidden",H="cursor",N="open",O="activate",V="deactivate",W="close",U="refresh",j="minimize",q="maximize",G="resizeStart",$="resize",Y="resizeEnd",K="dragstart",Q="dragend",X="error",J="overflow",Z="original-overflow-rule",ee="zIndex",te=".k-window-actions .k-i-window-minimize,.k-window-actions .k-i-window-maximize",ne=".k-i-pin",ie=".k-i-unpin",oe=ne+","+ie,re=".k-window-titlebar .k-window-action",ae=".k-window-titlebar .k-i-refresh",se="WindowEventsHandled",le=/^0[a-z]*$/i,de=d.isLocalUrl,ce={small:"k-window-sm",medium:"k-window-md",large:"k-window-lg"},ue=c.extend({init:function(i,o){var a,s,l,h,f,g,m,_,b,w=this,k={},x=!1,I=o&&o.actions&&!o.actions.length;c.fn.init.call(w,i,o),o=w.options,h=o.position,i=w.element,f=o.content,_=e(window),I&&(o.actions=[]),w.appendTo=e(o.appendTo),w.containment=o.draggable.containment?e(o.draggable.containment).first():null,f&&!p(f)&&(f=o.content={url:f}),i.find("script").filter(r).remove(),i.parent().is(w.appendTo)||w.containment||h.top!==t&&h.left!==t||(i.is(B)?(k=i.offset(),x=!0):(s=i.css("visibility"),l=i.css("display"),i.css({visibility:L,display:""}),k=i.offset(),i.css({visibility:s,display:l})),h.top===t&&(h.top=k.top),h.left===t&&(h.left=k.left)),n(o.visible)&&null!==o.visible||(o.visible=i.is(B)),a=w.wrapper=i.closest(C),i.is(".k-content")&&a[0]||(i.addClass("k-window-content k-content"),w._createWindow(i,o),a=w.wrapper=i.closest(C),w.title(w.options.title),w._dimensions()),w.minTop=w.minLeft=-(1/0),w.maxTop=w.maxLeft=1/0,w._position(),f&&w.refresh(f),o.visible&&w.toFront(),g=a.children(D),w._tabindex(g),o.visible&&o.modal&&w._overlay(a.is(B)).css({opacity:.5}),a.on("mouseenter"+y,re,v(w._buttonEnter,w)).on("mouseleave"+y,re,v(w._buttonLeave,w)).on("click"+y,"> "+re,v(w._windowActionHandler,w)).on("keydown"+y,v(w._keydown,w)).on("focus"+y,v(w._focus,w)).on("blur"+y,v(w._blur,w)),g.on("keydown"+y,v(w._keydown,w)).on("focus"+y,v(w._focus,w)).on("blur"+y,v(w._blur,w)),m=g.find("."+M)[0],m&&!_.data(se)&&(_.on("blur"+y,function(){var t,n=e(document.activeElement).parent(D);n.length&&(t=d.widgetInstance(n),t._focus())}),_.on("focus"+y,function(){e(D).not(A).each(function(t,n){d.widgetInstance(e(n))._blur()})}),_.data(se,!0)),this._resizable(),this._draggable(),o.pinned&&this.wrapper.is(":visible")&&w.pin(),b=i.attr("id"),b&&(b+="_wnd_title",a.children(T).children(S).attr("id",b),g.attr({role:"dialog","aria-labelledby":b})),a.add(a.children(".k-resize-handle,"+T)).on("mousedown"+y,v(w.toFront,w)),w.touchScroller=d.touchScroller(i),w._resizeHandler=v(w._onDocumentResize,w),w._marker=d.guid().substring(0,8),e(window).on("resize"+y+w._marker,w._resizeHandler),o.visible&&(w.trigger(N),w.trigger(O)),d.notify(w),this.options.modal&&(this._tabKeyTrap=new u(a),this._tabKeyTrap.trap(),this._tabKeyTrap.shouldTrap=function(){return g.data("isFront")})},_buttonEnter:function(t){e(t.currentTarget).addClass(R)},_buttonLeave:function(t){e(t.currentTarget).removeClass(R)},_focus:function(){this.wrapper.addClass(P)},_blur:function(){this.wrapper.removeClass(P)},_dimensions:function(){var e,t,n=this.wrapper,r=this.options,a=r.width,s=r.height,l=r.maxHeight,d=r.size,c=["minWidth","minHeight","maxWidth","maxHeight"],u="content-box"==n.css("box-sizing"),h=u?i(n,"border-left-width")+i(n,"border-right-width"):0,p=u?i(n,"border-top-width")+i(n,"border-bottom-width"):0,f=u?i(n,"padding-top"):0;for(this.containment&&!this._isPinned&&(this._updateBoundaries(),r.maxHeight=Math.min(this.containment.height-(p+f),l),r.maxWidth=Math.min(this.containment.width-h,r.maxWidth)),e=0;ee[0].clientWidth&&(e.width-=d.support.scrollbar()),parseInt(e.height,10)>e[0].clientHeight&&(e.height-=d.support.scrollbar()),e.position=a(e[0]),this._isPinned?(this.minTop=this.minLeft=-(1/0),this.maxTop=this.maxLeft=1/0):(this.minTop=e.scrollTop(),this.minLeft=e.scrollLeft(),this.maxLeft=this.minLeft+e.width-g(this.wrapper,!0),this.maxTop=this.minTop+e.height-m(this.wrapper,!0)),t):null},_animationOptions:function(e){var t=this.options.animation,n={open:{effects:{}},close:{hide:!0,effects:{}}};return t&&t[e]||n[e]},_resize:function(){d.resize(this.element.children())},_resizable:function(){var t=this.options.resizable,n=this.wrapper;this.resizing&&(n.off("dblclick"+y).children(I).remove(),this.resizing.destroy(),this.resizing=null),t&&(n.on("dblclick"+y,T,v(function(t){e(t.target).closest(".k-window-action").length||this.toggleMaximization()},this)),b("n e s w se sw ne nw".split(" "),function(e,t){n.append(he.resizeHandle(t))}),this.resizing=new s(this)),n=null},_draggable:function(){var e=this.options.draggable;this.dragging&&(this.dragging.destroy(),this.dragging=null),e&&(this.dragging=new l(this,e.dragHandle||T))},_actions:function(){var t=this.options,n=t.actions,i=t.pinned,o=this.wrapper.children(T),r=o.find(".k-window-actions"),a=["maximize","minimize"];n=e.map(n,function(e){return e=i&&"pin"===e.toLowerCase()?"unpin":e,{name:a.indexOf(e.toLowerCase())>-1?"window-"+e:e}}),r.html(d.render(he.action,n))},setOptions:function(e){var n,i,o=this,r=o.options.size,a=JSON.parse(JSON.stringify(e));_(e.position,o.options.position),_(e.position,a.position),c.fn.setOptions.call(o,e),n=o.options.scrollable!==!1,o.restore(),t!==e.title&&o.title(e.title),o.wrapper.removeClass(ce[r]),o._dimensions(),o._position(),o._resizable(),o._draggable(),o._actions(),t!==e.modal&&(i=o.options.visible!==!1,o._enableDocumentScrolling(),o._overlay(e.modal&&i)),o.element.css(J,n?"":"hidden")},events:[N,O,V,W,j,q,U,G,$,Y,K,Q,X],options:{name:"Window",animation:{open:{effects:{zoom:{direction:"in"},fade:{direction:"in"}},duration:350},close:{effects:{zoom:{direction:"out",properties:{scale:.7}},fade:{direction:"out"}},duration:350,hide:!0}},title:"",actions:["Close"],autoFocus:!0,modal:!1,size:"auto",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,r,a,s,l,c=this,u=c.options,h=d.keys,p=e.keyCode,f=c.wrapper,g=10,m=u.isMaximized,v=u.isMinimized;p==h.ESC&&c._closable()&&(e.stopPropagation(),c._close(!1)),e.target!=e.currentTarget||c._closing||(e.altKey&&82==p&&c.refresh(),
e.altKey&&80==p&&(c.options.pinned?c.unpin():c.pin()),e.altKey&&p==h.UP?v?(c.restore(),c.element.focus()):m||(c.maximize(),c.element.focus()):e.altKey&&p==h.DOWN&&(v||m?m&&(c.restore(),c.element.focus()):(c.minimize(),c.wrapper.focus())),t=d.getOffset(f),c.containment&&!c._isPinned&&(t=c.options.position),!u.draggable||e.ctrlKey||e.altKey||m||(c._updateBoundaries(),p==h.UP?(t.top=o(t.top-g,c.minTop,c.maxTop),n=f.css("top",t.top)):p==h.DOWN?(t.top=o(t.top+g,c.minTop,c.maxTop),n=f.css("top",t.top)):p==h.LEFT?(t.left=o(t.left-g,c.minLeft,c.maxLeft),n=f.css("left",t.left)):p==h.RIGHT&&(t.left=o(t.left+g,c.minLeft,c.maxLeft),n=f.css("left",t.left))),u.resizable&&e.ctrlKey&&!m&&!v&&(p==h.UP?(n=!0,a=f.height()-g):p==h.DOWN&&(n=!0,a=c.containment&&!c._isPinned?Math.min(f.height()+g,c.containment.height-t.top-i(f,"padding-top")-i(f,"borderBottomWidth")-i(f,"borderTopWidth")):f.height()+g),p==h.LEFT?(n=!0,r=f.width()-g):p==h.RIGHT&&(n=!0,r=c.containment&&!c._isPinned?Math.min(f.width()+g,c.containment.width-t.left-i(f,"borderLeftWidth")-i(f,"borderRightWidth")):f.width()+g),n&&(s=o(r,u.minWidth,u.maxWidth),l=o(a,u.minHeight,u.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.containment?this.containment.children(E):this.appendTo.children(E),i=this.wrapper;return n.length||(n=e("")),n.insertBefore(i[0]).toggle(t).css(ee,parseInt(i.css(ee),10)-1),this.options.modal.preventScroll&&!this.containment&&this._stopDocumentScrolling(),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(C).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(B)}).sort(function(t,n){return+e(t).css("zIndex")-+e(n).css("zIndex")});return t=null,n},_object:function(e){var n=e.children(D),i=d.widgetInstance(n);return i?i:t},center:function(){var t,n,o=this,r=o.options.position,a=o.wrapper,s=e(window),l=0,d=0;return o.options.isMaximized?o:(o.options.pinned&&!o._isPinned&&o.pin(),o.options.pinned||(l=s.scrollTop(),d=s.scrollLeft()),this.containment&&!o.options.pinned?(t=this.minTop+(this.maxTop-this.minTop)/2,n=this.minLeft+(this.maxLeft-this.minLeft)/2):(o._scrollIsAppended=!0,n=d+Math.max(0,(s.width()-a.width())/2),t=l+Math.max(0,(s.height()-a.height()-i(a,"paddingTop"))/2)),a.css({left:n,top:t}),r.top=t,r.left=n,o)},title:function(n){var i,o,r,a,s=this,l=!0,c=s.wrapper,u=c.children(T),h=u.children(S);return arguments.length?(e.isPlainObject(n)?(i=t!==n.text?n.text:"",l=n.encoded!==!1):i=n,i===!1?(c.addClass("k-window-titleless"),c.css("padding-top",0),u.remove()):(u.length?h.html(l?d.htmlEncode(i):i):(c.prepend(he.titlebar({title:l?d.htmlEncode(i):i})),s._actions(),u=c.children(T)),a=c.css("visibility"),r=c.css("display"),a===L?(c.css({display:""}),o=parseInt(m(u),10),c.css({display:r})):(c.css({visibility:L,display:""}),o=parseInt(m(u),10),c.css({visibility:a,display:r})),c.css("padding-top",o),u.css("margin-top",-o)),s.options.title=i,s):h.html()},content:function(e,t){var i=this.wrapper.children(D),o=i.children(".km-scroll-container");return i=o[0]?o:i,n(e)?(this.angular("cleanup",function(){return{elements:i.children()}}),d.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,a=o.options,s=this._animationOptions("open"),l=r.children(D),c=this.containment&&!o._isPinned,u=c?this.containment:e(document);return o.trigger(N)||(o._closing&&r.kendoStop(!0,!0),o._closing=!1,o.toFront(),a.autoFocus&&o.element.focus(),a.visible=!0,a.modal&&(n=!!o._modals().length,t=o._overlay(n),t.kendoStop(!0,!0),s.duration&&d.effects.Fade&&!n?(i=d.fx(t).fadeIn(),i.duration(s.duration||0),i.endValue(.5),i.play()):t.css("opacity",.5),t.show(),e(window).on("focus"+x,function(){l.data("isFront")&&!e(document.activeElement).closest(l).length&&o.element.focus()})),r.is(B)||(l.css(J,L),o.wrapper.find(re).addClass("k-bare"),r.show().kendoStop().kendoAnimate({effects:s.effects,duration:s.duration,complete:v(this._activate,this)}))),a.isMaximized&&(o._containerScrollTop=u.scrollTop(),o._containerScrollLeft=u.scrollLeft(),o._stopDocumentScrolling()),this.options.pinned&&!this._isPinned&&this.pin(),o},_activate:function(){var e=this.options.scrollable!==!1;this.options.autoFocus&&this.element.focus(),this.element.css(J,e?"":"hidden"),d.resize(this.element.children()),this.trigger(O)},_removeOverlay:function(n){var i,o=this._modals(),r=this.options,a=r.modal&&!o.length,s=r.modal?this._overlay(!0):e(t),l=this._animationOptions("close");a?(!n&&l.duration&&d.effects.Fade?(i=d.fx(s).fadeOut(),i.duration(l.duration||0),i.startValue(.5),i.play()):this._overlay(!1).remove(),r.modal.preventScroll&&this._enableDocumentScrolling()):o.length&&(this._object(o.last())._overlay(!0),r.modal.preventScroll&&this._stopDocumentScrolling())},_close:function(t){var n,i=this,o=i.wrapper,r=i.options,a=this._animationOptions("open"),s=this._animationOptions("close"),l=this.containment&&!i._isPinned,d=l?this.containment:e(document);i._closing||(n=i.trigger(W,{userTriggered:!t}),i._closing=!n,o.is(B)&&!n&&(r.visible=!1,e(C).each(function(t,n){var i=e(n).children(D);n!=o&&i.find("> ."+M).length>0&&i.children(E).remove()}),this._removeOverlay(),i.wrapper.find(re).removeClass("k-bare"),o.kendoStop().kendoAnimate({effects:s.effects||a.effects,reverse:s.reverse===!0,duration:s.duration,complete:v(this._deactivate,this)}),e(window).off(x)),i.options.isMaximized&&(i._enableDocumentScrolling(),i._containerScrollTop&&i._containerScrollTop>0&&d.scrollTop(i._containerScrollTop),i._containerScrollLeft&&i._containerScrollLeft>0&&d.scrollLeft(i._containerScrollLeft)))},_deactivate:function(){var e,t=this;t.wrapper.hide().css("opacity",""),t.trigger(V),t.options.modal&&(e=t._object(t._modals().last()),e&&e.toFront())},close:function(){return this._close(!0),this},_actionable:function(t){return e(t).is(re+","+re+" .k-icon,:input,a")},_shouldFocus:function(t){var n=f(),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,a=r[0],s=o.containment&&!o._isPinned,l=+r.css(ee),d=l,c=t&&t.target||null;return e(C).each(function(t,n){var i=e(n),o=i.css(ee),r=i.children(D);isNaN(o)||(l=Math.max(+o,l)),r.data("isFront",n==a),n!=a&&r.find("> ."+M).length>0&&r.append(he.overlay)}),(!r[0].style.zIndex||d.k-overlay").remove(),o._shouldFocus(c)&&(o.isMinimized()?o.wrapper.focus():e(c).is(E)?setTimeout(function(){o.element.focus()}):o.element.focus(),n=s?o.containment.scrollTop():e(window).scrollTop(),i=parseInt(r.position().top,10),!o.options.pinned&&i>0&&i0?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,n=this,i=n.options,r=i.minHeight,a=n.restoreOptions,s=n.containment&&!n._isPinned?n.containment:e(document);return i.isMaximized||i.isMinimized?(r&&r!=1/0&&n.wrapper.css("min-height",r),a&&!i.isMaximized&&(a.height=o(a.height,n.options.minHeight,n.options.maxHeight),t=i.position.top+parseInt(a.height,10)>n.maxTop,t&&(i.position.top=o(i.position.top,n.minTop,n.maxTop-parseInt(a.height,10)),_(a,{left:i.position.left,top:i.position.top}))),n.wrapper.css({position:i.pinned?"fixed":"absolute",left:a.left,top:a.top,width:a.width,height:a.height}).removeClass(z).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-window-restore").parent().remove().end().end().find(te).parent().show().end().end().find(oe).parent().show(),i.isMaximized?n.wrapper.find(".k-i-window-maximize").parent().focus():i.isMinimized&&n.wrapper.find(".k-i-window-minimize").parent().focus(),n.options.width=a.width,n.options.height=a.height,n.options.modal.preventScroll||n._enableDocumentScrolling(),n._containerScrollTop&&n._containerScrollTop>0&&s.scrollTop(n._containerScrollTop),n._containerScrollLeft&&n._containerScrollLeft>0&&s.scrollLeft(n._containerScrollLeft),i.isMaximized=i.isMinimized=!1,n.wrapper.removeAttr("tabindex"),n.wrapper.removeAttr("aria-labelled-by"),n.resize(),n):n},_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(I).hide().end().children(T).find(te).parent().hide().eq(0).before(he.action({name:"window-restore"})),t.call(n),n.wrapper.children(T).find(oe).parent().toggle("maximize"!==e),n.trigger(e),i.find(".k-i-window-restore").parent().focus(),n)},maximize:function(){return this._sizingAction("maximize",function(){var t=this,n=t.wrapper,i=this.containment&&!t._isPinned,o=n.position(),r=e(document);_(t.restoreOptions,{left:o.left+(i?this.containment.scrollLeft():0),top:o.top+(i?this.containment.scrollTop():0)}),this._containerScrollTop=i?this.containment.scrollTop():r.scrollTop(),this._containerScrollLeft=i?this.containment.scrollLeft():r.scrollLeft(),t._stopDocumentScrolling(),n.css({top:i?this.containment.scrollTop():0,left:i?this.containment.scrollLeft():0,position:i?"absolute":"fixed"}).addClass(z),t.options.isMaximized=!0,t._onDocumentResize()}),this},_stopDocumentScrolling:function(){var n,i,o=this,r=o.containment;return r&&!o._isPinned?(o._storeOverflowRule(r),r.css(J,L),o.wrapper.css({maxWidth:r.innerWidth(),maxHeight:r.innerHeight()}),t):(n=e("body"),o._storeOverflowRule(n),n.css(J,L),i=e("html"),o._storeOverflowRule(i),i.css(J,L),t)},_enableDocumentScrolling:function(){var n=this,i=n.containment;return i&&!n._isPinned?(n._restoreOverflowRule(i),n.wrapper.css({maxWidth:i.width,maxHeight:i.height}),t):(n._restoreOverflowRule(e(document.body)),n._restoreOverflowRule(e("html")),t)},_storeOverflowRule:function(e){if(!this._isOverflowStored(e)){var t=e.get(0).style.overflow;"string"==typeof t&&e.data(Z,t)}},_isOverflowStored:function(e){return"string"==typeof e.data(Z)},_restoreOverflowRule:function(e){var n=e.data(Z);null!==n&&n!==t?(e.css(J,n),e.removeData(Z)):e.css(J,"")},isMaximized:function(){return this.options.isMaximized},minimize:function(){return this._sizingAction("minimize",function(){var e=this;e.wrapper.css({height:"",minHeight:""}),e.element.hide(),e.options.isMinimized=!0}),this.wrapper.attr("tabindex",0),this.wrapper.attr("aria-labelled-by",this.element.attr("aria-labelled-by")),this._updateBoundaries(),this},isMinimized:function(){return this.options.isMinimized},pin:function(){var t=this,n=e(window),o=t.wrapper,r=t.options,s=r.position,l=this.containment?a(o[0]).top+i(this.containment,"borderTopWidth"):i(o,"top"),d=this.containment?a(o[0]).left+i(this.containment,"borderLeftWidth"):i(o,"left");t.options.isMaximized||(s.top=l,s.left=d,!t._scrollIsAppended||this.containment&&"fixed"===this.containment.css("position")||(s.top-=n.scrollTop(),s.left-=n.scrollLeft(),t._scrollIsAppended=!1),o.css(_(s,{position:"fixed"})),o.children(T).find(ne).addClass("k-i-unpin").removeClass("k-i-pin"),t._isPinned=!0,t.options.pinned=!0,this.containment&&(r.maxWidth=r.maxHeight=1/0,o.css({maxWidth:"",maxHeight:""})))},unpin:function(){var t=this,n=e(window),r=t.wrapper,a=t.options,s=t.options.position,l=t.containment,d=parseInt(r.css("top"),10)+n.scrollTop(),c=parseInt(r.css("left"),10)+n.scrollLeft();t.options.isMaximized||(t._isPinned=!1,t._scrollIsAppended=!0,t.options.pinned=!1,l&&(t._updateBoundaries(),a.maxWidth=Math.min(l.width,a.maxWidth),a.maxHeight=Math.min(l.height-i(r,"padding-top"),a.maxHeight),r.css({maxWidth:a.maxWidth,maxHeight:a.maxHeight}),d=dl.position.top+l.height?t.maxTop:d+l.scrollTop()-(l.position.top+i(l,"border-top-width")),c=cl.position.left+l.width?t.maxLeft:c+l.scrollLeft()-(l.position.left+i(l,"border-left-width"))),s.top=o(d,t.minTop,t.maxTop),s.left=o(c,t.minLeft,t.maxLeft),r.css(_(s,{position:""})),r.children(T).find(ie).addClass("k-i-pin").removeClass("k-i-unpin"))},_onDocumentResize:function(){var t,n,o,r,a,s=this,l=s.wrapper,c=e(window),u=d.support.zoomLevel(),h="content-box"==l.css("box-sizing");s.options.isMaximized&&(o=h?i(l,"border-left-width")+i(l,"border-right-width"):0,r=h?i(l,"border-top-width")+i(l,"border-bottom-width"):0,a=h?i(l,"padding-top"):0,s.containment&&!s._isPinned?(t=s.containment.innerWidth()-o,n=s.containment.innerHeight()-(r+a)):(t=c.width()/u-o,n=c.height()/u-(r+a)),l.css({width:t,height:n}),s.options.width=t,s.options.height=n,s.resize())},refresh:function(t){var i,o,r,a=this,s=a.options,l=e(a.element);return p(t)||(t={url:t}),t=_({},s.content,t),o=n(s.iframe)?s.iframe:t.iframe,r=t.url,r?(n(o)||(o=!de(r)),o?(i=l.find("."+M)[0],i?i.src=r||i.src:l.html(he.contentFrame(_({},s,{content:t}))),l.find("."+M).unbind("load"+y).on("load"+y,v(this._triggerRefresh,this))):a._ajaxRequest(t)):(t.template&&a.content(w(t.template)({})),a.trigger(U)),l.toggleClass("k-window-iframecontent",!!o),a},_triggerRefresh:function(){this.trigger(U)},_ajaxComplete:function(){clearTimeout(this._loadingIconTimeout),this.wrapper.find(ae).removeClass(F)},_ajaxError:function(e,t){this.trigger(X,{status:t,xhr:e})},_ajaxSuccess:function(e){return function(t){var n=t;e&&(n=w(e)(t||{})),this.content(n,t),this.element.prop("scrollTop",0),this.trigger(U)}},_showLoading:function(){this.wrapper.find(ae).addClass(F)},_ajaxRequest:function(t){this._loadingIconTimeout=setTimeout(v(this._showLoading,this),100),e.ajax(_({type:"GET",dataType:"html",cache:!1,error:v(this._ajaxError,this),complete:v(this._ajaxComplete,this),success:v(this._ajaxSuccess(t.template),this)},t))},_destroy:function(){this.resizing&&this.resizing.destroy(),this.dragging&&this.dragging.destroy(),this.wrapper.off(y).children(D).off(y).end().find(".k-resize-handle,.k-window-titlebar").off(y),e(window).off("resize"+y+this._marker),e(window).off(x),e(window).off(y),clearTimeout(this._loadingIconTimeout),c.fn.destroy.call(this),this.unbind(t),d.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=d.support.isRtl(i);o.scrollable===!1&&i.css("overflow","hidden"),n=e(he.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).append(i).find("iframe:not(.k-content)").each(function(e){this.src=t[e]}),this.containment?this.containment.prepend(n):this.appendTo&&n.appendTo(this.appendTo),n.find(".k-window-title").css(r?"left":"right",g(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}}),he={wrapper:w(""),action:w(""),titlebar:w("#= title #"),overlay:"",contentFrame:w("This page requires frames in order to show content"),resizeHandle:w("")};s.prototype={addOverlay:function(){this.owner.wrapper.append(he.overlay)},removeOverlay:function(){this.owner.wrapper.find(E).remove()},dragstart:function(t){var n,i,o,r,s,l,c,u=this,h=u.owner,p=h.wrapper;u._preventDragging=h.trigger(G),u._preventDragging||(u.elementPadding=parseInt(p.css("padding-top"),10),u.initialPosition=d.getOffset(p,"position"),u.resizeDirection=t.currentTarget.prop("className").replace("k-resize-handle k-resize-",""),u.initialSize={width:p.width(),height:p.height()},h._updateBoundaries(),u.containerOffset=h.containment?h.containment.position:d.getOffset(h.appendTo,"position"),n=p.offsetParent(),n.is("html")?u.containerOffset.top=u.containerOffset.left=0:(i=n.css("margin-top"),o=n.css("margin-left"),r=!le.test(i)||!le.test(o),r&&(s=a(p[0]),l=s.left-u.containerOffset.left-u.initialPosition.left,c=s.top-u.containerOffset.top-u.initialPosition.top,u._relativeElMarginLeft=l>1?l:0,u._relativeElMarginTop=c>1?c:0,u.initialPosition.left+=u._relativeElMarginLeft,u.initialPosition.top+=u._relativeElMarginTop)),p.children(I).not(t.currentTarget).hide(),e(k).css(H,t.currentTarget.css(H)))},drag:function(t){var n,i,r,a,s,l,c,u,h,p,f,g,m,v,_,b,w,k,y,x;this._preventDragging||(n=this,i=n.owner,r=i.wrapper,a=i.options,s=a.position,l=n.resizeDirection,c=n.containerOffset,u=n.initialPosition,h=n.initialSize,p=i.containment&&!i._isPinned,f=d.support.isRtl(i.containment),g=p&&f&&i.containment.innerWidth()>i.containment.width?d.support.scrollbar():0,m=p?{top:i.containment.scrollTop(),left:i.containment.scrollLeft()}:{top:0,left:0},k=Math.max(t.x.location,0),y=Math.max(t.y.location,0),l.indexOf("e")>=0?(v=i.containment&&k-h.width>=i.maxLeft-m.left+c.left+g?i.maxLeft+g-u.left+h.width-m.left:k-u.left-c.left,r.width(o(v,a.minWidth,a.maxWidth))):l.indexOf("w")>=0&&(w=u.left+h.width+c.left,v=o(w-k,a.minWidth,a.maxWidth),s.left=w-v-c.left-g-(n._relativeElMarginLeft||0)+m.left,i.containment&&s.left<=i.minLeft&&(s.left=i.minLeft,v=o(w-g-s.left-c.left+m.left,a.minWidth,a.maxWidth)),r.css({left:s.left,width:v})),x=y,i.options.pinned&&(x-=e(window).scrollTop()),l.indexOf("s")>=0?(_=x-u.top-n.elementPadding-c.top,x-h.height-n.elementPadding>=i.maxTop+c.top-m.top&&(_=i.maxTop-u.top+h.height-m.top),r.height(o(_,a.minHeight,a.maxHeight))):l.indexOf("n")>=0&&(b=u.top+h.height+c.top,_=o(b-x,a.minHeight,a.maxHeight),s.top=b-_-c.top-(n._relativeElMarginTop||0)+m.top,s.top<=i.minTop&&i.containment&&(s.top=i.minTop,_=o(b-s.top-c.top+m.top,a.minHeight,a.maxHeight)),r.css({top:s.top,height:_})),v&&(i.options.width=v+"px"),_&&(i.options.height=_+"px"),i.resize())},dragend:function(t){if(!this._preventDragging){var n=this,i=n.owner,o=i.wrapper;return o.children(I).not(t.currentTarget).show(),e(k).css(H,""),i.touchScroller&&i.touchScroller.reset(),27==t.keyCode&&o.css(n.initialPosition).css(n.initialSize),i.trigger(Y),!1}},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},l.prototype={dragstart:function(t){var n=this.owner,i=n.options.draggable,o=n.element,r=o.find(".k-window-actions"),a=d.getOffset(n.appendTo);this._preventDragging=n.trigger(K)||!i,this._preventDragging||n.isMaximized()||(n.initialWindowPosition=d.getOffset(n.wrapper,"position"),n.initialPointerPosition={left:n.options.position.left,top:n.options.position.top},n.startPosition={left:t.x.client-n.initialWindowPosition.left,top:t.y.client-n.initialWindowPosition.top},n._updateBoundaries(),n.containment||(n.minLeft=r.length>0?g(r)+parseInt(r.css("right"),10)-g(o):20-g(o),n.minLeft-=a.left,n.minTop=-a.top),n.wrapper.append(he.overlay).children(I).hide(),e(k).css(H,t.currentTarget.css(H)))},drag:function(t){var n,i,r=this.owner,a=r.options.position,s=r.options.draggable.axis;this._preventDragging||r.isMaximized()||(s&&"x"!==s.toLowerCase()||(n=t.x.client-r.startPosition.left,r.containment&&!r._isPinned&&(n+=r.containment.scrollLeft()),a.left=o(n,r.minLeft,r.maxLeft)),s&&"y"!==s.toLowerCase()||(i=t.y.client-r.startPosition.top,r.containment&&!r._isPinned&&(i+=r.containment.scrollTop()),a.top=o(i,r.minTop,r.maxTop)),d.support.transforms?e(r.wrapper).css("transform","translate("+(a.left-r.initialPointerPosition.left)+"px, "+(a.top-r.initialPointerPosition.top)+"px)"):e(r.wrapper).css(a))},_finishDrag:function(){var t=this.owner;t.wrapper.children(I).toggle(!t.options.isMinimized).end().find(E).remove(),e(k).css(H,"")},dragcancel:function(e){this._preventDragging||(this._finishDrag(),e.currentTarget.closest(C).css(this.owner.initialWindowPosition))},dragend:function(){var t=this.owner;if(!this._preventDragging&&!t.isMaximized())return e(t.wrapper).css(t.options.position).css("transform",""),this._finishDrag(),t.trigger(Q),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},d.ui.plugin(ue)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.pane.min",["kendo.view.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.roleSelector,o=n.ui,r=o.Widget,a=n.ViewEngine,s=n.View,l=e.extend,d="navigate",c="viewShow",u="sameViewRequested",h=n.support.mobileOS,p=h.ios&&!h.appMode&&h.flatVersion>=700,f="#:back",g=".",m={pane:"k-pane",paneWrapper:"k-pane-wrapper",collapsiblePane:"k-collapsible-pane",vertical:"k-vertical"},v=r.extend({init:function(e,t){var i=this;r.fn.init.call(i,e,t),t=i.options,e=i.element,e.addClass(m.pane),i.options.collapsible&&e.addClass(m.collapsiblePane),this.history=[],this.historyCallback=function(e,t,n){var o=i.transition;return i.transition=null,p&&n&&(o="none"),i.viewEngine.showView(e,o,t)},this._historyNavigate=function(e){if(e===f){if(1===i.history.length)return;i.history.pop(),e=i.history[i.history.length-1]}else e instanceof s&&(e=""),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.viewEngine=new a(l({},{container:e,transition:t.transition,modelScope:t.modelScope,rootNeeded:!t.initial,serverNavigation:t.serverNavigation,remoteViewURLPrefix:t.root||"",layout:t.layout,$angular:t.$angular,showStart:function(){i.closeActiveDialogs()},after:function(){},viewShow:function(e){i.trigger(c,e)},loadStart:function(){},loadComplete:function(){},sameViewRequested:function(){i.trigger(u)},viewTypeDetermined:function(e){e.remote&&i.options.serverNavigation||i.trigger(d,{url:e.url})}},this.options.viewEngine)),this._setPortraitWidth(),n.onResize(function(){i._setPortraitWidth()})},closeActiveDialogs:function(){var t=this.element.find(i("actionsheet popover modalview")).filter(":visible");t.each(function(){n.widgetInstance(e(this),o).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},events:[d,c,u],append:function(e){return this.viewEngine.append(e)},destroy:function(){var e=this;r.fn.destroy.call(e),e.viewEngine&&e.viewEngine.destroy()},navigate:function(e,t){e instanceof s&&(e=e.id),this.transition=t,this._historyNavigate(e)},replace:function(e,t){e instanceof s&&(e=e.id),this.transition=t,this._historyReplace(e)},view:function(){return this.viewEngine.view()},_setPortraitWidth:function(){var e,t=this.options.portraitWidth;t&&(e=n.mobile.application.element.is(g+m.vertical)?t:"auto",this.element.css("width",e))}});v.wrap=function(e,t){var o,r;return e.is(i("view"))||(e=e.wrap("').parent()),o=e.wrap('').parent(),r=new v(o,t),r.navigate(""),r},n.Pane=v}(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",a="vertical",s=0,l=100,d=0,c=5,u="k-progressbar",h="k-progressbar-reverse",p="k-progressbar-indeterminate",f="k-complete",g="k-state-selected",m="k-progress-status",v="k-progress-end",_="k-state-selected",b="k-state-default",w="k-state-disabled",k={VALUE:"value",PERCENT:"percent",CHUNK:"chunk"},y="change",x="complete",C="boolean",S=Math,T=e.extend,D=e.proxy,A=100,I=400,E=3,M={progressStatus:""},F=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,x],options:{name:"ProgressBar",orientation:r,reverse:!1,min:s,max:l,value:d,enable:!0,type:k.VALUE,chunkCount:c,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(k,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:a)),i.enable===!1&&n.addClass(w),i.reverse&&n.addClass(h),i.value===!1&&n.addClass(p),i.type===k.CHUNK?t._addChunkProgressWrapper():i.showStatus&&(t.progressStatus=t.wrapper.prepend(M.progressStatus).find("."+m),e=i.value!==!1?i.value:i.min,t.progressStatus.text(i.type===k.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!==C?(e=i._roundValue(e),isNaN(e)||(n=i._validateValue(e),n!==o.value&&(i.wrapper.removeClass(p),o.value=n,i._isStarted=!0,i._updateProgress()))):e||(i.wrapper.addClass(p),o.value=!1),t)},_roundValue:function(e){e=parseFloat(e);var t=S.pow(10,E);return n._round(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===k.CHUNK?(e._updateChunks(n),e._onProgressUpdateAlways(t.value)):e._updateProgressWrapper(n)},_updateChunks:function(e){var t,n=this,i=n.options,o=i.chunkCount,s=parseInt(A/o*100,10)/100,l=parseInt(100*e,10)/100,d=S.floor(l/s);t=n.wrapper.find(i.orientation===r&&!i.reverse||i.orientation===a&&i.reverse?"li.k-item:lt("+d+")":"li.k-item:gt(-"+(d+1)+")"),n.wrapper.find("."+_).removeClass(_).addClass(b),t.removeClass(b).addClass(_)},_updateProgressWrapper:function(e){var t=this,n=t.options,i=t.wrapper.find("."+g),o=t._isStarted?t._animation.duration:0,r={};0===i.length&&t._addRegularProgressWrapper(),r[t._progressProperty]=e+"%",t.progressWrapper.animate(r,{duration:o,start:D(t._onProgressAnimateStart,t),progress:D(t._onProgressAnimate,t),complete:D(t._onProgressAnimateComplete,t,n.value),always:D(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!==k.CHUNK&&o<=98&&n.progressWrapper.removeClass(f)},_onProgressAnimateComplete:function(e){var t,n=this,i=n.options,o=parseFloat(n.progressWrapper[0].style[n._progressProperty]);i.type!==k.CHUNK&&o>98&&n.progressWrapper.addClass(f),i.showStatus&&(t=i.type===k.VALUE?e:i.type==k.PERCENT?n._calculatePercentage(e).toFixed()+"%":S.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(x,{value:n.max})},enable:function(e){var n=this,i=n.options;i.enable=t===e||e,n.wrapper.toggleClass(w,!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=A/n.chunkCount,r="";for(n.chunkCount<=1&&(n.chunkCount=1),r+="",e=n.chunkCount-1;e>=0;e--)r+="";r+="",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=A-t.chunkCount*i;o>0&&n.css(e._progressProperty,i+o+"%")},_addRegularProgressWrapper:function(){var t=this;t.progressWrapper=e("").appendTo(t.wrapper),t.options.showStatus&&(t.progressWrapper.append(M.progressStatus),t.progressStatus=t.wrapper.find("."+m))},_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,a=i.max;return n._onePercent=S.abs((a-r)/100),S.abs((o-r)/n._onePercent)},_progressAnimation:function(){var e=this,t=e.options,n=t.animation;e._animation=n===!1?{duration:0}:T({duration:I},t.animation)}});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("pdf/pako.min",["kendo.core.min"],e)}(function(){return function(){kendo.pdf=kendo.pdf||{},kendo.pdf.supportsDeflate=function(){return window.pako&&"function"==typeof window.pako.deflate},kendo.pdf.deflate=function(e){return window.pako.deflate(e)}}(),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdf/core.min",["pdf/pako.min","kendo.core.min","kendo.color.min","kendo.drawing.min"],e)}(function(){return function(e){function t(e){function t(){return S>=T}function n(){return ST&&(T=S)}function o(){return n()<<8|n()}function r(e){i(e>>8),i(e)}function a(){var e=o();return e>=32768?e-65536:e}function s(e){r(e<0?e+65536:e)}function l(){return 65536*o()+o()}function d(e){r(e>>>16&65535),r(65535&e)}function c(){var e=l();return e>=2147483648?e-4294967296:e}function u(e){d(e<0?e+4294967296:e)}function h(){return l()/65536}function p(e){d(Math.round(65536*e))}function f(){return c()/65536}function g(e){u(Math.round(65536*e))}function m(e){return b(e,n)}function v(e){return String.fromCharCode.apply(String,m(e))}function _(e){for(var t=0;t=e.length){var n=new Uint8Array(Math.max(t+256,2*e.length));n.set(e,0),e=n}}:function(){},k=Ee?function(){return new Uint8Array(e.buffer,0,T)}:function(){return e},y=Ee?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=55296&&t<=56319&&o65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}).join("")}function o(e){var t,n=window.atob(e),i=new Uint8Array(n.length);for(t=0;t=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 nt(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(je,x("",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 g(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 m(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",Ge.a4),!n)return{};if("string"==typeof n&&(n=Ge[n.toLowerCase()],null==n))throw Error("Unknown paper size");return n[0]=F(n[0]),n[1]=F(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=F(i,0),i={left:i,top:i,right:i,bottom:i}):i={left:F(i.left,0),top:F(i.top,0),right:F(i.right,0),bottom:F(i.bottom,0)},e("addMargin")&&(n[0]+=i.left+i.right,n[1]+=i.top+i.bottom)),{paperSize:n,margin:i}}function v(e){function t(t,n){return e&&null!=e[t]?e[t]:n}var n,i,o,r,a=this,s=f(),l=0,d=[];a.getOption=t,a.attach=function(e){return d.indexOf(e)<0&&(g(e,++l),d.push(e)),e},a.pages=[],a.FONTS={},a.IMAGES={},a.GRAD_COL_FUNCTIONS={},a.GRAD_OPC_FUNCTIONS={},a.GRAD_COL={},a.GRAD_OPC={},n=a.attach(new ot),i=a.attach(new rt),t("autoPrint")&&(o={},o.JavaScript=new nt({Names:[new Je("JS"),a.attach(new nt({S:z("JavaScript"),JS:new Je("print(true);")}))]}),n.props.Names=new nt(o)),n.setPages(i),r=a.attach(new nt({Producer:new Je(t("producer","Kendo UI PDF Generator")),Title:new Je(t("title","")),Author:new Je(t("author","")),Subject:new Je(t("subject","")),Keywords:new Je(t("keywords","")),Creator:new Je(t("creator","Kendo UI PDF Generator")),CreationDate:t("date",new Date)})),a.addPage=function(e){var t,n,o,r=m(function(t,n){return e&&null!=e[t]?e[t]:n}),s=r.paperSize,l=r.margin,d=s[0],c=s[1];return l&&(d-=l.left+l.right,c-=l.top+l.bottom),t=new it(f(),null,(!0)),n={Contents:a.attach(t),Parent:i,MediaBox:[0,0,s[0],s[1]]},o=new ct(a,n),o._content=t,i.addPage(a.attach(o)),o.transform(1,0,0,-1,0,s[1]),l&&(o.translate(l.left,l.top),o.rect(0,0,d,c),o.clip()),a.pages.push(o),o},a.render=function(){var e,t;for(s("%PDF-1.4",je,"%ÂÁÚÏÎ",je,je),e=0;e=u.width||n.height>=u.height)&&(n=null),!n&&d&&/^image\/jpe?g$/i.test(d.type)){var o=new FileReader;o.onload=function(){try{var n=new B(t(new Uint8Array(this.result)));URL.revokeObjectURL(l),i(Ye[e]=n)}catch(o){r()}},o.readAsArrayBuffer(d)}else r()}var l,d,c,u=Ye[e];u?i(u):(u=new Image,/^data:/i.test(e)||(u.crossOrigin="Anonymous"),Ee&&!/^data:/i.test(e)?(c=new XMLHttpRequest,c.onload=function(){d=c.response,l=URL.createObjectURL(d),o(l)},c.onerror=a,c.open("GET",e,!0),c.responseType="blob",c.send()):o(e))}function y(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 x(e,t,n){for(;e.length0&&t.withIndent(function(){for(var n=0;n0&&n%8===0?t.indent(e[n]):t(" ",e[n])}),t(" ]")}function A(e,t){t("(D:",C(e.getUTCFullYear(),4),C(e.getUTCMonth()+1,2),C(e.getUTCDate(),2),C(e.getUTCHours(),2),C(e.getUTCMinutes(),2),C(e.getUTCSeconds(),2),"Z)")}function I(e){return e*(72/25.4)}function E(e){return I(10*e)}function M(e){return 72*e}function F(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:I,cm:E,"in":M}[n[2]](i);if(null!=t)return t;throw Error("Can't parse unit: "+e)}function R(){}function P(e,t,n){n||(n=R),e.prototype=new n;for(var i in t)S(t,i)&&(e.prototype[i]=t[i]);return e}function z(e){return S(tt,e)?tt[e]:tt[e]=new et(e)}function B(e){var t,n,i,o,r,a,s,l,d;if(e.offset(0),r=e.readShort(),65496!=r)throw Error("Invalid JPEG image");for(;!e.eof();){if(a=e.readByte(),255!=a)throw Error("Invalid JPEG image");if(s=e.readByte(),l=e.readShort(),at.indexOf(s)>=0){o=e.readByte(),n=e.readShort(),t=e.readShort(),i=e.readByte();break}e.skip(l-2)}if(null==i)throw Error("Invalid JPEG image");switch(d={Type:z("XObject"),Subtype:z("Image"),Width:t,Height:n,BitsPerComponent:o,Filter:z("DCTDecode")},i){case 1:d.ColorSpace=z("DeviceGray");break;case 3:d.ColorSpace=z("DeviceRGB");break;case 4:d.ColorSpace=z("DeviceCMYK"),d.Decode=[1,0,1,0,1,0,1,0]}this.asStream=function(){e.offset(0);var t=new it(e,d);return t._resourceName=z("I"+ ++qe),t}}function L(e,t,n,i){this.asStream=function(o){var r=new it(i,{Type:z("XObject"),Subtype:z("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:z("DeviceGray")},(!0)),a=new it(n,{Type:z("XObject"),Subtype:z("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:z("DeviceRGB"),SMask:o.attach(r)},(!0));return a._resourceName=z("I"+ ++qe),a}}function H(e){return e.map(function(e){return Xe(e)?H(e):"number"==typeof e?(Math.round(1e3*e)/1e3).toFixed(3):e}).join(" ")}function N(e,t,n,i,o,r,a){var s=H([t,n,i,o,r,a]),l=e.GRAD_COL_FUNCTIONS[s];return l||(l=e.GRAD_COL_FUNCTIONS[s]=e.attach(new nt({FunctionType:2,Domain:[0,1],Range:[0,1,0,1,0,1],N:1,C0:[t,n,i],C1:[o,r,a]}))),l}function O(e,t,n){var i=H([t,n]),o=e.GRAD_OPC_FUNCTIONS[i];return o||(o=e.GRAD_OPC_FUNCTIONS[i]=e.attach(new nt({FunctionType:2,Domain:[0,1],Range:[0,1],N:1,C0:[t],C1:[n]}))),o}function V(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,a,s,l=!1,d=[],c=[],u=[],h=[];for(i=1;i0)){var r=new v({producer:n("producer"),title:n("title"),author:n("author"),subject:n("subject"),keywords:n("keywords"),creator:n("creator"),date:n("date"),autoPrint:n("autoPrint")});l?e.children.forEach(i):i(e),t(r.render(),r)}}var o,r=[],a={},s=e.options,l=n("multiPage"),d=n("imgDPI");d&&w(),e.traverse(function(e){ne({Image:function(e){var t,n,i=e.src();d?(t=e.bbox().size,n=a[i],t={width:Math.ceil(t.width*d/72),height:Math.ceil(t.height*d/72)},n&&(t.width=Math.max(n.width,t.width),t.height=Math.max(n.height,t.height)),a[i]=t):a[i]=null},Text:function(e){var t=G(e.options.font),n=$(t);r.indexOf(n)<0&&r.push(n)}},e)}),o=2,Ke(r,i),Qe(a,i)}function Z(e,t){J(e,function(e){t("data:application/pdf;base64,"+e.base64())})}function ee(e,t){J(e,function(e){t(new window.Blob([e.get()],{type:"application/pdf"}))})}function te(t,n,i,o){window.Blob&&!Se.safari?ee(t,function(t){e.saveAs({dataURI:t,fileName:n}),o&&o(t)}):Z(t,function(t){e.saveAs({dataURI:t,fileName:n,proxyURL:i}),o&&o(t)})}function ne(e,t){var n=e[t.nodeType];return n?n.call.apply(n,arguments):t}function ie(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),oe(e,t,n),re(e,t,n),i&&(r=i.matrix(),t.transform(r.a,r.b,r.c,r.d,r.e,r.f)),ae(e,t,n),ne({Path:he,MultiPath:pe,Circle:fe,Arc:ge,Text:me,Image:_e,Group:ve,Rect:be},e,t,n),t.restore(),e.options._pdfDebug&&t.comment("END: "+e.options._pdfDebug)}function oe(e,t){var n,i,o,r,a,s,l=e.stroke&&e.stroke();if(l){if(n=l.color){if(n=we(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(ft[o],0),r=l.lineCap,r&&t.setLineCap(gt[r]),a=l.lineJoin,a&&t.setLineJoin(mt[a]),s=l.opacity,null!=s&&t.setStrokeOpacity(s)}}function re(e,t){var n,i,o=e.fill&&e.fill();if(o&&!(o instanceof De.Gradient)){if(n=o.color){if(n=we(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 ae(e,t,n){var i=e.clip();i&&(ue(i,t,n),t.clip())}function se(e){return e&&(e instanceof De.Gradient||e.color&&!/^(none|transparent)$/i.test(e.color)&&(null==e.width||e.width>0)&&(null==e.opacity||e.opacity>0))}function le(e,t,n,i){var o,r,a,s,l,d,c,u,h=e.fill();if(h instanceof De.Gradient)return i?t.clipStroke():t.clip(),o=h instanceof De.RadialGradient,o?(r={x:h.center().x,y:h.center().y,r:0},a={x:h.center().x,y:h.center().y,r:h.radius()}):(r={x:h.start().x,y:h.start().y},a={x:h.end().x,y:h.end().y}),s=h.stops.elements().map(function(e){var t,n=e.offset();return n=/%$/.test(n)?parseFloat(n)/100:parseFloat(n),t=we(e.color()),t.a*=e.opacity(),{offset:n,color:t}}),s.unshift(s[0]),s.push(s[s.length-1]),l={userSpace:h.userSpace(),type:o?"radial":"linear",start:r,end:a,stops:s},d=e.rawBBox(),c=d.topLeft(),u=d.getSize(),d={left:c.x,top:c.y,width:u.width,height:u.height},t.gradient(l,d),!0}function de(e,t,n){se(e.fill())&&se(e.stroke())?le(e,t,n,!0)||t.fillStroke():se(e.fill())?le(e,t,n,!1)||t.fill():se(e.stroke())?t.stroke():t.nop()}function ce(e,t){var n,i,o,r=e.segments;if(4==r.length&&e.options.closed){for(n=[],i=0;i0&&(se(e.fill())||se(e.stroke()))}function i(e){var t,n,i=[];for(t=0;t0?e:t(null)},Group:function(n){if(!(n.visible()&&n.opacity()>0))return t(null);var o=new De.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)}},a)})}var s,l=!1,d=Ie.Matrix.unit(),c=null;do s=!1,e=a(e);while(e&&s);return{root:e,bbox:c}}function ye(e,t){var n,i=Ae.createPromise();for(n in t)"margin"==n&&e.options.pdf&&e.options.pdf._ignoreMargin||e.options.set("pdf."+n,t[n]);return Z(e,i.resolve),i}function xe(e,t){var n,i=Ae.createPromise();for(n in t)"margin"==n&&e.options.pdf&&e.options.pdf._ignoreMargin||e.options.set("pdf."+n,t[n]);return window.Blob&&!Se.safari?ee(e,i.resolve):Z(e,i.resolve),i}var Ce,Se,Te,De,Ae,Ie,Ee,Me,Fe,Re,Pe,ze,Be,Le,He,Ne,Oe,Ve,We,Ue,je,qe,Ge,$e,Ye,Ke,Qe,Xe,Je,Ze,et,tt,nt,it,ot,rt,at,st,lt,dt,ct,ut,ht,pt,ft,gt,mt;window.kendo.pdf=window.kendo.pdf||{},Ce=e.support,Se=Ce.browser,Te=e.pdf,De=e.drawing,Ae=De.util,Ie=e.geometry,Ee="undefined"!=typeof Uint8Array&&e.support.browser&&(!e.support.browser.msie||e.support.browser.version>9),Me=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{decode:function(t){for(var n,i,o,r,a,s,l,d=t.replace(/[^A-Za-z0-9\+\/\=]/g,""),c=0,u=d.length,h=[];c>>4,s=(15&i)<<4|o>>>2,l=(3&o)<<6|r,h.push(a),64!=o&&h.push(s),64!=r&&h.push(l);return h},encode:function(t){for(var n,i,o,r,a,s,l,d=0,c=t.length,u="";d>>2,a=(3&n)<<4|i>>>4,s=(15&i)<<2|o>>>6,l=63&o,d-c==2?s=l=64:d-c==1&&(l=64),u+=e.charAt(r)+e.charAt(a)+e.charAt(s)+e.charAt(l);return u}}}(),d.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,o,r,a,l,d,c,u=this,h=Object.keys(e).length,p=Math.pow(2,Math.floor(Math.log(h)/Math.LN2)),f=16*p,g=Math.floor(Math.log(p)/Math.LN2),m=16*h-f,v=t();v.writeLong(this.scalerType),v.writeShort(h),v.writeShort(f),v.writeShort(g),v.writeShort(m),n=16*h,i=v.offset()+n,o=null,r=t();for(a in e)if(s(e,a))for(l=e[a],v.writeString(a),v.writeLong(u.checksum(l)),v.writeLong(i),v.writeLong(l.length),r.write(l),"head"==a&&(o=i),i+=l.length;i%4;)r.writeByte(0),i++;return v.write(r.get()),d=this.checksum(v.get()),c=2981146554-d,v.offset(o+8),v.writeLong(c),v.get()},checksum:function(e){e=t(e);for(var n=0;!e.eof();)n+=e.readLong();return 4294967295&n}},Fe=c({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()}}),Re=c({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=0?o.push(d):(o.push(e.length+r.length),r.push(l));for(i.writeShort(n.length),a=0;a0;)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,r,a,s,d,c,u,h,p,f,g,m,v,_,b,w,k,y=l(e),x=[],C=[],S=null,T=null;for(o=0;o=32768)for(f.push(0),g.push(2*(m.length+d-o)),w=v;w<=_;++w)m.push(i(w));else f.push(b-v),g.push(0)}return k=t(),k.writeShort(3),k.writeShort(1),k.writeLong(12),k.writeShort(4),k.writeShort(16+8*d+2*m.length),k.writeShort(0),k.writeShort(c),k.writeShort(u),k.writeShort(h),k.writeShort(p),C.forEach(k.writeShort),k.writeShort(0),x.forEach(k.writeShort),f.forEach(k.writeShort_),g.forEach(k.writeShort),m.forEach(k.writeShort),k.get()}return c({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()}})}(),Ve=c({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()}}),We=1e5,h.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 l(this.ogid2ngid)},glyphsFor:function(e,t){var n,i,o,r=this;for(t||(t={}),n=0;n")}},Je),et=P(function(e){this.name=e},{render:function(e){e("/"+this.escape())},escape:function(){return this.name.replace(/[^\x21-\x7E]/g,function(e){return"#"+C(e.charCodeAt(0).toString(16),2)})},toString:function(){return this.name}}),tt={},et.get=z,nt=P(function(e){this.props=e},{render:function(e){var t=this.props,n=!0;e("<<"),e.withIndent(function(){for(var i in t)S(t,i)&&!/^_/.test(i)&&(n=!1,e.indent(z(i)," ",t[i]))}),n||e.indent(),e(">>")}}),it=P(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&&Te.supportsDeflate()&&(n.Filter?n.Filter instanceof Array||(n.Filter=[n.Filter]):n.Filter=[],n.Filter.unshift(z("FlateDecode")),t=Te.deflate(t)),n.Length=t.length,e(new nt(n)," stream",je),e.writeData(t),e(je,"endstream")}}),ot=P(function(){this.props={Type:z("Catalog")}},{setPages:function(e){this.props.Pages=e}},nt),rt=P(function(){this.props={Type:z("Pages"),Kids:[],Count:0}},{addPage:function(e){this.props.Kids.push(e),this.props.Count++}},nt),at=[192,193,194,195,197,198,199,201,202,203,205,206,207],st=P(function(e){this.props={Type:z("Font"),Subtype:z("Type1"),BaseFont:z(e)},this._resourceName=z("F"+ ++qe)},{encodeText:function(e){return new Je(e+"")}},nt),lt=P(function(e,t,n){var i,o;n=this.props=n||{},n.Type=z("Font"),n.Subtype=z("Type0"),n.Encoding=z("Identity-H"),this._pdf=e,this._font=t,this._sub=t.makeSubset(),this._resourceName=z("F"+ ++qe),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 Ze(this._sub.encodeText(e+""))},getTextWidth:function(e,t){var n,i,o=this,r=0,a=this._font.cmap.codeMap;for(n=0;n> def"),e.indent("/CMapName /Adobe-Identity-UCS def"),e.indent("/CMapType 2 def"),e.indent("1 begincodespacerange"),e.indent("  <0000>"),e.indent("endcodespacerange");var t=this;e.indent(t.lastChar-t.firstChar+1," beginbfchar"),e.withIndent(function(){var n,o,r,a;for(n=t.firstChar;n<=t.lastChar;++n){for(o=t.map[n],r=i([o]),e.indent("<",C(n.toString(16),4),">","<"),a=0;a")}}),e.indent("endbfchar"),e.indent("endcmap"),e.indent("CMapName currentdict /CMap defineresource pop"),e.indent("end"),e.indent("end")}}),ct=P(function(e,t){this._pdf=e,this._rcount=0,this._textMode=!1,this._fontResources={},this._gsResources={},this._xResources={},this._patResources={},this._shResources={},this._opacity=1,this._matrix=[1,0,0,1,0,0],this._annotations=[],this._font=null,this._fontSize=null,this._contextStack=[],t=this.props=t||{},t.Type=z("Page"),t.ProcSet=[z("PDF"),z("Text"),z("ImageB"),z("ImageC"),z("ImageI")],t.Resources=new nt({Font:new nt(this._fontResources),ExtGState:new nt(this._gsResources),XObject:new nt(this._xResources),Pattern:new nt(this._patResources),Shading:new nt(this._shResources)}),t.Annots=this._annotations},{_out:function(){this._content.data.apply(null,arguments)},transform:function(e,t,n,i,o,r){X(arguments)||(this._matrix=Q(arguments,this._matrix),this._out(e," ",t," ",n," ",i," ",o," ",r," cm"),this._out(je))},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",je)},endText:function(){this._textMode=!1,this._out("ET",je)},_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 lt||(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",je)},setTextLeading:function(e){this._requireTextMode(),this._out(e," TL",je)},setTextRenderingMode:function(e){this._requireTextMode(),this._out(e," Tr",je)},showText:function(e,t){var n,i;this._requireFont(),e.length>1&&t&&this._font instanceof lt&&(n=this._font.getTextWidth(this._fontSize,e),i=t/n*100,this._out(i," Tz ")),this._out(this._font.encodeText(e)," Tj",je)},showTextNL:function(e){this._requireFont(),this._out(this._font.encodeText(e)," '",je)},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 nt({Type:z("Annot"),Subtype:z("Link"),Rect:[n.x,n.y,i.x,i.y],Border:[0,0,0],A:new nt({Type:z("Action"),S:z("URI"),URI:new Je(e)})}))},setStrokeColor:function(e,t,n){this._out(e," ",t," ",n," RG",je)},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",je)}},setFillColor:function(e,t,n){this._out(e," ",t," ",n," rg",je)},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",je)}},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=j(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",je),this.restore()},setDashPattern:function(e,t){this._out(e," ",t," d",je)},setLineWidth:function(e){this._out(e," w",je)},setLineCap:function(e){this._out(e," J",je)},setLineJoin:function(e){this._out(e," j",je)},setMitterLimit:function(e){this._out(e," M",je)},save:function(){this._contextStack.push(this._context()),this._out("q",je)},restore:function(){this._out("Q",je),this._context(this._contextStack.pop())},moveTo:function(e,t){this._out(e," ",t," m",je)},lineTo:function(e,t){this._out(e," ",t," l",je)},bezier:function(e,t,n,i,o,r){this._out(e," ",t," ",n," ",i," ",o," ",r," c",je)},bezier1:function(e,t,n,i){this._out(e," ",t," ",n," ",i," y",je)},bezier2:function(e,t,n,i){this._out(e," ",t," ",n," ",i," v",je)},close:function(){this._out("h",je)},rect:function(e,t,n,i){this._out(e," ",t," ",n," ",i," re",je)},ellipse:function(e,t,n,i){function o(t){return e+t}function r(e){return t+e}var a=.5522847498307936;this.moveTo(o(0),r(i)),this.bezier(o(n*a),r(i),o(n),r(i*a),o(n),r(0)),this.bezier(o(n),r(-i*a),o(n*a),r(-i),o(0),r(-i)),this.bezier(o(-n*a),r(-i),o(-n),r(-i*a),o(-n),r(0)),this.bezier(o(-n),r(i*a),o(-n*a),r(i),o(0),r(i))},circle:function(e,t,n){this.ellipse(e,t,n,n)},stroke:function(){this._out("S",je)},nop:function(){this._out("n",je)},clip:function(){this._out("W n",je)},clipStroke:function(){this._out("W S",je)},closeStroke:function(){this._out("s",je)},fill:function(){this._out("f",je)},fillStroke:function(){this._out("B",je)},drawImage:function(e){var t=this._pdf.getImage(e);t&&(this._xResources[t._resourceName]=t,this._out(t._resourceName," Do",je))},comment:function(e){var t=this;e.split(/\r?\n/g).forEach(function(e){t._out("% ",e,je)})},_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],a=t[4],s=t[5];return{x:n*e.x+o*e.y+a,y:i*e.x+r*e.y+s}}},nt),ut={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"},Y("Times New Roman","serif"),Y("Courier New","monospace"),Y("Arial","sans-serif"),Y("Helvetica","sans-serif"),Y("Verdana","sans-serif"),Y("Tahoma","sans-serif"),Y("Georgia","sans-serif"),Y("Monaco","monospace"),Y("Andale Mono","monospace"),ht={fill:0,stroke:1,fillAndStroke:2,invisible:3,fillAndClip:4,strokeAndClip:5,fillStrokeClip:6,clip:7},pt=ht,ft={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:[]},gt={butt:0,round:1,square:2},mt={miter:0,round:1,bevel:2},e.deepExtend(e.pdf,{Document:v,BinaryStream:t,defineFont:K,parseFontDef:G,getFontURL:$,loadFonts:Ke,loadImages:Qe,getPaperOptions:m,clearImageCache:w,TEXT_RENDERING_MODE:ht,exportPDF:ye,exportPDFToBlob:xe,saveAs:te,toDataURL:Z,toBlob:ee,render:J}),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(""),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.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==_.ENTER||e.keyCode==_.SPACEBAR}var r,a,s,l,d,c,u,h,p=window.kendo,f=p.ui.Widget,g=p.ui.Popup.TabKeyTrap,m=e.proxy,v=p.template,_=p.keys,b=e.isFunction,w="kendoWindow",k=".k-dialog",y=".k-window",x=".k-dialog-close",C="k-content k-window-content k-dialog-content",S=".k-window-content",T=".k-content",D="k-scroll",A="k-dialog-titleless",I=".k-dialog-title",E=I+"bar",M=".k-dialog-buttongroup",F=".k-button",R="k-alert",P="k-confirm",z="k-prompt",B=".k-textbox",L=".k-overlay",H=":visible",N="zIndex",O="body",V="initOpen",W="touchstart",U="touchmove",j="open",q="close",G="show",$="hide",Y="width",K={small:"k-window-sm",medium:"k-window-md",large:"k-window-lg"},Q="hidden",X="overflow",J="original-overflow-rule",Z="tap-y",ee=100,te=p.support.cssFlexbox,ne={okText:"OK",cancel:"Cancel",promptInput:"Input"},ie=Math.ceil,oe=":not(link,meta,script,style)",re=f.extend({init:function(e,t){var n=this;f.fn.init.call(n,e,t),n._init(n.element,n.options),p.notify(n)},_init:function(i,o){var a,s=this;s._centerCallback=m(s._center,s),s.appendTo=e(O),n(o.visible)&&null!==o.visible||(o.visible=i.is(H)),s.wrapperTemplate===t&&(s.wrapperTemplate=r.wrapper),s._createDialog(),a=s.wrapper=i.closest(k),o._defaultFocus===t&&(s._defaultFocus=i[0]),s._tabindex(i),s._dimensions(),this._tabKeyTrap=new g(a),s.options.visible?s._triggerOpen():s.wrapper.hide()},setOptions:function(n){var i,o=this,r=o.options.size;n=e.extend(o.options,n),f.fn.setOptions.call(o,n),n.title!==t&&o.title(n.title),n.content&&(p.destroy(o.element.children()),o.element.html(n.content)),n.actions&&(o.wrapper.children(M).remove(),o._createActionbar(o.wrapper)),o.wrapper.show(),o._closable(o.wrapper),o.wrapper.removeClass(K[r]),o._dimensions(),n.visible?o._triggerOpen():o.wrapper.hide(),t!==n.modal&&(i=o.options.visible!==!1,o._enableDocumentScrolling(),o._overlay(n.modal&&i))},_dimensions:function(){var e,t,n=this,o=n.wrapper,r=n.options,a=r.width,s=r.height,l=r.size,d=["minWidth","minHeight","maxWidth","maxHeight"];for(e=0;e0?o.width(a):o.outerWidth(i(a,r.minWidth,r.maxWidth))),s&&((""+s).indexOf("%")>0?o.height(s):o.outerHeight(i(s,r.minHeight,r.maxHeight)),this._setElementHeight()),l&&K[l]&&o.addClass(K[l])},_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:ie(t)+"px"}))},_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&&(o=0),t.css({height:ie(o)+"px"}),this._applyScrollClassName(t)},_applyScrollClassName:function(e){var t=e.get(0).scrollHeight>e.outerHeight();t?e.addClass(D):e.removeClass(D)},_uiHeight:function(){var e=this,t=e.wrapper,n=t.children(M),i=n[0]&&n[0].offsetHeight||0,o=t.children(E),r=o[0]&&o[0].offsetHeight||0;return i+r},_overlay:function(t){var n=this.appendTo.children(L),i=this.wrapper;return n.length||(n=e(r.overlay)),n.insertBefore(i[0]).toggle(t).css(N,parseInt(i.css(N),10)-1),t?this._waiAriaOverlay():this._removeWaiAriaOverlay(),this.options.modal.preventScroll&&this._stopDocumentScrolling(),n},_waiAriaOverlay:function(){var t=this.wrapper;this._overlayedNodes=t.prevAll(oe).add(t.nextAll(oe)).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(!1)},_closeKeyHandler:function(e){(o(e)||e.keyCode==_.ESC)&&this.close(!1)},_keydown:function(e){var t=this,n=t.options,i=e.keyCode;i==_.ESC&&!t._closing&&n.closable&&t.close(!1)},_createDialog:function(){var t=this,n=t.element,i=t.options,o=p.support.isRtl(n),a=e(r.titlebar(i)),s=(n.id||p.guid())+"_title",l=e(t.wrapperTemplate(i));l.toggleClass("k-rtl",o),n.addClass(C),t.appendTo.append(l),i.title!==!1?(l.append(a),a.attr("id",s),l.attr("aria-labelledby",s)):l.addClass(A),t._closable(l),l.append(n),i.content&&(p.destroy(n.children()),n.html(i.content)),i.actions.length&&t._createActionbar(l)},_closable:function(e){var t=this,n=t.options,i=e.children(E),o=i.find(".k-window-actions"),a=o.length?o.find(".k-dialog-close"):e.find(".k-dialog-close");a.remove(),n.closable!==!1&&(n.title!==!1&&o.length?o.append(r.close(n)):e.prepend(r.close(n)),e.autoApplyNS(w),t.element.autoApplyNS(w),e.find(x).on("click",m(t._closeClick,t)).on("keydown",m(t._closeKeyHandler,t)),t.element.on("keydown",m(t._keydown,t)))},_createActionbar:function(t){var n="stretched"===this.options.buttonLayout,i=n?"stretched":"normal",o=e(r.actionbar({buttonLayout:i}));this._addButtons(o),n&&!te&&this._normalizeButtonSize(o),t.append(o)},_addButtons:function(t){var n,i,o,a,s=this,l=s.options,d=m(s._actionClick,s),c=m(s._actionKeyHandler,s),u=s.options.actions,h=u.length,p=Math.round(ee/h);for(o=0;o0&&i.css(Y,o+r+"%")},_tabindex:function(e){var t,n=this,i=n.wrapper,o=i.find(x),r=i.find(M+" "+F);f.fn._tabindex.call(this,e),t=e.attr("tabindex"),o.attr("tabIndex",t),r.attr("tabIndex",t)},_actionClick:function(e){this.wrapper.is(H)&&this._runActionBtn(e.currentTarget)},_actionKeyHandler:function(e){o(e)?this._runActionBtn(e.currentTarget):e.keyCode==_.ESC&&this.close(!1)},_runActionBtn:function(t){var n,i,o=this;o._closing||(n=e(t).data("action"),i=b(n)&&n({sender:o})===!1,i||o.close(!1))},_triggerOpen:function(){var e=this,t=e.options,n=e.wrapper;e.toFront(),e._triggerInitOpen(),e.trigger(j),t.modal&&(e._overlay(n.is(H)).css({opacity:.5}),e._focusDialog())},open:function(){var e,t,n,i=this,o=i.wrapper,r=this._animationOptions(j),a=i.options;return this._triggerInitOpen(),i.trigger(j)||(i._closing&&o.kendoStop(!0,!0),i._closing=!1,i.toFront(),a.visible=!0,a.modal&&(t=!!i._modals().length,e=i._overlay(t),e.kendoStop(!0,!0),r.duration&&p.effects.Fade&&!t?(n=p.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:m(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(G)},_triggerInitOpen:function(){n(this._initOpenTriggered)||(this._initOpenTriggered=!0,this.trigger(V))},toFront:function(){var t=this,n=t.wrapper,i=+n.css(N),o=i;return t.center(),e(y).each(function(t,n){var o=e(n),r=o.css(N);isNaN(r)||(i=Math.max(+r,i))}),(!n[0].style.zIndex||o.k-overlay").remove(),n=null,t},close:function(e){return arguments.length||(e=!0),this._close(e),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(H)&&!t.trigger(q,{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:m(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,a=r+Math.max(0,(i.width()-n.width())/2),s=o+Math.max(0,(i.height()-n.height()-parseInt(n.css("paddingTop"),10))/2);return n.css({left:a,top:s}),t},_centerOnResize:function(){this._trackResize||(p.onResize(this._centerCallback),this._trackResize=!0)},_stopCenterOnResize:function(){p.unbindResize(this._centerCallback),this._trackResize=!1},_removeOverlay:function(){var e=this._modals(),t=this.options,n=t.modal&&!e.length;n?(this._overlay(!1).remove(),t.modal.preventScroll&&this._enableDocumentScrolling()):e.length&&(this._object(e.last())._overlay(!0),t.modal.preventScroll&&this._stopDocumentScrolling())},_stopDocumentScrolling:function(){var t,n,i=this,o=e("body");i._storeOverflowRule(o),o.css(X,Q),t=e("html"),n=t[0],i._storeOverflowRule(t),t.css(X,Q),p.support.mobileOS.ios&&(n.addEventListener(W,i._touchStart,{passive:!1}),n.addEventListener(U,i._touchMove,{passive:!1}))},_touchStart:function(t){e(this).data(Z,t.changedTouches[0].pageY)},_touchMove:function(t){var n=t.target,i=e(t.target),o=t.changedTouches[0].pageY-e(this).data(Z)>0,r=i.is(S)&&o&&0===i.scrollTop()||!o&&i.scrollTop()===n.scrollHeight-n.clientHeight;i.is(S)&&!r||t.preventDefault()},_enableDocumentScrolling:function(){var t=this,n=e(document.body),i=e("html"),o=i[0];t._restoreOverflowRule(n),t._restoreOverflowRule(i),p.support.mobileOS.ios&&(i.removeData(Z),o.removeEventListener(W,t._touchStart,{passive:!1}),o.removeEventListener(U,t._touchMove,{passive:!1}))},_storeOverflowRule:function(e){if(!this._isOverflowStored(e)){var t=e.get(0).style.overflow;"string"==typeof t&&e.data(J,t)}},_isOverflowStored:function(e){return"string"==typeof e.data(J)},_restoreOverflowRule:function(e){var n=e.data(J);null!==n&&n!==t?(e.css(X,n),e.removeData(J)):e.css(X,"")},_closeAnimationEnd:function(){var e,t=this;t._closing=!1,t.wrapper.hide().css("opacity",""),t.trigger($),t.options.modal&&(e=t._object(t._modals().last()),e&&e.toFront())},_modals:function(){var t=this,n=e(y).filter(function(){var n=e(this),i=t._object(n),o=i&&i.options;return o&&o.modal&&t.options.appendTo==o.appendTo&&o.visible&&n.is(H)}).sort(function(t,n){return+e(t).css("zIndex")-+e(n).css("zIndex")});return t=null,
n},_object:function(e){var n=e.children(T),i=p.widgetInstance(n);return i?i:t},destroy:function(){var t=this;t._destroy(),f.fn.destroy.call(t),t.wrapper.remove(),t.wrapper=t.element=e()},_destroy:function(){var e=this,t="."+w;e.wrapper.off(t),e.element.off(t),e.wrapper.find(x+","+M+" > "+F).off(t),e._stopCenterOnResize()},title:function(t){var n=this,i=n.wrapper,o=n.options,a=i.children(E),s=a.children(I),l=p.htmlEncode(t);return arguments.length?(t===!1?(a.remove(),i.addClass(A)):(a.length||(a=e(r.titlebar(o)).prependTo(i),s=a.children(I),i.removeClass(A)),s.html(l)),n.options.title=l,n):s.html()},content:function(e,t){var i=this,o=i.wrapper.children(T);return n(e)?(this.angular("cleanup",function(){return{elements:o.children()}}),p.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:[V,j,q,G,$],options:{title:"",buttonLayout:"stretched",actions:[],modal:!0,size:"auto",width:null,height:null,minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,content:null,visible:null,appendTo:O,closable:!0}}),ae=re.extend({options:{name:"Dialog",messages:{close:"Close"}}});p.ui.plugin(ae),a=re.extend({_init:function(e,t){var n=this;n.wrapperTemplate=r.alertWrapper,t._defaultFocus=null,n._ensureContentId(e),re.fn._init.call(n,e,t),n.bind($,m(n.destroy,n)),n._ariaDescribedBy(),n._initFocus()},_ensureContentId:function(t){var n=e(t);n.attr("id")||n.attr("id",p.guid()+"_k-popup")},_ariaDescribedBy:function(){this.wrapper.attr("aria-describedby",this.element.attr("id"))},_initFocus:function(){var e=this.options;this._defaultFocus=this._chooseEntryFocus(),this._defaultFocus&&e.visible&&e.modal&&this._focusDialog()},_chooseEntryFocus:function(){return this.wrapper.find(M+" > "+F)[0]},options:{title:window.location.host,closable:!1,messages:ne}}),s=a.extend({_init:function(e,t){var n=this;a.fn._init.call(n,e,t),n.wrapper.addClass(R)},options:{name:"Alert",modal:!0,actions:[{text:"#: messages.okText #"}]}}),p.ui.plugin(s),l=function(t){return e(r.alert).kendoAlert({content:t}).data("kendoAlert").open()},d=a.extend({_init:function(t,n){var i=this;a.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()}}]}}),p.ui.plugin(d),c=function(t){var n=e(r.confirm).kendoConfirm({content:t}).data("kendoConfirm").open();return n.result},u=a.extend({_init:function(t,n){var i=this;a.fn._init.call(i,t,n),i.wrapper.addClass(z),i._createPrompt(),i.result=e.Deferred()},_createPrompt:function(){var t=this.options.value,n=e(r.promptInputContainer(this.options)).insertAfter(this.element);t&&n.children(B).val(t),this._defaultFocus=this._chooseEntryFocus(),this._focusDialog()},_chooseEntryFocus:function(){return this.wrapper.find(B)[0]},options:{name:"Prompt",modal:!0,value:"",actions:[{text:"#: messages.okText #",primary:!0,action:function(e){var t=e.sender,n=t.wrapper.find(B).val();t.result.resolve(n)}},{text:"#: messages.cancel #",action:function(e){var t=e.sender,n=t.wrapper.find(B).val();e.sender.result.reject(n)}}]}}),p.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:v(""),action:v(""),titlebar:v("#: title #"),close:v(""),actionbar:v(""),overlay:"",alertWrapper:v(""),alert:"",confirm:"",prompt:"",promptInputContainer:v("")},p.alert=l,p.confirm=c,p.prompt=h}(window.kendo.jQuery),window.kendo},"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.ooxml.min","kendo.excel.min","kendo.pane.min","kendo.progressbar.min","kendo.pdf.min","kendo.dialog.min","kendo.pane.min","kendo.switch.min"],e)}(function(){return function(e,t){function n(e,t){return"["+Me.attr(e)+"="+t+"]"}function i(e){return Array(e+1).join('')}function o(e){var t,n=" ";if(e){if(typeof e===an)return e;for(t in e)""!==e[t]&&(n+=t+'="'+e[t]+'"')}return n}function r(t,n){e("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",n)}function a(t,n,i,o,r){var a,s=n;for(n=e(),r=r||1,a=0;a0}function w(e){return je(e,function(e){var t=!e.hidden&&e.matchesMedia!==!1;return t&&e.columns&&(t=w(e.columns).length>0),t})}function k(e){var t,n,i=[];for(n=0;no?r-(i-o)||1:r+(o-i):i>o?r+(i-o):r-(o-i)||1}function S(t,n,i,o,r,a,s,l){var d,c,u=D(t),h=D([n]);u>h&&(d=Array(s+1).join(''),c=a.children(":not(.k-filter-row)"),e(Array(u-h+1).join(""+d+"")).insertAfter(c.last())),O(a,u-h),A(i,o,r,a,l)}function T(t,n,i){var o,r,a,s,l,d,c,u;for(i=i||0,a=n,n=K(n),s={},l=t.find(">tr:not(.k-filter-row)"),d=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},c=0,u=n.length;co&&(o=n));return i+o}function A(t,n,i,o,r){var a,s,l=F(t[0],n),d=i.find(">tr:not(.k-filter-row):eq("+l.row+")>th.k-header"),c=e(),u=l.cell;for(a=0;atr:not(.k-filter-row)").eq(l.row)[r](c),s=[],a=0;a-1&&t0||0===s&&!i)&&s++,l=Ge(n,a),t=E(a,s,n,l>s),d=Ge(t,o),(!t.columns||d&&d!==a.length-1)&&t&&t!=n&&t.columns?M(e,t,n,i,o):null)}function F(e,t,n,i){var o,r;for(n=n||0,i=i||{},i[n]=i[n]||0,r=0;r1&&(o[i].rowSpan=n-t||1)}function O(e,t){var n,i=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(n=0;n1&&(r[n].rowSpan-=o);return i.length-o}function W(e,t,n,i,o){var r,a,s,l=[];for(r=0,s=e.length;rtr:not(.k-filter-row)"),r=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},a=e();return o.length>1&&(a=o.find("th").filter(r).filter(function(){return this.rowSpan>1})),a=a.add(o.last().find("th").filter(r)),i=Me.attr("index"),a.sort(function(n,o){var r,a;return n=e(n),o=e(o),r=n.attr(i),a=o.attr(i),r===t&&(r=e(n).index()),a===t&&(a=e(o).index()),r=parseInt(r,10),a=parseInt(a,10),r>a?1:r0){for(n=h.eq(p-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),a=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return this.colSpan>1}),s=0;s=s&&r1&&(s-=l-1),o++}return c}function ee(t,n,i,o){var r,a=t;return o&&t.empty(),ze?t[0].innerHTML=i:(r=document.createElement("div"),r.innerHTML=""+i+"",t=r.firstChild.firstChild,n[0].replaceChild(t,a[0]),t=e(t)),t}function te(e){e=e||{};var t=e.style;return t?(t=t.replace(/display:[^;]*/i,"display:none"),t.match(/display:/i)||(t=t.replace(/(.*)?/i,"display:none;$1"))):t="display:none",We({},e,{style:t})}function ne(e){e=e||{};var t=e.style;return t&&(e.style=t.replace(/(display\s*:\s*none\s*;?)*/gi,"")),e}function ie(t,n,i,o){var r,a=t.find(">colgroup"),s=Ue(n,function(e){return r=e.width,r&&0!==parseInt(r,10)?Me.format('',typeof r===an?r:r+"px"):""});(i||a.find(".k-hierarchy-col").length)&&s.splice(0,0,''),a.length&&a.remove(),a=e(Array(o+1).join('')+s.join("")),a.is("colgroup")||(a=e("").append(a)),t.prepend(a),Bn.msie&&8==Bn.version&&(t.css("display","inline-table"),window.setTimeout(function(){t.css("display","")},1))}function oe(e,t){var n,i,o=0,r=e.find("th:not(.k-group-cell)");for(n=0,i=t.length;nform>table"),w(r),!1,0),o=i.find("tr:first")),se(o[0].cells,n,!0))}function he(e,t,n){n=n||1;var i,o,r;for(o=0,r=e.length;ocolgroup>col");for(t=0,n=o.length;ti?(o=t.rows[t.rows.length-1],Mn.test(o.className)&&(o=t.rows[t.rows.length-2]),r=n-i):(o=e.rows[e.rows.length-1],Mn.test(o.className)&&(o=e.rows[e.rows.length-2]),r=i-n),o.style.height=o.offsetHeight+r+"px")}function ge(e,t){var n,i=e.offsetHeight,o=t.offsetHeight;i>o?n=i+"px":i.k-icon,textarea,span.k-select,span.k-icon,span.k-link,label.k-checkbox-label,.k-input,.k-multiselect-wrap,.k-picker-wrap,.k-picker-wrap>.k-selected-color,.k-tool-icon,.k-dropdown")}function ye(n){var i=e(n.currentTarget),o=i.is("th"),r=this.table.add(this.lockedTable),a=this.thead.parent().add(e(">table",this.lockedHeader)),s=ke(n.target),l=e(n.target).is(".k-checkbox-label, .k-checkbox"),d=e(n.target),c=i.closest("table")[0];return s&&i.find(Me.roleSelector("filtercell")).length?(this._setCurrent(i),t):(c!==r[0]&&c!==r[1]&&c!==a[0]&&c!==a[1]||d.is("a.k-i-expand, a.k-i-collapse")||(this.options.navigatable&&this._setCurrent(i,!1,l),!o&&s||setTimeout(function(){Hn&&e(Me._activeElement()).hasClass("k-widget")||!e(Me._activeElement()).is(Vt)&&ke(Me._activeElement())&&e.contains(c,Me._activeElement())||ve(c,!0)}),o&&!Me.support.touch&&n.preventDefault()),t)}function xe(e,t){if(!t)return 0;var n=0;return Me.support.browser.webkit&&(n=e.width()),n}function Ce(e){var n;return"string"==typeof e?(n=e.toLowerCase(),"true"===n?{rows:!0}:{rows:n.indexOf("rows")>-1,columns:n.indexOf("columns")>-1}):e===!0?{rows:!0}:t}function Se(t,n){var i,o;return!!t&&(n=e(n),!!(n[0]&&Xe(t[0],n[0])&&(i=n.offset().top-t.offset().top,o=n.outerHeight()/2,(i>=0||Je.abs(i)<=o)&&Je.floor(i+o)<=t.height())))}function Te(e){return e&&(e.hasClass("k-edit-cell")||e.parent().hasClass("k-grid-edit-row"))}function De(e){return'#=data.text#'}function Ae(e){return''}function Ie(e,t,n){return''+i(t)+''+n+""}function Ee(e){return''}var Me=window.kendo,Fe=Me.ui,Re=Me.data.DataSource,Pe=Me.data.ObservableObject,ze=Me.support.tbodyInnerHtml,Be=Me._activeElement,Le=Fe.Widget,He=Me._outerWidth,Ne=Me._outerHeight,Oe=Me.keys,Ve=e.isPlainObject,We=e.extend,Ue=e.map,je=e.grep,qe=e.isArray,Ge=e.inArray,$e=Array.prototype.push,Ye=e.proxy,Ke=Me.isFunction,Qe=e.isEmptyObject,Xe=e.contains,Je=Math,Ze=".",et="progress",tt="error",nt="k-hierarchy-cell",it=":not(.k-group-cell):not(["+Me.attr("virtual")+"]):not(.k-hierarchy-cell:not(:has(.k-icon.k-i-collapse,.k-icon.k-i-expand))):visible",ot="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",rt="tr:not(.k-footer-template):visible",at=":not(.k-group-cell):not(.k-detail-cell):not(.k-hierarchy-cell):visible",st="tr:not(.k-grouping-row):not(.k-detail-row):not(.k-footer-template):not(.k-group-footer):visible",lt=st+":first",dt=st+":last",ct=rt+":first>"+at+":first",ut="th.k-header:not(.k-group-cell):not(.k-hierarchy-cell)",ht=".kendoGrid",pt="k-grid-content-locked",ft="k-group-cell",gt="edit",mt="beforeEdit",vt="save",_t="remove",bt="detailInit",wt="filterMenuInit",kt="columnMenuInit",yt="filterMenuOpen",xt="columnMenuOpen",Ct="cellClose",St="change",Tt="columnHide",Dt="columnShow",At="saveChanges",It="dataBound",Et="detailExpand",Mt="detailCollapse",Ft="itemchange",Rt="page",Pt="paging",zt="scroll",Bt="sync",Lt="k-state-focused",Ht=":kendoFocusable",Nt="k-state-selected",Ot="k-checkbox",Vt="input[data-role='checkbox']."+Ot,Wt="k-grid-norecords",Ut="k-link",jt="k-icon",qt="k-sort-order",Gt="k-header-column-menu",$t="k-grid-filter",Yt="resize",Kt="columnResize",Qt="columnReorder",Xt="columnLock",Jt="columnUnlock",Zt="navigate",en="click",tn="mousedown",nn="height",on="tabIndex",rn="function",an="string",sn="bottom",ln="container-for",dn="field",cn="input",un="incell",hn="inline",pn="uid",fn=1,gn="colSpan",mn="overflow",vn="hidden",_n="sort",bn="group-sort",wn="Are you sure you want to delete this record?",kn="No records available.",yn="Delete",xn="Cancel",Cn="Collapse",Sn="Expand",Tn="aria-label",Dn=/(\}|\#)/gi,An=/#/gi,In="[\\x20\\t\\r\\n\\f]",En=RegExp("(^|"+In+")(k-group-cell|k-hierarchy-cell)("+In+"|$)"),Mn=RegExp("(^|"+In+")(k-filter-row)("+In+"|$)"),Fn='# if (iconClass) {##=text## } else { ##=text## } #',Rn='# var checkboxGuid = kendo.guid(); #&\\#8203;',Pn='# var checkboxGuid = kendo.guid(); ###&\\#8203;##',zn=!1,Bn=Me.support.browser,Ln=Bn.msie&&7==Bn.version,Hn=Bn.msie&&8==Bn.version,Nn=Bn.msie&&11===Bn.version,On=/Mac OS/.test(navigator.userAgent),Vn={content:"k-content",widget:"k-widget",scrollContainer:"k-scroll-container"},Wn=Le.extend({init:function(e,t){var n=this;Le.fn.init.call(n,e,t),n._refreshHandler=Ye(n.refresh,n),n.setDataSource(t.dataSource),n.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(St,t._refreshHandler),t.dataSource=e,t.dataSource.bind(St,t._refreshHandler),t.dataSource.options.useRanges=!0},options:{name:"VirtualScrollable",itemHeight:e.noop,prefetch:!0,maxScrollHeight:25e4},events:[Pt,Rt,zt],destroy:function(){var e=this;Le.fn.destroy.call(e),e.dataSource.unbind(St,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off(ht),clearTimeout(e._timeout),e._scrollingTimeout&&clearTimeout(e._scrollingTimeout),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=Me.support.scrollbar()+1,o=n.element;o.css({width:"auto",overflow:"hidden"}).css(zn?"padding-left":"padding-right",i),n.content=o.children().first(),t=n.wrapper=n.content.wrap('').parent().bind("DOMMouseScroll"+ht+" mousewheel"+ht,Ye(n._wheelScroll,n)),n._wrapper(),(Me.support.kineticScrollNeeded||Me.support.touch)&&(n.wrapper.css("touch-action","none"),n.drag=new Me.UserEvents(n.wrapper,{global:!0,allowSelection:!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('').css({width:i}).appendTo(o).bind("scroll"+ht,Ye(n._scroll,n))},_wrapper:function(){var e=this;Nn&&(e.wrapper.css({"overflow-y":zt}),e.element.css(zn?"padding-left":"padding-right",0))},_wheelScroll:function(e){if(!e.ctrlKey){var t=this.verticalScrollbar,n=t.scrollTop(),i=Me.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 n=this,i=!n.options.prefetch,o=e.currentTarget.scrollTop,r=n.dataSource,a=n.itemHeight,s=r.skip()||0,l=n._rangeStart||s,d=n.element.innerHeight(),c=!!(n._scrollbarTop&&n._scrollbarTop>o),u=Je.max(Je.floor(o/a),0),h=c?Je.ceil(d/a):Je.floor(d/a),p=Je.max(u+h,0);return n._preventScroll?(n._preventScroll=!1,t):(n._scrollTop=o-l*a,n._scrollbarTop=o,n._scrolling=i,n._fetch(u,p,c)||(n.wrapper[0].scrollTop=n._scrollTop),n.trigger(zt),i&&(n._scrollingTimeout&&clearTimeout(n._scrollingTimeout),n._scrollingTimeout=setTimeout(function(){n._scrolling=!1,n._page(n._rangeStart,n.dataSource.take())},100)),t)},scrollToTop:function(){this._scrollTo(0)},scrollToBottom:function(){var e=this.verticalScrollbar;this._scrollTo(e[0].scrollHeight-e.height())},_scrollWrapperToTop:function(){this.wrapper.scrollTop(0)},_scrollWrapperToBottom:function(){this.wrapper.scrollTop(this.wrapper[0].scrollHeight)},_scrollWrapperOnColumnResize:function(){var e=this,t=this.wrapper,n=t.scrollTop();t[0].scrollWidth>t[0].clientWidth?(!e._wrapperScrolled&&n||e._isScrolledToBottom())&&(t.scrollTop(n+Me.support.scrollbar()),e._scrollTop=t.scrollTop(),e._wrapperScrolled=!0):e._wrapperScrolled&&(e._isWrapperScrolledToBottom()||(t.scrollTop(n-Me.support.scrollbar()),e._scrollTop=t.scrollTop()),e._wrapperScrolled=!1)},_scrollTo:function(e){var t=this,n=t.verticalScrollbar;n.scrollTop()!==e&&(t._preventScroll=!0),t.wrapper.scrollTop(e),t._scrollTop=t.wrapper.scrollTop(),n.scrollTop(e),t._scrollbarTop=n.scrollTop()},_isScrolledToTop:function(){return 0===this.verticalScrollbar.scrollTop()},_isScrolledToBottom:function(){var e=this.verticalScrollbar,t=e.scrollTop();return t>0&&t>=parseInt(e[0].scrollHeight-e.height(),10)},_isWrapperScrolledToBottom:function(){var e=this.wrapper;return e.scrollTop()>=parseInt(e[0].scrollHeight-e.height(),10)},itemIndex:function(e){var t=this._rangeStart||this.dataSource.skip()||0;return t+e},position:function(e){var t,n=this._rangeStart||this.dataSource.skip()||0,i=this.dataSource.pageSize();return t=e>n?e-n:n-e-1,t>i?i:t},scrollIntoView:function(e){var t=this.wrapper[0],n=t.clientHeight,i=this._isScrolledToBottom()?t.scrollTop: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,a=o.itemHeight,s=r.take(),l=o._rangeStart||r.skip()||0,d=Je.floor(t/s)*s,c=!1,u=.33,h=o.verticalScrollbar,p=Bn.webkit?1:0;return t=l+s&&!i?(c=!0,l=Je.min(t,r.total()-s),o._scrollTop=h.scrollTop()>=h[0].scrollHeight-h[0].offsetHeight-p?o.wrapper[0].scrollHeight-o.wrapper[0].offsetHeight:a,o._page(l,s)):!o._fetching&&o.options.prefetch&&(ts&&r.prefetch(d-s,s,e.noop),n>d+s*u&&r.prefetch(d+s,s,e.noop)),c},fetching:function(){return this._fetching},_page:function(t,n,i){var o=this,r=!o.options.prefetch,a=o.dataSource;i=Ke(i)?i:e.noop,o.trigger(Pt,{skip:t,take:n})||(clearTimeout(o._timeout),o._fetching=!0,o._rangeStart=t,a.inRange(t,n)?(Me.ui.progress(e(o.wrapper).parent(),!0),a.range(t,n,function(){Me.ui.progress(e(o.wrapper).parent(),!1),i(),o.trigger(Rt)})):(r||Me.ui.progress(o.wrapper.parent(),!0),o._timeout=setTimeout(function(){o._scrolling||(r&&Me.ui.progress(o.wrapper.parent(),!0),a.range(t,n,function(){Me.ui.progress(o.wrapper.parent(),!1),i(),o.trigger(Rt)}))},100)))},repaintScrollbar:function(e){var n,i=this,o="",r=i.options.maxScrollHeight,a=i.dataSource,s=Me.support.kineticScrollNeeded?0:Me.support.scrollbar(),l=i.wrapper[0],d=i._isScrolledToBottom(),c=i.itemHeight=i.options.itemHeight()||0,u=l.scrollWidth>l.offsetWidth?s:0,h=a.total()*c+u;for(n=0;n';h%r&&(o+=''),i.verticalScrollbar.html(o),d&&!i._isScrolledToBottom()&&i.scrollToBottom(),t!==i._scrollTop&&e&&(l.scrollTop=i._scrollTop,i._scrollWrapperOnColumnResize())},refresh:function(e){var n=this,i=n.dataSource,o=n._rangeStart,r=(e||{}).action,a=n._isScrolledToBottom()||!r||r!==Ft&&r!==_t&&r!==Bt;Me.ui.progress(n.wrapper.parent(),!1),clearTimeout(n._timeout),n.repaintScrollbar(a),n.drag&&n.drag.cancel(),t===o||n._fetching||((!r||r!==Bt&&r!==Ft)&&(n._rangeStart=i.skip()),1!==i.page()||r&&(r===Bt||r===Ft)||(n.verticalScrollbar[0].scrollTop=0)),n._fetching=!1}}),Un={create:{text:"Add new record",className:"k-grid-add",iconClass:"k-icon k-i-plus"},cancel:{text:"Cancel changes",className:"k-grid-cancel-changes",iconClass:"k-icon k-i-cancel"},save:{text:"Save changes",className:"k-grid-save-changes",iconClass:"k-icon k-i-check"},destroy:{text:"Delete",className:"k-grid-delete",iconClass:"k-icon k-i-close"},edit:{text:"Edit",className:"k-grid-edit",iconClass:"k-icon k-i-edit"},update:{text:"Update",className:"k-primary k-grid-update",iconClass:"k-icon k-i-check"},canceledit:{text:"Cancel",className:"k-grid-cancel",iconClass:"k-icon k-i-cancel"},excel:{text:"Export to Excel",className:"k-grid-excel",iconClass:"k-icon k-i-file-excel"},pdf:{text:"Export to PDF",className:"k-grid-pdf",iconClass:"k-icon k-i-file-pdf"}},jn=Me.ui.DataBoundWidget.extend({init:function(t,n,i){var o=this;n=qe(n)?{dataSource:n}:n,Le.fn.init.call(o,t,n),i&&(o._events=i),zn=Me.support.isRtl(t),o._element(),o._aria(),o._columns(e.extend(!0,[],o.options.columns)),o._dataSource(),o._tbody(),o._pageable(),o._thead(),o._groupable(),o._toolbar(),o._setContentHeight(),o._templates(),o._navigatable(),o._selectable(),o._clipboard(),o._details(),o._editable(),o._attachCustomCommandsEvent(),o._adaptiveColumns(),o._minScreenSupport(),o.options.autoBind?o.dataSource.fetch():(o._group=o._groups()>0,o._footer()),o.lockedContent&&(o.wrapper.addClass("k-grid-lockedcolumns"),o._resizeHandler=function(){o.resize()},e(window).on("resize"+ht,o._resizeHandler)),Me.notify(o)},events:[St,"dataBinding","cancel",It,Et,Mt,bt,wt,yt,kt,xt,gt,mt,vt,_t,At,Ct,Kt,Qt,Dt,Tt,Xt,Jt,Zt,"page","sort","filter","group","groupExpand","groupCollapse"],setDataSource:function(e){var t,n=this,i=n.options.scrollable;n.options.dataSource=e,n._dataSource(),n._pageable(),n._thead(),i&&(i.virtual?(t=n.content.find(">.k-virtual-scrollable-wrap"),t.scrollLeft(xe(t,zn))):(t=n.tbody,n.content.scrollLeft(xe(t,zn)))),n.options.groupable&&n._groupable(),n.virtualScrollable&&n.virtualScrollable.setDataSource(n.options.dataSource),n.options.navigatable&&n._navigatable(),n.options.selectable&&n._selectable(),n.options.autoBind&&n.dataSource.fetch()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,allowCopy:!1,navigatable:!1,pageable:!1,persistSelection:!1,editable:!1,groupable:!1,rowTemplate:"",altRowTemplate:"",search:!1,noRecords:!1,dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1,detailTemplate:null,columnResizeHandleWidth:3,mobile:"",messages:{editable:{cancelDelete:xn,confirmation:wn,confirmDelete:yn},commands:{create:Un.create.text,cancel:Un.cancel.text,save:Un.save.text,destroy:Un.destroy.text,edit:Un.edit.text,update:Un.update.text,canceledit:Un.canceledit.text,excel:Un.excel.text,pdf:Un.pdf.text},search:"Search...",noRecords:kn,expandCollapseColumnHeader:"",groupHeader:"Press ctrl + space to group",ungroupHeader:"Press ctrl + space to ungroup"
}},destroy:function(){var t,n=this;n._angularItems("cleanup"),n._destroyColumnAttachments(),Le.fn.destroy.call(n),this._navigatableTables&&(this._navigatableTables.off(ht),this._navigatableTables=null),n._resizeHandler&&e(window).off("resize"+ht,n._resizeHandler),n.pager&&n.pager.element&&n.pager.destroy(),n.timer&&clearTimeout(n.timer),n._progressTimeOut&&clearTimeout(n._progressTimeOut),n._collapseGroupsTimeOut&&clearTimeout(n._collapseGroupsTimeOut),n._endlessFetchTimeOut&&clearTimeout(n._endlessFetchTimeOut),n.pager=null,n._destroyGroupable(),n.options.reorderable&&n.wrapper.data("kendoReorderable").destroy(),n.selectable&&n.selectable.element&&(n.selectable.destroy(),n.clearArea(),n._selectedIds=null,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._destroyVirtualScrollable(),n._destroyEditable(),n.dataSource&&(n.dataSource.unbind(St,n._refreshHandler).unbind(et,n._progressHandler).unbind(tt,n._errorHandler).unbind(_n,n._clearSortClasses),n._refreshHandler=n._progressHandler=n._errorHandler=n._clearSortClasses=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._isMobile&&(n.wrapper.off("transitionend"+ht),n.wrapper.off("contextmenu"+ht)),n.minScreenResizeHandler&&e(window).off("resize",n.minScreenResizeHandler),n._detachColumnMediaResizeHandler(),n._draggableInstance&&n._draggableInstance.element&&n._draggableInstance.destroy(),n._draggableInstance=null,t.off(ht),Me.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._groupRows=n._setContentWidthHandler=null},getOptions:function(){var n,i,o,r=this.options;return r.dataSource=null,n=We(!0,{},this.options),n.columns=Me.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=e.extend(!0,{},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();Me.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(Me.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=Me.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=K(i.columns||[]);for(t=0,n=o.length;t.k-grid-content > table"):t.element.children("table"),n.length||(n=e("").appendTo(t.element))),Ln&&n.attr("cellspacing",0),t.table=n.attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_createResizeHandle:function(t,n){var i,o,r,a,s,l,d=this,c=d.options.columnResizeHandleWidth,u=d.options.scrollable,h=d.resizeHandle;h&&d.lockedContent&&h.data("th")[0]!==n[0]&&(h.off(ht).remove(),h=null),h||(h=d.resizeHandle=e(''),t.append(h)),i=n.offset().left+t.scrollLeft()-parseFloat(n.css("marginLeft"))-(t.offset().left+parseFloat(t.css("borderLeftWidth"))),zn?u&&(r=n.closest(".k-grid-header-wrap, .k-grid-header-locked"),a=Bn.msie?r.scrollLeft():0,s=Bn.webkit?r[0].scrollWidth-r[0].offsetWidth-r.scrollLeft():0,l=Bn.mozilla?r[0].scrollWidth-r[0].offsetWidth-(r[0].scrollWidth-r[0].offsetWidth-r.scrollLeft()):0,i-=s-l+a):i+=n[0].offsetWidth,o=n.offset().top-parseFloat(n.css("marginTop"))-(t.offset().top+parseFloat(t.css("borderTopWidth"))),h.css({top:o,left:i-3*c/2,height:Ne(n),width:3*c}).data("th",n).show(),h.off("dblclick"+ht).on("dblclick"+ht,function(){d._autoFitLeafColumn(parseInt(n.attr(Me.attr("index")),10))})},_positionColumnResizeHandle:function(){var n=this,i=n.lockedHeader?n.lockedHeader.find("thead:first"):e();n.thead.add(i).on("mousemove"+ht,"tr:not(.k-filter-row) > th",function(i){var o=t!==i.buttons?i.buttons:i.which||i.button,r=e(this);r.hasClass("k-group-cell")||r.hasClass("k-hierarchy-cell")||t!==o&&0!==o||r[0].hasAttribute(Me.attr(gn))||n._createResizeHandle(r.closest("div"),r)})},_resizeHandleDocumentClick:function(t){e(t.target).closest(".k-column-active").length||(e(document).off(t),this._resetResizeHandleHeader(),this._hideResizeHandle())},_resetResizeHandleHeader:function(){var t;this.resizeHandle&&(t=e(this.resizeHandle).data("th"),t&&(t.find(Ze+Ut).find(Ze+jt).show(),t.find(Ze+qt).show(),t.find(Ze+Gt).show(),t.find(Ze+$t).show()))},_hideResizeHandle:function(){this.resizeHandle&&(this.resizeHandle.data("th").removeClass("k-column-active"),this.lockedContent&&!this._isMobile?(this.resizeHandle.off(ht).remove(),this.resizeHandle=null):this.resizeHandle.hide())},_positionColumnResizeHandleTouch:function(){var t=this,n=t.lockedHeader?t.lockedHeader.find("thead:first"):e();t._resizeUserEvents=new Me.UserEvents(n.add(t.thead),{filter:"th:not(.k-group-cell):not(.k-hierarchy-cell)",threshold:10,minHold:500,hold:function(n){var i=e(n.target);n.preventDefault(),t.resizeHandle&&(t.resizeHandle.data("th").removeClass("k-column-active"),t._resetResizeHandleHeader()),i.addClass("k-column-active"),i.find(Ze+Ut).find(Ze+jt).hide(),i.find(Ze+qt).hide(),i.find(Ze+Gt).hide(),i.find(Ze+$t).hide(),t._createResizeHandle(i.closest("div"),i),t._resizeHandleDocumentClickHandler||(t._resizeHandleDocumentClickHandler=Ye(t._resizeHandleDocumentClick,t)),e(document).on("click",t._resizeHandleDocumentClickHandler)}})},resizeColumn:function(n,i){var o,r,a,s,l=this,d=!!n.locked,c=!!n.hidden,u=this.options,h=Me.support.mobileOS?0:Me.support.scrollbar(),p=d?Ge(n,G(l.columns)):Ge(n,q(l.columns)),f=d?l.lockedTable:l.table,g=l.footer||e(),m=d?l.lockedHeader.find("table"):l.thead.closest("table"),v=n.minResizableWidth||10,_=He(d?f.find("tbody"):l.tbody);return c?(n.width=i>v?i:v,t):(l.footer&&l.lockedContent&&(g=l.footer.children(d?".k-grid-footer-locked":".k-grid-footer-wrap")),o=u.scrollable?m.find("col:not(.k-group-col,.k-hierarchy-col):eq("+p+")").add(f.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")")).add(g.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")")):f.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")"),u.scrollable?(r=!1,a=l.wrapper.width()-h,s=i=i>v?i:v,d&&_-i+s>a&&(s=i+(a-_-2*h),s<0&&(s=i),r=!0),s>10&&s>=v&&(o.css("width",s),_&&(s=r?a-2*h:_+(i-n.width),f.add(m).add(g).css("width",s),d||(l._footerWidth=s))),l._scrollVirtualWrapperOnColumnResize()):i>10&&i>=v&&o.css("width",i),n.width=i,l._applyLockedContainersWidth(),l._syncLockedContentHeight(),l._syncLockedHeaderHeight(),t)},_resizable:function(){var t,n,i,o,a,s,l,d,c=this,u=c.options,h=this._isMobile,p=Me.support.mobileOS?0:Me.support.scrollbar();u.resizable&&(t=u.scrollable?c.wrapper.find(".k-grid-header-wrap:first"):c.wrapper,h?c._positionColumnResizeHandleTouch(t):c._positionColumnResizeHandle(t),c.resizable&&c.resizable.destroy(),c.resizable=new Fe.Resizable(t.add(c.lockedHeader),{handle:(u.scrollable?"":">")+".k-resize-handle",hint:function(t){return e('').css({height:Ne(t.data("th"))+c.tbody.attr("clientHeight")})},start:function(t){var p,f,g,m,v;d=e(t.currentTarget).data("th"),h&&c._hideResizeHandle(),p=d.closest("table"),f=e.inArray(d[0],X(d.closest("thead")).filter(":visible")),s=p.parent().hasClass("k-grid-header-locked"),g=s?c.lockedTable:c.table,m=c.footer||e(),c.footer&&c.lockedContent&&(m=c.footer.children(s?".k-grid-footer-locked":".k-grid-footer-wrap")),r(c.wrapper,"col-resize"),l=u.scrollable?p.find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")").add(g.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")")).add(m.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")")):g.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")"),v=e.map(c.columns,function(e){return!e.hidden&&(s&&e.locked||!s&&!e.locked)?e:null}),n=t.x.location,i=He(d),o=K(v)[f].minResizableWidth||10,a=He(s?g.children("tbody"):c.tbody),Bn.webkit&&c.wrapper.addClass("k-grid-column-resizing")},resize:function(t){var r,h,f,g,m,v,_=zn?-1:1,b=i+t.x.location*_-n*_;u.scrollable?(s&&c.lockedFooter?r=c.lockedFooter.children("table"):c.footer&&(r=c.footer.find(">.k-grid-footer-wrap>table")),r&&r[0]||(r=e()),h=d.closest("table"),f=s?c.lockedTable:c.table,g=!1,m=c.wrapper.width()-p,v=b,s&&a-i+v>m&&(v=i+(m-a-2*p),v<0&&(v=b),g=!0),v>10&&v>=o&&(l.css("width",v),a&&(v=g?m-2*p:a+t.x.location*_-n*_,f.add(h).add(r).css("width",v),s||(c._footerWidth=v))),c._scrollVirtualWrapperOnColumnResize()):b>10&&b>=o&&l.css("width",b)},resizeend:function(){var e,t,n,o=He(d);r(c.wrapper,""),Bn.webkit&&c.wrapper.removeClass("k-grid-column-resizing"),i!=o&&(t=c.lockedHeader?c.lockedHeader.find("thead:first tr:first").add(c.thead.find("tr:first")):d.parent(),n=d.attr(Me.attr("index")),n||(n=t.find("th:not(.k-group-cell):not(.k-hierarchy-cell)").index(d)),e=K(c.columns)[n],e.width=o,c.trigger(Kt,{column:e,oldWidth:i,newWidth:o}),c._applyLockedContainersWidth(),c._syncLockedContentHeight(),c._syncLockedHeaderHeight()),c._resetResizeHandleHeader(),c._hideResizeHandle(),d=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:Me.guid(),autoScroll:!0,filter:n.content?".k-grid-header:first "+ut:"table:first>.k-grid-header "+ut,dragstart:function(){t.children(".k-grid-header-wrap").unbind("scroll"+ht+"scrolling").bind("scroll"+ht+"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(){n._resetResizeHandleHeader(),t.children(".k-grid-header-wrap").unbind("scroll"+ht+"scrolling")},drag:function(){n._hideResizeHandle()},hint:function(t){var n=t.attr(Me.attr("title"));return n&&(n=Me.htmlEncode(n)),e('').html(n||t.attr(Me.attr("field"))||t.text()).prepend('')}}).data("kendoDraggable"))},_reorderable:function(){var t=this;t.options.reorderable&&(t.wrapper.data("kendoReorderable")&&t.wrapper.data("kendoReorderable").destroy(),t.wrapper.kendoReorderable({draggable:t._draggableInstance,dragOverContainers:function(e,n){var i=R(t.columns);return i[e].lockable!==!1&&P(i,t.columns,e,n)>-1},inSameContainer:function(n){return e(n.source).parent()[0]===e(n.target).parent()[0]&&P(R(t.columns),t.columns,n.sourceIndex,n.targetIndex)>-1},change:function(e){var n=R(t.columns),i=n[e.oldIndex],o=P(n,t.columns,e.oldIndex,e.newIndex);t.trigger(Qt,{newIndex:o,oldIndex:Ge(i,n),column:i}),t.reorderColumn(o,i,"before"===e.position)}}))},_reorderHeader:function(e,t,n,i){var o,r,l,d,c,u=this,h=I(e[0],u.columns),p=I(t,u.columns),f=[];for(l=0;lth.k-header:not(.k-group-cell,.k-hierarchy-cell)"):s(u.lockedHeader,u.thead,"tr:eq("+h.row+")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"),d=U(e).length,c=U([t]).length,f.length?(d>0&&0===c?(o="prepend",S(e,t,f,u.columns,u.lockedHeader.find("thead"),u.thead,this._groups(),o)):0===d&&c>0&&(o=0!==p.cell||!e[0].columns||t.columns||u._group?"append":"prepend",S(e,t,f,j(u.columns),u.thead,u.lockedHeader.find("thead"),this._groups(),o)),(t.columns||h.cell-p.cell>1||p.cell-h.cell>1)&&(t=M(u.columns,t,e[0],n,u.columns),t&&(d>0&&0===c?u._reorderHeader(f,t,n,u.thead):0===d&&c>0?u._reorderHeader(f,t,n,u.lockedHead):u._reorderHeader(f,t,n)))):d!==c&&C(r[h.cell],u.columns,d),a(r,h.cell,p.cell,n,e.length)},_reorderContent:function(t,n,i){var o,r,l,d,c,u,h=this,p=e(),f=t[0],g=w(t),m=Ge(f,K(h.columns)),v=Ge(n,K(h.columns)),_=Ge(g[0],$(h.columns)),b=Ge(n,$(h.columns)),k=U(h.columns).length,y=!!n.locked,x=h.footer||h.wrapper.find(".k-grid-footer"),C=o=b;for(n.hidden&&(l=y?U(h.columns):j(h.columns),w(l).length>0?(C=o=b=this._findClosestVisibleColumnIndex(l,v),r=w(l.slice(v)).length>0):y?(b=h.lockedTable.find("colgroup"),C=h.lockedHeader.find("colgroup"),o=e(h.lockedFooter).find(">table>colgroup")):(b=h.tbody.prev(),C=h.thead.prev(),o=x.find(".k-grid-footer-wrap").find(">table>colgroup"))),h._hasFilterRow()&&a(h.wrapper.find(".k-filter-row th:not(.k-group-cell,.k-hierarchy-cell)"),m,v,i,t.length),_>=0&&a(s(h.lockedHeader,h.thead.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),_,C,r?r:i,g.length),h.options.scrollable&&_>=0&&!h._hasVirtualColumns()&&a(s(h.lockedTable,h.tbody.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),_,b,r?r:i,g.length),x&&x.length&&(_>=0&&a(s(h.lockedFooter,x.find(".k-grid-footer-wrap"),">table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),_,o,r?r:i,g.length),a(x.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),m,v,i,t.length)),d=h.tbody.children(":not(.k-grouping-row,.k-detail-row)"),h.lockedTable&&(k>v?k<=m&&he(h.lockedTable.find(">tbody>tr.k-grouping-row"),h.table.find(">tbody>tr.k-grouping-row"),t.length):k>m&&he(h.table.find(">tbody>tr.k-grouping-row"),h.lockedTable.find(">tbody>tr.k-grouping-row"),t.length),p=h.lockedTable.find(">tbody>tr:not(.k-grouping-row,.k-detail-row)")),c=0,u=d.length;ctd:not(.k-group-cell,.k-hierarchy-cell)"),m,v,i,t.length)},_findClosestVisibleColumnIndex:function(e,t){var n=w(e.slice(t)).length>0?e.slice(t):e.slice(0,t+1).reverse(),i=w(n)[0];return Ge(i,w(this.columns))},_autoFitLeafColumn:function(e){this.autoFitColumn(K(this.columns)[e])},autoFitColumn:function(t){var n,i,o,r,a,s,l,d,c,u,h,p,f,g,m,_,w,k,y,x,C=this,S=C.options,T=C.columns,D=C.lockedHeader?X(C.lockedHeader.find(">table>thead")).filter(v).length:0,A="col:not(.k-group-col):not(.k-hierarchy-col)",I="td:visible:not(.k-group-cell):not(.k-hierarchy-cell)";if(t="number"==typeof t?T[t]:Ve(t)?je(z(T),function(e){return e===t})[0]:je(z(T),function(e){return e.field===t})[0],t&&b(t)){for(s=t.minResizableWidth,n=Ge(t,K(T)),r=t.locked,o=r?C.lockedHeader.children("table"):C.thead.parent(),i=o.find("[data-index='"+n+"']"),c=r?C.lockedTable:C.table,u=C.footer||e(),C.footer&&C.lockedContent&&(u=C.footer.children(r?".k-grid-footer-locked":".k-grid-footer-wrap")),h=u.find("table").first(),C.lockedHeader&&!r&&(n-=D),p=0;pm&&(m=s),a.width(m),t.width=m,Bn.safari&&i.css("white-space",""),S.scrollable){for(_=o.find("col"),k=0,y=0,x=_.length;y0&&a._renderGroupRows(),a._updateTablesWidth(),a._applyLockedContainersWidth(),a._syncLockedHeaderHeight(),a._syncLockedContentHeight(),a._updateFirstColumnClass(),h.columns&&a.refresh(),o&&(p?a.trigger(Xt,{column:n}):a.trigger(Jt,{column:n}))))},_updateColumnCellIndex:function(){var e,t=0;this.lockedHeader&&(e=this.lockedHeader.find("thead"),t=T(e,U(this.columns))),T(this.thead,j(this.columns),t)},lockColumn:function(e){var t,n=this.columns;e="number"==typeof e?n[e]:je(n,function(t){return t.field===e})[0],!e||e.locked||e.hidden||(t=U(n).length-1,this.reorderColumn(t,e,!1))},unlockColumn:function(e){var t,n=this.columns;e="number"==typeof e?n[e]:je(n,function(t){return t.field===e})[0],e&&e.locked&&!e.hidden&&(t=U(n).length,this.reorderColumn(t,e,!0))},cellIndex:function(t){var n=0;return this.lockedTable&&!e.contains(this.lockedTable[0],t[0])&&(n=K(U(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(Me.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=Be(),i=n._editContainer;i&&i[0]&&!e.contains(i[0],t)&&i[0]!==t&&!e(t).closest(".k-animation-container").length&&(n.editable.end()?n.closeCell():n._scrollVirtualWrapper())};o&&(this.wrapper.addClass("k-editable"),t=n._editMode(),"incell"===t?(n.table.add(n.lockedTable).on("mousedown"+ht,rt+">"+at,function(t){var i=e(t.target);"incell"===n._editMode()&&i.hasClass("k-checkbox-label")&&i.prev().attr(Me.attr("bind"))&&t.preventDefault()}),o.update!==!1&&(On&&n.wrapper.on(en+ht,".k-edit-cell > input[type='checkbox']",function(t){e(t.target).focus()}).on(en+ht,".k-edit-cell",function(t){e(t.target).is("input")||e(t.currentTarget).find("input[type='checkbox']").focus()}).on(tn+ht,"tr:not(.k-grouping-row) > td",function(t){var i=n._editContainer;n._mousedownOnEditCell=!(!i||!i[0]||!e.contains(i[0],t.target)&&i[0]!==t.target)}),n.wrapper.on(Me.support.touch?"touchstart"+ht:en+ht,"tr:not(.k-grouping-row) > td",function(t){var o=e(this),r=n.lockedTable&&o.closest("table")[0]===n.lockedTable[0];n._mousedownOnEditCell=!1,o.hasClass("k-hierarchy-cell")||o.hasClass("k-detail-cell")||o.hasClass("k-group-cell")||o.hasClass("k-edit-cell")||o.has("a.k-grid-delete").length||o.has("button.k-grid-delete").length||o.closest("tbody")[0]!==n.tbody[0]&&!r||e(t.target).is(":input")||(n.editable?n.editable.end()?((i||Me.support.mobileOS)&&e(Be()).blur(),n.closeCell(),n.editCell(o)):n._scrollVirtualWrapper():n.editCell(o))}).on("focusin"+ht,function(){e.contains(this,Be())||(clearTimeout(n.timer),n.timer=null)}).on("focusout"+ht,function(e){var t=!0;(On&&n._mousedownOnEditCell||n._virtualColScroll)&&(t=!1),n._mousedownOnEditCell=!1,t&&(n.timer=setTimeout(function(){r(e)},1))}))):o.update!==!1&&(n.wrapper.on(en+ht,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit",function(t){t.preventDefault(),n.editRow(e(this).closest("tr"))}),n._isVirtualInlineEditable()&&n.wrapper.on("focusout"+ht,"tr:not(.k-grouping-row) > td",function(){n.editable&&!n.editable.end()&&n._scrollVirtualWrapper()})),o.destroy!==!1?n.wrapper.on(en+ht,"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(en+ht,"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;if(t=e(t),n=this,i=(n.virtualScroll||{}).columns?n.virtualCols[n.cellIndex(t)]:K(n.columns)[n.cellIndex(t)],o=n._modelForContainer(t),n.closeCell(),o&&we(i,o)&&!i.command){if(n.trigger(mt,{model:o}))return;n._attachModelChange(o),n._editContainer=t,n._shouldClearEditableState&&n._clearEditableState(),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(vt,{values:e.values,container:t,model:o})&&e.preventDefault()},skipFocus:!(!n._isVirtualIncellEditable()&&!n._hasVirtualColumns()||!n._editableState)}).data("kendoEditable"),r=t.parent().addClass("k-grid-edit-row"),n.lockedContent&&(ge(r[0],n._relatedRow(r).addClass("k-grid-edit-row")[0]),n._syncLockedScroll()),n.trigger(gt,{container:t,model:o})}},_adjustLockedHorizontalScrollBar:function(){var e=this.table,t=e.parent(),n=e[0].offsetWidth>t[0].clientWidth?Me.support.scrollbar():0;this.lockedContent.height(t[0].offsetHeight-n)},_syncLockedScroll:function(){this.lockedContent[0].scrollTop=this.content[0].scrollTop,this.virtualScrollable&&(this.lockedContent[0].scrollTop=this.wrapper.find(".k-virtual-scrollable-wrap")[0].scrollTop)},_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),fe(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(en+ht,"a.k-grid-cancel",e._editCancelClickHandler),t.off(en+ht,"a.k-grid-update",e._editUpdateClickHandler)),e._detachModelChange(),e.editable.destroy(),e.editable=null,e._editContainer=null,e._destroyEditView(),e._editableIsClosing=null}};e.editable&&("popup"!==e._editMode()||e._isMobile?t():e._editableIsClosing?e._editContainer.data("kendoWindow").bind("deactivate",t):(e._editableIsClosing=!0,e._editContainer.data("kendoWindow").bind("deactivate",t).close())),e._confirmDialog&&(e._confirmDialog.close(),e._confirmDialog.destroy(),e._confirmDialog=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(St,e._modelChangeHandler)},closeCell:function(e){var t,n,i,o=this,r=o._editContainer;r&&(i=o._modelForContainer(r),e&&o.trigger("cancel",{container:r,model:i})||(o.trigger(Ct,{type:e?"cancel":"save",model:i,container:r}),r.removeClass("k-edit-cell"),t=(o.virtualScroll||{}).columns?o.virtualCols[o.cellIndex(r)]:K(o.columns)[o.cellIndex(r)],n=r.parent().removeClass("k-grid-edit-row"),o.lockedContent&&o._relatedRow(n).removeClass("k-grid-edit-row"),o._destroyEditable(),o._displayCell(r,t,i),o._shouldClearEditableState&&o._clearEditableState(),o.trigger("itemChange",{item:n,data:i,ns:Fe}),o.lockedContent&&ge(n.css("height","")[0],o._relatedRow(n).css("height","")[0])))},_displayCell:function(e,t,n){var i=this,o={storage:{},count:0},r=We({},Me.Template,i.options.templateSettings),a=Me.template(i._cellTmpl(t,o),r);o.count>0&&(a=Ye(a,o.storage)),e.empty().html(a(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,o,r,a=this,s=a._editMode();"incell"!==s&&a.cancelRow(),t=e(t),a.lockedContent&&(t=t.add(a._relatedRow(t))),t=t.hide(),n=a._modelForContainer(t),n&&!a.trigger(_t,{row:t,model:n})?(r=a.dataSource.options.schema,a._selectedIds&&r&&r.model&&(i=Ke(a.dataSource.options.schema.model)?a.dataSource.options.schema.model.fn.idField:a.dataSource.options.schema.model.id,o=n[i],delete a._selectedIds[o]),a.dataSource.remove(n),"inline"!==s&&"popup"!==s||a.dataSource.sync()):"incell"===s&&a._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 Pe?n=t:(t=e(t),n=r._modelForContainer(t)),i=r._editMode(),r.cancelRow(),n&&(t=r.tbody.children("["+Me.attr("uid")+"="+n.uid+"]"),r._attachModelChange(n),"popup"===i?r._createPopupEditor(n):"inline"===i?r._createInlineEditor(t,n):"incell"===i&&e(t).children(it).each(function(){var t=e(this),i=K(r.columns)[r.cellIndex(t)];if(n=r._modelForContainer(t),n&&(!n.editable||n.editable(i.field))&&i.field&&!i.selectable)return r.editCell(t),!1}),o=r.editView?r.editView.element:r._editContainer,o&&(this._editCancelClickHandler||(this._editCancelClickHandler=Ye(this._editCancelClick,this)),o.on(en+ht,"a.k-grid-cancel",this._editCancelClickHandler),this._editUpdateClickHandler||(this._editUpdateClickHandler=Ye(this._editUpdateClick,this)),o.on(en+ht,"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,a=i.editView?i.editView.element:i._editContainer;t.preventDefault(),t.stopPropagation(),i.trigger("cancel",{container:a,model:r})||(n=i.items().index(e(i.current()).parent()),i.cancelRow(),o&&(i._setCurrent(i.items().eq(n).children().filter(at).first()),ve(i.table,!0)))},_createPopupEditor:function(n){var i,o,r,a,s,l,d,c,u,h,p,f,g,m=this,v="<'+(m._isMobile?'ul class="k-edit-form-container k-listgroup k-listgroup-flush">':'div class="k-edit-form-container">'),_=[],b=K(m.columns),w=Me.guid(),k=m.options.editable,y=k.template,x=Ve(k)?k.window:{},C=We({},Me.Template,m.options.templateSettings);if(!m.trigger(mt,{model:n})){if(x=x||{},y)for(typeof y===an&&(y=Me.unescape(y)),v+=Me.template(y,C)(n),r=0,a=b.length;r',we(i,n)?(_.push({field:i.field,title:i.title,format:i.format,editor:i.editor,values:i.values}),v+='',v+=''+(i.title||i.field||"")+"",v+='',v+=""):(f={storage:{},count:0},s=Me.template(m._cellTmpl(i,f),C),f.count>0&&(s=Ye(s,f.storage)),v+='',v+=''+(i.title||i.field||"")+"",v+=''+s(n)+"",v+=""),v+=""):(v+=''+(i.title||i.field||"")+"",we(i,n)?(_.push({field:i.field,title:i.title,format:i.format,editor:i.editor,values:i.values}),v+="'):(f={storage:{},count:0},s=Me.template(m._cellTmpl(i,f),C),f.count>0&&(s=Ye(s,f.storage)),v+=''+s(n)+"")));o&&Ve(o)&&(Ve(o.text)&&(l=o.text.update,d=o.text.cancel),Ve(o.iconClass)&&(c=o.iconClass.update,u=o.iconClass.cancel),o.attr&&(p=o.attr)),m._isMobile?(v+="",m.editView=m.pane.append("'+(m.options.messages.commands.edit||"Edit")+''+v+""),g=m._editContainer=m.editView.element.find(".k-popup-edit-form")):(v+='',v+=m._createButton({name:"update",text:l,attr:p,iconClass:c})+m._createButton({name:"canceledit",text:d,attr:p,iconClass:u}),v+="",g=m._editContainer=e(v).appendTo(m.wrapper).eq(0).kendoWindow(We({modal:!0,resizable:!1,draggable:!0,title:m.options.messages.commands.edit||"Edit",visible:!1,close:function(i){if(i.userTriggered){if(i.sender.element.focus(),m.trigger("cancel",{container:g,model:n}))return i.preventDefault(),t;var o=m.items().index(e(m.current()).parent());m._editableIsClosing=!0,m.cancelRow(),m.options.navigatable&&(m._setCurrent(m.items().eq(o).children().filter(at).first()),ve(m.table,!0))}}},x))),m.editable=m._editContainer.kendoEditable({fields:_,model:n,clearContainer:!1,target:m}).data("kendoEditable"),m._openPopUpEditor(),m.trigger(gt,{container:g,model:n})}},_openPopUpEditor:function(){var e=this,t=e._editContainer?e._editContainer.data("kendoWindow"):null,n=(e.options.editable||{}).window||{};this._isMobile?this.pane.navigate(this.editView,this._editAnimation):t&&(n.position||t.center(),t.open())},_createInlineEditor:function(t,n){var i,o,r,a=this,s=[];a.trigger(mt,{model:n})||(a.lockedContent&&(t=t.add(a._relatedRow(t))),t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){if(o=e(this),i=a._hasVirtualColumns()?a.virtualCols[a.cellIndex(o)]:K(a.columns)[a.cellIndex(o)],!i.command&&we(i,n))s.push({field:i.field,title:i.title,format:i.format,editor:i.editor,values:i.values}),o.attr(Me.attr("container-for"),i.field),o.empty();else if(i.command&&(r=me(i.command,"edit"))){
o.empty();var t,l,d,c,u;Ve(r)&&(Ve(r.text)&&(t=r.text.update,l=r.text.cancel),Ve(r.iconClass)&&(d=r.iconClass.update,c=r.iconClass.cancel),r.attr&&(u=r.attr)),e(a._createButton({name:"update",text:t,attr:u,iconClass:d})+a._createButton({name:"canceledit",text:l,attr:u,iconClass:c})).appendTo(o)}}),a._editContainer=t,a._editContainer.addClass("k-grid-edit-row"),a._shouldClearEditableState&&a._clearEditableState(),a.editable=new Me.ui.Editable(a._editContainer,{target:a,fields:s,model:n,skipFocus:a._isVirtualInlineEditable()&&a._editableState&&!!a._editableState.field||a._hasVirtualColumns(),clearContainer:!1}),t.length>1&&(ge(t[0],t[1]),a._applyLockedContainersWidth()),a.trigger(gt,{container:t,model:n}))},cancelRow:function(e){var t,n=this,i=n._editContainer;if(i){if(t=n._modelForContainer(i),!t||e&&n.trigger("cancel",{container:i,model:t}))return;n._destroyEditable(),n.dataSource.cancelChanges(t),n._clearEditableState(),n._displayRow("popup"!==n._editMode()?i:n.tbody.find("["+Me.attr("uid")+"="+t.uid+"]"))}},saveRow:function(){var t,n=this,i=this._editContainer,o=this._modelForContainer(i),r=e.Deferred();return i&&this.editable?(t=n.editable&&n.editable.end(),!t||this.trigger(vt,{container:i,model:o})?(t||n._scrollVirtualWrapper(),r.reject().promise()):(n._clearEditableState(),this.dataSource.sync())):r.resolve().promise()},_displayRow:function(t){var n,i,o,r,a,s=this,l=s._modelForContainer(t),d=t.hasClass("k-state-selected"),c=t.hasClass("k-alt");l&&(s.lockedContent&&(n=e((c?s.lockedAltRowTemplate:s.lockedRowTemplate)(l)),s._relatedRow(t.last()).replaceWith(n)),s.angular("cleanup",function(){return{elements:t.get()}}),i=e((c?s.altRowTemplate:s.rowTemplate)(l)),t.is(":visible")||i.hide(),t.replaceWith(i),s.trigger("itemChange",{item:i,data:l,ns:Fe}),n&&n.length&&s.trigger("itemChange",{item:n,data:l,ns:Fe}),r=i,a=[{dataItem:l}],n&&n.length&&(r=i.add(n),a.push({dataItem:l})),s.angular("compile",function(){return{elements:r.get(),data:a}}),d&&(s.options.selectable||s._checkBoxSelection)&&s.select(i.add(n)),n&&ge(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=this;return o._isMobile?(i=o._confirmDialog=new Me.ui.Confirm(e("").appendTo(document.body),{modal:{preventScroll:!0},closable:!1,title:!1,content:t.title,messages:{okText:t.confirmDelete,cancel:t.cancelDelete},open:function(){o.content.data(mn,o.content.css(mn)),o.content.css(mn,vn)},close:function(){o.content.css(mn,o.content.data(mn))}}),i.result.done(function(){o._removeRow(n)}).fail(function(){var e=o._confirmDialog;e&&(e.close(),e.destroy())}),!1):window.confirm(t.title)},_confirmation:function(e){var t=this,n=t.options.editable,i=n===!0||typeof n===an?t.options.messages.editable.confirmation:n.confirmation;return Ve(n)&&typeof n.mode===an&&typeof i!==rn&&typeof i!==an&&i!==!1&&(i=t.options.messages.editable.confirmation),i===!1||null==i||(typeof i===rn&&(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(){var e=this;e.dataSource.cancelChanges(),e._isVirtualEditable()&&e._virtualPageToTop(function(){e.virtualScrollable.scrollToTop()})},saveChanges:function(){var e=this,t=e.editable&&e.editable.end();!t&&e.editable||e.trigger(At)?t||e._scrollVirtualWrapper():e.dataSource.sync()},addRow:function(){var e,t,n=this,i=n.dataSource,o=n._editMode(),r=n.options.editable.createAt||"",a=i.pageSize(),s=i.view()||[],l=r.toLowerCase()===sn,d=n._isVirtualEditable();n.editable&&n.editable.end()||!n.editable?("incell"!=o&&n.cancelRow(),e=i.indexOf(s[0]),l&&(e+=s.length,a&&!i.options.serverPaging&&a<=s.length&&(e-=1)),e<0&&(e=i.page()>i.totalPages()?(i.page()-1)*a:0),n.options.navigatable&&"incell"==o&&n._removeCurrent(),d?n._virtualAddRow():(t=i.insert(e,{}),n._editModel(t))):n._scrollVirtualWrapper()},_editModel:function(e){var t,n,i,o,r=this,a=r.options.editable.createAt||"",s=r._editMode();e&&(t=e.uid,n=r.lockedContent?r.lockedTable:r.table,i=n.find("tr["+Me.attr("uid")+"="+t+"]"),o=i.children("td:not(.k-group-cell,.k-hierarchy-cell)").eq(r._firstEditableColumnIndex(i)),"inline"===s&&i.length?r.editRow(i):"popup"===s?r.editRow(e):o.length&&r.editCell(o),"bottom"==a.toLowerCase()&&r.lockedContent&&(r.lockedContent[0].scrollTop=r.content[0].scrollTop=r.table[0].offsetHeight))},_virtualAddRow:function(){var e=this,t=(e.options.editable.createAt||"").toLowerCase()===sn;e._clearEditableState(),t?e._virtualAddRowAtBottom():e._virtualAddRowAtTop()},_virtualAddRowAtTop:function(){var e,t=this,n=t.dataSource,i=t.virtualScrollable;1===n.page()?(e=n.insert(0,{}),t._editModel(e),i.scrollToTop()):t._virtualPageToTop(function(){e=n.insert(0,{}),t._editModel(e),i.scrollToTop()})},_virtualAddRowAtBottom:function(){var e,t=this,n=t.dataSource,i=t.virtualScrollable,o=n.total();n.at(o-1)instanceof Pe?(e=n.insert(o,{}),t._virtualPageToBottom(function(){t._editModel(e),i.scrollToBottom()})):t._virtualPageToBottom(function(){e=n.insert(o,{}),t._editModel(e),i.scrollToBottom()})},_virtualPageToTop:function(e){var t=this;t._virtualPage(0,t.dataSource.take(),function(){e()})},_virtualPageToBottom:function(e){var t=this,n=t.dataSource,i=n.take(),o=n.total(),r=o>i?o-i:0;t._virtualPage(r,i,function(){e()})},_virtualPage:function(e,t,n){var i=this;i._isVirtualEditable()&&(i.virtualScrollable._preventScroll=!0,i.virtualScrollable._page(e,t,n))},_firstEditableColumnIndex:function(e){var t,n,i,o=this,r=K(o.columns),a=o._modelForContainer(e);for(n=0,i=r.length;n').html(o({})).prependTo(i),n.angular("compile",function(){return{elements:t.get()}})),r&&r.create!==!1&&t.on(en+ht,".k-grid-add",function(e){e.preventDefault(),n.addRow()}).on(en+ht,".k-grid-cancel-changes",function(e){e.preventDefault(),n.cancelChanges()}).on(en+ht,".k-grid-save-changes",function(e){e.preventDefault(),n.saveChanges()}),t.on(en+ht,".k-grid-excel",function(e){e.preventDefault(),n.saveAsExcel()}),t.on(en+ht,".k-grid-pdf",function(e){e.preventDefault(),n.saveAsPDF()}),t.on(cn+ht,".k-grid-search input",function(e){var t=e.currentTarget;clearTimeout(n._searchTimeOut),n._searchTimeOut=setTimeout(function(){var e,i,o,r,a;if(n._searchTimeOut=null,e=n.options,i=e.search?e.search.fields:null,o={filters:[],logic:"or"},r=t.value,i||(i=Q(e.columns)),n.dataSource.options.endless&&(n.dataSource.options.endless=null,n._endlessPageSize=n.dataSource.options.pageSize),r)for(a=0;a",r+="",r+="",r+=""):r+=o._createButton(e[t]);return r},_createButton:function(e){var n,i=e.template||Fn,r=typeof e===an?e:e.name||e.text,a=Un[r]?Un[r].className:"k-grid-"+(r||"").replace(/\s/g,""),s={className:a,text:r,attr:"",iconClass:""},l=this.options.messages.commands;if(!(r||Ve(e)&&e.template))throw Error("Custom commands should have name specified");return Ve(e)?(e=We(!0,{},e),e.className&&Ge(s.className,e.className.split(" "))<0?e.className+=" "+s.className:e.className===t&&(e.className=s.className),"edit"===r&&(e=We(!0,{},e),e.text=Ve(e.text)?e.text.edit:e.text,e.iconClass=Ve(e.iconClass)?e.iconClass.edit:e.iconClass),e.attr&&(Ve(e.attr)&&(e.attr=o(e.attr)),typeof e.attr===an&&(n=e.attr.match(/class="(.+?)"/),n&&Ge(n[1],e.className.split(" "))<0&&(e.className+=" "+n[1]))),s=We(!0,s,Un[r],{text:l[r]},e)):s=We(!0,s,Un[r],{text:l[r]}),Me.template(i)(s)},_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(en+ht,t._groupableClickHandler):t._groupableClickHandler=function(n){var i=e(this),o=i.closest("tr"),r=t._groupRows?t._groupRows[t.wrapper.find(".k-grouping-row").index(o)]:{};i.hasClass("k-i-collapse")?t.trigger("groupCollapse",{group:r,element:o})||t.collapseGroup(o):t.trigger("groupExpand",{group:r,element:o})||t.expandGroup(o),n.preventDefault(),n.stopPropagation()},t._isLocked()?t.lockedTable.on(en+ht,".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",t._groupableClickHandler):t.table.on(en+ht,".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=ut+"["+Me.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("").addClass("k-grouping-header").prependTo(n),t.groupable&&t._destroyGroupable(),Bn.chrome&&(n.find("div.k-grouping-header").css("touch-action","none"),n.find(r).css("touch-action","none")),t.groupable=new Fe.Groupable(n,We({},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():(t._clearEditableState(),t.dataSource.options.endless&&(t.dataSource.options.endless=null,t._endlessPageSize=t.dataSource.options.pageSize,t.dataSource._skip=0,t.dataSource._pageSize=t.dataSource._take=t._endlessPageSize,t.dataSource._page=1))}})),t._addGroupableOptionsToHeader())},_addGroupableOptionsToHeader:function(){var e,t,n,i=this,o=z(i.columns),r={},a="",s=i._headerCells(),l="";for(n=0;n"+(i?ot:"tbody>tr"+s),a.selectable=new Me.ui.Selectable(o,{filter:r,aria:!0,multiple:n,change:function(){var e;i||a._persistSelectedRows(),a._checkBoxSelection&&(e=a.selectable.value(),a._uncheckCheckBoxes(),a._checkRows(e),a._toggleHeaderCheckState(e.length&&e.length===a.items().length?!0:!1)),a.trigger(St)},useAllItems:l&&n&&i,relatedTarget:function(t){var n,o,r,s;if(!i&&l){for(o=e(),r=0,s=t.length;r-1&&!s.is(".k-edit-cell,.k-header")&&s.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")){if(r.preventDefault(),r.stopPropagation(),s=i?s:s.parent(),l&&!i&&(s=s.add(a._relatedRow(s))),n)if(r.ctrlKey){if(s.hasClass(Nt))return a._deselectCheckRows(s),t}else a.selectable.clear();else a.selectable.clear();i||(a.selectable._lastActive=s),a.selectable.value(s)}else!i&&(e(d).is("td")||e(d).is("table")&&Ge(d,this._navigatableTables))&&(r.shiftKey&&r.keyCode==Oe.LEFT||r.shiftKey&&r.keyCode==Oe.RIGHT||r.shiftKey&&r.keyCode==Oe.UP||r.shiftKey&&r.keyCode==Oe.DOWN||r.keyCode===Oe.SPACEBAR&&r.shiftKey)&&(r.preventDefault(),r.stopPropagation(),s=s.parent(),l&&(s=s.add(a._relatedRow(s))),n?(a.selectable._lastActive||(a.selectable._lastActive=s),a.selectable.selectRange(a.selectable._firstSelectee(),s)):(a.selectable.clear(),a.selectable.value(s)))}))},_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"+ht+" keydown"+ht,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}).on("mousedown"+ht,rt+">"+at,Ye(ye,e)),e.copyHandler=Ye(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=Ye(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("").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,a,s=this,l=s.select(),d="\t",c=s.options.allowCopy,u=!0;return e.isPlainObject(c)&&c.delimeter&&(d=c.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=s._isLocked()&&U(s.columns).length,r=!0,e.each(l,function(t,a){var l,d,c,h;a=e(a),l=a.closest("tr"),d=l.index(),c=a.index(),u&&(c-=a.prevAll(":hidden").length),o&&r&&(r=e.contains(s.lockedTable[0],a[0])),s._groups()&&r&&(c-=s._groups()),c=r?c:c+o,i>c&&(i=c),h=a.text(),n[d]||(n[d]=[]),n[d][c]=h}),a=n.length,n=e.each(n,function(e,t){t&&(n[e]=t.slice(i),a>e&&(a=e))}),e.each(n.slice(a),function(e,n){t+=n?n.join(d)+"\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,ve(n,!0)),this.areaClipBoard&&(this.areaClipBoard.remove(),this.areaClipBoard=null)},_adaptiveColumns:function(){var e=this;e._anyColumnHasMediaQuery()&&(e._setColumnsMediaVisibility(e.columns),e._attachColumnMediaResizeHandler())},_anyColumnHasMediaQuery:function(){return this._columnsWithMediaQuery().length},_columnsWithMediaQuery:function(){return k(this.columns)},_attachColumnMediaResizeHandler:function(){var t=this;t._detachColumnMediaResizeHandler(),t._columnMediaResizeHandler=Ye(t._onColumnMediaResize,t),e(window).on(Yt+ht,t._columnMediaResizeHandler)},_detachColumnMediaResizeHandler:function(){var t=this;t._columnMediaResizeHandler&&e(window).off(Yt+ht,t._columnMediaResizeHandler)},_onColumnMediaResize:function(){var e=this;e._setColumnsMediaVisibility(e.columns),e._setContentMediaWidth()},_setColumnsMediaVisibility:function(e){var t,n=e||[];for(t=0;t.k-grid-footer-wrap>table")),t&&t[0]||(t=e()),n=w?m.wrapper.find(".k-grid-header-locked").find("table"):m.wrapper.find(".k-grid-header").find("table"),i=w?m.lockedTable:m.table,o=n.find("th"),r=n.find("colgroup"),a=o.length,s=o.filter(v).length,l=o.length-s,d=0,""!==n[0].style.width&&parseFloat(n[0].style.width)!==d)){for(c=n.css("width"),u=0;u0?window.innerWidth:screen.width;return this._iterateMinScreenCols(e,t)},_iterateMinScreenCols:function(e,n){var i,o,r,a=!1;for(i=0;in?this.hideColumn(o):this.showColumn(o)),!o.hidden&&o.columns&&(a=this._iterateMinScreenCols(o.columns,n)||a);return a},_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},_relatedCell: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>td").index(t),n=n[0]===this.table[0]?o:this.table,n.find(">tbody>tr>td").index(i)):t},clearSelection:function(){var e=this;return e.selectable&&!e._checkBoxSelection&&e.selectable.clear(),e._checkBoxSelection?(e._deselectCheckRows(e.select()),t):(e.options.persistSelection?e._persistSelectedRows():e._selectedIds={},e.trigger(St),t)},select:function(e){var n=this,i=n.selectable,o=Me.ui.Selectable.parseOptions(this.options.selectable),r=o.cell;return e=n.table.add(n.lockedTable).find(e),e.length?(i&&!i.options.multiple&&(i.clear(),e=e.first()),n._isLocked()&&(e=e.add(e.map(function(){return r?n._relatedCell(this):n._relatedRow(this)}))),i&&!n._checkBoxSelection?i.value(e):(n._checkRows(e),n.select().length===n.items().length&&n._toggleHeaderCheckState(!0),r||n._persistSelectedRows(),n.trigger(St)),t):i?i.value():n.items().filter("."+Nt)},_toggleHeaderCheckState:function(e){var t=this;e?t.thead.add(t.lockedHeader).find("tr "+Vt).prop("checked",!0).attr("aria-checked",!0).attr("aria-label","Deselect all rows"):t.thead.add(t.lockedHeader).find("tr "+Vt).prop("checked",!1).attr("aria-checked",!1).attr("aria-label","Select all rows")},_uncheckCheckBoxes:function(){var e=this,t=e.table.add(e.lockedTable);t.find("tbody "+Vt).attr("aria-checked",!1).prop("checked",!1).attr("aria-label","Select row")},_deselectCheckRows:function(t){var n=this;t=n.table.add(n.lockedTable).find(t),n._isLocked()&&(t=t.add(t.map(function(){return n._relatedRow(this)}))),t.each(function(){e(this).removeClass(Nt).find(Vt).attr("aria-checked",!1).prop("checked",!1).attr("aria-label","Select row")}),n._toggleHeaderCheckState(!1),n._persistSelectedRows(),n.trigger(St)},_checkRows:function(t){t.each(function(){e(this).addClass(Nt).find(Vt).prop("checked",!0).attr("aria-label","Deselect row").attr("aria-checked",!0)})},_persistSelectedRows:function(){var e,t,n,i,o=this,r=o.items(),a=o.dataSource.options,s=a.schema,l={};if(s&&s.model&&o._data&&(n=Ke(s.model)?s.model.fn.idField:s.model.id))for(o.select().each(function(){t=o.dataItem(this),l[t[n]]=!0}),i=0;i.k-virtual-scrollable-wrap").addBack().last()[0],o&&(this.virtualScroll?(a=Math.max(Ge(t[0],this._items(t.parent())),0),this.virtualScroll.rows?(this._rowVirtualIndex=this.virtualScrollable.itemIndex(a),this.virtualScrollable.scrollIntoView(t)):(this._rowVirtualIndex=a,this._scrollTo(this._relatedRow(t)[0],r))):this._scrollTo(this._relatedRow(t)[0],r)),this.lockedContent&&(this.lockedContent[0].scrollTop=r.scrollTop),i||this._scrollTo(s[0],r))},current:function(e){return this._setCurrent(e,!0)},_setCurrent:function(t,n,i){var o,r,a,s=this._current;return t=e(t),t.length&&(s&&s[0]===t[0]||(o=t.parent(),r=o.children(it),a=parseInt(o.children().first().attr("colspan"),10),this._hasVirtualColumns()&&(this._virtualCellIndex=(a>1?a:0)+r.index(t)),this._updateCurrentAttr(s,t),i||this._scrollCurrent(),n||this.trigger(Zt,{element:t}))),t&&t.length&&(this._lastCellIndex=t.parent().children(it).index(t)),this._current},_removeCurrent:function(){this._current&&(this._current.removeClass(Lt),this._current=null)},_scrollTo:function(t,n){var i=t.tagName.toLowerCase(),o="td"===i||"th"===i,r=e(t).closest("table")[0],a=t[o?"offsetWidth":"offsetHeight"],s=n[o?"scrollLeft":"scrollTop"],l=n[o?"clientWidth":"clientHeight"],d="relative"===e(t).css("position")&&zn&&o?Math.abs(r.offsetLeft-t.offsetLeft):t[o?"offsetLeft":"offsetTop"],c=d+a,u=0,h=0,p=0;zn&&o&&(Bn.msie||Bn.edge?h=r.offsetLeft:Bn.mozilla&&(p=r.offsetLeft-Me.support.scrollbar())),s=Math.abs(s+h-p),u=s>d?d:c>s+l?a<=l?c-l:d:s,u=Math.abs(u+h)+p,n[o?"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(on,-1)),this._navigatableTables=i,i.off("mousedown"+ht+" focus"+ht+" focusout"+ht+" keydown"+ht),n.on("keydown"+ht,Ye(o._openHeaderMenu,o)).find("a.k-link").attr("tabIndex",-1),t.attr(on,Je.max(t.attr(on)||0,0)).on("keydown"+ht,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}),i.on(Me.support.touch?"touchstart"+ht:"mousedown"+ht,rt+">"+at,Ye(ye,o)).on("focus"+ht,Ye(o._tableFocus,o)).on("focusout"+ht,Ye(o._tableBlur,o)).on("keydown"+ht,Ye(o._tableKeyDown,o)))},_openHeaderMenu:function(e){e.altKey&&e.keyCode==Oe.DOWN&&(this.current().find(".k-grid-filter, .k-header-column-menu").click(),e.stopImmediatePropagation())},_setTabIndex:function(e){this._navigatableTables.attr(on,-1),e.attr(on,0)},_tableFocus:function(t){var n=this.current(),i=e(t.currentTarget);n&&n.is(":visible")?n.addClass(Lt):this._virtualColScroll?this._setCurrent(i.find(ct),!0,!0):this._setCurrent(i.find(ct)),this._setTabIndex(i)},_tableBlur:function(){var e=this.current();e&&e.removeClass(Lt)},_findCellIndex:function(e,t,n){var i,o;if(n)for(o=t;o>=0&&(i=o,e[o].hidden);o--);else for(o=t;o.k-icon");return a?(n.preventDefault(),t):((!r.columns||o&&document.body.contains(o[0])||!this._scrollToColumn(n.keyCode,n))&&(o||(o=e(this.lockedTable).add(this.options.scrollable?this.table:this.tbody).find(ct)),o.length&&(i=!1,l&&n.keyCode==Oe.UP&&(i=this._moveUp(o,n.shiftKey)),l&&n.keyCode==Oe.DOWN&&(i=this._moveDown(o,n.shiftKey)),l&&n.keyCode==(zn?Oe.LEFT:Oe.RIGHT)&&(i=this._moveRight(o,n.altKey,n.shiftKey,n.ctrlKey,n.currentTarget)),l&&n.keyCode==(zn?Oe.RIGHT:Oe.LEFT)&&(i=this._moveLeft(o,n.altKey,n.shiftKey,n.ctrlKey,n.currentTarget)),l&&n.keyCode==Oe.PAGEDOWN&&(i=this._handlePageDown()),l&&n.keyCode==Oe.PAGEUP&&(i=this._handlePageUp()),l&&n.keyCode==Oe.HOME&&(i=this._handleHome(o,n.ctrlKey)),l&&n.keyCode==Oe.END&&(i=this._handleEnd(o,n.ctrlKey)),l&&n.keyCode==Oe.SPACEBAR&&(i=this._handleSpaceKey(o,n.ctrlKey)),n.keyCode!=Oe.ENTER&&n.keyCode!=Oe.F2||(i=this._handleEnterKey(o,n.currentTarget,s)),n.keyCode==Oe.ESC&&(i=this._handleEscKey(o,n.currentTarget)),n.keyCode==Oe.TAB&&(i=this._handleTabKey(o,n.currentTarget,n.shiftKey)),i&&(n.preventDefault(),n.stopPropagation()))),t)},_moveLeft:function(t,n,i,o,r){var a,s,l=t.parent(),d=l.parent();return n?this.collapseRow(l):o&&t.is(".k-header")&&this.options.reorderable?this._moveColumn(t,!0):(s=d.find(rt).index(l),a=this._prevHorizontalCell(d,t,s),a[0]||(i?this.lockedTable?(a=this._relatedRow(l),e.contains(this.lockedTable[0],l[0])&&(a=a.prevAll(st+":first")),a=a.children(it+":last")):a=this._tabNext(t,r,!0):(d=this._horizontalContainer(d),a=this._prevHorizontalCell(d,t,s),a[0]!==t[0]&&ve(d.parent(),!0))),this._setCurrent(a)),!0},_moveRight:function(t,n,i,o,r){var a,s,l=t.parent(),d=l.parent();return n?this.expandRow(l):o&&t.is(".k-header")&&this.options.reorderable?this._moveColumn(t,!1):(s=d.find(rt).index(l),a=this._nextHorizontalCell(d,t,s),a[0]||(i?this.lockedTable?(a=this._relatedRow(l),e.contains(this.table[0],l[0])&&(a=a.nextAll(st+":first")),a=a.children(it+":first")):a=this._tabNext(t,r,!1):(d=this._horizontalContainer(d,!0),a=this._nextHorizontalCell(d,t,s),a[0]!==t[0]&&ve(d.parent(),!0))),this._setCurrent(a)),!0},_moveUp:function(e,t){var n,i,o=e.parent().parent();return t?(n=e.parent(),n=n.prevAll(st+":first"),n=e.parent().is(st)?n.children().eq(e.index()):n.children(it+":last")):(n=this._prevVerticalCell(o,e),n[0]||(this._lastCellIndex=0,o=this._verticalContainer(o,!0),n=this._prevVerticalCell(o,e),n[0]&&ve(o.parent(),!0))),i=this._lastCellIndex||0,this._setCurrent(n),this._lastCellIndex=i,!0},_moveDown:function(e,t){var n,i,o=e.parent().parent();return t?(n=e.parent(),n=n.nextAll(st+":first"),n=e.parent().is(st)?n.children().eq(e.index()):n.children(it+":first")):(n=this._nextVerticalCell(o,e),n[0]||(this._lastCellIndex=0,o=this._verticalContainer(o),n=this._nextVerticalCell(o,e),n[0]&&ve(o.parent(),!0))),i=this._lastCellIndex||0,this._setCurrent(n),this._lastCellIndex=i,!0},_moveColumn:function(t,n){var i=this.wrapper.data().kendoReorderable.element.find(this._draggableInstance.options.filter+":visible"),o=w(R(this.columns)),r=i.index(e(t)),a=n?-1:1,s=o[r],l=P(o,this.columns,r,r+a);l>=0&&(this.reorderColumn(l,s,n),this.trigger(Qt,{newIndex:l,oldIndex:r,column:s}))},_handleHome:function(e,n){var i,o=e.parent(),r=o.parent(),a=this.lockedTable&&this.lockedTable.children("tbody")[0]===r[0],s=r[0]===this.tbody[0];return this._hasVirtualColumns()?(this._scrollToColumn(Me.keys.HOME),!0):(n?i=this.lockedTable?this.lockedTable.find(lt+">"+at+":first"):this.table.find(lt+">"+at+":first"):(s||a)&&(s&&this.lockedTable&&(o=this._relatedRow(o)),i=o.children(it+":first")),i&&i.length?(this._setCurrent(i),!0):t)},_handleEnd:function(e,n){var i,o=e.parent(),r=o.parent(),a=this.lockedTable&&this.lockedTable.children("tbody")[0]===r[0],s=r[0]===this.tbody[0];return this._hasVirtualColumns()?(this._scrollToColumn(Me.keys.END),!0):(n?i=this.table.find(dt+">"+at+":last"):(s||a)&&(!s&&this.lockedTable&&(o=this._relatedRow(o)),i=o.children(it+":last")),i&&i.length?(this._setCurrent(i),!0):t)},_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(Be()).closest(".k-edit-cell"),o[0]&&o[0]!==t[0]&&(t=o),o=this._tabNext(t,n,i),o[0]!==t[0]&&(!!o.length&&(this._handleEditing(t,o,o.closest("table")),!0)))},_handleEscKey:function(t,n){var i,o=Be(),r="incell"==this._editMode();return Te(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(at).first())),Bn.msie&&Bn.version<9&&document.body.focus(),ve(n,!0),!0):!!t.has(o).length&&(ve(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)},_handleSpaceKey:function(t,n){var i,o,r,a,s=this;if(n&&s.groupable&&t.hasClass("k-header"))return i=s.groupable.descriptors(),o=t.attr(Me.attr("field")),r=s.groupable.aggregates(),a=t.attr(Me.attr("title"))||o,s.groupable._canDrag(t)?(i.push({field:o,dir:"asc",aggregates:r||[]}),a+=" "+s.options.messages.ungroupHeader):(i=e.grep(i,function(e){return e.field!==o}),a+=" "+s.options.messages.groupHeader),t.attr("aria-label",a),s.dataSource.group(i),!0},_handleEnterKey:function(t,n,i){var o,r,a=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")?(o=t.find(".k-link"),o.length?o.click():t.find(Vt).focus(),!0):!!this._toggleCurrent(t,a)||(r=t.find(":kendoFocusable:first"),r[0]&&!t.hasClass("k-edit-cell")&&t.hasClass("k-state-focused")?(r.focus(),!0):!(!a||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,a=t.nextAll(it);return a.length||(i=e.find(rt),o=i.index(t.parent()),o!=-1)?a.first():t.hasClass("k-header")?(r=[],W([U(this.columns)[0]],Z(i.eq(0).children(":visible").first()),r,0,0),r[n]?r[n][0]:t):t.parent().hasClass("k-filter-row")?i.last().children(it).first():i.eq(n).children(it).first()},_prevHorizontalCell:function(e,t,n){var i,o,r,a,s=t.prevAll(it);return s.length||(i=e.find(rt),o=i.index(t.parent()),o!=-1)?s.first():t.hasClass("k-header")?(r=[],a=U(this.columns),W([a[a.length-1]],Z(i.eq(0).children().last()),r,0,0),r[n]?r[n][0]:t):t.parent().hasClass("k-filter-row")?i.last().children(it).last():i.eq(n).children(it).last()},_currentDataIndex:function(e,n){var i,o=n.attr("data-index");return o?(i=U(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(rt),a=r.index(o),s=this._currentDataIndex(t,n);if(s||n.hasClass("k-header"))return i=J(n),i.eq(i.length-2);if(s=Math.max(o.children(it).index(n),this._lastCellIndex||0),o.hasClass("k-filter-row"))return X(t).filter(v).eq(s);if(a==-1){if(this._hasVirtualColumns()&&(s=this._virtualCellIndex),o=t.find("tr.k-filter-row:visible"),!o[0])return(this._hasDetails()||n.parent().find(".k-hierarchy-cell").length)&&s&&s--,X(t).filter(v).eq(s)}else o=0===a?e():r.eq(a-1);return i=o.children(it),i.eq(i.length>s?s:0)},_nextVerticalCell:function(e,n){var i,o,r,a,s,l,d,c=n.parent(),u=e.children(rt),h=u.index(c),p=this._currentDataIndex(e,n),f=this.virtualScroll||{};if(h!=-1&&p===t&&n.hasClass("k-header"))return Z(n).eq(1);
if(p=p?parseInt(p,10):c.children(it).index(n),p=Math.max(p,this._lastCellIndex||0),h==-1?(c=u.eq(0),f.columns&&(o=parseInt(c.children().first().attr("colspan"),10),p=this._virtualCellIndex-(o>1?o:0)),(this._hasDetails()||c.find(".k-hierarchy-cell").length)&&p++):c=u.eq(h+n[0].rowSpan),r=p,this._currentDataIndex(e,n)!==t)for(a=c.children(":not(.k-group-cell):not(.k-hierarchy-cell)"),s=a.filter(":hidden"),l=0,d=s.length;lp?p:0)},_verticalContainer:function(e,t){var n=e.parent(),i=this._navigatableTables.length,o=Math.floor(i/2),r=Ge(n[0],this._navigatableTables);return t&&(o*=-1),r+=o,(r>=0||rthead":">tbody")},_horizontalContainer:function(e,t){var n,i,o=this._navigatableTables.length;return o<=2?e:(n=e.parent(),i=Ge(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(it+":first"):e.nextAll(":visible:first");if(!o.length){if(o=e.parent(),this.lockedTable&&(i=n&&t==this.lockedTable[0]||!n&&t==this.table[0],o=this._relatedRow(o)),i){if(this._hasVirtualColumns())return e;o=o[n?"prevAll":"nextAll"]("tr:not(.k-grouping-row):not(.k-detail-row):visible:first")}o=o.children(it+(n?":last":":first"))}return o},_handleEditing:function(n,i,o){var r,a,s=this,l=e(Be()),d=s._editMode(),c=Bn.msie,u=c&&Bn.version<9,h=s._editContainer,p=s.options.editable&&s.options.editable.update!==!1;if(o=e(o),a="incell"==d?n.hasClass("k-edit-cell"):n.parent().hasClass("k-grid-edit-row"),s.editable){if(e.contains(h[0],l[0])&&(Bn.opera||u?l.blur().change().triggerHandler("blur"):(l.blur(),c&&l.blur())),!s.editable)return ve(o),t;if(!s.editable.end())return s._setCurrent("incell"==d?h:h.children().filter(it).first()),r=h.find(":kendoFocusable:first")[0],r&&r.focus(),t;"incell"==d?s.closeCell():(s.saveRow(),a=!0)}i&&s._setCurrent(i),u&&document.body.focus(),ve(o,!0),p&&(!a&&!i||i)&&(d===un?e(s.current()).hasClass(nt)||s.editCell(s.current()):s.editRow(s.current().parent()))},_wrapper:function(){var e=this,t=e.table,n=e.options.height,i=e.options.width,o=e.element;o.is("div")||(o=o.wrap("").parent()),e.wrapper=o.addClass("k-grid k-widget k-grid-display-block"),n&&(e.wrapper.css(nn,n),t.css(nn,"auto")),i&&e.wrapper.css("width",i),e._initMobile()},_initMobile:function(){var e,t=this.options,n=this;this._isMobile=t.mobile===!0&&Me.support.mobileOS||"phone"===t.mobile||"tablet"===t.mobile,this._isMobile&&(e=this.wrapper.addClass("k-grid-mobile").wrap("').parent(),this.pane=this._createPane(e),this.view=this.pane.view(),t.height?this.pane.element.parent().css(nn,t.height):this.pane.element.parent().css(nn,this.wrapper[0].style.height),this._editAnimation="slide",n.wrapper.on("transitionend"+ht,function(e){e.stopPropagation()}),n.wrapper.on("contextmenu"+ht,"th a",function(e){return e.preventDefault(),!1}),this.view.bind("showStart",function(){n._isLocked()&&(n._updateTablesWidth(),n._applyLockedContainersWidth(),n._syncLockedContentHeight(),n._syncLockedHeaderHeight(),n._syncLockedFooterHeight())}))},_createPane:function(e){var t=Me.Pane.wrap(e,{viewEngine:{viewOptions:{renderOnInit:!0,wrap:!1,wrapInSections:!0,detachOnHide:!1,detachOnDestroy:!1}}});return t},_tbody:function(){var t,n=this,i=n.table;t=i.find(">tbody"),t.length||(t=e("").appendTo(i)),n.tbody=t.attr("role","rowgroup")},_scrollable:function(){var t,n,i,o,r,a,s,l=this,d=l.options,c=d.scrollable,u=c!==!0&&c.virtual&&!l.virtualScrollable,h=u?Ce(c.virtual):{},p=!Me.support.kineticScrollNeeded||h.rows?Me.support.scrollbar():0;c&&(t=l.wrapper.children(".k-grid-header"),t[0]||(t=e('').insertBefore(l.table)),t.css(zn?"padding-left":"padding-right",c.virtual?p+1:p),n=e(''),Ln&&n.attr("cellspacing",0),n.width(l.table[0].style.width),n.append(l.thead),t.empty().append(e('').append(n)),l.content=l.table.parent(),l.virtualScroll=h,l.content.is(".k-virtual-scrollable-wrap, "+Ze+Vn.scrollContainer)&&(l.content=l.content.parent()),l.content.is(".k-grid-content, .k-virtual-scrollable-wrap")||(l.content=l.table.wrap('').parent()),h.rows&&l._createVirtualScrollable(),h.columns&&l.table.css({width:L($(q(l.columns)))}),i=t.children(".k-grid-header-wrap"),l.scrollables=i.add(l.content),o=l.wrapper.find(".k-grid-footer"),o.length&&(l.scrollables=l.scrollables.add(o.children(".k-grid-footer-wrap"))),i.unbind("scroll"+ht).bind("scroll"+ht,function(e){l._scrollLeft!==this.scrollLeft&&l.scrollables.not(e.currentTarget).scrollLeft(this.scrollLeft)}),h.rows?l.content.find(">.k-virtual-scrollable-wrap").unbind("scroll"+ht).bind("scroll"+ht,function(){var e=this.scrollLeft!=l._scrollLeft;l._scrollLeft=this.scrollLeft,l.scrollables.scrollLeft(this.scrollLeft),l.lockedContent&&(l.lockedContent[0].scrollTop=this.scrollTop),h.columns&&e&&l.refresh()}):(r=c.endless,a=l.dataSource.options.pageSize,r&&(l._endlessPageSize=a),l.content.unbind("scroll"+ht).bind("scroll"+ht,function(e){var t=this.scrollLeft!=l._scrollLeft;l._scrollLeft=this.scrollLeft,l.scrollables.not(e.currentTarget).scrollLeft(l._scrollLeft),l.lockedContent&&e.currentTarget==l.content[0]&&(l.lockedContent[0].scrollTop=this.scrollTop),r&&this.scrollTop+this.clientHeight-this.scrollHeight>=-10&&!l._endlessFetchInProgress&&l._endlessPageSize',a=i.resizable;i.options.scrollable&&i.wrapper.is(":visible")&&(n=i.table.parent().children("."+o),i._setContentWidthHandler=Ye(i._setContentWidth,i),i.dataSource&&i.dataSource.view().length?n[0]&&(n.remove(),a&&a.unbind("resize",i._setContentWidthHandler)):(n[0]||(n=e(r).appendTo(i.table.parent()),a&&a.bind("resize",i._setContentWidthHandler)),i.thead&&(n.width(i.thead.width()),isNaN(parseFloat(t,10))||i.content.scrollLeft(t))),i._applyLockedContainersWidth(),i._syncLockedContentHeight(),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=Me.support.scrollbar(),a=this.lockedHeader.find(">table>colgroup>col:not(.k-group-col, .k-hierarchy-col)"),s=t.find(">colgroup>col:not(.k-group-col, .k-hierarchy-col)"),l=H(a),d=H(s);o>0&&(l+=He(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(d),this.virtualScrollable&&!Nn&&(i-=r),this.content[0].style.width=i-l-1+"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(d))}},_setContentHeight:function(){var e,t,n=this,i=n.options,o=n.wrapper.children(".k-grid-header"),r=Me.support.scrollbar(),a=(i.scrollable||{}).height;i.scrollable&&n.wrapper.is(":visible")&&(a&&""===n.content[0].style.height&&(n.content[0].style.height=a),e=n.wrapper.innerHeight(),e-=Ne(o),n.pager&&n.pager.element.is(":visible")&&(e-=Ne(n.pager.element)),i.groupable&&(e-=Ne(n.wrapper.children(".k-grouping-header"))),i.toolbar&&(e-=Ne(n.wrapper.children(".k-grid-toolbar"))),n.footerTemplate&&(e-=Ne(n.wrapper.children(".k-grid-footer"))),t=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))},t(n.wrapper)&&(e>2*r?(n.lockedContent&&(r=n.table[0].offsetWidth>n.table.parent()[0].clientWidth?r:0,n.lockedContent.height(e-r)),n.content.height(e)):n.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=Ne(t.table)/n,t._sum=i,t._measures=1),e=Ne(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=qe(o)?{data:o}:o,Ve(o)&&(We(o,{table:n.table,fields:n.columns}),e=i.pageable,Ve(e)&&e.pageSize!==t&&(o.pageSize=e.pageSize)),n.dataSource&&n._refreshHandler?n.dataSource.unbind(St,n._refreshHandler).unbind(et,n._progressHandler).unbind(tt,n._errorHandler).unbind(_n,n._sortHandler):(n._refreshHandler=Ye(n.refresh,n),n._progressHandler=Ye(n._requestStart,n),n._errorHandler=Ye(n._error,n),n._sortHandler=Ye(n._clearSortClasses,n)),n.dataSource=Re.create(o).bind(St,n._refreshHandler).bind(et,n._progressHandler).bind(tt,n._errorHandler).bind(_n,n._sortHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_modelChange:function(t){var n,i,o,r,a,s,l,d,c,u,h=this,p=h.tbody,f=t.model,g=h.tbody.find("tr["+Me.attr("uid")+"="+f.uid+"]"),m=g.hasClass("k-alt"),v=h._items(p).index(g),_=h.lockedContent;if(_&&(n=h._relatedRow(g)),g.add(n).children(".k-edit-cell").length&&!h.options.rowTemplate)g.add(n).children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){i=e(this),o=h._hasVirtualColumns()?h.virtualCols[h.cellIndex(i)]:K(h.columns)[h.cellIndex(i)],o.field===t.field&&(i.hasClass("k-edit-cell")?i.addClass("k-dirty-cell"):h._displayCell(i,o,f))});else if(!g.hasClass("k-grid-edit-row")){for(s=e().add(g),_&&(r=(m?h.lockedAltRowTemplate:h.lockedRowTemplate)(f),s=s.add(n),n.replaceWith(r)),h.angular("cleanup",function(){return{elements:s.get()}}),r=(m?h.altRowTemplate:h.rowTemplate)(f),g.replaceWith(r),r=h._items(p).eq(v),u=[{dataItem:f}],_&&(g=g.add(n),n=h._relatedRow(r)[0],ge(r[0],n),r=r.add(n),u.push({dataItem:f})),h.angular("compile",function(){return{elements:r.get(),data:u}}),a=h.options.selectable,(a||h._checkBoxSelection)&&g.hasClass("k-state-selected")&&h.select(r),d=s.children(":not(.k-group-cell,.k-hierarchy-cell)"),l=r.children(":not(.k-group-cell,.k-hierarchy-cell)"),v=0,c=h.columns.length;v').appendTo(n.wrapper)),n.pager&&n.pager.destroy(),n.pager="object"==typeof i&&i instanceof Me.ui.Pager?i:new Me.ui.Pager(t,We({},i,{dataSource:n.dataSource})),n.pager.bind("pageChange",function(e){n.trigger("page",{page:e.index})&&e.preventDefault()}),n._togglePagerVisibility())},_footer:function(){var t,n,i,o=this,r=o.dataSource.aggregates(),a="",s=o.footerTemplate,l=o.options,d=o.footer||o.wrapper.find(".k-grid-footer");s?(a=e(o._wrapFooter(s(r))),d.length?(n=a,o.angular("cleanup",function(){return{elements:d.get()}}),d.replaceWith(n),d=o.footer=n):d=o.footer=l.scrollable?l.pageable?a.insertBefore(o.wrapper.children("div.k-grid-pager")):a.appendTo(o.wrapper):a.insertBefore(o.tbody),o.angular("compile",function(){return{elements:d.find("td:not(.k-group-cell, .k-hierarchy-cell)").get(),data:Ue(o.columns,function(e){return{column:e,aggregate:r[e.field]}})}})):d&&!o.footer&&(o.footer=d),d.length&&(l.scrollable&&(t=d.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&&d.find("table").css("width",o._footerWidth),t&&(i=o.content.scrollLeft(),l.scrollable!==!0&&o.virtualScroll.rows&&(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=Me.support.mobileOS?0:Me.support.scrollbar();return n.options.scrollable?(i=e('"+t+""),n._appendCols(i.find("table")),i.css(zn?"padding-left":"padding-right",o),i):''+t+""},_columnMenu:function(){var e,n,i,o,r,a,s,l,d,c=this,u=K(c.columns),h=c.options,p=h.columnMenu,f=je(c.columns,function(e){return e.columns!==t}).length>0,g=this._isMobile,m=function(e){c.trigger(kt,{field:e.field,container:e.container})},v=function(e){c.trigger(xt,{field:e.field,container:e.container})},_=function(e){ve(e.closest("table"),!0)},b=function(e){c.trigger("sort",{sort:e.sort})?e.preventDefault():(c._clearEditableState(),c.dataSource.options.endless&&(c.dataSource.options.endless=null,c._endlessPageSize=c.dataSource.options.pageSize,c.dataSource.pageSize(c.dataSource.options.pageSize)))},w=function(e){c.trigger("filter",{filter:e.filter,field:e.field})?e.preventDefault():(c._clearEditableState(),c.dataSource.options.endless&&(c.dataSource.options.endless=null,c._endlessPageSize=c.dataSource.options.pageSize,c.dataSource.pageSize(c.dataSource.options.pageSize)))},k=h.$angular;if(p)for("boolean"==typeof p&&(p={}),c._setColumnsMediaVisibility(u),a=X(c.thead),s=0,l=a.length;s0},k&&(i.$angular=k),d.kendoColumnMenu(i))},_headerCells:function(){return e(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,a,s=this,l=K(s.columns),d=function(e){s.trigger(wt,{field:e.field,container:e.container})},c=function(e){ve(e.closest("table"),!0)},u=function(e){s.trigger("filter",{filter:e.filter,field:e.field})?e.preventDefault():(s._clearEditableState(),s.dataSource.options.endless&&(s.dataSource.options.endless=null,s._endlessPageSize=s.dataSource.options.pageSize,s.dataSource.pageSize(s.dataSource.options.pageSize)))},h=function(e){s.trigger(yt,{field:e.field,container:e.container})},p=s.options.filterable;if(p&&typeof p.mode==an&&p.mode.indexOf("menu")==-1&&(p=!1),p&&!s.options.columnMenu)for(t=X(s.thead),i=0,o=t.length;i"),p=d.field,d.hidden&&h.hide(),r.append(h),p&&d.filterable!==!1){if(f=d.filterable&&d.filterable.cell||{},l=m.options.dataSource,l instanceof Re&&(l=m.options.dataSource.options),g=We(!0,{},o.messages),d.filterable&&We(!0,g,d.filterable.messages),f.enabled===!1){h.html(" ");continue}f.dataSource&&(l=f.dataSource,u=!0),d.filterable&&d.filterable.operators&&(c=d.filterable.operators),t={column:d,dataSource:m.dataSource,suggestDataSource:l,customDataSource:u,field:p,messages:g,values:d.values,template:f.template,delay:f.delay,inputWidth:f.inputWidth,suggestionOperator:f.suggestionOperator,minLength:f.minLength,dataTextField:f.dataTextField,operator:f.operator,operators:c,showOperators:f.showOperators,change:a},n&&(t.$angular=n),e("").attr(Me.attr("field"),p).appendTo(h).kendoFilterCell(t)}else h.html(" ")},_sortable:function(){var e,t,n,i,o,r,a=this,s=K(a.columns),l=a.options.sortable,d=function(e){a.trigger("sort",{sort:e.sort})?e.preventDefault():a._clearEditableState()};if(l){for(i=X(a.thead),o=0,r=i.length;o0&&(!c||!c.transport)),r.options.scrollable){if(o=t,i=U(t),t=j(t),i.length>0&&0===t.length)throw Error("There should be at least one non locked column");oe(r.element.find("tr:has(th):first"),o),t=i.concat(t)}l.length&&t.length&&r._updateColumnIDs(t,l.first()),r.columns=d(t,n),e.grep(K(r.columns),function(e){return e.selectable}).length&&(r._selectedIds={},r._checkBoxSelection=!0,r.wrapper.on(en+ht,"tbody > tr "+Vt,Ye(r._checkboxClick,r)),r.wrapper.on(en+ht,"thead > tr "+Vt,Ye(r._headerCheckboxClick,r)))},_updateColumnIDs:function(e,t){var n,i,o;if(e.length){for(n=t.find("th"),o=0;o",b>0&&!a&&(e+=i(b)),v&&(e+=''),s=0;s1&&d.attributes&&d.attributes.style&&(d.attributes.style=d.attributes.style.replace("display:none",""),d.colSpan--),d.command&&(d.attributes=d.attributes||{},t!==d.attributes["class"]?d.attributes["class"]+=" k-command-cell":d.attributes["class"]="k-command-cell"),e+="1&&(e+=" "+Me.attr("virtual")),e+=" colSpan='"+d.colSpan+"'"),e+=" role='gridcell'>",e+=h._cellTmpl(d,m),e+="";e+=""}return e=Me.template(e,p),m.count>0?Ye(e,m.storage):e},_dirtyCellTemplate:function(e,t){var n;return e&&t?(n="["===e.charAt(0)?Me.expr(e,t+".dirtyFields"):t+".dirtyFields['"+e+"']","#= "+t+" && "+t+".dirty && "+t+".dirtyFields && "+n+" ? ' k-dirty-cell' : '' #"):""},_headerCellText:function(e){var t=this,n=We({},Me.Template,t.options.templateSettings),i=e.headerTemplate,o=typeof i,r=e.title||e.field||"";return o===rn?r=Me.template(i,n)({}):o===an&&(r=i),r},_cellTmpl:function(e,t){var n,i,o=this,r=We({},Me.Template,o.options.templateSettings),a=e.template,s=r.paramName,l=e.field,d="",c=e.format,u=typeof a,h=e.values;if(e.command){if(qe(e.command)){for(n=0,i=e.command.length;n' : '' #"):""},_virtualCols:function(t){var n,i,o,r=this,a=e.map(t,function(e){return e.hidden?0:parseInt(e.width,10)}),s=r.virtualScrollable?r.content.find(">.k-virtual-scrollable-wrap").scrollLeft():r.content.scrollLeft(),l=parseInt(r.options.width||r.wrapper.width(),10),d=L(t),c=[],u=0,h=0,p=0,f=0,g=0;for(f=0;f=0;i--){if(!(g+3*a[i]{1}',r='{0}',a=this.options.scrollable&&!this.wrapper[0].style.height?' style="margin:0 auto;position:static;"':"",s={storage:{},count:0},l=e.extend({},Me.Template,this.options.templateSettings),d=l.paramName,c="";return t=this.options.noRecords.template?this.options.noRecords.template:Me.format(r,this.options.messages.noRecords,a),n=typeof t,"function"===n?(s.storage["tmpl"+s.count]=t,c+="#=this.tmpl"+s.count+"("+d+")#",s.count++):"string"===n&&(c+=t),i=Me.template(Me.format(o,Wt,c),l),s.count>0&&(i=e.proxy(i,s.storage)),i},_footerTmpl:function(e,t,n,r,a){var s,l,d,c,u,h=this,p=We({},Me.Template,h.options.templateSettings),f=p.paramName,g="",m={},v=0,_={},b=h._groups(),w=h.dataSource._emptyAggregates(t);for(g+='',b>0&&!a&&(g+=i(b)),h._hasDetails()&&(g+=''),s=0,l=e.length;s",d?(c!==rn&&(_=w[u.field]?We({},p,{paramName:f+"['"+u.field+"']"}):{},d=Me.template(d,_)),m["tmpl"+v]=d,g+="#=this.tmpl"+v+"("+f+")#",v++):g+=" ",g+="";return g+="",g=Me.template(g,p),v>0?Ye(g,m):g},_groupHeaderTmpl:function(e,n,i,o,r,a){var s,l,d,c,u,h=this,p=We({},Me.Template,h.options.templateSettings),f=p.paramName,g="",m={},v=0,_={},b=h.dataSource._emptyAggregates(n),w=a.length?Ge(a[0],e):-1;if(g+='',r||(g+='# for (var i = 0; i < data.groupCells; i++) { ## } #'),h._hasDetails()&&(g+=''),w<0)return g+=r?"":De(e.length),t;if(w",d?(c!==rn&&(_=b[u.field]?We({},p,{paramName:f+"['"+u.field+"']"}):{},d=Me.template(d,_)),m["tmpl"+v]=d,g+="#=this.tmpl"+v+"("+f+")#",v++):g+=" ",g+="";return g+="",g=Me.template(g,p),v>0?Ye(g,m):g},_detailTmpl:function(e){var t=this,n="",o=We({},Me.Template,t.options.templateSettings),r=o.paramName,a={},s=0,l=t._groups(),d=w(K(t.columns)).length,c=typeof e;return n+='',l>0&&(n+=i(l)),n+='",c===rn?(a["tmpl"+s]=e,n+="#=this.tmpl"+s+"("+r+")#",s++):n+=e,n+="",n=Me.template(n,o),s>0?Ye(n,a):n},_hasDetails:function(){var e=this;return null!==e.options.detailTemplate||(e._events[bt]||[]).length},_hasFilterRow:function(){var t=this.options.filterable,n=t&&typeof t.mode==an&&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()&&U(t.columns).length)throw Error("Having both detail template and locked columns is not supported");t.table.on(en+ht,".k-hierarchy-cell .k-i-expand, .k-hierarchy-cell .k-i-collapse",function(n){
var i,o,r=e(this),a=r.closest("td.k-hierarchy-cell"),s=r.hasClass("k-i-expand"),l=r.closest("tr.k-master-row"),d=t.detailTemplate,c=t._hasDetails(),u=s?Cn:Sn,h=!!s;return r.toggleClass("k-i-expand",!s).toggleClass("k-i-collapse",s).attr(Tn,u),a.attr("aria-expanded",h),i=l.next(),c&&!i.hasClass("k-detail-row")&&(o=t.dataItem(l),i=e(d(o)).addClass(l.hasClass("k-alt")?"k-alt":"").insertAfter(l),t.angular("compile",function(){return{elements:i.get(),data:[{dataItem:o}]}}),t.trigger(bt,{masterRow:l,detailRow:i,data:o,detailCell:i.find(".k-detail-cell")})),t.trigger(s?Et:Mt,{masterRow:l,detailRow:i}),i.toggle(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/,a=t.sectionRowIndex;for(i=a,n=0;ntd .k-i-expand").click()},collapseRow:function(t){e(t).find("> td .k-i-collapse").click()},_createHeaderCells:function(e,n){var i,r,a,s,l,d,c,u=this,h="",p=u.options.messages,f=K(u.columns),g=u.dataSource.group();for(i=0,s=e.length;i-1&&(h+=Me.attr("index")+"='"+c+"'"),a=r.headerTemplate?a:Me.template(Pn)({}),h+=">"+a+""):r.command?(h+="-1&&(h+=Me.attr("index")+"='"+c+"'"),h+=">"+a+""):(r.field&&(d=Me.attr("field")+"='"+r.field+"' "),h+="1?(h+='colspan="'+(e[i].colSpan-B(r.columns))+'" ',h+=Me.attr("colspan")+"='"+e[i].colSpan+"'"):1===e[i].colSpan&&(h+=Me.attr("colspan")+"='"+e[i].colSpan+"'"),r.title&&(l=r.title.replace('"',""").replace(/'/g,"'"),h+=Me.attr("title")+'="'+l+'" '),r.groupable!==t&&(h+=Me.attr("groupable")+"='"+r.groupable+"' "),_e(u,r)&&(h+="aria-label='"+(l||r.field)+" ",h+=be(g,r.field)?p.ungroupHeader:p.groupHeader,h+="' "),r.aggregates&&r.aggregates.length&&(h+=Me.attr("aggregates")+"='"+r.aggregates+"'"),c>-1&&(h+=Me.attr("index")+"='"+c+"'"),h+=o(r.headerAttributes),h+=">"+a+"");return h},_appendLockedColumnContent:function(){var t,n,i,o,r,a=this.columns,s=this.table.find("colgroup"),l=s.find("col:not(.k-group-col,.k-hierarchy-col)"),d=e(),c=0,u=0;for(t=0,n=a.length;t"),s.detach(),i.find("colgroup").append(d),s.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"),a=o.find(".k-grid-footer-wrap>table>colgroup>col"),s=e(''),l=i._groups(),d=e(),c=e();for(d=d.add(r.filter(".k-group-cell")),t=0,n=K(U(i.columns)).length;t",i+=Array(g.length+1).join(""),i+=(_?'':"")+"",s=e(i),S=s.find("colgroup"),S.append(p.thead.prev().find("col.k-group-col").add(v)),r=s.find("thead tr:not(.k-filter-row)"),n=0,o=g.length;nthead"),m=c.element.find("thead:first").length>0,v=c.options.messages.expandCollapseColumnHeader;if(g.length||(g=e("").insertBefore(c.tbody)),c.lockedHeader&&c.thead?(n=c.thead.find("tr:has(th):not(.k-filter-row)").html(""),n.remove(),n=e(),c._removeLockedContainers()):n=c.element.find(m?"thead:first tr:has(th):not(.k-filter-row)":"tr:has(th):first"),n.length){for(t=0;t=0&&(r[0].style.display="none");c._updateHeadersAttr(Y(u))}else if(n=g.children().first(),!n.length){for(i=[{rowSpan:1,cells:[],index:0}],c._prepareColumns(i,u),t=0;t",h&&(f+=''+v+""),f+=c._createHeaderCells(i[t].cells,i[t].rowSpan),f+="";n=e(f)}p&&(a=e(""),a.addClass("k-filter-row"),(h||n.find(".k-hierarchy-cell").length)&&a.prepend(''),s=(c.thead||g).find(".k-filter-row"),s.length&&(Me.destroy(s),s.remove()),g.append(a)),n.children().length?h&&!n.find(".k-hierarchy-cell")[0]&&n.prepend(''+(v?v:" ")+""):(f="",h&&(f+=''),f+=c._createHeaderCells(u),n.html(f)),n.attr("role","row").find("th").addClass("k-header"),c.options.scrollable||g.addClass("k-grid-header"),n.find("script").remove().end().prependTo(g),c.thead&&c._destroyColumnAttachments(),this.angular("cleanup",function(){return{elements:g.find("th"+at).get()}}),this.angular("compile",function(){return{elements:g.find(ut).get(),data:Ue(u,function(e){return{column:e}})}}),c.thead=g.attr("role","rowgroup"),c._sortable(),c._filterable(),c._filterRow(),c._scrollable(),c._columnMenu(),d=this.options.scrollable&&U(this.columns).length,d&&(l=c._appendLockedColumnHeader(c.thead.closest(".k-grid-header")),c._appendLockedColumnContent(),c.lockedContent.bind("DOMMouseScroll"+ht+" mousewheel"+ht,Ye(c._wheelScroll,c)),c._updateLockedCols()),c._updateCols(),c._updateColumnCellIndex(),c._updateFirstColumnClass(),c._resizable(),c._draggable(),c._reorderable(),c._updateHeader(c._groups()),d&&(l&&c._syncLockedHeaderHeight(),c._applyLockedContainersWidth()),c.groupable&&c._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=j(o),n=i._retrieveFirstColumn(o,t),i._isLocked()&&(t=i.lockedHeader.find("thead>tr:not(.k-filter-row):not(:first)"),o=U(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,a=i||e[e.length-1],s=e[a.index+1],l=0;for(o=0;ot[0].clientHeight&&(t[0].scrollTop0&&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()?ie(e,$(q(this.columns)),this._hasDetails(),0):ie(e,$(w(this.columns)),this._hasDetails(),0)},_updateColumnSorters:function(){var e,t,n,i,o,r=this,a=X(r.thead),s=K(r.columns);if(r.options.sortable)for(i=0,o=a.length;i0&&(!i.dataSource||!i.dataSource.transport));for(t in e)i.columns.push({field:t,encoded:n,headerAttributes:{id:Me.guid()}});i._thead(),i._templates()}},_rowsHtml:function(e,t){var n,i,o=this,r="",a=t.rowTemplate,s=t.altRowTemplate;for(n=0,i=e.length;n0?o._skipRerenderItemsCount--:r+=n%2?s(e[n]):a(e[n]),o._data.push(e[n]);return r},_groupData:function(e,t,n){var i,o=this,r=o._groupAggregatesDefaultObject||{},a=e.items,s=We({},r,e.aggregates),l=We({},{field:e.field,value:e.value,items:a,aggregates:s},e.aggregates[n?n.field:e.field]),d={};if(!t)for(i in s)d[i]=We({},s[i],{group:{field:e.field,value:e.value,items:a}});return We({},d,l)},_groupRowHtml:function(e,t,n,i,o,r,a){var s,l,d,c=this,u="",h=e.field,p=je(K(c.columns),function(e){return e.field==h})[0]||{},f=w(c.columns)[0],g=f?f.groupHeaderColumnTemplate:null,m=p.groupHeaderTemplate?p.groupHeaderTemplate:g,v=(p.title||h)+": "+ae(e.value,p.format,p.values,p.encoded),_=e.items,b=c._groups(),k=o.groupFooterTemplate,y=o.groupHeaderColumnTemplate;if((o.groupFooterTemplate||o.groupHeaderColumnTemplate||p.groupHeaderTemplate)&&(d=c._groupData(e,!1,!(p.groupHeaderTemplate||!w(c.columns)[0].groupHeaderColumnTemplate)&&w(c.columns)[0])),m&&!r&&(v=typeof m===rn?m(d):Me.template(m)(d)),c._skipRerenderItemsCount?i(t,n,v):u+=y?y(We({},d,{groupCells:n,colspan:b-n,text:v})):i(t,n,v),e.hasSubgroups)for(s=0,l=_.length;stbody>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).find("a").attr(Tn,Sn),t=t.nextAll("tr"),s=[],o=0,r=t.length;otbody>tr:eq("+t.index()+")"))),o=t.find(".k-group-cell").length,t.find(".k-i-expand").addClass("k-i-collapse").removeClass("k-i-expand"),t.find("td[aria-expanded='false']:first").attr("aria-expanded",!0).find("a").attr(Tn,Cn),t=t.nextAll("tr"),l=0,d=t.length;lr?(e(Array(t-r+1).join(''+n.options.messages.expandCollapseColumnHeader+"")).prependTo(i.children("tr:not(.k-filter-row)")),n.element.is(":visible")&&a.find("th.k-group-cell").hide()):to&&e(Array(t-o+1).join('')).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=pe(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(pe(t.eq(0))))},hideColumn:function(n){var i,o,r,a,l,d,c,u,h,p,f,g=this,m=0,_=g.footer||g.wrapper.find(".k-grid-footer"),k=g.virtualScroll||{},y=g.columns,x=g.lockedHeader?X(g.lockedHeader.find(">table>thead")).filter(v).length:0,C=je(K(g.columns),function(e){return e.groupHeaderColumnTemplate});if(n="number"==typeof n?y[n]:Ve(n)?je(z(y),function(e){return e===n})[0]:je(z(y),function(e){return e.field===n})[0],n&&b(n)){if(p=g._columnVisibilitySetter(n),n.columns&&n.columns.length){for(d=F(n,y),p(n,!1),se(s(e(">table>thead",g.lockedHeader),g.thead,">tr:eq("+d.row+")>th"),d.cell,!1),r=0;rh?f=g.lockedHeader.find(">table>thead"):c-=x,i=X(f).filter(v).eq(c),i[0].style.display="none",se(s(e(">table>thead",g.lockedHeader),g.thead,">tr.k-filter-row>th"),h,!1),_[0]&&(g._updateCols(_.find(">.k-grid-footer-wrap>table")),g._updateLockedCols(_.find(">.k-grid-footer-locked>table")),se(_.find(".k-footer-template>td"),h,!1)),k.columns&&!n.locked)return g._updateContentWidth(),g.trigger(Tt,{column:n}),t;if(g.lockedTable&&x>h?le(g.lockedTable.find(">tbody>tr"),h):le(g.tbody.children(),h-x),g.lockedTable)g._updateTablesWidth(),g._applyLockedContainersWidth(),g._syncLockedContentHeight(),g._syncLockedHeaderHeight(),g._syncLockedFooterHeight();else{for(a=g.thead.prev().find("col"),r=0,u=a.length;r-1)m+=He(a[r]);else if(a[r].className.indexOf("k-group-col")>-1)m+=He(a[r]);else{if(!l||l.indexOf("%")!=-1){m=0;break}m+=parseInt(l,10)}o=e(">.k-grid-header table:first,>.k-grid-footer table:first",g.wrapper).add(g.table),g._footerWidth=null,m&&(o.each(function(){this.style.width=m+"px"}),g._footerWidth=m,g._setContentWidth()),Bn.msie&&8==Bn.version&&(o.css("display","inline-table"),setTimeout(function(){o.css("display","table")},1))}g._updateFirstColumnClass(),C.length>0&&g._renderGroupRows(),g.trigger(Tt,{column:n})}},_setParentsVisibility:function(t,n){var i,o,r,a,l,d=this,c=d.columns,h=[],p=d._columnVisibilitySetter(t),f=n?function(e){return w(e.columns).length&&e.hidden}:function(e){return!w(e.columns).length&&!e.hidden};if(u(t,c,h)&&h.length)for(i=h.length-1;i>=0;i--)o=h[i],r=I(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)&&(p(o,n),a[0].style.display=n?"":"none"),a.filter("["+Me.attr("colspan")+"]").length&&(l=parseInt(a.attr(Me.attr("colspan")),10),a[0].colSpan=l-B(o.columns)||1)},_updateContentWidth:function(){var e=this,t=e.table.add(e.thead.parent());t.css({width:L($(q(e.columns)))}),e.refresh()},showColumn:function(n){var i,o,r,a,l,d,c,u,h,p,f,g,m,v,_=this,w=_.columns,k=_.virtualScroll||{},y=_.footer||_.wrapper.find(".k-grid-footer"),x=_.lockedHeader?X(_.lockedHeader.find(">table>thead")).length:0,C=je(K(_.columns),function(e){return e.groupHeaderColumnTemplate});if("number"==typeof n?(p=n,n=w[n]):Ve(n)?e.each(z(w),function(e,t){if(t===n)return n=t,p=e,!1}):e.each(z(w),function(e,t){if(t.field===n)return n=t,p=e,!1}),n&&!b(n)){if(m=_._columnVisibilitySetter(n),n.columns&&n.columns.length){for(c=I(n,w),f=z(_.options.columns)[p],m(n,!0),se(s(e(">table>thead",_.lockedHeader),_.thead,">tr:eq("+c.row+")>th"),c.cell,!0),i=0;ig?v=_.lockedHeader.find(">table>thead"):d-=x,r=X(v).eq(d),r[0].style.display="",se(s(e(">table>thead",_.lockedHeader),_.thead,">tr.k-filter-row>th"),g,!0),y[0]&&(_._updateCols(y.find(">.k-grid-footer-wrap>table")),_._updateLockedCols(y.find(">.k-grid-footer-locked>table")),se(y.find(".k-footer-template>td"),g,!0)),k.columns&&!n.locked)return _._updateContentWidth(),_.trigger(Dt,{column:n}),t;if(_.lockedTable&&x>g?ue(_.lockedTable.find(">tbody>tr"),g):ue(_.tbody.children(),g-x),_.lockedTable)_._updateTablesWidth(),_._applyLockedContainersWidth(),_._syncLockedContentHeight(),_._syncLockedHeaderHeight();else if(a=e(">.k-grid-header table:first,>.k-grid-footer table:first",_.wrapper).add(_.table),n.width){for(l=0,h=_.thead.prev().find("col"),i=0,o=h.length;i-1)l+=He(h[i]);else if(h[i].className.indexOf("k-group-col")>-1)l+=He(h[i]);else{if(u.indexOf("%")>-1){l=0;break}l+=parseInt(u,10)}_._footerWidth=null,l&&(a.each(function(){this.style.width=l+"px"}),_._footerWidth=l,_._setContentWidth())}else a.width("");_._updateFirstColumnClass(),C.length>0&&_._renderGroupRows(),_.trigger(Dt,{column:n})}},_columnVisibilitySetter:function(e){var t=e||{};return y(t.media)?h:f},_progress:function(e){var t=this.element,n=this.options.scrollable&&this.options.scrollable.endless;this._editContainer&&"popup"===this._editMode()?t=this._editContainer:this.lockedContent||n?t=this.wrapper:this.element.is("table")?t=this.element.parent():this.content&&this.content.length&&(t=this.content),n&&e?Me.ui.progress(t,e,{height:this.content.height(),top:this.content[0].offsetTop,opacity:!0}):Me.ui.progress(t,e)},_resize:function(e,t){this._syncLockedContentHeight(),this._syncLockedHeaderHeight(),this.content&&(this._setContentWidth(),this._setContentHeight()),this.lockedTable&&this._syncLockedScroll(),this.virtualScrollable&&(t||this._rowHeight)&&(t&&(this._rowHeight=null),this.virtualScrollable.repaintScrollbar()),this.pager&&this.pager.element&&this.pager.resize(t)},_isActiveInTable:function(){var t=Be();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,o,r=this,a=r.dataSource.view(),s=r.options.navigatable,l=r.virtualScroll||{},d=e(r.current()),c=!1,u=(r.dataSource.group()||[]).length,h=u+$(w(r.columns)).length;t&&"itemchange"===t.action&&(r.editable||r.options.scrollable.endless)&&("popup"!=this._editMode()||"popup"===this._editMode()&&!r._editableIsClosing)||(l.columns&&r._templates(),t&&"remove"===t.action&&r.editable&&r.editable.options.model&&Ge(r.editable.options.model,t.items)>-1&&r.editable.options.model.unbind(St,r._modelChangeHandler),t=t||{},r.trigger("dataBinding",{action:t.action||"rebind",index:t.index,items:t.items})||(t.action===Bt&&r._isVirtualEditable()&&(r._destroyEditable(),r._clearEditableState()),r._angularItems("cleanup"),r._endlessFetchInProgress||(s&&(r._isActiveInTable()||r._editContainer&&r._editContainer.data("kendoWindow"))&&(c=d.is("th"),n=c?d.parent().children(":not(.k-group-cell)").index(d[0]):Math.max(r.cellIndex(d),0)),r._destroyEditable()),r.options.scrollable&&r.options.scrollable.endless?(clearTimeout(r._progressTimeOut),r._progressTimeOut=setTimeout(function(){r._endlessFetchInProgress||r._progress(!1)},100)):r._progress(!1),r._hideResizeHandle(),r._data=[],r.columns.length||(r._autoColumns(r._firstDataItem(a[0],u)),h=u+r.columns.length),r._group=u>0||r._group,r._group&&(r._templates(),r._updateCols(),r._updateLockedCols(),r._virtualColScroll||r._updateHeader(u),r._group=u>0,r._groupRows=de(a)),r.content&&(i=r.content.scrollLeft()),o=r._skipRerenderItemsCount,r._renderContent(a,h,u),r.options.scrollable&&r.options.scrollable.endless&&this.lockedContent&&(r._skipRerenderItemsCount=o),r._renderLockedContent(a,h,u),r._virtualColScroll||(r._footer(),r._renderNoRecordsContent(),r._togglePagerVisibility(),r._setContentHeight(),r._setContentWidth(r.content&&i)),r.lockedTable&&(l.rows?r.content.find(">.k-virtual-scrollable-wrap").trigger("scroll"):r.touchScroller?r.touchScroller.movable.trigger("change"):(r.wrapper.one("scroll",function(e){e.stopPropagation()}),r.content.trigger("scroll"))),r._endlessFetchInProgress||r._restoreCurrent(n,c),r.touchScroller&&r.touchScroller.contentResized(),r.selectable&&r.selectable.resetTouchEvents(),r._muteAngularRebind(function(){r._angularItems("compile")}),r._checkBoxSelection&&r._toggleHeaderCheckState(!1),r.options.persistSelection&&(r.selectable&&!Me.ui.Selectable.parseOptions(r.options.selectable).cell||r._checkBoxSelection)&&r.items().length?r._restoreSelection():r._selectedIds={},r.trigger(It)))},_restoreCurrent:function(n,i){var o,r,a,s,l;if(!(n===t||n<0)){if(this._removeCurrent(),i)this._setCurrent(this.thead.find("th:not(.k-group-cell)").eq(n));else{if(o=0,r=this.virtualScroll||{},this._rowVirtualIndex?o=r.rows?this.virtualScrollable.position(this._rowVirtualIndex):this._rowVirtualIndex:n=0,a=e(),this.lockedTable&&(a=this.lockedTable.find(">tbody>tr").eq(o)),a=a.add(this.tbody.children().eq(o)),this._hasVirtualColumns()&&(s=parseInt(a.find("td:first").attr("colspan"),10),n=this._virtualCellIndex-(s>1?s-1:0)),l=a.find(">td:not(.k-group-cell):not(.k-hierarchy-cell)").eq(n),!l.length||n<0)return;this._hasVirtualColumns()?this._setCurrent(l,!0,!0):this._setCurrent(l)}this._current&&ve(this._current.closest("table")[0],!0)}},_restoreSelection:function(){var e,t=this,n=t.items(),i=Ke(t.dataSource.options.schema.model)?t.dataSource.options.schema.model.fn.idField:t.dataSource.options.schema.model.id;e=je(n,function(e){var n=t.dataItem(e)[i];if(t._selectedIds[n])return e}),t.select(e)},_angularItems:function(e){Me.ui.DataBoundWidget.fn._angularItems.call(this,e),"cleanup"!==e||this.dataSource&&this.dataSource.options.endless||this._cleanupDetailItems(),this._angularGroupItems(e),this._angularGroupFooterItems(e)},_cleanupDetailItems:function(){var e=this;e._hasDetails()&&(e.angular("cleanup",function(){return{elements:e.tbody.children(".k-detail-row")}}),e.tbody.find(".k-detail-cell").empty())},_angularGroupItems:function(t){var 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(de(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(ce(n.dataSource.view()),function(e){return{dataItem:e}})}})},_renderContent:function(e,t,n){var i,o,r,a,s=this,l="",d=null!=s.lockedContent,c=null,u=s.options.scrollable,h={rowTemplate:s.rowTemplate,altRowTemplate:s.altRowTemplate,groupFooterTemplate:s.groupFooterTemplate,groupHeaderColumnTemplate:s.groupHeaderColumnTemplate};if(u&&u.endless&&!s.dataSource.options.endless&&(s._skipRerenderItemsCount=0,s.content&&(s.content[0].scrollTop=0)),c=s._skipRerenderItemsCount>0,t=d?t-$(G(s.columns)).length:t,n>0)for(t=d?t-n:t,s.detailTemplate&&t++,s.groupFooterTemplate&&(s._groupAggregatesDefaultObject=s.dataSource.aggregates()),s.options.scrollable.endless&&(a=s.dataSource.flatView().length),i=0,o=e.length;i=b.length?b[k-b.length]:b[k],r=o.field,a=je(K(_.columns),function(e){return e.field==r})[0]||{},v=!(a.groupHeaderTemplate||!w(_.columns)[0].groupHeaderColumnTemplate)&&w(_.columns)[0],s=a.groupHeaderTemplate?a.groupHeaderTemplate:w(_.columns)[0].groupHeaderColumnTemplate,l=(a.title||r)+": "+ae(o.value,a.format,a.values,a.encoded),y=y,d=_._groupData(o,!1,v),m=u?_.lockedGroupHeaderColumnTemplate:_.groupHeaderColumnTemplate,s&&(l=typeof s===rn?s(d):Me.template(s)(d)),h=f.prev().length?f.prev():f.parent(),p=e(m?m(We({},d,{groupCells:g,colspan:y-g,text:l})):t(i,g,l)),h.is("tbody")?h.prepend(p):h.after(p),f.remove()})},_renderLockedContent:function(e,t,n){var i,o,r,a="",s=null,l={rowTemplate:this.lockedRowTemplate,altRowTemplate:this.lockedAltRowTemplate,groupFooterTemplate:this.lockedGroupFooterTemplate,groupHeaderColumnTemplate:this.lockedGroupHeaderColumnTemplate};if(this.lockedContent){if(r=this.lockedTable,s=this._skipRerenderItemsCount>0,n>0)for(t-=w(K(j(this.columns))).length,i=0,o=e.length;i=this.dataSource.pageSize())},_adjustRowsHeight:function(e,t){var n,i,o,r,a=e[0].rows,s=a.length,l=t[0].rows,d=e.add(t),c=d.length,u=[];for(n=0;no?r=i:itbody'),p=e("").css({position:"absolute",left:-1e4,top:-1e4}),f=l.wrapper.clone().css({height:"auto",width:"auto"}).appendTo(p);return f.find(".k-grid-content").css({height:"auto",width:"auto",overflow:"visible"}),f.find('table[role$="grid"], .k-grid-footer table').css({height:"auto",width:"100%",overflow:"visible"}),f.find(".k-grid-pager, .k-grid-toolbar, .k-grouping-header").remove(),f.find(".k-grid-header, .k-grid-footer, .k-auto-scrollable").css({paddingRight:0}),this._initPDFProgress(n),a=f.find('table[role$="grid"] > tbody').empty(),s=c.page(),u?(c.bind("change",r),c.page(1)):r(),d.promise()},jn.prototype._drawPDF=function(n){function i(){s&&d!==t?(a.unbind("change",o),a.one("change",function(){r.resolve(l)}),a.page(d)):r.resolve(l)}function o(){c._drawPDFShadow({width:c.wrapper.width()},{avoidLinks:c.options.pdf.avoidLinks}).done(function(e){var t=a.page(),o=s?a.totalPages():1,r={page:e,pageNumber:t,progress:t/o,totalPages:o};n.notify(r),l.append(r.page),t");i.prepend(this.wrapper.clone().css({position:"absolute",top:0,left:0})),this.wrapper.append(i),n=e("").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(){Me.destroy(i),i.remove()})}),Fe.plugin(jn),Fe.plugin(Wn)}(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",a="dataBinding",s=n.ui.Widget,l=n.keys,d=">*:not(.k-loading-mask)",c="progress",u="error",h="k-state-focused",p="k-state-selected",f="k-edit-item",g="edit",m="remove",v="save",_="mousedown",b="click",w="touchstart",k=".kendoListView",y=e.proxy,x=n._activeElement,C=n.ui.progress,S=n.data.DataSource,T=n.ui.DataBoundWidget.extend({init:function(t,i){var o=this;i=e.isArray(i)?{dataSource:i}:i,s.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._scrollable(),o.options.autoBind&&o.dataSource.fetch(),n.notify(o)},events:[i,o,a,r,g,m,v],options:{name:"ListView",autoBind:!0,selectable:!1,navigatable:!1,height:null,template:"",altTemplate:"",editTemplate:""},setOptions:function(e){s.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(c,e._progressHandler).unbind(u,e._errorHandler)},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._refreshHandler=y(e.refresh,e),e._progressHandler=y(e._progress,e),e._errorHandler=y(e._error,e)),e.dataSource=S.create(e.options.dataSource).bind(i,e._refreshHandler).bind(c,e._progressHandler).bind(u,e._errorHandler)},_progress:function(e){var t=this.element;C(t,e,{opacity:!0})},_error:function(){C(this.element,!1)},_element:function(){var e=this.options.height;this.element.addClass("k-widget k-listview").attr("role","listbox"),e&&this.element.css("height",e)},refresh:function(e){var i,o,s,l,d,c=this,u=c.dataSource.view(),h="",p=c.template,f=c.altTemplate,g=x(),m=c._endlessFetchInProgress,v=m?c._skipRerenderItemsCount:0,_=c.options.scrollable;if(e=e||{},"itemchange"===e.action)return c._hasBindingTarget()||c.editable||(i=e.items[0],s=c.items().filter("["+n.attr("uid")+"="+i.uid+"]"),s.length>0&&(l=s.index(),c.angular("cleanup",function(){return{elements:[s]}}),s.replaceWith(p(i)),s=c.items().eq(l),s.attr(n.attr("uid"),i.uid),c.angular("compile",function(){return{elements:[s],data:[{dataItem:i}]}}),c.trigger("itemChange",{item:s,data:i}))),t;if(!c.trigger(a,{action:e.action||"rebind",items:e.items,index:e.index})){for(c._angularItems("cleanup"),m||c._destroyEditable(),l=v,d=u.length;l=-15&&!t._endlessFetchInProgress&&t._endlessPageSized+c?e(n)[a+i](s+l-c):s.k-icon,textarea")||n.focusElement(o)};i&&(t._tabindex(),o.on("focus"+k,function(){var e=t._current;e&&e.is(":visible")||(e=t._item("first")),t.current(e)}).on("focusout"+k,function(){t._current&&t._current.removeClass(h)}).on("keydown"+k,function(i){var r,a,s=i.keyCode,d=t.current(),c=e(i.target),u=!c.is(":button,textarea,a,a>.t-icon,input"),h=c.is(":text,:password"),p=n.preventDefault,g=o.find("."+f),m=x(),v=t.options.scrollable;if(!(!u&&!h&&l.ESC!=s||h&&l.ESC!=s&&l.ENTER!=s))if(l.UP===s||l.LEFT===s)d&&d[0]&&(d=d.prev()),d&&d[0]?t.current(d):v||t.current(t._item("last")),p(i);else if(l.DOWN===s||l.RIGHT===s)v?"endless"!==t.options.scrollable||d.next().length?(d=d.next(),d&&d[0]&&t.current(d)):(t.element[0].scrollTop=t.element[0].scrollHeight,t._focusNext=!0):(d=d.next(),t.current(d&&d[0]?d:t._item("first"))),p(i);else if(l.PAGEUP===s)t.current(null),t.dataSource.page(t.dataSource.page()-1),p(i);else if(l.PAGEDOWN===s)t.current(null),t.dataSource.page(t.dataSource.page()+1),p(i);else if(l.HOME===s)t.current(t._item("first")),p(i);else if(l.END===s)t.current(t._item("last")),p(i);else if(l.ENTER===s)0!==g.length&&(u||h)?(r=t.items().index(g),m&&m.blur(),t.save(),a=function(){t.element.trigger("focus"),t.current(t.items().eq(r))},t.one("dataBound",a)):""!==t.options.editTemplate&&t.edit(d);else if(l.ESC===s){if(g=o.find("."+f),0===g.length)return;r=t.items().index(g),t.cancel(),t.element.trigger("focus"),t.current(t.items().eq(r))}}),o.on(_+k+" "+w+k,d,y(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,a=o.template;return r&&(r.element.index()%2&&(a=o.altTemplate),o.angular("cleanup",function(){return{elements:[r.element]}}),e=o._modelFromElement(r.element),o._destroyEditable(),i=r.element.index(),r.element.replaceWith(a(e)),t=o.items().eq(i),t.attr(n.attr("uid"),e.uid),t.attr("role","option"),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),a=r.uid;o.cancel(),e=o.items().filter("["+n.attr("uid")+"="+a+"]"),i=e.index(),e.replaceWith(o.editTemplate(r)),t=o.items().eq(i).addClass(f).attr(n.attr("uid"),r.uid),o.editable=t.kendoEditable({model:r,clearContainer:!1,errorTemplate:!1,target:o}).data("kendoEditable"),o.trigger(g,{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(m,{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=_+k,o=w+k,r=b+k;t.element.on(i+" "+o,".k-edit-button",function(i){i.preventDefault();var o=e(this).closest("["+n.attr("uid")+"]");setTimeout(function(){t.edit(o)})}),t.element.on(i+" "+o,".k-delete-button",function(i){i.preventDefault();var o=e(this).closest("["+n.attr("uid")+"]");setTimeout(function(){t.remove(o)})}),t.element.on(r,".k-update-button",function(e){t.save(),e.preventDefault()}),t.element.on(r,".k-cancel-button",function(e){t.cancel(),e.preventDefault()})},destroy:function(){var e=this;s.fn.destroy.call(e),e._unbindDataSource(),e._destroyEditable(),e.element.off(k),e._endlessFetchInProgress=e._endlessPageSize=e._skipRerenderItemsCount=e._focusNext=null,e.pager&&e.pager.destroy(),n.destroy(e.element)}});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.listbox.min",["kendo.draganddrop.min","kendo.data.min","kendo.selectable.min"],e)}(function(){return function(e,t){function n(t){var n=e.map(t,function(t){return e(t).index()});return n}function i(e){return t===e}function o(e){return e.clone().removeClass(he).removeClass(j).addClass(b.format("{0} {1} {2}",N,K,q)).width(e.width())}function r(){return e("").addClass(G)}function a(t){return e(t).is(":button,a,:input,a>.k-icon,textarea,span.k-select,span.k-icon,span.k-link,label.k-checkbox-label,.k-input,.k-multiselect-wrap,.k-picker-wrap,.k-picker-wrap>.k-selected-color,.k-tool-icon,.k-dropdown")}var s,l,d,c,u,h,p,f,g,m,v,_,b=window.kendo,w=b.attr,k=b.data,y=b.keys,x=b.template,C=b.ui.Widget,S=k.DataSource,T=b.ui.Selectable,D=b.ui.DataBoundWidget,A=b.Class,I=e.extend,E=e.noop,M=e.proxy,F="-",R=".",P=" ",z="#",B="kendoListBox",L=R+B,H="k-state-disabled",N="k-state-selected",O=".k-item:not(.k-state-disabled)",V=".k-list:not(.k-state-disabled) >"+O,W="k-listbox-toolbar",U="li > a.k-button:not(.k-state-disabled)",j="k-state-focused",q="k-drag-clue",G="k-drop-hint",$="k-reset k-list",Y=".k-reset.k-list",K="k-reset",Q="click"+L,X="keydown"+L,J="blur"+L,Z=b._outerWidth,ee=b._outerHeight,te="change",ne="dataBound",ie="add",oe="remove",re="reorder",ae="moveUp",se="moveDown",le="transferTo",de="transferFrom",ce="transferAllTo",ue="transferAllFrom",he="k-ghost",pe="uid",fe="tabindex",ge="command",me=-1,ve=1,_e="dragstart",be="drag",we="drop",ke="dragend",ye="ul.k-reset.k-list>li.k-item",xe="right",Ce="bottom",Se=[W+F+"left",W+F+xe,W+F+"top",W+F+Ce],Te=D.extend({init:function(e,t){var n=this;C.fn.init.call(n,e,t),n._wrapper(),n._list(),e=n.element.attr("multiple","multiple").hide(),e[0]&&!n.options.dataSource&&(n.options.dataTextField=n.options.dataTextField||"text",n.options.dataValueField=n.options.dataValueField||"value"),n._templates(),n._selectable(),n._dataSource(),n._createToolbar(),n._createDraggable(),n._createNavigatable()},destroy:function(){var e=this;D.fn.destroy.call(e),isNaN(e._listTabIndex)||(e._getList().off(),e._listTabIndex=null),e._unbindDataSource(),e._destroySelectable(),e._destroyToolbar(),e.wrapper.off(L),e._target&&(e._target=null),e._draggable&&(e._draggable.destroy(),e.placeholder=null),b.destroy(e.element)},setOptions:function(e){C.fn.setOptions.call(this,e),this._templates(),this._dataSource()},events:[te,ne,ie,oe,re,_e,be,we,ke],options:{name:"ListBox",autoBind:!0,template:"",dataTextField:"",dataValueField:"",selectable:"single",draggable:null,dropSources:[],connectWith:"",navigatable:!0,toolbar:{position:xe,tools:[]},messages:{tools:{remove:"Delete",moveUp:"Move Up",moveDown:"Move Down",transferTo:"Transfer To",transferFrom:"Transfer From",transferAllTo:"Transfer All To",transferAllFrom:"Transfer All From"}}},add:function(e){var t,n=this,i=e&&e.length?e:[e],o=i.length;for(n._unbindDataSource(),t=0;t0?e(t).insertAfter(o.children().eq(n-1)):e(o).prepend(t)},_createNavigatable:function(){var e=this,t=e.options;t.navigatable&&e._getList().on(Q,O,M(e._click,e)).on(X,M(e._keyDown,e)).on(J,M(e._blur,e))},_getTabIndex:function(){var e,t=this;return isNaN(t._listTabIndex)?(e=t.element.attr(fe),t._listTabIndex=isNaN(e)?0:e,t.element.removeAttr(fe),t._listTabIndex):t._listTabIndex},_blur:function(){this._target&&(this._target.removeClass(j),this._getList().removeAttr("aria-activedescendant")),this._target=null},_click:function(t){var n=this,i=e(t.currentTarget),o=n._target,r=a(t.target);o&&o.removeClass(j),n._target=i,i.addClass(j),n._getList().attr("aria-activedescendant",i.attr("id")),n._getList()[0]===b._activeElement()||r||n.focus()},_getNavigatableItem:function(e){var t,n=this;return t=n._target?n._target:n.items().filter(O).first(),e===y.UP&&n._target&&(t=n._target.prevAll(O).first()),e===y.DOWN&&n._target&&(t=n._target.nextAll(O).first()),t.length?t:null},_scrollIntoView:function(e){var t,n,i,o,r;e&&(e[0]&&(e=e[0]),t=this._getList().parent()[0],n=e.offsetTop,i=t.scrollTop,o=t.clientHeight,r=n+e.offsetHeight,i>n?i=n:r>i+o&&(i=r-o),t.scrollTop=i)},_keyDown:function(e){var n,i=this,o=e.keyCode,r=i._getNavigatableItem(o);if(i._target&&i._target.removeClass(j),(!e.shiftKey||e.ctrlKey||o!==y.DOWN&&o!==y.UP)&&(i._shiftSelecting=!1),o==y.DELETE)i._executeCommand(oe),i._target&&(i._target.removeClass(j),i._getList().removeAttr("aria-activedescendant"),i._target=null),n=!0;else if(o===y.DOWN||o===y.UP){if(!r)return e.preventDefault(),t;if(e.shiftKey&&!e.ctrlKey)i._shiftSelecting||(i.clearSelection(),i._shiftSelecting=!0),i._target&&r.hasClass("k-state-selected")?(i._target.removeClass(N),i.trigger(te)):i.select("single"==i.options.selectable?r:r.add(i._target));else{if(e.shiftKey&&e.ctrlKey)return i._executeCommand(o===y.DOWN?se:ae),i._scrollIntoView(i._target),e.preventDefault(),t;e.shiftKey||e.ctrlKey||("multiple"===i.options.selectable&&i.clearSelection(),i.select(r))}i._target=r,i._target?(i._target.addClass(j),i._scrollIntoView(i._target),i._getList().attr("aria-activedescendant",i._target.attr("id"))):i._getList().removeAttr("aria-activedescendant"),n=!0}else o==y.SPACEBAR?(e.ctrlKey&&i._target?i._target.hasClass(N)?(i._target.removeClass(N),i.trigger(te)):i.select(i._target):(i.clearSelection(),i.select(i._target)),n=!0):e.ctrlKey&&o==y.RIGHT?(i._executeCommand(e.shiftKey?ce:le),i._target=i.select().length?i.select():null,n=!0):e.ctrlKey&&o==y.LEFT&&(i._executeCommand(e.shiftKey?ue:de),n=!0);n&&e.preventDefault()},focus:function(){b.focusElement(this._getList())},_createDraggable:function(){var t,n=this,i=n.options.draggable;if(i){if(t=i.hint,!n.options.selectable)throw Error("Dragging requires selection to be enabled");t||(t=o),n._draggable=new b.ui.Draggable(n.wrapper,{filter:i.filter?i.filter:ye,hint:b.isFunction(t)?t:e(t),dragstart:M(n._dragstart,n),dragcancel:M(n._clear,n),drag:M(n._drag,n),dragend:M(n._dragend,n)})}},_dragstart:function(n){var i=this,o=i.draggedElement=n.currentTarget,a=i.options.draggable.placeholder,s=i.dataItem(o),l={dataItems:s,items:e(o),draggableEvent:n};return i.options.draggable.enabled===!1?(n.preventDefault(),t):(a||(a=r),i.placeholder=e(b.isFunction(a)?a.call(i,o):a),o.is(R+H)?n.preventDefault():i.trigger(_e,l)?n.preventDefault():(i.clearSelection(),i.select(o),o.addClass(he)),t)},_clear:function(){this.draggedElement.removeClass(he),this.placeholder.remove()},_findElementUnderCursor:function(t){var n=b.elementUnderCursor(t),i=t.sender;return(e.contains(i.hint[0],n)||i.hint[0]===n)&&(i.hint.hide(),n=b.elementUnderCursor(t),i.hint.show()),n},_findTarget:function(t){var n,i,o=this,r=o._findElementUnderCursor(t),a=e(r),s=o._getList();return e.contains(s[0],r)?(n=o.items(),r=a.is("li")?r:a.closest("li")[0],i=n.filter(r)[0]||n.has(r)[0],i?(i=e(i),i.hasClass(H)?null:{element:i,listBox:o}):null):s[0]==r||s.parent()[0]==r?{element:e(s),appendToBottom:!0,listBox:o}:o._searchConnectedListBox(a)},_getElementCenter:function(e){var t=e.length?b.getOffset(e):null;return t&&(t.top+=ee(e)/2,t.left+=Z(e)/2),t},_searchConnectedListBox:function(t){var n,i,o,r,a=t;return r=t.hasClass("k-list-scroller k-selectable")?t:t.closest(".k-list-scroller.k-selectable"),r.length?(n=r.parent().find("[data-role='listbox']").getKendoListBox(),n&&e.inArray(this.element[0].id,n.options.dropSources)!==-1?(i=n.items(),t=t.is("li")?t[0]:t.closest("li")[0],o=i.filter(t)[0]||i.has(t)[0],o?(o=e(o),o.hasClass(H)?null:{element:o,listBox:n}):!i.length||a.hasClass("k-list-scroller k-selectable")||a.hasClass("k-reset k-list")?{element:n._getList(),listBox:n,appendToBottom:!0}:null):null):null},_drag:function(n){var i,o,r,a=this,s=a.draggedElement,l=a._findTarget(n),d={left:n.x.location,top:n.y.location},c=a.dataItem(s),u={dataItems:[c],items:e(s),draggableEvent:n};if(a.trigger(be,u))return n.preventDefault(),t;if(l){if(i=this._getElementCenter(l.element),o={left:Math.round(d.left-i.left),top:Math.round(d.top-i.top)},l.appendToBottom)return a._movePlaceholder(l,null,s),t;o.top<0?r="prev":o.top>0&&(r="next"),r&&l.element[0]!=a.placeholder[0]&&a._movePlaceholder(l,r,s)}else a.placeholder.parent().length&&a.placeholder.remove()},_movePlaceholder:function(t,n,i){var o=this,a=o.placeholder,s=t.listBox.options.draggable;a.parent().length&&(o.placeholder.remove(),o.placeholder=e(s&&s.placeholder?b.isFunction(s.placeholder)?s.placeholder.call(o,i):s.placeholder:r.call(o,i))),n?"prev"===n?t.element.before(o.placeholder):"next"===n&&t.element.after(o.placeholder):t.element.append(o.placeholder)},_dragend:function(n){var i=this,o=i.draggedElement,r=i.items(),a=r.not(i.draggedElement).index(i.placeholder),s=r.not(i.placeholder).index(i.draggedElement),l=i.dataItem(o),d={dataItems:[l],items:e(o)},c=i.placeholder.closest(".k-widget.k-listbox").find("[data-role='listbox']").getKendoListBox();return i.trigger(we,I({},d,{draggableEvent:n}))?(n.preventDefault(),this._clear(),t):(a>=0?a===s||i.trigger(re,I({},d,{offset:a-s}))||(o.removeClass(he),i.reorder(o,a)):c&&(i.trigger(oe,d)||i.remove(e(o)),c.trigger(ie,d)||c._addItemAt(l,c.items().index(i.placeholder))),i._clear(),i._draggable.dropped=!0,i.trigger(ke,I({},d,{draggableEvent:n})),i._updateToolbar(),i._updateAllToolbars(),t)},reorder:function(t,n){var i=this,o=i.dataSource,r=i.dataItem(t),a=o.at(n),s=i.items()[n],l=e(t);r&&s&&a&&(i._removeElement(l),i._insertElementAt(l,n),i._updateToolbar())},remove:function(t){var n,i=this,o=i._getItems(t),r=o.length;for(i._unbindDataSource(),n=0;n').parent(),i[0].style.cssText=n[0].style.cssText,i[0].title=n[0].title,e('').insertBefore(n)),t.wrapper=i.addClass(n[0].className).css("display",""),t._innerWrapper=e(i[0].firstChild)},_list:function(){var t=this;e("").appendTo(t._innerWrapper),t.options.navigatable&&t._getList().attr(fe,t._getTabIndex())},_templates:function(){var e,t=this,n=this.options;e=n.template&&"string"==typeof n.template?b.template(n.template):n.template?n.template:b.template("${"+b.expr(n.dataTextField,"data")+"}",{useWithBlock:!1}),t.templates={itemTemplate:b.template("# var item = data.item, r = data.r; # #=r(item)#",{useWithBlock:!1}),itemContent:e,toolbar:""}},refresh:function(){var e,t=this,n=t.dataSource.view(),i=t.templates.itemTemplate,o="";for(e=0;e",n!==t&&(i+=b.htmlEncode(n)),i+=""},_setItemIds:function(){var e,t=this,n=t.items(),i=t.dataSource.view(),o=i.length;for(e=0;e0&&(t=e(n.templates.toolbar)[r](n._innerWrapper),n.toolbar=new _(t,I({},i,{listBox:n,messages:s})),n.wrapper.addClass(W+F+o))},_destroyToolbar:function(){var e=this;e.toolbar&&(e.toolbar.destroy(),e.toolbar=null)},_executeCommand:function(e){var t=this,n=s.current.create(e,{listBox:t});n&&(n.execute(),t._updateToolbar(),t._updateAllToolbars())},_updateToolbar:function(){var e=this.toolbar;e&&e._updateToolStates()},_updateAllToolbars:function(){var t,n,i=e("select[data-role='listbox']"),o=i.length;for(n=0;n0}}),s.current.register(oe,d),c=l.extend({execute:function(){var e=this;e.canExecute()&&e.moveItems()},canExecute:E,moveItems:function(){var t,i=this,o=i.listBox,r=i.options,a=i.getItems(),s=r.offset,l=n(a),d=e.makeArray(a.sort(i.itemComparer)),c=r.moveAction;if(!o.trigger(re,{dataItems:o._dataItems(d),items:e(d),offset:s}))for(;d.length>0&&l.length>0;)t=d[c](),o.reorder(t,l[c]()+s)},options:{offset:0,moveAction:"pop"},itemComparer:function(t,n){var i=e(t).index(),o=e(n).index();return i===o?0:i>o?1:-1}}),u=c.extend({options:{offset:me,moveAction:"shift"},canExecute:function(){var e=this.getItems(),t=n(e);return t.length>0&&t[0]>0}}),s.current.register(ae,u),h=c.extend({options:{offset:ve,moveAction:"pop"},canExecute:function(){var t=this,i=t.getItems(),o=n(i);return o.length>0&&e(o).last()[0]0&&(o.trigger(ie,{dataItems:i,items:n})||o.add(i),t.trigger(oe,{dataItems:i,items:n})||(t.remove(n),e.updateSelection(r)))},getUpdatedSelection:function(t){var n=this,i=n.options.filter,o=n.getSourceListBox(),r=o?o.items().filter(i).last():null,a=e(t).filter(r).length>0,s=a?e(t).prevAll(i)[0]:e(t).nextAll(i)[0];return 1===e(t).length&&s?s:null},updateSelection:function(t){var n=this.getSourceListBox();n&&t&&(e(n.select(e(t))),n._scrollIntoView(t))},getSourceListBox:E,getDestinationListBox:E}),f=p.extend({canExecute:function(){var e=this.getSourceListBox();return!!e&&e.select().length>0},getSourceListBox:function(){return this.listBox},getDestinationListBox:function(){var t=this.getSourceListBox();return t&&t.options.connectWith?e(z+t.options.connectWith).data(B):null},getItems:function(){var t=this.getSourceListBox();return t?e(t.select()):e()}}),s.current.register(le,f),g=p.extend({canExecute:function(){var e=this.getSourceListBox();return!!e&&e.select().length>0},getSourceListBox:function(){var t=this.getDestinationListBox();return t&&t.options.connectWith?e(z+t.options.connectWith).data(B):null},getDestinationListBox:function(){return this.listBox},getItems:function(){var t=this.getSourceListBox();return t?e(t.select()):e()}}),s.current.register(de,g),m=f.extend({canExecute:function(){var e=this.getSourceListBox();return!!e&&e.items().filter(O).length>0},getItems:function(){var t=this.getSourceListBox();return t?t.items():e()},getUpdatedSelection:E,updateSelection:E}),s.current.register(ce,m),v=g.extend({canExecute:function(){var e=this.getSourceListBox();return!!e&&e.items().filter(O).length>0},getItems:function(){var t=this.getSourceListBox();return t?t.items():e()},getUpdatedSelection:E,updateSelection:E}),s.current.register(ue,v),_=A.extend({init:function(t,n){var i=this;i.element=e(t).addClass(W),i.options=I({},i.options,n),i.listBox=i.options.listBox,i._initTemplates(),i._createTools(),i._updateToolStates(),i._attachEventHandlers()},destroy:function(){var e=this;e._detachEventHandlers(),b.destroy(e.element),e.element.remove(),e.element=null},options:{position:xe,tools:[]},_initTemplates:function(){this.templates={tool:x("")}},_createTools:function(){var t,n,i=this,o=i.options.tools,r=o.length,a=i.options.messages.tools,s=i._createToolList();for(n=0;n")},_attachEventHandlers:function(){var e=this;e.element.on(Q,U,M(e._onToolClick,e))},_detachEventHandlers:function(){this.element.off(L).find("*").off(L)},_onToolClick:function(t){t.preventDefault(),this._executeToolCommand(e(t.currentTarget).data(ge))},_executeToolCommand:function(e){var t=this,n=t.listBox;n&&n._executeCommand(e)},_updateToolStates:function(){var e,t=this,n=t.options.tools,i=n.length;for(e=0;e0&&n.indexOf(t.extension.toLowerCase())<0&&(t.validationErrors=t.validationErrors||[],e.inArray(j,t.validationErrors)===-1&&t.validationErrors.push(j))}function h(t,n,i){0!==n&&t.sizei&&(t.validationErrors=t.validationErrors||[],e.inArray(W,t.validationErrors)===-1&&t.validationErrors.push(W))}function p(e){var t,n=0;if("number"!=typeof e[0].size)return"";for(t=0;t1}function g(n,i,o,r){var a,s;return i._supportsRemove()?(a=n.data("fileNames"),s=e.map(a,function(e){return e.name}),r===!1?(i._removeFileEntry(n),t):(i._submitRemove(s,o,function(e,t,o){var r=i.trigger(F,{operation:"remove",files:a,response:e,XMLHttpRequest:o});r||i._removeFileEntry(n)},function(e){f(i)&&i._removeFileEntry(n),i.trigger(R,{operation:"remove",files:a,XMLHttpRequest:e}),D("Server response: "+e.responseText)}),t)):(!f(i)&&r||i._removeFileEntry(n),t)}function m(t,n,i){var o=!1,r="";
try{r=e.parseJSON(v(t)),o=!0}catch(a){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 k(t){return e(t.target).closest(".k-file")}var y,x,C=window.kendo,S=C.ui.Widget,T=C.antiForgeryTokens,D=C.logToConsole,A=/\.([^\.]+)$/,I=".kendoUpload",E="select",M="upload",F="success",R="error",P="complete",z="cancel",B="clear",L="pause",H="resume",N="progress",O="remove",V="validationErrors",W="invalidMaxFileSize",U="invalidMinFileSize",j="invalidFileExtension",q=1e3,G=2e3,$={loading:"k-i-loading",warning:"k-i-warning",success:"k-i-check"},Y=S.extend({init:function(t,n){var i,o,r,a=this;S.fn.init.call(a,t,n),a.name=t.name,a.multiple=a.options.multiple,a.directory=a.options.directory,a.localization=a.options.localization,i=a.element,a.wrapper=i.closest(".k-upload"),0===a.wrapper.length&&(a.wrapper=a._wrapInput(i)),a._activeInput(i),a.toggle(a.options.enabled),o=a._ns=I+"-"+C.guid(),i.closest("form").on("submit"+o,e.proxy(a._onParentFormSubmit,a)).on("reset"+o,e.proxy(a._onParentFormReset,a)),a.options.async.saveUrl?(a._module=a._supportsFormData()?new x(a):new y(a),a._async=!0,r=a.options.files,r.length>0&&a._renderInitialFiles(r)):a._module=new K(a),a._toggleDropZone(),a.wrapper.on("click",".k-upload-action",e.proxy(a._onFileAction,a)).on("click",".k-clear-selected",e.proxy(a._onClearSelected,a)).on("click",".k-upload-selected",e.proxy(a._onUploadSelected,a)),a.element.val()&&a._onInputChange({target:a.element})},events:[E,M,F,R,P,z,B,N,O,L,H],options:{name:"Upload",enabled:!0,multiple:!0,directory:!1,showFileList:!0,template:"",files:[],async:{autoRetryAfter:0,bufferChunkSize:1e7,maxAutoRetries:1,removeVerb:"POST",autoUpload:!0,withCredentials:!0,accept:"*/*; q=0.5, application/json",useArrayBuffer:!1},localization:{select:"Select files...",cancel:"Cancel",retry:"Retry",remove:"Remove",pause:"Pause",resume:"Resume",clearSelectedFiles:"Clear",uploadSelectedFiles:"Upload",dropFilesHere:"Drop files here to upload",invalidFiles:"Invalid file(s). Please check file upload requirements.",statusUploading:"uploading",statusUploaded:"uploaded",statusWarning:"warning",statusFailed:"failed",headerStatusUploading:"Uploading...",headerStatusPaused:"Paused",headerStatusUploaded:"Done",invalidMaxFileSize:"File size too large.",invalidMinFileSize:"File size too small.",invalidFileExtension:"File type not allowed."},validation:{allowedExtensions:[],maxFileSize:0,minFileSize:0},dropZone:""},setOptions:function(t){var n=this,i=n.element;e(n.options.dropZone).off(n._ns),S.fn.setOptions.call(n,t),n.multiple=n.options.multiple,n.directory=n.options.directory,i.attr("multiple",!!n._supportsMultiple()&&n.multiple),n.directory&&(i.attr("webkitdirectory",n.directory),i.attr("directory",n.directory)),n.toggle(n.options.enabled),n._toggleDropZone()},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(I),S.fn.destroy.call(t)},pause:function(t){this._module.onPause({target:e(t,this.wrapper)});var n=t.find(".k-i-pause-sm");n.removeClass("k-i-pause-sm").addClass("k-i-play-sm").attr("title",this.localization.resume),e(n).parent().attr("aria-label",this.localization.resume)},resume:function(t){this._module.onResume({target:e(t,this.wrapper)});var n=t.find(".k-i-play-sm");n.removeClass("k-i-play-sm").addClass("k-i-pause-sm").attr("title",this.localization.pause),e(n).parent().attr("aria-label",this.localization.pause)},upload:function(){var e=this;e._module.onSaveSelected()},getFiles:function(){var t,n,i,o=this,r=[],a=o.wrapper.find(".k-file");for(n=0;n0&&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,a){i=e(a).data("fileNames"),t(i)&&o._removeFileByDomElement(a,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("kendo"+n.options.prefix+n.options.name,n),e(n.element).hide().attr("tabindex","-1").removeAttr("id").off(I),n._activeInput(i),n.element.focus()}},_activeInput:function(t){var n=this,i=n.wrapper;n.element=t,n.directory&&(t.attr("webkitdirectory",n.directory),t.attr("directory",n.directory)),t.attr("multiple",!!n._supportsMultiple()&&n.multiple).attr("autocomplete","off").on("click"+I,function(e){i.hasClass("k-state-disabled")&&e.preventDefault()}).on("focus"+I,function(){e(this).parent().addClass("k-state-focused")}).on("blur"+I,function(){e(this).parent().removeClass("k-state-focused")}).on("change"+I,e.proxy(n._onInputChange,n)).on("keydown"+I,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.shiftKey&&(e.preventDefault(),n.focus())},_onInputChange:function(t){var n,i=this,o=e(t.target),r=l(i._inputFiles(o),i._isAsyncNonBatch());d(r,i.options.validation),n=i.trigger(E,{files:r}),n?(i._addInput(o),o.remove()):i._module.onSelect({target:o},r)},_readDirectory:function(t){var n=new e.Deferred,i=t.createReader(),o=[],r=function(){i.readEntries(function(e){e.length?(o=o.concat(e),r()):n.resolve(o)},n.reject)};return r(),n.promise()},_readFile:function(e){var t=this,n=e.fullPath;e.file(function(e){e.relativePath=n.slice(1),t.droppedFolderFiles.push(e),t.droppedFolderCounter--,0===t.droppedFolderCounter&&setTimeout(function(){0===t.droppedFolderCounter&&t.droppedFolderFiles.length&&(t._proceedDroppedItems(t.droppedFolderFiles),t.droppedFolderFiles=[])},0)},function(){D("File error.")})},_traverseFileTree:function(e,t){var n=this;t||n.droppedFolderCounter--,this._readDirectory(e).then(function(e){n.droppedFolderCounter+=e.length;for(var t=0;t0&&!i.wrapper.hasClass("k-state-disabled")&&(!i.multiple&&r.length>1&&r.splice(1,r.length-1),d(r,i.options.validation),n=i.trigger(E,{files:r}),n||i._module.onSelect({target:e(".k-dropzone",i.wrapper)},r))},_filesContainValidationErrors:function(t){var n=!1;return e(t).each(function(e,t){if(t[V]&&t[V].length>0)return n=!0,!1}),n},_isAsyncNonBatch:function(){return this._async&&!this.options.async.batch||!1},_renderInitialFiles:function(e){var t,n,i=this,o=0;for(e=l(e,!0),o=0;o0?""+i.name+""+n.localization[a[0]]+"":""+i.name+""+o+"",s+="****",e(s)},_prepareDefaultMultipleFileEntriesTemplate:function(t){var n,i,o=this,r=t.fileNames,a=o._filesContainValidationErrors(r),s=p(r),l="";for(l+=a?"":"",l+="",r.sort(function(e,t){return e[V]?-1:t[V]?1:0}),l+="",n=0;n0?""+i.name+"":""+i.name+"";return l+=a?""+o.localization.invalidFiles+"":"Total: "+r.length+" files, "+s+"",l+="****",e(l)},_enqueueFile:function(t,n){var i,o,r,a,s=this,l=n.fileNames[0].uid,d=e(".k-upload-files",s.wrapper),c=s.options,u=c.template;return 0===d.length&&(d=e("").appendTo(s.wrapper),s.options.showFileList||d.hide(),s.wrapper.removeClass("k-upload-empty")),i=e(".k-file",d),u?(r=s._prepareTemplateData(t,n),u=C.template(u),o=e(""+u(r)+""),o.find(".k-upload-action").addClass("k-button"),s.angular("compile",function(){return{elements:o,data:[r]}})):o=1===n.fileNames.length?s._prepareDefaultSingleFileEntryTemplate(n):s._prepareDefaultMultipleFileEntriesTemplate(n),o.attr(C.attr("uid"),l).appendTo(d).data(n),s._async||e(".k-progress",o).width("100%"),!s.multiple&&i.length>0&&(a={files:i.data("fileNames"),headers:{}},s.trigger(O,a)||s._module.onRemove({target:e(i,s.wrapper)},a)),o},_removeFileEntry:function(t){var n,i,o,r=this,a=t.closest(".k-upload-files");t.remove(),n=e(".k-file",a),i=e(".k-file-success, .k-file-error",a),o=e(".k-file-invalid",a),i.length!==n.length&&o.length!==n.length||this._hideUploadButton(),0===n.length?(a.remove(),r.wrapper.addClass("k-upload-empty"),r._hideHeaderUploadstatus()):r._updateHeaderUploadStatus()},_fileAction:function(e,t,n){var i,o={remove:"k-i-x",cancel:"k-i-cancel",retry:"k-i-retry",pause:"k-i-pause-sm"},r={remove:"k-i-close",cancel:"k-i-close",retry:"k-i-reload-sm",pause:"k-i-pause-sm"};o.hasOwnProperty(t)&&(n||this._clearFileAction(e),this.options.template?(i=e.find(".k-upload-action").first(),i.find(".k-icon").length?i.next(".k-upload-action").length&&i.next(".k-upload-action").addClass("k-button").append("").show():i.addClass("k-button").append("").show()):(n||e.find(".k-upload-status .k-upload-action").remove(),e.find(".k-upload-status").append(this._renderAction(o[t],this.localization[t],r[t]))))},_fileState:function(t,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("").on("focus",function(){e(this).addClass("k-state-focused")}).on("blur",function(){e(this).removeClass("k-state-focused")}):e(""+n+"")},_clearFileAction:function(t){e(".k-upload-action",t).empty().hide()},_onFileAction:function(t){var n,i,o,r,a,s,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"),a=l._filesContainValidationErrors(r),s={files:r,headers:{}},l._retryClicked=!1,i.hasClass("k-i-x")?l.trigger(O,s)||l._module.onRemove({target:e(o,l.wrapper)},s,!a):i.hasClass("k-i-cancel")?(l.trigger(z,s),l._module.onCancel({target:e(o,l.wrapper)}),l._checkAllComplete(),l._updateHeaderUploadStatus()):i.hasClass("k-i-pause-sm")?(l.trigger(L,s),l.pause(o),l._updateHeaderUploadStatus()):i.hasClass("k-i-play-sm")?(l.trigger(H,s),l.resume(o)):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)}),l._retryClicked=!0)),!1},_onUploadSelected:function(){var e=this,t=e.wrapper;return t.hasClass("k-state-disabled")||this._module.onSaveSelected(),!1},_onClearSelected:function(){var e=this,t=e.wrapper,n={};return t.hasClass("k-state-disabled")||e.trigger(B,n)||e.clearAllFiles(),!1},_onFileProgress:function(t,n){var i,o;n>100&&(n=100),this.options.template?e(".k-progress",t.target).width(n+"%"):(i=e(".k-upload-pct",t.target),o=e(".k-i-warning",t.target),o.length?o.removeClass("k-i-warning").removeClass("k-icon").addClass("k-upload-pct"):0===i.length&&e(".k-upload-status",t.target).prepend(""),100!==n?e(".k-upload-pct",t.target).text(n+"%"):e(".k-upload-pct",t.target).remove(),e(".k-progress",t.target).width(n+"%")),this.trigger(N,{files:k(t).data("fileNames"),percentComplete:n})},_onUploadSuccess:function(e,t,n){var i=this,o=k(e),r=i.trigger(F,{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,O):i._clearFileAction(o)),i._hideUploadProgress(o),i._checkAllComplete()},_onUploadError:function(e,t){var n=this,i=n._module,o=k(e),r=o.data("uid");n._setUploadErrorState(o),n.trigger(R,{operation:"upload",files:o.data("fileNames"),XMLHttpRequest:t}),D("Server response: "+t.responseText),n.options.async.chunkSize?i._decreasePosition&&i._decreasePosition(r):n._hideUploadProgress(o),n._checkAllComplete(),this.options.async.autoRetryAfter&&this._autoRetryAfter(o)},_autoRetryAfter:function(e){var t=this,n=this._module.retries;n&&(n[e.data("uid")]||(n[e.data("uid")]=1),n[e.data("uid")]<=this.options.async.maxAutoRetries&&(n[e.data("uid")]++,setTimeout(function(){t._module.performUpload(e)},this.options.async.autoRetryAfter)))},_setUploadErrorState:function(t){var n,i=this;i._fileState(t,"failed"),t.removeClass("k-file-progress").addClass("k-file-error"),i._updateUploadProgress(t),n=e(".k-upload-pct",t),n.length>0?(n.parent().find(".k-i-warning").length||n.removeClass("k-upload-pct").addClass("k-icon k-i-warning"),n.empty()):e(".k-upload-status",t).prepend(""),this._updateHeaderUploadStatus(),this._fileAction(t,"retry"),this._fileAction(t,O,!0),i._retryClicked&&t.find(".k-i-retry").parent().focus()},_updateUploadProgress:function(t){var n,i,o,r=this;r.options.async.chunkSize?(n=t.data("uid"),r._module.metaData&&(i=r._module.metaData[n],i&&(o=i.totalChunks?Math.round(i.chunkIndex/i.totalChunks*100):100,r._onFileProgress({target:e(t,r.wrapper)},o)))):e(".k-progress",t).width("100%")},_hideUploadProgress:function(t){e(".k-progress",t).delay(q).fadeOut(G,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='****',t?(r=e(r).append(i.headerStatusUploading),r.find(".k-icon").addClass($.loading)):(r=e(r).append(i.headerStatusUploaded),r.find(".k-icon").addClass($.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"),a=e(".k-file-invalid",i.wrapper),s=e(".k-file-error",i.wrapper),l=e(".k-file",i.wrapper).find(".k-i-play-sm");!l.length||l.length!==r.length&&i.options.async.concurrent?(0===r.length||a.length>0||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?$.warning:$.success),o.html(n).append(i.localization.headerStatusUploaded)):(n=e(".k-icon",o).removeClass().addClass("k-icon").addClass("k-i-pause-sm"),o.html(n).append(i.localization.headerStatusPaused))},_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=this,n=t._ns,i=e(".k-dropzone",t.wrapper).on("dragenter"+n,_).on("dragover"+n,function(e){e.preventDefault()}).on("drop"+n,e.proxy(t._onDrop,t));i.find(".k-dropzone-hint").length||i.append(e("*"+t.localization.dropFilesHere+"*")),b(i,n,function(){i.closest(".k-upload").hasClass("k-state-disabled")||i.addClass("k-dropzone-hovered")},function(){i.removeClass("k-dropzone-hovered")}),t._bindDocumentDragEventWrappers(i)},_setupCustomDropZone:function(){var t,n=this,i=e(n.options.dropZone);n.wrapper.find(".k-dropzone-hint").length||e(".k-dropzone",n.wrapper).append(e("*"+n.localization.dropFilesHere+"*")),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"),i.addClass("k-dropzone-hovered"),e(t.target).addClass("k-dropzone-hovered"))},function(){i.removeClass("k-dropzone-hovered"),i.find(".k-dropzone-hovered").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")})},_toggleDropZone:function(){var t=this,n=t.options.dropZone;t._supportsDrop()&&(e(n).off(t._ns),e(".k-dropzone",t.wrapper).off(t._ns),""!==n?t._setupCustomDropZone():t._setupDropZone())},_supportsRemove:function(){return!!this.options.async.removeUrl},_submitRemove:function(t,n,i,o){var r=this,a=r.options.async.removeField||"fileNames",s=e.extend(n.data,T());s[a]=t,jQuery.ajax({type:this.options.async.removeVerb,dataType:"json",dataFilter:v,url:this.options.async.removeUrl,traditional:!0,data:s,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(""),n.async.saveUrl?e.closest(".k-upload").addClass("k-upload-async"):e.closest(".k-upload").addClass("k-upload-sync"),e.closest(".k-upload").addClass("k-upload-empty"),e.closest(".k-button").append(""+this.localization.select+""),e.closest(".k-upload")},_checkAllComplete:function(){0===e(".k-file.k-file-progress",this.wrapper).length&&this.trigger(P)},_inputFiles:function(e){return i(e)}}),K=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")};K.prototype={onSelect:function(t,i){var o,r,a=this.upload,s=e(t.target),l=a._filesContainValidationErrors(i);a._addInput(s),o={fileNames:i},l?s.remove():o.relatedInput=s,r=a._enqueueFile(n(s),o),l&&a._hideUploadProgress(r),a._fileAction(r,O)},onRemove:function(e){var t=k(e),n=t.data("relatedInput");n&&n.remove(),this.upload._removeFileEntry(t)}},y=function(e){this.name="iframeUploadModule",this.element=e.wrapper,this.upload=e,this.iframes=[]},Y._frameId=0,y.prototype={onSelect:function(t,n){var i=this.upload,o=e(t.target),r=i._filesContainValidationErrors(n),a=this.prepareUpload(o,n,r);i.options.async.autoUpload?r?(i._fileAction(a,O),i._showHeaderUploadStatus(!1)):this.performUpload(a):(i._fileAction(a,O),r?i._updateHeaderUploadStatus():i._showUploadButton()),r&&i._hideUploadProgress(a)},prepareUpload:function(t,i,o){var r,a,s,l,d=this.upload,c=e(d.element),u=d.options.async.saveField||t.attr("name");return d._addInput(t),t.attr("name",u),o?(t.remove(),a={fileNames:i}):(s=this.createFrame(d.name+"_"+Y._frameId++),this.registerFrame(s),l=this.createForm(d.options.async.saveUrl,s.attr("name")).append(c),a={frame:s,relatedInput:c,fileNames:i}),r=d._enqueueFile(n(t),a),s&&s.data({form:l,file:r}),r},performUpload:function(t){var n,i,o,r={files:t.data("fileNames")},a=t.data("frame"),s=this.upload;if(s.trigger(M,r))s._removeFileEntry(a.data("file")),this.cleanupFrame(a),this.unregisterFrame(a);else{s._hideUploadButton(),s._showHeaderUploadStatus(!0),a.appendTo(document.body),n=a.data("form").attr("action",s.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("",{type:"hidden",name:i}).prependTo(n)),o.val(r.data[i]);s._fileAction(t,z),s._fileState(t,"uploading"),e(t).removeClass("k-file-error").addClass("k-file-progress"),a.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};m(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=k(e);this.performUpload(t)},onRemove:function(e,t,n){var i=this,o=i.upload,r=k(e),a=r.data("frame");a?(i.unregisterFrame(a),o._removeFileEntry(r),i.cleanupFrame(a)):r.hasClass("k-file-success")?g(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("")},createForm:function(t,n){return e("")},stopFrameSubmit:function(e){t!==e.stop?e.stop():e.document&&e.document.execCommand("Stop")},registerFrame:function(e){this.iframes.push(e)},unregisterFrame:function(t){this.iframes=e.grep(this.iframes,function(e){return e.attr("name")!=t.attr("name")})},cleanupFrame:function(e){var t=e.data("form");e.data("file").data("frame",null),setTimeout(function(){t.remove(),e.remove()},1)}},x=function(e){this.name="formDataUploadModule",this.element=e.wrapper,this.upload=e,this.position={},this.metaData={},this.cancelled={},this.resume={},this.paused={},this.retries={}},x.prototype={onSelect:function(t,n){var i,o,r=this.upload,a=this,s=e(t.target),l=this.prepareUpload(s,n);e.each(l,function(t){i=r._filesContainValidationErrors(e(this.data("fileNames"))),r.options.async.autoUpload?i?(r._fileAction(this,O),r._showHeaderUploadStatus(!1)):r.options.async.chunkSize?(a.prepareChunk(this),o=this.prev(),(r.options.async.concurrent||0===t&&!o.length||0===t&&o.hasClass("k-file-success"))&&a.performUpload(this)):a.performUpload(this):(r._fileAction(this,O),i?r._updateHeaderUploadStatus():(r._showUploadButton(),this.addClass("k-toupload"))),i&&r._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,a=this.upload,s=t.length,l=[];if(a.options.async.batch===!0)n=e.map(t,function(e){return e.name}).join(", "),(a.directory||a.options.directoryDrop)&&e(t).each(function(){(this.rawFile.webkitRelativePath||this.rawFile.relativePath)&&(this.name=this.rawFile.webkitRelativePath||this.rawFile.relativePath)}),r=a._enqueueFile(n,{fileNames:t}),r.data("files",t),l.push(r);else for(i=0;il.size?(a.postFormData(s.options.async.saveUrl,a.fileArrayBuffer,o,r),a.fileArrayBuffer=null):a._readFile(n,i,o,r)},d.onerror=function(){s._onUploadError({target:e(o,s.wrapper)},r)},d.readAsArrayBuffer(a._getCurrentChunk(l.rawFile,l.uid))},_appendBuffer:function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer},onSaveSelected:function(){var t=this,n=t.upload;e(".k-toupload",this.element).filter(function(){var t=e(this),i=w(t),o=n._filesContainValidationErrors(t.data("fileNames"));return!i&&!o}).each(function(i){var o=e(this),r=o.prev();o.removeClass("k-toupload"),n.options.async.chunkSize?(t.prepareChunk(o),(n.options.async.concurrent||0===i&&!r.length||0===i&&r.hasClass("k-file-success")||r.hasClass("k-file-error"))&&t.performUpload(o)):t.performUpload(o)})},onCancel:function(e){var t=k(e);this.upload.options.async.chunkSize&&(this.cancelled[t.data("uid")]=!0),this.stopUploadRequest(t),this.removeFileEntry(t)},onPause:function(e){var t=k(e),n=t.data("uid"),i=this.upload.options.async;i.chunkSize&&(this.retries[n]=i.maxAutoRetries+1,this.paused[n]=!0,this.resume[n]=!1)},onResume:function(e){var t=k(e),n=t.data("uid");this.upload.options.async.chunkSize&&(delete this.paused[n],this.resume[n]=!0,this.retries[t.data("uid")]=1,this._increaseChunkIndex(n),this.performUpload(t))},onRetry:function(e){var t=k(e),n=this.upload.options.async;n.chunkSize&&(this.retries[t.data("uid")]=n.maxAutoRetries+1,delete this.paused[t.data("uid")]),this.performUpload(t)},onRemove:function(e,t,n){var i=this,o=i.upload,r=k(e),a=this.upload.options.async;a.chunkSize&&(this.retries[r.data("uid")]=a.maxAutoRetries+1),r.hasClass("k-file-success")?g(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(R,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,o,r,a=t.length,s=this.upload;if(s.options.async.chunkSize)o=t[0].uid,n=this._getCurrentChunk(t[0].rawFile,o),e.append(s.options.async.saveField||s.name,n),r=JSON.stringify(this.metaData[o]),e.append("metadata",r);else for(i=0;i=200&&r.status<=299?m(r.responseText,o,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){var t=this.upload.options.async.chunkSize,n=this.upload.options.async.concurrent,i=this.upload.wrapper.find(".k-upload-selected").length>0;this.cleanupFileEntry(e),!t||n||i||e.next().length&&this.performUpload(e.next()),this.upload._removeFileEntry(e)},onRequestProgress:function(t,n){var i,o=Math.round(100*t.loaded/t.total),r=n.data("uid");this.upload.options.async.chunkSize&&(i=this.metaData[r],o=i&&i.totalChunks?Math.round(i.chunkIndex/i.totalChunks*100):100),this.upload._onFileProgress({target:e(n,this.upload.wrapper)},o)},stopUploadRequest:function(e){e.data("request").abort()},prepareChunk:function(e){var t=e.data("files")[0],n=t.rawFile,i=t.uid,o=this.upload.options.async.chunkSize;this.position[i]=0,this.metaData[i]={chunkIndex:0,contentType:n.type,fileName:n.name,relativePath:t.name,totalFileSize:n.size,totalChunks:Math.ceil(n.size/o),uploadUid:i}},_decreaseChunkIndex:function(e){this.metaData[e].chunkIndex--},_increaseChunkIndex:function(e){this.metaData[e].chunkIndex++},_resetChunkIndex:function(e){this.metaData[e].chunkIndex=0},_decreasePosition:function(e){this.position[e]-=this.upload.options.async.chunkSize},_getCurrentChunk:function(e,t){var n,i=this.position[t],o=this.upload.options.async,r=o.chunkSize||o.bufferChunkSize;return this.position[t]||(this.position[t]=0),this.position[t]+=r,(n=this._getChunker(e))?e[n](i,this.position[t]):e},_getChunker:function(e){return e.slice?"slice":e.mozSlice?"mozSlice":e.webkitSlice?"webkitSlice":null}},C.ui.plugin(Y)}(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","kendo.breadcrumb.min"],e)}(function(){return function(e,t){function n(e,t,n){var i,o;e.on("dragenter"+y,function(){t(),o=new Date,i||(i=setInterval(function(){var e=new Date-o;e>100&&(n(),clearInterval(i),i=null)},100))}).on("dragover"+y,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 u(n)?n.from||n.field||t:n}var a,s,l,d=window.kendo,c=d.ui.Widget,u=e.isPlainObject,h=e.proxy,p=e.extend,f=d.support.placeholder,g=d.support.browser,m=d.isFunction,v=/(^\/|\/$)/g,_="change",b="apply",w="error",k="click",y=".kendoFileBrowser",x=".kendoSearchBox",C="name",S="size",T="type",D={field:T,dir:"asc"},A=d.template('**${text}**'),I='# if (showUpload) { # #=messages.uploadFile## } ## if (showCreate) { ## } ## if (showDelete) { # # } ##=messages.orderBy#:';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()}),m(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"}}})}}),a=g.msie&&g.version<8?function(e){return e.offsetTop}:function(t){return t.offsetTop-e(t).height()},s=c.extend({init:function(e,t){var n=this;t=t||{},c.fn.init.call(n,e,t),n.element.addClass("k-filebrowser"),n.element.on(k+y,".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-close)",h(n._deleteClick,n)).on(k+y,".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-folder-add)",h(n._addClick,n)).on("keydown"+y,"li.k-state-selected input",h(n._directoryKeyDown,n)).on("blur"+y,"li.k-state-selected input",h(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:[w,_,b],destroy:function(){var e=this;c.fn.destroy.call(e),e.dataSource.unbind(w,e._errorHandler),e.element.add(e.list).add(e.toolbar).off(y),d.destroy(e.element)},value:function(){var e,t=this,n=t._selectedItem(),o=t.options.transport.fileUrl;if(n&&"f"===n.get(T))return e=i(t.path(),n.get(C)).replace(v,""),o&&(e=m(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(I),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:h(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=h(t._positionDropzone,t))},_dropEnter:function(){this._positionDropzone(),e(document).on("scroll"+y,this._scrollHandler)},_dropLeave:function(){this._removeDropzone(),e(document).off("scroll"+y,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"),a=e.files[0].name,s=e.files[0].size,l=C,c=S;r.test(a)?(e.data={path:n.path()},t=n._createFile(a,s),t?n.upload.one("success",function(e){var i=n._insertFileToList(t);i._override&&(i.set(l,e.response[n._getFieldName(l)]),i.set(c,e.response[n._getFieldName(c)]),n.listView.dataSource.pushUpdate(i)),n._tiles=n.listView.items().filter("["+d.attr("type")+"=f]")}):e.preventDefault()):(e.preventDefault(),n._showMessage(d.format(i.messages.invalidFileType,a,o)))},_findFile:function(e){var t,n,i,o=this.dataSource.data(),r=T,a=C;for(e=e.toLowerCase(),t=0,i=o.length;t-1&&a.push(r[n].get(l));if(e.inArray(o,a)>-1){n=2;do t=o+" ("+n+")",n++;while(e.inArray(t,a)>-1);o=t}return o},orderBy:function(e){this.dataSource.sort([{field:T,dir:"asc"},{field:e,dir:"asc"}])},search:function(e){this.dataSource.filter({field:C,operator:"contains",value:e})},_content:function(){var t=this;t.list=e('').appendTo(t.element).on("dblclick"+y,"li",h(t._dblClick,t)),t.listView=new d.ui.ListView(t.list,{dataSource:t.dataSource,template:t._itemTmpl(),editTemplate:t._editTmpl(),selectable:!0,autoBind:!1,dataBinding:function(e){t.toolbar.find(".k-i-close").parent().addClass("k-state-disabled"),"remove"!==e.action&&"sync"!==e.action||(e.preventDefault(),d.ui.progress(t.listView.element,!1))},dataBound:function(){t.dataSource.view().length?t._tiles=this.items().filter("["+d.attr("type")+"=f]"):this.wrapper.append(A({text:t.options.messages.emptyFolder}))},change:h(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(C))),o.breadcrumbs.value("/"+o.path()))):r.filter("["+d.attr("type")+"=f]").length&&o.trigger(b)},_listViewChange:function(){var e=this._selectedItem();e&&(this.toolbar.find(".k-i-close").parent().removeClass("k-state-disabled"),this.trigger(_,{selected:e}))},_dataSource:function(){var e,t=this,n=t.options,i=n.transport,o=p({},D),r={field:C,dir:"asc"},a={type:i.type||"filebrowser",sort:[o,r]};u(i)&&(i.path=h(t.path,t),a.transport=i),u(n.schema)?a.schema=n.schema:i.type&&u(d.data.schemas[i.type])&&(e=d.data.schemas[i.type]),t.dataSource&&t._errorHandler?t.dataSource.unbind(w,t._errorHandler):t._errorHandler=h(t._error,t),t.dataSource=d.data.DataSource.create(a).bind(w,t._errorHandler)},_navigation:function(){var t=this,n=e('').appendTo(this.element);t.breadcrumbs=n.find("nav:first").kendoBreadcrumb({editable:!0,gap:50,value:t.options.path||"/",change:function(){t.path(this.value())}}).data("kendoBreadcrumb"),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(w,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='',e+="#if("+T+' == "d") { #',e+='',e+="#}else{#",e+='',e+="#}#",e+="#if("+T+' == "d") { #',e+='',e+="#}#",e+="",h(d.template(e),{sizeFormatter:o})},_itemTmpl:function(){var e='',e+="#if("+T+' == "d") { #',e+='',e+="#}else{#",e+='',e+="#}#",e+="**${"+C+"}**",e+="#if("+T+' == "f") { # ${this.sizeFormatter('+S+")} #}#",e+="",h(d.template(e),{sizeFormatter:o})},path:function(e){var n=this,i=n._path||"";return e!==t?(n._path=e.replace(v,"")+"/",n.dataSource.read({path:n._path}),t):(i&&(i=i.replace(v,"")),"/"===i||""===i?"":i+"/")}}),l=c.extend({init:function(e,t){var n=this;t=t||{},c.fn.init.call(n,e,t),f&&n.element.attr("placeholder",n.options.label),n._wrapper(),n.element.on("keydown"+x,h(n._keydown,n)).on("change"+x,h(n._updateValue,n)),n.wrapper.on(k+x,"a",h(n._click,n)),f||n.element.on("focus"+x,h(n._focus,n)).on("blur"+x,h(n._blur,n))},options:{name:"SearchBox",label:"Search",value:""},events:[_],destroy:function(){var e=this;e.wrapper.add(e.element).add(e.label).off(x),c.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(_))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){f||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('')).parent(),f||e(''+this.options.label+"").insertBefore(t),e('').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}}),d.ui.plugin(s),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,a=window.kendo,s=a.ui.FileBrowser,l=e.isPlainObject,d=e.proxy,c=e.extend,u=a.support.browser,h=a.isFunction,p=/(^\/|\/$)/g,f="error",g=".kendoImageBrowser",m="name",v="size",_="type",b={field:_,dir:"asc"},w=a.template('**${text}**');c(!0,a.data,{schemas:{imagebrowser:{data:function(e){return e.items||e||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),c(!0,a.data,{transports:{imagebrowser:a.data.RemoteTransport.extend({init:function(t){a.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):a.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=s.extend({init:function(e,t){var n=this;t=t||{},s.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(m)).replace(p,""),o&&(e=h(o)?o(e):a.format(o,encodeURIComponent(e))),e},_fileUpload:function(e){var n,i=this,o=i.options,r=o.fileTypes,s=RegExp(("("+r.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),l=e.files[0].name,d=e.files[0].size,c=m,u=v;s.test(l)?(e.data={path:i.path()},n=i._createFile(l,d),n?(n._uploading=!0,i.upload.one("error",function(){n=t}),i.upload.one("success",function(e){if(n){delete n._uploading;var t=i._insertFileToList(n);t._override&&(t.set(c,e.response[i._getFieldName(c)]),t.set(u,e.response[i._getFieldName(u)]),i.listView.dataSource.pushUpdate(t)),i._tiles=i.listView.items().filter("["+a.attr("type")+"=f]"),i._scroll()}})):e.preventDefault()):(e.preventDefault(),i._showMessage(a.format(o.messages.invalidFileType,l,r)))},_content:function(){var t=this;t.list=e('').appendTo(t.element).on("scroll"+g,d(t._scroll,t)).on("dblclick"+g,"li",d(t._dblClick,t)),t.listView=new a.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(),a.ui.progress(t.listView.element,!1))},dataBound:function(){t.dataSource.view().length?(t._tiles=this.items().filter("["+a.attr("type")+"=f]"),t._scroll()):this.wrapper.append(w({text:t.options.messages.emptyFolder}))},change:d(t._listViewChange,t)})},_dataSource:function(){var e,t=this,n=t.options,i=n.transport,o=c({},b),r={field:m,dir:"asc"},s={type:i.type||"imagebrowser",sort:[o,r]};l(i)&&(i.path=d(t.path,t),s.transport=i),l(n.schema)?s.schema=n.schema:i.type&&l(a.data.schemas[i.type])&&(e=a.data.schemas[i.type]),t.dataSource&&t._errorHandler?t.dataSource.unbind(f,t._errorHandler):t._errorHandler=d(t._error,t),t.dataSource=a.data.DataSource.create(s).bind(f,t._errorHandler)},_loadImage:function(t){var n=this,i=e(t),o=n.dataSource.getByUid(i.attr(a.attr("uid"))),r=o.get(m),s=n.options.transport.thumbnailUrl,l=e("",{alt:r}),d="?";o._uploading||(l.hide().on("load"+g,function(){e(this).prev().remove().end().addClass("k-image").fadeIn()}),i.find(".k-i-loading").after(l),h(s)?s=s(n.path(),encodeURIComponent(r)):(s.indexOf("?")>=0&&(d="&"),s=s+d+"path="+encodeURIComponent(n.path()+r),o._override&&(s+="&_="+(new Date).getTime(),delete o._override)),l.attr("src",s),t.loaded=!0)},_scroll:function(){var e=this;e.options.transport&&e.options.transport.thumbnailUrl&&(clearTimeout(e._timeout),e._timeout=setTimeout(function(){var t=a._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=n&&ri)return!1}),e._tiles=e._tiles.filter(function(){return!this.loaded})},250))},_itemTmpl:function(){var e=this,t='',t+="#if("+_+' == "d") { #',t+='',t+="#}else{#",t+=e.options.transport&&e.options.transport.thumbnailUrl?'':'',t+="#}#",t+="**${"+m+"}**",t+="#if("+_+' == "f") { # ${this.sizeFormatter('+v+")} #}#",t+="",d(a.template(t),{sizeFormatter:i})}}),a.ui.plugin(r)}(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,a=window.kendo,s=a.Class,l=a.ui.Widget,d=a.support.mobileOS,c=a.support.browser,u=e.extend,h=e.proxy,p=a.deepExtend,f=a.keys,g="select",m="select.k-select-overlay",v="k-placeholder",_="placeholder",b=200,w="en",k=s.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return a.template(e.template,{useWithBlock:!1})(e)}}),y={editorWrapperTemplate:'',buttonTemplate:'# var iconCssClass= "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));#',tableWizardButtonTemplate:'# var iconCssClass= "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));##= data.title #',colorPickerTemplate:'',comboBoxTemplate:'',dropDownListTemplate:'',separatorTemplate:'',overflowAnchorTemplate:'',formatByName:function(t,n){for(var i=0;i=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",mergeCellsHorizontally:"cells-merge-horizontally",mergeCellsVertically:"cells-merge-vertically",splitCellHorizontally:"cell-split-horizontally",splitCellVertically:"cell-split-vertically",tableWizard:"table-properties",tableWizardInsert:"table-wizard",cleanFormatting:"clear-css",copyFormat:"copy-format",applyFormat:"apply-format"},n=t[e];return n?n:e},registerTool:function(e,t){var n=t.options;n&&n.template&&(n.template.options.cssClass="k-"+y.getToolCssClass(e)),t.name||(t.options.name=e,t.name=e.toLowerCase()),T.defaultTools[e]=t},registerFormat:function(e,t){T.fn.options.formats[e]=t},cacheComments:function(e,t){for(var n in t)e=e.replace(t[n],"{"+n+"}");return e},retrieveComments:function(e,t){for(var n in t)e=e.replace("{"+n+"}",t[n]);return e}},x={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",superscript:"Superscript",subscript:"Subscript",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertFile:"Insert file",insertHtml:"Insert HTML",viewHtml:"View HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",formatting:"Format",foreColor:"Color",backColor:"Background color",style:"Styles",emptyFolder:"Empty Folder",editAreaTitle:"Editable area. Press F10 for toolbar.",uploadFile:"Upload",overflowAnchor:"More tools",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found.",imageWebAddress:"Web address",imageAltText:"Alternate text",imageWidth:"Width (px)",imageHeight:"Height (px)",fileWebAddress:"Web address",fileTitle:"Title",fileText:"Text",linkWebAddress:"Web address",linkText:"Text",linkToolTip:"ToolTip",linkOpenInNewWindow:"Open link in new window",dialogUpdate:"Update",dialogInsert:"Insert",dialogOk:"Ok",dialogCancel:"Cancel",cleanFormatting:"Clean formatting",createTable:"Create a table",createTableHint:"Create a {0} x {1} table",addColumnLeft:"Add column on the left",addColumnRight:"Add column on the right",addRowAbove:"Add row above",addRowBelow:"Add row below",deleteRow:"Delete row",deleteColumn:"Delete column",mergeCellsHorizontally:"Merge cells horizontally",mergeCellsVertically:"Merge cells vertically",splitCellHorizontally:"Split cells horizontally",splitCellVertically:"Split cells vertically",tableWizard:"Table Wizard",tableTab:"Table",cellTab:"Cell",accessibilityTab:"Accessibility",caption:"Caption",summary:"Summary",width:"Width",height:"Height",units:"Units",cellSpacing:"Cell Spacing",cellPadding:"Cell Padding",cellMargin:"Cell Margin",alignment:"Alignment",background:"Background",cssClass:"CSS Class",id:"ID",border:"Border",borderStyle:"Border Style",collapseBorders:"Collapse borders",wrapText:"Wrap text",associateCellsWithHeaders:"Associate 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",print:"Print",headerRows:"Header Rows",headerColumns:"Header Cols",tableSummaryPlaceholder:"Summary attribute is not HTML5 compatible.",associateNone:"None",associateScope:"Associate using 'scope' attribute",associateIds:"Associate using Ids",copyFormat:"Copy format",applyFormat:"Apply format"},C=!d||d.ios&&d.flatVersion>=500||!d.ios&&t!==document.documentElement.contentEditable,S={basic:["bold","italic","underline"],alignment:["justifyLeft","justifyCenter","justifyRight"],lists:["insertUnorderedList","insertOrderedList"],indenting:["indent","outdent"],formatPainter:["copyFormat","applyFormat"],links:["createLink","unlink"],tables:["tableWizard","createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn","mergeCellsHorizontally","mergeCellsVertically","splitCellHorizontally","splitCellVertically"]},T=l.extend({init:function(n,i){var o,r,s,d,c,f,g=this,m=a.ui.editor,v=m.Dom;C&&(l.fn.init.call(g,n,i),g.options=p({},g.options,i),g.options.tools=g.options.tools.slice(),n=g.element,f=n[0],d=v.name(f),this._registerHandler(n.closest("form"),"submit",h(g.update,g,t)),s=u({},g.options),s.editor=g,"textarea"==d?(g._wrapTextarea(),r=g.wrapper.find(".k-editor-toolbar"),f.id&&r.attr("aria-controls",f.id)):(g.element.attr("contenteditable",!0).addClass("k-widget k-editor k-editor-inline"),s.popup=!0,r=e('').insertBefore(n)),g.toolbar=new m.Toolbar(r[0],s),g.toolbar.bindTo(g),"textarea"==d&&setTimeout(function(){var e=g.wrapper[0].style.height,t=parseInt(e,10),n=g.wrapper.height();e.indexOf("px")>0&&!isNaN(t)&&n>t&&g.wrapper.height(t-(n-t))}),g._resizable(),g._initializeContentElement(g),g.keyboard=new m.Keyboard([new m.BackspaceHandler(g),new m.TypingHandler(g),new m.SystemHandler(g),new m.SelectAllHandler(g)]),g.clipboard=new m.Clipboard(this),g.undoRedoStack=new a.util.UndoRedoStack,i&&i.value?o=i.value:g.textarea?(o=f.value,g.options.encoded&&e.trim(f.defaultValue).length&&(o=f.defaultValue),c=v.getAllComments(e("").html(o)[0]),o=y.cacheComments(o,c),o=o.replace(/[\r\n\v\f\t ]+/gi," "),o=y.retrieveComments(o,c)):o=f.innerHTML,g.value(o||"\ufeff"),this._registerHandler(document,{mousedown:function(){g._endTyping()},mouseup:function(e){g._mouseup(e)}}),g._initializeImmutables(),g.toolbar.resize(),a.notify(g))},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),e.tools&&t.toolbar.bindTo(t),this._initializePlaceholder()},_togglePlaceholder:function(t){var n=this,i=n.body,o=e(i),r=n.options.placeholder;n.textarea&&r&&(o.attr("aria-label",function(){return t?r:""}),o.toggleClass(v,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,o=this.options.resizable,r=e.isPlainObject(o)?o.content===t||o.content===!0:o;r&&this.textarea&&(n=e("").insertAfter(this.textarea),
this.wrapper.addClass("k-resizable"),this.wrapper.kendoResizable(u({},this.options.resizable,{draggableElement:n,start:function(t){var n=this.editor=e(t.currentTarget).closest(".k-editor");this.initialSize=n.height(),n.find("td:last").append("")},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&&(i=this.wrapper.getKendoResizable(),i.draggable.options.ignore=m))},_initializeTableResizing:function(){var e=this;a.ui.editor.TableResizing.create(e),e._showTableResizeHandlesProxy=h(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=y.editorWrapperTemplate,a=e(r).insertBefore(n).width(i).height(o),s=a.find(".k-editable-area");n.attr("autocomplete","off").appendTo(s).addClass("k-content k-raw-content").css("display","none"),t.textarea=n,t.wrapper=a},_createContentElement:function(t){var n,i,o,r=this,s=r.textarea,l=r.options.domain,c=l||document.domain,u="",h='javascript:""',p="";return s.hide(),n=e("",{title:r.options.messages.editAreaTitle,frameBorder:"0"})[0],e(n).css("display","").addClass("k-content").attr("tabindex",s[0].tabIndex).insertBefore(s),(l||c!=location.hostname)&&(u='1&&(e(l.document).find("body:last").remove(),window.clearInterval(s))},10)),l.body=n.body,i=l.window,o=n,this._registerHandler(n,"mouseup",h(this._mouseup,this))):(l.window=window,n=l.document=document,l.body=l.element[0],i=l.body,o=l.body,l.toolbar.decorateFrom(l.body)),this._registerHandler(i,"blur",h(this._blur,this)),l._registerHandler(o,"down",h(l._mousedown,l));try{n.execCommand("enableInlineTableEditing",null,!1)}catch(d){}a.support.touch&&this._registerHandler(n,{keydown:function(){a._activeElement()!=n.body&&l.window.focus()}}),this._initializePlaceholder(),this._spellCorrect(l),this._registerHandler(l.body,{keydown:function(e){var n,i,o,r,a,s,d,c,u,p;return(e.keyCode!==f.BACKSPACE&&e.keyCode!==f.DELETE||"true"===l.body.getAttribute("contenteditable"))&&(e.keyCode===f.F10?(setTimeout(h(l.toolbar.focus,l.toolbar),100),l.toolbar.preventPopupHide=!0,e.preventDefault(),t):(e.keyCode!=f.LEFT&&e.keyCode!=f.RIGHT||(n=l.getRange(),i=e.keyCode==f.LEFT,o=n[i?"startContainer":"endContainer"],r=n[i?"startOffset":"endOffset"],a=i?-1:1,s=r+a,d=i?s:r,3==o.nodeType&&"\ufeff"==o.nodeValue[d]&&(n.setStart(o,s),n.collapse(!0),l.selectRange(n))),c=l.toolbar.tools,u=l.keyboard.toolFromShortcut(c,e),p=u?c[u].options:{},u&&!p.keyPressCommand?(e.preventDefault(),/^(undo|redo)$/.test(u)||l.keyboard.endTyping(!0),l.trigger("keydown",e),l.exec(u),l._runPostContentKeyCommands(e),!1):(l.keyboard.clearTimeout(),l.keyboard.keydown(e),t)))},keypress:function(e){setTimeout(function(){l._runPostContentKeyCommands(e),l._showTableResizeHandles()},0)},keyup:function(t){var n=[f.BACKSPACE,f.TAB,f.PAGEUP,f.PAGEDOWN,f.END,f.HOME,f.LEFT,f.UP,f.RIGHT,f.DOWN,f.INSERT,f.DELETE];(e.inArray(t.keyCode,n)>-1||65==t.keyCode&&t.ctrlKey&&!t.altKey&&!t.shiftKey)&&(window.clearTimeout(this._refreshInterval),this._refreshInterval=window.setTimeout(function(){l._selectionChange()},b)),l.keyboard.keyup(t)},click:function(e){var t,n=a.ui.editor.Dom;"img"===n.name(e.target)&&(t=l.createRange(),t.selectNode(e.target),l.selectRange(t))},"cut copy paste drop dragover":function(e){l.clipboard["on"+e.type](e)},focusin:function(){l.body.hasAttribute("contenteditable")&&(e(this).addClass("k-state-active"),l.toolbar.show(),l._togglePlaceholder(!1))},focusout:function(){setTimeout(function(){var t,n=a._activeElement(),i=l.body,o=l.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()),l._togglePlaceholder(!l.value().trim())},10)}}),l._initializeColumnResizing(),l._initializeRowResizing(),l._initializeTableResizing()},_initializePlaceholder:function(){var t,n,i=this,o=i.options.placeholder;i.textarea&&o&&(t="").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=T.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&&t.scrollHeight>t.clientHeight?(e=t.scrollTop,t.focus(),t.scrollTop=e):o!=t&&o!=n&&(e=i.scrollTop,t.focus(),i.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._togglePlaceholder(!e.trim())):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)},_deleteSavedRange:function(){"_range"in this&&delete this._range},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,a,s=this,l=null;if(!e)throw Error("kendoEditor.exec(): `name` parameter cannot be empty");if("true"!==s.body.getAttribute("contenteditable")&&"print"!==e&&"pdf"!==e&&"exportAs"!==e)return!1;if(e=e.toLowerCase(),s.keyboard.isTypingInProgress()||(s._focusBody(),s.selectRange(s._range||s.getRange())),o=s.toolbar.toolById(e),!o)for(a in T.defaultTools)if(a.toLowerCase()==e){o=T.defaultTools[a];break}if(o){if(i=s.getRange(),o.command&&(l=o.command(u({range:i,body:s.body,immutables:!!s.immutables},n))),r=s.trigger("execute",{name:e,command:l}))return;if(/^(undo|redo)$/i.test(e))s.undoRedoStack[e]();else if(l&&(s.execCommand(l),l.async))return l.change=h(s._selectionChange,s),t;s._selectionChange()}},execCommand:function(e){e.managesUndoRedo||this.undoRedoStack.push(e),e.editor=this,e.exec()}});T.defaultTools={undo:{options:{key:"Z",ctrl:!0}},redo:{options:{key:"Y",ctrl:!0}}},a.ui.plugin(T),n=s.extend({init:function(e){this.options=e},initialize:function(e,t){e.attr({unselectable:"on",title:t.title,"aria-label":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})},y.registerTool("separator",new n({template:new k({template:y.separatorTemplate})})),i=c.msie&&c.version<9?"\ufeff":"",o="\ufeff",r=o,(c.msie||c.edge)&&(r=o=" "),u(a.ui,{editor:{ToolTemplate:k,EditorUtils:y,Tool:n,_bomFill:i,emptyElementContent:o,emptyTableCellContent:r}}),a.PDFMixin&&(a.PDFMixin.extend(T.prototype),T.prototype._drawPDF=function(){return a.drawing.drawDOM(this.body,this.options.pdf)},T.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,proxyTarget:t.proxyTarget,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=8&&(M=function(e){if(1==e.nodeType&&e.firstChild){var t=e.firstChild,n=t;for(M(n);;){if(n=n.nextSibling,!n)break;M(n),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,a=/^(\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(","),d=/[<>\&]/g,c=/[\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:I,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},getAllComments:function(e){for(var t=[],n=document.createNodeIterator(e,NodeFilter.SHOW_COMMENT,function(){return NodeFilter.FILTER_ACCEPT},!1),i=n.nextNode();i;)t.push(i.nodeValue),i=n.nextNode();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[p.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;n1?e:"0"+e}).join(""):e},encode:function(e,t){var n=!t||t.entities?c:d;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)||h.is(e,"span")&&"k-br"==e.className},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&&a.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==y},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,a,s,l,d;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,a=n(t,"previousSibling"),s=n(t,"nextSibling"),r.test(t.nodeValue)?!(!a&&!s):!!e(o).is("tr,tbody,thead,tfoot,table,ol,ul")||!!((h.isBlock(o)||h.is(o,"body"))&&(l=a&&h.isBlock(a),d=s&&h.isBlock(s),!s&&l||!a&&d||l&&d))))},isBlock:function(e){return T[h.name(e)]},isSelfClosing:function(e){return D[h.name(e)]},isEmpty:function(e){return x[h.name(e)]},isInline:function(e){return I[h.name(e)]},isBr:function(e){return"br"==h.name(e)},list:function(e){var t=e?h.name(e):"";return"ul"==t||"ol"==t||"dl"==t},scrollContainer:function(e){var t=h.windowFromDocument(e),n=(t.contentWindow||t).document||t.ownerDocument||t;return n="BackCompat"==n.compatMode?n.body:n.scrollingElement||n.documentElement},scrollTo:function(t,n){var i,o,r,a,s=t.ownerDocument,l=h.windowFromDocument(s),d=l.innerHeight,c=h.scrollContainer(s);h.isDataNode(t)?n?(a=h.create(s,"span",{innerHTML:"﻿"}),h.insertBefore(a,t),i=e(a)):i=e(t.parentNode):i=e(t),o=i.offset().top,r=i[0].offsetHeight,!n&&r||(r=parseInt(i.css("line-height"),10)||Math.ceil(1.2*parseInt(i.css("font-size"),10))||15),a&&h.remove(a),r+o>c.scrollTop+d&&(c.scrollTop=r+o-d)},persistScrollTop:function(e){s=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 s&&(h.scrollContainer(e).scrollTop=s,s=void 0)},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&&e.parentNode.removeChild(e)},removeChildren:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},removeTextSiblings:function(e){for(var t=e.parentNode;e.nextSibling&&3==e.nextSibling.nodeType;)t.removeChild(e.nextSibling);for(;e.previousSibling&&3==e.previousSibling.nodeType;)t.removeChild(e.previousSibling)},trim:function(e){var t,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!=y&&(h.trim(n),(!h.isEmpty(n)&&0===n.childNodes.length||h.isBlock(n)&&h.allWhitespaceContent(n))&&h.remove(n));return e},closest:function(e,t){for("string"==typeof t&&(t=[t]);e&&t.indexOf(h.name(e))<0;)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,a,s,l=h.create(e.ownerDocument,t),d=e.attributes;if(!n)for(i=0,o=d.length;i1});return e(n).is("body,.k-editor")?void 0:n},create:function(e,t,n){return h.attr(e.createElement(t),n)},createEmptyNode:function(e,t,n){var i=h.attr(e.createElement(t),n);return i.innerHTML="\ufeff",i},attr:function(e,t){t=g({},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 g(e,t)},mergeAttributes:function(t,n){t.attributes.length&&e.each(t.attributes,function(){"contenteditable"!==this.name&&e(n).attr(this.name,this.value)})},style:function(t,n){e(t).css(n||{})},unstyle:function(e,t){for(var n in t)n==_&&(n=p.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=f(l,function(e){return m.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(//gi,""),t=t.replace(/<\/?[^>]+?\/?>/gm,"")},removeClass:function(t,n){var i,o,r=" "+t.className+" ",a=n.split(" ");for(i=0,o=a.length;i1&&this._mapColspan(a,n,o,s),s[n])for(;s[n][o];)o++;a.setAttribute(t,o),a.colSpan>1&&(o=o+a.colSpan-1)}},_mapColspan:function(e,t,n,i){var o,r,a,s=e.rowSpan,l=e.colSpan;for(r=0;ra&&(a=o);return a},_getNumberOfHeaderColumns:function(e,t){var n,i,o,r,a,s=e.rows,l=0;for(o=t;ol&&(l=n));return l},_getNumberOfHeaderRows:function(e){var t,n,i,o,r=e.rows,a=e.tHead,s=a&&e.tHead.rows?e.tHead.rows.length:0;if(0===s)for(n=r[0],o=n.cells&&n.cells.length;n&&o&&this.is(n.cells[0],"th");){for(t=0;t]*>/i,p=/^\d+(\.\d*)?(px)?$/i,f=/(?: )?<\/p>/i,g=/(\*?[-#\/\*\\\w]+(?:\[[0-9a-z_-]+\])?)\s*:\s*((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/g,m=/^sizzle-\d+/i,v=/^k-script-/i,_=/\s*onerror\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/i,b='',w="\ufeff",k=document.createElement("div");k.innerHTML="",n=3===k.firstChild.nodeType,k=null,i=e.isFunction,o="td",r={toEditableHtml:function(e){return(e||"").replace(//g,"").replace(/<(\/?)script([^>]*)>/gi,"<$1k:script$2>").replace(/]*)>/gi,function(e){return e.replace(_,"")}).replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/gi,"$1").replace(/^<(table|blockquote)/i,b+"<$1").replace(/^[\s]*( |\u00a0)/i,"$1").replace(/<\/(table|blockquote)>$/i,"$1>"+b)},_toEditableImmutables:function(t){for(var n=s.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(w).prependTo(t),r&&n(r)&&e(w).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")?a.ui.editor.emptyTableCellContent:a.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"+t,t=t.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,h+'="$1"'),t=t.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,u+'="$1"')),i(p.custom)&&(t=p.custom(t)||t),n.innerHTML=t,f&&f.deserialize(n),c?(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))})):d&&(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 d(t){return e.grep(t,function(e){return"style"!=e.name})}function _(e,t){I.push("<"+t),y(e),I.push(">")}function b(t){var n,i,o,r=e.trim,a=r(t),s=[];for(g.lastIndex=0;;){if(n=g.exec(a),!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,"")),s.push({property:i,value:o}))}return s}function w(e){var t,n=b(e);for(t=0;t=0?s=!1:v.test(o)?s=!!r.scripts:"data-role"==o&&"resizable"==a&&(l.is(e,"tr")||l.is(e,"td"))&&(s=!1):s=!1,s&&d.push(t);return d}function y(n,i){var o,r,s,d,c,u,h,f;if(i=i||k(n),l.is(n,"img")&&(u=n.style.width,h=n.style.height,f=e(n),u&&p.test(u)&&(f.attr("width",parseInt(u,10)),l.unstyle(n,{width:t})),h&&p.test(h)&&(f.attr("height",parseInt(h,10)),l.unstyle(n,{height:t}))),i.length)for(o=0,r=i.length;o"):(I.push(">"),x(i,o||l.is(i,"pre")),I.push(""),I.push(d),I.push(">"))}else if(3==g){if(S(i))return I.push(" "),t;h=C(i),!o&&n&&(u=i.parentNode,p=i.previousSibling,p||(p=(l.isInline(u)?u:i).previousSibling),p&&""!==p.innerHTML&&!l.isBlock(p)||(h=h.replace(/^[\r\n\v\f\t ]+/,"")),h=h.replace(/ +/," ")),I.push(a?h:l.encode(h,r))}else 4==g?(I.push("")):8==g&&(i.data.indexOf("[CDATA[")<0?(I.push("")):(I.push("")))}function D(e){var t=e.childNodes.length,n=t&&3==e.firstChild.nodeType;return n&&(1==t||2==t&&l.insignificant(e.lastChild))}function A(){e.isFunction(r.custom)&&(I=r.custom(I)||I)}var I=[],E=r&&r.immutables,M={iframe:{start:function(e){_(e,"iframe")},end:function(){I.push("")}},"k:script":{start:function(e){_(e,"script")},end:function(){I.push("")},skipEncoding:!0},span:{semantic:!0,start:function(t){var n,i,o=t.style,r=k(t),a=d(r);a.length&&(I.push("")),"underline"==o.textDecoration&&I.push(""),n=[],o.color&&n.push('color="'+l.toHex(o.color)+'"'),o.fontFamily&&n.push('face="'+o.fontFamily+'"'),o.fontSize&&(i=e.inArray(o.fontSize,c),n.push('size="'+i+'"')),n.length&&I.push("")},end:function(e){var t=e.style;(t.color||t.fontFamily||t.fontSize)&&I.push(""),"underline"==t.textDecoration&&I.push(""),d(k(e)).length&&I.push("")}},strong:{semantic:!0,start:function(e){_(e,"b")},end:function(){I.push("")}},em:{semantic:!0,start:function(e){_(e,"i")},end:function(){I.push("")}},b:{semantic:!1,start:function(e){_(e,"strong")},end:function(){I.push("")}},i:{semantic:!1,start:function(e){_(e,"em")},end:function(){I.push("")}},u:{semantic:!1,start:function(t){var n,i,o;I.push("")},end:function(){I.push("")}},font:{semantic:!1,start:function(e){var t,n,i;I.push('')},end:function(){I.push("")}}};return M.script=M["k:script"],r=r||{},t===r.semantic&&(r.semantic=!0),D(i)?(I=l.encode(C(i.firstChild).replace(/[\r\n\v\f\t ]+/," "),r),A(),I):(x(i),I=I.join(""),A(),""===I.replace(h,"").replace(f,"")?"":I)}},d(s,{Serializer:r})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/components.min",["editor/serializer.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.element.attr("title",r.options.title),r.wrapper.attr("title",r.options.title),r.bind("open",function(){if(r.options.autoSize){var e,t=r.list;t.css({whiteSpace:"nowrap",width:"auto"}),e=t.width(),e>0?e+=20:e=r._listWidth,t.css("width",e+n.support.scrollbar()),r._listWidth=e}})},options:{name:"SelectBox",index:-1},_initSelectOverlay:function(){var t,i,o,r,a=this,s=a.value(),l=this.dataSource.view(),d="",c=n.htmlEncode;for(i=0;i"+c(t.text)+"";o=e(""+d+""),r=e(this.element).closest(".k-widget"),r.next(".k-select-overlay").remove(),o.insertAfter(r),o.on("change",function(){a.value(this.value),a.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,a,s=this,l=s.dataSource,d=l.data();for(t&&s.list.css("background-color",o.getEffectiveBackground(e(t))),n=0;n0&&u.previousSibling);a=u.nextSibling,o==-1&&x(a)?(h.setEndPoint(i?"EndToStart":"EndToEnd",e),k.remove(u),d=[a,h.text.length]):(s=!i&&u.previousSibling,l=i&&u.nextSibling,x(l)?d=[l,0]:x(s)?d=[s,s.length]:(c=y(u),d=r.nextSibling&&c==r.childNodes.length-1?[r.nextSibling,0]:[r,c]),k.remove(u)),t[i?"setStart":"setEnd"].apply(t,d)}var s,l,d,c,u,h,p,f,g,m=window.kendo,v=m.Class,_=e.extend,b=m.ui.editor,w=m.support.browser,k=b.Dom,y=k.findNodeIndex,x=k.isDataNode,C=k.findClosestAncestor,S=k.getNodeLength,T=k.normalize,D={selectionFromWindow:function(e){return"getSelection"in e?e.getSelection():new l(e.document)},selectionFromRange:function(e){var t=g.documentFromRange(e);return D.selectionFromDocument(t)},selectionFromDocument:function(e){return D.selectionFromWindow(k.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,y(e))},setStartAfter:function(e){this.setStart(e.parentNode,y(e)+1)},setEndBefore:function(e){this.setEnd(e.parentNode,y(e))},setEndAfter:function(e){this.setEnd(e.parentNode,y(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 s(t))},cloneContents:function(){var e=g.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 s(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=g.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 s(n))},insertNode:function(e){var t=this;x(t.startContainer)?(t.startOffset!=t.startContainer.nodeValue.length&&k.splitDataNode(t.startContainer,t.startOffset),k.insertAfter(e,t.startContainer)):k.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)},s=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,a=this,s=a.range.startContainer==a._current,l=a.range.endContainer==a._current;x(a._current)&&(s||l)?(t=s?a.range.startOffset:0,n=l?a.range.endOffset:a._current.length,i=n-t,e&&(s||l)&&(a._current==e.startContainer&&t<=e.startOffset&&(e.startOffset-=i),a._current==e.endContainer&&n<=e.endOffset&&(e.endOffset-=i)),a._current.deleteData(t,i)):(o=a._current.parentNode,!e||a.range.startContainer!=o&&a.range.endContainer!=o||(r=y(a._current),o==e.startContainer&&r<=e.startOffset&&(e.startOffset-=1),o==e.endContainer&&r=0&&e[t?"setStart":"setEnd"](o,a)},toRange:function(){var e=this,t=e.range.cloneRange();return e.toRangePoint(t,!0,e.startContainer,e.startOffset),e.toRangePoint(t,!1,e.endContainer,e.endOffset),t}}),p=v.extend({init:function(){this.caret=null},addCaret:function(e){var t=this,n=t.caret=k.create(g.documentFromRange(e),"span",{className:"k-marker"});return e.insertNode(n),k.stripBomNode(n.previousSibling),k.stripBomNode(n.nextSibling),e.selectNode(n),n},removeCaret:function(e){var t,n,i,o,r=this,a=r.caret.previousSibling,s=0;a&&(s=x(a)?a.nodeValue.length:y(a)),t=r.caret.parentNode,n=a?y(a):0,k.remove(r.caret),T(t),i=t.childNodes[n],x(i)?e.setStart(i,s):i?(o=k.lastTextNode(i),o?e.setStart(o,o.nodeValue.length):e[a?"setStartAfter":"setStartBefore"](i)):(w.msie||t.innerHTML||(t.innerHTML=''),e.selectNodeContents(t)),e.collapse(!0)},add:function(e,t){var n,i,o=this,r=e.collapsed&&!g.isExpandable(e),a=g.documentFromRange(e);return t&&e.collapsed&&(o.addCaret(e),e=g.expand(e)),n=e.cloneRange(),n.collapse(!1),o.end=k.create(a,"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=a.createTextNode("\ufeff"),k.insertAfter(i.cloneNode(),o.start),k.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&&k.remove(e.previousSibling),t.nextSibling&&"\ufeff"==t.nextSibling.nodeValue&&k.remove(t.nextSibling)},_normalizedIndex:function(e){for(var t=y(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,a,s,l,d,c,u,h,p=this,f=p.start,g=p.end;for(T(e.commonAncestorContainer);!f.nextSibling&&f.parentNode;)f=f.parentNode;for(;!g.previousSibling&&g.parentNode;)g=g.parentNode;if(t=f.previousSibling&&3==f.previousSibling.nodeType&&f.nextSibling&&3==f.nextSibling.nodeType,n=g.previousSibling&&3==g.previousSibling.nodeType&&g.nextSibling&&3==g.nextSibling.nodeType,i=t&&n,f=f.nextSibling,g=g.previousSibling,o=f===g&&k.isBom(f),o&&f.length>1&&(f.nodeValue=f.nodeValue.charAt(0)),r=o,a=!1,f==p.end&&(a=!!p.start.previousSibling,f=g=p.start.previousSibling||p.end.nextSibling,r=!0),k.remove(p.start),k.remove(p.end),!f||!g)return e.selectNodeContents(e.commonAncestorContainer),void e.collapse(!0);if(s=r?x(f)?f.nodeValue.length:f.childNodes.length:0,l=x(g)?g.nodeValue.length:g.childNodes.length,3==f.nodeType)for(;f.previousSibling&&3==f.previousSibling.nodeType;)f=f.previousSibling,s+=f.nodeValue.length;if(3==g.nodeType)for(;g.previousSibling&&3==g.previousSibling.nodeType;)g=g.previousSibling,l+=g.nodeValue.length;d=f.parentNode,c=g.parentNode,u=this._normalizedIndex(f),h=this._normalizedIndex(g),T(d),3==f.nodeType&&(f=d.childNodes[u]),T(c),3==g.nodeType&&(g=c.childNodes[h]),r?(3==f.nodeType?e.setStart(f,s):e[a?"setStartAfter":"setStartBefore"](f),e.collapse(!0)):(3==f.nodeType?e.setStart(f,s):e.setStartBefore(f),3==g.nodeType?e.setEnd(g,l):e.setEndAfter(g)),p.caret&&p.removeCaret(e)}}),f=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/,g={nodes:function(e){var t=g.textNodes(e);return t.length||(e.selectNodeContents(e.commonAncestorContainer),t=g.textNodes(e),t.length||(t=k.significantChildNodes(e.commonAncestorContainer))),t},textNodes:function(e){return new d(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=g.image(e);n&&(e.setStartAfter(n),e.setEndAfter(n)),t=D.selectionFromRange(e),t.removeAllRanges(),t.addRange(e)},stringify:function(e){return m.format("{0}:{1} - {2}:{3}",k.name(e.startContainer),e.startOffset,k.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=k.trim(o)),k[i?"insertBefore":"insertAfter"](o,t)}i(!0),i(!1)},mapAll:function(t,n){var i=[];return new s(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 k.is(e,n)}),g.mapAll(e,function(e){if(t(e))return e})},getMarkers:function(e){return g.getAll(e,function(e){return"k-marker"==e.className})},image:function(e){var t=g.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=k.findNodeIndex(n.startContainer),o=n.startContainer.parentNode;i>0&&o[i-1]&&k.insignificant(o[i-1]);)i--;n.setStart(o,i)}return 0===n.startOffset&&n.startContainer==t},isEndOf:function(e,t){function n(e){k.insignificant(e)||k.isDataNode(e)&&/^[\ufeff]*$/.test(e.nodeValue)||o.push(e)}var i,o,r=e.cloneRange();return r.collapse(!1),i=r.startContainer,k.isDataNode(i)&&r.startOffset==k.getNodeLength(i)&&(r.setStart(i.parentNode,k.findNodeIndex(i)+1),r.collapse(!0)),r.setEnd(t,k.getNodeLength(t)),o=[],new s(r).traverse(n),!o.length},wrapSelectedElements:function(e){function t(e,t){var n,i=k.getNodeLength(t);if(e==i)return!0;for(n=e;n0;--t)n+=i.charAt(Math.round(Math.random()*(i.length-1)));return n},b=function(t){var n,i,o,a={empty:!0};return e(t).find(h).each(function(t,s){n=r.name(s),i=_(),o="<"+n+" "+c+"='"+i+"'>"+n+">",a[i]={node:s,style:e(s).attr("style")},a.empty=!1,e(s).replaceWith(o)}),a},w=function(t,n){var i,o;e(t).find(u).each(function(t,r){i=r.getAttribute(c),o=n[i],e(r).replaceWith(o.node),o.style!=e(o.node).attr("style")&&e(o.node).removeAttr("style").attr("style",o.style)})},k=function(e){var t=n.keys;return e===t.BACKSPACE||e==t.DELETE},y=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;y(n.justifyLeft),y(n.justifyCenter),y(n.justifyRight),y(n.justifyFull)},serialize:function(e){var t,n=this._toHtml(e);return n.indexOf(c)===-1?(t=this.randomId(),n=n.replace(/>/," "+c+'="'+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 a(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(c),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=k(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,a,s,d=n.keys,c=e.keyCode===d.BACKSPACE,u=e.keyCode==d.DELETE;if(!c&&!u)return!1;if(i=!1,t.collapsed){if(v(t))return!0;if(o=this.nextImmutable(t,u),o&&c&&(a=r.closest(t.commonAncestorContainer,"li"),a&&(s=r.closest(o,"li"),s&&s!==a)))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&&s.isEndOf(e,i)||!t&&s.isStartOf(e,i)){if(n=this._nextNode(i,t),n&&r.isBlock(n)&&!g(n))for(;n&&n.children&&n.children[t?0:n.children.length-1];)n=n.children[t?0:n.children.length-1];return g(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=f,x.immutableParent=g,x.expandImmutablesIn=m,x.immutablesContext=v,x.toolsToBeUpdated=d,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/command.min",["editor/immutables.min"],e)}(function(){!function(e){function t(e,t){var n=e.selectionRestorePoint=new a(e.getRange(),e.body),i=new c(t,n);return i.editor=e,e.undoRedoStack.push(i),n}var n=window.kendo,i=n.Class,o=n.ui.editor,r=o.Dom,a=o.RestorePoint,s=o.Marker,l=e.extend,d=i.extend({init:function(e){this.options=e,this.restorePoint=new a(e.range,e.body,{immutables:e.immutables}),this.marker=new s,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,i){var o=this.editor;return e(t).appendTo(document.body).kendoWindow(l({},o.options.dialogOptions,i)).closest(".k-window").toggleClass("k-rtl",n.support.isRtl(o.wrapper)).end()},exec:function(){var e=this.lockRange(!0);this.formatter.editor=this.editor,this.formatter.toggle(e),this.releaseRange(e)},immutables:function(){return this.editor&&this.editor.options.immutables},expandImmutablesIn:function(e){this.immutables()&&(n.ui.editor.Immutables.expandImmutablesIn(e),this.restorePoint=new a(e,this.editor.body))}}),c=i.extend({init:function(e,t){this.body=e.body,this.startRestorePoint=e,this.endRestorePoint=t},redo:function(){r.removeChildren(this.body),this.body.innerHTML=this.endRestorePoint.html,this.editor.selectRange(this.endRestorePoint.toRange())},undo:function(){r.removeChildren(this.body),this.body.innerHTML=this.startRestorePoint.html,this.editor.selectRange(this.startRestorePoint.toRange())}});l(o,{_finishUpdate:t,Command:d,GenericCommand:c})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/toolbar.min",["editor/range.min"],e)}(function(){!function(e,t){var n,i=window.kendo,o=i.ui,r=o.editor,a=o.Widget,s=e.extend,l=e.proxy,d=i.keys,c=".kendoEditor",u=r.EditorUtils,h=r.ToolTemplate,p=r.Tool,f=i._outerWidth,g=i._outerHeight,m="overflowAnchor",v=".k-tool-group:visible a.k-tool:not(.k-state-disabled),.k-tool.k-overflow-anchor:visible,.k-tool-group:visible .k-widget.k-colorpicker,.k-tool-group:visible .k-selectbox,.k-tool-group:visible .k-dropdown,.k-tool-group:visible .k-combobox .k-input",_={"k-i-sup-script":"superscript","k-i-sub-script":"subscript","k-i-align-left":"justifyLeft","k-i-align-center":"justifyCenter","k-i-align-right":"justifyRight","k-i-align-justify":"justifyFull","k-i-list-unordered":"insertUnorderedList","k-i-list-ordered":"insertOrderedList","k-i-login":"import","k-i-indent-increase":"indent","k-i-indent-decrease":"outdent","k-i-link-horizontal":"createLink","k-i-unlink-horizontal":"unlink","k-i-image":"insertImage","k-i-file-add":"insertFile","k-i-html":"viewHtml","k-i-foreground-color":"foreColor","k-i-paint":"backColor","k-i-table-insert":"createTable","k-i-table-column-insert-left":"addColumnLeft","k-i-table-column-insert-right":"addColumnRight","k-i-table-row-insert-above":"addRowAbove","k-i-table-row-insert-below":"addRowBelow","k-i-table-row-delete":"deleteRow","k-i-table-column-delete":"deleteColumn","k-i-table-properties":"tableWizard","k-i-table-wizard":"tableWizardInsert","k-i-clear-css":"cleanFormatting","k-i-cells-merge-horizontally":"mergeCellsHorizontally","k-i-cells-merge-vertically":"mergeCellsVertically","k-i-cell-split-horizontally":"splitCellHorizontally","k-i-cell-split-vertically":"splitCellVertically","k-i-copy-format":"copyFormat","k-i-apply-format":"applyFormat"},b=p.extend({initialize:function(t,n){t.attr({unselectable:"on"});var i=n.editor.toolbar;t.attr("aria-controls",n.editor.element.attr("id")).on("click",e.proxy(function(){this.overflowPopup.toggle()},i))},options:{name:m},command:e.noop,update:e.noop,destroy:e.noop});u.registerTool(m,new b({key:"",ctrl:!0,template:new h({template:u.overflowAnchorTemplate})})),n=a.extend({init:function(e,t){var n=this;t=s({},t,{name:"EditorToolbar"}),a.fn.init.call(n,e,t),t.popup&&n._initPopup(),t.resizable&&t.resizable.toolbar&&(n._resizeHandler=i.onResize(function(){n.resize(!0)}),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"],tablesInsert:["createTable"],tablesAddDelete:["addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"],tablesMerge:["mergeCellsHorizontally","mergeCellsVertically","splitCellHorizontally","splitCellVertically"],advanced:["viewHtml","cleanFormatting","print","pdf","exportAs","import"],fonts:["fontName","fontSize"],colors:["foreColor","backColor"],formatPainter:["copyFormat","applyFormat"]},overflowFlaseTools:["formatting","fontName","fontSize","foreColor","backColor","insertHtml"],_initPopup:function(){var t=this;this.window=e(this.element).wrap("").parent().prepend("").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,o="";n.overflowPopup=e(o).appendTo("body").kendoPopup({anchor:t,origin:i.support.isRtl(n.element)?"bottom left":"bottom right",position:i.support.isRtl(n.element)?"top left":"top right",copyAnchorStyles:!1,open:function(e){this.element.is(":empty")&&e.preventDefault(),n._toggleOverflowStyles(this.element,!0),t.attr("aria-expanded",!0)},close:function(){t.attr("aria-expanded",!1)},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(m),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==d.RIGHT||i==d.LEFT?n.close():i==d.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,a=r&&r.options,s=t.options.messages,l=a&&a.tooltip||s[o],d=e(this);r&&r.initialize&&("fontSize"!=o&&"fontName"!=o||(i=s[o+"Inherit"],d.find("input").val(i).end().find("span.k-input").text(i).end()),r.initialize(d,{title:n._appendShortcutSequence(l,r),editor:n._editor}),d.closest(".k-widget",n.element).addClass("k-editor-widget"),d.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,a=o.options.editor,s=i.support.browser;r&&(e=r.wrapper,t=a.element,e.is(":visible")&&o.window.options.visible||(e[0].style.width||e.width(this._getWindowWidth()),r._moved||(n=t.offset(),e.css({top:Math.max(0,parseInt(n.top,10)-g(e)-parseInt(o.window.element.css("padding-bottom"),10)),left:Math.max(0,parseInt(n.left,10))})),(s.msie||s.edge)&&o._overlaps(t)?setTimeout(function(){r.open()},0):r.open()))},_getWindowWidth:function(){var e=this,t=e.window.wrapper,n=e.options.editor.element;return f(n)-parseInt(t.css("border-left-width"),10)-parseInt(t.css("border-right-width"),10)},_overlaps:function(e){var t=this.window.wrapper,n=t.offset(),i=n.left,o=n.top,r=e.offset(),a=r.left,s=r.top;return!(a+e.width()i+t.width()||s+e.height()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,a,l,d=this._nativeTools,c=i.deepExtend({},i.ui.Editor.defaultTools),u={};for(o=0;o"),h.data("overflow",e.inArray(t,x)===-1)):h=e("")}var r,a,s,d,c,u,h,p,f=this,g=f.tools,v=f._editor.element,_=f.element.empty(),b=f._editor.options.tools,w=i.support.browser,k=0,y=f.options.resizable&&f.options.resizable.toolbar,x=this.overflowFlaseTools;for(_.empty(),b.length&&(d=b[0].name||b[0]),o(d,x),p=0;p").appendTo(f.element),o(d,x)),a&&(u=f.toolGroupFor(d),c==u&&d!=m||(n(),o(d,x),c=u),d==m&&(a.options.title=f.options.messages.overflowAnchor),a=t(a),s=e(a).appendTo(h),"custom"==u&&(n(),o(d,x)),r.exec&&s.hasClass("k-tool")&&s.click(l(r.exec,v[0])));n(),e(f.element).children(":has(> .k-tool)").addClass("k-button-group"),f.options.popup&&w.msie&&w.version<9&&f.window.wrapper.find("*").attr("unselectable","on"),f.updateGroups(),y&&f._initOverflowPopup(f.element.find(".k-overflow-anchor")),f.angular("compile",function(){return{elements:f.element}})},updateGroups:function(){e(this.element).children().each(function(){e(this).addClass("k-state-disabled"),e(this).children().filter(function(){return!e(this).hasClass("k-state-disabled")}).removeClass("k-group-end").first().addClass("k-group-start").end().last().addClass("k-group-end").end().parent().removeClass("k-state-disabled").css("display","")})},decorateFrom:function(t){this.items().filter(".k-decorated").each(function(){var n=e(this).data("kendoSelectBox");n&&n.decorate(t)})},destroy:function(){a.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,o="[role=button].k-tool",r=o+":not(.k-state-disabled)",a=o+".k-state-disabled",s=".k-dropdown",l=".k-colorpicker",u=[o,s,l].join(",");t.off(c).on("mouseenter"+c,r,function(){e(this).addClass("k-state-hover")}).on("mouseleave"+c,r,function(){e(this).removeClass("k-state-hover")}).on("mousedown"+c,u,function(e){e.preventDefault()}).on("keydown"+c,v,function(t){function o(e,t,n){var i=t.find(v),o=i.index(l)+e;return n&&(o=Math.max(0,Math.min(i.length-1,o))),i[o]}var r,a,s,l=this,c=n.options.resizable&&n.options.resizable.toolbar,u=i.support.isRtl(n.element)?-1:1,h=t.keyCode;h==d.RIGHT||h==d.LEFT?a=e(l).is(".k-dropdown")?e(l):o(h==d.RIGHT?1*u:-1*u,n.element,!0):!c||h!=d.UP&&h!=d.DOWN?h==d.HOME?(a=n.element.find(v)[0],t.preventDefault()):h==d.END?(r=n.element.find(v).filter(function(){return"hidden"!==e(this).css("visibility")}),a=r[r.length-1],t.preventDefault()):h==d.ESC?(n.overflowPopup&&n.overflowPopup.visible()&&n.overflowPopup.close(),a=n._editor):h!=d.TAB||t.ctrlKey||t.altKey||(s=c&&e(l.parentElement).hasClass("k-overflow-tool-group")?n.overflowPopup.element:n.element,t.shiftKey?a=o(-1,s):(a=o(1,s),a&&"hidden"!==e(a).closest(".k-overflow-tools").css("visibility")||(a=n._editor))):a=o(h==d.DOWN?1:-1,n.overflowPopup.element,!0),a&&(t.preventDefault(),a.focus()),h!==d.ENTER&&h!==d.SPACEBAR||!e(l).is("a")||e(l).attr("href")||n._executeToolCommand(l,t)}).on("click"+c,r,function(e){n._executeToolCommand(this,e)}).on("click"+c,a,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=t._editor,i=n.getRange(),o=r.RangeUtils.textNodes(i),a=n.options.immutables,s=t._immutablesContext(i);o=r.Dom.filterBy(o,r.Dom.htmlIndentSpace,!0),o.length||(o=[i.startContainer]),t.items().each(function(){var n,i=t.tools[t._toolName(this)];i&&(n=e(this),i.update&&i.update(n,o),a&&t._updateImmutablesState(i,n,s))}),this.update()},_immutablesContext:function(e){if(this._editor.options.immutables)return e.collapsed?r.Immutables.immutablesContext(e):0===r.RangeUtils.editableTextNodes(e).length},_updateImmutablesState:function(n,i,o){var a,s,l,d,c,u=n.name,h=i,p=n.options.trackImmutables;if(p===t&&(p=e.inArray(u,r.Immutables.toolsToBeUpdated)>-1),p){if(a=o?"none":"",!i.is(".k-tool")){s=i.data();for(l in s)if(l.match(/^kendo[A-Z][a-zA-Z]*/)){d=s[l],h=d.wrapper;break}}h.css("display",a),c=h.closest("li"),0===c.children(":visible").length&&c.css("display",a)}},update:function(){this.updateGroups()},_resize:function(e){var t=e.width,n=this.options.resizable&&this.options.resizable.toolbar,i=this.overflowPopup,o=this.options.editor.element,r=this.window;this.refreshTools(),n&&(r&&(r.wrapper.width(this._getWindowWidth()),r._moved||r.wrapper.css({left:Math.max(0,parseInt(o.offset().left,10))})),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",f(i,!0))})},_shrink:function(e){var t,n,i;if(e=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;ie(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.hasClass("k-state-disabled")||!!(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.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/viewhtml.min",["editor/command.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=n.ui.editor,r=o.EditorUtils,a=o.Command,s=o.Tool,l=o.ToolTemplate,d=o.Dom,c=a.extend({init:function(e){var t=this;t.options=e,a.fn.init.call(t,e),t.attributes=null,t.async=!0},exec:function(){function i(e){h.deserialization.immutables=u.immutables,u.value(f.find(g).val()),h.deserialization.immutables=t,o(e),l.change&&l.change(),u.trigger("change")}function o(e){e.preventDefault(),f.data("kendoWindow").destroy(),u.immutables&&(u.immutables.serializedImmutables={}),u.focus()}var a,s,l=this,u=l.editor,h=u.options,p=u.options.messages,f=e(n.template(c.template)(p)).appendTo(document.body),g=".k-editor-textarea";h.serialization.immutables=u.immutables,s=d.getAllComments(u.body),a=r.cacheComments(u.value(),s),a=c.indent(a),a=r.retrieveComments(a,s),h.serialization.immutables=t,this.createDialog(f,{title:p.viewHtml,close:o,visible:!1}).find(g).val(a).end().find(".k-dialog-update").click(i).end().find(".k-dialog-close").click(o).end().data("kendoWindow").center().open(),f.find(g).focus()}});i(c,{template:"#: dialogUpdate ##: dialogCancel #",indent:function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"$1>\n").replace(/<(ul|ol)([^>]*)>\n/gi,"\n").replace(/\n$/,"")}}),n.ui.editor.ViewHtmlCommand=c,o.EditorUtils.registerTool("viewHtml",new s({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/plugins/format.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,o=i.Tool,r=i.Command,a=i.EditorUtils,s=r.extend({init:function(e){e.formatter=e.formatter();var t=e.formatter.finder;t&&a.formatByName("immutable",t.format)&&t._initOptions({immutables:e.immutables}),r.fn.init.call(this,e)}}),l=o.extend({init:function(e){o.fn.init.call(this,e)},command:function(e){var t=this;return new s(n(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)}});e.extend(i,{FormatCommand:s,FormatTool:l})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/inlineformat.min",["editor/plugins/format.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,a=i.Tool,s=i.ToolTemplate,l=i.FormatTool,d=i.Dom,c=i.RangeUtils,u=e.extend,h=i.EditorUtils.registerTool,p=i.EditorUtils.registerFormat,f="mousedown.kendoEditor",g="keydown.kendoEditor",m="k-marker",v=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==m?o++:3==t.nodeType?n++:i++);return o>1&&r.firstChild.className==m&&r.lastChild.className==m?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;!d.ofType(n,i);){if(this.numberOfSiblings(n)>0)return null;n=n.parentNode}return n},findFormat:function(e){var t,n,i,o,r,a=this.format,s=d.attrEquals;for(t=0,n=a.length;t0&&this.activate(e,n)},immutables:function(){return this.editor&&this.editor.options.immutables},apply:function(e){var t,n,i,o,r=[];if(e.length>1)for(t=0,n=e.length;t0)for(t=0;t1;)if(t=e.pop(),n=e[e.length-1],t.previousSibling&&t.previousSibling.className==m&&n.appendChild(t.previousSibling),t.tagName==n.tagName&&t.previousSibling==n&&t.style.cssText==n.style.cssText&&t.className===n.className){for(;t.firstChild;)n.appendChild(t.firstChild);d.remove(t)}}}),b=v.extend({init:function(e,t){this.format=e,this.greedyProperty=t,v.fn.init.call(this,e)},getInlineCssValue:function(t){var n,i,o,r,a,s,l,c,u,h,p,f,g=t.attributes,m=e.trim;if(g)for(n=0,i=g.length;n=0?d.toHex(f):f}},getFormatInner:function(t){var n,i,o,r=e(d.isDataNode(t)?t.parentNode:t),a=r.parentsUntil("[contentEditable]").addBack().toArray().reverse();for(n=0,i=a.length;n#: messages.linkWebAddress ##: messages.linkText ##: messages.linkToolTip ##: messages.linkOpenInNewWindow ##: messages.dialogInsert ##: messages.dialogCancel #")({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"==d.name(t[0]),o=this.createDialog(this._dialogTemplate(),{title:r.createLink,close:s(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(s(this._apply,this)).end().find(".k-dialog-close").click(s(this._close,this)).end().find(".k-edit-field input").keydown(s(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,a=e("#k-editor-link-url",r).val(),s=e("#k-editor-link-text",r);a&&a!=k&&(a.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(a)&&(a="mailto:"+a),this.attributes={href:a},n=e("#k-editor-link-title",r).val(),n&&(this.attributes.title=n),s.is(":visible")&&(i=s.val(),i||this._initialText?i&&i!==this._initialText&&(this.attributes.innerText=d.stripBom(i)):this.attributes.innerText=a),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(),d.windowFromDocument(c.documentFromRange(this._range)).focus(),this.releaseRange(this._range)},linkUrl:function(e){return e?e.getAttribute("href",2):k},linkText:function(e){var t,n="";for(t=0;t-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}}),M=function(){return{node:null,offset:null,blank:function(){return null===this.node&&null===this.offset}}},F=r.extend({init:function(n){this.node=n.node,this.offset=n.offset===t?d.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,a,s;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,a=this.next(n),!a)for(s=n.parentNode;!a&&d.isInline(s);)a=this.next(s),s=s.parentNode;this.cancel=this.cancel||this.cancelAtNode(a),this._traverse(e,a)}},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){}}),R=F.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 R(t)}}),P=F.extend({subText:function(e,t){return e.substring(t)},next:function(e){return e.nextSibling},edgeNode:function(e){return e.firstChild},clone:function(e){var t=this.extendOptions(e);return new P(t)}});a(o.ui.editor,{LinkFormatFinder:C,LinkFormatter:S,UnlinkCommand:T,LinkCommand:D,AutoLinkCommand:A,UnlinkTool:I,DomTextLinkDetection:E,LeftDomTextTraverser:R,RightDomTextTraverser:P}),b("createLink",new p({key:"K",ctrl:!0,command:D,template:new f({template:u.buttonTemplate,title:"Create Link"})})),b("unlink",new I({key:"K",ctrl:!0,shift:!0,template:new f({template:u.buttonTemplate,title:"Remove Link"})})),b("autoLink",new p({key:[w.ENTER,w.SPACEBAR],keyPressCommand:!0,command:A}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/formatblock.min",["editor/plugins/format.min"],e)}(function(){!function(e){var t,n=window.kendo,i=n.Class,o=e.extend,r=n.ui.editor,a=n.ui.Editor.fn.options.formats,s=r.Dom,l=r.ToolTemplate,d=r.FormatTool,c=r.EditorUtils,u=c.registerTool,h=c.registerFormat,p=r.RangeUtils,f=i.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,o;for(n=0,i=t.length;n=0&&!(o=s.ofType(t[n],a[r].tags)?t[n]:s.closestEditableOfType(t[n],a[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=0;a--)l=i.immutableParent(e[a]),l&&(l!==e[a+1]&&(t?s.attr(l,n.attr):s.unstyle(l,n.attr.style)),e.splice(a,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=0?new i.GreedyInlineFormatter(a):new i.GreedyBlockFormatter(a),t.editor=n.editor,t}})},initialize:function(e,t){var i,r=t.editor,a=this.options,s=a.name,l=this;l.editor=r,e.width(a.width),i=e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:a.items||r.options[s],title:r.options.messages[s],autoSize:!0,change:function(){var e=this.dataItem();e&&o.exec(r,s,e.toJSON())},dataBound:function(){var e,t=this.dataSource.data();for(e=0;e#:data.text#')}).data("kendoSelectBox"),e.attr("title",t.title),i.wrapper.attr("title",t.title),e.addClass("k-decorated").closest(".k-widget").removeClass("k-"+s).find("*").addBack().attr("unselectable","on")},getFormattingValue:function(t,n){var i,o,r,a,s,l,d;for(i=0;i=0;t--)n=e[t],this.immutableParent(n)||this.clean(n);this.releaseRange(i)},clean:function(n){var o,r,a,s,d;if(n&&!l.isMarker(n)){if(o=l.name(n),"ul"==o||"ol"==o)for(r=new i.ListFormatter(o),a=n.previousSibling,s=n.nextSibling,r.unwrap(n);a&&a!=s;a=a.nextSibling)this.clean(a);else if("blockquote"==o)l.changeTag(n,"p");else if(1!=n.nodeType||l.insignificant(n))t(n);else{for(d=n.childNodes.length-1;d>=0;d--)this.clean(n.childNodes[d]);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:p}),u("formatting",new h({template:new r({template:d.dropDownListTemplate,title:"Format"})})),u("cleanFormatting",new o({command:p,template:new r({template:d.buttonTemplate,title:"Clean formatting"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/image.min",["kendo.imagebrowser.min","editor/command.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=n.ui.editor,r=o.EditorUtils,a=o.Dom,s=r.registerTool,l=o.ToolTemplate,d=o.RangeUtils,c=o.Command,u=n.keys,h="#k-editor-image-url",p="#k-editor-image-title",f="#k-editor-image-width",g="#k-editor-image-height",m=c.extend({init:function(e){var t=this;c.fn.init.call(t,e),t.async=!0,t.attributes={}},insertImage:function(e,t){var n,i=this.attributes,o=d.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=a.create(o,"img",i),e.onload=e.onerror=n,t.deleteContents(),t.insertNode(e),e.nextSibling||a.insertAfter(o.createTextNode("\ufeff"),e),n(),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;e.onload=e.onerror=n,a.attr(e,i),n()}return!1},_dialogTemplate:function(e){return n.template('# if (showBrowser) { ## } ##: messages.imageWebAddress ##: messages.imageAltText ##: messages.imageWidth ##: messages.imageHeight ##: messages.dialogInsert ##: messages.dialogCancel #')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();e.insertImage(d.image(t),t)||e.releaseRange(t)},exec:function(){function e(e){var t=s.element,n=parseInt(t.find(f).val(),10),i=parseInt(t.find(g).val(),10);m.attributes={src:t.find(h).val().replace(/ /g,"%20"),alt:t.find(p).val()},m.attributes.width=null,m.attributes.height=null,!isNaN(n)&&n>0&&(m.attributes.width=n),!isNaN(i)&&i>0&&(m.attributes.height=i),_=m.insertImage(b,v),o(e),m.change&&m.change()}function o(e){e.preventDefault(),s.destroy(),a.windowFromDocument(d.documentFromRange(v)).focus(),_||m.releaseRange(v)}function r(t){t.keyCode==u.ENTER?e(t):t.keyCode==u.ESC&&o(t)}var s,l,c,m=this,v=m.lockRange(),_=!1,b=d.image(v),w=b&&b.getAttribute("width")||"",k=b&&b.getAttribute("height")||"",y=n.support.browser.msie,x=m.editor.options,C=x.messages,S=x.imageBrowser,T=!!(n.ui.ImageBrowser&&S&&S.transport&&S.transport.read!==t),D={title:C.insertImage,visible:!1,resizable:T};this.expandImmutablesIn(v),D.close=o,T&&(D.width=750),s=this.createDialog(m._dialogTemplate(T),D).toggleClass("k-filebrowser-dialog",T).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(o).end().find(".k-edit-field input").keydown(r).end().find(h).val(b?b.getAttribute("src",2):"http://").end().find(p).val(b?b.alt:"").end().find(f).val(w).end().find(g).val(k).end().data("kendoWindow"),l=s.element,T&&(this._imageBrowser=new n.ui.ImageBrowser(l.find(".k-imagebrowser"),i({},S)),this._imageBrowser.bind("change",function(e){"f"===e.selected.get("type")&&l.find(h).val(this.value())}),this._imageBrowser.bind("apply",e)),y&&(c=l.closest(".k-window").height(),l.css("max-height",c)),s.center().open(),l.find(h).focus().select()}});n.ui.editor.ImageCommand=m,s("insertImage",new o.Tool({command:m,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/plugins/import.min",["editor/main.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=e.proxy,r=n.ui.editor,a=r.EditorUtils,s=r.Command,l=r.Tool,d=a.registerTool,c=r.ToolTemplate,u='',h=s.extend({exec:function(){(this.editor._uploadWidget||this._initializeUploadWidget()).element.click()},_initializeUploadWidget:function(){var t=this,n=t.editor,i=n.options["import"],r=e('').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}),d("import",new l({command:h,template:new c({template:a.buttonTemplate,title:"Import"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/insert.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=t.ui.editor,i=n.Command,o=n.GenericCommand,r=n.EditorUtils,a=r.registerTool,s=n.Tool,l=n.ToolTemplate,d=n.RestorePoint,c=e.extend,u=i.extend({init:function(e){i.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e,t=this.editor,n=this.options,i=n.range,r=t.body,a=new d(i,r),s=n.html||n.value||"";t.selectRange(i),t.clipboard.paste(s,n),n.postProcess&&n.postProcess(t,t.getRange()),e=new o(a,new d(t.getRange(),r)),e.editor=t,t.undoRedoStack.push(e),t.focus()}}),h=s.extend({initialize:function(e,t){var i=t.editor,o=this.options,r=o.items?o.items:i.options.insertHtml;this._selectBox=new n.SelectBox(e,{dataSource:r,dataTextField:"text",dataValueField:"value",change:function(){s.exec(i,"insertHtml",this.value())},title:i.options.messages.insertHtml,highlightFirst:!1}),e.attr("title",t.title),this._selectBox.wrapper.attr("title",t.title)},command:function(e){return new u(e)},update:function(e){var t=e.data("kendoSelectBox")||e.find("select").data("kendoSelectBox");t.close(),t.value(t.options.title)}});c(n,{InsertHtmlCommand:u,InsertHtmlTool:h}),a("insertHtml",new h({template:new l({template:r.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/export.min",["editor/main.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=e.proxy,r=n.ui.editor,a=r.EditorUtils,s=r.Command,l=r.Tool,d=a.registerTool,c=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=s.extend({init:function(e){var t=this;t.options=e,s.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("").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("").attr({value:t.encodedValue(),name:"value",type:"hidden"})},exportTypeInput:function(){var t=this;return e("").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("").attr({value:i,name:"fileName",type:"hidden"})}}),p=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,r=this,a=t.editor,s=r.options,l=s.name,d=o(r.changeHandler,r),c=s.items||a.options[l];c.unshift({text:a.options.messages[l],value:""}),r.editor=a,e.width(s.width),i=e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:c,autoSize:!0,change:d,open:function(e){var t=e.sender;t.items()[0].style.display="none",t.unbind("open")},highlightFirst:!1,template:n.template('#:data.text#')}).data("kendoSelectBox"),e.attr("title",t.title),i.wrapper.attr("title",t.title),e.addClass("k-decorated").closest(".k-widget").removeClass("k-"+l).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:p,ExportAsCommand:h}),d("exportAs",new p({template:new c({template:a.dropDownListTemplate,title:"Export As"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/indent.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e,t){function n(n,i){var o="rtl"==e(n).css("direction"),r=o?"Right":"Left",a="td"!=s.name(n)?"margin"+r:"padding"+r;return i===t?n.style[a]||0:(i>0?n.style[a]=i+"px":(n.style[a]="",n.style.cssText||n.removeAttribute("style")),t)}var i=window.kendo,o=i.Class,r=e.extend,a=i.ui.editor,s=a.Dom,l=a.EditorUtils,d=l.registerTool,c=a.Command,u=a.Tool,h=a.ToolTemplate,p=a.RangeUtils,f=s.blockElements,g=a.BlockFormatFinder,m=a.BlockFormatter,v=o.extend({init:function(){this.finder=new g([{tags:s.blockElements}])},apply:function(t){var i,o,r,a,l,d,c,u,h,p,f,g;if(t=s.filterBy(t,s.htmlIndentSpace,!0),i=this.finder.findSuitable(t),o=[],i=this.mapImmutables(i),i.length){for(r=0,a=i.length;r1||n(u.parentNode))||s.ofType(u,["ul","ol"])&&l>0),r)return i.removeClass("k-state-disabled"),t;i.addClass("k-state-disabled").removeClass("k-state-hover")}});r(a,{IndentFormatter:v,IndentCommand:_,OutdentCommand:b,OutdentTool:w}),d("indent",new u({command:_,template:new h({template:l.buttonTemplate,title:"Indent"})})),d("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/plugins/linebreak.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,o=i.Dom,r=i.Command,a=i.Tool,s=i.BlockFormatter,l=o.normalize,d=i.RangeUtils,c=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){var n,i;if(o.isEmpty(t))e.setStartBefore(t);else{if(e.selectNodeContents(t),n=d.textNodes(e)[0],!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"),i=n.firstChild||n,o.isDataNode(i)?e.setStart(i,0):e.setStartBefore(i))}},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,a,c,u,h,p,f,g,m,v,_,b,w=this.getRange(),k=d.documentFromRange(w),y=i.emptyElementContent;this.expandImmutablesIn(w),g=this.shouldTrim(w),w.deleteContents(),c=this._insertMarker(k,w),o.stripBomNode(c.previousSibling),o.stripBomNode(c.nextSibling),u=o.closestEditableOfType(c,["li"]),h=o.closestEditableOfType(c,"h1,h2,h3,h4,h5,h6".split(",")),p=o.is(c.parentNode,"table")&&c.parentNode,u?o.emptyNode(u)&&(a=o.create(k,"p"),o.next(u)&&(f=w.cloneRange(),f.selectNode(u),d.split(f,u.parentNode)),m=e("br",u),1==m.length&&m.remove(),v=u.parentNode,_=u.parentNode.children.length,b=_>1&&1==u.childNodes.length&&u.children[0],o.insertAfter(a,v),o.remove(1==_?u.parentNode:u),b&&b!==c?(a.appendChild(b),a.appendChild(c)):a.innerHTML=y,r=a):h&&this._blankAfter(c)?(a=this._insertParagraphAfter(h),o.remove(c),r=a):p&&(a=this._insertParagraphAfter(p),o.remove(c),r=a),r||(u||h||new s([{tags:["p"]}]).apply([c]),w.selectNode(c),t=o.parentOfType(c,[u?"li":h?o.name(h):"p"]),d.split(w,t,g),n=t.previousSibling,o.is(n,"li")&&n.firstChild&&!o.is(n.firstChild,"br")&&(n=n.firstChild),r=t.nextSibling,this.clean(n,{links:!0}),this.clean(r,{links:!0}),o.is(r,"li")&&r.firstChild&&!o.is(r.firstChild,"br")&&(r=r.firstChild),o.remove(t),l(n)),l(r),this._moveFocus(w,r),w.collapse(!0),o.scrollTo(r,!0),d.selectRange(w)},_insertParagraphAfter:function(e){var t=this.getRange(),n=d.documentFromRange(t),r=i.emptyElementContent,a=o.create(n,"p");return o.insertAfter(a,e),a.innerHTML=r,a},clean:function(t,n){var r,a=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(a).find(".k-br").remove(),t.innerHTML=i.emptyElementContent),n&&n.links)for(;t!=a;){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,a,s,c=this.getRange();this.expandImmutablesIn(c),e=o.create(d.documentFromRange(c),"br"),n=c.startContainer,r=t.support.browser,a=r.msie&&r.version<11,s=o.is(n,"table")&&n,c.deleteContents(),s?o.insertAfter(e,s):c.insertNode(e),l(e.parentNode),a||e.nextSibling&&!o.isWhitespace(e.nextSibling)||(i=e.cloneNode(!0),i.className="k-br",o.insertAfter(i,e)),c.setStartAfter(e),c.collapse(!0),o.scrollTo(e.nextSibling||e,!0),d.selectRange(c)}});n(i,{ParagraphCommand:u,NewLineCommand:h}),c("insertLineBreak",new a({key:13,shift:!0,command:h})),c("insertParagraph",new a({key:13,command:u}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/file.min",["kendo.filebrowser.min","editor/plugins/link.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=n.ui.editor,r=o.EditorUtils,a=o.Dom,s=r.registerTool,l=o.ToolTemplate,d=o.RangeUtils,c=o.Command,u=o.LinkFormatter,h=d.textNodes,p=n.keys,f="#k-editor-file-url",g="#k-editor-file-text",m="#k-editor-file-title",v=c.extend({init:function(e){var t=this;c.fn.init.call(t,e),t.formatter=new u,t.async=!0,t.attributes={}},insertFile:function(e,t){var n=this.attributes,i=d.documentFromRange(t);if(n.href&&"http://"!=n.href){if(!e)return e=a.create(i,"a",{href:n.href}),e.innerHTML=n.innerHTML,e.title=n.title,t.deleteContents(),t.insertNode(e),e.nextSibling||a.insertAfter(i.createTextNode("\ufeff"),e),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;a.attr(e,n)}return!1},_dialogTemplate:function(e){return n.template('# if (showBrowser) { ## } ##: messages.fileWebAddress ##: messages.fileText ##: messages.fileTitle ##: messages.dialogInsert ##: messages.dialogCancel #')({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=s.element,n=t.find(f).val().replace(/ /g,"%20"),i=t.find(g).val(),r=t.find(m).val();u.attributes={href:n,innerHTML:""!==i?i:n,title:r},b=u.insertFile(w,v),o(e),u.change&&u.change()}function o(e){e.preventDefault(),s.destroy(),a.windowFromDocument(d.documentFromRange(v)).focus(),b||u.releaseRange(v)}function r(t){t.keyCode==p.ENTER?e(t):t.keyCode==p.ESC&&o(t)}var s,l,c,u=this,v=u.lockRange(),_=h(v),b=!1,w=_.length?this.formatter.finder.findSuitable(_[0]):null,k=n.support.browser.msie,y=u.editor.options,x=y.messages,C=y.fileBrowser,S=!!(n.ui.FileBrowser&&C&&C.transport&&C.transport.read!==t),T={title:x.insertFile,visible:!1,resizable:S};this.expandImmutablesIn(v),T.close=o,S&&(T.width=750),s=this.createDialog(u._dialogTemplate(S),T).toggleClass("k-filebrowser-dialog",S).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(o).end().find(".k-edit-field input").keydown(r).end().find(f).val(w?w.getAttribute("href",2):"http://").end().find(g).val(w?w.innerText:"").end().find(m).val(w?w.title:"").end().data("kendoWindow"),l=s.element,S&&(u._fileBrowser=new n.ui.FileBrowser(l.find(".k-filebrowser"),i({},C)),u._fileBrowser.bind("change",function(e){"f"===e.selected.get("type")&&l.find(f).val(this.value())}),u._fileBrowser.bind("apply",e)),k&&(c=l.closest(".k-window").height(),l.css("max-height",c)),s.center().open(),l.find(f).focus().select()}});n.ui.editor.FileCommand=v,s("insertFile",new o.Tool({command:v,template:new l({template:r.buttonTemplate,title:"Insert File"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/tables.min",["editor/plugins/formatblock.min","editor/plugins/insert.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=e.proxy,r=n.ui.editor,a=r.Dom,s=r.EditorUtils,l=r.RangeUtils,d=r.Command,c="kendoEditor",u="k-state-active",h="k-state-selected",p="scope",f="row",g="col",m="rowgroup",v="colgroup",_="colspan",b="rowspan",w="table",k="thead",y="tbody",x="tr",C="td",S="th",T=r.Tool,D=r.ToolTemplate,A=r.InsertHtmlCommand,I=r.BlockFormatFinder,E=r.EditorUtils.registerTool,M=n.getTouches,F=n.template,R="#=content#",P=new I([{tags:[w]}]),z=A.extend({init:function(t){var n=e.extend({postProcess:this.postProcess,skipCleaners:!0},t||{});A.fn.init.call(this,n)},_tableHtml:function(e,t){var n,i;return e=e||1,t=t||1,n=F(R)({width:100/t,content:r.emptyTableCellContent}),i=100/e,""+Array(e+1).join(""+Array(t+1).join(n)+"")+""},postProcess:function(t,n){var i=e("table[data-last]",t.document).removeAttr("data-last");n.setStart(i.find(C)[0],0),n.collapse(!0),t.selectRange(n)},exec:function(){var e=this.options;e.html=this._tableHtml(e.rows,e.columns),A.fn.exec.call(this)}}),B=T.extend({initialize:function(t,n){var i,a,l,d;T.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)),a=this._editor=n.editor,this._popup=i,l=new r.TableWizardTool({template:new D({template:s.tableWizardButtonTemplate,title:a.options.messages.tableWizard}),command:r.TableWizardCommand,insertNewTable:!0}),E("tableWizardInsert",l),d=e(""+l.options.template.getHtml()+""),d.appendTo(i.element),a.toolbar&&a.toolbar.attachToolsEvents(d)},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()}}),L=B.extend({init:function(t){this.cols=8,this.rows=6,B.fn.init.call(this,e.extend(t,{command:z,popupTemplate:""+Array(this.cols*this.rows+1).join("")+""}))},_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,a=r._popup.element,s=a.find(".k-ct-cell"),l=s.eq(0),d=s.eq(s.length-1),u=n.getOffset(l),h=n.getOffset(d),p=r.cols,f=r.rows;a.find("*").addBack().attr("unselectable","on"),h.left+=d[0].offsetWidth,h.top+=d[0].offsetHeight,i=(h.left-u.left)/p,o=(h.top-u.top)/f,a.autoApplyNS(c).on("mousemove",".k-ct-cell",function(e){r._setTableSize(t(e))}).on("mouseleave",".k-ct-cell",function(){r._setTableSize()}).on("down",".k-ct-cell",function(e){e.preventDefault();var n=M(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"),a=this.cols,s=this._editor.options.messages;this._valid(t)?(o.text(n.format(s.createTableHint,t.row,t.col)),r.each(function(n){e(this).toggleClass(h,n%a=0;a--)if(o=t.rows[a],r=e(o).find("[col-index="+i+"]"),r.length)return r},_resetTableResizing:function(e){e._destroyResizings(),e._initializeColumnResizing(),e._initializeRowResizing(),e._initializeTableResizing()},_findNextTdInRow:function(e,t){var n,i,o=e.find("td:last-child"),r=parseInt(o.attr("col-index"),10)+o.prop("colSpan")-1;for(i=t;i<=r;i++)if(n=e.find("[col-index="+i+"]"),n.length)return n},_adjustColgroups:function(e,t){for(var n,i,o,r=t.getElementsByTagName(g),s=t.getElementsByTagName(v),l=e.cells,d=l.length;r.length>0;)r[0].remove();for(;s.length>0;)s[0].remove();for(n=d-1;n>=0;n--)o=l[n],o.getAttribute(p)===v?(i=a.createEmptyNode(this.editor.document,v),i.setAttribute("span",o.getAttribute(_)),t.prepend(i)):t.prepend(a.createEmptyNode(this.editor.document,g))},_associateHeaderIds:function(t){a.clearTableMappings(t,"col-index"),a.reMapTableColumns(t,"col-index"),e(t).find("th, td").removeAttr("id headers"),a.associateWithIds(t)},_getNumberOfColumns:function(e){return a._getNumberOfColumns(e,"td, th")}}),N=H.extend({exec:function(){var n,i,o,s,l,d,c,u,h=this.lockRange(!0),g=a.closest(h.endContainer,[C,S]),v=a.closest(g,w),_=this.options.position||"after";if(!v||this.immutables()&&r.Immutables.immutableParent(g))return this.releaseRange(h),t;for(this._mapColIndices(v),i=g.parentNode,l=a.findNodeIndex(i,!0),g.rowSpan>1&&"after"===_&&(i=v.rows[l+g.rowSpan-1]),n=this._getNumberOfColumns(v),s=i.cloneNode(!0),e(s).empty(),u=0;u1&&"after"===_&&o?o.attr(b,o.prop("rowSpan")+1):this._appendCell(s,o):(l=a.findNodeIndex(i,!0),o=this._findRowSpanCell(i.parentElement,l,u),d=o.closest(x).index(),d+o.prop("rowSpan")-1===l&&"after"===_?this._appendCell(s,o):o.attr(b,o.prop("rowSpan")+1)),c=e(s).find("[col-index="+u+"]"),c.attr(p)!==m||c.attr(b)||c.attr(p,f);"before"==_?a.insertBefore(s,i):a.insertAfter(s,i),e(v).find("[headers]").length>0&&this._associateHeaderIds(v),this._clearColIndexAttr(v),this.releaseRange(h),this._resetTableResizing(this.editor)},_appendCell:function(e,t){var n;n=t.clone(),n.html(r.emptyTableCellContent),n.removeAttr(b),n.appendTo(e)}}),O=H.extend({exec:function(){var n,i,o,s,l=this.lockRange(!0),d=a.closest(l.endContainer,[C,S]),c=a.closest(d,w),u=c.getElementsByTagName(g),h=c.getElementsByTagName(v),f=c&&c.rows,m=this.options.position||"after";if(!d||this.immutables()&&r.Immutables.immutableParent(d))return this.releaseRange(l),t;for(this._mapColIndices(c),n=parseInt(d.getAttribute("col-index"),10),d.colSpan>1&&"after"===m&&(d.setAttribute("col-index",n+d.colSpan-1),n=n+d.colSpan-1),i=0;i0||h.length>0)&&this._adjustColgroups(f[0],c),e(c).find("[headers]").length>0&&this._associateHeaderIds(c),this._clearColIndexAttr(c),this.releaseRange(l),this._resetTableResizing(this.editor)},_processForColSpan:function(n,i,o,r){var a,s,l=i-1;if(a=e(n).find("[col-index="+i+"]")[0],a&&a.colSpan>1&&"after"===o&&a!==r)return a.colSpan+=1,t;if(a)return a;for(l;l>=0&&(a=e(n).find("[col-index="+l+"]")[0],!(a&&a.colSpan>1));l--);return a?(s=parseInt(a.getAttribute("col-index"),10)+a.colSpan-1,s===i&&"after"===o?a:(i<=s&&a.setAttribute(_,a.colSpan+1),t)):t},_resizeCells:function(e,t){var n,i,o,r=e.style.width;r&&(n=parseFloat(r),i=r.slice((""+n).length),o=n/2+i,e.style.width=o,t.style.width=o)}}),V=H.extend({exec:function(){var n,i,o,s=this.lockRange(),d=l.mapAll(s,function(t){return e(t).closest(x)[0]}),c=a.closest(s.endContainer,[C,S]),u=d[0],h=c?c.rowSpan:1,p=e(d[0]).index(),f=a.closest(u,w),g=u.parentElement;if(!f||this.immutables()&&r.Immutables.immutableParent(u))return this.releaseRange(s),t;for(i=0;i0?this._associateHeaderIds(f):a.is(g,k)&&e(f).find("[scope]").length>0&&this._adjustColgroups(g.rows[0],f),n&&(s.setStart(n,0),s.collapse(!0),this.editor.selectRange(s)),this._resetTableResizing(this.editor)},_handleRowSpanCells:function(t,n){var i,o,r,s,l=a.findNodeIndex(n,!0),d=t.rows[0],c=d.cells[d.cells.length-1],u=parseInt(c.getAttribute("col-index"),10)+c.colSpan-1;for(i=0;i<=u;i+=o.prop("colSpan"))o=e(n).find("[col-index="+i+"]"),o.length&&o.prop("rowSpan")>1&&(s=t.rows[l+1],r=e(s).find("[col-index="+(i+1)+"]"),r.length?r.before(o):e(s).append(o),this._reduceRowSpan(o)),o.length||(o=this._findRowSpanCell(n.parentElement,l,i),this._reduceRowSpan(o))},_reduceRowSpan:function(e){var t=e.prop("rowSpan")-1;t<=1?(e.removeAttr(b),e.attr(p)===m&&e.attr(p,f)):e.attr(b,t)}}),W=H.extend({exec:function(){var n,i,o,s,l=this.lockRange(),d=a.closest(l.endContainer,[C,S]),c=a.closest(d,w),u=c&&c.rows,h=a.findNodeIndex(d,!0),p=u&&u[0].cells.length,f=c.getElementsByTagName(g),m=c.getElementsByTagName(v);if(!d||this.immutables()&&r.Immutables.immutableParent(d))return this.releaseRange(l),t;if(1==p||d.colSpan==p)n=a.next(c),n&&!a.insignificant(n)||(n=a.prev(c)),a.remove(c),this._resetTableResizing(this.editor);else{for(a.removeTextSiblings(d),n=a.next(d)||a.prev(d),this._mapColIndices(c),h=parseInt(d.getAttribute("col-index"),10),s=0;s0||m.length>0)&&this._adjustColgroups(u[0],c),e(c).find("[headers]").length>0&&this._associateHeaderIds(c),n&&(l.setStart(n,0),l.collapse(!0),this.editor.selectRange(l)),this._resetTableResizing(this.editor)},_handleColSpanCells:function(n,i){var o,r,a=e(n).find("[col-index="+i+"]");if(a.length&&a.prop("colSpan")>1)return o=a.clone(!0),a.after(o),this._reduceColSpan(o),o.attr("col-index",parseInt(a.attr("col-index"),10)+1),a.remove(),t;for(r=i;r>=0;r--)if(a=e(n).find("[col-index="+r+"]"),a.length)return this._reduceColSpan(a),a.attr("col-index",parseInt(a.attr("col-index"),10)+1),t},_reduceColSpan:function(e){var t=e.prop("colSpan")-1;t<=1?(e.removeAttr(_),e.attr(p)===v&&e.attr(p,g)):e.attr(_,t)}}),U=H.extend({exec:function(){var n,i,o,s,l,d=this.lockRange(),c=a.closest(d.endContainer,[C,S]);return c?(n=a.closest(c,w),i=c.parentNode,o=a.findNodeIndex(c,!0),s=i.children[o+1],this.immutables()&&r.Immutables.immutableParent(c)?(this.releaseRange(d),t):(this._mapColIndices(n),o=parseInt(e(c).attr("col-index"),10),s=e(i).find("[col-index="+(o+1+this._getColspan(c)-1)+"]").get(0),s&&s.rowSpan===c.rowSpan&&c.tagName===s.tagName?(l=this._getColspan(c)+this._getColspan(s),e(c).prop(_,l).append(a.emptyNode(s)?"":""+s.innerHTML),e(c).width(c.offsetWidth),e(s).remove(),c.getAttribute(p)===g&&c.setAttribute(p,v),c.getAttribute(p)===v&&this._adjustColgroups(i,n),e(n).find("[headers]").length>0&&this._associateHeaderIds(n),this._clearColIndexAttr(n),this.releaseRange(d),this._resetTableResizing(this.editor),t):(this._clearColIndexAttr(n),this.releaseRange(d),t))):(this.releaseRange(d),t)},_getColspan:function(e){return parseInt(e.getAttribute(_),10)||1}}),j=H.extend({exec:function(){var n,i,o,s,l,d,c,u=this.lockRange(),h=a.closest(u.endContainer,[C,S]);return h?(n=a.closest(h,x),i=a.closest(h,[k,y]),o=a.closest(h,w),s=a.findNodeIndex(h,!0),l=a.findNodeIndex(n,!0),l+1===i.rows.length?(this.releaseRange(u),t):(d=i.rows[l+this._getRowspan(h)],c=d&&d.children[s],this.immutables()&&r.Immutables.immutableParent(h)?(this.releaseRange(u),t):(this._mapColIndices(o),s=e(h).attr("col-index"),c=e(d).find("[col-index="+s+"]").get(0),c&&c.colSpan===h.colSpan&&h.tagName===c.tagName?(e(h).prop(b,this._getRowspan(h)+this._getRowspan(c)).append(a.emptyNode(c)?"":""+c.innerHTML),h.getAttribute(p)===f&&h.setAttribute(p,m),e(c).remove(),e(o).find("[headers]").length>0&&this._associateHeaderIds(o),this._clearColIndexAttr(o),this.releaseRange(u),t):(this._clearColIndexAttr(o),this.releaseRange(u),t)))):(this.releaseRange(u),t)},_getRowspan:function(e){return parseInt(e.getAttribute(b),10)||1}}),q=H.extend({exec:function(){var n=this.lockRange(),i=this.options.type,o="row"===i?_:b,s=a.closest(n.endContainer,[C,S]),l=a.closest(s,[k,y]),d=a.closest(s,w),c=a.createEmptyNode(this.editor.document,s.nodeName.toLowerCase());return!s||this.immutables()&&r.Immutables.immutableParent(s)?(this.releaseRange(n),t):(this._mapColIndices(d),"row"===i&&e(s).is("["+o+"]")?this._splitCellHorizontally(s,l,o,c):"column"===i&&e(s).is("["+o+"]")&&this._splitCellVertically(s,l,o,c),e(s).prop(o.toLowerCase())<=1&&e(s).removeAttr(o),e(d).find("[headers]").length>0&&this._associateHeaderIds(d),this._clearColIndexAttr(d),this.releaseRange(n),t)},_getRowspanValue:function(e){return parseInt(e.getAttribute(b),10)},_getColspanValue:function(e){return parseInt(e.getAttribute(_),10)},_splitCellHorizontally:function(t,n,i,o){var r=t.rowSpan,a=t.colSpan,s=e(o),l=Math.floor(a/2);l>1&&s.attr(_,l),r>1&&s.attr(b,r),e(t).prop(i,a-l).after(s),e(t).width(t.offsetWidth),s.width(s[0].offsetWidth),t.hasAttribute(p)&&(t.getAttribute(p)===v?(s.attr(p,g),t.getAttribute(_)&&"1"!==t.getAttribute(_)||t.setAttribute(p,g),this._adjustColgroups(t.parentNode,n.parentNode)):s.attr(p,t.getAttribute(p)))},_splitCellVertically:function(t,n,i,o){var r=a.closest(t,x),s=parseInt(e(t).attr("col-index"),10),l=a.findNodeIndex(r,!0),d=t.rowSpan,c=t.colSpan,u=Math.floor(d/2),h=e(n).find(x).eq(l+d-u),g=this._findNextTdInRow(h,s+c),v=e(o);u>1&&v.attr(b,u),c>1&&v.attr(_,c),g&&g.length?g.before(v):h.append(v),e(t).prop(i,d-u),t.hasAttribute(p)&&(t.getAttribute(p)===m?(v.attr(p,f),t.getAttribute(b)&&"1"!==t.getAttribute(b)||t.setAttribute(p,f)):v.attr(p,t.getAttribute(p)))}}),G=T.extend({command:function(e){var t={row:{insert:N,"delete":V,merge:U,split:q},column:{insert:O,"delete":W,merge:j,split:q}};return e=i(e,this.options),e.action=e.action||"insert",new t[e.type][e.action](e)},initialize:function(e,t){T.fn.initialize.call(this,e,t),e.addClass("k-state-disabled")},update:function(e,t){var n=!P.isFormatted(t);e.toggleClass("k-state-disabled",n)}});i(n.ui.editor,{PopupTool:B,TableCommand:z,InsertTableTool:L,TableModificationTool:G,InsertRowCommand:N,InsertColumnCommand:O,DeleteRowCommand:V,DeleteColumnCommand:W,MergeCellsHorizontallyCommand:U,MergeCellsVerticallyCommand:j,SplitCellCommand:q}),E("createTable",new L({template:new D({template:s.buttonTemplate,popup:!0,title:"Create table"})})),E("addColumnLeft",new G({type:"column",position:"before",template:new D({template:s.buttonTemplate,title:"Add column on the left"})})),E("addColumnRight",new G({type:"column",template:new D({template:s.buttonTemplate,title:"Add column on the right"})})),E("addRowAbove",new G({type:"row",position:"before",template:new D({template:s.buttonTemplate,title:"Add row above"})})),E("addRowBelow",new G({
type:"row",template:new D({template:s.buttonTemplate,title:"Add row below"})})),E("deleteRow",new G({type:"row",action:"delete",template:new D({template:s.buttonTemplate,title:"Delete row"})})),E("deleteColumn",new G({type:"column",action:"delete",template:new D({template:s.buttonTemplate,title:"Delete column"})})),E("mergeCellsHorizontally",new G({type:"row",action:"merge",template:new D({template:s.buttonTemplate,title:"Merge Cell Right"})})),E("mergeCellsVertically",new G({type:"column",action:"merge",template:new D({template:s.buttonTemplate,title:"Merge Cell Down"})})),E("splitCellHorizontally",new G({type:"row",action:"split",template:new D({template:s.buttonTemplate,title:"Split Cell"})})),E("splitCellVertically",new G({type:"column",action:"split",template:new D({template:s.buttonTemplate,title:"Split Cell"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/clipboard.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,o=i.RangeUtils,r=i.Dom,a=i.RestorePoint,s=i.Marker,l=t.support.browser,d=e.extend,c=n.extend({init:function(e){this.editor=e;var t=e.options.pasteCleanup;this.cleaners=[new h(t),new p(t),new f(t),new g(t),new v(t),new _(t),new y(t),new x(t)]},htmlToFragment:function(e){var t=this.editor,n=t.document,i=r.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 a(e,n.body),r.persistScrollTop(n.document),{range:e,restorePoint:t}},_endModification:function(e){i._finishUpdate(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=o.textNodes(e);for(t=0;t10))return t=e.clipboardData||e.originalEvent.clipboardData||window.clipboardData||{},n=t.items||t.files,this._insertImages(n)},_insertImages:function(t){var n,i,o;if(t&&(n=e.grep(t,function(e){return/^image\//i.test(e.type)}),i=e.grep(t,function(e){return/^text\/html/i.test(e.type)}),!i.length&&n.length&&(o=this._startModification())))return e.when.apply(e,e.map(n,this._fileToDataURL)).done(e.proxy(function(){var t=Array.prototype.slice.call(arguments),n=e.map(t,function(e){return''}).join("");this._triggerPaste(n),this._endModification(o)},this)),!0},onpaste:function(n){if("false"!==this.editor.body.contentEditable){if(this._handleImagePaste(n))return void n.preventDefault();this.expandImmutablesIn(),this._contentModification(function(i,o){var a,s,l,d=r.create(i.document,"div",{className:"k-paste-container",innerHTML:"\ufeff"}),c=t.support.browser,u=i.body;this._decoreateClipboardNode(d,u),u.appendChild(d),c.webkit&&this._moveToCaretPosition(d,o),c.msie&&c.version<11?(n.preventDefault(),a=i.createRange(),a.selectNodeContents(d),i.selectRange(a),s=i.document.body.createTextRange(),s.moveToElementText(d),e(u).unbind("paste"),s.execCommand("Paste"),e(u).bind("paste",e.proxy(this.onpaste,this))):(l=i.createRange(),l.selectNodeContents(d),i.selectRange(l)),o.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&&r.is(e,"br")&&r.remove(e),o+=this.innerHTML}),i.remove(),this._triggerPaste(o,{clean:!0})})}},ondragover:function(e){(l.msie||l.edge)&&(e.stopPropagation(),e.preventDefault())},ondrop:function(e){var t,n;"FileReader"in window&&(t=(e.originalEvent||e).dataTransfer||{},n=t.items||t.files,this._insertImages(n)&&e.preventDefault())},_decoreateClipboardNode:function(t,n){var i,o,r,a;(l.msie||l.webkit)&&(t=e(t),t.css({borderWidth:"0px",width:"0px",height:"0px",overflow:"hidden",margin:"0",padding:"0"}),l.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),a=i.css("fontSize"),a&&t.css("fontSize",a)))},_moveToCaretPosition:function(t,n){var i=this,o=i.editor.body,a=r.offset(t,o),s=i._caretOffset(n,o),l=s.left-a.left,d=s.top-a.top,c="translate("+l+"px,"+d+"px)";e(t).css({"-webkit-transform":c,transform:c})},_caretOffset:function(e,t){var n,i,o,a,s,l,d=this.editor,c=r.create(d.document,"span",{innerHTML:"\ufeff"}),u=e.startContainer;return e.collapsed?(i=r.isDataNode(u),i&&(r.isBom(u)||0===e.startOffset)?r.insertBefore(c,u):i&&e.startOffset===u.length?r.insertAfter(c,u):(e.insertNode(c),n=!0)):(u=u===t?u.childNodes[e.startOffset]:u,r.insertBefore(c,u)),o=r.offset(c,t),a=c.previousSibling,s=c.nextSibling,r.remove(c),n&&r.isDataNode(a)&&r.isDataNode(s)&&!r.isBom(a)&&!r.isBom(s)&&(l=a.length,s.data=a.data+s.data,e.setStart(s,l),r.remove(a),e.collapse(!0),d.selectRange(e)),o},expandImmutablesIn:function(e){var n,i,o,r=this.editor;r&&r.options.immutables&&(n=r.body,e=e||r.getRange(),t.ui.editor.Immutables.expandImmutablesIn(e),e.startContainer===n&&0===e.startOffset&&(i=n.ownerDocument,o=i.createTextNode("\ufeff"),n.insertBefore(o,n.childNodes[0]),e.setStartBefore(o)),r.selectRange(e))},splittableParent:function(e,t){var n,i;if(e)return r.closestEditableOfType(t,["p","ul","ol"])||t.parentNode;if(n=t.parentNode,i=t.ownerDocument.body,r.isInline(n))for(;n.parentNode!=i&&!r.isBlock(n.parentNode);)n=n.parentNode;return n},paste:function(t,n){var i,a,l,c,u,h,p,f,g,m,v,_,b,w,k,y,x,C=this.editor;if(this.expandImmutablesIn(),n=d({clean:!1,split:!0},n),!n.skipCleaners)for(i=0,a=this.cleaners.length;i(\s| )*)+(<\/?(div|p|li|col|t))/gi,"$3"),t=t.replace(/<(a|span)[^>]*><\/\1>/gi,"")),t=t.replace(/<(a|span|font)([^>]*)> <\/\1>/gi,"<$1$2> $1>"),t=t.replace(/^$/g,"li>"),c=this.isBlock(t),C.focus(),u=C.getRange(),u.deleteContents(),u.startContainer==C.document&&u.selectNodeContents(C.body),h=new s,p=h.addCaret(u),f=this.splittableParent(c,p),g=!1,m=f!=C.body&&!r.is(f,"td"),n.split&&m&&(c||r.isInline(f))&&(u.selectNode(p),o.split(u,f,!0),g=!0),v=this.htmlToFragment(t),v.firstChild&&"k-paste-container"===v.firstChild.className){for(_=[],i=0,a=v.childNodes.length;i"))}if(l=v.childNodes,e(l).filter("table").addClass("k-table").end().find("table").addClass("k-table"),e(l).each(function(e,t){r.isBlock(t)&&!r.isSelfClosing(t)&&""===t.innerHTML&&t.appendChild(C.document.createTextNode("\ufeff"))}),u.insertNode(v),f=this.splittableParent(c,p),g){for(;p.parentNode!=f;)r.unwrap(p.parentNode);r.unwrap(p.parentNode)}if(r.normalize(u.commonAncestorContainer),p.style.display="inline",r.restoreScrollTop(C.document),r.scrollTo(p),h.removeCaret(u),b=u.commonAncestorContainer.parentNode,(u.collapsed&&"tbody"==r.name(b)||u.collapsed&&"thead"==r.name(b))&&(u.setStartAfter(e(b).closest("table")[0]),u.collapse(!0)),w=e(u.commonAncestorContainer.parentNode).closest("table"),w.get(0)){for(k=w.parent().contents(),y=k.length-1,x=k.get(y);null!==x.nodeValue&&(" "===x.nodeValue||""===x.nodeValue);)y-=1,x=k.get(y);x!==w.get(0)||w.parents("table").length||r.insertAfter(r.createEmptyNode(C.document,"p"),w[0])}C.selectRange(u)}}),u=n.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,"<$1telerik:script$2>"]},applicable:function(e){return!this.options.none&&/#: messages.apply ##: messages.cancel #"
},_generateFormats:function(){var i,o=this.options;o.currencies||(o.currencies=f.currenciesFrom(e.cultures)),o.numberFormats||(o.numberFormats=[{value:"#.00%",name:"100.00%"},{value:"#%",name:"100%"},{value:"#.00",name:"1024.00"},{value:"#,###.00",name:"1,024.00"}]),o.dateFormats||(i=e.cultures.current.calendars.standard.patterns,o.dateFormats=n("value",l.map(i,function(e){if(e=p.convert.date(e))return{value:e,name:t(34567.7678,e)}})))},open:function(t){var n,i,o=this.options,r=t.value(),a=o.categories.slice(0);this.viewModel=new p({currencies:o.currencies.slice(0),allFormats:{numberFormats:o.numberFormats.slice(0),dateFormats:o.dateFormats.slice(0)},categories:a,format:t.format(),category:r instanceof Date?a[2]:a[0],apply:this.apply.bind(this),close:this.close.bind(this),value:r}),h.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;h.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:"format",value:e}})}}),f.currenciesFrom=function(t){return n("description",l.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",f),e.spreadsheet.dialogs.FormatCellsDialog=f,g=h.extend({options:{className:"k-spreadsheet-message",title:"",messageId:"",text:"",template:"#= messages.okText #"},open:function(){var t,n;h.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",g),m=h.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.confirmationDialog||c,i={title:n.title,text:n.text};h.fn.init.call(this,l.extend(i,t))},options:{className:"k-spreadsheet-message",messageId:"",template:"#= messages.okText ##= messages.cancel #"},open:function(){var t,n;h.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",m),v=h.extend({options:{className:"k-spreadsheet-message",title:"",messageId:"",text:"",template:"#= messages.retry ##= messages.cancel #"},open:function(){var t,n;h.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",v),_=h.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.fontFamilyDialog||c;h.fn.init.call(this,l.extend({title:n.title},t)),this._list()},options:{template:""},_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){h.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:"fontFamily",value:e.sender.value()[0]}})}}),e.spreadsheet.dialogs.register("fontFamily",_),b=h.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.fontSizeDialog||c;h.fn.init.call(this,l.extend({title:n.title},t)),this._list()},options:{template:""},_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){h.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:"fontSize",value:e.parseInt(t.sender.value()[0])}})}}),e.spreadsheet.dialogs.register("fontSize",b),w=h.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.bordersDialog||c;h.fn.init.call(this,l.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:"#: messages.apply ##: messages.cancel #"},apply:function(){h.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",w),k=h.extend({init:function(t){h.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:"#: messages.apply ##: messages.cancel #"},apply:function(){h.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)}}),y=k.extend({init:function(e){e.width=177,k.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",y),x=k.extend({init:function(e){e.width=268,k.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",x),C=h.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.alignmentDialog||c,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}]};h.fn.init.call(this,l.extend(i,t)),this._list()},options:{template:""},_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:"#=text#",change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(e){var t=e.sender.value()[0];h.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:t.property,value:t.value}})}}),e.spreadsheet.dialogs.register("alignment",C),S=h.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.mergeDialog||c,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}]};h.fn.init.call(this,l.extend(i,t)),this._list()},options:{template:""},_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:"#=text#",change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(e){var t=e.sender.value()[0];h.fn.apply.call(this),this.trigger("action",{command:"MergeCellCommand",options:{value:t.value}})}}),e.spreadsheet.dialogs.register("merge",S),T=h.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.freezeDialog||c,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}]};h.fn.init.call(this,l.extend(i,t)),this._list()},options:{template:""},_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:"#=text#",change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(e){var t=e.sender.value()[0];h.fn.apply.call(this),this.trigger("action",{command:"FreezePanesCommand",options:{value:t.value}})}}),e.spreadsheet.dialogs.register("freeze",T),D=e.spreadsheet.ValidationCellsViewModel=d.extend({init:function(e){d.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#= message #',template:'#: messages.validationDialog.labels.criteria #:#: messages.validationDialog.labels.comparer #:#: messages.validationDialog.labels.min #:#: messages.validationDialog.labels.max #:#: messages.validationDialog.labels.comparer #:#: messages.validationDialog.labels.value #:#: messages.validationDialog.labels.comparer #:#: messages.validationDialog.labels.start #:#: messages.validationDialog.labels.end #:#: messages.validationDialog.labels.value #:#: messages.validationDialog.labels.value #:#: messages.validationDialog.labels.showListButton ##: messages.validationDialog.labels.showCalendarButton ##: messages.validationDialog.labels.ignoreBlank ##: messages.validationDialog.labels.onInvalidData #:#: messages.validationDialog.labels.rejectInput # #: messages.validationDialog.labels.showWarning ##: messages.validationDialog.labels.showHint ##: messages.validationDialog.labels.hintTitle #:#: messages.validationDialog.labels.hintMessage #:#: messages.remove ##: messages.apply ##: messages.cancel #'},open:function(t){var n,i=this.options;this.viewModel=new D({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()),h.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()&&(h.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",A),e.spreadsheet.dialogs.ValidationDialog=A,I=h.extend({init:function(t){h.fn.init.call(this,t),t=this.options,this.viewModel=e.observable({title:t.title,name:t.name,extension:t.extension,fileFormats:t.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:t.pdf.fitWidth,area:t.pdf.area,areas:t.pdf.areas,paperSize:t.pdf.paperSize,paperSizes:t.pdf.paperSizes,margin:t.pdf.margin,margins:t.pdf.margins,landscape:t.pdf.landscape,guidelines:t.pdf.guidelines,hCenter:t.pdf.hCenter,vCenter:t.pdf.vCenter},apply:this.apply.bind(this),close:this.close.bind(this)});var 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:{title:a("exportAsDialog.title","Export..."),name:a("exportAsDialog.defaultFileName","Workbook"),extension:".xlsx",fileFormats:[{description:a("exportAsDialog.xlsx.description","Excel Workbook (.xlsx)"),extension:".xlsx"},{description:a("exportAsDialog.pdf.description","Portable Document Format (.pdf)"),extension:".pdf"}],pdf:{fitWidth:!0,area:"workbook",areas:[{area:"workbook",text:a("exportAsDialog.pdf.area.workbook","Entire Workbook")},{area:"sheet",text:a("exportAsDialog.pdf.area.sheet","Active Sheet")},{area:"selection",text:a("exportAsDialog.pdf.area.selection","Selection")}],paperSize:"a4",paperSizes:["a2","a3","a4","a5","b3","b4","b5","folio","legal","letter","tabloid","executive"].map(i),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:a("exportAsDialog.pdf.margin.normal","Normal")},{value:{bottom:"0.75in",left:"0.25in",right:"0.25in",top:"0.75in"},text:a("exportAsDialog.pdf.margin.narrow","Narrow")},{value:{bottom:"1in",left:"1in",right:"1in",top:"1in"},text:a("exportAsDialog.pdf.margin.wide","Wide")}],landscape:!0,guidelines:!0,hCenter:!0,vCenter:!0},width:520,template:"#: messages.exportAsDialog.labels.fileName #:#: messages.exportAsDialog.labels.saveAsType #:#: messages.exportAsDialog.labels.exportArea #:#: messages.exportAsDialog.labels.paperSize#:#: messages.exportAsDialog.labels.margins #:#: messages.exportAsDialog.labels.orientation #:#: messages.exportAsDialog.labels.print #:#: messages.exportAsDialog.labels.guidelines##: messages.exportAsDialog.labels.scale #:#: messages.exportAsDialog.labels.fit ##: messages.exportAsDialog.labels.center #:#: messages.exportAsDialog.labels.horizontally ##: messages.exportAsDialog.labels.vertically ##: messages.save ##: messages.cancel #"},apply:function(){h.fn.apply.call(this),this.trigger("action",{command:"SaveAsCommand",options:this.viewModel})}}),e.spreadsheet.dialogs.register("exportAs",I),o("modifyMerged","modifyMergedDialog.errorMessage"),o("rangeDisabled","rangeDisabledDialog.errorMessage"),o("intersectsArray","intersectsArrayDialog.errorMessage"),o("overflow","overflowDialog.errorMessage"),o("unsupportedSelection","unsupportedSelectionDialog.errorMessage"),o("incompatibleRanges","incompatibleRangesDialog.errorMessage"),o("noFillDirection","noFillDirectionDialog.errorMessage"),o("duplicateSheetName","duplicateSheetNameDialog.errorMessage"),E=g.extend({options:{width:640,title:"Errors in import",template:"We encountered #= errors.length # errors while reading this file.  Please be aware that some formulas might be missing, or contain invalid results.ContextError message# for (var i = 0; i < errors.length; ++i) { ## var err = errors[i]; ##: err.context ##: err.error ## } ##: messages.okText #"}}),e.spreadsheet.dialogs.register("importError",E),M=g.extend({options:{title:a("useKeyboardDialog.title","Copying and pasting"),template:"#: messages.useKeyboardDialog.errorMessage #Ctrl+C #: messages.useKeyboardDialog.labels.forCopy #Ctrl+X #: messages.useKeyboardDialog.labels.forCut #Ctrl+V #: messages.useKeyboardDialog.labels.forPaste ##= messages.okText #"}}),e.spreadsheet.dialogs.register("useKeyboard",M),F=h.extend({options:{title:a("linkDialog.title","Hyperlink"),template:"#: messages.linkDialog.labels.url #:#= messages.linkDialog.labels.removeLink ##= messages.okText ##= messages.cancel #",
autoFocus:!1},open:function(t){var n,i,o=this;h.fn.open.apply(o,arguments),n=o.dialog().element,i=e.observable({url:t.link(),apply:function(){/\S/.test(i.url)||(i.url=null),o.trigger("action",{command:"HyperlinkCommand",options:{link:i.url}}),o.close()},remove:function(){i.url=null,i.apply()},cancel:o.close.bind(o)}),e.bind(n,i),n.find("input").focus().on("keydown",function(e){13==e.keyCode?(i.url=l(this).val(),e.stopPropagation(),e.preventDefault(),i.apply()):27==e.keyCode&&(e.stopPropagation(),e.preventDefault(),i.cancel())})}}),e.spreadsheet.dialogs.register("hyperlink",F),R=h.extend({options:{className:"k-spreadsheet-insert-comment",template:"#: messages.insertCommentDialog.labels.comment #:#: messages.insertCommentDialog.labels.removeComment #  #: messages.okText #  #= messages.cancel #",title:a("insertCommentDialog.title","Insert comment"),autoFocus:!1,width:450},open:function(t){var n,i,o=this;h.fn.open.apply(o,arguments),n=o.dialog().element,i=e.observable({comment:t.comment(),apply:function(){/\S/.test(i.comment)||(i.comment=null),o.trigger("action",{command:"InsertCommentCommand",options:{value:i.comment}}),o.close()},remove:function(){i.comment=null,i.apply()},cancel:o.close.bind(o)}),e.bind(n,i),n.find("textarea").focus()}}),e.spreadsheet.dialogs.register("insertComment",R),P=h.extend({options:{template:"#: messages.okText #  #= messages.cancel #",title:a("insertImageDialog.title","Insert image"),width:"auto"},open:function(){var t,n,i=this;h.fn.open.apply(i,arguments),t=i.dialog().element,n=e.observable({okEnabled:!1,info:e.spreadsheet.messages.dialogs.insertImageDialog.info,imageUrl:"",hasImage:!1,isHovered:!1,_url:null,_image:null,apply:function(){window.URL.revokeObjectURL(n._url),i.trigger("action",{command:"InsertImageCommand",options:{blob:n._image,width:n._width,height:n._height}}),i.close()},cancel:i.close.bind(i),stopEvent:function(e){e.stopPropagation(),e.preventDefault()},drop:function(e){n.stopEvent(e),n.selectFile(e.originalEvent.dataTransfer.files),n.set("isHovered",!1)},dragEnter:function(e){n.stopEvent(e),n.set("isHovered",!0)},dragLeave:function(e){n.stopEvent(e),n.set("isHovered",!1)},change:function(e){n.selectFile(e.target.files)},selectFile:function(t){var i,o,r;for(o=0;o=0,l=n.bind(h),d=l(r.children,i),c=c||d||s,r.hidden=!s&&!d,i.length||p&&!p.length?r.checked=!r.hidden:p&&p.indexOf(r.text)!=-1&&(r.checked=!0);return u&&t.filter({field:"hidden",operator:"neq",value:!0}),c}function i(t){var n,o,r=t instanceof e.data.HierarchicalDataSource&&t.data();for(n=0;n",{"class":h.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(h.classNames.iconExpand,t).toggleClass(h.classNames.iconCollapse,!t),this.options.expanded=!t},_toggle:function(){var e=this.visible();this.toggle(e),this.trigger("toggle",{show:e})}}),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:"#= messages.filterByValue ##= messages.addToCurrent #",filterByCondition:"#= messages.filterByCondition #',menuItem:"#=text#",actionButtons:"#=messages.apply##=messages.clear#"},c=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},a=n.data(),s=a.toJSON()[0].items,l=s.filter(function(e){return"blank"===e.dataType});l=!!l.length&&l[0].checked,s=s.filter(i).map(o),this.appendToSearch&&this.valueFilter&&this.valueFilter.values.length&&(s=s.concat(this.valueFilter.values.toJSON()).sort().filter(r)),this.set("valueFilter",{values:s,blanks:l})},valueSelect:function(e){e.preventDefault();var t=e.sender.dataItem(e.node);t.set("checked",!t.checked)},hasActiveSearch:!1,appendToSearch:!1,filterValues:function(e){var t,o="string"==typeof e?e:r(e.target).val().toLowerCase(),a=this.valuesDataSource;this.set("hasActiveSearch",!!o),t=n.bind(this.valueFilter),i(a),t(a,o)},reset:function(){this.set("customFilter",{logic:"and",criteria:[{operator:null,value:null}]}),this.set("valueFilter",{values:[]})},operatorChange:function(e){var t=e.sender.dataItem();this.set("operatorType",t.type),this.get("customFilter")||this.reset(),this.set("customFilter.criteria[0].operator",t.value)},isNone:function(){return void 0===this.get("operatorType")},isString:function(){return"string"===this.get("operatorType")},isNumber:function(){return"number"===this.get("operatorType")},isDate:function(){return"date"===this.get("operatorType")}}),u=e.spreadsheet.FilterMenuController={valuesTree:function(t,n){return[{text:e.spreadsheet.messages.filterMenu.all,expanded:!0,checked:!1,items:this.values(t.resize({top:1}),n)}]},values:function(n,i){var o=[],r=e.spreadsheet.messages.filterMenu,a=n.column(i),s=n.sheet();return a.forEachCell(function(t,n,i){var a,l,d,c=!0;s.isHiddenRow(t)&&(c=!1),a=i.value,l=i.dataType,d=i.text,l=void 0===a?"blank":i.format?e.spreadsheet.formatting.type(a,i.format):typeof a,d=null!==a&&i.format?e.spreadsheet.formatting.text(a,i.format):"blank"==l?r.blanks:a,"percent"!==l&&"currency"!==l||(l="number"),"date"===l&&(a=e.spreadsheet.numberToDate(a)),o.push({dataType:l,value:a,text:d,checked:c})}),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(),a=this.filterForColumn(t,r);return a=a&&a.filter.toJSON(),a&&"custom"==a.filter&&(i=a.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,a=this.filterForColumn(e,t);if(a)return n=a.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}},h=a.extend({init:function(e,t){a.call(this,e,t),this.element.addClass(h.classNames.wrapper),this.viewModel=new c({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(){a.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=u.filter(t,i);o?(e=u.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(h.templates.menuItem),n=e.spreadsheet.messages.filterMenu,i=[{command:"sort",dir:"asc",text:n.sortAscending,iconClass:"sort-asc"},{command:"sort",dir:"desc",text:n.sortDescending,iconClass:"sort-desc"}],o=r("",{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};this.action({command:"SortCommand",options:i})}.bind(this)}).data("kendoMenu")},_appendTemplate:function(t,n,i,o){var a=e.template(t),s=r("").html(a({messages:e.spreadsheet.messages.filterMenu,guid:e.guid(),ns:e.ns}));return this.element.append(s),i&&(i=new l(s,{expanded:o,toggle:this._detailToggle.bind(this)})),e.bind(s,this.viewModel),s},_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(h.templates.filterByCondition,h.classNames.filterByCondition,!0,e)},_filterByValue:function(){var t,n="value"===this.viewModel.active,i=this._appendTemplate(h.templates.filterByValue,h.classNames.filterByValue,!0,n);this.valuesTreeView=i.find("[data-role=treeview]").data("kendoTreeView"),t=u.valuesTree(this.options.range,this.options.column),this.viewModel.set("valuesDataSource",new e.data.HierarchicalDataSource({data:t}))},_actionButtons:function(){this._appendTemplate(h.templates.actionButtons,h.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(h.classNames.filterByValue)?this.viewModel.set("active","value"):e.hasClass(h.classNames.filterByCondition)&&this.viewModel.set("active","custom")}}),e.spreadsheet.FilterMenu=h,r.extend(!0,h,{classNames:s,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._range=e.range,this.cellInput.position(e.rect),this.cellInput.resize(e.rect),this.cellInput.tooltip(e.tooltip),this.cellInput.activeCell=this.barInput.activeCell=this._range.topLeft(),this.cellInput.activeSheet=this.barInput.activeSheet=this._range._sheet,this.trigger("activate"),this},deactivate:function(e){var t=this.cellInput;this._active&&(this._active=!1,e||t.value()==this._value||this.trigger("change",{value:t.value(),range:this._range}),this._rect=null,t.hide(),this.trigger("deactivate"))},enable:function(e){this.barInput.enable(e),this.cellInput.enable(e)},barElement:function(){return this.barInput.element},cellElement:function(){return this.cellInput.element},focus:function(e){e=e||"cell","cell"===e?(this.cellInput.element.focus(),this.cellInput.end()):this.barInput.element.focus()},isActive:function(){return this._active},isFiltered:function(){return this.barInput.popup.visible()||this.cellInput.popup.visible()},canInsertRef:function(e){var t=this.activeEditor();return t&&t.canInsertRef(e)},highlightedRefs:function(){var e=this.activeEditor(),t=[];return e&&(t=e.highlightedRefs()),t},scale:function(){this.cellInput.scale()},toggleTooltip:function(e){this.cellInput.toggleTooltip(t(this._rect,e))},value:function(e,t){return void 0===e?this.barInput.value():(null===e&&(e=""),this._value=e,this.barInput.value(e),this.cellInput.value(e),void this.barInput.element.toggleClass("k-spreadsheet-array-formula",!!t))},insertNewline:function(){this.activeEditor().insertNewline(),this.scale()},select:function(){this.activeEditor().select()}});e.spreadsheet.SheetEditor=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,a=e.length,s=(a+1)/2,l=e.reduce(function(e,t){return e+t},0)/a,d=0,c=0;for(t=0;t=0;)if(o=n[i].toLowerCase(),o==a)return{type:n,number:i,value:e}}function s(e){var t,n,i=e.length,o=e[0].length,r=[];for(t=0;t").attr("title",r).attr("aria-label",r),this.combo=s.appendTo(i).kendoComboBox({clearButton:!1,dataTextField:"name",dataValueField:"name",template:"#:data.name#",dataSource:a,autoBind:!1,ignoreCase:!0,change:this._on_listChange.bind(this),noDataTemplate:"",open:function(){a.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,n,i,o){var r=0,a=[],s=t,l=0;return t&&n&&(n*=t),e.forEach(function(e,d){null!=i&&ds&&(s-r0&&o.push(r-l)),s+=t*Math.ceil(e/t)),a.push(r),r+=e}),a.push(r),a}function t(t,i,d){var c,u,h,p,f,g,m,v,_,w,k,y,x,C,S,T,D,A,I=t._grid;return i=I.normalize(i),c=I.rectangle(i),u=[],t._drawings.forEach(function(e){var n=t.drawingBoundingBox(e);n.intersects(c)&&u.push({drawing:e,box:n.offset(-c.left,-c.top)})}),h=[],p=[],f=[],g=t._getMergedCells(i),m=-1,v=-1,t.forEach(i,function(e,n,o){var r,s,l,c=e-i.topLeft.row,_=n-i.topLeft.col,w=t.rowHeight(e),k=t.columnWidth(n);d.forScreen||(o.drawings=u.filter(function(i){var o=i.drawing.topLeftCell;if(o&&o.row==e&&o.col==n)return m=Math.max(m,t._rows.index(i.box.bottom)),v=Math.max(v,t._columns.index(i.box.right)),!0})),_||p.push(w),c||f.push(k),!t.isHiddenColumn(n)&&!t.isHiddenRow(e)&&w&&k&&(r=d.forScreen||a(o),(d.emptyCells||r)&&(s=new b(e,n).print(),g.secondary[s]||(r?(m=Math.max(m,c),v=Math.max(v,_)):o.empty=!0,o.row=c,o.col=_,l=g.primary[s],l?(delete g.primary[s],o.merged=!0,o.rowspan=l.height(),o.colspan=l.width(),d.forScreen&&(o.width=t._columns.sum(l.topLeft.col,l.bottomRight.col),o.height=t._rows.sum(l.topLeft.row,l.bottomRight.row))):(o.rowspan=1,o.colspan=1),h.push(o))))}),p=p.slice(0,m+1),f=f.slice(0,v+1),_=d.pageWidth,w=d.pageHeight,k=d.scale||1,d.fitWidth&&(y=f.reduce(o,0),y>_&&(k=_/y)),_=Math.ceil(_/k),w=Math.ceil(w/k),x=[],C=e(p,w||0,d.maxEmpty,d.headerRows,x),S=e(f,_||0,d.maxEmpty),T=0,D=0,A=[],h=h.filter(function(e){return(!e.empty||!(e.row>m||e.col>v))&&(d.headerRows&&e.row0&&r.width>0&&(r.right=r.left+r.width,r.bottom=r.top+r.height,r.row=a,r.col=s,h.push(r))})}),d.headerRows&&(x.forEach(function(e){A.forEach(function(t){t=n(t),t.top+=e,t.bottom=t.top+t.height,h.push(t)}),C.push(e)}),C.sort(l)),{width:T,height:D,cells:h.sort(s),scale:k,xCoords:S,yCoords:C,drawings:u}}function n(e,t){return t||(t={}),Object.assign?Object.assign(t,e):Object.keys(e).reduce(function(t,n){return t[n]=e[n],t},t)}function i(e,t){return e.size===t.size&&e.color===t.color}function o(e,t){return e+t}function r(e,t){return tt?1:0}function d(e,t,n,i){function o(o,r){function a(e){return!(e.right<=v||e.left>=_||e.bottom<=b||e.top>=k)&&(C=Math.max(e.bottom,C),S=Math.max(e.right,S),!0)}var s,l,h,p,f,g,v=r*d,_=v+d,b=o*u,k=b+u,C=0,S=0,T=t.cells.filter(a),D=t.drawings.filter(function(e){return a(e.box)});C=Math.min(C,k),S=Math.min(S,_),(T.length||D.length)&&(s=new w.Group,n.append(s),l=new w.Group,s.append(l),l.clip(w.Path.fromRect(new y.Rect([v-1,b-1],[S+1,C+1]))),h=y.Matrix.scale(t.scale,t.scale).multiplyCopy(y.Matrix.translate(-v,-b)),(i.hCenter||i.vCenter)&&(h=h.multiplyCopy(y.Matrix.translate(i.hCenter?(_-S)/2:0,i.vCenter?(k-C)/2:0))),l.transform(h),i.guidelines&&(p=null,t.xCoords.forEach(function(e){e=Math.min(e,S),e!==p&&e>=v&&e<=_&&(p=e,l.append((new w.Path).moveTo(e,b).lineTo(e,C).close().stroke(i.guideColor,x)))}),p=null,t.yCoords.forEach(function(e){e=Math.min(e,C),e!==p&&e>=b&&e<=k&&(p=e,l.append((new w.Path).moveTo(v,e).lineTo(S,e).close().stroke(i.guideColor,x)))})),f=m(),T.forEach(function(t){c(t,l,i),f.add(t,e)}),g=new w.Group,f.vert.forEach(function(e){e.forEach(function(e){e.rendered||(e.rendered=!0,g.append((new w.Path).moveTo(e.x,e.top).lineTo(e.x,e.bottom).close().stroke(e.color,e.size)))})}),f.horiz.forEach(function(e){e.forEach(function(e){e.rendered||(e.rendered=!0,g.append((new w.Path).moveTo(e.left,e.y).lineTo(e.right,e.y).close().stroke(e.color,e.size)))})}),l.append(g),D.forEach(function(t){var n,i,o=t.drawing,r=o.image;null!=r&&(n=t.box,i=e._workbook.imageUrl(r),l.append(new w.Image(i,new y.Rect([n.left,n.top],[n.width,n.height])).opacity(o.opacity)))}))}var r,a,s=Math.ceil(t.width/i.pageWidth),l=Math.ceil(t.height/i.pageHeight),d=Math.ceil(i.pageWidth/t.scale),u=Math.ceil(i.pageHeight/t.scale);for(r=0;r>1;break;case void 0:case null:case"bottom":o=n.height-C.offsetHeight}o<0&&(o=0),r=kendo.drawing.drawDOM.drawText(C),r.transform(y.Matrix.translate(n.left,n.top+o)),i.append(r)}function p(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 f(e,n,i,o){var r,a,s,l,c;null==i&&null==o&&(o=n,i={},n=_.SHEETREF),null==o&&(o=i,n instanceof _.Range||n instanceof _.Ref||"string"==typeof n?i={}:(i=n,n=_.SHEETREF)),i=kendo.jQuery.extend({paperSize:"A4",landscape:!0,margin:"1cm",guidelines:!0,guideColor:"#aaa",emptyCells:!0,fitWidth:!1,center:!1,headerRows:null,maxEmpty:.2,scale:1},i),r=new w.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}),s=a.paperSize[0],l=a.paperSize[1],a.margin&&(s-=a.margin.left+a.margin.right+1,l-=a.margin.top+a.margin.bottom+1),i.pageWidth=s,i.pageHeight=l,c=t(e,e._ref(n),i),d(e,c,r,i),o(r)}function g(){}function m(){function e(e,i){var o,r;i&&(o=i._properties,r=i._grid,e.borderLeft=o.get("vBorders",r.index(e.row,e.col)),e.borderRight=o.get("vBorders",r.index(e.row,e.col+e.colspan)),e.borderTop=o.get("hBorders",r.index(e.row,e.col)),e.borderBottom=o.get("hBorders",r.index(e.row+e.rowspan,e.col))),e.borderLeft&&t(e.row,e.col,e.borderLeft,e.left,e.top,e.bottom),e.borderRight&&t(e.row,e.col+e.colspan,e.borderRight,e.right,e.top,e.bottom),e.borderTop&&n(e.row,e.col,e.borderTop,e.top,e.left,e.right),e.borderBottom&&n(e.row+e.rowspan,e.col,e.borderBottom,e.bottom,e.left,e.right)}function t(e,t,n,o,a,s){var l=r[t]||(r[t]=new g),d=e>0&&l[e-1];d&&i(d,n)?(l[e]=d,d.bottom=s):l[e]={size:n.size,color:n.color,x:o,top:a,bottom:s}}function n(e,t,n,r,a,s){var l=o[e]||(o[e]=new g),d=t>0&&l[t-1];d&&i(d,n)?(l[t]=d,d.right=s):l[t]={size:n.size,color:n.color,y:r,left:a,right:s}}var o=new g,r=new g;return{add:e,horiz:o,vert:r}}function v(e){function t(e){var t,n;if(null!=e){for(t=12,n=e.length;--n>=0;)t+=o(e.charAt(n));return t}return 0}function i(e){return r?n(e,{borderLeft:r,borderTop:r,borderRight:r,borderBottom:r}):e}var o,r,a=new $.Deferred,s=a.promise();return e=n(e,{dataSource:null,guidelines:!0,guideColor:"#000",columns:null,headerBackground:"#999",headerColor:"#000",oddBackground:null,evenBackground:null,fontFamily:"Arial",fontSize:12,paperSize:"A4",margin:"1cm",landscape:!0,fitWidth:!1,scale:1,rowHeight:20,maxEmpty:1,useGridFormat:!0}),kendo.drawing.pdf.defineFont(kendo.drawing.drawDOM.getFontFaces(document)),o=T(e.fontFamily,e.fontSize),r=e.guidelines?{size:1,color:e.guideColor}:null,e.dataSource.fetch(function(){var n,o,r,s,l,d=e.dataSource.data();return d.length?(n=e.columns.map(function(e){return"string"==typeof e?{title:e,field:e}:e}),o=n.map(function(e){return e.title||e.field}),r=o.map(t),s=d.map(function(o,a){return{cells:n.map(function(n,s){var l=o[n.field];return e.useGridFormat&&(null!=l&&(n.format?l=kendo.format(n.format,l):l+=""),r[s]=Math.max(t(l),r[s])),i({value:l,format:e.useGridFormat?null:n.format,background:a%2?e.evenBackground:e.oddBackground})})}}),s.unshift({cells:o.map(function(t){return i({value:t,background:e.headerBackground,color:e.headerColor})})}),l=new kendo.spreadsheet.Sheet(s.length+1,n.length+1,e.rowHeight,50,20,20,{fontFamily:e.fontFamily,fontSize:e.fontSize,verticalAlign:"center"}),l.fromJSON({name:"Sheet1",rows:s,columns:r.map(function(e,t){return{index:t,width:e}})}),void l.draw({paperSize:e.paperSize,landscape:e.landscape,margin:e.margin,guidelines:!1,scale:e.scale,fitWidth:e.fitWidth,maxEmpty:e.maxEmpty,headerRows:1},a.resolve.bind(a))):a.reject("Empty dataset")}),s}var _,b,w,k,y,x,C,S,T;kendo.support.browser.msie&&kendo.support.browser.version<9||(_=kendo.spreadsheet,b=_.CellRef,w=kendo.drawing,k=_.formatting,y=kendo.geometry,x=.8,_.Sheet.prototype.draw=function(e,t,n){var i=this;i._workbook?i.recalc(i._workbook._context,function(){f(i,e,t,n)}):f(i,e,t,n)},g.prototype={forEach:function(e){Object.keys(this).forEach(function(t){e(this[t],t,this)},this)}},S={},T=function(e,t){var n,i,o,r,a=t+":"+e,s=S[a];if(!s){for(i=document.createElement("div"),i.style.position="fixed",i.style.left="-10000px",i.style.top="-10000px",i.style.fontFamily=e,i.style.fontSize=t+"px",i.style.whiteSpace="pre",o=32;o<128;++o)n=document.createElement("span"),n.appendChild(document.createTextNode(String.fromCharCode(o))),i.appendChild(n);for(document.body.appendChild(i),r={},o=32,n=i.firstChild;o<128&&n;++o,n=n.nextSibling)r[o]=n.offsetWidth;for(;n=i.firstChild;)i.removeChild(n);s=S[a]=function(e){var t=e.charCodeAt(0),o=r[t];return null==o&&(n=document.createElement("span"),n.appendChild(document.createTextNode(String.fromCharCode(t))),i.appendChild(n),o=r[t]=n.offsetWidth,i.removeChild(n)),o}}return s},_.draw={Borders:m,doLayout:t,applyIndent:u},_.drawTabularData=v)},"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,a,s,l,d,c,u;e.support.browser.msie&&e.support.browser.version<9||(n=e.jQuery,i=n.extend({F10:121,F11:122,B:66,I:73,U:85,N:78,H:72,A:65,PAGEDOWN:34,PAGEUP:33,DELETE:46,R:82},e.keys),o=e.ui.Widget,r=e.spreadsheet.Workbook,a=e.spreadsheet.Controller,s=e.spreadsheet.View,l=".kendoSpreadsheet",d={recalc:!0,selection:!0,activeCell:!0,layout:!0,sheetSelection:!0,resize:!0,editorChange:!1,editorClose:!1},c={wrapper:"k-widget k-spreadsheet"},u=e.ui.Widget.extend({init:function(e,t){o.fn.init.call(this,e,t),this.element.addClass(u.classNames.wrapper),this._view=new s(this.element,{messages:this.options.messages.view,toolbar:this.options.toolbar,sheetsbar:this.options.sheetsbar}),this._workbook=new r(this.options,this._view),this._controller=new a(this._view,this._workbook),this._autoRefresh=!0,this._bindWorkbookEvents(),this._view.workbook(this._workbook),this._view.enableClipboard(!1),this.refresh(),this._view.enableClipboard(!0),this._resizeHandler=function(){this.resize()}.bind(this),n(window).on("resize"+l,this._resizeHandler),this.element.on("keydown"+l,this._keyDown.bind(this))},_keyDown:function(e){var o,r=e.keyCode,a=n(".k-spreadsheet-quick-access-toolbar [title=Redo]");if(r===i.F11&&e.shiftKey)return this._view.sheetsbar._onAddSelect(),e.preventDefault(),t;if(e.altKey&&r===i.PAGEDOWN)this._view.sheetsbar.trigger("select",{name:this._view.sheetsbar._sheets[this._view.sheetsbar._selectedIndex+1].name(),isAddButton:!1});else if(e.altKey&&r===i.PAGEUP)this._view.sheetsbar.trigger("select",{name:this._view.sheetsbar._sheets[this._view.sheetsbar._selectedIndex-1].name(),isAddButton:!1});else{if(e.altKey&&r===i.DELETE)return o=function(e){var t=e.sender;t.isConfirmed()&&this._view.sheetsbar.trigger("remove",{name:this.activeSheet()._name(),confirmation:!0})}.bind(this),this._view.sheetsbar._openDialog("confirmation",{close:o}),e.preventDefault(),t;if(e.altKey&&r===i.R)return this._view.sheetsbar._createEditor(),e.preventDefault(),t;if(r===i.F10&&this._view.tabstrip||r===i.TAB&&!e.shiftKey&&n(document.activeElement).is(a))return this._view.tabstrip.toolbars[this._view.tabstrip.element.find("li.k-state-active").text().toLowerCase()].element.find(":not(.k-overflow-anchor):kendoFocusable:first").focus(),this._view.tabstrip.toolbars[this._view.tabstrip.element.find("li.k-state-active").text().toLowerCase()].element.find(".k-toolbar-first-visible").addClass("k-state-focused"),e.preventDefault(),t;if(e.ctrlKey&&r===i.B)n("[data-tool=bold]")[0].click();else if(e.ctrlKey&&r===i.I)n("[data-tool=italic]")[0].click();else if(e.ctrlKey&&r===i.U)n("[data-tool=underline]")[0].click();else{if(e.altKey&&r===i.H)return this._view.tabstrip.select(0),e.preventDefault(),t;if(e.altKey&&r===i.N)return this._view.tabstrip.select(1),e.preventDefault(),t;if(e.altKey&&r===i.A)return this._view.tabstrip.select(2),e.preventDefault(),t}}},_resize:function(){this.refresh({layout:!0})},_workbookChanging:function(e){this.trigger("changing",e)&&e.preventDefault()},_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=d),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(e),this.trigger("render")),this},openDialog:function(e,t){return this._view.openDialog(e,t)},autoRefresh:function(e){return e!==t?(this._autoRefresh=e,e===!0&&this.refresh(),this):this._autoRefresh},toJSON:function(){return this._workbook.toJSON()},fromJSON:function(e){e.sheets?(this._workbook.destroy(),this._workbook=new r(n.extend({},this.options,e)),this._bindWorkbookEvents(),this._view.workbook(this._workbook),this._controller.workbook(this._workbook),this.activeSheet(this.activeSheet())):this.refresh()},saveJSON:function(){return this._workbook.saveJSON()},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("").appendTo(this.element),o=n("").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)},_workbookDataBinding:function(e){this.trigger("dataBinding",e)&&e.preventDefault()},_workbookDataBound:function(e){this.trigger("dataBound",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("changing",this._workbookChanging.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)),this._workbook.bind("dataBinding",this._workbookDataBinding.bind(this)),this._workbook.bind("dataBound",this._workbookDataBound.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"+l,this._resizeHandler)},options:{name:"Spreadsheet",toolbar:!0,sheetsbar:!0,rows:200,columns:50,rowHeight:20,columnWidth:64,headerHeight:20,headerWidth:32,excel:{proxyURL:"",fileName:"Workbook.xlsx"},messages:{},pdf:{area:"workbook",fileName:"Workbook.pdf",proxyURL:"",paperSize:"a4",landscape:!0,margin:null,title:null,author:null,subject:null,keywords:null,creator:"Kendo UI PDF Generator v."+e.version,date:null},defaultCellStyle:{fontFamily:"Arial",fontSize:"12"},useCultureDecimals:!1},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},addImage:function(e){return this._workbook.addImage(e)},cleanupImages:function(){return this._workbook.cleanupImages()},events:["cut","copy","paste","pdfExport","excelExport","excelImport","changing","change","render","removeSheet","selectSheet","renameSheet","insertRow","insertColumn","deleteRow","insertSheet","deleteColumn","hideRow","hideColumn","unhideRow","unhideColumn","select","changeFormat","dataBinding","dataBound"]}),e.spreadsheet.ALL_REASONS=d,e.ui.plugin(u),n.extend(!0,u,{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${name}'),f=c.extend({init:function(e,t){c.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,a,l;e.isEmptyObject(i.data)?(r=t.dataSource.schemaDimensions(),r.done(function(e){t.dataSource.cubeBuilder||n(e),i.success(e)}).fail(i.error)):(a=t.treeView.dataSource.get(i.data.uniqueName),"[KPIs]"===a.uniqueName?(l=!0,r=t.dataSource.schemaKPIs(),r.done(function(e){i.success(o(e))}).fail(i.error)):"kpi"==a.type&&(l=!0,i.success(s(a))),l||(r=2==a.type?t.dataSource.schemaMeasures():a.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('').appendTo(this.element),this._fields(),this._targets()},_fields:function(){var t=e(''+this.options.messages.fieldsLabel+"").appendTo(this.form),n='# if (item.type == 2 || item.uniqueName == "[KPIs]") { ## } else if (item.type && item.type !== "kpi") { ## } ##: item.caption || item.name #';this.treeView=e("").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,a,l,d;if(e.preventDefault(),t=r(e.dropTarget),n=this.dataItem(e.sourceNode),t&&t.validate(n)){if(d=n.defaultHierarchy||n.uniqueName,"kpi"===n.type)for(l=s(n),a=l.length,d=[],o=0;o${data.name}',o=n.sortable,r="";return o&&(r+="#if (data.sortIcon) {#",r+='',r+="#}#"),(n.filterable||o)&&(r+=''),r+='',i+=''+r+"",new l.ui.PivotSettingTarget(t,e.extend({dataSource:this.dataSource,hint:function(t){var n=e('');return n.find(".k-list").append(t.clone()),n},template:i,emptyTemplate:'${data}'},n))},_targets:function(){var t=e('').appendTo(this.form),n=e(p({name:this.options.messages.columnsLabel,icon:"k-i-columns"})).appendTo(t),i=e('').appendTo(n.last()),o=e(p({name:this.options.messages.rowsLabel,icon:"k-i-rows"})).appendTo(t),r=e('').appendTo(o.last()),a=e(p({name:this.options.messages.measuresLabel,icon:"k-i-sum"})).appendTo(t),s=e('').appendTo(a.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(s,{setting:"measures",messages:{empty:l.messages.measures}}),i.add(r).add(s).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(){c.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}});d.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("util/ripple.min",["kendo.core.min"],e)}(function(){!function(){var e,t,n,i,o,r,a,s;window.kendo.util=window.kendo.util||{},window.kendo.util.ripple=window.kendo.util.ripple||{},e=function(e,t){var n,i;if(e.closest)return e.closest(t);for(n=Element.prototype.matches?function(e,t){return e.matches(t)}:function(e,t){return e.msMatchesSelector(t)},i=e;i;){if(n(i,t))return i;i=i.parentElement}},t=function(e){var t,n=e.createElement("div");return n.className="k-ripple",t=e.createElement("div"),t.className="k-ripple-blob",n.appendChild(t),[n,t]},n=function(e,t,n){var i=function(){n(),e.removeEventListener(t,i,!1)},o=function(){return e.addEventListener(t,i,!1)};return o(),{remove:o}},i=function(i,a){return function(s){var l,d,c,u,h,p,f,g,m,v,_,b,w,k,y,x,C=s.target,S=C.document||C.ownerDocument;if(l=a.container?a.container(C):e(C,i),l&&(d=/focus/i.test(s.type)&&l.classList.contains("k-ripple-target"),!d)){if(l.classList.add("k-ripple-target"),c=t(S),u=c[0],h=c[1],p={animated:!1,released:!1,blob:h,container:l,ripple:u},f={focusin:"focusout",keydown:"keyup",mousedown:"mouseup",pointerdown:"pointerup",touchdown:"touchup"}[s.type],n(s.currentTarget,f,function(){return r(p)}),l.appendChild(u),window.getComputedStyle(u).getPropertyValue("opacity"),g=l.getBoundingClientRect(),m=0,v=0,/mouse|pointer|touch/.test(s.type)?(m=s.clientX-g.left,v=s.clientY-g.top):(m=g.width/2,v=g.height/2),_=m.k-item",options:{global:!0}},{selector:".k-checkbox-label, .k-radio-label"},{selector:".k-checkbox, .k-radio",options:{events:["focusin"],container:function(e){if(/\b(k-checkbox|k-radio)\b/.test(e.className))return e.nextElementSibling}}}]},removeListeners:function(){},registerListeners:function(){var e,t=this,n=t.element[0],i=t.options.elements;t.removeListeners(),e=a.register(n,i),t.removeListeners=e},destroy:function(){var e=this;o.fn.destroy.call(e),e.removeListeners()}});i.plugin(s)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){
(n||t)()}),function(e,define){define("pdfviewer/pdfjs.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=e.extend,i=function(){if(!window.pdfjsLib){var e=window.console;return e&&e.error&&e.error("PDF.JS required."),!1}return kendo.pdfviewer.pdfjs.lib=window.pdfjsLib,!0};n(kendo,{pdfviewer:{pdfjs:{lib:window.pdfjsLib,isLoaded:i}}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdfviewer/processors/pdfjs-processor.min",["pdfviewer/pdfjs.min"],e)}(function(){return function(e,t){var n,i=window.kendo,o=i.Class,r=e.extend,a=window.atob,s=o.extend({init:function(e,t){var o=this;i.pdfviewer.pdfjs.isLoaded()&&(n=i.pdfviewer.pdfjs.lib),o.file=e.file,o.viewer=t},fetchDocument:function(){var t=this,i=e.Deferred(),o=t.viewer.options.messages.errorMessages;return t.file?(t._isBase64Data()&&a&&(t.file.data=a(t.file.data)),n.getDocument(this.file).promise.then(function(n){var r,a=[];for(t.pdf=n,t.pagePromises=[],t._downloadData=e.Deferred(),n.getData().then(function(e){var n=new Blob([e],{type:"application/pdf"});t._downloadData.resolve({file:n})}),r=1;r<=n.numPages;r++)t.pagePromises.push(n.getPage(r));Promise.all(t.pagePromises).then(function(e){a=e.map(function(e){var t=e.getViewport({scale:4/3});return{width:t.width,height:t.height}}),i.resolve({total:n.numPages,pages:a})})["catch"](function(e){t.viewer._triggerError({error:e.message,message:o.parseError})})})["catch"](function(e){var n=e.name.includes("Missing"),i=n?o.notFound:o.parseError;t.viewer._triggerError({error:e.message,message:i}),n&&t.viewer._renderBlankPage()}),i):i.resolve()},fetchPageData:function(e){return this.pagePromises[e-1]},downloadFile:function(e){var t=this;i.ui.progress(t.viewer.pageContainer,!0),t._downloadData.done(function(n){i.ui.progress(t.viewer.pageContainer,!1);var o=new FileReader;o.readAsDataURL(n.file),o.onload=function(){i.saveAs({dataURI:o.result,fileName:e+".pdf",proxyURL:function(){return o.result}})}})},_updateDocument:function(e){this.pdf&&this.pdf.loadingTask&&this.pdf.loadingTask.destroy(),this.file=e},_isBase64Data:function(){var e,t=this.file.data,n=/[^A-Z0-9+\/=]/i,i=t&&t.length;return!(!i||i%4!==0||n.test(t))&&(e=t.indexOf("="),e===-1||e===i-1||e===i-2&&"="===t[i-1])},renderTextLayer:function(e){n.renderTextLayer(e)}});r(i.pdfviewer.pdfjs,{processor:s})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdfviewer/processors/dpl-processor.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=e.extend,o=n.Class,r=o.extend({init:function(e,t){var n=this;n.options=e,n.read=e.read,n.upload=e.upload,n.download=e.download,n.viewer=t},fetchDocument:function(){var t=this,i=e.Deferred(),o=t.viewer.options.messages.errorMessages;return t.read?(e.ajax({type:t.read.type,url:t.read.url,dataType:t.read.dataType,success:function(e){"string"!=typeof e&&(e=n.stringify(e)),i.resolve(JSON.parse(e))},error:function(e){t.viewer._triggerError({error:e.responseText,message:o.parseError})}}),i):i.resolve()},fetchPageData:function(t){var n=this,i=e.Deferred(),o=n.viewer.document.pages[t-1],r={};return r[n.read.pageField]=t,o.geometries.length?i.resolve(o):e.ajax({type:n.read.type,url:n.read.url,data:r,success:function(e){i.resolve(JSON.parse(e))},error:function(e){n.viewer._triggerError({error:e.responseText,message:n.viewer.options.messages.errorMessages.parseError})}}),i},downloadFile:function(e){window.location=this.download.url+"?file="+e},fromJSON:function(e){var t=this.viewer;t._clearPages(),t.document=e,t.document.total=t.document.pages.length,t._renderPages(),t.resize(!0),t.activatePage(1)}});i(n.pdfviewer,{dpl:{processor:r}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdfviewer/pager.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=".kendoPDFViewer",i=kendo.ui.Widget,o="change",r="keydown",a=kendo.support.click,s=480,l=kendo.attr,d=e.proxy,c=e.extend,u=".",h={wrapperClass:"k-pager-wrap",iconFirst:"k-i-arrow-end-left",iconLast:"k-i-arrow-end-right",iconPrev:"k-i-arrow-60-left",iconNext:"k-i-arrow-60-right",first:"k-pager-first",last:"k-pager-last",nav:"k-pager-nav",disabled:"k-state-disabled"},p=i.extend({init:function(e,t){var n=this;i.fn.init.call(n,e,t),n.linkTemplate=kendo.template(n.options.linkTemplate),n.element.addClass(h.wrapperClass),n._renderLinks(),n._toggleDisabledClass(),n._attachEvents()},options:{linkTemplate:'',previousNext:!0,input:!0,page:1,total:1,messages:{}},events:[o],_pagerLink:function(e,t,n,i){return this.linkTemplate({iconClass:e,text:t,wrapClass:i||"",pageIdx:n})},_renderLinks:function(){var t=this,n=t.options;n.previousNext&&(t.firstLink=e(t._pagerLink(h.iconFirst,n.messages.first,1,h.first)),t.prevLink=e(t._pagerLink(h.iconPrev,n.messages.previous,n.page-1)),t.nextLink=e(t._pagerLink(h.iconNext,n.messages.next,n.page+1)),t.lastLink=e(t._pagerLink(h.iconLast,n.messages.last,n.total,h.last))),t.element.append(t.firstLink),t.element.append(t.prevLink),n.input&&t._renderInput(),t.element.append(t.nextLink),t.element.append(t.lastLink)},_toggleDisabledClass:function(){var e=this,t=e.options,n=!t.total;e.nextLink&&e.prevLink&&(e.prevLink.toggleClass(h.disabled,n||1===t.page),e.nextLink.toggleClass(h.disabled,n||t.page===t.total),e.lastLink.toggleClass(h.disabled,n||t.page===t.total),e.firstLink.toggleClass(h.disabled,n||1===t.page)),e.input&&e.input.toggleClass(h.disabled,t.total<=1)},_attachEvents:function(){var e=this;e.element.on(a+n,u+h.nav,d(e._click,e)),e.element.on(r+n,u+h.nav,function(t){t.keyCode===kendo.keys.ENTER&&(e._click(t),t.preventDefault())}),e.input&&e.input.on(r+n,d(e._keydown,e))},_click:function(t){var n=e(t.currentTarget),i=parseInt(n.attr(l("page")),10);t.isDefaultPrevented()||this._change(i)},_keydown:function(n){var i=n.keyCode,o=kendo.keys,r=e(n.target),a=parseInt(r.val(),10),s=i===o.UP||i===o.DOWN,l=i===o.RIGHT||i===o.LEFT||i===o.BACKSPACE||i===o.DELETE,d=s&&i===o.UP?1:-1;if(s&&(a+=d),i===o.ENTER||s){if(isNaN(a)||a<1||a>this.options.total)return a=this.options.page,r.val(a),t;this._change(a),n.preventDefault()}else n.key.match(/^\d+$/)||l||n.preventDefault()},_change:function(e){var t=this;e>=1&&e<=t.options.total&&(t.options.page=e,t.input&&t.input.val(e),t.prevLink.attr(l("page"),e-1),t.nextLink.attr(l("page"),e+1),t._toggleDisabledClass()),t.trigger(o,{page:e})},setOptions:function(t){var o=this,a=o.options.total;t=e.extend(o.options,t),i.fn.setOptions.call(o,t),t.input&&(a!=t.total?(o._renderInput(),o.input.on(r+n,d(o._keydown,o))):o.input.val(t.total>0?t.page:1)),t.total>1&&(o.prevLink.attr(l("page"),t.page-1),o.nextLink.attr(l("page"),t.page+1),o.lastLink.attr(l("page"),t.total)),o._toggleDisabledClass()},_renderInput:function(){var e,t,i=this,o=i.options,r=i.element.parent().width()<=s,a=i.element.find(".k-pager-input");i.input&&i.input.off(n),e=o.total>0?kendo.format(o.messages.of,o.total):"",r||(e+=o.total>1?o.messages.pages:o.messages.page),t=''+e,a.length?a.html(t):i.element.append(''+t+""),i.input=i.element.find("input").val(o.total>0?o.page:1)},destroy:function(){this.element.off(n),this.input&&this.input.off(n),i.fn.destroy.call(this)}});c(kendo.pdfviewer,{Pager:p})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdfviewer/toolbar.min",["kendo.toolbar.min","kendo.combobox.min","pdfviewer/pager.min"],e)}(function(){return function(e,t){function n(e,t,n){var i=n?b.zoomOverflowButtons:b.zoomButtons;e.append(w({text:t.zoomOut,command:g,iconClass:b.zoomOutIcon,showText:n,className:i})),e.append(w({text:t.zoomIn,command:f,iconClass:b.zoomInIcon,showText:n,className:i}))}var i,o,r,a=window.kendo,s=e.extend,l=e.proxy,d="action",c="k-flat",u="keydown",h=a.support.click,p="change",f="zoomin",g="zoomout",m=a.toolbar.Item,v=a.ui.ToolBar,_={auto:"auto",actual:"actual",fitToWidth:"fitToWidth",fitToPage:"fitToPage"},b={zoomOutIcon:"k-i-zoom-out",zoomInIcon:"k-i-zoom-in",zoomButtons:"k-button-icon k-flat",zoomOverflowButtons:"k-button-icontext k-overflow-button",overflowHidden:"k-overflow-hidden"},w=a.template('${showText ? text : ""}'),k=a.template('#for(var zoomIndex in zoomLevels){## var zoomLevel = zoomLevels[zoomIndex]; #${zoomLevel.text ? zoomLevel.text : zoomLevel + "%"}#}#'),y={pager:{type:"pager",overflow:"never",command:"PageChangeCommand"},spacer:{type:"spacer"},zoom:{type:"zoom",command:"ZoomCommand",zoomInOut:!0,combobox:{zoomLevels:[50,100,150,200,300,400]}},toggleSelection:{type:"buttonGroup",attributes:{"class":"k-toggle-selection-group"},buttons:[{togglable:!0,text:"Enable Selection",command:"EnableSelectionCommand",icon:"cursor",showText:"overflow",name:"toggleSelection",group:"toggle-pan"},{togglable:!0,text:"Enable Panning",command:"EnablePanCommand",icon:"hand",showText:"overflow",name:"togglePan",group:"toggle-pan",selected:!0}]},spacer2:{type:"spacer"},search:{type:"button",text:"Search",command:"OpenSearchCommand",icon:"search",name:"search",showText:"overflow"},open:{type:"button",text:"Open",showText:"overflow",name:"open",icon:"folder-open",command:"OpenCommand"},download:{type:"button",text:"Download",showText:"overflow",name:"download",icon:"download",command:"DownloadCommand"},print:{type:"button",text:"Print",showText:"overflow",name:"print",icon:"print",command:"PrintCommand"}},x=s({},y,{exportAs:{type:"button",text:"Export",showText:"overflow",name:"exportAs",icon:"image-export",command:"ExportCommand"}}),C=m.extend({init:function(t,n){var i=e("");this.options=s(!0,t,n.options.pager),this.toolbar=n,this.toolbar.pager=new a.pdfviewer.Pager(i,s({},t,{change:l(this._change,this)})),this.element=i,this.element.on(u,l(this._keydown,this)),this.attributes(),this.addUidAttr(),this.addOverflowAttr()},_change:function(e){this.options.change&&this.options.change(e.page)||this.toolbar.action({command:"PageChangeCommand",options:{value:e.page}})},_keydown:function(t){var n=this,i=e(t.target),o=t.keyCode,r=n.element.find(":kendoFocusable"),s=r.index(i),l=t.shiftKey?-1:1;o===a.keys.TAB&&r[s+l]&&(r[s+l].focus(),t.preventDefault(),t.stopPropagation())}});a.toolbar.registerComponent("pager",C),i=m.extend({init:function(e,t){this._init(e,t),this.toolbar.zoom=this,t.options.scale&&(this._initValue=100*t.options.scale+"%"),this._appendElements(),this._click=a.throttle(this._click.bind(this),200),this._keydown=a.throttle(this._keydown.bind(this),200),this.element.on(h,".k-button",this._click),this.element.on(u,".k-button",this._keydown),this.attributes(),this.addUidAttr(),this.addOverflowAttr()},_init:function(t,n){var i=e("");this.options=s(!0,t,{messages:n.options.messages.zoom}),this.toolbar=n,this.element=i},_appendElements:function(){var e=this.options;e.zoomInOut&&n(this.element,e.messages,!1),e.combobox&&this._buildComboBox()},_buildComboBox:function(){var t,n=this,i=n.options.messages,o=n.options.combobox,r=[{percent:_.auto,text:i.autoWidth},{percent:_.actual,text:i.actualWidth},{percent:_.fitToWidth,text:i.fitToWidth},{percent:_.fitToPage,text:i.fitToPage}];r=r.concat(o.zoomLevels),t=e(k({zoomLevels:r})),a.support.mobileOS?n.element.append(t):(t=t.kendoComboBox(s({autoWidth:!0,clearButton:!1,value:n._initValue},o)).getKendoComboBox(),n.element.append(t.wrapper),n.combobox=t,n._currentValue=t.value()),t.bind(p,a.throttle(n.change.bind(n),300))},change:function(e){var n,i=e.sender?e.sender.value():e.target.value;if((""+i).match(/^[0-9]+%?$/))n=parseInt(i.replace("%",""),10)/100;else if(!_[i])return this.combobox&&this.combobox.value(this._currentValue),e.preventDefault(),t;this._currentValue=i,this.toolbar.action({command:"ZoomCommand",options:{scale:n||i}})},_buttonCommand:function(t){var n=e(t).closest(".k-button"),i=n.data("command");this.toolbar.action({command:"ZoomCommand",options:{zoomIn:i===f,zoomOut:i===g,updateComboBox:!0}})},_click:function(e){this._buttonCommand(e.target)},_keydown:function(e){var t=e.keyCode,n=a.keys;t===n.ENTER&&(this._buttonCommand(e.target),e.preventDefault())},enable:function(e){var t=this.element;t.find(".k-button, select").toggleClass("k-state-disabled",!e),this.combobox&&this.combobox.enable(e)},destroy:function(){this.combobox&&this.combobox.destroy()}}),o=i.extend({_init:function(t,n){var i=e("");this.options=s(!0,t,{messages:n.options.messages.zoom}),this.toolbar=n,this.element=i},_appendElements:function(){var e=this.options;e.zoomInOut&&n(this.element,e.messages,!0)},overflowHidden:function(){this.element.addClass(b.overflowHidden)}}),a.toolbar.registerComponent("zoom",i,o),r=v.extend({init:function(e,t){var n=this,i=t.items&&t.items.length?t.items:Object.keys(y);n.options=t,t.items=n._updateItems(i),v.fn.init.call(n,e,t),n.bind({click:n._click,toggle:n._click}),t.viewer.bind({update:n._update.bind(n)})},events:[d],_updateItems:function(t){var n=this,i=this.options.messages;return t.map(function(t){var o,r,s,l=e.isPlainObject(t)&&1===Object.keys(t).length&&t.name;return t=l?t.name:t,o=e.isPlainObject(t)?t:x[t],s=o.name,"buttonGroup"===o.type?o.buttons=n._updateItems(o.buttons):r="pager"!==o.type?{name:s,attributes:{"aria-label":i[s],title:i[s],"data-command":o.command,"class":c},overflow:o.overflow}:{overflow:"never"},a.deepExtend(o,r),o})},_click:function(t){var n=e(t.target).data("command");n&&this.action({command:n,options:t.options})},_update:function(e){var t={page:e.page||1,total:e.total||1};this.zoom&&(this.zoom.enable(!e.isBlank),"zoom"===e.action&&this._updateZoomComboBox(e.zoom)),("pagechange"===e.action||e.isBlank)&&this.pager&&this.pager.setOptions(t),this.enable(this.wrapper.find(".k-toggle-selection-group"),!e.isBlank),this.enable(this.wrapper.find("[data-command='OpenSearchCommand']"),!e.isBlank),this.enable(this.wrapper.find("[data-command='DownloadCommand']"),!e.isBlank),this.enable(this.wrapper.find("[data-command='PrintCommand']"),!e.isBlank)},_updateZoomComboBox:function(e){var t=e===_.auto||e===_.actual;t||(e=Math.round(100*e)+"%"),this.zoom&&this.zoom.combobox&&(this.zoom._currentValue=e,this.zoom.combobox.value(e))},action:function(e){this.trigger(d,e)},destroy:function(){this.pager&&this.pager.destroy(),this.zoom&&this.zoom.destroy(),v.fn.destroy.call(this)}}),s(a.pdfviewer,{Toolbar:r,DefaultTools:y})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdfviewer/page.min",["kendo.drawing.min"],e)}(function(){return function(e,t){var n=e.extend,i=e.noop,o=kendo.drawing,r=o.Group,a=o.Surface,s="render",l=kendo.Class,d={Path:"path",MultiPath:"multipath",Rect:"rect",Image:"image",Text:"text"},c=l.extend({init:function(t,n){this.viewer=n,this.processor=t.processor,this.options=t,this.pageNumber=t.number,this.element=e(""),this.element.attr(kendo.attr("number"),this.pageNumber),this._updatePageSize(t),this.width=t.width,this.height=t.height},resize:function(e){var t=this.element;this._updatePageSize({width:Math.min(t.width()*e,this.width),height:Math.min(t.height()*e,this.height)})},_updatePageSize:function(e){this.element.width(e.width).height(e.height)},destroy:function(){kendo.destroy(this.element)},render:i}),u=c.extend({draw:function(){var e=this,t=e.options.geometries;e.group=new r,e.surface.draw(e.group),e._drawGeometries(t),e.viewer.trigger(s,{page:this}),kendo.ui.progress(e.element,!1)},load:function(){var e=this;!e.loaded&&e.processor&&(e.processor.fetchPageData(e.pageNumber).then(function(t){e.options=t,e._initSurface(),e.draw()}),e.loaded=!0)},_initSurface:function(){var e={width:this.element.width(),height:this.element.height()},t=n({width:this.width,height:this.height},this.viewer.options.view);this.surface=new a(this.element,t),this._updatePageSize(e)},_drawGeometries:function(e){var t,n,i,o=this;if(e)for(n=0;n<=e.length;n++)if(i=e[n]){switch(i.type){case d.Path:case d.MultiPath:t=o._drawPath(i);break;case d.Rect:t=o._drawRect(i);break;case d.Image:t=o._drawImage(i);break;case d.Text:t=o._drawText(i);break;default:t=null}t&&o.group.append(t)}},_drawRect:function(e){var t=new kendo.geometry.Rect(e.point,e.size);return new o.Rect(t,{transform:this._getMatrix(e.transform),fill:e.fillOptions,stroke:e.strokeOptions})},_drawImage:function(e){var t=new kendo.geometry.Rect(e.point,e.size);return new o.Image(e.src,t,{transform:this._getMatrix(e.transform)})},_drawText:function(e){var t={transform:this._getMatrix(e.transform),stroke:e.strokeOptions,fill:e.fillOptions,font:e.font};return new kendo.drawing.Text(e.content,e.point,t)},_drawPath:function(e){var t,n,i,r,a,s={transform:this._getMatrix(e.transform),stroke:e.strokeOptions,fill:e.fillOptions},l=new o.MultiPath(s);for(t=0;t"),o.canvas=i.get(0),c.fn.init.call(o,t,n),o.canvas.width=o.width,o.canvas.height=o.height,o.element.append(i)},load:function(e,n){var i=this;if(i._scale!==e||n){if(i._scale&&i._scale!==e&&!n)return i._scale=e,i.render(e),t;i.processor&&i.processor.fetchPageData(i.pageNumber).then(function(t){return i._page=t,i.render(e).then(function(){i.viewer.trigger(s,{page:i})})}),i._scale=e,i.loaded=!0}},render:function(e){var t=this,n=this.canvas.getContext("2d"),i=this._page.getViewport({scale:e});return this._scale=e,this.canvas.width=i.width,this.canvas.height=i.height,this._renderTask&&(this._renderTask.cancel(),this._renderTask=null),this._updatePageSize({width:i.width,height:i.height}),this._renderTask=this._page.render({canvasContext:n,viewport:i}),this._renderTextLayer(i),this._renderTask.promise.then(function(){t._renderTask=null})["catch"](function(){})},_renderTextLayer:function(t){var n=this,i=n._page;n.textLayer&&n.textLayer.remove(),n.textLayer=e("").get(0),n.element.append(n.textLayer),i.getTextContent({normalizeWhitespace:!0}).then(function(i){e(n.textLayer).css({height:t.height,width:t.width}).html("");var o={textContent:i,container:n.textLayer,viewport:t,textDivs:[],enhanceTextSelection:!0};n.processor.renderTextLayer(o)})}});n(kendo.pdfviewer.dpl,{geometryTypes:d,Page:u}),n(kendo.pdfviewer.pdfjs,{Page:h})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdfviewer/search.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=kendo.Class,i=e.extend,o=e.isArray,r=n.extend({init:function(e){var t=this;t.options=i({},t.options,e),t.processDom()},options:{highlightClass:"k-search-highlight",charClass:"k-text-char"},processDom:function(){var e,t=this;for(t.targets=o(t.options.target)?t.options.target:[t.options.target],t.textNodes=[],t.charIndex=0,t.text="",t.targets.forEach(function(e){t.traverseToTextNode(e)}),e=0;e0&&(n=e(t).wrap("").parent(),n.empty(),i.splitChars(n.get(0),o),n.children().unwrap())},splitChars:function(e,t){var n,i=this,o="";for(n=0;n"+t[n]+"",i.charIndex++;e.innerHTML=o},search:function(e,t){var n,i=this,o=RegExp(e,t?"g":"gi");if(i.matches=[],i.resetMark(),i.resetHighlight(),i.resetMatchIndex(),""!==e){for(n=o.exec(i.text);n;)i.matches.push({startOffset:n.index,endOffset:n.index+n[0].length}),n=o.exec(i.text);i.highlightAll(),i.mark()}},highlightAll:function(){var e=this;e.matches.forEach(function(t,n){var i=t.startOffset,o=t.endOffset;e.highlight(i,o,n+1)})},highlight:function(t,n,i){var o,r=this;for(o=t;ot.matches.length?t.currentIndex=t.matches.length:t.resetMark():t.currentIndex=0,e(t.targets).find("."+t.options.charClass+"["+kendo.attr("match-index")+"="+t.currentIndex+"]").wrapInner("")},resetMark:function(){var t=this;e(t.targets).find("mark").contents().unwrap()},nextMatch:function(){var e=this;e.currentIndex++,e.currentIndex>e.matches.length&&(e.currentIndex=1),e.mark()},previousMatch:function(){var e=this;e.currentIndex--,e.currentIndex<1&&(e.currentIndex=e.matches.length),e.mark()},getMarkedIndex:function(){return this.matches.length?this.currentIndex:0},getFirstMarked:function(){return e(this.targets).find("mark").eq(0)},destroy:function(){var t=this;t.resetMark(),e(t.targets).children("span:not(."+t.options.charClass+")").each(function(t,n){e(n).text(e(n).text())})}});i(kendo.pdfviewer,{SearchDOM:r})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdfviewer/dialogs.min",["kendo.dialog.min","kendo.window.min","kendo.binder.min","kendo.numerictextbox.min","kendo.dropdownlist.min"],e)}(function(){return function(e,t){var n=window.kendo,i=e.extend,o=n.Class,r={svg:".svg",png:".png"},a=n.keys,s=o.extend({init:function(t){this.options=i(t,{actions:[{text:t.messages.dialogs.okText}]}),this._dialog=e("").kendoDialog(this.options).getKendoDialog()},open:function(){this._dialog.center().open()}}),l=o.extend({init:function(e){return this.options=i(e,this.options,{fileFormats:[{description:e.messages.dialogs.exportAsDialog.png,extension:r.png},{description:e.messages.dialogs.exportAsDialog.svg,extension:r.svg}],title:e.messages.dialogs.exportAsDialog.title,open:function(){this.center()}}),this._initializeDialog(),this},options:{extension:r.png,autoFocus:!0,resizable:!1,modal:{preventScroll:!0},width:"90%",maxWidth:520,template:"#: messages.exportAsDialog.labels.fileName #:#: messages.exportAsDialog.labels.saveAsType #:#: messages.exportAsDialog.labels.page #:#: messages.save ##: messages.cancel #"},_updateModel:function(e){e.pagesCount&&this.viewModel.set("pagesCount",e.pagesCount),e.page&&this.viewModel.set("page",e.page)},_initializeDialog:function(){var t=this,i=t.options,o=i.messages.dialogs,r=e("").append(n.template(i.template)({total:i.pagesCount,messages:o})).kendoWindow(i).getKendoWindow();return t.viewModel=n.observable({title:o.exportAsDialog.title,name:o.exportAsDialog.defaultFileName,extension:i.extension,fileFormats:i.fileFormats,pagesCount:i.pagesCount,page:1,apply:t.apply.bind(this),close:function(){r.close()}}),t._dialog=r,n.bind(r.element,t.viewModel),r},open:function(){this._dialog.center().open()},apply:function(){this._dialog.close(),this.options.apply({fileName:this.viewModel.name+this.viewModel.extension,extension:this.viewModel.extension,page:this.viewModel.page})}}),d=o.extend({init:function(e){var t=this;t.options=i({},e,t.options)},options:{resizable:!1,template:"#: messages.of #"},open:function(){var e=this;e.dialog||e._initializeDialog(),e.dialog.open()},_initializeDialog:function(){var t=this,o=n.template(t.options.template),r=e("").append(o({messages:t.options.messages})),s={top:t.options.position.top+16,left:t.options.position.left+16};t.dialog=new n.ui.Window(r,i({},t.options,{autoFocus:!1,title:!1,position:{top:s.top,left:s.left},minHeight:30,draggable:{dragHandle:".k-search-dialog-draghandle"},activate:function(e){e.sender.element.find(".k-search-dialog-input").focus()}})),t.searchModel=n.observable({boundValue:"",searchText:"",matchCase:!1,matchIndex:0,matches:0,matchCaseClick:function(){this.set("matchCase",!this.matchCase)},next:t.options.next,prev:t.options.prev,close:function(){this.set("boundValue",""),t.dialog.close()},onKeyup:function(e){var t=e.keyCode,n=e.shiftKey?this.prev:this.next;t===a.ENTER&&(n(),e.preventDefault())},onInput:function(e){this.set("searchText",e.target.value)}}),n.bind(t.dialog.element,t.searchModel)}});i(n.pdfviewer,{dialogs:{ErrorDialog:s,ExportAsDialog:l,SearchDialog:d}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdfviewer/commands.min",["kendo.upload.min"],e)}(function(){return function(e,t){var n=window.kendo,i=e.proxy,o=e.extend,r=e.parseJSON,a=n.ui.progress,s=n.Class,l="open",d="zoomStart",c="zoomEnd",u=s.extend({init:function(e){this.options=e,this.viewer=e.viewer,this.errorMessages=this.viewer.options.messages.errorMessages}}),h=u.extend({init:function(e){u.fn.init.call(this,e),this.upload=this.viewer.processor.upload},exec:function(){(this.viewer._upload||this._initUpload()).element.click()},_initUpload:function(){var t,n={select:i(this._onSelect,this),success:i(this._onSuccess,this),error:i(this._onError,this),complete:i(this._onComplete,this),showFileList:!1,multiple:!1,validation:{allowedExtensions:[".pdf"]}};return this.upload&&o(n,{async:{saveUrl:this.upload.url,autoUpload:!0,saveField:this.upload.saveField}}),t=e('').kendoUpload(n).getKendoUpload(),this.viewer._upload=t,t},_onComplete:function(){a(this.viewer.pageContainer,!1)},_onSuccess:function(t){var n=r(t.response);e.isPlainObject(n)?this.viewer.processor.fromJSON(n):this.viewer._triggerError({error:n,message:this.errorMessages.parseError})},_onError:function(e){this.viewer._triggerError({error:e.XMLHttpRequest.responseText,message:this.errorMessages.notSupported})},_onSelect:function(e){var n,i=this,o=e.files[0];if(a(i.viewer.pageContainer,!0),!i.viewer.trigger(l,{file:o})&&!i.upload){if(".pdf"!==o.extension.toLowerCase())return i.viewer._triggerError({error:o,message:i.errorMessages.notSupported}),t;n=new FileReader,n.onload=function(e){var t=e.target.result;i.viewer.fromFile(t)},n.onerror=function(){i.viewer._triggerError({error:o,message:i.errorMessages.parseError})},n.readAsArrayBuffer(o.rawFile)}}}),p=u.extend({exec:function(){var e=this.options.value;this.viewer.activatePage(e)}}),f=u.extend({exec:function(){if(!this.viewer.document)return this.viewer._triggerError({message:this.errorMessages.notFound}),t;var e=this.viewer.document.info&&this.viewer.document.info.title||this.viewer.options.messages.defaultFileName;this.viewer.processor.downloadFile(e)}}),g=u.extend({init:function(t){t=e.extend(t,this.options),u.fn.init.call(this,t)},exec:function(){var e=this.viewer._saveDialog||this._initDialog();e._updateModel({pagesCount:this.viewer.document&&this.viewer.document.total||1,page:this.viewer.options.page}),e.open()},apply:function(e){var t=e.extension;".png"===t?this.viewer.exportImage(e):".svg"===t&&this.viewer.exportSVG(e)},_initDialog:function(){return this.viewer._saveDialog=new n.pdfviewer.dialogs.ExportAsDialog({apply:this.apply.bind(this),pagesCount:this.viewer.document&&this.viewer.document.total||1,messages:this.viewer.options.messages})}}),m=u.extend({exec:function(){var e=this,t=e.viewer;t._toggleSelection(!0)}}),v=u.extend({exec:function(){var e=this,t=e.viewer;t._toggleSelection(!1)}}),_=u.extend({init:function(e){var t=this;t.viewer=e.viewer,t.viewer.searchDialog||(t.viewer.searchDialog=new n.pdfviewer.dialogs.SearchDialog({position:{top:t.viewer.pageContainer.offset().top,left:t.viewer.pageContainer.offset().left},messages:t.viewer.options.messages.dialogs.search,open:i(t._open,t),next:i(t._next,t),prev:i(t._prev,t),close:i(t._close,t)})),u.fn.init.call(t,e)},exec:function(){var e=this;e.viewer.searchDialog.open()},_open:function(){var e=this;e.changeHandler=i(e._change,e),e.zoomStartHandler=i(e._closeDialog,e),e.openFileHandler=i(e._closeDialog,e),e.viewer._searchDOM||(e.viewer._initSearchDOM(),e.viewer.searchDialog.searchModel.bind("change",e.changeHandler),e.viewer.bind("zoomStart",e.zoomStartHandler),e.viewer.bind("open",e.openFileHandler))},_close:function(){var e=this,t=e.viewer._searchDOM;e.viewer.searchDialog.searchModel.unbind("change",e.changeHandler),e.viewer.unbind("zoomStart",e.zoomStartHandler),e.viewer.unbind("open",e.openFileHandler),t.destroy(),delete e.viewer._searchDOM,e._updateSearchModel()},_change:function(e){var t=this,n=t.viewer._searchDOM,i=e.field,o=t.viewer.searchDialog.searchModel,r=o[i];if(n)switch(i){case"searchText":n.search(r,o.matchCase),t._updateSearchModel();break;case"matchCase":n.search(o.searchText,r),t._updateSearchModel()}},_next:function(){var e=this,t=e.viewer._searchDOM;t.matches&&t.matches.length&&(t.nextMatch(),e._updateSearchModel())},_prev:function(){var e=this,t=e.viewer._searchDOM;t.matches&&t.matches.length&&(t.previousMatch(),e._updateSearchModel())},_updateSearchModel:function(){var e=this,t=e.viewer._searchDOM,n=e.viewer.searchDialog.searchModel;
t?(n.set("matches",t.matches.length),n.set("matchIndex",t.getMarkedIndex()),e._scrollToMark()):(n.set("searchText",""),n.set("matches",0),n.set("matchIndex",0),n.set("matchCase",!1))},_scrollToMark:function(){var e,t=this,n=t.viewer._searchDOM,i=n.getFirstMarked(),o=t.viewer._scroller;i.length&&(e=i.offset().top-o.scrollElement.offset().top-100,o.scrollTo(o.scrollLeft,e*-1))},_closeDialog:function(){var e=this;e.viewer.searchDialog.dialog.close()}}),b=u.extend({exec:function(){var e,t=this,n=t.options,i=t.viewer,o=n.scale,r=0,a=t.viewer._pageNum,s=i.pageContainer[0].clientHeight,l=1,d=[];"dpl"!==i.processingLib&&(o=t._calculateZoom(),e=function(){var e=t.viewer._scroller,n=i._scrollingStarted;e.scrollTop>e.scrollHeight()&&e._resize(),n||(i.activatePage(a),i._scrollingStarted=!1)},o&&(i.zoomScale=o,i._scrollingStarted=!1,i.pages.forEach(function(e){var t;i._visiblePages.indexOf(e)!==-1&&e.loaded?(d.push(e.render(o)),t=e._page.getViewport({scale:o}).height):(e.resize(o),t=e.element.height()),r+=t,r<=s&&l++}),i._visiblePagesCount!=l&&(i._visiblePagesCount=l,i._loadVisiblePages()),Promise.all(d).then(function(){e(),t._triggerZoomEnd(o)})["catch"](function(){e(),t._triggerZoomEnd(o)})))},_calculateZoom:function(){var e,t=this.options,n=this.viewer,i=n.options,o=n.pageContainer,r=n._visiblePages&&n._visiblePages[0].canvas,a=t.scale,s=a;if(n._allowResize=!1,n._autoFit=!1,t.zoomIn?s=a=n.zoomScale+i.zoomRate:t.zoomOut?s=a=n.zoomScale-i.zoomRate:"auto"===a?(n._allowResize=!0,s=n._autoZoomScale):"actual"===a?s=1:"fitToWidth"===a?(n._allowResize=!0,n._autoFit="fitToWidth",s=o.width()/(r.width/n.zoomScale)):"fitToPage"===a&&(n._allowResize=!0,n._autoFit="fitToPage",s=o.height()/(r.height/n.zoomScale)),e=ai.zoomMax,!e&&!n.trigger(d,{scale:a}))return t.updateComboBox&&n.toolbar._updateZoomComboBox(a),s},_triggerZoomEnd:function(e){var t=this,n=t.viewer;n.trigger(c,{scale:e})}}),w=u.extend({init:function(e){u.fn.init.call(this,e)},exec:function(){var e=this;return e.viewer.document?(e._renderPrintContainer(),e._loadAllPages(),t):(e.viewer._triggerError({message:this.errorMessages.notFound}),t)},_renderPrintContainer:function(){this.printContainer=e("")},_loadAllPages:function(){var e,t,n,i=this,o=i.viewer.pages,r=i.viewer.zoom(),a=20,s=!0;for(t=0;t"),o="";i.append(o),this.printContainer.append(i)},_printDocument:function(){var e=this,t=e.viewer.pages,n=t[0].width,i=t[0].height,o=window.open("","","innerWidth="+n+",innerHeight="+i+"location=no,titlebar=no,toolbar=no");o.document.write(e.printContainer.html()),o.document.close(),o.focus(),o.print(),o.close()}});o(n.pdfviewer,{OpenCommand:h,PageChangeCommand:p,DownloadCommand:f,EnableSelectionCommand:m,EnablePanCommand:v,ExportCommand:g,PrintCommand:w,OpenSearchCommand:_,ZoomCommand:b})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.pdfviewer.min",["kendo.mobile.scroller.min","pdfviewer/processors/pdfjs-processor.min","pdfviewer/processors/dpl-processor.min","pdfviewer/toolbar.min","pdfviewer/page.min","pdfviewer/search.min","pdfviewer/dialogs.min","pdfviewer/commands.min"],e)}(function(){return function(e,t){var n,i=".kendoPDFViewer",o=window.kendo,r=o.ui,a=e.proxy,s=e.extend,l=o.drawing,d=e.extend({PLUS:187,MINUS:189,ZERO:48,NUMPAD_ZERO:96},o.keys),c=r.Widget,u=o.ui.progress,h="scroll",p="render",f="open",g="error",m="focus"+i,v="keydown"+i,_="DOMMouseScroll"+i+" mousewheel"+i,b="update",w=1.25,k="pagechange",y="zoomStart",x="zoomEnd",C="ZoomCommand",S="#ffffff",T="tabindex",D={pdfjs:"pdfjs",dpl:"dpl"},A={viewer:"k-pdf-viewer k-widget",scroller:"k-canvas k-list-scroller",enableTextSelection:"k-enable-text-select",enablePanning:"k-enable-panning",highlightClass:"k-search-highlight",charClass:"k-text-char"},I=c.extend({init:function(e,t){var n=this;c.fn.init.call(n,e,o.deepExtend({},this.options,t)),n._wrapper(),n.options.toolbar&&n._renderToolbar(),n._initProcessor(t||{}),n._renderPageContainer(),n._loadDocument(),n._tabindex(),o.notify(n,o.ui)},events:[p,f,g,y,x],options:{name:"PDFViewer",view:{type:"canvas"},pdfjsProcessing:{file:null},dplProcessing:{read:{url:null,type:"GET",dataType:"json",pageField:"pageNumber"},upload:{url:null,saveField:"file"},download:{url:null},loadOnDemand:!1},toolbar:{items:[]},width:1e3,height:1200,page:1,defaultPageSize:{width:794,height:1123},scale:null,zoomMin:.5,zoomMax:4,zoomRate:.25,messages:{defaultFileName:"Document",toolbar:{zoom:{zoomOut:"Zoom Out",zoomIn:"Zoom In",actualWidth:"Actual Width",autoWidth:"Automatic Width",fitToWidth:"Fit to Width",fitToPage:"Fit to Page"},open:"Open",exportAs:"Export",download:"Download",pager:{first:"Go to the first page",previous:"Go to the previous page",next:"Go to the next page",last:"Go to the last page",of:" of {0} ",page:"page",pages:"pages"},print:"Print",toggleSelection:"Enable Selection",togglePan:"Enable Panning",search:"Search"},errorMessages:{notSupported:"Only pdf files allowed.",parseError:"PDF file fails to process.",notFound:"File is not found."},dialogs:{exportAsDialog:{title:"Export...",defaultFileName:"Document",pdf:"Portable Document Format (.pdf)",png:"Portable Network Graphics (.png)",svg:"Scalable Vector Graphics (.svg)",labels:{fileName:"File name",saveAsType:"Save as",page:"Page"}},okText:"OK",save:"Save",cancel:"Cancel",search:{inputLabel:"Search Text",matchCase:"Match Case",next:"Next Match",previous:"Previous Match",close:"Close",of:"of"}}}},_wrapper:function(){var e=this,t=e.options;e.wrapper=e.element,e.wrapper.width(t.width).height(t.height).addClass(A.viewer).on(m,a(e._focus,e)).on(v,a(e._keydown,e)),e._allowResize=null===e.options.scale,e._autoZoomScale=w,e.zoomScale=e.options.scale||e._autoZoomScale,e._resizeHandler=o.onResize(function(){e.resize()}),e._pageNum=e.options.page},_focus:function(e){this.toolbar?this.toolbar.wrapper.focus():this.pageContainer.focus(),e.preventDefault()},_keydown:function(e){var t=[d.PLUS,d.NUMPAD_PLUS],n=[d.MINUS,d.NUMPAD_MINUS],i=[d.ZERO,d.NUMPAD_ZERO],o=!1,r={command:C,options:{updateComboBox:!0}};e.ctrlKey&&!this._blankPage&&this.processingLib!==D.dpl&&(t.includes(e.keyCode)?(r.options.zoomIn=!0,o=!0):n.includes(e.keyCode)?(r.options.zoomOut=!0,o=!0):i.includes(e.keyCode)&&(r.options.scale=w,o=!0),o&&(this.execute(r),e.preventDefault()))},_initProcessor:function(e){var t,i=this;t=e.dplProcessing?i.options.dplProcessing:i.options.pdfjsProcessing,i.processingLib=e.dplProcessing?D.dpl:D.pdfjs,i.processor=new o.pdfviewer[i.processingLib].processor(t,i),n=o.pdfviewer[i.processingLib].Page},_renderToolbar:function(){var t=this,n=t.options,i={pager:{messages:n.messages.toolbar.pager},scale:n.scale,resizable:!0,items:n.toolbar.items,width:n.width,action:t.execute.bind(t),messages:n.messages.toolbar,viewer:this},r=e("");r.appendTo(t.element),t.toolbar=new o.pdfviewer.Toolbar(r,i)},_initErrorDialog:function(e){var t,n=this;return n._errorDialog||(e=s(e,{messages:n.options.messages}),t=new o.pdfviewer.dialogs.ErrorDialog(e),n._errorDialog=t._dialog),n._errorDialog},_renderPageContainer:function(){var t=this;t.pageContainer||(t.pageContainer=e(""),t.pageContainer.addClass(A.scroller),t.pageContainer.attr(T,0),t.wrapper.append(t.pageContainer))},_triggerError:function(e){var t=this._initErrorDialog();s(e,{dialog:t}),this.pageContainer&&u(this.pageContainer,!1),this.trigger(g,e)||t.open().content(e.message)},_renderPages:function(){var e,i,o,r,a=this,l=a.document;if(a.pages=[],!l||!l.total)return a._renderBlankPage(),t;for(e=l.pages,i=1;i<=l.total;i++)r={processor:a.processor,number:i},e&&e.length&&(r=s(r,e[i-1])),o=new n(r,a),a.pages.push(o),a.pageContainer.append(o.element);a._attachContainerEvents(),a._getVisiblePagesCount()},_renderBlankPage:function(){this._blankPage=new n(this.options.defaultPageSize,this),this.pageContainer.append(this._blankPage.element),this.trigger(b,{isBlank:!0})},_resize:function(){var e,n,i=this;if(i._allowResize){if(!i.pages||!i.pages.length)return i._blankPage&&(n=e/i._blankPage.element.width(),i._blankPage.resize(n)),t;i.toolbar&&i.toolbar.resize(!0),i._resizeHandler&&clearTimeout(i._resizeHandler),i._resizeHandler=setTimeout(i._resizePages.bind(i),100)}},_resizePages:function(){var e=this,n=e.pageContainer[0].clientWidth,i=0;return e.pages.forEach(function(e){var t=n/e.element.width();t>i&&(i=t)}),e._autoFit?(e.zoom(e._autoFit,!0),t):(i=Math.min(Math.max(i,e.options.zoomMin),w),i!=e.zoomScale&&(e.zoom(i,!0),e.zoomScale=i,e._allowResize=!0),t)},_attachContainerEvents:function(){var e=this;e._wheel=o.throttle(e._wheel.bind(e),300),e.processingLib!==D.dpl&&e.pageContainer.on(_,function(t){t.ctrlKey&&(document.activeElement!==e.pageContainer[0]&&e.pageContainer.focus(),e._wheel(t),t.preventDefault())}),e._scroller=new o.mobile.ui.Scroller(e.pageContainer,{zoom:!1,elastic:!0}),e._scroller.scrollElement.addClass(A.enablePanning),e._scroller.bind(h,a(e._scroll,this))},_scroll:function(e){var n,i,o,r,a,s,l,d=this,c=d.pageContainer[0].scrollHeight,u=d.pageContainer.height(),h=e.scrollTop,p=d.pageContainer.offset().top,f=d.pages.length,g=d._pageNum,m=g-1,v=g,_=h-d._prevScrollTop>0?1:-1;if(d._preventScroll||!f)return d._preventScroll=!1,t;if(d._scrollingStarted=!0,i=d.pages[m],o=i.element.offset().top-p,r=i.element.height(),_==-1&&d.pages[m+_]&&(a=d.pages[m-d._visiblePagesCount]||d.pages[m+_],s=a.element.offset().top-p,l=a.element.height()),Math.abs(h-(d._prevScrollTop||0))>u*d.zoomScale?v=Math.floor(h*(1/(c/f)))+1:o<0&&Math.abs(o)>=r/2&&1===_?v++:a&&Math.abs(s)<=l/2&&v--,g!==v&&v>=1&&v<=f){if(n=d.pages[v-1].element,n.offset().top>u)return;d._pageNum=v,d._loadVisiblePages(),d.trigger(b,{action:k,page:v,total:f})}d._prevScrollTop=h},_wheel:function(e){var t=e.originalEvent,n=t.wheelDelta?-t.wheelDelta:t.detail,i=n<0;this.execute({command:C,options:{zoomIn:i,zoomOut:!i,updateComboBox:!0}}),e.preventDefault()},zoom:function(e,t){var n=this;return e?n.execute({command:C,options:{scale:e,updateComboBox:!t}}):n.zoomScale},execute:function(e){var t=s({viewer:this},e.options),n=new o.pdfviewer[e.command](t);return n.exec()},_loadDocument:function(){var e=this,t=e.options.page;u(e.pageContainer,!0),e.processor.fetchDocument().done(function(n){e._clearPages(),e.document=n,e._renderPages(),e.resize(!0),n&&(t=t>=1&&t<=n.total?t:1,e.activatePage(t)),u(e.pageContainer,!1)})},loadPage:function(e){var t=this.pages&&this.pages[e-1];if(t)return t.load(this.zoomScale)},activatePage:function(e){var t,n,i,o,r=this.pages&&this.pages[e-1],a=this._scroller;r&&(t=a.scrollTop,n=a.element.offset().top,i=r.element.offset().top,o=this._autoFit?0:parseInt(r.element.css("marginTop"),10),this._pageNum=e,this._loadVisiblePages(),this._preventScroll=!0,this._scroller.scrollTo(0,-t-i+n+o),this.trigger(b,{action:k,page:e,total:this.pages.length}))},_getVisiblePagesCount:function(){for(var e=this,t=0,n=0,i=e.pageContainer[0].clientHeight,o=0;t<=i&&o'),K=n.template(''),Q=n.template(''),X=n.template("#=value# / #=maxValue#"),J=n.template(''),Z=n.template(''),ee=r.extend({init:function(e,t){var i=this;r.fn.init.call(i,e,t),i.options=a({},i.options,t),i._element(),i._wrapper(),i._aria(),i._initSettings(),i._renderItems(),i._renderTooltip(),i._renderLabel(),i._selectInitial(),i._attachEvents(),n.notify(this)},events:[u,c],options:{name:"Rating",messages:{},min:1,max:5,selection:W.continuous,precision:U.item,tooltip:!0,label:!0,readonly:!1,enabled:!0,selectValueOnFocus:null,itemTemplate:null,selectedTemplate:null,hoveredTemplate:null},_element:function(){var e=this;e.element.attr("type","number"),e.element.addClass($.hidden)},_wrapper:function(){var t=this;t.wrapper=e(Y({styles:$})),t.wrapper=t.element.wrap(t.wrapper).parent(),t.wrapper.addClass(t.element[0].className.replace($.hidden,"")).append(e(K({styles:$}))),t.wrapper[0].style.cssText=t.element[0].style.cssText,t.container=t.wrapper.find(H+$.container)},_aria:function(){var t,i=this,o=i.wrapper,r=i.element,a=r.attr("id"),s=e('label[for="'+a+'"]'),l=r.attr(C),c=r.attr(S);i.wrapper.attr(L,0).attr(N,"slider").attr(T,d(i.element.attr(O))||i.options.min).attr(D,d(i.element.attr(V))||i.options.max).attr(A,i.options.value),l?o.attr(C,l):c?o.attr(S,c):s.length&&(t=s.attr("id"),t||(t=(a||n.guid())+P,s.attr("id",t)),o.attr(S,t))},_initSettings:function(){var e=this,t=e.options.precision!=U.item,n=e.options;n.value=d(n.value),null===n.value&&(n.value=d(e.element.val())),n.min=d(e.element.attr(O))||e.options.min,n.max=d(e.element.attr(V))||e.options.max,e._valueMin=t?e.options.min-R:e.options.min,n.enabled=n.enabled&&!e.element.attr(f),n.readonly=n.readonly||!!e.element.attr(g),e._setState()},_renderItems:function(){var t,i,o=this,r=o.container,a=o.options.min,s=o.options.max,l=o.options.itemTemplate?n.template(o.options.itemTemplate):Z;for(t=a;t<=s;t+=1)i=e(J({styles:$,value:t})),i.append(l({icon:$.icon,index:t})),r.append(i)},_renderTooltip:function(){var n,i=this,o=i.container.find(H+z),r=i.options.tooltip===!0;if(!r)return o.removeAttr(G.title),t;for(n=0;nn.options.max||(n.trigger(u,{target:e}),n._change(e,i),n._focus())},_mouseenter:function(t){var n=this,i=e(t.target),o=i.closest(H+z);n.options.enabled&&!n.options.readonly&&(n.enableMove=!0,i.is(H+z)&&n._updateItemTemplates(p,o))},_mouseleave:function(t){var n,i,o,r,a,s=this,l=s.options.selection,d=s.options.precision==U.half,c=l==W.single,u=e(t.target).closest(H+z),p=s.container.find(H+z);if(s.enableMove=!1,o=function(e){n=s.parsedValue%1!==0&&e.is(s.container.find("[data-value="+Math.ceil(s.value())+"]")),i=!e.hasClass(q.selected)&&!e.hasClass(q.hovered)||n?j.item:j.selected,s._renderTemplate(e,i),d&&n&&e.hasClass(q.selected)&&s._togglePrecisionElements(e,h)},p.removeClass(q.hovered),c)o(u);else for(r=0;r").addClass(M),r.append(a({icon:$.iconSelected})),r.width(i?t.width()/2:t.width()),t.append(r),t.append(e("").css({width:t.width(),height:t.height(),display:"block"})),o._createUpdatePrecisionComplement(t,i))},_createUpdatePrecisionComplement:function(t,i){var o=this,r=t.find(H+F),a=t.children().first(),s=n.support.isRtl(o.wrapper),l=s?"right":"left";r.length||(r=a.wrap(e("").addClass(F)).parent()),r.width(i?t.width()/2:0),r.css(l,i||s?"50%":0)},_updatePrecisionElements:function(e,t){var i=this,o=e.find(H+M),r=n.parseFloat(e.data(G.value)),a=n.support.isRtl(this.wrapper),s=e.width(),l=s/2,c=d(e.outerWidth()/2),u=a?t>c:t0)for(n=e(t[0]),!/\S/.test(n.text())&&/^\?/.test(n.val())&&n.remove(),i=0;i-1&&(d[i]=t)),c.hasOwnProperty(n)?l(n,t):c.hasOwnProperty(e)&&!F[e]?l(e,t):M[e]||(o=e.match(/^k(On)?([A-Z].*)/),o&&(r=o[2].charAt(0).toLowerCase()+o[2].slice(1),o[1]&&"kOnLabel"!=e?d[r]=t:("kOnLabel"==e&&(r="onLabel"),l(r,t)))))}),h=r.kDataSource||r.source,h&&(d.dataSource=E(i,o,p,h)),d.$angular=[i],{options:d,unresolved:f}}function a(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 s(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 d(e){return/checkbox|radio/i.test(e.attr("type"))?e.prop("checked"):e.val()}function c(e){return R.test(e[0].tagName)}function u(e,t,i,o,r){var a,s,l,u,h;e.value&&(s=!1,a=c(i)?function(){return d(i)}:function(){return e.value()},l=function(){var i=o.$viewValue;i===n&&(i=o.$modelValue),i===n&&(i=null),s=!0,setTimeout(function(){if(s=!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)()}),c(i)&&i.on("change",function(){s=!0}),u=function(e){return function(){var n;s&&!i.is("select")||(e&&r&&(n=r.$pristine),o.$setViewValue(a()),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=a(),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,a,s,l,d,c,u,p,f,g,m,v,_;return kendo.ui.DateRangePicker&&t instanceof kendo.ui.DateRangePicker?(r=o.split(","),a=r[0].trim(),h(t._startDateInput,i,a),r[1]?(s=r[1].trim(),h(t._endDateInput,i,s),t.range({start:i[a],end:i[s]})):t.range({start:i[a],end:null}),n):"function"!=typeof t.value?(A.warn("k-ng-model specified on a widget that does not have the value() method: "+t.options.name),n):(l=e(t.element).parents("ng-form, form").first(),d=kendo.getter(l.attr("name"),!0)(i),c=S(o),u=c.assign,p=!1,f=kendo.ui.MultiSelect&&t instanceof kendo.ui.MultiSelect||kendo.ui.RangeSlider&&t instanceof kendo.ui.RangeSlider,g=function(e){return e&&f?e.length:0},m=g(c(i)),t.$angular_setLogicValue(c(i)),v=function(e,i){e===n&&(e=null),p||e==i&&g(e)==m||(m=g(e),t.$angular_setLogicValue(e))},f?i.$watchCollection(o,v):i.$watch(o,v),_=function(){p=!0,d&&d.$pristine&&d.$setDirty(),w(i,function(){u(i,t.$angular_getLogicValue()),m=g(c(i))}),p=!1},t.first("change",_),t.first("spin",_),n)}function p(e,t){var n=e.$on("$destroy",function(){n(),t&&(kendo.destroy(t.element),t=null)});return n}function f(t,n){function i(){a.disconnect()}function o(){a.observe(e(n)[0],{attributes:!0})}var r,a;window.MutationObserver&&t.wrapper&&(r=[].slice.call(e(n)[0].classList),a=new MutationObserver(function(n){i(),t&&(n.forEach(function(n){var i,o=e(t.wrapper)[0];switch(n.attributeName){case"class":i=[].slice.call(n.target.classList),i.forEach(function(e){r.indexOf(e)<0&&(o.classList.add(e),kendo.ui.ComboBox&&t instanceof kendo.ui.ComboBox&&t.input[0].classList.add(e))}),r.forEach(function(e){i.indexOf(e)<0&&(o.classList.remove(e),kendo.ui.ComboBox&&t instanceof kendo.ui.ComboBox&&t.input[0].classList.remove(e))}),r=i;break;case"disabled":"function"!=typeof t.enable||t.element.attr("readonly")||t.enable(!e(n.target).attr("disabled"));break;case"readonly":"function"!=typeof t.readonly||t.element.attr("disabled")||t.readonly(!!e(n.target).attr("readonly"))}}),o())}),o(),t.first("destroy",i))}function g(t,n,i,o,r,a,s){var l=n.$watch(r,function(r,d){var c,u,h,p,f;t._muteRebind||r===d||(l(),s._cleanUp&&s._cleanUp(),c=U[t.options.name],c&&c.forEach(function(t){var i=n.$eval(s["k"+t]);i&&o.append(e(i).attr(kendo.toHyphens("k"+t),""))}),u=e(t.wrapper)[0],h=e(t.element)[0],p="Upload"===t.options.name,p&&(i=e(h)),f=i.injector().get("$compile"),t._destroy(),a&&a(),t=null,h&&(u&&u.parentNode.replaceChild(h,u),e(i).replaceWith(o)),f(o)(n))},!0);w(n)}function m(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,a,s,l=n?"Mobile":"";l+=e.fn.options.name,o=l,r="kendo"+l.charAt(0)+l.substr(1).toLowerCase(),l="kendo"+l,a=l.replace(/([A-Z])/g,"-$1"),z.indexOf(l.replace("kendo",""))==-1&&(s=l===r?[l]:[l,r],t.forEach(s,function(e){
x.directive(e,function(){return{restrict:"E",replace:!0,template:function(e,t){var n=P[o]||"div",i=t.kScopeField||t.scopeField;return"<"+n+" "+a+(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 k(t,n){t.$destroy(),n&&e(n).removeData("$scope").removeData("$$kendoScope").removeData("$isolateScope").removeData("$isolateScopeNoTemplate").removeClass("ng-scope")}function y(n,i,o){var r,a,s;if(e.isArray(n))return t.forEach(n,function(e){y(e,i,o)});if("string"==typeof n){for(r=n.split("."),a=kendo;a&&r.length>0;)a=a[r.shift()];if(!a)return W.push([n,i,o]),!1;n=a.prototype}return s=n[i],n[i]=function(){var e=this,t=arguments;return o.apply({self:e,next:function(){return s.apply(e,arguments.length>0?arguments:t)}},t)},!0}var x,C,S,T,D,A,I,E,M,F,R,P,z,B,L,H,N,O,V,W,U;t&&t.injector&&(x=t.module("kendo.directives",[]),C=t.injector(["ng"]),S=C.get("$parse"),T=C.get("$timeout"),A=C.get("$log"),E=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 a=e[o]||"DataSource",s=n.$eval(r),l=t(s,a);return n.$watch(r,function(e){var n,o=b(i);o&&"function"==typeof o.setDataSource&&e!==s&&e!==o.dataSource&&(n=t(e,a),o.setDataSource(n),s=e)}),l}}(),M={kDataSource:!0,kOptions:!0,kRebind:!0,kNgModel:!0,kNgDelay:!0},F={name:!0,title:!0,style:!0},R=/^(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=m(v,t),t._cleanUp=m(function(){this.template=null,t._cleanUp=null},this)}],link:function(a,s,l,d){var c,u=e(s),h=t.replace(/([A-Z])/g,"-$1");u.attr(h,u.attr("data-"+h)),u[0].removeAttribute("data-"+h),c=o(a,s,l,t,i,d),c&&(n&&clearTimeout(n),n=setTimeout(function(){a.$emit("kendoRendered"),r||(r=!0,e("form").each(function(){var t=e(this).controller("form");t&&t.$setPristine()}))}))}}},{create:i}}]),P={Editor:"textarea",NumericTextBox:"input",DatePicker:"input",DateTimePicker:"input",TimePicker:"input",AutoComplete:"input",ColorPicker:"input",MaskedTextBox:"input",MultiSelect:"input",Upload:"input",Validator:"form",Button:"button",MobileButton:"a",MobileBackButton:"a",MobileDetailButton:"a",ListView:"ul",MobileListView:"ul",ScrollView:"div",PanelBar:"ul",TreeView:"ul",Menu:"ul",ContextMenu:"ul",ActionSheet:"ul",Switch:"input"},z=["MobileView","MobileDrawer","MobileLayout","MobileSplitView","MobilePane","MobileModalView"],B=["MobileApplication","MobileView","MobileModalView","MobileLayout","MobileActionSheet","MobileDrawer","MobileSplitView","MobilePane","MobileScrollView","MobilePopOver"],t.forEach(["MobileNavBar","MobileButton","MobileBackButton","MobileDetailButton","MobileTabStrip","MobileScrollView","MobileScroller"],function(e){B.push(e),e="kendo"+e,x.directive(e,function(){return{restrict:"A",link:function(t,n,i){o(t,n,i,e,e)}}})}),L=kendo.htmlEncode,H=/{{/g,N=/}}/g,O="{​{",V="}​}",kendo.htmlEncode=function(e){return L(e).replace(H,O).replace(N,V)},W=[],kendo.onWidgetRegistered(function(t){W=e.grep(W,function(e){return!y.apply(null,e)}),_(t.widget,"Mobile"==t.prefix)}),y(["ui.Widget","mobile.ui.Widget"],"angular",function(o,r){var a,s=this.self;return"init"==o?(!r&&I&&(r=I),I=null,r&&r.$angular&&(s.$angular_scope=r.$angular[0],s.$angular_init(s.element,r)),n):(a=s.$angular_scope,a&&i(function(){var i,l,d=r(),c=d.elements,u=d.data;if(c.length>0)switch(o){case"cleanup":t.forEach(c,function(t){var n=e(t).data("$$kendoScope");n&&n!==a&&n.$$kendoScope&&k(n,t)});break;case"compile":i=s.element.injector(),l=i?i.get("$compile"):D,t.forEach(c,function(t,i){var o,r;d.scopeFrom?o=d.scopeFrom:(r=u&&u[i],r!==n?(o=e.extend(a.$new(),r),o.$$kendoScope=!0):o=a),e(t).data("$$kendoScope",o),l(t)(o)}),w(a)}}),n)}),y("ui.Widget","$angular_getLogicValue",function(){return this.self.value()}),y("ui.Widget","$angular_setLogicValue",function(e){this.self.value(e)}),y("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}),y("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)}),y("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}),y("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)}),y("ui.Widget","$angular_init",function(t,n){var i,o,r,a,s=this.self;if(n&&!e.isArray(n))for(i=s.$angular_scope,o=s.events.length;--o>=0;)r=s.events[o],a=n[r],a&&"string"==typeof a&&(n[r]=s.$angular_makeEventHandler(r,i,a))}),y("ui.Widget","$angular_makeEventHandler",function(e,t,n){return n=S(n),function(e){w(t,function(){n(t,{kendoEvent:e})})}}),y(["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,a,s,l,d,c,u,h,p=e.sender,f=p.options,g={kendoEvent:e};for(t.isString(f.selectable)&&(o=f.selectable.indexOf("cell")!==-1,r=f.selectable.indexOf("multiple")!==-1),p._checkBoxSelection&&(r=!0),a=g.selected=this.select(),s=g.data=[],l=g.columns=[],c=0;c#: "+kendo.expr(e.field,r.paramName)+"#")})}}),y("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}),y("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""+e.html()+""}}}).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""+e.html()+""}}}),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]))}}})}),U={TreeMap:["Template"],MobileListView:["HeaderTemplate","Template"],MobileScrollView:["EmptyTemplate","Template"],Grid:["AltRowTemplate","DetailTemplate","RowTemplate"],ListView:["EditTemplate","Template","AltTemplate"],Pager:["SelectTemplate","LinkTemplate"],PivotGrid:["ColumnHeaderTemplate","DataCellTemplate","RowHeaderTemplate"],Scheduler:["AllDayEventTemplate","DateHeaderTemplate","EventTemplate","MajorTimeHeaderTemplate","MinorTimeHeaderTemplate"],ScrollView:["Template"],PanelBar:["Template"],TreeView:["Template"],Validator:["ErrorTemplate"]},function(){var e={};t.forEach(U,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,a,s){for(var l;!l&&s.length;)l=s.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("filemanager/commands.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=e.extend,o=n.Class,r=o.extend({init:function(e){this.options=e,this.filemanager=e.filemanager}}),a=r.extend({init:function(e){r.fn.init.call(this,e)},exec:function(){var e=this,t=e.filemanager,n=t._viewDataSource||t.dataSource;n.add()}}),s=r.extend({init:function(e){r.fn.init.call(this,e)},exec:function(){var e=this,t=e.options.target,n=e.filemanager._view.widgetComponent.dataItem(t);t&&n?e.filemanager._view.edit(t):e._renameTreeViewItem(t)},_renameTreeViewItem:function(e){var t=this,n=e.data("uid"),i=t.filemanager.treeView.widgetComponent.dataSource.getByUid(n),o=t.filemanager.dataSource.get(i.id);t.filemanager._prompt("rename",o.name).done(function(e){o.set("name",e)})}}),l=r.extend({init:function(e){r.fn.init.call(this,e)},exec:function(){var e,t,n,i=this,o=i.options.target,r=i.filemanager,a=r.getSelected(),s=i.filemanager._view.widgetComponent.dataItem(o);o&&o.is(".k-state-selected")&&a&&a.length?r._confirm("delete").done(function(){for(var e=0;e1?r.format("{1} {2}","file",i.length,t.options.messages.items):r.format("{1}",n.isDirectory?"folder":"file",n.name)},_onDrop:function(e){var t,n,i=this,o=i.widgetComponent.dataItem(e.dropTarget),r=o.id,a=[];if(o.isDirectory){for(t=0;t#:name##:extension#",editTemplate:"",dropFilter:".k-item",navigatable:!0},_bindEvents:function(){var e=this,t=e.listView;t.bind(p,d(e._select,e)),t.element.on("dblclick"+_,d(e._dblClick,e)),t.element.on("mousedown"+_,".k-item:not(.k-edit-item)",d(e._mousedown,e)),t.element.on(m+_,".k-edit-item",d(e._keydown,e)),t.element.on(m+_,d(e._keydownAction,e)),t.bind("edit",function(e){var t=e.sender;e.item.find("input").on("blur",function(){t._closeEditable()})}),x.fn._bindEvents.call(this)},_select:function(){var e=this,t=e.getSelected();e.trigger(u,{entries:t})},_keydown:function(e){var t=this;e.keyCode===r.keys.ESC&&t.listView._closeEditable()},_keydownAction:function(t){var n=this,i=e(t.target).find(".k-state-focused");n.trigger(v,{target:i,keyCode:t.keyCode})},_mousedown:function(t){var n=this,i=e(t.target).closest(".k-item");3!==t.which||i.is(".k-state-selected")||(n.listView.selectable.clear(),n.listView.select(i))},_dblClick:function(t){var n,i=this,o=e(t.target).closest(".k-item");o.is(".k-edit-item")||(n=i.listView.dataItem(o),n&&i.trigger(f,{entry:n}))},addFolder:function(){this.listView.add()},edit:function(e){var t=this,n=t.listView.select();t.listView.edit(e||n)},getSelected:function(){var e,t,n=this,i=n.listView.select(),o=[];for(e=0;ediv .k-in").removeClass("k-state-hover").addClass("k-state-selected"))},reload:function(){this.treeView.dataSource.read()}}),a.filemanager.registerViewComponent("tree",i),r.ui.Grid&&(o=x.extend({init:function(e,t,n){var i=this,o=n.dataSource,r=n.messages;t=l({},i.defaultOptions,t,{messages:r}),i._setDSOptions(t,o),i._setupColumns(t,r),x.fn.init.call(this,a.Grid,e,t),i.grid=i.widgetComponent,i._bindEvents(),n.draggable===!1||o.isLocalBinding||i._initDragAndDrop()},defaultOptions:{selectable:r.support.mobileOS?"row":"multiple",editable:{mode:"inline",confirmation:!1},sortable:!0,dropFilter:"tr:not(.k-grid-edit-row)",navigatable:!0},_setupColumns:function(e,t){e.columns||(e.columns=[{field:"name",title:t.nameField||"Name",template:function(e){var t=r.getFileGroup(e.extension,!0),n=""+e.name+e.extension+"";return n}},{field:"created",title:t.dateCreatedField,format:"{0:G}"},{field:"size",title:t.sizeField,template:function(e){return e.size>0?r.getFileSizeMessage(e.size):""}}])},_bindEvents:function(){var t=this,n=t.grid;n.bind(p,d(t._select,t)),n.table.on("dblclick"+_,d(t._dblClick,t)),n.table.on("mousedown"+_,"tr:not(.k-grid-edit-row)",d(t._mousedown,t)),n.table.on(m+_,".k-grid-edit-row",d(t._keydown,t)),n.table.on(m+_,d(t._keydownAction,t)),n.bind("edit",function(){t._toggleFocusable(!0)}),n.saveRow=e.noop,x.fn._bindEvents.call(this)},_keydownAction:function(t){var n=this,i=e(t.target).find(".k-state-focused").closest("tr");n.trigger(v,{target:i,keyCode:t.keyCode})},_keydown:function(t){var n=this,i=n.grid;e(t.target).closest(".k-grid-edit-row").length&&(t.keyCode===r.keys.ENTER&&(setTimeout(function(){n._closeEditable()}),n._tryCancel()),t.keyCode===r.keys.ESC&&i.cancelChanges())},_mousedown:function(t){var n=this,i=e(t.target).closest("tr[data-uid]");1===t.which&&n.grid.editable&&(setTimeout(function(){n._closeEditable()}),n._tryCancel()),3!==t.which||i.is(".k-state-selected")||(n.grid.selectable.clear(),n.grid.select(i))},_tryCancel:function(){var e,t=this,n=t.grid;n.editable&&(e=n._editContainer,e.find("input").val()||n.cancelChanges()),setTimeout(function(){t._toggleFocusable(!1)})},_toggleFocusable:function(e){var t=this,n=t.grid;n.table.find("tr,td").children().addBack().toggleClass("k-focusable",e)},_closeEditable:function(){var e,t=this;t.grid.editable&&!t.grid.editable.options.model.dirty&&(e=t.grid._editContainer,t.grid._destroyEditable(),t.grid._displayRow(e))},_select:function(){var e=this,t=e.getSelected();e.trigger(u,{entries:t})},_dblClick:function(t){var n,i=this,o=e(t.target).closest("tr[data-uid]");o.is(".k-grid-edit-row")||(n=i.grid.dataItem(o),n&&i.trigger(f,{entry:n}))},getSelected:function(){var e,t=this,n=t.grid.select(),i=[];for(e=0;e"),r=e(""),a=e(""),s=e("");i.element=o,i.input=r,i.iconWrapper=a,i.icon=s,i.options=t,i.options.type="fileManagerSearch",i.toolbar=n,i.attributes(),i.renderIcon(),i.addUidAttr(),i.addIdAttr(),i.addOverflowAttr(),i.input.attr({placeholder:i.options.text,title:i.options.text}),i.iconWrapper.append(s),i.element.append(i.input).append(a),i._bindEvents(),i.toolbar.fileManagerSearch=i},attributes:function(){this.options.attributes&&this.input.attr(this.options.attributes)},renderIcon:function(){this.options.icon&&this.icon.addClass("k-icon k-i-"+this.options.icon)},_bindEvents:function(){this._inputHandler=r(this._input,this),this.input.on("input"+p,this._inputHandler)},_input:function(e){this.toolbar.trigger(h,{target:e.target})},destroy:function(){this.element.off(p)}});i.toolbar.registerComponent("fileManagerSearch",g),n=s.extend({init:function(t,n){var o=this,a=e(""),s=e(""+t.text+""),d=e("");o.element=a,o.input=d,o.label=s,o.options=t,o.toolbar=n,o.attributes(),o.addUidAttr(),o.addIdAttr(),o.addOverflowAttr(),o.element.append(o.label),o.element.append(o.input),o.switchInstance=new i.ui.Switch(o.input,{change:r(o._change,o),messages:{checked:n.options.messages.detailsChecked,unchecked:n.options.messages.detailsUnchecked}}),o.label.on(l+p,r(o._click,o)),o.toolbar.fileManagerDetailsToggle=o},_change:function(e){this.toolbar.trigger(h,{target:e.sender.wrapper.parent()})},_click:function(t){this.switchInstance.toggle(),this.toolbar.trigger(h,{target:e(t.target).parent()})},destroy:function(){this.element.off(p)}}),i.toolbar.registerComponent("fileManagerDetailsToggle",n),o(i.ui.filemanager,{ToolBar:f})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("filemanager/data.min",["kendo.data.min"],e)}(function(){return function(e,t){var n,i,o=window.kendo,r=e.extend,a=o.data,s=a.Node,l=a.HierarchicalDataSource,d=a.DataSource;r(!0,o.data,{schemas:{filemanager:{data:function(e){return e.items||e||[]},model:{id:"path",hasChildren:"hasDirectories",fields:{name:{editable:!0,type:"String",defaultValue:"New Folder"},size:{editable:!1,type:"Number"},path:{editable:!1,type:"String"},extension:{editable:!1,type:"String"},isDirectory:{editable:!1,defaultValue:!0,type:"Boolean"},hasDirectories:{editable:!1,defaultValue:!1,type:"Boolean"},created:{type:"Date",editable:!1},createdUtc:{type:"Date",editable:!1},modified:{type:"Date",editable:!1},modifiedUtc:{type:"Date",editable:!1}}}}}}),n=s.define({init:function(e){var t,n=this,i=this.isDirectory;s.fn.init.call(this,e),"string"==typeof i&&(i=o.getter(i)),o.isFunction(i)&&(t=i.call(n,n),n.isDirectory=(!t||0!==t.length)&&!!t),n.isDirectory&&n._initChildren()},_initChildren:function(){var e,t,n,i=this;i.children instanceof o.data.FileManagerDataSource||(e=i.children=new o.data.FileManagerDataSource(i._childrenOptions),t=e.transport,n=t.parameterMap,t.parameterMap=function(e,t){return"read"!==t&&"create"!==t||(e.target=i.id),n&&(e=n(e,t)),e},e.parent=function(){
return i},e.bind("change",function(e){e.node=e.node||i,i.trigger("change",e)}),e.bind("error",function(e){var t=i.parent();t&&(e.node=e.node||i,t.trigger("error",e))}),i._updateChildrenField())},isNew:function(){return this.fileManagerNewItem?(delete this.fileManagerNewItem,!0):this.id===this._defaultId}}),i=l.extend({init:function(t){var i=n.define({children:t});t.filter&&!t.serverFiltering&&(this._hierarchicalFilter=t.filter,t.filter=null),d.fn.init.call(this,e.extend(!0,{},{schema:{modelBase:i,model:i}},t)),this.isLocalBinding=this.transport instanceof o.data.LocalTransport,this._attachBubbleHandlers()},insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(t&&t.isDirectory&&(n.hasDirectories=!0),n.hasChildren=!0,n._initChildren()),d.fn.insert.call(this,e,t)},remove:function(e){var t,n=e.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),t=d.fn.remove.call(i,e),n&&i.data()&&!i.data().length?n.hasChildren=!1:n&&!this._hasDirectories(n)&&(n.hasDirectories=!1),t},_hasDirectories:function(e){var t;return!!e.children.data()&&(t=e.children.data().filter(function(e){return e.isDirectory}),!!t.length)}}),i.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},n=t.data;return n&&n._dataSource?n._dataSource:(t.data=n,t instanceof i?t:new i(t))},r(o.data,{FileManagerDataSource:i,FileEntry:n})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("filemanager/contextmenu.min",["kendo.menu.min"],e)}(function(){return function(e,t){var n=window.kendo,i=e.extend,o=e.proxy,r=n.template,a=n.ui.ContextMenu,s="action",l=a.extend({init:function(e,t){var n=this;a.fn.init.call(n,e,t),n._overrideTemplates(),n._extendItems(),n.bind("select",o(n._onSelect,n))},_overrideTemplates:function(){this.templates.sprite=r("#if(spriteCssClass) {##}#")},defaultItems:{rename:{text:"Rename",spriteCssClass:"k-icon k-i-edit",command:"RenameCommand"},"delete":{text:"Delete",spriteCssClass:"k-icon k-i-delete",command:"DeleteCommand"}},events:[s],_extendItems:function(){var t,n,i,o,r=this,a=r.options.items;if(a&&a.length)for(i=0;i#= messages.noFileSelected #",I='#=selection[0].name##if(metaFields){##for(var i = 0; i < metaFields.length; i+=1){##var field = metaFields[i]##=messages[field]#:#if(field == "size"){# #=kendo.getFileSizeMessage(selection[0][field])##} else if(selection[0][field] instanceof Date) {# #=kendo.toString(selection[0][field], "G")##} else if(field == "extension") {# #=kendo.getFileGroup(selection[0].extension)##} else {# #=selection[0][field]##}## } ##}#',E='#=selection.length# #=messages.items#',M=a.extend({init:function(e,t){var n=this;a.fn.init.call(n,e,t),n.options=kendo.deepExtend({},n.options,t),n._hasUpload=(n.options.uploadUrl||n.options.upload.async&&n.options.upload.async.saveUrl)&&n.options.upload!==!1,n.defaultSortOption={field:"name",dir:"asc"},n.folderSortOption={field:"isDirectory",dir:"desc"},n._dataSource(),n._wrapper(),n._renderHeader(),n._renderContentContainer(),n._initContextMenu(),n._renderNavigation(),n._renderContent(),n._renderPreview(),n._hasUpload&&n._initUploadDialog(),n._resizable(),n.resize(),kendo.notify(n,kendo.ui)},options:{name:"FileManager",height:500,resizable:!0,initialView:"list",toolbar:{resizable:!0},contextMenu:{},upload:{},uploadUrl:"",views:{},breadcrumb:{},draggable:!0,dialogs:{upload:{width:530},moveConfirm:{width:350,closable:!0},deleteConfirm:{width:360,closable:!0},renamePrompt:{width:350,closable:!0}},previewPane:{metaFields:["extension","size","created","modified"],noFileTemplate:A,singleFileTemplate:I,multipleFilesTemplate:E},messages:{toolbar:{createFolder:"New Folder",upload:"Upload",sortDirection:"Sort Direction",sortDirectionAsc:"Sort Direction Ascending",sortDirectionDesc:"Sort Direction Descending",sortField:"Sort By",nameField:"Name",sizeField:"File Size",typeField:"Type",dateModifiedField:"Date Modified",dateCreatedField:"Date Created",listView:"List View",gridView:"Grid View",search:"Search",details:"View Details",detailsChecked:"On",detailsUnchecked:"Off","delete":"Delete",rename:"Rename"},views:{nameField:"Name",sizeField:"File Size",typeField:"Type",dateModifiedField:"Date Modified",dateCreatedField:"Date Created",items:"items"},dialogs:{upload:{title:"Upload Files",clear:"Clear List",done:"Done"},moveConfirm:{title:"Confirm",content:"Do you want to move or copy?",okText:"Copy",cancel:"Move",close:"close"},deleteConfirm:{title:"Confirm",content:"Are you sure you want to delete the selected file(s)?You cannot undo this action.",okText:"Delete",cancel:"Cancel",close:"close"},renamePrompt:{title:"Prompt",content:"Enter new name for the file.",okText:"Rename",cancel:"Cancel",close:"close"}},previewPane:{noFileSelected:"No File Selected",extension:"Type",size:"Size",created:"Date Created",createdUtc:"Date Created UTC",modified:"Date Modified",modifiedUtc:"Date Modified UTC",items:"items"}}},events:[c,u,h,b,w,p,k,y],_dataSource:function(){var e,t=this,n=t.options,a=n.dataSource||{},l=t.folderSortOption,d=t.defaultSortOption;a instanceof kendo.data.FileManagerDataSource?e=a:(e=r(a)?{data:a,autoSync:!1,sort:[l,d]}:i(!0,a,{autoSync:!1,sort:[l,d]}),a&&o(a.schema)?e.schema=a.schema:o(kendo.data.schemas.filemanager)&&(e.schema=kendo.data.schemas.filemanager)),t.dataSource&&t._errorHandler?(t.dataSource.unbind(p,t._errorHandler),t.dataSource.unbind(f,t._changeHandler)):(t._errorHandler=s(t._error,t),t._changeHandler=s(t._change,t)),t.dataSource=kendo.data.FileManagerDataSource.create(e).bind(p,t._errorHandler).bind(f,t._changeHandler)},_error:function(e){if(!this.trigger(p,e))throw Error("Error! The requested URL returned "+e.xhr.status+" - "+e.xhr.statusText)},_wrapper:function(){var e=this,t=e.options,n=t.width,i=t.height;e.wrapper=e.element.addClass(T.wrapper),n&&e.wrapper.width(n),i&&e.wrapper.height(i),e._resizeHandler=kendo.onResize(function(){e.resize(!0)})},_renderHeader:function(){var t=this,n=t.options;n.toolbar&&(t.header=e("").addClass(T.header),t.header.append(t._initToolbar().element)),t.wrapper.append(t.header)},_renderContentContainer:function(){var t=this,n=e("").addClass(T.contentContainer);t.contentContainer=n,t.wrapper.append(t.contentContainer)},_initContextMenu:function(){var e=this,t=e.options,o=i({},t.contextMenu,{filemanager:e,messages:t.messages.toolbar,target:e.contentContainer,filter:"[data-uid]",action:e.executeCommand.bind(e)});e.options.contextMenu===!1||e.dataSource.isLocalBinding||(e.contextMenu=new n.filemanager.ContextMenu("",o))},_renderNavigation:function(){var t=this;t.navigation=e("").addClass(T.navigation),t.navigationContainer=e("").addClass(T.navigationContainer),t.navigation.append(t.navigationContainer),t.navigationContainer.append(t._initTreeView().element),t.contentContainer.append(t.navigation)},_renderContent:function(){var t=this,n=t.options,i=t.toolbar;t.content=e("").addClass(T.content),n.breadcrumb&&t.content.append(t._initBreadcrumb().element),i&&i.isToolEnabled(i.defaultTools.upload.name)||t.content.append(t._initUpload().wrapper),t.content.append(t._initView()),t.contentContainer.append(t.content)},_renderPreview:function(){var t=this,n=t.options.previewPane;n&&(t.preview=e("").addClass(T.preview),t.previewContainer=e("").addClass(T.previewContainer),t.preview.append(t.previewContainer),t._setPreviewPaneContent(),t.contentContainer.append(t.preview.hide()))},_setPreviewPaneContent:function(){var e,n=this,i=n.options,o=i.messages.previewPane,r=i.previewPane,a=n.getSelected();return a?(e=1===a.length?r.singleFileTemplate:r.multipleFilesTemplate,e=l(e)({styles:D,messages:o,selection:a,metaFields:r.metaFields}),n.previewContainer.html(e),t):(e=l(r.noFileTemplate)({messages:o}),n.previewContainer.html(e),t)},_initToolbar:function(){var t=this,o=t.options,r=e("").addClass(T.toolbar),a=i({},o.toolbar,{filemanager:this,messages:o.messages.toolbar,action:t.executeCommand.bind(t)});return t.toolbar=new n.filemanager.ToolBar(r,a)},_initTreeView:function(){var t=this,o=e("").addClass(T.treeview),r=t.options.views[C],a=i(!0,{},{dataSource:t.options.dataSource,messages:t.options.messages.views,draggable:t.options.draggable,isLocalBinding:t.dataSource.isLocalBinding});return t.treeView=new n.filemanager.ViewComponents[C](o,r,a),t.treeView.bind(c,s(t._navigate,t)).bind(_,s(t._load,t)).bind(k,s(t._drop,t)).bind(x,s(t._keydownAction,t)),t.treeView},_drop:function(e){var t=this;!t.trigger(k,e)&&e.items.indexOf(e.target)<0&&t._confirm("move").done(function(){t.executeCommand({command:"CopyCommand",options:e})}).fail(function(){t.executeCommand({command:"MoveCommand",options:e})})},_keydownAction:function(e){var t=this,n=e.keyCode,i=kendo.keys;n===i.DELETE&&t.executeCommand({command:"DeleteCommand",options:{target:e.target}}),n===i.F2&&"grid"!==t._viewType&&t.executeCommand({command:"RenameCommand",options:{target:e.target}})},_confirm:function(t){var n=this.options.messages.dialogs[t+"Confirm"],o=e("").kendoConfirm(i({},{title:n.title,content:n.content,messages:n},this.options.dialogs[t+"Confirm"])).data("kendoConfirm");return o.open(),o.wrapper.removeClass("k-confirm"),o.result},_prompt:function(t,n){var o=this.options.messages.dialogs[t+"Prompt"],r=e("").kendoPrompt(i({},{title:o.title,content:o.content,messages:o,value:n},this.options.dialogs[t+"Prompt"])).data("kendoPrompt");return r.open(),r.wrapper.removeClass("k-prompt"),r.result},_initView:function(){var t=this,n=e("").addClass(T.view),i=t.options.initialView;return t.viewWrapper=n,t.viewWrapper.append(t.view(i)),n},_initBreadcrumb:function(){var t=this,o=t.options,r=e("").addClass(T.breadcrumb),a=i({},{items:[{type:"rootitem",text:""}],change:s(t._breadcrumbChange,t)},o.breadcrumb);return t.breadcrumb=new n.Breadcrumb(r,a)},_breadcrumbChange:function(e){this._navigate({path:e.value})},_initUploadDialog:function(){var t,o=this,r=o.options,a=o.toolbar,l=r.messages.dialogs.upload,d=e(""),c=i({},{title:l.title,modal:!0,visible:!1,width:500,actions:[{text:l.clear,action:s(o._clearUploadFilesList,o)},{text:l.done,primary:!0}],messages:l},r.dialogs.upload);if(!a||a.isToolEnabled(a.defaultTools.upload.name))return t=o._initUpload(),o.uploadDialog=new n.Dialog(d,c),o.uploadDialog.wrapper.addClass(T.uploadDialog),o.uploadDialog.element.append(t.wrapper),o.uploadDialog.bind(h,s(o._toggleUploadDropZone,o,"")),o.uploadDialog.bind(v,s(o._toggleUploadDropZone,o,o.viewWrapper)),o.uploadDialog},_initUpload:function(){var t=this,o=t.options,r=e("").addClass(T.upload),a=i(!0,{async:{autoUpload:!0,saveUrl:o.uploadUrl},dropZone:t.viewWrapper},o.upload);return t.upload=new n.Upload(r[0],a),t.upload.bind(g,s(t._sendUploadPathParameter,t)),t.upload.bind(m,s(t._success,t)),t.upload},_sendUploadPathParameter:function(e){e.data={path:this.path()}},_success:function(){this._view.widgetComponent.dataSource.read()},_clearUploadFilesList:function(){var e=this,t=e.upload;t&&t.clearAllFiles()},_toggleUploadDropZone:function(e){var t=this,n=t.upload;n&&n.setOptions({dropZone:e})},_binding:function(e){this.trigger(b,{source:"view",action:e.action,items:e.items,index:e.index})&&e.preventDefault()},_bound:function(){this.options.previewPane&&this._setPreviewPaneContent(),this.trigger(w)},_createResizableSplitBar:function(t){var n=e("").addClass(T.splitBar).addClass(T.splitBarHorizontal).addClass(t),i=e("").addClass(T.splitBarIcon);return n.append(i),n.hover(function(){e(this).toggleClass(T.splitBarHover)}),n},_initResizableNavigation:function(){var e,t,n=this,i=n.wrapper,o=n._createResizableSplitBar(T.splitBarNavigation),r=i.find(S+T.content),a=i.find(S+T.navigation);o.insertAfter(a),n._resizeDraggable.navigation=n.wrapper.find(o).end().kendoResizable({handle:S+T.splitBarNavigation,start:function(){e=r.width(),t=a.width()},resize:function(n){var o=n.x.initialDelta;kendo.support.isRtl(i)&&(o*=-1),t+o<-2||e-o<-2||a.width(t+o)}}).getKendoResizable()},_initResizablePreview:function(){var e,t,n=this,i=n.wrapper,o=n._createResizableSplitBar(T.splitBarPreview),r=i.find(S+T.content),a=i.find(S+T.preview);n.options.previewPane&&(o.insertBefore(a).hide(),n._resizeDraggable.preview=i.find(o).end().kendoResizable({handle:S+T.splitBarPreview,start:function(){e=r.width(),t=a.width()},resize:function(n){var o=n.x.initialDelta;kendo.support.isRtl(i)&&(o*=-1),t-o<-2||e+o<-2||a.width(t-o)}}).getKendoResizable())},_resizable:function(){var e=this,t=e.options;e._resizeDraggable={},t.resizable&&(e.wrapper.addClass(T.resizable),e._initResizableNavigation(),e._initResizablePreview())},view:function(o){var r=this,a=e(""),l=r.options.views[o],d=i(!0,{},{dataSource:r._viewDataSource||r.dataSource,messages:r.options.messages.views,draggable:r.options.draggable});if(o===t)return r._view;if(!n.filemanager.ViewComponents[o])throw Error(kendo.format("There is no {0} ViewComponent registered!",o));r._view&&r._view.destroy&&(r._view.destroy(),r.viewWrapper.empty()),r._viewType=o,r._view=new n.filemanager.ViewComponents[o](a,l,d),r._view.bind(u,s(r._select,r)),r._view.bind(h,s(r._open,r)),r._view.bind(b,s(r._binding,r)),r._view.bind(w,s(r._bound,r)),r._view.bind(k,s(r._drop,r)),r._view.bind(x,s(r._keydownAction,r)),r._view.element.addClass(T[o]),r.viewWrapper.removeClass(Object.keys(n.filemanager.ViewComponents).map(function(e){return T.view+"-"+e}).join(" ")).addClass(T.view+"-"+o),r.viewWrapper.append(r._view.element)},executeCommand:function(e){var t=e.command,r=i({filemanager:this},o(e.options)?e.options:{value:e.options}),a=new n.filemanager.commands[t](r);if(!this.trigger(y,e))return a.exec()},_navigate:function(e){var t=this,n=e.path;t.trigger(c,{path:n})||t.navigate(n)},_load:function(e){var t=this.dataSource.get(e.entryId);t.load()},_select:function(e){this.options.previewPane&&this._setPreviewPaneContent(),this.trigger(u,{entries:e.entries})},_open:function(e){var t=this,n=e.entry;t.trigger(h,{entry:n}),n.isDirectory&&t._navigate({path:n.id})},_change:function(e){var t,n=this,i=e.node?e.node.children:n.dataSource;n.trigger(b,{source:"tree",action:e.action,items:e.items,index:e.index})||(n.treeView._refreshDataSource(e),"remove"!==e.action&&"itemchange"!==e.action&&"add"!==e.action||i.sync(),"remove"===e.action&&n._viewDataSource&&n._viewDataSource.parent()&&e.items[0]===n._viewDataSource.parent()&&(t=e.items[0].parentNode()?e.items[0].parentNode().id:"",n._navigate({path:t})))},_buildBreadcrumbPath:function(e){for(var t=this,n=t.breadcrumb,i=[];e;)i.push(e.name),e=e.parentNode();i.push(""),n.value(i.reverse().join("/"))},_adjustDimensions:function(){var e=this,t=e.wrapper,n=S+T.grid,i=S+T.list,o=S+T.contentContainer,r=t.height(),a=0,s=0;e.toolbar&&(a=d(e.toolbar.wrapper)),e.breadcrumb&&(s=d(e.breadcrumb.wrapper)),"auto"!==e.options.height&&(t.find(n).height(r-(a+s+1)),t.find(i).parent().height(r-(a+s+1)),t.find(o).height(r-a))},_resize:function(){this._adjustDimensions(),kendo.resize(this.element.children())},setDataSource:function(e){var t=this;t.options.dataSource=e,t._dataSource(),t.toolbar&&(t.toolbar.destroy(),t.header.empty(),t.header.append(t._initToolbar().element)),t.treeView&&(t.treeView.destroy(),t.navigationContainer.empty(),t.navigationContainer.append(t._initTreeView().element)),t._view&&t.view(t._viewType||t.options.initialView),t._initContextMenu()},refresh:function(){var e=this,t=e._viewDataSource||e.dataSource;t.read()},getSize:function(){return kendo.dimensions(this.wrapper)},getSelected:function(){var e,n=this,i=n._view.getSelected(),o=n.treeView;return i&&i.length?i:(e=o.getSelected(),e?[n.dataSource.get(e.id)]:t)},path:function(){return this._path||""},navigate:function(n){var i=this,o=i.dataSource,r=o.get(n.replace(/^\//,"")),a=i._view,s=i.treeView,l=i.breadcrumb;if(i._path=n,!i.trigger(b,{source:"navigation",action:"rebind",items:[r]})){if(l&&i._buildBreadcrumbPath(r),""===n||"/"===n)return o.sort([i.folderSortOption,i.defaultSortOption]),i._viewDataSource=o,a.refresh(i._viewDataSource),s.treeView.select(e()),i.options.previewPane&&i._setPreviewPaneContent(),t;r.loaded&&!r.loaded()&&r.load(),a&&(i._viewDataSource=r.children,a.refresh(i._viewDataSource),i._viewDataSource.sort([i.folderSortOption,i.defaultSortOption])),s&&s.refresh(r.id),i.options.previewPane&&i._setPreviewPaneContent()}},destroy:function(){var e=this;a.fn.destroy.call(e),e.dataSource.unbind(p,e._errorHandler).unbind(f,e._changeHandler),e._resizeDraggable.navigation&&(e._resizeDraggable.navigation.destroy(),e._resizeDraggable.navigation=null),e._resizeDraggable.preview&&(e._resizeDraggable.preview.destroy(),e._resizeDraggable.preview=null),e.uploadDialog&&(e.uploadDialog.destroy(),e.uploadDialog=null),e.upload&&(e.upload.destroy(),e.upload=null),e.contextMenu&&(e.contextMenu.destroy(),e.contextMenu=null),kendo.unbindResize(e._resizeHandler),e.dataSource=null,e._viewDataSource=null,kendo.destroy(e.element)}});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.web.min",["kendo.core.min","kendo.router.min","kendo.view.min","kendo.fx.min","kendo.dom.min","kendo.data.odata.min","kendo.data.xml.min","kendo.data.min","kendo.ooxml.min","kendo.excel.min","kendo.data.signalr.min","kendo.binder.min","kendo.drawing.min","kendo.validator.min","kendo.userevents.min","kendo.draganddrop.min","kendo.mobile.scroller.min","kendo.groupable.min","kendo.reorderable.min","kendo.resizable.min","kendo.sortable.min","kendo.selectable.min","kendo.chat.min","kendo.button.min","kendo.buttongroup.min","kendo.breadcrumb.min","kendo.switch.min","kendo.pager.min","kendo.popup.min","kendo.notification.min","kendo.tooltip.min","kendo.list.min","kendo.calendar.min","kendo.datepicker.min","kendo.dateinput.min","kendo.drawer.min","kendo.multiviewcalendar.min","kendo.autocomplete.min","kendo.dropdownlist.min","kendo.dropdowntree.min","kendo.combobox.min","kendo.multiselect.min","kendo.multicolumncombobox.min","kendo.colorpicker.min","kendo.columnmenu.min","kendo.columnsorter.min","kendo.grid.min","kendo.listview.min","kendo.listbox.min","kendo.filebrowser.min","kendo.imagebrowser.min","kendo.editor.min","kendo.numerictextbox.min","kendo.maskedtextbox.min","kendo.mediaplayer.min","kendo.menu.min","kendo.editable.min","kendo.pivot.fieldmenu.min","kendo.filter.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.daterangepicker.min","kendo.treeview.draganddrop.min","kendo.treeview.min","kendo.scrollview.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.timeline.min","kendo.treelist.min","kendo.pivotgrid.min","kendo.spreadsheet.min","kendo.pivot.configurator.min","kendo.ripple.min","kendo.pdfviewer.min","kendo.rating.min","kendo.angular.min","kendo.badge.min","kendo.filemanager.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;i0?Math.ceil(t):Math.floor(t)),e.detail&&(t=kendo.drawing.util.round(e.detail/3)),t}function k(e,t){var n=e.prototype;n.options=n.options?Me({},n.options,t):t}function y(e){var t,n,i,o=Ze,r=et;for(t=0,n=e.length;t0&&e.width()>0})[0])}function D(t){var n,i,o=t.stops,r=t.innerRadius/t.radius*100,a=o.length,s=[];for(n=0;n0&&a.setSeconds(0)):n===xn?a=F(o,t*Mn):n===yn&&(a=F(o,t)),n!==yn&&a.getMilliseconds()>0&&a.setMilliseconds(0)),a}function H(e,t,n){return L(R(e),0,t,n)}function N(e,t,n){var i=R(e);return i&&H(i,t,n).getTime()===i.getTime()?i:L(i,1,t,n)}function O(e,t){return e&&t?e.getTime()-t.getTime():-1}function V(e,t){return e.getTime()-t}function W(e){var n,i;if(t(e)){for(n=[],i=0;ie)){for(;U(t[n-1],e);)n--;return n}r=n-1}return t[n]<=e?n:n-1}function Y(e,t){var n;return n=s(t)?e.parseDate(t)||R(t):R(t)}function K(e,n){var i,o;if(t(n)){for(i=[],o=0;o=d;){i=i||l[h].slice(0);do r=i.shift();while(r&&t===h&&rd&&(o=Math.ceil(f/d));break}h=qn[u++]||Ut(qn),f=s/Hn[h],i=null}}e.baseUnitStep=o,e.baseUnit=h}function Z(e){var t,n,i,o,r,a=e.categories,s=Lt(a)?a.length:0,l=Ze;for(i=0;i0&&(l=Math.min(l,r),n=l>=Ln?In:l>=Bn-3*Pn?An:l>=zn?Dn:l>=Pn?Tn:l>=Rn?Sn:l>=Fn?Cn:xn)),t=o;e.baseUnit=n||Tn}function ee(e){var t=(e.baseUnit||"").toLowerCase(),n=t!==Gn&&!v(t,qn);return n&&Z(e),t!==Gn&&e.baseUnitStep!==jn||J(e),e}function te(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>Un)return 0;i=Math.max(0,o-(t-o)/2)}else i=e;return i}function ne(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>Un)return 0;i=Math.min(0,o-(e-o)/2)}else i=t;return i}function ie(e,t){return $t(Math.floor(e/t)*t,qe)}function oe(e,t){return $t(Math.ceil(e/t)*t,qe)}function re(e){return Math.max(Math.min(e,Vn),-Vn)}function ae(e,t,n){var i=n.narrowRange,o=te(e,t,i),r=ne(e,t,i),a=x(o,r),s={majorUnit:a};return n.roundToMajorUnit!==!1&&(o<0&&ce(o,a,1/3)&&(o-=a),r>0&&ce(r,a,1/3)&&(r+=a)),s.min=ie(o,a),s.max=oe(r,a),s}function se(e,t){return{min:Lt(t.min)?Math.min(e.min,t.min):e.min,max:Lt(t.max)?Math.max(e.max,t.max):e.max,majorUnit:e.majorUnit}}function le(e,t){var n,i;for(n=0;n0?t.min=0:t.max=1),t.majorUnit?(e.min=ie(e.min,t.majorUnit),e.max=oe(e.max,t.majorUnit)):o&&(a=Me(e,t),e.majorUnit=x(a.min,a.max))),e.minorUnit=(a.majorUnit||e.majorUnit)/5,r=Me(e,a),r.min>=r.max&&(n&&!i?r.max=r.min+r.majorUnit:!n&&i&&(r.min=r.max-r.majorUnit)),r}function ce(e,t,n){var i=$t(Math.abs(e%t),qe),o=t*(1-n);return 0===i||i>o}function ue(e){var t=Sn;return e>=Ln?t=In:e>=Bn?t=An:e>=zn?t=Dn:e>=Pn&&(t=Tn),t}function he(e,t,n){var i=n.min||e,o=n.max||t,r=n.baseUnit||(o&&i?ue(M(o,i)):Sn),a=Hn[r],s=H(W(i)-1,r)||R(o),l=N(W(o)+1,r),d=n.majorUnit?n.majorUnit:void 0,c=d||oe(x(s.getTime(),l.getTime()),a)/a,u=G(s,l,r),h=oe(u,c),p=h-u,f=Math.floor(p/2),g=p-f;return n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||r,n.min=n.min||L(s,-f,r),n.max=n.max||L(l,g,r),n.minorUnit=n.minorUnit||c/5,n.majorUnit=c,n}function pe(e,t,n,i){var o=n.min,r=n.max;return Lt(n.axisCrossingValue)&&n.axisCrossingValue<=0&&me(),Lt(i.max)?i.max<=0&&me():r=t,Lt(i.min)?i.min<=0&&me():o=e,{min:o,max:r}}function fe(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(ve(e,i)))),o}function ge(e,t){var n,i=$t(ve(e,t),qe)%1;return n=e<=0?t:0!==i&&(i<.3||i>.9)?Math.pow(t,ve(e,t)+.2):Math.pow(t,Math.ceil(ve(e,t)))}function me(){throw Error("Non positive values cannot be used for a logarithmic axis")}function ve(e,t){return Math.log(e)/Math.log(t)}function _e(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function be(e){return e<=0?-1:1}var we,ke,ye,xe,Ce,Se,Te,De,Ae,Ie,Ee,Me,Fe,Re,Pe,ze,Be,Le,He,Ne,Oe,Ve,We,Ue,je,qe,Ge,$e,Ye,Ke,Qe,Xe,Je,Ze,et,tt,nt,it,ot,rt,at,st,lt,dt,ct,ut,ht,pt,ft,gt,mt,vt,_t,bt,wt,kt,yt,xt,Ct,St,Tt,Dt,At,It,Et,Mt,Ft,Rt,Pt,zt,Bt,Lt,Ht,Nt,Ot,Vt,Wt,Ut,jt,qt,Gt,$t,Yt,Kt,Qt,Xt,Jt,Zt,en,tn,nn,on,rn,an,sn,ln,dn,cn,un,hn,pn,fn,gn,mn,vn,_n,bn,wn,kn,yn,xn,Cn,Sn,Tn,Dn,An,In,En,Mn,Fn,Rn,Pn,zn,Bn,Ln,Hn,Nn,On,Vn,Wn,Un,jn,qn,Gn,$n,Yn,Kn,Qn,Xn,Jn,Zn,ei,ti,ni,ii,oi,ri,ai,si,li,di;
window.kendo.dataviz=window.kendo.dataviz||{},we=kendo.drawing,ke=we.util,ye=we.Path,xe=we.Group,Ce=kendo.Class,Se=kendo.geometry,Te=Se.Rect,De=Se.Circle,Ae=Se.transform,Ie=Se.Segment,Ee=kendo.dataviz,Me=kendo.deepExtend,Fe=kendo.isFunction,Re=kendo.getter,Pe="arc",ze="axisLabelClick",Be="#000",Le="bottom",He="center",Ne="circle",Oe=3,Ve="cross",We="date",Ue="12px sans-serif",je=400,qe=10,Ge=600,$e="end",Ye=/\{\d+:?/,Ke="height",Qe=100,Xe="inside",Je="left",Ze=Number.MAX_VALUE,et=-Number.MAX_VALUE,tt="none",nt="noteClick",it="noteHover",ot="noteLeave",rt="object",at="outside",st="right",lt="start",dt="string",ct="top",ut="triangle",ht="value",pt="#fff",ft="width",gt="x",mt="y",vt={ARC:Pe,AXIS_LABEL_CLICK:ze,BLACK:Be,BOTTOM:Le,CENTER:He,CIRCLE:Ne,COORD_PRECISION:Oe,CROSS:Ve,DATE:We,DEFAULT_FONT:Ue,DEFAULT_HEIGHT:je,DEFAULT_PRECISION:qe,DEFAULT_WIDTH:Ge,END:$e,FORMAT_REGEX:Ye,HEIGHT:Ke,HIGHLIGHT_ZINDEX:Qe,INSIDE:Xe,LEFT:Je,MAX_VALUE:Ze,MIN_VALUE:et,NONE:tt,NOTE_CLICK:nt,NOTE_HOVER:it,NOTE_LEAVE:ot,OBJECT:rt,OUTSIDE:at,RIGHT:st,START:lt,STRING:dt,TOP:ct,TRIANGLE:ut,VALUE:ht,WHITE:pt,WIDTH:ft,X:gt,Y:mt},_t=/\s+/g,bt=/width|height|top|left|bottom|right/i,wt={format:function(e,t){return t},toString:function(e){return e},parseDate:function(e){return new Date(e)}},kt=wt,yt=Ce.extend({}),yt.register=function(e){kt=e},Object.defineProperties&&Object.defineProperties(yt,{implementation:{get:function(){return kt}}}),xt=/\{(\d+)(:[^\}]+)?\}/g,Ct=Ce.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.intl,s(e)&&e.match(Ye)?t.format.apply(t,[e].concat(n)):t.toString(n[0],e)},localeAuto:function(e,t,n){var i,o=this.intl;return i=s(e)&&e.match(Ye)?e.replace(xt,function(e,i,r){var a=t[parseInt(i,10)];return o.toString(a,r?r.substring(1):"",n)}):o.toString(t[0],e,n)}}),Object.defineProperties&&Object.defineProperties(Ct.fn,{intl:{get:function(){return this._intlService||yt.implementation},set:function(e){this._intlService=e}}}),St=Ce.extend({init:function(e,t){void 0===t&&(t={}),this._intlService=t.intlService,this.sender=t.sender||e,this.format=new Ct(t.intlService),this.chart=e,this.rtl=!!t.rtl},notify:function(e,t){this.chart&&this.chart.trigger(e,t)},isPannable:function(e){var t=((this.chart||{}).options||{}).pannable;return t&&t.lock!==e}}),Object.defineProperties&&Object.defineProperties(St.fn,{intl:{get:function(){return this._intlService||yt.implementation},set:function(e){this._intlService=e,this.format.intl=e}}}),Dt=Ce.extend({}),Dt.register=function(e){Tt=e},Dt.create=function(e,t){if(Tt)return Tt.create(e,t)},At={compile:function(e){return e}},It=Ce.extend({}),It.register=function(e){At=e},It.compile=function(e){return At.compile(e)},Et={ChartService:St,DomEventsBuilder:Dt,FormatService:Ct,IntlService:yt,TemplateService:It},Mt=function(){this._map={}},Mt.prototype.get=function(e){return this._map[this._key(e)]},Mt.prototype.set=function(e,t){this._map[this._key(e)]=t},Mt.prototype._key=function(e){return e instanceof Date?e.getTime():e},Ft="trigger",Rt=Ce.extend({init:function(e,t){this.observer=e,this.handlerMap=Me({},this.handlerMap,t)},trigger:function(e,t){var n,i=this,o=i.observer,r=i.handlerMap;return r[e]?n=this.callObserver(r[e],t):o[Ft]&&(n=this.callObserver(Ft,e,t)),n},callObserver:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return this.observer[e].apply(this.observer,t)},requiresHandlers:function(e){var t,n=this;if(this.observer.requiresHandlers)return this.observer.requiresHandlers(e);for(t=0;ti||!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++,Qt.fetchFonts(o,t,n),n.depth--))})},Qt.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()},Qt.preloadFonts=function(e,t){var n=[];Qt.fetchFonts(e,n),Qt.loadFonts(n,t)},Xt=Ce.extend({init:function(e,t){this.x=e||0,this.y=t||0},clone:function(){return new Xt(this.x,this.y)},equals:function(e){return e&&this.x===e.x&&this.y===e.y},rotate:function(e,t){var n=Gt(t),i=Math.cos(n),o=Math.sin(n),r=e.x,a=e.y,s=this,l=s.x,d=s.y;return this.x=$t(r+(l-r)*i+(d-a)*o,Oe),this.y=$t(a+(d-a)*i-(l-r)*o,Oe),this},multiply:function(e){return this.x*=e,this.y*=e,this},distanceTo:function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)}}),Xt.onCircle=function(e,t,n){var i=Gt(t);return new Xt(e.x-n*Math.cos(i),e.y-n*Math.sin(i))},Jt=Ce.extend({init:function(e,t,n,i){this.x1=e||0,this.y1=t||0,this.x2=n||0,this.y2=i||0},equals:function(e){return this.x1===e.x1&&this.x2===e.x2&&this.y1===e.y1&&this.y2===e.y2},width:function(){return this.x2-this.x1},height:function(){return this.y2-this.y1},translate:function(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},move:function(e,t){var n=this.height(),i=this.width();return Lt(e)&&(this.x1=e,this.x2=this.x1+i),Lt(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 Jt(i,o,i,o)),this},snapTo:function(e,t){return t!==gt&&t||(this.x1=e.x1,this.x2=e.x2),t!==mt&&t||(this.y1=e.y1,this.y2=e.y2),this},alignTo:function(e,t){var n,i,o=this.height(),r=this.width(),a=t===ct||t===Le?mt:gt,s=a===mt?o:r;return t===He?(n=e.center(),i=this.center(),this.x1+=n.x-i.x,this.y1+=n.y-i.y):this[a+1]=t===ct||t===Je?e[a+1]-s:e[a+2],this.x2=this.x1+r,this.y2=this.y1+o,this},shrink:function(e,t){return this.x2-=e,this.y2-=t,this},expand:function(e,t){return this.shrink(-e,-t),this},pad:function(e){var t=p(e);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},unpad:function(e){var t=p(e);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},clone:function(){return new Jt(this.x1,this.y1,this.x2,this.y2)},center:function(){return new Xt(this.x1+this.width()/2,this.y1+this.height()/2)},containsPoint:function(e){return e.x>=this.x1&&e.x<=this.x2&&e.y>=this.y1&&e.y<=this.y2},points:function(){return[new Xt(this.x1,this.y1),new Xt(this.x2,this.y1),new Xt(this.x2,this.y2),new Xt(this.x1,this.y2)]},getHash:function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},overlaps:function(e){return!(e.y2=n*n&&f<=i*i},getBBox:function(){var e,t,n,i=this,o=new Jt(Ze,Ze,et,et),r=$t(this.startAngle%360),a=$t((r+this.angle)%360),s=this.innerRadius,l=[0,90,180,270,r,a].sort(S),d=l.indexOf(r),c=l.indexOf(a);for(e=r===a?l:d0&&l===d&&(d+=tn),n=new Se.Point(e.center.x,e.center.y),i=Math.max(e.radius,0),o=Math.max(e.innerRadius,0),r=new Se.Arc(n,{startAngle:l,endAngle:d,radiusX:i,radiusY:i}),a=ye.fromArc(r,t).close(),o?(r.radiusX=r.radiusY=o,s=r.pointAt(d),a.lineTo(s.x,s.y),a.arc(d,l,o,o,!0)):a.lineTo(n.x,n.y),a}}),nn.current=new nn,on=Ce.extend({init:function(e){this.children=[],this.options=Me({},this.options,this.initUserOptions(e))},initUserOptions:function(e){return e},reflow:function(e){var t,n,i,o=this.children;for(n=0;no));t++);this.visual.insert(t,e)},traverse:function(e){var t,n,i=this.children,o=i.length;for(t=0;tu&&(p.push({groupElements:_,groupSize:f,groupElementsSize:g}),v=Math.max(v,g),m+=c+f,f=0,g=0,_=[]),f=Math.max(f,n[l]),g>0&&(g+=d),g+=n[s],_.push(t);return p.push({groupElements:_,groupSize:f,groupElementsSize:g}),v=Math.max(v,g),m+=f,{groups:p,groupsSize:m,maxGroupElementsSize:v}},elementSize:function(e){return{width:e.box.width(),height:e.box.height()}},createVisual:function(){}}),k(un,{vertical:!0,wrap:!0,vSpacing:0,spacing:0}),hn=we.Text,pn=on.extend({init:function(e,t){on.fn.init.call(this,t),this.content=e,this.reflow(new Jt)},reflow:function(e){var t=this.options,n=t.size=ke.measureText(this.content,{font:t.font});this.baseline=n.baseline,this.box=new Jt(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 hn(this.content,this.box.toRect().topLeft(),{font:t,fill:{color:n,opacity:i},cursor:o})}}),k(pn,{font:Ue,color:Be}),fn=/\n/m,gn=rn.extend({init:function(e,t,n){rn.fn.init.call(this,t),this.content=e,this.data=n,this._initContainer(),this.options._autoReflow!==!1&&this.reflow(new Jt)},_initContainer:function(){var e,t,n=this.options,i=(this.content+"").split(fn),o=new un({vertical:!0,align:n.align,wrap:!1}),r=Me({},n,{opacity:1,animation:null});for(this.container=o,this.append(o),e=0;e0&&i.visible&&(e=new ye({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 xe,t.append(e),this.visual.append(t),this.createTicks(t))},getActualTickSize:function(){var e=this.options,t=0;return e.majorTicks.visible&&e.minorTicks.visible?t=Math.max(e.majorTicks.size,e.minorTicks.size):e.majorTicks.visible?t=e.majorTicks.size:e.minorTicks.visible&&(t=e.minorTicks.size),t},createBackground:function(){var e=this,t=e.options,n=e.box,i=t.background;i&&(this._backgroundPath=ye.fromRect(n.toRect(),{fill:{color:i},stroke:null}),this.visual.append(this._backgroundPath))},createPlotBands:function(){var e,t,n,i,o,r,a,s,l=this,d=this.options,c=d.plotBands||[],u=d.vertical,h=this.plotArea;if(0!==c.length){for(e=this._plotbandGroup=new xe({zIndex:-1}),t=g(this.pane.axes,function(e){return e.options.vertical!==l.options.vertical})[0],n=0;no){if(r.height()>o){n=-90;break}n=-45}if(n){for(a=0;a0&&(!Lt(l.max)||i<=l.max)?null:t0||ii&&o>0&&(s=jt(t,n,i),a=jt(t-r,n,i-r)),{min:a,max:s})},valueRange:function(){return{min:this.seriesMin,max:this.seriesMax}},labelsBetweenTicks:function(){return!this.options.justified},prepareUserOptions:function(){}}),k(kn,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:Be,visible:!0},title:{visible:!0,position:He},majorTicks:{align:at,size:4,skip:0,step:1},minorTicks:{align:at,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:at,minorTickType:tt,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:Be,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1}),yn="milliseconds",xn="seconds",Cn="minutes",Sn="hours",Tn="days",Dn="weeks",An="months",In="years",En=1,Mn=1e3,Fn=60*Mn,Rn=60*Fn,Pn=24*Rn,zn=7*Pn,Bn=31*Pn,Ln=365*Pn,Hn={years:Ln,months:Bn,weeks:zn,days:Pn,hours:Rn,minutes:Fn,seconds:Mn,milliseconds:En},Nn=.01,On=kn.extend({initFields:function(){this._ticks={}},categoriesHash:function(){return""},clone:function(){var t=new On(e.extend({},this.options),this.chartService);return t.createLabels(),t},initUserOptions:function(e){var t,n,i=e.categories||[],o=Lt(e.min),r=Lt(e.max);return e.srcCategories=e.categories=i,(o||r)&&i.length&&(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)),e},rangeIndices:function(){var e,t=this.options,n=t.categories.length||1,i=a(t.min)?t.min%1:0;return e=a(t.max)&&t.max%1!==0&&t.maxn||i.box[e+2]n||o.box[e+2]=0;)a--;return e.slice(r,a+1)},getSlot:function(e,t,n){var i,o,r=this.options,a=r.reverse,s=r.justified,l=r.vertical,d=this.scaleOptions(),c=d.scale,u=d.box,h=d.min,p=l?mt:gt,f=u[p+(a?2:1)],g=u.clone(),m=!Lt(t),v=Kt(e,0),_=Kt(t,v);return _=Math.max(_-1,v),_=Math.max(v,_),i=f+(v-h)*c,o=f+(_+1-h)*c,m&&s&&(o=i),n&&(i=jt(i,u[p+1],u[p+2]),o=jt(o,u[p+1],u[p+2])),g[p+1]=a?o:i,g[p+2]=a?i:o,g},limitSlot:function(e){var t=this.options.vertical,n=t?mt:gt,i=this.lineBox(),o=e.clone();return o[n+1]=jt(e[n+1],i[n+1],i[n+2]),o[n+2]=jt(e[n+2],i[n+1],i[n+2]),o},slot:function(e,t,n){var i=Math.floor(this.options.min||0),o=e,r=t;return"string"==typeof o?o=this.categoryIndex(o):a(o)&&(o-=i),"string"==typeof r?r=this.categoryIndex(r):a(r)&&(r-=i),kn.fn.slot.call(this,o,r,n)},pointCategoryIndex:function(e){var t,n,i=this.options,o=i.reverse,r=i.justified,a=i.vertical,s=a?mt:gt,l=this.scaleOptions(),d=l.scale,c=l.box,u=l.min,h=l.max,p=o?h:u,f=c[s+1],g=c[s+2],m=e[s];return mg?null:(t=p+(m-f)/d,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){return this.totalIndex(e)-Math.floor(this.options.min||0)},categoryAt:function(e,t){var n=this.options;return(t?n.srcCategories:n.categories)[e]},categoriesCount:function(){return(this.options.categories||[]).length},translateRange:function(e){var t=this.options,n=this.lineBox(),i=t.vertical?n.height():n.width(),o=t.categories.length,r=i/o,a=$t(e/r,qe);return{min:a,max:o+a}},zoomRange:function(e){var t=this.totalRangeIndices(),n=this.totalRange(),i=n.min,o=n.max,r=jt(t.min+e,i,o),a=jt(t.max-e,i,o);if(a-r>0)return{min:r,max:a}},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,a=o.max,s=Math.floor(r);return n?(r=Math.ceil(r),a=Math.floor(a)):(r=Math.floor(r),a=Math.ceil(a)),e=r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip,{min:e-s,max:(t.categories.length?a+(n?1:0):0)-s}},createAxisLabel:function(e,t){var n=this.options,i=n.dataItems?n.dataItems[e]:null,o=Kt(n.categories[e],""),r=this.axisLabelText(o,i,t);return new vn(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(){kn.fn.arrangeNotes.call(this),this.hideOutOfRangeNotes()},hideOutOfRangeNotes:function(){var e,t,n,i,o,r=this,a=r.notes,s=r.box;if(a&&a.length)for(e=this.options.vertical?mt:gt,t=s[e+1],n=s[e+2],i=0;i=Nn)return{min:g,max:m}},valueRange:function(){return this.range()},totalIndex:function(e){var t=this.options,n=this._categoriesMap?this._categoriesMap.get(e):Q(e,t.srcCategories);return n},currentRangeIndices:function(){var e,t=this.options,n=0;return a(t.min)&&(n=Math.floor(t.min)),e=a(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1,{min:n,max:e}},mapCategories:function(){var e,t,n;if(!this._categoriesMap)for(e=this._categoriesMap=new Mt,t=this.options.srcCategories,n=0;n0?(r=X(o),a=i.maxDivisions,this.dataRange=new Yn(r.min,r.max,ee(i)),a?(s=this.dataRange.displayRange(),l=e.extend({},i,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:s.min,max:s.max,maxDateGroups:a}),d=this.dataRange.options,J(l,d.baseUnit,d.baseUnitStep),this.divisionRange=new Yn(r.min,r.max,l)):this.divisionRange=this.dataRange):(i.baseUnit=i.baseUnit||Tn,this.dataRange=this.divisionRange=new $n(i))},tickIndices:function(e){var t,n,i,o,r,a=this,s=a.dataRange,l=a.divisionRange,d=l.valuesCount();if(!this.options.maxDivisions||!d)return On.fn.tickIndices.call(this,e);for(t=[],n=l.values(),i=0,this.options.justified||(n=n.concat(l.dateAt(d)),i=.5),o=0;o=1&&(r=t.length-1,t.splice(o,0,t[r-1]+(t[r]-t[r-1])*e));return t},shouldRenderNote:function(e){var t=this.range(),n=this.options.categories||[];return O(e,t.min)>=0&&O(e,t.max)<=0&&n.length},parseNoteValue:function(e){return Y(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,a=i.vertical,s=this.lineBox(),l=a?s.height():s.width(),d=this.range(),c=l/(d.max-d.min),u=$t(e/c,qe);return d.min&&d.max&&(t=F(i.min||d.min,u),n=F(i.max||d.max,u),d={min:L(t,0,o,r),max:L(n,0,o,r)}),d},scaleRange:function(e){var t,n,i=Math.abs(e),o=this.range(),r=o.min,a=o.max;if(r&&a){for(;i--;)t=V(r,a),n=Math.round(.1*t),e<0?(r=F(r,n),a=F(a,-n)):(r=F(r,-n),a=F(a,n));o={min:r,max:a}}return o},labelsRange:function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},pan:function(e){var t,n,i,o,r,a,s,l,d,c,u,h;return this.isEmpty()?null:(t=this.options,n=this.lineBox(),i=t.vertical?n.height():n.width(),o=this.dataRange.displayRange(),r=o.min,a=o.max,s=this.dataRange.total(),l=i/(a-r),d=$t(e/l,qe)*(t.reverse?-1:1),c=F(r,d),u=F(a,d),h=this.limitRange(W(c),W(u),W(s.min),W(s.max),d),h?(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):void 0)},pointsRange:function(e,t){var n,i,o,r,a,s,l;return this.isEmpty()?null:(n=On.fn.pointsRange.call(this,e,t),i=this.dataRange.displayRange(),o=this.dataRange.displayIndices(),r=V(i.max,i.min)/(o.max-o.min),a=this.options,s=F(i.min,n.min*r),l=F(i.min,n.max*r),{min:s,max:l,baseUnit:a.userSetBaseUnit||a.baseUnit,baseUnitStep:a.userSetBaseUnitStep||a.baseUnitStep})},zoomRange:function(e){var t,n,i,o,r,a,s,l,d,c,u,h,p,f,g,m,v,_,b,w,k;if(this.isEmpty())return null;if(t=this.options,n=t.userSetBaseUnit===Gn,i=this.dataRange.total(),o=this.dataRange.displayRange(),r=o.min,a=o.max,s=this.dataRange.options,l=s.weekStartDay,d=s.baseUnit,c=s.baseUnitStep,u=L(r,e*c,d,l),h=L(a,-e*c,d,l),n)if(p=t.autoBaseUnitSteps,f=t.maxDateGroups,g=Ut(p[d])*f*Hn[d],m=V(a,r),v=V(h,u),_=qn.indexOf(d),vg&&d!==In){k=0;do{_++,d=qn[_],k=0,w=2*Hn[d];do b=p[d][k],k++;while(k0&&(u=F(r,-w),h=F(a,w),u=F(u,jt(h,i.min,i.max)-h),h=F(h,jt(u,i.min,i.max)-u))}return ui.max&&(h=i.max),u&&h&&V(h,u)>0?{min:u,max:h,baseUnit:t.userSetBaseUnit||t.baseUnit,baseUnitStep:t.userSetBaseUnitStep||t.baseUnitStep}:void 0},range:function(){return this.dataRange.displayRange()},createAxisLabel:function(e,t){var n,i=this.options,o=i.dataItems&&!i.maxDivisions?i.dataItems[e]:null,r=this.divisionRange.dateAt(e),a=t.dateFormats[this.divisionRange.options.baseUnit];if(t.format=t.format||a,n=this.axisLabelText(r,o,t))return new vn(r,n,e,o,t)},categoryIndex:function(e){return this.dataRange.valueIndex(e)},slot:function(e,t,n){var i,o=this.dataRange,r=e,a=t;if(r instanceof Date&&(r=o.dateIndex(r)),a instanceof Date&&(a=o.dateIndex(a)),i=this.getSlot(r,a,n))return i.toRect()},getSlot:function(e,t,n){var i=e,o=t;return typeof i===rt&&(i=this.categoryIndex(i)),typeof o===rt&&(o=this.categoryIndex(o)),On.fn.getSlot.call(this,i,o,n)},valueRange:function(){var e=this.options,t=X(e.srcCategories);return{min:R(t.min),max:R(t.max)}},categoryAt:function(e,t){return this.dataRange.dateAt(e,t)},categoriesCount:function(){return this.dataRange.valuesCount()},rangeIndices:function(){return this.dataRange.displayIndices()},labelsBetweenTicks:function(){return!this.divisionRange.options.justified},prepareUserOptions:function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},getCategory:function(e){var t=this.pointCategoryIndex(e);return null===t?null:this.dataRange.dateAt(t)},totalIndex:function(e){return this.dataRange.totalIndex(e)},currentRangeIndices:function(){var e=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(e.min),max:this.dataRange.totalIndex(e.max)}},totalRange:function(){return this.dataRange.total()},totalCount:function(){return this.dataRange.totalCount()},isEmpty:function(){return!this.options.srcCategories.length},roundedRange:function(){var t,n,i;return this.options.roundToBaseUnit!==!1||this.isEmpty()?this.range():(t=this.options,n=X(t.srcCategories),i=new Yn(n.min,n.max,e.extend({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})),i.displayRange())}}),k(Kn,{type:We,labels:{dateFormats:Wn},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}),Qn=Math.pow(10,-qe+1),Xn=kn.extend({init:function(t,n,i,o){kn.fn.init.call(this,e.extend({},i,{seriesMin:t,seriesMax:n}),o)},initUserOptions:function(e){var t=ae(e.seriesMin,e.seriesMax,e);return this.totalOptions=se(t,e),de(t,e)},initFields:function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},clone:function(){return new Xn(this.seriesMin,this.seriesMax,e.extend({},this.options),this.chartService)},startValue:function(){return 0},range:function(){var e=this.options;return{min:e.min,max:e.max}},getDivisions:function(e){var t,n;return 0===e?1:(t=this.options,n=t.max-t.min,Math.floor($t(n/e,Oe))+1)},getTickPositions:function(e,t){var n,i=this.options,o=i.vertical,r=i.reverse,a=this.lineBox(),s=o?a.height():a.width(),l=i.max-i.min,d=s/l,c=e*d,u=this.getDivisions(e),h=(o?-1:1)*(r?-1:1),p=1===h?1:2,f=[],g=a[(o?mt:gt)+p],m=0;for(t&&(m=t/e),n=0;nc?null:(t=i?r-f:a+f,$t(t,qe))},translateRange:function(e){var t=this.options,n=t.vertical,i=t.reverse,o=t.max,r=t.min,a=this.lineBox(),s=n?a.height():a.width(),l=o-r,d=s/l,c=$t(e/d,qe);return!n&&!i||n&&i||(c=-c),{min:r+c,max:o+c,offset:c}},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=$t(n.min+e*n.majorUnit,qe),o=this.axisLabelText(i,null,t);return new vn(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,t.offset)},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=jt(o.min,n,i),a=jt(o.max,n,i);if(this.isValidRange(r,a))return{min:r,max:a}},isValidRange:function(e,t){return t-e>Qn}}),k(Xn,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Be},labels:{format:"#.####################"},zIndex:1}),Jn=kn.extend({init:function(e,t,n,i){var o=R(e),r=R(t),a=i.intl,s=n||{};s=Me(s||{},{min:Y(a,s.min),max:Y(a,s.max),axisCrossingValue:K(a,s.axisCrossingValues||s.axisCrossingValue)}),s=he(o,r,s),kn.fn.init.call(this,s,i),this.intlService=a,this.seriesMin=o,this.seriesMax=r,this.totalMin=W(H(W(o)-1,s.baseUnit)),this.totalMax=W(N(W(r)+1,s.baseUnit))},clone:function(){return new Jn(this.seriesMin,this.seriesMax,e.extend({},this.options),this.chartService)},range:function(){var e=this.options;return{min:e.min,max:e.max}},getDivisions:function(e){var t=this.options;return Math.floor(G(t.min,t.max,t.baseUnit)/e+1)},getTickPositions:function(e){var t,n,i,o=this.options,r=o.vertical,a=this.lineBox(),s=(r?-1:1)*(o.reverse?-1:1),l=1===s?1:2,d=a[(r?mt:gt)+l],c=this.getDivisions(e),u=V(o.max,o.min),h=r?a.height():a.width(),p=h/u,f=[d];for(t=1;t0&&(a=L(a,r,o.baseUnit)),n=t.dateFormats[o.baseUnit],t.format=t.format||n,i=this.axisLabelText(a,null,t),new vn(a,i,e,null,t)},translateRange:function(e,t){var n=this.options,i=n.baseUnit,o=n.weekStartDay,r=this.lineBox(),a=n.vertical?r.height():r.width(),s=this.range(),l=a/V(s.max,s.min),d=$t(e/l,qe)*(n.reverse?-1:1),c=F(n.min,d),u=F(n.max,d);return t||(c=L(c,0,i,o),u=L(u,0,i,o)),{min:c,max:u,offset:d}},scaleRange:function(e){for(var t,n,i=this.options,o=i.min,r=i.max,a=Math.abs(e);a--;)t=V(o,r),n=Math.round(.1*t),e<0?(o=F(o,n),r=F(r,-n)):(o=F(o,-n),r=F(r,n));return{min:o,max:r}},shouldRenderNote:function(e){var t=this.range();return O(e,t.min)>=0&&O(e,t.max)<=0},pan:function(e){var t=this.translateRange(e,!0),n=this.limitRange(W(t.min),W(t.max),this.totalMin,this.totalMax,t.offset);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(jt(W(t.min),this.totalMin,this.totalMax)),i=R(jt(W(t.max),this.totalMin,this.totalMax));return{min:n,max:i}}}),k(Jn,{type:We,majorGridLines:{visible:!0,width:1,color:Be},labels:{dateFormats:Wn}}),Zn=10,ei=kn.extend({init:function(e,t,n,i){var o=Me({majorUnit:Zn,min:e,max:t},n),r=o.majorUnit,a=ge(t,r),s=fe(e,t,o),l=pe(s,a,o,n);o.max=l.max,o.min=l.min,o.minorUnit=n.minorUnit||$t(r-1,qe),kn.fn.init.call(this,o,i),this.totalMin=Lt(n.min)?Math.min(s,n.min):s,this.totalMax=Lt(n.max)?Math.max(a,n.max):a,this.logMin=$t(ve(l.min,r),qe),this.logMax=$t(ve(l.max,r),qe),this.seriesMin=e,this.seriesMax=t,this.createLabels()},clone:function(){return new ei(this.seriesMin,this.seriesMax,e.extend({},this.options),this.chartService)},startValue:function(){return this.options.min},getSlot:function(e,t,n){var i,o,r=this,a=r.options,s=r.logMin,l=r.logMax,d=a.reverse,c=a.vertical,u=a.majorUnit,h=c?mt:gt,p=this.lineBox(),f=p[h+(d?2:1)],g=c?p.height():p.width(),m=d?-1:1,v=m*(g/(l-s)),_=new Jt(p.x1,p.y1,p.x1,p.y1),b=e,w=t;return Lt(b)||(b=w||1),Lt(w)||(w=b||1),b<=0||w<=0?null:(n&&(b=Math.max(Math.min(b,a.max),a.min),w=Math.max(Math.min(w,a.max),a.min)),b=ve(b,u),w=ve(w,u),c?(i=l-Math.max(b,w),o=l-Math.min(b,w)):(i=Math.min(b,w)-s,o=Math.max(b,w)-s),_[h+1]=re(f+v*(d?o:i)),_[h+2]=re(f+v*(d?i:o)),_)},getValue:function(e){var t,n=this,i=n.options,o=n.logMin,r=n.logMax,a=i.reverse,s=i.vertical,l=i.majorUnit,d=this.lineBox(),c=s===a?1:-1,u=1===c?1:2,h=s?d.height():d.width(),p=(r-o)/h,f=s?mt:gt,g=d[f+u],m=c*(e[f]-g),v=m*p;return m<0||m>h?null:(t=o+v,$t(Math.pow(l,t),qe))},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,a=n.vertical,s=n.majorUnit,l=this.lineBox(),d=a?l.height():l.width(),c=d/(o-i),u=$t(e/c,qe);return!a&&!r||a&&r||(u=-u),{min:Math.pow(s,i+u),max:Math.pow(s,o+u),offset:u}},labelsCount:function(){var e=Math.floor(this.logMax),t=Math.floor(e-this.logMin)+1;return t},getMajorTickPositions:function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},createTicks:function(e){function t(t,n){d.tickX=a?s.x2:s.x2-n.size,d.tickY=a?s.y1-n.size:s.y1,d.position=t,e.append(I(d,n))}var n=this.options,i=n.majorTicks,o=n.minorTicks,r=n.vertical,a=n.labels.mirror,s=this.lineBox(),l=[],d={vertical:r};return i.visible&&this.traverseMajorTicksPositions(t,i),o.visible&&this.traverseMinorTicksPositions(t,o),l},createGridLines:function(e){function t(e,t){v(e,l)||(s.position=e,d.append(E(s,t)),l.push(e))}var n=this.options,i=n.minorGridLines,o=n.majorGridLines,r=n.vertical,a=e.lineBox(),s={lineStart:a[r?"x1":"y1"],lineEnd:a[r?"x2":"y2"],vertical:r},l=[],d=this.gridLinesVisual();return o.visible&&this.traverseMajorTicksPositions(t,o),i.visible&&this.traverseMinorTicksPositions(t,i),d.children},traverseMajorTicksPositions:function(e,t){var n,i,o=this._lineOptions(),r=o.lineStart,a=o.step,s=this,l=s.logMin,d=s.logMax;for(n=Math.ceil(l)+t.skip;n<=d;n+=t.step)i=$t(r+a*(n-l),qe),e(i,t)},traverseMinorTicksPositions:function(e,t){var n,i,o,r,a,s=this,l=this.options,d=l.min,c=l.max,u=l.minorUnit,h=l.majorUnit,p=this._lineOptions(),f=p.lineStart,g=p.step,m=this,v=m.logMin,_=m.logMax,b=Math.floor(v);for(n=b;n<_;n++)for(i=s._minorIntervalOptions(n),o=t.skip;oc));o+=t.step)r>=d&&(a=$t(f+g*(ve(r,h)-v),qe),e(a,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 vn(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,t.offset)},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),a=jt(r.min,i,o),s=jt(r.max,i,o),l=n.majorUnit,d=s>a&&n.min&&n.max&&$t(ve(n.max,l)-ve(n.min,l),qe)<1,c=!(n.min===i&&n.max===o)&&$t(ve(s,l)-ve(a,l),qe)>=1;if(d||c)return{min:a,max:s}},_minorIntervalOptions:function(e){var t=this.options,n=t.minorUnit,i=t.majorUnit,o=Math.pow(i,e),r=Math.pow(i,e+1),a=r-o,s=a/n;return{value:o,minorStep:s}},_lineOptions:function(){var e=this.options,t=e.reverse,n=e.vertical,i=n?mt:gt,o=this.lineBox(),r=n===t?1:-1,a=1===r?1:2,s=n?o.height():o.width(),l=r*(s/(this.logMax-this.logMin)),d=o[i+a];return{step:l,lineStart:d,lineBox:o}}}),k(ei,{type:"log",majorUnit:Zn,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Be},zIndex:1,_deferLabels:!0}),ti={createGridLines:function(e){var t,n,i=this.options,o=Math.abs(this.box.center().y-e.lineBox().y1),r=[],a=!1;return i.majorGridLines.visible&&(t=this.majorGridLineAngles(e),a=!0,r=this.renderMajorGridLines(t,o,i.majorGridLines)),i.minorGridLines.visible&&(n=this.minorGridLineAngles(e,a),zt(r,this.renderMinorGridLines(n,o,i.minorGridLines,e,a))),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,a={stroke:{width:n.width,color:n.color,dashType:n.dashType}},s=this.box.center(),l=new De([s.x,s.y],t),d=this.gridLinesVisual();for(o=0;o0)if(l=new De([e.x,e.y],s),i.type===Pe)r.append(new we.Circle(l,u));else{for(d=new ye(u),c=0;c1&&(t=e.x-u.x,n=e.y-u.y,i=(Ht(Math.atan2(n,t))+540)%360,c.sort(function(e,t){return _e(e,i)-_e(t,i)}),o=_e(c[0],c[1])/2,r=_e(i,c[0]),a=90-o,s=180-r-a,p=h*(Math.sin(Gt(s))/Math.sin(Gt(a)))),this.axisType().prototype.getValue.call(this,new Xt(l.x1,l.y2-p))}},ri=Xn.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 Xn}}),Me(ri.prototype,oi),ai=ei.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 ei}}),Me(ai.prototype,oi),si=.333,li=.01,di=Ce.extend({init:function(e){this.closed=e},process:function(e){var t,n,i,o,r,a,s,l,d,c,u,h,p,f,g=this,m=e.slice(0),v=[],_=this.closed,b=m.length;if(b>2&&(this.removeDuplicates(0,m),b=m.length),b<2||2===b&&m[0].equals(m[1]))return v;for(t=m[0],n=m[1],i=m[2],v.push(new Ie(t));t.equals(m[b-1]);)_=!0,m.pop(),b--;if(2===b)return o=this.tangent(t,n,gt,mt),Ut(v).controlOut(this.firstControlPoint(o,t,n,gt,mt)),v.push(new Ie(n,this.secondControlPoint(o,t,n,gt,mt))),v;for(_?(t=m[b-1],n=m[0],i=m[1],s=this.controlPoints(t,n,i),r=s[1],a=s[0]):(l=this.tangent(t,n,gt,mt),r=this.firstControlPoint(l,t,n,gt,mt)),d=r,c=0;c<=b-3;c++)g.removeDuplicates(c,m),b=m.length,c+3<=b&&(t=m[c],n=m[c+1],i=m[c+2],u=g.controlPoints(t,n,i),Ut(v).controlOut(d),d=u[1],h=u[0],v.push(new Ie(n,h)));return _?(t=m[b-2],n=m[b-1],i=m[0],p=this.controlPoints(t,n,i),Ut(v).controlOut(d),v.push(new Ie(n,p[0])),Ut(v).controlOut(p[1]),v.push(new Ie(i,a))):(f=this.tangent(n,i,gt,mt),Ut(v).controlOut(d),v.push(new Ie(i,this.secondControlPoint(f,n,i,gt,mt)))),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=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||$t(o,1)===$t(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,a,s,l,d=gt,c=mt,u=!1,h=!1;return this.isLine(e,t,n)?i=this.tangent(e,t,gt,mt):(o={x:this.isMonotonicByField(e,t,n,gt),y:this.isMonotonicByField(e,t,n,mt)},o.x&&o.y?(i=this.tangent(e,n,gt,mt),u=!0):(this.invertAxis(e,t,n)&&(d=mt,c=gt),o[d]?i=0:(r=n[c]t[i]&&t[i]>e[i]||n[i]").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(){var e,t,n,i,o,r,a,s,l,d,c,u,h,p,f,g,m,v,_,b,w,k,y,x,C,S,T,D,A,I,E,M,F,R;window.kendo.dataviz=window.kendo.dataviz||{},e=1.5,t=.4,n="#000",i="Arial, Helvetica, sans-serif",o="11px "+i,r="12px "+i,a="16px "+i,s="transparent",l="#fff",d=function(){return{icon:{border:{width:1}},label:{font:r,padding:3},line:{length:10,width:2},visible:!0}},c=function(){return{labels:{font:r},notes:d(),title:{font:a,margin:5}}},u=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4}},h=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4}},p=function(){return{gap:e,spacing:t}},f=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:l,gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}}},g=function(){return{border:{width:0},labels:{background:s},opacity:.6}},m=function(){return{gap:e,spacing:t,target:{color:"#ff0000"}}},v=function(){return{border:{_brightness:.8,width:1},downColor:l,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:n,width:1},spacing:.3}},_=function(){return{gap:e,spacing:t}},b=function(){return{margin:1}},w=function(){return{width:2}},k=function(){return{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3}},y=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5}},x=function(){return{markers:{visible:!1},width:2}},C=function(){return{gap:e,spacing:t}},S=function(){return{gap:e,spacing:t}},T=function(){return{width:1}},D=function(){return{gap:.5,line:{color:n,width:1},spacing:t}},A=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}}},I=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}}},E=function(e){return{visible:!0,labels:{font:o},overlay:e.gradients?{}:{gradient:"none"},area:u(),rangeArea:h(),verticalRangeArea:h(),bar:p(),boxPlot:f(),bubble:g(),bullet:m(),candlestick:v(),column:_(),pie:A(),donut:b(),funnel:I(),horizontalWaterfall:D(),line:w(),notes:d(),ohlc:k(),radarArea:y(),radarLine:x(),polarArea:y(),polarLine:x(),rangeBar:C(),rangeColumn:S(),scatterLine:T(),verticalArea:u(),verticalBoxPlot:f(),verticalBullet:m(),verticalLine:w(),waterfall:D()}},M=function(){return{font:a}},F=function(){return{labels:{font:r}}},R=function(e){return void 0===e&&(e={}),{axisDefaults:c(),categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:E(e),title:M(),legend:F()}},kendo.deepExtend(kendo.dataviz,{chartBaseTheme:R})}()},"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){function t(t){function i(e,t){r(e,o(t,"backgroundColor"))}function o(e,t){return s.find(".k-var--"+e).css(t)}function r(e,t){for(var n=a,i=e.split("."),o=i.shift();i.length>0;)n=n[o]=n[o]||{},o=i.shift();n[o]=t}var a,s;return!t&&n?n:(a={chart:kendo.dataviz.chartBaseTheme()},s=e('').appendTo(document.body),function(){i("chart.axisDefaults.crosshair.color","chart-crosshair-background"),i("chart.axisDefaults.labels.color","normal-text-color"),i("chart.axisDefaults.line.color","chart-major-lines"),i("chart.axisDefaults.majorGridLines.color","chart-major-lines"),i("chart.axisDefaults.minorGridLines.color","chart-minor-lines"),i("chart.axisDefaults.notes.icon.background","chart-notes-background"),i("chart.axisDefaults.notes.icon.border.color","chart-notes-border"),i("chart.axisDefaults.notes.line.color","chart-notes-lines"),i("chart.axisDefaults.title.color","normal-text-color"),i("chart.chartArea.background","background"),i("chart.legend.inactiveItems.labels.color","chart-inactive"),i("chart.legend.inactiveItems.markers.color","chart-inactive"),i("chart.legend.labels.color","normal-text-color"),i("chart.seriesDefaults.boxPlot.downColor","chart-major-lines"),i("chart.seriesDefaults.boxPlot.mean.color","base"),i("chart.seriesDefaults.boxPlot.median.color","base"),i("chart.seriesDefaults.boxPlot.whiskers.color","accent"),i("chart.seriesDefaults.bullet.target.color","accent"),i("chart.seriesDefaults.candlestick.downColor","normal-text-color"),i("chart.seriesDefaults.candlestick.line.color","normal-text-color"),i("chart.seriesDefaults.errorBars.color","chart-error-bars-background"),i("chart.seriesDefaults.horizontalWaterfall.line.color","chart-major-lines"),i("chart.seriesDefaults.icon.border.color","chart-major-lines"),i("chart.seriesDefaults.labels.background","background"),i("chart.seriesDefaults.labels.color","normal-text-color"),i("chart.seriesDefaults.notes.icon.background","chart-notes-background"),i("chart.seriesDefaults.notes.icon.border.color","chart-notes-border"),i("chart.seriesDefaults.notes.line.color","chart-notes-lines"),i("chart.seriesDefaults.verticalBoxPlot.downColor","chart-major-lines"),i("chart.seriesDefaults.verticalBoxPlot.mean.color","base"),i("chart.seriesDefaults.verticalBoxPlot.median.color","base"),i("chart.seriesDefaults.verticalBoxPlot.whiskers.color","accent"),i("chart.seriesDefaults.verticalBullet.target.color","accent"),i("chart.seriesDefaults.waterfall.line.color","chart-major-lines"),i("chart.title.color","normal-text-color"),r("chart.seriesDefaults.labels.opacity",o("chart-area-opacity","opacity")),i("diagram.shapeDefaults.fill.color","accent"),i("diagram.shapeDefaults.content.color","accent-contrast"),i("diagram.shapeDefaults.connectorDefaults.fill.color","normal-text-color"),i("diagram.shapeDefaults.connectorDefaults.stroke.color","accent-contrast"),i("diagram.shapeDefaults.connectorDefaults.hover.fill.color","accent-contrast"),i("diagram.shapeDefaults.connectorDefaults.hover.stroke.color","normal-text-color"),i("diagram.editable.resize.handles.stroke.color","normal-text-color"),i("diagram.editable.resize.handles.fill.color","normal-background"),i("diagram.editable.resize.handles.hover.stroke.color","normal-text-color"),i("diagram.editable.resize.handles.hover.fill.color","normal-text-color"),i("diagram.selectable.stroke.color","normal-text-color"),i("diagram.connectionDefaults.stroke.color","normal-text-color"),i("diagram.connectionDefaults.content.color","normal-text-color"),i("diagram.connectionDefaults.selection.handles.fill.color","accent-contrast"),i("diagram.connectionDefaults.selection.handles.stroke.color","normal-text-color"),i("diagram.connectionDefaults.selection.stroke.color","normal-text-color"),i("gauge.pointer.color","gauge-pointer"),i("gauge.scale.labels.color","normal-text-color"),i("gauge.scale.minorTicks.color","normal-text-color"),i("gauge.scale.majorTicks.color","normal-text-color"),i("gauge.scale.line.color","normal-text-color"),i("gauge.scale.rangePlaceholderColor","gauge-track")}(),function(){function e(e){return o(e,"fontSize")+" "+o(e,"fontFamily")}var t=e("chart-font"),n=e("chart-title-font"),i=e("chart-label-font");r("chart.axisDefaults.labels.font",i),r("chart.axisDefaults.notes.label.font",t),r("chart.axisDefaults.title.font",t),r("chart.legend.labels.font",t),r("chart.seriesDefaults.labels.font",i),r("chart.seriesDefaults.notes.label.font",t),r("chart.title.font",n)}(),function(){function t(e){return e.toLowerCase().charCodeAt(0)-"a".charCodeAt(0)}function n(e){return t(e.match(/series-([a-z])$/)[1])}var i=e(".k-var--series div").toArray(),o=i.reduce(function(t,i){var o=n(i.className);return t[o]=e(i).css("backgroundColor"),t},[]);r("chart.seriesColors",o)}(),s.remove(),n=a,a)}var n;kendo.dataviz.autoTheme=t}(window.kendo.jQuery)},"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",a="Arial,Helvetica,sans-serif",s="12px "+a,l="#fff",d=n.dataviz.chartBaseTheme({gradients:!0}),c={scale:{labels:{font:s}}},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,p=i.registerTheme=function(e,t){var n,i={};i.chart=o({},d,t.chart),i.gauge=o({},c,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.rangeArea=o({},n.area),n.verticalRangeArea=o({},n.rangeArea),n.verticalBoxPlot=o({},n.boxPlot),n.polarArea=o({},n.radarArea),n.polarLine=o({},n.radarLine),h[e]=i};p("black",{chart:{title:{color:l},legend:{labels:{color:l},inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}},seriesDefaults:{labels:{color:l},errorBars:{color:l},notes:{icon:{background:"#3b3b3b",border:{color:"#8e8e8e"}},label:{color:l},line:{color:"#8e8e8e"}},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#3d3d3d"}},scatter:{markers:{background:"#3d3d3d"}},scatterLine:{markers:{background:"#3d3d3d"}},waterfall:{line:{color:"#8e8e8e"}},horizontalWaterfall:{line:{color:"#8e8e8e"}},candlestick:{downColor:"#555",line:{color:l},border:{_brightness:1.5,opacity:1},highlight:{border:{color:l,opacity:.2}}},ohlc:{line:{color:l}}},chartArea:{background:"#3d3d3d"},seriesColors:["#0081da","#3aafff","#99c900","#ffeb3d","#b20753","#ff4195"],axisDefaults:{line:{color:"#8e8e8e"},labels:{color:l},majorGridLines:{color:"#545454"},minorGridLines:{color:"#454545"},title:{color:l},crosshair:{color:"#8e8e8e"},notes:{icon:{background:"#3b3b3b",border:{color:"#8e8e8e"}},label:{color:l},line:{color:"#8e8e8e"}}}},gauge:{pointer:{color:"#0070e4"},scale:{rangePlaceholderColor:"#1d1d1d",labels:{color:l},minorTicks:{color:l},majorTicks:{color:l},line:{color:l}}},diagram:{shapeDefaults:{fill:{color:"#0066cc"},connectorDefaults:{fill:{color:l},stroke:{color:"#384049"},hover:{fill:{color:"#3d3d3d"},stroke:{color:"#efefef"}}},content:{color:l}},editable:{resize:{handles:{fill:{color:"#3d3d3d"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:l}}}},rotate:{thumb:{stroke:{color:l},fill:{color:l}}}},selectable:{stroke:{color:l}},connectionDefaults:{stroke:{color:l},content:{color:l},selection:{handles:{fill:{color:"#3d3d3d"},stroke:{color:"#efefef"}}}}},treeMap:{colors:[["#0081da","#314b5c"],["#3aafff","#3c5464"],["#99c900","#4f5931"],["#ffeb3d","#64603d"],["#b20753","#543241"],["#ff4195","#643e4f"]]}}),p("blueopal",{chart:{title:{color:"#293135"},legend:{labels:{color:"#293135"},inactiveItems:{labels:{color:"#27A5BA"},markers:{color:"#27A5BA"}}},seriesDefaults:{labels:{color:r,background:l,opacity:.5},errorBars:{color:"#293135"},candlestick:{downColor:"#c4d0d5",line:{color:"#9aabb2"}},waterfall:{line:{color:"#9aabb2"}},horizontalWaterfall:{line:{color:"#9aabb2"}},notes:{icon:{background:"transparent",border:{color:"#9aabb2"}},label:{color:"#293135"},line:{color:"#9aabb2"}}},seriesColors:["#0069a5","#0098ee","#7bd2f6","#ffb800","#ff8517","#e34a00"],axisDefaults:{line:{color:"#9aabb2"},labels:{color:"#293135"},majorGridLines:{color:"#c4d0d5"},minorGridLines:{color:"#edf1f2"},title:{color:"#293135"},crosshair:{color:"#9aabb2"},notes:{icon:{background:"transparent",border:{color:"#9aabb2"}},label:{color:"#293135"},line:{color:"#9aabb2"}}}},gauge:{pointer:{color:"#005c83"},scale:{rangePlaceholderColor:"#daecf4",labels:{color:"#293135"},minorTicks:{color:"#293135"},majorTicks:{color:"#293135"},line:{color:"#293135"}}},diagram:{shapeDefaults:{fill:{color:"#7ec6e3"},connectorDefaults:{fill:{color:"#003f59"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:"#003f59"}}},content:{color:"#293135"}},editable:{resize:{handles:{fill:{color:l},stroke:{color:"#003f59"},hover:{fill:{color:"#003f59"},stroke:{color:"#003f59"}}}},rotate:{thumb:{stroke:{color:"#003f59"},fill:{color:"#003f59"}}}},selectable:{stroke:{color:"#003f59"}},connectionDefaults:{stroke:{color:"#003f59"},content:{color:"#293135"},selection:{handles:{fill:{color:"#3d3d3d"},stroke:{color:"#efefef"}}}}},treeMap:{colors:[["#0069a5","#bad7e7"],["#0098ee","#b9e0f5"],["#7bd2f6","#ceeaf6"],["#ffb800","#e6e3c4"],["#ff8517","#e4d8c8"],["#e34a00","#ddccc2"]]}}),p("highcontrast",{chart:{title:{color:"#ffffff"},legend:{labels:{color:"#ffffff"},inactiveItems:{labels:{color:"#66465B"},markers:{color:"#66465B"}}},seriesDefaults:{labels:{color:"#ffffff"},errorBars:{color:"#ffffff"},notes:{icon:{background:"transparent",border:{color:"#ffffff"}},label:{color:"#ffffff"},line:{color:"#ffffff"}},pie:{overlay:{gradient:"sharpGlass"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#2c232b"}},scatter:{markers:{background:"#2c232b"}},scatterLine:{markers:{background:"#2c232b"}},area:{opacity:.5},waterfall:{line:{color:"#ffffff"}},horizontalWaterfall:{line:{color:"#ffffff"}},candlestick:{downColor:"#664e62",line:{color:"#ffffff"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:"#ffffff",opacity:1}}},ohlc:{line:{color:"#ffffff"}}},chartArea:{background:"#2c232b"},seriesColors:["#a7008f","#ffb800","#3aafff","#99c900","#b20753","#ff4195"],axisDefaults:{line:{color:"#ffffff"},labels:{color:"#ffffff"},majorGridLines:{color:"#664e62"},minorGridLines:{color:"#4f394b"},title:{color:"#ffffff"},crosshair:{color:"#ffffff"},notes:{icon:{background:"transparent",border:{color:"#ffffff"}},label:{color:"#ffffff"},line:{color:"#ffffff"}}}},gauge:{pointer:{color:"#a7008f"},scale:{rangePlaceholderColor:"#2c232b",labels:{color:"#ffffff"},minorTicks:{color:"#2c232b"},majorTicks:{color:"#664e62"},line:{color:"#ffffff"}}},diagram:{shapeDefaults:{fill:{color:"#a7018f"},connectorDefaults:{fill:{color:l},stroke:{color:"#2c232b"},hover:{fill:{color:"#2c232b"},stroke:{color:l}}},content:{color:l}},editable:{resize:{handles:{fill:{color:"#2c232b"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:l}}}},rotate:{thumb:{stroke:{color:l},fill:{color:l}}}},selectable:{stroke:{color:l}},connectionDefaults:{stroke:{color:l},content:{color:l},selection:{handles:{fill:{color:"#2c232b"},stroke:{color:l}}}}},treeMap:{colors:[["#a7008f","#451c3f"],["#ffb800","#564122"],["#3aafff","#2f3f55"],["#99c900","#424422"],["#b20753","#471d33"],["#ff4195","#562940"]]}}),p("default",{chart:{title:{color:"#8e8e8e"},legend:{labels:{color:"#232323"},inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}},seriesDefaults:{labels:{color:r,background:l,opacity:.5},errorBars:{color:"#232323"},candlestick:{downColor:"#dedede",line:{color:"#8d8d8d"}},waterfall:{line:{color:"#8e8e8e"}},horizontalWaterfall:{line:{color:"#8e8e8e"}},notes:{icon:{background:"transparent",border:{color:"#8e8e8e"}},label:{color:"#232323"},line:{color:"#8e8e8e"}}},seriesColors:["#ff6800","#a0a700","#ff8d00","#678900","#ffb53c","#396000"],axisDefaults:{line:{color:"#8e8e8e"},labels:{color:"#232323"},minorGridLines:{color:"#f0f0f0"},majorGridLines:{color:"#dfdfdf"},title:{color:"#232323"},crosshair:{color:"#8e8e8e"},notes:{icon:{background:"transparent",border:{color:"#8e8e8e"}},label:{color:"#232323"},line:{color:"#8e8e8e"}}}},gauge:{pointer:{color:"#ea7001"},scale:{rangePlaceholderColor:"#dedede",labels:{color:"#2e2e2e"},minorTicks:{color:"#2e2e2e"},majorTicks:{color:"#2e2e2e"},line:{color:"#2e2e2e"}}},diagram:{shapeDefaults:{fill:{color:"#e15613"},connectorDefaults:{fill:{color:"#282828"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:"#282828"}}},content:{color:"#2e2e2e"}},editable:{resize:{handles:{fill:{color:l},stroke:{color:"#282828"},hover:{fill:{color:"#282828"},stroke:{color:"#282828"}}}},rotate:{thumb:{stroke:{color:"#282828"},fill:{color:"#282828"}}}},selectable:{stroke:{color:"#a7018f"}},connectionDefaults:{stroke:{color:"#282828"},content:{color:"#2e2e2e"},selection:{handles:{fill:{color:l},stroke:{color:"#282828"}}}}},treeMap:{colors:[["#ff6800","#edcfba"],["#a0a700","#dadcba"],["#ff8d00","#edd7ba"],["#678900","#cfd6ba"],["#ffb53c","#eddfc6"],["#396000","#c6ceba"]]}}),p("silver",{chart:{title:{color:"#4e5968"},legend:{labels:{color:"#4e5968"},inactiveItems:{labels:{color:"#B1BCC8"},markers:{color:"#B1BCC8"}}},seriesDefaults:{labels:{color:"#293135",background:"#eaeaec",opacity:.5},errorBars:{color:"#4e5968"},notes:{icon:{background:"transparent",
border:{color:"#4e5968"}},label:{color:"#4e5968"},line:{color:"#4e5968"}},line:{markers:{background:"#eaeaec"}},scatter:{markers:{background:"#eaeaec"}},scatterLine:{markers:{background:"#eaeaec"}},pie:{connectors:{color:"#A6B1C0"}},donut:{connectors:{color:"#A6B1C0"}},waterfall:{line:{color:"#a6b1c0"}},horizontalWaterfall:{line:{color:"#a6b1c0"}},candlestick:{downColor:"#a6afbe"}},chartArea:{background:"#eaeaec"},seriesColors:["#007bc3","#76b800","#ffae00","#ef4c00","#a419b7","#430B62"],axisDefaults:{line:{color:"#a6b1c0"},labels:{color:"#4e5968"},majorGridLines:{color:"#dcdcdf"},minorGridLines:{color:"#eeeeef"},title:{color:"#4e5968"},crosshair:{color:"#a6b1c0"},notes:{icon:{background:"transparent",border:{color:"#4e5968"}},label:{color:"#4e5968"},line:{color:"#4e5968"}}}},gauge:{pointer:{color:"#0879c0"},scale:{rangePlaceholderColor:"#f3f3f4",labels:{color:"#515967"},minorTicks:{color:"#515967"},majorTicks:{color:"#515967"},line:{color:"#515967"}}},diagram:{shapeDefaults:{fill:{color:"#1c82c2"},connectorDefaults:{fill:{color:"#515967"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:"#282828"}}},content:{color:"#515967"}},editable:{resize:{handles:{fill:{color:l},stroke:{color:"#515967"},hover:{fill:{color:"#515967"},stroke:{color:"#515967"}}}},rotate:{thumb:{stroke:{color:"#515967"},fill:{color:"#515967"}}}},selectable:{stroke:{color:"#515967"}},connectionDefaults:{stroke:{color:"#515967"},content:{color:"#515967"},selection:{handles:{fill:{color:l},stroke:{color:"#515967"}}}}},treeMap:{colors:[["#007bc3","#c2dbea"],["#76b800","#dae7c3"],["#ffae00","#f5e5c3"],["#ef4c00","#f2d2c3"],["#a419b7","#e3c7e8"],["#430b62","#d0c5d7"]]}}),p("metro",{chart:{title:{color:"#777777"},legend:{labels:{color:"#777777"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:r},errorBars:{color:"#777777"},notes:{icon:{background:"transparent",border:{color:"#777777"}},label:{color:"#777777"},line:{color:"#777777"}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},waterfall:{line:{color:"#c7c7c7"}},horizontalWaterfall:{line:{color:"#c7c7c7"}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:["#8ebc00","#309b46","#25a0da","#ff6900","#e61e26","#d8e404","#16aba9","#7e51a1","#313131","#ed1691"],axisDefaults:{line:{color:"#c7c7c7"},labels:{color:"#777777"},minorGridLines:{color:"#c7c7c7"},majorGridLines:{color:"#c7c7c7"},title:{color:"#777777"},crosshair:{color:"#c7c7c7"},notes:{icon:{background:"transparent",border:{color:"#777777"}},label:{color:"#777777"},line:{color:"#777777"}}}},gauge:{pointer:{color:"#8ebc00"},scale:{rangePlaceholderColor:"#e6e6e6",labels:{color:"#777"},minorTicks:{color:"#777"},majorTicks:{color:"#777"},line:{color:"#777"}}},diagram:{shapeDefaults:{fill:{color:"#8ebc00"},connectorDefaults:{fill:{color:r},stroke:{color:l},hover:{fill:{color:l},stroke:{color:r}}},content:{color:"#777"}},editable:{resize:{handles:{fill:{color:l},stroke:{color:"#787878"},hover:{fill:{color:"#787878"},stroke:{color:"#787878"}}}},rotate:{thumb:{stroke:{color:"#787878"},fill:{color:"#787878"}}}},selectable:{stroke:{color:"#515967"}},connectionDefaults:{stroke:{color:"#787878"},content:{color:"#777"},selection:{handles:{fill:{color:l},stroke:{color:"#787878"}}}}},treeMap:{colors:[["#8ebc00","#e8f2cc"],["#309b46","#d6ebda"],["#25a0da","#d3ecf8"],["#ff6900","#ffe1cc"],["#e61e26","#fad2d4"],["#d8e404","#f7facd"],["#16aba9","#d0eeee"],["#7e51a1","#e5dcec"],["#313131","#d6d6d6"],["#ed1691","#fbd0e9"]]}}),p("metroblack",{chart:{title:{color:"#ffffff"},legend:{labels:{color:"#ffffff"},inactiveItems:{labels:{color:"#797979"},markers:{color:"#797979"}}},seriesDefaults:{border:{_brightness:1},labels:{color:"#ffffff"},errorBars:{color:"#ffffff"},notes:{icon:{background:"transparent",border:{color:"#cecece"}},label:{color:"#ffffff"},line:{color:"#cecece"}},line:{markers:{background:"#0e0e0e"}},bubble:{opacity:.6},scatter:{markers:{background:"#0e0e0e"}},scatterLine:{markers:{background:"#0e0e0e"}},candlestick:{downColor:"#828282",line:{color:"#ffffff"}},waterfall:{line:{color:"#cecece"}},horizontalWaterfall:{line:{color:"#cecece"}},overlay:{gradient:"none"}},chartArea:{background:"#0e0e0e"},seriesColors:["#00aba9","#309b46","#8ebc00","#ff6900","#e61e26","#d8e404","#25a0da","#7e51a1","#313131","#ed1691"],axisDefaults:{line:{color:"#cecece"},labels:{color:"#ffffff"},minorGridLines:{color:"#2d2d2d"},majorGridLines:{color:"#333333"},title:{color:"#ffffff"},crosshair:{color:"#cecece"},notes:{icon:{background:"transparent",border:{color:"#cecece"}},label:{color:"#ffffff"},line:{color:"#cecece"}}}},gauge:{pointer:{color:"#00aba9"},scale:{rangePlaceholderColor:"#2d2d2d",labels:{color:"#ffffff"},minorTicks:{color:"#333333"},majorTicks:{color:"#cecece"},line:{color:"#cecece"}}},diagram:{shapeDefaults:{fill:{color:"#00aba9"},connectorDefaults:{fill:{color:l},stroke:{color:"#0e0e0e"},hover:{fill:{color:"#0e0e0e"},stroke:{color:l}}},content:{color:l}},editable:{resize:{handles:{fill:{color:"#0e0e0e"},stroke:{color:"#787878"},hover:{fill:{color:"#787878"},stroke:{color:"#787878"}}}},rotate:{thumb:{stroke:{color:l},fill:{color:l}}}},selectable:{stroke:{color:"#787878"}},connectionDefaults:{stroke:{color:l},content:{color:l},selection:{handles:{fill:{color:"#0e0e0e"},stroke:{color:l}}}}},treeMap:{colors:[["#00aba9","#0b2d2d"],["#309b46","#152a19"],["#8ebc00","#28310b"],["#ff6900","#3e200b"],["#e61e26","#391113"],["#d8e404","#36390c"],["#25a0da","#132b37"],["#7e51a1","#241b2b"],["#313131","#151515"],["#ed1691","#3b1028"]]}}),p("moonlight",{chart:{title:{color:"#ffffff"},legend:{labels:{color:"#ffffff"},inactiveItems:{labels:{color:"#A1A7AB"},markers:{color:"#A1A7AB"}}},seriesDefaults:{labels:{color:"#ffffff"},errorBars:{color:"#ffffff"},notes:{icon:{background:"transparent",border:{color:"#8c909e"}},label:{color:"#ffffff"},line:{color:"#8c909e"}},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#212a33"}},bubble:{opacity:.6},scatter:{markers:{background:"#212a33"}},scatterLine:{markers:{background:"#212a33"}},area:{opacity:.3},candlestick:{downColor:"#757d87",line:{color:"#ea9d06"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:l,opacity:.2}}},waterfall:{line:{color:"#8c909e"}},horizontalWaterfall:{line:{color:"#8c909e"}},ohlc:{line:{color:"#ea9d06"}}},chartArea:{background:"#212a33"},seriesColors:["#ffca08","#ff710f","#ed2e24","#ff9f03","#e13c02","#a00201"],axisDefaults:{line:{color:"#8c909e"},minorTicks:{color:"#8c909e"},majorTicks:{color:"#8c909e"},labels:{color:"#ffffff"},majorGridLines:{color:"#3e424d"},minorGridLines:{color:"#2f3640"},title:{color:"#ffffff"},crosshair:{color:"#8c909e"},notes:{icon:{background:"transparent",border:{color:"#8c909e"}},label:{color:"#ffffff"},line:{color:"#8c909e"}}}},gauge:{pointer:{color:"#f4af03"},scale:{rangePlaceholderColor:"#2f3640",labels:{color:l},minorTicks:{color:"#8c909e"},majorTicks:{color:"#8c909e"},line:{color:"#8c909e"}}},diagram:{shapeDefaults:{fill:{color:"#f3ae03"},connectorDefaults:{fill:{color:l},stroke:{color:"#414550"},hover:{fill:{color:"#414550"},stroke:{color:l}}},content:{color:l}},editable:{resize:{handles:{fill:{color:"#414550"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:l}}}},rotate:{thumb:{stroke:{color:l},fill:{color:l}}}},selectable:{stroke:{color:l}},connectionDefaults:{stroke:{color:l},content:{color:l},selection:{handles:{fill:{color:"#414550"},stroke:{color:l}}}}},treeMap:{colors:[["#ffca08","#4e4b2b"],["#ff710f","#4e392d"],["#ed2e24","#4b2c31"],["#ff9f03","#4e422a"],["#e13c02","#482e2a"],["#a00201","#3b232a"]]}}),p("uniform",{chart:{title:{color:"#686868"},legend:{labels:{color:"#686868"},inactiveItems:{labels:{color:"#B6B6B6"},markers:{color:"#B6B6B6"}}},seriesDefaults:{labels:{color:"#686868"},errorBars:{color:"#686868"},notes:{icon:{background:"transparent",border:{color:"#9e9e9e"}},label:{color:"#686868"},line:{color:"#9e9e9e"}},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#ffffff"}},bubble:{opacity:.6},scatter:{markers:{background:"#ffffff"}},scatterLine:{markers:{background:"#ffffff"}},area:{opacity:.3},candlestick:{downColor:"#cccccc",line:{color:"#cccccc"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:"#cccccc",opacity:.2}}},waterfall:{line:{color:"#9e9e9e"}},horizontalWaterfall:{line:{color:"#9e9e9e"}},ohlc:{line:{color:"#cccccc"}}},chartArea:{background:"#ffffff"},seriesColors:["#527aa3","#6f91b3","#8ca7c2","#a8bdd1","#c5d3e0","#e2e9f0"],axisDefaults:{line:{color:"#9e9e9e"},minorTicks:{color:"#aaaaaa"},majorTicks:{color:"#888888"},labels:{color:"#686868"},majorGridLines:{color:"#dadada"},minorGridLines:{color:"#e7e7e7"},title:{color:"#686868"},crosshair:{color:"#9e9e9e"},notes:{icon:{background:"transparent",border:{color:"#9e9e9e"}},label:{color:"#686868"},line:{color:"#9e9e9e"}}}},gauge:{pointer:{color:"#527aa3"},scale:{rangePlaceholderColor:"#e7e7e7",labels:{color:"#686868"},minorTicks:{color:"#aaaaaa"},majorTicks:{color:"#888888"},line:{color:"#9e9e9e"}}},diagram:{shapeDefaults:{fill:{color:"#d1d1d1"},connectorDefaults:{fill:{color:"#686868"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:"#686868"}}},content:{color:"#686868"}},editable:{resize:{handles:{fill:{color:l},stroke:{color:"#686868"},hover:{fill:{color:"#686868"},stroke:{color:"#686868"}}}},rotate:{thumb:{stroke:{color:"#686868"},fill:{color:"#686868"}}}},selectable:{stroke:{color:"#686868"}},connectionDefaults:{stroke:{color:"#686868"},content:{color:"#686868"},selection:{handles:{fill:{color:l},stroke:{color:"#686868"}}}}},treeMap:{colors:[["#527aa3","#d0d8e1"],["#6f91b3","#d6dde4"],["#8ca7c2","#dce1e7"],["#a8bdd1","#e2e6ea"],["#c5d3e0","#e7eaed"],["#e2e9f0","#edeff0"]]}}),p("bootstrap",{chart:{title:{color:"#333333"},legend:{labels:{color:"#333333"},inactiveItems:{labels:{color:"#999999"},markers:{color:"#9A9A9A"}}},seriesDefaults:{labels:{color:"#333333"},overlay:{gradient:"none"},errorBars:{color:"#343434"},notes:{icon:{background:"#000000",border:{color:"#000000"}},label:{color:"#333333"},line:{color:"#000000"}},pie:{overlay:{gradient:"none"}},donut:{overlay:{gradient:"none"}},line:{markers:{background:"#ffffff"}},bubble:{opacity:.6},scatter:{markers:{background:"#ffffff"}},scatterLine:{markers:{background:"#ffffff"}},area:{opacity:.8},candlestick:{downColor:"#d0d0d0",line:{color:"#333333"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:"#b8b8b8",opacity:.2}}},waterfall:{line:{color:"#cccccc"}},horizontalWaterfall:{line:{color:"#cccccc"}},ohlc:{line:{color:"#333333"}}},chartArea:{background:"#ffffff"},seriesColors:["#428bca","#5bc0de","#5cb85c","#f2b661","#e67d4a","#da3b36"],axisDefaults:{line:{color:"#cccccc"},minorTicks:{color:"#ebebeb"},majorTicks:{color:"#cccccc"},labels:{color:"#333333"},majorGridLines:{color:"#cccccc"},minorGridLines:{color:"#ebebeb"},title:{color:"#333333"},crosshair:{color:"#000000"},notes:{icon:{background:"#000000",border:{color:"#000000"}},label:{color:"#ffffff"},line:{color:"#000000"}}}},gauge:{pointer:{color:"#428bca"},scale:{rangePlaceholderColor:"#cccccc",labels:{color:"#333333"},minorTicks:{color:"#ebebeb"},majorTicks:{color:"#cccccc"},line:{color:"#cccccc"}}},diagram:{shapeDefaults:{fill:{color:"#428bca"},connectorDefaults:{fill:{color:"#333333"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:"#333333"}}},content:{color:"#333333"}},editable:{resize:{handles:{fill:{color:l},stroke:{color:"#333333"},hover:{fill:{color:"#333333"},stroke:{color:"#333333"}}}},rotate:{thumb:{stroke:{color:"#333333"},fill:{color:"#333333"}}}},selectable:{stroke:{color:"#333333"}},connectionDefaults:{stroke:{color:"#c4c4c4"},content:{color:"#333333"},selection:{handles:{fill:{color:l},stroke:{color:"#333333"}},stroke:{color:"#333333"}}}},treeMap:{colors:[["#428bca","#d1e0ec"],["#5bc0de","#d6eaf0"],["#5cb85c","#d6e9d6"],["#5cb85c","#f4e8d7"],["#e67d4a","#f2ddd3"],["#da3b36","#f0d0cf"]]}}),p("flat",{chart:{title:{color:"#4c5356"},legend:{labels:{color:"#4c5356"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:"#4c5356"},errorBars:{color:"#4c5356"},notes:{icon:{background:"transparent",border:{color:"#cdcdcd"}},label:{color:"#4c5356"},line:{color:"#cdcdcd"}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},area:{opacity:.9},waterfall:{line:{color:"#cdcdcd"}},horizontalWaterfall:{line:{color:"#cdcdcd"}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:["#10c4b2","#ff7663","#ffb74f","#a2df53","#1c9ec4","#ff63a5","#1cc47b"],axisDefaults:{line:{color:"#cdcdcd"},labels:{color:"#4c5356"},minorGridLines:{color:"#cdcdcd"},majorGridLines:{color:"#cdcdcd"},title:{color:"#4c5356"},crosshair:{color:"#cdcdcd"},notes:{icon:{background:"transparent",border:{color:"#cdcdcd"}},label:{color:"#4c5356"},line:{color:"#cdcdcd"}}}},gauge:{pointer:{color:"#10c4b2"},scale:{rangePlaceholderColor:"#cdcdcd",labels:{color:"#4c5356"},minorTicks:{color:"#4c5356"},majorTicks:{color:"#4c5356"},line:{color:"#4c5356"}}},diagram:{shapeDefaults:{fill:{color:"#10c4b2"},connectorDefaults:{fill:{color:"#363940"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:"#363940"}}},content:{color:"#4c5356"}},editable:{resize:{handles:{fill:{color:l},stroke:{color:"#363940"},hover:{fill:{color:"#363940"},stroke:{color:"#363940"}}}},rotate:{thumb:{stroke:{color:"#363940"},fill:{color:"#363940"}}}},selectable:{stroke:{color:"#363940"}},connectionDefaults:{stroke:{color:"#cdcdcd"},content:{color:"#4c5356"},selection:{handles:{fill:{color:l},stroke:{color:"#363940"}},stroke:{color:"#363940"}}}},treeMap:{colors:[["#10c4b2","#cff3f0"],["#ff7663","#ffe4e0"],["#ffb74f","#fff1dc"],["#a2df53","#ecf9dd"],["#1c9ec4","#d2ecf3"],["#ff63a5","#ffe0ed"],["#1cc47b","#d2f3e5"]]}}),p("material",{chart:{title:{color:"#444444"},legend:{labels:{color:"#444444"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:"#444444"},errorBars:{color:"#444444"},notes:{icon:{background:"transparent",border:{color:"#e5e5e5"}},label:{color:"#444444"},line:{color:"#e5e5e5"}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},area:{opacity:.9},waterfall:{line:{color:"#e5e5e5"}},horizontalWaterfall:{line:{color:"#e5e5e5"}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#ff9800","#ff5722"],axisDefaults:{line:{color:"#e5e5e5"},labels:{color:"#444444"},minorGridLines:{color:"#e5e5e5"},majorGridLines:{color:"#e5e5e5"},title:{color:"#444444"},crosshair:{color:"#7f7f7f"},notes:{icon:{background:"transparent",border:{color:"#e5e5e5"}},label:{color:"#444444"},line:{color:"#e5e5e5"}}}},gauge:{pointer:{color:"#3f51b5"},scale:{rangePlaceholderColor:"#e5e5e5",labels:{color:"#444444"},minorTicks:{color:"#444444"},majorTicks:{color:"#444444"},line:{color:"#444444"}}},diagram:{shapeDefaults:{fill:{color:"#3f51b5"},connectorDefaults:{fill:{color:"#7f7f7f"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:"#7f7f7f"}}},content:{color:"#444444"}},editable:{resize:{handles:{fill:{color:l},stroke:{color:"#444444"},hover:{fill:{color:"#444444"},stroke:{color:"#444444"}}}},rotate:{thumb:{stroke:{color:"#444444"},fill:{color:"#444444"}}}},selectable:{stroke:{color:"#444444"}},connectionDefaults:{stroke:{color:"#7f7f7f"},content:{color:"#444444"},selection:{handles:{fill:{color:l},stroke:{color:"#444444"}},stroke:{color:"#444444"}}}},treeMap:{colors:[["#3f51b5","#cff3f0"],["#03a9f4","#e5f6fe"],["#4caf50","#edf7ed"],["#f9ce1d","#fefae8"],["#ff9800","#fff4e5"],["#ff5722","#ffeee8"]]}}),p("materialblack",{chart:{title:{color:"#fff"},legend:{labels:{color:"#fff"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:"#fff"},errorBars:{color:"#fff"},notes:{icon:{background:"transparent",border:{color:"#e5e5e5"}},label:{color:"#fff"},line:{color:"#e5e5e5"}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},area:{opacity:.9},waterfall:{line:{color:"#4d4d4d"}},horizontalWaterfall:{line:{color:"#4d4d4d"}},overlay:{gradient:"none"},border:{_brightness:1}},chartArea:{background:"#1c1c1c"},seriesColors:["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#ff9800","#ff5722"],axisDefaults:{line:{color:"#4d4d4d"},labels:{color:"#fff"},minorGridLines:{color:"#4d4d4d"},majorGridLines:{color:"#4d4d4d"},title:{color:"#fff"},crosshair:{color:"#7f7f7f"},notes:{icon:{background:"transparent",border:{color:"#4d4d4d"}},label:{color:"#fff"},line:{color:"#4d4d4d"}}}},gauge:{pointer:{color:"#3f51b5"},scale:{rangePlaceholderColor:"#4d4d4d",labels:{color:"#fff"},minorTicks:{color:"#fff"},majorTicks:{color:"#fff"},line:{color:"#fff"}}},diagram:{shapeDefaults:{fill:{color:"#3f51b5"},connectorDefaults:{fill:{color:"#7f7f7f"},stroke:{color:l},hover:{fill:{color:l},stroke:{color:"#7f7f7f"}}},content:{color:"#fff"}},editable:{resize:{handles:{fill:{color:l},stroke:{color:"#fff"},hover:{fill:{color:"#fff"},stroke:{color:"#fff"}}}},rotate:{thumb:{stroke:{color:"#fff"},fill:{color:"#fff"}}}},selectable:{stroke:{color:"#fff"}},connectionDefaults:{stroke:{color:"#7f7f7f"},content:{color:"#fff"},selection:{handles:{fill:{color:l},stroke:{color:"#fff"}},stroke:{color:"#fff"}}}},treeMap:{colors:[["#3f51b5","#cff3f0"],["#03a9f4","#e5f6fe"],["#4caf50","#edf7ed"],["#f9ce1d","#fefae8"],["#ff9800","#fff4e5"],["#ff5722","#ffeee8"]]}}),function(){function e(){return{icon:{background:"#007cc0",border:{color:"#007cc0"}},label:{color:"#ffffff"},line:{color:r}}}var n="#333333",i="#7f7f7f",o="#bdbdbd",r="#c8c8c8",a="#dddddd",s=["#008fd3","#99d101","#f39b02","#f05662","#c03c53","#acacac"],d=["#cbe8f5","#eaf5cb","#fceacc","#fbdcdf","#f2d7dc","#eeeeee"],c=s[0],u=l;p("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:s,axisDefaults:{line:{color:r},labels:{color:n},minorGridLines:{color:a},majorGridLines:{color:r},title:{color:n},crosshair:{color:i},notes:e()}},gauge:{pointer:{color:c},scale:{rangePlaceholderColor:r,labels:{color:n},minorTicks:{color:n},majorTicks:{color:n},line:{color:n}}},diagram:{shapeDefaults:{fill:{color:c},connectorDefaults:{fill:{color:n},stroke:{color:u},hover:{fill:{color:u},stroke:{color:n}}},content:{color:n}},editable:{resize:{handles:{fill:{color:u},stroke:{color:o},hover:{fill:{color:o},stroke:{color:o}}}},rotate:{thumb:{stroke:{color:o},fill:{color:o}}}},selectable:{stroke:{color:o}},connectionDefaults:{stroke:{color:o},content:{color:o},selection:{handles:{fill:{color:u},stroke:{color:o}},stroke:{color:o}}}},treeMap:{colors:t(s,d)}})}(),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",a="#e5e5e5",s=["#0072c6","#5db2ff","#008a17","#82ba00","#ff8f32","#ac193d"],d=["#cbe2f3","#deeffe","#cbe7d0","#e5f0cb","#fee8d5","#eed0d7"],c=s[0],u=l;p("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:s,axisDefaults:{line:{color:r},labels:{color:n},minorGridLines:{color:a},majorGridLines:{color:r},title:{color:n},crosshair:{color:i},notes:e()}},gauge:{pointer:{color:c},scale:{rangePlaceholderColor:r,labels:{color:n},minorTicks:{color:n},majorTicks:{color:n},line:{color:n}}},diagram:{shapeDefaults:{fill:{color:c},connectorDefaults:{fill:{color:n},stroke:{color:u},hover:{fill:{color:u},stroke:{color:n}}},content:{color:n}},editable:{resize:{handles:{fill:{color:u},stroke:{color:o},hover:{fill:{color:o},stroke:{color:o}}}},rotate:{thumb:{stroke:{color:o},fill:{color:o}}}},selectable:{stroke:{color:o}},connectionDefaults:{stroke:{color:o},content:{color:o},selection:{handles:{fill:{color:u},stroke:{color:o}},stroke:{color:o}}}},treeMap:{colors:t(s,d)}})}(),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",a="#dfe0e1",s=["#ff4350","#ff9ea5","#00acc1","#80deea","#ffbf46","#ffd78c"],d=["#ffd9dc","#ffeced","#cceef3","#e6f8fb","#fff2da","#fff7e8"],c=s[0],u=l;p("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:s,axisDefaults:{line:{color:r},labels:{color:n},minorGridLines:{color:a},majorGridLines:{color:r},title:{color:n},crosshair:{color:n},notes:e()}},gauge:{pointer:{color:c},scale:{rangePlaceholderColor:r,labels:{color:n},minorTicks:{color:n},majorTicks:{color:n},line:{color:n}}},diagram:{shapeDefaults:{fill:{color:c},connectorDefaults:{fill:{color:n},stroke:{color:u},hover:{fill:{color:u},stroke:{color:n}}},content:{color:n}},editable:{resize:{handles:{fill:{color:u},stroke:{color:o},hover:{fill:{color:o},stroke:{color:o}}}},rotate:{thumb:{stroke:{color:o},fill:{color:o}}}},selectable:{stroke:{color:o}},connectionDefaults:{stroke:{color:o},content:{color:o},selection:{handles:{fill:{color:u},stroke:{color:o}},stroke:{color:o}}}},treeMap:{colors:t(s,d)}})}(),function(){var e=["#ff6358","#ffd246","#78d237","#28b4c8","#2d73f5","#aa46be"],n=["#ffd9dc","#ffeced","#cceef3","#e6f8fb","#fff2da","#fff7e8"];p("default-v2",{chart:{},gauge:{},diagram:{},treeMap:{colors:t(e,n)}}),h.sass=h["default-v2"]}(),function(){var e="#292b2c",n="rgba(0, 0, 0, .04)",i=["#0275d8","#5bc0de","#5cb85c","#f0ad4e","#e67d4a","#d9534f"],o=["#ffd9dc","#ffeced","#cceef3","#e6f8fb","#fff2da","#fff7e8"],r=i[0];p("bootstrap-v4",{chart:{},gauge:{pointer:{color:r},scale:{rangePlaceholderColor:n,labels:{color:e},minorTicks:{color:e},majorTicks:{color:e},line:{color:e}}},diagram:{},treeMap:{colors:t(i,o)}})}()}(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,t){for(var n=0;nJn)return null;for(l in e)!De(l,n.excluded)&&e.hasOwnProperty(l)&&(d=e[l],Ae(d)?(s=!0,i||(e[l]=Ie(d(t),r[l]))):Ee(d)&&(i||(n.defaults=r[l]),n.depth++,s=o(d,t,n,i)||s,n.depth--));return s}function r(e){var t,n=e.length,i=0;for(t=0;t=0;n--)t(e[n],n-i-1)}function u(e){return n(e)===e.length}function h(e){return be(e)&&null!==e}function p(e){var t,n,i,o=e.series;for(t=0;t0&&c0)for(n=0;n-1){for(i=e.split(".");i.length>1;)r=i.shift(),be(o[r])||(o[r]={}),o=o[r];r=i.shift()}o[r]=n}function M(e,t,n){var i=[].concat(t instanceof Ue?e.categoryAxis:e.valueAxis);Me(i[t.axisIndex],n)}function F(e,t,n){return $e(e,function(e){return 0===n&&!e.categoryAxis||e.categoryAxis===t})}function R(){this._defaultPrevented=!0}function P(e,t){var n=(t||"").toLowerCase(),i=e.event,o="none"===n&&!(i.ctrlKey||i.shiftKey||i.altKey)||i[n+"Key"];return o}function z(e){var t,n,i={};for(t=0;tzo?ae:r<0?fe:de,n=Math.abs(o)1?r:r[0]}function q(e,t){var n,i,o,r=e.series,a=r.length,s=e.seriesDefaults,l=Me({},e.seriesDefaults),d=t?Me({},t.seriesDefaults):{},c=Me({},d);for(G(l),G(c),n=0;n0?[n[0]]:[],r=1;r0&&(i=ht.sum(e)/t),i},first:function(e){var t,n,i=e.length;for(t=0;t=0&&(this.valueGetter=this.createValueGetter(t,n),s=this.getStandardError(l,this.getAverage(l)),this.globalRange=function(e){return{low:e-s,high:e+s}})},createValueGetter:function(e,t){var n,i,o,r=e.data,a=pt.current,s=a.valueFields(e),l=be(r[0])?r[0]:{};return ke(l)?(i=t?s.indexOf(t):0,n=we("["+i+"]")):te(l)?n=we():typeof l===ne.OBJECT&&(o=a.sourceFields(e,s),n=we(o[s.indexOf(t)])),n},getErrorRange:function(e,t){var n,i,o,r;if(!be(t))return null;if(this.globalRange)return this.globalRange(e);if(ke(t))n=e-t[0],i=e+t[1];else if(te(o=parseFloat(t)))n=e-o,i=e+o;else{if(!(o=mt.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,a=e.length,s=n?t.count-1:t.count,l=0;for(i=0;i0)return e.value/o}return e.value},plotRange:function(e,t){var n,i,o,r,a,s,l,d,c,u,h,p,f,g=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,a=!1,s=0;s=0&&o||u<0&&!o)&&(r+=u,i+=u,a=!0,g.options.isStacked100&&(i=Math.min(i,1)))}return a&&(r-=t),[r,i]}return h=e.series,p=this.seriesValueAxis(h),f=this.categoryAxisCrossingValue(p),[f,Z.convertableToNumber(e.value)?e.value:f]},stackLimits:function(e,t){var n,i,o,r,a,s=this,l=ie,d=oe;for(n=0;n0&&(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,a=n.series,s=n.seriesIx,l=this.categoryPoints[r];l||(this.categoryPoints[r]=l=[]),i=this.seriesPoints[s],i||(this.seriesPoints[s]=i=[]),o=this.createPoint(t,n),o&&(e.extend(o,n),o.owner=this,o.noteText=t.fields.noteText,be(o.dataItem)||(o.dataItem=a.data[r]),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,i,r,a){var s,l={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},d=this._evalSeries[a];return be(d)||(this._evalSeries[a]=d=o(e,{},l,!0)),s=e,d&&(s=Me({},s),o(s,{value:t,category:n,index:i,series:r,dataItem:r.data[i]},l)),s},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:ie,max:oe},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,a){var s,l,d,c=a.categoryIx,u=a.series,h=t.seriesValueAxis(u),p=i[r++],f=n[c];f||(n[c]=f=t.categorySlot(o,c,h)),p&&(s=t.plotRange(p,h.startValue()),l=t.valueSlot(h,s),l?(d=t.pointSlot(f,l),p.aboveAxis=t.aboveAxis(p,h),p.stackValue=s[1],t.options.isStacked100&&(p.percentage=t.plotValue(p)),t.reflowPoint(p,d)):p.visible=!1)}),this.reflowCategories(n),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=e},valueSlot:function(e,t){return e.getSlot(t[0],t[1],!this.options.clip)},limitPoints:function(){var e,t=this,n=this.categoryPoints,i=n[0].concat(Fe(n));for(e=0;e=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 Ce(o.x1,r.y1,o.x2,r.y2)},categorySlot:function(e,t){return e.getSlot(t)},traverseDataPoints:function(e){var t,n,i,o,a,s,l,d=this,c=this.options.series,u=r(c),h=c.length;for(t=0;t1&&(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?Rt:t||Pt},getNearestPoint:function(e,t,n){var i,o,r,a,s,l=new xe(e,t),d=this.seriesPoints[n],c=ie;for(o=0;o0&&n.visible!==!1&&this.createStroke({stroke:Me({color:i,opacity:e.opacity,lineCap:"butt"},n)})},strokeSegments:function(){var e=this._strokeSegments;return e||(e=this._strokeSegments=this.createStrokeSegments()),e},createStrokeSegments:function(){return this.segmentsFromPoints(this.points())},stackSegments:function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},createStackSegments:function(e){return this.segmentsFromPoints(this.toGeometryPoints(e)).reverse()},segmentsFromPoints:function(e){return e.map(function(e){return new at.Segment(e)})},createStroke:function(e){var t=new tt(e);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},hasStackSegment:function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},createFill:function(e){var t,n,i=this.strokeSegments(),o=i.slice(0),r=this.hasStackSegment();r&&(t=this.stackSegments(),Ne(o,t)),n=new tt(e),n.segments.push.apply(n.segments,o),!r&&i.length>1&&this.fillToAxes(n),this.visual.append(n)},fillToAxes:function(e){var t=this.parent,n=t.options.invertAxes,i=t.seriesValueAxis(this.series),o=t.categoryAxisCrossingValue(i),r=i.getSlot(o,o,!0),a=this.strokeSegments(),s=a[0].anchor(),l=Fe(a).anchor(),d=n?r.x1:r.y1;n?e.lineTo(d,l.y).lineTo(d,s.y):e.lineTo(l.x,d).lineTo(s.x,d)}}),hi=ui.extend({createStrokeSegments:function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},createStackSegments:function(e){return this.segmentsFromPoints(this.calculateStepPoints(e)).reverse()}}),Me(hi.prototype,oi),pi=ui.extend({createStrokeSegments:function(){var e=new He(this.options.closed),t=this.points();return e.process(t)},createStackSegments:function(){var e,t,n=this.strokeSegments(),i=[];for(e=n.length-1;e>=0;e--)t=n[e],i.push(new at.Segment(t.anchor(),t.controlOut(),t.controlIn()));return i}}),fi=ci.extend({createSegment:function(e,t,n,i){var o,r,a,s,l=this.options.isStacked,d=(t.line||{}).style;return l&&n>0&&i&&(a=this.seriesMissingValues(t),"gap"!==a?(r=i.linePoints,o=i):r=this._gapStackPoints(e,n,d)),new(s=d===Nt?hi:d===Ht?pi:ui)(e,t,n,o,r)},reflow:function(e){var t,n,i,o,r=this;if(ci.fn.reflow.call(this,e),t=this._stackPoints)for(n=0;n