/* * Kendo UI Beta v2013.2.716 (http://kendoui.com) * Copyright 2013 Telerik AD. All rights reserved. * * Kendo UI Beta license terms available at * http://www.kendoui.com/purchase/license-agreement/kendo-ui-beta.aspx */ (typeof define=="function"&&define.amd?define:function(deps,body){return body()})([],function(){!function(e,t,n){function i(){}function r(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 a(e,t,n){return e+="",t=t||2,n=t-e.length,n?R[t].substring(0,n)+e:e}function o(t){var n,i,r,a,o,s,l,d,c,u,p,f,h,m=ht.browser,g="rtl"==t.css("direction");return t.parent().hasClass("k-animation-container")?(f=t.parent(".k-animation-container"),h=f[0].style,f.is(":hidden")&&f.show(),n=mt.test(h.width)||mt.test(h.height),n||f.css({width:t.outerWidth(),height:t.outerHeight()})):(i=t.css(at.support.transitions.css+"box-shadow")||t.css("box-shadow"),r=i?i.match(vt)||[0,0,0,0,0]:[0,0,0,0,0],a=pt.max(+r[3],+(r[4]||0)),o=-r[1]+a,s=+r[1]+a,l=+r[2]+a,d=t[0].style.width,c=t[0].style.height,u=mt.test(d),p=mt.test(c),m.opera&&(o=s=l=5),n=u||p,u||(d=t.outerWidth()),p||(c=t.outerHeight()),t.wrap(e("
").addClass("k-animation-container").css({width:d,height:c,marginLeft:o*(g?1:-1),paddingLeft:o,paddingRight:s,paddingBottom:l})),n&&t.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),m.msie&&pt.floor(m.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,r,a,o=at.data.ObservableArray,s=at.data.DataSource;for(n in t)i=t[n],r=typeof i,r===wt&&null!==i&&i.constructor!==Array&&i.constructor!==o&&i.constructor!==s?i instanceof Date?e[n]=new Date(i.getTime()):(a=e[n],e[n]=typeof a===wt?a||{}:{},l(e[n],i)):r!==Tt&&(e[n]=i);return e}function d(e,t,i){for(var r in t)if(t.hasOwnProperty(r)&&t[r].test(e))return r;return i!==n?i:e}function c(t,n){var i,r={};return document.defaultView&&document.defaultView.getComputedStyle?(i=document.defaultView.getComputedStyle(t,""),n&&e.each(n,function(e,t){r[t]=i.getPropertyValue(t)})):(i=t.currentStyle,n&&e.each(n,function(e,t){r[t]=i[t.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})]})),at.size(r)||(r=i),r}function u(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n}function p(e,t,n){var i,r,a,o;return t||(t="offset"),i=e[t](),r=ht.mobileOS,ht.touch&&r.ios&&r.flatVersion<410&&(a="offset"==t?i:e.offset(),o=i.left==a.left&&i.top==a.top)?{top:i.top-window.scrollY,left:i.left-window.scrollX}:(at.support.pointers&&!n&&(i.top-=window.pageYOffset-document.documentElement.scrollTop,i.left-=window.pageXOffset-document.documentElement.scrollLeft),i)}function f(e){var t={};return st("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function h(e){return new at.effects.Element(e)}function m(e,t,n,i){return typeof e===bt&&(ut(t)&&(i=t,t=400,n=!1),ut(n)&&(i=n,n=!1),typeof t===Ct&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:i}),ot({effects:{},duration:400,reverse:!1,init:ct,teardown:ct,hide:!1},e,{completeCallback:e.complete,complete:ct})}function g(t,n,i,r,a){for(var o,s=0,l=t.length;l>s;s++)o=e(t[s]),o.queue(function(){O.promise(o,m(n,i,r,a))});return t}function v(e,t,n,i,r,a){return O.transitionPromise(e,t,m(n,i,r,a))}function _(e,t,n,i){return t&&(t=t.split(" "),st(t,function(t,n){e.toggleClass(n,i)})),e}function k(e){return(""+e).replace(P,"&").replace(B,"<").replace(L,">")}function b(e,i){var r;return 0===i.indexOf("data")&&(i=i.substring(4),i=i.charAt(0).toLowerCase()+i.substring(1)),i=i.replace($,"-$1"),r=e.getAttribute("data-"+at.ns+i),null===r?r=n:"null"===r?r=null:"true"===r?r=!0:"false"===r?r=!1:_t.test(r)?r=parseFloat(r):G.test(r)&&!Y.test(r)&&(r=t("("+r+")")),r}function y(t,i){var r,a,o={};for(r in i)a=b(t,r),a!==n&&(j.test(r)&&(a=at.template(e("#"+a).html())),o[r]=a);return o}function w(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&x(e)}function x(t){return!e(t).parents().andSelf().filter(function(){return"hidden"===e.css(this,"visibility")||e.expr.filters.hidden(this)}).length}function C(e,t){return new C.fn.init(e,t)}var T,S,D,F,E,I,H,A,z,M,R,N,O,P,B,L,W,V,U,q,j,G,Y,$,K,Q,J,X,Z,et,tt,nt,it,rt,at=window.kendo=window.kendo||{},ot=e.extend,st=e.each,lt=e.proxy,dt=e.isArray,ct=e.noop,ut=e.isFunction,pt=Math,ft=window.JSON||{},ht={},mt=/%/,gt=/\{(\d+)(:[^\}]+)?\}/g,vt=/(\d+?)px\s*(\d+?)px\s*(\d+?)px\s*(\d+?)?/i,_t=/^(\+|-?)\d+(\.?)\d*$/,kt="function",bt="string",yt="number",wt="object",xt="null",Ct="boolean",Tt="undefined",St={},Dt={},Ft=[].slice,Et=window.Globalize;at.version="2013.2.716",i.extend=function(e){var t,n,i=function(){},r=this,a=e&&e.init?e.init:function(){r.apply(this,arguments)};i.prototype=r.prototype,n=a.fn=a.prototype=new i;for(t in e)n[t]=typeof e[t]!==wt||e[t]instanceof Array||null===e[t]?e[t]:ot(!0,{},i.prototype[t],e[t]);return n.constructor=a,a.extend=r.extend,a},S=function(){this._defaultPrevented=!0},D=function(){return this._defaultPrevented===!0},F=i.extend({init:function(){this._events={}},bind:function(e,t,i){var r,a,o,s,l,d=this,c=typeof e===bt?[e]:e,u=typeof t===kt;if(t===n){for(r in e)d.bind(r,e[r]);return d}for(r=0,a=c.length;a>r;r++)e=c[r],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,r,a,o=this,s=typeof e===bt?[e]:e,l=typeof t===kt;for(n=0,i=s.length;i>n;n++)e=s[n],r=l?t:t[e],r&&(a=o._events[e]=o._events[e]||[],a.unshift(r));return o},trigger:function(e,t){var n,i,r=this,a=r._events[e];if(a){for(t=t||{},t.sender=r,t._defaultPrevented=!1,t.preventDefault=S,t.isDefaultPrevented=D,a=a.slice(),n=0,i=a.length;i>n;n++)a[n].call(r,t);return t._defaultPrevented===!0}return!1},unbind:function(e,t){var i,r=this,a=r._events[e];if(e===n)r._events={};else if(a)if(t)for(i=a.length-1;i>=0;i--)a[i]===t&&a.splice(i,1);else r._events[e]=[];return r}}),E=/^\w+/,I=/\$\{([^}]*)\}/g,H=/\\\}/g,A=/__CURLY__/g,z=/\\#/g,M=/__SHARP__/g,R=["","0","00","000","0000"],T={paramName:"data",useWithBlock:!0,render:function(e,t){var n,i,r="";for(n=0,i=t.length;i>n;n++)r+=e(t[n]);return r},compile:function(t,n){var i,a,o,s=ot({},this,n),l=s.paramName,d=l.match(E)[0],c=s.useWithBlock,u="var o,e=kendo.htmlEncode;";if(ut(t))return 2===t.length?function(n){return t(e,{data:n}).join("")}:t;for(u+=c?"with("+l+"){":"",u+="o=",a=t.replace(H,"__CURLY__").replace(I,"#=e($1)#").replace(A,"}").replace(z,"__SHARP__").split("#"),o=0;os;s++)p[s]=t(s,m)||xt;return c=0===p.length?"[]":n?"[\n"+n+p.join(",\n"+n)+"\n"+h+"]":"["+p.join(",")+"]",n=h,c}if(r&&typeof r===wt)for(u=r.length,s=0;u>s;s++)typeof r[s]===bt&&(d=r[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,r,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!==kt&&(Date.prototype.toJSON=function(){var e=this;return isFinite(e.valueOf())?a(e.getUTCFullYear(),4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),typeof ft.stringify!==kt&&(ft.stringify=function(e,a,o){var s;if(n="",i="",typeof o===yt)for(s=0;o>s;s+=1)i+=" ";else typeof o===bt&&(i=o);if(r=a,a&&typeof a!==kt&&(typeof a!==wt||typeof a.length!==yt))throw Error("JSON.stringify");return t("",{"":e})})}(),function(){function e(e){if(e){if(e.numberFormat)return e;if(typeof e===bt){var t=at.cultures;return t[e]||t[e.split("-")[0]]||null}return null}return null}function t(t){return t&&(t=e(t)),t||at.cultures.current}function i(e){e.groupSizes=e.groupSize,e.percent.groupSizes=e.percent.groupSize,e.currency.groupSizes=e.currency.groupSize}function r(e,i,r){r=t(r);var o=r.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=a(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=a(e.getMonth()+1):"MMM"===t?i=l.namesAbbr[e.getMonth()]:"MMMM"===t?i=l.names[e.getMonth()]:"yy"===t?i=a(e.getFullYear()%100):"yyyy"===t?i=a(e.getFullYear(),4):"h"===t?i=e.getHours()%12||12:"hh"===t?i=a(e.getHours()%12||12):"H"===t?i=e.getHours():"HH"===t?i=a(e.getHours()):"m"===t?i=e.getMinutes():"mm"===t?i=a(e.getMinutes()):"s"===t?i=e.getSeconds():"ss"===t?i=a(e.getSeconds()):"f"===t?i=pt.floor(e.getMilliseconds()/100):"ff"===t?i=pt.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,r){r=t(r);var a,o,l,d,k,b,y,w,x,C,T,S,D,F,E,I,H,A,z,M,R,N,O,P=r.numberFormat,B=P.groupSize[0],L=P[m],W=P[h],V=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 r.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],W=P[h],V=P.decimals,a=P.symbol,U=P.pattern[j?0:1]),d=k[2],d&&(V=+d),"e"===i)return d?e.toExponential(V):e.toExponential();if(l&&(e*=100),e=s(e,V),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+=W+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?a: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(M=i.indexOf("%"),R=i.indexOf("$"),l=-1!=M,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],W=P[h],V=P.decimals,a=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,I=i.lastIndexOf(g)-E,A=H>-1,z=I>-1,C=y.length,A||z||(i=i.substring(0,E)+i.substring(E+1),T=i.length,E=-1,C=0),A&&H>I?C=H:I>H&&(z&&C>I?C=I:A&&H>C&&(C=H)),C>-1&&(e=s(e,C))):e=s(e),I=i.indexOf(g),N=H=i.indexOf(v),$=-1==I&&-1!=H?H:-1!=I&&-1==H?I:I>H?H:I,I=i.lastIndexOf(g),H=i.lastIndexOf(v),O=-1==I&&-1!=H?H:-1!=I&&-1==H?I:I>H?I: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?W: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?a: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;at.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}}}},at.culture=function(t){var r,a=at.cultures;return t===n?a.current:(r=e(t)||a[k],r.calendar=r.calendars.standard,a.current=r,Et&&i(r.numberFormat),n)},at.findCulture=e,at.getCulture=t,at.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 r(e,t,i);if(typeof e===yt)return o(e,t,i)}return e!==n?e:""},Et&&(l=lt(Et.format,Et)),at.format=function(e){var t=arguments;return e.replace(gt,function(e,n,i){var r=t[parseInt(n,10)+1];return l(r,i?i.substring(1):"")})},at._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},at._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},at._round=s,at.toString=l}(),function(){function t(e,t,n){return!(e>=t&&n>=e)}function i(e){return e.charAt(0)}function r(t){return e.map(t,i)}function a(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=function(e){for(var t=0;i[R]===e;)t++,R++;return t>0&&(R-=1),t},C=function(t){var n=m[t]||RegExp("^\\d{1,"+t+"}"),i=e.substr(N,t).match(n);return i?(i=i[0],N+=i.length,parseInt(i,10)):null},T=function(t,n){for(var i,r,a,o=0,s=t.length;s>o;o++)if(i=t[o],r=i.length,a=e.substr(N,r),n&&(a=a.toLowerCase()),a==i)return N+=r,o+1;return null},S=function(){var t=!1;return e.charAt(N)===i[R]&&(N++,t=!0),t},D=o.calendars.standard,F=null,E=null,I=null,H=null,A=null,z=null,M=null,R=0,N=0,O=!1,P=new Date,B=D.twoDigitYearMax||2029,L=P.getFullYear();for(i||(i="d"),f=D.patterns[i],f&&(i=f),i=i.split(""),c=i.length;c>R;R++)if(l=i[R],O)"'"===l?O=!1:S();else if("d"===l){if(d=x("d"),D._lowerDays||(D._lowerDays=s(D.days)),I=3>d?C(2):T(D._lowerDays[3==d?"namesAbbr":"names"],!0),null===I||t(I,1,31))return null}else if("M"===l){if(d=x("M"),D._lowerMonths||(D._lowerMonths=s(D.months)),E=3>d?C(2):T(D._lowerMonths[3==d?"namesAbbr":"names"],!0),null===E||t(E,1,12))return null;E-=1}else if("y"===l){if(d=x("y"),F=C(d),null===F)return null;2==d&&("string"==typeof B&&(B=L+parseInt(B,10)),F=L-L%100+F,F>B&&(F-=100))}else if("h"===l){if(x("h"),H=C(2),12==H&&(H=0),null===H||t(H,0,11))return null}else if("H"===l){if(x("H"),H=C(2),null===H||t(H,0,23))return null}else if("m"===l){if(x("m"),A=C(2),null===A||t(A,0,59))return null}else if("s"===l){if(x("s"),z=C(2),null===z||t(z,0,59))return null}else if("f"===l){if(d=x("f"),M=C(d),null!==M&&d>3&&(M=parseInt((""+M).substring(0,3),10)),null===M||t(M,0,999))return null}else if("t"===l){if(d=x("t"),k=D.AM,b=D.PM,1===d&&(k=r(k),b=r(b)),h=T(b),!h&&!T(k))return null}else if("z"===l){if(g=!0,d=x("z"),"Z"===e.substr(N,1)){if(!v)return null;S();continue}if(_=e.substr(N,6).match(d>2?p:u),!_)return null;if(_=_[0],N=_.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=S();else if("'"===l)O=!0,S();else if(!S())return null;return null===F&&(F=L),h&&12>H&&(H+=12),null===I&&(I=1),g?(y&&(H+=-y),w&&(A+=-w),e=new Date(Date.UTC(F,E,I,H,A,z,M))):(e=new Date(F,E,I,H,A,z,M),a(e,H)),100>F&&e.setFullYear(F),e.getDate()!==I&&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;at.parseDate=function(e,t,n){if("[object Date]"===g.call(e))return e;var i,r,a=0,o=null;if(e&&0===e.indexOf("/D")&&(o=f.exec(e)))return new Date(parseInt(o[1],10));if(n=at.getCulture(n),!t){for(t=[],r=n.calendar.patterns,i=h.length;i>a;a++)t[a]=r[h[a]];a=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=dt(t)?t:[t],i=t.length;i>a;a++)if(o=l(e,t[a],n))return o;return o},at.parseInt=function(e,t){var n=at.parseFloat(e,t);return n&&(n=0|n),n},at.parseFloat=function(e,t,n){if(!e&&0!==e)return null;if(typeof e===yt)return e;e=""+e,t=at.getCulture(t);var i,r,a=t.numberFormat,o=a.percent,s=a.currency,l=s.symbol,u=o.symbol,p=e.indexOf("-");return c.test(e)?(e=parseFloat(e),isNaN(e)&&(e=null),e):p>0?null:(p=p>-1,e.indexOf(l)>-1||n&&n.toLowerCase().indexOf("c")>-1?(a=s,i=a.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&&(r=!0,a=o,l=u),e=e.replace("-","").replace(l,"").replace(d," ").split(a[","].replace(d," ")).join("").replace(a["."],"."),e=parseFloat(e),isNaN(e)?e=null:p&&(e*=-1),e&&r&&(e/=100),e)},Et&&(at.parseDate=function(e,t,n){return"[object Date]"===g.call(e)?e:Et.parseDate(e,t,n)},at.parseFloat=function(e,t){return typeof e===yt?e:e===n||null===e?null:(e=Et.parseFloat(e,t),isNaN(e)?null:e)})}(),function(){function t(e){var t,n=!1,i=[],r={webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie) ([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(t in r)if(r.hasOwnProperty(t)&&(i=e.match(r[t]))){n={},n[t]=!0,n[i[1].toLowerCase()]=!0,n.version=parseInt(document.documentMode||i[2],10);break}return n}var i,r,a,o,s,l;ht.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},ht.isRtl=function(t){return e(t).closest(".k-rtl").length>0},i=document.createElement("table");try{i.innerHTML="",ht.tbodyInnerHtml=!0}catch(c){ht.tbodyInnerHtml=!1}ht.touch="ontouchstart"in window,ht.pointers=navigator.msPointerEnabled,r=ht.transitions=!1,a=ht.transforms=!1,o="HTMLElement"in window?HTMLElement.prototype:[],ht.hasHW3D="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix||"MozPerspective"in document.documentElement.style||"msPerspective"in document.documentElement.style,st(["Moz","webkit","O","ms"],function(){var e,t=""+this,o=typeof i.style[t+"Transition"]===bt;return o||typeof i.style[t+"Transform"]===bt?(e=t.toLowerCase(),a={css:"ms"!=e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},o&&(r=a,r.event=r.event?r.event+"TransitionEnd":"transitionend"),!1):n}),ht.transforms=a,ht.transitions=r,ht.devicePixelRatio=window.devicePixelRatio===n?1:window.devicePixelRatio;try{ht.screenWidth=window.outerWidth||window.screen?window.screen.availWidth:window.innerWidth,ht.screenHeight=window.outerHeight||window.screen?window.screen.availHeight:window.innerHeight,ht.zoomLevel=function(){return ht.touch?document.documentElement.clientWidth/window.innerWidth:ht.pointers?(top||window).outerWidth/(top||window).innerWidth:1}}catch(c){ht.screenWidth=window.screen.availWidth,ht.screenHeight=window.screen.availHeight,ht.zoomLevel=function(){return 1}}ht.detectOS=function(e){var t,n,i=!1,r=[],a=!/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)&&(r=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=r[2],i.minorVersion=r[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!==Tt||typeof window.cordova!==Tt,i.android&&(ht.devicePixelRatio<1.5&&i.flatVersion<400||a)&&(ht.screenWidth>800||ht.screenHeight>800)&&(i.tablet=n);break}return i},s=ht.mobileOS=ht.detectOS(navigator.userAgent),ht.wpDevicePixelRatio=s.wp?screen.width/320:0,ht.kineticScrollNeeded=s&&(ht.touch||ht.pointers),ht.hasNativeScrolling=!1,(s.ios&&s.majorVersion>4||s.android&&s.majorVersion>2||s.wp)&&(ht.hasNativeScrolling=s),ht.mouseAndTouchPresent=ht.touch&&!(ht.mobileOS.ios||ht.mobileOS.android),ht.browser=t(navigator.userAgent),ht.cssBorderSpacing=n!==document.documentElement.style.borderSpacing&&!(ht.browser.msie&&ht.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)}(ht.browser),ht.eventCapture=document.documentElement.addEventListener,ht.placeholder="placeholder"in document.createElement("input"),ht.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]}(),ht.matchesSelector=o.webkitMatchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||o.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},ht.pushState=window.history&&window.history.pushState,l=document.documentMode,ht.hashChange="onhashchange"in window&&!(ht.browser.msie&&(!l||8>=l))}(),N={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}},O={},e.extend(O,{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=at.wrap(e);return i.append(t),e.hide(),t.show(),n.completeCallback&&n.completeCallback(e),e}}),"kendoAnimate"in e.fn||ot(e.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,n,i){return g(this,e,t,n,i)},kendoAnimateTo:function(e,t,n,i,r){return v(this,e,t,n,i,r)},kendoAddClass:function(e,t){return at.toggleClass(this,e,t,!0)},kendoRemoveClass:function(e,t){return at.toggleClass(this,e,t,!1)},kendoToggleClass:function(e,t,n){return at.toggleClass(this,e,t,n)}}),P=/&/g,B=//g,W=function(e){return e.target},ht.touch&&(W=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},st(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,n){e.fn[n]=function(e){return this.bind(n,e)}})),ht.touch?ht.mobileOS?(ht.mousedown="touchstart",ht.mouseup="touchend",ht.mousemove="touchmove",ht.mousecancel="touchcancel",ht.click="touchend",ht.resize="orientationchange"):(ht.mousedown="mousedown touchstart",ht.mouseup="mouseup touchend",ht.mousemove="mousemove touchmove",ht.mousecancel="mouseleave touchcancel",ht.click="click",ht.resize="resize"):ht.pointers?(ht.mousemove="MSPointerMove",ht.mousedown="MSPointerDown",ht.mouseup="MSPointerUp",ht.mousecancel="MSPointerCancel",ht.click="MSPointerUp",ht.resize="orientationchange resize"):(ht.mousemove="mousemove",ht.mousedown="mousedown",ht.mouseup="mouseup",ht.mousecancel="mouseleave",ht.click="click",ht.resize="resize"),V=function(e,t){var n,i,r,a,o=t||"d",s=1;for(i=0,r=e.length;r>i;i++)a=e[i],""!==a&&(n=a.indexOf("["),0!==n&&(-1==n?a="."+a:(s++,a="."+a.substring(0,n)+" || {})"+a.substring(n))),s++,o+=a+(r-1>i?" || {})":")"));return Array(s).join("(")+o},U=/^([a-z]+:)?\/\//i,ot(at,{ui:at.ui||{},fx:at.fx||h,effects:at.effects||O,mobile:at.mobile||{},data:at.data||{},dataviz:at.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:at.support||ht,animate:at.animate||g,ns:"",attr:function(e){return"data-"+at.ns+e},wrap:o,deepExtend:s,getComputedStyles:c,size:u,getOffset:at.getOffset||p,parseEffects:at.parseEffects||f,toggleClass:at.toggleClass||_,directions:at.directions||N,Observable:F,Class:i,Template:T,template:lt(T.compile,T),render:lt(T.render,T),stringify:lt(ft.stringify,ft),eventTarget:W,htmlEncode:k,isLocalUrl:function(e){return e&&!U.test(e)},expr:function(e,t,n){return e=e||"",typeof t==bt&&(n=t,t=!1),n=n||"d",e&&"["!==e.charAt(0)&&(e="."+e),e=t?V(e.split("."),n):n+e},getter:function(e,t){return St[e]=St[e]||Function("d","return "+at.expr(e,t))},setter:function(e){return Dt[e]=Dt[e]||Function("d,value",at.expr(e)+"=value")},accessor:function(e){return{get:at.getter(e),set:at.setter(e)}},guid:function(){var e,t,n="";for(e=0;32>e;e++)t=0|16*pt.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,"["+at.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)}}),q=F.extend({init:function(e,t){var n=this;n.element=at.jQuery(e).handler(n),F.fn.init.call(n),t=n.options=ot(!0,{},n.options,t),n.element.attr(at.attr("role"))||n.element.attr(at.attr("role"),(t.name||"").toLowerCase()),n.element.data("kendo"+t.prefix+t.name,n),n.bind(n.events,t)},events:[],options:{prefix:""},_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,r=0,a=i.events.length;a>r;r++)n=i.events[r],i.options[n]&&t[n]&&i.unbind(n,i.options[n]);e.extend(i.options,t),i.bind(i.events,t)},destroy:function(){var e=this;e.element.removeData("kendo"+e.options.prefix+e.options.name),e.element.removeData("handler"),e.unbind()}}),at.notify=ct,j=/template$/i,G=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,Y=/^\{(\d+)(:[^\}]+)?\}/,$=/([A-Z])/g,at.initWidget=function(t,i,r){var a,o,s,l,d,c,u,p;if(r?r.roles&&(r=r.roles):r=at.ui.roles,t=t.nodeType?t:t[0],c=t.getAttribute("data-"+at.ns+"role"),c&&(s=-1===c.indexOf(".")?r[c]:at.getter(c)(window))){for(p=b(t,"dataSource"),i=e.extend({},y(t,s.fn.options),i),p&&(i.dataSource=typeof p===bt?at.getter(p)(window):p),l=0,d=s.fn.events.length;d>l;l++)o=s.fn.events[l],u=b(t,o),u!==n&&(i[o]=at.getter(u)(window));return a=e(t).data("kendo"+s.fn.options.prefix+s.fn.options.name),a?a.setOptions(i):a=new s(t,i),a}},at.rolesFromNamespaces=function(e){var t,n,i=[];for(e[0]||(e=[at.ui,at.dataviz.ui]),t=0,n=e.length;n>t;t++)i[t]=e[t].roles;return ot.apply(null,[{}].concat(i.reverse()))},at.init=function(t){var n=at.rolesFromNamespaces(Ft.call(arguments,1));e(t).find("[data-"+at.ns+"role]").andSelf().each(function(){at.initWidget(this,{},n)})},at.destroy=function(t){e(t).find("[data-"+at.ns+"role]").andSelf().each(function(){var t=e(this),n=at.widgetInstance(t,at.ui)||at.widgetInstance(t,at.mobile.ui)||at.widgetInstance(t,at.dataviz.ui);n&&n.destroy()})},at.parseOptions=y,ot(at.ui,{Widget:q,roles:{},progress:function(t,n){var i,r,a,o,s=t.find(".k-loading-mask"),l=at.support,d=l.browser;n?s.length||(i=l.isRtl(t),r=i?"right":"left",o=t.scrollLeft(),a=d.webkit?i?t[0].scrollWidth-t.width()-2*o:0:0,s=e("
Loading...
").width("100%").height("100%").css("top",t.scrollTop()).css(r,Math.abs(o)+a).prependTo(t)):s&&s.remove()},plugin:function(t,i,r){var a,o=t.fn.options.name;i=i||at.ui,r=r||"",i[o]=t,i.roles[o.toLowerCase()]=t,a="getKendo"+r+o,o="kendo"+r+o,e.fn[o]=function(i){var r,a=this;return typeof i===bt?(r=Ft.call(arguments,1),this.each(function(){var t,s,l=e.data(this,o);if(!l)throw Error(at.format("Cannot call method '{0}' of {1} before it is initialized",i,o));if(t=l[i],typeof t!==kt)throw Error(at.format("Cannot find method '{0}' of {1}",i,o));return s=t.apply(l,r),s!==n?(a=s,!1):n})):this.each(function(){new t(this,i)}),a},e.fn[a]=function(){return this.data(o)}}}),K={bind:function(){return this}},Q=q.extend({init:function(e,t){q.fn.init.call(this,e,t),this.element.autoApplyNS(),this.wrapper=this.element},destroy:function(){q.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var e=this.element.closest(at.roleSelector("view splitview modalview drawer"));return at.widgetInstance(e,at.mobile.ui)},container:function(){var e=this.element.closest(at.roleSelector("view layout modalview drawer"));return at.widgetInstance(e,at.mobile.ui)||K}}),ot(at.mobile,{init:function(e){at.init(e,at.mobile.ui,at.ui,at.dataviz.ui)},ui:{Widget:Q,roles:{},plugin:function(e){at.ui.plugin(e,at.mobile.ui,"Mobile")}}}),at.touchScroller=function(t,n){return e(t).map(function(t,i){return i=e(i),ht.kineticScrollNeeded&&at.mobile.ui.Scroller&&!i.data("kendoMobileScroller")?(i.kendoMobileScroller(n),i.data("kendoMobileScroller")):!1})[0]},at.preventDefault=function(e){e.preventDefault()},at.widgetInstance=function(e,t){var i=t.roles[e.data(at.ns+"role")];return i?e.data("kendo"+i.fn.options.prefix+i.fn.options.name):n},at.onResize=function(t){var n=t;return ht.mobileOS.android&&(n=function(){setTimeout(t,200)}),e(window).on(ht.resize,n),n},at.unbindResize=function(t){e(window).off(ht.resize,t)},at.attrValue=function(e,t){return e.data(at.ns+t)},at.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},e.extend(e.expr[":"],{focusable:function(t){var n=e.attr(t,"tabindex");return w(t,!isNaN(n)&&n>-1)}}),J=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],X="label, input, [data-rel=external]",Z={setupMouseMute:function(){var t,n=0,i=J.length,r=document.documentElement; if(!Z.mouseTrap&&ht.eventCapture)for(Z.mouseTrap=!0,Z.bustClick=!1,Z.captureMouse=!1,t=function(t){Z.captureMouse&&("click"===t.type?Z.bustClick&&!e(t.target).is(X)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};i>n;n++)r.addEventListener(J[n],t,!0)},muteMouse:function(e){Z.captureMouse=!0,e.data.bustClick&&(Z.bustClick=!0),clearTimeout(Z.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(Z.mouseTrapTimeoutID),Z.mouseTrapTimeoutID=setTimeout(function(){Z.captureMouse=!1,Z.bustClick=!1},400)}},et={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},ht.touch&&(ht.mobileOS.ios||ht.mobileOS.android)&&(et={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}),ht.pointers&&(et={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"},e.each({MSPointerEnter:"MSPointerOver",MSPointerLeave:"MSPointerOut"},function(t,n){e.event.special[t]={delegateType:n,bindType:n,handle:function(t){var i,r=this,a=t.relatedTarget,o=t.handleObj;return(!a||a!==r&&!e.contains(r,a))&&(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=n),i}}})),tt=function(e){return et[e]||e},nt=/([^ ]+)/g,at.applyEventMap=function(e,t){return e=e.replace(nt,tt),t&&(e=e.replace(nt,"$1."+t)),e},it=e.fn.on,ot(!0,C,e),C.fn=C.prototype=new e,C.fn.constructor=C,C.fn.init=function(t,n){return n&&n instanceof e&&!(n instanceof C)&&(n=C(n)),e.fn.init.call(this,t,n,rt)},C.fn.init.prototype=C.fn,rt=C(document),ot(C.fn,{handler:function(e){return this.data("handler",e),this},autoApplyNS:function(e){return this.data("kendoNS",e||at.guid()),this},on:function(){var e,t,n,i,r,a,o=this,s=o.data("kendoNS");return 1===arguments.length?it.call(o,arguments[0]):(e=o,t=Ft.call(arguments),typeof t[t.length-1]===Tt&&t.pop(),n=t[t.length-1],i=at.applyEventMap(t[0],s),ht.mouseAndTouchPresent&&i.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(Z.setupMouseMute(),r=2===t.length?null:t[1],a=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,it.call(this,{touchstart:Z.muteMouse,touchend:Z.unMuteMouse},r,{bustClick:a})),typeof n===bt&&(e=o.data("handler"),n=e[n],t[t.length-1]=function(t){n.call(e,t)}),t[0]=i,it.apply(o,t),o)},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),at.jQuery=C,at.eventMap=et,at.timezone=function(){function e(e,t){var n,i,r,a=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,d[a]+1,1,s[0]-24,s[1],s[2],0)),i=c[o.substr(4,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r-(i>r?7:0))):o.indexOf(">=")>=0&&(n=new Date(Date.UTC(e,d[a],o.substr(5),s[0],s[1],s[2],0)),i=c[o.substr(0,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r+(r>i?7:0))):n=new Date(Date.UTC(e,d[a],o,s[0],s[1],s[2],0)),l[e]=n)}function t(t,n,i){var r,a,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]):(r=i.split(":"),a=0,r.length>1&&(a=60*r[0]+Number(r[1])),[-1e6,"max","-","Jan",1,[0,0,0],a,"-"])}function n(e,t,n){var i,r,a;if(t=t[n],!t)throw Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(i=t.length-1;i>=0&&(r=t[i][3],!(r&&e>r));i--);if(a=t[i+1],!a)throw Error('Timezone "'+n+'" not found on '+e+".");return a}function i(e,i,r,a){typeof e!=yt&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var o=n(e,i,a);return{zone:o,rule:t(e,r,o[1])}}function r(e,t){var n,r,a;return"Etc/UTC"==t||"Etc/GMT"==t?0:(n=i(e,this.zones,this.rules,t),r=n.zone,a=n.rule,a?r[0]-a[6]:r[0])}function a(e,t){var n=i(e,this.zones,this.rules,t),r=n.zone,a=n.rule,o=r[2];return o.indexOf("/")>=0?o.split("/")[a&&a[6]?1:0]:o.indexOf("%s")>=0?o.replace("%s",a&&"-"!=a[7]?a[7]:""):o}function o(e,t,n){var i,r;return typeof t==bt&&(t=this.offset(e,t)),typeof n==bt&&(n=this.offset(e,n)),i=e.getTimezoneOffset(),e=new Date(e.getTime()+6e4*(t-n)),r=e.getTimezoneOffset(),new Date(e.getTime()+6e4*(r-i))}function s(e,t){return this.convert(e,e.getTimezoneOffset(),t)}function l(e,t){return this.convert(e,t,e.getTimezoneOffset())}var d={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},c={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};return{zones:{},rules:{},offset:r,convert:o,apply:s,remove:l,abbr:a}}(),at.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 r=t.getHours();i=i||1,n=(n-t.getDay()+7*i)%7,t.setDate(t.getDate()+n),e(t,r)}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 r(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),n=i(e),r=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return r&&t.setHours(n.getHours()+r/60),t}function a(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function o(e){return 60*e.getHours()*f+e.getMinutes()*f+1e3*e.getSeconds()+e.getMilliseconds()}function s(e,t,n){var i,r=o(t),a=o(n);return e&&r!=a?(t>=n&&(n+=h),i=o(e),r>i&&(i+=h),r>a&&(a+=h),i>=r&&a>=i):!0}function l(e,t,n){var i,r=t.getTime(),a=n.getTime();return r>=a&&(a+=h),i=e.getTime(),i>=r&&a>=i}function d(t,n){var i=t.getHours();return t=new Date(t),c(t,n*h),e(t,i),t}function c(e,t,n){var i,r=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-r,e.setTime(e.getTime()+i*f))}function u(){return a(new Date)}function p(e){return a(e).getTime()==u().getTime()}var f=6e4,h=864e5;return{adjustDST:e,dayOfWeek:n,setDayOfWeek:t,getDate:a,isInDateRange:l,isInTimeRange:s,isToday:p,nextDay:function(e){return d(e,1)},previousDay:function(e){return d(e,-1)},MS_PER_DAY:h,MS_PER_MINUTE:f,setTime:c,addDays:d,today:u,firstDayOfMonth:i,lastDayOfMonth:r,getMilliseconds:o}}(),at.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)}}(jQuery,eval),"undefined"==typeof kendo_module&&(kendo_module=function(){}),function(e){var t=window.kendo,n=t.support,i=window.location,r=window.history,a=50,o=/^#*/,s=window.document,l=t.Observable.extend({start:function(e){var t=this;if(e=e||{},t.bind(["change"],e),!t._started){if(t._started=!0,t._pushStateRequested=!!e.pushState,t._pushState=n.pushState&&t._pushStateRequested,t.root=e.root||"/",t._interval=0,t._normalizeUrl())return!0;t.current=t._currentLocation(),t.locations=[t.current],t._listenToLocationChange()}},stop:function(){e(window).unbind(".kendo"),this.unbind("change"),clearInterval(this._interval),this._started=!1},change:function(e){this.bind("change",e)},navigate:function(e,t){var n=this;return"#:back"===e?(r.back(),undefined):(e=e.replace(o,""),n.current!==e&&n.current!==decodeURIComponent(e)&&(t||!n.trigger("change",{url:e}))&&(n._pushState?(r.pushState({},s.title,n._makePushStateUrl(e)),n.current=e):i.hash=n.current=e,n.locations.push(n.current)),undefined)},_normalizeUrl:function(){var e,t=this,a=t.root==i.pathname,l=t._pushStateRequested&&!n.pushState&&!a,d=t._pushState&&a&&i.hash;return l?(i.replace(t.root+"#"+t._stripRoot(i.pathname)),!0):d?(e=t._makePushStateUrl(i.hash.replace(o,"")),r.replaceState({},s.title,e),!1):!1},_listenToLocationChange:function(){var t=this,i=e.proxy(t._checkUrl,t);this._pushState?e(window).bind("popstate.kendo",i):n.hashChange?e(window).bind("hashchange.kendo",i):t._interval=setInterval(i,a)},_checkUrl:function(){var e=this,t=e._currentLocation().replace(o,""),n=t===e.locations[e.locations.length-2];if(e.current!==t&&e.current!==decodeURIComponent(t)){if(e.trigger("change",{url:t}))return n?r.forward():r.back(),undefined;e.current=t,n?e.locations.pop():e.locations.push(t)}},_stripRoot:function(e){var t=this;return 0===e.indexOf(t.root)?e.substr(t.root.length).replace(/\/\//g,"/"):e},_makePushStateUrl:function(e){var t=this,n=RegExp("^"+t.root,"i");return n.test(e)||(e=(t.root+e).replace(/\/\//g,"/")),i.protocol+"//"+i.host+e},_currentLocation:function(){var e,t=this;return t._pushState?(e=i.pathname,i.search&&(e+=i.search),t._stripRoot(e)):i.hash.replace(o,"")}});t.history=new l}(window.kendo.jQuery),function(){function e(e,t){return t?e:"([^/]+)"}function t(t){return RegExp("^"+t.replace(u,"\\$&").replace(l,"(?:$1)?").replace(d,e).replace(c,"(.*?)")+"$")}var n=window.kendo,i=n.history,r=n.Observable,a="init",o="routeMissing",s="change",l=/\((.*?)\)/g,d=/(\(\?)?:\w+/g,c=/\*\w+/g,u=/[\-{}\[\]+?.,\\\^$|#\s]/g,p=n.Class.extend({init:function(e,n){e instanceof RegExp||(e=t(e)),this.route=e,this._callback=n},callback:function(e){for(var t=this.route.exec(e).slice(1),n=0,i=t.length;i>n;n++)void 0!==t[n]&&(t[n]=decodeURIComponent(t[n]));this._callback.apply(null,t)},worksWith:function(e){return this.route.test(e)?(this.callback(e),!0):!1}}),f=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([a,o,s],e)},destroy:function(){i.unbind("change",this._urlChangedProxy),this.unbind()},start:function(){var e,t=this,n=function(e){t._urlChanged(e)};i.start({change:n,pushState:t.pushState,root:t.root}),e={url:i.current||"/"},t.trigger(a,e)||t._urlChanged(e),this._urlChangedProxy=n},route:function(e,t){this.routes.push(new p(e,t))},navigate:function(e,t){n.history.navigate(e,t)},_urlChanged:function(e){var t,n,i,r,a=e.url;if(a||(a="/"),this.trigger(s,{url:e.url}))return e.preventDefault(),void 0;for(n=0,i=this.routes,r=i.length;r>n;n++)if(t=i[n],t.worksWith(a))return;this.trigger(o,{url:a})&&e.preventDefault()}});n.Router=f}(),function(e){var t=window.kendo,n=t.Observable,i="SCRIPT",r="init",a="show",o="hide",s=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([r,a,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(r)),n&&i.trigger(a),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,r=this;return n=e(document.getElementById(r.content)||r.content),t=e("<"+r.tagName+" />").append(n[0].tagName===i?n.html():n),r._wrap||(t=t.contents()),t}}),l=s.extend({init:function(e,t){s.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=l,t.View=s}(window.kendo.jQuery),function(e,t){function n(e){return parseInt(e,10)}function i(e,t){return n(e.css(t))}function r(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=C.parseEffects(t),e}function a(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==U.indexOf(t)&&delete e[t];return e}function s(e,t){var n,i,r,a,o=[],s={};for(i in t)n=i.toLowerCase(),a=H&&-1!=V.indexOf(n),!E.hasHW3D&&a&&-1==U.indexOf(n)?delete t[i]:(r=t[i],a?o.push(i+"("+r+")"):s[i]=r);return o.length&&(s[ot]=o.join(" ")),s}function l(e,t){var i,r,a;return H?(i=e.css(ot),i==K?"scale"==t?1:0:(r=i.match(RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),a=0,r?a=n(r[1]):(r=i.match(N)||[0,0,0,0,0],t=t.toLowerCase(),P.test(t)?a=parseFloat(r[3]/r[2]):"translatey"==t?a=parseFloat(r[4]/r[2]):"scale"==t?a=parseFloat(r[2]):"rotate"==t&&(a=parseFloat(Math.atan2(r[2],r[1])))),a)):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;T[d(e)]=n,T.Element.prototype[e]=function(e,t,i,r){return new n(this.element,e,t,i,r)},S(i,function(t,i){T.Element.prototype[e+d(i)]=function(e,t,r){return new n(this.element,i,e,t,r)}})}function u(e,t,n){c(e,{directions:v,restore:[t],startValue:function(e){return this._startValue=e,this},endValue:function(e){return this._endValue=e,this},shouldHide:function(){return"out"===this._direction?!this._reverse:this._reverse},_end:function(){return this._endValue||n},_start:function(){return this._startValue||1},prepare:function(e,n){var i=this,r=i.element.data(t),a=i.shouldHide(),o=isNaN(r)||""===r?i._start():r;e[t]=n[t]=i._end(),a?e[t]=o:n[t]=o}})}function p(e,t){var n=C.directions[t].vertical,i=e[n?X:J]()/2+"px";return k[t].replace("$size",i)}var f,h,m,g,v,_,k,b,y,w,x,C=window.kendo,T=C.effects,S=e.each,D=e.extend,F=e.proxy,E=C.support,I=E.browser,H=E.transforms,A=E.transitions,z={scale:0,scalex:0,scaley:0,scale3d:0},M={translate:0,translatex:0,translatey:0,translate3d:0},R=t!==document.documentElement.style.zoom&&!H,N=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,O=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,P=/translatex?$/i,B=/(zoom|fade|expand)(\w+)/,L=/(zoom|fade|expand)/,W=/[xy]$/i,V=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],U=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],q={rotate:"deg",scale:"",skew:"px",translate:"px"},j=H.css,G=Math.round,Y="",$="px",K="none",Q="auto",J="width",X="height",Z="hidden",et="origin",tt="abortId",nt="overflow",it="translate",rt="completeCallback",at=j+"transition",ot=j+"transform",st=j+"backface-visibility",lt=j+"perspective",dt="1500px",ct="perspective("+dt+")",ut={left:{reverse:"right",property:"left",transition:"translatex",vertical:!1,modifier:-1},right:{reverse:"left",property:"left",transition:"translatex",vertical:!1,modifier:1},down:{reverse:"up",property:"top",transition:"translatey",vertical:!0,modifier:1},up:{reverse:"down",property:"top",transition:"translatey",vertical:!0,modifier:-1},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out",modifier:-1},out:{reverse:"in",modifier:1},vertical:{reverse:"vertical"},horizontal:{reverse:"horizontal"}};C.directions=ut,D(e.fn,{kendoStop:function(e,t){return A?T.stopQueue(this,e||!1,t||!1):this.stop(e,t)}}),H&&!A&&(S(U,function(n,i){e.fn[i]=function(n){if(t===n)return l(this,i);var r=e(this)[0],a=i+"("+n+q[i.replace(W,"")]+")";return-1==r.style.cssText.indexOf(ot)?e(this).css(ot,a):r.style.cssText=r.style.cssText.replace(RegExp(i+"\\(.*?\\)","i"),a),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!=U.indexOf(this.prop)?parseFloat(e(this.elem)[this.prop]()):f.apply(this,arguments)}),C.toggleClass=function(e,t,n,i){return t&&(t=t.split(" "),A&&(n=D({exclusive:"all",duration:400,ease:"ease-out"},n),e.css(at,n.exclusive+" "+n.duration+"ms "+n.ease),setTimeout(function(){e.css(at,"").css(X)},n.duration)),S(t,function(t,n){e.toggleClass(n,i)})),e},C.parseEffects=function(e,t){var n={};return"string"==typeof e?S(e.split(" "),function(e,i){var r=!L.test(i),a=i.replace(B,function(e,t,n){return t+":"+n.toLowerCase()}),o=a.split(":"),s=o[1],l={};o.length>1&&(l.direction=t&&r?ut[s].reverse:s),n[o[0]]=l}):S(e,function(e){var i=this.direction;i&&t&&!L.test(e)&&(this.direction=ut[i].reverse),n[e]=this}),n},A&&D(T,{transition:function(t,n,i){var r,o,l,d,c=0,u=t.data("keys")||[];i=D({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,d=function(){l||(l=!0,o&&(clearTimeout(o),o=null),t.removeData(tt).dequeue().css(at,"").css(at),i.complete.call(t))},i.duration=e.fx?e.fx.speeds[i.duration]||i.duration:i.duration,r=s(t,n),e.merge(u,a(r)),t.data("keys",e.unique(u)).height(),t.css(at,i.exclusive+" "+i.duration+"ms "+i.ease).css(at),t.css(r).css(ot),A.event&&(t.one(A.event,d),0!==i.duration&&(c=500)),o=setTimeout(d,i.duration+c),t.data(tt,o),t.data(rt,d)},stopQueue:function(e,t,n){var i,r=e.data("keys"),a=!n&&r,o=e.data(rt);return a&&(i=C.getComputedStyles(e[0],r)),o&&o(),a&&e.css(i),e.removeData("keys").stop(t)}}),h=C.Class.extend({init:function(e,t){var n=this;n.element=e,n.effects=[],n.options=t,n.restore=[]},run:function(t){var n,i,r,a,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(),r=0,d=l.length;d>r;r++)l[r].duration(h.duration).run();for(c in h.effects)D(v,h.effects[c].properties);for(f.is(":visible")||D(g,{display:f.data("olddisplay")||"block"}),H&&!h.reset&&(a=f.data("targetTransform"),a&&(g=D(a,g))),g=s(f,g),H&&!A&&(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),T.animate(f,v,D({},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,r=e.length;r>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,r=t.options,a=t.effects,o=a.length;for(i.removeData("animating").dequeue(),r.hide&&i.data("olddisplay",i.css("display")).hide(),this.restoreCallback(),R&&!H&&setTimeout(e.proxy(this,"restoreCallback"),0);o>n;n++)a[n].teardown();r.completeCallback&&r.completeCallback(i)}}),T.promise=function(e,t){var n,i,r,a=[],o=new h(e,t),s=C.parseEffects(t.effects);t.effects=s;for(r in s)n=T[d(r)],n&&(i=new n(e,s[r].direction),a.push(i));a[0]?o.run(a):(e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.init&&t.init(),e.dequeue(),o.complete())},T.transitionPromise=function(e,t,n){return T.animateTo(e,t,n),e},D(T,{animate:function(n,r,a){var s=a.transition!==!1;delete a.transition,A&&"transition"in T&&s?T.transition(n,r,a):H?n.animate(o(r),{queue:!1,show:!1,hide:!1,duration:a.duration,complete:a.complete}):n.each(function(){var n=e(this),o={};S(V,function(e,a){var s,l,d,c,u,p,f,h=r?r[a]+" ":null;h&&(l=r,a in z&&r[a]!==t?(s=h.match(O),H&&D(l,{scale:+s[0]})):a in M&&r[a]!==t&&(d=n.css("position"),c="absolute"==d||"fixed"==d,n.data(it)||(c?n.data(it,{top:i(n,"top")||0,left:i(n,"left")||0,bottom:i(n,"bottom"),right:i(n,"right")}):n.data(it,{top:i(n,"marginTop")||0,left:i(n,"marginLeft")||0})),u=n.data(it),s=h.match(O),s&&(p=a==it+"y"?0:+s[1],f=a==it+"y"?+s[1]:+s[2],c?(isNaN(u.right)?isNaN(p)||D(l,{left:u.left+p}):isNaN(p)||D(l,{right:u.right-p}),isNaN(u.bottom)?isNaN(f)||D(l,{top:u.top+f}):isNaN(f)||D(l,{bottom:u.bottom-f})):(isNaN(p)||D(l,{marginLeft:u.left+p}),isNaN(f)||D(l,{marginTop:u.top+f})))),!H&&"scale"!=a&&a in l&&delete l[a],l&&D(o,l))}),I.msie&&delete o.scale,n.animate(o,{queue:!1,show:!1,hide:!1,duration:a.duration,complete:a.complete})})},animateTo:function(t,n,i){function a(e){n[0].style.cssText="",t[0].style.cssText="",E.mobileOS.android||l.css(nt,s),i.completeCallback&&i.completeCallback.call(t,e)}var o,s,l=t.parents().filter(n.parents()).first();i=r(i),E.mobileOS.android||(s=l.css(nt),l.css(nt,"hidden")),e.each(i.effects,function(e,t){o=o||t.direction}),i.complete=I.msie?function(){setTimeout(a,0)}:a,i.previous=i.reverse?n:t,i.reset=!0,(i.reverse?t:n).each(function(){e(this).kendoAnimate(D(!0,{},i)),i.complete=null,i.previous=null})}}),m=C.Class.extend({init:function(e,t){var n=this;n.element=e,n._direction=t,n.options={},n._additionalEffects=[],n.restore||(n.restore=[])},reverse:function(){return this._reverse=!0,this.run()},play:function(){return this._reverse=!1,this.run()},add:function(e){return this._additionalEffects.push(e),this},direction:function(e){return this._direction=e,this},duration:function(e){return this._duration=e,this},compositeRun:function(){var e=this,t=new 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,r=i.element,a=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")),r.data("animating",!0),a=0;d>a;a++)t=l[a],r.data(t)||r.data(t,r.css(t));for(a=0;h>a;a++)f[a].duration(i._duration).run();return i.prepare(u,p),r.is(":visible")||D(u,{display:r.data("olddisplay")||"block"}),H&&(n=r.data("targetTransform"),n&&(u=D(n,u))),u=s(r,u),H&&!A&&(u=o(u)),r.css(u).css(ot),i.setup(),r.data("targetTransform",p),T.animate(r,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(),R&&!H&&setTimeout(e.proxy(t,"restoreCallback"),0),t.teardown()},setOptions:function(e){D(!0,this.options,e)},children:function(){return[]},shouldHide:e.noop,setup:e.noop,prepare:e.noop,teardown:e.noop,directions:[],setReverse:function(e){return this._reverse=e,this}}),g=["left","right","up","down"],v=["in","out"],c("slideIn",{directions:g,prepare:function(e,t){var n,i=this,r=i.element,a=ut[i._direction],o=-a.modifier*(a.vertical?r.outerHeight():r.outerWidth()),s=o/(i.options&&i.options.divisor||1)+$,l="0px";i._reverse&&(n=e,e=t,t=n),H?(e[a.transition]=s,t[a.transition]=l):(e[a.property]=s,t[a.property]=l)}}),c("tile",{directions:g,init:function(e,t,n){m.prototype.init.call(this,e,t),this.options={previous:n}},children:function(){var e=this,t=e._reverse,n=e.options.previous,i=e._direction,r=[C.fx(e.element).slideIn(i).setReverse(t)];return n&&r.push(C.fx(n).slideIn(ut[i].reverse).setReverse(!t)),r}}),u("fade","opacity",0),u("zoom","scale",.01),c("slideMargin",{prepare:function(e,t){var n,i=this,r=i.element,a=i.options,o=r.data(et),s=a.offset,l=i._reverse;l||null!==o||r.data(et,parseFloat(r.css("margin-"+a.axis))),n=r.data(et)||0,t["margin-"+a.axis]=l?n:n+s}}),c("slideTo",{prepare:function(e,t){var n=this,i=n.element,r=n.options,a=r.offset.split(","),o=n._reverse;H?(t.translatex=o?0:a[0],t.translatey=o?0:a[1]):(t.left=o?0:a[0],t.top=o?0:a[1]),i.css("left")}}),c("expand",{directions:["horizontal","vertical"],restore:[nt],prepare:function(e,n){var i=this,r=i.element,a=i.options,o=i._reverse,s="vertical"===i._direction?X:J,l=r[0].style[s],d=r.data(s),c=parseFloat(d||l),u=G(r.css(s,Q)[s]());e.overflow=Z,c=a&&a.reset?u||c:c||u,n[s]=(o?0:c)+$,e[s]=(o?c:0)+$,d===t&&r.data(s,l)},shouldHide:function(){return this._reverse},teardown:function(){var e=this,t=e.element,n="vertical"===e._direction?X:J,i=t.data(n);(i==Q||i===Y)&&setTimeout(function(){t.css(n,Q).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,r,a,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();D(e,_),t.scale=1,v.css(ot,"scale(1)").css(ot),n=v.offset(),v.css(ot,"scale("+w+")"),i=0,r=0,a=x.left-n.left,o=x.top-n.top,s=i+v.outerWidth(),d=r,c=a+y.outerWidth(),u=o,p=(o-r)/(a-i),f=(u-d)/(c-s),h=(r-d-p*i+f*s)/(f-p),m=r+p*(h-i),e.top=n.top,e.left=n.left,e.transformOrigin=h+$+" "+m+$,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,r=i?ut[n._direction].reverse:n._direction,a=b[r];e.zIndex=1,n._clipInHalf&&(e.clip=p(n._container,C.directions[r].reverse)),e[st]=Z,t[ot]=ct+(i?a.start:a.end),e[ot]=ct+(i?a.end:a.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?ut[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",r=C.directions[i].reverse,a=t._reverse,o=n.face.clone(!0).removeAttr("id"),s=n.back.clone(!0).removeAttr("id"),l=t.element;return a&&(e=i,i=r,r=e),[C.fx(n.face).staticPage(i,l).face(!0).setReverse(a),C.fx(n.back).staticPage(r,l).setReverse(a),C.fx(o).turningPage(i,l).face(!0).clipInHalf(!0).temporary().setReverse(a),C.fx(s).turningPage(r,l).clipInHalf(!0).temporary().setReverse(a)]},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",r=C.directions[i].reverse,a=t._reverse,o=t.element;return a&&(e=i,i=r,r=e),[C.fx(n.face).turningPage(i,o).face(!0).setReverse(a),C.fx(n.back).turningPage(r,o).setReverse(a)]},prepare:function(e){e[lt]=dt,e.transformStyle="preserve-3d"}}),y=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},w=C.Class.extend({init:function(){var e=this;e._tickProxy=F(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,y(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()):y(e._tickProxy))}}),x=w.extend({init:function(e){var t=this;D(t,e),w.fn.init.call(t)},done:function(){return this.timePassed()>=this.duration},timePassed:function(){return Math.min(this.duration,Date.now()-this.startDate)},moveTo:function(e){var t=this,n=t.movable;t.initial=n[t.axis],t.delta=e.location-t.initial,t.duration=e.duration||300,t.tick=t._easeProxy(e.ease),t.startDate=Date.now(),t.start()},_easeProxy:function(e){var t=this;return function(){t.movable.moveAxis(t.axis,e(t.timePassed(),t.initial,t.delta,t.duration))}}}),D(x,{easeOutExpo:function(e,t,n,i){return e==i?t+n:n*(-Math.pow(2,-10*e/i)+1)+t},easeOutBack:function(e,t,n,i,r){return r=1.70158,n*((e=e/i-1)*e*((r+1)*e+r)+1)+t}}),T.animationFrame=function(e){y.call(window,e)},T.Animation=w,T.Transition=x,T.createEffect=c}(window.kendo.jQuery),function(e,t){function n(r){var o,s,l,d,c,u,p,f,h=[],m=r.logic||"and",g=r.filters;for(o=0,s=g.length;s>o;o++)r=g[o],l=r.field,p=r.value,u=r.operator,r.filters?r=n(r):(f=r.ignoreCase,l=l.replace(/\./g,"/"),r=a[u],r&&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}",r.length>3?"substringof"!==r?c="{0}({2},"+c+")":(c="{0}("+c+",{2})","doesnotcontain"===u&&(c+=" eq false")):c="{2} {0} "+c,r=i.format(c,r,p,l))),h.push(r);return r=h.join(" "+m+" "),h.length>1&&(r="("+r+")"),r}var i=window.kendo,r=e.extend,a={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"}};r(!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,r,a,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(a in e)o[a]?o[a](n,e[a]):n[a]=e[a]}else{if("json"!==l)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(a in e)r=e[a],"number"==typeof r&&(e[a]=r+"");n=i.stringify(e)}}return n}}}})}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.isArray,r=e.isPlainObject,a=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&&(r(p)&&(p.fields&&o(p.fields,function(e,t){t=r(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,a(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,r,a,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(r=e.firstChild;r;r=r.nextSibling)a=r.nodeType,3===a||4===a?c["#text"]=r.nodeValue:1===a&&(n=this.parseDOM(r),o=r.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,r,a,o,s,l=t.split(".");n=l.shift();)if(e=e[n],i(e)){for(r=[],t=l.join("."),s=0,a=e.length;a>s;s++)o=this.evaluate(e[s],t),o=i(o)?o:[o],r.push.apply(r,o);return r}return e},parse:function(t){var n,i,r={};return n=t.documentElement||e.parseXML(t).documentElement,i=this.parseDOM(n),r[n.nodeName]=i,r},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(r){var a,o={};for(a in r)o[a]=r[a];o.field=i?n+"."+r.field:n,e.trigger(t,o),t==gt&&e._notifyChange&&e._notifyChange(o)}}function i(t,n){if(t===n)return!0;var r,a=e.type(t),o=e.type(n);if(a!==o)return!1;if("date"===a)return t.getTime()===n.getTime();if("object"!==a&&"array"!==a)return!1;for(r in t)if(!i(t[r],n[r]))return!1;return!0}function r(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 a(e){this.data=e||[]}function o(e,n){if(e){var i=typeof e===ct?{field:e,dir:n}:e,r=nt(i)?i:i!==t?[i]:[];return it(r,function(e){return!!e.dir})}}function s(e){var t,n,i,r,a=e.filters;if(a)for(t=0,n=a.length;n>t;t++)i=a[t],r=i.operator,r&&typeof r===ct&&(i.operator=B[r.toLowerCase()]||r),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===ct?{field:e,dir:n}:e,r=nt(i)?i:i!==t?[i]:[];return R(r,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,r){var a,o,s,l,d;for(t=t||[],l=t.length,a=0;l>a;a++)o=t[a],s=o.aggregate,d=o.field,e[d]=e[d]||{},e[d][s]=L[s.toLowerCase()](e[d][s],n,st.accessor(d),i,r)}function f(e){var t,n=e.length,i=Array(n);for(t=0;n>t;t++)i[t]=e[t].toJSON();return i}function h(e,t){t=t||{};var n=new a(e),i=t.aggregate,r=t.filter;return r&&(n=n.filter(r)),n.aggregate(i)}function m(e,t,n,i,r){var a,o,s,l,d;for(l=0,d=e.length;d>l;l++){a=e[l];for(o in t)s=r[o],s&&s!==o&&(a[s]=t[o](a),delete a[o])}}function g(e,t,n,i,r){var a,o,s,l,d;for(l=0,d=e.length;d>l;l++){a=e[l];for(o in t)a[o]=n._parse(o,t[o](a)),s=r[o],s&&s!==o&&delete a[s]}}function v(e,t,n,i,r){var a,o,s,l;for(o=0,l=e.length;l>o;o++)a=e[o],s=i[a.field],s&&s!=a.field&&(a.field=s),a.value=n._parse(a.field,a.value),a.hasSubgroups?v(a.items,t,n,i,r):g(a.items,t,n,i,r)}function _(e,t,n,i,r,a){return function(o){return o=e(o),o&&!tt(i)&&("[object Array]"===Rt.call(o)||o instanceof Lt||(o=[o]),n(o,i,new t,r,a)),o||[]}}function k(e,t,n,i){for(var r,a,o=0;t.length&&i&&(r=t[o],a=r.items,e&&e.field===r.field&&e.value===r.value?(e.hasSubgroups&&e.items.length?k(e.items[e.items.length-1],r.items,n,i):(a=a.slice(n,i),i-=a.length,e.items=e.items.concat(a)),t.splice(o--,1)):(a=a.slice(n,i),i-=a.length,r.items=a,r.items.length||t.splice(o--,1)),n=0,!(++o>=t.length)););}function b(e){var t,n,i=[];for(t=0,n=e.length;n>t;t++)i=e[t].hasSubgroups?i.concat(b(e[t].items)):i.concat(e[t].items.slice());return i}function y(e,t){var n,i,r,a;if(t)for(n=0,i=e.length;i>n;n++)r=e[n],a=r.items,r.hasSubgroups?y(a,t):!a.length||a[0]instanceof t||(a.type=t,a.wrapAll(a,a))}function w(e,t){var n,i;for(n=0,i=e.length;i>n;n++)if(e[n].hasSubgroups){if(w(e[n].items,t))return!0}else if(t(e[n].items,e[n]))return!0}function x(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 C(e,t){var n,i,r,a;for(r=e.length-1,a=0;r>=a;r--)i=e[r],n={value:t.get(i.field),field:i.field,items:n?[n]:[t],hasSubgroups:!!n,aggregates:{}};return n}function T(e,t){return t?D(e,function(e){return e[t.idField]===t.id}):-1}function S(e,t){return t?D(e,function(e){return e.uid==t.uid}):-1}function D(e,t){var n,i;for(n=0,i=e.length;i>n;n++)if(t(e[n]))return n;return-1}function F(e,t){if(e&&!tt(e)){var n=e[t];return et(n)?n.from||n.field||t:e[t]}return t}function E(e,t){var n,i,r,a={};for(r in e)"filters"!==r&&(a[r]=e[r]);if(e.filters&&e.filters.length)for(a.filters=[],n=0,i=e.filters.length;i>n;n++)a.filters[n]=E(e.filters[n],t);else a.field=F(t.fields,a.field);return a}function I(e,t){var n,i,r,a,o,s=[];for(n=0,i=e.length;i>n;n++){r={},a=e[n];for(o in a)r[o]=a[o];r.field=F(t.fields,r.field),r.aggregates&&nt(r.aggregates)&&(r.aggregates=I(r.aggregates,t)),s.push(r)}return s}function H(t,n){var i,r,a,o,s,l=e(t)[0].children,d=[],c=n[0],u=n[1];for(i=0,r=l.length;r>i;i++)a={},s=l[i],s.disabled||(a[c.field]=s.text,o=s.attributes.value,o=o&&o.specified?s.value:s.text,a[u.field]=o,d.push(a));return d}function A(t,n){var i,r,a,o,s,l,d,c=e(t)[0].tBodies[0],u=c?c.rows:[],p=n.length,f=[];for(i=0,r=u.length;r>i;i++){for(s={},d=!0,o=u[i].cells,a=0;p>a;a++)l=o[a],"th"!==l.nodeName.toLowerCase()&&(d=!1,s[n[a].field]=l.innerHTML);d||f.push(s)}return f}function z(e){return function(){var t=this._data,n=j.fn[e].apply(this,zt.call(arguments));return this._data!=t&&this._attachBubbleHandlers(),n}}function M(t,n){var i,r,a,o,s,l,d,c,u=e(t).children(),p=[],f=n[0].field,h=n[1]&&n[1].field,m=n[2]&&n[2].field,g=n[3]&&n[3].field;for(i=0,r=u.length;r>i;i++)a={_loaded:!0},o=u.eq(i),l=o[0].firstChild,c=o.children(),t=c.filter("ul"),c=c.filter(":not(ul)"),s=o.attr("data-id"),s&&(a.id=s),l&&(a[f]=3==l.nodeType?l.nodeValue:c.text()),h&&(a[h]=c.find("a").attr("href")),g&&(a[g]=c.find("img").attr("src")),m&&(d=c.find(".k-sprite").prop("className"),a[m]=d&&e.trim(d.replace("k-sprite",""))),t.length&&(a.items=M(t.eq(0),n)),"true"==o.attr("data-hasChildren")&&(a.hasChildren=!0),p.push(a);return p}var R,N,O,P,B,L,W,V,U,q,j,G,Y,$,K,Q,J=e.extend,X=e.proxy,Z=e.isFunction,et=e.isPlainObject,tt=e.isEmptyObject,nt=e.isArray,it=e.grep,rt=e.ajax,at=e.each,ot=e.noop,st=window.kendo,lt=st.Observable,dt=st.Class,ct="string",ut="function",pt="create",ft="read",ht="update",mt="destroy",gt="change",vt="sync",_t="get",kt="error",bt="requestStart",yt="progress",wt="requestEnd",xt=[pt,ft,ht,mt],Ct=function(e){return e},Tt=st.getter,St=st.stringify,Dt=Math,Ft=[].push,Et=[].join,It=[].pop,Ht=[].splice,At=[].shift,zt=[].slice,Mt=[].unshift,Rt={}.toString,Nt=st.support.stableSort,Ot=/^\/Date\((.*?)\)\/$/,Pt=/(\r+|\n+)/g,Bt=/(?=['\\])/g,Lt=lt.extend({init:function(e,t){var n=this;n.type=t||Wt,lt.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,r=this,a=function(){return r};for(t=t||[],n=0,i=e.length;i>n;n++)t[n]=r.wrap(e[n],a);return t},wrap:function(e,t){var n,i=this;return null!==e&&"[object Object]"===Rt.call(e)&&(n=e instanceof i.type||e instanceof qt,n||(e=e instanceof Wt?e.toJSON():e,e=new i.type(e)),e.parent=t,e.bind(gt,function(e){i.trigger(gt,{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=Ft.apply(this,n),this.trigger(gt,{action:"add",index:t,items:n}),e},slice:zt,join:Et,pop:function(){var e=this.length,t=It.apply(this);return e&&this.trigger(gt,{action:"remove",index:e-1,items:[t]}),t},splice:function(e,t,n){var i,r,a,o=this.wrapAll(zt.call(arguments,2));if(i=Ht.apply(this,[e,t].concat(o)),i.length)for(this.trigger(gt,{action:"remove",index:e,items:i}),r=0,a=i.length;a>r;r++)i[r].children&&i[r].unbind(gt);return n&&this.trigger(gt,{action:"add",index:e,items:o}),i},shift:function(){var e=this.length,t=At.apply(this);return e&&this.trigger(gt,{action:"remove",index:0,items:[t]}),t},unshift:function(){var e,t=this.wrapAll(arguments);return e=Mt.apply(this,t),this.trigger(gt,{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=[],r=this.length;r>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)}}),Wt=lt.extend({init:function(e){var t,n,i=this,r=function(){return i};lt.fn.init.call(this);for(n in e)t=e[n],"_"!=n.charAt(0)&&(t=i.wrap(t,n,r)),i[n]=t;i.uid=st.guid()},shouldSerialize:function(e){return this.hasOwnProperty(e)&&"_events"!==e&&typeof this[e]!==ut&&"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 Lt)&&(e=e.toJSON()),n[t]=e);return n},get:function(e){var t,n=this;return n.trigger(_t,{field:e}),t="this"===e?n:st.getter(e,!0)(n)},_set:function(e,t){var n,i,r,a=this,o=e.indexOf(".")>=0;if(o)for(n=e.split("."),i="";n.length>1;){if(i+=n.shift(),r=st.getter(i,!0)(a),r instanceof Wt)return r.set(n.join("."),t),o;i+="."}return st.setter(e)(a,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(gt,{field:e}))},parent:ot,wrap:function(e,t,i){var r,a,o=this,s=Rt.call(e);return null==e||"[object Object]"!==s&&"[object Array]"!==s||(r=e instanceof Lt,a=e instanceof j,"[object Object]"!==s||a||r?("[object Array]"===s||r||a)&&(r||a||(e=new Lt(e)),e.parent()!=i()&&e.bind(gt,n(o,gt,t,!1))):(e instanceof Wt||(e=new Wt(e)),e.parent()!=i()&&(e.bind(_t,n(o,_t,t,!0)),e.bind(gt,n(o,gt,t,!0)))),e.parent=i),e}}),Vt={number:function(e){return st.parseFloat(e)},date:function(e){return st.parseDate(e)},"boolean":function(e){return typeof e===ct?"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return null!=e?e+"":e},"default":function(e){return e}},Ut={string:"",number:0,date:new Date,"boolean":!1,"default":""},qt=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,a=e,o=i.fields||{};return e=o[e],e||(e=r(o,a)),e&&(n=e.parse,!n&&e.type&&(n=Vt[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 r=this;r.editable(e)&&(t=r._parse(e,t),i(t,r.get(e))||(r.dirty=!0,Wt.fn.set.call(r,e,t,n)))},accept:function(e){var t,n=this,i=function(){return n};for(t in e)n._set(t,n.wrap(e[t],t,i));n.idField&&(n.id=n.get(n.idField)),n.dirty=!1},isNew:function(){return this.id===this._defaultId}});qt.define=function(e,n){n===t&&(n=e,e=qt);var i,r,a,o,s,l,d,c,u=J({defaults:{}},n),p={},f=u.id;if(f&&(u.idField=f),u.id&&delete u.id,f&&(u.defaults[f]=u._defaultId=""),"[object Array]"===Rt.call(u.fields)){for(l=0,d=u.fields.length;d>l;l++)a=u.fields[l],typeof a===ct?p[a]={}:a.field&&(p[a.field]=a);u.fields=p}for(r in u.fields)a=u.fields[r],o=a.type||"default",s=null,c=r,r=typeof a.field===ct?a.field:r,a.nullable||(s=u.defaults[c!==r?c:r]=a.defaultValue!==t?a.defaultValue:Ut[o.toLowerCase()]),n.id===r&&(u._defaultId=s),u.defaults[c!==r?c:r]=s,a.parse=a.parse||Vt[o];return i=e.extend(u),i.define=function(e){return qt.define(i,e)},u.fields&&(i.fields=u.fields,i.idField=u.idField),i},N={selector:function(e){return Z(e)?e:Tt(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,r,a=e[0](t,n);for(i=1,r=e.length;r>i;i++)a=a||e[i](t,n);return a}}},O=J({},N,{asc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),r=t(n);return i&&i.getTime&&r&&r.getTime&&(i=i.getTime(),r=r.getTime()),i===r?e.__position-n.__position:null==i?-1:null==r?1:i.localeCompare?i.localeCompare(r):i>r?1:-1}},desc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),r=t(n);return i&&i.getTime&&r&&r.getTime&&(i=i.getTime(),r=r.getTime()),i===r?e.__position-n.__position:null==i?1:null==r?-1:r.localeCompare?r.localeCompare(i):r>i?1:-1}},create:function(e){return this[e.dir](e.field)}}),R=function(e,t){var n,i=e.length,r=Array(i);for(n=0;i>n;n++)r[n]=t(e[n],n,e);return r},P=function(){function e(e){return e.replace(Bt,"\\").replace(Pt,"")}function t(t,n,i,r){var a;return null!=i&&(typeof i===ct&&(i=e(i),a=Ot.exec(i),a?i=new Date(+a[1]):r?(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"}}}(),a.filterExpr=function(e){var n,i,r,o,s,l,d=[],c={and:" && ",or:" || "},u=[],p=[],f=e.filters;for(n=0,i=f.length;i>n;n++)r=f[n],s=r.field,l=r.operator,r.filters?(o=a.filterExpr(r),r=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===ut?(o="__f["+u.length+"](d)",u.push(s)):o=st.expr(s),typeof l===ut?(r="__o["+p.length+"]("+o+", "+r.value+")",p.push(l)):r=P[(l||"eq").toLowerCase()](o,r.value,r.ignoreCase!==t?r.ignoreCase:!0)),d.push(r);return{expression:"("+d.join(c[e.logic])+")",fields:u,operators:p}},B={"==":"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"},a.normalizeFilter=l,a.prototype={toArray:function(){return this.data},range:function(e,t){return new a(this.data.slice(e,e+t))},skip:function(e){return new a(this.data.slice(e))},take:function(e){return new a(this.data.slice(0,e))},select:function(e){return new a(R(this.data,e))},order:function(e,t){var n={dir:t};return e&&(e.compare?n.compare=e.compare:n.field=e),new a(this.data.slice(0).sort(N.create(n)))},orderBy:function(e){return this.order(e,"asc")},orderByDescending:function(e){return this.order(e,"desc")},sort:function(e,t,n){var i,r,a=o(e,t),s=[];if(n=n||N,a.length){for(i=0,r=a.length;r>i;i++)s.push(n.create(a[i]));return this.orderBy({compare:n.combine(s)})}return this},filter:function(e){var t,n,i,r,o,s,d,c,u=this.data,p=[];if(e=l(e),!e||0===e.filters.length)return this;for(r=a.filterExpr(e),s=r.fields,d=r.operators,o=c=Function("d, __f, __o","return "+r.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 a(p)},group:function(e,t){e=c(e||[]),t=t||this.data;var n,i=this,r=new a(i.data);return e.length>0&&(n=e[0],r=r.groupBy(n).select(function(i){var r=new a(t).filter([{field:i.field,operator:"eq",value:i.value}]);return{field:i.field,value:i.value,items:e.length>1?new a(i.items).group(e.slice(1),r.toArray()).toArray():i.items,hasSubgroups:e.length>1,aggregates:r.aggregate(n.aggregates)}})),r},groupBy:function(e){if(tt(e)||!this.data.length)return new a([]);var t,n,i,r,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,r=s.length;r>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 a(p)},_sortForGrouping:function(e,t){var n,i,r=this.data;if(!Nt){for(n=0,i=r.length;i>n;n++)r[n].__position=n;for(r=new a(r).sort(e,t,O).toArray(),n=0,i=r.length;i>n;n++)delete r[n].__position;return r}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}},L={sum:function(e,t,n){return(e||0)+n.get(t)},count:function(e){return(e||0)+1},average:function(e,t,n,i,r){return e=(e||0)+n.get(t),i==r-1&&(e/=r),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 e=e||i,e>i&&(e=i),e}},a.process=function(e,n){n=n||{};var i,r=new a(e),s=n.group,l=c(s||[]).concat(o(n.sort||[])),d=n.filter,u=n.skip,p=n.take;return d&&(r=r.filter(d),i=r.toArray().length),l&&(r=r.sort(l),s&&(e=r.toArray())),u!==t&&p!==t&&(r=r.range(u,p)),s&&(r=r.group(s,e)),{total:i,data:r.toArray()}},W=dt.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)}}),V=dt.extend({init:function(e){var t,n=this;e=n.options=J({},n.options,e),at(xt,function(t,n){typeof e[n]===ct&&(e[n]={url:e[n]})}),n.cache=e.cache?U.create(e.cache):{find:ot,add:ot},t=e.parameterMap,n.parameterMap=Z(t)?t:function(e){var n={};return at(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:Ct},create:function(e){return rt(this.setup(e,pt))},read:function(n){var i,r,a,o=this,s=o.cache;n=o.setup(n,ft),i=n.success||ot,r=n.error||ot,a=s.find(n.data),a!==t?i(a):(n.success=function(e){s.add(n.data,e),i(e)},e.ajax(n))},update:function(e){return rt(this.setup(e,ht))},destroy:function(e){return rt(this.setup(e,mt))},setup:function(e,t){e=e||{};var n,i=this,r=i.options[t],a=Z(r.data)?r.data(e.data):r.data;return e=J(!0,{},r,e),n=J(!0,{},a,e.data),e.data=i.parameterMap(n,t),Z(e.url)&&(e.url=e.url(n)),e}}),U=dt.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[St(e)]=n)},find:function(e){return this._store[St(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[St(e)]}}),U.create=function(e){var t={inmemory:function(){return new U}};return et(e)&&Z(e.find)?e:e===!0?new U:t[e]()},q=dt.extend({init:function(e){var t,n,i,r,a,o,s,l,d,c,u,p,f,h=this;e=e||{};for(t in e)n=e[t],h[t]=typeof n===ct?Tt(n):n;r=e.modelBase||qt,et(h.model)&&(h.model=i=r.define(h.model)),h.model&&(o=X(h.data,h),s=X(h.groups,h),l=X(h.serialize,h),d={},c={},u={},p={},f=!1,i=h.model,i.fields&&(at(i.fields,function(e,t){var n;a=e,et(t)&&t.field?a=t.field:typeof t===ct&&(a=t),et(t)&&t.from&&(n=t.from),f=f||n&&n!==e||a!==e,c[e]=Tt(n||a),u[e]=Tt(e),d[n||a]=e,p[e]=n||a}),!e.serialize&&f&&(h.serialize=_(l,i,m,u,d,p))),h.data=_(o,i,g,c,d,p),h.groups=_(s,i,v,c,d,p))},errors:function(e){return e?e.errors:null},parse:Ct,data:Ct,total:function(e){return e.length},groups:Ct,aggregates:function(){return{}},serialize:function(e){return e}}),j=lt.extend({init:function(e){var n,i,r=this;e&&(i=e.data),e=r.options=J({},r.options,e),r._map={},r._prefetch={},r._data=[],r._pristineData=[],r._ranges=[],r._view=[],r._pristine=[],r._destroyed=[],r._pageSize=e.pageSize,r._page=e.page||(e.pageSize?1:t),r._sort=o(e.sort),r._filter=l(e.filter),r._group=c(e.group),r._aggregate=e.aggregate,r._total=e.total,lt.fn.init.call(r),r.transport=G.create(e,i),r.reader=new st.data.readers[e.schema.type||"json"](e.schema),n=r.reader.model||{},r._data=r._observe(r._data),r.bind([kt,gt,bt,vt,wt,yt],e)},options:{data:[],schema:{modelBase:qt},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()?b(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 S(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 qt||(t=this._createNewModel(t)),this._isServerGrouped()?this._data.splice(e,0,C(this.group(),t)):this._data.splice(e,0,t),t},remove:function(e){var n,i=this,r=i._isServerGrouped();return this._eachItem(i._data,function(a){return n=x(a,e),n&&r?(n.isNew&&n.isNew()||i._destroyed.push(n),!0):t}),e},sync:function(){var t,n,i,r=this,a=[],o=[],s=r._destroyed,l=r._flatData(r._data);if(r.reader.model){for(t=0,n=l.length;n>t;t++)l[t].isNew()?a.push(l[t]):l[t].dirty&&o.push(l[t]);i=r._send("create",a),i.push.apply(i,r._send("update",o)),i.push.apply(i,r._send("destroy",s)),e.when.apply(null,i).then(function(){var e,t;for(e=0,t=arguments.length;t>e;e++)r._accept(arguments[e]);r._change({action:"sync"}),r.trigger(vt)})}},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,r=t.models,a=t.response,o=0,s=i._isServerGrouped(),l=i._pristineData,d=t.type;if(i.trigger(wt,{response:a,type:d}),a&&!tt(a)){if(a=i.reader.parse(a),i._handleCustomErrors(a))return;a=i.reader.data(a),e.isArray(a)||(a=[a])}else a=e.map(r,function(e){return e.toJSON()});for("destroy"===d&&(i._destroyed=[]),o=0,n=r.length;n>o;o++)"destroy"!==d?(r[o].accept(a[o]),"create"===d?l.push(s?C(i.group(),r[o]):a[o]):"update"===d&&i._updatePristineForModel(r[o],a[o])):i._removePristineForModel(r[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 r=T(i,e);return r>-1?(n(r,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()?w(e,t):t(e))},_pristineForModel:function(e){var n,i,r=function(r){return i=T(r,e),i>-1?(n=r[i],!0):t};return this._eachPristineItem(r),n},_cancelModel:function(e){var t,n=this._pristineForModel(e);this._eachItem(this._data,function(i){t=S(i,e),-1!=t&&(!e.isNew()&&n?i[t].accept(n):i.splice(t,1))})},_promise:function(t,n,i){var r=this,a=r.transport;return e.Deferred(function(e){r.trigger(bt),a[i].call(a,J({success:function(t){e.resolve({response:t,models:n,type:i})},error:function(t,n,i){e.reject(t),r.error(t,n,i)}},t))}).promise()},_send:function(e,t){var n,i,r=this,a=[],o=r.reader.serialize(f(t));if(r.options.batch)t.length&&a.push(r._promise({data:{models:o}},t,e));else for(n=0,i=t.length;i>n;n++)a.push(r._promise({data:o[n]},[t[n]],e));return a},read:function(e){var t=this,n=t._params(e);t._queueRequest(n,function(){t.trigger(bt)?t._dequeueRequest():(t.trigger(yt),t._ranges=[],t.transport.read({data:n,success:X(t.success,t),error:X(t.error,t)}))})},success:function(n){var i=this,r=i.options;return i.trigger(wt,{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&&r.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(wt,{}),this.trigger(kt,{xhr:e,status:t,errorThrown:n})},_params:function(e){var t=this,n=J({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=I(n.group,t.reader.model)):delete n.group,t.options.serverFiltering?t.reader.model&&n.filter&&(n.filter=E(n.filter,t.reader.model)):delete n.filter,t.options.serverSorting?t.reader.model&&n.sort&&(n.sort=I(n.sort,t.reader.model)):delete n.sort,t.options.serverAggregates?t.reader.model&&n.aggregate&&(n.aggregate=I(n.aggregate,t.reader.model)):delete n.aggregate,n},_queueRequest:function(e,n){var i=this;i._requestInProgress?i._pending={callback:X(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(kt,{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 Lt?i&&(e.type=t.reader.model,e.wrapAll(e,e)):(e=new Lt(e,t.reader.model),e.parent=function(){return t.parent()}),t._isServerGrouped()&&y(e,n),t._changeHandler&&t._data&&t._data instanceof Lt?t._data.unbind(gt,t._changeHandler):t._changeHandler=X(t._change,t),e.bind(gt,t._changeHandler)},_change:function(e){var t,n,i,r=this,a=e?e.action:"";if("remove"===a)for(t=0,n=e.items.length;n>t;t++)e.items[t].isNew&&e.items[t].isNew()||r._destroyed.push(e.items[t]);!r.options.autoSync||"add"!==a&&"remove"!==a&&"itemchange"!==a?(i=r._total||r.reader.total(r._pristine),"add"===a?i+=e.items.length:"remove"===a?i-=e.items.length:"itemchange"===a||"sync"===a||r.options.serverPaging||(i=r.reader.total(r._pristine)),r._total=i,r._process(r._data,e)):r.sync()},_process:function(e,n){var i,r=this,o={};r.options.serverPaging!==!0&&(o.skip=r._skip,o.take=r._take||r._pageSize,o.skip===t&&r._page!==t&&r._pageSize!==t&&(o.skip=(r._page-1)*r._pageSize)),r.options.serverSorting!==!0&&(o.sort=r._sort),r.options.serverFiltering!==!0&&(o.filter=r._filter),r.options.serverGrouping!==!0&&(o.group=r._group),r.options.serverAggregates!==!0&&(o.aggregate=r._aggregate,r._aggregateResult=h(e,o)),i=a.process(e,o),r._view=i.data,i.total===t||r.options.serverFiltering||(r._total=i.total),n=n||{},n.items=n.items||r._view,r.trigger(gt,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,r=i.options.serverSorting||i.options.serverPaging||i.options.serverFiltering||i.options.serverGrouping||i.options.serverAggregates;r||(i._data===t||0===i._data.length)&&!i._destroyed.length?i.read(i._mergeState(e)):i.trigger(bt)||(i.trigger(yt),n=a.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=h(i._data,e),i.trigger(wt,{}),i.trigger(gt,{items:n.data}))},fetch:function(t){var n=this;return e.Deferred(function(e){var i=function(i){n.unbind(kt,r),e.resolve(),t&&t.call(n,i)},r=function(t){e.reject(t)};n.one(gt,i),n.one(kt,r),n._query()}).promise()},_query:function(e){var t=this;t.query(J({},{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(),r=n.total();return e=e||{},!i||r&&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=Dt.max(Dt.min(Dt.max(e,1),i.totalPages()),1),i._query({page:e}),t):(n=i.skip(),n!==t?Dt.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 this._total||0},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 Dt.ceil((e.total()||0)/t)},inRange:function(e,t){var n=this,i=Dt.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,r,a,o,s,l,d;if(e=Dt.min(e||0,this.total()),r=this,a=Dt.max(Dt.floor(e/n),0)*n,o=Dt.min(a+n,r.total()),i=r._findRange(e,Dt.min(e+n,r.total())),i.length){r._skip=e>r.skip()?Dt.min(o,(r.totalPages()-1)*r.take()):a,r._take=n,s=r.options.serverPaging,l=r.options.serverSorting,d=r.options.serverFiltering;try{r.options.serverPaging=!0,r.options.serverSorting=!0,r.options.serverFiltering=!0,s&&(r._data=i=r._observe(i)),r._process(i)}finally{r.options.serverPaging=s,r.options.serverSorting=l,r.options.serverFiltering=d}}else n!==t&&(r._rangeExists(a,o)?e>a&&r.prefetch(o,n,function(){r.range(e,n)}):r.prefetch(a,n,function(){e>a&&or;r++)if(i=k[r],e>=i.start&&e<=i.end){for(m=0,s=r;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=a.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 r,a=t.toJSON();return e.length&&(r=e[e.length-1]),k(r,a,n,i),e.concat(a)}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(r){var a,o,s=!1,l={start:e,end:t,data:[]}; for(i._dequeueRequest(),a=0,o=i._ranges.length;o>a;a++)if(i._ranges[a].start===e){s=!0,l=i._ranges[a];break}s||i._ranges.push(l),i.trigger(wt,{response:r,type:"read"}),r=i.reader.parse(r),l.data=i._observe(i._readData(r)),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(r),n&&n()}},prefetch:function(e,t,n){var i=this,r=Dt.min(e+t,i.total()),a={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,r)?n&&n():(clearTimeout(i._timeout),i._timeout=setTimeout(function(){i._queueRequest(a,function(){i.trigger(bt)?i._dequeueRequest():i.transport.read({data:a,success:i._prefetchSuccessHandler(e,r,n)})})},100))},_rangeExists:function(e,t){var n,i,r=this,a=r._ranges;for(n=0,i=a.length;i>n;n++)if(a[n].start<=e&&a[n].end>=t)return!0;return!1}}),G={},G.create=function(e,t){var n,i=e.transport;return i?(i.read=typeof i.read===ct?{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](J(i,{data:t})):i=J(!0,{},st.data.transports[e.type],i),e.schema=J(!0,{},st.data.schemas[e.type],e.schema)),n||(n=Z(i.read)?i:new V(i))):n=new W({data:e.data}),n},j.create=function(e){e=e&&e.push?{data:e}:e;var t,n,i,r=e||{},a=r.data,o=r.fields,s=r.table,l=r.select,d={};if(a||!o||r.transport||(s?a=A(s,o):l&&(a=H(l,o))),st.data.Model&&o&&(!r.schema||!r.schema.model)){for(t=0,n=o.length;n>t;t++)i=o[t],i.type&&(d[i.field]=i);tt(d)||(r.schema=J(!0,r.schema,{model:{fields:d}}))}return r.data=a,r instanceof j?r:new j(r)},Y=qt.define({init:function(e){var t,n=this,i=n.hasChildren||e&&e.hasChildren,r="items",a={};st.data.Model.fn.init.call(n,e),typeof n.children===ct&&(r=n.children),a={schema:{data:r,model:{hasChildren:i,id:n.idField}}},typeof n.children!==ct&&J(a,n.children),t=a.transport,t&&(t.parameterMap=function(e){return n.parentParameterMap&&(e=n.parentParameterMap.call(this,e)),e[n.idField||"id"]=n.id,e}),a.data=e,i||(i=a.schema.data),typeof i===ct&&(i=st.getter(i)),Z(i)&&(n.hasChildren=!!i.call(n,n)),n._childrenOptions=a,n.hasChildren&&n._initChildren(),n._loaded=!(!e||!e[r]&&!e._loaded)},_initChildren:function(){var e=this;e.children instanceof $||(e.children=new $(e._childrenOptions),e.children.parent=function(){return e},e.children.bind(gt,function(t){t.node=t.node||e,e.trigger(gt,t)}),e.children.bind(kt,function(t){var n=e.parent();n&&(t.node=t.node||e,n.trigger(kt,t))}),e._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(gt,function(){e._loaded=!0,e._updateChildrenField()})._query(n))},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 qt.fn.shouldSerialize.call(this,e)&&"children"!==e&&"_loaded"!==e&&"hasChildren"!==e&&"_childrenOptions"!==e}}),$=j.extend({init:function(e){var t=Y.define({children:e});j.fn.init.call(this,J(!0,{},{schema:{modelBase:t,model:t}},e)),this.transport&&(t.fn.parentParameterMap=this.transport.parameterMap),this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var e=this;e._data.bind(kt,function(t){e.trigger(kt,t)})},remove:function(e){var t,n=e.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),t=j.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:z("success"),data:z("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),j.fn.insert.call(this,e,t)},_find:function(e,t){var n,i,r,a,o;if(r=j.fn[e].call(this,t))return r;if(a=this._flatData(this.data()))for(n=0,i=a.length;i>n;n++)if(o=a[n].children,o instanceof $&&(r=o[e](t)))return r},get:function(e){return this._find("get",e)},getByUid:function(e){return this._find("getByUid",e)}}),$.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},n=t.data,i=t.fields,r=t.list;return n&&n._dataSource?n._dataSource:(n||!i||t.transport||r&&(n=M(r,i)),t.data=n,t instanceof $?t:new $(t))},K=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,r=this.pageSize;return e>=this.total()?(this.trigger("endreached",{index:e}),t):((ethis.skip+r)&&(n=Math.floor(e/r)*r,this.range(n)),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)),i=this.dataSource.at(e-this.dataOffset),i===t&&this.trigger("endreached",{index:e}),i)},indexOf:function(e){return this.dataSource.data().indexOf(e)+this.dataOffset},_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})}))},total:function(){return parseInt(this.dataSource.total(),10)},next:function(){var e=this,t=e.pageSize,n=e.skip-e.viewSize,i=Dt.max(Dt.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=Dt.max(Dt.floor(e/n),0)*n+n,r=this.dataSource;this.offset=e,this._recalculate(),r.inRange(e,n)?this._goToRange(e):this.prefetch&&r.prefetch(i,n,function(){t._goToRange(e,!0)})}},syncDataSource:function(){var e=this.offset;this.offset=null,this.range(e)},_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=e.lastRange().end,this._firstItemUid!==t&&(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(),this.pageSize=e.pageSize()},_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}}),Q=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 K(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=this.length/n.batchSize,n.trigger("resize",{total:n.total(),offset:this.offset})}})},syncDataSource:function(){this.buffer.syncDataSource()},at:function(e){var n,i,r=this.buffer,a=e*this.batchSize,o=this.batchSize,s=[];for(r.offset>a&&r.at(r.offset-1),i=0;o>i;i++){if(n=r.at(a+i),n===t)return;s.push(n)}return s},total:function(){return this._total}}),J(!0,st.data,{readers:{json:q},Query:a,DataSource:j,HierarchicalDataSource:$,Node:Y,ObservableObject:Wt,ObservableArray:Lt,LocalTransport:W,RemoteTransport:V,Cache:U,DataReader:q,Model:qt,Buffer:K,BatchBuffer:Q})}(window.kendo.jQuery),function(e,t){function n(e){var t,i,r=[];for(t=0,i=e.length;i>t;t++)r=e[t].hasSubgroups?r.concat(n(e[t].items)):r.concat(e[t].items);return r}function i(e,n,i){var r=i[e];return r?new k(w.initWidget(n,r.options,i)):t}function r(e){var t,n,i,a,o,s,l,d={};for(l=e.match(b),t=0,n=l.length;n>t;t++)i=l[t],a=i.indexOf(":"),o=i.substring(0,a),s=i.substring(a+1),"{"==s.charAt(0)&&(s=r(s)),d[o]=s;return d}function a(e,t,n){var i,r={};for(i in e)r[i]=new n(t,e[i]);return r}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(p,e,n)),f&&(f=r(f.replace(y,"")),u||(x=w.parseOptions(e,{textField:"",valueField:"",template:"",valueUpdate:M,valuePrimitive:!1}),x.roles=n,u=new _(e,x)),u.source=t,c=a(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=a(f.attr,s,h)),f.style&&(c.style=a(f.style,s,h)),f.events&&(c.events=a(f.events,s,m)),u.bind(c)),u&&(e.kendoBindingTarget=u),b&&v){for(d=0;di;i++)a=t[i],1===a.nodeType&&o(a,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=w.Class,E=e.proxy,I="value",H="source",A="events",z="checked",M="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(M,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,r=this;if("this"===r.path)r.trigger(M,e);else for(t in r.dependencies)if(0===t.indexOf(i)&&(n=t.charAt(i.length),!n||"."===n||"["===n)){r.trigger(M,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,r=e.path,a=n;if(!e.observable)return a;for(e.start(e.source),a=n.get(r);a===t&&n;)n=e.parents[++i],n instanceof C&&(a=n.get(r));if(a===t)for(n=e.source;a===t&&n;)n=n.parent(),n instanceof C&&(a=n.get(r));return"function"==typeof a&&(i=r.lastIndexOf("."),i>0&&(n=n.get(r.substring(0,i))),e.start(n),a=a.call(n,e.source),e.stop(n)),n&&n!==e.source&&(e.currentSource=n,n.unbind(M,e._change).bind(M,e._change)),e.stop(e.source),a},set:function(e){var t=this,n=t.currentSource||t.source;n.set(t.path,e)},destroy:function(){this.observable&&this.source.unbind(M,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 E(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=F.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(M,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],r=this.handlers[t];r&&n.off(t,r),r=this.handlers[t]=i.get(),n.on(t,i.source,r)},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=E(this.change,this),this.eventName=i.valueUpdate||M,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=M,this.bindings[I].set(this.element.value),this._initChange=!1},refresh:function(){if(!this._initChange){var e=this.bindings[I].get();null==e&&(e=""),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)},refresh:function(e){var t=this,n=t.bindings.source.get();n instanceof T?(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(M,this._change)},add:function(t,n){var i,r,a,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(),r=0,a=n.length;a>r;r++)s=d.children[0],l.insertBefore(s,c||null),o(s,n[r],this.options.roles,[n[r]].concat(i))},remove:function(e,t){var n,i,r=this.container();for(n=0;nn;n++)o(s.children[n],a[n],this.options.roles,[a[n]].concat(t))}else e(s).html(w.render(l,a))}}),D.input={checked:v.extend({init:function(t,n,i){v.fn.init.call(this,t,n,i),this._change=E(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[z].set(i):"checkbox"==n.type&&(e=this.bindings[z].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[z].set(i))},refresh:function(){var e=this.bindings[z].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(M,this._change)}})},D.select={value:v.extend({init:function(t,n,i){v.fn.init.call(this,t,n,i),this._change=E(this.change,this),e(this.element).change(this._change)},change:function(){var e,t,n,i,r,a,o=[],s=this.element,l=this.options.valueField||this.options.textField,d=this.options.valuePrimitive;for(r=0,a=s.options.length;a>r;r++)t=s.options[r],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;nr;r++)if(e[r].get(l)==o[n]){o[n]=e[r];break}i=this.bindings[I].get(),i instanceof T?i.splice.apply(i,[0,i.length].concat(o)):d||!(i instanceof C)&&l?this.bindings[I].set(o[0].get(l)):this.bindings[I].set(o[0])},refresh:function(){var e,t,n,i=this.element,r=i.options,a=this.bindings[I].get(),o=a,s=this.options.valueField||this.options.textField,l=!1;for(o instanceof T||(o=new T([a])),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,r,a=this.widget,s=a.items(),l=a.dataSource,d=l.view(),c=l.group()||[];if(s.length)for(c.length&&(d=n(d)),r=this.bindings.source._parents(),t=0,i=d.length;i>t;t++)o(s[t],d[t],this._ns(e.ns),[d[t]].concat(r))},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(M,this._change);var r=this.bindings.value.get();this._valueIsObservableObject=!i.valuePrimitive&&(null==r||r instanceof C),this._valueIsObservableArray=r instanceof T,this._initChange=!1},change:function(){var e,t,n,i,r,a,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)),r=0,a=o.length;a>r;r++)if(n=o[r],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,r=[];if(t)if(n instanceof T){for(e=n.length;e>i;i++)r[i]=n[i].get(t);n=r}else n instanceof C&&(n=n.get(t));this.widget.value(n)}this._initChange=!1},destroy:function(){this.widget.unbind(M,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(M,this._change),this._initChange=!1},change:function(){var e=this,t=e.bindings[I].get(),n=e.options.valuePrimitive,i=n?e.widget.value():e.widget.dataItems();e._initChange=!0,t instanceof T?t.splice.apply(t,[0,t.length].concat(i)):e.bindings[I].set(i),e._initChange=!1},refresh:function(){if(!this._initChange){var e,t,n=this.options.dataValueField||this.options.dataTextField,i=this.bindings.value.get(),r=0,a=[];if(n)if(i instanceof T){for(e=i.length;e>r;r++)t=i[r],a[r]=t.get?t.get(n):t;i=a}else i instanceof C&&(i=i.get(n));this.widget.value(i)}},destroy:function(){this.widget.unbind(M,this._change)}})}},_=F.extend({init:function(e,t){this.target=e,this.options=t,this.toDestroy=[]},bind:function(e){var t,n,i,r,a=this.target.nodeName.toLowerCase(),o=D[a]||{};for(t in e)t==I?n=!0:t==H?i=!0:t==A?r=!0:this.applyBinding(t,e,o);i&&this.applyBinding(H,e,o),n&&this.applyBinding(I,e,o),r&&this.applyBinding(A,e,o)},applyBinding:function(e,t,n){var i,r=n[e]||D[e],a=this.toDestroy,o=t[e];if(r)if(r=new r(this.target,t,this.options),a.push(r),o instanceof h)r.bind(o),a.push(o);else for(i in o)r.bind(o,i),a.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,r=!1,a=D.widget[n.target.options.name.toLowerCase()]||{};for(t in e)t==I?i=!0:t==H?r=!0:n.applyBinding(t,e);r&&n.applyBinding(H,e),i&&n.applyBinding(I,e,a[I])},applyBinding:function(e,t,n){var i,r=n||D.widget[e],a=this.toDestroy,o=t[e];if(!r)throw Error("The "+e+" binding is not supported by the "+this.target.options.name+" widget");if(r=new r(this.target,t,this.target.options),a.push(r),o instanceof h)r.bind(o),a.push(o);else for(i in o)r.bind(o,i),a.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 r(t){return e.parseHTML?e(e.parseHTML(t)):e(t)}var a,o=window.kendo,s=o.ui.Widget,l=".kendoValidator",d="k-invalid-msg",c="k-invalid",u=/^((([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,p=/^(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,f=":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",h=":checkbox:not([disabled],[readonly])",m="[type=number],[type=range]",g="blur",v="name",_="form",k="novalidate",b=e.proxy,y=function(e,t){return"string"==typeof t&&(t=RegExp("^(?:"+t+")$")),t.test(e)},w=function(e,t,n){var i=e.val();return e.filter(t).length&&""!==i?y(i,n):!0},x=function(e,t){return e.length?null!=e[0].attributes[t]:!1};o.ui.validator||(o.ui.validator={rules:{},messages:{}}),a=s.extend({init:function(n,i){var r=this,a=t(n);i=i||{},i.rules=e.extend({},o.ui.validator.rules,a.rules,i.rules),i.messages=e.extend({},o.ui.validator.messages,a.messages,i.messages),s.fn.init.call(r,n,i),r._errorTemplate=o.template(r.options.errorTemplate),r.element.is(_)&&r.element.attr(k,k),r._errors={},r._attachEvents()},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!(x(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()?y(e.val(),e.attr("pattern")):!0},min:function(e){if(e.filter(m+",["+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(m+",["+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(m+",["+o.attr("type")+"=number]").filter("[step]").length&&""!==e.val()){var t,n=parseFloat(e.attr("min"))||0,r=parseFloat(e.attr("step"))||1,a=parseFloat(e.val()),s=i(r);return s?(t=Math.pow(10,s),0===(a-n)*t%(r*t)/Math.pow(100,s)):0===(a-n)%r}return!0},email:function(e){return w(e,"[type=email],["+o.attr("type")+"=email]",u)},url:function(e){return w(e,"[type=url],["+o.attr("type")+"=url]",p)},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(_)&&t.element.on("submit"+l,b(t._submit,t)),t.options.validateOnBlur&&(t.element.is(f)?(t.element.on(g+l,function(){t.validateInput(t.element)}),t.element.is(h)&&t.element.on("click"+l,function(){t.validateInput(t.element)})):(t.element.on(g+l,f,function(){t.validateInput(e(this))}),t.element.on("click"+l,h,function(){t.validateInput(e(this))})))},validate:function(){var e,t,n,i=this,r=!1;if(i._errors={},!i.element.is(f)){for(e=i.element.find(f),t=0,n=e.length;n>t;t++)i.validateInput(e.eq(t))||(r=!0);return!r}return i.validateInput(i.element)},validateInput:function(t){var i,a,o,s,l,u,p,f,h;return t=e(t),a=this,o=a._errorTemplate,s=a._checkValidity(t),l=s.valid,u="."+d,p=t.attr(v)||"",f=a._findMessageContainer(p).add(t.next(u)).hide(),t.removeAttr("aria-invalid"),l||(i=a._extractMessage(t,s.key),a._errors[p]=i,h=r(o({message:n(i)})),a._decorateMessageContainer(h,p),f.replaceWith(h).length||h.insertAfter(t),h.show(),t.attr("aria-invalid",!0)),t.toggleClass(c,!l),l},hideMessages:function(){var e=this,t="."+d,n=e.element;n.is(f)?n.next(t).hide():n.find(t).hide()},_findMessageContainer:function(t){var n,i,r,a,s,l=o.ui.validator.messageLocators,c=e(),u=this.element[0].getElementsByTagName("*");for(i=0,r=u.length;r>i;i++)a=u[i],a.className.indexOf(d)>-1&&(s=a.getAttribute(o.attr("for")),s===t&&(c=c.add(a)));for(n in l)c=c.add(l[n].locate(this.element,t));return c},_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(t,n){var i=this,r=i.options.messages[n],a=t.attr(v);return r=e.isFunction(r)?r(t):r,o.format(t.attr(o.attr(n+"-msg"))||t.attr("validationMessage")||t.attr("title")||r||"",a,t.attr(n))},_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(a)}(window.kendo.jQuery),function(e){function t(e,t){var n=e.x.location,i=e.y.location,r=t.x.location,a=t.y.location,o=n-r,s=i-a;return{center:{x:(n+r)/2,y:(i+a)/2},distance:Math.sqrt(o*o+s*s)}}function n(e){var t,n,i,r=[],a=e.originalEvent,s=e.currentTarget,l=0;if(e.api)r.push({id:2,event:e,target:e.target,currentTarget:e.target,location:e}); else if(e.type.match(/touch/))for(n=a?a.changedTouches:[],t=n.length;t>l;l++)i=n[l],r.push({location:i,event:e,target:i.target,currentTarget:s,id:i.identifier});else o.pointers?r.push({location:a,event:e,target:e.target,currentTarget:s,id:a.pointerId}):r.push({id:1,event:e,target:e.target,currentTarget:s,location:e});return r}function i(t){var n,i,r;t.preventDefault(),n=e(t.data.root),i=n.closest(".k-widget").parent(),i[0]||(i=n.parent()),r=e.extend(!0,{},t,{target:n[0]}),i.trigger(e.Event(t.type,r))}function r(e){for(var t=a.eventMap.up.split(" "),n=0,i=t.length;i>n;n++)e(t[n])}var a=window.kendo,o=a.support,s=window.document,l=a.Class,d=a.Observable,c=e.now,u=e.extend,p=o.mobileOS,f=p&&p.android,h=o.browser.ie?5:0,m="press",g="select",v="start",_="move",k="end",b="cancel",y="tap",w="release",x="gesturestart",C="gesturechange",T="gestureend",S="gesturetap",D=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(),r=i-t.timeStamp||1;(n||!f)&&(t.delta=n-t.location,t._updateLocationData(e),t.initialDelta=n-t.startLocation,t.velocity=t.delta/r,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]}}),F=l.extend({init:function(e,t,n){var i=this;u(i,{x:new D("X",n.location),y:new D("Y",n.location),userEvents:e,target:t,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,_moved:!1,_finished:!1}),i.notifyInit=function(){i._trigger(m,n)}},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(E.current&&E.current!==t.userEvents)return t.dispose();t._start(e)}t._finished||t._trigger(_,e)}},end:function(e){var t=this;t.endTime=c(),t._finished||(t._moved?t._trigger(k,e):t._trigger(y,e),t._trigger(w,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){this.startTime=c(),this._moved=!0,this._trigger(v,e)},_trigger:function(e,t){var n=this,i=t.event,r={touch:n,x:n.x,y:n.y,target:n.target,event:i};n.userEvents.notify(e,r)&&i.preventDefault()},_withinIgnoreThreshold:function(){var e=this.x.initialDelta,t=this.y.initialDelta;return Math.sqrt(e*e+t*t)<=this.userEvents.threshold}}),E=d.extend({init:function(t,n){var i,l,c,p=this,f=a.guid();n=n||{},i=p.filter=n.filter,p.threshold=n.threshold||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(a.applyEventMap("move",f),"_move").on(a.applyEventMap("up cancel",f),"_end"),t.on(a.applyEventMap("down",f),i,"_start"),o.pointers&&t.css("-ms-touch-action","pinch-zoom double-tap-zoom"),n.preventDragEvent&&t.on(a.applyEventMap("dragstart",f),a.preventDefault),t.on(a.applyEventMap("mousedown selectstart",f),i,{root:t},"_select"),p.captureUpIfMoved&&o.eventCapture&&(l=p.surface[0],c=e.proxy(p.preventIfMoving,p),r(function(e){l.addEventListener(e,c,!0)})),p.bind([m,y,v,_,k,w,b,x,C,T,S,g],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],r(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(){E.current=this},cancel:function(){this._disposeAll(),this.trigger(b)},notify:function(e,n){var i=this,r=i.touches;if(this._isMultiTouch()){switch(e){case _:e=C;break;case k:e=T;break;case y:e=S}u(n,{touches:r},t(r[0],r[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(){e.each(this.touches,function(){this.dispose()})},_isMoved:function(){return e.grep(this.touches,function(e){return e.isMoved()}).length},_select:function(e){(!this.allowSelection||this.trigger(g,{event:e}))&&i(e)},_start:function(t){var i,r,a=this,o=0,s=a.filter,l=n(t),d=l.length;if(!a._maxTouchesReached())for(E.current=null,a.currentTarget=t.currentTarget,a.stopPropagation&&t.stopPropagation();d>o&&!a._maxTouchesReached();o++)r=l[o],i=s?e(r.currentTarget):a.element,i.length&&(r=new F(a,i,r),a.touches.push(r),r.notifyInit(),a._isMultiTouch()&&a.notify("gesturestart",{}))},_move:function(e){this._eachTouch("move",e)},_end:function(e){this._eachTouch("end",e)},_eachTouch:function(e,t){var i,r,a,o,s=this,l={},d=n(t),c=s.touches;for(i=0;io;o++)if(r=n[o],r.element[0]===e)return{target:r,targetElement:e};for(o=0;l>o;o++)if(a=i[o],m.matchesSelector.call(e,a.options.filter))return{target:a,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,I="keyup",H="change",A="dragstart",z="drag",M="dragend",R="dragcancel",N="dragenter",O="dragleave",P="drop",B=k.extend({init:function(t,n){var i=this,r=t[0];i.capture=!1,e.each(h.eventMap.down.split(" "),function(){r.addEventListener(this,y(i._press,i),!0)}),e.each(h.eventMap.up.split(" "),function(){r.addEventListener(this,y(i._release,i),!0)}),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())}}),L=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||er,e||t.trigger(H,t)}}),W=k.extend({init:function(e){var t=this,n=y(t.refresh,t);k.fn.init.call(t),t.x=new L(w({horizontal:!0},e)),t.y=new L(w({horizontal:!1},e)),t.forcedMinScale=e.minScale,t.bind(H,e),h.onResize(n)},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)}}),V=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,r=t.movable,a=r[i]+e;n.enabled&&((ae||a>n.max&&e>0)&&(e*=t.resistance),r.translateAxis(i,e),t.trigger(H,t))}}),U=v.extend({init:function(e){var t,n,i,r,a=this;w(a,{elastic:!0},e),i=a.elastic?.5:0,r=a.movable,a.x=t=new V({axis:"x",dimension:a.dimensions.x,resistance:i,movable:r}),a.y=n=new V({axis:"y",dimension:a.dimensions.y,resistance:i,movable:r}),a.userEvents.bind(["move","end","gesturestart","gesturechange"],{gesturestart:function(e){a.gesture=e},gesturechange:function(e){var i,o=a.gesture,s=o.center,l=e.center,d=e.distance/o.distance,c=a.dimensions.minScale;r.scale<=c&&1>d&&(d+=.8*(1-d)),i={x:(r.x-s.x)*d+l.x-r.x,y:(r.y-s.y)*d+l.y-r.y},r.scaleWith(d),t.dragMove(i.x),n.dragMove(i.y),a.dimensions.rescale(r.scale),a.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()}})}}),q=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=this,t=d(e.x,e.y,e.scale);t!=e.coordinates&&(e.element[0].style[q]=t,e._saveCoordinates(t),e.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:[N,O,P],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})}}),E=l.extend({init:function(t){var n=this,i="x"===t.axis,r=e('
    ');o(n,t,{element:r,elementSize:0,movable:new d(r),scrollMovable:t.movable,size:i?"width":"height"}),n.scrollMovable.bind(C,a(n._move,n)),n.container.append(r)},_move:function(){var e=this,t=e.axis,n=e.dimension,i=n.size,r=e.scrollMovable,a=i/n.total,o=Math.round(-r[t]*a),s=Math.round(i*a);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})}}),I=s.extend({init:function(n,i){var r,a,l,p,f,m,g,v,_=this;return s.fn.init.call(_,n,i),n=_.element,_._native=_.options.useNative&&t.support.hasNativeScrolling,_._native?(n.addClass("km-native-scroller").prepend('
    '),o(_,{scrollElement:n,fixedContainer:n.children().first()}),undefined):(n.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('
    ').prepend('
    '),r=n.children().eq(1),a=new t.TapCapture(n),l=new d(r),p=new u({element:r,container:n,forcedEnabled:_.options.zoom,change:function(){_.trigger(T)}}),f=this.options.avoidScrolling,m=new t.UserEvents(n,{allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:_.options.zoom,start:function(e){p.refresh();var t=h(e.x.velocity),n=h(e.y.velocity),i=2*t>=n,r=2*n>=t;!f(e)&&_.enabled&&(p.x.enabled&&i||p.y.enabled&&r)?m.capture():m.cancel()}}),g=new c({movable:l,dimensions:p,userEvents:m,elastic:_.options.elastic}),v=new D({movable:l,dimensions:p,userEvents:m,tapCapture:a}),l.bind(C,function(){_.scrollTop=-l.y,_.scrollLeft=-l.x,_.trigger(S,{scrollTop:_.scrollTop,scrollLeft:_.scrollLeft})}),o(_,{movable:l,dimensions:p,zoomSnapBack:v,userEvents:m,pane:g,tapCapture:a,pulled:!1,enabled:!0,scrollElement:r,scrollTop:0,scrollLeft:0,fixedContainer:n.children().first()}),_._initAxis("x"),_._initAxis("y"),p.refresh(),_.options.pullToRefresh&&_._initPullToRefresh(),t.onResize(e.proxy(_.reset,_)),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},pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"},events:[x,S,T],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.dimensions.refresh(),this.movable.moveTo({x:e,y:t})},pullHandled:function(){var e=this;e.refreshHint.removeClass(w),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd()},destroy:function(){s.fn.destroy.call(this),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",a(e._paneChange,e)),e.userEvents.bind("end",a(e._dragEnd,e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(y).addClass(w),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(w).addClass(y),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(y),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var t=this,n=t.movable,i=t.dimensions[e],r=t.tapCapture,a=new E({axis:e,movable:n,dimension:i,container:t.element});t.pane[e].bind(C,function(){a.show()}),t[e+"inertia"]=new F({axis:e,movable:n,tapCapture:r,userEvents:t.userEvents,dimension:i,elastic:t.options.elastic,end:function(){a.hide(),t.trigger("scrollEnd",{axis:e,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft})}})}});r.plugin(I)}(window.kendo.jQuery),function(e){function t(e){return e.position().top+3}var n=window.kendo,i=n.ui.Widget,r=e.proxy,a=!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=r(h._intializePositions,h),v=h._dropCuePositions=[];i.fn.init.call(h,s,c),a=n.support.isRtl(s),f=a?"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,r=t.draggable.currentTarget,o=r.attr(n.attr("field")),s=r.attr(n.attr("title")),l=h.indicator(o),c=h._dropCuePositions,u=c[c.length-1];(r.hasClass("k-group-indicator")||h._canDrag(r))&&(u?(i=h._dropCuePosition(n.getOffset(d).left+parseInt(u.element.css("marginLeft"),10)*(a?-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:r(h._dragCancel,h),dragstart:function(e){var n=e.currentTarget,i=parseInt(n.css("marginLeft"),10),r=n.position(),o=a?r.left-i:r.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:r(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(),r=h.buildIndicator(i.attr(n.attr("field")),i.attr(n.attr("title")),"asc"==i.attr(n.attr("dir"))?"desc":"asc");i.before(r).remove(),h._change(),t.preventDefault()}),p.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){h._dragEnd(this)},dragcancel:r(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:r(h._drag,h)}),h.dataSource=h.options.dataSource,h.dataSource&&(h._refreshHandler=r(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"),r=t.element.find(t.options.filter).filter("["+n.attr("field")+"="+i+"]");return t.buildIndicator(e.field,r.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,r,a,o,s=this,l=e(".k-group-indicator",s.groupContainer);return t=s.element.find(s.options.filter).map(function(){var t=e(this),r=t.attr(n.attr("aggregates")),s=t.attr(n.attr("field"));if(r&&""!==r)for(i=r.split(","),r=[],a=0,o=i.length;o>a;a++)r.push({field:s,aggregate:i[a]});return r}).toArray(),e.map(l,function(i){return i=e(i),r=i.attr(n.attr("field")),{field:r,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,r,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,r=n.right,o=parseInt(n.element.css("marginLeft"),10),s=parseInt(n.element.css("marginRight"),10),t>=r&&!a||i>t&&a?t={left:n.element.position().left+(a?-o:n.element.outerWidth()+s),element:n.element,before:!1}:(t=e.grep(l,function(e){return e.left<=t&&t<=e.right||a&&t>e.right})[0],t&&(t={left:a?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(),r=e[0]!==t[0]&&(!i[0]||t[0]!==i[0]||!a&&n>i.position().left||a&&n
    '),o.find(l.options.filter).kendoDropTarget({group:l.options.group,dragenter:function(e){if(d._draggable){var i,r=this.element,a=r[0]===d._draggable[0];t(e.draggable.hint,a),a||(i=n.getOffset(r),d.reorderDropCue.css({height:r.outerHeight(),top:i.top,left:i.left+(r.index()>d._draggable.index()?r.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(r,{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:[r],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,r=i.Widget,a=e.proxy,o=e.isFunction,s=e.extend,l="horizontal",d="vertical",c="start",u="resize",p="resizeend",f=r.extend({init:function(e,t){var n=this;r.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:a(n._resize,n),dragcancel:a(n._cancel,n),dragstart:a(n._start,n),dragend:a(n._stop,n)}),n.userEvents=n.draggable.userEvents},events:[u,p,c],options:{name:"Resizable",orientation:l},_max:function(e){var n=this,i=n.hint?n.hint[n._sizingDom]():0,r=n.options.max;return o(r)?r(e):r!==t?n._initialElementPosition+r-i:r},_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,r=e(t.currentTarget);n._initialElementPosition=r.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,i&&(n.hint=o(i)?e(i(r)):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",r.css("cursor"))},_resize:function(n){var i,r=this,a=(e(n.currentTarget),r._maxPosition),o=r._minPosition,l=r._initialElementPosition+(n[r._positionMouse].location-r._initialMousePosition);i=o!==t?Math.max(o,l):l,r.position=i=a!==t?Math.min(a,i):i,r.hint&&r.hint.toggleClass(r.options.invalidClass||"",i==a||i==o).css(r._position,i),r.resizing=!0,r.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;r.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,r=n.targetPosition,a=n.position;a===t&&(a=r[i]),r[i]=a+e,n.userEvents.move(r.left,r.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,r="dir",a="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,r=this;p.fn.init.call(r,e,t),r._refreshHandler=i(r.refresh,r),r.dataSource=r.options.dataSource.bind("change",r._refreshHandler),n=r.element.find(c),n[0]||(n=r.element.wrapInner('').find(c)),r.link=n,r.element.on("click"+d,i(r._click,r))},options:{name:"Sortable",mode:o,allowUnsort:!0,compare:null},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(r)),f.removeAttr(u),t=0,i=p.length;i>t;t++)o=p[t],h==o.field&&f.attr(n.attr(r),o.dir);d=f.attr(n.attr(r)),f.find(".k-i-arrow-n,.k-i-arrow-s").remove(),d===a?(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(r)),h=c.options,m=c.options.compare,g=c.dataSource.sort()||[];if(f=f===a?l:f===l&&h.allowUnsort?t:a,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})}e.preventDefault(),c.dataSource.sort(g)}});n.ui.plugin(f)}(window.kendo.jQuery),function(e){function t(e,t){var n=r.getOffset(e),i=t.left+t.width,a=t.top+t.height;return n.right=n.left+e.outerWidth(),n.bottom=n.top+e.outerHeight(),!(n.left>i||n.righta||n.bottoma;a++)s=e.eq(a),t(s,i)?s.hasClass(d)?r&&n!==s[0]&&s.removeClass(d).addClass(h):s.hasClass(c)||s.hasClass(h)||s.addClass(c):s.hasClass(c)?s.removeClass(c):r&&s.hasClass(h)&&s.removeClass(h).addClass(d)}var i,r=window.kendo,a=r.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=a.extend({init:function(t,n){var i,s=this;a.fn.init.call(s,t,n),s._marquee=e("
    "),s._lastActive=null,s.element.addClass(u),i=s.options.multiple,s.userEvents=new r.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),r=this,a=t.event.ctrlKey||t.event.metaKey,o=r.options.multiple,s=o&&t.event.shiftKey,l=t.event.which,c=t.event.button;i.closest("."+u)[0]!==r.element[0]||l&&3==l||c&&2==c||(n=i.hasClass(d),o&&a||r.clear(),s?r.selectRange(r._firstSelectee(),i):(n&&a?(r._unselect(i),r._notify(p)):r.value(i),r._lastActive=r._downTarget=i))},_start:function(t){var n=this,i=e(t.target),r=i.hasClass(d),a=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}),a||n.clear(),r&&(n._selectElement(i,!0),a&&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)},r=t.element.find(t.options.filter);t._marquee.css(i),n(r,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),r=!n&&this._notify("select",{element:t});i.removeClass(c),r||(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){e(t.event.target).is("input,a,textarea")?(this.userEvents.cancel(),this._downTarget=null):t.preventDefault()},clear:function(){var e=this.element.find(this.options.filter+"."+d);this._unselect(e)},selectRange:function(t,n){var i,r,a,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,r=u.length;r>i;i++)s=u[i],c?(f(s),c=s!==n):s===t?(c=t!==n,f(s)):s===n?(a=t,t=n,n=a,c=!0,f(s)):e(s).removeClass(d);l._notify(p)},destroy:function(){var e=this;a.fn.destroy.call(e),e.element.off(f),e.userEvents.destroy()}}),r.ui.plugin(i)}(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){return w({className:e.substring(1),text:t})}function r(e,t,n,i){e.find(t).parent().attr(d.attr("page"),n).attr("tabindex",-1).toggleClass("k-state-disabled",i)}function a(e,t){r(e,f,1,1>=t)}function o(e,t){r(e,m,Math.max(1,t-1),1>=t)}function s(e,t,n){r(e,g,Math.min(n,t+1),t>=n)}function l(e,t,n){r(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 r,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),r=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)),a(y.element,r,c)),y.element.find(m).length||(y.element.append(i(m,n.messages.previous)),o(y.element,r,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,r,c)),y.element.find(h).length||(y.element.append(i(h,n.messages.last)),l(y.element,r,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&&(a(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,r=i.Widget,a=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),I=e(document.documentElement),H="resize scroll",A=a.transitions.css,z=A+"transform",M=e.extend,R=".kendoPopup",N=["font-family","font-size","font-stretch","font-style","font-weight","line-height"],O=r.extend({init:function(t,i){var a,o=this;i=i||{},i.isRtl&&(i.origin=i.origin||g+" "+h,i.position=i.position||m+" "+h),r.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]),a=e(o.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),i.appendTo=e(e(i.appendTo)[0]||a[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:{}}}),M(i.animation.open,{complete:function(){o.wrapper.css({overflow:w}),o.trigger(u)}}),M(i.animation.close,{complete:function(){o.wrapper.hide();var r,a,s=o.wrapper.data(b),l=e(i.anchor);s&&o.wrapper.css(s),i.anchor!=k&&(r=(l[0].className.match(S)||["","down"])[1],a=T+"-"+r,l.removeClass(a).children(D).removeClass(C).removeClass(a),t.removeClass(T+"-"+n.directions[r].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,animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},destroy:function(){var t,i=this,a=i.options,o=i.element.off(R);r.fn.destroy.call(i),a.toggleTarget&&e(a.toggleTarget).off(R),I.unbind(F,i._mousedownProxy),E.unbind(H,i._resizeProxy),a.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 r,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;I.unbind(F,d._mousedownProxy).bind(F,d._mousedownProxy),a.mobileOS.ios||a.mobileOS.android||E.unbind(H,d._resizeProxy).bind(H,d._resizeProxy),d.wrapper=o=n.wrap(u).css({overflow:_,display:"block",position:v}),a.mobileOS.android&&o.add(h).css(z,"translatez(0)"),o.css(y),e(p.appendTo)[0]==document.body&&o.css(m,"-10000px"),r=M(!0,{},p.animation.open),d.flipped=d._position(c),r.effects=n.parseEffects(r.effects,d.flipped),f=r.effects.slideIn?r.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,r.effects).kendoStop(!0).kendoAnimate(r)}},toggle:function(){var e=this;e[e.visible()?d:l]()},visible:function(){return this.element.is(":"+w)},close:function(){var t,i,r,a,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()}),I.unbind(F,o._mousedownProxy),E.unbind(H,o._resizeProxy),i=M(!0,{},s.animation.close),r=o.element.data(x),a=i.effects,!a&&!n.size(a)&&r&&n.size(r)&&(i.effects=r,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 r=this,a=r.element[0],o=r.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===r.element[0])&&(t(a,d)||t(s,d)||l&&t(e(l)[0],d)||r.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,r,a,o){var s=0;return o=o||t,a!==r&&a!==p&&r!==p&&(e+o>i&&(s+=-(n+t)),0>e+s&&(s+=n+t)),s},_position:function(t){var n,i,r,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=a.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),r=n.length;r>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,M({},s)),c=M({},l),u=M({},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=M({},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,r=this,a=r.wrapper,s=e(r.options.anchor),l=t[0],d=t[1],c=n[0],u=n[1],f=o(s),m=e(r.options.appendTo),v=a.outerWidth(),_=a.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(a.ns+"title");t&&(e.attr("title",t),e.removeData(a.ns+"title"))}function i(e){var t=e.attr("title");t&&(e.data(a.ns+"title",t),e.attr("title",""))}function r(e){for(;e.length&&!e.is("body");)i(e),e=e.parent()}var a=window.kendo,o=a.ui.Widget,s=a.ui.Popup,l=e.isFunction,d=e.isPlainObject,c=e.extend,u=e.proxy,p=e(document),f=a.isLocalUrl,h="_tt_active",m="aria-describedby",g="show",v="hide",_="error",k="contentLoad",b="requestStart",y="k-content-frame",w='',x=a.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(a.ns+"title")},I=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,animation:{open:{effects:"fade:in",duration:0},close:{effects:"fade:out",duration:40,hide:!0}}},events:[g,v,k,_,b],_mouseenter:function(t){r(e(t.currentTarget))},_showOn:function(t){var n=this;n.options.showOn&&n.options.showOn.match(/click|focus/)?n._show(e(t.currentTarget)):(clearTimeout(n.timeout),n.timeout=setTimeout(function(){n._show(e(t.currentTarget))},n.options.showAfter))},_appendContent:function(e){var t,n=this,i=n.options.content,r=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?(r.hide(),t=r.find("."+y)[0],t?t.src=i.url||t.src:r.html(x({content:i})),r.find("."+y).off("load"+C).on("load"+C,function(){n.trigger(k),r.show()})):(r.empty(),a.ui.progress(r,!0),n._ajaxRequest(i))):i&&l(i)?(i=i({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){a.ui.progress(t.content,!1),t.trigger(_,{status:n,xhr:e})},success:u(function(e){a.ui.progress(t.content,!1),t.content.html(e),t.trigger(k)},t)},e))},_documentKeyDown:function(e){e.keyCode===a.keys.ESC&&this.hide()},refresh:function(){var e=this,t=e.popup;t&&t.options.anchor&&e._appendContent(t.options.anchor)},hide:function(){this.popup&&this.popup.close()},show:function(e){r(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(a.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),r=i.offset(),a=n.pageX,o=n.pageY;if(r.right=r.left+i.outerWidth(),r.bottom=r.top+i.outerHeight(),a>r.left&&ar.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(r._click,r)).attr({tabIndex:-1,role:"listbox","aria-hidden":!0}),r.list=e("
      ").append(r.ul).on("mousedown"+o,function(e){e.preventDefault()}),i=t.attr(c),i&&(r.list.attr(c,i+"-list"),r.ul.attr(c,i+"_listbox"),r._optionID=i+"_option_selected"),r._accessors(),r._initValue()},options:{valuePrimitive:!1},setOptions:function(e){a.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,r=t.dataSource,a=r.filter()||{};n(a,i.dataTextField),e&&(a=a.filters||[],a.push(e)),r.filter(a)},_initValue:function(){var e=this,t=e.options.value;t?e.element.val(t):t=e.element.val(),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;a.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,r=i.getter,a=t.attr(i.attr("text-field")),o=t.attr(i.attr("value-field"));a&&(n.dataTextField=a),o&&(n.dataValueField=o),e._text=r(n.dataTextField),e._value=r(n.dataValueField)},_aria:function(e){var n=this,i=n.options,r=n._focused;i.suggest!==t&&r.attr("aria-autocomplete",i.suggest?"both":"list"),e=e?e+" "+n.ul[0].id:n.ul[0].id,r.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,r=n.options.value,a=n.value();n._isSelect&&!n._bound&&r&&(a=r),a!==n._old?e=!0:i!==t&&i!==n._oldIndex&&(e=!0),e&&(n._old=a,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,r=i._data();for(t=0,n=r.length;n>t;t++)if(i._dataValue(r[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(),r=t.options.height;n=n.add(n.parent(".k-animation-container")).show().height(t.ul[0].scrollHeight>r?r:"auto"),i||n.hide()}},_adjustListWidth:function(){var e,t,n=this.list,i=n[0].style.width,r=this.wrapper;if(n.data(x)||!i)return e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=e?parseFloat(e.width):r.outerWidth(),e&&(S.mozilla||S.msie)&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),i=t-(n.outerWidth()-n.width()),n.css({fontFamily:r.css("font-family"),width:i}).data(x,i),!0},_popup:function(){var e=this,t=e.list,n=e._focused,a=e.options,o=e.wrapper;e.popup=new r.Popup(t,C({},a.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:a.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=this.ul[0],n=e.offsetTop,i=e.offsetHeight,r=t.scrollTop,a=t.clientHeight,o=n+i;t.scrollTop=r>n?n:o>r+a?o-a:r}},_template:function(){var e=this,t=e.options,n=t.template,r=t.dataSource;e._isSelect&&e.element[0].length&&(r||(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(I,{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(r){}},inArray:function(e,t){var n,i,r=t.children;if(!e||e.parentNode!==t)return-1;for(n=0,i=r.length;i>n;n++)if(e===r[n])return n;return-1}}),i.ui.List=I,r.Select=I.extend({init:function(e,t){I.fn.init.call(this,e,t),this._initial=this.element.val()},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),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,r=this.element[0],a=this._isSelect,o=r.selectedIndex;return e===t?(a?o>-1&&(i=r.options[o],i&&(e=i.value)):e=r.value,e):(a?(o>-1&&r.options[o].removeAttribute(b),r.selectedIndex=n,i=r.options[n],i&&i.setAttribute(b,b)):r.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,r=n.element,a=n.options,o=a.dataSource||{};o=e.isArray(o)?{data:o}:o,n._isSelect&&(t=r[0].selectedIndex,t>-1&&(a.index=t),o.select=r,o.fields=[{field:a.dataTextField},{field:a.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,r=this,a=r._data();if("function"==typeof t)for(n=0,i=a.length;i>n;n++)if(t(a[n])){t=n;break}if("number"==typeof t){if(0>t)return e();t=e(r.ul[0].children[t])}return t&&t.nodeType&&(t=e(t)),t},_move:function(e){var t,n,i=this,r=e.keyCode,a=i.ul[0],s=i.popup.visible()?"_select":"_accept",l=i._current,d=r===o.DOWN;if(r===o.UP||d){if(e.altKey)i.toggle(d);else{if(t=a.firstChild,!t&&!i._accessor()&&"filter"!==i._state)return i.dataSource.one(p,function(){i._move(e)}),i._filterSource(),e.preventDefault(),!0;d?(!l||-1===i.selectedIndex&&!i.value()&&l[0]===t?l=t:(l=l[0].nextSibling,l||t!==a.lastChild||(l=t)),i[s](l)):(l=l?l[0].previousSibling:a.lastChild,l||t!==a.lastChild||(l=t),i[s](l))}e.preventDefault(),n=!0}else r===o.ENTER||r===o.TAB?(i.popup.visible()&&e.preventDefault(),i._accept(l),n=!0):r===o.ESC&&(i.popup.visible()&&e.preventDefault(),i.close(),n=!0);return n},_selectItem:function(e){var t=this,n=t.options,i=t.selectedIndex; e=t._selectedValue||n.value||t._accessor(),e?t.value(e):(!t._bound||i>-1)&&(t._bound||(i=n.index),t.select(i))},_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(e,n){var i,r,a,o,s=this,d=s.element,c=d[0].selectedIndex,u=e.length,p="",f=0;for(n&&(p=n,c+=1,f=1);u>f;f++)i="",p+=i;d.html(p),d[0].selectedIndex=-1===c?0:c},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=r.on("reset",t._resetHandler))},_cascade:function(){var t,i,r,a,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,a=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()},r=function(){var e,i,r=t.dataItem(),l=r?t._value(r):null;l||0===l?(e=s.dataSource.filter()||{},n(e,a),i=e.filters||[],i.push({field:a,operator:"eq",value:l}),s.dataSource.one(p,o).filter(i)):(s.enable(!1),s._clearSelection(t),s._triggerCascade())},t.bind("cascade",function(){r()}),t._bound?r():t.value()||s.enable(!1)}}})}(window.kendo.jQuery),function(e,t){function n(e,t,n,i){var r,a=e.getFullYear(),o=t.getFullYear(),s=n.getFullYear();return a-=a%i,r=a+(i-1),o>a&&(a=o),r>s&&(r=s),a+"-"+r}function i(e){for(var t,n=0,i=e.min,r=e.max,a=e.start,o=e.setter,l=e.build,d=e.cells||12,c=e.perRow||4,u=e.content||I,p=e.empty||H,f=e.html||'';d>n;n++)n>0&&0===n%c&&(f+=''),t=l(a,n),f+=s(a,i,r)?u(t):p(t),o(a,1);return f+"
      "}function r(e,t,n){var i=e.getFullYear(),r=t.getFullYear(),a=r,o=0;return n&&(r-=r%n,a=r-r%n+n-1),i>a?o=1:r>i&&(o=-1),o}function a(){var e=new ft;return new ft(e.getFullYear(),e.getMonth(),e.getDate())}function o(e,t,n){var i=a();return e&&(i=new ft(+e)),t>i?i=new ft(+t):i>n&&(i=new ft(+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 ft?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function c(t){e(this).toggleClass(G,nt.indexOf(t.type)>-1||t.type==et)}function u(e){e.preventDefault()}function p(e){return D(e).calendars.standard}function f(e){var n=ht[e.start],i=ht[e.depth],r=D(e.culture);e.format=T(e.format||r.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){z&&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}var v,_=window.kendo,k=_.support,b=_.ui,y=b.Widget,w=_.keys,x=_.parseDate,C=_.date.adjustDST,T=_._extractFormat,S=_.template,D=_.getCulture,F=_.support.transitions,E=F?F.css+"transform-origin":"",I=S('#=data.value#',{useWithBlock:!1}),H=S(' ',{useWithBlock:!1}),A=_.support.browser,z=A.msie&&A.version<9,M=".kendoCalendar",R="click"+M,N="keydown"+M,O="id",P="min",B="left",L="slideIn",W="month",V="century",U="change",q="navigate",j="value",G="k-state-hover",Y="k-state-disabled",$="k-state-focused",K="k-other-month",Q=' class="'+K+'"',J="k-nav-today",X="td:has(.k-link)",Z="blur"+M,et="focus",tt=et+M,nt=k.touch?"touchstart":"mouseenter",it=k.touch?"touchstart"+M:"mouseenter"+M,rt=k.touch?"touchend"+M+" touchmove"+M:"mouseleave"+M,at=6e4,ot=864e5,st="_prevArrow",lt="_nextArrow",dt="aria-disabled",ct="aria-selected",ut=e.proxy,pt=e.extend,ft=Date,ht={month:0,year:1,decade:2,century:3},mt=y.extend({init:function(t,n){var i,r,a=this;y.fn.init.call(a,t,n),t=a.wrapper=a.element,n=a.options,n.url=window.unescape(n.url),a._templates(),a._header(),a._footer(a.footer),r=t.addClass("k-widget k-calendar").on(it+" "+rt,X,c).on(N,"table.k-content",ut(a._move,a)).on(R,X,function(t){var n=t.currentTarget.firstChild;-1!=n.href.indexOf("#")&&t.preventDefault(),a._click(e(n))}).on("mouseup"+M,function(){a._focusView(a.options.focusOnNav!==!1)}).attr(O),r&&(a._cellID=r+"_cell_selected"),i=n.value,f(n),a._index=ht[n.start],a._current=new ft(+o(i,n.min,n.max)),a._addClassProxy=function(){a._active=!0,a._cell.addClass($)},a._removeClassProxy=function(){a._active=!1,a._cell.removeClass($)},a.value(i),_.notify(a)},options:{name:"Calendar",value:null,min:new ft(1900,0,1),max:new ft(2099,11,31),dates:[],url:"",culture:"",footer:"",format:"",month:{},start:W,depth:W,animation:{horizontal:{effects:L,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}}},events:[U,q],setOptions:function(e){f(e),y.fn.setOptions.call(this,e)},destroy:function(){var e=this,t=e._today;e.element.off(M),e._title.off(M),e[st].off(M),e[lt].off(M),_.destroy(e._view),t&&_.destroy(t.off(M)),y.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(P,e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(st,-1)},navigateToFuture:function(){this._navigate(lt,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass(Y)||e.navigate(e._current,++t)},navigateDown:function(e){var n=this,i=n._index,r=n.options.depth;if(e)return i===ht[r]?(+n._value!=+e&&(n.value(e),n.trigger(U)),t):(n.navigate(e,--i),t)},navigate:function(n,i){i=isNaN(i)?ht[i]:i;var r,a,s,l,d=this,c=d.options,u=c.culture,p=c.min,f=c.max,m=d._title,g=d._table,_=d._oldTable,k=d._value,b=d._current,y=n&&+n>+b,w=i!==t&&i!==d._index;n?d._current=n=new ft(+o(n,p,f)):n=b,i===t?i=d._index:d._index=i,d._view=a=v.views[i],s=a.compare,l=i===ht[V],m.toggleClass(Y,l).attr(dt,l),l=s(n,p)<1,d[st].toggleClass(Y,l).attr(dt,l),l=s(n,f)>-1,d[lt].toggleClass(Y,l).attr(dt,l),g&&_&&_.data("animating")&&(_.kendoStop(!0,!0),g.kendoStop(!0,!0)),d._oldTable=g,(!g||d._changeView)&&(m.html(a.title(n,p,f,u)),d._table=r=e(a.content(pt({min:p,max:f,date:n,url:c.url,dates:c.dates,format:c.format,culture:u},d[a.name]))),h(r),d._animate({from:g,to:r,vertical:w,future:y}),d._focus(n),d.trigger(q)),i===ht[c.depth]&&k&&d._class("k-state-selected",a.toDateString(k)),d._class($,a.toDateString(n)),!g&&d._cell&&d._cell.removeClass($),d._changeView=!0},value:function(e){var n=this,i=n._view,r=n.options,a=n._view,o=r.min,l=r.max;return e===t?n._value:(e=x(e,r.format,r.culture),null!==e&&(e=new ft(+e),s(e,o,l)||(e=null)),n._value=e,a&&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,r,a,s=this,l=s.options,d=t.keyCode,c=s._view,u=s._index,p=new ft(+s._current),f=_.support.isRtl(s.wrapper);return t.target===s._table[0]&&(s._active=!0),t.ctrlKey?d==w.RIGHT&&!f||d==w.LEFT&&f?(s.navigateToFuture(),i=!0):d==w.LEFT&&!f||d==w.RIGHT&&f?(s.navigateToPast(),i=!0):d==w.UP?(s.navigateUp(),i=!0):d==w.DOWN&&(s._click(e(s._cell[0].firstChild)),i=!0):(d==w.RIGHT&&!f||d==w.LEFT&&f?(n=1,i=!0):d==w.LEFT&&!f||d==w.RIGHT&&f?(n=-1,i=!0):d==w.UP?(n=0===u?-7:-4,i=!0):d==w.DOWN?(n=0===u?7:4,i=!0):d==w.ENTER?(s._click(e(s._cell[0].firstChild)),i=!0):d==w.HOME||d==w.END?(r=d==w.HOME?"first":"last",a=c[r](p),p=new ft(a.getFullYear(),a.getMonth(),a.getDate(),p.getHours(),p.getMinutes(),p.getSeconds(),p.getMilliseconds()),i=!0):d==w.PAGEUP?(i=!0,s.navigateToPast()):d==w.PAGEDOWN&&(i=!0,s.navigateToFuture()),(n||r)&&(r||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,r=t._active;n?n.parent().data("animating")?(n.parent().kendoStop(!0,!0).remove(),n.remove(),i.insertAfter(t.element[0].firstChild),t._focusView(r)):n.is(":visible")&&t.options.animation!==!1?t[e.vertical?"_vertical":"_horizontal"](n,i,e.future):(i.insertAfter(n),n.remove(),t._focusView(r)):(i.insertAfter(t.element[0].firstChild),t._bindTable(i))},_horizontal:function(e,n,i){var r=this,a=r._active,o=r.options.animation.horizontal,s=o.effects,l=e.outerWidth();s&&-1!=s.indexOf(L)&&(e.add(n).css({width:l}),e.wrap("
      "),r._focusView(a,e),e.parent().css({position:"relative",width:2*l,"float":B,"margin-left":i?0:-l}),n[i?"insertAfter":"insertBefore"](e),pt(o,{effects:L+":"+(i?"right":B),complete:function(){e.remove(),n.unwrap(),r._focusView(a),r._oldTable=t}}),e.parent().kendoStop(!0,!0).kendoAnimate(o))},_vertical:function(e,n){var i,r,a=this,o=a.options.animation.vertical,s=o.effects,l=a._active;s&&-1!=s.indexOf("zoom")&&(n.css({position:"absolute",top:e.prev().outerHeight(),left:0}).insertBefore(e),E&&(i=a._cellByDate(a._view.toDateString(a._current)),r=i.position(),r=r.left+parseInt(i.width()/2,10)+"px"+" "+(r.top+parseInt(i.height()/2,10)+"px"),n.css(E,r)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.remove(),n.css({position:"static",top:0,left:0}),a._focusView(l),a._oldTable=t}}),n.kendoStop(!0,!0).kendoAnimate(o))},_cellByDate:function(t){return this._table.find("td:not(."+K+")").filter(function(){return e(this.firstChild).attr(_.attr(j))===t})},_class:function(t,n){var i=this,r=i._cellID,a=i._cell;a&&a.removeAttr(ct).removeAttr(O),a=i._table.find("td:not(."+K+")").removeClass(t).filter(function(){return e(this.firstChild).attr(_.attr(j))===n}).attr(ct,!0),t!==$||i._active||i.options.focusOnNav===!1||(t=""),a.addClass(t),a[0]&&(i._cell=a),r&&(a.attr(O,r),i._table.removeAttr("aria-activedescendant").attr("aria-activedescendant",r))},_bindTable:function(e){e.on(tt,this._addClassProxy).on(Z,this._removeClassProxy)},_click:function(e){var t=this,n=t.options,i=new Date(+t._current),r=e.attr(_.attr(j)).split("/");r=new ft(r[0],r[1],r[2]),C(r),t._view.setDate(i,r),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($,n.toDateString(e)))},_focusView:function(e,t){e&&this.focus(t)},_footer:function(n){var i=this,r=a(),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(r)).attr("title",_.toString(r,"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(it+" "+rt+" "+tt+" "+Z,c).click(!1),t._title=e.eq(1).on(R,function(){t._focusView(i),t.navigateUp()}),t[st]=e.eq(0).on(R,function(){t._focusView(i),t.navigateToPast()}),t[lt]=e.eq(2).on(R,function(){t._focusView(i),t.navigateToFuture()})},_navigate:function(e,t){var n=this,i=n._index+1,r=new ft(+n._current);e=n[e],e.hasClass(Y)||(i>3?r.setFullYear(r.getFullYear()+100*t):v.views[i].setDate(r,t),n.navigate(r))},_option:function(e,n){var i,r=this,a=r.options,o=+r._value;return n===t?a[e]:(n=x(n,a.format,a.culture),n&&(a[e]=new ft(+n),o&&(i=e===P?+n>o:o>+n),i?r.value(null):(r._changeView=g(r._current,n)||!(!a.month.content&&!a.month.empty),r.navigate()),r._toggle()),t)},_toggle:function(e){var n=this,i=n.options,r=n._today;e===t&&(e=s(a(),i.min,i.max)),r&&(r.off(R),e?r.addClass(J).removeClass(Y).on(R,ut(n._todayClick,n)):r.removeClass(J).addClass(Y).on(R,u))},_todayClick:function(e){var t=this,n=ht[t.options.depth],i=a();e.preventDefault(),0===t._view.compare(t._current,i)&&t._index==n&&(t._changeView=!1),t._value=i,t.navigate(i,n),t.trigger(U)},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month,r=i.content,a=i.empty;e.month={content:S(''+(r||"#=data.value#")+"",{useWithBlock:!!r}),empty:S(''+(a||" ")+"",{useWithBlock:!!a})},n!==!1&&(e.footer=S(n||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}))}});b.plugin(mt),v={firstDayOfMonth:function(e){return new ft(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t=t||_.culture().calendar;for(var n=t.firstDay,i=new ft(e.getFullYear(),e.getMonth(),0,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());i.getDay()!=n;)v.setTime(i,-1*ot);return i},setTime:function(e,t){var n=e.getTimezoneOffset(),i=new ft(e.getTime()+t),r=i.getTimezoneOffset()-n;e.setTime(i.getTime()+r*at)},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,r=e.min,a=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,k=h.days,b=l(k.names,g),y=l(k.namesShort,g),w=v.firstVisibleDay(o,h),x=t.first(o),T=t.last(o),S=t.toDateString,D=new ft,F='';7>n;n++)F+='";return D=new ft(D.getFullYear(),D.getMonth(),D.getDate()),C(D),D=+D,i({cells:42,perRow:7,html:F+='',start:new ft(w.getFullYear(),w.getMonth(),w.getDate()),min:new ft(r.getFullYear(),r.getMonth(),r.getDate()),max:new ft(a.getFullYear(),a.getMonth(),a.getDate()),content:e.content,empty:e.empty,setter:t.setDate,build:function(e){var t=[],n=e.getDay(),i="",r="#";return(x>e||e>T)&&t.push(K),+e===D&&t.push("k-today"),(0===n||6===n)&&t.push("k-weekend"),f&&m(+e,s)&&(r=u.replace("{0}",_.toString(e,d,c)),i=" k-action-link"),{date:e,dates:s,ns:_.ns,title:_.toString(e,"D",c),value:e.getDate(),dateString:S(e),cssClass:t[0]?' class="'+t.join(" ")+'"':"",linkClass:i,url:r}}})},first:function(e){return v.firstDayOfMonth(e)},last:function(e){var t=new ft(e.getFullYear(),e.getMonth()+1,0),n=v.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(),r=e.getFullYear(),a=t.getMonth(),o=t.getFullYear();return n=r>o?1:o>r?-1:i==a?0:i>a?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof ft?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):v.setTime(e,t*ot),C(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,r=e.min,a=e.max;return i({min:new ft(r.getFullYear(),r.getMonth(),1),max:new ft(a.getFullYear(),a.getMonth(),1),start:new ft(e.date.getFullYear(),0,1),setter:this.setDate,build:function(e){return{value:t[e.getMonth()],ns:_.ns,dateString:n(e),cssClass:""}}})},first:function(e){return new ft(e.getFullYear(),0,e.getDate())},last:function(e){return new ft(e.getFullYear(),11,e.getDate())},compare:function(e,t){return r(e,t)},setDate:function(e,t){var n,i=e.getHours();t instanceof ft?(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)),C(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 ft(t-t%10-1,0,1),min:new ft(e.min.getFullYear(),0,1),max:new ft(e.max.getFullYear(),0,1),setter:this.setDate,build:function(e,t){return{value:e.getFullYear(),ns:_.ns,dateString:n(e),cssClass:0===t||11==t?Q:""}}})},first:function(e){var t=e.getFullYear();return new ft(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return new ft(t-t%10+9,e.getMonth(),e.getDate())},compare:function(e,t){return r(e,t,10)},setDate:function(e,t){d(e,t,1)},toDateString:function(e){return e.getFullYear()+"/0/1"}},{name:V,title:function(e,t,i){return n(e,t,i,100)},content:function(e){var t=e.date.getFullYear(),n=e.min.getFullYear(),r=e.max.getFullYear(),a=this.toDateString,o=n,s=r;return o-=o%10,s-=s%10,10>s-o&&(s=o+9),i({start:new ft(t-t%100-10,0,1),min:new ft(o,0,1),max:new ft(s,0,1),setter:this.setDate,build:function(e,t){var i=e.getFullYear(),o=i+9;return n>i&&(i=n),o>r&&(o=r),{ns:_.ns,value:i+" - "+o,dateString:a(e),cssClass:0===t||11==t?Q:""}}})},first:function(e){var t=e.getFullYear();return new ft(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return new ft(t-t%100+99,e.getMonth(),e.getDate())},compare:function(e,t){return r(e,t,100)},setDate:function(e,t){d(e,t,10)},toDateString:function(e){var t=e.getFullYear();return t-t%10+"/0/1"}}]},v.isEqualDatePart=g,v.makeUnselectable=h,v.restrictValue=o,v.isInRange=s,v.normalize=f,v.viewsEnum=ht,_.calendar=v}(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 r,a=window.kendo,o=a.ui,s=o.Widget,l=a.parseDate,d=a.keys,c=a.template,u=a._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,I="id",H="min",A="max",z="month",M="aria-disabled",R="aria-expanded",N="aria-hidden",O="aria-readonly",P=a.calendar,B=P.isInRange,L=P.restrictValue,W=P.isEqualDatePart,V=e.extend,U=e.proxy,q=Date,j=function(t){var n,i=this,s=document.body,l=r.sharedCalendar,d=e(p).attr(N,"true").addClass("k-calendar-container").appendTo(s);l||(l=r.sharedCalendar=new o.Calendar(e(p).attr(I,a.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(I,n),i._dateViewID=n),i.popup=new o.Popup(d,V(t.popup,t,{name:"Popup",isRtl:a.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,r=e.calendar,a=r.element;a.data(k)!==e&&(a.appendTo(t.element).data(k,e).off(m+" "+D).on(m,"td:has(.k-link)",U(e._click,e)).on(E,i).show(),r.unbind(_).bind(_,n),r.month=e.month,r.options.dates=n.dates,r.options.depth=n.depth,r.options.culture=n.culture,r._footer(e.footer),r.min(n.min),r.max(n.max),r._value=null,r.navigate(e._value||e._current,n.start),e.value(e._value))},destroy:function(){var n,i=this,a=i.calendar,o=a.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),a.destroy(),a.element.remove(),r.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,r=n.calendar,a=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 a&&r._cell.hasClass(C)?(n.close(),e.preventDefault(),t):(n._current=r._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,r=n.calendar;i[e]=t,r.element.data(k)===n&&r[e](t)},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month||{},r=i.content,o=i.empty;e.month={content:c(''+(r||"#=data.value#")+"",{useWithBlock:!!r}),empty:c("
      ",{useWithBlock:!!o})},n!==!1&&(e.footer=c(n||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}))}},j.normalize=n,a.DateView=j,r=s.extend({init:function(e,t){var i,r,o=this;s.fn.init.call(o,e,t),e=o.element,t=o.options,n(t),o._wrapper(),o.dateView=new j(V({},t,{id:e.attr(I),anchor:o.wrapper,change:function(){o._change(this.value()),o.close()},close:function(t){o.trigger(v)?t.preventDefault():(e.attr(R,!1),r.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),r.attr(N,!1))}})),r=o.dateView.div,o._icon(),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.value(t.value||o.element.val()),a.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:z,depth:z,animation:{},month:{},dates:[],ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#'},setOptions:function(e){var t=this,i=t.dateView,r=i.options;s.fn.setOptions.call(t,e),n(t.options),i.options=V(r,t.options,{change:r.change,close:r.close,open:r.open})},_editable:function(e){var t=this,n=t._dateIcon.off(h),r=t.element.off(h),a=t._inputWrapper.off(h),o=e.readonly,s=e.disable;o||s?(a.addClass(s?T:w).removeClass(s?w:T),r.attr(b,s).attr(y,o).attr(M,s).attr(O,o)):(a.addClass(w).removeClass(T).on(F,t._toggleHover),r.removeAttr(b).removeAttr(y).attr(M,!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(),a.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,r=i.options;return n===t?r[e]:(n=l(n,r.parseFormats,r.culture),n&&(r[e]=new q(+n),i.dateView[e](n)),t)},_update:function(e){var t,n=this,i=n.options,r=i.min,o=i.max,s=l(e,i.parseFormats,i.culture);return+s===+n._value?(t=a.toString(s,i.format,i.culture),t!==e&&n.element.val(null===s?e:t),s):(null!==s&&W(s,r)?s=L(s,r,o):B(s,r,o)||(s=null),n._value=s,n.dateView.value(s),n.element.val(s?a.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"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue)},t._form=r.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(r)}(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 r(e,t,i,r){var a=t.split(r);return a.splice(n(e,t,r),1,i),r&&""!==a[a.length-1]&&a.push(""),a.join(r)}function a(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,r=this;r.ns=x,n=e.isArray(n)?{dataSource:n}:n,f.fn.init.call(r,t,n),t=r.element,n=r.options,n.placeholder=n.placeholder||t.attr("placeholder"),d&&t.attr("placeholder",n.placeholder),r._wrapper(),r._loader(),r._dataSource(),r._ignoreCase(),t[0].type="text",i=r.wrapper,r._popup(),t.addClass("k-input").on("keydown"+x,D(r._keydown,r)).on("paste"+x,D(r._search,r)).on("focus"+x,function(){r._prev=r._accessor(),r._placeholder(!1),i.addClass(k)}).on("blur"+x,function(){r._change(),r._placeholder(),i.removeClass(k)}).attr({autocomplete:"off",role:"textbox","aria-haspopup":!0}),r._enable(),r._old=r._accessor(),t[0].id&&t.attr("aria-owns",r.ul[0].id),r._aria(),r._placeholder(),o.notify(r)},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:{}},_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),r=e.readonly,a=e.disable;r||a?(i.addClass(a?y:g).removeClass(a?g:y),n.attr(v,a).attr(_,r).attr(h,a).attr(m,r)):(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,r=i.ul[0],a=i.popup,s=i.options,d=i._data(),c=d.length;i.trigger("dataBinding"),r.innerHTML=o.render(i.template,d),i._height(c),a.visible()&&a._position(),c&&(s.highlightFirst&&i.current(e(r.firstChild)),s.suggest&&i.suggest(e(r.firstChild))),i._open&&(i._open=!1,n=c?"open":"close",i._typing&&i.element[0]!==l()&&(n="close"),a[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,r=n.options,a=r.ignoreCase,o=r.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:a?e.toLowerCase():e,operator:r.filter,field:r.dataTextField,ignoreCase:a})):n.popup.close()},suggest:function(e){var i,r=this,a=r._last,o=r._accessor(),s=r.element[0],l=T(s),d=r.options.separator,c=o.split(d),p=n(l,o,d),h=l;return a==u.BACKSPACE||a==u.DELETE?(r._last=t,t):(e=e||"","string"!=typeof e&&(i=f.inArray(e[0],r.ul[0]),e=i>-1?r._text(r._data()[i]):""),0>=l&&(l=o.toLowerCase().indexOf(e.toLowerCase())+1),i=o.substring(0,l).lastIndexOf(d),i=i>-1?l-(i+d.length):l,o=c[p].substring(0,i),e&&(i=e.toLowerCase().indexOf(o.toLowerCase()),i>-1&&(e=e.substring(i+o.length),h=l+e.length,o+=e),d&&""!==c[c.length-1]&&c.push("")),c[p]=o,r._accessor(c.join(d||"")),S(s,l,h),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),a(t.element[0])},_keydown:function(t){var n=this,i=n.ul[0],r=t.keyCode,a=n._current,o=n.popup.visible();n._last=r,r===u.DOWN?(o&&n._move(a?a.next():e(i.firstChild)),t.preventDefault()):r===u.UP?(o&&n._move(a?a.prev():e(i.lastChild)),t.preventDefault()):r===u.ENTER||r===u.TAB?(r===u.ENTER&&n.popup.visible()&&t.preventDefault(),n._accept(a)):r===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,r=i.element,a=i.options.placeholder;if(a){if(n=r.val(),e===t&&(e=!n),e||(a=n!==a?n:""),n===i._old&&!e)return;r.toggleClass("k-readonly",e).val(a)}}},_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,a=this,o=a.options.separator,s=a._data();t=e(t),t[0]&&!t.hasClass(b)&&(i=f.inArray(t[0],a.ul[0]),i>-1&&(s=s[i],n=a._text(s),o&&(n=r(T(a.element[0]),a._accessor(),n,o)),a._accessor(n),a.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,r=0,a=t.length-1;a>r;++r)i=t[r],i in e||(e[i]={}),e=e[i];e[t[a]]=n}var i=window.kendo,r=i.ui,a=r.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=a.extend({init:function(n,r){var o,l,d,c=this,u=r&&r.index; c.ns=s,r=e.isArray(r)?{dataSource:r}:r,a.fn.init.call(c,n,r),c._focusHandler=function(){c.wrapper.focus()},r=c.options,n=c.element.on("focus"+s,c._focusHandler),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._cascade(),c._oldIndex=c.selectedIndex=-1,u!==t&&(r.index=u),r.autoBind?c.dataSource.fetch():(d=r.text||"",d||(o=c._optionLabelText(r.optionLabel),l=o&&0===r.index,c._isSelect?d=l?o:n.children(":selected").text():!n[0].value&&l&&(d=o)),c.text(d)),i.notify(c)},options:{name:"DropDownList",enabled:!0,autoBind:!0,index:0,text:null,value:null,template:"",delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",ignoreCase:!0,animation:{}},events:["open","close",c,"select","dataBinding","dataBound","cascade"],setOptions:function(e){a.fn.setOptions.call(this,e),this._template(),this._accessors(),this._aria()},destroy:function(){var e=this;e.wrapper.off(s),e.element.off(s),e._inputWrapper.off(s),a.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,r=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&&(r&&n&&(r=e._optionLabelText(r),r='"),e._options(t,r)),e._open&&(e._open=!1,e.toggle(!!n)),e._hideBusy(),e._makeUnselectable(),!e._fetch&&n&&e._selectItem(),e._bound=!0,e.trigger("dataBound")},search:function(e){if(e){var n=this,i=n.options.ignoreCase;i&&(e=e.toLowerCase()),n._select(function(r){var a=n._text(r);return a!==t?(a+="",i&&(a=a.toLowerCase()),0===a.indexOf(e)):t})}},text:function(e){var n=this.span;return e===t?n.text():(n.text(e),t)},value:function(e){var n,i,r=this;return e===t?r._accessor():(null!==e&&(e=""+e),r._selectedValue=e,i=e||r.options.optionLabel&&!r.element[0].disabled&&""===e,i&&r._fetchItems(e)||(n=r._index(e),r.select(n>-1?n:0)),t)},_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,a=t.wrapper.off(s),o=t._inputWrapper.off(v),c=function(){o.addClass(u),t._blured=!1},g=function(){t._blured||(t._triggerCascade(),t._blur(),o.removeClass(u),t._blured=!0,n.blur())};r||i?(i?(a.removeAttr(_),o.addClass(f).removeClass(p)):(o.addClass(p).removeClass(f),a.on("focusin"+s,c).on("focusout"+s,g)),n.attr(l,i).attr(d,r),a.attr(h,i).attr(m,r)):(n.removeAttr(l).removeAttr(d),o.addClass(p).removeClass(f).on(v,t._toggleHover),a.attr(_,a.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,c).on("focusout"+s,g))},_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,r=t.optionLabel,a=t.dataTextField,o=t.dataValueField,s=e.dataSource.view(),l=s.length,d=r,c=0;if(r&&l){for("object"==typeof r?d=r:a&&(d={},a=a.split("."),o=o.split("."),n(d,o,""),n(d,a,r)),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,r=i.keys,a=t.ul[0];n===r.LEFT?n=r.UP:n===r.RIGHT&&(n=r.DOWN),e.keyCode=n,t._move(e),n===r.HOME?(e.preventDefault(),t._select(a.firstChild)):n===r.END&&(e.preventDefault(),t._select(a.lastChild))},_selectNext:function(e,t){for(var n,i=this,r=i.options.ignoreCase,a=i._data(),o=a.length;o>t;t++)if(n=i._text(a[t]),n&&(n+="",r&&(n=n.toLowerCase()),0===n.indexOf(e)))return i._select(t),i._triggerEvents(),!0;return!1},_keypress:function(e){var t=this;setTimeout(function(){var n=String.fromCharCode(e.keyCode||e.charCode),i=t.selectedIndex;if(t.options.ignoreCase&&(n=n.toLowerCase()),n===t._last&&i>-1){if(t._word=n,t._selectNext(n,i+1))return}else t._word+=n;t._last=n,t._search()})},_popup:function(){a.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._word;return clearTimeout(e._typing),e._typing=setTimeout(function(){e._word=""},e.options.delay),e.ul[0].firstChild?(e.search(i),e._triggerEvents(),t):(n.one(c,function(){n.data()[0]&&e.search(i)}).fetch(),t)},_select:function(e){var n,i,a,o=this,s=o._current,l=o._data();e=o._get(e),e&&e[0]&&!e.hasClass(g)&&(s&&s.removeClass(g),a=r.List.inArray(e[0],o.ul[0]),a>-1&&(l=l[a],i=o._text(l),n=o._value(l),o.selectedIndex=a,o.text(i),o._accessor(n!==t?n:i,a),o._selectedValue=o._accessor(),o.current(e.addClass(g)),o._optionID&&o._current.attr("aria-selected",!0)))},_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,r="span.k-input";t=i.find(r),t[0]||(i.append(' select').append(n.element),t=i.find(r)),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.text(n),e.element.val(""),e.selectedIndex=-1,t)}});r.plugin(b)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,r=i.List,a=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=a.extend({init:function(t,i){var r,o=this;o.ns=c,i=e.isArray(i)?{dataSource:i}:i,a.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():(r=i.text,!r&&o._isSelect&&(r=t.children(":selected").text()),r&&(o.input.val(r),o._prev=r)),r||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,ignoreCase:!0,animation:{}},events:["open","close",m,"select","dataBinding","dataBound","cascade"],setOptions:function(e){a.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),a.fn.current.call(n,e),t)},destroy:function(){var e=this;e.input.off(c),e.element.off(c),e._inputWrapper.off(c),a.fn.destroy.call(e)},_editable:function(e){var t=this,n=e.disable,i=e.readonly,r=t._inputWrapper.off(c),a=t.element.add(t.input.off(c)),o=t._arrow.parent().off(u+" "+p);i||n?(r.addClass(n?_:g).removeClass(n?g:_),a.attr(f,n).attr(h,i).attr(k,n).attr(b,i)):(r.addClass(g).removeClass(_).on(T,t._toggleHover),a.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(){r.addClass(v),t._placeholder(!1)}).on("blur"+c,function(){r.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,r,a,o=this,s=o.ul[0],d=o.options,c=o._state,u=o._data(),p=u.length;o.trigger("dataBinding"),s.innerHTML=n.render(o.template,u),o._height(p),o.popup.visible()&&o.popup._position(),o._isSelect&&(c===C&&(o._state="",i=o.value()),a=o._option,o._option=t,o._options(u),a&&a[0].selected&&o._custom(a.val())),p&&(d.highlightFirst&&o.current(e(s.firstChild)),d.suggest&&o.input.val()&&o._request!==t&&o.suggest(e(s.firstChild))),c===w||o._fetch||o._selectItem(),o._open&&(o._open=!1,r=!!p,o._typing&&o.input[0]!==l()&&(r=!1),o.toggle(r),o._typing=t),o._touchScroller&&o._touchScroller.reset(),o._makeUnselectable(),o._hideBusy(),o._bound=!0,o.trigger("dataBound")},search:function(e){e="string"==typeof e?e:this.text();var t=this,n=e.length,i=t.options,r=i.ignoreCase,a=i.filter,o=i.dataTextField;clearTimeout(t._typing),n>=i.minLength&&(t._state=w,"none"===a?t._filter(e):(t._open=!0,t._filterSource({value:r?e.toLowerCase():e,field:o,operator:a,ignoreCase:r})))},suggest:function(e){var n,i=this,a=i.input[0],o=i.text(),s=r.caret(a),l=i._last;return l==d.BACKSPACE||l==d.DELETE?(i._last=t,t):(e=e||"","string"!=typeof e&&(n=r.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||(a.value=o,r.selectText(a,s,o.length)),t)},text:function(e){e=null===e?"":e;var n,i=this,r=i._text,a=i.input[0],o=i.options.ignoreCase,s=e;return e===t?a.value:(n=i.dataItem(),n&&r(n)===e?(i._triggerCascade(),t):(o&&(s=s.toLowerCase()),i._select(function(e){return e=r(e),o&&(e=(e+"").toLowerCase()),e===s}),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;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),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,r=n._option;n._state===w&&(n._state=x),n._isSelect?(r||(r=n._option=e("')}function i(e){var t,n=" ";if(e){if(typeof e===mt)return e;for(t in e)n+=t+'="'+e[t]+'"'}return n}function r(t){var n=0;return e("> .k-grouping-header, > .k-grid-toolbar",t).each(function(){n+=this.offsetHeight}),n}function a(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={},r={};if(!R(e))for(H(e)||(e=[e]),t=0,n=e.length;n>t;t++)i[e[t].aggregate]=0,r[e[t].field]=i;return r}function s(e,t,n){var i=e.eq(t),r=e.eq(n);i[t>n?"insertBefore":"insertAfter"](r)}function l(e,t,n){var i,r,a,o;for(n=H(n)?n:[n],i=0,r=n.length;r>i;i++)a=n[i],D(a)&&a.click&&(o=a.name||a.text,t.on(ut+Y,"a.k-grid-"+(o||"").replace(/\s/g,""),{commandName:o},z(a.click,e)))}function d(e){return I(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,r){var a,o=t.find(">colgroup"),s=E(n,function(e){return a=e.width,a&&0!==parseInt(a,10)?k.format('',typeof a===mt?a:a+"px"):""});(i||o.find(".k-hierarchy-col").length)&&s.splice(0,0,''),o.length&&o.remove(),o=e(Array(r+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,r={};for(n=0,i=e.length;i>n;n++)t=e[n],r[t.value]=t.text;return r}function h(e,t,n){var i=n&&n.length&&D(n[0])&&"value"in n[0],r=i?f(n)[e]:e;return r=null!=r?r:"",t?k.format(t,r):r}function m(e,t,n){for(var i,r=0,a=e[r];a;){if(i=n?!0:"none"!==a.style.display,i&&!bt.test(a.className)&&--t<0){a.style.display=n?"":"none";break}a=e[++r]}}function g(e,t){var n,i,r;if(typeof e===mt&&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(r=e[n],typeof r===mt&&r===t||r.name===t)return r;return null}function v(t,n){var i,r,a,o=xt.msie;if(n===!0){if(t=e(t),a=o&&t.parent().is(".k-grid-content,.k-grid-header-wrap"),a&&(i=t.parent().scrollTop(),r=t.parent().scrollLeft()),o)try{t[0].setActive()}catch(s){t[0].focus()}else t[0].focus();a&&(t.parent().scrollTop(i),t.parent().scrollLeft(r))}else e(t).one("focusin",function(e){e.preventDefault()}).focus()}function _(t){var n=e(t.currentTarget),i=n.is("th"),r=n.closest("table")[0];k.support.touch||(r===this.table[0]||r===this.thead.parent()[0])&&(this.current(n),(i||!e(t.target).is(":button,a,:input,a>.k-icon,textarea,span.k-icon,.k-input,.k-multiselect-wrap"))&&setTimeout(function(){v(r,!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,I=e.grep,H=e.isArray,A=e.inArray,z=e.proxy,M=e.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)",W="tr:not(.k-footer-template):visible",V=":not(.k-group-cell):not(.k-hierarchy-cell):visible",U=W+":first>"+V+":first",q="th.k-header:not(.k-group-cell,.k-hierarchy-cell)",j=q+":visible["+k.attr("field")+"]",G=q+"["+k.attr("field")+"]",Y=".kendoGrid",$="edit",K="save",Q="remove",J="detailInit",X="filterMenuInit",Z="columnMenuInit",et="change",tt="columnHide",nt="columnShow",it="saveChanges",rt="dataBound",at="detailExpand",ot="detailCollapse",st="k-state-focused",lt="k-state-selected",dt="columnResize",ct="columnReorder",ut="click",pt="height",ft="tabIndex",ht="function",mt="string",gt="Are you sure you want to delete this record?",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=T.extend({init:function(e,t){var n=this;T.fn.init.call(n,e,t),n._refreshHandler=z(n.refresh,n),n.setDataSource(t.dataSource),n.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(et,t._refreshHandler),t.dataSource=e,t.dataSource.bind(et,t._refreshHandler)},options:{name:"VirtualScrollable",itemHeight:e.noop},destroy:function(){var e=this;T.fn.destroy.call(e),e.dataSource.unbind(et,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off(Y),e.drag&&e.drag.destroy()},wrap:function(){var t,n=this,i=k.support.scrollbar()+1,r=n.element;r.css({width:"auto",overflow:"hidden"}).css(wt?"padding-left":"padding-right",i),n.content=r.children().first(),t=n.wrapper=n.content.wrap('
      ').parent().bind("DOMMouseScroll"+Y+" mousewheel"+Y,z(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(r).bind("scroll"+Y,z(n._scroll,n))},_wheelScroll:function(e){var n,i=this,r=i.verticalScrollbar.scrollTop(),a=e.originalEvent,o=a.wheelDeltaY;a.wheelDelta?(o===t||o)&&(n=a.wheelDelta):a.detail&&a.axis===a.VERTICAL_AXIS&&(n=10*-a.detail),n&&(e.preventDefault(),i.verticalScrollbar.scrollTop(r+-n))},_scroll:function(e){var t=this,n=e.currentTarget.scrollTop,i=t.dataSource,r=t.itemHeight,a=i.skip()||0,o=t._rangeStart||a,s=t.element.innerHeight(),l=!!(t._scrollbarTop&&t._scrollbarTop>n),d=N.max(N.floor(n/r),0),c=N.max(d+N.floor(s/r),0);t._scrollTop=n-o*r,t._scrollbarTop=n,t._fetch(d,c,l)||(t.wrapper[0].scrollTop=t._scrollTop)},_fetch:function(e,t,n){var i=this,r=i.dataSource,a=i.itemHeight,o=r.take(),s=i._rangeStart||r.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)*a,i._page(s,o)):t>=s+o&&!n?(d=!0,s=e,i._scrollTop=a,i._page(s,o)):i._fetching||(l+o-o*c>e&&e>o&&r.prefetch(l-o,o),t>l+o*c&&r.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,r=this,a="",o=25e4,s=r.dataSource,l=r._rangeStart,d=k.support.kineticScrollNeeded?0:k.support.scrollbar(),c=r.wrapper[0];for(k.ui.progress(r.wrapper.parent(),!1),clearTimeout(r._timeout),n=r.itemHeight=r.options.itemHeight()||0,i=c.scrollWidth>c.offsetWidth?d:0,e=s.total()*n+i,t=0;t
      ';e%o&&(a+='
      '),r.verticalScrollbar.html(a),c.scrollTop=r._scrollTop,r.drag&&r.drag.cancel(),l&&!r._fetching&&(r._rangeStart=s.skip()),r._fetching=!1}}),St={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"}},Dt=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:[et,"dataBinding","cancel",rt,at,ot,J,X,Z,$,K,Q,it,dt,ct,nt,tt],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 e,t=this;T.fn.destroy.call(t),t.pager&&t.pager.destroy(),t.groupable&&t.groupable.destroy(),t.options.reorderable&&t.wrapper.data("kendoReorderable").destroy(),t.resizable&&t.resizable.destroy(),t.virtualScrollable&&t.virtualScrollable.destroy(),t._destroyColumnAttachments(),t._destroyEditable(),t.dataSource.unbind(et,t._refreshHandler).unbind(O,t._progressHandler).unbind(P,t._errorHandler),e=t.element.add(t.wrapper).add(t.table).add(t.thead).add(t.wrapper.find(">.k-grid-toolbar")),t.content&&(e=e.add(t.content).add(t.content.find(">.k-virtual-scrollable-wrap"))),e.off(Y),k.destroy(t.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"),r=t.data("kendoColumnMenu");n&&n.destroy(),i&&i.destroy(),r&&r.destroy()})},_attachCustomCommandsEvent:function(){var e,t,n,i=this,r=i.columns||[];for(t=0,n=r.length;n>t;t++)e=r[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("
      '+y[n]+"
      "+(o||" ")+" 
      ").appendTo(t.element))),Ct&&n.attr("cellspacing",0),t.table=n.attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_positionColumnResizeHandle:function(t){var n,i=this,o=i.options.scrollable,s=i.resizeHandle,l=i.options.columnResizeHandleWidth;i.thead.on("mousemove"+Y,"th:not(.k-group-cell,.k-hierarchy-cell)",function(d){var c,u,p,f,h=e(this),m=d.clientX,g=e(window).scrollLeft(),v=h.offset().left+(wt?0:this.offsetWidth);m+g>v-l&&v+l>m+g?(s||(s=i.resizeHandle=e('
      '),t.append(s)),wt?(c=h.closest(".k-grid-header-wrap"),u=xt.msie?c.scrollLeft():0,p=xt.webkit?c[0].scrollWidth-c[0].offsetWidth-c.scrollLeft():0,f=xt.mozilla?c[0].scrollWidth-c[0].offsetWidth-(c[0].scrollWidth-c[0].offsetWidth-c.scrollLeft()):0,n=h.position().left-p+f-u):(n=this.offsetWidth,h.prevAll(":visible").each(function(){n+=this.offsetWidth})),s.css({top:o?0:r(i.wrapper),left:n-l,height:h.outerHeight(),width:3*l}).data("th",h).show()):s?s.hide():a(i.wrapper,"")})},_resizable:function(){var t,n,i,r,o,s,l=this,d=l.options;d.resizable&&(t=d.scrollable?l.wrapper.find(".k-grid-header-wrap:first"):l.wrapper,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");var c=e.inArray(s[0],s.parent().children(":visible")),u=l.tbody.parent(),p=l.footer||e();a(l.wrapper,"col-resize"),o=d.scrollable?l.thead.parent().find("col:eq("+c+")").add(u.children("colgroup").find("col:eq("+c+")")).add(p.find("colgroup").find("col:eq("+c+")")):u.children("colgroup").find("col:eq("+c+")"),n=t.x.location,i=s.outerWidth(),r=l.tbody.outerWidth()},resize:function(t){var a=wt?-1:1,s=i+t.x.location*a-n*a,c=l.footer||e();s>10&&(o.css("width",s),d.scrollable&&r&&(l._footerWidth=r+t.x.location*a-n*a,l.tbody.parent().add(l.thead.parent()).add(c.find("table")).css("width",l._footerWidth)))},resizeend:function(){var e,t=s.outerWidth();a(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(dt,{column:e,oldWidth:i,newWidth:t})),l.resizeHandle.hide(),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,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(ct,{newIndex:n,oldIndex:A(i,e.columns),column:i}),e.reorderColumn(n,i)}})},reorderColumn:function(e,t){var n,i,r,a=this,o=A(t,a.columns),l=A(t,d(a.columns)),c=A(a.columns[e],d(a.columns)),u=a.footer||a.wrapper.find(".k-grid-footer");if(o!==e)for(a.columns.splice(o,1),a.columns.splice(e,0,t),a._templates(),s(a.thead.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),l,c),a.options.scrollable&&s(a.tbody.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),l,c),s(a.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=a.tbody.children(":not(.k-grouping-row,.k-detail-row)"),i=0,r=n.length;r>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,r=n.options.editable,a=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()};r&&(t=n._editMode(),"incell"===t?r.update!==!1&&n.wrapper.on(ut+Y,"tr:not(.k-grouping-row) > td",function(t){var r=e(this);r.hasClass("k-hierarchy-cell")||r.hasClass("k-detail-cell")||r.hasClass("k-group-cell")||r.hasClass("k-edit-cell")||r.has("a.k-grid-delete").length||r.has("button.k-grid-delete").length||r.closest("tbody")[0]!==n.tbody[0]||e(t.target).is(":input")||(n.editable?n.editable.end()&&(i&&e(C()).blur(),n.closeCell(),n.editCell(r)):n.editCell(r))}).on("focusin"+Y,function(){clearTimeout(n.timer),n.timer=null}).on("focusout"+Y,function(){n.timer=setTimeout(a,1)}):r.update!==!1&&n.wrapper.on(ut+Y,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit",function(t){t.preventDefault(),n.editRow(e(this).closest("tr"))}),r.destroy!==!1?n.wrapper.on(ut+Y,"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(ut+Y,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible button.k-grid-delete",function(e){n._confirmation()||e.preventDefault()}))},editCell:function(t){t=e(t);var n=this,i=n.columns[n.cellIndex(t)],r=n._modelForContainer(t); !r||r.editable&&!r.editable(i.field)||i.command||!i.field||(n._attachModelChange(r),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:r,change:function(e){n.trigger(K,{values:e.values,container:t,model:r})&&e.preventDefault()}}).data("kendoEditable"),t.parent().addClass("k-grid-edit-row"),n.trigger($,{container:t,model:r}))},_destroyEditable:function(){var e=this,t=function(){e.editable&&(e._detachModelChange(),e.editable.destroy(),e.editable=null,e._editContainer=null)};e.editable&&("popup"===e._editMode()?e._editContainer.data("kendoWindow").bind("deactivate",t).close():t())},_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(et,e._modelChangeHandler)},closeCell:function(t){var n,i,r,a=this,o=a._editContainer;o&&(n=o.closest("tr").attr(k.attr("uid")),r=a.dataSource.getByUid(n),t&&a.trigger("cancel",{container:o,model:r})||(o.removeClass("k-edit-cell"),i=a.columns[a.cellIndex(o)],o.parent().removeClass("k-grid-edit-row"),a._destroyEditable(),a._displayCell(o,i,r),o.hasClass("k-dirty-cell")&&e('').prependTo(o)))},_displayCell:function(e,t,n){var i=this,r={storage:{},count:0},a=F({},k.Template,i.options.templateSettings),o=k.template(i._cellTmpl(t,r),a);r.count>0&&(o=z(o,r.storage)),e.empty().html(o(n))},removeRow:function(t){var n,i,r=this;r._confirmation()&&(t=e(t).hide(),n=r._modelForContainer(t),n&&!r.trigger(Q,{row:t,model:n})&&(i=r._editMode(),"incell"!==i&&r.cancelRow(),r.dataSource.remove(n),("inline"===i||"popup"===i)&&r.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){n=e(n);var i,r=this,a=r._modelForContainer(n),o=r._editMode(),s=r.options.navigatable;r.cancelRow(),a&&(r._attachModelChange(a),"popup"===o?r._createPopupEditor(a):"inline"===o?r._createInlineEditor(n,a):"incell"===o&&e(n).children(B).each(function(){var n=e(this),i=r.columns[n.index()];return a=r._modelForContainer(n),a&&(!a.editable||a.editable(i.field))&&i.field?(r.editCell(n),!1):t}),i=r._editContainer,i.on(ut+Y,"a.k-grid-cancel",function(t){if(t.preventDefault(),t.stopPropagation(),!r.trigger("cancel",{container:i,model:a})){var n=r.items().index(e(r.current()).parent());r.cancelRow(),s&&(r.current(r.items().eq(n).children().filter(V).first()),v(r.table,!0))}}),i.on(ut+Y,"a.k-grid-update",function(e){e.preventDefault(),e.stopPropagation(),r.saveRow()}))},_createPopupEditor:function(n){var i,r,a,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(y)for(typeof y===mt&&(y=window.unescape(y)),m+=k.template(y,x)(n),a=0,o=h.columns.length;o>a;a++)i=h.columns[a],i.command&&(c=g(i.command,"edit"),c&&(r=c));else for(a=0,o=h.columns.length;o>a;a++)i=h.columns[a],i.command?i.command&&(c=g(i.command,"edit"),c&&(r=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=z(s,p.storage)),m+='
      '+s(n)+"
      "):(_.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),m+="
      '));r&&D(r)&&(r.text&&D(r.text)&&(l=r.text.update,d=r.text.cancel),r.attr&&(u=r.attr)),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 r=h.items().index(e(h.current()).parent());h.cancelRow(),h.options.navigatable&&(h.current(h.items().eq(r).children().filter(V).first()),v(h.table,!0))}}},w)),h.editable=h._editContainer.kendoEditable({fields:_,model:n,clearContainer:!1}).data("kendoEditable"),f.data("kendoWindow").center().open(),h.trigger($,{container:f,model:n})},_createInlineEditor:function(t,n){var i,r,a,o=this,s=[];t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){if(r=e(this),i=o.columns[o.cellIndex(r)],i.command||!i.field||n.editable&&!n.editable(i.field)){if(i.command&&(a=g(i.command,"edit"))){r.empty();var t,l,d;D(a)&&(a.text&&D(a.text)&&(t=a.text.update,l=a.text.cancel),a.attr&&(d=a.attr)),e(o._createButton({name:"update",text:t,attr:d})+o._createButton({name:"canceledit",text:l,attr:d})).appendTo(r)}}else s.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),r.attr(k.attr("container-for"),i.field),r.empty()}),o._editContainer=t,o.editable=t.addClass("k-grid-edit-row").kendoEditable({fields:s,model:n,clearContainer:!1}).data("kendoEditable"),o.trigger($,{container:t,model:n})},cancelRow:function(){var e,t=this,n=t._editContainer;n&&(e=t._modelForContainer(n),t.dataSource.cancelChanges(e),"popup"!==t._editMode()?t._displayRow(n):t._displayRow(t.items().filter("["+k.attr("uid")+"="+e.uid+"]")),t._destroyEditable())},saveRow:function(){var e=this,t=e._editContainer,n=e._modelForContainer(t),i=e.editable;t&&i&&i.end()&&!e.trigger(K,{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(e){return window.confirm(e)},_confirmation:function(){var e=this,t=e.options.editable,n=t===!0||typeof t===mt?gt:t.confirmation;return n!==!1&&null!=n?e._showMessage(n):!0},cancelChanges:function(){this.dataSource.cancelChanges()},saveChanges:function(){var e=this;(e.editable&&e.editable.end()||!e.editable)&&!e.trigger(it)&&e.dataSource.sync()},addRow:function(){var e,t,n,i,r,a=this,o=a.dataSource,s=a._editMode(),l=a.options.editable.createAt||"",d=o.pageSize(),c=o.view()||[];(a.editable&&a.editable.end()||!a.editable)&&("incell"!=s&&a.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=a.table.find("tr["+k.attr("uid")+"="+n+"]"),r=i.children("td:not(.k-group-cell,.k-hierarchy-cell)").eq(a._firstEditableColumnIndex(i)),"inline"!==s&&"popup"!==s||!i.length?r.length&&a.editCell(r):a.editRow(i))},_firstEditableColumnIndex:function(e){var t,n,i,r=this,a=r.columns,o=r._modelForContainer(e);for(n=0,i=a.length;i>n;n++)if(t=a[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,r=n.options.toolbar,a=n.options.editable;r&&(t=n.wrapper.find(".k-grid-toolbar"),t.length||(M(r)||(r=typeof r===mt?r:n._toolbarTmpl(r).replace(_t,"\\#"),r=z(k.template(r),n)),t=e('
      ').html(r({})).prependTo(i)),a&&a.create!==!1&&t.on(ut+Y,".k-grid-add",function(e){e.preventDefault(),n.addRow()}).on(ut+Y,".k-grid-cancel-changes",function(e){e.preventDefault(),n.cancelChanges()}).on(ut+Y,".k-grid-save-changes",function(e){e.preventDefault(),n.saveChanges()}))},_toolbarTmpl:function(e){var t,n,i=this,r="";if(H(e))for(t=0,n=e.length;n>t;t++)r+=i._createButton(e[t]);return r},_createButton:function(e){var t=e.template||yt,n=typeof e===mt?e:e.name||e.text,r=St[n]?St[n].className:"k-grid-"+(n||"").replace(/\s/g,""),a={className:r,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+=" "+a.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)),a=F(!0,a,St[n],e)):a=F(!0,a,St[n]),k.template(t)(a)},_groupable:function(){var t=this;t._groupableClickHandler?t.table.off(ut+Y,t._groupableClickHandler):t._groupableClickHandler=function(n){var i=e(this),r=i.closest("tr");i.hasClass("k-i-collapse")?t.collapseGroup(r):t.expandGroup(r),n.preventDefault(),n.stopPropagation()},t.table.on(ut+Y,".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;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 "+j:"table:first>.k-grid-header "+j,filter:t.content?".k-grid-header:first "+G:"table:first>.k-grid-header "+G,allowDrag:t.options.reorderable})))},_selectable:function(){var e,n,i=this,r=i.options.selectable;r&&(e=typeof r===mt&&r.toLowerCase().indexOf("multiple")>-1,n=typeof r===mt&&r.toLowerCase().indexOf("cell")>-1,i.selectable=new k.ui.Selectable(i.table,{filter:">"+(n?L:"tbody>tr:not(.k-grouping-row,.k-detail-row,.k-group-footer)"),aria:!0,multiple:e,change:function(){i.trigger(et)}}),i.options.navigatable&&i.table.on("keydown"+Y,function(r){var a=i.current();if(r.keyCode===S.SPACEBAR&&r.target==i.table[0]&&!a.is(".k-edit-cell,.k-header")&&a.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")){if(r.preventDefault(),r.stopPropagation(),a=n?a:a.parent(),e)if(r.ctrlKey){if(a.hasClass(lt))return a.removeClass(lt),i.trigger(et),t}else i.selectable.clear();else i.selectable.clear();i.selectable.value(a)}}))},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger(et)},select:function(n){var i=this,r=i.selectable;return n=e(n),n.length?(r.options.multiple||(r.clear(),n=n.first()),r.value(n),t):r.value()},current:function(n){var i=this,r=i.options.scrollable,a=i._current,o=i.table.add(i.thead.parent());return n!==t&&n.length&&(a&&a[0]===n[0]||(a&&(a.removeClass(st).removeAttr("id"),o.removeAttr("aria-activedescendant")),n.attr("id",i._cellId),i._current=n.addClass(st),o.attr("aria-activedescendant",i._cellId),n.length&&r&&(e.contains(i.content[0],n[0])&&i._scrollTo(n.parent()[0],i.content[0]),r.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(st),this._current=null)},_scrollTo:function(e,t){var n=e.tagName.toLowerCase(),i="td"===n||"th"===n,r=e[i?"offsetLeft":"offsetTop"],a=e[i?"offsetWidth":"offsetHeight"],o=t[i?"scrollLeft":"scrollTop"],s=t[i?"clientWidth":"clientHeight"],l=r+a,d=0;d=o>r?r:l>o+s?s>=a?l-s:r:o,t[i?"scrollLeft":"scrollTop"]=d},_navigatable:function(){var t=this,n=z(t.current,t),i=t.table,r=t.thead.parent(),a=i,o=k.support.isRtl(t.element);t.options.navigatable&&(t.options.scrollable&&(a=i.add(r),r.attr(ft,-1)),r.on("keydown"+Y,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(ft,N.max(i.attr(ft)||0,0)).on("mousedown"+Y+" keydown"+Y,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}),a.on(k.support.touch?"touchstart"+Y:"mousedown"+Y,W+">"+V,z(_,t)).on("focus"+Y,function(){if(!k.support.touch){var t=n();t&&t.is(":visible")?t.addClass(st):n(e(this).find(U)),this==i[0]?(r.attr(ft,-1),i.attr(ft,0)):(i.attr(ft,-1),r.attr(ft,0))}}).on("focusout"+Y,function(){var e=n();e&&e.removeClass(st)}).on("keydown"+Y,function(r){var a,s,l,d,c,u,p,f,h=r.keyCode,m=!1,g=!r.isDefaultPrevented()&&!e(r.target).is(":button,a,:input,a>.k-icon"),_=t.options.pageable,k=t.dataSource,b="incell"==t._editMode(),y=r.shiftKey,w=n();w&&w.is("th")&&(g=!0),g&&h==S.UP?(w?(l=w.parent().prevAll(W).first(),l[0]||(c=t.thead.parent(),v(c,!0),l=c.find(W).first()),d=w.index(),w=l.children().eq(d),w[0]&&w.is(V)||(w=l.children(V).first())):w=i.find(U),m=!0,n(w)):g&&h==S.DOWN?(w?(l=w.parent().nextAll(W).first(),!l[0]&&w.is("th")&&(v(t.tbody.parent()),l=t.tbody.find(W).first()),d=w.index(),w=l.children().eq(d),w[0]&&w.is(V)||(w=l.children(V).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(":focusable:first"),!w.hasClass("k-edit-cell")&&u[0]&&w.hasClass("k-state-focused")?(u.focus(),m=!0):t.options.editable&&!e(r.target).is(":button,.k-button")&&(p=e(r.target).closest("[role=gridcell]"),p[0]||(p=w),t._handleEditing(p),m=!0))):S.ESC==h?(a=C(),w&&e.contains(w[0],a)&&!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()),a&&a.blur(),t.cancelRow(),s>=0&&t.current(t.items().eq(s).children().filter(V).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&&(r.preventDefault(),r.stopPropagation())}))},_handleEditing:function(n,i){var r,a,o=this,s=e(C()),l=o._editMode(),d=xt.msie,c=d&&xt.version<9,u=o._editContainer;if(a="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()),r=u.find(":focusable:first")[0],r&&r.focus(),t;"incell"==l?o.closeCell():(o.saveRow(),a=!0)}i&&o.current(i),c&&document.body.focus(),v(o.table,!0),(!a&&!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(pt,n),t.css(pt,"auto"))},_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,r,a,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 Tt(o.content,{dataSource:o.dataSource,itemHeight:z(o._averageRowHeight,o)})),o.scrollables=t.children(".k-grid-header-wrap"),i=o.wrapper.find(".k-grid-footer"),r=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"+Y,function(){o.scrollables.scrollLeft(this.scrollLeft+r)}):(o.content.bind("scroll"+Y,function(){o.scrollables.scrollLeft(this.scrollLeft+r)}),a=k.touchScroller(o.content),a&&a.movable&&a.movable.bind("change",function(e){o.scrollables.scrollLeft(-e.sender.x)})))},_setContentHeight:function(){var e,t=this,n=t.options,i=t.wrapper.innerHeight(),r=t.wrapper.children(".k-grid-header"),a=k.support.scrollbar();n.scrollable&&(i-=r.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*a?t.content.height(i):t.content.height(2*a+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,r=i.dataSource;r=H(r)?{data:r}:r,D(r)&&(F(r,{table:n.table,fields:n.columns}),e=i.pageable,D(e)&&e.pageSize!==t&&(r.pageSize=e.pageSize)),n.dataSource&&n._refreshHandler?n.dataSource.unbind(et,n._refreshHandler).unbind(O,n._progressHandler).unbind(P,n._errorHandler):(n._refreshHandler=z(n.refresh,n),n._progressHandler=z(n._requestStart,n),n._errorHandler=z(n._error,n)),n.dataSource=y.create(r).bind(et,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,r,a,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(r=(d?o.altRowTemplate:o.rowTemplate)(s),l.replaceWith(r),r=o.items().eq(c),c=0,a=o.columns.length;a>c;c++)i=o.columns[c],i.field===t.field&&(n=r.children(":not(.k-group-cell,.k-hierarchy-cell)").eq(c),e('').prependTo(n));o.trigger("itemChange",{item:r,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,r=i.dataSource.aggregates(),a="",s=i.footerTemplate,l=i.options,d=i.footer||i.wrapper.find(".k-grid-footer");s?(r=R(r)?o(i.dataSource.aggregate()):r,a=e(i._wrapFooter(s(r))),d.length?(n=a,d.replaceWith(n),d=i.footer=n):d=i.footer=l.scrollable?l.pageable?a.insertBefore(i.wrapper.children("div.k-grid-pager")):a.appendTo(i.wrapper):a.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="",r=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",r),i):''+t+""},_columnMenu:function(){var t,n,i,r,a,o,s=this,l=s.columns,d=s.options,c=d.columnMenu,u=function(){v(s.thead.parent(),!0)},p=function(e){s.trigger(Z,{field:e.field,container:e.container})};c&&("boolean"==typeof c&&(c={}),s.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(f){n=l[f],o=e(this),n.command||!n.field&&!o.attr("data-"+k.ns+"field")||(t=o.data("kendoColumnMenu"),t&&t.destroy(),r=n.sortable!==!1&&c.sortable!==!1?d.sortable:!1,a=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:r,filterable:a,messages:c.messages,owner:s,closeCallback:u,init:p},o.kendoColumnMenu(i))}))},_filterable:function(){var t,n,i=this,r=i.columns,a=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){t=e(this),r[s].filterable===!1||r[s].command||!r[s].field&&!t.attr("data-"+k.ns+"field")||(n=t.data("kendoFilterMenu"),n&&n.destroy(),t.kendoFilterMenu(F(!0,{},o,r[s].filterable,{dataSource:i.dataSource,values:r[s].values,closeCallback:a,init:function(e){i.trigger(X,{field:e.field,container:e.container})}})))})},_sortable:function(){var t,n,i,r=this,a=r.columns,o=r.options.sortable;o&&r.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(s){t=a[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:r.dataSource,aria:!0})))})},_columns:function(t){var n,i=this,r=i.table,a=r.find("col"),o=i.options.dataSource;t=t.length?t:E(r.find("th"),function(t,n){t=e(t);var i=t.attr(k.attr("sortable")),r=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"!==r,groupable:"false"!==s,menu:d,template:t.attr(k.attr("template")),width:a.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===mt?{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 r,a,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+=''),r=0;c>r;r++)o=l.columns[r],a=o.template,s=typeof a,e+="",e+=l._cellTmpl(o,u),e+="";e+=""}return e=k.template(e,d),u.count>0?z(e,u.storage):e},_headerCellText:function(e){var t=this,n=F({},k.Template,t.options.templateSettings),i=e.headerTemplate,r=typeof i,a=e.title||e.field||"";return r===ht?a=k.template(i,n)({}):r===mt&&(a=i),a},_cellTmpl:function(e,t){var n,i,r=this,a=F({},k.Template,r.options.templateSettings),o=e.template,s=a.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+=r._createButton(e.command[n]);return d.replace(_t,"\\#")}return r._createButton(e.command).replace(_t,"\\#")}return u===ht?(t.storage["tmpl"+t.count]=o,d+="#=this.tmpl"+t.count+"("+s+")#",t.count++):u===mt?d+=o:p&&p.length&&D(p[0])&&"value"in p[0]&&l?(d+="#var v ="+k.stringify(f(p))+"#",d+="#var f = v[",a.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,r=i.group(),a=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)&&!a.length||I(t.columns,function(e){return e.footerTemplate}).length)&&(t.footerTemplate=t._footerTmpl(o,"footerTemplate","k-footer-template")),r&&I(t.columns,function(e){return e.groupFooterTemplate}).length&&(o=e.map(r,function(e){return e.aggregates}),t.groupFooterTemplate=t._footerTmpl(o,"groupFooterTemplate","k-group-footer"))},_footerTmpl:function(e,t,r){var a,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+=' '),a=0,s=u.columns.length;s>a;a++)c=m[a],l=c[t],d=typeof l,h+="",l?(d!==ht&&(_=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?z(h,g):h},_detailTmpl:function(e){var t=this,i="",r=F({},k.Template,t.options.templateSettings),a=r.paramName,o={},s=0,l=t._groups(),c=d(t.columns).length,u=typeof e;return i+='',l>0&&(i+=n(l)),i+='",u===ht?(o["tmpl"+s]=e,i+="#=this.tmpl"+s+"("+a+")#",s++):i+=e,i+="",i=k.template(i,r),s>0?z(i,o):i},_hasDetails:function(){var e=this;return null!==e.options.detailTemplate||(e._events[J]||[]).length},_details:function(){var t=this;t.table.on(ut+Y,".k-hierarchy-cell .k-plus, .k-hierarchy-cell .k-minus",function(n){var i,r,a=e(this),o=a.hasClass("k-plus"),s=a.closest("tr.k-master-row"),l=t.detailTemplate,d=t._hasDetails();return a.toggleClass("k-plus",!o).toggleClass("k-minus",o),d&&!s.next().hasClass("k-detail-row")&&(r=t.dataItem(s),e(l(r)).addClass(s.hasClass("k-alt")?"k-alt":"").insertAfter(s),t.trigger(J,{masterRow:s,detailRow:s.next(),data:r,detailCell:s.next().find(".k-detail-cell")})),i=s.next(),t.trigger(o?at:ot,{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,r=this.tbody.children(),a=/k-grouping-row|k-detail-row|k-group-footer/,o=t.sectionRowIndex;for(i=o,n=0;o>n;n++)a.test(r[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,r,a,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)),a=l.element.find("tr:has(th):first"),a.length||(a=p.children().first(),a.length||(a=e(""))),a.children().length)c&&!a.find(".k-hierarchy-cell")[0]&&a.prepend(' ');else{for(c&&(u+=' '),n=0,r=d.length;r>n;n++)s=d[n],o=l._headerCellText(s),s.command?u+=""+o+"":(u+=""+o+"");a.html(u)}a.find("th").addClass("k-header"),l.options.scrollable||p.addClass("k-grid-header"),a.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,r="",a=i.rowTemplate,o=i.altRowTemplate;for(t=0,n=e.length;n>t;t++)r+=t%2?o(e[t]):a(e[t]),i._data.push(e[t]);return r},_groupRowHtml:function(e,t,i){var r,a,o=this,s="",l=e.field,d=I(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===ht?c(p):k.template(c)(p)),s+=''+n(i)+''+'

      '+''+u+"

      ",e.hasSubgroups)for(r=0,a=m.length;a>r;r++)s+=o._groupRowHtml(m[r],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,r,a=n.find(".k-group-cell").length,o=1;n.find("td:first").attr("aria-expanded",!1),n.nextAll("tr").each(function(){return r=e(this),i=r.find(".k-group-cell").length,r.hasClass("k-grouping-row")?o++:r.hasClass("k-group-footer")&&o--,a>=i||r.hasClass("k-group-footer")&&0>o?!1:(r.hide(),t)})},expandGroup:function(n){n=e(n).find(".k-icon").addClass("k-i-collapse").removeClass("k-i-expand").end();var i,r,a=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),r=i.find(".k-group-cell").length,o>=r?!1:(r!=o+1||i.hasClass("k-detail-row")||(i.show(),i.hasClass("k-grouping-row")&&i.find(".k-icon").hasClass("k-i-collapse")&&a.expandGroup(i),i.hasClass("k-master-row")&&i.find(".k-icon").hasClass("k-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"),r=i.length;t>r?e(Array(t-r+1).join(' ')).prependTo(n.thead.find("tr")):r>t&&(r-=t,e(I(i,function(e,t){return r>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,r,a,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]:I(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")?(r=i.children(":not(.k-group-cell):first,.k-detail-cell").last(),r.attr("colspan",parseInt(r.attr("colspan"),10)-1)):(i.hasClass("k-grid-edit-row")&&(r=i.children(".k-edit-container")[0])&&(r=e(r),r.attr("colspan",parseInt(r.attr("colspan"),10)-1),r.find("col").eq(p).remove(),i=r.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)}a=e(">.k-grid-header table:first,>.k-grid-footer table:first",f.wrapper).add(f.table),f._footerWidth=null,h&&(a.width(h),f._footerWidth=h),xt.msie&&8==xt.version&&(a.css("display","inline-table"),setTimeout(function(){a.css("display","table")},1)),f.trigger(tt,{column:t})}},showColumn:function(t){var n,i,r,a,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]:I(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,r=n.length;r>i;i+=1)a=n.eq(i),a.is(".k-grouping-row,.k-detail-row")?(o=a.children(":not(.k-group-cell):first,.k-detail-cell").last(),o.attr("colspan",parseInt(o.attr("colspan"),10)+1)):(a.hasClass("k-grid-edit-row")&&(o=a.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),a=o.find("tr:first")),m(a[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,r=f.length;r>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(nt,{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,r,a,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._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:(a=document.createElement("div"),a.innerHTML=""+u+"
      ",r=a.firstChild.firstChild,c.table[0].replaceChild(r,c.tbody[0]),c.tbody=e(r)),c._footer(),c._setContentHeight(),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(rt)}}});b.plugin(Dt),b.plugin(Tt)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i="change",r="cancel",a="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 r=this;i=e.isArray(i)?{dataSource:i}:i,s.fn.init.call(r,t,i),i=r.options,r.wrapper=t=r.element,t[0].id&&(r._itemId=t[0].id+"_lv_active"),r._element(),r._dataSource(),r.template=n.template(i.template||""),r.altTemplate=n.template(i.altTemplate||i.template),r.editTemplate=n.template(i.editTemplate||""),r._navigatable(),r._selectable(),r._pageable(),r._crudHandlers(),r.options.autoBind&&r.dataSource.fetch(),n.notify(r)},events:[i,r,o,a,g,v,_],options:{name:"ListView",autoBind:!0,selectable:!1,navigatable:!1,template:"",altTemplate:"",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(i){var r,s,l,d,c,u=this,p=u.dataSource.view(),f="",h=u.template,m=u.altTemplate,g=w();if(i&&"itemchange"===i.action)return u.editable||(r=i.items[0],d=e.inArray(r,p),d>=0&&(u.items().eq(d).replaceWith(h(r)),l=u.items().eq(d),l.attr(n.attr("uid"),r.uid),u.trigger("itemChange",{item:l,data:r}))),t;if(i=i||{},!u.trigger(o,{action:i.action||"rebind",items:i.items,index:i.index})){for(u._destroyEditable(),d=0,c=p.length;c>d;d++)f+=d%2?m(p[d]):h(p[d]);for(u.element.html(f),s=u.items(),d=0,c=p.length;c>d;d++)s.eq(d).attr(n.attr("uid"),p[d].uid).attr("role","option").attr("aria-selected","false");u.element[0]===g&&u.options.navigatable&&u.current(s.eq(0)),u.trigger(a)}},_pageable:function(){var t,i,r=this,a=r.options.pageable;e.isPlainObject(a)&&(i=a.pagerId,t=e.extend({},a,{dataSource:r.dataSource,pagerId:null}),r.pager=new n.ui.Pager(e("#"+i),t))},_selectable:function(){var e,r,a=this,o=a.options.selectable,s=a.options.navigatable;o&&(e=typeof o===m&&o.toLowerCase().indexOf("multiple")>-1,e&&a.element.attr("aria-multiselectable",!0),a.selectable=new n.ui.Selectable(a.element,{aria:!0,multiple:e,filter:d,change:function(){a.trigger(i)}}),s&&a.element.on("keydown"+b,function(n){if(n.keyCode===l.SPACEBAR){if(r=a.current(),n.target==n.currentTarget&&n.preventDefault(),e)if(n.ctrlKey){if(r&&r.hasClass(f))return r.removeClass(f),t}else a.selectable.clear();else a.selectable.clear();a.selectable.value(r)}}))},current:function(e){var n=this,i=n.element,r=n._current,a=n._itemId;return e===t?r:(r&&r[0]&&(r[0].id===a&&r.removeAttr("id"),r.removeClass(p),i.removeAttr("aria-activedescendant")),e&&e[0]&&(a=e[0].id||a,n._scrollTo(e[0]),i.attr("aria-activedescendant",a),e.addClass(p).attr("id",a)),n._current=e,t)},_scrollTo:function(t){var n,i,r=this,a=!1,o="scroll";"auto"==r.wrapper.css("overflow")||r.wrapper.css("overflow")==o?n=r.wrapper[0]:(n=window,a=!0),i=function(i,r){var s=a?e(t).offset()[i.toLowerCase()]:t["offset"+i],l=t["client"+r],d=e(n)[o+i](),c=e(n)[r.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,r=t.element,a=function(n){t.current(e(n.currentTarget)),e(n.target).is(":button,a,:input,a>.k-icon,textarea")||r.focus()};i&&(t._tabindex(),r.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 a,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=r.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)?(a=t.items().index(m),g&&g.blur(),t.save(),o=function(){t.element.trigger("focus"),t.current(t.items().eq(a))},t.one("dataBound",o)):""!==t.options.editTemplate&&t.edit(d);else if(l.ESC===s){if(m=r.find("."+h),0===m.length)return;a=t.items().index(m),t.cancel(),t.element.trigger("focus"),t.current(t.items().eq(a))}}),r.on("mousedown"+b+" touchstart"+b,d,y(a,t)))},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger(i)},select:function(n){var i=this,r=i.selectable;return n=e(n),n.length?(r.options.multiple||(r.clear(),n=n.first()),r.value(n),t):r.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,r=this,a=r.editable,o=r.template,s=!0;return a&&(e&&(s=a.end()),s&&(a.element.index()%2&&(o=r.altTemplate),t=r._modelFromElement(a.element),r._destroyEditable(),i=a.element.index(),a.element.replaceWith(o(t)),r.items().eq(i).attr(n.attr("uid"),t.uid))),s},edit:function(e){var t,i,r=this,a=r._modelFromElement(e),o=a.uid;r.cancel(),e=r.items().filter("["+n.attr("uid")+"="+o+"]"),i=e.index(),e.replaceWith(r.editTemplate(a)),t=r.items().eq(i).addClass(h).attr(n.attr("uid"),a.uid),r.editable=t.kendoEditable({model:a,clearContainer:!1,errorTemplate:!1}).data("kendoEditable"),r.trigger(g,{model:a,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(r,{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 r=e(this).closest("["+n.attr("uid")+"]");t.edit(r),i.preventDefault()}),t.element.on(i,".k-delete-button",function(i){var r=e(this).closest("["+n.attr("uid")+"]");t.remove(r),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,r;e.on("dragenter"+w,function(){t(),r=new Date,i||(i=setInterval(function(){var e=new Date-r;e>100&&(n(),clearInterval(i),i=null)},100))}).on("dragover"+w,function(){r=new Date})}function i(e,n){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+n}function r(e){if(!e)return"";var t=" bytes";return e>=1073741824?(t=" GB",e/=1073741824):e>=1048576?(t=" MB",e/=1048576):e>=1024&&(t=" KB",e/=1024),Math.round(100*e)/100+t}var a,o,s,l,d=window.kendo,c=d.ui.Widget,u=e.isPlainObject,p=e.proxy,f=e.extend,h=d.support.placeholder,m=d.support.browser,g=e.isFunction,v=/(^\/|\/$)/g,_="change",k="apply",b="error",y="click",w=".kendoImageBrowser",x=".kendoBreadcrumbs",C=".kendoSearchBox",T="name",S="size",D="type",F={field:D,dir:"asc"},E=d.template('
    • ${text}
    • '),I='
      # 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(b,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),r=n.dataSource.getByUid(i.attr(d.attr("uid"))),a=r.get(T),o=n.options.transport.thumbnailUrl,s=e("",{alt:a}),l="?";s.hide().on("load"+w,function(){e(this).prev().remove().end().addClass("k-image").fadeIn()}),i.find(".k-loading").after(s),g(o)?o=o(n.path(),encodeURIComponent(a)):(o.indexOf("?")>=0&&(l="&"),o=o+l+"path="+n.path()+encodeURIComponent(a)),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(),r=i+n;e._tiles.each(function(){var n=a(this),o=n+this.offsetHeight;return(n>=i&&r>n||o>=i&&r>o)&&e._loadImage(this),n>r?!1:t}),e._tiles=e._tiles.filter(function(){return!this.loaded})},250))},_editTmpl:function(){var e='
    • ',e+="#if("+D+' == "d") { #',e+='
      ',e+="#}else{#",e+='
      ',e+="#}#",e+="#if("+D+' == "d") { #',e+='',e+="#}#",e+="
    • ",p(d.template(e),{sizeFormatter:r})},_itemTmpl:function(){var e=this,t='
    • ',t+="#if("+D+' == "d") { #',t+='
      ',t+="#}else{#",t+=e.options.transport&&e.options.transport.thumbnailUrl?'
      ':'
      ',t+="#}#",t+="${"+T+"}",t+="#if("+D+' == "f") { # ${this.sizeFormatter('+S+")} #}#",t+="
    • ",p(d.template(t),{sizeFormatter:r})},path:function(e){var n=this,i=n._path||"";return e!==t?(n._path=e.replace(v,"")+"/",n.dataSource.read({path:n._path}),t):(i&&(i=i.replace(v,"")),"/"===i||""===i?"":i+"/")}}),s=c.extend({init:function(e,t){var n=this;t=t||{},c.fn.init.call(n,e,t),h&&n.element.attr("placeholder",n.options.label),n._wrapper(),n.element.on("keydown"+C,p(n._keydown,n)).on("change"+C,p(n._updateValue,n)),n.wrapper.on(y+C,"a",p(n._click,n)),h||n.element.on("focus"+C,p(n._focus,n)).on("blur"+C,p(n._blur,n))},options:{name:"SearchBox",label:"Search",value:""},events:[_],destroy:function(){var e=this;e.wrapper.add(e.element).add(e.label).off(C),c.fn.destroy.call(e)},_keydown:function(e){13===e.keyCode&&this._updateValue()},_click:function(e){e.preventDefault(),this._updateValue()},_updateValue:function(){var e=this,t=e.element.val();t!==e.value()&&(e.value(t),e.trigger(_))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){h||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(),h||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}}),l=c.extend({init:function(e,t){var n=this;t=t||{},c.fn.init.call(n,e,t),n._wrapper(),n.wrapper.on("focus"+x,"input",p(n._focus,n)).on("blur"+x,"input",p(n._blur,n)).on("keydown"+x,"input",p(n._keydown,n)).on(y+x,"a.k-i-arrow-n:first",p(n._rootClick,n)).on(y+x,"a:not(.k-i-arrow-n)",p(n._click,n)),n.value(n.options.value)},options:{name:"Breadcrumbs",gap:50},events:[_],destroy:function(){var e=this;c.fn.destroy.call(e),e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(x)},_update:function(e){e="/"===(e||"").charAt(0)?e:"/"+(e||""),e!==this.value()&&(this.value(e),this.trigger(_))},_click:function(t){t.preventDefault(),this._update(this._path(e(t.target).prevAll("a:not(.k-i-arrow-n)").andSelf()))},_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,r,a,o="",s=this.value();for(s!==t&&s.match(/^\//)||(s="/"+(s||"")),n=s.split("/"),r=0,a=n.length;a>r;r++)i=n[r],i&&(o||(o+='root'),o+=''+n[r]+"",o+='>');this.overlay.empty().append(e(o)),this._adjustSectionWidth()},_adjustSectionWidth:function(){var t,n=this,i=n.wrapper,r=i.width()-n.options.gap,a=n.overlay.find("a");a.each(function(n){t=e(this),t.parent().width()>r&&(n==a.length-1?t.width(r):t.prev().andSelf().hide())})},value:function(e){return e!==t?(this._value=e.replace(/\/{2,}/g,"/"),this.refresh(),t):this._value},_path:function(t){return"/"+e.map(t,function(t){return e(t).text()}).join("/")}}),d.ui.plugin(o),d.ui.plugin(l),d.ui.plugin(s)}(window.kendo.jQuery),function(e,t){var n,i,r=window.kendo,a=r.Class,o=r.ui.Widget,s=r.support.mobileOS,l=r.support.browser,d=e.extend,c=e.proxy,u=r.deepExtend,p=".kendoEditor",f=r.keys,h=a.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return r.template(e.template,{useWithBlock:!1})(e)}}),m={editorWrapperTemplate:'',buttonTemplate:'',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()),b.defaultTools[e]=t},registerFormat:function(e,t){b.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"},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="textarea,main,article,section,aside,nav,header,footer,div".split(","),b=o.extend({init:function(t,n){var i,a,s,l=this,f=r.ui.editor,h=f.Dom.name(t);v&&-1!=e.inArray(h,k)&&(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(),a=l.wrapper.find(".k-editor-toolbar"),t[0].id&&a.attr("aria-controls",t[0].id)):(l.element.addClass("k-widget k-editor k-editor-inline"),s.popup=!0,a=e('"),a=this.isBlock(e),g.focus(),s=g.getRange(),s.deleteContents(),s.startContainer==g.document&&s.selectNodeContents(g.body),l=new c,d=l.addCaret(s),u=this.splittableParent(a,d),p=!1,f=u!=g.body&&!o.is(u,"td"),f&&(a||o.isInline(u))&&(s.selectNode(d),i.RangeUtils.split(s,u,!0),p=!0),h=this.htmlToFragment(e),h.firstChild&&"k-paste-container"===h.firstChild.className){for(m=[],n=0,r=h.childNodes.length;r>n;n++)m.push(h.childNodes[n].innerHTML);h=this.htmlToFragment(m.join("
      "))}if(s.insertNode(h),u=this.splittableParent(a,d),p){for(;d.parentNode!=u;)o.unwrap(d.parentNode);o.unwrap(d.parentNode)}o.normalize(s.commonAncestorContainer),d.style.display="inline",o.restoreScrollTop(g.document),o.scrollTo(d),l.removeCaret(s),g.selectRange(s)}}),y=n.extend({clean:function(e){var t,n,i=this,r=i.replacements;for(t=0,n=r.length;n>t;t+=2)e=e.replace(r[t],r[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,r,a,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,a),h==t?o.insertBefore(l,r):h.appendChild(l),f[a][s]=l),n!=a)for(d in f)for(c in f[d])e.contains(l,f[d][c])&&delete f[d][c];o.remove(r.firstChild),h=o.create(document,"li",{innerHTML:r.innerHTML}),l.appendChild(h),o.remove(r),p=s,n=a}else r.innerHTML?(f={ul:{},ol:{}},h=t,p=-1):o.remove(r)},removeAttributes:function(e){for(var t=e.attributes,n=t.length;n--;)e.removeAttributeNode(t[n])},createColGroup:function(n){var i,r=n.cells;r.length<2||(i=e(e.map(r,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,r=e.map(i,function(t){var n=e(t).children("p").children("strong")[0];return n&&"strong"==o.name(n)?n:void 0});if(r.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,r,a,s;for(n=0;ni;i++)r-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}),a("insertHtml",new m({template:new l({template:r.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,r=t.ui.Editor.fn.options.formats,a=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,r=0,a=e.parentNode;for(t=a.firstChild;t;t=t.nextSibling)t!=e&&(t.className==h?r++:3==t.nodeType?n++:i++);return r>1&&a.firstChild.className==h&&a.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,r,a,o=this.format,s=d.attrEquals;for(t=0,n=o.length;n>t;t++){if(i=e,r=o[t].tags,a=o[t].attr,i&&d.ofType(i,r)&&s(i,a))return i;for(;i;)if(i=d.parentOfType(i,r),i&&s(i,a))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,r,a=this,o=[];for(t=0,n=e.length;n>t;t++)i=e[t],r=a.finder.findSuitable(i),r?d.attr(r,a.attributes):r=a.wrap(i),o.push(r);a.consolidate(o)},remove:function(e){var t,n,i,r=this;for(t=0,n=e.length;n>t;t++)i=r.finder.findFormat(e[t]),i&&(r.attributes&&r.attributes.style?(d.unstyle(i,r.attributes.style),i.style.cssText||i.attributes["class"]||d.unwrap(i)):d.unwrap(i))},split:function(e){var t,n,i=c.textNodes(e),r=i.length;if(r>0)for(t=0;r>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,r,a,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(r=m[n],a=r.nodeName,o=r.nodeValue,r.specified&&"style"==a)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,r,a=e(d.isDataNode(t)?t.parentNode:t),o=a.parentsUntil("[contentEditable]").addBack();for(n=0,i=o.length;i>n;n++)if(r="className"==this.greedyProperty?o[n].className:this.getInlineCssValue(o[n]))return r;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,r=i.greedyProperty,a="apply";i.split(e),r&&(n=r.replace(/-([a-z])/,function(e,t){return t.toUpperCase()}),"inherit"==i.values.style[n]&&(a="remove")),i[a](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,r={};return new i.FormatCommand(u(e,{formatter:function(){return r[t.domAttr]=e.value,new _(n,{style:r},t.cssAttr)}}))},initialize:function(e,t){var n,i=t.editor,r=this.options,a=r.name,s=[];r.defaultValue&&(s=[{text:i.options.messages[r.defaultValue[0].text],value:r.defaultValue[0].value}]),n=s.concat(r.items?r.items:i.options[a]),e[this.type]({dataTextField:"text",dataValueField:"value",dataSource:n,change:function(){o.exec(i,a,this.value())},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+a).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"]}]},options:{palette:"websafe"},update:function(){this._widget.close()},command:function(e){var t=this.options,n=this.format,r={};return new i.FormatCommand(u(e,{formatter:function(){return r[t.domAttr]=e.value,new _(n,{style:r},t.cssAttr)}}))},initialize:function(n,i){var r=i.editor,a=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(r,a,e),r.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:r.bold,template:new s({template:a.buttonTemplate,title:"Bold"})})),f("italic",[{tags:["em","i"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),p("italic",new k({key:"I",ctrl:!0,format:r.italic,template:new s({template:a.buttonTemplate,title:"Italic"})})),f("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}},{tags:["u"]}]),p("underline",new k({key:"U",ctrl:!0,format:r.underline,template:new s({template:a.buttonTemplate,title:"Underline"})})),f("strikethrough",[{tags:["del"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),p("strikethrough",new k({format:r.strikethrough,template:new s({template:a.buttonTemplate,title:"Strikethrough"})})),f("superscript",[{tags:["sup"]}]),p("superscript",new k({format:r.superscript,template:new s({template:a.buttonTemplate,title:"Superscript"})})),f("subscript",[{tags:["sub"]}]),p("subscript",new k({format:r.subscript,template:new s({template:a.buttonTemplate,title:"Subscript"})})),p("foreColor",new w({cssAttr:"color",domAttr:"color",name:"foreColor",template:new s({template:a.colorPickerTemplate,title:"Color"})})),p("backColor",new w({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new s({template:a.colorPickerTemplate,title:"Background Color"})})),p("fontName",new y({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new s({template:a.comboBoxTemplate,title:"Font Name"})})),p("fontSize",new y({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new s({template:a.comboBoxTemplate,title:"Font Size"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,r=t.ui.editor,a=t.ui.Editor.fn.options.formats,o=r.Dom,s=r.Command,l=r.ToolTemplate,d=r.FormatTool,c=r.EditorUtils,u=c.registerTool,p=c.registerFormat,f=r.RangeUtils,h=n.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,r;for(n=0,i=t.length;i>n;n++)if(r=t[n],!r||!o.isAncestorOrSelf(e,r))return!1;return!0},findSuitable:function(t){var n,i,r,a=this.format,s=[];for(n=0,i=t.length;i>n;n++){if(r=o.ofType(t[n],a[0].tags)?t[n]:o.parentOfType(t[n],a[0].tags),!r)return[];e.inArray(r,s)<0&&s.push(r)}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,r,a,s=this.format;for(t=0,n=s.length;n>t;t++)for(i=e,r=s[t].tags,a=s[t].attr;i;){if(o.ofType(i,r)&&o.attrEquals(i,a))return i;i=i.parentNode}return null},getFormat:function(e){var t,n,i=this,r=function(e){return i.findFormat(o.isDataNode(e)?e.parentNode:e)},a=r(e[0]);if(!a)return"";for(t=1,n=e.length;n>t;t++)if(a!=r(e[t]))return"";return a.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,r,a,s,l,d=1==n.length?o.blockParentOrBody(n[0]):o.commonAncestor.apply(null,n);for(o.isInline(d)&&(d=o.blockParentOrBody(d)),a=o.significantChildNodes(d),s=o.findNodeIndex(a[0]),l=o.create(d.ownerDocument,e,t),i=0;ir;r++)o.attr(l[r],n);else s.wrap(t,n,e)},remove:function(e){var t,n,i,r,a;for(t=0,n=e.length;n>t;t++)i=this.finder.findFormat(e[t]),i&&(a=o.name(i),"div"!=a||i.getAttribute("class")?(r=c.formatByName(a,this.format),r.attr.style&&o.unstyle(i,r.attr.style),r.attr.className&&o.removeClass(i,r.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,a,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,a=new r.ListFormatter(i.nodeName.toLowerCase(),u),s=this.editor.createRange(),s.selectNode(c[t]),a.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(r,{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:a.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:a.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:a.justifyRight,template:new l({template:c.buttonTemplate,title:"Justify Right"})})),p("justifyFull",[{tags:o.blockElements,attr:{style:{textAlign:"justify"}}}]),u("justifyFull",new _({format:a.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,r=i.Dom,a=i.Command,o=i.Tool,s=i.BlockFormatter,l=r.normalize,d=i.RangeUtils,c=i.EditorUtils.registerTool,u=a.extend({init:function(e){this.options=e,a.fn.init.call(this,e)},_insertMarker:function(e,t){var n,i=r.create(e,"a");return t.insertNode(i),i.parentNode||(n=t.commonAncestorContainer,n.innerHTML="",n.appendChild(i)),l(i.parentNode),i},shouldTrim:function(e){var t="p,h1,h2,h3,h4,h5,h6".split(","),n=r.parentOfType(e.startContainer,t),i=r.parentOfType(e.endContainer,t);return n&&!i||!n&&i},exec:function(){var e,t,n,a,o,c,u,p,f,h=this.getRange(),m=d.documentFromRange(h),g=i.emptyElementContent,v=this.shouldTrim(h);h.deleteContents(),o=this._insertMarker(m,h),c=r.parentOfType(o,["li"]),u=r.parentOfType(o,"h1,h2,h3,h4,h5,h6".split(",")),c?(p=h.cloneRange(),p.selectNode(c),d.textNodes(p).length||(a=r.create(m,"p"),c.nextSibling&&d.split(p,c.parentNode),r.insertAfter(a,c.parentNode),r.remove(1==c.parentNode.childNodes.length?c.parentNode:c),a.innerHTML=g,n=a)):u&&!o.nextSibling&&(a=r.create(m,"p"),r.insertAfter(a,u),a.innerHTML=g,r.remove(o),n=a),n||(c||u||new s([{tags:["p"]}]).apply([o]),h.selectNode(o),e=r.parentOfType(o,[c?"li":u?r.name(u):"p"]),d.split(h,e,v),t=e.previousSibling,r.is(t,"li")&&t.firstChild&&!r.is(t.firstChild,"br")&&(t=t.firstChild),n=e.nextSibling,r.is(n,"li")&&n.firstChild&&!r.is(n.firstChild,"br")&&(n=n.firstChild),r.remove(e),this.clean(t),this.clean(n),l(t)),l(n),r.is(n,"img")?h.setStartBefore(n):(h.selectNodeContents(n),f=d.textNodes(h)[0],f&&h.selectNodeContents(f)),h.collapse(!0),r.scrollTo(n),d.selectRange(h)},clean:function(e){if(e.firstChild&&r.is(e.firstChild,"br")&&r.remove(e.firstChild),r.isDataNode(e)&&!e.nodeValue&&(e=e.parentNode),e){for(;e.firstChild&&1==e.firstChild.nodeType;)e=e.firstChild;!r.is(e,"img")&&/^\s*$/.test(e.innerHTML)&&(e.innerHTML=i.emptyElementContent)}}}),p=a.extend({init:function(e){this.options=e,a.fn.init.call(this,e)},exec:function(){var e,n=this.getRange(),i=r.create(d.documentFromRange(n),"br");n.deleteContents(),n.insertNode(i),l(i.parentNode),t.support.browser.msie||i.nextSibling&&!r.isWhitespace(i.nextSibling)||(e=i.cloneNode(!0),e.setAttribute("_moz_dirty",""),r.insertAfter(e,i)),n.setStartAfter(i),n.collapse(!0),r.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,r=t.ui.editor,a=r.Dom,o=r.RangeUtils,s=r.EditorUtils,l=r.Command,d=r.ToolTemplate,c=r.FormatTool,u=r.BlockFormatFinder,p=o.textNodes,f=r.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;nr;r++)l=this.finder.findFormat(c[r]),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&&a.isWhitespace(i));)i=i.previousSibling;if(i&&a.name(i)==e){for(;t.firstChild;)i.appendChild(t.firstChild);a.remove(t),t=i}for(n=t.nextSibling;n&&("k-marker"==n.className||3==n.nodeType&&a.isWhitespace(n));)n=n.nextSibling;if(n&&a.name(n)==e){for(;t.lastChild;)n.insertBefore(t.lastChild,n.firstChild);a.remove(t)}},applyOnSection:function(t,n){function i(){u.push(this)}var r,o,s,l,d=this.tag,c=a.closestSplittableParent(n),u=[],p=this.finder.findSuitable(n);for(p||(p=new h("ul"==d?"ol":"ul").findSuitable(n)),r=a.significantChildNodes(c),r.length||(r=n),/table|tbody/.test(a.name(c))&&(r=e.map(n,function(e){return a.parentOfType(e,["td"])})),o=0;on;n++)t=this.finder.findFormat(e[n]),t&&this.unwrap(t)},toggle:function(e){var t,n=this,i=p(e),r=e.commonAncestorContainer;i.length||(e.selectNodeContents(r),i=p(e),i.length||(t=r.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(r,{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,r=t.ui.editor,a=r.Dom,o=r.RangeUtils,s=r.EditorUtils,l=r.Command,d=r.Tool,c=r.ToolTemplate,u=r.InlineFormatter,p=r.InlineFormatFinder,f=o.textNodes,h=r.EditorUtils.registerTool,m=n.extend({findSuitable:function(e){return a.parentOfType(e,["a"])}}),g=n.extend({init:function(){this.finder=new m},apply:function(e,t){var n,i,r,s,l=f(e);t.innerHTML?(n=o.getMarkers(e),i=o.documentFromRange(e),e.deleteContents(),s=a.create(i,"a",t),e.insertNode(s),"a"==a.name(s.parentNode)&&a.insertAfter(s,s.parentNode),n.length>1&&(a.insertAfter(n[n.length-1],s),a.insertAfter(n[1],s),a[l.length>0?"insertBefore":"insertAfter"](n[0],s))):(r=new u([{tags:["a"]}],t),r.finder=this.finder,r.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,o,s,u=l.element,f=e("#k-editor-link-url",u).val();f&&"http://"!=f&&(f.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(f)&&(f="mailto:"+f),d.attributes={href:f},n=e("#k-editor-link-title",u).val(),n&&(d.attributes.title=n),o=e("#k-editor-link-text",u).val(),o===p||!o&&0!==r.length||(d.attributes.innerHTML=a.stripBom(o)||f),s=e("#k-editor-link-target",u).is(":checked"),d.attributes.target=s?"_blank":null,d.formatter.apply(c,d.attributes)),i(t),d.change&&d.change()}function i(e){e.preventDefault(),l.destroy(),a.windowFromDocument(o.documentFromRange(c)).focus(),d.releaseRange(c)}var r,s,l,d=this,c=d.getRange(),u=c.collapsed,p=null,h=d.editor.options.messages;c=d.lockRange(!0),r=f(c),s=r.length?d.formatter.finder.findSuitable(r[0]):null,l=this.createDialog(d._dialogTemplate(),{title:h.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 r=t.keys;e.keyCode==r.ENTER?n(e):e.keyCode==r.ESC&&i(e)}).end().find("#k-editor-link-url").val(s?s.getAttribute("href",2):"http://").end().find("#k-editor-link-text").val(r.length>0?1==r.length?r[0].nodeValue:r[0].nodeValue+r[1].nodeValue:"").end().find("#k-editor-link-title").val(s?s.title:"").end().find("#k-editor-link-target").attr("checked",s?"_blank"==s.target:!1).end().data("kendoWindow").center().open(),r.length>0&&!u&&(p=e("#k-editor-link-text",l.element).val()),e("#k-editor-link-url",l.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,r=n.ui.editor,a=r.EditorUtils,o=r.Dom,s=a.registerTool,l=r.ToolTemplate,d=r.RangeUtils,c=r.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 r(e){var t=l.element;c.attributes={src:t.find(p).val().replace(/ /g,"%20"),alt:t.find(f).val()},m=c.insertImage(g,h),a(e),c.change&&c.change()}function a(e){e.preventDefault(),l.destroy(),o.windowFromDocument(d.documentFromRange(h)).focus(),m||c.releaseRange(h)}function s(e){e.keyCode==u.ENTER?r(e):e.keyCode==u.ESC&&a(e)}var l,c=this,h=c.lockRange(),m=!1,g=d.image(h),v=c.editor.options,_=v.messages,k=v.imageBrowser,b=!!(n.ui.ImageBrowser&&k&&k.transport&&k.transport.read!==t);l=this.createDialog(c._dialogTemplate(b),{title:_.insertImage,close:a,visible:!1,resizable:b,activate:function(){if(b){var e=this;new n.ui.ImageBrowser(e.element.find(".k-imagebrowser"),i({},k,{change:function(){e.element.find(p).val(this.value())},apply:r}))}}}).toggleClass("k-imagebrowser-dialog",b).find(".k-dialog-insert").click(r).end().find(".k-dialog-close").click(a).end().find(".k-edit-field input").keydown(s).end().find(p).val(g?g.getAttribute("src",2):"http://").end().find(f).val(g?g.alt:"").end().data("kendoWindow").center().open(),e(p,l.element).focus().select()}});n.ui.editor.ImageCommand=h,s("insertImage",new r.Tool({command:h,template:new l({template:a.buttonTemplate,title:"Insert Image"})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui.DropDownList,r=n.ui.editor.Dom,a=i.extend({init:function(e,t){var r=this;i.fn.init.call(r,e,t),r.value(r.options.title),n.support.mobileOS.ios&&r._initSelectOverlay(e),r.bind("open",function(){if(r.options.autoSize){var e,t=r.list;t.css({whiteSpace:"nowrap",width:"auto"}),e=t.width(),e?e+=20:e=r._listWidth,t.css("width",e+n.support.scrollbar()),r._listWidth=e}})},options:{name:"SelectBox"},_initSelectOverlay:function(t){var n,i,r;t=e(t),n=e("
       #: dialogButtonSeparator # #: dialogCancel #
      ",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=c,i.EditorUtils.registerTool("viewHtml",new l({command:c,template:new d({template:o.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,r=window.console,a=this.options.items;for(i=0;i=0?new i.GreedyInlineFormatter(r):new i.GreedyBlockFormatter(r)}})},initialize:function(e,t){var i=t.editor,a=this.options,o=a.name,s=this;e.width(a.width),e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:a.items||i.options[o],title:i.options.messages[o],autoSize:!0,change:function(){r.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,r,a,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;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,r=n._toolFromClassName(this),a=n.tools[r],o=t.options.messages,s=o[r],l=e(this);a&&a.initialize&&(("fontSize"==r||"fontName"==r)&&(i=o[r+"Inherit"],l.find("input").val(i).end().find("span.k-input").text(i).end()),a.initialize(l,{title:n._appendShortcutSequence(s,a),editor:n._editor}))}),t.bind("select",o(n._update,n)),n._updateContext(),n.updateGroups(),i&&i.wrapper.css({top:"",left:"",width:""})},show:function(){var e,t,n=this,i=n.window,r=n.options.editor;i&&(e=i.wrapper,t=r.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._editor.element,n=t.attr(e);t.attr(e,n||0).focus().find("li:has("+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:{},expandTools:function(n){var r,o,s,l,d=this._nativeTools,c=t.deepExtend({},t.ui.Editor.defaultTools),u={};for(o=0;o"+i+"
    • "),r=e(i).appendTo(d),"button"==n.type&&n.exec&&r.find(".k-tool-icon").click(o(n.exec,l[0])))},updateGroups:function(){var t,n,i,r,a=this,o=a.element,s=/k-group-end/,l=!1;o.children().filter(".k-group-break").remove(),r=o.children().filter(function(){return!e(this).children(".k-state-disabled").length}),r.each(function(o,s){var d,c,u;s=e(s),d=a._toolFromClassName(s.children()[0]),c=a.toolGroupFor(d),u=o==r.length-1,i=n!=c,n=c,t&&i&&t.addClass("k-group-end"),l=l||i,s.toggleClass("k-group-start",i||!l&&u).toggleClass("k-group-end",u),t=s}),a.element.children(".k-group-start").each(function(){for(var t,n=this;!s.test(n.className);)n=n.nextSibling,t=n.offsetLeft+n.offsetWidth;t>this.parentNode.offsetWidth&&e(this).before("
    • ")})},_attachEvents:function(){var t=this,n=".k-editor-button .k-tool-icon",i=n+":not(.k-state-disabled)",r=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,!1).on("keydown"+l,d,function(n){var i,r=e(this).closest("li"),a="li:has("+d+")",o=n.keyCode;if(o==s.RIGHT)i=r.nextAll(a).first().find(d);else if(o==s.LEFT)i=r.prevAll(a).first().find(d);else if(o==s.ESC)i=t;else if(o==s.TAB&&!n.ctrlKey&&!n.altKey)if(n.shiftKey){if(i=r.prevAll(a).first().find(d),!i.length)return;n.preventDefault()}else n.preventDefault(),i=r.nextAll(a).first().find(d),i.length||(i=t);i&&i.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._toolFromClassName(this))}).on("click"+l,r,function(e){e.preventDefault()})},_toolFromClassName:function(t){if(t){var n=e.grep(t.className.split(" "),function(e){return!/^k-(widget|tool-icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(e)});return n[0]?n[0].substring(n[0].lastIndexOf("-")+1):"custom"}},_update:function(){var n=this,i=n._editor,r=i.getRange(),a=t.ui.editor.RangeUtils.textNodes(r);a.length||(a=[r.startContainer]),n.items().each(function(){var t=n.tools[n._toolFromClassName(this)];t&&t.update&&t.update(e(this),a)}),this._updateContext(),n.updateGroups()},_updateContext:function(){this.element.children().show().filter(":has(.k-state-disabled)").hide()}});e.extend(i,{Toolbar:c})}(window.jQuery),function(e){var t=window.kendo,n=e.extend,i=e.proxy,r=t.ui.editor,a=r.Dom,o=r.EditorUtils,s=r.Command,l=".kendoEditor",d="k-state-active",c="k-state-selected",u=r.Tool,p=r.ToolTemplate,f=r.BlockFormatFinder,h=r.EditorUtils.registerTool,m=""+r.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,r=this.editor,a=this._tableHtml(i.rows,i.columns);r.selectRange(i.range),r.clipboard.paste(a),t=r.getRange(),n=e("table[data-last]",r.document).removeAttr("data-last"),t.selectNodeContents(n.find("td")[0]),r.selectRange(t)}}),_=u.extend({initialize:function(t,n){u.fn.initialize.call(this,t,n);var r=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=r},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-icon");n.hasClass("k-state-disabled")||this.popup().toggle()},update:function(e){this.popup().close(),e.removeClass("k-state-hover")}}),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)/a)+1,col:Math.floor((t.clientX+n.scrollLeft()-h.left)/r)+1}}function i(e){return e.row>0&&e.col>0&&e.row<=v&&e.col<=g}var r,a,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,r=(m.left-h.left)/g,a=(m.top-h.top)/v,s.on("mousemove"+l,function(r){var a=n(r);i(a)?(d.text(t.format("Create a {0} x {1} table",a.row,a.col)),u.each(function(t){e(this).toggleClass(c,t%g'+t+""}function i(n,i){var r,a,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(),r=document.selection.createRange(),d?(r.move("character",i),r.select()):(s=n.createTextRange(),l=s.duplicate(),s.moveToBookmark(r.getBookmark()),l.setEndPoint("EndToStart",s),a=l.text.length,o=a+s.text.length,i=[a,o])),i}var r=window.kendo,a=r.keys,o=r.ui,s=o.Widget,l=r._activeElement,d=r._extractFormat,c=r.parseFloat,u=r.support.placeholder,p=r.getCulture,f=r._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",I="aria-disabled",H="aria-readonly",A=null,z=e.proxy,M={190:".",188:","},R=s.extend({init:function(e,n){var i,a,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,z(u._focusout,u)).attr("role","spinbutton"),n.placeholder=n.placeholder||e.attr("placeholder"),u._reset(),u._wrapper(),u._arrows(),u._input(),r.support.mobileOS?u._text.on(b+k+" "+S+k,function(t){u._toggleText(!1),t.type===S&&e.focus()}):u._text.on(S+k,z(u._click,u)),i=u.min(e.attr("min")),a=u.max(e.attr("max")),o=u._parse(e.attr("step")),n.min===A&&i!==A&&(n.min=i),n.max===A&&a!==A&&(n.max=a),p||o===A||(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!==A?l:e.val()),c=e.is("[disabled]"),c?u.enable(!1):u.readonly(e.is("[readonly]")),r.notify(u)},options:{name:"NumericTextBox",decimals:A,min:A,max:A,value:A,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,r=e.readonly,a=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("paste"+k),r||i?(o.addClass(i?E:x).removeClass(i?x:E),a.attr(m,i).attr(g,r).attr(I,i).attr(H,r)):(o.addClass(x).removeClass(E).on(w,t._toggleHover),a.removeAttr(m).removeAttr(g).attr(I,!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,z(t._keydown,t)).on("paste"+k,z(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,r=n.max;return e===A?e:(i!==A&&i>e?e=i:r!==A&&e>r&&(e=r),e)},_arrows:function(){var t,i=this,a=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 r.UserEvents(i._upArrow,{release:a}),i._downArrow=t.eq(1),i._downArrowEventHandler=new r.UserEvents(i._downArrow,{release:a})},_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,r,a,o=e.target,s=i(o)[0],l=o.value.substring(0,s),d=t._format(t.options.format),c=d[","],u=0;c&&(r=RegExp("\\"+c,"g"),a=RegExp("([\\d\\"+c+"]+)(\\"+d[D]+")?(\\d+)?")),a&&(n=a.exec(l)),n&&(u=n[0].replace(r,"").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",r=n.element.addClass(v).show()[0],a=r.accessKey,o=n.wrapper;t=o.find(D+i),t[0]||(t=e('').insertBefore(r).addClass(i)),r.type="text",t[0].tabIndex=r.tabIndex,t[0].style.cssText=r.style.cssText,t.prop("placeholder",n.options.placeholder),a&&(t.attr("accesskey",a),r.accessKey=""),n._text=t.addClass(r.className)},_keydown:function(e){var t=this,n=e.keyCode;n==a.DOWN?t._step(-1):n==a.UP?t._step(1):n==a.ENTER&&t._change(t.element.val()),t._prevent(n,e.shiftKey)&&!e.ctrlKey&&e.preventDefault()},_paste:function(e){var t=this,n=e.target,i=n.value;setTimeout(function(){t._parse(n.value)===A&&t._update(i)})},_prevent:function(e,t){var n,r=this,o=r.element[0],s=o.value,l=r.options,d=l.min,c=r._format(l.format),u=c[D],p=l.decimals,f=i(o),h=f[0],m=f[1],g=0===h&&m===s.length,v=!0;return p===A&&(p=c.decimals),e>16&&21>e||e>32&&37>e||e>47&&58>e||e>95&&106>e||e==a.INSERT||e==a.DELETE||e==a.LEFT||e==a.RIGHT||e==a.TAB||e==a.BACKSPACE||e==a.ENTER?(v=!1,t&&(n=parseInt(String.fromCharCode(e),10),isNaN(n)||(n+="",s=s.substring(0,h)+n+s.substring(m),(-1===o.maxLength||o.maxLength>=s.length)&&(o.value=s,i(o,h+n.length)),v=!0))):(M[e]===u||110==e)&&p>0&&(-1==s.indexOf(u)||g)?110==e?(o.value=s.substring(0,h)+u+s.substring(m),i(o,h+u.length)):t||(v=!1):!(d===A||0>d)||-1!=s.indexOf("-")||189!=e&&109!=e&&173!=e||0!==h||(v=!1),v},_option:function(e,n){var i=this,r=i.options;return n===t?r[e]:(n=i._parse(n),(n||"step"!==e)&&(r[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,a=i.format,o=i.decimals,s=n._culture(),l=n._format(a,s);o===A&&(o=l.decimals),e=n._parse(e,s),t=e!==A,t&&(e=parseFloat(f(e,o))),n._value=e=n._adjust(e),n._placeholder(r.toString(e,a,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,r=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=r.style.cssText,r.style.width="",n.wrapper=t.addClass("k-widget k-numerictextbox").addClass(r.className).css("display",""),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value)})},t._form=r.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"]},r=/left|right/.test(e);return r?(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 r(t,n){try{return e.contains(t,n)}catch(i){return!1}}function a(t){t=e(t),t.addClass("k-item").children(x).addClass(H),t.children("a").addClass(S).children(x).addClass(H),t.filter(":not([disabled])").addClass(L),t.filter(".k-separator:empty").append(" "),t.filter("li[disabled]").addClass(U).removeAttr("disabled").attr("aria-disabled",!0),t.filter("[role]").length||t.attr("role","menuitem"),t.children("."+S).length||t.contents().filter(function(){return!(this.nodeName.match(y)||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(I),t.filter(".k-last:not(:last-child)").removeClass(D),t.filter(":first-child").addClass(I),t.filter(":last-child").addClass(D)}var l=window.kendo,d=l.ui,c=l._activeElement,u=l.support.touch&&l.support.mobileOS,p=u||l.support.pointers,f="mousedown",h="click",m=e.extend,g=e.proxy,v=e.each,_=l.template,k=l.keys,b=d.Widget,y=/^(ul|a|div)$/i,w=".kendoMenu",x="img",C="open",T="k-menu",S="k-link",D="k-last",F="close",E="timer",I="k-first",H="k-image",A="select",z="zIndex",M="activate",R="deactivate",N="touchstart"+w+" MSPointerDown"+w,O=l.support.pointers?"MSPointerOver":"mouseenter",P=l.support.pointers?"MSPointerOut":"mouseleave",B="kendoPopup",L="k-state-default",W="k-state-hover",V="k-state-focused",U="k-state-disabled",q=".k-group",j=":not(.k-list) > .k-item",G=".k-item.k-state-disabled",Y=".k-item:not(.k-state-disabled)",$=".k-item:not(.k-state-disabled) > .k-link",K=":not(.k-item.k-separator)",Q=K+":eq(0)",J=K+":last",X="div:not(.k-animation-container,.k-list-container)",Z={content:_("
      #= content(item) #
      "),group:_(""),itemWrapper:_("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= arrow(data) #"),item:_("
    • "),image:_(""),arrow:_(""),sprite:_(""),empty:_("")},et={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 S},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:" "}},tt=b.extend({init:function(t,n){var i=this;b.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=g(i._focusHandler,i),t.on(N,i._focusProxy).on(h+w,G,!1).on(h+w,Y,g(i._click,i)).on("keydown"+w,g(i._keydown,i)).on("focus"+w,g(i._focus,i)).on("focus"+w,".k-content",g(i._focus,i)).on(N+" "+f+w,".k-content",g(i._preventClose,i)).on("blur"+w,g(i._removeHoverItem,i)).on("blur"+w,"[tabindex]",g(i._checkActiveElement,i)).on(O+w,Y,g(i._mouseenter,i)).on(P+w,Y,g(i._mouseleave,i)).on(O+w+" "+P+w+" "+f+w+" "+h+w,$,g(i._toggleHover,i)),n.openOnClick&&(i.clicked=!1,i._documentClickHandler=g(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:[C,F,M,R,A],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=m(!0,t,e.animation),"dataSource"in e&&this._initData(e),b.fn.setOptions.call(this,e)},destroy:function(){var t=this;b.fn.destroy.call(t),t.element.off(w),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 v(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 v(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 v(n.items,function(){t.after(this),o(this),s(this)}),s(t),this},_insert:function(t,n,i){var r,o,s,l,d=this;return n&&n.length||(i=d.element),s=e.isPlainObject(t),l={firstLevel:i.hasClass(T),horizontal:i.hasClass(T+"-horizontal"),expanded:!0,length:i.children().length},n&&!i.length&&(i=e(tt.renderGroup({group:l})).appendTo(n)),s||e.isArray(t)?r=e.map(s?[t]:t,function(t,n){return"string"==typeof t?e(t):e(tt.renderItem({group:l,item:m(t,{index:n})}))}):(r=e(t),o=r.find("> ul").addClass("k-group").attr("role","menu"),r=r.filter("li"),r.add(o.find("> li")).each(function(){a(this)})),{items:r,group:i}},remove:function(e){var t,n,i,r;return e=this.element.find(e),t=this,n=e.parentsUntil(t.element,j),i=e.parent("ul"),e.remove(),i&&!i.children(j).length&&(r=i.parent(".k-animation-container"),r.length?r.remove():i.remove()),n.length&&(n=n.eq(0),o(n),s(n)),t},open:function(r){var a=this,o=a.options,s="horizontal"==o.orientation,d=o.direction,c=l.support.isRtl(a.wrapper);return r=a.element.find(r),/^(top|bottom|default)$/.test(d)&&(d=c?s?(d+" left").replace("default","bottom"):"left":s?(d+" right").replace("default","bottom"):"right"),r.siblings().find(">.k-popup:visible,>.k-animation-container>.k-popup:visible").each(function(){var t=e(this).data("kendoPopup");t&&t.close()}),r.each(function(){var r=e(this);clearTimeout(r.data(E)),r.data(E,setTimeout(function(){var e,l,u,f,h,g,v=r.find(".k-group:first:hidden");v[0]&&a.trigger(C,{item:r[0]})===!1&&(r.data(z,r.css(z)),r.css(z,a.nextItemZIndex++),e=v.data(B),l=r.parent().hasClass(T),u=l&&s,f=i(d,l,c),h=o.animation.open.effects,g=h!==t?h:"slideIn:"+n(d,l),e?(e=v.data(B),e.options.origin=f.origin,e.options.position=f.position,e.options.animation.open.effects=g):e=v.kendoPopup({activate:function(){a.trigger(M,{item:this.wrapper.parent()})},deactivate:function(){a.trigger(R,{item:this.wrapper.parent()})},origin:f.origin,position:f.position,collision:o.popupCollision!==t?o.popupCollision:u?"fit":"fit flip",anchor:r,appendTo:r,animation:{open:m(!0,{effects:g},o.animation.open),close:o.animation.close},close:function(e){var t=e.sender.wrapper.parent();a.trigger(F,{item:t[0]})?e.preventDefault():(t.css(z,t.data(z)),t.removeData(z),p&&(t.removeClass(W),a._removeHoverItem()))}}).data(B),v.removeAttr("aria-hidden"),e.open())},a.options.hoverDelay))}),a},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(E)),t.data(E,setTimeout(function(){var e=t.find(".k-group:not(.k-list-container):first:visible").data(B);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(L,n).toggleClass(U,!n).attr("aria-disabled",!n)})},_toggleHover:function(t){var n=e(l.eventTarget(t)||t.target).closest(j),i=t.type==O||-1!==f.indexOf(t.type);n.parents("li."+U).length||n.toggleClass(W,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(this._hoverItem()[0]||(t?t.currentTarget:{})),a=n._findRootParent(i)[0];this._closurePrevented||setTimeout(function(){(!document.hasFocus()||!r(a,l._activeElement())&&t&&!r(a,t.currentTarget))&&n.close(a)},0),this._closurePrevented=!1},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(V)&&(e.removeClass(V),this._oldHoverItem=null)},_updateClasses:function(){var e,t=this.element;t.addClass("k-widget k-reset k-header "+T).addClass(T+"-"+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(){a(this)})},_mouseenter:function(t){var n=this,i=e(t.currentTarget),a=i.children(".k-animation-container").length||i.children(q).length;t.delegateTarget==i.parents(".k-menu")[0]&&((!n.options.openOnClick||n.clicked)&&!r(t.currentTarget,t.relatedTarget)&&a&&n.open(i),(n.options.openOnClick&&n.clicked||p)&&i.siblings().each(g(function(e,t){n.close(t)},n)))},_mouseleave:function(n){var i=this,a=e(n.currentTarget),o=a.children(".k-animation-container").length||a.children(q).length;return a.parentsUntil(".k-animation-container",".k-list-container,.k-calendar-container")[0]?(n.stopImmediatePropagation(),t):(i.options.openOnClick||u||l.support.pointers&&2==n.originalEvent.pointerType||r(n.currentTarget,n.relatedTarget)||!o||i.close(a),t)},_click:function(n){var i,r,a,o=this,s=o.options,d=e(l.eventTarget(n)),c=d[0]?d[0].nodeName.toUpperCase():"",u="INPUT"==c||"SELECT"==c||"BUTTON"==c,p=d.closest("."+S),f=d.closest(j),h=p.attr("href"),m=!!h&&h!==e("").attr("href");if(!f.children(X)[0])return f.hasClass(U)?(n.preventDefault(),t):(n.handled||!o.trigger(A,{item:f[0]})||u||n.preventDefault(),n.handled=!0,r=f.children(q+",.k-animation-container"),a=r.is(":visible"),s.closeOnClick&&!m&&(!r.length||s.openOnClick&&a)?(f.removeClass(W).css("height"),o._oldHoverItem=o._findRootParent(f),o.close(p.parentsUntil(o.element,j)),o.clicked=!1,-1!="MSPointerUp".indexOf(n.type)&&n.preventDefault(),t):((f.parent().hasClass(T)&&s.openOnClick||l.support.touch)&&(m||u||n.preventDefault(),o.clicked=!0,i=r.is(":visible")?F:C,(s.closeOnClick||i!=F)&&o[i](f)),t))},_documentClick:function(e){r(this.element[0],e.target)||(this.clicked=!1)},_focus:function(n){var i=this,r=n.target,a=i._hoverItem(),o=c();return r==i.wrapper[0]||e(r).is(":focusable")?(o===n.currentTarget&&(a.length?i._moveHover([],a):i._oldHoverItem||i._moveHover([],i.wrapper.children().first())),t):(n.stopPropagation(),e(r).closest(".k-content").closest(".k-group").closest(".k-item").addClass(V),i.wrapper.focus(),t)},_keydown:function(e){var n,i,r,a=this,o=e.keyCode,s=a._oldHoverItem,d=l.support.isRtl(a.wrapper);if(e.target==e.currentTarget||o==k.ESC){if(s||(s=a._oldHoverItem=a._hoverItem()),i=a._itemBelongsToVertival(s),r=a._itemHasChildren(s),o==k.RIGHT)n=a[d?"_itemLeft":"_itemRight"](s,i,r);else if(o==k.LEFT)n=a[d?"_itemRight":"_itemLeft"](s,i,r);else if(o==k.DOWN)n=a._itemDown(s,i,r);else if(o==k.UP)n=a._itemUp(s,i,r);else if(o==k.ESC)n=a._itemEsc(s,i);else if(o==k.ENTER||o==k.SPACEBAR)n=s.children(".k-link"),n.length>0&&(a._click({target:n[0],preventDefault:function(){}}),a._moveHover(s,a._findRootParent(s)));else if(o==k.TAB)return n=a._findRootParent(s),a._moveHover(s,n),a._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(V),e[0].id===i&&e.removeAttr("id")),t.length&&(t[0].id&&(i=t[0].id),t.addClass(V),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,r,a=this;if(!e.hasClass(U))return t?n?(a.open(e),i=e.find(".k-group").children().first()):"horizontal"==a.options.orientation&&(r=a._findRootParent(e),a.close(r),i=r.nextAll(Q)):(i=e.nextAll(Q),i.length||(i=e.prevAll(J))),i&&!i.length?i=a.wrapper.children(".k-item").first():i||(i=[]),a._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(Q))):(n=e.prevAll(Q),n.length||(n=e.nextAll(J))),n.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_itemDown:function(e,t,n){var i,r=this;if(t)i=e.nextAll(Q);else{if(!n||e.hasClass(U))return;r.open(e),i=e.find(".k-group").children().first()}return!i.length&&e.length?i=e.parent().children().first():e.length||(i=r.wrapper.children(".k-item").first()),r._moveHover(e,i),i},_itemUp:function(e,t){var n,i=this;if(t)return n=e.prevAll(Q),!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(j);setTimeout(function(){n._moveHover([],i),i.children(".k-content")[0]&&i.parent().closest(".k-item").removeClass(V)},200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})}});m(tt,{renderItem:function(e){e=m({menu:{},group:{}},e);var t=Z.empty,n=e.item;return Z.item(m(e,{image:n.imageUrl?Z.image:t,sprite:n.spriteCssClass?Z.sprite:t,itemWrapper:Z.itemWrapper,renderContent:tt.renderContent,arrow:n.items||n.content?Z.arrow:t,subGroup:tt.renderGroup},et))},renderGroup:function(e){return Z.group(m({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,a=m({length:r},e.group);r>n;n++)t+=tt.renderItem(m(e,{group:a,item:m({index:n},i[n])}));return t}},e,et))},renderContent:function(e){return Z.content(m(e,et))}}),l.ui.plugin(tt)}(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:",r=this.name;-1===n.indexOf(i)&&r&&(n+=(n.length?",":"")+i+r,e(this).attr(t,n))})}function r(e){var t,i,r=(e.model.fields||e.model)[e.field],a=n(r),o=r?r.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(a,_)>=0&&(c[l]=a),c[d]=("boolean"===a?"checked:":"value:")+e.field,c}function a(e){var t,n,i,r,a,o;if(e&&e.length)for(o=[],t=0,n=e.length;n>t;t++)i=e[t],a=i.text||i.value||i,r=null==i.value?i.text||i:i.value,o[t]={text:a,value:r};return o}function o(e,t){var n,i,r=e?e.validation||{}:{};for(n in r)i=r[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=e.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=r(n);e('').attr(i).appendTo(t).kendoNumericTextBox({format:n.format}),e("').hide().appendTo(t)},date:function(t,n){var i=r(n),a=n.format;a&&(a=s._extractFormat(a)),i[s.attr("format")]=a,e('').attr(i).appendTo(t).kendoDatePicker({format:n.format}),e("').hide().appendTo(t)},string:function(t,n){var i=r(n);e('').attr(i).appendTo(t)},"boolean":function(t,n){var i=r(n);e('').attr(i).appendTo(t)},values:function(t,n){var i=r(n);e("#=messages.isTrue#
      ',g='
      #=messages.info#
      #if(values){##}else{##}##if(extra){##if(values){##}else{##}##}#
      ',v=h.extend({init:function(t,n){var i,a,s,l,c=this,u="string";h.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(r.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(a in i)break;c._defaultFilter=function(){return{field:c.field,operator:a||"eq",value:""}},c._refreshHandler=o(c.refresh,c),c.dataSource.bind("change",c._refreshHandler),n.appendToElement?c._init():c.refresh()},_init:function(){var t,i=this,a=i.options,c=i.operators||{},u=a.ui,h=f(u),v=i.type;c=c[v]||a.operators[v],h||(t=u||p[v]),i.form=e('
      ').html(r.template("boolean"===v?m:g)({field:i.field,format:a.format,ns:r.ns,messages:a.messages,extra:a.extra,operators:c,type:v,role:t,values:n(a.values)})).on("keydown"+d,o(i._keydown,i)).on("submit"+d,o(i._submit,i)).on("reset"+d,o(i._reset,i)),a.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),h&&i.form.find(".k-textbox").removeClass("k-textbox").each(function(){u(e(this)) }),i.form.find("["+r.attr("role")+"=numerictextbox]").removeClass("k-textbox").end().find("["+r.attr("role")+"=datetimepicker]").removeClass("k-textbox").end().find("["+r.attr("role")+"=timepicker]").removeClass("k-textbox").end().find("["+r.attr("role")+"=datepicker]").removeClass("k-textbox"),i.refresh(),i.trigger(l,{field:i.field,container:i.form})},refresh:function(){var e=this,t=e.dataSource.filter()||{filters:[],logic:"and"};e.filterModel=r.observable({logic:"and",filters:[e._defaultFilter(),e._defaultFilter()]}),e.form&&r.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;h.fn.destroy.call(e),e.form&&(r.unbind(e.form),r.destroy(e.form),e.form.unbind(d),e.popup.destroy()),e.link.unbind(d),e._refreshHandler&&e.dataSource.unbind("change",e._refreshHandler)},_bind:function(e){var t,n,i,r,a=this,o=e.filters,s=!1,l=0,d=a.filterModel;for(t=0,n=o.length;n>t;t++)r=o[t],r.field==a.field?(d.set("logic",e.logic),i=d.filters[l],i||(d.filters.push({field:a.field}),i=d.filters[l]),i.set("value",a._parse(r.value)),i.set("operator",r.operator),l++,s=!0):r.filters&&(s=s||a._bind(r));return s},_merge:function(n){var i,r,a,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}),r=0,a=l.length;a>r;r++)i=l[r],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){var t=this;e.preventDefault(),t.filter(t.filterModel.toJSON()),t.popup.close()},_reset:function(){this.clear(),this.popup.close()},_click:function(e){e.preventDefault(),e.stopPropagation(),this.popup||this._init(),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(":focusable:first").focus()},_keydown:function(e){e.keyCode==r.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-"}}});a.plugin(v)}(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 r=window.kendo,a=r.ui,o=r.keys,s=e.extend,l=e.each,d=r.template,c=a.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",I="mouseleave",H="contentLoad",A="k-state-active",z="> .k-panel",M="> .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)",W=L+" > .k-link",V=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:r.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,a=this;c.fn.init.call(a,t,n),t=a.wrapper=a.element.addClass("k-widget k-reset k-header k-panelbar"),n=a.options,t[0].id&&(a._itemId=t[0].id+"_pb_active"),a._tabindex(),a._initData(n),a._updateClasses(),a._animations(n),t.on("click"+p,W,function(t){a._click(e(t.currentTarget))&&t.preventDefault()}).on(E+p+" "+I+p,W,a._toggleHover).on("click"+p,V,!1).on("keydown"+p,e.proxy(a._keydown,a)).on("focus"+p,function(){var e=a.select();a._current(e[0]?e:a._first())}).on("blur"+p,function(){a._current(null)}).attr("role","menu"),i=t.find("li."+A+" > ."+S),i[0]&&a.expand(i.parent(),!1),r.notify(a)},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),r.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,r={};return n=n!==!1,t=this.element.find(t),t.each(function(a,o){o=e(o);var s=o.find(z).add(o.find(M));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||(r=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(C,o)||i._toggleItem(o,!1),n||(i.options.animation=r)}}),i},collapse:function(t,n){var i=this,r={};return n=n!==!1,t=i.element.find(t),t.each(function(t,a){a=e(a);var o=a.find(z).add(a.find(M));!a.hasClass(N)&&o.is(K)&&(a.removeClass(B),n||(r=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(F,a)||i._toggleItem(a,!0),n||(i.options.animation=r))}),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),r=n.children(v);return n.hasClass(N)?i:(i._updateSelected(r),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 r=this._insert(e,t,t.length?t.find(z):null);return l(r.items,function(){r.group.append(this),i(this)}),n(t),i(r.group.find(".k-first, .k-last")),r.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,r=e.parentsUntil(t.element,k),a=e.parent("ul");return e.remove(),!a||a.hasClass("k-panelbar")||a.children(k).length||a.remove(),r.length&&(r=r.eq(0),n(r),i(r)),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,r=n._itemId;return e===t?i:(n.element.removeAttr("aria-activedescendant"),i&&(i[0].id===r&&i.removeAttr("id"),i.children(v).removeClass(R)),e&&(r=e[0].id||r,e.attr("id",r).children(v).addClass(R),n.element.attr("aria-activedescendant",r)),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 r,a,o=this,l=e.isPlainObject(t),d=n&&n[0];return d||(i=o.element),a={firstLevel:i.hasClass("k-panelbar"),expanded:i.parent().hasClass(A),length:i.children().length},d&&!i.length&&(i=e(et.renderGroup({group:a})).appendTo(n)),l||e.isArray(t)?(r=e.map(l?[t]:t,function(t,n){return"string"==typeof t?e(t):e(et.renderItem({group:a,item:s(t,{index:n})}))}),d&&n.attr(G,!1)):(r=e(t),o._updateItemsClasses(r)),{items:r,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,r,a=this;t=a.element.find("li > ul").not(function(){return e(this).parentsUntil(".k-panelbar","div").length}).addClass("k-group k-panel").attr("role","group"),t.parent().attr(G,!1).not("."+A).children("ul").attr(Y,!0).hide(),r=a.element.add(t).children(),a._updateItemsClasses(r),n(r),i(r)},_updateItemsClasses:function(e){for(var t=e.length,n=0;t>n;n++)this._updateItemClasses(e[n],n)},_updateItemClasses:function(t,n){var i,a,o=this._selected,s=this.options.contentUrls,l=s&&s[n],d=this.element[0];t=e(t).addClass("k-item").attr("role","menuitem"),r.support.browser.msie&&t.css("list-style-position","inside").css("list-style-position",""),t.children(f).addClass(w),a=t.children("a").addClass(g),a[0]&&(a.attr("href",l),a.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),a=t.children(P),a[0]&&(o&&o.removeAttr($).children(P).removeClass(O),a.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,r,a,o,s,l=this,d=l.element;if(!e.parents("li."+N).length&&e.closest(".k-widget")[0]==d[0]){if(a=e.closest(v),o=a.closest(k),l._updateSelected(a),n=o.find(z).add(o.find(M)),i=a.attr(h),r=i&&("#"==i.charAt(i.length-1)||-1!=i.indexOf("#"+l.element[0].id+"-")),t=!(!r&&!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,r=this,a=e.find(z);return a.length?(this._toggleGroup(a,t),n=!0):(i=e.children("."+S),i.length&&(n=!0,i.is(Q)?r._ajaxRequest(e,i,t):r._toggleGroup(i,t))),n},_toggleGroup:function(e,t){var n=this,i=n.options.animation,r=i.expand,a=s({},i.collapse),o=a&&"effects"in a;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),r=t?s(o?a:s({reverse:!0},r),{hide:!0}):s({complete:function(e){n._triggerEvent(D,e.closest(k))}},r),e.kendoStop(!0,!0).kendoAnimate(r))},_collapseAllExpanded:function(n){var i,r,a=this,o=!1;return n.children(v).hasClass("k-header")?(r=n.find(z).add(n.find(M)),r.is(K)&&(o=!0),r.is(K)||0===r.length||(i=e(a.element).children(),i.find(z).add(i.find(M)).filter(function(){return e(this).is(K)}).each(function(t,n){n=e(n),o=a._triggerEvent(F,n.closest(k)),o||a._toggleGroup(n,!0)})),o):t},_ajaxRequest:function(t,n,i){var r=this,a=t.find(".k-panelbar-collapse, .k-panelbar-expand"),o=t.find(v),s=setTimeout(function(){a.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){a.removeClass("k-loading"),r.trigger(_,{xhr:e,status:t})&&this.complete()},complete:function(){clearTimeout(s),a.removeClass("k-loading")},success:function(e){try{n.html(e)}catch(a){var o=window.console;o&&o.error&&o.error(a.name+": "+a.message+" in "+d),this.error(this.xhr,"error")}r._toggleGroup(n,i),r.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),r=t._selected;r&&r.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,r=i?i.length:0,a=s({length:r},e.group);r>n;n++)t+=et.renderItem(s(e,{group:a,item:s({index:n},i[n])}));return t}},e,Z))},renderContent:function(e){return X.content(s(e,Z))}}),r.ui.plugin(et)}(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(z),t.filter("li[disabled]").addClass(A).removeAttr("disabled"),t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass(M+" "+O),t.attr("role","tab"),t.filter("."+M).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 r=window.kendo,a=r.ui,o=r.keys,s=e.map,l=e.each,d=e.trim,c=e.extend,u=r.template,p=a.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",I="mouseleave",H="contentLoad",A="k-state-disabled",z="k-state-default",M="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(."+M+")",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("")},W={wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" k-state-disabled":" k-state-default",0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),n},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},text:function(e){return e.encoded===!1?e.text:r.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},contentAttributes:function(e){return e.active!==!0?" style='display:none' aria-hidden='true' aria-expanded='false'":""},content:function(e){return e.content?e.content:e.contentUrl?"":" "},contentUrl:function(e){return e.contentUrl?r.attr("content-url")+'="'+e.contentUrl+'"':""}},V=p.extend({init:function(t,n){var i,a,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=r.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+" "+I+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._click(e(t.currentTarget))&&t.preventDefault()}),i=o.tabGroup.children("li."+M),a=o.contentHolder(i.index()),a.length>0&&0===a[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"),r.notify(o)},_active:function(){var e=this.tabGroup.children().filter("."+M);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,r=n._ariaId;return e===t?i:(i&&(i[0].id===r&&i.removeAttr("id"),i.removeClass(R)),e&&(e.hasClass(M)||e.addClass(R),n.element.removeAttr("aria-activedescendant"),r=e[0].id||r,r&&(e.attr("id",r),n.element.attr("aria-activedescendant",r))),n._focused=e,t)},_keydown:function(e){var n,i=this,r=e.keyCode,a=i._current(),s=i._isRtl;if(e.target==e.currentTarget){if(r==o.DOWN||r==o.RIGHT)n=s?v:"next";else if(r==o.UP||r==o.LEFT)n=s?"next":v;else if(r==o.ENTER||r==o.SPACEBAR)i._click(a),e.preventDefault();else{if(r==o.HOME)return i._click(i._endItem("first")),e.preventDefault(),t;if(r==o.END)return i._click(i._endItem("last")),e.preventDefault(),t}n&&(i._click(i._item(a,n)),e.preventDefault())}},_dataSource:function(){var t=this;t.dataSource&&t._refreshHandler?t.dataSource.unbind("change",t._refreshHandler):t._refreshHandler=e.proxy(t.refresh,t),t.dataSource=r.data.DataSource.create(t.options.dataSource).bind("change",t._refreshHandler)},setDataSource:function(e){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,a,o=this,s=o.options,l=r.getter(s.dataTextField),d=r.getter(s.dataContentField),c=r.getter(s.dataContentUrlField),u=r.getter(s.dataImageUrlField),p=r.getter(s.dataUrlField),f=r.getter(s.dataSpriteCssClass),h=[],m=o.dataSource.view();for(e=e||{},i=e.action,i&&(m=e.items),t=0,a=m.length;a>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(r)),{tabs:r,contents:a}},_toggleDisabled:function(t,n){t=this.tabGroup.find(t),t.each(function(){e(this).toggleClass(z,n).toggleClass(A,!n)})},_updateClasses:function(){var r,a,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("