/* * Kendo UI Complete v2013.3.1119 (http://kendoui.com) * Copyright 2013 Telerik AD. All rights reserved. * * Kendo UI Complete commercial licenses may be obtained at * https://www.kendoui.com/purchase/license-agreement/kendo-ui-complete-commercial.aspx * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(define){return define([],function(){!function(e,t,n){function i(){}function a(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?"+e("+i+")+":";"+e+";o+="}function r(e,t,n){return e+="",t=t||2,n=t-e.length,n?P[t].substring(0,n)+e:e}function o(t,n){var i,a,r,o,s,l,d,c,u,p,f,h,m,g=_t.browser,v="rtl"==t.css("direction");return t.parent().hasClass("k-animation-container")?(h=t.parent(".k-animation-container"),m=h[0].style,h.is(":hidden")&&h.show(),i=kt.test(m.width)||kt.test(m.height),i||h.css({width:t.outerWidth(),height:t.outerHeight(),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})):(a=t.css(ct.support.transitions.css+"box-shadow")||t.css("box-shadow"),r=a?a.match(yt)||[0,0,0,0,0]:[0,0,0,0,0],o=gt.max(+r[3],+(r[4]||0)),s=-r[1]+o,l=+r[1]+o,d=+r[2]+o,c=t[0].style.width,u=t[0].style.height,p=kt.test(c),f=kt.test(u),g.opera&&(s=l=d=5),i=p||f,!p&&(!n||n&&c)&&(c=t.outerWidth()),!f&&(!n||n&&u)&&(u=t.outerHeight()),t.wrap(e("
").addClass("k-animation-container").css({width:c,height:u,marginLeft:s*(v?1:-1),paddingLeft:s,paddingRight:l,paddingBottom:d})),i&&t.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),g.msie&>.floor(g.version)<=7&&(t.css({zoom:1}),t.children(".k-menu").width(t.width())),t.parent()}function s(e){var t=1,n=arguments.length;for(t=1;n>t;t++)l(e,arguments[t]);return e}function l(e,t){var n,i,a,r,o=ct.data.ObservableArray,s=ct.data.DataSource;for(n in t)i=t[n],a=typeof i,a===St&&null!==i&&i.constructor!==Array&&i.constructor!==o&&i.constructor!==s?i instanceof Date?e[n]=new Date(i.getTime()):(r=e[n],e[n]=typeof r===St?r||{}:{},l(e[n],i)):a!==Et&&(e[n]=i);return e}function d(e,t,i){for(var a in t)if(t.hasOwnProperty(a)&&t[a].test(e))return a;return i!==n?i:e}function c(e){return e.replace(/([a-z][A-Z])/g,function(e){return e.charAt(0)+"-"+e.charAt(1).toLowerCase()})}function u(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})}function p(t,n){var i,a={};return document.defaultView&&document.defaultView.getComputedStyle?(i=document.defaultView.getComputedStyle(t,""),n&&e.each(n,function(e,t){a[t]=i.getPropertyValue(t)})):(i=t.currentStyle,n&&e.each(n,function(e,t){a[t]=i[u(t)]})),ct.size(a)||(a=i),a}function f(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n}function h(e,t,n){var i,a,r,o;return t||(t="offset"),i=e[t](),a=_t.mobileOS,_t.touch&&a.ios&&a.flatVersion<410&&(r="offset"==t?i:e.offset(),o=i.left==r.left&&i.top==r.top)?{top:i.top-window.scrollY,left:i.left-window.scrollX}:(!ct.support.pointers&&!ct.support.msPointers||n||(i.top-=window.pageYOffset-document.documentElement.scrollTop,i.left-=window.pageXOffset-document.documentElement.scrollLeft),i)}function m(e){var t={};return pt("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function g(e){return new ct.effects.Element(e)}function v(e,t,n,i){return typeof e===Ct&&(F(t)&&(i=t,t=400,n=!1),F(n)&&(i=n,n=!1),typeof t===Ft&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:i}),ut({effects:{},duration:400,reverse:!1,init:mt,teardown:mt,hide:!1},e,{completeCallback:e.complete,complete:mt})}function _(t,n,i,a,r){for(var o,s=0,l=t.length;l>s;s++)o=e(t[s]),o.queue(function(){L.promise(o,v(n,i,a,r))});return t}function k(e,t,n,i,a,r){return L.transitionPromise(e,t,v(n,i,a,r))}function b(e,t,n,i){return t&&(t=t.split(" "),pt(t,function(t,n){e.toggleClass(n,i)})),e}function y(e){return(""+e).replace(V,"&").replace(W,"<").replace(U,">")}function w(e,i){var a;return 0===i.indexOf("data")&&(i=i.substring(4),i=i.charAt(0).toLowerCase()+i.substring(1)),i=i.replace(J,"-$1"),a=e.getAttribute("data-"+ct.ns+i),null===a?a=n:"null"===a?a=null:"true"===a?a=!0:"false"===a?a=!1:wt.test(a)?a=parseFloat(a):K.test(a)&&!Q.test(a)&&(a=t("("+a+")")),a}function x(t,i){var a,r,o={};for(a in i)r=w(t,a),r!==n&&($.test(a)&&(r=ct.template(e("#"+r).html())),o[a]=r);return o}function C(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&T(e)}function T(t){return!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")||e.expr.filters.hidden(this)}).length}function S(e,t){return new S.fn.init(e,t)}var D,F,E,z,H,A,M,I,R,N,O,P,B,L,V,W,U,q,j,G,Y,$,K,Q,J,X,Z,et,tt,nt,it,at,rt,ot,st,lt,dt,ct=window.kendo=window.kendo||{cultures:{}},ut=e.extend,pt=e.each,ft=e.isArray,ht=e.proxy,mt=e.noop,gt=Math,vt=window.JSON||{},_t={},kt=/%/,bt=/\{(\d+)(:[^\}]+)?\}/g,yt=/(\d+?)px\s*(\d+?)px\s*(\d+?)px\s*(\d+?)?/i,wt=/^(\+|-?)\d+(\.?)\d*$/,xt="function",Ct="string",Tt="number",St="object",Dt="null",Ft="boolean",Et="undefined",zt={},Ht={},At=[].slice,Mt=window.Globalize;ct.version="2013.3.1119",i.extend=function(e){var t,n,i=function(){},a=this,r=e&&e.init?e.init:function(){a.apply(this,arguments)};i.prototype=a.prototype,n=r.fn=r.prototype=new i;for(t in e)n[t]=typeof e[t]!==St||e[t]instanceof Array||null===e[t]?e[t]:ut(!0,{},i.prototype[t],e[t]);return n.constructor=r,r.extend=a.extend,r},i.prototype._initOptions=function(e){this.options=s({},this.options,e)},F=ct.isFunction=function(e){return"function"==typeof e},E=function(){this._defaultPrevented=!0},z=function(){return this._defaultPrevented===!0},H=i.extend({init:function(){this._events={}},bind:function(e,t,i){var a,r,o,s,l,d=this,c=typeof e===Ct?[e]:e,u=typeof t===xt;if(t===n){for(a in e)d.bind(a,e[a]);return d}for(a=0,r=c.length;r>a;a++)e=c[a],s=u?t:t[e],s&&(i&&(o=s,s=function(){d.unbind(e,s),o.apply(d,arguments)}),l=d._events[e]=d._events[e]||[],l.push(s));return d},one:function(e,t){return this.bind(e,t,!0)},first:function(e,t){var n,i,a,r,o=this,s=typeof e===Ct?[e]:e,l=typeof t===xt;for(n=0,i=s.length;i>n;n++)e=s[n],a=l?t:t[e],a&&(r=o._events[e]=o._events[e]||[],r.unshift(a));return o},trigger:function(e,t){var n,i,a=this,r=a._events[e];if(r){for(t=t||{},t.sender=a,t._defaultPrevented=!1,t.preventDefault=E,t.isDefaultPrevented=z,r=r.slice(),n=0,i=r.length;i>n;n++)r[n].call(a,t);return t._defaultPrevented===!0}return!1},unbind:function(e,t){var i,a=this,r=a._events[e];if(e===n)a._events={};else if(r)if(t)for(i=r.length-1;i>=0;i--)r[i]===t&&r.splice(i,1);else a._events[e]=[];return a}}),A=/^\w+/,M=/\$\{([^}]*)\}/g,I=/\\\}/g,R=/__CURLY__/g,N=/\\#/g,O=/__SHARP__/g,P=["","0","00","000","0000"],D={paramName:"data",useWithBlock:!0,render:function(e,t){var n,i,a="";for(n=0,i=t.length;i>n;n++)a+=e(t[n]);return a},compile:function(t,n){var i,r,o,s=ut({},this,n),l=s.paramName,d=l.match(A)[0],c=s.useWithBlock,u="var o,e=kendo.htmlEncode;";if(F(t))return 2===t.length?function(n){return t(e,{data:n}).join("")}:t;for(u+=c?"with("+l+"){":"",u+="o=",r=t.replace(I,"__CURLY__").replace(M,"#=e($1)#").replace(R,"}").replace(N,"__SHARP__").split("#"),o=0;os;s++)p[s]=t(s,m)||Dt;return c=0===p.length?"[]":n?"[\n"+n+p.join(",\n"+n)+"\n"+h+"]":"["+p.join(",")+"]",n=h,c}if(a&&typeof a===St)for(u=a.length,s=0;u>s;s++)typeof a[s]===Ct&&(d=a[s],c=t(d,m),c&&p.push(e(d)+(n?": ":":")+c));else for(d in m)Object.hasOwnProperty.call(m,d)&&(c=t(d,m),c&&p.push(e(d)+(n?": ":":")+c));return c=0===p.length?"{}":n?"{\n"+n+p.join(",\n"+n)+"\n"+h+"}":"{"+p.join(",")+"}",n=h,c}}var n,i,a,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l={}.toString;typeof Date.prototype.toJSON!==xt&&(Date.prototype.toJSON=function(){var e=this;return isFinite(e.valueOf())?r(e.getUTCFullYear(),4)+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),typeof vt.stringify!==xt&&(vt.stringify=function(e,r,o){var s;if(n="",i="",typeof o===Tt)for(s=0;o>s;s+=1)i+=" ";else typeof o===Ct&&(i=o);if(a=r,r&&typeof r!==xt&&(typeof r!==St||typeof r.length!==Tt))throw Error("JSON.stringify");return t("",{"":e})})}(),function(){function e(e){if(e){if(e.numberFormat)return e;if(typeof e===Ct){var t=ct.cultures;return t[e]||t[e.split("-")[0]]||null}return null}return null}function t(t){return t&&(t=e(t)),t||ct.cultures.current}function i(e){e.groupSizes=e.groupSize,e.percent.groupSizes=e.percent.groupSize,e.currency.groupSizes=e.currency.groupSize}function a(e,i,a){a=t(a);var o=a.calendars.standard,s=o.days,l=o.months;return i=o.patterns[i]||i,i.replace(d,function(t){var i;return"d"===t?i=e.getDate():"dd"===t?i=r(e.getDate()):"ddd"===t?i=s.namesAbbr[e.getDay()]:"dddd"===t?i=s.names[e.getDay()]:"M"===t?i=e.getMonth()+1:"MM"===t?i=r(e.getMonth()+1):"MMM"===t?i=l.namesAbbr[e.getMonth()]:"MMMM"===t?i=l.names[e.getMonth()]:"yy"===t?i=r(e.getFullYear()%100):"yyyy"===t?i=r(e.getFullYear(),4):"h"===t?i=e.getHours()%12||12:"hh"===t?i=r(e.getHours()%12||12):"H"===t?i=e.getHours():"HH"===t?i=r(e.getHours()):"m"===t?i=e.getMinutes():"mm"===t?i=r(e.getMinutes()):"s"===t?i=e.getSeconds():"ss"===t?i=r(e.getSeconds()):"f"===t?i=gt.floor(e.getMilliseconds()/100):"ff"===t?i=gt.floor(e.getMilliseconds()/10):"fff"===t?i=e.getMilliseconds():"tt"===t&&(i=e.getHours()<12?o.AM[0]:o.PM[0]),i!==n?i:t.slice(1,t.length-1)})}function o(e,i,a){a=t(a);var r,o,l,d,k,b,y,w,x,C,T,S,D,F,E,z,H,A,M,I,R,N,O,P=a.numberFormat,B=P.groupSize[0],L=P[m],V=P[h],W=P.decimals,U=P.pattern[0],q=[],j=0>e,G=f,Y=f,$=-1;if(e===n)return f;if(!isFinite(e))return e;if(!i)return a.name.length?e.toLocaleString():""+e;if(k=c.exec(i)){if(i=k[1].toLowerCase(),o="c"===i,l="p"===i,(o||l)&&(P=o?P.currency:P.percent,B=P.groupSize[0],L=P[m],V=P[h],W=P.decimals,r=P.symbol,U=P.pattern[j?0:1]),d=k[2],d&&(W=+d),"e"===i)return d?e.toExponential(W):e.toExponential();if(l&&(e*=100),e=s(e,W),e=e.split(h),b=e[0],y=e[1],j&&(b=b.substring(1)),Y=b,w=b.length,w>=B)for(Y=f,C=0;w>C;C++)C>0&&0===(w-C)%B&&(Y+=L),Y+=b.charAt(C);if(y&&(Y+=V+y),"n"===i&&!j)return Y;for(e=f,C=0,T=U.length;T>C;C++)S=U.charAt(C),e+="n"===S?Y:"$"===S||"%"===S?r:S;return e}if(j&&(e=-e),(i.indexOf("'")>-1||i.indexOf('"')>-1||i.indexOf("\\")>-1)&&(i=i.replace(u,function(e){var t=e.charAt(0).replace("\\",""),n=e.slice(1).replace(t,"");return q.push(n),_})),i=i.split(";"),j&&i[1])i=i[1],F=!0;else if(0===e){if(i=i[2]||i[0],-1==i.indexOf(g)&&-1==i.indexOf(v))return i}else i=i[0];if(I=i.indexOf("%"),R=i.indexOf("$"),l=-1!=I,o=-1!=R,l&&(e*=100),o&&"\\"===i[R-1]&&(i=i.split("\\").join(""),o=!1),(o||l)&&(P=o?P.currency:P.percent,B=P.groupSize[0],L=P[m],V=P[h],W=P.decimals,r=P.symbol),D=i.indexOf(m)>-1,D&&(i=i.replace(p,f)),E=i.indexOf(h),T=i.length,-1!=E?(y=(""+e).split("e"),y=y[1]?s(e,Math.abs(y[1])):y[0],y=y.split(h)[1]||f,H=i.lastIndexOf(v)-E,z=i.lastIndexOf(g)-E,A=H>-1,M=z>-1,C=y.length,A||M||(i=i.substring(0,E)+i.substring(E+1),T=i.length,E=-1,C=0),A&&H>z?C=H:z>H&&(M&&C>z?C=z:A&&H>C&&(C=H)),C>-1&&(e=s(e,C))):e=s(e),z=i.indexOf(g),N=H=i.indexOf(v),$=-1==z&&-1!=H?H:-1!=z&&-1==H?z:z>H?H:z,z=i.lastIndexOf(g),H=i.lastIndexOf(v),O=-1==z&&-1!=H?H:-1!=z&&-1==H?z:z>H?z:H,$==T&&(O=$),-1!=$){if(Y=(""+e).split(h),b=Y[0],y=Y[1]||f,w=b.length,x=y.length,D)if(w===B&&E-N>w)b=L+b;else if(w>B){for(Y=f,C=0;w>C;C++)C>0&&0===(w-C)%B&&(Y+=L),Y+=b.charAt(C);b=Y}for(e=i.substring(0,$),j&&!F&&(e+="-"),C=$;T>C;C++){if(S=i.charAt(C),-1==E){if(w>O-C){e+=b;break}}else if(-1!=H&&C>H&&(G=f),w>=E-C&&E-C>-1&&(e+=b,C=E),E===C){e+=(y?V:f)+y,C+=O-E+1;continue}S===v?(e+=S,G=S):S===g&&(e+=G)}if(O>=$&&(e+=i.substring(O+1)),o||l){for(Y=f,C=0,T=e.length;T>C;C++)S=e.charAt(C),Y+="$"===S||"%"===S?r:S;e=Y}if(T=q.length)for(C=0;T>C;C++)e=e.replace(_,q[C])}return e}var s,l,d=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|"[^"]*"|'[^']*'/g,c=/^(n|c|p|e)(\d*)$/i,u=/(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,p=/\,/g,f="",h=".",m=",",g="#",v="0",_="??",k="en-US",b={}.toString;ct.cultures["en-US"]={name:k,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"$"}},calendars:{standard:{days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December"],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",F:"dddd, MMMM dd, yyyy h:mm:ss tt",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",m:"MMMM dd",M:"MMMM dd",s:"yyyy'-'MM'-'ddTHH':'mm':'ss",t:"h:mm tt",T:"h:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":"/",":":":",firstDay:0,twoDigitYearMax:2029}}},ct.culture=function(t){var a,r=ct.cultures;return t===n?r.current:(a=e(t)||r[k],a.calendar=a.calendars.standard,r.current=a,Mt&&i(a.numberFormat),n)},ct.findCulture=e,ct.getCulture=t,ct.culture(k),s=function(e,t){var n=Math.pow(10,t||0);return(Math.round(e*n)/n).toFixed(t)},l=function(e,t,i){if(t){if("[object Date]"===b.call(e))return a(e,t,i);if(typeof e===Tt)return o(e,t,i)}return e!==n?e:""},Mt&&(l=ht(Mt.format,Mt)),ct.format=function(e){var t=arguments;return e.replace(bt,function(e,n,i){var a=t[parseInt(n,10)+1];return l(a,i?i.substring(1):"")})},ct._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},ct._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},ct._round=s,ct.toString=l}(),function(){function t(e,t,n){return!(e>=t&&n>=e)}function i(e){return e.charAt(0)}function a(t){return e.map(t,i)}function r(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}function o(e){for(var t=0,n=e.length,i=[];n>t;t++)i[t]=(e[t]+"").toLowerCase();return i}function s(e){var t,n={};for(t in e)n[t]=o(e[t]);return n}function l(e,i,o){if(!e)return null;var l,d,c,f,h,g,v,_,k,b,y,w,x,C=function(e){for(var t=0;i[N]===e;)t++,N++;return t>0&&(N-=1),t},T=function(t){var n=m[t]||RegExp("^\\d{1,"+t+"}"),i=e.substr(O,t).match(n);return i?(i=i[0],O+=i.length,parseInt(i,10)):null},S=function(t,n){for(var i,a,r,o=0,s=t.length;s>o;o++)if(i=t[o],a=i.length,r=e.substr(O,a),n&&(r=r.toLowerCase()),r==i)return O+=a,o+1;return null},D=function(){var t=!1;return e.charAt(O)===i[N]&&(O++,t=!0),t},F=o.calendars.standard,E=null,z=null,H=null,A=null,M=null,I=null,R=null,N=0,O=0,P=!1,B=new Date,L=F.twoDigitYearMax||2029,V=B.getFullYear();for(i||(i="d"),f=F.patterns[i],f&&(i=f),i=i.split(""),c=i.length;c>N;N++)if(l=i[N],P)"'"===l?P=!1:D();else if("d"===l){if(d=C("d"),F._lowerDays||(F._lowerDays=s(F.days)),H=3>d?T(2):S(F._lowerDays[3==d?"namesAbbr":"names"],!0),null===H||t(H,1,31))return null}else if("M"===l){if(d=C("M"),F._lowerMonths||(F._lowerMonths=s(F.months)),z=3>d?T(2):S(F._lowerMonths[3==d?"namesAbbr":"names"],!0),null===z||t(z,1,12))return null;z-=1}else if("y"===l){if(d=C("y"),E=T(d),null===E)return null;2==d&&("string"==typeof L&&(L=V+parseInt(L,10)),E=V-V%100+E,E>L&&(E-=100))}else if("h"===l){if(C("h"),A=T(2),12==A&&(A=0),null===A||t(A,0,11))return null}else if("H"===l){if(C("H"),A=T(2),null===A||t(A,0,23))return null}else if("m"===l){if(C("m"),M=T(2),null===M||t(M,0,59))return null}else if("s"===l){if(C("s"),I=T(2),null===I||t(I,0,59))return null}else if("f"===l){if(d=C("f"),R=T(d),null!==R&&d>3&&(R=parseInt((""+R).substring(0,3),10)),null===R||t(R,0,999))return null}else if("t"===l){if(d=C("t"),k=F.AM,b=F.PM,1===d&&(k=a(k),b=a(b)),h=S(b),!h&&!S(k))return null}else if("z"===l){if(g=!0,d=C("z"),"Z"===e.substr(O,1)){if(!v)return null;D();continue}if(_=e.substr(O,6).match(d>2?p:u),!_)return null;if(_=_[0],O=_.length,_=_.split(":"),y=parseInt(_[0],10),t(y,-12,13))return null;if(d>2&&(w=parseInt(_[1],10),isNaN(w)||t(w,0,59)))return null}else if("T"===l)v=D();else if("'"===l)P=!0,D();else if(!D())return null;return x=null!==A||null!==M||I||null,null===E&&null===z&&null===H&&x?(E=V,z=B.getMonth(),H=B.getDate()):(null===E&&(E=V),null===H&&(H=1)),h&&12>A&&(A+=12),g?(y&&(A+=-y),w&&(M+=-w),e=new Date(Date.UTC(E,z,H,A,M,I,R))):(e=new Date(E,z,H,A,M,I,R),r(e,A)),100>E&&e.setFullYear(E),e.getDate()!==H&&g===n?null:e}var d=/\u00A0/g,c=/[eE][\-+]?[0-9]+/,u=/[+|\-]\d{1,2}/,p=/[+|\-]\d{1,2}:\d{2}/,f=/^\/Date\((.*?)\)\/$/,h=["G","g","d","F","D","y","m","T","t"],m={2:/^\d{1,2}/,4:/^\d{4}/},g={}.toString;ct.parseDate=function(e,t,n){if("[object Date]"===g.call(e))return e;var i,a,r=0,o=null;if(e&&0===e.indexOf("/D")&&(o=f.exec(e)))return new Date(parseInt(o[1],10));if(n=ct.getCulture(n),!t){for(t=[],a=n.calendar.patterns,i=h.length;i>r;r++)t[r]=a[h[r]];r=0,t.push("yyyy/MM/dd HH:mm:ss","yyyy/MM/dd HH:mm","yyyy/MM/dd","ddd MMM dd yyyy HH:mm:ss","yyyy-MM-ddTHH:mm:ss.fffffffzzz","yyyy-MM-ddTHH:mm:ss.fffzzz","yyyy-MM-ddTHH:mm:sszzz","yyyy-MM-ddTHH:mmzzz","yyyy-MM-ddTHH:mmzz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","yyyy-MM-dd")}for(t=ft(t)?t:[t],i=t.length;i>r;r++)if(o=l(e,t[r],n))return o;return o},ct.parseInt=function(e,t){var n=ct.parseFloat(e,t);return n&&(n=0|n),n},ct.parseFloat=function(e,t,n){if(!e&&0!==e)return null;if(typeof e===Tt)return e;e=""+e,t=ct.getCulture(t);var i,a,r=t.numberFormat,o=r.percent,s=r.currency,l=s.symbol,u=o.symbol,p=e.indexOf("-");return c.test(e)?(e=parseFloat(e.replace(r["."],".")),isNaN(e)&&(e=null),e):p>0?null:(p=p>-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],""),p=!0)):e.indexOf(u)>-1&&(a=!0,r=o,l=u),e=e.replace("-","").replace(l,"").replace(d," ").split(r[","].replace(d," ")).join("").replace(r["."],"."),e=parseFloat(e),isNaN(e)?e=null:p&&(e*=-1),e&&a&&(e/=100),e)},Mt&&(ct.parseDate=function(e,t,n){return"[object Date]"===g.call(e)?e:Mt.parseDate(e,t,n)},ct.parseFloat=function(e,t){return typeof e===Tt?e:e===n||null===e?null:(e=Mt.parseFloat(e,t),isNaN(e)?null:e)})}(),function(){var t,i,a,r,o,s,l;_t.scrollbar=function(){var e,t=document.createElement("div");return t.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both",t.innerHTML=" ",document.body.appendChild(t),e=t.offsetWidth-t.scrollWidth,document.body.removeChild(t),e},_t.isRtl=function(t){return e(t).closest(".k-rtl").length>0},t=document.createElement("table");try{t.innerHTML="",_t.tbodyInnerHtml=!0}catch(c){_t.tbodyInnerHtml=!1}_t.touch="ontouchstart"in window,_t.msPointers=navigator.msPointerEnabled,_t.pointers=navigator.pointerEnabled,i=_t.transitions=!1,a=_t.transforms=!1,r="HTMLElement"in window?HTMLElement.prototype:[],_t.hasHW3D="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix||"MozPerspective"in document.documentElement.style||"msPerspective"in document.documentElement.style,pt(["Moz","webkit","O","ms"],function(){var e,r=""+this,o=typeof t.style[r+"Transition"]===Ct;return o||typeof t.style[r+"Transform"]===Ct?(e=r.toLowerCase(),a={css:"ms"!=e?"-"+e+"-":"",prefix:r,event:"o"===e||"webkit"===e?e:""},o&&(i=a,i.event=i.event?i.event+"TransitionEnd":"transitionend"),!1):n}),_t.transforms=a,_t.transitions=i,_t.devicePixelRatio=window.devicePixelRatio===n?1:window.devicePixelRatio;try{_t.screenWidth=window.outerWidth||window.screen?window.screen.availWidth:window.innerWidth,_t.screenHeight=window.outerHeight||window.screen?window.screen.availHeight:window.innerHeight}catch(c){_t.screenWidth=window.screen.availWidth,_t.screenHeight=window.screen.availHeight}_t.detectOS=function(e){var t,n,i=!1,a=[],r=!/mobile safari/i.test(e),o={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+)?)/,wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},s={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,meego:/meego|ffos/},l={tablet:/playbook|ipad|fire/i},c={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,chrome:/chrome/i,webkit:/webkit/i,ie:/MSIE|Windows\sPhone/i};for(n in o)if(o.hasOwnProperty(n)&&(a=e.match(o[n]))){if("windows"==n&&"plugins"in navigator)return!1;i={},i.device=n,i.tablet=d(n,l,!1),i.browser=d(e,c,"default"),i.name=d(n,s),i[i.name]=!0,i.majorVersion=a[2],i.minorVersion=a[3].replace("_","."),t=i.minorVersion.replace(".","").substr(0,2),i.flatVersion=i.majorVersion+t+Array(3-(t.length<3?t.length:2)).join("0"),i.appMode=window.navigator.standalone||/file|local|wmapp/.test(window.location.protocol)||typeof window.PhoneGap!==Et||typeof window.cordova!==Et,i.android&&(_t.devicePixelRatio<1.5&&i.flatVersion<400||r)&&(_t.screenWidth>800||_t.screenHeight>800)&&(i.tablet=n);break}return i},o=_t.mobileOS=_t.detectOS(navigator.userAgent),_t.wpDevicePixelRatio=o.wp?screen.width/320:0,_t.kineticScrollNeeded=o&&(_t.touch||_t.msPointers||_t.pointers),_t.hasNativeScrolling=!1,(o.ios&&o.majorVersion>4||o.android&&o.majorVersion>2||o.wp)&&(_t.hasNativeScrolling=o),_t.mouseAndTouchPresent=_t.touch&&!(_t.mobileOS.ios||_t.mobileOS.android),_t.detectBrowser=function(e){var t,n=!1,i=[],a={webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(t in a)if(a.hasOwnProperty(t)&&(i=e.match(a[t]))){n={},n[t]=!0,n[i[1].toLowerCase()]=!0,n.version=parseInt(document.documentMode||i[2],10);break}return n},_t.browser=_t.detectBrowser(navigator.userAgent),_t.zoomLevel=function(){try{return _t.touch?document.documentElement.clientWidth/window.innerWidth:_t.browser.msie&&_t.browser.version>=10?(top||window).outerWidth/(top||window).innerWidth:1}catch(e){return 1}},_t.cssBorderSpacing=n!==document.documentElement.style.borderSpacing&&!(_t.browser.msie&&_t.browser.version<8),function(t){var n,i=parseInt(t.version,10);t.msie?n="ie":t.mozilla?n="ff":t.safari?n="safari":t.webkit?n="webkit":t.opera&&(n="opera"),n&&e(document.documentElement).addClass("k-"+n+" k-"+n+i)}(_t.browser),_t.eventCapture=document.documentElement.addEventListener,s=document.createElement("input"),_t.placeholder="placeholder"in s,_t.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],n=t.length,i="test",a={},r=0;n>r;r++)e=t[r],s.setAttribute("type",e),s.value=i,a[e.replace("-","")]="text"!==s.type&&s.value!==i;return a}(),_t.stableSort=function(){var e=[0,1,2,3,4,5,6,7,8,9,10,11,12].sort(function(){return 0});return 0===e[0]&&1===e[1]&&2===e[2]&&3===e[3]&&4===e[4]&&5===e[5]&&6===e[6]&&7===e[7]&&8===e[8]&&9===e[9]&&10===e[10]&&11===e[11]&&12===e[12]}(),_t.matchesSelector=r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.matchesSelector||function(t){for(var n=document.querySelectorAll?(this.parentNode||document).querySelectorAll(t)||[]:e(t),i=n.length;i--;)if(n[i]==this)return!0;return!1},_t.pushState=window.history&&window.history.pushState,l=document.documentMode,_t.hashChange="onhashchange"in window&&!(_t.browser.msie&&(!l||8>=l))}(),B={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}},L={},e.extend(L,{Element:function(t){this.element=e(t)},promise:function(e,t){e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.hide&&e.data("olddisplay",e.css("display")).hide(),t.init&&t.init(),t.completeCallback&&t.completeCallback(e),e.dequeue()},transitionPromise:function(e,t,n){var i=ct.wrap(e);return i.append(t),e.hide(),t.show(),n.completeCallback&&n.completeCallback(e),e}}),"kendoAnimate"in e.fn||ut(e.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,n,i){return _(this,e,t,n,i)},kendoAnimateTo:function(e,t,n,i,a){return k(this,e,t,n,i,a)},kendoAddClass:function(e,t){return ct.toggleClass(this,e,t,!0)},kendoRemoveClass:function(e,t){return ct.toggleClass(this,e,t,!1)},kendoToggleClass:function(e,t,n){return ct.toggleClass(this,e,t,n)}}),V=/&/g,W=//g,q=function(e){return e.target},_t.touch&&(q=function(e){var t="originalEvent"in e?e.originalEvent.changedTouches:"changedTouches"in e?e.changedTouches:null;return t?document.elementFromPoint(t[0].clientX,t[0].clientY):e.target},pt(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,n){e.fn[n]=function(e){return this.bind(n,e)}})),_t.touch?_t.mobileOS?(_t.mousedown="touchstart",_t.mouseup="touchend",_t.mousemove="touchmove",_t.mousecancel="touchcancel",_t.click="touchend",_t.resize="orientationchange"):(_t.mousedown="mousedown touchstart",_t.mouseup="mouseup touchend",_t.mousemove="mousemove touchmove",_t.mousecancel="mouseleave touchcancel",_t.click="click",_t.resize="resize"):_t.pointers?(_t.mousemove="pointermove",_t.mousedown="pointerdown",_t.mouseup="pointerup",_t.mousecancel="pointercancel",_t.click="pointerup",_t.resize="orientationchange resize"):_t.msPointers?(_t.mousemove="MSPointerMove",_t.mousedown="MSPointerDown",_t.mouseup="MSPointerUp",_t.mousecancel="MSPointerCancel",_t.click="MSPointerUp",_t.resize="orientationchange resize"):(_t.mousemove="mousemove",_t.mousedown="mousedown",_t.mouseup="mouseup",_t.mousecancel="mouseleave",_t.click="click",_t.resize="resize"),j=function(e,t){var n,i,a,r,o=t||"d",s=1;for(i=0,a=e.length;a>i;i++)r=e[i],""!==r&&(n=r.indexOf("["),0!==n&&(-1==n?r="."+r:(s++,r="."+r.substring(0,n)+" || {})"+r.substring(n))),s++,o+=r+(a-1>i?" || {})":")"));return Array(s).join("(")+o},G=/^([a-z]+:)?\/\//i,ut(ct,{ui:ct.ui||{},fx:ct.fx||g,effects:ct.effects||L,mobile:ct.mobile||{},data:ct.data||{},dataviz:ct.dataviz||{ui:{roles:{}}},keys:{INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123},support:ct.support||_t,animate:ct.animate||_,ns:"",attr:function(e){return"data-"+ct.ns+e},wrap:o,deepExtend:s,getComputedStyles:p,size:f,toCamelCase:u,toHyphens:c,getOffset:ct.getOffset||h,parseEffects:ct.parseEffects||m,toggleClass:ct.toggleClass||b,directions:ct.directions||B,Observable:H,Class:i,Template:D,template:ht(D.compile,D),render:ht(D.render,D),stringify:ht(vt.stringify,vt),eventTarget:q,htmlEncode:y,isLocalUrl:function(e){return e&&!G.test(e)},expr:function(e,t,n){return e=e||"",typeof t==Ct&&(n=t,t=!1),n=n||"d",e&&"["!==e.charAt(0)&&(e="."+e),e=t?j(e.split("."),n):n+e},getter:function(e,t){return zt[e]=zt[e]||Function("d","return "+ct.expr(e,t))},setter:function(e){return Ht[e]=Ht[e]||Function("d,value",ct.expr(e)+"=value")},accessor:function(e){return{get:ct.getter(e),set:ct.setter(e)}},guid:function(){var e,t,n="";for(e=0;32>e;e++)t=0|16*gt.random(),(8==e||12==e||16==e||20==e)&&(n+="-"),n+=(12==e?4:16==e?8|3&t:t).toString(16);return n},roleSelector:function(e){return e.replace(/(\S+)/g,"["+ct.attr("role")+"=$1],").slice(0,-1)},triggeredByInput:function(e){return/^(label|input|textarea|select)$/i.test(e.target.tagName)},logToConsole:function(e){var t=window.console;n!==t&&t.log&&t.log(e)}}),Y=H.extend({init:function(e,t){var n=this;n.element=ct.jQuery(e).handler(n),H.fn.init.call(n),t=n.options=ut(!0,{},n.options,t),n.element.attr(ct.attr("role"))||n.element.attr(ct.attr("role"),(t.name||"").toLowerCase()),n.element.data("kendo"+t.prefix+t.name,n),n.bind(n.events,t)},events:[],options:{prefix:""},_hasBindingTarget:function(){return!!this.element[0].kendoBindingTarget},_tabindex:function(e){e=e||this.wrapper;var t=this.element,n="tabindex",i=e.attr(n)||t.attr(n);t.removeAttr(n),e.attr(n,isNaN(i)?0:i)},setOptions:function(t){for(var n,i=this,a=0,r=i.events.length;r>a;a++)n=i.events[a],i.options[n]&&t[n]&&i.unbind(n,i.options[n]);e.extend(i.options,t),i.bind(i.events,t)},resize:function(e){var t=this.getSize(),n=this._size;(e||!n||t.width!==n.width||t.height!==n.height)&&(this._resize(t),this.trigger("resize",t),this._size=t)},getSize:function(){return ct.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()}}),ct.dimensions=function(e,t){var n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}},ct.notify=mt,$=/template$/i,K=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,Q=/^\{(\d+)(:[^\}]+)?\}/,J=/([A-Z])/g,ct.initWidget=function(t,i,a){var r,o,s,l,d,c,u,p;if(a?a.roles&&(a=a.roles):a=ct.ui.roles,t=t.nodeType?t:t[0],c=t.getAttribute("data-"+ct.ns+"role"),c&&(s=-1===c.indexOf(".")?a[c]:ct.getter(c)(window))){for(p=w(t,"dataSource"),i=e.extend({},x(t,s.fn.options),i),p&&(i.dataSource=typeof p===Ct?ct.getter(p)(window):p),l=0,d=s.fn.events.length;d>l;l++)o=s.fn.events[l],u=w(t,o),u!==n&&(i[o]=ct.getter(u)(window));return r=e(t).data("kendo"+s.fn.options.prefix+s.fn.options.name),r?r.setOptions(i):r=new s(t,i),r}},ct.rolesFromNamespaces=function(e){var t,n,i=[];for(e[0]||(e=[ct.ui,ct.dataviz.ui]),t=0,n=e.length;n>t;t++)i[t]=e[t].roles;return ut.apply(null,[{}].concat(i.reverse()))},ct.init=function(t){var n=ct.rolesFromNamespaces(At.call(arguments,1));e(t).find("[data-"+ct.ns+"role]").addBack().each(function(){ct.initWidget(this,{},n)})},ct.destroy=function(t){e(t).find("[data-"+ct.ns+"role]").addBack().each(function(){var t=ct.widgetInstance(e(this));t&&t.destroy()})},ct.resize=function(t){e(t).each(function(){var t,n=e(this);(n.is(":visible")||-1!==e.inArray(n.attr("data-role"),["slider","rangeslider"]))&&(n.is("[data-"+ct.ns+"role]")&&(t=ct.widgetInstance(n),t&&t.resize()),ct.resize(n.children()))})},ct.parseOptions=x,ut(ct.ui,{Widget:Y,roles:{},progress:function(t,n){var i,a,r,o,s=t.find(".k-loading-mask"),l=ct.support,d=l.browser;n?s.length||(i=l.isRtl(t),a=i?"right":"left",o=t.scrollLeft(),r=d.webkit?i?t[0].scrollWidth-t.width()-2*o:0:0,s=e("
Loading...
").width("100%").height("100%").css("top",t.scrollTop()).css(a,Math.abs(o)+r).prependTo(t)):s&&s.remove()},plugin:function(t,i,a){var r,o=t.fn.options.name;i=i||ct.ui,a=a||"",i[o]=t,i.roles[o.toLowerCase()]=t,r="getKendo"+a+o,o="kendo"+a+o,e.fn[o]=function(i){var a,r=this;return typeof i===Ct?(a=At.call(arguments,1),this.each(function(){var t,s,l=e.data(this,o);if(!l)throw Error(ct.format("Cannot call method '{0}' of {1} before it is initialized",i,o));if(t=l[i],typeof t!==xt)throw Error(ct.format("Cannot find method '{0}' of {1}",i,o)); return s=t.apply(l,a),s!==n?(r=s,!1):n})):this.each(function(){new t(this,i)}),r},e.fn[r]=function(){return this.data(o)}}}),X={bind:function(){return this}},Z=Y.extend({init:function(e,t){Y.fn.init.call(this,e,t),this.element.autoApplyNS(),this.wrapper=this.element,this.element.addClass("km-widget")},destroy:function(){Y.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var e=this.element.closest(ct.roleSelector("view splitview modalview drawer"));return ct.widgetInstance(e,ct.mobile.ui)},container:function(){var e=this.element.closest(ct.roleSelector("view layout modalview drawer"));return ct.widgetInstance(e,ct.mobile.ui)||X}}),ut(ct.mobile,{init:function(e){ct.init(e,ct.mobile.ui,ct.ui,ct.dataviz.ui)},ui:{Widget:Z,roles:{},plugin:function(e){ct.ui.plugin(e,ct.mobile.ui,"Mobile")}}}),ct.touchScroller=function(t,n){return e(t).map(function(t,i){return i=e(i),_t.kineticScrollNeeded&&ct.mobile.ui.Scroller&&!i.data("kendoMobileScroller")?(i.kendoMobileScroller(n),i.data("kendoMobileScroller")):!1})[0]},ct.preventDefault=function(e){e.preventDefault()},ct.widgetInstance=function(t,i){var a,r=t.data(ct.ns+"role");return"content"===r&&(r="scroller"),i||(i={roles:e.extend({},ct.mobile.ui.roles,ct.dataviz.ui.roles,ct.ui.roles)}),a=i.roles[r],a?t.data("kendo"+a.fn.options.prefix+a.fn.options.name):n},ct.onResize=function(t){var n=t;return _t.mobileOS.android&&(n=function(){setTimeout(t,600)}),e(window).on(_t.resize,n),n},ct.unbindResize=function(t){e(window).off(_t.resize,t)},ct.attrValue=function(e,t){return e.data(ct.ns+t)},ct.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},e.extend(e.expr[":"],{kendoFocusable:function(t){var n=e.attr(t,"tabindex");return C(t,!isNaN(n)&&n>-1)}}),et=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],tt="label, input, [data-rel=external]",nt={setupMouseMute:function(){var t,n=0,i=et.length,a=document.documentElement;if(!nt.mouseTrap&&_t.eventCapture)for(nt.mouseTrap=!0,nt.bustClick=!1,nt.captureMouse=!1,t=function(t){nt.captureMouse&&("click"===t.type?nt.bustClick&&!e(t.target).is(tt)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};i>n;n++)a.addEventListener(et[n],t,!0)},muteMouse:function(e){nt.captureMouse=!0,e.data.bustClick&&(nt.bustClick=!0),clearTimeout(nt.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(nt.mouseTrapTimeoutID),nt.mouseTrapTimeoutID=setTimeout(function(){nt.captureMouse=!1,nt.bustClick=!1},400)}},it={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},_t.touch&&(_t.mobileOS.ios||_t.mobileOS.android)?it={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:_t.pointers?it={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:_t.msPointers&&(it={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),!_t.msPointers||"onmspointerenter"in window||e.each({MSPointerEnter:"MSPointerOver",MSPointerLeave:"MSPointerOut"},function(t,n){e.event.special[t]={delegateType:n,bindType:n,handle:function(t){var i,a=this,r=t.relatedTarget,o=t.handleObj;return(!r||r!==a&&!e.contains(a,r))&&(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=n),i}}}),at=function(e){return it[e]||e},rt=/([^ ]+)/g,ct.applyEventMap=function(e,t){return e=e.replace(rt,at),t&&(e=e.replace(rt,"$1."+t)),e},ot=e.fn.on,ut(!0,S,e),S.fn=S.prototype=new e,S.fn.constructor=S,S.fn.init=function(t,n){return n&&n instanceof e&&!(n instanceof S)&&(n=S(n)),e.fn.init.call(this,t,n,st)},S.fn.init.prototype=S.fn,st=S(document),ut(S.fn,{handler:function(e){return this.data("handler",e),this},autoApplyNS:function(e){return this.data("kendoNS",e||ct.guid()),this},on:function(){var e,t,n,i,a,r,o=this,s=o.data("kendoNS");return 1===arguments.length?ot.call(o,arguments[0]):(e=o,t=At.call(arguments),typeof t[t.length-1]===Et&&t.pop(),n=t[t.length-1],i=ct.applyEventMap(t[0],s),_t.mouseAndTouchPresent&&i.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(nt.setupMouseMute(),a=2===t.length?null:t[1],r=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,ot.call(this,{touchstart:nt.muteMouse,touchend:nt.unMuteMouse},a,{bustClick:r})),typeof n===Ct&&(e=o.data("handler"),n=e[n],t[t.length-1]=function(t){n.call(e,t)}),t[0]=i,ot.apply(o,t),o)},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),ct.jQuery=S,ct.eventMap=it,ct.timezone=function(){function e(e,t){var n,i,a,r=t[3],o=t[4],s=t[5],l=t[8];return l||(t[8]=l={}),l[e]?l[e]:(isNaN(o)?0===o.indexOf("last")?(n=new Date(Date.UTC(e,c[r]+1,1,s[0]-24,s[1],s[2],0)),i=u[o.substr(4,3)],a=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-a-(i>a?7:0))):o.indexOf(">=")>=0&&(n=new Date(Date.UTC(e,c[r],o.substr(5),s[0],s[1],s[2],0)),i=u[o.substr(0,3)],a=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-a+(a>i?7:0))):n=new Date(Date.UTC(e,c[r],o,s[0],s[1],s[2],0)),l[e]=n)}function t(t,n,i){var a,r,o;return(n=n[i])?(o=new Date(t).getUTCFullYear(),n=jQuery.grep(n,function(e){var t=e[0],n=e[1];return o>=t&&(n>=o||t==o&&"only"==n||"max"==n)}),n.push(t),n.sort(function(t,n){return"number"!=typeof t&&(t=Number(e(o,t))),"number"!=typeof n&&(n=Number(e(o,n))),t-n}),n[jQuery.inArray(t,n)-1]):(a=i.split(":"),r=0,a.length>1&&(r=60*a[0]+Number(a[1])),[-1e6,"max","-","Jan",1,[0,0,0],r,"-"])}function n(e,t,n){var i,a,r,o=t[n];if("string"==typeof o&&(o=t[o]),!o)throw Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(i=o.length-1;i>=0&&(a=o[i][3],!(a&&e>a));i--);if(r=o[i+1],!r)throw Error('Timezone "'+n+'" not found on '+e+".");return r}function i(e,i,a,r){typeof e!=Tt&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var o=n(e,i,r);return{zone:o,rule:t(e,a,o[1])}}function a(e,t){var n,a,r;return"Etc/UTC"==t||"Etc/GMT"==t?0:(n=i(e,this.zones,this.rules,t),a=n.zone,r=n.rule,r?a[0]-r[6]:a[0])}function r(e,t){var n=i(e,this.zones,this.rules,t),a=n.zone,r=n.rule,o=a[2];return o.indexOf("/")>=0?o.split("/")[r&&r[6]?1:0]:o.indexOf("%s")>=0?o.replace("%s",r&&"-"!=r[7]?r[7]:""):o}function o(e,t,n){var i,a;return typeof t==Ct&&(t=this.offset(e,t)),typeof n==Ct&&(n=this.offset(e,n)),i=e.getTimezoneOffset(),e=new Date(e.getTime()+6e4*(t-n)),a=e.getTimezoneOffset(),new Date(e.getTime()+6e4*(a-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:a,convert:o,apply:s,remove:l,abbr:r,toLocalDate:d}}(),ct.date=function(){function e(e,t){return 0===t&&23===e.getHours()?(e.setHours(e.getHours()+2),!0):!1}function t(t,n,i){var a=t.getHours();i=i||1,n=(n-t.getDay()+7*i)%7,t.setDate(t.getDate()+n),e(t,a)}function n(e,n,i){return e=new Date(e),t(e,n,i),e}function i(e){return new Date(e.getFullYear(),e.getMonth(),1)}function a(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),n=i(e),a=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return a&&t.setHours(n.getHours()+a/60),t}function r(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function o(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function s(e){return e.getTime()-r(e)}function l(e,t,n){var i,a=s(t),r=s(n);return e&&a!=r?(t>=n&&(n+=g),i=s(e),a>i&&(i+=g),a>r&&(r+=g),i>=a&&r>=i):!0}function d(e,t,n){var i,a=t.getTime(),r=n.getTime();return a>=r&&(r+=g),i=e.getTime(),i>=a&&r>=i}function c(t,n){var i=t.getHours();return t=new Date(t),u(t,n*g),e(t,i),t}function u(e,t,n){var i,a=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-a,e.setTime(e.getTime()+i*m))}function p(){return r(new Date)}function f(e){return r(e).getTime()==p().getTime()}function h(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 m=6e4,g=864e5;return{adjustDST:e,dayOfWeek:n,setDayOfWeek:t,getDate:r,isInDateRange:d,isInTimeRange:l,isToday:f,nextDay:function(e){return c(e,1)},previousDay:function(e){return c(e,-1)},toUtcTime:o,MS_PER_DAY:g,MS_PER_MINUTE:m,setTime:u,addDays:c,today:p,toInvariantTime:h,firstDayOfMonth:i,lastDayOfMonth:a,getMilliseconds:s}}(),ct.stripWhitespace=function(e){for(var 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)},lt=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},ct.animationFrame=function(e){lt.call(window,e)},dt=[],ct.queueAnimation=function(e){dt[dt.length]=e,1===dt.length&&ct.runNextAnimation()},ct.runNextAnimation=function(){var e=dt.shift();ct.animationFrame(function(){e(),lt[0]&&ct.runNextAnimation()})},ct.parseQueryStringParams=function(e){for(var t=e.split("?")[1]||"",n={},i=t.split(/&|=/),a=i.length,r=0;a>r;r+=2)""!==i[r]&&(n[decodeURIComponent(i[r])]=decodeURIComponent(i[r+1]));return n}}(jQuery,eval),"undefined"==typeof kendo_module&&(kendo_module=function(){}),function(e){function t(e,t){if(!t)return e;e+"/"===t&&(e=t);var n=RegExp("^"+t,"i");return n.test(e)||(e=t+"/"+e),s.protocol+"//"+(s.host+"/"+e).replace(/\/\/+/g,"/")}function n(e,t){return 0===t.indexOf(e)?t.substr(e.length).replace(/\/\//g,"/"):e}var i=window.kendo,a="change",r="back",o=i.support,s=window.location,l=window.history,d=50,c=/^#*/,u=window.document,p=i.Class.extend({init:function(e){this.root=e},navigate:function(e){return l.pushState({},u.title,t(e,this.root)),this.current()},current:function(){var e=s.pathname;return s.search&&(e+=s.search),n(this.root,e)},change:function(t){e(window).bind("popstate.kendo",t)},stop:function(){e(window).unbind("popstate.kendo")}}),f=i.Class.extend({navigate:function(e){return s.hash=e,e},change:function(t){o.hashChange?e(window).bind("hashchange.kendo",t):this._interval=setInterval(t,d)},stop:function(){e(window).unbind("popstate.kendo"),clearInterval(this._interval)},current:function(){return s.hash.replace(c,"")}}),h=i.Observable.extend({start:function(i){var d,h,m,g,v,_;if(i=i||{},this.bind([a,r],i),!this._started){if(this._started=!0,d=s.pathname,h=s.hash,m=o.pushState&&i.pushState,g=i.root||"/",v=g===d,this.adapter=m?new p(g):new f,i.pushState&&!o.pushState&&!v)return s.replace(g+"#"+n(g,d)),!0;m&&(g===d+"/"&&(_=g),v&&h&&(_=t(h.replace(c,""),g)),_&&l.replaceState({},u.title,_)),this.root=g,this.current=this.adapter.current(),this.locations=[this.current],this.adapter.change(e.proxy(this,"_checkUrl"))}},stop:function(){this._started&&(this.adapter.stop(),this.unbind(a),this._started=!1)},change:function(e){this.bind(a,e)},navigate:function(e,t){return"#:back"===e?(l.back(),undefined):(e=e.replace(c,""),this.current!==e&&this.current!==decodeURIComponent(e)&&(t||!this.trigger(a,{url:e}))&&(this.current=this.adapter.navigate(e),this.locations.push(this.current)),undefined)},_checkUrl:function(){var e=this.adapter.current(),t=e===this.locations[this.locations.length-2],n=this.current;if(this.current!==e&&this.current!==decodeURIComponent(e))return this.current=e,t&&this.trigger("back",{url:n,to:e})?(l.forward(),this.current=n,undefined):this.trigger(a,{url:e})?(t?l.forward():l.back(),this.current=n,undefined):(t?this.locations.pop():this.locations.push(e),undefined)}});i.absoluteURL=t,i.history=new h}(window.kendo.jQuery),function(){function e(e,t){return t?e:"([^/]+)"}function t(t){return RegExp("^"+t.replace(f,"\\$&").replace(c,"(?:$1)?").replace(u,e).replace(p,"(.*?)")+"$")}function n(e){return e.replace(/(\?.*)|(#.*)/g,"")}var i=window.kendo,a=i.history,r=i.Observable,o="init",s="routeMissing",l="change",d="back",c=/\((.*?)\)/g,u=/(\(\?)?:\w+/g,p=/\*\w+/g,f=/[\-{}\[\]+?.,\\\^$|#\s]/g,h=i.Class.extend({init:function(e,n){e instanceof RegExp||(e=t(e)),this.route=e,this._callback=n},callback:function(e){var t,a,r=0,o=i.parseQueryStringParams(e);for(e=n(e),t=this.route.exec(e).slice(1),a=t.length;a>r;r++)void 0!==t[r]&&(t[r]=decodeURIComponent(t[r]));t.push(o),this._callback.apply(null,t)},worksWith:function(e){return this.route.test(e)?(this.callback(e),!0):!1}}),m=r.extend({init:function(e){r.fn.init.call(this),this.routes=[],this.pushState=e?e.pushState:!1,e&&e.root&&(this.root=e.root),this.bind([o,s,l],e)},destroy:function(){a.unbind(l,this._urlChangedProxy),a.unbind(d,this._backProxy),this.unbind()},start:function(){var e,t=this,n=function(e){t._back(e)},i=function(e){t._urlChanged(e)};a.start({change:i,back:n,pushState:t.pushState,root:t.root}),e={url:a.current||"/"},t.trigger(o,e)||t._urlChanged(e),this._urlChangedProxy=i,this._backProxy=n},route:function(e,t){this.routes.push(new h(e,t))},navigate:function(e,t){i.history.navigate(e,t)},_back:function(e){this.trigger(d,{url:e.url,to:e.to})&&e.preventDefault()},_urlChanged:function(e){var t,n,a,r,o=e.url;if(o||(o="/"),this.trigger(l,{url:e.url,params:i.parseQueryStringParams(e.url)}))return e.preventDefault(),void 0;for(n=0,a=this.routes,r=a.length;r>n;n++)if(t=a[n],t.worksWith(o))return;this.trigger(s,{url:o,params:i.parseQueryStringParams(o)})&&e.preventDefault()}});i.Router=m}(),function(e){var t=window.kendo,n=t.Observable,i="SCRIPT",a="init",r="show",o="hide",s=/unrecognized expression/,l=n.extend({init:function(e,t){var i=this;t=t||{},n.fn.init.call(i),i.content=e,i.tagName=t.tagName||"div",i.model=t.model,i._wrap=t.wrap!==!1,i.bind([a,r,o],t)},render:function(n){var i=this,o=!i.element;return o&&(i.element=i._createElement()),n&&e(n).append(i.element),o&&(t.bind(i.element,i.model),i.trigger(a)),n&&i.trigger(r),i.element},hide:function(){this.element.detach(),this.trigger(o)},destroy:function(){var e=this.element;e&&(t.unbind(e),t.destroy(e),e.remove())},_createElement:function(){var t,n,a=this;try{n=e(document.getElementById(a.content)||a.content)}catch(r){s.test(r.message)&&(n=a.content)}return t=e("<"+a.tagName+" />").append(n[0].tagName===i?n.html():n),a._wrap||(t=t.contents()),t}}),d=l.extend({init:function(e,t){l.fn.init.call(this,e,t),this.regions={}},showIn:function(e,t){var n=this.regions[e];n&&n.hide(),t.render(this.render().find(e),n),this.regions[e]=t}});t.Layout=d,t.View=l}(window.kendo.jQuery),function(e,t){function n(e){return parseInt(e,10)}function i(e,t){return n(e.css(t))}function a(e){var t=e.effects;return"zoom"===t&&(t="zoom:in fade:in"),"fade"===t&&(t="fade:in"),"slide"===t&&(t="tile:left"),/^slide:(.+)$/.test(t)&&(t="tile:"+RegExp.$1),"overlay"===t&&(t="slideIn:left"),/^overlay:(.+)$/.test(t)&&(t="slideIn:"+RegExp.$1),e.effects=x.parseEffects(t),ut&&"tile:left"==t&&(e.previousDivisor=3),e}function r(e){var t,n=[];for(t in e)n.push(t);return n}function o(e){for(var t in e)-1!=V.indexOf(t)&&-1==W.indexOf(t)&&delete e[t];return e}function s(e,t){var n,i,a,r,o=[],s={};for(i in t)n=i.toLowerCase(),r=z&&-1!=V.indexOf(n),!F.hasHW3D&&r&&-1==W.indexOf(n)?delete t[i]:(a=t[i],r?o.push(i+"("+a+")"):s[i]=a);return o.length&&(s[ot]=o.join(" ")),s}function l(e,t){var i,a,r;return z?(i=e.css(ot),i==$?"scale"==t?1:0:(a=i.match(RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),r=0,a?r=n(a[1]):(a=i.match(R)||[0,0,0,0,0],t=t.toLowerCase(),O.test(t)?r=parseFloat(a[3]/a[2]):"translatey"==t?r=parseFloat(a[4]/a[2]):"scale"==t?r=parseFloat(a[2]):"rotate"==t&&(r=parseFloat(Math.atan2(a[2],a[1])))),r)):parseFloat(e.css(t))}function d(e){return e.charAt(0).toUpperCase()+e.substring(1)}function c(e,t){var n=m.extend(t),i=n.prototype.directions;C[d(e)]=n,C.Element.prototype[e]=function(e,t,i,a){return new n(this.element,e,t,i,a)},T(i,function(t,i){C.Element.prototype[e+d(i)]=function(e,t,a){return new n(this.element,i,e,t,a)}})}function u(e,n,i,a){c(e,{directions:v,startValue:function(e){return this._startValue=e,this},endValue:function(e){return this._endValue=e,this},shouldHide:function(){return this._shouldHide},prepare:function(e,r){var o,s,l=this,d="out"===this._direction,c=l.element.data(n),u=!(isNaN(c)||c==i);o=u?c:t!==this._startValue?this._startValue:d?i:a,s=t!==this._endValue?this._endValue:d?a:i,this._reverse?(e[n]=s,r[n]=o):(e[n]=o,r[n]=s),l._shouldHide=r[n]===a}})}function p(e,t){var n=x.directions[t].vertical,i=e[n?J:Q]()/2+"px";return k[t].replace("$size",i)}var f,h,m,g,v,_,k,b,y,w,x=window.kendo,C=x.effects,T=e.each,S=e.extend,D=e.proxy,F=x.support,E=F.browser,z=F.transforms,H=F.transitions,A={scale:0,scalex:0,scaley:0,scale3d:0},M={translate:0,translatex:0,translatey:0,translate3d:0},I=t!==document.documentElement.style.zoom&&!z,R=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,N=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,O=/translatex?$/i,P=/(zoom|fade|expand)(\w+)/,B=/(zoom|fade|expand)/,L=/[xy]$/i,V=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],W=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],U={rotate:"deg",scale:"",skew:"px",translate:"px"},q=z.css,j=Math.round,G="",Y="px",$="none",K="auto",Q="width",J="height",X="hidden",Z="origin",et="abortId",tt="overflow",nt="translate",it="position",at="completeCallback",rt=q+"transition",ot=q+"transform",st=q+"backface-visibility",lt=q+"perspective",dt="1500px",ct="perspective("+dt+")",ut=F.mobileOS&&7==F.mobileOS.majorVersion,pt={left:{reverse:"right",property:"left",transition:"translatex",vertical:!1,modifier:-1},right:{reverse:"left",property:"left",transition:"translatex",vertical:!1,modifier:1},down:{reverse:"up",property:"top",transition:"translatey",vertical:!0,modifier:1},up:{reverse:"down",property:"top",transition:"translatey",vertical:!0,modifier:-1},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out",modifier:-1},out:{reverse:"in",modifier:1},vertical:{reverse:"vertical"},horizontal:{reverse:"horizontal"}};x.directions=pt,S(e.fn,{kendoStop:function(e,t){return H?C.stopQueue(this,e||!1,t||!1):this.stop(e,t)}}),z&&!H&&(T(W,function(n,i){e.fn[i]=function(n){if(t===n)return l(this,i);var a=e(this)[0],r=i+"("+n+U[i.replace(L,"")]+")";return-1==a.style.cssText.indexOf(ot)?e(this).css(ot,r):a.style.cssText=a.style.cssText.replace(RegExp(i+"\\(.*?\\)","i"),r),this},e.fx.step[i]=function(t){e(t.elem)[i](t.now)}}),f=e.fx.prototype.cur,e.fx.prototype.cur=function(){return-1!=W.indexOf(this.prop)?parseFloat(e(this.elem)[this.prop]()):f.apply(this,arguments)}),x.toggleClass=function(e,t,n,i){return t&&(t=t.split(" "),H&&(n=S({exclusive:"all",duration:400,ease:"ease-out"},n),e.css(rt,n.exclusive+" "+n.duration+"ms "+n.ease),setTimeout(function(){e.css(rt,"").css(J)},n.duration)),T(t,function(t,n){e.toggleClass(n,i)})),e},x.parseEffects=function(e,t){var n={};return"string"==typeof e?T(e.split(" "),function(e,i){var a=!B.test(i),r=i.replace(P,function(e,t,n){return t+":"+n.toLowerCase()}),o=r.split(":"),s=o[1],l={};o.length>1&&(l.direction=t&&a?pt[s].reverse:s),n[o[0]]=l}):T(e,function(e){var i=this.direction;i&&t&&!B.test(e)&&(this.direction=pt[i].reverse),n[e]=this}),n},H&&S(C,{transition:function(t,n,i){var a,o,l,d,c=0,u=t.data("keys")||[];i=S({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,d=function(){l||(l=!0,o&&(clearTimeout(o),o=null),t.removeData(et).dequeue().css(rt,"").css(rt),i.complete.call(t))},i.duration=e.fx?e.fx.speeds[i.duration]||i.duration:i.duration,a=s(t,n),e.merge(u,r(a)),t.data("keys",e.unique(u)).height(),t.css(rt,i.exclusive+" "+i.duration+"ms "+i.ease).css(rt),t.css(a).css(ot),H.event&&(t.one(H.event,d),0!==i.duration&&(c=500)),o=setTimeout(d,i.duration+c),t.data(et,o),t.data(at,d)},stopQueue:function(e,t,n){var i,a=e.data("keys"),r=!n&&a,o=e.data(at);return r&&(i=x.getComputedStyles(e[0],a)),o&&o(),r&&e.css(i),e.removeData("keys").stop(t)}}),h=x.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,a,r,l,d,c,u=this,p=t.length,f=u.element,h=u.options,m=e.Deferred(),g={},v={};for(u.effects=t,m.then(e.proxy(u,"complete")),f.data("animating",!0),i=0;p>i;i++)for(n=t[i],n.setReverse(h.reverse),n.setOptions(h),u.addRestoreProperties(n.restore),n.prepare(g,v),l=n.children(),a=0,d=l.length;d>a;a++)l[a].duration(h.duration).run();for(c in h.effects)S(v,h.effects[c].properties);for(f.is(":visible")||S(g,{display:f.data("olddisplay")||"block"}),z&&!h.reset&&(r=f.data("targetTransform"),r&&(g=S(r,g))),g=s(f,g),z&&!H&&(g=o(g)),f.css(g).css(ot),i=0;p>i;i++)t[i].setup();return h.init&&h.init(),f.data("targetTransform",v),C.animate(f,v,S({},h,{complete:m.resolve})),m.promise()},stop:function(){e(this.element).kendoStop(!0,!0)},addRestoreProperties:function(e){for(var t,n=this.element,i=0,a=e.length;a>i;i++)t=e[i],this.restore.push(t),n.data(t)||n.data(t,n.css(t))},restoreCallback:function(){var e,t,n,i=this.element;for(e=0,t=this.restore.length;t>e;e++)n=this.restore[e],i.css(n,i.data(n))},complete:function(){var t=this,n=0,i=t.element,a=t.options,r=t.effects,o=r.length;for(i.removeData("animating").dequeue(),a.hide&&i.data("olddisplay",i.css("display")).hide(),this.restoreCallback(),I&&!z&&setTimeout(e.proxy(this,"restoreCallback"),0);o>n;n++)r[n].teardown();a.completeCallback&&a.completeCallback(i)}}),C.promise=function(e,t){var n,i,a,r=[],o=new h(e,t),s=x.parseEffects(t.effects);t.effects=s;for(a in s)n=C[d(a)],n&&(i=new n(e,s[a].direction),r.push(i));r[0]?o.run(r):(e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.init&&t.init(),e.dequeue(),o.complete())},C.transitionPromise=function(e,t,n){return C.animateTo(e,t,n),e},S(C,{animate:function(n,a,r){var s=r.transition!==!1;delete r.transition,H&&"transition"in C&&s?C.transition(n,a,r):z?n.animate(o(a),{queue:!1,show:!1,hide:!1,duration:r.duration,complete:r.complete}):n.each(function(){var n=e(this),o={};T(V,function(e,r){var s,l,d,c,u,p,f,h=a?a[r]+" ":null;h&&(l=a,r in A&&a[r]!==t?(s=h.match(N),z&&S(l,{scale:+s[0]})):r in M&&a[r]!==t&&(d=n.css(it),c="absolute"==d||"fixed"==d,n.data(nt)||(c?n.data(nt,{top:i(n,"top")||0,left:i(n,"left")||0,bottom:i(n,"bottom"),right:i(n,"right")}):n.data(nt,{top:i(n,"marginTop")||0,left:i(n,"marginLeft")||0})),u=n.data(nt),s=h.match(N),s&&(p=r==nt+"y"?0:+s[1],f=r==nt+"y"?+s[1]:+s[2],c?(isNaN(u.right)?isNaN(p)||S(l,{left:u.left+p}):isNaN(p)||S(l,{right:u.right-p}),isNaN(u.bottom)?isNaN(f)||S(l,{top:u.top+f}):isNaN(f)||S(l,{bottom:u.bottom-f})):(isNaN(p)||S(l,{marginLeft:u.left+p}),isNaN(f)||S(l,{marginTop:u.top+f})))),!z&&"scale"!=r&&r in l&&delete l[r],l&&S(o,l))}),E.msie&&delete o.scale,n.animate(o,{queue:!1,show:!1,hide:!1,duration:r.duration,complete:r.complete})})},animateTo:function(t,n,i){function r(e){n[0].style.cssText="",t.each(function(){this.style.cssText=""}),F.mobileOS.android||d.css(tt,s),u||c.css(it,l),i.completeCallback&&i.completeCallback.call(t,e)}var o,s,l,d=t.parents().filter(n.parents()).first(),c=e().add(t.parent()).add(n.parent()),u="absolute"==t.css(it);u||(l=c.css(it),c.css(it,"absolute")),i=a(i),F.mobileOS.android||(s=d.css(tt),d.css(tt,"hidden")),e.each(i.effects,function(e,t){o=o||t.direction}),i.complete=E.msie?function(){setTimeout(r,0)}:r,i.previous=i.reverse?n:t,i.reset=!0,(i.reverse?t:n).each(function(){e(this).kendoAnimate(S(!0,{},i)),i.complete=null,i.previous=null})}}),m=x.Class.extend({init:function(e,t){var n=this;n.element=e,n._direction=t,n.options={},n._additionalEffects=[],n.restore||(n.restore=[])},reverse:function(){return this._reverse=!0,this.run()},play:function(){return this._reverse=!1,this.run()},add:function(e){return this._additionalEffects.push(e),this},direction:function(e){return this._direction=e,this},duration:function(e){return this._duration=e,this},compositeRun:function(){var e=this,t=new h(e.element,{reverse:e._reverse,duration:e._duration}),n=e._additionalEffects.concat([e]);return t.run(n)},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n,i=this,a=i.element,r=0,l=i.restore,d=l.length,c=e.Deferred(),u={},p={},f=i.children(),h=f.length;for(c.then(e.proxy(i,"_complete")),a.data("animating",!0),r=0;d>r;r++)t=l[r],a.data(t)||a.data(t,a.css(t));for(r=0;h>r;r++)f[r].duration(i._duration).run();return i.prepare(u,p),a.is(":visible")||S(u,{display:a.data("olddisplay")||"block"}),z&&(n=a.data("targetTransform"),n&&(u=S(n,u))),u=s(a,u),z&&!H&&(u=o(u)),a.css(u).css(ot),i.setup(),a.data("targetTransform",p),C.animate(a,p,{duration:i._duration,complete:c.resolve}),c.promise()},stop:function(){var t=0,n=this.children(),i=n.length;for(t=0;i>t;t++)n[t].stop();return e(this.element).kendoStop(!0,!0),this},restoreCallback:function(){var e,t,n,i=this.element;for(e=0,t=this.restore.length;t>e;e++)n=this.restore[e],i.css(n,i.data(n))},_complete:function(){var t=this,n=t.element;n.removeData("animating").dequeue(),t.restoreCallback(),t.shouldHide()&&n.data("olddisplay",n.css("display")).hide(),I&&!z&&setTimeout(e.proxy(t,"restoreCallback"),0),t.teardown()},setOptions:function(e){S(!0,this.options,e)},children:function(){return[]},shouldHide:e.noop,setup:e.noop,prepare:e.noop,teardown:e.noop,directions:[],setReverse:function(e){return this._reverse=e,this}}),g=["left","right","up","down"],v=["in","out"],c("slideIn",{directions:g,divisor:function(e){return this.options.divisor=e,this},prepare:function(e,t){var n,i=this,a=i.element,r=pt[i._direction],o=-r.modifier*(r.vertical?a.outerHeight():a.outerWidth()),s=o/(i.options&&i.options.divisor||1)+Y,l="0px";i._reverse&&(n=e,e=t,t=n),z?(e[r.transition]=s,t[r.transition]=l):(e[r.property]=s,t[r.property]=l)}}),c("tile",{directions:g,init:function(e,t,n){m.prototype.init.call(this,e,t),this.options={previous:n}},previousDivisor:function(e){return this.options.previousDivisor=e,this},children:function(){var e=this,t=e._reverse,n=e.options.previous,i=e.options.previousDivisor||1,a=e._direction,r=[x.fx(e.element).slideIn(a).setReverse(t)];return n&&r.push(x.fx(n).slideIn(pt[a].reverse).divisor(i).setReverse(!t)),r}}),u("fade","opacity",1,0),u("zoom","scale",1,.01),c("slideMargin",{prepare:function(e,t){var n,i=this,a=i.element,r=i.options,o=a.data(Z),s=r.offset,l=i._reverse;l||null!==o||a.data(Z,parseFloat(a.css("margin-"+r.axis))),n=a.data(Z)||0,t["margin-"+r.axis]=l?n:n+s}}),c("slideTo",{prepare:function(e,t){var n=this,i=n.element,a=n.options,r=a.offset.split(","),o=n._reverse;z?(t.translatex=o?0:r[0],t.translatey=o?0:r[1]):(t.left=o?0:r[0],t.top=o?0:r[1]),i.css("left")}}),c("expand",{directions:["horizontal","vertical"],restore:[tt],prepare:function(e,n){var i=this,a=i.element,r=i.options,o=i._reverse,s="vertical"===i._direction?J:Q,l=a[0].style[s],d=a.data(s),c=parseFloat(d||l),u=j(a.css(s,K)[s]());e.overflow=X,c=r&&r.reset?u||c:c||u,n[s]=(o?0:c)+Y,e[s]=(o?c:0)+Y,d===t&&a.data(s,l)},shouldHide:function(){return this._reverse},teardown:function(){var e=this,t=e.element,n="vertical"===e._direction?J:Q,i=t.data(n);(i==K||i===G)&&setTimeout(function(){t.css(n,K).css(n)},0)}}),_={position:"absolute",marginLeft:0,marginTop:0,scale:1},c("transfer",{init:function(e,t){this.element=e,this.options={target:t},this.restore=[]},setup:function(){this.element.appendTo(document.body)},prepare:function(e,t){var n,i,a,r,o,s,d,c,u,p,f,h,m,g=this,v=g.element,k=g.options,b=g._reverse,y=k.target,w=l(v,"scale"),x=y.offset(),C=y.outerHeight()/v.outerHeight();S(e,_),t.scale=1,v.css(ot,"scale(1)").css(ot),n=v.offset(),v.css(ot,"scale("+w+")"),i=0,a=0,r=x.left-n.left,o=x.top-n.top,s=i+v.outerWidth(),d=a,c=r+y.outerWidth(),u=o,p=(o-a)/(r-i),f=(u-d)/(c-s),h=(a-d-p*i+f*s)/(f-p),m=a+p*(h-i),e.top=n.top,e.left=n.left,e.transformOrigin=h+Y+" "+m+Y,b?e.scale=C:t.scale=C}}),k={top:"rect(auto auto $size auto)",bottom:"rect($size auto auto auto)",left:"rect(auto $size auto auto)",right:"rect(auto auto auto $size)"},b={top:{start:"rotatex(0deg)",end:"rotatex(180deg)"},bottom:{start:"rotatex(-180deg)",end:"rotatex(0deg)"},left:{start:"rotatey(0deg)",end:"rotatey(-180deg)"},right:{start:"rotatey(180deg)",end:"rotatey(0deg)"}},c("turningPage",{directions:g,init:function(e,t,n){m.prototype.init.call(this,e,t),this._container=n},prepare:function(e,t){var n=this,i=n._reverse,a=i?pt[n._direction].reverse:n._direction,r=b[a];e.zIndex=1,n._clipInHalf&&(e.clip=p(n._container,x.directions[a].reverse)),e[st]=X,t[ot]=ct+(i?r.start:r.end),e[ot]=ct+(i?r.end:r.start)},setup:function(){this._container.append(this.element)},face:function(e){return this._face=e,this},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},clipInHalf:function(e){return this._clipInHalf=e,this},temporary:function(){return this.element.addClass("temp-page"),this}}),c("staticPage",{directions:g,init:function(e,t,n){m.prototype.init.call(this,e,t),this._container=n},restore:["clip"],prepare:function(e,t){var n=this,i=n._reverse?pt[n._direction].reverse:n._direction;e.clip=p(n._container,i),e.opacity=.999,t.opacity=1},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},face:function(e){return this._face=e,this}}),c("pageturn",{directions:["horizontal","vertical"],init:function(e,t,n,i){m.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,n=t.options,i="horizontal"===t._direction?"left":"top",a=x.directions[i].reverse,r=t._reverse,o=n.face.clone(!0).removeAttr("id"),s=n.back.clone(!0).removeAttr("id"),l=t.element;return r&&(e=i,i=a,a=e),[x.fx(n.face).staticPage(i,l).face(!0).setReverse(r),x.fx(n.back).staticPage(a,l).setReverse(r),x.fx(o).turningPage(i,l).face(!0).clipInHalf(!0).temporary().setReverse(r),x.fx(s).turningPage(a,l).clipInHalf(!0).temporary().setReverse(r)]},prepare:function(e,t){e[lt]=dt,e.transformStyle="preserve-3d",e.opacity=.999,t.opacity=1},teardown:function(){this.element.find(".temp-page").remove()}}),c("flip",{directions:["horizontal","vertical"],init:function(e,t,n,i){m.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,n=t.options,i="horizontal"===t._direction?"left":"top",a=x.directions[i].reverse,r=t._reverse,o=t.element;return r&&(e=i,i=a,a=e),[x.fx(n.face).turningPage(i,o).face(!0).setReverse(r),x.fx(n.back).turningPage(a,o).setReverse(r)]},prepare:function(e){e[lt]=dt,e.transformStyle="preserve-3d"}}),y=x.Class.extend({init:function(){var e=this;e._tickProxy=D(e._tick,e),e._started=!1},tick:e.noop,done:e.noop,onEnd:e.noop,onCancel:e.noop,start:function(){this.done()||(this._started=!0,x.animationFrame(this._tickProxy))},cancel:function(){this._started=!1,this.onCancel()},_tick:function(){var e=this;e._started&&(e.tick(),e.done()?(e._started=!1,e.onEnd()):x.queueAnimation(e._tickProxy))}}),w=y.extend({init:function(e){var t=this;S(t,e),y.fn.init.call(t)},done:function(){return this.timePassed()>=this.duration},timePassed:function(){return Math.min(this.duration,new Date-this.startDate)},moveTo:function(e){var t=this,n=t.movable;t.initial=n[t.axis],t.delta=e.location-t.initial,t.duration="number"==typeof e.duration?e.duration:300,t.tick=t._easeProxy(e.ease),t.startDate=new Date,t.start()},_easeProxy:function(e){var t=this;return function(){t.movable.moveAxis(t.axis,e(t.timePassed(),t.initial,t.delta,t.duration))}}}),S(w,{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,a){return a=1.70158,n*((e=e/i-1)*e*((a+1)*e+a)+1)+t}}),C.Animation=y,C.Transition=w,C.createEffect=c}(window.kendo.jQuery),function(e,t){function n(a){var o,s,l,d,c,u,p,f,h=[],m=a.logic||"and",g=a.filters; for(o=0,s=g.length;s>o;o++)a=g[o],l=a.field,p=a.value,u=a.operator,a.filters?a=n(a):(f=a.ignoreCase,l=l.replace(/\./g,"/"),a=r[u],a&&p!==t&&(d=e.type(p),"string"===d?(c="'{1}'",p=p.replace(/'/g,"''"),f===!0&&(l="tolower("+l+")")):c="date"===d?"datetime'{1:yyyy-MM-ddTHH:mm:ss}'":"{1}",a.length>3?"substringof"!==a?c="{0}({2},"+c+")":(c="{0}("+c+",{2})","doesnotcontain"===u&&(c+=" eq false")):c="{2} {0} "+c,a=i.format(c,a,p,l))),h.push(a);return a=h.join(" "+m+" "),h.length>1&&(a="("+a+")"),a}var i=window.kendo,a=e.extend,r={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith"},o={pageSize:e.noop,page:e.noop,filter:function(e,t){t&&(e.$filter=n(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)}},s={read:{dataType:"jsonp"}};a(!0,i.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){var n,a,r,l;if(e=e||{},t=t||"read",l=(this.options||s)[t],l=l?l.dataType:"json","read"===t){n={$inlinecount:"allpages"},"json"!=l&&(n.$format="json");for(r in e)o[r]?o[r](n,e[r]):n[r]=e[r]}else{if("json"!==l)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(r in e)a=e[r],"number"==typeof a&&(e[r]=a+"");n=i.stringify(e)}}return n}}}})}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.isArray,a=e.isPlainObject,r=e.map,o=e.each,s=e.extend,l=n.getter,d=n.Class,c=d.extend({init:function(e){var t,l,d,c=this,u=e.total,p=e.model,f=e.parse,h=e.errors,m=e.serialize,g=e.data;p&&(a(p)&&(p.fields&&o(p.fields,function(e,t){t=a(t)&&t.field?s(t,{field:c.getter(t.field)}):{field:c.getter(t)},p.fields[e]=t}),t=p.id,t&&(l={},l[c.xpathToMember(t,!0)]={field:c.getter(t)},p.fields=s(l,p.fields),p.id=c.xpathToMember(t)),p=n.data.Model.define(p)),c.model=p),u&&("string"==typeof u?(u=c.getter(u),c.total=function(e){return parseInt(u(e),10)}):"function"==typeof u&&(c.total=u)),h&&("string"==typeof h?(h=c.getter(h),c.errors=function(e){return h(e)||null}):"function"==typeof h&&(c.errors=h)),g&&("string"==typeof g?(g=c.xpathToMember(g),c.data=function(e){var t,n=c.evaluate(e,g);return n=i(n)?n:[n],c.model&&p.fields?(t=new c.model,r(n,function(e){if(e){var n,i={};for(n in p.fields)i[n]=t._parse(n,p.fields[n].field(e));return i}})):n}):"function"==typeof g&&(c.data=g)),"function"==typeof f&&(d=c.parse,c.parse=function(e){var t=f.call(c,e);return d.call(c,t)}),"function"==typeof m&&(c.serialize=m)},total:function(e){return this.data(e).length},errors:function(e){return e?e.errors:null},serialize:function(e){return e},parseDOM:function(e){var n,a,r,o,s,l,d,c={},u=e.attributes,p=u.length;for(d=0;p>d;d++)l=u[d],c["@"+l.nodeName]=l.nodeValue;for(a=e.firstChild;a;a=a.nextSibling)r=a.nodeType,3===r||4===r?c["#text"]=a.nodeValue:1===r&&(n=this.parseDOM(a),o=a.nodeName,s=c[o],i(s)?s.push(n):s=s!==t?[s,n]:n,c[o]=s);return c},evaluate:function(e,t){for(var n,a,r,o,s,l=t.split(".");n=l.shift();)if(e=e[n],i(e)){for(a=[],t=l.join("."),s=0,r=e.length;r>s;s++)o=this.evaluate(e[s],t),o=i(o)?o:[o],a.push.apply(a,o);return a}return e},parse:function(t){var n,i,a={};return n=t.documentElement||e.parseXML(t).documentElement,i=this.parseDOM(n),a[n.nodeName]=i,a},xpathToMember:function(e,t){return e?(e=e.replace(/^\//,"").replace(/\//g,"."),e.indexOf("@")>=0?e.replace(/\.?(@.*)/,t?"$1":'["$1"]'):e.indexOf("text()")>=0?e.replace(/(\.?text\(\))/,t?"#text":'["#text"]'):e):""},getter:function(e){return l(this.xpathToMember(e),!0)}});e.extend(!0,n.data,{XmlDataReader:c,readers:{xml:c}})}(window.kendo.jQuery),function(e,t){function n(e,t,n,i){return function(a){var r,o={};for(r in a)o[r]=a[r];o.field=i?n+"."+a.field:n,t==vt&&e._notifyChange&&e._notifyChange(o),e.trigger(t,o)}}function i(t,n){if(t===n)return!0;var a,r=e.type(t),o=e.type(n);if(r!==o)return!1;if("date"===r)return t.getTime()===n.getTime();if("object"!==r&&"array"!==r)return!1;for(a in t)if(!i(t[a],n[a]))return!1;return!0}function a(e,t){var n,i;for(i in e){if(n=e[i],et(n)&&n.field&&n.field===t)return n;if(n===t)return n}return null}function r(e){this.data=e||[]}function o(e,n){if(e){var i=typeof e===ut?{field:e,dir:n}:e,a=nt(i)?i:i!==t?[i]:[];return it(a,function(e){return!!e.dir})}}function s(e){var t,n,i,a,r=e.filters;if(r)for(t=0,n=r.length;n>t;t++)i=r[t],a=i.operator,a&&typeof a===ut&&(i.operator=L[a.toLowerCase()]||a),s(i)}function l(e){return e&&!tt(e)?((nt(e)||!e.filters)&&(e={logic:"and",filters:nt(e)?e:[e]}),s(e),e):t}function d(e){return nt(e)?e:[e]}function c(e,n){var i=typeof e===ut?{field:e,dir:n}:e,a=nt(i)?i:i!==t?[i]:[];return N(a,function(e){return{field:e.field,dir:e.dir||"asc",aggregates:e.aggregates}})}function u(e,t){return e&&e.getTime&&t&&t.getTime?e.getTime()===t.getTime():e===t}function p(e,t,n,i,a){var r,o,s,l,d;for(t=t||[],l=t.length,r=0;l>r;r++)o=t[r],s=o.aggregate,d=o.field,e[d]=e[d]||{},e[d][s]=V[s.toLowerCase()](e[d][s],n,st.accessor(d),i,a)}function f(e){return"number"==typeof e&&!isNaN(e)}function h(e){var t,n=e.length,i=Array(n);for(t=0;n>t;t++)i[t]=e[t].toJSON();return i}function m(e,t){t=t||{};var n=new r(e),i=t.aggregate,a=t.filter;return a&&(n=n.filter(a)),n.aggregate(i)}function g(e,t,n,i,a){var r,o,s,l,d;for(l=0,d=e.length;d>l;l++){r=e[l];for(o in t)s=a[o],s&&s!==o&&(r[s]=t[o](r),delete r[o])}}function v(e,t,n,i,a){var r,o,s,l,d;for(l=0,d=e.length;d>l;l++){r=e[l];for(o in t)r[o]=n._parse(o,t[o](r)),s=a[o],s&&s!==o&&delete r[s]}}function _(e,t,n,i,a){var r,o,s,l;for(o=0,l=e.length;l>o;o++)r=e[o],s=i[r.field],s&&s!=r.field&&(r.field=s),r.value=n._parse(r.field,r.value),r.hasSubgroups?_(r.items,t,n,i,a):v(r.items,t,n,i,a)}function k(e,t,n,i,a,r){return function(o){return o=e(o),o&&!tt(i)&&("[object Array]"===Nt.call(o)||o instanceof Vt||(o=[o]),n(o,i,new t,a,r)),o||[]}}function b(e,t,n,i){for(var a,r,o=0;t.length&&i&&(a=t[o],r=a.items,e&&e.field===a.field&&e.value===a.value?(e.hasSubgroups&&e.items.length?b(e.items[e.items.length-1],a.items,n,i):(r=r.slice(n,i),i-=r.length,e.items=e.items.concat(r)),t.splice(o--,1)):(r=r.slice(n,i),i-=r.length,a.items=r,a.items.length||(t.splice(o--,1),i-=n)),n=0,!(++o>=t.length)););ot;t++)i=e[t].hasSubgroups?i.concat(y(e[t].items)):i.concat(e[t].items.slice());return i}function w(e,t){var n,i,a,r;if(t)for(n=0,i=e.length;i>n;n++)a=e[n],r=a.items,a.hasSubgroups?w(r,t):!r.length||r[0]instanceof t||(r.type=t,r.wrapAll(r,r))}function x(e,t){var n,i;for(n=0,i=e.length;i>n;n++)if(e[n].hasSubgroups){if(x(e[n].items,t))return!0}else if(t(e[n].items,e[n]))return!0}function C(e,t){var n,i;for(n=0,i=e.length;i>n;n++)if(e[n].uid==t.uid)return t=e[n],e.splice(n,1),t}function T(e,t){var n,i,a,r;for(a=e.length-1,r=0;a>=r;a--)i=e[a],n={value:t.get(i.field),field:i.field,items:n?[n]:[t],hasSubgroups:!!n,aggregates:{}};return n}function S(e,t){return t?F(e,function(e){return e[t.idField]===t.id}):-1}function D(e,t){return t?F(e,function(e){return e.uid==t.uid}):-1}function F(e,t){var n,i;for(n=0,i=e.length;i>n;n++)if(t(e[n]))return n;return-1}function E(e,t){var n,i;return e&&!tt(e)?(n=e[t],i=et(n)?n.from||n.field||t:e[t]||t,lt(i)?t:i):t}function z(e,t){var n,i,a,r={};for(a in e)"filters"!==a&&(r[a]=e[a]);if(e.filters)for(r.filters=[],n=0,i=e.filters.length;i>n;n++)r.filters[n]=z(e.filters[n],t);else r.field=E(t.fields,r.field);return r}function H(e,t){var n,i,a,r,o,s=[];for(n=0,i=e.length;i>n;n++){a={},r=e[n];for(o in r)a[o]=r[o];a.field=E(t.fields,a.field),a.aggregates&&nt(a.aggregates)&&(a.aggregates=H(a.aggregates,t)),s.push(a)}return s}function A(t,n){var i,a,r,o,s,l=e(t)[0].children,d=[],c=n[0],u=n[1];for(i=0,a=l.length;a>i;i++)r={},s=l[i],s.disabled||(r[c.field]=s.text,o=s.attributes.value,o=o&&o.specified?s.value:s.text,r[u.field]=o,d.push(r));return d}function M(t,n){var i,a,r,o,s,l,d,c=e(t)[0].tBodies[0],u=c?c.rows:[],p=n.length,f=[];for(i=0,a=u.length;a>i;i++){for(s={},d=!0,o=u[i].cells,r=0;p>r;r++)l=o[r],"th"!==l.nodeName.toLowerCase()&&(d=!1,s[n[r].field]=l.innerHTML);d||f.push(s)}return f}function I(e){return function(){var t=this._data,n=G.fn[e].apply(this,It.call(arguments));return this._data!=t&&this._attachBubbleHandlers(),n}}function R(t,n){function i(e,t){return e.filter(t).add(e.find(t))}var a,r,o,s,l,d,c,u,p=e(t).children(),f=[],h=n[0].field,m=n[1]&&n[1].field,g=n[2]&&n[2].field,v=n[3]&&n[3].field;for(a=0,r=p.length;r>a;a++)o={_loaded:!0},s=p.eq(a),d=s[0].firstChild,u=s.children(),t=u.filter("ul"),u=u.filter(":not(ul)"),l=s.attr("data-id"),l&&(o.id=l),d&&(o[h]=3==d.nodeType?d.nodeValue:u.text()),m&&(o[m]=i(u,"a").attr("href")),v&&(o[v]=i(u,"img").attr("src")),g&&(c=i(u,".k-sprite").prop("className"),o[g]=c&&e.trim(c.replace("k-sprite",""))),t.length&&(o.items=R(t.eq(0),n)),"true"==s.attr("data-hasChildren")&&(o.hasChildren=!0),f.push(o);return f}var N,O,P,B,L,V,W,U,q,j,G,Y,$,K,Q,J,X=e.extend,Z=e.proxy,et=e.isPlainObject,tt=e.isEmptyObject,nt=e.isArray,it=e.grep,at=e.ajax,rt=e.each,ot=e.noop,st=window.kendo,lt=st.isFunction,dt=st.Observable,ct=st.Class,ut="string",pt="function",ft="create",ht="read",mt="update",gt="destroy",vt="change",_t="sync",kt="get",bt="error",yt="requestStart",wt="progress",xt="requestEnd",Ct=[ft,ht,mt,gt],Tt=function(e){return e},St=st.getter,Dt=st.stringify,Ft=Math,Et=[].push,zt=[].join,Ht=[].pop,At=[].splice,Mt=[].shift,It=[].slice,Rt=[].unshift,Nt={}.toString,Ot=st.support.stableSort,Pt=/^\/Date\((.*?)\)\/$/,Bt=/(\r+|\n+)/g,Lt=/(?=['\\])/g,Vt=dt.extend({init:function(e,t){var n=this;n.type=t||Wt,dt.fn.init.call(n),n.length=e.length,n.wrapAll(e,n)},toJSON:function(){var e,t,n=this.length,i=Array(n);for(e=0;n>e;e++)t=this[e],t instanceof Wt&&(t=t.toJSON()),i[e]=t;return i},parent:ot,wrapAll:function(e,t){var n,i,a=this,r=function(){return a};for(t=t||[],n=0,i=e.length;i>n;n++)t[n]=a.wrap(e[n],r);return t},wrap:function(e,t){var n,i=this;return null!==e&&"[object Object]"===Nt.call(e)&&(n=e instanceof i.type||e instanceof jt,n||(e=e instanceof Wt?e.toJSON():e,e=new i.type(e)),e.parent=t,e.bind(vt,function(e){i.trigger(vt,{field:e.field,node:e.node,index:e.index,items:e.items||[this],action:e.node?e.action||"itemchange":"itemchange"})})),e},push:function(){var e,t=this.length,n=this.wrapAll(arguments);return e=Et.apply(this,n),this.trigger(vt,{action:"add",index:t,items:n}),e},slice:It,join:zt,pop:function(){var e=this.length,t=Ht.apply(this);return e&&this.trigger(vt,{action:"remove",index:e-1,items:[t]}),t},splice:function(e,t,n){var i,a,r,o=this.wrapAll(It.call(arguments,2));if(i=At.apply(this,[e,t].concat(o)),i.length)for(this.trigger(vt,{action:"remove",index:e,items:i}),a=0,r=i.length;r>a;a++)i[a].children&&i[a].unbind(vt);return n&&this.trigger(vt,{action:"add",index:e,items:o}),i},shift:function(){var e=this.length,t=Mt.apply(this);return e&&this.trigger(vt,{action:"remove",index:0,items:[t]}),t},unshift:function(){var e,t=this.wrapAll(arguments);return e=Rt.apply(this,t),this.trigger(vt,{action:"add",index:0,items:t}),e},indexOf:function(e){var t,n,i=this;for(t=0,n=i.length;n>t;t++)if(i[t]===e)return t;return-1},forEach:function(e){for(var t=0,n=this.length;n>t;t++)e(this[t],t,this)},map:function(e){for(var t=0,n=[],i=this.length;i>t;t++)n[t]=e(this[t],t,this);return n},filter:function(e){for(var t,n=0,i=[],a=this.length;a>n;n++)t=this[n],e(t,n,this)&&(i[i.length]=t);return i},find:function(e){for(var t,n=0,i=this.length;i>n;n++)if(t=this[n],e(t,n,this))return t},every:function(e){for(var t,n=0,i=this.length;i>n;n++)if(t=this[n],!e(t,n,this))return!1;return!0},some:function(e){for(var t,n=0,i=this.length;i>n;n++)if(t=this[n],e(t,n,this))return!0;return!1},remove:function(e){this.splice(this.indexOf(e),1)},empty:function(){this.splice(0,this.length)}}),Wt=dt.extend({init:function(e){var t,n,i=this,a=function(){return i};dt.fn.init.call(this);for(n in e)t=e[n],"_"!=n.charAt(0)&&(t=i.wrap(t,n,a)),i[n]=t;i.uid=st.guid()},shouldSerialize:function(e){return this.hasOwnProperty(e)&&"_events"!==e&&typeof this[e]!==pt&&"uid"!==e},forEach:function(e){for(var t in this)this.shouldSerialize(t)&&e(this[t],t)},toJSON:function(){var e,t,n={};for(t in this)this.shouldSerialize(t)&&(e=this[t],(e instanceof Wt||e instanceof Vt)&&(e=e.toJSON()),n[t]=e);return n},get:function(e){var t,n=this;return n.trigger(kt,{field:e}),t="this"===e?n:st.getter(e,!0)(n)},_set:function(e,t){var n,i,a,r=this,o=e.indexOf(".")>=0;if(o)for(n=e.split("."),i="";n.length>1;){if(i+=n.shift(),a=st.getter(i,!0)(r),a instanceof Wt)return a.set(n.join("."),t),o;i+="."}return st.setter(e)(r,t),o},set:function(e,t){var n=this,i=st.getter(e,!0)(n);i!==t&&(n.trigger("set",{field:e,value:t})||(!n._set(e,n.wrap(t,e,function(){return n}))||e.indexOf("(")>=0||e.indexOf("[")>=0)&&n.trigger(vt,{field:e}))},parent:ot,wrap:function(e,t,i){var a,r,o=this,s=Nt.call(e);return null==e||"[object Object]"!==s&&"[object Array]"!==s||(a=e instanceof Vt,r=e instanceof G,"[object Object]"!==s||r||a?("[object Array]"===s||a||r)&&(a||r||(e=new Vt(e)),e.parent()!=i()&&e.bind(vt,n(o,vt,t,!1))):(e instanceof Wt||(e=new Wt(e)),e.parent()!=i()&&(e.bind(kt,n(o,kt,t,!0)),e.bind(vt,n(o,vt,t,!0)))),e.parent=i),e}}),Ut={number:function(e){return st.parseFloat(e)},date:function(e){return st.parseDate(e)},"boolean":function(e){return typeof e===ut?"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return null!=e?e+"":e},"default":function(e){return e}},qt={string:"",number:0,date:new Date,"boolean":!1,"default":""},jt=Wt.extend({init:function(n){var i=this;(!n||e.isEmptyObject(n))&&(n=e.extend({},i.defaults,n)),Wt.fn.init.call(i,n),i.dirty=!1,i.idField&&(i.id=i.get(i.idField),i.id===t&&(i.id=i._defaultId))},shouldSerialize:function(e){return Wt.fn.shouldSerialize.call(this,e)&&"uid"!==e&&!("id"!==this.idField&&"id"===e)&&"dirty"!==e&&"_accessors"!==e},_parse:function(e,t){var n,i=this,r=e,o=i.fields||{};return e=o[e],e||(e=a(o,r)),e&&(n=e.parse,!n&&e.type&&(n=Ut[e.type.toLowerCase()])),n?n(t):t},_notifyChange:function(e){var t=e.action;("add"==t||"remove"==t)&&(this.dirty=!0)},editable:function(e){return e=(this.fields||{})[e],e?e.editable!==!1:!0},set:function(e,t,n){var a=this;a.editable(e)&&(t=a._parse(e,t),i(t,a.get(e))||(a.dirty=!0,Wt.fn.set.call(a,e,t,n)))},accept:function(e){var t,n,i=this,a=function(){return i};for(t in e)n=e[t],"_"!=t.charAt(0)&&(n=i.wrap(e[t],t,a)),i._set(t,n);i.idField&&(i.id=i.get(i.idField)),i.dirty=!1},isNew:function(){return this.id===this._defaultId}});jt.define=function(e,n){n===t&&(n=e,e=jt);var i,a,r,o,s,l,d,c,u=X({defaults:{}},n),p={},f=u.id;if(f&&(u.idField=f),u.id&&delete u.id,f&&(u.defaults[f]=u._defaultId=""),"[object Array]"===Nt.call(u.fields)){for(l=0,d=u.fields.length;d>l;l++)r=u.fields[l],typeof r===ut?p[r]={}:r.field&&(p[r.field]=r);u.fields=p}for(a in u.fields)r=u.fields[a],o=r.type||"default",s=null,c=a,a=typeof r.field===ut?r.field:a,r.nullable||(s=u.defaults[c!==a?c:a]=r.defaultValue!==t?r.defaultValue:qt[o.toLowerCase()]),n.id===a&&(u._defaultId=s),u.defaults[c!==a?c:a]=s,r.parse=r.parse||Ut[o];return i=e.extend(u),i.define=function(e){return jt.define(i,e)},u.fields&&(i.fields=u.fields,i.idField=u.idField),i},O={selector:function(e){return lt(e)?e:St(e)},compare:function(e){var t=this.selector(e);return function(e,n){return e=t(e),n=t(n),null==e&&null==n?0:null==e?-1:null==n?1:e.localeCompare?e.localeCompare(n):e>n?1:n>e?-1:0}},create:function(e){var t=e.compare||this.compare(e.field);return"desc"==e.dir?function(e,n){return t(n,e,!0)}:t},combine:function(e){return function(t,n){var i,a,r=e[0](t,n);for(i=1,a=e.length;a>i;i++)r=r||e[i](t,n);return r}}},P=X({},O,{asc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),a=t(n);return i&&i.getTime&&a&&a.getTime&&(i=i.getTime(),a=a.getTime()),i===a?e.__position-n.__position:null==i?-1:null==a?1:i.localeCompare?i.localeCompare(a):i>a?1:-1}},desc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),a=t(n);return i&&i.getTime&&a&&a.getTime&&(i=i.getTime(),a=a.getTime()),i===a?e.__position-n.__position:null==i?1:null==a?-1:a.localeCompare?a.localeCompare(i):a>i?1:-1}},create:function(e){return this[e.dir](e.field)}}),N=function(e,t){var n,i=e.length,a=Array(i);for(n=0;i>n;n++)a[n]=t(e[n],n,e);return a},B=function(){function e(e){return e.replace(Lt,"\\").replace(Bt,"")}function t(t,n,i,a){var r;return null!=i&&(typeof i===ut&&(i=e(i),r=Pt.exec(i),r?i=new Date(+r[1]):a?(i="'"+i.toLowerCase()+"'",n="("+n+" || '').toLowerCase()"):i="'"+i+"'"),i.getTime&&(n="("+n+"?"+n+".getTime():"+n+")",i=i.getTime())),n+" "+t+" "+i}return{eq:function(e,n,i){return t("==",e,n,i)},neq:function(e,n,i){return t("!=",e,n,i)},gt:function(e,n,i){return t(">",e,n,i)},gte:function(e,n,i){return t(">=",e,n,i)},lt:function(e,n,i){return t("<",e,n,i)},lte:function(e,n,i){return t("<=",e,n,i)},startswith:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".lastIndexOf('"+n+"', 0) == 0"},endswith:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".indexOf('"+n+"', "+t+".length - "+(n||"").length+") >= 0"},contains:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".indexOf('"+n+"') >= 0"},doesnotcontain:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".indexOf('"+n+"') == -1"}}}(),r.filterExpr=function(e){var n,i,a,o,s,l,d=[],c={and:" && ",or:" || "},u=[],p=[],f=e.filters;for(n=0,i=f.length;i>n;n++)a=f[n],s=a.field,l=a.operator,a.filters?(o=r.filterExpr(a),a=o.expression.replace(/__o\[(\d+)\]/g,function(e,t){return t=+t,"__o["+(p.length+t)+"]"}).replace(/__f\[(\d+)\]/g,function(e,t){return t=+t,"__f["+(u.length+t)+"]"}),p.push.apply(p,o.operators),u.push.apply(u,o.fields)):(typeof s===pt?(o="__f["+u.length+"](d)",u.push(s)):o=st.expr(s),typeof l===pt?(a="__o["+p.length+"]("+o+", "+a.value+")",p.push(l)):a=B[(l||"eq").toLowerCase()](o,a.value,a.ignoreCase!==t?a.ignoreCase:!0)),d.push(a);return{expression:"("+d.join(c[e.logic])+")",fields:u,operators:p}},L={"==":"eq",equals:"eq",isequalto:"eq",equalto:"eq",equal:"eq","!=":"neq",ne:"neq",notequals:"neq",isnotequalto:"neq",notequalto:"neq",notequal:"neq","<":"lt",islessthan:"lt",lessthan:"lt",less:"lt","<=":"lte",le:"lte",islessthanorequalto:"lte",lessthanequal:"lte",">":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain"},r.normalizeFilter=l,r.prototype={toArray:function(){return this.data},range:function(e,t){return new r(this.data.slice(e,e+t))},skip:function(e){return new r(this.data.slice(e))},take:function(e){return new r(this.data.slice(0,e))},select:function(e){return new r(N(this.data,e))},order:function(e,t){var n={dir:t};return e&&(e.compare?n.compare=e.compare:n.field=e),new r(this.data.slice(0).sort(O.create(n)))},orderBy:function(e){return this.order(e,"asc")},orderByDescending:function(e){return this.order(e,"desc")},sort:function(e,t,n){var i,a,r=o(e,t),s=[];if(n=n||O,r.length){for(i=0,a=r.length;a>i;i++)s.push(n.create(r[i]));return this.orderBy({compare:n.combine(s)})}return this},filter:function(e){var t,n,i,a,o,s,d,c,u=this.data,p=[];if(e=l(e),!e||0===e.filters.length)return this;for(a=r.filterExpr(e),s=a.fields,d=a.operators,o=c=Function("d, __f, __o","return "+a.expression),(s.length||d.length)&&(c=function(e){return o(e,s,d)}),t=0,i=u.length;i>t;t++)n=u[t],c(n)&&p.push(n);return new r(p)},group:function(e,t){e=c(e||[]),t=t||this.data;var n,i=this,a=new r(i.data);return e.length>0&&(n=e[0],a=a.groupBy(n).select(function(i){var a=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),a.toArray()).toArray():i.items,hasSubgroups:e.length>1,aggregates:a.aggregate(n.aggregates)}})),a},groupBy:function(e){if(tt(e)||!this.data.length)return new r([]);var t,n,i,a,o=e.field,s=this._sortForGrouping(o,e.dir||"asc"),l=st.accessor(o),d=l.get(s[0],o),c={field:o,value:d,items:[]},p=[c];for(i=0,a=s.length;a>i;i++)t=s[i],n=l.get(t,o),u(d,n)||(d=n,c={field:o,value:d,items:[]},p.push(c)),c.items.push(t);return new r(p)},_sortForGrouping:function(e,t){var n,i,a=this.data;if(!Ot){for(n=0,i=a.length;i>n;n++)a[n].__position=n;for(a=new r(a).sort(e,t,P).toArray(),n=0,i=a.length;i>n;n++)delete a[n].__position;return a}return this.sort(e,t).toArray()},aggregate:function(e){var t,n,i={};if(e&&e.length)for(t=0,n=this.data.length;n>t;t++)p(i,e,this.data[t],t,n);return i}},V={sum:function(e,t,n){return(e||0)+n.get(t)},count:function(e){return(e||0)+1},average:function(e,t,n,i,a){return e=(e||0)+n.get(t),i==a-1&&(e/=a),e},max:function(e,t,n){var i=n.get(t);return e=e||0,i>e&&(e=i),e},min:function(e,t,n){var i=n.get(t);return f(e)||(e=i),e>i&&f(i)&&(e=i),e}},r.process=function(e,n){n=n||{};var i,a=new r(e),s=n.group,l=c(s||[]).concat(o(n.sort||[])),d=n.filter,u=n.skip,p=n.take;return d&&(a=a.filter(d),i=a.toArray().length),l&&(a=a.sort(l),s&&(e=a.toArray())),u!==t&&p!==t&&(a=a.range(u,p)),s&&(a=a.group(s,e)),{total:i,data:a.toArray()}},W=ct.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)}}),U=ct.extend({init:function(e){var t,n=this;e=n.options=X({},n.options,e),rt(Ct,function(t,n){typeof e[n]===ut&&(e[n]={url:e[n]})}),n.cache=e.cache?q.create(e.cache):{find:ot,add:ot},t=e.parameterMap,n.parameterMap=lt(t)?t:function(e){var n={};return rt(e,function(e,i){e in t&&(e=t[e],et(e)&&(i=e.value(i),e=e.key)),n[e]=i}),n}},options:{parameterMap:Tt},create:function(e){return at(this.setup(e,ft))},read:function(n){var i,a,r,o=this,s=o.cache;n=o.setup(n,ht),i=n.success||ot,a=n.error||ot,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 at(this.setup(e,mt))},destroy:function(e){return at(this.setup(e,gt))},setup:function(e,t){e=e||{};var n,i=this,a=i.options[t],r=lt(a.data)?a.data(e.data):a.data;return e=X(!0,{},a,e),n=X(!0,{},r,e.data),e.data=i.parameterMap(n,t),lt(e.url)&&(e.url=e.url(n)),e}}),q=ct.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[Dt(e)]=n)},find:function(e){return this._store[Dt(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[Dt(e)]}}),q.create=function(e){var t={inmemory:function(){return new q}};return et(e)&<(e.find)?e:e===!0?new q:t[e]()},j=ct.extend({init:function(e){var t,n,i,a,r,o,s,l,d,c,u,p,f,h=this;e=e||{};for(t in e)n=e[t],h[t]=typeof n===ut?St(n):n;a=e.modelBase||jt,et(h.model)&&(h.model=i=a.define(h.model)),h.model&&(o=Z(h.data,h),s=Z(h.groups,h),l=Z(h.serialize,h),d={},c={},u={},p={},f=!1,i=h.model,i.fields&&(rt(i.fields,function(e,t){var n;r=e,et(t)&&t.field?r=t.field:typeof t===ut&&(r=t),et(t)&&t.from&&(n=t.from),f=f||n&&n!==e||r!==e,c[e]=St(n||r),u[e]=St(e),d[n||r]=e,p[e]=n||r}),!e.serialize&&f&&(h.serialize=k(l,i,g,u,d,p))),h.data=k(o,i,v,c,d,p),h.groups=k(s,i,_,c,d,p))},errors:function(e){return e?e.errors:null},parse:Tt,data:Tt,total:function(e){return e.length},groups:Tt,aggregates:function(){return{}},serialize:function(e){return e}}),G=dt.extend({init:function(e){var n,i,a=this;e&&(i=e.data),e=a.options=X({},a.options,e),a._map={},a._prefetch={},a._data=[],a._pristineData=[],a._ranges=[],a._view=[],a._pristine=[],a._destroyed=[],a._pageSize=e.pageSize,a._page=e.page||(e.pageSize?1:t),a._sort=o(e.sort),a._filter=l(e.filter),a._group=c(e.group),a._aggregate=e.aggregate,a._total=e.total,dt.fn.init.call(a),a.transport=Y.create(e,i),a.reader=new st.data.readers[e.schema.type||"json"](e.schema),n=a.reader.model||{},a._data=a._observe(a._data),a.bind([bt,vt,yt,_t,xt,wt],e)},options:{data:[],schema:{modelBase:jt},serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,batch:!1},_isServerGrouped:function(){var e=this.group()||[];return this.options.serverGrouping&&e.length},_flatData:function(e){return this._isServerGrouped()?y(e):e},parent:ot,get:function(e){var t,n,i=this._flatData(this._data);for(t=0,n=i.length;n>t;t++)if(i[t].id==e)return i[t]},getByUid:function(e){var t,n,i=this._flatData(this._data);if(i)for(t=0,n=i.length;n>t;t++)if(i[t].uid==e)return i[t]},indexOf:function(e){return D(this._data,e)},at:function(e){return this._data[e]},data:function(e){var n=this;return e===t?n._data:(n._data=this._observe(e),n._ranges=[],n._addRange(n._data),n._total=n._data.length,n._process(n._data),t)},view:function(){return this._view},add:function(e){return this.insert(this._data.length,e)},_createNewModel:function(e){return this.reader.model?new this.reader.model(e):new Wt(e)},insert:function(e,t){return t||(t=e,e=0),t instanceof jt||(t=this._createNewModel(t)),this._isServerGrouped()?this._data.splice(e,0,T(this.group(),t)):this._data.splice(e,0,t),t},remove:function(e){var n,i=this,a=i._isServerGrouped();return this._eachItem(i._data,function(r){return n=C(r,e),n&&a?(n.isNew&&n.isNew()||i._destroyed.push(n),!0):t}),e},sync:function(){var t,n,i,a=this,r=[],o=[],s=a._destroyed,l=a._flatData(a._data);if(a.reader.model){for(t=0,n=l.length;n>t;t++)l[t].isNew()?r.push(l[t]):l[t].dirty&&o.push(l[t]);i=a._send("create",r),i.push.apply(i,a._send("update",o)),i.push.apply(i,a._send("destroy",s)),e.when.apply(null,i).then(function(){var e,t;for(e=0,t=arguments.length;t>e;e++)a._accept(arguments[e]);a._change({action:"sync"}),a.trigger(_t)})}},cancelChanges:function(e){var t=this;e instanceof st.data.Model?t._cancelModel(e):(t._destroyed=[],t._data=t._observe(t._pristineData),t.options.serverPaging&&(t._total=t.reader.total(t._pristine)),t._change())},hasChanges:function(){var e,t,n=this._data;if(this._destroyed.length)return!0;for(e=0,t=n.length;t>e;e++)if(n[e].isNew()||n[e].dirty)return!0;return!1},_accept:function(t){var n,i=this,a=t.models,r=t.response,o=0,s=i._isServerGrouped(),l=i._pristineData,d=t.type;if(i.trigger(xt,{response:r,type:d}),r&&!tt(r)){if(r=i.reader.parse(r),i._handleCustomErrors(r))return;r=i.reader.data(r),e.isArray(r)||(r=[r])}else r=e.map(a,function(e){return e.toJSON()});for("destroy"===d&&(i._destroyed=[]),o=0,n=a.length;n>o;o++)"destroy"!==d?(a[o].accept(r[o]),"create"===d?l.push(s?T(i.group(),a[o]):r[o]):"update"===d&&i._updatePristineForModel(a[o],r[o])):i._removePristineForModel(a[o])},_updatePristineForModel:function(e,t){this._executeOnPristineForModel(e,function(e,n){st.deepExtend(n[e],t)})},_executeOnPristineForModel:function(e,n){this._eachPristineItem(function(i){var a=S(i,e);return a>-1?(n(a,i),!0):t})},_removePristineForModel:function(e){this._executeOnPristineForModel(e,function(e,t){t.splice(e,1)})},_readData:function(e){var t=this._isServerGrouped()?this.reader.groups:this.reader.data;return t(e)},_eachPristineItem:function(e){this._eachItem(this._pristineData,e)},_eachItem:function(e,t){e&&e.length&&(this._isServerGrouped()?x(e,t):t(e))},_pristineForModel:function(e){var n,i,a=function(a){return i=S(a,e),i>-1?(n=a[i],!0):t};return this._eachPristineItem(a),n},_cancelModel:function(e){var t,n=this._pristineForModel(e);this._eachItem(this._data,function(i){t=D(i,e),-1!=t&&(!e.isNew()&&n?i[t].accept(n):i.splice(t,1))})},_promise:function(t,n,i){var a=this,r=a.transport;return e.Deferred(function(e){a.trigger(yt,{type:i}),r[i].call(r,X({success:function(t){e.resolve({response:t,models:n,type:i})},error:function(t,n,i){e.reject(t),a.error(t,n,i)}},t))}).promise()},_send:function(e,t){var n,i,a=this,r=[],o=a.reader.serialize(h(t));if(a.options.batch)t.length&&r.push(a._promise({data:{models:o}},t,e));else for(n=0,i=t.length;i>n;n++)r.push(a._promise({data:o[n]},[t[n]],e));return r},read:function(e){var t=this,n=t._params(e);t._queueRequest(n,function(){t.trigger(yt,{type:"read"})?t._dequeueRequest():(t.trigger(wt),t._ranges=[],t.transport.read({data:n,success:Z(t.success,t),error:Z(t.error,t)}))})},success:function(n){var i=this,a=i.options;return i.trigger(xt,{response:n,type:"read"}),n=i.reader.parse(n),i._handleCustomErrors(n)?(i._dequeueRequest(),t):(i._pristine=et(n)?e.extend(!0,{},n):n.slice?n.slice(0):n,i._total=i.reader.total(n),i._aggregate&&a.serverAggregates&&(i._aggregateResult=i.reader.aggregates(n)),n=i._readData(n),i._pristineData=n.slice(0),i._data=i._observe(n),i._addRange(i._data),i._process(i._data),i._dequeueRequest(),t)},_addRange:function(e){var t=this,n=t._skip||0,i=n+t._flatData(e).length;t._ranges.push({start:n,end:i,data:e}),t._ranges.sort(function(e,t){return e.start-t.start})},error:function(e,t,n){this._dequeueRequest(),this.trigger(xt,{}),this.trigger(bt,{xhr:e,status:t,errorThrown:n})},_params:function(e){var t=this,n=X({take:t.take(),skip:t.skip(),page:t.page(),pageSize:t.pageSize(),sort:t._sort,filter:t._filter,group:t._group,aggregate:t._aggregate},e);return t.options.serverPaging||(delete n.take,delete n.skip,delete n.page,delete n.pageSize),t.options.serverGrouping?t.reader.model&&n.group&&(n.group=H(n.group,t.reader.model)):delete n.group,t.options.serverFiltering?t.reader.model&&n.filter&&(n.filter=z(n.filter,t.reader.model)):delete n.filter,t.options.serverSorting?t.reader.model&&n.sort&&(n.sort=H(n.sort,t.reader.model)):delete n.sort,t.options.serverAggregates?t.reader.model&&n.aggregate&&(n.aggregate=H(n.aggregate,t.reader.model)):delete n.aggregate,n},_queueRequest:function(e,n){var i=this;i._requestInProgress?i._pending={callback:Z(n,i),options:e}:(i._requestInProgress=!0,i._pending=t,n())},_dequeueRequest:function(){var e=this;e._requestInProgress=!1,e._pending&&e._queueRequest(e._pending.options,e._pending.callback)},_handleCustomErrors:function(e){if(this.reader.errors){var t=this.reader.errors(e);if(t)return this.trigger(bt,{xhr:null,status:"customerror",errorThrown:"custom error",errors:t}),!0}return!1},_observe:function(e){var t=this,n=t.reader.model,i=!1;return n&&e.length&&(i=!(e[0]instanceof n)),e instanceof Vt?i&&(e.type=t.reader.model,e.wrapAll(e,e)):(e=new Vt(e,t.reader.model),e.parent=function(){return t.parent()}),t._isServerGrouped()&&w(e,n),t._changeHandler&&t._data&&t._data instanceof Vt?t._data.unbind(vt,t._changeHandler):t._changeHandler=Z(t._change,t),e.bind(vt,t._changeHandler)},_change:function(e){var t,n,i,a=this,r=e?e.action:"";if("remove"===r)for(t=0,n=e.items.length;n>t;t++)e.items[t].isNew&&e.items[t].isNew()||a._destroyed.push(e.items[t]);!a.options.autoSync||"add"!==r&&"remove"!==r&&"itemchange"!==r?(i=parseInt(a._total||a.reader.total(a._pristine),10),"add"===r?i+=e.items.length:"remove"===r?i-=e.items.length:"itemchange"===r||"sync"===r||a.options.serverPaging||(i=a.reader.total(a._pristine)),a._total=i,a._process(a._data,e)):a.sync()},_process:function(e,n){var i,a=this,o={};a.options.serverPaging!==!0&&(o.skip=a._skip,o.take=a._take||a._pageSize,o.skip===t&&a._page!==t&&a._pageSize!==t&&(o.skip=(a._page-1)*a._pageSize)),a.options.serverSorting!==!0&&(o.sort=a._sort),a.options.serverFiltering!==!0&&(o.filter=a._filter),a.options.serverGrouping!==!0&&(o.group=a._group),a.options.serverAggregates!==!0&&(o.aggregate=a._aggregate,a._aggregateResult=m(e,o)),i=r.process(e,o),a._view=i.data,i.total===t||a.options.serverFiltering||(a._total=i.total),n=n||{},n.items=n.items||a._view,a.trigger(vt,n)},_mergeState:function(e){var n=this;return e!==t&&(n._pageSize=e.pageSize,n._page=e.page,n._sort=e.sort,n._filter=e.filter,n._group=e.group,n._aggregate=e.aggregate,n._skip=e.skip,n._take=e.take,n._skip===t&&(n._skip=n.skip(),e.skip=n.skip()),n._take===t&&n._pageSize!==t&&(n._take=n._pageSize,e.take=n._take),e.sort&&(n._sort=e.sort=o(e.sort)),e.filter&&(n._filter=e.filter=l(e.filter)),e.group&&(n._group=e.group=c(e.group)),e.aggregate&&(n._aggregate=e.aggregate=d(e.aggregate))),e },query:function(e){var n,i=this,a=i.options.serverSorting||i.options.serverPaging||i.options.serverFiltering||i.options.serverGrouping||i.options.serverAggregates;a||(i._data===t||0===i._data.length)&&!i._destroyed.length?i.read(i._mergeState(e)):i.trigger(yt,{type:"read"})||(i.trigger(wt),n=r.process(i._data,i._mergeState(e)),i.options.serverFiltering||(i._total=n.total!==t?n.total:i._data.length),i._view=n.data,i._aggregateResult=m(i._data,e),i.trigger(xt,{}),i.trigger(vt,{items:n.data}))},fetch:function(t){var n=this;return e.Deferred(function(e){var i=function(i){n.unbind(bt,a),e.resolve(),t&&t.call(n,i)},a=function(t){e.reject(t)};n.one(vt,i),n.one(bt,a),n._query()}).promise()},_query:function(e){var t=this;t.query(X({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate()},e))},next:function(e){var n=this,i=n.page(),a=n.total();return e=e||{},!i||a&&i+1>n.totalPages()?t:(n._skip=i*n.take(),i+=1,e.page=i,n._query(e),i)},prev:function(e){var n=this,i=n.page();return e=e||{},i&&1!==i?(n._skip=n._skip-n.take(),i-=1,e.page=i,n._query(e),i):t},page:function(e){var n,i=this;return e!==t?(e=Ft.max(Ft.min(Ft.max(e,1),i.totalPages()),1),i._query({page:e}),t):(n=i.skip(),n!==t?Ft.round((n||0)/(i.take()||1))+1:t)},pageSize:function(e){var n=this;return e!==t?(n._query({pageSize:e,page:1}),t):n.take()},sort:function(e){var n=this;return e!==t?(n._query({sort:e}),t):n._sort},filter:function(e){var n=this;return e===t?n._filter:(n._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(){return this._aggregateResult},totalPages:function(){var e=this,t=e.pageSize()||e.total();return Ft.ceil((e.total()||0)/t)},inRange:function(e,t){var n=this,i=Ft.min(e+t,n.total());return!n.options.serverPaging&&n.data.length>0?!0:n._findRange(e,i).length>0},lastRange:function(){var e=this._ranges;return e[e.length-1]||{start:0,end:0,data:[]}},firstItemUid:function(){var e=this._ranges;return e.length&&e[0].data.length&&e[0].data[0].uid},range:function(e,n){var i,a,r,o,s,l,d;if(e=Ft.min(e||0,this.total()),a=this,r=Ft.max(Ft.floor(e/n),0)*n,o=Ft.min(r+n,a.total()),i=a._findRange(e,Ft.min(e+n,a.total())),i.length){a._skip=e>a.skip()?Ft.min(o,(a.totalPages()-1)*a.take()):r,a._take=n,s=a.options.serverPaging,l=a.options.serverSorting,d=a.options.serverFiltering;try{a.options.serverPaging=!0,a._isServerGrouped()||a.group()&&a.group().length||(a.options.serverSorting=!0),a.options.serverFiltering=!0,s&&(a._data=i=a._observe(i)),a._process(i)}finally{a.options.serverPaging=s,a.options.serverSorting=l,a.options.serverFiltering=d}}else n!==t&&(a._rangeExists(r,o)?e>r&&a.prefetch(o,n,function(){a.range(e,n)}):a.prefetch(r,n,function(){e>r&&oa;a++)if(i=k[a],e>=i.start&&e<=i.end){for(m=0,s=a;g>s;s++)if(i=k[s],h=_._flatData(i.data),h.length&&e+m>=i.start&&(u=i.data,p=i.end,w||(v=c(_.group()||[]).concat(o(_.sort()||[])),f=r.process(i.data,{sort:v,filter:_.filter()}),h=u=f.data,f.total!==t&&(p=f.total)),l=0,e+m>i.start&&(l=e+m-i.start),d=h.length,p>n&&(d-=p-n),m+=d-l,b=_._mergeGroups(b,u,l,d),n<=i.end&&m==n-e))return b;break}return[]},_mergeGroups:function(e,t,n,i){if(this._isServerGrouped()){var a,r=t.toJSON();return e.length&&(a=e[e.length-1]),b(a,r,n,i),e.concat(r)}return e.concat(t.slice(n,i))},skip:function(){var e=this;return e._skip===t?e._page!==t?(e._page-1)*(e.take()||1):t:e._skip},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(e,t,n){var i=this;return function(a){var r,o,s=!1,l={start:e,end:t,data:[]};for(i._dequeueRequest(),r=0,o=i._ranges.length;o>r;r++)if(i._ranges[r].start===e){s=!0,l=i._ranges[r];break}s||i._ranges.push(l),i.trigger(xt,{response:a,type:"read"}),a=i.reader.parse(a),l.data=i._observe(i._readData(a)),l.end=l.start+i._flatData(l.data).length,i._ranges.sort(function(e,t){return e.start-t.start}),i._total=i.reader.total(a),n&&n()}},prefetch:function(e,t,n){var i=this,a=Ft.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,a)?n&&n():(clearTimeout(i._timeout),i._timeout=setTimeout(function(){i._queueRequest(r,function(){i.trigger(yt,{type:"read"})?i._dequeueRequest():i.transport.read({data:i._params(r),success:i._prefetchSuccessHandler(e,a,n)})})},100))},_rangeExists:function(e,t){var n,i,a=this,r=a._ranges;for(n=0,i=r.length;i>n;n++)if(r[n].start<=e&&r[n].end>=t)return!0;return!1}}),Y={},Y.create=function(e,t){var n,i=e.transport;return i?(i.read=typeof i.read===ut?{url:i.read}:i.read,e.type&&(st.data.transports[e.type]&&!et(st.data.transports[e.type])?n=new st.data.transports[e.type](X(i,{data:t})):i=X(!0,{},st.data.transports[e.type],i),e.schema=X(!0,{},st.data.schemas[e.type],e.schema)),n||(n=lt(i.read)?i:new U(i))):n=new W({data:e.data}),n},G.create=function(e){e=e&&e.push?{data:e}:e;var t,n,i,a=e||{},r=a.data,o=a.fields,s=a.table,l=a.select,d={};if(r||!o||a.transport||(s?r=M(s,o):l&&(r=A(l,o))),st.data.Model&&o&&(!a.schema||!a.schema.model)){for(t=0,n=o.length;n>t;t++)i=o[t],i.type&&(d[i.field]=i);tt(d)||(a.schema=X(!0,a.schema,{model:{fields:d}}))}return a.data=r,a instanceof G?a:new G(a)},$=jt.define({init:function(e){var t=this,n=t.hasChildren||e&&e.hasChildren,i="items",a={};st.data.Model.fn.init.call(t,e),typeof t.children===ut&&(i=t.children),a={schema:{data:i,model:{hasChildren:n,id:t.idField}}},typeof t.children!==ut&&X(a,t.children),a.data=e,n||(n=a.schema.data),typeof n===ut&&(n=st.getter(n)),lt(n)&&(t.hasChildren=!!n.call(t,t)),t._childrenOptions=a,t.hasChildren&&t._initChildren(),t._loaded=!(!e||!e[i]&&!e._loaded)},_initChildren:function(){var e,t,n,i=this;i.children instanceof K||(e=i.children=new K(i._childrenOptions),t=e.transport,n=t.parameterMap,t.parameterMap=function(e){return e[i.idField||"id"]=i.id,n&&(e=n(e)),e},e.parent=function(){return i},e.bind(vt,function(e){e.node=e.node||i,i.trigger(vt,e)}),e.bind(bt,function(e){var t=i.parent();t&&(e.node=e.node||i,t.trigger(bt,e))}),i._updateChildrenField())},append:function(e){this._initChildren(),this.loaded(!0),this.children.add(e)},hasChildren:!1,level:function(){for(var e=this.parentNode(),t=0;e&&e.parentNode;)t++,e=e.parentNode?e.parentNode():null;return t},_updateChildrenField:function(){var e=this._childrenOptions.schema.data;this[e||"items"]=this.children.data()},load:function(){var e=this,n={};e.hasChildren?(e._initChildren(),n[e.idField||"id"]=e.id,e._loaded||(e.children._data=t),e.children.one(vt,function(){e._loaded=!0,e._updateChildrenField()})._query(n)):e.loaded(!0)},parentNode:function(){var e=this.parent();return e.parent()},loaded:function(e){return e===t?this._loaded:(this._loaded=e,t)},shouldSerialize:function(e){return jt.fn.shouldSerialize.call(this,e)&&"children"!==e&&"_loaded"!==e&&"hasChildren"!==e&&"_childrenOptions"!==e}}),K=G.extend({init:function(e){var t=$.define({children:e});G.fn.init.call(this,X(!0,{},{schema:{modelBase:t,model:t}},e)),this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var e=this;e._data.bind(bt,function(t){e.trigger(bt,t)})},remove:function(e){var t,n=e.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),t=G.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:I("success"),data:I("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),G.fn.insert.call(this,e,t)},_find:function(e,t){var n,i,a,r,o;if(a=G.fn[e].call(this,t))return a;if(r=this._flatData(this.data()))for(n=0,i=r.length;i>n;n++)if(o=r[n].children,o instanceof K&&(a=o[e](t)))return a},get:function(e){return this._find("get",e)},getByUid:function(e){return this._find("getByUid",e)}}),K.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},n=t.data,i=t.fields,a=t.list;return n&&n._dataSource?n._dataSource:(n||!i||t.transport||a&&(n=R(a,i)),t.data=n,t instanceof K?t:new K(t))},Q=st.Observable.extend({init:function(e,t,n){st.Observable.fn.init.call(this),this._prefetching=!1,this.dataSource=e,this.prefetch=!n;var i=this;e.bind("change",function(){i._change()}),this._syncWithDataSource(),this.setViewSize(t)},setViewSize:function(e){this.viewSize=e,this._recalculate()},at:function(e){var n,i,a=this.pageSize;return e>=this.total()?(this.trigger("endreached",{index:e}),t):this.useRanges?(this.useRanges&&((ethis.skip+a)&&(i=Math.floor(e/a)*a,this.range(i)),e===this.prefetchThreshold&&this._prefetch(),e===this.midPageThreshold?this.range(this.nextMidRange):e===this.nextPageThreshold?this.range(this.nextFullRange):e===this.pullBackThreshold&&(this.offset===this.skip?this.range(this.previousMidRange):this.range(this.previousFullRange)),n=this.dataSource.at(e-this.dataOffset)),n===t&&this.trigger("endreached",{index:e}),n):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,i=Ft.max(Ft.floor(n/t),0)*t+t;this.offset=n,this.dataSource.prefetch(i,t,function(){e._goToRange(n,!0)})},range:function(e){if(this.offset!==e){var t=this,n=this.pageSize,i=Ft.max(Ft.floor(e/n),0)*n+n,a=this.dataSource;this.offset=e,this._recalculate(),a.inRange(e,n)?this._goToRange(e):this.prefetch&&a.prefetch(i,n,function(){t._goToRange(e,!0)})}},syncDataSource:function(){var e=this.offset;this.offset=null,this.range(e)},destroy:function(){this.unbind()},_prefetch:function(){var e=this,t=this.pageSize,n=this.skip+t,i=this.dataSource;i.inRange(n,t)||this._prefetching||!this.prefetch||(this._prefetching=!0,this.trigger("prefetching",{skip:n,take:t}),i.prefetch(n,t,function(){e._prefetching=!1,e.trigger("prefetched",{skip:n,take:t})}))},_goToRange:function(e,t){this.offset===e&&(this.dataOffset=e,this._expanding=t,this.dataSource.range(e,this.pageSize))},_change:function(){var e=this.dataSource,t=e.firstItemUid();this.length=this.useRanges?e.lastRange().end:e.view().length,this._firstItemUid===t&&this.useRanges||(this._syncWithDataSource(),this._recalculate(),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(2*(e/3)),this.pullBackThreshold=this.offset-1,this.nextMidRange=i+e-n,this.nextFullRange=i,this.previousMidRange=t-n,this.previousFullRange=i-e}}),J=st.Observable.extend({init:function(e,t){var n=this;st.Observable.fn.init.call(n),this.dataSource=e,this.batchSize=t,this._total=0,this.buffer=new Q(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 n,i,a=this.buffer,r=e*this.batchSize,o=this.batchSize,s=[];for(a.offset>r&&a.at(a.offset-1),i=0;o>i&&(n=a.at(r+i),n!==t);i++)s.push(n);return s},total:function(){return this._total},destroy:function(){this.buffer.destroy(),this.unbind()}}),X(!0,st.data,{readers:{json:j},Query:r,DataSource:G,HierarchicalDataSource:K,Node:$,ObservableObject:Wt,ObservableArray:Vt,LocalTransport:W,RemoteTransport:U,Cache:q,DataReader:j,Model:jt,Buffer:Q,BatchBuffer:J})}(window.kendo.jQuery),function(e,t){function n(e){var t,i,a=[];for(t=0,i=e.length;i>t;t++)a=e[t].hasSubgroups?a.concat(n(e[t].items)):a.concat.apply(a,e[t].items);return a}function i(e,n){var i=w.initWidget(e,{},n);return i?new k(i):t}function a(e){var t,n,i,r,o,s,l,d={};for(l=e.match(b),t=0,n=l.length;n>t;t++)i=l[t],r=i.indexOf(":"),o=i.substring(0,r),s=i.substring(r+1),"{"==s.charAt(0)&&(s=a(s)),d[o]=s;return d}function r(e,t,n){var i,a={};for(i in e)a[i]=new n(t,e[i]);return a}function o(e,t,n,s){var d,c,u,p=e.getAttribute("data-"+w.ns+"role"),f=e.getAttribute("data-"+w.ns+"bind"),v=e.children,k=[],b=!0,x={};if(s=s||[t],(p||f)&&l(e),p&&(u=i(e,n)),f&&(f=a(f.replace(y,"")),u||(x=w.parseOptions(e,{textField:"",valueField:"",template:"",valueUpdate:R,valuePrimitive:!1,autoBind:!0}),x.roles=n,u=new _(e,x)),u.source=t,c=r(f,s,h),x.template&&(c.template=new g(s,"",x.template)),c.click&&(f.events=f.events||{},f.events.click=f.click,delete c.click),c.source&&(b=!1),f.attr&&(c.attr=r(f.attr,s,h)),f.style&&(c.style=r(f.style,s,h)),f.events&&(c.events=r(f.events,s,m)),u.bind(c)),u&&(e.kendoBindingTarget=u),b&&v){for(d=0;di;i++)r=t[i],1===r.nodeType&&o(r,n,s)}function l(t){var n=t.kendoBindingTarget;n&&(n.destroy(),e.support.deleteExpando?delete t.kendoBindingTarget:t.removeAttribute?t.removeAttribute("kendoBindingTarget"):t.kendoBindingTarget=null)}function d(e){l(e),c(e)}function c(e){var t,n,i=e.children;if(i)for(t=0,n=i.length;n>t;t++)d(i[t])}function u(t){var n,i;for(t=e(t),n=0,i=t.length;i>n;n++)d(t[n])}function p(e,t){var n=e.element,i=n[0].kendoBindingTarget;i&&s(n,i.source,t)}var f,h,m,g,v,_,k,b,y,w=window.kendo,x=w.Observable,C=w.data.ObservableObject,T=w.data.ObservableArray,S={}.toString,D={},F=Array.prototype.splice,E=w.Class,z=e.proxy,H="value",A="source",M="events",I="checked",R="change";!function(){var e=document.createElement("a");e.innerText!==t?f="innerText":e.textContent!==t&&(f="textContent")}(),h=x.extend({init:function(e,t){var n=this;x.fn.init.call(n),n.source=e[0],n.parents=e,n.path=t,n.dependencies={},n.dependencies[t]=!0,n.observable=n.source instanceof x,n._access=function(e){n.dependencies[e.field]=!0},n.observable&&(n._change=function(e){n.change(e)},n.source.bind(R,n._change))},_parents:function(){var t,n=this.parents,i=this.get();return i&&"function"==typeof i.parent&&(t=i.parent(),e.inArray(t,n)<0&&(n=[t].concat(n))),n},change:function(e){var t,n,i=e.field,a=this;if("this"===a.path)a.trigger(R,e);else for(t in a.dependencies)if(0===t.indexOf(i)&&(n=t.charAt(i.length),!n||"."===n||"["===n)){a.trigger(R,e);break}},start:function(e){e.bind("get",this._access)},stop:function(e){e.unbind("get",this._access)},get:function(){var e=this,n=e.source,i=0,a=e.path,r=n;if(!e.observable)return r;for(e.start(e.source),r=n.get(a);r===t&&n;)n=e.parents[++i],n instanceof C&&(r=n.get(a));if(r===t)for(n=e.source;r===t&&n;)n=n.parent(),n instanceof C&&(r=n.get(a));return"function"==typeof r&&(i=a.lastIndexOf("."),i>0&&(n=n.get(a.substring(0,i))),e.start(n),r=r.call(n,e.source),e.stop(n)),n&&n!==e.source&&(e.currentSource=n,n.unbind(R,e._change).bind(R,e._change)),e.stop(e.source),r},set:function(e){var t=this,n=t.currentSource||t.source;n.set(t.path,e)},destroy:function(){this.observable&&this.source.unbind(R,this._change)}}),m=h.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 C&&(e=t.get(n));return z(e,t)}}),g=h.extend({init:function(e,t,n){var i=this;h.fn.init.call(i,e,t),i.template=n},render:function(e){var t;return this.start(this.source),t=w.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(R,function(e){n.refresh(t||e)}),n.refresh(t)},destroy:function(){}}),D.attr=v.extend({refresh:function(e){this.element.setAttribute(e,this.bindings.attr[e].get())}}),D.style=v.extend({refresh:function(e){this.element.style[e]=this.bindings.style[e].get()||""}}),D.enabled=v.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),D.readonly=v.extend({refresh:function(){this.bindings.readonly.get()?this.element.setAttribute("readonly","readonly"):this.element.removeAttribute("readonly")}}),D.disabled=v.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),D.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],a=this.handlers[t];a&&n.off(t,a),a=this.handlers[t]=i.get(),n.on(t,i.source,a)},destroy:function(){var t,n=e(this.element);for(t in this.handlers)n.off(t,this.handlers[t])}}),D.text=v.extend({refresh:function(){var e=this.bindings.text.get();null==e&&(e=""),this.element[f]=e}}),D.visible=v.extend({refresh:function(){this.element.style.display=this.bindings.visible.get()?"":"none"}}),D.invisible=v.extend({refresh:function(){this.element.style.display=this.bindings.invisible.get()?"none":""}}),D.html=v.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),D.value=v.extend({init:function(t,n,i){v.fn.init.call(this,t,n,i),this._change=z(this.change,this),this.eventName=i.valueUpdate||R,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){var e,t;this._initChange=this.eventName!=R,e=this.element.value,t=this.element.type,"date"==t?e=w.parseDate(e,"yyyy-MM-dd"):"datetime-local"==t?e=w.parseDate(e,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==t&&(e=w.parseFloat(e)),this.bindings[H].set(e),this._initChange=!1},refresh:function(){var e,t;this._initChange||(e=this.bindings[H].get(),null==e&&(e=""),t=this.element.type,"date"==t?e=w.toString(e,"yyyy-MM-dd"):"datetime-local"==t&&(e=w.toString(e,"yyyy-MM-ddTHH:mm:ss")),this.element.value=e),this._initChange=!1},destroy:function(){e(this.element).off(this.eventName,this._change)}}),D.source=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n);var i=this.bindings.source.get();i instanceof w.data.DataSource&&n.autoBind!==!1&&i.fetch()},refresh:function(e){var t=this,n=t.bindings.source.get();n instanceof T||n instanceof w.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?w.format('',e.valueField||e.textField,e.textField||e.valueField):"":"tbody"==n?"#:data#":"ul"==n||"ol"==n?"
  • #:data#
  • ":"#:data#",t=w.template(t)),t},destroy:function(){var e=this.bindings.source.get();e.unbind(R,this._change)},add:function(t,n){var i,a,r,s,l=this.container(),d=l.cloneNode(!1),c=l.children[t];if(e(d).html(w.render(this.template(),n)),d.children.length)for(i=this.bindings.source._parents(),a=0,r=n.length;r>a;a++)s=d.children[0],l.insertBefore(s,c||null),o(s,n[a],this.options.roles,[n[a]].concat(i))},remove:function(e,t){var n,i,a=this.container();for(n=0;nn;n++)o(s.children[n],r[n],this.options.roles,[r[n]].concat(t))}else e(s).html(w.render(l,r))}}),D.input={checked:v.extend({init:function(t,n,i){v.fn.init.call(this,t,n,i),this._change=z(this.change,this),e(this.element).change(this._change)},change:function(){var e,t,n=this.element,i=this.value();"radio"==n.type?this.bindings[I].set(i):"checkbox"==n.type&&(e=this.bindings[I].get(),e instanceof T?(i=this.element.value,"on"!==i&&"off"!==i&&(t=e.indexOf(i),t>-1?e.splice(t,1):e.push(i))):this.bindings[I].set(i))},refresh:function(){var e=this.bindings[I].get(),t=e,n=this.element;"checkbox"==n.type?(t instanceof T&&(e=this.element.value,t.indexOf(e)>=0&&(e=!0)),n.checked=e===!0):"radio"==n.type&&null!=e&&n.value===""+e&&(n.checked=!0)},value:function(){var e=this.element,t=e.value;return"checkbox"==e.type&&(t=e.checked),t},destroy:function(){e(this.element).off(R,this._change)}})},D.select={value:v.extend({init:function(t,n,i){v.fn.init.call(this,t,n,i),this._change=z(this.change,this),e(this.element).change(this._change)},change:function(){var e,t,n,i,a,r,o=[],s=this.element,l=this.options.valueField||this.options.textField,d=this.options.valuePrimitive;for(a=0,r=s.options.length;r>a;a++)t=s.options[a],t.selected&&(i=t.attributes.value,i=i&&i.specified?t.value:t.text,o.push(i));if(l)for(e=this.bindings.source.get(),n=0;na;a++)if(e[a].get(l)==o[n]){o[n]=e[a];break}i=this.bindings[H].get(),i instanceof T?i.splice.apply(i,[0,i.length].concat(o)):d||!(i instanceof C)&&l?this.bindings[H].set(o[0].get(l)):this.bindings[H].set(o[0])},refresh:function(){var e,t,n,i=this.element,a=i.options,r=this.bindings[H].get(),o=r,s=this.options.valueField||this.options.textField,l=!1;for(o instanceof T||(o=new T([r])),i.selectedIndex=-1,n=0;ne;e++)d(i[e])},_ns:function(t){t=t||w.ui;var n=[w.ui,w.dataviz.ui,w.mobile.ui];return n.splice(e.inArray(t,n),1),n.unshift(t),w.rolesFromNamespaces(n)},dataBound:function(e){var t,i,a,r=this.widget,s=r.items(),l=r.dataSource,d=l.view(),c=l.group()||[];if(s.length)for(c.length&&(d=n(d)),a=this.bindings.source._parents(),t=0,i=d.length;i>t;t++)o(s[t],d[t],this._ns(e.ns),[d[t]].concat(a))},refresh:function(e){var t,n=this,i=n.widget;e=e||{},e.action||(n.destroy(),i.bind("dataBinding",n._dataBinding),i.bind("dataBound",n._dataBound),i.bind("itemChange",n._itemChange),t=n.bindings.source.get(),i.dataSource instanceof w.data.DataSource&&i.dataSource!=t&&(t instanceof w.data.DataSource?i.setDataSource(t):t&&t._dataSource?i.setDataSource(t._dataSource):i.dataSource.data(t)))},destroy:function(){var e=this.widget;e.unbind("dataBinding",this._dataBinding),e.unbind("dataBound",this._dataBound),e.unbind("itemChange",this._itemChange)}}),value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(R,this._change);var a=this.bindings.value.get();this._valueIsObservableObject=!i.valuePrimitive&&(null==a||a instanceof C),this._valueIsObservableArray=a instanceof T,this._initChange=!1},change:function(){var e,t,n,i,a,r,o,s=this.widget.value(),l=this.options.dataValueField||this.options.dataTextField,d="[object Array]"===S.call(s),c=this._valueIsObservableObject,u=[];if(this._initChange=!0,l)if(this.bindings.source&&(o=this.bindings.source.get()),""===s&&(c||this.options.valuePrimitive))s=null;else{for((!o||o instanceof w.data.DataSource)&&(o=this.widget.dataSource.view()),d&&(t=s.length,u=s.slice(0)),a=0,r=o.length;r>a;a++)if(n=o[a],i=n.get(l),d){for(e=0;t>e;e++)if(i==u[e]){u[e]=n;break}}else if(i==s){s=c?n:i;break}u[0]&&(s=this._valueIsObservableArray?u:c||!l?u[0]:u[0].get(l))}this.bindings.value.set(s),this._initChange=!1},refresh:function(){if(!this._initChange){var e,t=this.options.dataValueField||this.options.dataTextField,n=this.bindings.value.get(),i=0,a=[];if(t)if(n instanceof T){for(e=n.length;e>i;i++)a[i]=n[i].get(t);n=a}else n instanceof C&&(n=n.get(t));this.widget.value(n)}this._initChange=!1},destroy:function(){this.widget.unbind(R,this._change)}}),multiselect:{value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(R,this._change),this._initChange=!1},change:function(){var e,t,n,i,a,r,o,s,l,d=this,c=d.bindings[H].get(),u=d.options.valuePrimitive,p=u?d.widget.value():d.widget.dataItems(),f=this.options.dataValueField||this.options.dataTextField;if(p=p.slice(0),d._initChange=!0,c instanceof T){for(e=[],t=p.length,n=0,i=0,a=c[n],r=!1;a;){for(l=!1,i=0;t>i;i++)if(u?r=p[i]==a:(s=p[i],s=s.get?s.get(f):s,r=s==(a.get?a.get(f):a)),r){p.splice(i,1),t-=1,l=!0;break}l?n+=1:(e.push(a),F.call(c,n,1),o=n),a=c[n]}F.apply(c,[c.length,0].concat(p)),e.length&&c.trigger("change",{action:"remove",items:e,index:o}),p.length&&c.trigger("change",{action:"add",items:p,index:c.length-1})}else d.bindings[H].set(p);d._initChange=!1},refresh:function(){if(!this._initChange){var e,t,n=this.options.dataValueField||this.options.dataTextField,i=this.bindings.value.get(),a=0,r=[];if(n)if(i instanceof T){for(e=i.length;e>a;a++)t=i[a],r[a]=t.get?t.get(n):t;i=r}else i instanceof C&&(i=i.get(n));this.widget.value(i)}},destroy:function(){this.widget.unbind(R,this._change)}})}},_=E.extend({init:function(e,t){this.target=e,this.options=t,this.toDestroy=[]},bind:function(e){var t,n,i,a,r=this.target.nodeName.toLowerCase(),o=D[r]||{};for(t in e)t==H?n=!0:t==A?i=!0:t==M?a=!0:this.applyBinding(t,e,o);i&&this.applyBinding(A,e,o),n&&this.applyBinding(H,e,o),a&&this.applyBinding(M,e,o)},applyBinding:function(e,t,n){var i,a=n[e]||D[e],r=this.toDestroy,o=t[e];if(a)if(a=new a(this.target,t,this.options),r.push(a),o instanceof h)a.bind(o),r.push(o);else for(i in o)a.bind(o,i),r.push(o[i]);else if("template"!==e)throw Error("The "+e+" binding is not supported by the "+this.target.nodeName.toLowerCase()+" element")},destroy:function(){var e,t,n=this.toDestroy;for(e=0,t=n.length;t>e;e++)n[e].destroy()}}),k=_.extend({bind:function(e){var t,n=this,i=!1,a=!1,r=D.widget[n.target.options.name.toLowerCase()]||{};for(t in e)t==H?i=!0:t==A?a=!0:n.applyBinding(t,e);a&&n.applyBinding(A,e),i&&n.applyBinding(H,e,r[H])},applyBinding:function(e,t,n){var i,a=n||D.widget[e],r=this.toDestroy,o=t[e];if(!a)throw Error("The "+e+" binding is not supported by the "+this.target.options.name+" widget");if(a=new a(this.target,t,this.target.options),r.push(a),o instanceof h)a.bind(o),r.push(o);else for(i in o)a.bind(o,i),r.push(o[i])}}),b=/[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g,y=/\s/g,w.unbind=u,w.bind=s,w.data.binders=D,w.data.Binder=v,w.notify=p,w.observable=function(e){return e instanceof C||(e=new C(e)),e},w.observableHierarchy=function(e){function t(e){var n,i;for(n=0;n")}function i(e){return e=(e+"").split("."),e.length>1?e[1].length:0}function a(t){return e.parseHTML?e(e.parseHTML(t)):e(t)}var r,o=window.kendo,s=o.ui.Widget,l=".kendoValidator",d="k-invalid-msg",c=RegExp(d,"i"),u="k-invalid",p=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,f=/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,h=":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",m=":checkbox:not([disabled],[readonly])",g="[type=number],[type=range]",v="blur",_="name",k="form",b="novalidate",y=e.proxy,w=function(e,t){return"string"==typeof t&&(t=RegExp("^(?:"+t+")$")),t.test(e) },x=function(e,t,n){var i=e.val();return e.filter(t).length&&""!==i?w(i,n):!0},C=function(e,t){return e.length?null!=e[0].attributes[t]:!1};o.ui.validator||(o.ui.validator={rules:{},messages:{}}),r=s.extend({init:function(n,i){var a=this,r=t(n);i=i||{},i.rules=e.extend({},o.ui.validator.rules,r.rules,i.rules),i.messages=e.extend({},o.ui.validator.messages,r.messages,i.messages),s.fn.init.call(a,n,i),a._errorTemplate=o.template(a.options.errorTemplate),a.element.is(k)&&a.element.attr(b,b),a._errors={},a._attachEvents()},events:["validate"],options:{name:"Validator",errorTemplate:' #=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"},rules:{required:function(e){var t=e.filter("[type=checkbox]").length&&!e.is(":checked"),n=e.val();return!(C(e,"required")&&(""===n||!n||t))},pattern:function(e){return e.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length&&""!==e.val()?w(e.val(),e.attr("pattern")):!0},min:function(e){if(e.filter(g+",["+o.attr("type")+"=number]").filter("[min]").length&&""!==e.val()){var t=parseFloat(e.attr("min"))||0,n=o.parseFloat(e.val());return n>=t}return!0},max:function(e){if(e.filter(g+",["+o.attr("type")+"=number]").filter("[max]").length&&""!==e.val()){var t=parseFloat(e.attr("max"))||0,n=o.parseFloat(e.val());return t>=n}return!0},step:function(e){if(e.filter(g+",["+o.attr("type")+"=number]").filter("[step]").length&&""!==e.val()){var t,n=parseFloat(e.attr("min"))||0,a=parseFloat(e.attr("step"))||1,r=parseFloat(e.val()),s=i(a);return s?(t=Math.pow(10,s),0===(r-n)*t%(a*t)/Math.pow(100,s)):0===(r-n)%a}return!0},email:function(e){return x(e,"[type=email],["+o.attr("type")+"=email]",p)},url:function(e){return x(e,"[type=url],["+o.attr("type")+"=url]",f)},date:function(e){return e.filter("[type^=date],["+o.attr("type")+"=date]").length&&""!==e.val()?null!==o.parseDate(e.val(),e.attr(o.attr("format"))):!0}},validateOnBlur:!0},destroy:function(){s.fn.destroy.call(this),this.element.off(l)},_submit:function(e){return this.validate()?!0:(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault(),!1)},_attachEvents:function(){var t=this;t.element.is(k)&&t.element.on("submit"+l,y(t._submit,t)),t.options.validateOnBlur&&(t.element.is(h)?(t.element.on(v+l,function(){t.validateInput(t.element)}),t.element.is(m)&&t.element.on("click"+l,function(){t.validateInput(t.element)})):(t.element.on(v+l,h,function(){t.validateInput(e(this))}),t.element.on("click"+l,m,function(){t.validateInput(e(this))})))},validate:function(){var e,t,n,i,a=!1;if(this._errors={},this.element.is(h))a=this.validateInput(this.element);else{for(i=!1,e=this.element.find(h),t=0,n=e.length;n>t;t++)this.validateInput(e.eq(t))||(i=!0);a=!i}return this.trigger("validate",{valid:a}),a},validateInput:function(t){var i,r,o,s,l,c,p,f,h;return t=e(t),r=this,o=r._errorTemplate,s=r._checkValidity(t),l=s.valid,c="."+d,p=t.attr(_)||"",f=r._findMessageContainer(p).add(t.next(c)).hide(),t.removeAttr("aria-invalid"),l||(i=r._extractMessage(t,s.key),r._errors[p]=i,h=a(o({message:n(i)})),r._decorateMessageContainer(h,p),f.replaceWith(h).length||h.insertAfter(t),h.show(),t.attr("aria-invalid",!0)),t.toggleClass(u,!l),l},hideMessages:function(){var e=this,t="."+d,n=e.element;n.is(h)?n.next(t).hide():n.find(t).hide()},_findMessageContainer:function(t){var n,i,a,r,s,l=o.ui.validator.messageLocators,d=e(),u=this.element[0].getElementsByTagName("*");for(i=0,a=u.length;a>i;i++)r=u[i],c.test(r.className)&&(s=r.getAttribute(o.attr("for")),s===t&&(d=d.add(r)));for(n in l)d=d.add(l[n].locate(this.element,t));return d},_decorateMessageContainer:function(e,t){var n,i=o.ui.validator.messageLocators;e.addClass(d).attr(o.attr("for"),t||"");for(n in i)i[n].decorate(e,t);e.attr("role","alert")},_extractMessage:function(e,t){var n=this,i=n.options.messages[t],a=e.attr(_);return i=o.isFunction(i)?i(e):i,o.format(e.attr(o.attr(t+"-msg"))||e.attr("validationMessage")||e.attr("title")||i||"",a,e.attr(t))},_checkValidity:function(e){var t,n=this.options.rules;for(t in n)if(!n[t](e))return{valid:!1,key:t};return{valid:!0}},errors:function(){var e,t=[],n=this._errors;for(e in n)t.push(n[e]);return t}}),o.ui.plugin(r)}(window.kendo.jQuery),function(e){function t(e,t){var n=e.x.location,i=e.y.location,a=t.x.location,r=t.y.location,o=n-a,s=i-r;return{center:{x:(n+a)/2,y:(i+r)/2},distance:Math.sqrt(o*o+s*s)}}function n(e){var t,n,i,a=[],r=e.originalEvent,s=e.currentTarget,l=0;if(e.api)a.push({id:2,event:e,target:e.target,currentTarget:e.target,location:e});else if(e.type.match(/touch/))for(n=r?r.changedTouches:[],t=n.length;t>l;l++)i=n[l],a.push({location:i,event:e,target:i.target,currentTarget:s,id:i.identifier});else o.pointers||o.msPointers?a.push({location:r,event:e,target:e.target,currentTarget:s,id:r.pointerId}):a.push({id:1,event:e,target:e.target,currentTarget:s,location:e});return a}function i(t){var n,i,a;t.preventDefault(),n=e(t.data.root),i=n.closest(".k-widget").parent(),i[0]||(i=n.parent()),a=e.extend(!0,{},t,{target:n[0]}),i.trigger(e.Event(t.type,a))}function a(e){for(var t=r.eventMap.up.split(" "),n=0,i=t.length;i>n;n++)e(t[n])}var r=window.kendo,o=r.support,s=window.document,l=r.Class,d=r.Observable,c=e.now,u=e.extend,p=o.mobileOS,f=p&&p.android,h=800,m=o.browser.ie?5:0,g="press",v="hold",_="select",k="start",b="move",y="end",w="cancel",x="tap",C="release",T="gesturestart",S="gesturechange",D="gestureend",F="gesturetap",E=l.extend({init:function(e,t){var n=this;n.axis=e,n._updateLocationData(t),n.startLocation=n.location,n.velocity=n.delta=0,n.timeStamp=c()},move:function(e){var t=this,n=e["page"+t.axis],i=c(),a=i-t.timeStamp||1;(n||!f)&&(t.delta=n-t.location,t._updateLocationData(e),t.initialDelta=n-t.startLocation,t.velocity=t.delta/a,t.timeStamp=i)},_updateLocationData:function(e){var t=this,n=t.axis;t.location=e["page"+n],t.client=e["client"+n],t.screen=e["screen"+n]}}),z=l.extend({init:function(e,t,n){var i=this;u(i,{x:new E("X",n.location),y:new E("Y",n.location),userEvents:e,target:t,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,_moved:!1,_finished:!1}),i.press=function(){i._trigger(g,n),i._holdTimeout=setTimeout(function(){i._trigger(v,n)},e.minHold)}},move:function(e){var t=this;if(!t._finished){if(t.x.move(e.location),t.y.move(e.location),!t._moved){if(t._withinIgnoreThreshold())return;if(H.current&&H.current!==t.userEvents)return t.dispose();t._start(e)}t._finished||t._trigger(b,e)}},end:function(e){var t=this;t.endTime=c(),t._finished||(t._moved?t._trigger(y,e):t._trigger(x,e),clearTimeout(t._holdTimeout),t._trigger(C,e),t.dispose())},dispose:function(){var t=this,n=t.userEvents,i=n.touches;t._finished=!0,i.splice(e.inArray(t,i),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(e){clearTimeout(this._holdTimeout),this.startTime=c(),this._moved=!0,this._trigger(k,e)},_trigger:function(e,t){var n=this,i=t.event,a={touch:n,x:n.x,y:n.y,target:n.target,event:i};n.userEvents.notify(e,a)&&i.preventDefault()},_withinIgnoreThreshold:function(){var e=this.x.initialDelta,t=this.y.initialDelta;return Math.sqrt(e*e+t*t)<=this.userEvents.threshold}}),H=d.extend({init:function(t,n){var i,l,c,p=this,f=r.guid();n=n||{},i=p.filter=n.filter,p.threshold=n.threshold||m,p.minHold=n.minHold||h,p.touches=[],p._maxTouches=n.multiTouch?2:1,p.allowSelection=n.allowSelection,p.captureUpIfMoved=n.captureUpIfMoved,p.eventNS=f,t=e(t).handler(p),d.fn.init.call(p),u(p,{element:t,surface:n.global?e(s.documentElement):e(n.surface||t),stopPropagation:n.stopPropagation,pressed:!1}),p.surface.handler(p).on(r.applyEventMap("move",f),"_move").on(r.applyEventMap("up cancel",f),"_end"),t.on(r.applyEventMap("down",f),i,"_start"),(o.pointers||o.msPointers)&&t.css("-ms-touch-action","pinch-zoom double-tap-zoom"),n.preventDragEvent&&t.on(r.applyEventMap("dragstart",f),r.preventDefault),t.on(r.applyEventMap("mousedown selectstart",f),i,{root:t},"_select"),p.captureUpIfMoved&&o.eventCapture&&(l=p.surface[0],c=e.proxy(p.preventIfMoving,p),a(function(e){l.addEventListener(e,c,!0)})),p.bind([g,v,x,k,b,y,C,w,T,S,D,F,_],n)},preventIfMoving:function(e){this._isMoved()&&e.preventDefault()},destroy:function(){var e,t=this;t._destroyed||(t._destroyed=!0,t.captureUpIfMoved&&o.eventCapture&&(e=t.surface[0],a(function(n){e.removeEventListener(n,t.preventIfMoving)})),t.element.kendoDestroy(t.eventNS),t.surface.kendoDestroy(t.eventNS),t.element.removeData("handler"),t.surface.removeData("handler"),t._disposeAll(),t.unbind(),delete t.surface,delete t.element)},capture:function(){H.current=this},cancel:function(){this._disposeAll(),this.trigger(w)},notify:function(e,n){var i=this,a=i.touches;if(this._isMultiTouch()){switch(e){case b:e=S;break;case y:e=D;break;case x:e=F}u(n,{touches:a},t(a[0],a[1]))}return this.trigger(e,n)},press:function(e,t,n){this._apiCall("_start",e,t,n)},move:function(e,t){this._apiCall("_move",e,t)},end:function(e,t){this._apiCall("_end",e,t)},_isMultiTouch:function(){return this.touches.length>1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var e=this.touches;e.length>0;)e.pop().dispose()},_isMoved:function(){return e.grep(this.touches,function(e){return e.isMoved()}).length},_select:function(e){(!this.allowSelection||this.trigger(_,{event:e}))&&i(e)},_start:function(t){var i,a,r=this,o=0,s=r.filter,l=n(t),d=l.length;if(!r._maxTouchesReached())for(H.current=null,r.currentTarget=t.currentTarget,r.stopPropagation&&t.stopPropagation();d>o&&!r._maxTouchesReached();o++)a=l[o],i=s?e(a.currentTarget):r.element,i.length&&(a=new z(r,i,a),r.touches.push(a),a.press(),r._isMultiTouch()&&r.notify("gesturestart",{}))},_move:function(e){this._eachTouch("move",e)},_end:function(e){this._eachTouch("end",e)},_eachTouch:function(e,t){var i,a,r,o,s=this,l={},d=n(t),c=s.touches;for(i=0;io;o++)if(a=n[o],a.element[0]===e)return{target:a,targetElement:e};for(o=0;l>o;o++)if(r=i[o],m.matchesSelector.call(e,r.options.filter))return{target:r,targetElement:e};e=e.parentNode}return t}var l,d,c,u,p,f,h=window.kendo,m=h.support,g=window.document,v=h.Class,_=h.ui.Widget,k=h.Observable,b=h.UserEvents,y=e.proxy,w=e.extend,x=h.getOffset,C={},T={},S={},D=m.mobileOS,F=D&&D.android,E=F&&"chrome"==D.browser,z="keyup",H="change",A="dragstart",M="hold",I="drag",R="dragend",N="dragcancel",O="dragenter",P="dragleave",B="drop",L=k.extend({init:function(t,n){var i=this,a=t[0];i.capture=!1,a.addEventListener?(e.each(h.eventMap.down.split(" "),function(){a.addEventListener(this,y(i._press,i),!0)}),e.each(h.eventMap.up.split(" "),function(){a.addEventListener(this,y(i._release,i),!0)})):(e.each(h.eventMap.down.split(" "),function(){a.attachEvent(this,y(i._press,i))}),e.each(h.eventMap.up.split(" "),function(){a.attachEvent(this,y(i._release,i))})),k.fn.init.call(i),i.bind(["press","release"],n||{})},captureNext:function(){this.capture=!0},cancelCapture:function(){this.capture=!1},_press:function(e){var t=this;t.trigger("press"),t.capture&&e.preventDefault()},_release:function(e){var t=this;t.trigger("release"),t.capture&&(e.preventDefault(),t.cancelCapture())}}),V=k.extend({init:function(t){var n=this;k.fn.init.call(n),n.forcedEnabled=!1,e.extend(n,t),n.scale=1,n.horizontal?(n.measure="offsetWidth",n.scrollSize="scrollWidth",n.axis="x"):(n.measure="offsetHeight",n.scrollSize="scrollHeight",n.axis="y")},makeVirtual:function(){e.extend(this,{virtual:!0,forcedEnabled:!0,_virtualMin:1e3,_virtualMax:-1e3})},virtualSize:function(e,t){(this._virtualMin!==e||this._virtualMax!==t)&&(this._virtualMin=e,this._virtualMax=t,this.update())},outOfBounds:function(e){return e>this.max||ea,e||t.trigger(H,t)}}),W=k.extend({init:function(e){var t=this;k.fn.init.call(t),t.x=new V(w({horizontal:!0},e)),t.y=new V(w({horizontal:!1},e)),t.container=e.container,t.forcedMinScale=e.minScale,t.maxScale=e.maxScale||100,t.bind(H,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(H)}}),U=k.extend({init:function(e){var t=this;w(t,e),k.fn.init.call(t)},dragMove:function(e){var t=this,n=t.dimension,i=t.axis,a=t.movable,r=a[i]+e;n.enabled&&((re||r>n.max&&e>0)&&(e*=t.resistance),a.translateAxis(i,e),t.trigger(H,t))}}),q=v.extend({init:function(e){var t,n,i,a,r=this;w(r,{elastic:!0},e),i=r.elastic?.5:0,a=r.movable,r.x=t=new U({axis:"x",dimension:r.dimensions.x,resistance:i,movable:a}),r.y=n=new U({axis:"y",dimension:r.dimensions.y,resistance:i,movable:a}),r.userEvents.bind(["move","end","gesturestart","gesturechange"],{gesturestart:function(e){r.gesture=e,r.offset=r.dimensions.container.offset()},gesturechange:function(e){var i,o,s,l=r.gesture,d=l.center,c=e.center,u=e.distance/l.distance,p=r.dimensions.minScale,f=r.dimensions.maxScale;a.scale<=p&&1>u&&(u+=.8*(1-u)),a.scale*u>=f&&(u=f/a.scale),o=a.x+r.offset.left,s=a.y+r.offset.top,i={x:(o-d.x)*u+c.x-o,y:(s-d.y)*u+c.y-s},a.scaleWith(u),t.dragMove(i.x),n.dragMove(i.y),r.dimensions.rescale(a.scale),r.gesture=e,e.preventDefault()},move:function(e){e.event.target.tagName.match(/textarea|input/i)||(t.dimension.enabled||n.dimension.enabled?(t.dragMove(e.x.delta),n.dragMove(e.y.delta),e.preventDefault()):e.touch.skip())},end:function(e){e.preventDefault()}})}}),j=m.transitions.prefix+"Transform";d=m.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+")"},c=k.extend({init:function(t){var n=this;k.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(d(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){w(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=d(n,i,t.scale),e!=t.coordinates&&(h.support.browser.msie&&h.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[j]=e,t._saveCoordinates(e),t.trigger(H))},_saveCoordinates:function(e){this.coordinates=e}}),u=_.extend({init:function(e,t){var n,i=this;_.fn.init.call(i,e,t),n=i.options.group,n in T?T[n].push(i):T[n]=[i]},events:[O,P,B],options:{name:"DropTarget",group:"default"},destroy:function(){var e,t=this.options.group,n=T[t]||S[t];if(n.length>1){for(_.fn.destroy.call(this),e=0;et.max?t.max:t.min;e._moveTo(n)},_moveTo:function(e){this.transition.moveTo({location:e,duration:m,ease:p.easeOutExpo})}}),z=f.extend({init:function(e){var n=this;t.effects.Animation.fn.init.call(this),o(n,e,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return h(this.offset.y)');o(n,t,{element:a,elementSize:0,movable:new d(a),scrollMovable:t.movable,size:i?"width":"height"}),n.scrollMovable.bind(T,r(n._move,n)),n.container.append(a)},_move:function(){var e=this,t=e.axis,n=e.dimension,i=n.size,a=e.scrollMovable,r=i/n.total,o=Math.round(-a[t]*r),s=Math.round(i*r);o+s>i?s=i-o:0>o&&(s+=o,o=0),e.elementSize!=s&&(e.element.css(e.size,s+"px"),e.elementSize=s),e.movable.moveAxis(t,o)},show:function(){this.element.css({opacity:g,visibility:"visible"})},hide:function(){this.element.css({opacity:0})}}),A=s.extend({init:function(e,n){var i,a,r,l,p,f,m,g,v,_=this;return s.fn.init.call(_,e,n),e=_.element,_._native=_.options.useNative&&t.support.hasNativeScrolling,_._native?(e.addClass("km-native-scroller").prepend('
    '),o(_,{scrollElement:e,fixedContainer:e.children().first()}),undefined):(e.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('
    ').prepend('
    '),i=e.children().eq(1),a=new t.TapCapture(e),r=new d(i),l=new u({element:i,container:e,forcedEnabled:_.options.zoom}),p=this.options.avoidScrolling,f=new t.UserEvents(e,{allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:_.options.zoom,start:function(e){l.refresh();var t=h(e.x.velocity),n=h(e.y.velocity),i=2*t>=n,a=2*n>=t;!p(e)&&_.enabled&&(l.x.enabled&&i||l.y.enabled&&a)?f.capture():f.cancel()}}),m=new c({movable:r,dimensions:l,userEvents:f,elastic:_.options.elastic}),g=new F({movable:r,dimensions:l,userEvents:f,tapCapture:a}),v=new z({moveTo:function(e){_.scrollTo(e.x,e.y)}}),r.bind(T,function(){_.scrollTop=-r.y,_.scrollLeft=-r.x,_.trigger(D,{scrollTop:_.scrollTop,scrollLeft:_.scrollLeft})}),o(_,{movable:r,dimensions:l,zoomSnapBack:g,animatedScroller:v,userEvents:f,pane:m,tapCapture:a,pulled:!1,enabled:!0,scrollElement:i,scrollTop:0,scrollLeft:0,fixedContainer:e.children().first()}),_._initAxis("x"),_._initAxis("y"),l.refresh(),_.options.pullToRefresh&&_._initPullToRefresh(),undefined)},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,elastic:!0,useNative:!1,avoidScrolling:function(){return!1},pullToRefresh:!1,pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"},events:[C,D,S],_resize:function(){this._native||this.dimensions.refresh(),this.reset()},setOptions:function(e){var t=this;s.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))},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(e),this.scrollElement.scrollTop(t)):(this.dimensions.refresh(),this.movable.moveTo({x:e,y:t}))},animatedScrollTo:function(e,t){var n={x:this.movable.x,y:this.movable.y},i={x:e,y:t};this.animatedScroller.setCoordinates(n,i),this.animatedScroller.start()},pullHandled:function(){var e=this;e.refreshHint.removeClass(x),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd()},destroy:function(){s.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=t.template(e.options.pullTemplate),e.releaseTemplate=t.template(e.options.releaseTemplate),e.refreshTemplate=t.template(e.options.refreshTemplate),e.scrollElement.prepend(''+e.pullTemplate({})+""),e.refreshHint=e.scrollElement.children().first(),e.hintContainer=e.refreshHint.children(".km-template"),e.pane.y.bind("change",r(e._paneChange,e)),e.userEvents.bind("end",r(e._dragEnd,e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(w).addClass(x),e.hintContainer.html(e.refreshTemplate({})),e.yinertia.freeze(e.options.pullOffset/2),e.trigger("pull"))},_paneChange:function(){var e=this;e.movable.y/b>e.options.pullOffset?e.pulled||(e.pulled=!0,e.refreshHint.removeClass(x).addClass(w),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(w),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var t=this,n=t.movable,i=t.dimensions[e],a=t.tapCapture,r=new H({axis:e,movable:n,dimension:i,container:t.element});t.pane[e].bind(T,function(){r.show()}),t[e+"inertia"]=new E({axis:e,movable:n,tapCapture:a,userEvents:t.userEvents,dimension:i,elastic:t.options.elastic,friction:t.options.friction||v,velocityMultiplier:t.options.velocityMultiplier||_,end:function(){r.hide(),t.trigger("scrollEnd",{axis:e,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft})}})}});a.plugin(A)}(window.kendo.jQuery),function(e){function t(e){return e.position().top+3}var n=window.kendo,i=n.ui.Widget,a=e.proxy,r=!1,o=".kendoGroupable",s=n.template('',{useWithBlock:!1}),l=function(t){return e('
    ').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(t.attr(n.attr("title"))||t.attr(n.attr("field"))).prepend('')},d=e('
    '),c=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,u=i.extend({init:function(s,c){var u,p,f,h=this,m=n.guid(),g=a(h._intializePositions,h),v=h._dropCuePositions=[];i.fn.init.call(h,s,c),r=n.support.isRtl(s),f=r?"right":"left",h.draggable=p=h.options.draggable||new n.ui.Draggable(h.element,{filter:h.options.draggableElements,hint:l,group:m}),u=h.groupContainer=e(h.options.groupContainer,h.element).kendoDropTarget({group:p.options.group,dragenter:function(e){h._canDrag(e.draggable.currentTarget)&&(e.draggable.hint.find(".k-drag-status").removeClass("k-denied").addClass("k-add"),d.css("top",t(u)).css(f,0).appendTo(u))},dragleave:function(e){e.draggable.hint.find(".k-drag-status").removeClass("k-add").addClass("k-denied"),d.remove()},drop:function(t){var i,a=t.draggable.currentTarget,o=a.attr(n.attr("field")),s=a.attr(n.attr("title")),l=h.indicator(o),c=h._dropCuePositions,u=c[c.length-1];(a.hasClass("k-group-indicator")||h._canDrag(a))&&(u?(i=h._dropCuePosition(n.getOffset(d).left+parseInt(u.element.css("marginLeft"),10)*(r?-1:1)+parseInt(u.element.css("marginRight"),10)),i&&h._canDrop(e(l),i.element,i.left)&&(i.before?i.element.before(l||h.buildIndicator(o,s)):i.element.after(l||h.buildIndicator(o,s)),h._change())):(h.groupContainer.append(h.buildIndicator(o,s)),h._change()))}}).kendoDraggable({filter:"div.k-group-indicator",hint:l,group:p.options.group,dragcancel:a(h._dragCancel,h),dragstart:function(e){var n=e.currentTarget,i=parseInt(n.css("marginLeft"),10),a=n.position(),o=r?a.left-i:a.left+n.outerWidth();g(),d.css({top:t(u),left:o}).appendTo(u),this.hint.find(".k-drag-status").removeClass("k-denied").addClass("k-add")},dragend:function(){h._dragEnd(this)},drag:a(h._drag,h)}).on("click"+o,".k-button",function(t){t.preventDefault(),h._removeIndicator(e(this).parent())}).on("click"+o,".k-link",function(t){var i=e(this).parent(),a=h.buildIndicator(i.attr(n.attr("field")),i.attr(n.attr("title")),"asc"==i.attr(n.attr("dir"))?"desc":"asc");i.before(a).remove(),h._change(),t.preventDefault()}),p.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){h._dragEnd(this)},dragcancel:a(h._dragCancel,h),dragstart:function(e){var t,n,i;return h.options.allowDrag||h._canDrag(e.currentTarget)?(g(),v.length?(t=v[v.length-1].element,n=parseInt(t.css("marginRight"),10),i=t.position().left+t.outerWidth()+n):i=0,undefined):(e.preventDefault(),undefined)},drag:a(h._drag,h)}),h.dataSource=h.options.dataSource,h.dataSource&&(h._refreshHandler=a(h.refresh,h),h.dataSource.bind("change",h._refreshHandler)) },refresh:function(){var t=this,i=t.dataSource;t.groupContainer.empty().append(e.map(i.group()||[],function(e){var i=e.field.replace(c,"\\$1"),a=t.element.find(t.options.filter).filter("["+n.attr("field")+"="+i+"]");return t.buildIndicator(e.field,a.attr(n.attr("title")),e.dir)}).join("")),t._invalidateGroupContainer()},destroy:function(){var e=this;i.fn.destroy.call(e),e.groupContainer.off(o).kendoDropTarget("destroy").kendoDraggable("destroy"),e.options.draggable||e.draggable.destroy(),e.dataSource&&e._refreshHandler&&e.dataSource.unbind("change",e._refreshHandler)},options:{name:"Groupable",filter:"th",draggableElements:"th",messages:{empty:"Drag a column header and drop it here to group by that column"}},indicator:function(t){var i=e(".k-group-indicator",this.groupContainer);return e.grep(i,function(i){return e(i).attr(n.attr("field"))===t})[0]},buildIndicator:function(e,t,i){return s({field:e.replace(/"/g,"'"),dir:i,title:t,ns:n.ns})},descriptors:function(){var t,i,a,r,o,s=this,l=e(".k-group-indicator",s.groupContainer);return t=s.element.find(s.options.filter).map(function(){var t=e(this),a=t.attr(n.attr("aggregates")),s=t.attr(n.attr("field"));if(a&&""!==a)for(i=a.split(","),a=[],r=0,o=i.length;o>r;r++)a.push({field:s,aggregate:i[r]});return a}).toArray(),e.map(l,function(i){return i=e(i),a=i.attr(n.attr("field")),{field:a,dir:i.attr(n.attr("dir")),aggregates:t||[]}})},_removeIndicator:function(e){var t=this;e.remove(),t._invalidateGroupContainer(),t._change()},_change:function(){var e=this;e.dataSource&&e.dataSource.group(e.descriptors())},_dropCuePosition:function(t){var n,i,a,o,s,l=this._dropCuePositions;if(d.is(":visible")&&0!==l.length)return t=Math.ceil(t),n=l[l.length-1],i=n.left,a=n.right,o=parseInt(n.element.css("marginLeft"),10),s=parseInt(n.element.css("marginRight"),10),t>=a&&!r||i>t&&r?t={left:n.element.position().left+(r?-o:n.element.outerWidth()+s),element:n.element,before:!1}:(t=e.grep(l,function(e){return e.left<=t&&t<=e.right||r&&t>e.right})[0],t&&(t={left:r?t.element.position().left+t.element.outerWidth()+s:t.element.position().left-o,element:t.element,before:!0})),t},_drag:function(e){var t=this._dropCuePosition(e.x.location);t&&d.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(),a=e[0]!==t[0]&&(!i[0]||t[0]!==i[0]||!r&&n>i.position().left||r&&n
    '),o.find(l.options.filter).kendoDropTarget({group:l.options.group,dragenter:function(e){if(d._draggable){var i,a=this.element,r=a[0]===d._draggable[0];t(e.draggable.hint,r),r||(i=n.getOffset(a),d.reorderDropCue.css({height:a.outerHeight(),top:i.top,left:i.left+(a.index()>d._draggable.index()?a.outerWidth():0)}).appendTo(document.body))}},dragleave:function(e){t(e.draggable.hint,!0),d.reorderDropCue.remove()},drop:function(){if(d._draggable){var e,t=d._draggable[0],n=this.element[0];t!==n&&(e=o.find(l.options.filter),d.trigger(a,{element:d._draggable,oldIndex:e.index(t),newIndex:e.index(n)}))}}}),l.bind(["dragcancel","dragend","dragstart"],{dragcancel:function(){d.reorderDropCue.remove(),d._draggable=null},dragend:function(){d.reorderDropCue.remove(),d._draggable=null},dragstart:function(e){d._draggable=e.currentTarget}})},options:{name:"Reorderable",filter:"*"},events:[a],destroy:function(){var e=this;i.fn.destroy.call(e),e.draggable&&e.draggable.destroy(),n.destroy(e.element)}});n.ui.plugin(o)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,a=i.Widget,r=e.proxy,o=n.isFunction,s=e.extend,l="horizontal",d="vertical",c="start",u="resize",p="resizeend",f=a.extend({init:function(e,t){var n=this;a.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(e,{distance:0,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,p,c],options:{name:"Resizable",orientation:l},resize:function(){},_max:function(e){var n=this,i=n.hint?n.hint[n._sizingDom]():0,a=n.options.max;return o(a)?a(e):a!==t?n._initialElementPosition+a-i:a},_min:function(e){var n=this,i=n.options.min;return o(i)?i(e):i!==t?n._initialElementPosition+i:i},_start:function(t){var n=this,i=n.options.hint,a=e(t.currentTarget);n._initialElementPosition=a.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,i&&(n.hint=o(i)?e(i(a)):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",a.css("cursor"))},_resize:function(n){var i,a=this,r=(e(n.currentTarget),a._maxPosition),o=a._minPosition,l=a._initialElementPosition+(n[a._positionMouse].location-a._initialMousePosition);i=o!==t?Math.max(o,l):l,a.position=i=r!==t?Math.min(r,i):i,a.hint&&a.hint.toggleClass(a.options.invalidClass||"",i==r||i==o).css(a._position,i),a.resizing=!0,a.trigger(u,s(n,{position:i}))},_stop:function(t){var n=this;n.hint&&n.hint.remove(),n.resizing=!1,n.trigger(p,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;a.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,a=n.targetPosition,r=n.position;r===t&&(r=a[i]),a[i]=r+e,n.userEvents.move(a.left,a.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});n.ui.plugin(f)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.proxy,a="dir",r="asc",o="single",s="field",l="desc",d=".kendoSortable",c=".k-link",u="aria-sort",p=n.ui.Widget,f=p.extend({init:function(e,t){var n,a=this;p.fn.init.call(a,e,t),a._refreshHandler=i(a.refresh,a),a.dataSource=a.options.dataSource.bind("change",a._refreshHandler),n=a.element.find(c),n[0]||(n=a.element.wrapInner('').find(c)),a.link=n,a.element.on("click"+d,i(a._click,a))},options:{name:"Sortable",mode:o,allowUnsort:!0,compare:null,filter:""},destroy:function(){var e=this;p.fn.destroy.call(e),e.element.off(d),e.dataSource.unbind("change",e._refreshHandler)},refresh:function(){var t,i,o,d,c=this,p=c.dataSource.sort()||[],f=c.element,h=f.attr(n.attr(s));for(f.removeAttr(n.attr(a)),f.removeAttr(u),t=0,i=p.length;i>t;t++)o=p[t],h==o.field&&f.attr(n.attr(a),o.dir);d=f.attr(n.attr(a)),f.find(".k-i-arrow-n,.k-i-arrow-s").remove(),d===r?(e('').appendTo(c.link),f.attr(u,"ascending")):d===l&&(e('').appendTo(c.link),f.attr(u,"descending"))},_click:function(e){var i,d,c=this,u=c.element,p=u.attr(n.attr(s)),f=u.attr(n.attr(a)),h=c.options,m=c.options.compare,g=c.dataSource.sort()||[];if(e.preventDefault(),!h.filter||u.is(h.filter)){if(f=f===r?l:f===l&&h.allowUnsort?t:r,h.mode===o)g=[{field:p,dir:f,compare:m}];else if("multiple"===h.mode){for(i=0,d=g.length;d>i;i++)if(g[i].field===p){g.splice(i,1);break}g.push({field:p,dir:f,compare:m})}c.dataSource.sort(g)}}});n.ui.plugin(f)}(window.kendo.jQuery),function(e){function t(e,t){var n=a.getOffset(e),i=t.left+t.width,r=t.top+t.height;return n.right=n.left+e.outerWidth(),n.bottom=n.top+e.outerHeight(),!(n.left>i||n.rightr||n.bottomr;r++)s=e.eq(r),t(s,i)?s.hasClass(d)?a&&n!==s[0]&&s.removeClass(d).addClass(h):s.hasClass(c)||s.hasClass(h)||s.addClass(c):s.hasClass(c)?s.removeClass(c):a&&s.hasClass(h)&&s.removeClass(h).addClass(d)}var i,a=window.kendo,r=a.ui.Widget,o=e.proxy,s=Math.abs,l="aria-selected",d="k-state-selected",c="k-state-selecting",u="k-selectable",p="change",f=".kendoSelectable",h="k-state-unselecting",m=!1;!function(e){!function(){e('
    ').on("click",">*",function(){m=!0}).find("span").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),i=s.options.multiple,s.userEvents=new a.UserEvents(s.element,{global:!0,allowSelection:!0,filter:(m?"":"."+u+" ")+s.options.filter,tap:o(s._tap,s)}),i&&s.userEvents.bind("start",o(s._start,s)).bind("move",o(s._move,s)).bind("end",o(s._end,s)).bind("select",o(s._select,s))},events:[p],options:{name:"Selectable",filter:">*",multiple:!1},_tap:function(t){var n,i=e(t.target),a=this,r=t.event.ctrlKey||t.event.metaKey,o=a.options.multiple,s=o&&t.event.shiftKey,l=t.event.which,c=t.event.button;i.closest("."+u)[0]!==a.element[0]||l&&3==l||c&&2==c||(n=i.hasClass(d),o&&r||a.clear(),s?a.selectRange(a._firstSelectee(),i):(n&&r?(a._unselect(i),a._notify(p)):a.value(i),a._lastActive=a._downTarget=i))},_start:function(t){var n=this,i=e(t.target),a=i.hasClass(d),r=t.event.ctrlKey||t.event.metaKey;return n._downTarget=i,i.closest("."+u)[0]!==n.element[0]?(n.userEvents.cancel(),n._downTarget=null,undefined):(n._marquee.appendTo(document.body).css({left:t.x.client+1,top:t.y.client+1,width:0,height:0}),r||n.clear(),a&&(n._selectElement(i,!0),r&&i.addClass(h)),undefined)},_move:function(e){var t=this,i={left:e.x.startLocation>e.x.location?e.x.location:e.x.startLocation,top:e.y.startLocation>e.y.location?e.y.location:e.y.startLocation,width:s(e.x.initialDelta),height:s(e.y.initialDelta)},a=t.element.find(t.options.filter);t._marquee.css(i),n(a,t._downTarget[0],i,e.event.ctrlKey||e.event.metaKey),e.preventDefault()},_end:function(){var e=this;e._marquee.remove(),e._unselect(e.element.find(e.options.filter+"."+h)).removeClass(h),e.value(e.element.find(e.options.filter+"."+c)),e._lastActive=e._downTarget},value:function(e){var t=this,n=o(t._selectElement,t);return e?(e.each(function(){n(this)}),t._notify(p),undefined):t.element.find(t.options.filter+"."+d)},_firstSelectee:function(){var e,t=this;return null!==t._lastActive?t._lastActive:(e=t.value(),e.length>0?e[0]:t.element.find(t.options.filter))},_selectElement:function(t,n){var i=e(t),a=!n&&this._notify("select",{element:t});i.removeClass(c),a||(i.addClass(d),this.options.aria&&i.attr(l,!0))},_notify:function(e,t){return t=t||{},this.trigger(e,t)},_unselect:function(e){return e.removeClass(d),this.options.aria&&e.attr(l,!1),e},_select:function(t){var n="input,a,textarea,.k-multiselect-wrap,select",i=a.support.browser.msie;e(t.event.target).is(n)?(this.userEvents.cancel(),this._downTarget=null):(!i||i&&!e(a._activeElement()).is(n))&&t.preventDefault()},clear:function(){var e=this.element.find(this.options.filter+"."+d);this._unselect(e)},selectRange:function(t,n){var i,a,r,s,l=this,c=!1,u=l.element.find(l.options.filter),f=o(l._selectElement,l);for(t=e(t)[0],n=e(n)[0],i=0,a=u.length;a>i;i++)s=u[i],c?(f(s),c=s!==n):s===t?(c=t!==n,f(s)):s===n?(r=t,t=n,n=r,c=!0,f(s)):e(s).removeClass(d);l._notify(p)},destroy:function(){var e=this;r.fn.destroy.call(e),e.element.off(f),e.userEvents.destroy()}}),a.ui.plugin(i)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui.Widget,a=e.proxy,r=n.keys,o="click",s="k-button",l="k-button-icon",d="k-button-icontext",c=".kendoButton",u="disabled",p="k-state-disabled",f="k-state-focused",h="k-state-selected",m=i.extend({init:function(e,t){var r=this;i.fn.init.call(r,e,t),e=r.wrapper=r.element,t=r.options,e.addClass(s).attr("role","button"),t.enable=t.enable&&!e.attr(u),r.enable(t.enable),r._tabindex(),r._graphics(),e.on(o+c,a(r._click,r)).on("focus"+c,a(r._focus,r)).on("blur"+c,a(r._blur,r)).on("keydown"+c,a(r._keydown,r)).on("keyup"+c,a(r._keyup,r)),n.notify(r)},events:[o],options:{name:"Button",icon:"",spriteCssClass:"",imageUrl:"",enable:!0},_isNativeButton:function(){return"button"==this.element.prop("tagName").toLowerCase()},_click:function(e){this.options.enable&&this.trigger(o,{event:e})},_focus:function(){this.options.enable&&this.element.addClass(f)},_blur:function(){this.element.removeClass(f)},_keydown:function(e){var t=this;t._isNativeButton()||(e.keyCode==r.ENTER||e.keyCode==r.SPACEBAR)&&(e.keyCode==r.SPACEBAR&&(e.preventDefault(),t.options.enable&&t.element.addClass(h)),t._click(e))},_keyup:function(){this.element.removeClass(h)},_graphics:function(){var t,n,i,a=this,r=a.element,o=a.options,s=o.icon,c=o.spriteCssClass,u=o.imageUrl;(c||u||s)&&(i=!0,r.contents().not("span.k-sprite").not("span.k-icon").not("img.k-image").each(function(e,t){(1==t.nodeType||3==t.nodeType&&t.nodeValue.trim().length>0)&&(i=!1)}),i?r.addClass(l):r.addClass(d)),s?(t=r.children("span.k-icon").first(),t[0]||(t=e('').prependTo(r)),t.addClass("k-i-"+s)):c?(t=r.children("span.k-sprite").first(),t[0]||(t=e('').prependTo(r)),t.addClass(c)):u&&(n=r.children("img.k-image").first(),n[0]||(n=e('icon').prependTo(r)),n.attr("src",u))},enable:function(e){var n=this,i=n.element;e===t&&(e=!0),e=!!e,n.options.enable=e,i.toggleClass(p,!e).attr("aria-disabled",!e).attr(u,!e)}});n.ui.plugin(m)}(window.kendo.jQuery),function(e,t){function n(e,t,n,i){return e({idx:t,text:n,ns:d.ns,numeric:i})}function i(e,t,n){return w({className:e.substring(1),text:t,wrapClassName:n||""})}function a(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){a(e,f,1,1>=t)}function o(e,t){a(e,m,Math.max(1,t-1),1>=t)}function s(e,t,n){a(e,g,Math.min(n,t+1),t>=n)}function l(e,t,n){a(e,h,n,t>=n)}var d=window.kendo,c=d.ui,u=c.Widget,p=e.proxy,f=".k-i-seek-w",h=".k-i-seek-e",m=".k-i-arrow-w",g=".k-i-arrow-e",v="change",_=".kendoPager",k="click",b="keydown",y="disabled",w=d.template('
    #=text#'),x=u.extend({init:function(t,n){var a,c,y=this;u.fn.init.call(y,t,n),n=y.options,y.dataSource=d.data.DataSource.create(n.dataSource),y.linkTemplate=d.template(y.options.linkTemplate),y.selectTemplate=d.template(y.options.selectTemplate),a=y.page(),c=y.totalPages(),y._refreshHandler=p(y.refresh,y),y.dataSource.bind(v,y._refreshHandler),n.previousNext&&(y.element.find(f).length||(y.element.append(i(f,n.messages.first,"k-pager-first")),r(y.element,a,c)),y.element.find(m).length||(y.element.append(i(m,n.messages.previous)),o(y.element,a,c))),n.numeric&&(y.list=y.element.find(".k-pager-numbers"),y.list.length||(y.list=e('
      ').appendTo(y.element))),n.input&&(y.element.find(".k-pager-input").length||y.element.append(''+n.messages.page+''+d.format(n.messages.of,c)+""),y.element.on(b+_,".k-pager-input input",p(y._keydown,y))),n.previousNext&&(y.element.find(g).length||(y.element.append(i(g,n.messages.next)),s(y.element,a,c)),y.element.find(h).length||(y.element.append(i(h,n.messages.last,"k-pager-last")),l(y.element,a,c))),n.pageSizes&&(y.element.find(".k-pager-sizes").length||e(''+d.format(h.messages.of,v)).find("input").val(f).attr(y,1>g).toggleClass("k-state-disabled",1>g),h.previousNext&&(r(c.element,f,v),o(c.element,f,v),s(c.element,f,v),l(c.element,f,v)),h.pageSizes&&c.element.find(".k-pager-sizes select").val(m).filter("["+d.attr("role")+"=dropdownlist]").kendoDropDownList("value",m).kendoDropDownList("text",m)}},_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)||1>n||n>this.totalPages())&&(n=this.page()),t.val(n),this.page(n)}},_refreshClick:function(e){e.preventDefault(),this.dataSource.read()},_change:function(e){var t=parseInt(e.currentTarget.value,10);isNaN(t)||this.dataSource.pageSize(t)},_click:function(t){var n=e(t.currentTarget);t.preventDefault(),n.is(".k-state-disabled")||this.page(n.attr(d.attr("page")))},totalPages:function(){return Math.ceil((this.dataSource.total()||0)/this.pageSize())},pageSize:function(){return this.dataSource.pageSize()||this.dataSource.total()},page:function(e){return e===t?this.dataSource.total()>0?this.dataSource.page():0:(this.dataSource.page(e),this.trigger(v,{index:e}),t)}});c.plugin(x)}(window.kendo.jQuery),function(e){function t(t,n){return t===n||e.contains(t,n)}var n=window.kendo,i=n.ui,a=i.Widget,r=n.support,o=n.getOffset,s=n._activeElement,l="open",d="close",c="deactivate",u="activate",p="center",f="left",h="right",m="top",g="bottom",v="absolute",_="hidden",k="body",b="location",y="position",w="visible",x="effects",C="k-state-active",T="k-state-border",S=/k-state-border-(\w+)/,D=".k-picker-wrap, .k-dropdown-wrap, .k-link",F="down",E=e(window),z=e(document.documentElement),H="resize scroll",A=r.transitions.css,M=A+"transform",I=e.extend,R=".kendoPopup",N=["font-family","font-size","font-stretch","font-style","font-weight","line-height"],O=a.extend({init:function(t,i){var r,o=this;i=i||{},i.isRtl&&(i.origin=i.origin||g+" "+h,i.position=i.position||m+" "+h),a.fn.init.call(o,t,i),t=o.element,i=o.options,o.collisions=i.collision?i.collision.split(" "):[],1===o.collisions.length&&o.collisions.push(o.collisions[0]),r=e(o.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),i.appendTo=e(e(i.appendTo)[0]||r[0]||k),o.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!i.isRtl).css({position:v}).appendTo(i.appendTo).on("mouseenter"+R,function(){o._hovered=!0}).on("mouseleave"+R,function(){o._hovered=!1}),o.wrapper=e(),i.animation===!1&&(i.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),I(i.animation.open,{complete:function(){o.wrapper.css({overflow:w}),o.trigger(u)}}),I(i.animation.close,{complete:function(){o.wrapper.hide();var a,r,s=o.wrapper.data(b),l=e(i.anchor);s&&o.wrapper.css(s),i.anchor!=k&&(a=(l[0].className.match(S)||["","down"])[1],r=T+"-"+a,l.removeClass(r).children(D).removeClass(C).removeClass(r),t.removeClass(T+"-"+n.directions[a].reverse)),o._closing=!1,o.trigger(c)}}),o._mousedownProxy=function(e){o._mousedown(e)},o._resizeProxy=function(e){o._resize(e)},i.toggleTarget&&e(i.toggleTarget).on(i.toggleEvent+R,e.proxy(o.toggle,o))},events:[l,u,d,c],options:{name:"Popup",toggleEvent:"click",origin:g+" "+f,position:m+" "+f,anchor:k,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},destroy:function(){var t,i=this,r=i.options,o=i.element.off(R);a.fn.destroy.call(i),r.toggleTarget&&e(r.toggleTarget).off(R),r.modal||(z.unbind(F,i._mousedownProxy),E.unbind(H,i._resizeProxy)),r.appendTo[0]===document.body&&(t=o.parent(".k-animation-container"),t[0]?t.remove():o.remove()),n.destroy(i.element.children())},open:function(t,i){var a,o,s,d=this,c={isFixed:!isNaN(parseInt(i,10)),x:t,y:i},u=d.element,p=d.options,f="down",h=e(p.anchor);if(!d.visible()){if(p.copyAnchorStyles&&u.css(n.getComputedStyles(h[0],N)),u.data("animating")||d.trigger(l))return;p.modal||(z.unbind(F,d._mousedownProxy).bind(F,d._mousedownProxy),r.mobileOS.ios||r.mobileOS.android||E.unbind(H,d._resizeProxy).bind(H,d._resizeProxy)),d.wrapper=o=n.wrap(u,p.autosize).css({overflow:_,display:"block",position:v}),r.mobileOS.android&&o.add(h).css(M,"translatez(0)"),o.css(y),e(p.appendTo)[0]==document.body&&o.css(m,"-10000px"),a=I(!0,{},p.animation.open),d.flipped=d._position(c),a.effects=n.parseEffects(a.effects,d.flipped),f=a.effects.slideIn?a.effects.slideIn.direction:f,p.anchor!=k&&(s=T+"-"+f,u.addClass(T+"-"+n.directions[f].reverse),h.addClass(s).children(D).addClass(C).addClass(s)),u.data(x,a.effects).kendoStop(!0).kendoAnimate(a)}},toggle:function(){var e=this;e[e.visible()?d:l]()},visible:function(){return this.element.is(":"+w)},close:function(){var t,i,a,r,o=this,s=o.options;if(o.visible()){if(t=o.wrapper[0]?o.wrapper:n.wrap(o.element).hide(),o._closing||o.trigger(d))return;o.element.find(".k-popup").each(function(){var t=e(this),n=t.data("kendoPopup");n&&n.close()}),z.unbind(F,o._mousedownProxy),E.unbind(H,o._resizeProxy),i=I(!0,{},s.animation.close),a=o.element.data(x),r=i.effects,!r&&!n.size(r)&&a&&n.size(a)&&(i.effects=a,i.reverse=!0),o._closing=!0,o.element.kendoStop(!0),t.css({overflow:_}),o.element.kendoAnimate(i)}},_resize:function(e){var n=this;"resize"===e.type?(clearTimeout(n._resizeTimeout),n._resizeTimeout=setTimeout(function(){n._position(),n._resizeTimeout=null},50)):n._hovered||t(n.element[0],s())||n.close()},_mousedown:function(i){var a=this,r=a.element[0],o=a.options,s=e(o.anchor)[0],l=o.toggleTarget,d=n.eventTarget(i),c=e(d).closest(".k-popup"),u=c.parent().parent(".km-shim").length;c=c[0],(u||!c||c===a.element[0])&&"popover"!==e(i.target).closest("a").data("rel")&&(t(r,d)||t(s,d)||l&&t(e(l)[0],d)||a.close())},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),0>e&&(i=-e),i},_flip:function(e,t,n,i,a,r,o){var s=0;return o=o||t,r!==a&&r!==p&&a!==p&&(e+o>i&&(s+=-(n+t)),0>e+s&&(s+=n+t)),s},_position:function(t){var n,i,a,s,l,d,c,u,p,f=this,h=f.element.css(y,""),m=f.wrapper,g=f.options,_=e(g.viewport),k=e(_).offset(),w=e(g.anchor),x=g.origin.toLowerCase().split(" "),C=g.position.toLowerCase().split(" "),T=f.collisions,S=r.zoomLevel(),D=10002,F=0,E=w.parents().filter(m.siblings());if(E[0])if(i=Number(e(E).css("zIndex")))D=i+1;else for(n=w.parentsUntil(E),a=n.length;a>F;F++)i=Number(e(n[F]).css("zIndex")),i&&i>D&&(D=i+1);return m.css("zIndex",D),t&&t.isFixed?m.css({left:t.x,top:t.y}):m.css(f._align(x,C)),s=o(m,y,w[0]===m.offsetParent()[0]),l=o(m),d=w.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),d.length&&(s=o(m,y,!0),l=o(m)),_[0]===window?(l.top-=window.pageYOffset||document.documentElement.scrollTop||0,l.left-=window.pageXOffset||document.documentElement.scrollLeft||0):(l.top-=k.top,l.left-=k.left),f.wrapper.data(b)||m.data(b,I({},s)),c=I({},l),u=I({},s),"fit"===T[0]&&(u.top+=f._fit(c.top,m.outerHeight(),_.height()/S)),"fit"===T[1]&&(u.left+=f._fit(c.left,m.outerWidth(),_.width()/S)),p=I({},u),"flip"===T[0]&&(u.top+=f._flip(c.top,h.outerHeight(),w.outerHeight(),_.height()/S,x[0],C[0],m.outerHeight())),"flip"===T[1]&&(u.left+=f._flip(c.left,h.outerWidth(),w.outerWidth(),_.width()/S,x[1],C[1],m.outerWidth())),h.css(y,v),m.css(u),u.left!=p.left||u.top!=p.top},_align:function(t,n){var i,a=this,r=a.wrapper,s=e(a.options.anchor),l=t[0],d=t[1],c=n[0],u=n[1],f=o(s),m=e(a.options.appendTo),v=r.outerWidth(),_=r.outerHeight(),k=s.outerWidth(),b=s.outerHeight(),y=f.top,w=f.left,x=Math.round;return m[0]!=document.body&&(i=o(m),y-=i.top,w-=i.left),l===g&&(y+=b),l===p&&(y+=x(b/2)),c===g&&(y-=_),c===p&&(y-=x(_/2)),d===h&&(w+=k),d===p&&(w+=x(k/2)),u===h&&(w-=v),u===p&&(w-=x(v/2)),{top:y,left:w}}});i.plugin(O)}(window.kendo.jQuery),function(e){function t(e){for(;e.length;)n(e),e=e.parent()}function n(e){var t=e.data(r.ns+"title");t&&(e.attr("title",t),e.removeData(r.ns+"title"))}function i(e){var t=e.attr("title");t&&(e.data(r.ns+"title",t),e.attr("title",""))}function a(e){for(;e.length&&!e.is("body");)i(e),e=e.parent()}var r=window.kendo,o=r.ui.Widget,s=r.ui.Popup,l=r.isFunction,d=e.isPlainObject,c=e.extend,u=e.proxy,p=e(document),f=r.isLocalUrl,h="_tt_active",m="aria-describedby",g="show",v="hide",_="error",k="contentLoad",b="requestStart",y="k-content-frame",w='',x=r.template(""),C=".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"}},S={top:"bottom",bottom:"top",left:"right",right:"left",center:"center"},D={bottom:"n",top:"s",left:"e",right:"w",center:"n"},F={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}},E=function(e){return e.target.data(r.ns+"title")},z=o.extend({init:function(e,t){var n,i=this;o.fn.init.call(i,e,t),n=i.options.position.match(/left|right/)?"horizontal":"vertical",i.dimensions=F[n],i._documentKeyDownHandler=u(i._documentKeyDown,i),i.element.on(i.options.showOn+C,i.options.filter,u(i._showOn,i)).on("mouseenter"+C,i.options.filter,u(i._mouseenter,i)),this.options.autoHide&&i.element.on("mouseleave"+C,i.options.filter,u(i._mouseleave,i))},options:{name:"Tooltip",filter:"",content:E,showAfter:100,callout:!0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{effects:"fade:out",duration:40,hide:!0}}},events:[g,v,k,_,b],_mouseenter:function(t){a(e(t.currentTarget))},_showOn:function(t){var n=this,i=e(t.currentTarget);n.options.showOn&&n.options.showOn.match(/click|focus/)?n._show(i):(clearTimeout(n.timeout),n.timeout=setTimeout(function(){n._show(i)},n.options.showAfter))},_appendContent:function(e){var t,n=this,i=n.options.content,a=n.content,o=n.options.iframe;d(i)&&i.url?("iframe"in n.options||(o=!f(i.url)),n.trigger(b,{options:i,target:e}),o?(a.hide(),t=a.find("."+y)[0],t?t.src=i.url||t.src:a.html(x({content:i})),a.find("."+y).off("load"+C).on("load"+C,function(){n.trigger(k),a.show()})):(a.empty(),r.ui.progress(a,!0),n._ajaxRequest(i))):i&&l(i)?(i=i({sender:this,target:e}),n.content.html(i||"")):n.content.html(i)},_ajaxRequest:function(e){var t=this;jQuery.ajax(c({type:"GET",dataType:"html",cache:!1,error:function(e,n){r.ui.progress(t.content,!1),t.trigger(_,{status:n,xhr:e})},success:u(function(e){r.ui.progress(t.content,!1),t.content.html(e),t.trigger(k)},t)},e))},_documentKeyDown:function(e){e.keyCode===r.keys.ESC&&this.hide()},refresh:function(){var e=this,t=e.popup;t&&t.options.anchor&&e._appendContent(t.options.anchor)},hide:function(){this.popup&&this.popup.close()},show:function(e){e=e||this.element,a(e),this._show(e)},_show:function(e){var n=this,i=n.target();n.popup||n._initPopup(),i&&i[0]!=e[0]&&(n.popup.close(),n.popup.element.kendoStop(!0,!0)),i&&i[0]==e[0]||(n._appendContent(e),n.popup.options.anchor=e),n.popup.one("deactivate",function(){t(e),e.removeAttr(m),this.element.removeAttr("id").attr("aria-hidden",!0),p.off("keydown"+C,n._documentKeyDownHandler)}),n.popup.open()},_initPopup:function(){var t=this,n=t.options,i=e(r.template(w)({callout:n.callout&&"center"!==n.position,dir:D[n.position],autoHide:n.autoHide}));t.popup=new s(i,c({activate:function(){var e=this.options.anchor,i=e[0].id||t.element[0].id;i&&(e.attr(m,i+h),this.element.attr("id",i+h)),n.callout&&t._positionCallout(),this.element.removeAttr("aria-hidden"),p.on("keydown"+C,t._documentKeyDownHandler),t.trigger(g)},close:function(){t.trigger(v)},copyAnchorStyles:!1,animation:n.animation},T[n.position])),i.css({width:n.width,height:n.height}),t.content=i.find(".k-tooltip-content"),t.arrow=i.find(".k-callout"),n.autoHide?i.on("mouseleave"+C,u(t._mouseleave,t)):i.on("click"+C,".k-tooltip-button",u(t._closeButtonClick,t))},_closeButtonClick:function(e){e.preventDefault(),this.hide()},_mouseleave:function(n){if(this.popup){var i=e(n.currentTarget),a=i.offset(),r=n.pageX,o=n.pageY;if(a.right=a.left+i.outerWidth(),a.bottom=a.top+i.outerHeight(),r>a.left&&ra.top&&o').css({overflow:s.kineticScrollNeeded?"":"auto"}).on("mouseenter"+o,u,function(){e(this).addClass(m)}).on("mouseleave"+o,u,function(){e(this).removeClass(m)}).on("click"+o,u,T(a._click,a)).attr({tabIndex:-1,role:"listbox","aria-hidden":!0}),a.list=e("
      ").append(a.ul).on("mousedown"+o,function(e){e.preventDefault()}),i=t.attr(c),i&&(a.list.attr(c,i+"-list"),a.ul.attr(c,i+"_listbox"),a._optionID=i+"_option_selected"),a._header(),a._accessors(),a._initValue()},options:{valuePrimitive:!1,headerTemplate:""},setOptions:function(e){r.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable)},focus:function(){this._focused.focus()},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)})},_filterSource:function(e){var t=this,i=t.options,a=t.dataSource,r=a.filter()||{};n(r,i.dataTextField),e&&(r=r.filters||[],r.push(e)),a.filter(r)},_header:function(){var t,n=this.options.headerTemplate;e.isFunction(n)&&(n=n()),n&&(this.list.prepend(n),t=this.ul.prev(),this.header=t[0]?t:null)},_initValue:function(){var e=this,t=e.options.value;null!==t?e.element.val(t):(t=e._accessor(),e.options.value=t),e._old=t},_ignoreCase:function(){var e,t=this,n=t.dataSource.reader.model;n&&n.fields&&(e=n.fields[t.options.dataTextField],e&&e.type&&"string"!==e.type&&(t.options.ignoreCase=!1))},items:function(){return this.ul[0].children},current:function(e){var n=this,i=n._optionID;return e===t?n._current:(n._current&&(n._current.removeClass(h).removeAttr("aria-selected").removeAttr(c),n._focused.removeAttr("aria-activedescendant")),e&&(e.addClass(h),n._scroll(e),i&&(e.attr("id",i),n._focused.attr("aria-activedescendant",i))),n._current=e,t)},destroy:function(){var e=this,t=e.ns;r.fn.destroy.call(e),e._unbindDataSource(),e.ul.off(t),e.list.off(t),e.popup.destroy(),e._form&&e._form.off("reset",e._resetHandler)},dataItem:function(e){var n=this;return e===t&&(e=n.selectedIndex),n._data()[e]},_accessors:function(){var e=this,t=e.element,n=e.options,a=i.getter,r=t.attr(i.attr("text-field")),o=t.attr(i.attr("value-field"));r&&(n.dataTextField=r),o&&(n.dataValueField=o),e._text=a(n.dataTextField),e._value=a(n.dataValueField)},_aria:function(e){var n=this,i=n.options,a=n._focused;i.suggest!==t&&a.attr("aria-autocomplete",i.suggest?"both":"list"),e=e?e+" "+n.ul[0].id:n.ul[0].id,a.attr("aria-owns",e),n.ul.attr("aria-live",i.filter&&"none"!==i.filter?"polite":"off")},_blur:function(){var e=this;e._change(),e.close()},_change:function(){var e,n=this,i=n.selectedIndex,a=n.options.value,r=n.value();n._isSelect&&!n._bound&&a&&(r=a),r!==n._old?e=!0:i!==t&&i!==n._oldIndex&&(e=!0),e&&(n._old=r,n._oldIndex=i,n.trigger(p),n.element.trigger(p))},_click:function(t){t.isDefaultPrevented()||this._accept(e(t.currentTarget))},_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]"))},_focus:function(e){var n=this;return n.popup.visible()&&e&&n.trigger(k,{item:e})?(n.close(),t):(n._select(e),n._triggerCascade(),n._blur(),t)},_index:function(e){var t,n,i=this,a=i._data();for(t=0,n=a.length;n>t;t++)if(i._dataValue(a[t])==e)return t;return-1},_dataValue:function(e){var n=this._value(e);return n===t&&(n=this._text(e)),n},_height:function(e){if(e){var t=this,n=t.list,i=t.popup.visible(),a=t.options.height;n=n.add(n.parent(".k-animation-container")).show().height(t.ul[0].scrollHeight>a?a:"auto"),i||n.hide()}},_adjustListWidth:function(){var e,t,n=this.list,i=n[0].style.width,a=this.wrapper;if(n.data(x)||!i)return e=window.getComputedStyle?window.getComputedStyle(a[0],null):0,t=e?parseFloat(e.width):a.outerWidth(),e&&(S.mozilla||S.msie)&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),i="border-box"!==n.css("box-sizing")?t-(n.outerWidth()-n.width()):t,n.css({fontFamily:a.css("font-family"),width:i}).data(x,i),!0},_popup:function(){var e=this,t=e.list,n=e._focused,r=e.options,o=e.wrapper;e.popup=new a.Popup(t,C({},r.popup,{anchor:o,open:function(t){e._adjustListWidth(),e.trigger(v)?t.preventDefault():(n.attr("aria-expanded",!0),e.ul.attr("aria-hidden",!1))},close:function(t){e.trigger(_)?t.preventDefault():(n.attr("aria-expanded",!1),e.ul.attr("aria-hidden",!0))},animation:r.animation,isRtl:s.isRtl(o)})),e.popup.one(v,function(){e._height(e._data().length)}),e._touchScroller=i.touchScroller(e.popup.element)},_makeUnselectable:function(){D&&this.list.find("*").attr("unselectable","on")},_toggleHover:function(t){e(t.currentTarget).toggleClass(m,"mouseenter"===t.type)},_toggle:function(e){var n=this;e=e!==t?e:!n.popup.visible(),s.touch||n._focused[0]===d()||n._focused.focus(),n[e?v:_]()},_scroll:function(e){if(e){e[0]&&(e=e[0]);var t,n,i=this.ul[0],a=e.offsetTop,r=e.offsetHeight,o=i.scrollTop,s=i.clientHeight,l=a+r,d=this._touchScroller;d?(t=d.dimensions.y,t.enabled&&a>t.size&&(a=a-t.size+r+4,d.scrollTo(0,-a))):(n=this.header?this.header.outerHeight():0,i.scrollTop=o>a?a-n:l>o+s?l-s-n:o)}},_template:function(){var e=this,t=e.options,n=t.template,a=t.dataSource;e._isSelect&&e.element[0].length&&(a||(t.dataTextField=t.dataTextField||"text",t.dataValueField=t.dataValueField||"value")),n?(n=i.template(n),e.template=function(e){return'
    • '+n(e)+"
    • "}):e.template=i.template('
    • ${'+i.expr(t.dataTextField,"data")+"}
    • ",{useWithBlock:!1})},_triggerCascade:function(){var e=this,t=e.value();(!e._bound&&t||e._old!==t)&&e.trigger("cascade")},_unbindDataSource:function(){var e=this;e.dataSource.unbind(p,e._refreshHandler).unbind(y,e._progressHandler).unbind(w,e._requestEndHandler).unbind("error",e._errorHandler)}});C(z,{caret:function(e){var t,n=e.ownerDocument.selection;return t=n?Math.abs(n.createRange().moveStart(f,-e.value.length)):e.selectionStart},selectText:function(e,t,n){try{if(e.createTextRange){e.focus();var i=e.createTextRange();i.collapse(!0),i.moveStart(f,t),i.moveEnd(f,n-t),i.select()}else e.setSelectionRange(t,n)}catch(a){}},inArray:function(e,t){var n,i,a=t.children;if(!e||e.parentNode!==t)return-1;for(n=0,i=a.length;i>n;n++)if(e===a[n])return n;return-1}}),i.ui.List=z,a.Select=z.extend({init:function(e,t){z.fn.init.call(this,e,t),this._initial=this.element.val()},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this._bound=!1,this.options.autoBind&&this.dataSource.fetch()},close:function(){this.popup.close()},select:function(e){var n=this;return e===t?n.selectedIndex:(n._select(e),n._triggerCascade(),n._old=n._accessor(),n._oldIndex=n.selectedIndex,t)},_accessor:function(e,n){var i,a=this.element[0],r=this._isSelect,o=a.selectedIndex;return e===t?(r?o>-1&&(i=a.options[o],i&&(e=i.value)):e=a.value,e):(r?(o>-1&&a.options[o].removeAttribute(b),a.selectedIndex=n,i=a.options[n],i&&i.setAttribute(b,b)):a.value=e,t)},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrow.removeClass(g),e._focused.attr("aria-busy",!1),e._busy=null},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(function(){e._focused.attr("aria-busy",!0),e._arrow.addClass(g)},100))},_requestEnd:function(){this._request=!1},_dataSource:function(){var t,n=this,a=n.element,r=n.options,o=r.dataSource||{};o=e.isArray(o)?{data:o}:o,n._isSelect&&(t=a[0].selectedIndex,t>-1&&(r.index=t),o.select=a,o.fields=[{field:r.dataTextField},{field:r.dataValueField}]),n.dataSource&&n._refreshHandler?n._unbindDataSource():(n._refreshHandler=T(n.refresh,n),n._progressHandler=T(n._showBusy,n),n._requestEndHandler=T(n._requestEnd,n),n._errorHandler=T(n._hideBusy,n)),n.dataSource=i.data.DataSource.create(o).bind(p,n._refreshHandler).bind(y,n._progressHandler).bind(w,n._requestEndHandler).bind("error",n._errorHandler)},_get:function(t){var n,i,a=this,r=a._data();if("function"==typeof t)for(n=0,i=r.length;i>n;n++)if(t(r[n])){t=n;break}if("number"==typeof t){if(0>t)return e();t=e(a.ul[0].children[t])}return t&&t.nodeType&&(t=e(t)),t},_move:function(e){var t,n,i=this,a=e.keyCode,r=i.ul[0],s=i.popup.visible()?"_select":"_accept",l=i._current,d=a===o.DOWN;if(a===o.UP||d){if(e.altKey)i.toggle(d);else{if(t=r.firstChild,!t&&!i._accessor()&&"filter"!==i._state)return i._fetch||(i.dataSource.one(p,function(){i._move(e),i._fetch=!1}),i._fetch=!0,i._filterSource()),e.preventDefault(),!0;d?(!l||-1===i.selectedIndex&&!i.value()&&l[0]===t?l=t:(l=l[0].nextSibling,l||t!==r.lastChild||(l=t)),i[s](l)):(l=l?l[0].previousSibling:r.lastChild,l||t!==r.lastChild||(l=t),i[s](l))}e.preventDefault(),n=!0}else a===o.ENTER||a===o.TAB?(i.popup.visible()&&e.preventDefault(),i._accept(l),n=!0):a===o.ESC&&(i.popup.visible()&&e.preventDefault(),i.close(),n=!0);return n},_selectItem:function(){var e,t,n=this,i=n.options,a=n.selectedIndex;e=n._isSelect&&!n._initial&&!i.value&&i.index&&!n._bound,e||(t=n._selectedValue||i.value||n._accessor()),t?n.value(t):(!n._bound||a>-1)&&(n._bound||(a=i.index),n.select(a))},_fetchItems:function(e){var n=this,i=n.ul[0].firstChild;return n._request?!0:n._fetch||i?t:n.options.cascadeFrom?!i:(n.dataSource.one(p,function(){n.value(e),n._fetch=!1}),n._fetch=!0,n.dataSource.fetch(),!0)},_options:function(n,i){var a,r,o,s,d=this,c=d.element,u=c[0].selectedIndex,p=n.length,f="",h=0;for(i&&(h=1,f=i,-1===i.indexOf(e(c[0].firstChild).text())&&(u+=1));p>h;h++)a="",f+=a;c.html(f),c[0].selectedIndex=-1===u?0:u},_reset:function(){var t=this,n=t.element,i=n.attr("form"),a=i?e("#"+i):n.closest("form");a[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=a.on("reset",t._resetHandler))},_cascade:function(){var t,i,a,r,o,s=this,l=s.options,d=l.cascadeFrom;if(d){if(s._selectedValue=l.value||s._accessor(),i=e("#"+d),t=i.data("kendo"+l.name),t||(t=i.data("kendo"+E[l.name])),!t)return;l.autoBind=!1,r=l.cascadeFromField||t.options.dataValueField,o=function(){var e=s._selectedValue||s.value();e?(s.value(e),s.dataSource.view()[0]&&-1!==s.selectedIndex||s._clearSelection(t,!0)):s.select(l.index),s.enable(),s._triggerCascade()},a=function(){var e,i,a=t.dataItem(),l=a?t._value(a):null;l||0===l?(e=s.dataSource.filter()||{},n(e,r),i=e.filters||[],i.push({field:r,operator:"eq",value:l}),s.dataSource.one(p,o).filter(i)):(s.enable(!1),s._clearSelection(t),s._triggerCascade())},t.bind("cascade",function(){a()}),t._bound?a():t.value()||s.enable(!1)}}})}(window.kendo.jQuery),function(e,t){function n(e,t,n,i){var a,r=e.getFullYear(),o=t.getFullYear(),s=n.getFullYear();return r-=r%i,a=r+(i-1),o>r&&(r=o),a>s&&(a=s),r+"-"+a}function i(e){for(var t,n=0,i=e.min,a=e.max,r=e.start,o=e.setter,l=e.build,d=e.cells||12,c=e.perRow||4,u=e.content||H,p=e.empty||A,f=e.html||'';d>n;n++)n>0&&0===n%c&&(f+=''),t=l(r,n),f+=s(r,i,a)?u(t):p(t),o(r,1);return f+"
      "}function a(e,t,n){var i=e.getFullYear(),a=t.getFullYear(),r=a,o=0;return n&&(a-=a%n,r=a-a%n+n-1),i>r?o=1:a>i&&(o=-1),o}function r(){var e=new ht;return new ht(e.getFullYear(),e.getMonth(),e.getDate())}function o(e,t,n){var i=r();return e&&(i=new ht(+e)),t>i?i=new ht(+t):i>n&&(i=new ht(+n)),i}function s(e,t,n){return+e>=+t&&+n>=+e}function l(e,t){return e.slice(t).concat(e.slice(0,t))}function d(e,t,n){t=t instanceof ht?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function c(t){e(this).toggleClass(Y,it.indexOf(t.type)>-1||t.type==tt)}function u(e){e.preventDefault()}function p(e){return F(e).calendars.standard}function f(e){var n=mt[e.start],i=mt[e.depth],a=F(e.culture);e.format=S(e.format||a.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=W),(i===t||i>n)&&(e.depth=W),e.dates||(e.dates=[])}function h(e){I&&e.find("*").attr("unselectable","on")}function m(e,t){for(var n=0,i=t.length;i>n;n++)if(e===+t[n])return!0;return!1}function g(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate():!1}function v(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth():!1}var _,k=window.kendo,b=k.support,y=k.ui,w=y.Widget,x=k.keys,C=k.parseDate,T=k.date.adjustDST,S=k._extractFormat,D=k.template,F=k.getCulture,E=k.support.transitions,z=E?E.css+"transform-origin":"",H=D('#=data.value#',{useWithBlock:!1}),A=D(' ',{useWithBlock:!1}),M=k.support.browser,I=M.msie&&M.version<9,R=".kendoCalendar",N="click"+R,O="keydown"+R,P="id",B="min",L="left",V="slideIn",W="month",U="century",q="change",j="navigate",G="value",Y="k-state-hover",$="k-state-disabled",K="k-state-focused",Q="k-other-month",J=' class="'+Q+'"',X="k-nav-today",Z="td:has(.k-link)",et="blur"+R,tt="focus",nt=tt+R,it=b.touch?"touchstart":"mouseenter",at=b.touch?"touchstart"+R:"mouseenter"+R,rt=b.touch?"touchend"+R+" touchmove"+R:"mouseleave"+R,ot=6e4,st=864e5,lt="_prevArrow",dt="_nextArrow",ct="aria-disabled",ut="aria-selected",pt=e.proxy,ft=e.extend,ht=Date,mt={month:0,year:1,decade:2,century:3},gt=w.extend({init:function(t,n){var i,a,r=this;w.fn.init.call(r,t,n),t=r.wrapper=r.element,n=r.options,n.url=window.unescape(n.url),r._templates(),r._header(),r._footer(r.footer),a=t.addClass("k-widget k-calendar").on(at+" "+rt,Z,c).on(O,"table.k-content",pt(r._move,r)).on(N,Z,function(t){var n=t.currentTarget.firstChild;-1!=n.href.indexOf("#")&&t.preventDefault(),r._click(e(n))}).on("mouseup"+R,function(){r._focusView(r.options.focusOnNav!==!1)}).attr(P),a&&(r._cellID=a+"_cell_selected"),f(n),i=C(n.value,n.format,n.culture),r._index=mt[n.start],r._current=new ht(+o(i,n.min,n.max)),r._addClassProxy=function(){r._active=!0,r._cell.addClass(K)},r._removeClassProxy=function(){r._active=!1,r._cell.removeClass(K)},r.value(i),k.notify(r)},options:{name:"Calendar",value:null,min:new ht(1900,0,1),max:new ht(2099,11,31),dates:[],url:"",culture:"",footer:"",format:"",month:{},start:W,depth:W,animation:{horizontal:{effects:V,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}}},events:[q,j],setOptions:function(e){f(e),w.fn.setOptions.call(this,e)},destroy:function(){var e=this,t=e._today;e.element.off(R),e._title.off(R),e[lt].off(R),e[dt].off(R),k.destroy(e._table),t&&k.destroy(t.off(R)),w.fn.destroy.call(e)},current:function(){return this._current},view:function(){return this._view},focus:function(e){e=e||this._table,this._bindTable(e),e.focus()},min:function(e){return this._option(B,e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(lt,-1)},navigateToFuture:function(){this._navigate(dt,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass($)||e.navigate(e._current,++t)},navigateDown:function(e){var n=this,i=n._index,a=n.options.depth;if(e)return i===mt[a]?(+n._value!=+e&&(n.value(e),n.trigger(q)),t):(n.navigate(e,--i),t)},navigate:function(n,i){i=isNaN(i)?mt[i]:i;var a,r,s,l,d=this,c=d.options,u=c.culture,p=c.min,f=c.max,m=d._title,g=d._table,v=d._oldTable,k=d._value,b=d._current,y=n&&+n>+b,w=i!==t&&i!==d._index;n||(n=b),d._current=n=new ht(+o(n,p,f)),i===t?i=d._index:d._index=i,d._view=r=_.views[i],s=r.compare,l=i===mt[U],m.toggleClass($,l).attr(ct,l),l=s(n,p)<1,d[lt].toggleClass($,l).attr(ct,l),l=s(n,f)>-1,d[dt].toggleClass($,l).attr(ct,l),g&&v&&v.data("animating")&&(v.kendoStop(!0,!0),g.kendoStop(!0,!0)),d._oldTable=g,(!g||d._changeView)&&(m.html(r.title(n,p,f,u)),d._table=a=e(r.content(ft({min:p,max:f,date:n,url:c.url,dates:c.dates,format:c.format,culture:u},d[r.name]))),h(a),d._animate({from:g,to:a,vertical:w,future:y}),d._focus(n),d.trigger(j)),i===mt[c.depth]&&k&&d._class("k-state-selected",r.toDateString(k)),d._class(K,r.toDateString(n)),!g&&d._cell&&d._cell.removeClass(K),d._changeView=!0},value:function(e){var n=this,i=n._view,a=n.options,r=n._view,o=a.min,l=a.max;return e===t?n._value:(e=C(e,a.format,a.culture),null!==e&&(e=new ht(+e),s(e,o,l)||(e=null)),n._value=e,r&&null===e&&n._cell?n._cell.removeClass("k-state-selected"):(n._changeView=!e||i&&0!==i.compare(e,n._current),n.navigate(e)),t)},_move:function(t){var n,i,a,r,s=this,l=s.options,d=t.keyCode,c=s._view,u=s._index,p=new ht(+s._current),f=k.support.isRtl(s.wrapper);return t.target===s._table[0]&&(s._active=!0),t.ctrlKey?d==x.RIGHT&&!f||d==x.LEFT&&f?(s.navigateToFuture(),i=!0):d==x.LEFT&&!f||d==x.RIGHT&&f?(s.navigateToPast(),i=!0):d==x.UP?(s.navigateUp(),i=!0):d==x.DOWN&&(s._click(e(s._cell[0].firstChild)),i=!0):(d==x.RIGHT&&!f||d==x.LEFT&&f?(n=1,i=!0):d==x.LEFT&&!f||d==x.RIGHT&&f?(n=-1,i=!0):d==x.UP?(n=0===u?-7:-4,i=!0):d==x.DOWN?(n=0===u?7:4,i=!0):d==x.ENTER?(s._click(e(s._cell[0].firstChild)),i=!0):d==x.HOME||d==x.END?(a=d==x.HOME?"first":"last",r=c[a](p),p=new ht(r.getFullYear(),r.getMonth(),r.getDate(),p.getHours(),p.getMinutes(),p.getSeconds(),p.getMilliseconds()),i=!0):d==x.PAGEUP?(i=!0,s.navigateToPast()):d==x.PAGEDOWN&&(i=!0,s.navigateToFuture()),(n||a)&&(a||c.setDate(p,n),s._focus(o(p,l.min,l.max)))),i&&t.preventDefault(),s._current},_animate:function(e){var t=this,n=e.from,i=e.to,a=t._active;n?n.parent().data("animating")?(n.parent().kendoStop(!0,!0).remove(),n.remove(),i.insertAfter(t.element[0].firstChild),t._focusView(a)):n.is(":visible")&&t.options.animation!==!1?t[e.vertical?"_vertical":"_horizontal"](n,i,e.future):(i.insertAfter(n),n.remove(),t._focusView(a)):(i.insertAfter(t.element[0].firstChild),t._bindTable(i))},_horizontal:function(e,n,i){var a=this,r=a._active,o=a.options.animation.horizontal,s=o.effects,l=e.outerWidth();s&&-1!=s.indexOf(V)&&(e.add(n).css({width:l}),e.wrap("
      "),a._focusView(r,e),e.parent().css({position:"relative",width:2*l,"float":L,"margin-left":i?0:-l}),n[i?"insertAfter":"insertBefore"](e),ft(o,{effects:V+":"+(i?"right":L),complete:function(){e.remove(),n.unwrap(),a._focusView(r),a._oldTable=t}}),e.parent().kendoStop(!0,!0).kendoAnimate(o))},_vertical:function(e,n){var i,a,r=this,o=r.options.animation.vertical,s=o.effects,l=r._active;s&&-1!=s.indexOf("zoom")&&(n.css({position:"absolute",top:e.prev().outerHeight(),left:0}).insertBefore(e),z&&(i=r._cellByDate(r._view.toDateString(r._current)),a=i.position(),a=a.left+parseInt(i.width()/2,10)+"px"+" "+(a.top+parseInt(i.height()/2,10)+"px"),n.css(z,a)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.remove(),n.css({position:"static",top:0,left:0}),r._focusView(l),r._oldTable=t}}),n.kendoStop(!0,!0).kendoAnimate(o))},_cellByDate:function(t){return this._table.find("td:not(."+Q+")").filter(function(){return e(this.firstChild).attr(k.attr(G))===t})},_class:function(t,n){var i=this,a=i._cellID,r=i._cell;r&&r.removeAttr(ut).removeAttr(P),r=i._table.find("td:not(."+Q+")").removeClass(t).filter(function(){return e(this.firstChild).attr(k.attr(G))===n}).attr(ut,!0),t!==K||i._active||i.options.focusOnNav===!1||(t=""),r.addClass(t),r[0]&&(i._cell=r),a&&(r.attr(P,a),i._table.removeAttr("aria-activedescendant").attr("aria-activedescendant",a))},_bindTable:function(e){e.on(nt,this._addClassProxy).on(et,this._removeClassProxy)},_click:function(e){var t=this,n=t.options,i=new Date(+t._current),a=e.attr(k.attr(G)).split("/");a=new ht(a[0],a[1],a[2]),T(a,0),t._view.setDate(i,a),t.navigateDown(o(i,n.min,n.max))},_focus:function(e){var t=this,n=t._view;0!==n.compare(e,t._current)?t.navigate(e):(t._current=e,t._class(K,n.toDateString(e)))},_focusView:function(e,t){e&&this.focus(t)},_footer:function(n){var i=this,a=r(),o=i.element,s=o.find(".k-footer");return n?(s[0]||(s=e('').appendTo(o)),i._today=s.show().find(".k-link").html(n(a)).attr("title",k.toString(a,"D",i.options.culture)),i._toggle(),t):(i._toggle(!1),s.hide(),t)},_header:function(){var e,t=this,n=t.element,i=t.options.focusOnNav!==!1;n.find(".k-header")[0]||n.html('
      '),e=n.find(".k-link").on(at+" "+rt+" "+nt+" "+et,c).click(!1),t._title=e.eq(1).on(N,function(){t._focusView(i),t.navigateUp()}),t[lt]=e.eq(0).on(N,function(){t._focusView(i),t.navigateToPast()}),t[dt]=e.eq(2).on(N,function(){t._focusView(i),t.navigateToFuture()})},_navigate:function(e,t){var n=this,i=n._index+1,a=new ht(+n._current);e=n[e],e.hasClass($)||(i>3?a.setFullYear(a.getFullYear()+100*t):_.views[i].setDate(a,t),n.navigate(a))},_option:function(e,n){var i,a=this,r=a.options,o=a._value||a._current;return n===t?r[e]:(n=C(n,r.format,r.culture),n&&(r[e]=new ht(+n),i=e===B?n>o:o>n,(i||v(o,n))&&(a._value=null,a._changeView=!0),a._changeView||(a._changeView=!(!r.month.content&&!r.month.empty)),a.navigate(a._value),a._toggle()),t)},_toggle:function(e){var n=this,i=n.options,a=n._today;e===t&&(e=s(r(),i.min,i.max)),a&&(a.off(N),e?a.addClass(X).removeClass($).on(N,pt(n._todayClick,n)):a.removeClass(X).addClass($).on(N,u))},_todayClick:function(e){var t=this,n=mt[t.options.depth],i=r();e.preventDefault(),0===t._view.compare(t._current,i)&&t._index==n&&(t._changeView=!1),t._value=i,t.navigate(i,n),t.trigger(q)},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month,a=i.content,r=i.empty;e.month={content:D(''+(a||"#=data.value#")+"",{useWithBlock:!!a}),empty:D(''+(r||" ")+"",{useWithBlock:!!r})},n!==!1&&(e.footer=D(n||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}))}});y.plugin(gt),_={firstDayOfMonth:function(e){return new ht(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t=t||k.culture().calendar;for(var n=t.firstDay,i=new ht(e.getFullYear(),e.getMonth(),0,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());i.getDay()!=n;)_.setTime(i,-1*st);return i},setTime:function(e,t){var n=e.getTimezoneOffset(),i=new ht(e.getTime()+t),a=i.getTimezoneOffset()-n;e.setTime(i.getTime()+a*ot)},views:[{name:W,title:function(e,t,n,i){return p(i).months.names[e.getMonth()]+" "+e.getFullYear()},content:function(e){for(var t=this,n=0,a=e.min,r=e.max,o=e.date,s=e.dates,d=e.format,c=e.culture,u=e.url,f=u&&s[0],h=p(c),g=h.firstDay,v=h.days,b=l(v.names,g),y=l(v.namesShort,g),w=_.firstVisibleDay(o,h),x=t.first(o),C=t.last(o),S=t.toDateString,D=new ht,F='';7>n;n++)F+='";return D=new ht(D.getFullYear(),D.getMonth(),D.getDate()),T(D,0),D=+D,i({cells:42,perRow:7,html:F+='',start:new ht(w.getFullYear(),w.getMonth(),w.getDate()),min:new ht(a.getFullYear(),a.getMonth(),a.getDate()),max:new ht(r.getFullYear(),r.getMonth(),r.getDate()),content:e.content,empty:e.empty,setter:t.setDate,build:function(e){var t=[],n=e.getDay(),i="",a="#";return(x>e||e>C)&&t.push(Q),+e===D&&t.push("k-today"),(0===n||6===n)&&t.push("k-weekend"),f&&m(+e,s)&&(a=u.replace("{0}",k.toString(e,d,c)),i=" k-action-link"),{date:e,dates:s,ns:k.ns,title:k.toString(e,"D",c),value:e.getDate(),dateString:S(e),cssClass:t[0]?' class="'+t.join(" ")+'"':"",linkClass:i,url:a}}})},first:function(e){return _.firstDayOfMonth(e)},last:function(e){var t=new ht(e.getFullYear(),e.getMonth()+1,0),n=_.firstDayOfMonth(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t},compare:function(e,t){var n,i=e.getMonth(),a=e.getFullYear(),r=t.getMonth(),o=t.getFullYear();return n=a>o?1:o>a?-1:i==r?0:i>r?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof ht?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):_.setTime(e,t*st),T(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=p(e.culture).months.namesAbbr,n=this.toDateString,a=e.min,r=e.max;return i({min:new ht(a.getFullYear(),a.getMonth(),1),max:new ht(r.getFullYear(),r.getMonth(),1),start:new ht(e.date.getFullYear(),0,1),setter:this.setDate,build:function(e){return{value:t[e.getMonth()],ns:k.ns,dateString:n(e),cssClass:""}}})},first:function(e){return new ht(e.getFullYear(),0,e.getDate())},last:function(e){return new ht(e.getFullYear(),11,e.getDate())},compare:function(e,t){return a(e,t)},setDate:function(e,t){var n,i=e.getHours();t instanceof ht?(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)),T(e,i)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/1"}},{name:"decade",title:function(e,t,i){return n(e,t,i,10)},content:function(e){var t=e.date.getFullYear(),n=this.toDateString;return i({start:new ht(t-t%10-1,0,1),min:new ht(e.min.getFullYear(),0,1),max:new ht(e.max.getFullYear(),0,1),setter:this.setDate,build:function(e,t){return{value:e.getFullYear(),ns:k.ns,dateString:n(e),cssClass:0===t||11==t?J:""}}})},first:function(e){var t=e.getFullYear();return new ht(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return new ht(t-t%10+9,e.getMonth(),e.getDate())},compare:function(e,t){return a(e,t,10)},setDate:function(e,t){d(e,t,1)},toDateString:function(e){return e.getFullYear()+"/0/1"}},{name:U,title:function(e,t,i){return n(e,t,i,100)},content:function(e){var t=e.date.getFullYear(),n=e.min.getFullYear(),a=e.max.getFullYear(),r=this.toDateString,o=n,s=a;return o-=o%10,s-=s%10,10>s-o&&(s=o+9),i({start:new ht(t-t%100-10,0,1),min:new ht(o,0,1),max:new ht(s,0,1),setter:this.setDate,build:function(e,t){var i=e.getFullYear(),o=i+9;return n>i&&(i=n),o>a&&(o=a),{ns:k.ns,value:i+" - "+o,dateString:r(e),cssClass:0===t||11==t?J:""}}})},first:function(e){var t=e.getFullYear();return new ht(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return new ht(t-t%100+99,e.getMonth(),e.getDate())},compare:function(e,t){return a(e,t,100)},setDate:function(e,t){d(e,t,10)},toDateString:function(e){var t=e.getFullYear();return t-t%10+"/0/1"}}]},_.isEqualDatePart=g,_.makeUnselectable=h,_.restrictValue=o,_.isInRange=s,_.normalize=f,_.viewsEnum=mt,k.calendar=_}(window.kendo.jQuery),function(e,t){function n(t){var n=t.parseFormats,i=t.format;P.normalize(t),n=e.isArray(n)?n:[n],-1===e.inArray(i,n)&&n.splice(0,0,t.format),t.parseFormats=n}function i(e){e.preventDefault()}var a,r=window.kendo,o=r.ui,s=o.Widget,l=r.parseDate,d=r.keys,c=r.template,u=r._activeElement,p="
      ",f="",h=".kendoDatePicker",m="click"+h,g="open",v="close",_="change",k="dateView",b="disabled",y="readonly",w="k-state-default",x="k-state-focused",C="k-state-selected",T="k-state-disabled",S="k-state-hover",D="keydown"+h,F="mouseenter"+h+" mouseleave"+h,E="mousedown"+h,z="id",H="min",A="max",M="month",I="aria-disabled",R="aria-expanded",N="aria-hidden",O="aria-readonly",P=r.calendar,B=P.isInRange,L=P.restrictValue,V=P.isEqualDatePart,W=e.extend,U=e.proxy,q=Date,j=function(t){var n,i=this,s=document.body,l=a.sharedCalendar,d=e(p).attr(N,"true").addClass("k-calendar-container").appendTo(s);l||(l=a.sharedCalendar=new o.Calendar(e(p).attr(z,r.guid()).hide().appendTo(s),{focusOnNav:!1}),P.makeUnselectable(l.element)),i.calendar=l,i.options=t=t||{},n=t.id,n&&(n+="_dateview",d.attr(z,n),i._dateViewID=n),i.popup=new o.Popup(d,W(t.popup,t,{name:"Popup",isRtl:r.support.isRtl(t.anchor)})),i.div=d,i._templates(),i.value(t.value)};j.prototype={_calendar:function(){var e=this,t=e.popup,n=e.options,a=e.calendar,r=a.element;r.data(k)!==e&&(r.appendTo(t.element).data(k,e).off(m+" "+D).on(m,"td:has(.k-link)",U(e._click,e)).on(E,i).show(),a.unbind(_).bind(_,n),a.month=e.month,a.options.dates=n.dates,a.options.depth=n.depth,a.options.culture=n.culture,a._footer(e.footer),a.min(n.min),a.max(n.max),a._value=null,a.navigate(e._value||e._current,n.start),e.value(e._value))},destroy:function(){var n,i=this,r=i.calendar,o=r.element,s=o.data(k);(s===t||s===i)&&(n=e(".k-calendar-container"),n.length>1?o.hide().appendTo(document.body):(o.off(h),r.destroy(),r.element.remove(),a.sharedCalendar=null)),i.popup.destroy()},open:function(){var e=this;e._calendar(),e.popup.open()},close:function(){this.popup.close()},min:function(e){this._option(H,e)},max:function(e){this._option(A,e)},toggle:function(){var e=this;e[e.popup.visible()?v:g]()},move:function(e){var n=this,i=e.keyCode,a=n.calendar,r=e.ctrlKey&&i==d.DOWN||i==d.ENTER;if(i==d.ESC)return n.close(),t;if(e.altKey)return i==d.DOWN?(n.open(),e.preventDefault()):i==d.UP&&(n.close(),e.preventDefault()),t;if(n.popup.visible())return r&&a._cell.hasClass(C)?(n.close(),e.preventDefault(),t):(n._current=a._move(e),t)},value:function(e){var t=this,n=t.calendar,i=t.options;t._value=e,t._current=new q(+L(e,i.min,i.max)),n.element.data(k)===t&&n.value(e)},_click:function(e){-1!==e.currentTarget.className.indexOf(C)&&this.close()},_option:function(e,t){var n=this,i=n.options,a=n.calendar;i[e]=t,a.element.data(k)===n&&a[e](t)},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month||{},a=i.content,o=i.empty;e.month={content:c(''+(a||"#=data.value#")+"",{useWithBlock:!!a}),empty:c("
      ",{useWithBlock:!!o})},n!==!1&&(e.footer=c(n||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}))}},j.normalize=n,r.DateView=j,a=s.extend({init:function(e,t){var i,a,o=this;s.fn.init.call(o,e,t),e=o.element,t=o.options,n(t),o._wrapper(),o.dateView=new j(W({},t,{id:e.attr(z),anchor:o.wrapper,change:function(){o._change(this.value()),o.close()},close:function(t){o.trigger(v)?t.preventDefault():(e.attr(R,!1),a.attr(N,!0))},open:function(t){var n,i=o.options;o.trigger(g)?t.preventDefault():(o.element.val()!==o._oldText&&(n=l(e.val(),i.parseFormats,i.culture),n?(o.dateView._current=n,o.dateView.calendar._focus(n)):o.dateView.value(n)),e.attr(R,!0),a.attr(N,!1))}})),a=o.dateView.div,o._icon();try{e[0].setAttribute("type","text")}catch(d){e[0].type="text"}e.addClass("k-input").attr({role:"textbox","aria-haspopup":!0,"aria-expanded":!1,"aria-owns":o.dateView._dateViewID}),o._reset(),o._template(),i=e.is("[disabled]"),i?o.enable(!1):o.readonly(e.is("[readonly]")),o._old=o._update(t.value||o.element.val()),o._oldText=e.val(),r.notify(o)},events:[g,v,_],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:M,depth:M,animation:{},month:{},dates:[],ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#'},setOptions:function(e){var t=this,i=t.dateView,a=i.options; s.fn.setOptions.call(t,e),n(t.options),i.options=W(a,t.options,{change:a.change,close:a.close,open:a.open})},_editable:function(e){var t=this,n=t._dateIcon.off(h),a=t.element.off(h),r=t._inputWrapper.off(h),o=e.readonly,s=e.disable;o||s?(r.addClass(s?T:w).removeClass(s?w:T),a.attr(b,s).attr(y,o).attr(I,s).attr(O,o)):(r.addClass(w).removeClass(T).on(F,t._toggleHover),a.removeAttr(b).removeAttr(y).attr(I,!1).attr(O,!1).on("keydown"+h,U(t._keydown,t)).on("blur"+h,U(t._blur,t)).on("focus"+h,function(){t._inputWrapper.addClass(x)}),n.on(m,U(t._click,t)).on(E,i))},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)})},destroy:function(){var e=this;s.fn.destroy.call(e),e.dateView.destroy(),e.element.off(h),e._dateIcon.off(h),e._inputWrapper.off(h),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option(H,e)},max:function(e){return this._option(A,e)},value:function(e){var n=this;return e===t?n._value:(n._old=n._update(e),null===n._old&&n.element.val(""),n._oldText=n.element.val(),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(S,"mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(x)},_click:function(){var e=this,t=e.element;e.dateView.toggle(),r.support.touch||t[0]===u()||t.focus()},_change:function(e){var t=this;e=t._update(e),+t._old!=+e&&(t._old=e,t._oldText=t.element.val(),t.trigger(_),t.element.trigger(_))},_keydown:function(e){var t=this,n=t.dateView,i=t.element.val();n.popup.visible()||e.keyCode!=d.ENTER||i===t._oldText?(n.move(e),t._updateARIA(n._current)):t._change(i)},_icon:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('select').insertAfter(i)),n._dateIcon=t.attr({role:"button","aria-controls":n.dateView._dateViewID})},_option:function(e,n){var i=this,a=i.options;return n===t?a[e]:(n=l(n,a.parseFormats,a.culture),n&&(a[e]=new q(+n),i.dateView[e](n)),t)},_update:function(e){var t,n=this,i=n.options,a=i.min,o=i.max,s=l(e,i.parseFormats,i.culture);return+s===+n._value?(t=r.toString(s,i.format,i.culture),t!==e&&n.element.val(null===s?e:t),s):(null!==s&&V(s,a)?s=L(s,a,o):B(s,a,o)||(s=null),n._value=s,n.dateView.value(s),n.element.val(s?r.toString(s,i.format,i.culture):e),n._updateARIA(s),s)},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-datepicker"),t[0]||(t=i.wrap(f).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(f).parent()),t[0].style.cssText=i[0].style.cssText,i.css({width:"100%",height:i[0].style.height}),n.wrapper=t.addClass("k-widget k-datepicker k-header").addClass(i[0].className),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),a=i?e("#"+i):n.closest("form");a[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue)},t._form=a.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=c(this.options.ARIATemplate)},_updateARIA:function(e){this.element.attr("aria-label",this._ariaTemplate({current:e}))}}),o.plugin(a)}(window.kendo.jQuery),function(e,t){function n(e,t,n){return n?t.substring(0,e).split(n).length-1:0}function i(e,t,i){return t.split(i)[n(e,t,i)]}function a(e,t,i,a){var r=t.split(a);return r.splice(n(e,t,a),1,i),a&&""!==r[r.length-1]&&r.push(""),r.join(a)}function r(e){var t=e.value.length;S(e,t,t)}var o=window.kendo,s=o.support,l=o._activeElement,d=s.placeholder,c=o.ui,u=o.keys,p=o.data.DataSource,f=c.List,h="aria-disabled",m="aria-readonly",g="k-state-default",v="disabled",_="readonly",k="k-state-focused",b="k-state-selected",y="k-state-disabled",w="k-state-hover",x=".kendoAutoComplete",C="mouseenter"+x+" mouseleave"+x,T=f.caret,S=f.selectText,D=e.proxy,F=f.extend({init:function(t,n){var i,a=this;a.ns=x,n=e.isArray(n)?{dataSource:n}:n,f.fn.init.call(a,t,n),t=a.element,n=a.options,n.placeholder=n.placeholder||t.attr("placeholder"),d&&t.attr("placeholder",n.placeholder),a._wrapper(),a._loader(),a._dataSource(),a._ignoreCase(),t[0].type="text",i=a.wrapper,a._popup(),t.addClass("k-input").on("keydown"+x,D(a._keydown,a)).on("paste"+x,D(a._search,a)).on("focus"+x,function(){a._prev=a._accessor(),a._placeholder(!1),i.addClass(k)}).on("blur"+x,function(){a._change(),a._placeholder(),i.removeClass(k)}).attr({autocomplete:"off",role:"textbox","aria-haspopup":!0}),a._enable(),a._old=a._accessor(),t[0].id&&t.attr("aria-owns",a.ul[0].id),a._aria(),a._placeholder(),o.notify(a)},options:{name:"AutoComplete",enabled:!0,suggest:!1,template:"",dataTextField:"",minLength:1,delay:200,height:200,filter:"startswith",ignoreCase:!0,highlightFirst:!1,separator:null,placeholder:"",animation:{},value:null},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._refreshHandler=D(e.refresh,e),e._progressHandler=D(e._showBusy,e)),e.dataSource=p.create(e.options.dataSource).bind("change",e._refreshHandler).bind("progress",e._progressHandler)},setDataSource:function(e){this.options.dataSource=e,this._dataSource()},events:["open","close","change","select","dataBinding","dataBound"],setOptions:function(e){f.fn.setOptions.call(this,e),this._template(),this._accessors(),this._aria()},_editable:function(e){var t=this,n=t.element,i=t.wrapper.off(x),a=e.readonly,r=e.disable;a||r?(i.addClass(r?y:g).removeClass(r?g:y),n.attr(v,r).attr(_,a).attr(h,r).attr(m,a)):(i.addClass(g).removeClass(y).on(C,t._toggleHover),n.removeAttr(v).removeAttr(_).attr(h,!1).attr(m,!1))},close:function(){var e=this,t=e._current;t&&t.removeClass(b),e.current(null),e.popup.close()},destroy:function(){var e=this;e.element.off(x),e.wrapper.off(x),f.fn.destroy.call(e)},refresh:function(){var n,i=this,a=i.ul[0],r=i.popup,s=i.options,d=i._data(),c=d.length;i.trigger("dataBinding"),a.innerHTML=o.render(i.template,d),i._height(c),r.visible()&&r._position(),c&&(s.highlightFirst&&i.current(e(a.firstChild)),s.suggest&&i.suggest(e(a.firstChild))),i._open&&(i._open=!1,n=c?"open":"close",i._typing&&i.element[0]!==l()&&(n="close"),r[n](),i._typing=t),i._touchScroller&&i._touchScroller.reset(),i._makeUnselectable(),i._hideBusy(),i.trigger("dataBound")},select:function(e){this._select(e)},search:function(e){var t,n=this,a=n.options,r=a.ignoreCase,o=a.separator;e=e||n._accessor(),n._current=null,clearTimeout(n._typing),o&&(e=i(T(n.element[0]),e,o)),t=e.length,t?t>=n.options.minLength&&(n._open=!0,n._filterSource({value:r?e.toLowerCase():e,operator:a.filter,field:a.dataTextField,ignoreCase:r})):n.popup.close()},suggest:function(e){var i,a=this,r=a._last,o=a._accessor(),s=a.element[0],d=T(s),c=a.options.separator,p=o.split(c),h=n(d,o,c),m=d;return r==u.BACKSPACE||r==u.DELETE?(a._last=t,t):(e=e||"","string"!=typeof e&&(i=f.inArray(e[0],a.ul[0]),e=i>-1?a._text(a._data()[i]):""),0>=d&&(d=o.toLowerCase().indexOf(e.toLowerCase())+1),i=o.substring(0,d).lastIndexOf(c),i=i>-1?d-(i+c.length):d,o=p[h].substring(0,i),e&&(i=e.toLowerCase().indexOf(o.toLowerCase()),i>-1&&(e=e.substring(i+o.length),m=d+e.length,o+=e),c&&""!==p[p.length-1]&&p.push("")),p[h]=o,a._accessor(p.join(c||"")),s===l()&&S(s,d,m),t)},value:function(e){return e===t?this._accessor():(this._accessor(e),this._old=e,t)},_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:e):(i.value=null===e?"":e,n._placeholder(),t)},_accept:function(e){var t=this;t._focus(e),r(t.element[0])},_keydown:function(t){var n=this,i=n.ul[0],a=t.keyCode,r=n._current,o=n.popup.visible();n._last=a,a===u.DOWN?(o&&n._move(r?r.next():e(i.firstChild)),t.preventDefault()):a===u.UP?(o&&n._move(r?r.prev():e(i.lastChild)),t.preventDefault()):a===u.ENTER||a===u.TAB?(a===u.ENTER&&n.popup.visible()&&t.preventDefault(),n._accept(r)):a===u.ESC?(n.popup.visible()&&t.preventDefault(),n.close()):n._search()},_move:function(e){var t=this;e=e[0]?e:null,t.current(e),t.options.suggest&&t.suggest(e)},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._loading.hide(),e.element.attr("aria-busy",!1),e._busy=null},_showBusy:function(){var e=this;e._busy||(e._busy=setTimeout(function(){e.element.attr("aria-busy",!0),e._loading.show()},100))},_placeholder:function(e){if(!d){var n,i=this,a=i.element,r=i.options.placeholder;if(r){if(n=a.val(),e===t&&(e=!n),e||(r=n!==r?n:""),n===i._old&&!e)return;a.toggleClass("k-readonly",e).val(r),r||a[0]!==document.activeElement||f.selectText(a[0],0,0)}}},_search:function(){var e=this;clearTimeout(e._typing),e._typing=setTimeout(function(){e._prev!==e._accessor()&&(e._prev=e._accessor(),e.search())},e.options.delay)},_select:function(t){var n,i,r=this,o=r.options.separator,s=r._data();t=e(t),t[0]&&!t.hasClass(b)&&(i=f.inArray(t[0],r.ul[0]),i>-1&&(s=s[i],n=r._text(s),o&&(n=a(T(r.element[0]),r._accessor(),n,o)),r._accessor(n),r.current(t.addClass(b))))},_loader:function(){this._loading=e('').insertAfter(this.element)},_toggleHover:function(t){e(t.currentTarget).toggleClass(w,"mouseenter"===t.type)},_wrapper:function(){var e,t=this,n=t.element,i=n[0];e=n.parent(),e.is("span.k-widget")||(e=n.wrap("").parent()),e.attr("tabindex",-1),e.attr("role","presentation"),e[0].style.cssText=i.style.cssText,n.css({width:"100%",height:i.style.height}),t._focused=t.element,t.wrapper=e.addClass("k-widget k-autocomplete k-header").addClass(i.className)}});c.plugin(F)}(window.kendo.jQuery),function(e,t){function n(e,t,n){for(var i,a=0,r=t.length-1;r>a;++a)i=t[a],i in e||(e[i]={}),e=e[i];e[t[r]]=n}var i=window.kendo,a=i.ui,r=a.Select,o=i.support.mobileOS,s=".kendoDropDownList",l="disabled",d="readonly",c="change",u="k-state-focused",p="k-state-default",f="k-state-disabled",h="aria-disabled",m="aria-readonly",g="k-state-selected",v="mouseenter"+s+" mouseleave"+s,_="tabindex",k=e.proxy,b=r.extend({init:function(n,a){var o,l,d,c=this,u=a&&a.index;c.ns=s,a=e.isArray(a)?{dataSource:a}:a,r.fn.init.call(c,n,a),c._focusHandler=function(){c.wrapper.focus()},a=c.options,n=c.element.on("focus"+s,c._focusHandler),this._inputTemplate(),c._reset(),c._word="",c._wrapper(),c._tabindex(),c.wrapper.data(_,c.wrapper.attr(_)),c._aria(),c._span(),c._popup(),c._mobile(),c._dataSource(),c._ignoreCase(),c._enable(),c._oldIndex=c.selectedIndex=-1,c._cascade(),u!==t&&(a.index=u),a.autoBind?c.dataSource.fetch():-1===c.selectedIndex&&(d=a.text||"",d||(o=a.optionLabel,l=o&&0===a.index,c._isSelect?d=l?o:n.children(":selected").text():!n[0].value&&l&&(d=o)),c._textAccessor(d)),i.notify(c)},options:{name:"DropDownList",enabled:!0,autoBind:!0,index:0,text:null,value:null,template:"",valueTemplate:"",delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{}},events:["open","close",c,"select","dataBinding","dataBound","cascade"],setOptions:function(e){r.fn.setOptions.call(this,e),this._template(),this._inputTemplate(),this._accessors(),this._aria()},destroy:function(){var e=this;e.wrapper.off(s),e.element.off(s),e._inputWrapper.off(s),r.fn.destroy.call(e)},open:function(){var e=this;e.ul[0].firstChild?(e.popup.open(),e._scroll(e._current)):(e._open=!0,e._request||e.dataSource.fetch())},toggle:function(e){this._toggle(e)},refresh:function(){var e=this,t=e._data(),n=t.length,a=e.options.optionLabel;e.trigger("dataBinding"),e._current&&e.current(null),e.ul[0].innerHTML=i.render(e.template,t),e._height(n),e.popup.visible()&&e.popup._position(),e._isSelect&&(a&&n&&(a=e._optionLabelText(a),a='"),e._options(t,a)),e._open&&(e._open=!1,e.toggle(!!n)),e._hideBusy(),e._makeUnselectable(),e._fetch||(n?e._selectItem():e._textAccessor()!==a&&(e.element.val(""),e._textAccessor(""))),e._bound=!!n,e.trigger("dataBound")},search:function(e){if(e){var n=this,i=n.options.ignoreCase;i&&(e=e.toLowerCase()),n._select(function(a){var r=n._text(a);return r!==t?(r+="",i&&(r=r.toLowerCase()),0===r.indexOf(e)):t})}},text:function(e){var n,i,a=this,r=a.options.ignoreCase;return e=null===e?"":e,e===t?a._textAccessor():("string"==typeof e&&(i=r?e.toLowerCase():e,n=a._select(function(e){return e=a._text(e),r&&(e=(e+"").toLowerCase()),e===i}),n&&(e=n)),a._textAccessor(e),t)},value:function(e){var n,i,a=this;return e===t?a._accessor():(null!==e&&(e=""+e),a._selectedValue=e,i=e||a.options.optionLabel&&!a.element[0].disabled&&""===e,i&&a._fetchItems(e)||(n=a._index(e),a.select(n>-1?n:0)),t)},_editable:function(e){var t=this,n=t.element,a=e.disable,r=e.readonly,o=t.wrapper.off(s),c=t._inputWrapper.off(v),g=function(){c.addClass(u),t._blured=!1},b=function(){if(!t._blured){t._triggerCascade();var e=window.self!==window.top;i.support.mobileOS.ios&&e?t._change():t._blur(),c.removeClass(u),t._blured=!0,n.blur()}};r||a?(a?(o.removeAttr(_),c.addClass(f).removeClass(p)):(c.addClass(p).removeClass(f),o.on("focusin"+s,g).on("focusout"+s,b)),n.attr(l,a).attr(d,r),o.attr(h,a).attr(m,r)):(n.removeAttr(l).removeAttr(d),c.addClass(p).removeClass(f).on(v,t._toggleHover),o.attr(_,o.data(_)).attr(h,!1).attr(m,!1).on("click"+s,function(e){t._blured=!1,e.preventDefault(),t.toggle()}).on("keydown"+s,k(t._keydown,t)).on("keypress"+s,k(t._keypress,t)).on("focusin"+s,g).on("focusout"+s,b))},_accept:function(e){this._focus(e)},_optionLabelText:function(){var e=this.options,t=e.dataTextField,n=e.optionLabel;return n&&t&&"object"==typeof n?this._text(n):n},_data:function(){var e=this,t=e.options,a=t.optionLabel,r=t.dataTextField,o=t.dataValueField,s=e.dataSource.view(),l=s.length,d=a,c=0;if(a&&l){for("object"==typeof a?d=a:r&&(d={},r=r.split("."),o=o.split("."),n(d,o,""),n(d,r,a)),d=new i.data.ObservableArray([d]);l>c;c++)d.push(s[c]);s=d}return s},_keydown:function(e){var t=this,n=e.keyCode,a=i.keys,r=t.ul[0];n===a.LEFT?n=a.UP:n===a.RIGHT&&(n=a.DOWN),e.keyCode=n,t._move(e),n===a.HOME?(e.preventDefault(),t._select(r.firstChild)):n===a.END&&(e.preventDefault(),t._select(r.lastChild))},_selectNext:function(e,n){for(var i,a=this,r=n,o=a._data(),s=o.length,l=a.options.ignoreCase,d=function(n,i){return n+="",l&&(n=n.toLowerCase()),0===n.indexOf(e)?(a._select(i),a._triggerEvents(),!0):t};s>n;n++)if(i=a._text(o[n]),i&&d(i,n))return!0;if(r>0)for(n=0;r>=n;n++)if(i=a._text(o[n]),i&&d(i,n))return!0;return!1},_keypress:function(e){if(0!==e.charCode){var t=this,n=String.fromCharCode(e.charCode||e.keyCode),i=t.selectedIndex,a=t._word;t.options.ignoreCase&&(n=n.toLowerCase())," "===n&&e.preventDefault(),t._last===n&&a.length<=1&&i>-1&&(a||(a=n),t._selectNext(a,i+1))||(t._word=a+n,t._last=n,t._search())}},_popup:function(){r.fn._popup.call(this),this.popup.one("open",function(){this.wrapper=i.wrap(this.element).addClass("km-popup")})},_search:function(){var e=this,n=e.dataSource,i=e.selectedIndex,a=e._word;return clearTimeout(e._typing),e._typing=setTimeout(function(){e._word=""},e.options.delay),e.ul[0].firstChild?(e._selectNext(a,i),e._triggerEvents(),t):(n.one(c,function(){n.data()[0]&&e._selectNext(a,i)}).fetch(),t)},_select:function(e){var n,i,r=this,o=r._current,s=null;return e=r._get(e),e&&e[0]&&!e.hasClass(g)&&(o&&o.removeClass(g),i=a.List.inArray(e[0],r.ul[0]),i>-1&&(s=r._data()[i],n=r._value(s),r.selectedIndex=i,r._textAccessor(s),r._accessor(n!==t?n:r._text(s),i),r._selectedValue=r._accessor(),r.current(e.addClass(g)),r._optionID&&r._current.attr("aria-selected",!0))),s},_triggerEvents:function(){this.popup.visible()||(this._triggerCascade(),this._change())},_mobile:function(){var e=this,t=e.popup,n=t.element.parents(".km-root").eq(0);n.length&&o&&(t.options.animation.open.effects=o.android||o.meego?"fadeIn":o.ios||o.wp?"slideIn:up":t.options.animation.open.effects)},_span:function(){var t,n=this,i=n.wrapper,a="span.k-input";t=i.find(a),t[0]||(i.append(' select').append(n.element),t=i.find(a)),n.span=t,n._inputWrapper=e(i[0].firstChild),n._arrow=i.find(".k-icon").mousedown(function(e){e.preventDefault()})},_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),n.hide(),t._focused=t.wrapper=e.addClass("k-widget k-dropdown k-header").addClass(i.className).css("display","").attr({unselectable:"on",role:"listbox","aria-haspopup":!0,"aria-expanded":!1})},_clearSelection:function(){var e=this,n=e.options.optionLabel;return e.dataSource.view()[0]&&n?(e.select(0),t):(e.selectedIndex=-1,e.element.val(""),e._textAccessor(n),t)},_inputTemplate:function(){var t=this,n=t.options.valueTemplate;n=n?i.template(n):e.proxy(i.template("#:this._text(data)#"),t),t.valueTemplate=n},_textAccessor:function(n){var a=this.dataItem(),r=this.span;return n===t?r.text():(e.isPlainObject(n)||n instanceof i.data.ObservableObject?a=n:a&&this._text(a)===n||(this.options.dataTextField?(a={},a[this.options.dataTextField]=n,a[this.options.dataValueField]=this._accessor()):a=n),r.html(this.valueTemplate(a)),t)}});a.plugin(b)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,a=i.List,r=i.Select,o=n.support,s=o.placeholder,l=n._activeElement,d=n.keys,c=".kendoComboBox",u="click"+c,p="mousedown"+c,f="disabled",h="readonly",m="change",g="k-state-default",v="k-state-focused",_="k-state-disabled",k="aria-disabled",b="aria-readonly",y="k-state-selected",w="filter",x="accept",C="rebind",T="mouseenter"+c+" mouseleave"+c,S=null,D=e.proxy,F=r.extend({init:function(t,i){var a,o=this;o.ns=c,i=e.isArray(i)?{dataSource:i}:i,r.fn.init.call(o,t,i),o._focusHandler=function(){o.input.focus()},i=o.options,t=o.element.on("focus"+c,o._focusHandler),i.placeholder=i.placeholder||t.attr("placeholder"),o._reset(),o._wrapper(),o._input(),o._tabindex(o.input),o._popup(),o._dataSource(),o._ignoreCase(),o._enable(),o._cascade(),o._aria(),o._oldIndex=o.selectedIndex=-1,i.autoBind?o._filterSource():(a=i.text,!a&&o._isSelect&&(a=t.children(":selected").text()),a&&(o.input.val(a),o._prev=a)),a||o._placeholder(),n.notify(o)},options:{name:"ComboBox",enabled:!0,index:-1,text:null,value:null,autoBind:!0,delay:200,dataTextField:"",dataValueField:"",minLength:0,height:200,highlightFirst:!0,template:"",filter:"none",placeholder:"",suggest:!1,cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{}},events:["open","close",m,"select","dataBinding","dataBound","cascade"],setOptions:function(e){r.fn.setOptions.call(this,e),this._template(),this._accessors(),this._aria()},current:function(e){var n=this,i=n._current;return e===t?i:(i&&i.removeClass(y),r.fn.current.call(n,e),t)},destroy:function(){var e=this;e.input.off(c),e.element.off(c),e._inputWrapper.off(c),r.fn.destroy.call(e)},_editable:function(e){var t=this,n=e.disable,i=e.readonly,a=t._inputWrapper.off(c),r=t.element.add(t.input.off(c)),o=t._arrow.parent().off(u+" "+p);i||n?(a.addClass(n?_:g).removeClass(n?g:_),r.attr(f,n).attr(h,i).attr(k,n).attr(b,i)):(a.addClass(g).removeClass(_).on(T,t._toggleHover),r.removeAttr(f).removeAttr(h).attr(k,!1).attr(b,!1),o.on(u,function(){t.toggle()}).on(p,function(e){e.preventDefault()}),t.input.on("keydown"+c,D(t._keydown,t)).on("focus"+c,function(){a.addClass(v),t._placeholder(!1)}).on("blur"+c,function(){a.removeClass(v),clearTimeout(t._typing),t.options.text!==t.input.val()&&t.text(t.text()),t._placeholder(),t._blur(),t.element.blur()}))},open:function(){var e=this,t=e.dataSource.options.serverFiltering;e.popup.visible()||(!e.ul[0].firstChild||e._state===x&&!t?(e._open=!0,e._state=C,e._filterSource()):(e.popup.open(),e._scroll(e._current)))},refresh:function(){var i,a,r,o,s=this,d=s.ul[0],c=s.options,u=s._state,p=s._data(),f=p.length;s.trigger("dataBinding"),d.innerHTML=n.render(s.template,p),s._height(f),s.popup.visible()&&s.popup._position(),s._isSelect&&(i=s.element[0].firstChild,u===C&&(s._state="",a=s.value()),o=s._option,s._option=t,s._options(p),o&&o[0].selected?s._custom(o.val()):s._bound||i||s._custom("")),f&&(c.highlightFirst&&s.current(e(d.firstChild)),c.suggest&&s.input.val()&&s._request!==t&&s.suggest(e(d.firstChild))),u===w||s._fetch||s._selectItem(),s._open&&(s._open=!1,r=!!f,s._typing&&s.input[0]!==l()&&(r=!1),s.toggle(r),s._typing=t),s._touchScroller&&s._touchScroller.reset(),s._makeUnselectable(),s._hideBusy(),s._bound=!0,s.trigger("dataBound")},search:function(e){e="string"==typeof e?e:this.text();var t=this,n=e.length,i=t.options,a=i.ignoreCase,r=i.filter,o=i.dataTextField;clearTimeout(t._typing),n>=i.minLength&&(t._state=w,"none"===r?t._filter(e):(t._open=!0,t._filterSource({value:a?e.toLowerCase():e,field:o,operator:r,ignoreCase:a})))},suggest:function(e){var n,i=this,r=i.input[0],o=i.text(),s=a.caret(r),c=i._last;return c==d.BACKSPACE||c==d.DELETE?(i._last=t,t):(e=e||"","string"!=typeof e&&(n=a.inArray(e[0],i.ul[0]),e=n>-1?i._text(i.dataSource.view()[n]):""),0>=s&&(s=o.toLowerCase().indexOf(e.toLowerCase())+1),e?(n=e.toLowerCase().indexOf(o.toLowerCase()),n>-1&&(o+=e.substring(n+o.length))):o=o.substring(0,s),o.length===s&&e||(r.value=o,r===l()&&a.selectText(r,s,o.length)),t)},text:function(e){e=null===e?"":e;var n,i=this,a=i.input[0],r=i.options.ignoreCase,o=e;return e===t?a.value:(n=i.dataItem(),n&&i._text(n)===e&&""+i._value(n)===i._old?(i._triggerCascade(),t):(r&&(o=o.toLowerCase()),i._select(function(e){return e=i._text(e),r&&(e=(e+"").toLowerCase()),e===o}),i.selectedIndex<0&&(i._custom(e),a.value=e),i._prev=a.value,i._triggerCascade(),t))},toggle:function(e){var t=this;t._toggle(e)},value:function(e){var n,i=this,a=i.options;return e===t?i._accessor():(null!==e&&(e=""+e),i._selectedValue=e,!i._open&&e&&i._fetchItems(e)||(n=i._index(e),n>-1?i.select(n):(i.current(S),i._custom(e),(a.value!==e||a.text!==i.input.val())&&(i.text(e),i._placeholder())),i._old=i._accessor(),i._oldIndex=i.selectedIndex),t)},_accept:function(e){var t=this;e?t._focus(e):(t.text(t.text()),t._change())},_custom:function(t){var n=this,i=n.element,a=n._option;n._state===w&&(n._state=x),n._isSelect?(a||(a=n._option=e("
      '+y[n]+"
      "+(o||" ")+"
      # for (var i = 0; i < colors.length; ++i) { ## if (i && i % columns == 0) { # # } #'+"# } #"+"
      ")}),D=T.extend({init:function(t,n){var i=this;T.fn.init.call(i,t,n),n=i.options,t=i.element,i.wrapper=t.addClass("k-widget k-flatcolorpicker").append(i._template(n)),i._hueElements=e(".k-hsv-rectangle, .k-transparency-slider .k-slider-track",t),i._selectedColor=e(".k-selected-color-display",t),i._colorAsText=e("input.k-color-value",t),i._sliders(),i._hsvArea(),i._updateUI(i._value||new E(1,0,0,1)),t.find("input.k-color-value").on(w,function(t){var n,a,r=this;if(t.keyCode==h.ENTER)try{n=o(r.value),a=i.color(),i._select(n,n.equals(a))}catch(s){e(r).addClass("k-state-error")}else i.options.autoupdate&&setTimeout(function(){var e=o(r.value,!0);e&&i._updateUI(e,!0)},10)}).end().on(y,".k-controls button.apply",function(){i._select(i._getHSV())}).on(y,".k-controls button.cancel",function(){i._updateUI(i.color()),i._cancel()}),C&&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,T.fn.destroy.call(this)},options:{name:"FlatColorPicker",opacity:!1,buttons:!1,input:!0,preview:!0,autoupdate:!0,messages:k},_applyIEFilter:function(){var e=this.element.find(".k-hue-slider .k-slider-track")[0],t=e.currentStyle.backgroundImage;t=t.replace(/^url\([\'\"]?|[\'\"]?\)$/g,""),e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+t+"', sizingMethod='scale')"},_sliders:function(){function e(e){n._updateUI(n._getHSV(e.value,null,null,null))}function t(e){n._updateUI(n._getHSV(null,null,null,e.value/100))}var n=this,i=n.element;n._hueSlider=i.find(".k-hue-slider").kendoSlider({min:0,max:359,tickPlacement:"none",showButtons:!1,slide:e,change:e}).data("kendoSlider"),n._opacitySlider=i.find(".k-transparency-slider").kendoSlider({min:0,max:100,tickPlacement:"none",showButtons:!1,slide:t,change:t}).data("kendoSlider")},_hsvArea:function(){function e(e,n){var i=this.offset,a=e-i.left,r=n-i.top,o=this.width,s=this.height;a=0>a?0:a>o?o:a,r=0>r?0:r>s?s:r,t._svChange(a/o,1-r/s)}var t=this,n=t.element,i=n.find(".k-hsv-rectangle"),a=i.find(".k-draghandle").attr("tabIndex",0).on(w,d(t._keydown,t));t._hsvEvents=new c.UserEvents(i,{global:!0,press:function(t){this.offset=c.getOffset(i),this.width=i.width(),this.height=i.height(),a.focus(),e.call(this,t.x.location,t.y.location)},start:function(){i.addClass("k-dragging"),a.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=a},_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",0):t.removeAttr("tabIndex")},_keydown:function(e){function t(t,n){var a=i._getHSV();a[t]+=n*(e.shiftKey?.01:.05),a[t]<0&&(a[t]=0),a[t]>1&&(a[t]=1),i._updateUI(a),l(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),l(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 a=this._hsvRect,r=a.width(),o=a.height(),s=this._hsvHandle.position();return null==e&&(e=this._hueSlider.value()),null==t&&(t=s.left/r),null==n&&(n=1-s.top/o),null==i&&(i=this._opacitySlider?this._opacitySlider.value()/100:1),new H(e,t,n,i)},_svChange:function(e,t){var n=this._getHSV(null,e,t,null);this._updateUI(n)},_updateUI:function(e,t){var n=this,i=n._hsvRect;e&&(this._colorAsText.removeClass("k-state-error"),n._selectedColor.css(m,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(m,new H(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:c.template('# if (preview) { #
      # } #
      # if (opacity) { ## } ## if (buttons) { #
      # } #')}),F=u.extend({toHSV:function(){return this},toRGB:function(){return this},toHex:function(){return this.toBytes().toHex()},toBytes:function(){return this},toCss:function(){return"#"+this.toHex()},toCssRgba:function(){var e=this.toBytes();return"rgba("+e.r+", "+e.g+", "+e.b+", "+r(this.a)+")"},toDisplay:function(){return C?this.toCss():this.toCssRgba()},equals:function(e){return e===this||null!==e&&this.toCssRgba()==o(e).toCssRgba()},diff:function(e){if(null==e)return 0/0;var t=this.toBytes();return e=e.toBytes(),Math.sqrt(Math.pow(.3*(t.r-e.r),2)+Math.pow(.59*(t.g-e.g),2)+Math.pow(.11*(t.b-e.b),2))},clone:function(){var e=this.toBytes();return e===this&&(e=new z(e.r,e.g,e.b,e.a)),e}}),E=F.extend({init:function(e,t,n,i){this.r=e,this.g=t,this.b=n,this.a=i},toHSV:function(){var e,t,n=this.r,i=this.g,a=this.b,r=Math.min(n,i,a),o=Math.max(n,i,a),s=o,l=o-r;return 0===l?new H(0,0,s,this.a):(0!==o?(t=l/o,e=n==o?(i-a)/l:i==o?2+(a-n)/l:4+(n-i)/l,e*=60,0>e&&(e+=360)):(t=0,e=-1),new H(e,t,s,this.a))},toBytes:function(){return new z(255*this.r,255*this.g,255*this.b,this.a)}}),z=E.extend({init:function(e,t,n,i){this.r=Math.round(e),this.g=Math.round(t),this.b=Math.round(n),this.a=i},toRGB:function(){return new E(this.r/255,this.g/255,this.b/255,this.a)},toHSV:function(){return this.toRGB().toHSV()},toHex:function(){return a(this.r,2)+a(this.g,2)+a(this.b,2)},toBytes:function(){return this}}),H=F.extend({init:function(e,t,n,i){this.h=e,this.s=t,this.v=n,this.a=i},toRGB:function(){var e,t,n,i,a,r,o,s,l=this.h,d=this.s,c=this.v;if(0===d)t=n=i=c;else switch(l/=60,e=Math.floor(l),a=l-e,r=c*(1-d),o=c*(1-d*a),s=c*(1-d*(1-a)),e){case 0:t=c,n=s,i=r;break;case 1:t=o,n=c,i=r;break;case 2:t=r,n=c,i=s;break;case 3:t=r,n=o,i=c;break;case 4:t=s,n=r,i=c;break;default:t=c,n=r,i=o}return new E(t,n,i,this.a)},toBytes:function(){return this.toRGB().toBytes()}}),A=f.extend({init:function(t,n){var i,a,r,s=this;f.fn.init.call(s,t,n),n=s.options,t=s.element,i=t.attr("value")||t.val(),i=i?o(i,!0):o(n.value,!0),s._value=n.value=i,a=s.wrapper=e(s._template(n)),t.hide().after(a),t.is("input")&&t.appendTo(a),s.enable(!t.attr("disabled")),r=t.attr("accesskey"),r&&(t.attr("accesskey",null),a.attr("accesskey",r)),s.bind("activate",function(e){e.isDefaultPrevented()||s.toggle()}),s._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,f.fn.destroy.call(this)},enable:function(e){var t=this,n=t.wrapper,i=n.children(".k-picker-wrap"),a=i.find(".k-select");0===arguments.length&&(e=!0),t.element.attr("disabled",!e),n.attr("disabled",!e),a.off(b).on("mousedown"+b,l),n.addClass("k-state-disabled").removeAttr("tabIndex").add("*",n).off(b),e&&n.removeClass("k-state-disabled").attr("tabIndex",0).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(w,d(t._keydown,t)).on(y,".k-icon",d(t.toggle,t)).on(y,t.options.toolIcon?".k-tool-icon":".k-selected-color",function(){t.trigger("activate")})},_template:c.template('# if (toolIcon) { ## } else { ## } #'),options:{name:"ColorPicker",palette:null,columns:10,toolIcon:null,value:null,messages:k,opacity:!1,buttons:!0,preview:!0},events:["activate","change","select","open","close"],open:function(){this._getPopup().open()},close:function(){this._getPopup().close()},toggle:function(){this._getPopup().toggle()},color:T.fn.color,value:T.fn.value,_select:T.fn._select,_triggerSelect:T.fn._triggerSelect,_isInputTypeColor:function(){var e=this.element[0];return/^input$/i.test(e.tagName)&&/^color$/i.test(e.type)},_updateUI:function(e){e&&(this._isInputTypeColor()||1==e.a?this.element.val(e.toCss()):this.element.val(e.toCssRgba())),this._triggerSelect(e),this.wrapper.find(".k-selected-color").css(m,e?e.toDisplay():"transparent")},_keydown:function(e){var t=e.keyCode;this._getPopup().visible()?(t==h.ESC?this._selector._cancel():this._selector._keydown(e),l(e)):(t==h.ENTER||t==h.DOWN)&&(this.open(),l(e))},_getPopup:function(){var t,i,a,r=this,s=r._popup;return s||(t=this.options,i=t.palette?S:D,t._standalone=!1,delete t.select,delete t.change,delete t.cancel,a=this._selector=new i(e("
      ").appendTo(document.body),t),r._popup=s=a.wrapper.kendoPopup({anchor:r.wrapper}).data("kendoPopup"),a.bind({select:function(e){r._updateUI(o(e.value))},change:function(){r._select(a.color()),r.close()},cancel:function(){r.close()}}),s.bind({close:function(e){if(r.trigger("close"))return e.preventDefault(),n;r.wrapper.children(".k-picker-wrap").removeClass("k-state-focused");var t=a._selectOnHide();t?r._select(t):(r.wrapper.focus(),r._updateUI(r.color()))},open:function(e){r.trigger("open")?e.preventDefault():r.wrapper.children(".k-picker-wrap").addClass("k-state-focused")},activate:function(){a._select(r.color(),!0),a.focus(),r.wrapper.children(".k-picker-wrap").addClass("k-state-focused")}})),s}});p.plugin(S),p.plugin(D),p.plugin(A),c.parseColor=o,c.Color={fromBytes:function(e,t,n,i){return new z(e,t,n,null!=i?i:1)},fromRGB:function(e,t,n,i){return new E(e,t,n,null!=i?i:1)},fromHSV:function(e,t,n,i){return new H(e,t,n,null!=i?i:1)}}}(jQuery,parseInt),function(e,t){function n(t){return e.trim(t).replace(/ /gi,"")}var i=window.kendo,a=i.ui,r=e.proxy,o=e.extend,s=e.grep,l=e.map,d=e.inArray,c="k-state-selected",u="asc",p="desc",f="change",h="init",m="select",g="kendoPopup",v="kendoFilterMenu",_="kendoMenu",k=".kendoColumnMenu",b=a.Widget,y=b.extend({init:function(t,n){var a,o=this;b.fn.init.call(o,t,n),t=o.element,n=o.options,o.owner=n.owner,o.dataSource=n.dataSource,o.field=t.attr(i.attr("field")),a=t.find(".k-header-column-menu"),a[0]||(a=t.prepend('').find(".k-header-column-menu")),o.link=a.attr("tabindex",-1).on("click"+k,r(o._click,o)),o.wrapper=e('
      ')},_init:function(){var e=this;e.pane=e.element.closest(i.roleSelector("pane")).data("kendoMobilePane"),e.pane&&(e._isMobile=!0),e._isMobile?e._createMobileMenu():e._createMenu(),e._sort(),e._columns(),e._filter(),e.trigger(h,{field:e.field,container:e.wrapper})},events:[h],options:{name:"ColumnMenu",messages:{sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filter:"Filter",columns:"Columns",done:"Done",settings:"Column Settings"},filter:"",columns:!0,sortable:!0,filterable:!0,animations:{left:"slide"}},_createMenu:function(){var e=this,t=e.options;e.wrapper.html(i.template(w)({ns:i.ns,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns})),e.popup=e.wrapper[g]({anchor:e.link,open:r(e._open,e),activate:r(e._activate,e),close:e.options.closeCallback}).data(g),e.menu=e.wrapper.children()[_]({orientation:"vertical",closeOnClick:!1}).data(_)},_createMobileMenu:function(){var e=this,t=e.options,n=i.template(x)({ns:i.ns,field:e.field,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns});e.view=e.pane.append(n),e.wrapper=e.view.element.find(".k-column-menu"),e.menu=new C(e.wrapper.children(),{pane:e.pane}),e.view.element.on("click",".k-done",function(t){e.close(),t.preventDefault()})},destroy:function(){var e=this;b.fn.destroy.call(e),e.filterMenu&&e.filterMenu.destroy(),e._refreshHandler&&e.dataSource.unbind(f,e._refreshHandler),e.options.columns&&(e.owner.unbind("columnShow",e._updateColumnsMenuHandler),e.owner.unbind("columnHide",e._updateColumnsMenuHandler)),e.menu&&(e.menu.element.off(k),e.menu.destroy()),e.wrapper.off(k),e.popup&&e.popup.destroy(),e.view&&e.view.purge(),e.link.off(k)},close:function(){this.menu.close(),this.popup&&(this.popup.close(),this.popup.element.off("keydown"+k))},_click:function(e){e.preventDefault(),e.stopPropagation();var t=this.options;t.filter&&this.element.is(!t.filter)||(this.popup||this.pane||this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle())},_open:function(){var t=this;e(".k-column-menu").not(t.wrapper).each(function(){e(this).data(g).close()}),t.popup.element.on("keydown"+k,function(e){e.keyCode==i.keys.ESC&&t.close()})},_activate:function(){this.menu.element.focus()},_ownerColumns:function(){var e=this.owner.columns,t=s(e,function(e){var t=!0,i=n(e.title||"");return(e.menu===!1||!e.field&&!i.length)&&(t=!1),t});return l(t,function(t){return{originalField:t.field,field:t.field||t.title,title:t.title||t.field,hidden:t.hidden,index:d(t,e)}})},_sort:function(){var t=this;t.options.sortable&&(t.refresh(),t._refreshHandler=r(t.refresh,t),t.dataSource.bind(f,t._refreshHandler),t.menu.bind(m,function(n){var i,a=e(n.item);a.hasClass("k-sort-asc")?i=u:a.hasClass("k-sort-desc")&&(i=p),i&&(a.parent().find(".k-sort-"+(i==u?p:u)).removeClass(c),t._sortDataSource(a,i),t.close())}))},_sortDataSource:function(e,n){var i,a,r=this,o=r.options.sortable,s=r.dataSource,l=s.sort()||[];if(e.hasClass(c)&&o&&o.allowUnsort!==!1?(e.removeClass(c),n=t):e.addClass(c),o===!0||"single"===o.mode)l=[{field:r.field,dir:n}];else{for(i=0,a=l.length;a>i;i++)if(l[i].field===r.field){l.splice(i,1);break}l.push({field:r.field,dir:n})}s.sort(l)},_columns:function(){var t=this;t.options.columns&&(t._updateColumnsMenu(),t._updateColumnsMenuHandler=r(t._updateColumnsMenu,t),t.owner.bind(["columnHide","columnShow"],t._updateColumnsMenuHandler),t.menu.bind(m,function(n){var a,r,o,l,c=e(n.item),u=t.owner.columns;t._isMobile&&n.preventDefault(),c.parent().closest("li.k-columns-item")[0]&&(a=c.find(":checkbox"),a.attr("disabled")||(l=a.attr(i.attr("field")),o=s(u,function(e){return e.field==l||e.title==l})[0],r=d(o,u),o.hidden===!0?t.owner.showColumn(r):t.owner.hideColumn(r)))}))},_updateColumnsMenu:function(){var t=i.attr("field"),n=s(this._ownerColumns(),function(e){return!e.hidden}),a=s(n,function(e){return e.originalField}).length;n=l(n,function(e){return e.field}),this.wrapper.find(".k-columns-item input["+t+"]").prop("checked",!1).filter(function(){return d(e(this).attr(t),n)>-1}).prop("checked",!0).prop("disabled",1==a)},_filter:function(){var t=this,n=t.options;n.filterable!==!1&&(t.filterMenu=t.wrapper.find(".k-filterable")[v](o(!0,{},{appendToElement:!0,dataSource:n.dataSource,values:n.values,field:t.field},n.filterable)).data(v),t._isMobile&&t.menu.bind(m,function(n){var i=e(n.item);i.hasClass("k-filter-item")&&t.pane.navigate(t.filterMenu.view,t.options.animations.left)}))},refresh:function(){var e,t,n,i=this,a=i.options.dataSource.sort()||[],r=i.field;for(i.wrapper.find(".k-sort-asc, .k-sort-desc").removeClass(c),t=0,n=a.length;n>t;t++)e=a[t],r==e.field&&i.wrapper.find(".k-sort-"+e.dir).addClass(c)}}),w='
        #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){#
      • #}##}##if(filterable){#
      • ${messages.filter}
      • #}#
      ',x='
      ${messages.settings}
      • ${field}
          #if(sortable){#
        • ${messages.sortAscending}
        • ${messages.sortDescending}
        • #}##if(filterable){#
        • ${messages.filter}
        • #}#
      • #if(showColumns){#
      • ${messages.columns}
          #for (var idx = 0; idx < columns.length; idx++) {#
        • #}#
      • #}#
      ',C=b.extend({init:function(e,t){b.fn.init.call(this,e,t),this.element.on("click"+k,"li:not(.k-separator)","_click")},events:[m],_click:function(e){this.trigger(m,{item:e.currentTarget})&&e.preventDefault()},close:function(){this.options.pane.navigate("")},destroy:function(){b.fn.destroy.call(this),this.element.off(k)}});a.plugin(y)}(window.kendo.jQuery),function(e,t){function n(e){return Array(e+1).join(' ')}function i(e){var t,n=" ";if(e){if(typeof e===ft)return e;for(t in e)n+=t+'="'+e[t]+'"'}return n}function a(t){var n=0;return e("> .k-grouping-header, > .k-grid-toolbar",t).each(function(){n+=this.offsetHeight}),n}function r(t,n){e("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",n)}function o(e){var t,n,i={},a={};if(!R(e))for(H(e)||(e=[e]),t=0,n=e.length;n>t;t++)i[e[t].aggregate]=0,a[e[t].field]=i;return a}function s(e,t,n){var i=e.eq(t),a=e.eq(n);i[t>n?"insertBefore":"insertAfter"](a)}function l(e,t,n){var i,a,r,o;for(n=H(n)?n:[n],i=0,a=n.length;a>i;i++)r=n[i],D(r)&&r.click&&(o=r.name||r.text,t.on(dt+j,"a.k-grid-"+(o||"").replace(/\s/g,""),{commandName:o},M(r.click,e)))}function d(e){return z(e,function(e){return!e.hidden})}function c(e){e=e||{};var t=e.style;return t?(t=t.replace(/((.*)?display)(.*)?:([^;]*)/i,"$1:none"),t===e.style&&(t=t.replace(/(.*)?/i,"display:none;$1"))):t="display:none",F({},e,{style:t})}function u(e){e=e||{};var t=e.style;return t&&(e.style=t.replace(/(display\s*:\s*none\s*;?)*/gi,"")),e}function p(t,n,i,a){var r,o=t.find(">colgroup"),s=E(n,function(e){return r=e.width,r&&0!==parseInt(r,10)?k.format('',typeof r===ft?r:r+"px"):""});(i||o.find(".k-hierarchy-col").length)&&s.splice(0,0,''),o.length&&o.remove(),o=e(Array(a+1).join('')+s.join("")),o.is("colgroup")||(o=e("").append(o)),t.prepend(o),xt.msie&&8==xt.version&&(t.css("display","inline-table"),window.setTimeout(function(){t.css("display","") },1))}function f(e){var t,n,i,a={};for(n=0,i=e.length;i>n;n++)t=e[n],a[t.value]=t.text;return a}function h(e,t,n){var i=n&&n.length&&D(n[0])&&"value"in n[0],a=i?f(n)[e]:e;return a=null!=a?a:"",t?k.format(t,a):a}function m(e,t,n){for(var i,a=0,r=e[a];r;){if(i=n?!0:"none"!==r.style.display,i&&!bt.test(r.className)&&--t<0){r.style.display=n?"":"none";break}r=e[++a]}}function g(e,t){var n,i,a;if(typeof e===ft&&e===t)return e;if(D(e)&&e.name===t)return e;if(H(e))for(n=0,i=e.length;i>n;n++)if(a=e[n],typeof a===ft&&a===t||a.name===t)return a;return null}function v(t,n){var i,a,r,o=xt.msie;if(n===!0){if(t=e(t),r=o&&t.parent().is(".k-grid-content,.k-grid-header-wrap"),r&&(i=t.parent().scrollTop(),a=t.parent().scrollLeft()),o)try{t[0].setActive()}catch(s){t[0].focus()}else t[0].focus();r&&(t.parent().scrollTop(i),t.parent().scrollLeft(a))}else e(t).one("focusin",function(e){e.preventDefault()}).focus()}function _(t){var n=e(t.currentTarget),i=n.is("th"),a=n.closest("table")[0];k.support.touch||(a===this.table[0]||a===this.thead.parent()[0])&&(this.current(n),(i||!e(t.target).is(":button,a,:input,a>.k-icon,textarea,span.k-icon,span.k-link,.k-input,.k-multiselect-wrap"))&&setTimeout(function(){Tt&&e(k._activeElement()).hasClass("k-widget")||v(a,!0)}),i&&t.preventDefault())}var k=window.kendo,b=k.ui,y=k.data.DataSource,w=b.Groupable,x=k.support.tbodyInnerHtml,C=k._activeElement,T=b.Widget,S=k.keys,D=e.isPlainObject,F=e.extend,E=e.map,z=e.grep,H=e.isArray,A=e.inArray,M=e.proxy,I=k.isFunction,R=e.isEmptyObject,N=Math,O="progress",P="error",B=":not(.k-group-cell):not(.k-hierarchy-cell):visible",L="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",V="tr:not(.k-footer-template):visible",W=":not(.k-group-cell):not(.k-hierarchy-cell):visible",U=V+":first>"+W+":first",q="th.k-header:not(.k-group-cell,.k-hierarchy-cell)",j=".kendoGrid",G="edit",Y="save",$="remove",K="detailInit",Q="filterMenuInit",J="columnMenuInit",X="change",Z="columnHide",et="columnShow",tt="saveChanges",nt="dataBound",it="detailExpand",at="detailCollapse",rt="k-state-focused",ot="k-state-selected",st="columnResize",lt="columnReorder",dt="click",ct="height",ut="tabIndex",pt="function",ft="string",ht="Are you sure you want to delete this record?",mt="Delete",gt="Cancel",vt=/(\}|\#)/gi,_t=/#/gi,kt="[\\x20\\t\\r\\n\\f]",bt=RegExp("(^|"+kt+")"+"(k-group-cell|k-hierarchy-cell)"+"("+kt+"|$)"),yt='#=text#',wt=!1,xt=k.support.browser,Ct=xt.msie&&7==xt.version,Tt=xt.msie&&8==xt.version,St=T.extend({init:function(e,t){var n=this;T.fn.init.call(n,e,t),n._refreshHandler=M(n.refresh,n),n.setDataSource(t.dataSource),n.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(X,t._refreshHandler),t.dataSource=e,t.dataSource.bind(X,t._refreshHandler)},options:{name:"VirtualScrollable",itemHeight:e.noop},destroy:function(){var e=this;T.fn.destroy.call(e),e.dataSource.unbind(X,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off(j),e.drag&&e.drag.destroy()},wrap:function(){var t,n=this,i=k.support.scrollbar()+1,a=n.element;a.css({width:"auto",overflow:"hidden"}).css(wt?"padding-left":"padding-right",i),n.content=a.children().first(),t=n.wrapper=n.content.wrap('
      ').parent().bind("DOMMouseScroll"+j+" mousewheel"+j,M(n._wheelScroll,n)),k.support.kineticScrollNeeded&&(n.drag=new k.UserEvents(n.wrapper,{global:!0,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(a).bind("scroll"+j,M(n._scroll,n))},_wheelScroll:function(e){var n,i=this,a=i.verticalScrollbar.scrollTop(),r=e.originalEvent,o=r.wheelDeltaY;r.wheelDelta?(o===t||o)&&(n=r.wheelDelta):r.detail&&r.axis===r.VERTICAL_AXIS&&(n=10*-r.detail),n&&(e.preventDefault(),i.verticalScrollbar.scrollTop(a+-n))},_scroll:function(e){var t=this,n=e.currentTarget.scrollTop,i=t.dataSource,a=t.itemHeight,r=i.skip()||0,o=t._rangeStart||r,s=t.element.innerHeight(),l=!!(t._scrollbarTop&&t._scrollbarTop>n),d=N.max(N.floor(n/a),0),c=N.max(d+N.floor(s/a),0);t._scrollTop=n-o*a,t._scrollbarTop=n,t._fetch(d,c,l)||(t.wrapper[0].scrollTop=t._scrollTop)},_fetch:function(e,t,n){var i=this,a=i.dataSource,r=i.itemHeight,o=a.take(),s=i._rangeStart||a.skip()||0,l=N.floor(e/o)*o,d=!1,c=.33;return s>e?(d=!0,s=N.max(0,t-o),i._scrollTop=(e-s)*r,i._page(s,o)):t>=s+o&&!n?(d=!0,s=e,i._scrollTop=r,i._page(s,o)):i._fetching||(l+o-o*c>e&&e>o&&a.prefetch(l-o,o),t>l+o*c&&a.prefetch(l+o,o)),d},_page:function(e,t){var n=this,i=n.dataSource;clearTimeout(n._timeout),n._fetching=!0,n._rangeStart=e,i.inRange(e,t)?i.range(e,t):(k.ui.progress(n.wrapper.parent(),!0),n._timeout=setTimeout(function(){i.range(e,t)},100))},refresh:function(){var e,t,n,i,a=this,r="",o=25e4,s=a.dataSource,l=a._rangeStart,d=k.support.kineticScrollNeeded?0:k.support.scrollbar(),c=a.wrapper[0];for(k.ui.progress(a.wrapper.parent(),!1),clearTimeout(a._timeout),n=a.itemHeight=a.options.itemHeight()||0,i=c.scrollWidth>c.offsetWidth?d:0,e=s.total()*n+i,t=0;t
      ';e%o&&(r+='
      '),a.verticalScrollbar.html(r),c.scrollTop=a._scrollTop,a.drag&&a.drag.cancel(),l&&!a._fetching&&(a._rangeStart=s.skip()),a._fetching=!1}}),Dt={create:{text:"Add new record",imageClass:"k-add",className:"k-grid-add",iconClass:"k-icon"},cancel:{text:"Cancel changes",imageClass:"k-cancel",className:"k-grid-cancel-changes",iconClass:"k-icon"},save:{text:"Save changes",imageClass:"k-update",className:"k-grid-save-changes",iconClass:"k-icon"},destroy:{text:"Delete",imageClass:"k-delete",className:"k-grid-delete",iconClass:"k-icon"},edit:{text:"Edit",imageClass:"k-edit",className:"k-grid-edit",iconClass:"k-icon"},update:{text:"Update",imageClass:"k-update",className:"k-grid-update",iconClass:"k-icon"},canceledit:{text:"Cancel",imageClass:"k-cancel",className:"k-grid-cancel",iconClass:"k-icon"}},Ft=T.extend({init:function(e,t){var n=this;t=H(t)?{dataSource:t}:t,T.fn.init.call(n,e,t),wt=k.support.isRtl(e),n._element(),n._aria(),n._columns(n.options.columns),n._dataSource(),n._tbody(),n._pageable(),n._thead(),n._groupable(),n._toolbar(),n._setContentHeight(),n._templates(),n._navigatable(),n._selectable(),n._details(),n._editable(),n._attachCustomCommandsEvent(),n.options.autoBind?n.dataSource.fetch():n._footer(),k.notify(n)},events:[X,"dataBinding","cancel",nt,it,at,K,Q,J,G,Y,$,tt,st,lt,et,Z],setDataSource:function(e){var t=this;t.options.dataSource=e,t._dataSource(),t._pageable(),t.options.groupable&&t._groupable(),t._thead(),t.virtualScrollable&&t.virtualScrollable.setDataSource(t.options.dataSource),t.options.autoBind&&e.fetch()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,navigatable:!1,pageable:!1,editable:!1,groupable:!1,rowTemplate:"",altRowTemplate:"",dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1,detailTemplate:null,columnResizeHandleWidth:3},destroy:function(){var t,n=this;T.fn.destroy.call(n),n.pager&&n.pager.destroy(),n.groupable&&n.groupable.destroy(),n.options.reorderable&&n.wrapper.data("kendoReorderable").destroy(),n.resizable&&(n.resizable.destroy(),n._resizeUserEvents&&(n._resizeHandleDocumentClickHandler&&e(document).off("click",n._resizeHandleDocumentClickHandler),n._resizeUserEvents.destroy())),n.virtualScrollable&&n.virtualScrollable.destroy(),n._destroyColumnAttachments(),n._destroyEditable(),n.dataSource.unbind(X,n._refreshHandler).unbind(O,n._progressHandler).unbind(P,n._errorHandler),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.pane&&n.pane.destroy(),t.off(j),k.destroy(n.wrapper)},setOptions:function(e){var t=this;T.fn.setOptions.call(this,e),t._templates()},items:function(){return this.tbody.children(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")},_destroyColumnAttachments:function(){var t=this;t.resizeHandle=null,t.thead.find("th").each(function(){var t=e(this),n=t.data("kendoFilterMenu"),i=t.data("kendoSortable"),a=t.data("kendoColumnMenu");n&&n.destroy(),i&&i.destroy(),a&&a.destroy()})},_attachCustomCommandsEvent:function(){var e,t,n,i=this,a=i.columns||[];for(t=0,n=a.length;n>t;t++)e=a[t].command,e&&l(i,i.wrapper,e)},_aria:function(){var e=this.element.attr("id")||"aria";e&&(this._cellId=e+"_active_cell")},_element:function(){var t=this,n=t.element;n.is("table")||(n=t.options.scrollable?t.element.find("> .k-grid-content > table"):t.element.children("table"),n.length||(n=e("").appendTo(t.element))),Ct&&n.attr("cellspacing",0),t.table=n.attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_createResizeHandle:function(t,n){var i,r,o,s,l,d=this,c=d.options.columnResizeHandleWidth,u=d.options.scrollable,p=d.resizeHandle;p||(p=d.resizeHandle=e('
      '),t.append(p)),wt?(r=n.closest(".k-grid-header-wrap"),o=xt.msie?r.scrollLeft():0,s=xt.webkit?r[0].scrollWidth-r[0].offsetWidth-r.scrollLeft():0,l=xt.mozilla?r[0].scrollWidth-r[0].offsetWidth-(r[0].scrollWidth-r[0].offsetWidth-r.scrollLeft()):0,i=n.position().left-s+l-o):(i=n[0].offsetWidth,n.prevAll(":visible").each(function(){i+=this.offsetWidth})),p.css({top:u?0:a(d.wrapper),left:i-c,height:n.outerHeight(),width:3*c}).data("th",n).show()},_positionColumnResizeHandle:function(t){var n=this,i=n.resizeHandle,a=n.options.columnResizeHandleWidth;n.thead.on("mousemove"+j,"th:not(.k-group-cell,.k-hierarchy-cell)",function(o){var s=e(this),l=o.clientX,d=e(window).scrollLeft(),c=s.offset().left+(wt?0:this.offsetWidth);l+d>c-a&&c+a>l+d?n._createResizeHandle(t,s):i?i.hide():r(n.wrapper,"")})},_resizeHandleDocumentClick:function(t){e(t.target).closest(".k-column-active").length||(e(document).off(t),this._hideResizeHandle())},_hideResizeHandle:function(){this.resizeHandle&&(this.resizeHandle.data("th").removeClass("k-column-active"),this.resizeHandle.hide())},_positionColumnResizeHandleTouch:function(t){var n=this;n._resizeUserEvents=new k.UserEvents(n.thead,{filter:"th:not(.k-group-cell,.k-hierarchy-cell)",threshold:10,hold:function(i){var a=e(i.target);i.preventDefault(),a.addClass("k-column-active"),n._createResizeHandle(t,a),n._resizeHandleDocumentClickHandler||(n._resizeHandleDocumentClickHandler=M(n._resizeHandleDocumentClick,n)),e(document).on("click",n._resizeHandleDocumentClickHandler)}})},_resizable:function(){var t,n,i,a,o,s,l=this,d=l.options,c=this._isMobile;d.resizable&&(t=d.scrollable?l.wrapper.find(".k-grid-header-wrap:first"):l.wrapper,c?l._positionColumnResizeHandleTouch(t):l._positionColumnResizeHandle(t),l.resizable=new b.Resizable(t,{handle:".k-resize-handle",hint:function(t){return e('
      ').css({height:t.data("th").outerHeight()+l.tbody.attr("clientHeight")})},start:function(t){s=e(t.currentTarget).data("th"),c&&l._hideResizeHandle();var u=e.inArray(s[0],s.parent().children(":visible")),p=l.tbody.parent(),f=l.footer||e();r(l.wrapper,"col-resize"),o=d.scrollable?l.thead.parent().find("col:eq("+u+")").add(p.children("colgroup").find("col:eq("+u+")")).add(f.find("colgroup").find("col:eq("+u+")")):p.children("colgroup").find("col:eq("+u+")"),n=t.x.location,i=s.outerWidth(),a=l.tbody.outerWidth()},resize:function(t){var r=wt?-1:1,s=i+t.x.location*r-n*r,c=l.footer||e();s>10&&(o.css("width",s),d.scrollable&&a&&(l._footerWidth=a+t.x.location*r-n*r,l.tbody.parent().add(l.thead.parent()).add(c.find("table")).css("width",l._footerWidth)))},resizeend:function(){var e,t=s.outerWidth();r(l.wrapper,""),i!=t&&(e=l.columns[s.parent().find("th:not(.k-group-cell,.k-hierarchy-cell)").index(s)],e.width=t,l.trigger(st,{column:e,oldWidth:i,newWidth:t})),l._hideResizeHandle(),s=null}}))},_draggable:function(){var t=this;t.options.reorderable&&(t._draggableInstance&&t._draggableInstance.destroy(),t._draggableInstance=t.wrapper.kendoDraggable({group:k.guid(),filter:t.content?".k-grid-header:first "+q:"table:first>.k-grid-header "+q,drag:function(){t._hideResizeHandle()},hint:function(t){return e('
      ').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(t.attr(k.attr("title"))||t.attr(k.attr("field"))||t.text()).prepend('')}}).data("kendoDraggable"))},_reorderable:function(){var e=this;e.options.reorderable&&e.wrapper.kendoReorderable({draggable:e._draggableInstance,change:function(t){var n=A(e.columns[t.newIndex],e.columns),i=e.columns[t.oldIndex];e.trigger(lt,{newIndex:n,oldIndex:A(i,e.columns),column:i}),e.reorderColumn(n,i)}})},reorderColumn:function(e,t){var n,i,a,r=this,o=A(t,r.columns),l=A(t,d(r.columns)),c=A(r.columns[e],d(r.columns)),u=r.footer||r.wrapper.find(".k-grid-footer");if(o!==e)for(r._hideResizeHandle(),r.columns.splice(o,1),r.columns.splice(e,0,t),r._templates(),s(r.thead.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),l,c),r.options.scrollable&&s(r.tbody.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),l,c),s(r.thead.find(".k-header:not(.k-group-cell,.k-hierarchy-cell)"),o,e),u&&u.length&&(s(u.find(".k-grid-footer-wrap>table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),l,c),s(u.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),o,e)),n=r.tbody.children(":not(.k-grouping-row,.k-detail-row)"),i=0,a=n.length;a>i;i+=1)s(n.eq(i).find(">td:not(.k-group-cell,.k-hierarchy-cell)"),o,e)},cellIndex:function(t){return e(t).parent().children("td:not(.k-group-cell,.k-hierarchy-cell)").index(t)},_modelForContainer:function(t){t=e(t),t.is("tr")||"popup"===this._editMode()||(t=t.closest("tr"));var n=t.attr(k.attr("uid"));return this.dataSource.getByUid(n)},_editable:function(){var t,n=this,i=n.selectable&&n.selectable.options.multiple,a=n.options.editable,r=function(){var t=C(),i=n._editContainer;!i||e.contains(i[0],t)||i[0]===t||e(t).closest(".k-animation-container").length||n.editable.end()&&n.closeCell()};a&&(t=n._editMode(),"incell"===t?a.update!==!1&&n.wrapper.on(dt+j,"tr:not(.k-grouping-row) > td",function(t){var a=e(this);a.hasClass("k-hierarchy-cell")||a.hasClass("k-detail-cell")||a.hasClass("k-group-cell")||a.hasClass("k-edit-cell")||a.has("a.k-grid-delete").length||a.has("button.k-grid-delete").length||a.closest("tbody")[0]!==n.tbody[0]||e(t.target).is(":input")||(n.editable?n.editable.end()&&(i&&e(C()).blur(),n.closeCell(),n.editCell(a)):n.editCell(a))}).on("focusin"+j,function(){clearTimeout(n.timer),n.timer=null}).on("focusout"+j,function(){n.timer=setTimeout(r,1)}):a.update!==!1&&n.wrapper.on(dt+j,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit",function(t){t.preventDefault(),n.editRow(e(this).closest("tr"))}),a.destroy!==!1?n.wrapper.on(dt+j,"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(dt+j,"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){t=e(t);var n=this,i=n.columns[n.cellIndex(t)],a=n._modelForContainer(t);!a||a.editable&&!a.editable(i.field)||i.command||!i.field||(n._attachModelChange(a),n._editContainer=t,n.editable=t.addClass("k-edit-cell").kendoEditable({fields:{field:i.field,format:i.format,editor:i.editor,values:i.values},model:a,change:function(e){n.trigger(Y,{values:e.values,container:t,model:a})&&e.preventDefault()}}).data("kendoEditable"),t.parent().addClass("k-grid-edit-row"),n.trigger(G,{container:t,model:a}))},_destroyEditable:function(){var e=this,t=function(){e.editable&&(e._detachModelChange(),e.editable.destroy(),e.editable=null,e._editContainer=null,e._destroyEditView())};e.editable&&("popup"!==e._editMode()||e._isMobile?t():e._editContainer.data("kendoWindow").bind("deactivate",t).close())},_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(X,e._modelChangeHandler)},closeCell:function(t){var n,i,a,r=this,o=r._editContainer;o&&(n=o.closest("tr").attr(k.attr("uid")),a=r.dataSource.getByUid(n),t&&r.trigger("cancel",{container:o,model:a})||(o.removeClass("k-edit-cell"),i=r.columns[r.cellIndex(o)],o.parent().removeClass("k-grid-edit-row"),r._destroyEditable(),r._displayCell(o,i,a),o.hasClass("k-dirty-cell")&&e('').prependTo(o)))},_displayCell:function(e,t,n){var i=this,a={storage:{},count:0},r=F({},k.Template,i.options.templateSettings),o=k.template(i._cellTmpl(t,a),r);a.count>0&&(o=M(o,a.storage)),e.empty().html(o(n))},removeRow:function(e){this._confirmation(e)&&this._removeRow(e)},_removeRow:function(t){var n,i,a=this;t=e(t).hide(),n=a._modelForContainer(t),n&&!a.trigger($,{row:t,model:n})&&(i=a._editMode(),"incell"!==i&&a.cancelRow(),a.dataSource.remove(n),("inline"===i||"popup"===i)&&a.dataSource.sync())},_editMode:function(){var e="incell",t=this.options.editable;return t!==!0&&(e="string"==typeof t?t:t.mode||e),e},editRow:function(n){var i,a,r,o,s=this;n instanceof k.data.ObservableObject?i=n:(n=e(n),i=s._modelForContainer(n)),a=s._editMode(),r=s.options.navigatable,s.cancelRow(),i&&(s._attachModelChange(i),"popup"===a?s._createPopupEditor(i):"inline"===a?s._createInlineEditor(n,i):"incell"===a&&e(n).children(B).each(function(){var n=e(this),a=s.columns[n.index()];return i=s._modelForContainer(n),i&&(!i.editable||i.editable(a.field))&&a.field?(s.editCell(n),!1):t}),o=s.editView?s.editView.element:s._editContainer,o.on(dt+j,"a.k-grid-cancel",function(t){if(t.preventDefault(),t.stopPropagation(),!s.trigger("cancel",{container:o,model:i})){var n=s.items().index(e(s.current()).parent());s.cancelRow(),r&&(s.current(s.items().eq(n).children().filter(W).first()),v(s.table,!0))}}),o.on(dt+j,"a.k-grid-update",function(e){e.preventDefault(),e.stopPropagation(),s.saveRow()}))},_createPopupEditor:function(n){var i,a,r,o,s,l,d,c,u,p,f,h=this,m="
      ',_=[],b=h.options.editable,y=b.template,w=D(b)?b.window:{},x=F({},k.Template,h.options.templateSettings);if(w=w||{},y)for(typeof y===ft&&(y=window.unescape(y)),m+=k.template(y,x)(n),r=0,o=h.columns.length;o>r;r++)i=h.columns[r],i.command&&(c=g(i.command,"edit"),c&&(a=c));else for(r=0,o=h.columns.length;o>r;r++)i=h.columns[r],i.command?i.command&&(c=g(i.command,"edit"),c&&(a=c)):(m+='
      ",n.editable&&!n.editable(i.field)||!i.field?(p={storage:{},count:0},s=k.template(h._cellTmpl(i,p),x),p.count>0&&(s=M(s,p.storage)),m+='
      '+s(n)+"
      "):(_.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),m+="
      '));a&&D(a)&&(a.text&&D(a.text)&&(l=a.text.update,d=a.text.cancel),a.attr&&(u=a.attr)),h._isMobile?(m+="
      ",h.editView=h.pane.append("
      '+"
      '+h._createButton({name:"update",text:l,attr:u})+(w.title||"Edit")+h._createButton({name:"canceledit",text:d,attr:u})+"
      "+m+"
      "),f=h._editContainer=h.editView.element.find(".k-popup-edit-form")):(m+='
      ',m+=h._createButton({name:"update",text:l,attr:u})+h._createButton({name:"canceledit",text:d,attr:u}),m+="
      ",f=h._editContainer=e(m).appendTo(h.wrapper).eq(0).kendoWindow(F({modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1,close:function(i){if(i.userTriggered){if(h.trigger("cancel",{container:f,model:n}))return i.preventDefault(),t;var a=h.items().index(e(h.current()).parent());h.cancelRow(),h.options.navigatable&&(h.current(h.items().eq(a).children().filter(W).first()),v(h.table,!0))}}},w))),h.editable=h._editContainer.kendoEditable({fields:_,model:n,clearContainer:!1}).data("kendoEditable"),h._isMobile&&f.find("input[type=checkbox],input[type=radio]").parent(".k-edit-field").addClass("k-check").prev(".k-edit-label").addClass("k-check").click(function(){e(this).next().children("input").click()}),h._openPopUpEditor(),h.trigger(G,{container:f,model:n})},_openPopUpEditor:function(){this._isMobile?this.pane.navigate(this.editView,this._editAnimation):this._editContainer.data("kendoWindow").center().open()},_createInlineEditor:function(t,n){var i,a,r,o=this,s=[];t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){if(a=e(this),i=o.columns[o.cellIndex(a)],i.command||!i.field||n.editable&&!n.editable(i.field)){if(i.command&&(r=g(i.command,"edit"))){a.empty();var t,l,d;D(r)&&(r.text&&D(r.text)&&(t=r.text.update,l=r.text.cancel),r.attr&&(d=r.attr)),e(o._createButton({name:"update",text:t,attr:d})+o._createButton({name:"canceledit",text:l,attr:d})).appendTo(a)}}else s.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),a.attr(k.attr("container-for"),i.field),a.empty()}),o._editContainer=t,o.editable=t.addClass("k-grid-edit-row").kendoEditable({fields:s,model:n,clearContainer:!1}).data("kendoEditable"),o.trigger(G,{container:t,model:n})},cancelRow:function(){var e,t=this,n=t._editContainer;n&&(e=t._modelForContainer(n),t._destroyEditable(),t.dataSource.cancelChanges(e),"popup"!==t._editMode()?t._displayRow(n):t._displayRow(t.items().filter("["+k.attr("uid")+"="+e.uid+"]")))},saveRow:function(){var e=this,t=e._editContainer,n=e._modelForContainer(t),i=e.editable;t&&i&&i.end()&&!e.trigger(Y,{container:t,model:n})&&e.dataSource.sync()},_displayRow:function(t){var n=this,i=n._modelForContainer(t);i&&t.replaceWith(e((t.hasClass("k-alt")?n.altRowTemplate:n.rowTemplate)(i)))},_showMessage:function(t,n){var i,a,r,o=this;return o._isMobile?(i=k.template(''),a=e(i(t)).appendTo(o.view.element),r=new k.mobile.ui.ActionSheet(a,{cancel:t.cancelDelete,cancelTemplate:'
    • #:cancel#
    • ',close:function(){this.destroy()},command:function(t){var i=e(t.currentTarget).parent();i.hasClass("km-actionsheet-cancel")||o._removeRow(n)},popup:o._actionSheetPopupOptions}),r.open(n),!1):window.confirm(t.title)},_confirmation:function(e){var t=this,n=t.options.editable,i=n===!0||typeof n===ft?ht:n.confirmation;return i!==!1&&null!=i?t._showMessage({confirmDelete:n.confirmDelete||mt,cancelDelete:n.cancelDelete||gt,title:i===!0?ht:i},e):!0},cancelChanges:function(){this.dataSource.cancelChanges()},saveChanges:function(){var e=this;(e.editable&&e.editable.end()||!e.editable)&&!e.trigger(tt)&&e.dataSource.sync()},addRow:function(){var e,t,n,i,a,r=this,o=r.dataSource,s=r._editMode(),l=r.options.editable.createAt||"",d=o.pageSize(),c=o.view()||[];(r.editable&&r.editable.end()||!r.editable)&&("incell"!=s&&r.cancelRow(),e=o.indexOf(c[0]),"bottom"==l.toLowerCase()&&(e+=c.length,d&&!o.options.serverPaging&&d<=c.length&&(e-=1)),0>e&&(e=o.page()>o.totalPages()?(o.page()-1)*d:0),t=o.insert(e,{}),n=t.uid,i=r.table.find("tr["+k.attr("uid")+"="+n+"]"),a=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(t):a.length&&r.editCell(a))},_firstEditableColumnIndex:function(e){var t,n,i,a=this,r=a.columns,o=a._modelForContainer(e);for(n=0,i=r.length;i>n;n++)if(t=r[n],o&&(!o.editable||o.editable(t.field))&&!t.command&&t.field)return n;return-1},_toolbar:function(){var t,n=this,i=n.wrapper,a=n.options.toolbar,r=n.options.editable;a&&(t=n.wrapper.find(".k-grid-toolbar"),t.length||(I(a)||(a=typeof a===ft?a:n._toolbarTmpl(a).replace(_t,"\\#"),a=M(k.template(a),n)),t=e('
      ').html(a({})).prependTo(i)),r&&r.create!==!1&&t.on(dt+j,".k-grid-add",function(e){e.preventDefault(),n.addRow()}).on(dt+j,".k-grid-cancel-changes",function(e){e.preventDefault(),n.cancelChanges()}).on(dt+j,".k-grid-save-changes",function(e){e.preventDefault(),n.saveChanges()}))},_toolbarTmpl:function(e){var t,n,i=this,a="";if(H(e))for(t=0,n=e.length;n>t;t++)a+=i._createButton(e[t]);return a},_createButton:function(e){var t=e.template||yt,n=typeof e===ft?e:e.name||e.text,a=Dt[n]?Dt[n].className:"k-grid-"+(n||"").replace(/\s/g,""),r={className:a,text:n,imageClass:"",attr:"",iconClass:""};if(!(n||D(e)&&e.template))throw Error("Custom commands should have name specified");return D(e)?(e.className&&(e.className+=" "+r.className),"edit"===n&&D(e.text)&&(e=F(!0,{},e),e.text=e.text.edit),e.attr&&D(e.attr)&&(e.attr=i(e.attr)),r=F(!0,r,Dt[n],e)):r=F(!0,r,Dt[n]),k.template(t)(r)},_hasFooters:function(){var e,t=this.columns,n=t.length;for(e=0;n>e;e++)if(""!==t[e].footerTemplate||""!==t[e].groupFooterTemplate)return!0;return!1},_groupable:function(){var t=this;t._groupableClickHandler?t.table.off(dt+j,t._groupableClickHandler):t._groupableClickHandler=function(n){var i=e(this),a=i.closest("tr");i.hasClass("k-i-collapse")?t.collapseGroup(a):t.expandGroup(a),n.preventDefault(),n.stopPropagation()},t.table.on(dt+j,".k-grouping-row .k-i-collapse, .k-grouping-row .k-i-expand",t._groupableClickHandler),t._attachGroupable()},_attachGroupable:function(){var t=this,n=t.wrapper,i=t.options.groupable,a=q+":visible["+k.attr("field")+"]",r=q+"["+k.attr("field")+"]";i&&(n.has("div.k-grouping-header")[0]||e("
       
      ").addClass("k-grouping-header").prependTo(n),t.groupable&&t.groupable.destroy(),t.groupable=new w(n,F({},i,{draggable:t._draggableInstance,groupContainer:">div.k-grouping-header",dataSource:t.dataSource,draggableElements:t.content?".k-grid-header:first "+a:"table:first>.k-grid-header "+a,filter:t.content?".k-grid-header:first "+r:"table:first>.k-grid-header "+r,allowDrag:t.options.reorderable})))},_selectable:function(){var e,n,i=this,a=[],r=i.options.selectable;r&&(e=typeof r===ft&&r.toLowerCase().indexOf("multiple")>-1,n=typeof r===ft&&r.toLowerCase().indexOf("cell")>-1,i._hasDetails()&&(a[a.length]=".k-detail-row"),(i.options.groupable||i._hasFooters())&&(a[a.length]=".k-grouping-row,.k-group-footer"),a=a.join(","),""!==a&&(a=":not("+a+")"),i.selectable=new k.ui.Selectable(i.table,{filter:">"+(n?L:"tbody>tr"+a),aria:!0,multiple:e,change:function(){i.trigger(X)}}),i.options.navigatable&&i.table.on("keydown"+j,function(a){var r=i.current();if(a.keyCode===S.SPACEBAR&&a.target==i.table[0]&&!r.is(".k-edit-cell,.k-header")&&r.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")){if(a.preventDefault(),a.stopPropagation(),r=n?r:r.parent(),e)if(a.ctrlKey){if(r.hasClass(ot))return r.removeClass(ot),i.trigger(X),t}else i.selectable.clear();else i.selectable.clear();i.selectable.value(r)}}))},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger(X)},select:function(n){var i=this,a=i.selectable;return n=e(n),n.length?(a.options.multiple||(a.clear(),n=n.first()),a.value(n),t):a.value()},current:function(n){var i=this,a=i.options.scrollable,r=i._current,o=i.table.add(i.thead.parent());return n!==t&&n.length&&(r&&r[0]===n[0]||(r&&(r.removeClass(rt).removeAttr("id"),o.removeAttr("aria-activedescendant")),n.attr("id",i._cellId),i._current=n.addClass(rt),o.attr("aria-activedescendant",i._cellId),n.length&&a&&(e.contains(i.content[0],n[0])&&i._scrollTo(n.parent()[0],i.content[0]),a.virtual?i._scrollTo(n[0],i.content.find(">.k-virtual-scrollable-wrap")[0]):i._scrollTo(n[0],i.content[0])))),i._current},_removeCurrent:function(){this._current&&(this._current.removeClass(rt),this._current=null)},_scrollTo:function(e,t){var n=e.tagName.toLowerCase(),i="td"===n||"th"===n,a=e[i?"offsetLeft":"offsetTop"],r=e[i?"offsetWidth":"offsetHeight"],o=t[i?"scrollLeft":"scrollTop"],s=t[i?"clientWidth":"clientHeight"],l=a+r,d=0;d=o>a?a:l>o+s?s>=r?l-s:a:o,t[i?"scrollLeft":"scrollTop"]=d},_navigatable:function(){var t=this,n=M(t.current,t),i=t.table,a=t.thead.parent(),r=i,o=k.support.isRtl(t.element);t.options.navigatable&&(t.options.scrollable&&(r=i.add(a),a.attr(ut,-1)),a.on("keydown"+j,function(e){e.altKey&&e.keyCode==S.DOWN&&(n().find(".k-grid-filter, .k-header-column-menu").click(),e.stopImmediatePropagation())}).find("a.k-link").attr("tabIndex",-1),i.attr(ut,N.max(i.attr(ut)||0,0)).on("mousedown"+j+" keydown"+j,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}),r.on(k.support.touch?"touchstart"+j:"mousedown"+j,V+">"+W,M(_,t)).on("focus"+j,function(){if(!k.support.touch){var t=n();t&&t.is(":visible")?t.addClass(rt):n(e(this).find(U)),this==i[0]?(a.attr(ut,-1),i.attr(ut,0)):(i.attr(ut,-1),a.attr(ut,0))}}).on("focusout"+j,function(){var e=n();e&&e.removeClass(rt)}).on("keydown"+j,function(a){var r,s,l,d,c,u,p,f,h=a.keyCode,m=!1,g=!a.isDefaultPrevented()&&!e(a.target).is(":button,a,:input,a>.k-icon"),_=t.options.pageable,k=t.dataSource,b="incell"==t._editMode(),y=a.shiftKey,w=n();w&&w.is("th")&&(g=!0),g&&h==S.UP?(w?(l=w.parent().prevAll(V).first(),l[0]||(c=t.thead.parent(),v(c,!0),l=c.find(V).first()),d=w.index(),w=l.children().eq(d),w[0]&&w.is(W)||(w=l.children(W).first())):w=i.find(U),m=!0,n(w)):g&&h==S.DOWN?(w?(l=w.parent().nextAll(V).first(),!l[0]&&w.is("th")&&(v(t.tbody.parent()),l=t.tbody.find(V).first()),d=w.index(),w=l.children().eq(d),w[0]&&w.is(W)||(w=l.children(W).first())):w=i.find(U),m=!0,n(w)):g&&h==(o?S.RIGHT:S.LEFT)?(n(w?w.prevAll(B+":first"):i.find(U)),m=!0):g&&h==(o?S.LEFT:S.RIGHT)?(w?w.next()[0]&&(w=w.nextAll(B+":first")):w=i.find(U),m=!0,n(w)):g&&_&&S.PAGEDOWN==h?(k.page(k.page()+1),m=!0):g&&_&&S.PAGEUP==h?(k.page(k.page()-1),m=!0):h==S.ENTER||S.F2==h?(w=w?w:i.find(U),w.is("th")?(w.find(".k-link").click(),m=!0):w.parent().is(".k-master-row,.k-grouping-row")?(w.parent().find(".k-icon:first").click(),m=!0):(u=w.find(":kendoFocusable:first"),!w.hasClass("k-edit-cell")&&u[0]&&w.hasClass("k-state-focused")?(u.focus(),m=!0):t.options.editable&&!e(a.target).is(":button,.k-button,textarea")&&(p=e(a.target).closest("[role=gridcell]"),p[0]||(p=w),t._handleEditing(p),m=!0))):S.ESC==h?(r=C(),w&&e.contains(w[0],r)&&!w.hasClass("k-edit-cell")&&!w.parent().hasClass("k-grid-edit-row")?(v(t.table[0],!0),m=!0):!t._editContainer||w&&!t._editContainer.has(w[0])&&w[0]!==t._editContainer[0]||(b?t.closeCell(!0):(s=t.items().index(e(w).parent()),r&&r.blur(),t.cancelRow(),s>=0&&t.current(t.items().eq(s).children().filter(W).first())),xt.msie&&xt.version<9&&document.body.focus(),v(i,!0),m=!0)):S.TAB==h&&(w=e(w),t.options.editable&&b&&(f=e(C()).closest(".k-edit-cell"),f[0]&&f[0]!==w[0]&&(w=f)),f=y?w.prevAll(B+":first"):w.nextAll(":visible:first"),f.length||(f=w.parent()[y?"prevAll":"nextAll"]("tr:not(.k-grouping-row):not(.k-detail-row):visible:first").children(B+(y?":last":":first"))),!w.is("th")&&f.length&&t.options.editable&&b&&(t._handleEditing(w,f),m=!0)),m&&(a.preventDefault(),a.stopPropagation())}))},_handleEditing:function(n,i){var a,r,o=this,s=e(C()),l=o._editMode(),d=xt.msie,c=d&&xt.version<9,u=o._editContainer;if(r="incell"==l?n.hasClass("k-edit-cell"):n.parent().hasClass("k-grid-edit-row"),o.editable){if(e.contains(u[0],s[0])&&(xt.opera||c?s.change().triggerHandler("blur"):(s.blur(),d&&s.blur())),!o.editable)return v(o.table),t; if(!o.editable.end())return"incell"==l?o.current(u):o.current(u.children().filter(B).first()),a=u.find(":kendoFocusable:first")[0],a&&a.focus(),t;"incell"==l?o.closeCell():(o.saveRow(),r=!0)}i&&o.current(i),c&&document.body.focus(),v(o.table,!0),(!r&&!i||i)&&("incell"==l?o.editCell(o.current()):o.editRow(o.current().parent()))},_wrapper:function(){var e=this,t=e.table,n=e.options.height,i=e.element;i.is("div")||(i=i.wrap("
      ").parent()),e.wrapper=i.addClass("k-grid k-widget k-secondary"),n&&(e.wrapper.css(ct,n),t.css(ct,"auto")),e._initMobile()},_initMobile:function(){var t,n=this.options;this._isMobile=n.mobile===!0&&k.support.mobileOS||"phone"===n.mobile||"tablet"===n.mobile,this._isMobile&&(t=this.wrapper.addClass("k-grid-mobile").wrap("
      ').parent(),this.pane=k.mobile.ui.Pane.wrap(t),this.view=this.pane.view(),this._actionSheetPopupOptions=e(document.documentElement).hasClass("km-root")?{modal:!1}:{align:"bottom center",position:"bottom center",effect:"slideIn:up"},n.height&&this.pane.element.parent().css(ct,n.height),this._editAnimation="slide")},_tbody:function(){var t,n=this,i=n.table;t=i.find(">tbody"),t.length||(t=e("
      ").appendTo(i)),n.tbody=t},_scrollable:function(){var t,n,i,a,r,o=this,s=o.options,l=s.scrollable,d=l!==!0&&l.virtual&&!o.virtualScrollable,c=!k.support.kineticScrollNeeded||d?k.support.scrollbar():0;l&&(t=o.wrapper.children(".k-grid-header"),t[0]||(t=e('
      ').insertBefore(o.table)),t.css(wt?"padding-left":"padding-right",l.virtual?c+1:c),n=e('
      '),Ct&&n.attr("cellspacing",0),n.append(o.thead),t.empty().append(e('
      ').append(n)),o.content=o.table.parent(),o.content.is(".k-virtual-scrollable-wrap")&&(o.content=o.content.parent()),o.content.is(".k-grid-content, .k-virtual-scrollable-wrap")||(o.content=o.table.wrap('
      ').parent()),d&&(o.virtualScrollable=new St(o.content,{dataSource:o.dataSource,itemHeight:M(o._averageRowHeight,o)})),o.scrollables=t.children(".k-grid-header-wrap"),i=o.wrapper.find(".k-grid-footer"),a=wt&&xt.webkit?c:0,i.length&&(o.scrollables=o.scrollables.add(i.children(".k-grid-footer-wrap"))),l.virtual?o.content.find(">.k-virtual-scrollable-wrap").bind("scroll"+j,function(){o.scrollables.scrollLeft(this.scrollLeft+a)}):(o.content.bind("scroll"+j,function(){o.scrollables.scrollLeft(this.scrollLeft+a)}),r=k.touchScroller(o.content),r&&r.movable&&r.movable.bind("change",function(e){o.scrollables.scrollLeft(-e.sender.x)})))},_setContentWidth:function(){var t,n=this,i="k-grid-content-expander",a='
      ',r=n.resizable;n.options.scrollable&&(t=n.table.parent().children("."+i),n._setContentWidthHandler=M(n._setContentWidth,n),n.dataSource.view().length?t[0]&&(t.remove(),r&&r.unbind("resize",n._setContentWidthHandler)):(t[0]||(t=e(a).appendTo(n.table.parent()),r&&r.bind("resize",n._setContentWidthHandler)),t.width(n.thead.width())))},_setContentHeight:function(){var e,t=this,n=t.options,i=t.wrapper.innerHeight(),a=t.wrapper.children(".k-grid-header"),r=k.support.scrollbar();n.scrollable&&(i-=a.outerHeight(),t.pager&&(i-=t.pager.element.outerHeight()),n.groupable&&(i-=t.wrapper.children(".k-grouping-header").outerHeight()),n.toolbar&&(i-=t.wrapper.children(".k-grid-toolbar").outerHeight()),t.footerTemplate&&(i-=t.wrapper.children(".k-grid-footer").outerHeight()),e=function(e){var t,n;return e[0].style.height?!0:(t=e.height(),e.height("auto"),n=e.height(),t!=n?(e.height(""),!0):(e.height(""),!1))},e(t.wrapper)&&(i>2*r?t.content.height(i):t.content.height(2*r+1)))},_averageRowHeight:function(){var e,t=this,n=t._rowHeight;return t._rowHeight||(t._rowHeight=n=t.table.outerHeight()/t.items().length,t._sum=n,t._measures=1),e=t.table.outerHeight()/t.items().length,n!==e&&(t._measures++,t._sum+=e,t._rowHeight=t._sum/t._measures),n},_dataSource:function(){var e,n=this,i=n.options,a=i.dataSource;a=H(a)?{data:a}:a,D(a)&&(F(a,{table:n.table,fields:n.columns}),e=i.pageable,D(e)&&e.pageSize!==t&&(a.pageSize=e.pageSize)),n.dataSource&&n._refreshHandler?n.dataSource.unbind(X,n._refreshHandler).unbind(O,n._progressHandler).unbind(P,n._errorHandler):(n._refreshHandler=M(n.refresh,n),n._progressHandler=M(n._requestStart,n),n._errorHandler=M(n._error,n)),n.dataSource=y.create(a).bind(X,n._refreshHandler).bind(O,n._progressHandler).bind(P,n._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_modelChange:function(t){var n,i,a,r,o=this,s=t.model,l=o.tbody.find("tr["+k.attr("uid")+"="+s.uid+"]"),d=l.hasClass("k-alt"),c=o.items().index(l);if(l.children(".k-edit-cell").length&&!o.options.rowTemplate)l.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){n=e(this),i=o.columns[o.cellIndex(n)],i.field===t.field&&(n.hasClass("k-edit-cell")?n.addClass("k-dirty-cell"):(o._displayCell(n,i,s),e('').prependTo(n)))});else if(!l.hasClass("k-grid-edit-row")){for(a=(d?o.altRowTemplate:o.rowTemplate)(s),l.replaceWith(a),a=o.items().eq(c),c=0,r=o.columns.length;r>c;c++)i=o.columns[c],i.field===t.field&&(n=a.children(":not(.k-group-cell,.k-hierarchy-cell)").eq(c),e('').prependTo(n));o.trigger("itemChange",{item:a,data:s,ns:b})}},_pageable:function(){var t,n=this,i=n.options.pageable;i&&(t=n.wrapper.children("div.k-grid-pager"),t.length||(t=e('
      ').appendTo(n.wrapper)),n.pager&&n.pager.destroy(),n.pager="object"==typeof i&&i instanceof k.ui.Pager?i:new k.ui.Pager(t,F({},i,{dataSource:n.dataSource})))},_footer:function(){var t,n,i=this,a=i.dataSource.aggregates(),r="",s=i.footerTemplate,l=i.options,d=i.footer||i.wrapper.find(".k-grid-footer");s?(a=R(a)?o(i.dataSource.aggregate()):a,r=e(i._wrapFooter(s(a))),d.length?(n=r,d.replaceWith(n),d=i.footer=n):d=i.footer=l.scrollable?l.pageable?r.insertBefore(i.wrapper.children("div.k-grid-pager")):r.appendTo(i.wrapper):r.insertBefore(i.tbody)):d&&!i.footer&&(i.footer=d),d.length&&(l.scrollable&&(t=d.attr("tabindex",-1).children(".k-grid-footer-wrap"),i.scrollables=i.scrollables.not(".k-grid-footer-wrap").add(t)),i._footerWidth&&d.find("table").css("width",i._footerWidth),t&&t.scrollLeft(i.content.scrollLeft()))},_wrapFooter:function(t){var n=this,i="",a=k.support.mobileOS?0:k.support.scrollbar();return n.options.scrollable?(i=e('
      "+t+"
      "),n._appendCols(i.find("table")),i.css(wt?"padding-left":"padding-right",a),i):''+t+""},_columnMenu:function(){var t,n,i,a,r,o,s=this,l=s.columns,d=s.options,c=d.columnMenu,u=this._isMobile,p=function(){v(s.thead.parent(),!0)},f=function(e){s.trigger(J,{field:e.field,container:e.container})};c&&("boolean"==typeof c&&(c={}),s.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(h){n=l[h],o=e(this),n.command||!n.field&&!o.attr("data-"+k.ns+"field")||(t=o.data("kendoColumnMenu"),t&&t.destroy(),a=n.sortable!==!1&&c.sortable!==!1?d.sortable:!1,r=d.filterable&&n.filterable!==!1&&c.filterable!==!1?F({},n.filterable,d.filterable):!1,i={dataSource:s.dataSource,values:n.values,columns:c.columns,sortable:a,filterable:r,messages:c.messages,owner:s,closeCallback:p,init:f,filter:u?":not(.k-column-active)":""},o.kendoColumnMenu(i))}))},_filterable:function(){var t,n,i=this,a=i.columns,r=function(){v(i.thead.parent(),!0)},o=i.options.filterable;o&&!i.options.columnMenu&&i.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(s){var l,d;t=e(this),a[s].filterable===!1||a[s].command||!a[s].field&&!t.attr("data-"+k.ns+"field")||(n=t.data("kendoFilterMenu"),n&&n.destroy(),l=a[s].filterable,d=F({},o,l,{dataSource:i.dataSource,values:a[s].values,closeCallback:r,init:function(e){i.trigger(Q,{field:e.field,container:e.container})}}),l&&l.messages&&(d.messages=F(!0,{},o.messages,l.messages)),t.kendoFilterMenu(d))})},_sortable:function(){var t,n,i,a=this,r=a.columns,o=a.options.sortable;o&&a.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(s){t=r[s],t.sortable!==!1&&!t.command&&t.field&&(n=e(this),i=n.data("kendoSortable"),i&&i.destroy(),n.attr("data-"+k.ns+"field",t.field).kendoSortable(F({},o,t.sortable,{dataSource:a.dataSource,aria:!0,filter:":not(.k-column-active)"})))})},_columns:function(t){var n,i=this,a=i.table,r=a.find("col"),o=i.options.dataSource;t=t.length?t:E(a.find("th"),function(t,n){t=e(t);var i=t.attr(k.attr("sortable")),a=t.attr(k.attr("filterable")),o=t.attr(k.attr("type")),s=t.attr(k.attr("groupable")),l=t.attr(k.attr("field")),d=t.attr(k.attr("menu"));return l||(l=t.text().replace(/\s|[^A-z0-9]/g,"")),{field:l,type:o,sortable:"false"!==i,filterable:"false"!==a,groupable:"false"!==s,menu:d,template:t.attr(k.attr("template")),width:r.eq(n).css("width")}}),n=!(i.table.find("tbody tr").length>0&&(!o||!o.transport)),i.columns=E(t,function(e){return e=typeof e===ft?{field:e}:e,e.hidden&&(e.attributes=c(e.attributes),e.footerAttributes=c(e.footerAttributes),e.headerAttributes=c(e.headerAttributes)),F({encoded:n},e)})},_groups:function(){var e=this.dataSource.group();return e?e.length:0},_tmpl:function(e,t){var a,r,o,s,l=this,d=F({},k.Template,l.options.templateSettings),c=l.columns.length,u={storage:{},count:0},p=l._hasDetails(),f=[],h=l._groups();if(!e){for(e="0&&(e+=n(h)),p&&(e+=''),a=0;c>a;a++)o=l.columns[a],r=o.template,s=typeof r,e+="",e+=l._cellTmpl(o,u),e+="";e+=""}return e=k.template(e,d),u.count>0?M(e,u.storage):e},_headerCellText:function(e){var t=this,n=F({},k.Template,t.options.templateSettings),i=e.headerTemplate,a=typeof i,r=e.title||e.field||"";return a===pt?r=k.template(i,n)({}):a===ft&&(r=i),r},_cellTmpl:function(e,t){var n,i,a=this,r=F({},k.Template,a.options.templateSettings),o=e.template,s=r.paramName,l=e.field,d="",c=e.format,u=typeof o,p=e.values;if(e.command){if(H(e.command)){for(n=0,i=e.command.length;i>n;n++)d+=a._createButton(e.command[n]);return d.replace(_t,"\\#")}return a._createButton(e.command).replace(_t,"\\#")}return u===pt?(t.storage["tmpl"+t.count]=o,d+="#=this.tmpl"+t.count+"("+s+")#",t.count++):u===ft?d+=o:p&&p.length&&D(p[0])&&"value"in p[0]&&l?(d+="#var v ="+k.stringify(f(p))+"#",d+="#var f = v[",r.useWithBlock||(d+=s+"."),d+=l+"]#",d+="${f != null ? f : ''}"):(d+=e.encoded?"#:":"#=",c&&(d+='kendo.format("'+c.replace(vt,"\\$1")+'",'),l?(l=k.expr(l,s),d+=l+"==null?'':"+l):d+="''",c&&(d+=")"),d+="#"),d},_templates:function(){var t=this,n=t.options,i=t.dataSource,a=i.group(),r=t.footer||t.wrapper.find(".k-grid-footer"),o=i.aggregate();t.rowTemplate=t._tmpl(n.rowTemplate),t.altRowTemplate=t._tmpl(n.altRowTemplate||n.rowTemplate,!0),t._hasDetails()&&(t.detailTemplate=t._detailTmpl(n.detailTemplate||"")),(t._group&&!R(o)||!R(o)&&!r.length||z(t.columns,function(e){return e.footerTemplate}).length)&&(t.footerTemplate=t._footerTmpl(o,"footerTemplate","k-footer-template")),a&&z(t.columns,function(e){return e.groupFooterTemplate}).length&&(o=e.map(a,function(e){return e.aggregates}),t.groupFooterTemplate=t._footerTmpl(o,"groupFooterTemplate","k-group-footer"))},_footerTmpl:function(e,t,a){var r,s,l,d,c,u=this,p=F({},k.Template,u.options.templateSettings),f=p.paramName,h="",m=u.columns,g={},v=0,_={},b=u._groups(),y=o(e);for(h+='',b>0&&(h+=n(b)),u._hasDetails()&&(h+=' '),r=0,s=u.columns.length;s>r;r++)c=m[r],l=c[t],d=typeof l,h+="",l?(d!==pt&&(_=y[c.field]?F({},p,{paramName:f+"."+c.field}):{},l=k.template(l,_)),g["tmpl"+v]=l,h+="#=this.tmpl"+v+"("+f+")#",v++):h+=" ",h+="";return h+="",h=k.template(h,p),v>0?M(h,g):h},_detailTmpl:function(e){var t=this,i="",a=F({},k.Template,t.options.templateSettings),r=a.paramName,o={},s=0,l=t._groups(),c=d(t.columns).length,u=typeof e;return i+='',l>0&&(i+=n(l)),i+='",u===pt?(o["tmpl"+s]=e,i+="#=this.tmpl"+s+"("+r+")#",s++):i+=e,i+="",i=k.template(i,a),s>0?M(i,o):i},_hasDetails:function(){var e=this;return null!==e.options.detailTemplate||(e._events[K]||[]).length},_details:function(){var t=this;t.table.on(dt+j,".k-hierarchy-cell .k-plus, .k-hierarchy-cell .k-minus",function(n){var i,a,r=e(this),o=r.hasClass("k-plus"),s=r.closest("tr.k-master-row"),l=t.detailTemplate,d=t._hasDetails();return r.toggleClass("k-plus",!o).toggleClass("k-minus",o),d&&!s.next().hasClass("k-detail-row")&&(a=t.dataItem(s),e(l(a)).addClass(s.hasClass("k-alt")?"k-alt":"").insertAfter(s),t.trigger(K,{masterRow:s,detailRow:s.next(),data:a,detailCell:s.next().find(".k-detail-cell")})),i=s.next(),t.trigger(o?it:at,{masterRow:s,detailRow:i}),i.toggle(o),t._current&&t._current.attr("aria-expanded",o),n.preventDefault(),!1})},dataItem:function(t){if(t=e(t)[0],!t)return null;var n,i,a=this.tbody.children(),r=/k-grouping-row|k-detail-row|k-group-footer/,o=t.sectionRowIndex;for(i=o,n=0;o>n;n++)r.test(a[n].className)&&i--;return this._data[i]},expandRow:function(t){e(t).find("> td .k-plus, > td .k-i-expand").click()},collapseRow:function(t){e(t).find("> td .k-minus, > td .k-i-collapse").click()},_thead:function(){var n,a,r,o,s,l=this,d=l.columns,c=l._hasDetails()&&d.length,u="",p=l.table.find(">thead");if(p.length||(p=e("").insertBefore(l.tbody)),r=l.element.find("tr:has(th):first"),r.length||(r=p.children().first(),r.length||(r=e(""))),r.children().length)c&&!r.find(".k-hierarchy-cell")[0]&&r.prepend(' ');else{for(c&&(u+=' '),n=0,a=d.length;a>n;n++)s=d[n],o=l._headerCellText(s),s.command?u+=""+o+"":(u+=""+o+"");r.html(u)}r.find("th").addClass("k-header"),l.options.scrollable||p.addClass("k-grid-header"),r.find("script").remove().end().appendTo(p),l.thead&&l._destroyColumnAttachments(),l.thead=p,l._sortable(),l._filterable(),l._scrollable(),l._updateCols(),l._resizable(),l._draggable(),l._reorderable(),l.groupable&&l._attachGroupable(),l._columnMenu()},_updateCols:function(){var e=this;e._appendCols(e.thead.parent().add(e.table))},_appendCols:function(e){var t=this;p(e,d(t.columns),t._hasDetails(),t._groups())},_autoColumns:function(e){if(e&&e.toJSON){var t,n=this;e=e.toJSON();for(t in e)n.columns.push({field:t});n._thead(),n._templates()}},_rowsHtml:function(e){var t,n,i=this,a="",r=i.rowTemplate,o=i.altRowTemplate;for(t=0,n=e.length;n>t;t++)a+=t%2?o(e[t]):r(e[t]),i._data.push(e[t]);return a},_groupRowHtml:function(e,t,i){var a,r,o=this,s="",l=e.field,d=z(o.columns,function(e){return e.field==l})[0]||{},c=d.groupHeaderTemplate,u=(d.title||l)+": "+h(e.value,d.format,d.values),p=F({},{field:e.field,value:e.value},e.aggregates[e.field]),f=o._groupAggregatesDefaultObject||{},m=e.items;if(c&&(u=typeof c===pt?c(p):k.template(c)(p)),s+=''+n(i)+''+'

      '+''+u+"

      ",e.hasSubgroups)for(a=0,r=m.length;r>a;a++)s+=o._groupRowHtml(m[a],t-1,i+1);else s+=o._rowsHtml(m);return o.groupFooterTemplate&&(s+=o.groupFooterTemplate(F(f,e.aggregates))),s},collapseGroup:function(n){n=e(n).find(".k-icon").addClass("k-i-expand").removeClass("k-i-collapse").end();var i,a,r=n.find(".k-group-cell").length,o=1;n.find("td:first").attr("aria-expanded",!1),n.nextAll("tr").each(function(){return a=e(this),i=a.find(".k-group-cell").length,a.hasClass("k-grouping-row")?o++:a.hasClass("k-group-footer")&&o--,r>=i||a.hasClass("k-group-footer")&&0>o?!1:(a.hide(),t)})},expandGroup:function(n){n=e(n).find(".k-icon").addClass("k-i-collapse").removeClass("k-i-expand").end();var i,a,r=this,o=n.find(".k-group-cell").length,s=1;n.find("td:first").attr("aria-expanded",!0),n.nextAll("tr").each(function(){return i=e(this),a=i.find(".k-group-cell").length,o>=a?!1:(a!=o+1||i.hasClass("k-detail-row")||(i.show(),i.hasClass("k-grouping-row")&&i.find(".k-icon").hasClass("k-i-collapse")&&r.expandGroup(i),i.hasClass("k-master-row")&&i.find(".k-icon").hasClass("k-minus")&&i.next().show()),i.hasClass("k-grouping-row")&&s++,i.hasClass("k-group-footer")&&(1==s?i.show():s--),t)})},_updateHeader:function(t){var n=this,i=n.thead.find("th.k-group-cell"),a=i.length;t>a?e(Array(t-a+1).join(' ')).prependTo(n.thead.find("tr")):a>t&&(a-=t,e(z(i,function(e,t){return a>t})).remove())},_firstDataItem:function(e,t){return e&&t&&(e=e.hasSubgroups?this._firstDataItem(e.items[0],t):e.items[0]),e},hideColumn:function(t){var n,i,a,r,o,s,l,u,p,f=this,h=0,g=f.footer||f.wrapper.find(".k-grid-footer"),v=f.columns;if(t="number"==typeof t?v[t]:z(v,function(e){return e.field===t})[0],t&&!t.hidden){for(p=A(t,d(v)),t.hidden=!0,t.attributes=c(t.attributes),t.footerAttributes=c(t.footerAttributes),t.headerAttributes=c(t.headerAttributes),f._templates(),f._updateCols(),m(f.thead.find(">tr")[0].cells,p,!1),g[0]&&(f._appendCols(g.find("table:first")),m(g.find(".k-footer-template")[0].cells,p,!1)),n=f.tbody.children(),o=0,u=n.length;u>o;o+=1)i=n.eq(o),i.is(".k-grouping-row,.k-detail-row")?(a=i.children(":not(.k-group-cell):first,.k-detail-cell").last(),a.attr("colspan",parseInt(a.attr("colspan"),10)-1)):(i.hasClass("k-grid-edit-row")&&(a=i.children(".k-edit-container")[0])&&(a=e(a),a.attr("colspan",parseInt(a.attr("colspan"),10)-1),a.find("col").eq(p).remove(),i=a.find("tr:first")),m(i[0].cells,p,!1));for(s=f.thead.prev().find("col"),o=0,u=s.length;u>o;o+=1){if(l=s[o].style.width,!l||-1!=l.indexOf("%")){h=0;break}h+=parseInt(l,10)}r=e(">.k-grid-header table:first,>.k-grid-footer table:first",f.wrapper).add(f.table),f._footerWidth=null,h&&(r.width(h),f._footerWidth=h),xt.msie&&8==xt.version&&(r.css("display","inline-table"),setTimeout(function(){r.css("display","table")},1)),f.trigger(Z,{column:t})}},showColumn:function(t){var n,i,a,r,o,s,l,c,f,h,g=this,v=g.columns,_=g.footer||g.wrapper.find(".k-grid-footer");if(t="number"==typeof t?v[t]:z(v,function(e){return e.field===t})[0],t&&t.hidden){for(h=A(t,v),t.hidden=!1,t.attributes=u(t.attributes),t.footerAttributes=u(t.footerAttributes),t.headerAttributes=u(t.headerAttributes),g._templates(),g._updateCols(),m(g.thead.find(">tr")[0].cells,h,!0),_[0]&&(g._appendCols(_.find("table:first")),m(_.find(".k-footer-template")[0].cells,h,!0)),n=g.tbody.children(),i=0,a=n.length;a>i;i+=1)r=n.eq(i),r.is(".k-grouping-row,.k-detail-row")?(o=r.children(":not(.k-group-cell):first,.k-detail-cell").last(),o.attr("colspan",parseInt(o.attr("colspan"),10)+1)):(r.hasClass("k-grid-edit-row")&&(o=r.children(".k-edit-container")[0])&&(o=e(o),o.attr("colspan",parseInt(o.attr("colspan"),10)+1),p(o.find(">form>table"),d(v),!1,0),r=o.find("tr:first")),m(r[0].cells,h,!0));if(s=e(">.k-grid-header table:first,>.k-grid-footer table:first",g.wrapper).add(g.table),t.width){for(l=0,f=g.thead.prev().find("col"),i=0,a=f.length;a>i;i+=1){if(c=f[i].style.width,c.indexOf("%")>-1){l=0;break}l+=parseInt(c,10)}g._footerWidth=null,l&&(s.width(l),g._footerWidth=l)}else s.width("");g.trigger(et,{column:t})}},_progress:function(e){var t=this,n=t.element.is("table")?t.element.parent():t.content&&t.content.length?t.content:t.element;k.ui.progress(n,e)},refresh:function(t){var n,i,a,r,s,l,c=this,u="",p=c.dataSource.view(),f=c.options.navigatable,h=e(c.current()),m=!1,g=(c.dataSource.group()||[]).length,_=g+d(c.columns).length;if(!(t&&"itemchange"===t.action&&c.editable||(t=t||{},c.trigger("dataBinding",{action:t.action||"rebind",index:t.index,items:t.items})))){if(l=C(),f&&(c.table[0]===l||e.contains(c.table[0],l)||c._editContainer&&c._editContainer.data("kendoWindow"))&&(m=h.is("th"),s=0,m&&(s=c.thead.find("th:not(.k-group-cell)").index(h))),c._destroyEditable(),c._progress(!1),c._hideResizeHandle(),c._data=[],c.columns.length||(c._autoColumns(c._firstDataItem(p[0],g)),_=g+c.columns.length),c._group=g>0||c._group,c._group&&(c._templates(),c._updateCols(),c._updateHeader(g),c._group=g>0),g>0)for(c.detailTemplate&&_++,c.groupFooterTemplate&&(c._groupAggregatesDefaultObject=o(c.dataSource.aggregate())),i=0,n=p.length;n>i;i++)u+=c._groupRowHtml(p[i],_,0);else u+=c._rowsHtml(p);x?c.tbody[0].innerHTML=u:(r=document.createElement("div"),r.innerHTML=""+u+"
      ",a=r.firstChild.firstChild,c.table[0].replaceChild(a,c.tbody[0]),c.tbody=e(a)),c._footer(),c._setContentHeight(),c._setContentWidth(),s>=0&&(c._removeCurrent(),m?c.current(c.thead.find("th:not(.k-group-cell)").eq(s)):c.current(c.items().eq(s).children().filter(B).first()),c._current&&v(c._current.closest("table")[0],!0)),c.trigger(nt)}}});b.plugin(Ft),b.plugin(St)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i="change",a="cancel",r="dataBound",o="dataBinding",s=n.ui.Widget,l=n.keys,d=">*",c="progress",u="error",p="k-state-focused",f="k-state-selected",h="k-edit-item",m="string",g="edit",v="remove",_="save",k="click",b=".kendoListView",y=e.proxy,w=n._activeElement,x=n.ui.progress,C=n.data.DataSource,T=s.extend({init:function(t,i){var a=this;i=e.isArray(i)?{dataSource:i}:i,s.fn.init.call(a,t,i),i=a.options,a.wrapper=t=a.element,t[0].id&&(a._itemId=t[0].id+"_lv_active"),a._element(),a._dataSource(),a._templates(),a._navigatable(),a._selectable(),a._pageable(),a._crudHandlers(),a.options.autoBind&&a.dataSource.fetch(),n.notify(a)},events:[i,a,o,r,g,v,_],options:{name:"ListView",autoBind:!0,selectable:!1,navigatable:!1,template:"",altTemplate:"",editTemplate:""},setOptions:function(e){s.fn.setOptions.call(this,e),this._templates()},_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()},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=C.create(e.options.dataSource).bind(i,e._refreshHandler).bind(c,e._progressHandler).bind(u,e._errorHandler)},_progress:function(){x(this.element,!0)},_error:function(){x(this.element,!1)},_element:function(){this.element.addClass("k-widget k-listview").attr("role","listbox")},refresh:function(e){var i,a,s,l,d,c=this,u=c.dataSource.view(),p="",f=c.template,h=c.altTemplate,m=w();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(),s.replaceWith(f(i)),s=c.items().eq(l),s.attr(n.attr("uid"),i.uid),c.trigger("itemChange",{item:s,data:i}))),t;if(!c.trigger(o,{action:e.action||"rebind",items:e.items,index:e.index})){for(c._destroyEditable(),l=0,d=u.length;d>l;l++)p+=l%2?h(u[l]):f(u[l]);for(c.element.html(p),a=c.items(),l=0,d=u.length;d>l;l++)a.eq(l).attr(n.attr("uid"),u[l].uid).attr("role","option").attr("aria-selected","false");c.element[0]===m&&c.options.navigatable&&c.current(a.eq(0)),c.trigger(r)}},_pageable:function(){var t,i,a=this,r=a.options.pageable;e.isPlainObject(r)&&(i=r.pagerId,t=e.extend({},r,{dataSource:a.dataSource,pagerId:null}),a.pager=new n.ui.Pager(e("#"+i),t))},_selectable:function(){var e,a,r=this,o=r.options.selectable,s=r.options.navigatable;o&&(e=typeof o===m&&o.toLowerCase().indexOf("multiple")>-1,e&&r.element.attr("aria-multiselectable",!0),r.selectable=new n.ui.Selectable(r.element,{aria:!0,multiple:e,filter:d,change:function(){r.trigger(i)}}),s&&r.element.on("keydown"+b,function(n){if(n.keyCode===l.SPACEBAR){if(a=r.current(),n.target==n.currentTarget&&n.preventDefault(),e)if(n.ctrlKey){if(a&&a.hasClass(f))return a.removeClass(f),t}else r.selectable.clear();else r.selectable.clear();r.selectable.value(a)}}))},current:function(e){var n=this,i=n.element,a=n._current,r=n._itemId;return e===t?a:(a&&a[0]&&(a[0].id===r&&a.removeAttr("id"),a.removeClass(p),i.removeAttr("aria-activedescendant")),e&&e[0]&&(r=e[0].id||r,n._scrollTo(e[0]),i.attr("aria-activedescendant",r),e.addClass(p).attr("id",r)),n._current=e,t)},_scrollTo:function(t){var n,i,a=this,r=!1,o="scroll";"auto"==a.wrapper.css("overflow")||a.wrapper.css("overflow")==o?n=a.wrapper[0]:(n=window,r=!0),i=function(i,a){var s=r?e(t).offset()[i.toLowerCase()]:t["offset"+i],l=t["client"+a],d=e(n)[o+i](),c=e(n)[a.toLowerCase()]();s+l>d+c?e(n)[o+i](s+l-c):d>s&&e(n)[o+i](s)},i("Top","Height"),i("Left","Width")},_navigatable:function(){var t=this,i=t.options.navigatable,a=t.element,r=function(n){t.current(e(n.currentTarget)),e(n.target).is(":button,a,:input,a>.k-icon,textarea")||a.focus()};i&&(t._tabindex(),a.on("focus"+b,function(){var e=t._current;e&&e.is(":visible")||(e=t._item("first")),t.current(e)}).on("focusout"+b,function(){t._current&&t._current.removeClass(p)}).on("keydown"+b,function(i){var r,o,s=i.keyCode,d=t.current(),c=e(i.target),u=!c.is(":button,textarea,a,a>.t-icon,input"),p=c.is(":text"),f=n.preventDefault,m=a.find("."+h),g=w();if(!(!u&&!p&&l.ESC!=s||p&&l.ESC!=s&&l.ENTER!=s))if(l.UP===s||l.LEFT===s)d&&(d=d.prev()),t.current(d&&d[0]?d:t._item("last")),f(i);else if(l.DOWN===s||l.RIGHT===s)d&&(d=d.next()),t.current(d&&d[0]?d:t._item("first")),f(i);else if(l.PAGEUP===s)t.current(null),t.dataSource.page(t.dataSource.page()-1),f(i);else if(l.PAGEDOWN===s)t.current(null),t.dataSource.page(t.dataSource.page()+1),f(i);else if(l.HOME===s)t.current(t._item("first")),f(i);else if(l.END===s)t.current(t._item("last")),f(i);else if(l.ENTER===s)0!==m.length&&(u||p)?(r=t.items().index(m),g&&g.blur(),t.save(),o=function(){t.element.trigger("focus"),t.current(t.items().eq(r))},t.one("dataBound",o)):""!==t.options.editTemplate&&t.edit(d);else if(l.ESC===s){if(m=a.find("."+h),0===m.length)return;r=t.items().index(m),t.cancel(),t.element.trigger("focus"),t.current(t.items().eq(r))}}),a.on("mousedown"+b+" touchstart"+b,d,y(r,t)))},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger(i)},select:function(n){var i=this,a=i.selectable;return n=e(n),n.length?(a.options.multiple||(a.clear(),n=n.first()),a.value(n),t):a.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(e){var t,i,a=this,r=a.editable,o=a.template,s=!0;return r&&(e&&(s=r.end()),s&&(r.element.index()%2&&(o=a.altTemplate),t=a._modelFromElement(r.element),a._destroyEditable(),i=r.element.index(),r.element.replaceWith(o(t)),a.items().eq(i).attr(n.attr("uid"),t.uid))),s},edit:function(e){var t,i,a=this,r=a._modelFromElement(e),o=r.uid;a.cancel(),e=a.items().filter("["+n.attr("uid")+"="+o+"]"),i=e.index(),e.replaceWith(a.editTemplate(r)),t=a.items().eq(i).addClass(h).attr(n.attr("uid"),r.uid),a.editable=t.kendoEditable({model:r,clearContainer:!1,errorTemplate:!1}).data("kendoEditable"),a.trigger(g,{model:r,item:t})},save:function(){var e,t=this,n=t.editable;n&&(n=n.element,e=t._modelFromElement(n),!t.trigger(_,{model:e,item:n})&&t._closeEditable(!0)&&t.dataSource.sync())},remove:function(e){var t=this,n=t.dataSource,i=t._modelFromElement(e);t.trigger(v,{model:i,item:e})||(e.hide(),n.remove(i),n.sync())},add:function(){var e=this,t=e.dataSource,n=t.indexOf((t.view()||[])[0]);0>n&&(n=0),e.cancel(),t.insert(n,{}),e.edit(e.element.children().first())},cancel:function(){var e,t,n=this,i=n.dataSource;n.editable&&(e=n.editable.element,t=n._modelFromElement(e),n.trigger(a,{model:t,container:e})||(i.cancelChanges(t),n._closeEditable(!1)))},_crudHandlers:function(){var t=this,i=k+b;t.element.on(i,".k-edit-button",function(i){var a=e(this).closest("["+n.attr("uid")+"]");t.edit(a),i.preventDefault()}),t.element.on(i,".k-delete-button",function(i){var a=e(this).closest("["+n.attr("uid")+"]");t.remove(a),i.preventDefault()}),t.element.on(i,".k-update-button",function(e){t.save(),e.preventDefault()}),t.element.on(i,".k-cancel-button",function(e){t.cancel(),e.preventDefault()})},destroy:function(){var e=this;s.fn.destroy.call(e),e._unbindDataSource(),e._destroyEditable(),e.element.off(b),e.pager&&e.pager.destroy(),e.selectable&&e.selectable.destroy(),n.destroy(e.element)}});n.ui.plugin(T)}(window.kendo.jQuery),function(e,t){function n(e,t,n){var i,a;e.on("dragenter"+x,function(){t(),a=new Date,i||(i=setInterval(function(){var e=new Date-a;e>100&&(n(),clearInterval(i),i=null)},100))}).on("dragover"+x,function(){a=new Date})}function i(e,n){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+n}function a(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 p(n)?n.from||n.field||t:n}var o,s,l,d,c=window.kendo,u=c.ui.Widget,p=e.isPlainObject,f=e.proxy,h=e.extend,m=c.support.placeholder,g=c.support.browser,v=c.isFunction,_=/(^\/|\/$)/g,k="change",b="apply",y="error",w="click",x=".kendoImageBrowser",C=".kendoBreadcrumbs",T=".kendoSearchBox",S="name",D="size",F="type",E={field:F,dir:"asc"},z=c.template('
    • ${text}
    • '),H='
      # if (showUpload) { #
      #=messages.uploadFile#
      # } ## if (showCreate) { ## } ## if (showDelete) { # # } #
      ').appendTo(this.element);t.breadcrumbs=n.find("input:first").kendoBreadcrumbs({value:t.options.path,change:function(){t.path(this.value())}}).data("kendoBreadcrumbs"),t.searchBox=n.parent().find("input:last").kendoSearchBox({label:t.options.messages.search,change:function(){t.search(this.value())}}).data("kendoSearchBox")},_error:function(e){var t,n=this;n.trigger(y,e)||(t=e.xhr.status,"error"==e.status?"404"==t?n._showMessage(n.options.messages.directoryNotFound):"0"!=t&&n._showMessage("Error! The requested URL returned "+t+" - "+e.xhr.statusText):"timeout"==t&&n._showMessage("Error! Server timeout."))},_showMessage:function(e,t){return window[t||"alert"](e)},refresh:function(){var e=this;e._navigation(),e._toolbar(),e._content()},_loadImage:function(t){var n=this,i=e(t),a=n.dataSource.getByUid(i.attr(c.attr("uid"))),r=a.get(S),o=n.options.transport.thumbnailUrl,s=e("",{alt:r}),l="?";s.hide().on("load"+x,function(){e(this).prev().remove().end().addClass("k-image").fadeIn()}),i.find(".k-loading").after(s),v(o)?o=o(n.path(),encodeURIComponent(r)):(o.indexOf("?")>=0&&(l="&"),o=o+l+"path="+n.path()+encodeURIComponent(r)),s.attr("src",o),t.loaded=!0},_scroll:function(){var e=this;e.options.transport&&e.options.transport.thumbnailUrl&&(clearTimeout(e._timeout),e._timeout=setTimeout(function(){var n=e.list.outerHeight(),i=e.list.scrollTop(),a=i+n;e._tiles.each(function(){var n=o(this),r=n+this.offsetHeight;return(n>=i&&a>n||r>=i&&a>r)&&e._loadImage(this),n>a?!1:t}),e._tiles=e._tiles.filter(function(){return!this.loaded})},250))},_editTmpl:function(){var e='
    • ',e+="#if("+F+' == "d") { #',e+='
      ',e+="#}else{#",e+='
      ',e+="#}#",e+="#if("+F+' == "d") { #',e+='',e+="#}#",e+="
    • ",f(c.template(e),{sizeFormatter:a})},_itemTmpl:function(){var e=this,t='
    • ',t+="#if("+F+' == "d") { #',t+='
      ',t+="#}else{#",t+=e.options.transport&&e.options.transport.thumbnailUrl?'
      ':'
      ',t+="#}#",t+="${"+S+"}",t+="#if("+F+' == "f") { # ${this.sizeFormatter('+D+")} #}#",t+="
    • ",f(c.template(t),{sizeFormatter:a})},path:function(e){var n=this,i=n._path||"";return e!==t?(n._path=e.replace(_,"")+"/",n.dataSource.read({path:n._path}),t):(i&&(i=i.replace(_,"")),"/"===i||""===i?"":i+"/")}}),l=u.extend({init:function(e,t){var n=this;t=t||{},u.fn.init.call(n,e,t),m&&n.element.attr("placeholder",n.options.label),n._wrapper(),n.element.on("keydown"+T,f(n._keydown,n)).on("change"+T,f(n._updateValue,n)),n.wrapper.on(w+T,"a",f(n._click,n)),m||n.element.on("focus"+T,f(n._focus,n)).on("blur"+T,f(n._blur,n))},options:{name:"SearchBox",label:"Search",value:""},events:[k],destroy:function(){var e=this;e.wrapper.add(e.element).add(e.label).off(T),u.fn.destroy.call(e)},_keydown:function(e){13===e.keyCode&&this._updateValue()},_click:function(e){e.preventDefault(),this._updateValue()},_updateValue:function(){var e=this,t=e.element.val();t!==e.value()&&(e.value(t),e.trigger(k))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){m||this.label.toggle(!this.element.val())},_focus:function(){this.label.hide()},_wrapper:function(){var t=this.element,n=t.parents(".k-search-wrap");t[0].style.width="",t.addClass("k-input"),n.length||(n=t.wrap(e('
      ')).parent(),m||e('").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=u.extend({init:function(e,t){var n=this;t=t||{},u.fn.init.call(n,e,t),n._wrapper(),n.wrapper.on("focus"+C,"input",f(n._focus,n)).on("blur"+C,"input",f(n._blur,n)).on("keydown"+C,"input",f(n._keydown,n)).on(w+C,"a.k-i-arrow-n:first",f(n._rootClick,n)).on(w+C,"a:not(.k-i-arrow-n)",f(n._click,n)),n.value(n.options.value)},options:{name:"Breadcrumbs",gap:50},events:[k],destroy:function(){var e=this;u.fn.destroy.call(e),e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(C)},_update:function(e){e="/"===(e||"").charAt(0)?e:"/"+(e||""),e!==this.value()&&(this.value(e),this.trigger(k))},_click:function(t){t.preventDefault(),this._update(this._path(e(t.target).prevAll("a:not(.k-i-arrow-n)").addBack()))},_rootClick:function(e){e.preventDefault(),this._update("")},_focus:function(){var e=this,t=e.element;e.overlay.hide(),e.element.val(e.value()),setTimeout(function(){t.select()})},_blur:function(){if(!this.overlay.is(":visible")){var e=this,t=e.element,n=t.val().replace(/\/{2,}/g,"/");e.overlay.show(),t.val(""),e._update(n)}},_keydown:function(e){var t=this;13===e.keyCode&&(t._blur(),setTimeout(function(){t.overlay.find("a:first").focus()}))},_wrapper:function(){var t,n=this.element,i=n.parents(".k-breadcrumbs");n[0].style.width="",n.addClass("k-input"),i.length||(i=n.wrap(e('
      ')).parent()),t=i.find(".k-breadcrumbs-wrap"),t.length||(t=e('
      ').appendTo(i)),this.wrapper=i,this.overlay=t},refresh:function(){var n,i,a,r,o="",s=this.value();for(s!==t&&s.match(/^\//)||(s="/"+(s||"")),n=s.split("/"),a=0,r=n.length;r>a;a++)i=n[a],i&&(o||(o+='root'),o+=''+n[a]+"",o+='>');this.overlay.empty().append(e(o)),this._adjustSectionWidth()},_adjustSectionWidth:function(){var t,n=this,i=n.wrapper,a=i.width()-n.options.gap,r=n.overlay.find("a");r.each(function(n){t=e(this),t.parent().width()>a&&(n==r.length-1?t.width(a):t.prev().addBack().hide())})},value:function(e){return e!==t?(this._value=e.replace(/\/{2,}/g,"/"),this.refresh(),t):this._value},_path:function(t){return"/"+e.map(t,function(t){return e(t).text()}).join("/")}}),c.ui.plugin(s),c.ui.plugin(d),c.ui.plugin(l)}(window.kendo.jQuery),function(e,t){var n,i,a=window.kendo,r=a.Class,o=a.ui.Widget,s=a.support.mobileOS,l=a.support.browser,d=e.extend,c=e.proxy,u=a.deepExtend,p=".kendoEditor",f=a.keys,h=r.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return a.template(e.template,{useWithBlock:!1})(e)}}),m={editorWrapperTemplate:'',buttonTemplate:'#= data.title #',colorPickerTemplate:'
      ',comboBoxTemplate:'',separatorTemplate:'',formatByName:function(t,n){for(var i=0;i=0)return n[i]},registerTool:function(e,t){var n=t.options;n&&n.template&&(n.template.options.cssClass="k-"+e),t.name||(t.options.name=e,t.name=e.toLowerCase()),k.defaultTools[e]=t},registerFormat:function(e,t){k.fn.options.formats[e]=t}},g={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",insertHtml:"Insert HTML",viewHtml:"View HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",formatting:"Format",foreColor:"Color",backColor:"Background color",style:"Styles",emptyFolder:"Empty Folder",uploadFile:"Upload",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found.",imageWebAddress:"Web address",imageAltText:"Alternate text",linkWebAddress:"Web address",linkText:"Text",linkToolTip:"ToolTip",linkOpenInNewWindow:"Open link in new window",dialogUpdate:"Update",dialogInsert:"Insert",dialogButtonSeparator:"or",dialogCancel:"Cancel",createTable:"Create table",addColumnLeft:"Add column on the left",addColumnRight:"Add column on the right",addRowAbove:"Add row above",addRowBelow:"Add row below",deleteRow:"Delete row",deleteColumn:"Delete column"},v=!s||s.ios&&s.flatVersion>=500||!s.ios&&t!==document.documentElement.contentEditable,_={basic:["bold","italic","underline"],alignment:["justifyLeft","justifyCenter","justifyRight"],lists:["insertUnorderedList","insertOrderedList"],indenting:["indent","outdent"],links:["createLink","unlink"],tables:["createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"]},k=o.extend({init:function(t,n){var i,r,s,l=this,f=a.ui.editor,h=f.Dom.name(t);v&&(o.fn.init.call(l,t,n),l.options=u({},l.options,n),t=l.element,t.closest("form").on("submit"+p,function(){l.update()}),s=d({},l.options),s.editor=l,"textarea"==h?(l._wrapTextarea(),r=l.wrapper.find(".k-editor-toolbar"),t[0].id&&r.attr("aria-controls",t[0].id)):(l.element.addClass("k-widget k-editor k-editor-inline"),s.popup=!0,r=e('"),s=this.isBlock(t),_.focus(),l=_.getRange(),l.deleteContents(),l.startContainer==_.document&&l.selectNodeContents(_.body),d=new c,p=d.addCaret(l),f=this.splittableParent(s,p),h=!1,m=f!=_.body&&!o.is(f,"td"),n.split&&m&&(s||o.isInline(f))&&(l.selectNode(p),i.RangeUtils.split(l,f,!0),h=!0),g=this.htmlToFragment(t),g.firstChild&&"k-paste-container"===g.firstChild.className){for(v=[],a=0,r=g.childNodes.length;r>a;a++)v.push(g.childNodes[a].innerHTML);g=this.htmlToFragment(v.join("
      "))}if(e(g.childNodes).filter("table").addClass("k-table").end().find("table").addClass("k-table"),l.insertNode(g),f=this.splittableParent(s,p),h){for(;p.parentNode!=f;)o.unwrap(p.parentNode);o.unwrap(p.parentNode)}o.normalize(l.commonAncestorContainer),p.style.display="inline",o.restoreScrollTop(_.document),o.scrollTo(p),d.removeCaret(l),_.selectRange(l)}}),y=n.extend({clean:function(e){var t,n,i=this,a=i.replacements;for(t=0,n=a.length;n>t;t+=2)e=e.replace(a[t],a[t+1]);return e}}),w=y.extend({init:function(){this.replacements=[/<\?xml[^>]*>/gi,"",//g,"",/"/g,"'",/(?:
       [\s\r\n]+|
      )*(<\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:
       [\s\r\n]+|
      )*/g,"$1",/

      /g,"

      ",/
      (?!\n)/g," ",/]*)>(\s| )+]*>(\s| )*<\/tr>/gi,"",/]*>(\s| )*<\/tbody>/gi,"",/]*>(\s| )*<\/table>/gi,"",/

      /g,"
      ",/^\s*( )+/gi,"",/( |]*>)+\s*$/gi,"",/mso-[^;"]*;?/gi,"",/<(\/?)b(\s[^>]*)?>/gi,"<$1strong$2>",/<(\/?)i(\s[^>]*)?>/gi,"<$1em$2>",/<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi,"",/style=(["|'])\s*\1/g,""]},applicable:function(e){return/class="?Mso|style="[^"]*mso-/i.test(e)},stripEmptyAnchors:function(e){return e.replace(/]*)>\s*<\/a>/gi,function(e,t){return!t||t.indexOf("href")<0?"":e})},listType:function(e){var t;return/^(]*texhtml[^>]*>)?]*(Symbol|Wingdings)[^>]*>/i.test(e)&&(t=!0),e=e.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),!t&&/^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(e)||t&&/^.\u00a0+/.test(e)?"ul":/^\s*\w+[\.\)]\u00a0{2,}/.test(e)?"ol":void 0},lists:function(t){var n,i,a,r,s,l,d,c,u=e(o.blockElements.join(","),t),p=-1,f={ul:{},ol:{}},h=t;for(i=0;ip||!l)&&(l=o.create(document,r),h==t?o.insertBefore(l,a):h.appendChild(l),f[r][s]=l),n!=r)for(d in f)for(c in f[d])e.contains(l,f[d][c])&&delete f[d][c];o.remove(a.firstChild),h=o.create(document,"li",{innerHTML:a.innerHTML}),l.appendChild(h),o.remove(a),p=s,n=r}else a.innerHTML?(f={ul:{},ol:{}},h=t,p=-1):o.remove(a)},removeAttributes:function(e){for(var t=e.attributes,n=t.length;n--;)e.removeAttributeNode(t[n])},createColGroup:function(n){var i,a=n.cells;a.length<2||(i=e(e.map(a,function(e){var n=e.width;return n&&0!==parseInt(n,10)?t.format('',n):""}).join("")),i.is("colgroup")||(i=e("").append(i)),i.prependTo(e(n).closest("table")))},convertHeaders:function(t){var n,i=t.cells,a=e.map(i,function(t){var n=e(t).children("p").children("strong")[0];return n&&"strong"==o.name(n)?n:void 0});if(a.length==i.length){for(n=0;n"+e.map(i,function(t){return""+e(t).html()+""}).join("")+"").end().end().remove()}},removeParagraphs:function(t){var n,i,a,r,s;for(n=0;ni;i++)a-1>i&&o.insertAfter(o.create(document,"br"),s[i]),o.unwrap(s[i])},removeDefaultColors:function(e){for(var t=0;t]*"?/gi,"")}}),x=y.extend({init:function(){this.replacements=[/\s+class="Apple-style-span[^"]*"/gi,"",/<(div|p|h[1-6])\s+style="[^"]*"/gi,"<$1",/^
      (.*)<\/div>$/,"$1"]},applicable:function(e){return/class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(e)}});u(i,{Command:p,GenericCommand:f,InsertHtmlCommand:h,InsertHtmlTool:m,UndoRedoStack:g,TypingHandler:v,SystemHandler:_,Keyboard:k,Clipboard:b,Cleaner:y,MSWordFormatCleaner:w,WebkitFormatCleaner:x}),r("insertHtml",new m({template:new l({template:a.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,a=t.ui.Editor.fn.options.formats,r=i.EditorUtils,o=i.Tool,s=i.ToolTemplate,l=i.FormatTool,d=i.Dom,c=i.RangeUtils,u=e.extend,p=i.EditorUtils.registerTool,f=i.EditorUtils.registerFormat,h="k-marker",m=n.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,n=0,i=0,a=0,r=e.parentNode;for(t=r.firstChild;t;t=t.nextSibling)t!=e&&(t.className==h?a++:3==t.nodeType?n++:i++);return a>1&&r.firstChild.className==h&&r.lastChild.className==h?0:i+n},findSuitable:function(e,t){return!t&&this.numberOfSiblings(e)>0?null:d.parentOfType(e,this.format[0].tags)},findFormat:function(e){var t,n,i,a,r,o=this.format,s=d.attrEquals;for(t=0,n=o.length;n>t;t++){if(i=e,a=o[t].tags,r=o[t].attr,i&&d.ofType(i,a)&&s(i,r))return i;for(;i;)if(i=d.parentOfType(i,a),i&&s(i,r))return i}return null},isFormatted:function(e){var t,n;for(t=0,n=e.length;n>t;t++)if(this.findFormat(e[t]))return!0;return!1}}),g=n.extend({init:function(e,t){var n=this;n.finder=new m(e),n.attributes=u({},e[0].attr,t),n.tag=e[0].tags[0]},wrap:function(e){return d.wrap(e,d.create(e.ownerDocument,this.tag,this.attributes))},activate:function(e,t){var n=this;n.finder.isFormatted(t)?(n.split(e),n.remove(t)):n.apply(t)},toggle:function(e){var t=c.textNodes(e);t.length>0&&this.activate(e,t)},apply:function(e){var t,n,i,a,r=this,o=[];for(t=0,n=e.length;n>t;t++)i=e[t],a=r.finder.findSuitable(i),a?d.attr(a,r.attributes):a=r.wrap(i),o.push(a);r.consolidate(o)},remove:function(e){var t,n,i,a=this;for(t=0,n=e.length;n>t;t++)i=a.finder.findFormat(e[t]),i&&(a.attributes&&a.attributes.style?(d.unstyle(i,a.attributes.style),i.style.cssText||i.attributes["class"]||d.unwrap(i)):d.unwrap(i))},split:function(e){var t,n,i=c.textNodes(e),a=i.length;if(a>0)for(t=0;a>t;t++)n=this.finder.findFormat(i[t]),n&&c.split(e,n,!0)},consolidate:function(e){for(var t,n;e.length>1;)if(t=e.pop(),n=e[e.length-1],t.previousSibling&&t.previousSibling.className==h&&n.appendChild(t.previousSibling),t.tagName==n.tagName&&t.previousSibling==n&&t.style.cssText==n.style.cssText){for(;t.firstChild;)n.appendChild(t.firstChild);d.remove(t)}}}),v=m.extend({init:function(e,t){var n=this;n.format=e,n.greedyProperty=t,m.fn.init.call(n,e)},getInlineCssValue:function(t){var n,i,a,r,o,s,l,c,u,p,f,h,m=t.attributes,g=e.trim;if(m)for(n=0,i=m.length;i>n;n++)if(a=m[n],r=a.nodeName,o=a.nodeValue,a.specified&&"style"==r)for(s=g(o||t.style.cssText).split(";"),c=0,u=s.length;u>c;c++)if(l=s[c],l.length){if(p=l.split(":"),f=g(p[0].toLowerCase()),h=g(p[1]),f!=this.greedyProperty)continue;return f.indexOf("color")>=0?d.toHex(h):h}},getFormatInner:function(t){var n,i,a,r=e(d.isDataNode(t)?t.parentNode:t),o=r.parentsUntil("[contentEditable]").addBack();for(n=0,i=o.length;i>n;n++)if(a="className"==this.greedyProperty?o[n].className:this.getInlineCssValue(o[n]))return a;return"inherit"},getFormat:function(e){var t,n,i=this.getFormatInner(e[0]);for(t=1,n=e.length;n>t;t++)if(i!=this.getFormatInner(e[t]))return"";return i},isFormatted:function(e){return""!==this.getFormat(e)}}),_=g.extend({init:function(e,t,n){var i=this;g.fn.init.call(i,e,t),i.greedyProperty=n,i.values=t,i.finder=new v(e,n)},activate:function(e,t){var n,i=this,a=i.greedyProperty,r="apply";i.split(e),a&&(n=a.replace(/-([a-z])/,function(e,t){return t.toUpperCase()}),"inherit"==i.values.style[n]&&(r="remove")),i[r](t)}}),k=l.extend({init:function(e){l.fn.init.call(this,u(e,{finder:new m(e.format),formatter:function(){return new g(e.format)}}))}}),b=o.extend({update:function(e,t){var n=e.data(this.type);n.close(),n.value(this.finder.getFormat(t))}}),y=b.extend({init:function(e){var n=this;o.fn.init.call(n,e),n.type=t.support.browser.msie||t.support.touch?"kendoDropDownList":"kendoComboBox",n.format=[{tags:["span"]}],n.finder=new v(n.format,e.cssAttr)},command:function(e){var t=this.options,n=this.format,a={};return new i.FormatCommand(u(e,{formatter:function(){return a[t.domAttr]=e.value,new _(n,{style:a},t.cssAttr)}}))},initialize:function(e,t){var n,i=t.editor,a=this.options,r=a.name,s=[];a.defaultValue&&(s=[{text:i.options.messages[a.defaultValue[0].text],value:a.defaultValue[0].value}]),n=s.concat(a.items?a.items:i.options[r]),e[this.type]({dataTextField:"text",dataValueField:"value",dataSource:n,change:function(){o.exec(i,r,this.value())},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+r).find("*").addBack().attr("unselectable","on"),e.data(this.type).value("inherit")}}),w=o.extend({init:function(e){o.fn.init.call(this,e),this.format=[{tags:["span"]}],this.finder=new v(this.format,e.cssAttr)},options:{palette:"websafe"},update:function(){this._widget.close()},command:function(e){var t=this.options,n=this.format,a={};return new i.FormatCommand(u(e,{formatter:function(){return a[t.domAttr]=e.value,new _(n,{style:a},t.cssAttr)}}))},initialize:function(n,i){var a=i.editor,r=this.name,s=u({},w.fn.options,this.options),l=s.palette;n=this._widget=new t.ui.ColorPicker(n,{value:e.isArray(l)?l[0]:"#000",toolIcon:"k-"+s.name,palette:l,change:function(){var e=n.value();e&&o.exec(a,r,e),a.focus()},activate:function(e){e.preventDefault(),n.trigger("change")}}),n.wrapper.attr({title:i.title,unselectable:"on"}).find("*").attr("unselectable","on")}});u(i,{InlineFormatFinder:m,InlineFormatter:g,DelayedExecutionTool:b,GreedyInlineFormatFinder:v,GreedyInlineFormatter:_,InlineFormatTool:k,FontTool:y,ColorTool:w}),f("bold",[{tags:["strong","b"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),p("bold",new k({key:"B",ctrl:!0,format:a.bold,template:new s({template:r.buttonTemplate,title:"Bold"})})),f("italic",[{tags:["em","i"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),p("italic",new k({key:"I",ctrl:!0,format:a.italic,template:new s({template:r.buttonTemplate,title:"Italic"})})),f("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}},{tags:["u"]}]),p("underline",new k({key:"U",ctrl:!0,format:a.underline,template:new s({template:r.buttonTemplate,title:"Underline"})})),f("strikethrough",[{tags:["del","strike"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),p("strikethrough",new k({format:a.strikethrough,template:new s({template:r.buttonTemplate,title:"Strikethrough"})})),f("superscript",[{tags:["sup"]}]),p("superscript",new k({format:a.superscript,template:new s({template:r.buttonTemplate,title:"Superscript"})})),f("subscript",[{tags:["sub"]}]),p("subscript",new k({format:a.subscript,template:new s({template:r.buttonTemplate,title:"Subscript"})})),p("foreColor",new w({cssAttr:"color",domAttr:"color",name:"foreColor",template:new s({template:r.colorPickerTemplate,title:"Color"})})),p("backColor",new w({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new s({template:r.colorPickerTemplate,title:"Background Color"})})),p("fontName",new y({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new s({template:r.comboBoxTemplate,title:"Font Name"})})),p("fontSize",new y({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new s({template:r.comboBoxTemplate,title:"Font Size"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,a=t.ui.editor,r=t.ui.Editor.fn.options.formats,o=a.Dom,s=a.Command,l=a.ToolTemplate,d=a.FormatTool,c=a.EditorUtils,u=c.registerTool,p=c.registerFormat,f=a.RangeUtils,h=n.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,a;for(n=0,i=t.length;i>n;n++)if(a=t[n],!a||!o.isAncestorOrSelf(e,a))return!1;return!0},findSuitable:function(t){var n,i,a,r=this.format,s=[];for(n=0,i=t.length;i>n;n++){if(a=o.ofType(t[n],r[0].tags)?t[n]:o.parentOfType(t[n],r[0].tags),!a||"true"===a.contentEditable)return[];e.inArray(a,s)<0&&s.push(a)}for(n=0,i=s.length;i>n;n++)if(this.contains(s[n],s))return[s[n]];return s},findFormat:function(e){var t,n,i,a,r,s=this.format;for(t=0,n=s.length;n>t;t++)for(i=e,a=s[t].tags,r=s[t].attr;i;){if(o.ofType(i,a)&&o.attrEquals(i,r))return i;i=i.parentNode}return null},getFormat:function(e){var t,n,i=this,a=function(e){return i.findFormat(o.isDataNode(e)?e.parentNode:e)},r=a(e[0]);if(!r)return"";for(t=1,n=e.length;n>t;t++)if(r!=a(e[t]))return"";return r.nodeName.toLowerCase()},isFormatted:function(e){for(var t=0,n=e.length;n>t;t++)if(!this.findFormat(e[t]))return!1;return!0}}),m=n.extend({init:function(e,t){this.format=e,this.values=t,this.finder=new h(e)},wrap:function(e,t,n){var i,a,r,s,l,d=1==n.length?o.blockParentOrBody(n[0]):o.commonAncestor.apply(null,n);for(o.isInline(d)&&(d=o.blockParentOrBody(d)),r=o.significantChildNodes(d),s=o.findNodeIndex(r[0]),l=o.create(d.ownerDocument,e,t),i=0;il;l++)a=c.formatByName(o.name(s[l]),this.format),o.attr(s[l],n(a));else a=this.format[0],this.wrap(a.tags[0],n(a),r)},remove:function(e){var t,n,i,a,r;for(t=0,n=e.length;n>t;t++)i=this.finder.findFormat(e[t]),i&&(r=o.name(i),"div"!=r||i.getAttribute("class")?(a=c.formatByName(r,this.format),a.attr.style&&o.unstyle(i,a.attr.style),a.attr.className&&o.removeClass(i,a.attr.className)):o.unwrap(i))},toggle:function(e){var t=this,n=f.nodes(e);t.finder.isFormatted(n)?t.remove(n):t.apply(n)}}),g=n.extend({init:function(e,t){var n=this;n.format=e,n.values=t,n.finder=new h(e)},apply:function(e){var t,n,i,r,s,l,d=this.format,c=o.blockParents(e),u=d[0].tags[0];if(c.length&&c[0].attributes.contentEditable&&(c=[]),c.length)for(t=0,n=c.length;n>t;t++)o.is(c[t],"li")?(i=c[t].parentNode,r=new a.ListFormatter(i.nodeName.toLowerCase(),u),s=this.editor.createRange(),s.selectNode(c[t]),r.toggle(s)):(l=o.changeTag(c[t],u),o.attr(l,d[0].attr));else new m(d,this.values).apply(e)},toggle:function(e){var t=f.textNodes(e);t.length||(e.selectNodeContents(e.commonAncestorContainer),t=f.textNodes(e),t.length||(t=o.significantChildNodes(e.commonAncestorContainer))),this.apply(t)}}),v=s.extend({init:function(e){e.formatter=e.formatter(),s.fn.init.call(this,e)}}),_=d.extend({init:function(e){d.fn.init.call(this,i(e,{finder:new h(e.format),formatter:function(){return new m(e.format)}}))}});i(a,{BlockFormatFinder:h,BlockFormatter:m,GreedyBlockFormatter:g,FormatCommand:v,BlockFormatTool:_}),p("justifyLeft",[{tags:o.blockElements,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left"}}}]),u("justifyLeft",new _({format:r.justifyLeft,template:new l({template:c.buttonTemplate,title:"Justify Left"})})),p("justifyCenter",[{tags:o.blockElements,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto"}}}]),u("justifyCenter",new _({format:r.justifyCenter,template:new l({template:c.buttonTemplate,title:"Justify Center"})})),p("justifyRight",[{tags:o.blockElements,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right"}}}]),u("justifyRight",new _({format:r.justifyRight,template:new l({template:c.buttonTemplate,title:"Justify Right"})})),p("justifyFull",[{tags:o.blockElements,attr:{style:{textAlign:"justify"}}}]),u("justifyFull",new _({format:r.justifyFull,template:new l({template:c.buttonTemplate,title:"Justify Full"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,a=i.Dom,r=i.Command,o=i.Tool,s=i.BlockFormatter,l=a.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=a.create(e,"a");return t.insertNode(i),i.parentNode||(n=t.commonAncestorContainer,n.innerHTML="",n.appendChild(i)),l(i.parentNode),i},_moveFocus:function(e,t){if(a.is(t,"img"))e.setStartBefore(t);else{e.selectNodeContents(t);var n=d.textNodes(e)[0];if(n)e.selectNodeContents(n);else{for(;t.childNodes.length&&!a.is(t.firstChild,"br");)t=t.firstChild;e.selectNodeContents(t)}}},shouldTrim:function(e){var t="p,h1,h2,h3,h4,h5,h6".split(","),n=a.parentOfType(e.startContainer,t),i=a.parentOfType(e.endContainer,t);return n&&!i||!n&&i},exec:function(){var e,t,n,r,o,c,u,p,f=this.getRange(),h=d.documentFromRange(f),m=i.emptyElementContent,g=this.shouldTrim(f);f.deleteContents(),o=this._insertMarker(h,f),c=a.closestEditableOfType(o,["li"]),u=a.closestEditableOfType(o,"h1,h2,h3,h4,h5,h6".split(",")),c?(p=f.cloneRange(),p.selectNode(c),d.textNodes(p).length||(r=a.create(h,"p"),c.nextSibling&&d.split(p,c.parentNode),a.insertAfter(r,c.parentNode),a.remove(1==c.parentNode.childNodes.length?c.parentNode:c),r.innerHTML=m,n=r)):u&&!o.nextSibling&&(r=a.create(h,"p"),a.insertAfter(r,u),r.innerHTML=m,a.remove(o),n=r),n||(c||u||new s([{tags:["p"]}]).apply([o]),f.selectNode(o),e=a.parentOfType(o,[c?"li":u?a.name(u):"p"]),d.split(f,e,g),t=e.previousSibling,a.is(t,"li")&&t.firstChild&&!a.is(t.firstChild,"br")&&(t=t.firstChild),n=e.nextSibling,a.is(n,"li")&&n.firstChild&&!a.is(n.firstChild,"br")&&(n=n.firstChild),a.remove(e),this.clean(t),this.clean(n),l(t)),l(n),this._moveFocus(f,n),f.collapse(!0),a.scrollTo(n),d.selectRange(f)},clean:function(e){if(e.firstChild&&a.is(e.firstChild,"br")&&a.remove(e.firstChild),a.isDataNode(e)&&!e.nodeValue&&(e=e.parentNode),e){for(;e.firstChild&&1==e.firstChild.nodeType;)e=e.firstChild;!a.isEmpty(e)&&/^\s*$/.test(e.innerHTML)&&(e.innerHTML=i.emptyElementContent)}}}),p=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},exec:function(){var e,n=this.getRange(),i=a.create(d.documentFromRange(n),"br");n.deleteContents(),n.insertNode(i),l(i.parentNode),t.support.browser.msie||i.nextSibling&&!a.isWhitespace(i.nextSibling)||(e=i.cloneNode(!0),e.setAttribute("_moz_dirty",""),a.insertAfter(e,i)),n.setStartAfter(i),n.collapse(!0),a.scrollTo(i.nextSibling||i),d.selectRange(n)}});n(i,{ParagraphCommand:u,NewLineCommand:p}),c("insertLineBreak",new o({key:13,shift:!0,command:p})),c("insertParagraph",new o({key:13,command:u}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,a=t.ui.editor,r=a.Dom,o=a.RangeUtils,s=a.EditorUtils,l=a.Command,d=a.ToolTemplate,c=a.FormatTool,u=a.BlockFormatFinder,p=o.textNodes,f=a.EditorUtils.registerTool,h=u.extend({init:function(e){this.tag=e;var t=this.tags=["ul"==e?"ol":"ul",e];u.fn.init.call(this,[{tags:t}])},isFormatted:function(e){var t,n,i=[];for(n=0;na;a++)l=this.finder.findFormat(c[a]),l&&(d=e(l).parents("ul,ol"),d[0]?o.split(t,d.last()[0],!0):o.split(t,l,!0))},merge:function(e,t){for(var n,i=t.previousSibling;i&&("k-marker"==i.className||3==i.nodeType&&r.isWhitespace(i));)i=i.previousSibling;if(i&&r.name(i)==e){for(;t.firstChild;)i.appendChild(t.firstChild);r.remove(t),t=i}for(n=t.nextSibling;n&&("k-marker"==n.className||3==n.nodeType&&r.isWhitespace(n));)n=n.nextSibling;if(n&&r.name(n)==e){for(;t.lastChild;)n.insertBefore(t.lastChild,n.firstChild);r.remove(t)}},breakable:function(e){return e!=e.ownerDocument.body&&!/table|tbody|tr|td/.test(r.name(e))&&!e.attributes.contentEditable},applyOnSection:function(t,n){function i(){u.push(this)}var a,o,s,l,d=this.tag,c=r.closestSplittableParent(n),u=[],p=this.finder.findSuitable(n);for(p||(p=new h("ul"==d?"ol":"ul").findSuitable(n)),/table|tbody/.test(r.name(c))?a=e.map(n,function(e){return r.parentOfType(e,["td"])}):(a=r.significantChildNodes(c),e.grep(a,r.isBlock).length&&(a=e.grep(a,e.proxy(function(e){return this.containsAny(e,n)},this))),a.length||(a=n)),o=0;on;n++)t=this.finder.findFormat(e[n]),t&&this.unwrap(t)},toggle:function(e){var t,n=this,i=p(e),a=e.commonAncestorContainer;i.length||(e.selectNodeContents(a),i=p(e),i.length||(t=a.ownerDocument.createTextNode(""),e.startContainer.appendChild(t),i=[t],e.selectNode(t.parentNode))),n.finder.isFormatted(i)?(n.split(e),n.remove(i)):n.apply(i)}}),g=l.extend({init:function(e){e.formatter=new m(e.tag),l.fn.init.call(this,e)}}),v=c.extend({init:function(e){this.options=e,c.fn.init.call(this,i(e,{finder:new h(e.tag)}))},command:function(e){return new g(i(e,{tag:this.options.tag}))}});i(a,{ListFormatFinder:h,ListFormatter:m,ListCommand:g,ListTool:v}),f("insertUnorderedList",new v({tag:"ul",template:new d({template:s.buttonTemplate,title:"Remove Link"})})),f("insertOrderedList",new v({tag:"ol",template:new d({template:s.buttonTemplate,title:"Remove Link"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,a=t.ui.editor,r=a.Dom,o=a.RangeUtils,s=a.EditorUtils,l=a.Command,d=a.Tool,c=a.ToolTemplate,u=a.InlineFormatter,p=a.InlineFormatFinder,f=o.textNodes,h=a.EditorUtils.registerTool,m=n.extend({findSuitable:function(e){return r.parentOfType(e,["a"])}}),g=n.extend({init:function(){this.finder=new m},apply:function(e,t){var n,i,a,s,l=f(e);t.innerHTML?(n=o.getMarkers(e),i=o.documentFromRange(e),e.deleteContents(),s=r.create(i,"a",t),e.insertNode(s),"a"==r.name(s.parentNode)&&r.insertAfter(s,s.parentNode),n.length>1&&(r.insertAfter(n[n.length-1],s),r.insertAfter(n[1],s),r[l.length>0?"insertBefore":"insertAfter"](n[0],s))):(a=new u([{tags:["a"]}],t),a.finder=this.finder,a.apply(l))}}),v=l.extend({init:function(e){e.formatter={toggle:function(e){new u([{tags:["a"]}]).remove(f(e))}},this.options=e,l.fn.init.call(this,e)}}),_=l.extend({init:function(e){var t=this;t.options=e,l.fn.init.call(t,e),t.formatter=new g,e.url?this.exec=function(){this.formatter.apply(e.range,{href:e.url,innerHTML:e.text||e.url,target:e.target})}:(t.attributes=null,t.async=!0)},_dialogTemplate:function(){return t.template("
      ")({messages:this.editor.options.messages})},exec:function(){function n(t){var n,a,o,s=d.element,l=e("#k-editor-link-url",s).val();l&&"http://"!=l&&(l.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(l)&&(l="mailto:"+l),c.attributes={href:l},n=e("#k-editor-link-title",s).val(),n&&(c.attributes.title=n),a=e("#k-editor-link-text",s).val(),a||h?a&&a!==h&&(c.attributes.innerHTML=r.stripBom(a)):c.attributes.innerHTML=l,o=e("#k-editor-link-target",s).is(":checked"),c.attributes.target=o?"_blank":null,c.formatter.apply(u,c.attributes)),i(t),c.change&&c.change()}function i(e){e.preventDefault(),d.destroy(),r.windowFromDocument(o.documentFromRange(u)).focus(),c.releaseRange(u)}function a(e){var t="";return 1==e.length?t=e[0].nodeValue:e.length&&(t=e[0].nodeValue+e[1].nodeValue),r.stripBom(t)}var s,l,d,c=this,u=c.getRange(),p=u.collapsed,h="",m=c.editor.options.messages;u=c.lockRange(!0),s=f(u),l=s.length?c.formatter.finder.findSuitable(s[0]):null,d=this.createDialog(c._dialogTemplate(),{title:m.createLink,close:i,visible:!1}).find(".k-dialog-insert").click(n).end().find(".k-dialog-close").click(i).end().find(".k-edit-field input").keydown(function(e){var a=t.keys;e.keyCode==a.ENTER?n(e):e.keyCode==a.ESC&&i(e)}).end().find("#k-editor-link-url").val(l?l.getAttribute("href",2):"http://").end().find("#k-editor-link-text").val(a(s)).end().find("#k-editor-link-title").val(l?l.title:"").end().find("#k-editor-link-target").attr("checked",l?"_blank"==l.target:!1).end().data("kendoWindow").center().open(),s.length>0&&!p&&(h=e("#k-editor-link-text",d.element).val()),e("#k-editor-link-url",d.element).focus().select()},redo:function(){var e=this,t=e.lockRange(!0);e.formatter.apply(t,e.attributes),e.releaseRange(t)}}),k=d.extend({init:function(t){this.options=t,this.finder=new p([{tags:["a"]}]),d.fn.init.call(this,e.extend(t,{command:v}))},initialize:function(e,t){d.fn.initialize.call(this,e,t),e.addClass("k-state-disabled")},update:function(e,t){e.toggleClass("k-state-disabled",!this.finder.isFormatted(t)).removeClass("k-state-hover")}});i(t.ui.editor,{LinkFormatFinder:m,LinkFormatter:g,UnlinkCommand:v,LinkCommand:_,UnlinkTool:k}),h("createLink",new d({key:"K",ctrl:!0,command:_,template:new c({template:s.buttonTemplate,title:"Create Link"})})),h("unlink",new k({key:"K",ctrl:!0,shift:!0,template:new c({template:s.buttonTemplate,title:"Remove Link"})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,a=n.ui.editor,r=a.EditorUtils,o=a.Dom,s=r.registerTool,l=a.ToolTemplate,d=a.RangeUtils,c=a.Command,u=n.keys,p="#k-editor-image-url",f="#k-editor-image-title",h=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=this.attributes,i=d.documentFromRange(t);if(n.src&&"http://"!=n.src){if(!e)return e=o.create(i,"img",n),e.onload=e.onerror=function(){e.removeAttribute("complete"),e.removeAttribute("width"),e.removeAttribute("height")},t.deleteContents(),t.insertNode(e),e.nextSibling||o.insertAfter(i.createTextNode(""),e),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;o.attr(e,n)}return!1},_dialogTemplate:function(e){return n.template('
      # if (showBrowser) { #
      # } #
      ')({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;l.attributes={src:t.find(p).val().replace(/ /g,"%20"),alt:t.find(f).val()},h=l.insertImage(m,c),a(e),l.change&&l.change()}function a(e){e.preventDefault(),s.destroy(),o.windowFromDocument(d.documentFromRange(c)).focus(),h||l.releaseRange(c)}function r(t){t.keyCode==u.ENTER?e(t):t.keyCode==u.ESC&&a(t)}var s,l=this,c=l.lockRange(),h=!1,m=d.image(c),g=l.editor.options,v=g.messages,_=g.imageBrowser,k=!!(n.ui.ImageBrowser&&_&&_.transport&&_.transport.read!==t);s=this.createDialog(l._dialogTemplate(k),{title:v.insertImage,close:a,visible:!1,resizable:k}).toggleClass("k-imagebrowser-dialog",k).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(a).end().find(".k-edit-field input").keydown(r).end().find(p).val(m?m.getAttribute("src",2):"http://").end().find(f).val(m?m.alt:"").end().data("kendoWindow"),k&&new n.ui.ImageBrowser(s.element.find(".k-imagebrowser"),i({},_,{change:function(){s.element.find(p).val(this.value())},apply:e})),s.center().open(),s.element.find(p).focus().select()}});n.ui.editor.ImageCommand=h,s("insertImage",new a.Tool({command:h,template:new l({template:r.buttonTemplate,title:"Insert Image"})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui.DropDownList,a=n.ui.editor.Dom,r=i.extend({init:function(e,t){var a=this; i.fn.init.call(a,e,t),a.value(a.options.title),n.support.mobileOS.ios&&a._initSelectOverlay(),a.bind("open",function(){if(a.options.autoSize){var e,t=a.list;t.css({whiteSpace:"nowrap",width:"auto"}),e=t.width(),e?e+=20:e=a._listWidth,t.css("width",e+n.support.scrollbar()),a._listWidth=e}})},options:{name:"SelectBox"},_initSelectOverlay:function(){var t=e(this.element),n=e("
      ",indent:function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"\n").replace(/<(ul|ol)([^>]*)>
    • \n/gi,"
      \n").replace(/\n$/,"")}}),t.ui.editor.ViewHtmlCommand=l,i.EditorUtils.registerTool("viewHtml",new o({command:l,template:new s({template:a.buttonTemplate,title:"View HTML"})}))}(window.kendo.jQuery),function(e){function t(t,n,i){return c.extend({init:function(e){c.fn.init.call(this,e),this.finder=i},command:function(t){var i=t.value;return e.isPlainObject(i)?i[n]=i.value:(t.value={},t.value[n]=i),c.fn.command.call(this,t)},initialize:function(e,t){var i,a=window.console,r=this.options.items;for(i=0;i=0?new i.GreedyInlineFormatter(r):new i.GreedyBlockFormatter(r)}})},initialize:function(e,t){var i=t.editor,r=this.options,o=r.name,s=this;e.width(r.width),e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:r.items||i.options[o],title:i.options.messages[o],autoSize:!0,change:function(){a.exec(i,o,this.dataItem().toJSON())},dataBound:function(){var e,t=this.dataSource.data();for(e=0;e#:data.text#')}),e.addClass("k-decorated").closest(".k-widget").removeClass("k-"+o).find("*").addBack().attr("unselectable","on")},getFormattingValue:function(t,n){var i,a,r,o,s,l,d;for(i=0;i").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(t){e(t.target).is(".k-icon")||t.preventDefault()}).data("kendoWindow")},items:function(){return this.element.children().find("> *, select")},focused:function(){return this.element.find(".k-state-focused").length>0},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",o(n._update,n)),n._editor=t,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==s.RIGHT||i==s.LEFT?n.close():i==s.DOWN&&(n.dropDown.isOpened()||(t.stopImmediatePropagation(),n.open()))}),n._attachEvents(),n.items().each(function(){var i,a=n._toolName(this),r=n.tools[a],o=r&&r.options,s=t.options.messages,l=o&&o.tooltip||s[a],d=e(this);r&&r.initialize&&(("fontSize"==a||"fontName"==a)&&(i=s[a+"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",o(n._update,n)),n._updateContext(),i&&i.wrapper.css({top:"",left:"",width:""})},show:function(){var e,t,n=this,i=n.window,a=n.options.editor;i&&(e=i.wrapper,t=a.element,e.is(":visible")&&n.window.options.visible||(e[0].style.width||e.width(t.outerWidth()-parseInt(e.css("border-left-width"),10)-parseInt(e.css("border-right-width"),10)),i._moved||(e.css("top",parseInt(t.offset().top,10)-e.outerHeight()-parseInt(n.window.element.css("padding-bottom"),10)),e.css("left",parseInt(t.offset().left,10))),i.open()))},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(d).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"],tools:{},isCustomTool:function(e){return!(e in t.ui.Editor.defaultTools)},expandTools:function(n){var a,o,s,l,d=this._nativeTools,c=t.deepExtend({},t.ui.Editor.defaultTools),u={};for(o=0;o")}var r,s,l,d,c,u,p,f,h=this,m=h.tools,g=h._editor.element,v=h.element.empty(),_=h._editor.options.tools,k=t.support.browser;for(v.empty(),a(),f=0;f<_.length;f++)d=_[f].name||_[f],r=m[d]&&m[d].options,!r&&e.isPlainObject(d)&&(r=d),s=r&&r.template,"break"==d&&(i(),e("
    • ").appendTo(h.element),a()),s&&(u=h.toolGroupFor(d),c!=u&&(i(),a(),c=u),s=n(s),l=e(s).appendTo(p),"custom"==u&&(i(),a()),r.exec&&l.hasClass("k-tool")&&l.click(o(r.exec,g[0])));i(),e(h.element).children(":has(> .k-tool)").addClass("k-button-group"),h.options.popup&&k.msie&&k.version<9&&h.window.wrapper.find("*").attr("unselectable","on"),this.updateGroups()},updateGroups:function(){e(this.element).children().each(function(){e(this).children().filter(function(){return"none"!==this.style.display}).first().addClass("k-group-start").end().last().addClass("k-group-end").end()})},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()},_attachEvents:function(){var t=this,n="[role=button].k-tool",i=n+":not(.k-state-disabled)",a=n+".k-state-disabled";t.element.off(l).on("mouseenter"+l,i,function(){e(this).addClass("k-state-hover")}).on("mouseleave"+l,i,function(){e(this).removeClass("k-state-hover")}).on("mousedown"+l,n,function(e){e.preventDefault()}).on("keydown"+l,d,function(n){function i(e,n){var i=t.element.find(d),a=i.index(r)+e;return n&&(a=Math.max(0,Math.min(i.length-1,a))),i[a]}var a,r=this,o=n.keyCode;o==s.RIGHT||o==s.LEFT?e(r).hasClass(".k-dropdown")||(a=i(o==s.RIGHT?1:-1,!0)):o==s.ESC?a=t._editor:o!=s.TAB||n.ctrlKey||n.altKey||(n.shiftKey?a=i(-1):(a=i(1),a||(a=t._editor))),a&&(n.preventDefault(),a.focus())}).on("click"+l,i,function(n){var i=e(this);n.preventDefault(),n.stopPropagation(),i.removeClass("k-state-hover"),i.is("[data-popup]")||t._editor.exec(t._toolName(this))}).on("click"+l,a,function(e){e.preventDefault()})},_toolName:function(t){var n,i;if(t)return n=t.className,/k-tool\b/i.test(n)&&(n=t.firstChild.className),i=e.grep(n.split(" "),function(e){return!/^k-(widget|tool|tool-icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(e)}),i[0]?i[0].substring(i[0].lastIndexOf("-")+1):"custom"},_update:function(){var n=this,i=n._editor,a=i.getRange(),r=t.ui.editor.RangeUtils.textNodes(a);r.length||(r=[a.startContainer]),n.items().each(function(){var t=n.tools[n._toolName(this)];t&&t.update&&t.update(e(this),r)}),this._updateContext()},_updateContext:function(){this.element.children().children().each(function(){var t=e(this);t.css("display",t.hasClass("k-state-disabled")?"none":"")}),this.updateGroups()}});e.extend(i,{Toolbar:c})}(window.jQuery),function(e){var t=window.kendo,n=e.extend,i=e.proxy,a=t.ui.editor,r=a.Dom,o=a.EditorUtils,s=a.Command,l=".kendoEditor",d="k-state-active",c="k-state-selected",u=a.Tool,p=a.ToolTemplate,f=a.BlockFormatFinder,h=a.EditorUtils.registerTool,m=""+a.emptyElementContent+"",g=new f([{tags:["table"]}]),v=s.extend({_tableHtml:function(e,t){return e=e||1,t=t||1,""+Array(e+1).join(""+Array(t+1).join(m)+"")+"
      "},exec:function(){var t,n,i=this.options,a=this.editor,r=this._tableHtml(i.rows,i.columns);a.selectRange(i.range),a.clipboard.paste(r),t=a.getRange(),n=e("table[data-last]",a.document).removeAttr("data-last"),t.selectNodeContents(n.find("td")[0]),a.selectRange(t)}}),_=u.extend({initialize:function(t,n){u.fn.initialize.call(this,t,n);var a=e(this.options.popupTemplate).appendTo("body").kendoPopup({anchor:t,copyAnchorStyles:!1,open:i(this._open,this),activate:i(this._activate,this),close:i(this._close,this)}).data("kendoPopup");t.click(i(this._toggle,this)),this._editor=n.editor,this._popup=a},popup:function(){return this._popup},_activate:e.noop,_open:function(){this._popup.options.anchor.addClass(d)},_close:function(){this._popup.options.anchor.removeClass(d)},_toggle:function(t){var n=e(t.target).closest(".k-tool");n.hasClass("k-state-disabled")||this.popup().toggle()},update:function(e){this.popup().close(),e.removeClass("k-state-hover")},destroy:function(){this._popup.destroy()}}),k=_.extend({init:function(t){this.cols=8,this.rows=6,_.fn.init.call(this,e.extend(t,{command:v,popupTemplate:"
      "+Array(this.cols*this.rows+1).join("")+"
      Cancel
      "+"
      "}))},_activate:function(){function n(t){var n=e(window);return{row:Math.floor((t.clientY+n.scrollTop()-h.top)/r)+1,col:Math.floor((t.clientX+n.scrollLeft()-h.left)/a)+1}}function i(e){return e.row>0&&e.col>0&&e.row<=v&&e.col<=g}var a,r,o=this,s=o._popup.element,d=s.find(".k-status"),u=s.find(".k-ct-cell"),p=u.eq(0),f=u.eq(u.length-1),h=t.getOffset(p),m=t.getOffset(f),g=o.cols,v=o.rows;m.left+=f[0].offsetWidth,m.top+=f[0].offsetHeight,a=(m.left-h.left)/g,r=(m.top-h.top)/v,s.on("mousemove"+l,function(a){var r=n(a);i(r)?(d.text(t.format("Create a {0} x {1} table",r.row,r.col)),u.each(function(t){e(this).toggleClass(c,t%g'+t+""}function i(n,i){var a,r,o,s,l,d=i!==t;return n.selectionStart!==t?d?(n.focus(),n.setSelectionRange(i,i)):i=[n.selectionStart,n.selectionEnd]:document.selection&&(e(n).is(":visible")&&n.focus(),a=document.selection.createRange(),d?(a.move("character",i),a.select()):(s=n.createTextRange(),l=s.duplicate(),s.moveToBookmark(a.getBookmark()),l.setEndPoint("EndToStart",s),r=l.text.length,o=r+s.text.length,i=[r,o])),i}var a=window.kendo,r=a.keys,o=a.ui,s=o.Widget,l=a._activeElement,d=a._extractFormat,c=a.parseFloat,u=a.support.placeholder,p=a.getCulture,f=a._round,h="change",m="disabled",g="readonly",v="k-input",_="spin",k=".kendoNumericTextBox",b="touchend",y="mouseleave"+k,w="mouseenter"+k+" "+y,x="k-state-default",C="k-state-focused",T="k-state-hover",S="focus",D=".",F="k-state-selected",E="k-state-disabled",z="aria-disabled",H="aria-readonly",A=/^(-)?(\d*)$/,M=null,I=e.proxy,R=s.extend({init:function(e,n){var i,r,o,l,c,u=this,p=n&&n.step!==t;s.fn.init.call(u,e,n),n=u.options,e=u.element.on("blur"+k,I(u._focusout,u)).attr("role","spinbutton"),n.placeholder=n.placeholder||e.attr("placeholder"),u._reset(),u._wrapper(),u._arrows(),u._input(),a.support.mobileOS?u._text.on(b+k+" "+S+k,function(t){u._toggleText(!1),t.type===S&&e.focus()}):u._text.on(S+k,I(u._click,u)),i=u.min(e.attr("min")),r=u.max(e.attr("max")),o=u._parse(e.attr("step")),n.min===M&&i!==M&&(n.min=i),n.max===M&&r!==M&&(n.max=r),p||o===M||(n.step=o),e.attr("aria-valuemin",n.min).attr("aria-valuemax",n.max),n.format=d(n.format),l=n.value,u.value(l!==M?l:e.val()),c=e.is("[disabled]"),c?u.enable(!1):u.readonly(e.is("[readonly]")),a.notify(u)},options:{name:"NumericTextBox",decimals:M,min:M,max:M,value:M,step:1,culture:"",format:"n",spinners:!0,placeholder:"",upArrowText:"Increase value",downArrowText:"Decrease value"},events:[h,_],_editable:function(e){var t=this,n=t.element,i=e.disable,a=e.readonly,r=t._text.add(n),o=t._inputWrapper.off(w);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),n.off("keydown"+k).off("keypress"+k).off("paste"+k),a||i?(o.addClass(i?E:x).removeClass(i?x:E),r.attr(m,i).attr(g,a).attr(z,i).attr(H,a)):(o.addClass(x).removeClass(E).on(w,t._toggleHover),r.removeAttr(m).removeAttr(g).attr(z,!1).attr(H,!1),t._upArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(F)}),t._downArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(F)}),t.element.on("keydown"+k,I(t._keydown,t)).on("keypress"+k,I(t._keypress,t)).on("paste"+k,I(t._paste,t)))},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)})},destroy:function(){var e=this;e.element.add(e._text).add(e._upArrow).add(e._downArrow).add(e._inputWrapper).off(k),e._upArrowEventHandler.destroy(),e._downArrowEventHandler.destroy(),e._form&&e._form.off("reset",e._resetHandler),s.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,a=n.max;return e===M?e:(i!==M&&i>e?e=i:a!==M&&e>a&&(e=a),e)},_arrows:function(){var t,i=this,r=function(){clearTimeout(i._spinning),t.removeClass(F)},o=i.options,s=o.spinners,l=i.element;t=l.siblings(".k-icon"),t[0]||(t=e(n("n",o.upArrowText)+n("s",o.downArrowText)).insertAfter(l),t.wrapAll('')),s||(t.parent().toggle(s),i._inputWrapper.addClass("k-expand-padding")),i._upArrow=t.eq(0),i._upArrowEventHandler=new a.UserEvents(i._upArrow,{release:r}),i._downArrow=t.eq(1),i._downArrowEventHandler=new a.UserEvents(i._downArrow,{release:r})},_blur:function(){var e=this;e._toggleText(!0),e._change(e.element.val())},_click:function(e){var t=this;clearTimeout(t._focusing),t._focusing=setTimeout(function(){var n,a,r,o=e.target,s=i(o)[0],l=o.value.substring(0,s),d=t._format(t.options.format),c=d[","],u=0;c&&(a=RegExp("\\"+c,"g"),r=RegExp("([\\d\\"+c+"]+)(\\"+d[D]+")?(\\d+)?")),r&&(n=r.exec(l)),n&&(u=n[0].replace(a,"").length,-1!=l.indexOf("(")&&t._value<0&&u++),t._focusin(),i(t.element[0],u)})},_change:function(e){var t=this;t._update(e),e=t._value,t._old!=e&&(t._old=e,t.trigger(h),t.element.trigger(h))},_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(T),e._blur()},_format:function(e,t){var n=this._culture(t).numberFormat;return e=e.toLowerCase(),e.indexOf("c")>-1?n=n.currency:e.indexOf("p")>-1&&(n=n.percent),n},_input:function(){var t,n=this,i="k-formatted-value",a=n.element.addClass(v).show()[0],r=a.accessKey,o=n.wrapper;t=o.find(D+i),t[0]||(t=e('').insertBefore(a).addClass(i));try{a.setAttribute("type","text")}catch(s){a.type="text"}t[0].tabIndex=a.tabIndex,t[0].style.cssText=a.style.cssText,t.prop("placeholder",n.options.placeholder),r&&(t.attr("accesskey",r),a.accessKey=""),n._text=t.addClass(a.className)},_keydown:function(e){var t=this,n=e.keyCode;n==r.DOWN?t._step(-1):n==r.UP?t._step(1):n==r.ENTER&&t._change(t.element.val())},_keypress:function(e){var t,n,a,o,s,l,d;0!==e.which&&e.keyCode!==r.BACKSPACE&&(t=this.element,n=String.fromCharCode(e.which),a=i(t[0]),o=a[0],s=a[1],l=this.options.min,d=t.val(),d=d.substring(0,o)+n+d.substring(s),(null!==l&&l>=0&&"-"===d.charAt(0)||!this._numericRegex().test(d))&&e.preventDefault())},_numericRegex:function(){var e=this,t=e.options,n=e._format(t.format),i=n[D],a=t.decimals;return i===D&&(i="\\"+i),a===M&&(a=n.decimals),0===a?A:(e._separator!==i&&(e._separator=i,e._floatRegExp=RegExp("^(-)?(((\\d+("+i+"\\d*)?)|("+i+"\\d*)))?$")),e._floatRegExp)},_paste:function(e){var t=this,n=e.target,i=n.value;setTimeout(function(){t._parse(n.value)===M&&t._update(i)})},_option:function(e,n){var i=this,a=i.options;return n===t?a[e]:(n=i._parse(n),(n||"step"!==e)&&(a[e]=n,i.element.attr("aria-value"+e,n).attr(e,n)),t)},_spin:function(e,t){var n=this;t=t||500,clearTimeout(n._spinning),n._spinning=setTimeout(function(){n._spin(e,50)},t),n._step(e)},_step:function(e){var t=this,n=t.element,i=t._parse(n.val())||0;l()!=n[0]&&t._focusin(),i+=t.options.step*e,t._update(t._adjust(i)),t.trigger(_)},_toggleHover:function(t){e(t.currentTarget).toggleClass(T,"mouseenter"===t.type)},_toggleText:function(e){var t=this;t._text.toggle(e),t.element.toggle(!e)},_parse:function(e,t){return c(e,this._culture(t),this.options.format)},_update:function(e){var t,n=this,i=n.options,r=i.format,o=i.decimals,s=n._culture(),l=n._format(r,s);o===M&&(o=l.decimals),e=n._parse(e,s),t=e!==M,t&&(e=parseFloat(f(e,o))),n._value=e=n._adjust(e),n._placeholder(a.toString(e,r,s)),t?(e=""+e,-1!==e.indexOf("e")&&(e=f(+e,o)),e=e.replace(D,l[D])):e="",n.element.val(e).attr("aria-valuenow",e)},_placeholder:function(e){this._text.val(e),u||e||this._text.val(this.options.placeholder)},_wrapper:function(){var t,n=this,i=n.element,a=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=a.style.cssText,a.style.width="",n.wrapper=t.addClass("k-widget k-numerictextbox").addClass(a.className).css("display",""),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),a=i?e("#"+i):n.closest("form");a[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value)})},t._form=a.on("reset",t._resetHandler))}});o.plugin(R)}(window.kendo.jQuery),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"]},a=/left|right/.test(e);return a?(i.origin=["top",e],i.position[1]=l.directions[e].reverse):(i.origin[0]=e,i.position[0]=l.directions[e].reverse),i.origin=i.origin.join(" "),i.position=i.position.join(" "),i}function a(t,n){try{return e.contains(t,n)}catch(i){return!1}}function r(t){t=e(t),t.addClass("k-item").children(w).addClass(z),t.children("a").addClass(T).children(w).addClass(z),t.filter(":not([disabled])").addClass(W),t.filter(".k-separator:empty").append(" "),t.filter("li[disabled]").addClass(j).removeAttr("disabled").attr("aria-disabled",!0),t.filter("[role]").length||t.attr("role","menuitem"),t.children("."+T).length||t.contents().filter(function(){return!(this.nodeName.match(b)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll(""),o(t),s(t)}function o(t){t=e(t),t.find("> .k-link > [class*=k-i-arrow]").remove(),t.filter(":has(.k-group)").children(".k-link:not(:has([class*=k-i-arrow]))").each(function(){var t=e(this),n=t.parent().parent();t.append("")})}function s(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(E),t.filter(".k-last:not(:last-child)").removeClass(S),t.filter(":first-child").addClass(E),t.filter(":last-child").addClass(S)}var l=window.kendo,d=l.ui,c=l._activeElement,u=l.support.touch&&l.support.mobileOS,p="mousedown",f="click",h=e.extend,m=e.proxy,g=e.each,v=l.template,_=l.keys,k=d.Widget,b=/^(ul|a|div)$/i,y=".kendoMenu",w="img",x="open",C="k-menu",T="k-link",S="k-last",D="close",F="timer",E="k-first",z="k-image",H="select",A="zIndex",M="activate",I="deactivate",R="touchstart"+y+" MSPointerDown"+y+" pointerdown"+y,N=l.support.pointers,O=l.support.msPointers,P=N?"pointerover":O?"MSPointerOver":"mouseenter",B=N?"pointerout":O?"MSPointerOut":"mouseleave",L=u||O||N,V="kendoPopup",W="k-state-default",U="k-state-hover",q="k-state-focused",j="k-state-disabled",G=".k-group",Y=":not(.k-list) > .k-item",$=".k-item.k-state-disabled",K=".k-item:not(.k-state-disabled)",Q=".k-item:not(.k-state-disabled) > .k-link",J=":not(.k-item.k-separator)",X=J+":eq(0)",Z=J+":last",et="div:not(.k-animation-container,.k-list-container)",tt={content:v("
      #= content(item) #
      "),group:v(""),itemWrapper:v("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= arrow(data) #"),item:v("
    • "),image:v(""),arrow:v(""),sprite:v(""),empty:v("")},nt={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),n},textClass:function(){return T},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},arrowClass:function(e,t){var n="k-icon";return n+=t.horizontal?" k-i-arrow-s":" k-i-arrow-e"},text:function(e){return e.encoded===!1?e.text:l.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},groupCssClass:function(){return"k-group"},content:function(e){return e.content?e.content:" "}},it=k.extend({init:function(t,n){var i=this;k.fn.init.call(i,t,n),t=i.wrapper=i.element,n=i.options,i._initData(n),i._updateClasses(),i._animations(n),i.nextItemZIndex=100,i._tabindex(),i._focusProxy=m(i._focusHandler,i),t.on(R,i._focusProxy).on(f+y,$,!1).on(f+y,K,m(i._click,i)).on("keydown"+y,m(i._keydown,i)).on("focus"+y,m(i._focus,i)).on("focus"+y,".k-content",m(i._focus,i)).on(R+" "+p+y,".k-content",m(i._preventClose,i)).on("blur"+y,m(i._removeHoverItem,i)).on("blur"+y,"[tabindex]",m(i._checkActiveElement,i)).on(P+y,K,m(i._mouseenter,i)).on(B+y,K,m(i._mouseleave,i)).on(P+y+" "+B+y+" "+p+y+" "+f+y,Q,m(i._toggleHover,i)),n.openOnClick&&(i.clicked=!1,i._documentClickHandler=m(i._documentClick,i),e(document).click(i._documentClickHandler)),t.attr("role","menubar"),t[0].id&&(i._ariaId=l.format("{0}_mn_active",t[0].id)),l.notify(i)},events:[x,D,M,I,H],options:{name:"Menu",animation:{open:{duration:200},close:{duration:100}},orientation:"horizontal",direction:"default",openOnClick:!1,closeOnClick:!0,hoverDelay:100},_initData:function(e){var t=this;e.dataSource&&(t.element.empty(),t.append(e.dataSource,t.element))},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=h(!0,t,e.animation),"dataSource"in e&&this._initData(e),k.fn.setOptions.call(this,e)},destroy:function(){var t=this;k.fn.destroy.call(t),t.element.off(y),t._documentClickHandler&&e(document).unbind("click",t._documentClickHandler)},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},append:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.length?t.find("> .k-group, > .k-animation-container > .k-group"):null);return g(n.items,function(){n.group.append(this),o(this)}),o(t),s(n.group.find(".k-first, .k-last").add(n.items)),this},insertBefore:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return g(n.items,function(){t.before(this),o(this),s(this)}),s(t),this},insertAfter:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return g(n.items,function(){t.after(this),o(this),s(this)}),s(t),this},_insert:function(t,n,i){var a,o,s,l,d=this;return n&&n.length||(i=d.element),s=e.isPlainObject(t),l={firstLevel:i.hasClass(C),horizontal:i.hasClass(C+"-horizontal"),expanded:!0,length:i.children().length},n&&!i.length&&(i=e(it.renderGroup({group:l})).appendTo(n)),s||e.isArray(t)?a=e(e.map(s?[t]:t,function(t,n){return"string"==typeof t?e(t).get():e(it.renderItem({group:l,item:h(t,{index:n})})).get()})):(a=e(t),o=a.find("> ul").addClass("k-group").attr("role","menu"),a=a.filter("li"),a.add(o.find("> li")).each(function(){r(this)})),{items:a,group:i}},remove:function(e){var t,n,i,a;return e=this.element.find(e),t=this,n=e.parentsUntil(t.element,Y),i=e.parent("ul"),e.remove(),i&&!i.children(Y).length&&(a=i.parent(".k-animation-container"),a.length?a.remove():i.remove()),n.length&&(n=n.eq(0),o(n),s(n)),t},open:function(a){var r=this,o=r.options,s="horizontal"==o.orientation,d=o.direction,c=l.support.isRtl(r.wrapper);return a=r.element.find(a),/^(top|bottom|default)$/.test(d)&&(d=c?s?(d+" left").replace("default","bottom"):"left":s?(d+" right").replace("default","bottom"):"right"),a.siblings().find(">.k-popup:visible,>.k-animation-container>.k-popup:visible").each(function(){var t=e(this).data("kendoPopup");t&&t.close()}),a.each(function(){var a=e(this);clearTimeout(a.data(F)),a.data(F,setTimeout(function(){var l,u,p,f,m,g,v=a.find(".k-group:first:hidden");v[0]&&r.trigger(x,{item:a[0]})===!1&&(!v.find(".k-group")[0]&&v.children(".k-item").length>1?v.css({maxHeight:e(window).height(),overflow:"auto"}):v.css({maxHeight:"",overflow:""}),a.data(A,a.css(A)),a.css(A,r.nextItemZIndex++),l=v.data(V),u=a.parent().hasClass(C),p=u&&s,f=i(d,u,c),m=o.animation.open.effects,g=m!==t?m:"slideIn:"+n(d,u),l?(l=v.data(V),l.options.origin=f.origin,l.options.position=f.position,l.options.animation.open.effects=g):l=v.kendoPopup({activate:function(){r.trigger(M,{item:this.wrapper.parent()})},deactivate:function(){r.trigger(I,{item:this.wrapper.parent()})},origin:f.origin,position:f.position,collision:o.popupCollision!==t?o.popupCollision:p?"fit":"fit flip",anchor:a,appendTo:a,animation:{open:h(!0,{effects:g},o.animation.open),close:o.animation.close},close:function(e){var t=e.sender.wrapper.parent();r.trigger(D,{item:t[0]})?e.preventDefault():(t.css(A,t.data(A)),t.removeData(A),L&&(t.removeClass(U),r._removeHoverItem()))}}).data(V),v.removeAttr("aria-hidden"),l.open())},r.options.hoverDelay))}),r},close:function(t){var n=this,i=n.element;return t=i.find(t),t.length||(t=i.find(">.k-item")),t.each(function(){var t=e(this);clearTimeout(t.data(F)),t.data(F,setTimeout(function(){var e=t.find(".k-group:not(.k-list-container):not(.k-calendar-container):first:visible").data(V);e&&(e.close(),e.element.attr("aria-hidden",!0))},n.options.hoverDelay))}),n},_toggleDisabled:function(t,n){this.element.find(t).each(function(){e(this).toggleClass(W,n).toggleClass(j,!n).attr("aria-disabled",!n)})},_toggleHover:function(t){var n=e(l.eventTarget(t)||t.target).closest(Y),i=t.type==P||-1!==p.indexOf(t.type);n.parents("li."+j).length||n.toggleClass(U,i||"mousedown"==t.type||"click"==t.type),this._removeHoverItem()},_preventClose:function(){this.options.closeOnClick||(this._closurePrevented=!0)},_checkActiveElement:function(t){var n=this,i=e(t?t.currentTarget:this._hoverItem()),r=n._findRootParent(i)[0];this._closurePrevented||setTimeout(function(){(!document.hasFocus()||!a(r,l._activeElement())&&t&&!a(r,t.currentTarget))&&n.close(r)},0),this._closurePrevented=!1},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(q)&&(e.removeClass(q),this._oldHoverItem=null)},_updateClasses:function(){var e,t=this.element;t.addClass("k-widget k-reset k-header "+C).addClass(C+"-"+this.options.orientation),t.find("li > ul").addClass("k-group").attr("role","menu").attr("aria-hidden",t.is(":visible")).end().find("li > div").addClass("k-content").attr("tabindex","-1"),e=t.find("> li,.k-group > li"),e.each(function(){r(this)})},_mouseenter:function(t){var n=this,i=e(t.currentTarget),r=i.children(".k-animation-container").length||i.children(G).length;t.delegateTarget==i.parents(".k-menu")[0]&&(n.options.openOnClick&&!n.clicked||u||!a(t.currentTarget,t.relatedTarget)&&r&&n.open(i),(n.options.openOnClick&&n.clicked||L)&&i.siblings().each(m(function(e,t){n.close(t)},n)))},_mouseleave:function(n){var i=this,r=e(n.currentTarget),o=r.children(".k-animation-container").length||r.children(G).length;return r.parentsUntil(".k-animation-container",".k-list-container,.k-calendar-container")[0]?(n.stopImmediatePropagation(),t):(i.options.openOnClick||u||(N||O)&&n.originalEvent.pointerType==n.originalEvent.MSPOINTER_TYPE_TOUCH||a(n.currentTarget,n.relatedTarget||n.target)||!o||i.close(r),t)},_click:function(n){var i,a,r,o=this,s=o.options,d=e(l.eventTarget(n)),c=d[0]?d[0].nodeName.toUpperCase():"",u="INPUT"==c||"SELECT"==c||"BUTTON"==c||"LABEL"==c,p=d.closest("."+T),f=d.closest(Y),h=p.attr("href"),m=!!h&&h!==e("").attr("href");if(!f.children(et)[0]){if(f.hasClass(j))return n.preventDefault(),t;if(n.handled||!o.trigger(H,{item:f[0]})||u||n.preventDefault(),n.handled=!0,a=f.children(G+",.k-animation-container"),r=a.is(":visible"),s.closeOnClick&&!m&&(!a.length||s.openOnClick&&r))return f.removeClass(U).css("height"),o._oldHoverItem=o._findRootParent(f),o.close(p.parentsUntil(o.element,Y)),o.clicked=!1,-1!="MSPointerUp".indexOf(n.type)&&n.preventDefault(),t;m&&n.enterKey&&p[0].click(),(f.parent().hasClass(C)&&s.openOnClick||l.support.touch)&&(m||u||n.preventDefault(),o.clicked=!0,i=a.is(":visible")?D:x,(s.closeOnClick||i!=D)&&o[i](f))}},_documentClick:function(e){a(this.element[0],e.target)||(this.clicked=!1)},_focus:function(n){var i=this,a=n.target,r=i._hoverItem(),o=c();return a==i.wrapper[0]||e(a).is(":kendoFocusable")?(o===n.currentTarget&&(r.length?i._moveHover([],r):i._oldHoverItem||i._moveHover([],i.wrapper.children().first())),t):(n.stopPropagation(),e(a).closest(".k-content").closest(".k-group").closest(".k-item").addClass(q),i.wrapper.focus(),t)},_keydown:function(e){var n,i,a,r=this,o=e.keyCode,s=r._oldHoverItem,d=l.support.isRtl(r.wrapper);if(e.target==e.currentTarget||o==_.ESC){if(s||(s=r._oldHoverItem=r._hoverItem()),i=r._itemBelongsToVertival(s),a=r._itemHasChildren(s),o==_.RIGHT)n=r[d?"_itemLeft":"_itemRight"](s,i,a);else if(o==_.LEFT)n=r[d?"_itemRight":"_itemLeft"](s,i,a);else if(o==_.DOWN)n=r._itemDown(s,i,a);else if(o==_.UP)n=r._itemUp(s,i,a);else if(o==_.ESC)n=r._itemEsc(s,i);else if(o==_.ENTER||o==_.SPACEBAR)n=s.children(".k-link"),n.length>0&&(r._click({target:n[0],preventDefault:function(){},enterKey:!0}),r._moveHover(s,r._findRootParent(s)));else if(o==_.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-group")||t:t},_itemHasChildren:function(e){return e.length?e.children("ul.k-group, div.k-animation-container").length>0:!1},_moveHover:function(e,t){var n=this,i=n._ariaId;e.length&&t.length&&(e.removeClass(q),e[0].id===i&&e.removeAttr("id")),t.length&&(t[0].id&&(i=t[0].id),t.addClass(q),n._oldHoverItem=t,i&&(n.element.removeAttr("aria-activedescendant"),t.attr("id",i),n.element.attr("aria-activedescendant",i)))},_findRootParent:function(e){return e.parent().hasClass("k-menu")?e:e.parentsUntil(".k-menu","li.k-item").last()},_isRootItem:function(e){return e.parent().hasClass("k-menu")},_itemRight:function(e,t,n){var i,a,r=this;if(!e.hasClass(j))return t?n?(r.open(e),i=e.find(".k-group").children().first()):"horizontal"==r.options.orientation&&(a=r._findRootParent(e),r.close(a),i=a.nextAll(X)):(i=e.nextAll(X),i.length||(i=e.prevAll(Z))),i&&!i.length?i=r.wrapper.children(".k-item").first():i||(i=[]),r._moveHover(e,i),i},_itemLeft:function(e,t){var n,i=this;return t?(n=e.parent().closest(".k-item"),i.close(n),i._isRootItem(n)&&"horizontal"==i.options.orientation&&(n=n.prevAll(X))):(n=e.prevAll(X),n.length||(n=e.nextAll(Z))),n.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_itemDown:function(e,t,n){var i,a=this;if(t)i=e.nextAll(X);else{if(!n||e.hasClass(j))return;a.open(e),i=e.find(".k-group").children().first()}return!i.length&&e.length?i=e.parent().children().first():e.length||(i=a.wrapper.children(".k-item").first()),a._moveHover(e,i),i},_itemUp:function(e,t){var n,i=this;if(t)return n=e.prevAll(X),!n.length&&e.length?n=e.parent().children().last():e.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_itemEsc:function(e,t){var n,i=this;return t?(n=e.parent().closest(".k-item"),i.close(n),i._moveHover(e,n),n):e},_focusHandler:function(t){var n=this,i=e(l.eventTarget(t)).closest(Y);setTimeout(function(){n._moveHover([],i),i.children(".k-content")[0]&&i.parent().closest(".k-item").removeClass(q)},200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})}});h(it,{renderItem:function(e){e=h({menu:{},group:{}},e);var t=tt.empty,n=e.item;return tt.item(h(e,{image:n.imageUrl?tt.image:t,sprite:n.spriteCssClass?tt.sprite:t,itemWrapper:tt.itemWrapper,renderContent:it.renderContent,arrow:n.items||n.content?tt.arrow:t,subGroup:it.renderGroup},nt))},renderGroup:function(e){return tt.group(h({renderItems:function(e){for(var t="",n=0,i=e.items,a=i?i.length:0,r=h({length:a},e.group);a>n;n++)t+=it.renderItem(h(e,{group:r,item:h({index:n},i[n])}));return t}},e,nt))},renderContent:function(e){return tt.content(h(e,nt))}}),l.ui.plugin(it)}(window.kendo.jQuery),function(e,t){function n(t){return t=null!=t?t:"",t.type||e.type(t)||"string"}function i(t){t.find(":input:not(:button, ["+s.attr("role")+"=upload], ["+s.attr("skip")+"], [type=file]), select").each(function(){var t=s.attr("bind"),n=this.getAttribute(t)||"",i="checkbox"===this.type||"radio"===this.type?"checked:":"value:",a=this.name;-1===n.indexOf(i)&&a&&(n+=(n.length?",":"")+i+a,e(this).attr(t,n))})}function a(e){var t,i,a=(e.model.fields||e.model)[e.field],r=n(a),o=a?a.validation:{},l=s.attr("type"),d=s.attr("bind"),c={name:e.field};for(t in o)i=o[t],h(t,_)>=0?c[l]=t:p(i)||(c[t]=f(i)?i.value||t:i),c[s.attr(t+"-msg")]=i.message;return h(r,_)>=0&&(c[l]=r),c[d]=("boolean"===r?"checked:":"value:")+e.field,c}function r(e){var t,n,i,a,r,o;if(e&&e.length)for(o=[],t=0,n=e.length;n>t;t++)i=e[t],r=i.text||i.value||i,a=null==i.value?i.text||i:i.value,o[t]={text:r,value:a};return o}function o(e,t){var n,i,a=e?e.validation||{}:{};for(n in a)i=a[n],f(i)&&i.value&&(i=i.value),p(i)&&(t[n]=i)}var s=window.kendo,l=s.ui,d=l.Widget,c=e.extend,u=s.support.browser.msie&&s.support.browser.version<9,p=s.isFunction,f=e.isPlainObject,h=e.inArray,m=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,g='
      #=message#
      ',v="change",_=["url","email","number","date","boolean"],k={number:function(t,n){var i=a(n);e('').attr(i).appendTo(t).kendoNumericTextBox({format:n.format}),e("').hide().appendTo(t)},date:function(t,n){var i=a(n),r=n.format;r&&(r=s._extractFormat(r)),i[s.attr("format")]=r,e('').attr(i).appendTo(t).kendoDatePicker({format:n.format}),e("').hide().appendTo(t)},string:function(t,n){var i=a(n);e('').attr(i).appendTo(t)},"boolean":function(t,n){var i=a(n);e('').attr(i).appendTo(t)},values:function(t,n){var i=a(n);e("#=messages.isTrue#
      ',v='
      #=messages.info#
      #if(values){##}else{##}##if(extra){##if(values){##}else{##}##}#
      ',_='
      #=field#
      • #=messages.info#
        • #if(extra){#
        • #}#
      ',k='
      #=field#
      • #=messages.info#
      ',b=m.extend({init:function(t,n){var i,r,s,l,c=this,u="string";m.fn.init.call(c,t,n),i=c.operators=n.operators||{},t=c.element,n=c.options,n.appendToElement||(s=t.addClass("k-filterable").find(".k-grid-filter"),s[0]||(s=t.prepend('
      ').find(".k-grid-filter")),s.attr("tabindex",-1).on("click"+d,o(c._click,c))),c.link=s||e(),c.dataSource=n.dataSource,c.field=n.field||t.attr(a.attr("field")),c.model=c.dataSource.reader.model,c._parse=function(e){return e+""},c.model&&c.model.fields&&(l=c.model.fields[c.field],l&&(u=l.type||"string",l.parse&&(c._parse=o(l.parse,l)))),n.values&&(u="enums"),c.type=u,i=i[u]||n.operators[u];for(r in i)break;c._defaultFilter=function(){return{field:c.field,operator:r||"eq",value:""}},c._refreshHandler=o(c.refresh,c),c.dataSource.bind("change",c._refreshHandler),n.appendToElement?c._init():c.refresh()},_init:function(){var t,n=this,i=n.options.ui,r=h(i);n.pane=n.element.closest(a.roleSelector("pane")).data("kendoMobilePane"),n.pane&&(n._isMobile=!0),r||(t=i||p[n.type]),n._isMobile?n._createMobileForm(t):n._createForm(t),n.form.on("submit"+d,o(n._submit,n)).on("reset"+d,o(n._reset,n)),r&&n.form.find(".k-textbox").removeClass("k-textbox").each(function(){i(e(this))}),n.form.find("["+a.attr("role")+"=numerictextbox]").removeClass("k-textbox").end().find("["+a.attr("role")+"=datetimepicker]").removeClass("k-textbox").end().find("["+a.attr("role")+"=timepicker]").removeClass("k-textbox").end().find("["+a.attr("role")+"=datepicker]").removeClass("k-textbox"),n.refresh(),n.trigger(l,{field:n.field,container:n.form})},_createForm:function(t){var i=this,r=i.options,l=i.operators||{},c=i.type;l=l[c]||r.operators[c],i.form=e('
      ').html(a.template("boolean"===c?g:v)({field:i.field,format:r.format,ns:a.ns,messages:r.messages,extra:r.extra,operators:l,type:c,role:t,values:n(r.values)})),r.appendToElement?(i.element.append(i.form),i.popup=i.element.closest(".k-popup").data(s)):i.popup=i.form[s]({anchor:i.link,open:o(i._open,i),activate:o(i._activate,i),close:i.options.closeCallback}).data(s),i.form.on("keydown"+d,o(i._keydown,i))},_createMobileForm:function(t){var i=this,r=i.options,o=i.operators||{},s=i.type;o=o[s]||r.operators[s],i.form=e("
      ").html(a.template("boolean"===s?k:_)({field:i.field,format:r.format,ns:a.ns,messages:r.messages,extra:r.extra,operators:o,type:s,role:t,useRole:!a.support.input.date&&"date"===s||"number"===s,inputType:f[s],values:n(r.values)})),i.view=i.pane.append(i.form.html()),i.form=i.view.element.find("form"),i.view.element.on("click",".k-submit",function(e){i.form.submit(),e.preventDefault()}).on("click",".k-cancel",function(e){i._closeForm(),e.preventDefault()})},refresh:function(){var e=this,t=e.dataSource.filter()||{filters:[],logic:"and"};e.filterModel=a.observable({logic:"and",filters:[e._defaultFilter(),e._defaultFilter()]}),e.form&&a.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;m.fn.destroy.call(e),e.form&&(a.unbind(e.form),a.destroy(e.form),e.form.unbind(d),e.popup&&e.popup.destroy()),e.view&&e.view.purge(),e.link.unbind(d),e._refreshHandler&&e.dataSource.unbind("change",e._refreshHandler)},_bind:function(e){var t,n,i,a,r=this,o=e.filters,s=!1,l=0,d=r.filterModel;for(t=0,n=o.length;n>t;t++)a=o[t],a.field==r.field?(d.set("logic",e.logic),i=d.filters[l],i||(d.filters.push({field:r.field}),i=d.filters[l]),i.set("value",r._parse(a.value)),i.set("operator",a.operator),l++,s=!0):a.filters&&(s=s||r._bind(a));return s},_merge:function(n){var i,a,r,o=this,s=n.logic||"and",l=n.filters,d=o.dataSource.filter()||{filters:[],logic:"and"};for(t(d,o.field),l=e.grep(l,function(e){return""!==e.value&&null!=e.value}),a=0,r=l.length;r>a;a++)i=l[a],i.value=o._parse(i.value);return l.length&&(d.filters.length?(n.filters=l,"and"!==d.logic&&(d.filters=[{logic:d.logic,filters:d.filters}],d.logic="and"),l.length>1?d.filters.push(n):d.filters.push(l[0])):(d.filters=l,d.logic=s)),d},filter:function(e){e=this._merge(e),e.filters.length&&this.dataSource.filter(e)},clear:function(){var t=this,n=t.dataSource.filter()||{filters:[]};n.filters=e.grep(n.filters,function(e){return e.filters?(e.filters=i(e.filters,t.field),e.filters.length):e.field!=t.field}),n.filters.length||(n=null),t.dataSource.filter(n)},_submit:function(e){e.preventDefault(),this.filter(this.filterModel.toJSON()),this._closeForm()},_reset:function(){this.clear(),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(s),t&&t.close()})},_activate:function(){this.form.find(":kendoFocusable:first").focus()},_keydown:function(e){e.keyCode==a.keys.ESC&&this.popup.close()},events:[l],options:{name:"FilterMenu",extra:!0,appendToElement:!1,type:"string",operators:{string:{eq:c,neq:u,startswith:"Starts with",contains:"Contains",doesnotcontain:"Does not contain",endswith:"Ends with"},number:{eq:c,neq:u,gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than"},date:{eq:c,neq:u,gte:"Is after or equal to",gt:"Is after",lte:"Is before or equal to",lt:"Is before"},enums:{eq:c,neq:u}},messages:{info:"Show items with value that:",isTrue:"is true",isFalse:"is false",filter:"Filter",clear:"Clear",and:"And",or:"Or",selectValue:"-Select value-",operator:"Operator",value:"Value",cancel:"Cancel"},animations:{left:"slide",right:"slide:right"}}});r.plugin(b)}(window.kendo.jQuery),function(e,t){function n(t){t=e(t),t.children(v).children(".k-icon").remove(),t.filter(":has(.k-panel),:has(.k-content)").children(".k-link:not(:has([class*=k-i-arrow]))").each(function(){var t=e(this),n=t.parent();t.append("")})}function i(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(x),t.filter(".k-last:not(:last-child)").removeClass(m),t.filter(":first-child").addClass(x),t.filter(":last-child").addClass(m)}var a=window.kendo,r=a.ui,o=a.keys,s=e.extend,l=e.each,d=a.template,c=r.Widget,u=/^(ul|a|div)$/i,p=".kendoPanelBar",f="img",h="href",m="k-last",g="k-link",v="."+g,_="error",k=".k-item",b=".k-group",y=b+":visible",w="k-image",x="k-first",C="expand",T="select",S="k-content",D="activate",F="collapse",E="mouseenter",z="mouseleave",H="contentLoad",A="k-state-active",M="> .k-panel",I="> .k-content",R="k-state-focused",N="k-state-disabled",O="k-state-selected",P="."+O,B="k-state-highlight",L=k+":not(.k-state-disabled)",V=L+" > .k-link",W=k+".k-state-disabled > .k-link",U="> li > "+P+", .k-panel > li > "+P,q="k-state-default",j="aria-disabled",G="aria-expanded",Y="aria-hidden",$="aria-selected",K=":visible",Q=":empty",J="single",X={content:d("
      #= content(item) #
      "),group:d(""),itemWrapper:d("<#= tag(item) # class='#= textClass(item, group) #' #= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= arrow(data) #"),item:d("
    • #= itemWrapper(data) ## if (item.items) { ##= subGroup({ items: item.items, panelBar: panelBar, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #
    • "),image:d(""),arrow:d(""),sprite:d(""),empty:d("")},Z={aria:function(e){var t="";return(e.items||e.content||e.contentUrl)&&(t+=G+"='"+(e.expanded?"true":"false")+"' "),e.enabled===!1&&(t+=j+"='true'"),t},wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" "+N:t.expanded===!0?" "+A:" k-state-default",0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),t.cssClass&&(n+=" "+t.cssClass),n},textClass:function(e,t){var n=g;return t.firstLevel&&(n+=" k-header"),n},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},arrowClass:function(e){var t="k-icon";return t+=e.expanded?" k-i-arrow-n k-panelbar-collapse":" k-i-arrow-s k-panelbar-expand"},text:function(e){return e.encoded===!1?e.text:a.htmlEncode(e.text)},tag:function(e){return e.url||e.contentUrl?"a":"span"},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},groupCssClass:function(){return"k-group k-panel"},contentAttributes:function(e){return e.item.expanded!==!0?" style='display:none'":""},content:function(e){return e.content?e.content:e.contentUrl?"":" "},contentUrl:function(e){return e.contentUrl?'href="'+e.contentUrl+'"':""}},et=c.extend({init:function(t,n){var i,r=this;c.fn.init.call(r,t,n),t=r.wrapper=r.element.addClass("k-widget k-reset k-header k-panelbar"),n=r.options,t[0].id&&(r._itemId=t[0].id+"_pb_active"),r._tabindex(),r._initData(n),r._updateClasses(),r._animations(n),t.on("click"+p,V,function(t){r._click(e(t.currentTarget))&&t.preventDefault() }).on(E+p+" "+z+p,V,r._toggleHover).on("click"+p,W,!1).on("keydown"+p,e.proxy(r._keydown,r)).on("focus"+p,function(){var e=r.select();r._current(e[0]?e:r._first())}).on("blur"+p,function(){r._current(null)}).attr("role","menu"),i=t.find("li."+A+" > ."+S),i[0]&&r.expand(i.parent(),!1),a.notify(r)},events:[C,F,T,D,_,H],options:{name:"PanelBar",animation:{expand:{effects:"expand:vertical",duration:200},collapse:{duration:200}},expandMode:"multiple"},destroy:function(){c.fn.destroy.call(this),this.element.off(p),a.destroy(this.element)},_initData:function(e){var t=this;e.dataSource&&(t.element.empty(),t.append(e.dataSource,t.element))},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=s(!0,t,e.animation),"dataSource"in e&&this._initData(e),c.fn.setOptions.call(this,e)},expand:function(t,n){var i=this,a={};return n=n!==!1,t=this.element.find(t),t.each(function(r,o){o=e(o);var s=o.find(M).add(o.find(I));if(!o.hasClass(N)&&s.length>0){if(i.options.expandMode==J&&i._collapseAllExpanded(o))return i;t.find("."+B).removeClass(B),o.addClass(B),n||(a=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(C,o)||i._toggleItem(o,!1),n||(i.options.animation=a)}}),i},collapse:function(t,n){var i=this,a={};return n=n!==!1,t=i.element.find(t),t.each(function(t,r){r=e(r);var o=r.find(M).add(r.find(I));!r.hasClass(N)&&o.is(K)&&(r.removeClass(B),n||(a=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(F,r)||i._toggleItem(r,!0),n||(i.options.animation=a))}),i},_toggleDisabled:function(e,t){e=this.element.find(e),e.toggleClass(q,t).toggleClass(N,!t).attr(j,!t)},select:function(n){var i=this;return n===t?i.element.find(U).parent():(i.element.find(n).each(function(){var n=e(this),a=n.children(v);return n.hasClass(N)?i:(i._updateSelected(a),t)}),i)},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},append:function(e,t){t=this.element.find(t);var a=this._insert(e,t,t.length?t.find(M):null);return l(a.items,function(){a.group.append(this),i(this)}),n(t),i(a.group.find(".k-first, .k-last")),a.group.height("auto"),this},insertBefore:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return l(n.items,function(){t.before(this),i(this)}),i(t),n.group.height("auto"),this},insertAfter:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return l(n.items,function(){t.after(this),i(this)}),i(t),n.group.height("auto"),this},remove:function(e){e=this.element.find(e);var t=this,a=e.parentsUntil(t.element,k),r=e.parent("ul");return e.remove(),!r||r.hasClass("k-panelbar")||r.children(k).length||r.remove(),a.length&&(a=a.eq(0),n(a),i(a)),t},reload:function(t){var n=this;t=n.element.find(t),t.each(function(){var t=e(this);n._ajaxRequest(t,t.children("."+S),!t.is(K))})},_first:function(){return this.element.children(L).first()},_last:function(){var e=this.element.children(L).last(),t=e.children(y);return t[0]?t.children(L).last():e},_current:function(e){var n=this,i=n._focused,a=n._itemId;return e===t?i:(n.element.removeAttr("aria-activedescendant"),i&&(i[0].id===a&&i.removeAttr("id"),i.children(v).removeClass(R)),e&&(a=e[0].id||a,e.attr("id",a).children(v).addClass(R),n.element.attr("aria-activedescendant",a)),n._focused=e,t)},_keydown:function(e){var t=this,n=e.keyCode,i=t._current();e.target==e.currentTarget&&(n==o.DOWN||n==o.RIGHT?(t._current(t._nextItem(i)),e.preventDefault()):n==o.UP||n==o.LEFT?(t._current(t._prevItem(i)),e.preventDefault()):n==o.ENTER||n==o.SPACEBAR?(t._click(i.children(v)),e.preventDefault()):n==o.HOME?(t._current(t._first()),e.preventDefault()):n==o.END&&(t._current(t._last()),e.preventDefault()))},_nextItem:function(e){if(!e)return this._first();var t=e.children(y),n=e.next();return t[0]&&(n=t.children("."+x)),n[0]||(n=e.parent(y).parent(k).next()),n[0]&&n.is(":visible")||(n=this._first()),n.hasClass(N)&&(n=this._nextItem(n)),n},_prevItem:function(e){if(!e)return this._last();var t,n=e.prev();if(n[0])for(t=n;t[0];)t=t.children(y).children("."+m),t[0]&&(n=t);else n=e.parent(y).parent(k),n[0]||(n=this._last());return n.hasClass(N)&&(n=this._prevItem(n)),n},_insert:function(t,n,i){var a,r,o=this,l=e.isPlainObject(t),d=n&&n[0];return d||(i=o.element),r={firstLevel:i.hasClass("k-panelbar"),expanded:i.parent().hasClass(A),length:i.children().length},d&&!i.length&&(i=e(et.renderGroup({group:r})).appendTo(n)),l||e.isArray(t)?(a=e.map(l?[t]:t,function(t,n){return"string"==typeof t?e(t):e(et.renderItem({group:r,item:s(t,{index:n})}))}),d&&n.attr(G,!1)):(a=e(t),o._updateItemsClasses(a)),{items:a,group:i}},_toggleHover:function(t){var n=e(t.currentTarget);n.parents("li."+N).length||n.toggleClass("k-state-hover",t.type==E)},_updateClasses:function(){var t,a,r=this;t=r.element.find("li > ul").not(function(){return e(this).parentsUntil(".k-panelbar","div").length}).addClass("k-group k-panel").attr("role","group"),t.parent().attr(G,!1).not("."+A).children("ul").attr(Y,!0).hide(),a=r.element.add(t).children(),r._updateItemsClasses(a),n(a),i(a)},_updateItemsClasses:function(e){for(var t=e.length,n=0;t>n;n++)this._updateItemClasses(e[n],n)},_updateItemClasses:function(t,n){var i,r,o=this._selected,s=this.options.contentUrls,l=s&&s[n],d=this.element[0];t=e(t).addClass("k-item").attr("role","menuitem"),a.support.browser.msie&&t.css("list-style-position","inside").css("list-style-position",""),t.children(f).addClass(w),r=t.children("a").addClass(g),r[0]&&(r.attr("href",l),r.children(f).addClass(w)),t.filter(":not([disabled]):not([class*=k-state])").addClass("k-state-default"),t.filter("li[disabled]").addClass("k-state-disabled").attr(j,!0).removeAttr("disabled"),t.children("div").addClass(S).attr("role","region").attr(Y,!0).hide().parent().attr(G,!1),r=t.children(P),r[0]&&(o&&o.removeAttr($).children(P).removeClass(O),r.addClass(O),this._selected=t.attr($,!0)),t.children(v)[0]||(i="",s&&s[n]&&t[0].parentNode==d&&(i=''),t.contents().filter(function(){return!(this.nodeName.match(u)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll(i)),t.parent(".k-panelbar")[0]&&t.children(v).addClass("k-header")},_click:function(e){var t,n,i,a,r,o,s,l=this,d=l.element;if(!e.parents("li."+N).length&&e.closest(".k-widget")[0]==d[0]){if(r=e.closest(v),o=r.closest(k),l._updateSelected(r),n=o.find(M).add(o.find(I)),i=r.attr(h),a=i&&("#"==i.charAt(i.length-1)||-1!=i.indexOf("#"+l.element[0].id+"-")),t=!(!a&&!n.length),n.data("animating"))return t;if(l._triggerEvent(T,o)&&(t=!0),t!==!1)return l.options.expandMode==J&&l._collapseAllExpanded(o)?t:(n.length&&(s=n.is(K),l._triggerEvent(s?F:C,o)||(t=l._toggleItem(o,s))),t)}},_toggleItem:function(e,t){var n,i,a=this,r=e.find(M);return r.length?(this._toggleGroup(r,t),n=!0):(i=e.children("."+S),i.length&&(n=!0,i.is(Q)?a._ajaxRequest(e,i,t):a._toggleGroup(i,t))),n},_toggleGroup:function(e,t){var n=this,i=n.options.animation,a=i.expand,r=s({},i.collapse),o=r&&"effects"in r;e.is(K)==t&&(e.parent().attr(G,!t).attr(Y,t).toggleClass(q,t).toggleClass(A,!t).find("> .k-link > .k-icon").toggleClass("k-i-arrow-n",!t).toggleClass("k-panelbar-collapse",!t).toggleClass("k-i-arrow-s",t).toggleClass("k-panelbar-expand",t),a=t?s(o?r:s({reverse:!0},a),{hide:!0}):s({complete:function(e){n._triggerEvent(D,e.closest(k))}},a),e.kendoStop(!0,!0).kendoAnimate(a))},_collapseAllExpanded:function(n){var i,a,r=this,o=!1;return n.children(v).hasClass("k-header")?(a=n.find(M).add(n.find(I)),a.is(K)&&(o=!0),a.is(K)||0===a.length||(i=e(r.element).children(),i.find(M).add(i.find(I)).filter(function(){return e(this).is(K)}).each(function(t,n){n=e(n),o=r._triggerEvent(F,n.closest(k)),o||r._toggleGroup(n,!0)})),o):t},_ajaxRequest:function(t,n,i){var a=this,r=t.find(".k-panelbar-collapse, .k-panelbar-expand"),o=t.find(v),s=setTimeout(function(){r.addClass("k-loading")},100),l={},d=o.attr(h);e.ajax({type:"GET",cache:!1,url:d,dataType:"html",data:l,error:function(e,t){r.removeClass("k-loading"),a.trigger(_,{xhr:e,status:t})&&this.complete()},complete:function(){clearTimeout(s),r.removeClass("k-loading")},success:function(e){try{n.html(e)}catch(r){var o=window.console;o&&o.error&&o.error(r.name+": "+r.message+" in "+d),this.error(this.xhr,"error")}a._toggleGroup(n,i),a.trigger(H,{item:t[0],contentElement:n[0]})}})},_triggerEvent:function(e,t){var n=this;return n.trigger(e,{item:t[0]})},_updateSelected:function(e){var t=this,n=t.element,i=e.parent(k),a=t._selected;a&&a.removeAttr($),t._selected=i.attr($,!0),n.find(U).removeClass(O),n.find("> ."+B+", .k-panel > ."+B).removeClass(B),e.addClass(O),e.parentsUntil(n,k).filter(":has(.k-header)").addClass(B),t._current(i)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}})}});s(et,{renderItem:function(e){e=s({panelBar:{},group:{}},e);var t=X.empty,n=e.item;return X.item(s(e,{image:n.imageUrl?X.image:t,sprite:n.spriteCssClass?X.sprite:t,itemWrapper:X.itemWrapper,renderContent:et.renderContent,arrow:n.items||n.content||n.contentUrl?X.arrow:t,subGroup:et.renderGroup},Z))},renderGroup:function(e){return X.group(s({renderItems:function(e){for(var t="",n=0,i=e.items,a=i?i.length:0,r=s({length:a},e.group);a>n;n++)t+=et.renderItem(s(e,{group:r,item:s({index:n},i[n])}));return t}},e,Z))},renderContent:function(e){return X.content(s(e,Z))}}),a.ui.plugin(et)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,a=i.Widget,r="horizontal",o="vertical",s=0,l=100,d=0,c=5,u="k-progressbar",p="k-progressbar-reverse",f="k-progressbar-indeterminate",h="k-complete",m="k-state-selected",g="k-progress-status",v="k-state-selected",_="k-state-default",k="k-state-disabled",b={VALUE:"value",PERCENT:"percent",CHUNK:"chunk"},y="change",w="complete",x="boolean",C=Math,T=e.extend,S=e.proxy,D=100,F=400,E=3,z={progressStatus:""},H=a.extend({init:function(e,t){var n=this;a.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;a.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,w],options:{name:"ProgressBar",orientation:r,reverse:!1,min:s,max:l,value:d,enable:!0,type:b.VALUE,chunkCount:c,showStatus:!0,animation:{}},_fields:function(){var t=this;t._isStarted=!1,t.progressWrapper=t.progressStatus=e()},_validateType:function(i){var a=!1;if(e.each(b,function(e,n){return n===i?(a=!0,!1):t}),!a)throw Error(n.format("Invalid ProgressBar type '{0}'",i))},_wrapper:function(){var e,t=this,n=t.wrapper=t.element,i=t.options,a=i.orientation;n.addClass("k-widget "+u),n.addClass(u+"-"+(a===r?r:o)),i.enable===!1&&n.addClass(k),i.reverse&&n.addClass(p),i.value===!1&&n.addClass(f),i.type===b.CHUNK?t._addChunkProgressWrapper():i.showStatus&&(t.progressStatus=t.wrapper.prepend(z.progressStatus).find("."+g),e=i.value!==!1?i.value:i.min,i.type===b.VALUE?t.progressStatus.text(e):t.progressStatus.text(t._calculatePercentage(e)+"%"))},value:function(e){return this._value(e)},_value:function(e){var n,i=this,a=i.options;return e===t?a.value:(typeof e!==x?(e=i._roundValue(e),isNaN(e)||(n=i._validateValue(e),n!==a.value&&(i.wrapper.removeClass(f),a.value=n,i._isStarted=!0,i._updateProgress()))):e||(i.wrapper.addClass(f),a.value=!1),t)},_roundValue:function(e){e=parseFloat(e);var t=C.pow(10,E);return C.floor(e*t)/t},_validateValue:function(e){var t=this,n=t.options;if(e!==!1){if(e<=n.min||e===!0)return n.min;if(e>=n.max)return n.max}else if(e===!1)return!1;return isNaN(t._roundValue(e))?n.min:e},_updateProgress:function(){var e=this,t=e.options,n=e._calculatePercentage();t.type===b.CHUNK?(e._updateChunks(n),e._onProgressUpdateAlways(t.value)):e._updateProgressWrapper(n)},_updateChunks:function(e){var t,n=this,i=n.options,a=i.chunkCount,s=parseInt(100*(D/a),10)/100,l=parseInt(100*e,10)/100,d=C.floor(l/s);t=i.orientation===r&&!i.reverse||i.orientation===o&&i.reverse?n.wrapper.find("li.k-item:lt("+d+")"):n.wrapper.find("li.k-item:gt(-"+(d+1)+")"),n.wrapper.find("."+v).removeClass(v).addClass(_),t.removeClass(_).addClass(v)},_updateProgressWrapper:function(e){var t=this,n=t.options,i=t.wrapper.find("."+m),a=t._isStarted?t._animation.duration:0,r={};0===i.length&&t._addRegularProgressWrapper(),r[t._progressProperty]=e+"%",t.progressWrapper.animate(r,{duration:a,start:S(t._onProgressAnimateStart,t),progress:S(t._onProgressAnimate,t),complete:S(t._onProgressAnimateComplete,t,n.value),always:S(t._onProgressUpdateAlways,t,n.value)})},_onProgressAnimateStart:function(){this.progressWrapper.show()},_onProgressAnimate:function(e){var t,n=this,i=n.options,a=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!==b.CHUNK&&98>=a&&n.progressWrapper.removeClass(h)},_onProgressAnimateComplete:function(e){var t=this,n=t.options,i=parseFloat(t.progressWrapper[0].style[t._progressProperty]);n.type!==b.CHUNK&&i>98&&t.progressWrapper.addClass(h),n.showStatus&&(n.type===b.VALUE?t.progressStatus.text(e):t.progressStatus.text(C.floor(t._calculatePercentage(e))+"%")),e===n.min&&t.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(w,{value:n.max})},enable:function(e){var n=this,i=n.options;i.enable=t===e?!0:e,n.wrapper.toggleClass(k,!i.enable)},destroy:function(){var e=this;a.fn.destroy.call(e)},_addChunkProgressWrapper:function(){var e,t=this,n=t.options,i=t.wrapper,a=D/n.chunkCount,r="";for(n.chunkCount<=1&&(n.chunkCount=c),r+="
        ",e=n.chunkCount-1;e>=0;e--)r+="
      • ";r+="
      ",i.append(r).find(".k-item").css(t._progressProperty,a+"%").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]),a=D-t.chunkCount*i;a>0&&n.css(e._progressProperty,i+a+"%")},_addRegularProgressWrapper:function(){var t=this;t.progressWrapper=e("
      ").appendTo(t.wrapper),t.options.showStatus&&(t.progressWrapper.append(z.progressStatus),t.progressStatus=t.wrapper.find("."+g))},_calculateChunkSize:function(){var e=this,t=e.options.chunkCount,n=e.wrapper.find("ul.k-reset");return(parseInt(n.css(e._progressProperty),10)-(t-1))/t},_calculatePercentage:function(e){var n=this,i=n.options,a=e!==t?e:i.value,r=i.min,o=i.max;return n._onePercent=C.abs((o-r)/100),C.abs((a-r)/n._onePercent)},_progressAnimation:function(){var e=this,t=e.options,n=t.animation;e._animation=n===!1?{duration:0}:T({duration:F},t.animation)}});n.ui.plugin(H)}(window.kendo.jQuery),function(e,t){function n(t){t.children(m).addClass(x),t.children("a").addClass(_).children(m).addClass(x),t.filter(":not([disabled]):not([class*=k-state-disabled])").addClass(M),t.filter("li[disabled]").addClass(A).removeAttr("disabled"),t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass(I+" "+O),t.attr("role","tab"),t.filter("."+I).attr("aria-selected",!0),t.each(function(){var t=e(this);t.children("."+_).length||t.contents().filter(function(){return!(this.nodeName.match(f)||3==this.nodeType&&!d(this.nodeValue))}).wrapAll("
      ")})}function i(e){var t=e.children(".k-item");t.filter(".k-first:not(:first-child)").removeClass(C),t.filter(".k-last:not(:last-child)").removeClass(k),t.filter(":first-child").addClass(C),t.filter(":last-child").addClass(k)}var a=window.kendo,r=a.ui,o=a.keys,s=e.map,l=e.each,d=e.trim,c=e.extend,u=a.template,p=r.Widget,f=/^(a|div)$/i,h=".kendoTabStrip",m="img",g="href",v="prev",_="k-link",k="k-last",b="click",y="error",w=":empty",x="k-image",C="k-first",T="select",S="activate",D="k-content",F="contentUrl",E="mouseenter",z="mouseleave",H="contentLoad",A="k-state-disabled",M="k-state-default",I="k-state-active",R="k-state-focused",N="k-state-hover",O="k-tab-on-top",P=".k-item:not(."+A+")",B=".k-tabstrip-items > "+P+":not(."+I+")",L={content:u("
      #= content(item) #
      "),itemWrapper:u("<#= tag(item) # class='k-link'#= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) #"),item:u(""),image:u(""),sprite:u(""),empty:u("")},V={wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" k-state-disabled":" k-state-default",0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),n},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},text:function(e){return e.encoded===!1?e.text:a.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},contentAttributes:function(e){return e.active!==!0?" style='display:none' aria-hidden='true' aria-expanded='false'":""},content:function(e){return e.content?e.content:e.contentUrl?"":" "},contentUrl:function(e){return e.contentUrl?a.attr("content-url")+'="'+e.contentUrl+'"':""}},W=p.extend({init:function(t,n){var i,r,o=this;p.fn.init.call(o,t,n),o._animations(o.options),o.wrapper=o.element.is("ul")?o.element.wrapAll("
      ").parent():o.element,n=o.options,o._isRtl=a.support.isRtl(o.wrapper),o._tabindex(),o._updateClasses(),o._dataSource(),n.dataSource&&o.dataSource.fetch(),o.options.contentUrls&&o.wrapper.find(".k-tabstrip-items > .k-item").each(function(t,n){e(n).find(">."+_).data(F,o.options.contentUrls[t])}),o.wrapper.on(E+h+" "+z+h,B,o._toggleHover).on("keydown"+h,e.proxy(o._keydown,o)).on("focus"+h,e.proxy(o._active,o)).on("blur"+h,function(){o._current(null)}),o.wrapper.children(".k-tabstrip-items").on(b+h,".k-state-disabled .k-link",!1).on(b+h," > "+P,function(t){o.wrapper[0]!==document.activeElement&&o.wrapper.focus(),o._click(e(t.currentTarget))&&t.preventDefault()}),i=o.tabGroup.children("li."+I),r=o.contentHolder(i.index()),r.length>0&&0===r[0].childNodes.length&&o.activateTab(i.eq(0)),o.element.attr("role","tablist"),o.element[0].id&&(o._ariaId=o.element[0].id+"_ts_active"),a.notify(o)},_active:function(){var e=this.tabGroup.children().filter("."+I);e=e[0]?e:this._endItem("first"),e[0]&&this._current(e)},_endItem:function(e){return this.tabGroup.children(P)[e]()},_item:function(e,t){var n;return n=t===v?"last":"first",e?(e=e[t](),e[0]||(e=this._endItem(n)),e.hasClass(A)&&(e=this._item(e,t)),e):this._endItem(n)},_current:function(e){var n=this,i=n._focused,a=n._ariaId;return e===t?i:(i&&(i[0].id===a&&i.removeAttr("id"),i.removeClass(R)),e&&(e.hasClass(I)||e.addClass(R),n.element.removeAttr("aria-activedescendant"),a=e[0].id||a,a&&(e.attr("id",a),n.element.attr("aria-activedescendant",a))),n._focused=e,t)},_keydown:function(e){var n,i=this,a=e.keyCode,r=i._current(),s=i._isRtl;if(e.target==e.currentTarget){if(a==o.DOWN||a==o.RIGHT)n=s?v:"next";else if(a==o.UP||a==o.LEFT)n=s?"next":v;else if(a==o.ENTER||a==o.SPACEBAR)i._click(r),e.preventDefault();else{if(a==o.HOME)return i._click(i._endItem("first")),e.preventDefault(),t;if(a==o.END)return i._click(i._endItem("last")),e.preventDefault(),t}n&&(i._click(i._item(r,n)),e.preventDefault())}},_dataSource:function(){var t=this;t.dataSource&&t._refreshHandler?t.dataSource.unbind("change",t._refreshHandler):t._refreshHandler=e.proxy(t.refresh,t),t.dataSource=a.data.DataSource.create(t.options.dataSource).bind("change",t._refreshHandler)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),e.fetch()},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{effects:{}}})},refresh:function(e){var t,n,i,r,o=this,s=o.options,l=a.getter(s.dataTextField),d=a.getter(s.dataContentField),c=a.getter(s.dataContentUrlField),u=a.getter(s.dataImageUrlField),p=a.getter(s.dataUrlField),f=a.getter(s.dataSpriteCssClass),h=[],m=o.dataSource.view();for(e=e||{},i=e.action,i&&(m=e.items),t=0,r=m.length;r>t;t++)n={text:l(m[t])},s.dataContentField&&(n.content=d(m[t])),s.dataContentUrlField&&(n.contentUrl=c(m[t])),s.dataUrlField&&(n.url=p(m[t])),s.dataImageUrlField&&(n.imageUrl=u(m[t])),s.dataSpriteCssClass&&(n.spriteCssClass=f(m[t])),h[t]=n;if("add"==e.action)e.index"),n(a)),{tabs:a,contents:r}},_toggleDisabled:function(t,n){t=this.tabGroup.find(t),t.each(function(){e(this).toggleClass(M,n).toggleClass(A,!n)})},_updateClasses:function(){var a,r,o,s=this;s.wrapper.addClass("k-widget k-header k-tabstrip"),s.tabGroup=s.wrapper.children("ul").addClass("k-tabstrip-items k-reset"),s.tabGroup[0]||(s.tabGroup=e("
        ").appendTo(s.wrapper)),a=s.tabGroup.find("li").addClass("k-item"),a.length&&(r=a.filter("."+I).index(),o=r>=0?r:t,s.tabGroup.contents().filter(function(){return 3==this.nodeType&&!d(this.nodeValue)}).remove()),r>=0&&a.eq(r).addClass(O),s.contentElements=s.wrapper.children("div"),s.contentElements.addClass(D).eq(o).addClass(I).css({display:"block"}),a.length&&(n(a),i(s.tabGroup),s._updateContentElements())},_updateContentElements:function(){var t=this,n=t.options.contentUrls||[],i=t.element.attr("id")||a.guid(),r=t.wrapper.children("div");t.tabGroup.find(".k-item").each(function(a){var o=r.eq(a),s=i+"-"+(a+1);this.setAttribute("aria-controls",s),!o.length&&n[a]?e("
        ").appendTo(t.wrapper).attr("id",s):(o.attr("id",s),e(this).children(".k-loading")[0]||n[a]||e("").prependTo(this)),o.attr("role","tabpanel"),o.filter(":not(."+I+")").attr("aria-hidden",!0).attr("aria-expanded",!1),o.filter("."+I).attr("aria-expanded",!0)}),t.contentElements=t.contentAnimators=t.wrapper.children("div"),a.kineticScrollNeeded&&a.mobile.ui.Scroller&&(a.touchScroller(t.contentElements),t.contentElements=t.contentElements.children(".km-scroll-container"))},_toggleHover:function(t){e(t.currentTarget).toggleClass(N,t.type==E)},_click:function(e){var t,n,i=this,a=e.find("."+_),r=a.attr(g),o=i.options.collapsible,s=i.contentHolder(e.index());if(e.closest(".k-widget")[0]==i.wrapper[0]){if(e.is("."+A+(o?"":",."+I)))return!0;if(n=a.data(F)||r&&("#"==r.charAt(r.length-1)||-1!=r.indexOf("#"+i.element[0].id+"-")),t=!r||n,i.tabGroup.children("[data-animating]").length)return t;if(i.trigger(T,{item:e[0],contentElement:s[0]}))return!0;if(t!==!1)return o&&e.is("."+I)?(i.deactivateTab(e),!0):(i.activateTab(e)&&(t=!0),t)}},deactivateTab:function(e){var t=this,n=t.options.animation,i=n.open,r=c({},n.close),o=r&&"effects"in r;e=t.tabGroup.find(e),r=c(o?r:c({reverse:!0},i),{hide:!0}),a.size(i.effects)?(e.kendoAddClass(M,{duration:i.duration}),e.kendoRemoveClass(I,{duration:i.duration})):(e.addClass(M),e.removeClass(I)),e.removeAttr("aria-selected"),t.contentAnimators.filter("."+I).kendoStop(!0,!0).kendoAnimate(r).removeClass(I).attr("aria-hidden",!0)},activateTab:function(e){var t,n,i,r,o,s,l,d,u,p,f,h,m,g,v;return e=this.tabGroup.find(e),t=this,n=t.options.animation,i=n.open,r=c({},n.close),o=r&&"effects"in r,s=e.parent().children(),l=s.filter("."+I),d=s.index(e),r=c(o?r:c({reverse:!0},i),{hide:!0}),a.size(i.effects)?(l.kendoRemoveClass(I,{duration:r.duration}),e.kendoRemoveClass(N,{duration:r.duration})):(l.removeClass(I),e.removeClass(N)),u=t.contentAnimators,t.inRequest&&(t.xhr.abort(),t.inRequest=!1),0===u.length?(l.removeClass(O),e.addClass(O).css("z-index"),e.addClass(I),t._current(e),t.trigger("change"),!1):(p=u.filter("."+I),f=t.contentHolder(d),h=f.closest(".k-content"),0===f.length?(p.removeClass(I).attr("aria-hidden",!0).kendoStop(!0,!0).kendoAnimate(r),!1):(e.attr("data-animating",!0),m=(e.children("."+_).data(F)||!1)&&f.is(w),g=function(){l.removeClass(O),e.addClass(O).css("z-index"),a.size(i.effects)?(l.kendoAddClass(M,{duration:i.duration}),e.kendoAddClass(I,{duration:i.duration})):(l.addClass(M),e.addClass(I)),l.removeAttr("aria-selected"),e.attr("aria-selected",!0),t._current(e),h.addClass(I).removeAttr("aria-hidden").kendoStop(!0,!0).attr("aria-expanded",!0).kendoAnimate(c({init:function(){t.trigger(S,{item:e[0],contentElement:f[0]})}},i,{complete:function(){e.removeAttr("data-animating")}}))},v=function(){m?(e.removeAttr("data-animating"),t.ajaxRequest(e,f,function(){e.attr("data-animating",!0),g(),t.trigger("change")})):(g(),t.trigger("change"))},p.removeClass(I),p.attr("aria-hidden",!0),p.attr("aria-expanded",!1),p.length?p.kendoStop(!0,!0).kendoAnimate(c({complete:v},r)):v(),!0))},contentElement:function(e){var n,i,r,o;if(isNaN(e-0))return t;if(n=this.contentElements&&this.contentElements[0]&&!a.kineticScrollNeeded?this.contentElements:this.contentAnimators,i=RegExp("-"+(e+1)+"$"),n)for(r=0,o=n.length;o>r;r++)if(i.test(n.closest(".k-content")[r].id))return n[r];return t},contentHolder:function(t){var n=e(this.contentElement(t)),i=n.children(".km-scroll-container");return a.support.touch&&i[0]?i:n},ajaxRequest:function(t,n,i,a){t=this.tabGroup.find(t);var r=this,o=e.ajaxSettings.xhr,s=t.find("."+_),l={},d=!1,c=t.find(".k-loading").removeClass("k-complete");c[0]||(c=e("").prependTo(t)),a=a||s.data(F)||s.attr(g),r.inRequest=!0,r.xhr=e.ajax({type:"GET",cache:!1,url:a,dataType:"html",data:l,xhr:function(){var t=this,n=o(),i=10,a=t.progressUpload?"progressUpload":t.progress?"progress":!1;return n&&e.each([n,n.upload],function(){this.addEventListener&&this.addEventListener("progress",function(e){a&&t[a](e)},!1)}),t.progress||(d=setInterval(function(){t.progress({lengthComputable:!0,loaded:Math.min(i,100),total:100})},100),i+=10),n},progress:function(e){if(e.lengthComputable){var t=parseInt(100*(e.loaded/e.total),10)+"%";c.width(t)}},error:function(e,t){r.trigger("error",{xhr:e,status:t})&&this.complete()},complete:function(){r.inRequest=!1,clearInterval(d),c.css("width","")},success:function(e){c.addClass("k-complete");try{n.html(e)}catch(o){var s=window.console;s&&s.error&&s.error(o.name+": "+o.message+" in "+a),this.error(this.xhr,"error")}i&&i.call(r,n),r.trigger(H,{item:t[0],contentElement:n[0]})}})}});c(W,{renderItem:function(e){e=c({tabStrip:{},group:{}},e);var t=L.empty,n=e.item;return L.item(c(e,{image:n.imageUrl?L.image:t,sprite:n.spriteCssClass?L.sprite:t,itemWrapper:L.itemWrapper},V))},renderContent:function(e){return L.content(c(e,V))}}),a.ui.plugin(W)}(window.kendo.jQuery),function(e,t){function n(e,t,n){var i,a=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-a,e.setTime(e.getTime()+i*A))}function i(){var e=new G,t=new G(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),n=new G(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0);return-1*(t.getTimezoneOffset()-n.getTimezoneOffset())}function a(e){return 60*e.getHours()*A+e.getMinutes()*A+1e3*e.getSeconds()+e.getMilliseconds()}function r(e,t,n){var i,r=a(t),o=a(n);return e&&r!=o?(i=a(e),r>i&&(i+=M),r>o&&(o+=M),i>=r&&o>=i):!0}function o(e){var t=e.parseFormats;e.format=f(e.format||c.getCulture(e.culture).calendars.standard.patterns.t),t=U(t)?t:[t],t.splice(0,0,e.format),e.parseFormats=t}function s(e){e.preventDefault()}var l,d,c=window.kendo,u=c.keys,p=c._activeElement,f=c._extractFormat,h=c.support,m=h.browser,g=c.ui,v=g.Widget,_="open",k="close",b="change",y=".kendoTimePicker",w="click"+y,x="k-state-default",C="disabled",T="readonly",S="li",D="",F="k-state-focused",E="k-state-hover",z="mouseenter"+y+" mouseleave"+y,H="mousedown"+y,A=6e4,M=864e5,I="k-state-selected",R="k-state-disabled",N="aria-selected",O="aria-expanded",P="aria-hidden",B="aria-disabled",L="aria-readonly",V="aria-activedescendant",W="id",U=e.isArray,q=e.extend,j=e.proxy,G=Date,Y=new G;Y=new G(Y.getFullYear(),Y.getMonth(),Y.getDate(),0,0,0),l=function(t){var n=this,i=t.id;n.options=t,n.ul=e('