/* * Kendo UI Complete v2013.3.1119 (http://kendoui.com) * Copyright 2013 Telerik AD. All rights reserved. * * Kendo UI Complete commercial licenses may be obtained at * https://www.kendoui.com/purchase/license-agreement/kendo-ui-complete-commercial.aspx * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(define){return define([],function(){!function(e,t,n){function i(){}function 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 o(e,t,n){return e+="",t=t||2,n=t-e.length,n?L[t].substring(0,n)+e:e}function a(t,n){var i,r,o,a,s,l,d,c,u,p,h,f,g,m=_t.browser,v="rtl"==t.css("direction");return t.parent().hasClass("k-animation-container")?(f=t.parent(".k-animation-container"),g=f[0].style,f.is(":hidden")&&f.show(),i=bt.test(g.width)||bt.test(g.height),i||f.css({width:t.outerWidth(),height:t.outerHeight(),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})):(r=t.css(ct.support.transitions.css+"box-shadow")||t.css("box-shadow"),o=r?r.match(wt)||[0,0,0,0,0]:[0,0,0,0,0],a=mt.max(+o[3],+(o[4]||0)),s=-o[1]+a,l=+o[1]+a,d=+o[2]+a,c=t[0].style.width,u=t[0].style.height,p=bt.test(c),h=bt.test(u),m.opera&&(s=l=d=5),i=p||h,!p&&(!n||n&&c)&&(c=t.outerWidth()),!h&&(!n||n&&u)&&(u=t.outerHeight()),t.wrap(e("
").addClass("k-animation-container").css({width:c,height:u,marginLeft:s*(v?1:-1),paddingLeft:s,paddingRight:l,paddingBottom:d})),i&&t.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),m.msie&&mt.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,o,a=ct.data.ObservableArray,s=ct.data.DataSource;for(n in t)i=t[n],r=typeof i,r===St&&null!==i&&i.constructor!==Array&&i.constructor!==a&&i.constructor!==s?i instanceof Date?e[n]=new Date(i.getTime()):(o=e[n],e[n]=typeof o===St?o||{}:{},l(e[n],i)):r!==Et&&(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(e){return e.replace(/([a-z][A-Z])/g,function(e){return e.charAt(0)+"-"+e.charAt(1).toLowerCase()})}function u(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})}function p(t,n){var i,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[u(t)]})),ct.size(r)||(r=i),r}function h(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n}function f(e,t,n){var i,r,o,a;return t||(t="offset"),i=e[t](),r=_t.mobileOS,_t.touch&&r.ios&&r.flatVersion<410&&(o="offset"==t?i:e.offset(),a=i.left==o.left&&i.top==o.top)?{top:i.top-window.scrollY,left:i.left-window.scrollX}:(!ct.support.pointers&&!ct.support.msPointers||n||(i.top-=window.pageYOffset-document.documentElement.scrollTop,i.left-=window.pageXOffset-document.documentElement.scrollLeft),i)}function g(e){var t={};return pt("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function m(e){return new ct.effects.Element(e)}function v(e,t,n,i){return typeof e===Ct&&(A(t)&&(i=t,t=400,n=!1),A(n)&&(i=n,n=!1),typeof t===At&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:i}),ut({effects:{},duration:400,reverse:!1,init:gt,teardown:gt,hide:!1},e,{completeCallback:e.complete,complete:gt})}function _(t,n,i,r,o){for(var a,s=0,l=t.length;l>s;s++)a=e(t[s]),a.queue(function(){V.promise(a,v(n,i,r,o))});return t}function b(e,t,n,i,r,o){return V.transitionPromise(e,t,v(n,i,r,o))}function y(e,t,n,i){return t&&(t=t.split(" "),pt(t,function(t,n){e.toggleClass(n,i)})),e}function w(e){return(""+e).replace(N,"&").replace(U,"<").replace(W,">")}function k(e,i){var r;return 0===i.indexOf("data")&&(i=i.substring(4),i=i.charAt(0).toLowerCase()+i.substring(1)),i=i.replace(X,"-$1"),r=e.getAttribute("data-"+ct.ns+i),null===r?r=n:"null"===r?r=null:"true"===r?r=!0:"false"===r?r=!1:kt.test(r)?r=parseFloat(r):$.test(r)&&!K.test(r)&&(r=t("("+r+")")),r}function x(t,i){var r,o,a={};for(r in i)o=k(t,r),o!==n&&(Q.test(r)&&(o=ct.template(e("#"+o).html())),a[r]=o);return a}function C(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&T(e)}function T(t){return!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")||e.expr.filters.hidden(this)}).length}function S(e,t){return new S.fn.init(e,t)}var D,A,E,P,F,I,z,M,B,R,H,L,O,V,N,U,W,j,q,G,Y,Q,$,K,X,Z,J,et,tt,nt,it,rt,ot,at,st,lt,dt,ct=window.kendo=window.kendo||{cultures:{}},ut=e.extend,pt=e.each,ht=e.isArray,ft=e.proxy,gt=e.noop,mt=Math,vt=window.JSON||{},_t={},bt=/%/,yt=/\{(\d+)(:[^\}]+)?\}/g,wt=/(\d+?)px\s*(\d+?)px\s*(\d+?)px\s*(\d+?)?/i,kt=/^(\+|-?)\d+(\.?)\d*$/,xt="function",Ct="string",Tt="number",St="object",Dt="null",At="boolean",Et="undefined",Pt={},Ft={},It=[].slice,zt=window.Globalize;ct.version="2013.3.1119",i.extend=function(e){var t,n,i=function(){},r=this,o=e&&e.init?e.init:function(){r.apply(this,arguments)};i.prototype=r.prototype,n=o.fn=o.prototype=new i;for(t in e)n[t]=typeof e[t]!==St||e[t]instanceof Array||null===e[t]?e[t]:ut(!0,{},i.prototype[t],e[t]);return n.constructor=o,o.extend=r.extend,o},i.prototype._initOptions=function(e){this.options=s({},this.options,e)},A=ct.isFunction=function(e){return"function"==typeof e},E=function(){this._defaultPrevented=!0},P=function(){return this._defaultPrevented===!0},F=i.extend({init:function(){this._events={}},bind:function(e,t,i){var r,o,a,s,l,d=this,c=typeof e===Ct?[e]:e,u=typeof t===xt;if(t===n){for(r in e)d.bind(r,e[r]);return d}for(r=0,o=c.length;o>r;r++)e=c[r],s=u?t:t[e],s&&(i&&(a=s,s=function(){d.unbind(e,s),a.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,o,a=this,s=typeof e===Ct?[e]:e,l=typeof t===xt;for(n=0,i=s.length;i>n;n++)e=s[n],r=l?t:t[e],r&&(o=a._events[e]=a._events[e]||[],o.unshift(r));return a},trigger:function(e,t){var n,i,r=this,o=r._events[e];if(o){for(t=t||{},t.sender=r,t._defaultPrevented=!1,t.preventDefault=E,t.isDefaultPrevented=P,o=o.slice(),n=0,i=o.length;i>n;n++)o[n].call(r,t);return t._defaultPrevented===!0}return!1},unbind:function(e,t){var i,r=this,o=r._events[e];if(e===n)r._events={};else if(o)if(t)for(i=o.length-1;i>=0;i--)o[i]===t&&o.splice(i,1);else r._events[e]=[];return r}}),I=/^\w+/,z=/\$\{([^}]*)\}/g,M=/\\\}/g,B=/__CURLY__/g,R=/\\#/g,H=/__SHARP__/g,L=["","0","00","000","0000"],D={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,o,a,s=ut({},this,n),l=s.paramName,d=l.match(I)[0],c=s.useWithBlock,u="var o,e=kendo.htmlEncode;";if(A(t))return 2===t.length?function(n){return t(e,{data:n}).join("")}:t;for(u+=c?"with("+l+"){":"",u+="o=",o=t.replace(M,"__CURLY__").replace(z,"#=e($1)#").replace(B,"}").replace(R,"__SHARP__").split("#"),a=0;as;s++)p[s]=t(s,g)||Dt;return c=0===p.length?"[]":n?"[\n"+n+p.join(",\n"+n)+"\n"+f+"]":"["+p.join(",")+"]",n=f,c}if(r&&typeof r===St)for(u=r.length,s=0;u>s;s++)typeof r[s]===Ct&&(d=r[s],c=t(d,g),c&&p.push(e(d)+(n?": ":":")+c));else for(d in g)Object.hasOwnProperty.call(g,d)&&(c=t(d,g),c&&p.push(e(d)+(n?": ":":")+c));return c=0===p.length?"{}":n?"{\n"+n+p.join(",\n"+n)+"\n"+f+"}":"{"+p.join(",")+"}",n=f,c}}var n,i,r,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l={}.toString;typeof Date.prototype.toJSON!==xt&&(Date.prototype.toJSON=function(){var e=this;return isFinite(e.valueOf())?o(e.getUTCFullYear(),4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),typeof vt.stringify!==xt&&(vt.stringify=function(e,o,a){var s;if(n="",i="",typeof a===Tt)for(s=0;a>s;s+=1)i+=" ";else typeof a===Ct&&(i=a);if(r=o,o&&typeof o!==xt&&(typeof o!==St||typeof o.length!==Tt))throw Error("JSON.stringify");return t("",{"":e})})}(),function(){function e(e){if(e){if(e.numberFormat)return e;if(typeof e===Ct){var t=ct.cultures;return t[e]||t[e.split("-")[0]]||null}return null}return null}function t(t){return t&&(t=e(t)),t||ct.cultures.current}function i(e){e.groupSizes=e.groupSize,e.percent.groupSizes=e.percent.groupSize,e.currency.groupSizes=e.currency.groupSize}function r(e,i,r){r=t(r);var a=r.calendars.standard,s=a.days,l=a.months;return i=a.patterns[i]||i,i.replace(d,function(t){var i;return"d"===t?i=e.getDate():"dd"===t?i=o(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=o(e.getMonth()+1):"MMM"===t?i=l.namesAbbr[e.getMonth()]:"MMMM"===t?i=l.names[e.getMonth()]:"yy"===t?i=o(e.getFullYear()%100):"yyyy"===t?i=o(e.getFullYear(),4):"h"===t?i=e.getHours()%12||12:"hh"===t?i=o(e.getHours()%12||12):"H"===t?i=e.getHours():"HH"===t?i=o(e.getHours()):"m"===t?i=e.getMinutes():"mm"===t?i=o(e.getMinutes()):"s"===t?i=e.getSeconds():"ss"===t?i=o(e.getSeconds()):"f"===t?i=mt.floor(e.getMilliseconds()/100):"ff"===t?i=mt.floor(e.getMilliseconds()/10):"fff"===t?i=e.getMilliseconds():"tt"===t&&(i=e.getHours()<12?a.AM[0]:a.PM[0]),i!==n?i:t.slice(1,t.length-1)})}function a(e,i,r){r=t(r);var o,a,l,d,b,y,w,k,x,C,T,S,D,A,E,P,F,I,z,M,B,R,H,L=r.numberFormat,O=L.groupSize[0],V=L[g],N=L[f],U=L.decimals,W=L.pattern[0],j=[],q=0>e,G=h,Y=h,Q=-1;if(e===n)return h;if(!isFinite(e))return e;if(!i)return r.name.length?e.toLocaleString():""+e;if(b=c.exec(i)){if(i=b[1].toLowerCase(),a="c"===i,l="p"===i,(a||l)&&(L=a?L.currency:L.percent,O=L.groupSize[0],V=L[g],N=L[f],U=L.decimals,o=L.symbol,W=L.pattern[q?0:1]),d=b[2],d&&(U=+d),"e"===i)return d?e.toExponential(U):e.toExponential();if(l&&(e*=100),e=s(e,U),e=e.split(f),y=e[0],w=e[1],q&&(y=y.substring(1)),Y=y,k=y.length,k>=O)for(Y=h,C=0;k>C;C++)C>0&&0===(k-C)%O&&(Y+=V),Y+=y.charAt(C);if(w&&(Y+=N+w),"n"===i&&!q)return Y;for(e=h,C=0,T=W.length;T>C;C++)S=W.charAt(C),e+="n"===S?Y:"$"===S||"%"===S?o:S;return e}if(q&&(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 j.push(n),_})),i=i.split(";"),q&&i[1])i=i[1],A=!0;else if(0===e){if(i=i[2]||i[0],-1==i.indexOf(m)&&-1==i.indexOf(v))return i}else i=i[0];if(M=i.indexOf("%"),B=i.indexOf("$"),l=-1!=M,a=-1!=B,l&&(e*=100),a&&"\\"===i[B-1]&&(i=i.split("\\").join(""),a=!1),(a||l)&&(L=a?L.currency:L.percent,O=L.groupSize[0],V=L[g],N=L[f],U=L.decimals,o=L.symbol),D=i.indexOf(g)>-1,D&&(i=i.replace(p,h)),E=i.indexOf(f),T=i.length,-1!=E?(w=(""+e).split("e"),w=w[1]?s(e,Math.abs(w[1])):w[0],w=w.split(f)[1]||h,F=i.lastIndexOf(v)-E,P=i.lastIndexOf(m)-E,I=F>-1,z=P>-1,C=w.length,I||z||(i=i.substring(0,E)+i.substring(E+1),T=i.length,E=-1,C=0),I&&F>P?C=F:P>F&&(z&&C>P?C=P:I&&F>C&&(C=F)),C>-1&&(e=s(e,C))):e=s(e),P=i.indexOf(m),R=F=i.indexOf(v),Q=-1==P&&-1!=F?F:-1!=P&&-1==F?P:P>F?F:P,P=i.lastIndexOf(m),F=i.lastIndexOf(v),H=-1==P&&-1!=F?F:-1!=P&&-1==F?P:P>F?P:F,Q==T&&(H=Q),-1!=Q){if(Y=(""+e).split(f),y=Y[0],w=Y[1]||h,k=y.length,x=w.length,D)if(k===O&&E-R>k)y=V+y;else if(k>O){for(Y=h,C=0;k>C;C++)C>0&&0===(k-C)%O&&(Y+=V),Y+=y.charAt(C);y=Y}for(e=i.substring(0,Q),q&&!A&&(e+="-"),C=Q;T>C;C++){if(S=i.charAt(C),-1==E){if(k>H-C){e+=y;break}}else if(-1!=F&&C>F&&(G=h),k>=E-C&&E-C>-1&&(e+=y,C=E),E===C){e+=(w?N:h)+w,C+=H-E+1;continue}S===v?(e+=S,G=S):S===m&&(e+=G)}if(H>=Q&&(e+=i.substring(H+1)),a||l){for(Y=h,C=0,T=e.length;T>C;C++)S=e.charAt(C),Y+="$"===S||"%"===S?o:S;e=Y}if(T=j.length)for(C=0;T>C;C++)e=e.replace(_,j[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,h="",f=".",g=",",m="#",v="0",_="??",b="en-US",y={}.toString;ct.cultures["en-US"]={name:b,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"$"}},calendars:{standard:{days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December"],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",F:"dddd, MMMM dd, yyyy h:mm:ss tt",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",m:"MMMM dd",M:"MMMM dd",s:"yyyy'-'MM'-'ddTHH':'mm':'ss",t:"h:mm tt",T:"h:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":"/",":":":",firstDay:0,twoDigitYearMax:2029}}},ct.culture=function(t){var r,o=ct.cultures;return t===n?o.current:(r=e(t)||o[b],r.calendar=r.calendars.standard,o.current=r,zt&&i(r.numberFormat),n)},ct.findCulture=e,ct.getCulture=t,ct.culture(b),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]"===y.call(e))return r(e,t,i);if(typeof e===Tt)return a(e,t,i)}return e!==n?e:""},zt&&(l=ft(zt.format,zt)),ct.format=function(e){var t=arguments;return e.replace(yt,function(e,n,i){var r=t[parseInt(n,10)+1];return l(r,i?i.substring(1):"")})},ct._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},ct._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},ct._round=s,ct.toString=l}(),function(){function t(e,t,n){return!(e>=t&&n>=e)}function i(e){return e.charAt(0)}function r(t){return e.map(t,i)}function o(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}function a(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]=a(e[t]);return n}function l(e,i,a){if(!e)return null;var l,d,c,h,f,m,v,_,b,y,w,k,x,C=function(e){for(var t=0;i[R]===e;)t++,R++;return t>0&&(R-=1),t},T=function(t){var n=g[t]||RegExp("^\\d{1,"+t+"}"),i=e.substr(H,t).match(n);return i?(i=i[0],H+=i.length,parseInt(i,10)):null},S=function(t,n){for(var i,r,o,a=0,s=t.length;s>a;a++)if(i=t[a],r=i.length,o=e.substr(H,r),n&&(o=o.toLowerCase()),o==i)return H+=r,a+1;return null},D=function(){var t=!1;return e.charAt(H)===i[R]&&(H++,t=!0),t},A=a.calendars.standard,E=null,P=null,F=null,I=null,z=null,M=null,B=null,R=0,H=0,L=!1,O=new Date,V=A.twoDigitYearMax||2029,N=O.getFullYear();for(i||(i="d"),h=A.patterns[i],h&&(i=h),i=i.split(""),c=i.length;c>R;R++)if(l=i[R],L)"'"===l?L=!1:D();else if("d"===l){if(d=C("d"),A._lowerDays||(A._lowerDays=s(A.days)),F=3>d?T(2):S(A._lowerDays[3==d?"namesAbbr":"names"],!0),null===F||t(F,1,31))return null}else if("M"===l){if(d=C("M"),A._lowerMonths||(A._lowerMonths=s(A.months)),P=3>d?T(2):S(A._lowerMonths[3==d?"namesAbbr":"names"],!0),null===P||t(P,1,12))return null;P-=1}else if("y"===l){if(d=C("y"),E=T(d),null===E)return null;2==d&&("string"==typeof V&&(V=N+parseInt(V,10)),E=N-N%100+E,E>V&&(E-=100))}else if("h"===l){if(C("h"),I=T(2),12==I&&(I=0),null===I||t(I,0,11))return null}else if("H"===l){if(C("H"),I=T(2),null===I||t(I,0,23))return null}else if("m"===l){if(C("m"),z=T(2),null===z||t(z,0,59))return null}else if("s"===l){if(C("s"),M=T(2),null===M||t(M,0,59))return null}else if("f"===l){if(d=C("f"),B=T(d),null!==B&&d>3&&(B=parseInt((""+B).substring(0,3),10)),null===B||t(B,0,999))return null}else if("t"===l){if(d=C("t"),b=A.AM,y=A.PM,1===d&&(b=r(b),y=r(y)),f=S(y),!f&&!S(b))return null}else if("z"===l){if(m=!0,d=C("z"),"Z"===e.substr(H,1)){if(!v)return null;D();continue}if(_=e.substr(H,6).match(d>2?p:u),!_)return null;if(_=_[0],H=_.length,_=_.split(":"),w=parseInt(_[0],10),t(w,-12,13))return null;if(d>2&&(k=parseInt(_[1],10),isNaN(k)||t(k,0,59)))return null}else if("T"===l)v=D();else if("'"===l)L=!0,D();else if(!D())return null;return x=null!==I||null!==z||M||null,null===E&&null===P&&null===F&&x?(E=N,P=O.getMonth(),F=O.getDate()):(null===E&&(E=N),null===F&&(F=1)),f&&12>I&&(I+=12),m?(w&&(I+=-w),k&&(z+=-k),e=new Date(Date.UTC(E,P,F,I,z,M,B))):(e=new Date(E,P,F,I,z,M,B),o(e,I)),100>E&&e.setFullYear(E),e.getDate()!==F&&m===n?null:e}var d=/\u00A0/g,c=/[eE][\-+]?[0-9]+/,u=/[+|\-]\d{1,2}/,p=/[+|\-]\d{1,2}:\d{2}/,h=/^\/Date\((.*?)\)\/$/,f=["G","g","d","F","D","y","m","T","t"],g={2:/^\d{1,2}/,4:/^\d{4}/},m={}.toString;ct.parseDate=function(e,t,n){if("[object Date]"===m.call(e))return e;var i,r,o=0,a=null;if(e&&0===e.indexOf("/D")&&(a=h.exec(e)))return new Date(parseInt(a[1],10));if(n=ct.getCulture(n),!t){for(t=[],r=n.calendar.patterns,i=f.length;i>o;o++)t[o]=r[f[o]];o=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=ht(t)?t:[t],i=t.length;i>o;o++)if(a=l(e,t[o],n))return a;return a},ct.parseInt=function(e,t){var n=ct.parseFloat(e,t);return n&&(n=0|n),n},ct.parseFloat=function(e,t,n){if(!e&&0!==e)return null;if(typeof e===Tt)return e;e=""+e,t=ct.getCulture(t);var i,r,o=t.numberFormat,a=o.percent,s=o.currency,l=s.symbol,u=a.symbol,p=e.indexOf("-");return c.test(e)?(e=parseFloat(e.replace(o["."],".")),isNaN(e)&&(e=null),e):p>0?null:(p=p>-1,e.indexOf(l)>-1||n&&n.toLowerCase().indexOf("c")>-1?(o=s,i=o.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,o=a,l=u),e=e.replace("-","").replace(l,"").replace(d," ").split(o[","].replace(d," ")).join("").replace(o["."],"."),e=parseFloat(e),isNaN(e)?e=null:p&&(e*=-1),e&&r&&(e/=100),e)},zt&&(ct.parseDate=function(e,t,n){return"[object Date]"===m.call(e)?e:zt.parseDate(e,t,n)},ct.parseFloat=function(e,t){return typeof e===Tt?e:e===n||null===e?null:(e=zt.parseFloat(e,t),isNaN(e)?null:e)})}(),function(){var t,i,r,o,a,s,l;_t.scrollbar=function(){var e,t=document.createElement("div");return t.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both",t.innerHTML=" ",document.body.appendChild(t),e=t.offsetWidth-t.scrollWidth,document.body.removeChild(t),e},_t.isRtl=function(t){return e(t).closest(".k-rtl").length>0},t=document.createElement("table");try{t.innerHTML="",_t.tbodyInnerHtml=!0}catch(c){_t.tbodyInnerHtml=!1}_t.touch="ontouchstart"in window,_t.msPointers=navigator.msPointerEnabled,_t.pointers=navigator.pointerEnabled,i=_t.transitions=!1,r=_t.transforms=!1,o="HTMLElement"in window?HTMLElement.prototype:[],_t.hasHW3D="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix||"MozPerspective"in document.documentElement.style||"msPerspective"in document.documentElement.style,pt(["Moz","webkit","O","ms"],function(){var e,o=""+this,a=typeof t.style[o+"Transition"]===Ct;return a||typeof t.style[o+"Transform"]===Ct?(e=o.toLowerCase(),r={css:"ms"!=e?"-"+e+"-":"",prefix:o,event:"o"===e||"webkit"===e?e:""},a&&(i=r,i.event=i.event?i.event+"TransitionEnd":"transitionend"),!1):n}),_t.transforms=r,_t.transitions=i,_t.devicePixelRatio=window.devicePixelRatio===n?1:window.devicePixelRatio;try{_t.screenWidth=window.outerWidth||window.screen?window.screen.availWidth:window.innerWidth,_t.screenHeight=window.outerHeight||window.screen?window.screen.availHeight:window.innerHeight}catch(c){_t.screenWidth=window.screen.availWidth,_t.screenHeight=window.screen.availHeight}_t.detectOS=function(e){var t,n,i=!1,r=[],o=!/mobile safari/i.test(e),a={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 a)if(a.hasOwnProperty(n)&&(r=e.match(a[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!==Et||typeof window.cordova!==Et,i.android&&(_t.devicePixelRatio<1.5&&i.flatVersion<400||o)&&(_t.screenWidth>800||_t.screenHeight>800)&&(i.tablet=n);break}return i},a=_t.mobileOS=_t.detectOS(navigator.userAgent),_t.wpDevicePixelRatio=a.wp?screen.width/320:0,_t.kineticScrollNeeded=a&&(_t.touch||_t.msPointers||_t.pointers),_t.hasNativeScrolling=!1,(a.ios&&a.majorVersion>4||a.android&&a.majorVersion>2||a.wp)&&(_t.hasNativeScrolling=a),_t.mouseAndTouchPresent=_t.touch&&!(_t.mobileOS.ios||_t.mobileOS.android),_t.detectBrowser=function(e){var t,n=!1,i=[],r={webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(t in 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},_t.browser=_t.detectBrowser(navigator.userAgent),_t.zoomLevel=function(){try{return _t.touch?document.documentElement.clientWidth/window.innerWidth:_t.browser.msie&&_t.browser.version>=10?(top||window).outerWidth/(top||window).innerWidth:1}catch(e){return 1}},_t.cssBorderSpacing=n!==document.documentElement.style.borderSpacing&&!(_t.browser.msie&&_t.browser.version<8),function(t){var n,i=parseInt(t.version,10);t.msie?n="ie":t.mozilla?n="ff":t.safari?n="safari":t.webkit?n="webkit":t.opera&&(n="opera"),n&&e(document.documentElement).addClass("k-"+n+" k-"+n+i)}(_t.browser),_t.eventCapture=document.documentElement.addEventListener,s=document.createElement("input"),_t.placeholder="placeholder"in s,_t.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],n=t.length,i="test",r={},o=0;n>o;o++)e=t[o],s.setAttribute("type",e),s.value=i,r[e.replace("-","")]="text"!==s.type&&s.value!==i;return r}(),_t.stableSort=function(){var e=[0,1,2,3,4,5,6,7,8,9,10,11,12].sort(function(){return 0});return 0===e[0]&&1===e[1]&&2===e[2]&&3===e[3]&&4===e[4]&&5===e[5]&&6===e[6]&&7===e[7]&&8===e[8]&&9===e[9]&&10===e[10]&&11===e[11]&&12===e[12]}(),_t.matchesSelector=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},_t.pushState=window.history&&window.history.pushState,l=document.documentMode,_t.hashChange="onhashchange"in window&&!(_t.browser.msie&&(!l||8>=l))}(),O={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}},V={},e.extend(V,{Element:function(t){this.element=e(t)},promise:function(e,t){e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.hide&&e.data("olddisplay",e.css("display")).hide(),t.init&&t.init(),t.completeCallback&&t.completeCallback(e),e.dequeue()},transitionPromise:function(e,t,n){var i=ct.wrap(e);return i.append(t),e.hide(),t.show(),n.completeCallback&&n.completeCallback(e),e}}),"kendoAnimate"in e.fn||ut(e.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,n,i){return _(this,e,t,n,i)},kendoAnimateTo:function(e,t,n,i,r){return b(this,e,t,n,i,r)},kendoAddClass:function(e,t){return ct.toggleClass(this,e,t,!0)},kendoRemoveClass:function(e,t){return ct.toggleClass(this,e,t,!1)},kendoToggleClass:function(e,t,n){return ct.toggleClass(this,e,t,n)}}),N=/&/g,U=//g,j=function(e){return e.target},_t.touch&&(j=function(e){var t="originalEvent"in e?e.originalEvent.changedTouches:"changedTouches"in e?e.changedTouches:null;return t?document.elementFromPoint(t[0].clientX,t[0].clientY):e.target},pt(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,n){e.fn[n]=function(e){return this.bind(n,e)}})),_t.touch?_t.mobileOS?(_t.mousedown="touchstart",_t.mouseup="touchend",_t.mousemove="touchmove",_t.mousecancel="touchcancel",_t.click="touchend",_t.resize="orientationchange"):(_t.mousedown="mousedown touchstart",_t.mouseup="mouseup touchend",_t.mousemove="mousemove touchmove",_t.mousecancel="mouseleave touchcancel",_t.click="click",_t.resize="resize"):_t.pointers?(_t.mousemove="pointermove",_t.mousedown="pointerdown",_t.mouseup="pointerup",_t.mousecancel="pointercancel",_t.click="pointerup",_t.resize="orientationchange resize"):_t.msPointers?(_t.mousemove="MSPointerMove",_t.mousedown="MSPointerDown",_t.mouseup="MSPointerUp",_t.mousecancel="MSPointerCancel",_t.click="MSPointerUp",_t.resize="orientationchange resize"):(_t.mousemove="mousemove",_t.mousedown="mousedown",_t.mouseup="mouseup",_t.mousecancel="mouseleave",_t.click="click",_t.resize="resize"),q=function(e,t){var n,i,r,o,a=t||"d",s=1;for(i=0,r=e.length;r>i;i++)o=e[i],""!==o&&(n=o.indexOf("["),0!==n&&(-1==n?o="."+o:(s++,o="."+o.substring(0,n)+" || {})"+o.substring(n))),s++,a+=o+(r-1>i?" || {})":")"));return Array(s).join("(")+a},G=/^([a-z]+:)?\/\//i,ut(ct,{ui:ct.ui||{},fx:ct.fx||m,effects:ct.effects||V,mobile:ct.mobile||{},data:ct.data||{},dataviz:ct.dataviz||{ui:{roles:{}}},keys:{INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123},support:ct.support||_t,animate:ct.animate||_,ns:"",attr:function(e){return"data-"+ct.ns+e},wrap:a,deepExtend:s,getComputedStyles:p,size:h,toCamelCase:u,toHyphens:c,getOffset:ct.getOffset||f,parseEffects:ct.parseEffects||g,toggleClass:ct.toggleClass||y,directions:ct.directions||O,Observable:F,Class:i,Template:D,template:ft(D.compile,D),render:ft(D.render,D),stringify:ft(vt.stringify,vt),eventTarget:j,htmlEncode:w,isLocalUrl:function(e){return e&&!G.test(e)},expr:function(e,t,n){return e=e||"",typeof t==Ct&&(n=t,t=!1),n=n||"d",e&&"["!==e.charAt(0)&&(e="."+e),e=t?q(e.split("."),n):n+e},getter:function(e,t){return Pt[e]=Pt[e]||Function("d","return "+ct.expr(e,t))},setter:function(e){return Ft[e]=Ft[e]||Function("d,value",ct.expr(e)+"=value")},accessor:function(e){return{get:ct.getter(e),set:ct.setter(e)}},guid:function(){var e,t,n="";for(e=0;32>e;e++)t=0|16*mt.random(),(8==e||12==e||16==e||20==e)&&(n+="-"),n+=(12==e?4:16==e?8|3&t:t).toString(16);return n},roleSelector:function(e){return e.replace(/(\S+)/g,"["+ct.attr("role")+"=$1],").slice(0,-1)},triggeredByInput:function(e){return/^(label|input|textarea|select)$/i.test(e.target.tagName)},logToConsole:function(e){var t=window.console;n!==t&&t.log&&t.log(e)}}),Y=F.extend({init:function(e,t){var n=this;n.element=ct.jQuery(e).handler(n),F.fn.init.call(n),t=n.options=ut(!0,{},n.options,t),n.element.attr(ct.attr("role"))||n.element.attr(ct.attr("role"),(t.name||"").toLowerCase()),n.element.data("kendo"+t.prefix+t.name,n),n.bind(n.events,t)},events:[],options:{prefix:""},_hasBindingTarget:function(){return!!this.element[0].kendoBindingTarget},_tabindex:function(e){e=e||this.wrapper;var t=this.element,n="tabindex",i=e.attr(n)||t.attr(n);t.removeAttr(n),e.attr(n,isNaN(i)?0:i)},setOptions:function(t){for(var n,i=this,r=0,o=i.events.length;o>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)},resize:function(e){var t=this.getSize(),n=this._size;(e||!n||t.width!==n.width||t.height!==n.height)&&(this._resize(t),this.trigger("resize",t),this._size=t)},getSize:function(){return ct.dimensions(this.element)},size:function(e){return e?(this.setSize(e),n):this.getSize()},setSize:e.noop,_resize:e.noop,destroy:function(){var e=this;e.element.removeData("kendo"+e.options.prefix+e.options.name),e.element.removeData("handler"),e.unbind()}}),ct.dimensions=function(e,t){var n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}},ct.notify=gt,Q=/template$/i,$=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,K=/^\{(\d+)(:[^\}]+)?\}/,X=/([A-Z])/g,ct.initWidget=function(t,i,r){var o,a,s,l,d,c,u,p;if(r?r.roles&&(r=r.roles):r=ct.ui.roles,t=t.nodeType?t:t[0],c=t.getAttribute("data-"+ct.ns+"role"),c&&(s=-1===c.indexOf(".")?r[c]:ct.getter(c)(window))){for(p=k(t,"dataSource"),i=e.extend({},x(t,s.fn.options),i),p&&(i.dataSource=typeof p===Ct?ct.getter(p)(window):p),l=0,d=s.fn.events.length;d>l;l++)a=s.fn.events[l],u=k(t,a),u!==n&&(i[a]=ct.getter(u)(window));return o=e(t).data("kendo"+s.fn.options.prefix+s.fn.options.name),o?o.setOptions(i):o=new s(t,i),o}},ct.rolesFromNamespaces=function(e){var t,n,i=[];for(e[0]||(e=[ct.ui,ct.dataviz.ui]),t=0,n=e.length;n>t;t++)i[t]=e[t].roles;return ut.apply(null,[{}].concat(i.reverse()))},ct.init=function(t){var n=ct.rolesFromNamespaces(It.call(arguments,1));e(t).find("[data-"+ct.ns+"role]").addBack().each(function(){ct.initWidget(this,{},n)})},ct.destroy=function(t){e(t).find("[data-"+ct.ns+"role]").addBack().each(function(){var t=ct.widgetInstance(e(this));t&&t.destroy()})},ct.resize=function(t){e(t).each(function(){var t,n=e(this);(n.is(":visible")||-1!==e.inArray(n.attr("data-role"),["slider","rangeslider"]))&&(n.is("[data-"+ct.ns+"role]")&&(t=ct.widgetInstance(n),t&&t.resize()),ct.resize(n.children()))})},ct.parseOptions=x,ut(ct.ui,{Widget:Y,roles:{},progress:function(t,n){var i,r,o,a,s=t.find(".k-loading-mask"),l=ct.support,d=l.browser;n?s.length||(i=l.isRtl(t),r=i?"right":"left",a=t.scrollLeft(),o=d.webkit?i?t[0].scrollWidth-t.width()-2*a:0:0,s=e("
Loading...
").width("100%").height("100%").css("top",t.scrollTop()).css(r,Math.abs(a)+o).prependTo(t)):s&&s.remove()},plugin:function(t,i,r){var o,a=t.fn.options.name;i=i||ct.ui,r=r||"",i[a]=t,i.roles[a.toLowerCase()]=t,o="getKendo"+r+a,a="kendo"+r+a,e.fn[a]=function(i){var r,o=this;return typeof i===Ct?(r=It.call(arguments,1),this.each(function(){var t,s,l=e.data(this,a);if(!l)throw Error(ct.format("Cannot call method '{0}' of {1} before it is initialized",i,a));if(t=l[i],typeof t!==xt)throw Error(ct.format("Cannot find method '{0}' of {1}",i,a)); return s=t.apply(l,r),s!==n?(o=s,!1):n})):this.each(function(){new t(this,i)}),o},e.fn[o]=function(){return this.data(a)}}}),Z={bind:function(){return this}},J=Y.extend({init:function(e,t){Y.fn.init.call(this,e,t),this.element.autoApplyNS(),this.wrapper=this.element,this.element.addClass("km-widget")},destroy:function(){Y.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var e=this.element.closest(ct.roleSelector("view splitview modalview drawer"));return ct.widgetInstance(e,ct.mobile.ui)},container:function(){var e=this.element.closest(ct.roleSelector("view layout modalview drawer"));return ct.widgetInstance(e,ct.mobile.ui)||Z}}),ut(ct.mobile,{init:function(e){ct.init(e,ct.mobile.ui,ct.ui,ct.dataviz.ui)},ui:{Widget:J,roles:{},plugin:function(e){ct.ui.plugin(e,ct.mobile.ui,"Mobile")}}}),ct.touchScroller=function(t,n){return e(t).map(function(t,i){return i=e(i),_t.kineticScrollNeeded&&ct.mobile.ui.Scroller&&!i.data("kendoMobileScroller")?(i.kendoMobileScroller(n),i.data("kendoMobileScroller")):!1})[0]},ct.preventDefault=function(e){e.preventDefault()},ct.widgetInstance=function(t,i){var r,o=t.data(ct.ns+"role");return"content"===o&&(o="scroller"),i||(i={roles:e.extend({},ct.mobile.ui.roles,ct.dataviz.ui.roles,ct.ui.roles)}),r=i.roles[o],r?t.data("kendo"+r.fn.options.prefix+r.fn.options.name):n},ct.onResize=function(t){var n=t;return _t.mobileOS.android&&(n=function(){setTimeout(t,600)}),e(window).on(_t.resize,n),n},ct.unbindResize=function(t){e(window).off(_t.resize,t)},ct.attrValue=function(e,t){return e.data(ct.ns+t)},ct.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},e.extend(e.expr[":"],{kendoFocusable:function(t){var n=e.attr(t,"tabindex");return C(t,!isNaN(n)&&n>-1)}}),et=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],tt="label, input, [data-rel=external]",nt={setupMouseMute:function(){var t,n=0,i=et.length,r=document.documentElement;if(!nt.mouseTrap&&_t.eventCapture)for(nt.mouseTrap=!0,nt.bustClick=!1,nt.captureMouse=!1,t=function(t){nt.captureMouse&&("click"===t.type?nt.bustClick&&!e(t.target).is(tt)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};i>n;n++)r.addEventListener(et[n],t,!0)},muteMouse:function(e){nt.captureMouse=!0,e.data.bustClick&&(nt.bustClick=!0),clearTimeout(nt.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(nt.mouseTrapTimeoutID),nt.mouseTrapTimeoutID=setTimeout(function(){nt.captureMouse=!1,nt.bustClick=!1},400)}},it={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},_t.touch&&(_t.mobileOS.ios||_t.mobileOS.android)?it={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:_t.pointers?it={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:_t.msPointers&&(it={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),!_t.msPointers||"onmspointerenter"in window||e.each({MSPointerEnter:"MSPointerOver",MSPointerLeave:"MSPointerOut"},function(t,n){e.event.special[t]={delegateType:n,bindType:n,handle:function(t){var i,r=this,o=t.relatedTarget,a=t.handleObj;return(!o||o!==r&&!e.contains(r,o))&&(t.type=a.origType,i=a.handler.apply(this,arguments),t.type=n),i}}}),rt=function(e){return it[e]||e},ot=/([^ ]+)/g,ct.applyEventMap=function(e,t){return e=e.replace(ot,rt),t&&(e=e.replace(ot,"$1."+t)),e},at=e.fn.on,ut(!0,S,e),S.fn=S.prototype=new e,S.fn.constructor=S,S.fn.init=function(t,n){return n&&n instanceof e&&!(n instanceof S)&&(n=S(n)),e.fn.init.call(this,t,n,st)},S.fn.init.prototype=S.fn,st=S(document),ut(S.fn,{handler:function(e){return this.data("handler",e),this},autoApplyNS:function(e){return this.data("kendoNS",e||ct.guid()),this},on:function(){var e,t,n,i,r,o,a=this,s=a.data("kendoNS");return 1===arguments.length?at.call(a,arguments[0]):(e=a,t=It.call(arguments),typeof t[t.length-1]===Et&&t.pop(),n=t[t.length-1],i=ct.applyEventMap(t[0],s),_t.mouseAndTouchPresent&&i.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(nt.setupMouseMute(),r=2===t.length?null:t[1],o=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,at.call(this,{touchstart:nt.muteMouse,touchend:nt.unMuteMouse},r,{bustClick:o})),typeof n===Ct&&(e=a.data("handler"),n=e[n],t[t.length-1]=function(t){n.call(e,t)}),t[0]=i,at.apply(a,t),a)},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),ct.jQuery=S,ct.eventMap=it,ct.timezone=function(){function e(e,t){var n,i,r,o=t[3],a=t[4],s=t[5],l=t[8];return l||(t[8]=l={}),l[e]?l[e]:(isNaN(a)?0===a.indexOf("last")?(n=new Date(Date.UTC(e,c[o]+1,1,s[0]-24,s[1],s[2],0)),i=u[a.substr(4,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r-(i>r?7:0))):a.indexOf(">=")>=0&&(n=new Date(Date.UTC(e,c[o],a.substr(5),s[0],s[1],s[2],0)),i=u[a.substr(0,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r+(r>i?7:0))):n=new Date(Date.UTC(e,c[o],a,s[0],s[1],s[2],0)),l[e]=n)}function t(t,n,i){var r,o,a;return(n=n[i])?(a=new Date(t).getUTCFullYear(),n=jQuery.grep(n,function(e){var t=e[0],n=e[1];return a>=t&&(n>=a||t==a&&"only"==n||"max"==n)}),n.push(t),n.sort(function(t,n){return"number"!=typeof t&&(t=Number(e(a,t))),"number"!=typeof n&&(n=Number(e(a,n))),t-n}),n[jQuery.inArray(t,n)-1]):(r=i.split(":"),o=0,r.length>1&&(o=60*r[0]+Number(r[1])),[-1e6,"max","-","Jan",1,[0,0,0],o,"-"])}function n(e,t,n){var i,r,o,a=t[n];if("string"==typeof a&&(a=t[a]),!a)throw Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(i=a.length-1;i>=0&&(r=a[i][3],!(r&&e>r));i--);if(o=a[i+1],!o)throw Error('Timezone "'+n+'" not found on '+e+".");return o}function i(e,i,r,o){typeof e!=Tt&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var a=n(e,i,o);return{zone:a,rule:t(e,r,a[1])}}function r(e,t){var n,r,o;return"Etc/UTC"==t||"Etc/GMT"==t?0:(n=i(e,this.zones,this.rules,t),r=n.zone,o=n.rule,o?r[0]-o[6]:r[0])}function o(e,t){var n=i(e,this.zones,this.rules,t),r=n.zone,o=n.rule,a=r[2];return a.indexOf("/")>=0?a.split("/")[o&&o[6]?1:0]:a.indexOf("%s")>=0?a.replace("%s",o&&"-"!=o[7]?o[7]:""):a}function a(e,t,n){var i,r;return typeof t==Ct&&(t=this.offset(e,t)),typeof n==Ct&&(n=this.offset(e,n)),i=e.getTimezoneOffset(),e=new Date(e.getTime()+6e4*(t-n)),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())}function d(e){return this.apply(new Date(e),"Etc/UTC")}var c={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},u={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};return{zones:{},rules:{},offset:r,convert:a,apply:s,remove:l,abbr:o,toLocalDate:d}}(),ct.date=function(){function e(e,t){return 0===t&&23===e.getHours()?(e.setHours(e.getHours()+2),!0):!1}function t(t,n,i){var 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 o(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function a(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function s(e){return e.getTime()-o(e)}function l(e,t,n){var i,r=s(t),o=s(n);return e&&r!=o?(t>=n&&(n+=m),i=s(e),r>i&&(i+=m),r>o&&(o+=m),i>=r&&o>=i):!0}function d(e,t,n){var i,r=t.getTime(),o=n.getTime();return r>=o&&(o+=m),i=e.getTime(),i>=r&&o>=i}function c(t,n){var i=t.getHours();return t=new Date(t),u(t,n*m),e(t,i),t}function u(e,t,n){var i,r=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-r,e.setTime(e.getTime()+i*g))}function p(){return o(new Date)}function h(e){return o(e).getTime()==p().getTime()}function f(e){var t=new Date(1980,1,1,0,0,0);return e&&t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}var g=6e4,m=864e5;return{adjustDST:e,dayOfWeek:n,setDayOfWeek:t,getDate:o,isInDateRange:d,isInTimeRange:l,isToday:h,nextDay:function(e){return c(e,1)},previousDay:function(e){return c(e,-1)},toUtcTime:a,MS_PER_DAY:m,MS_PER_MINUTE:g,setTime:u,addDays:c,today:p,toInvariantTime:f,firstDayOfMonth:i,lastDayOfMonth:r,getMilliseconds:s}}(),ct.stripWhitespace=function(e){for(var t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,function(t){return t.parentNode==e?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);t.nextNode();)t.referenceNode&&!t.referenceNode.textContent.trim()&&t.referenceNode.parentNode.removeChild(t.referenceNode)},lt=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},ct.animationFrame=function(e){lt.call(window,e)},dt=[],ct.queueAnimation=function(e){dt[dt.length]=e,1===dt.length&&ct.runNextAnimation()},ct.runNextAnimation=function(){var e=dt.shift();ct.animationFrame(function(){e(),lt[0]&&ct.runNextAnimation()})},ct.parseQueryStringParams=function(e){for(var t=e.split("?")[1]||"",n={},i=t.split(/&|=/),r=i.length,o=0;r>o;o+=2)""!==i[o]&&(n[decodeURIComponent(i[o])]=decodeURIComponent(i[o+1]));return n}}(jQuery,eval),"undefined"==typeof kendo_module&&(kendo_module=function(){}),function(e){function t(e,t){if(!t)return e;e+"/"===t&&(e=t);var n=RegExp("^"+t,"i");return n.test(e)||(e=t+"/"+e),s.protocol+"//"+(s.host+"/"+e).replace(/\/\/+/g,"/")}function n(e,t){return 0===t.indexOf(e)?t.substr(e.length).replace(/\/\//g,"/"):e}var i=window.kendo,r="change",o="back",a=i.support,s=window.location,l=window.history,d=50,c=/^#*/,u=window.document,p=i.Class.extend({init:function(e){this.root=e},navigate:function(e){return l.pushState({},u.title,t(e,this.root)),this.current()},current:function(){var e=s.pathname;return s.search&&(e+=s.search),n(this.root,e)},change:function(t){e(window).bind("popstate.kendo",t)},stop:function(){e(window).unbind("popstate.kendo")}}),h=i.Class.extend({navigate:function(e){return s.hash=e,e},change:function(t){a.hashChange?e(window).bind("hashchange.kendo",t):this._interval=setInterval(t,d)},stop:function(){e(window).unbind("popstate.kendo"),clearInterval(this._interval)},current:function(){return s.hash.replace(c,"")}}),f=i.Observable.extend({start:function(i){var d,f,g,m,v,_;if(i=i||{},this.bind([r,o],i),!this._started){if(this._started=!0,d=s.pathname,f=s.hash,g=a.pushState&&i.pushState,m=i.root||"/",v=m===d,this.adapter=g?new p(m):new h,i.pushState&&!a.pushState&&!v)return s.replace(m+"#"+n(m,d)),!0;g&&(m===d+"/"&&(_=m),v&&f&&(_=t(f.replace(c,""),m)),_&&l.replaceState({},u.title,_)),this.root=m,this.current=this.adapter.current(),this.locations=[this.current],this.adapter.change(e.proxy(this,"_checkUrl"))}},stop:function(){this._started&&(this.adapter.stop(),this.unbind(r),this._started=!1)},change:function(e){this.bind(r,e)},navigate:function(e,t){return"#:back"===e?(l.back(),undefined):(e=e.replace(c,""),this.current!==e&&this.current!==decodeURIComponent(e)&&(t||!this.trigger(r,{url:e}))&&(this.current=this.adapter.navigate(e),this.locations.push(this.current)),undefined)},_checkUrl:function(){var e=this.adapter.current(),t=e===this.locations[this.locations.length-2],n=this.current;if(this.current!==e&&this.current!==decodeURIComponent(e))return this.current=e,t&&this.trigger("back",{url:n,to:e})?(l.forward(),this.current=n,undefined):this.trigger(r,{url:e})?(t?l.forward():l.back(),this.current=n,undefined):(t?this.locations.pop():this.locations.push(e),undefined)}});i.absoluteURL=t,i.history=new f}(window.kendo.jQuery),function(){function e(e,t){return t?e:"([^/]+)"}function t(t){return RegExp("^"+t.replace(h,"\\$&").replace(c,"(?:$1)?").replace(u,e).replace(p,"(.*?)")+"$")}function n(e){return e.replace(/(\?.*)|(#.*)/g,"")}var i=window.kendo,r=i.history,o=i.Observable,a="init",s="routeMissing",l="change",d="back",c=/\((.*?)\)/g,u=/(\(\?)?:\w+/g,p=/\*\w+/g,h=/[\-{}\[\]+?.,\\\^$|#\s]/g,f=i.Class.extend({init:function(e,n){e instanceof RegExp||(e=t(e)),this.route=e,this._callback=n},callback:function(e){var t,r,o=0,a=i.parseQueryStringParams(e);for(e=n(e),t=this.route.exec(e).slice(1),r=t.length;r>o;o++)void 0!==t[o]&&(t[o]=decodeURIComponent(t[o]));t.push(a),this._callback.apply(null,t)},worksWith:function(e){return this.route.test(e)?(this.callback(e),!0):!1}}),g=o.extend({init:function(e){o.fn.init.call(this),this.routes=[],this.pushState=e?e.pushState:!1,e&&e.root&&(this.root=e.root),this.bind([a,s,l],e)},destroy:function(){r.unbind(l,this._urlChangedProxy),r.unbind(d,this._backProxy),this.unbind()},start:function(){var e,t=this,n=function(e){t._back(e)},i=function(e){t._urlChanged(e)};r.start({change:i,back:n,pushState:t.pushState,root:t.root}),e={url:r.current||"/"},t.trigger(a,e)||t._urlChanged(e),this._urlChangedProxy=i,this._backProxy=n},route:function(e,t){this.routes.push(new f(e,t))},navigate:function(e,t){i.history.navigate(e,t)},_back:function(e){this.trigger(d,{url:e.url,to:e.to})&&e.preventDefault()},_urlChanged:function(e){var t,n,r,o,a=e.url;if(a||(a="/"),this.trigger(l,{url:e.url,params:i.parseQueryStringParams(e.url)}))return e.preventDefault(),void 0;for(n=0,r=this.routes,o=r.length;o>n;n++)if(t=r[n],t.worksWith(a))return;this.trigger(s,{url:a,params:i.parseQueryStringParams(a)})&&e.preventDefault()}});i.Router=g}(),function(e){var t=window.kendo,n=t.Observable,i="SCRIPT",r="init",o="show",a="hide",s=/unrecognized expression/,l=n.extend({init:function(e,t){var i=this;t=t||{},n.fn.init.call(i),i.content=e,i.tagName=t.tagName||"div",i.model=t.model,i._wrap=t.wrap!==!1,i.bind([r,o,a],t)},render:function(n){var i=this,a=!i.element;return a&&(i.element=i._createElement()),n&&e(n).append(i.element),a&&(t.bind(i.element,i.model),i.trigger(r)),n&&i.trigger(o),i.element},hide:function(){this.element.detach(),this.trigger(a)},destroy:function(){var e=this.element;e&&(t.unbind(e),t.destroy(e),e.remove())},_createElement:function(){var t,n,r=this;try{n=e(document.getElementById(r.content)||r.content)}catch(o){s.test(o.message)&&(n=r.content)}return t=e("<"+r.tagName+" />").append(n[0].tagName===i?n.html():n),r._wrap||(t=t.contents()),t}}),d=l.extend({init:function(e,t){l.fn.init.call(this,e,t),this.regions={}},showIn:function(e,t){var n=this.regions[e];n&&n.hide(),t.render(this.render().find(e),n),this.regions[e]=t}});t.Layout=d,t.View=l}(window.kendo.jQuery),function(e,t){function n(e){return parseInt(e,10)}function i(e,t){return n(e.css(t))}function 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=x.parseEffects(t),ut&&"tile:left"==t&&(e.previousDivisor=3),e}function o(e){var t,n=[];for(t in e)n.push(t);return n}function a(e){for(var t in e)-1!=N.indexOf(t)&&-1==U.indexOf(t)&&delete e[t];return e}function s(e,t){var n,i,r,o,a=[],s={};for(i in t)n=i.toLowerCase(),o=P&&-1!=N.indexOf(n),!A.hasHW3D&&o&&-1==U.indexOf(n)?delete t[i]:(r=t[i],o?a.push(i+"("+r+")"):s[i]=r);return a.length&&(s[at]=a.join(" ")),s}function l(e,t){var i,r,o;return P?(i=e.css(at),i==Q?"scale"==t?1:0:(r=i.match(RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),o=0,r?o=n(r[1]):(r=i.match(B)||[0,0,0,0,0],t=t.toLowerCase(),H.test(t)?o=parseFloat(r[3]/r[2]):"translatey"==t?o=parseFloat(r[4]/r[2]):"scale"==t?o=parseFloat(r[2]):"rotate"==t&&(o=parseFloat(Math.atan2(r[2],r[1])))),o)):parseFloat(e.css(t))}function d(e){return e.charAt(0).toUpperCase()+e.substring(1)}function c(e,t){var n=g.extend(t),i=n.prototype.directions;C[d(e)]=n,C.Element.prototype[e]=function(e,t,i,r){return new n(this.element,e,t,i,r)},T(i,function(t,i){C.Element.prototype[e+d(i)]=function(e,t,r){return new n(this.element,i,e,t,r)}})}function u(e,n,i,r){c(e,{directions:v,startValue:function(e){return this._startValue=e,this},endValue:function(e){return this._endValue=e,this},shouldHide:function(){return this._shouldHide},prepare:function(e,o){var a,s,l=this,d="out"===this._direction,c=l.element.data(n),u=!(isNaN(c)||c==i);a=u?c:t!==this._startValue?this._startValue:d?i:r,s=t!==this._endValue?this._endValue:d?r:i,this._reverse?(e[n]=s,o[n]=a):(e[n]=a,o[n]=s),l._shouldHide=o[n]===r}})}function p(e,t){var n=x.directions[t].vertical,i=e[n?X:K]()/2+"px";return b[t].replace("$size",i)}var h,f,g,m,v,_,b,y,w,k,x=window.kendo,C=x.effects,T=e.each,S=e.extend,D=e.proxy,A=x.support,E=A.browser,P=A.transforms,F=A.transitions,I={scale:0,scalex:0,scaley:0,scale3d:0},z={translate:0,translatex:0,translatey:0,translate3d:0},M=t!==document.documentElement.style.zoom&&!P,B=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,R=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,H=/translatex?$/i,L=/(zoom|fade|expand)(\w+)/,O=/(zoom|fade|expand)/,V=/[xy]$/i,N=["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"],W={rotate:"deg",scale:"",skew:"px",translate:"px"},j=P.css,q=Math.round,G="",Y="px",Q="none",$="auto",K="width",X="height",Z="hidden",J="origin",et="abortId",tt="overflow",nt="translate",it="position",rt="completeCallback",ot=j+"transition",at=j+"transform",st=j+"backface-visibility",lt=j+"perspective",dt="1500px",ct="perspective("+dt+")",ut=A.mobileOS&&7==A.mobileOS.majorVersion,pt={left:{reverse:"right",property:"left",transition:"translatex",vertical:!1,modifier:-1},right:{reverse:"left",property:"left",transition:"translatex",vertical:!1,modifier:1},down:{reverse:"up",property:"top",transition:"translatey",vertical:!0,modifier:1},up:{reverse:"down",property:"top",transition:"translatey",vertical:!0,modifier:-1},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out",modifier:-1},out:{reverse:"in",modifier:1},vertical:{reverse:"vertical"},horizontal:{reverse:"horizontal"}};x.directions=pt,S(e.fn,{kendoStop:function(e,t){return F?C.stopQueue(this,e||!1,t||!1):this.stop(e,t)}}),P&&!F&&(T(U,function(n,i){e.fn[i]=function(n){if(t===n)return l(this,i);var r=e(this)[0],o=i+"("+n+W[i.replace(V,"")]+")";return-1==r.style.cssText.indexOf(at)?e(this).css(at,o):r.style.cssText=r.style.cssText.replace(RegExp(i+"\\(.*?\\)","i"),o),this},e.fx.step[i]=function(t){e(t.elem)[i](t.now)}}),h=e.fx.prototype.cur,e.fx.prototype.cur=function(){return-1!=U.indexOf(this.prop)?parseFloat(e(this.elem)[this.prop]()):h.apply(this,arguments)}),x.toggleClass=function(e,t,n,i){return t&&(t=t.split(" "),F&&(n=S({exclusive:"all",duration:400,ease:"ease-out"},n),e.css(ot,n.exclusive+" "+n.duration+"ms "+n.ease),setTimeout(function(){e.css(ot,"").css(X)},n.duration)),T(t,function(t,n){e.toggleClass(n,i)})),e},x.parseEffects=function(e,t){var n={};return"string"==typeof e?T(e.split(" "),function(e,i){var r=!O.test(i),o=i.replace(L,function(e,t,n){return t+":"+n.toLowerCase()}),a=o.split(":"),s=a[1],l={};a.length>1&&(l.direction=t&&r?pt[s].reverse:s),n[a[0]]=l}):T(e,function(e){var i=this.direction;i&&t&&!O.test(e)&&(this.direction=pt[i].reverse),n[e]=this}),n},F&&S(C,{transition:function(t,n,i){var r,a,l,d,c=0,u=t.data("keys")||[];i=S({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,d=function(){l||(l=!0,a&&(clearTimeout(a),a=null),t.removeData(et).dequeue().css(ot,"").css(ot),i.complete.call(t))},i.duration=e.fx?e.fx.speeds[i.duration]||i.duration:i.duration,r=s(t,n),e.merge(u,o(r)),t.data("keys",e.unique(u)).height(),t.css(ot,i.exclusive+" "+i.duration+"ms "+i.ease).css(ot),t.css(r).css(at),F.event&&(t.one(F.event,d),0!==i.duration&&(c=500)),a=setTimeout(d,i.duration+c),t.data(et,a),t.data(rt,d)},stopQueue:function(e,t,n){var i,r=e.data("keys"),o=!n&&r,a=e.data(rt);return o&&(i=x.getComputedStyles(e[0],r)),a&&a(),o&&e.css(i),e.removeData("keys").stop(t)}}),f=x.Class.extend({init:function(e,t){var n=this;n.element=e,n.effects=[],n.options=t,n.restore=[]},run:function(t){var n,i,r,o,l,d,c,u=this,p=t.length,h=u.element,f=u.options,g=e.Deferred(),m={},v={};for(u.effects=t,g.then(e.proxy(u,"complete")),h.data("animating",!0),i=0;p>i;i++)for(n=t[i],n.setReverse(f.reverse),n.setOptions(f),u.addRestoreProperties(n.restore),n.prepare(m,v),l=n.children(),r=0,d=l.length;d>r;r++)l[r].duration(f.duration).run();for(c in f.effects)S(v,f.effects[c].properties);for(h.is(":visible")||S(m,{display:h.data("olddisplay")||"block"}),P&&!f.reset&&(o=h.data("targetTransform"),o&&(m=S(o,m))),m=s(h,m),P&&!F&&(m=a(m)),h.css(m).css(at),i=0;p>i;i++)t[i].setup();return f.init&&f.init(),h.data("targetTransform",v),C.animate(h,v,S({},f,{complete:g.resolve})),g.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,o=t.effects,a=o.length;for(i.removeData("animating").dequeue(),r.hide&&i.data("olddisplay",i.css("display")).hide(),this.restoreCallback(),M&&!P&&setTimeout(e.proxy(this,"restoreCallback"),0);a>n;n++)o[n].teardown();r.completeCallback&&r.completeCallback(i)}}),C.promise=function(e,t){var n,i,r,o=[],a=new f(e,t),s=x.parseEffects(t.effects);t.effects=s;for(r in s)n=C[d(r)],n&&(i=new n(e,s[r].direction),o.push(i));o[0]?a.run(o):(e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.init&&t.init(),e.dequeue(),a.complete())},C.transitionPromise=function(e,t,n){return C.animateTo(e,t,n),e},S(C,{animate:function(n,r,o){var s=o.transition!==!1;delete o.transition,F&&"transition"in C&&s?C.transition(n,r,o):P?n.animate(a(r),{queue:!1,show:!1,hide:!1,duration:o.duration,complete:o.complete}):n.each(function(){var n=e(this),a={};T(N,function(e,o){var s,l,d,c,u,p,h,f=r?r[o]+" ":null;f&&(l=r,o in I&&r[o]!==t?(s=f.match(R),P&&S(l,{scale:+s[0]})):o in z&&r[o]!==t&&(d=n.css(it),c="absolute"==d||"fixed"==d,n.data(nt)||(c?n.data(nt,{top:i(n,"top")||0,left:i(n,"left")||0,bottom:i(n,"bottom"),right:i(n,"right")}):n.data(nt,{top:i(n,"marginTop")||0,left:i(n,"marginLeft")||0})),u=n.data(nt),s=f.match(R),s&&(p=o==nt+"y"?0:+s[1],h=o==nt+"y"?+s[1]:+s[2],c?(isNaN(u.right)?isNaN(p)||S(l,{left:u.left+p}):isNaN(p)||S(l,{right:u.right-p}),isNaN(u.bottom)?isNaN(h)||S(l,{top:u.top+h}):isNaN(h)||S(l,{bottom:u.bottom-h})):(isNaN(p)||S(l,{marginLeft:u.left+p}),isNaN(h)||S(l,{marginTop:u.top+h})))),!P&&"scale"!=o&&o in l&&delete l[o],l&&S(a,l))}),E.msie&&delete a.scale,n.animate(a,{queue:!1,show:!1,hide:!1,duration:o.duration,complete:o.complete})})},animateTo:function(t,n,i){function o(e){n[0].style.cssText="",t.each(function(){this.style.cssText=""}),A.mobileOS.android||d.css(tt,s),u||c.css(it,l),i.completeCallback&&i.completeCallback.call(t,e)}var a,s,l,d=t.parents().filter(n.parents()).first(),c=e().add(t.parent()).add(n.parent()),u="absolute"==t.css(it);u||(l=c.css(it),c.css(it,"absolute")),i=r(i),A.mobileOS.android||(s=d.css(tt),d.css(tt,"hidden")),e.each(i.effects,function(e,t){a=a||t.direction}),i.complete=E.msie?function(){setTimeout(o,0)}:o,i.previous=i.reverse?n:t,i.reset=!0,(i.reverse?t:n).each(function(){e(this).kendoAnimate(S(!0,{},i)),i.complete=null,i.previous=null})}}),g=x.Class.extend({init:function(e,t){var n=this;n.element=e,n._direction=t,n.options={},n._additionalEffects=[],n.restore||(n.restore=[])},reverse:function(){return this._reverse=!0,this.run()},play:function(){return this._reverse=!1,this.run()},add:function(e){return this._additionalEffects.push(e),this},direction:function(e){return this._direction=e,this},duration:function(e){return this._duration=e,this},compositeRun:function(){var e=this,t=new f(e.element,{reverse:e._reverse,duration:e._duration}),n=e._additionalEffects.concat([e]);return t.run(n)},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n,i=this,r=i.element,o=0,l=i.restore,d=l.length,c=e.Deferred(),u={},p={},h=i.children(),f=h.length;for(c.then(e.proxy(i,"_complete")),r.data("animating",!0),o=0;d>o;o++)t=l[o],r.data(t)||r.data(t,r.css(t));for(o=0;f>o;o++)h[o].duration(i._duration).run();return i.prepare(u,p),r.is(":visible")||S(u,{display:r.data("olddisplay")||"block"}),P&&(n=r.data("targetTransform"),n&&(u=S(n,u))),u=s(r,u),P&&!F&&(u=a(u)),r.css(u).css(at),i.setup(),r.data("targetTransform",p),C.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(),M&&!P&&setTimeout(e.proxy(t,"restoreCallback"),0),t.teardown()},setOptions:function(e){S(!0,this.options,e)},children:function(){return[]},shouldHide:e.noop,setup:e.noop,prepare:e.noop,teardown:e.noop,directions:[],setReverse:function(e){return this._reverse=e,this}}),m=["left","right","up","down"],v=["in","out"],c("slideIn",{directions:m,divisor:function(e){return this.options.divisor=e,this},prepare:function(e,t){var n,i=this,r=i.element,o=pt[i._direction],a=-o.modifier*(o.vertical?r.outerHeight():r.outerWidth()),s=a/(i.options&&i.options.divisor||1)+Y,l="0px";i._reverse&&(n=e,e=t,t=n),P?(e[o.transition]=s,t[o.transition]=l):(e[o.property]=s,t[o.property]=l)}}),c("tile",{directions:m,init:function(e,t,n){g.prototype.init.call(this,e,t),this.options={previous:n}},previousDivisor:function(e){return this.options.previousDivisor=e,this},children:function(){var e=this,t=e._reverse,n=e.options.previous,i=e.options.previousDivisor||1,r=e._direction,o=[x.fx(e.element).slideIn(r).setReverse(t)];return n&&o.push(x.fx(n).slideIn(pt[r].reverse).divisor(i).setReverse(!t)),o}}),u("fade","opacity",1,0),u("zoom","scale",1,.01),c("slideMargin",{prepare:function(e,t){var n,i=this,r=i.element,o=i.options,a=r.data(J),s=o.offset,l=i._reverse;l||null!==a||r.data(J,parseFloat(r.css("margin-"+o.axis))),n=r.data(J)||0,t["margin-"+o.axis]=l?n:n+s}}),c("slideTo",{prepare:function(e,t){var n=this,i=n.element,r=n.options,o=r.offset.split(","),a=n._reverse;P?(t.translatex=a?0:o[0],t.translatey=a?0:o[1]):(t.left=a?0:o[0],t.top=a?0:o[1]),i.css("left")}}),c("expand",{directions:["horizontal","vertical"],restore:[tt],prepare:function(e,n){var i=this,r=i.element,o=i.options,a=i._reverse,s="vertical"===i._direction?X:K,l=r[0].style[s],d=r.data(s),c=parseFloat(d||l),u=q(r.css(s,$)[s]());e.overflow=Z,c=o&&o.reset?u||c:c||u,n[s]=(a?0:c)+Y,e[s]=(a?c:0)+Y,d===t&&r.data(s,l)},shouldHide:function(){return this._reverse},teardown:function(){var e=this,t=e.element,n="vertical"===e._direction?X:K,i=t.data(n);(i==$||i===G)&&setTimeout(function(){t.css(n,$).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,o,a,s,d,c,u,p,h,f,g,m=this,v=m.element,b=m.options,y=m._reverse,w=b.target,k=l(v,"scale"),x=w.offset(),C=w.outerHeight()/v.outerHeight();S(e,_),t.scale=1,v.css(at,"scale(1)").css(at),n=v.offset(),v.css(at,"scale("+k+")"),i=0,r=0,o=x.left-n.left,a=x.top-n.top,s=i+v.outerWidth(),d=r,c=o+w.outerWidth(),u=a,p=(a-r)/(o-i),h=(u-d)/(c-s),f=(r-d-p*i+h*s)/(h-p),g=r+p*(f-i),e.top=n.top,e.left=n.left,e.transformOrigin=f+Y+" "+g+Y,y?e.scale=C:t.scale=C}}),b={top:"rect(auto auto $size auto)",bottom:"rect($size auto auto auto)",left:"rect(auto $size auto auto)",right:"rect(auto auto auto $size)"},y={top:{start:"rotatex(0deg)",end:"rotatex(180deg)"},bottom:{start:"rotatex(-180deg)",end:"rotatex(0deg)"},left:{start:"rotatey(0deg)",end:"rotatey(-180deg)"},right:{start:"rotatey(180deg)",end:"rotatey(0deg)"}},c("turningPage",{directions:m,init:function(e,t,n){g.prototype.init.call(this,e,t),this._container=n},prepare:function(e,t){var n=this,i=n._reverse,r=i?pt[n._direction].reverse:n._direction,o=y[r];e.zIndex=1,n._clipInHalf&&(e.clip=p(n._container,x.directions[r].reverse)),e[st]=Z,t[at]=ct+(i?o.start:o.end),e[at]=ct+(i?o.end:o.start)},setup:function(){this._container.append(this.element)},face:function(e){return this._face=e,this},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},clipInHalf:function(e){return this._clipInHalf=e,this},temporary:function(){return this.element.addClass("temp-page"),this}}),c("staticPage",{directions:m,init:function(e,t,n){g.prototype.init.call(this,e,t),this._container=n},restore:["clip"],prepare:function(e,t){var n=this,i=n._reverse?pt[n._direction].reverse:n._direction;e.clip=p(n._container,i),e.opacity=.999,t.opacity=1},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},face:function(e){return this._face=e,this}}),c("pageturn",{directions:["horizontal","vertical"],init:function(e,t,n,i){g.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=x.directions[i].reverse,o=t._reverse,a=n.face.clone(!0).removeAttr("id"),s=n.back.clone(!0).removeAttr("id"),l=t.element;return o&&(e=i,i=r,r=e),[x.fx(n.face).staticPage(i,l).face(!0).setReverse(o),x.fx(n.back).staticPage(r,l).setReverse(o),x.fx(a).turningPage(i,l).face(!0).clipInHalf(!0).temporary().setReverse(o),x.fx(s).turningPage(r,l).clipInHalf(!0).temporary().setReverse(o)]},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){g.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=x.directions[i].reverse,o=t._reverse,a=t.element;return o&&(e=i,i=r,r=e),[x.fx(n.face).turningPage(i,a).face(!0).setReverse(o),x.fx(n.back).turningPage(r,a).setReverse(o)]},prepare:function(e){e[lt]=dt,e.transformStyle="preserve-3d"}}),w=x.Class.extend({init:function(){var e=this;e._tickProxy=D(e._tick,e),e._started=!1},tick:e.noop,done:e.noop,onEnd:e.noop,onCancel:e.noop,start:function(){this.done()||(this._started=!0,x.animationFrame(this._tickProxy))},cancel:function(){this._started=!1,this.onCancel()},_tick:function(){var e=this;e._started&&(e.tick(),e.done()?(e._started=!1,e.onEnd()):x.queueAnimation(e._tickProxy))}}),k=w.extend({init:function(e){var t=this;S(t,e),w.fn.init.call(t)},done:function(){return this.timePassed()>=this.duration},timePassed:function(){return Math.min(this.duration,new Date-this.startDate)},moveTo:function(e){var t=this,n=t.movable;t.initial=n[t.axis],t.delta=e.location-t.initial,t.duration="number"==typeof e.duration?e.duration:300,t.tick=t._easeProxy(e.ease),t.startDate=new Date,t.start()},_easeProxy:function(e){var t=this;return function(){t.movable.moveAxis(t.axis,e(t.timePassed(),t.initial,t.delta,t.duration))}}}),S(k,{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}}),C.Animation=w,C.Transition=k,C.createEffect=c}(window.kendo.jQuery),function(e,t){function n(r){var a,s,l,d,c,u,p,h,f=[],g=r.logic||"and",m=r.filters; for(a=0,s=m.length;s>a;a++)r=m[a],l=r.field,p=r.value,u=r.operator,r.filters?r=n(r):(h=r.ignoreCase,l=l.replace(/\./g,"/"),r=o[u],r&&p!==t&&(d=e.type(p),"string"===d?(c="'{1}'",p=p.replace(/'/g,"''"),h===!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))),f.push(r);return r=f.join(" "+g+" "),f.length>1&&(r="("+r+")"),r}var i=window.kendo,r=e.extend,o={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith"},a={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,o,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(o in e)a[o]?a[o](n,e[o]):n[o]=e[o]}else{if("json"!==l)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(o in e)r=e[o],"number"==typeof r&&(e[o]=r+"");n=i.stringify(e)}}return n}}}})}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.isArray,r=e.isPlainObject,o=e.map,a=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,h=e.parse,f=e.errors,g=e.serialize,m=e.data;p&&(r(p)&&(p.fields&&a(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)),f&&("string"==typeof f?(f=c.getter(f),c.errors=function(e){return f(e)||null}):"function"==typeof f&&(c.errors=f)),m&&("string"==typeof m?(m=c.xpathToMember(m),c.data=function(e){var t,n=c.evaluate(e,m);return n=i(n)?n:[n],c.model&&p.fields?(t=new c.model,o(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 m&&(c.data=m)),"function"==typeof h&&(d=c.parse,c.parse=function(e){var t=h.call(c,e);return d.call(c,t)}),"function"==typeof g&&(c.serialize=g)},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,o,a,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)o=r.nodeType,3===o||4===o?c["#text"]=r.nodeValue:1===o&&(n=this.parseDOM(r),a=r.nodeName,s=c[a],i(s)?s.push(n):s=s!==t?[s,n]:n,c[a]=s);return c},evaluate:function(e,t){for(var n,r,o,a,s,l=t.split(".");n=l.shift();)if(e=e[n],i(e)){for(r=[],t=l.join("."),s=0,o=e.length;o>s;s++)a=this.evaluate(e[s],t),a=i(a)?a:[a],r.push.apply(r,a);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 o,a={};for(o in r)a[o]=r[o];a.field=i?n+"."+r.field:n,t==vt&&e._notifyChange&&e._notifyChange(a),e.trigger(t,a)}}function i(t,n){if(t===n)return!0;var r,o=e.type(t),a=e.type(n);if(o!==a)return!1;if("date"===o)return t.getTime()===n.getTime();if("object"!==o&&"array"!==o)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 o(e){this.data=e||[]}function a(e,n){if(e){var i=typeof e===ut?{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,o=e.filters;if(o)for(t=0,n=o.length;n>t;t++)i=o[t],r=i.operator,r&&typeof r===ut&&(i.operator=V[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===ut?{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 o,a,s,l,d;for(t=t||[],l=t.length,o=0;l>o;o++)a=t[o],s=a.aggregate,d=a.field,e[d]=e[d]||{},e[d][s]=N[s.toLowerCase()](e[d][s],n,st.accessor(d),i,r)}function h(e){return"number"==typeof e&&!isNaN(e)}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 g(e,t){t=t||{};var n=new o(e),i=t.aggregate,r=t.filter;return r&&(n=n.filter(r)),n.aggregate(i)}function m(e,t,n,i,r){var o,a,s,l,d;for(l=0,d=e.length;d>l;l++){o=e[l];for(a in t)s=r[a],s&&s!==a&&(o[s]=t[a](o),delete o[a])}}function v(e,t,n,i,r){var o,a,s,l,d;for(l=0,d=e.length;d>l;l++){o=e[l];for(a in t)o[a]=n._parse(a,t[a](o)),s=r[a],s&&s!==a&&delete o[s]}}function _(e,t,n,i,r){var o,a,s,l;for(a=0,l=e.length;l>a;a++)o=e[a],s=i[o.field],s&&s!=o.field&&(o.field=s),o.value=n._parse(o.field,o.value),o.hasSubgroups?_(o.items,t,n,i,r):v(o.items,t,n,i,r)}function b(e,t,n,i,r,o){return function(a){return a=e(a),a&&!tt(i)&&("[object Array]"===Rt.call(a)||a instanceof Nt||(a=[a]),n(a,i,new t,r,o)),a||[]}}function y(e,t,n,i){for(var r,o,a=0;t.length&&i&&(r=t[a],o=r.items,e&&e.field===r.field&&e.value===r.value?(e.hasSubgroups&&e.items.length?y(e.items[e.items.length-1],r.items,n,i):(o=o.slice(n,i),i-=o.length,e.items=e.items.concat(o)),t.splice(a--,1)):(o=o.slice(n,i),i-=o.length,r.items=o,r.items.length||(t.splice(a--,1),i-=n)),n=0,!(++a>=t.length)););at;t++)i=e[t].hasSubgroups?i.concat(w(e[t].items)):i.concat(e[t].items.slice());return i}function k(e,t){var n,i,r,o;if(t)for(n=0,i=e.length;i>n;n++)r=e[n],o=r.items,r.hasSubgroups?k(o,t):!o.length||o[0]instanceof t||(o.type=t,o.wrapAll(o,o))}function x(e,t){var n,i;for(n=0,i=e.length;i>n;n++)if(e[n].hasSubgroups){if(x(e[n].items,t))return!0}else if(t(e[n].items,e[n]))return!0}function C(e,t){var n,i;for(n=0,i=e.length;i>n;n++)if(e[n].uid==t.uid)return t=e[n],e.splice(n,1),t}function T(e,t){var n,i,r,o;for(r=e.length-1,o=0;r>=o;r--)i=e[r],n={value:t.get(i.field),field:i.field,items:n?[n]:[t],hasSubgroups:!!n,aggregates:{}};return n}function S(e,t){return t?A(e,function(e){return e[t.idField]===t.id}):-1}function D(e,t){return t?A(e,function(e){return e.uid==t.uid}):-1}function A(e,t){var n,i;for(n=0,i=e.length;i>n;n++)if(t(e[n]))return n;return-1}function E(e,t){var n,i;return e&&!tt(e)?(n=e[t],i=et(n)?n.from||n.field||t:e[t]||t,lt(i)?t:i):t}function P(e,t){var n,i,r,o={};for(r in e)"filters"!==r&&(o[r]=e[r]);if(e.filters)for(o.filters=[],n=0,i=e.filters.length;i>n;n++)o.filters[n]=P(e.filters[n],t);else o.field=E(t.fields,o.field);return o}function F(e,t){var n,i,r,o,a,s=[];for(n=0,i=e.length;i>n;n++){r={},o=e[n];for(a in o)r[a]=o[a];r.field=E(t.fields,r.field),r.aggregates&&nt(r.aggregates)&&(r.aggregates=F(r.aggregates,t)),s.push(r)}return s}function I(t,n){var i,r,o,a,s,l=e(t)[0].children,d=[],c=n[0],u=n[1];for(i=0,r=l.length;r>i;i++)o={},s=l[i],s.disabled||(o[c.field]=s.text,a=s.attributes.value,a=a&&a.specified?s.value:s.text,o[u.field]=a,d.push(o));return d}function z(t,n){var i,r,o,a,s,l,d,c=e(t)[0].tBodies[0],u=c?c.rows:[],p=n.length,h=[];for(i=0,r=u.length;r>i;i++){for(s={},d=!0,a=u[i].cells,o=0;p>o;o++)l=a[o],"th"!==l.nodeName.toLowerCase()&&(d=!1,s[n[o].field]=l.innerHTML);d||h.push(s)}return h}function M(e){return function(){var t=this._data,n=G.fn[e].apply(this,Mt.call(arguments));return this._data!=t&&this._attachBubbleHandlers(),n}}function B(t,n){function i(e,t){return e.filter(t).add(e.find(t))}var r,o,a,s,l,d,c,u,p=e(t).children(),h=[],f=n[0].field,g=n[1]&&n[1].field,m=n[2]&&n[2].field,v=n[3]&&n[3].field;for(r=0,o=p.length;o>r;r++)a={_loaded:!0},s=p.eq(r),d=s[0].firstChild,u=s.children(),t=u.filter("ul"),u=u.filter(":not(ul)"),l=s.attr("data-id"),l&&(a.id=l),d&&(a[f]=3==d.nodeType?d.nodeValue:u.text()),g&&(a[g]=i(u,"a").attr("href")),v&&(a[v]=i(u,"img").attr("src")),m&&(c=i(u,".k-sprite").prop("className"),a[m]=c&&e.trim(c.replace("k-sprite",""))),t.length&&(a.items=B(t.eq(0),n)),"true"==s.attr("data-hasChildren")&&(a.hasChildren=!0),h.push(a);return h}var R,H,L,O,V,N,U,W,j,q,G,Y,Q,$,K,X,Z=e.extend,J=e.proxy,et=e.isPlainObject,tt=e.isEmptyObject,nt=e.isArray,it=e.grep,rt=e.ajax,ot=e.each,at=e.noop,st=window.kendo,lt=st.isFunction,dt=st.Observable,ct=st.Class,ut="string",pt="function",ht="create",ft="read",gt="update",mt="destroy",vt="change",_t="sync",bt="get",yt="error",wt="requestStart",kt="progress",xt="requestEnd",Ct=[ht,ft,gt,mt],Tt=function(e){return e},St=st.getter,Dt=st.stringify,At=Math,Et=[].push,Pt=[].join,Ft=[].pop,It=[].splice,zt=[].shift,Mt=[].slice,Bt=[].unshift,Rt={}.toString,Ht=st.support.stableSort,Lt=/^\/Date\((.*?)\)\/$/,Ot=/(\r+|\n+)/g,Vt=/(?=['\\])/g,Nt=dt.extend({init:function(e,t){var n=this;n.type=t||Ut,dt.fn.init.call(n),n.length=e.length,n.wrapAll(e,n)},toJSON:function(){var e,t,n=this.length,i=Array(n);for(e=0;n>e;e++)t=this[e],t instanceof Ut&&(t=t.toJSON()),i[e]=t;return i},parent:at,wrapAll:function(e,t){var n,i,r=this,o=function(){return r};for(t=t||[],n=0,i=e.length;i>n;n++)t[n]=r.wrap(e[n],o);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 Ut?e.toJSON():e,e=new i.type(e)),e.parent=t,e.bind(vt,function(e){i.trigger(vt,{field:e.field,node:e.node,index:e.index,items:e.items||[this],action:e.node?e.action||"itemchange":"itemchange"})})),e},push:function(){var e,t=this.length,n=this.wrapAll(arguments);return e=Et.apply(this,n),this.trigger(vt,{action:"add",index:t,items:n}),e},slice:Mt,join:Pt,pop:function(){var e=this.length,t=Ft.apply(this);return e&&this.trigger(vt,{action:"remove",index:e-1,items:[t]}),t},splice:function(e,t,n){var i,r,o,a=this.wrapAll(Mt.call(arguments,2));if(i=It.apply(this,[e,t].concat(a)),i.length)for(this.trigger(vt,{action:"remove",index:e,items:i}),r=0,o=i.length;o>r;r++)i[r].children&&i[r].unbind(vt);return n&&this.trigger(vt,{action:"add",index:e,items:a}),i},shift:function(){var e=this.length,t=zt.apply(this);return e&&this.trigger(vt,{action:"remove",index:0,items:[t]}),t},unshift:function(){var e,t=this.wrapAll(arguments);return e=Bt.apply(this,t),this.trigger(vt,{action:"add",index:0,items:t}),e},indexOf:function(e){var t,n,i=this;for(t=0,n=i.length;n>t;t++)if(i[t]===e)return t;return-1},forEach:function(e){for(var t=0,n=this.length;n>t;t++)e(this[t],t,this)},map:function(e){for(var t=0,n=[],i=this.length;i>t;t++)n[t]=e(this[t],t,this);return n},filter:function(e){for(var t,n=0,i=[],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)},empty:function(){this.splice(0,this.length)}}),Ut=dt.extend({init:function(e){var t,n,i=this,r=function(){return i};dt.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]!==pt&&"uid"!==e},forEach:function(e){for(var t in this)this.shouldSerialize(t)&&e(this[t],t)},toJSON:function(){var e,t,n={};for(t in this)this.shouldSerialize(t)&&(e=this[t],(e instanceof Ut||e instanceof Nt)&&(e=e.toJSON()),n[t]=e);return n},get:function(e){var t,n=this;return n.trigger(bt,{field:e}),t="this"===e?n:st.getter(e,!0)(n)},_set:function(e,t){var n,i,r,o=this,a=e.indexOf(".")>=0;if(a)for(n=e.split("."),i="";n.length>1;){if(i+=n.shift(),r=st.getter(i,!0)(o),r instanceof Ut)return r.set(n.join("."),t),a;i+="."}return st.setter(e)(o,t),a},set:function(e,t){var n=this,i=st.getter(e,!0)(n);i!==t&&(n.trigger("set",{field:e,value:t})||(!n._set(e,n.wrap(t,e,function(){return n}))||e.indexOf("(")>=0||e.indexOf("[")>=0)&&n.trigger(vt,{field:e}))},parent:at,wrap:function(e,t,i){var r,o,a=this,s=Rt.call(e);return null==e||"[object Object]"!==s&&"[object Array]"!==s||(r=e instanceof Nt,o=e instanceof G,"[object Object]"!==s||o||r?("[object Array]"===s||r||o)&&(r||o||(e=new Nt(e)),e.parent()!=i()&&e.bind(vt,n(a,vt,t,!1))):(e instanceof Ut||(e=new Ut(e)),e.parent()!=i()&&(e.bind(bt,n(a,bt,t,!0)),e.bind(vt,n(a,vt,t,!0)))),e.parent=i),e}}),Wt={number:function(e){return st.parseFloat(e)},date:function(e){return st.parseDate(e)},"boolean":function(e){return typeof e===ut?"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return null!=e?e+"":e},"default":function(e){return e}},jt={string:"",number:0,date:new Date,"boolean":!1,"default":""},qt=Ut.extend({init:function(n){var i=this;(!n||e.isEmptyObject(n))&&(n=e.extend({},i.defaults,n)),Ut.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 Ut.fn.shouldSerialize.call(this,e)&&"uid"!==e&&!("id"!==this.idField&&"id"===e)&&"dirty"!==e&&"_accessors"!==e},_parse:function(e,t){var n,i=this,o=e,a=i.fields||{};return e=a[e],e||(e=r(a,o)),e&&(n=e.parse,!n&&e.type&&(n=Wt[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,Ut.fn.set.call(r,e,t,n)))},accept:function(e){var t,n,i=this,r=function(){return i};for(t in e)n=e[t],"_"!=t.charAt(0)&&(n=i.wrap(e[t],t,r)),i._set(t,n);i.idField&&(i.id=i.get(i.idField)),i.dirty=!1},isNew:function(){return this.id===this._defaultId}});qt.define=function(e,n){n===t&&(n=e,e=qt);var i,r,o,a,s,l,d,c,u=Z({defaults:{}},n),p={},h=u.id;if(h&&(u.idField=h),u.id&&delete u.id,h&&(u.defaults[h]=u._defaultId=""),"[object Array]"===Rt.call(u.fields)){for(l=0,d=u.fields.length;d>l;l++)o=u.fields[l],typeof o===ut?p[o]={}:o.field&&(p[o.field]=o);u.fields=p}for(r in u.fields)o=u.fields[r],a=o.type||"default",s=null,c=r,r=typeof o.field===ut?o.field:r,o.nullable||(s=u.defaults[c!==r?c:r]=o.defaultValue!==t?o.defaultValue:jt[a.toLowerCase()]),n.id===r&&(u._defaultId=s),u.defaults[c!==r?c:r]=s,o.parse=o.parse||Wt[a];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},H={selector:function(e){return lt(e)?e:St(e)},compare:function(e){var t=this.selector(e);return function(e,n){return e=t(e),n=t(n),null==e&&null==n?0:null==e?-1:null==n?1:e.localeCompare?e.localeCompare(n):e>n?1:n>e?-1:0}},create:function(e){var t=e.compare||this.compare(e.field);return"desc"==e.dir?function(e,n){return t(n,e,!0)}:t},combine:function(e){return function(t,n){var i,r,o=e[0](t,n);for(i=1,r=e.length;r>i;i++)o=o||e[i](t,n);return o}}},L=Z({},H,{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},O=function(){function e(e){return e.replace(Vt,"\\").replace(Ot,"")}function t(t,n,i,r){var o;return null!=i&&(typeof i===ut&&(i=e(i),o=Lt.exec(i),o?i=new Date(+o[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"}}}(),o.filterExpr=function(e){var n,i,r,a,s,l,d=[],c={and:" && ",or:" || "},u=[],p=[],h=e.filters;for(n=0,i=h.length;i>n;n++)r=h[n],s=r.field,l=r.operator,r.filters?(a=o.filterExpr(r),r=a.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,a.operators),u.push.apply(u,a.fields)):(typeof s===pt?(a="__f["+u.length+"](d)",u.push(s)):a=st.expr(s),typeof l===pt?(r="__o["+p.length+"]("+a+", "+r.value+")",p.push(l)):r=O[(l||"eq").toLowerCase()](a,r.value,r.ignoreCase!==t?r.ignoreCase:!0)),d.push(r);return{expression:"("+d.join(c[e.logic])+")",fields:u,operators:p}},V={"==":"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"},o.normalizeFilter=l,o.prototype={toArray:function(){return this.data},range:function(e,t){return new o(this.data.slice(e,e+t))},skip:function(e){return new o(this.data.slice(e))},take:function(e){return new o(this.data.slice(0,e))},select:function(e){return new o(R(this.data,e))},order:function(e,t){var n={dir:t};return e&&(e.compare?n.compare=e.compare:n.field=e),new o(this.data.slice(0).sort(H.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,o=a(e,t),s=[];if(n=n||H,o.length){for(i=0,r=o.length;r>i;i++)s.push(n.create(o[i]));return this.orderBy({compare:n.combine(s)})}return this},filter:function(e){var t,n,i,r,a,s,d,c,u=this.data,p=[];if(e=l(e),!e||0===e.filters.length)return this;for(r=o.filterExpr(e),s=r.fields,d=r.operators,a=c=Function("d, __f, __o","return "+r.expression),(s.length||d.length)&&(c=function(e){return a(e,s,d)}),t=0,i=u.length;i>t;t++)n=u[t],c(n)&&p.push(n);return new o(p)},group:function(e,t){e=c(e||[]),t=t||this.data;var n,i=this,r=new o(i.data);return e.length>0&&(n=e[0],r=r.groupBy(n).select(function(i){var r=new o(t).filter([{field:i.field,operator:"eq",value:i.value,ignoreCase:!1}]);return{field:i.field,value:i.value,items:e.length>1?new o(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 o([]);var t,n,i,r,a=e.field,s=this._sortForGrouping(a,e.dir||"asc"),l=st.accessor(a),d=l.get(s[0],a),c={field:a,value:d,items:[]},p=[c];for(i=0,r=s.length;r>i;i++)t=s[i],n=l.get(t,a),u(d,n)||(d=n,c={field:a,value:d,items:[]},p.push(c)),c.items.push(t);return new o(p)},_sortForGrouping:function(e,t){var n,i,r=this.data;if(!Ht){for(n=0,i=r.length;i>n;n++)r[n].__position=n;for(r=new o(r).sort(e,t,L).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}},N={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 h(e)||(e=i),e>i&&h(i)&&(e=i),e}},o.process=function(e,n){n=n||{};var i,r=new o(e),s=n.group,l=c(s||[]).concat(a(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()}},U=ct.extend({init:function(e){this.data=e.data},read:function(e){e.success(this.data)},update:function(e){e.success(e.data)},create:function(e){e.success(e.data)},destroy:function(e){e.success(e.data)}}),W=ct.extend({init:function(e){var t,n=this;e=n.options=Z({},n.options,e),ot(Ct,function(t,n){typeof e[n]===ut&&(e[n]={url:e[n]})}),n.cache=e.cache?j.create(e.cache):{find:at,add:at},t=e.parameterMap,n.parameterMap=lt(t)?t:function(e){var n={};return ot(e,function(e,i){e in t&&(e=t[e],et(e)&&(i=e.value(i),e=e.key)),n[e]=i}),n}},options:{parameterMap:Tt},create:function(e){return rt(this.setup(e,ht))},read:function(n){var i,r,o,a=this,s=a.cache;n=a.setup(n,ft),i=n.success||at,r=n.error||at,o=s.find(n.data),o!==t?i(o):(n.success=function(e){s.add(n.data,e),i(e)},e.ajax(n))},update:function(e){return rt(this.setup(e,gt))},destroy:function(e){return rt(this.setup(e,mt))},setup:function(e,t){e=e||{};var n,i=this,r=i.options[t],o=lt(r.data)?r.data(e.data):r.data;return e=Z(!0,{},r,e),n=Z(!0,{},o,e.data),e.data=i.parameterMap(n,t),lt(e.url)&&(e.url=e.url(n)),e}}),j=ct.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[Dt(e)]=n)},find:function(e){return this._store[Dt(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[Dt(e)]}}),j.create=function(e){var t={inmemory:function(){return new j}};return et(e)&<(e.find)?e:e===!0?new j:t[e]()},q=ct.extend({init:function(e){var t,n,i,r,o,a,s,l,d,c,u,p,h,f=this;e=e||{};for(t in e)n=e[t],f[t]=typeof n===ut?St(n):n;r=e.modelBase||qt,et(f.model)&&(f.model=i=r.define(f.model)),f.model&&(a=J(f.data,f),s=J(f.groups,f),l=J(f.serialize,f),d={},c={},u={},p={},h=!1,i=f.model,i.fields&&(ot(i.fields,function(e,t){var n;o=e,et(t)&&t.field?o=t.field:typeof t===ut&&(o=t),et(t)&&t.from&&(n=t.from),h=h||n&&n!==e||o!==e,c[e]=St(n||o),u[e]=St(e),d[n||o]=e,p[e]=n||o}),!e.serialize&&h&&(f.serialize=b(l,i,m,u,d,p))),f.data=b(a,i,v,c,d,p),f.groups=b(s,i,_,c,d,p))},errors:function(e){return e?e.errors:null},parse:Tt,data:Tt,total:function(e){return e.length},groups:Tt,aggregates:function(){return{}},serialize:function(e){return e}}),G=dt.extend({init:function(e){var n,i,r=this;e&&(i=e.data),e=r.options=Z({},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=a(e.sort),r._filter=l(e.filter),r._group=c(e.group),r._aggregate=e.aggregate,r._total=e.total,dt.fn.init.call(r),r.transport=Y.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([yt,vt,wt,_t,xt,kt],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()?w(e):e},parent:at,get:function(e){var t,n,i=this._flatData(this._data);for(t=0,n=i.length;n>t;t++)if(i[t].id==e)return i[t]},getByUid:function(e){var t,n,i=this._flatData(this._data);if(i)for(t=0,n=i.length;n>t;t++)if(i[t].uid==e)return i[t]},indexOf:function(e){return D(this._data,e)},at:function(e){return this._data[e]},data:function(e){var n=this;return e===t?n._data:(n._data=this._observe(e),n._ranges=[],n._addRange(n._data),n._total=n._data.length,n._process(n._data),t)},view:function(){return this._view},add:function(e){return this.insert(this._data.length,e)},_createNewModel:function(e){return this.reader.model?new this.reader.model(e):new Ut(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,T(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(o){return n=C(o,e),n&&r?(n.isNew&&n.isNew()||i._destroyed.push(n),!0):t}),e},sync:function(){var t,n,i,r=this,o=[],a=[],s=r._destroyed,l=r._flatData(r._data);if(r.reader.model){for(t=0,n=l.length;n>t;t++)l[t].isNew()?o.push(l[t]):l[t].dirty&&a.push(l[t]);i=r._send("create",o),i.push.apply(i,r._send("update",a)),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(_t)})}},cancelChanges:function(e){var t=this;e instanceof st.data.Model?t._cancelModel(e):(t._destroyed=[],t._data=t._observe(t._pristineData),t.options.serverPaging&&(t._total=t.reader.total(t._pristine)),t._change())},hasChanges:function(){var e,t,n=this._data;if(this._destroyed.length)return!0;for(e=0,t=n.length;t>e;e++)if(n[e].isNew()||n[e].dirty)return!0;return!1},_accept:function(t){var n,i=this,r=t.models,o=t.response,a=0,s=i._isServerGrouped(),l=i._pristineData,d=t.type;if(i.trigger(xt,{response:o,type:d}),o&&!tt(o)){if(o=i.reader.parse(o),i._handleCustomErrors(o))return;o=i.reader.data(o),e.isArray(o)||(o=[o])}else o=e.map(r,function(e){return e.toJSON()});for("destroy"===d&&(i._destroyed=[]),a=0,n=r.length;n>a;a++)"destroy"!==d?(r[a].accept(o[a]),"create"===d?l.push(s?T(i.group(),r[a]):o[a]):"update"===d&&i._updatePristineForModel(r[a],o[a])):i._removePristineForModel(r[a])},_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=S(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()?x(e,t):t(e))},_pristineForModel:function(e){var n,i,r=function(r){return i=S(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=D(i,e),-1!=t&&(!e.isNew()&&n?i[t].accept(n):i.splice(t,1))})},_promise:function(t,n,i){var r=this,o=r.transport;return e.Deferred(function(e){r.trigger(wt,{type:i}),o[i].call(o,Z({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,o=[],a=r.reader.serialize(f(t));if(r.options.batch)t.length&&o.push(r._promise({data:{models:a}},t,e));else for(n=0,i=t.length;i>n;n++)o.push(r._promise({data:a[n]},[t[n]],e));return o},read:function(e){var t=this,n=t._params(e);t._queueRequest(n,function(){t.trigger(wt,{type:"read"})?t._dequeueRequest():(t.trigger(kt),t._ranges=[],t.transport.read({data:n,success:J(t.success,t),error:J(t.error,t)}))})},success:function(n){var i=this,r=i.options;return i.trigger(xt,{response:n,type:"read"}),n=i.reader.parse(n),i._handleCustomErrors(n)?(i._dequeueRequest(),t):(i._pristine=et(n)?e.extend(!0,{},n):n.slice?n.slice(0):n,i._total=i.reader.total(n),i._aggregate&&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(xt,{}),this.trigger(yt,{xhr:e,status:t,errorThrown:n})},_params:function(e){var t=this,n=Z({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=F(n.group,t.reader.model)):delete n.group,t.options.serverFiltering?t.reader.model&&n.filter&&(n.filter=P(n.filter,t.reader.model)):delete n.filter,t.options.serverSorting?t.reader.model&&n.sort&&(n.sort=F(n.sort,t.reader.model)):delete n.sort,t.options.serverAggregates?t.reader.model&&n.aggregate&&(n.aggregate=F(n.aggregate,t.reader.model)):delete n.aggregate,n},_queueRequest:function(e,n){var i=this;i._requestInProgress?i._pending={callback:J(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(yt,{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 Nt?i&&(e.type=t.reader.model,e.wrapAll(e,e)):(e=new Nt(e,t.reader.model),e.parent=function(){return t.parent()}),t._isServerGrouped()&&k(e,n),t._changeHandler&&t._data&&t._data instanceof Nt?t._data.unbind(vt,t._changeHandler):t._changeHandler=J(t._change,t),e.bind(vt,t._changeHandler)},_change:function(e){var t,n,i,r=this,o=e?e.action:"";if("remove"===o)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"!==o&&"remove"!==o&&"itemchange"!==o?(i=parseInt(r._total||r.reader.total(r._pristine),10),"add"===o?i+=e.items.length:"remove"===o?i-=e.items.length:"itemchange"===o||"sync"===o||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,a={};r.options.serverPaging!==!0&&(a.skip=r._skip,a.take=r._take||r._pageSize,a.skip===t&&r._page!==t&&r._pageSize!==t&&(a.skip=(r._page-1)*r._pageSize)),r.options.serverSorting!==!0&&(a.sort=r._sort),r.options.serverFiltering!==!0&&(a.filter=r._filter),r.options.serverGrouping!==!0&&(a.group=r._group),r.options.serverAggregates!==!0&&(a.aggregate=r._aggregate,r._aggregateResult=g(e,a)),i=o.process(e,a),r._view=i.data,i.total===t||r.options.serverFiltering||(r._total=i.total),n=n||{},n.items=n.items||r._view,r.trigger(vt,n)},_mergeState:function(e){var n=this;return e!==t&&(n._pageSize=e.pageSize,n._page=e.page,n._sort=e.sort,n._filter=e.filter,n._group=e.group,n._aggregate=e.aggregate,n._skip=e.skip,n._take=e.take,n._skip===t&&(n._skip=n.skip(),e.skip=n.skip()),n._take===t&&n._pageSize!==t&&(n._take=n._pageSize,e.take=n._take),e.sort&&(n._sort=e.sort=a(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(wt,{type:"read"})||(i.trigger(kt),n=o.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=g(i._data,e),i.trigger(xt,{}),i.trigger(vt,{items:n.data}))},fetch:function(t){var n=this;return e.Deferred(function(e){var i=function(i){n.unbind(yt,r),e.resolve(),t&&t.call(n,i)},r=function(t){e.reject(t)};n.one(vt,i),n.one(yt,r),n._query()}).promise()},_query:function(e){var t=this;t.query(Z({},{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=At.max(At.min(At.max(e,1),i.totalPages()),1),i._query({page:e}),t):(n=i.skip(),n!==t?At.round((n||0)/(i.take()||1))+1:t)},pageSize:function(e){var n=this;return e!==t?(n._query({pageSize:e,page:1}),t):n.take()},sort:function(e){var n=this;return e!==t?(n._query({sort:e}),t):n._sort},filter:function(e){var n=this;return e===t?n._filter:(n._query({filter:e,page:1}),t)},group:function(e){var n=this;return e!==t?(n._query({group:e}),t):n._group},total:function(){return parseInt(this._total||0,10)},aggregate:function(e){var n=this;return e!==t?(n._query({aggregate:e}),t):n._aggregate},aggregates:function(){return this._aggregateResult},totalPages:function(){var e=this,t=e.pageSize()||e.total();return At.ceil((e.total()||0)/t)},inRange:function(e,t){var n=this,i=At.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,o,a,s,l,d;if(e=At.min(e||0,this.total()),r=this,o=At.max(At.floor(e/n),0)*n,a=At.min(o+n,r.total()),i=r._findRange(e,At.min(e+n,r.total())),i.length){r._skip=e>r.skip()?At.min(a,(r.totalPages()-1)*r.take()):o,r._take=n,s=r.options.serverPaging,l=r.options.serverSorting,d=r.options.serverFiltering;try{r.options.serverPaging=!0,r._isServerGrouped()||r.group()&&r.group().length||(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(o,a)?e>o&&r.prefetch(a,n,function(){r.range(e,n)}):r.prefetch(o,n,function(){e>o&&ar;r++)if(i=b[r],e>=i.start&&e<=i.end){for(g=0,s=r;m>s;s++)if(i=b[s],f=_._flatData(i.data),f.length&&e+g>=i.start&&(u=i.data,p=i.end,k||(v=c(_.group()||[]).concat(a(_.sort()||[])),h=o.process(i.data,{sort:v,filter:_.filter()}),f=u=h.data,h.total!==t&&(p=h.total)),l=0,e+g>i.start&&(l=e+g-i.start),d=f.length,p>n&&(d-=p-n),g+=d-l,y=_._mergeGroups(y,u,l,d),n<=i.end&&g==n-e))return y;break}return[]},_mergeGroups:function(e,t,n,i){if(this._isServerGrouped()){var r,o=t.toJSON();return e.length&&(r=e[e.length-1]),y(r,o,n,i),e.concat(o)}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 o,a,s=!1,l={start:e,end:t,data:[]};for(i._dequeueRequest(),o=0,a=i._ranges.length;a>o;o++)if(i._ranges[o].start===e){s=!0,l=i._ranges[o];break}s||i._ranges.push(l),i.trigger(xt,{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=At.min(e+t,i.total()),o={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(o,function(){i.trigger(wt,{type:"read"})?i._dequeueRequest():i.transport.read({data:i._params(o),success:i._prefetchSuccessHandler(e,r,n)})})},100))},_rangeExists:function(e,t){var n,i,r=this,o=r._ranges;for(n=0,i=o.length;i>n;n++)if(o[n].start<=e&&o[n].end>=t)return!0;return!1}}),Y={},Y.create=function(e,t){var n,i=e.transport;return i?(i.read=typeof i.read===ut?{url:i.read}:i.read,e.type&&(st.data.transports[e.type]&&!et(st.data.transports[e.type])?n=new st.data.transports[e.type](Z(i,{data:t})):i=Z(!0,{},st.data.transports[e.type],i),e.schema=Z(!0,{},st.data.schemas[e.type],e.schema)),n||(n=lt(i.read)?i:new W(i))):n=new U({data:e.data}),n},G.create=function(e){e=e&&e.push?{data:e}:e;var t,n,i,r=e||{},o=r.data,a=r.fields,s=r.table,l=r.select,d={};if(o||!a||r.transport||(s?o=z(s,a):l&&(o=I(l,a))),st.data.Model&&a&&(!r.schema||!r.schema.model)){for(t=0,n=a.length;n>t;t++)i=a[t],i.type&&(d[i.field]=i);tt(d)||(r.schema=Z(!0,r.schema,{model:{fields:d}}))}return r.data=o,r instanceof G?r:new G(r)},Q=qt.define({init:function(e){var t=this,n=t.hasChildren||e&&e.hasChildren,i="items",r={};st.data.Model.fn.init.call(t,e),typeof t.children===ut&&(i=t.children),r={schema:{data:i,model:{hasChildren:n,id:t.idField}}},typeof t.children!==ut&&Z(r,t.children),r.data=e,n||(n=r.schema.data),typeof n===ut&&(n=st.getter(n)),lt(n)&&(t.hasChildren=!!n.call(t,t)),t._childrenOptions=r,t.hasChildren&&t._initChildren(),t._loaded=!(!e||!e[i]&&!e._loaded)},_initChildren:function(){var e,t,n,i=this;i.children instanceof $||(e=i.children=new $(i._childrenOptions),t=e.transport,n=t.parameterMap,t.parameterMap=function(e){return e[i.idField||"id"]=i.id,n&&(e=n(e)),e},e.parent=function(){return i},e.bind(vt,function(e){e.node=e.node||i,i.trigger(vt,e)}),e.bind(yt,function(e){var t=i.parent();t&&(e.node=e.node||i,t.trigger(yt,e))}),i._updateChildrenField())},append:function(e){this._initChildren(),this.loaded(!0),this.children.add(e)},hasChildren:!1,level:function(){for(var e=this.parentNode(),t=0;e&&e.parentNode;)t++,e=e.parentNode?e.parentNode():null;return t},_updateChildrenField:function(){var e=this._childrenOptions.schema.data;this[e||"items"]=this.children.data()},load:function(){var e=this,n={};e.hasChildren?(e._initChildren(),n[e.idField||"id"]=e.id,e._loaded||(e.children._data=t),e.children.one(vt,function(){e._loaded=!0,e._updateChildrenField()})._query(n)):e.loaded(!0)},parentNode:function(){var e=this.parent();return e.parent()},loaded:function(e){return e===t?this._loaded:(this._loaded=e,t)},shouldSerialize:function(e){return qt.fn.shouldSerialize.call(this,e)&&"children"!==e&&"_loaded"!==e&&"hasChildren"!==e&&"_childrenOptions"!==e}}),$=G.extend({init:function(e){var t=Q.define({children:e});G.fn.init.call(this,Z(!0,{},{schema:{modelBase:t,model:t}},e)),this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var e=this;e._data.bind(yt,function(t){e.trigger(yt,t)})},remove:function(e){var t,n=e.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),t=G.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:M("success"),data:M("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),G.fn.insert.call(this,e,t)},_find:function(e,t){var n,i,r,o,a;if(r=G.fn[e].call(this,t))return r;if(o=this._flatData(this.data()))for(n=0,i=o.length;i>n;n++)if(a=o[n].children,a instanceof $&&(r=a[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=B(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):this.useRanges?(this.useRanges&&((ethis.skip+r)&&(i=Math.floor(e/r)*r,this.range(i)),e===this.prefetchThreshold&&this._prefetch(),e===this.midPageThreshold?this.range(this.nextMidRange):e===this.nextPageThreshold?this.range(this.nextFullRange):e===this.pullBackThreshold&&(this.offset===this.skip?this.range(this.previousMidRange):this.range(this.previousFullRange)),n=this.dataSource.at(e-this.dataOffset)),n===t&&this.trigger("endreached",{index:e}),n):this.dataSource.view()[e]},indexOf:function(e){return this.dataSource.data().indexOf(e)+this.dataOffset},total:function(){return parseInt(this.dataSource.total(),10)},next:function(){var e=this,t=e.pageSize,n=e.skip-e.viewSize,i=At.max(At.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=At.max(At.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)},destroy:function(){this.unbind()},_prefetch:function(){var e=this,t=this.pageSize,n=this.skip+t,i=this.dataSource;i.inRange(n,t)||this._prefetching||!this.prefetch||(this._prefetching=!0,this.trigger("prefetching",{skip:n,take:t}),i.prefetch(n,t,function(){e._prefetching=!1,e.trigger("prefetched",{skip:n,take:t})}))},_goToRange:function(e,t){this.offset===e&&(this.dataOffset=e,this._expanding=t,this.dataSource.range(e,this.pageSize))},_change:function(){var e=this.dataSource,t=e.firstItemUid();this.length=this.useRanges?e.lastRange().end:e.view().length,this._firstItemUid===t&&this.useRanges||(this._syncWithDataSource(),this._recalculate(),this.trigger("reset",{offset:this.offset})),this.trigger("resize"),this._expanding&&this.trigger("expand"),delete this._expanding},_syncWithDataSource:function(){var e=this.dataSource;this._firstItemUid=e.firstItemUid(),this.dataOffset=this.offset=e.skip()||0,this.pageSize=e.pageSize(),this.useRanges=e.options.serverPaging},_recalculate:function(){var e=this.pageSize,t=this.offset,n=this.viewSize,i=Math.ceil(t/e)*e;this.skip=i,this.midPageThreshold=i+e-1,this.nextPageThreshold=i+n-1,this.prefetchThreshold=i+Math.floor(2*(e/3)),this.pullBackThreshold=this.offset-1,this.nextMidRange=i+e-n,this.nextFullRange=i,this.previousMidRange=t-n,this.previousFullRange=i-e}}),X=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=Math.ceil(this.length/n.batchSize),n.trigger("resize",{total:n.total(),offset:this.offset})}})},syncDataSource:function(){this.buffer.syncDataSource()},at:function(e){var n,i,r=this.buffer,o=e*this.batchSize,a=this.batchSize,s=[];for(r.offset>o&&r.at(r.offset-1),i=0;a>i&&(n=r.at(o+i),n!==t);i++)s.push(n);return s},total:function(){return this._total},destroy:function(){this.buffer.destroy(),this.unbind()}}),Z(!0,st.data,{readers:{json:q},Query:o,DataSource:G,HierarchicalDataSource:$,Node:Q,ObservableObject:Ut,ObservableArray:Nt,LocalTransport:U,RemoteTransport:W,Cache:j,DataReader:q,Model:qt,Buffer:K,BatchBuffer:X})}(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.apply(r,e[t].items);return r}function i(e,n){var i=k.initWidget(e,{},n);return i?new b(i):t}function r(e){var t,n,i,o,a,s,l,d={};for(l=e.match(y),t=0,n=l.length;n>t;t++)i=l[t],o=i.indexOf(":"),a=i.substring(0,o),s=i.substring(o+1),"{"==s.charAt(0)&&(s=r(s)),d[a]=s;return d}function o(e,t,n){var i,r={};for(i in e)r[i]=new n(t,e[i]);return r}function a(e,t,n,s){var d,c,u,p=e.getAttribute("data-"+k.ns+"role"),h=e.getAttribute("data-"+k.ns+"bind"),v=e.children,b=[],y=!0,x={};if(s=s||[t],(p||h)&&l(e),p&&(u=i(e,n)),h&&(h=r(h.replace(w,"")),u||(x=k.parseOptions(e,{textField:"",valueField:"",template:"",valueUpdate:B,valuePrimitive:!1,autoBind:!0}),x.roles=n,u=new _(e,x)),u.source=t,c=o(h,s,f),x.template&&(c.template=new m(s,"",x.template)),c.click&&(h.events=h.events||{},h.events.click=h.click,delete c.click),c.source&&(y=!1),h.attr&&(c.attr=o(h.attr,s,f)),h.style&&(c.style=o(h.style,s,f)),h.events&&(c.events=o(h.events,s,g)),u.bind(c)),u&&(e.kendoBindingTarget=u),y&&v){for(d=0;di;i++)o=t[i],1===o.nodeType&&a(o,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 h,f,g,m,v,_,b,y,w,k=window.kendo,x=k.Observable,C=k.data.ObservableObject,T=k.data.ObservableArray,S={}.toString,D={},A=Array.prototype.splice,E=k.Class,P=e.proxy,F="value",I="source",z="events",M="checked",B="change";!function(){var e=document.createElement("a");e.innerText!==t?h="innerText":e.textContent!==t&&(h="textContent")}(),f=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(B,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(B,e);else for(t in r.dependencies)if(0===t.indexOf(i)&&(n=t.charAt(i.length),!n||"."===n||"["===n)){r.trigger(B,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,o=n;if(!e.observable)return o;for(e.start(e.source),o=n.get(r);o===t&&n;)n=e.parents[++i],n instanceof C&&(o=n.get(r));if(o===t)for(n=e.source;o===t&&n;)n=n.parent(),n instanceof C&&(o=n.get(r));return"function"==typeof o&&(i=r.lastIndexOf("."),i>0&&(n=n.get(r.substring(0,i))),e.start(n),o=o.call(n,e.source),e.stop(n)),n&&n!==e.source&&(e.currentSource=n,n.unbind(B,e._change).bind(B,e._change)),e.stop(e.source),o},set:function(e){var t=this,n=t.currentSource||t.source;n.set(t.path,e)},destroy:function(){this.observable&&this.source.unbind(B,this._change)}}),g=f.extend({get:function(){var e,t=this.source,n=this.path,i=0;for(e=t.get(n);!e&&t;)t=this.parents[++i],t instanceof C&&(e=t.get(n));return P(e,t)}}),m=f.extend({init:function(e,t,n){var i=this;f.fn.init.call(i,e,t),i.template=n},render:function(e){var t;return this.start(this.source),t=k.render(this.template,e),this.stop(this.source),t}}),v=E.extend({init:function(e,t,n){this.element=e,this.bindings=t,this.options=n},bind:function(e,t){var n=this;e=t?e[t]:e,e.bind(B,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[h]=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=P(this.change,this),this.eventName=i.valueUpdate||B,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){var e,t;this._initChange=this.eventName!=B,e=this.element.value,t=this.element.type,"date"==t?e=k.parseDate(e,"yyyy-MM-dd"):"datetime-local"==t?e=k.parseDate(e,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==t&&(e=k.parseFloat(e)),this.bindings[F].set(e),this._initChange=!1},refresh:function(){var e,t;this._initChange||(e=this.bindings[F].get(),null==e&&(e=""),t=this.element.type,"date"==t?e=k.toString(e,"yyyy-MM-dd"):"datetime-local"==t&&(e=k.toString(e,"yyyy-MM-ddTHH:mm:ss")),this.element.value=e),this._initChange=!1},destroy:function(){e(this.element).off(this.eventName,this._change)}}),D.source=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n);var i=this.bindings.source.get();i instanceof k.data.DataSource&&n.autoBind!==!1&&i.fetch()},refresh:function(e){var t=this,n=t.bindings.source.get();n instanceof T||n instanceof k.data.DataSource?(e=e||{},"add"==e.action?t.add(e.index,e.items):"remove"==e.action?t.remove(e.index,e.items):"itemchange"!=e.action&&t.render()):t.render()},container:function(){var e=this.element;return"table"==e.nodeName.toLowerCase()&&(e.tBodies[0]||e.appendChild(document.createElement("tbody")),e=e.tBodies[0]),e},template:function(){var e=this.options,t=e.template,n=this.container().nodeName.toLowerCase();return t||(t="select"==n?e.valueField||e.textField?k.format('',e.valueField||e.textField,e.textField||e.valueField):"":"tbody"==n?"#:data#":"ul"==n||"ol"==n?"
  • #:data#
  • ":"#:data#",t=k.template(t)),t},destroy:function(){var e=this.bindings.source.get();e.unbind(B,this._change)},add:function(t,n){var i,r,o,s,l=this.container(),d=l.cloneNode(!1),c=l.children[t];if(e(d).html(k.render(this.template(),n)),d.children.length)for(i=this.bindings.source._parents(),r=0,o=n.length;o>r;r++)s=d.children[0],l.insertBefore(s,c||null),a(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++)a(s.children[n],o[n],this.options.roles,[o[n]].concat(t))}else e(s).html(k.render(l,o))}}),D.input={checked:v.extend({init:function(t,n,i){v.fn.init.call(this,t,n,i),this._change=P(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[M].set(i):"checkbox"==n.type&&(e=this.bindings[M].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[M].set(i))},refresh:function(){var e=this.bindings[M].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(B,this._change)}})},D.select={value:v.extend({init:function(t,n,i){v.fn.init.call(this,t,n,i),this._change=P(this.change,this),e(this.element).change(this._change)},change:function(){var e,t,n,i,r,o,a=[],s=this.element,l=this.options.valueField||this.options.textField,d=this.options.valuePrimitive;for(r=0,o=s.options.length;o>r;r++)t=s.options[r],t.selected&&(i=t.attributes.value,i=i&&i.specified?t.value:t.text,a.push(i));if(l)for(e=this.bindings.source.get(),n=0;nr;r++)if(e[r].get(l)==a[n]){a[n]=e[r];break}i=this.bindings[F].get(),i instanceof T?i.splice.apply(i,[0,i.length].concat(a)):d||!(i instanceof C)&&l?this.bindings[F].set(a[0].get(l)):this.bindings[F].set(a[0])},refresh:function(){var e,t,n,i=this.element,r=i.options,o=this.bindings[F].get(),a=o,s=this.options.valueField||this.options.textField,l=!1;for(a instanceof T||(a=new T([o])),i.selectedIndex=-1,n=0;ne;e++)d(i[e])},_ns:function(t){t=t||k.ui;var n=[k.ui,k.dataviz.ui,k.mobile.ui];return n.splice(e.inArray(t,n),1),n.unshift(t),k.rolesFromNamespaces(n)},dataBound:function(e){var t,i,r,o=this.widget,s=o.items(),l=o.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++)a(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 k.data.DataSource&&i.dataSource!=t&&(t instanceof k.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(B,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,o,a,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&&(a=this.bindings.source.get()),""===s&&(c||this.options.valuePrimitive))s=null;else{for((!a||a instanceof k.data.DataSource)&&(a=this.widget.dataSource.view()),d&&(t=s.length,u=s.slice(0)),r=0,o=a.length;o>r;r++)if(n=a[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(B,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(B,this._change),this._initChange=!1},change:function(){var e,t,n,i,r,o,a,s,l,d=this,c=d.bindings[F].get(),u=d.options.valuePrimitive,p=u?d.widget.value():d.widget.dataItems(),h=this.options.dataValueField||this.options.dataTextField;if(p=p.slice(0),d._initChange=!0,c instanceof T){for(e=[],t=p.length,n=0,i=0,r=c[n],o=!1;r;){for(l=!1,i=0;t>i;i++)if(u?o=p[i]==r:(s=p[i],s=s.get?s.get(h):s,o=s==(r.get?r.get(h):r)),o){p.splice(i,1),t-=1,l=!0;break}l?n+=1:(e.push(r),A.call(c,n,1),a=n),r=c[n]}A.apply(c,[c.length,0].concat(p)),e.length&&c.trigger("change",{action:"remove",items:e,index:a}),p.length&&c.trigger("change",{action:"add",items:p,index:c.length-1})}else d.bindings[F].set(p);d._initChange=!1},refresh:function(){if(!this._initChange){var e,t,n=this.options.dataValueField||this.options.dataTextField,i=this.bindings.value.get(),r=0,o=[];if(n)if(i instanceof T){for(e=i.length;e>r;r++)t=i[r],o[r]=t.get?t.get(n):t;i=o}else i instanceof C&&(i=i.get(n));this.widget.value(i)}},destroy:function(){this.widget.unbind(B,this._change)}})}},_=E.extend({init:function(e,t){this.target=e,this.options=t,this.toDestroy=[]},bind:function(e){var t,n,i,r,o=this.target.nodeName.toLowerCase(),a=D[o]||{};for(t in e)t==F?n=!0:t==I?i=!0:t==z?r=!0:this.applyBinding(t,e,a);i&&this.applyBinding(I,e,a),n&&this.applyBinding(F,e,a),r&&this.applyBinding(z,e,a)},applyBinding:function(e,t,n){var i,r=n[e]||D[e],o=this.toDestroy,a=t[e];if(r)if(r=new r(this.target,t,this.options),o.push(r),a instanceof f)r.bind(a),o.push(a);else for(i in a)r.bind(a,i),o.push(a[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()}}),b=_.extend({bind:function(e){var t,n=this,i=!1,r=!1,o=D.widget[n.target.options.name.toLowerCase()]||{};for(t in e)t==F?i=!0:t==I?r=!0:n.applyBinding(t,e);r&&n.applyBinding(I,e),i&&n.applyBinding(F,e,o[F])},applyBinding:function(e,t,n){var i,r=n||D.widget[e],o=this.toDestroy,a=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),o.push(r),a instanceof f)r.bind(a),o.push(a);else for(i in a)r.bind(a,i),o.push(a[i])}}),y=/[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g,w=/\s/g,k.unbind=u,k.bind=s,k.data.binders=D,k.data.Binder=v,k.notify=p,k.observable=function(e){return e instanceof C||(e=new C(e)),e},k.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 o,a=window.kendo,s=a.ui.Widget,l=".kendoValidator",d="k-invalid-msg",c=RegExp(d,"i"),u="k-invalid",p=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,h=/^(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])",g=":checkbox:not([disabled],[readonly])",m="[type=number],[type=range]",v="blur",_="name",b="form",y="novalidate",w=e.proxy,k=function(e,t){return"string"==typeof t&&(t=RegExp("^(?:"+t+")$")),t.test(e) },x=function(e,t,n){var i=e.val();return e.filter(t).length&&""!==i?k(i,n):!0},C=function(e,t){return e.length?null!=e[0].attributes[t]:!1};a.ui.validator||(a.ui.validator={rules:{},messages:{}}),o=s.extend({init:function(n,i){var r=this,o=t(n);i=i||{},i.rules=e.extend({},a.ui.validator.rules,o.rules,i.rules),i.messages=e.extend({},a.ui.validator.messages,o.messages,i.messages),s.fn.init.call(r,n,i),r._errorTemplate=a.template(r.options.errorTemplate),r.element.is(b)&&r.element.attr(y,y),r._errors={},r._attachEvents()},events:["validate"],options:{name:"Validator",errorTemplate:' #=message#',messages:{required:"{0} is required",pattern:"{0} is not valid",min:"{0} should be greater than or equal to {1}",max:"{0} should be smaller than or equal to {1}",step:"{0} is not valid",email:"{0} is not valid email",url:"{0} is not valid URL",date:"{0} is not valid date"},rules:{required:function(e){var t=e.filter("[type=checkbox]").length&&!e.is(":checked"),n=e.val();return!(C(e,"required")&&(""===n||!n||t))},pattern:function(e){return e.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length&&""!==e.val()?k(e.val(),e.attr("pattern")):!0},min:function(e){if(e.filter(m+",["+a.attr("type")+"=number]").filter("[min]").length&&""!==e.val()){var t=parseFloat(e.attr("min"))||0,n=a.parseFloat(e.val());return n>=t}return!0},max:function(e){if(e.filter(m+",["+a.attr("type")+"=number]").filter("[max]").length&&""!==e.val()){var t=parseFloat(e.attr("max"))||0,n=a.parseFloat(e.val());return t>=n}return!0},step:function(e){if(e.filter(m+",["+a.attr("type")+"=number]").filter("[step]").length&&""!==e.val()){var t,n=parseFloat(e.attr("min"))||0,r=parseFloat(e.attr("step"))||1,o=parseFloat(e.val()),s=i(r);return s?(t=Math.pow(10,s),0===(o-n)*t%(r*t)/Math.pow(100,s)):0===(o-n)%r}return!0},email:function(e){return x(e,"[type=email],["+a.attr("type")+"=email]",p)},url:function(e){return x(e,"[type=url],["+a.attr("type")+"=url]",h)},date:function(e){return e.filter("[type^=date],["+a.attr("type")+"=date]").length&&""!==e.val()?null!==a.parseDate(e.val(),e.attr(a.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(b)&&t.element.on("submit"+l,w(t._submit,t)),t.options.validateOnBlur&&(t.element.is(f)?(t.element.on(v+l,function(){t.validateInput(t.element)}),t.element.is(g)&&t.element.on("click"+l,function(){t.validateInput(t.element)})):(t.element.on(v+l,f,function(){t.validateInput(e(this))}),t.element.on("click"+l,g,function(){t.validateInput(e(this))})))},validate:function(){var e,t,n,i,r=!1;if(this._errors={},this.element.is(f))r=this.validateInput(this.element);else{for(i=!1,e=this.element.find(f),t=0,n=e.length;n>t;t++)this.validateInput(e.eq(t))||(i=!0);r=!i}return this.trigger("validate",{valid:r}),r},validateInput:function(t){var i,o,a,s,l,c,p,h,f;return t=e(t),o=this,a=o._errorTemplate,s=o._checkValidity(t),l=s.valid,c="."+d,p=t.attr(_)||"",h=o._findMessageContainer(p).add(t.next(c)).hide(),t.removeAttr("aria-invalid"),l||(i=o._extractMessage(t,s.key),o._errors[p]=i,f=r(a({message:n(i)})),o._decorateMessageContainer(f,p),h.replaceWith(f).length||f.insertAfter(t),f.show(),t.attr("aria-invalid",!0)),t.toggleClass(u,!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,o,s,l=a.ui.validator.messageLocators,d=e(),u=this.element[0].getElementsByTagName("*");for(i=0,r=u.length;r>i;i++)o=u[i],c.test(o.className)&&(s=o.getAttribute(a.attr("for")),s===t&&(d=d.add(o)));for(n in l)d=d.add(l[n].locate(this.element,t));return d},_decorateMessageContainer:function(e,t){var n,i=a.ui.validator.messageLocators;e.addClass(d).attr(a.attr("for"),t||"");for(n in i)i[n].decorate(e,t);e.attr("role","alert")},_extractMessage:function(e,t){var n=this,i=n.options.messages[t],r=e.attr(_);return i=a.isFunction(i)?i(e):i,a.format(e.attr(a.attr(t+"-msg"))||e.attr("validationMessage")||e.attr("title")||i||"",r,e.attr(t))},_checkValidity:function(e){var t,n=this.options.rules;for(t in n)if(!n[t](e))return{valid:!1,key:t};return{valid:!0}},errors:function(){var e,t=[],n=this._errors;for(e in n)t.push(n[e]);return t}}),a.ui.plugin(o)}(window.kendo.jQuery),function(e){function t(e,t){var n=e.x.location,i=e.y.location,r=t.x.location,o=t.y.location,a=n-r,s=i-o;return{center:{x:(n+r)/2,y:(i+o)/2},distance:Math.sqrt(a*a+s*s)}}function n(e){var t,n,i,r=[],o=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=o?o.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 a.pointers||a.msPointers?r.push({location:o,event:e,target:e.target,currentTarget:s,id:o.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=o.eventMap.up.split(" "),n=0,i=t.length;i>n;n++)e(t[n])}var o=window.kendo,a=o.support,s=window.document,l=o.Class,d=o.Observable,c=e.now,u=e.extend,p=a.mobileOS,h=p&&p.android,f=800,g=a.browser.ie?5:0,m="press",v="hold",_="select",b="start",y="move",w="end",k="cancel",x="tap",C="release",T="gesturestart",S="gesturechange",D="gestureend",A="gesturetap",E=l.extend({init:function(e,t){var n=this;n.axis=e,n._updateLocationData(t),n.startLocation=n.location,n.velocity=n.delta=0,n.timeStamp=c()},move:function(e){var t=this,n=e["page"+t.axis],i=c(),r=i-t.timeStamp||1;(n||!h)&&(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]}}),P=l.extend({init:function(e,t,n){var i=this;u(i,{x:new E("X",n.location),y:new E("Y",n.location),userEvents:e,target:t,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,_moved:!1,_finished:!1}),i.press=function(){i._trigger(m,n),i._holdTimeout=setTimeout(function(){i._trigger(v,n)},e.minHold)}},move:function(e){var t=this;if(!t._finished){if(t.x.move(e.location),t.y.move(e.location),!t._moved){if(t._withinIgnoreThreshold())return;if(F.current&&F.current!==t.userEvents)return t.dispose();t._start(e)}t._finished||t._trigger(y,e)}},end:function(e){var t=this;t.endTime=c(),t._finished||(t._moved?t._trigger(w,e):t._trigger(x,e),clearTimeout(t._holdTimeout),t._trigger(C,e),t.dispose())},dispose:function(){var t=this,n=t.userEvents,i=n.touches;t._finished=!0,i.splice(e.inArray(t,i),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(e){clearTimeout(this._holdTimeout),this.startTime=c(),this._moved=!0,this._trigger(b,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}}),F=d.extend({init:function(t,n){var i,l,c,p=this,h=o.guid();n=n||{},i=p.filter=n.filter,p.threshold=n.threshold||g,p.minHold=n.minHold||f,p.touches=[],p._maxTouches=n.multiTouch?2:1,p.allowSelection=n.allowSelection,p.captureUpIfMoved=n.captureUpIfMoved,p.eventNS=h,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(o.applyEventMap("move",h),"_move").on(o.applyEventMap("up cancel",h),"_end"),t.on(o.applyEventMap("down",h),i,"_start"),(a.pointers||a.msPointers)&&t.css("-ms-touch-action","pinch-zoom double-tap-zoom"),n.preventDragEvent&&t.on(o.applyEventMap("dragstart",h),o.preventDefault),t.on(o.applyEventMap("mousedown selectstart",h),i,{root:t},"_select"),p.captureUpIfMoved&&a.eventCapture&&(l=p.surface[0],c=e.proxy(p.preventIfMoving,p),r(function(e){l.addEventListener(e,c,!0)})),p.bind([m,v,x,b,y,w,C,k,T,S,D,A,_],n)},preventIfMoving:function(e){this._isMoved()&&e.preventDefault()},destroy:function(){var e,t=this;t._destroyed||(t._destroyed=!0,t.captureUpIfMoved&&a.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(){F.current=this},cancel:function(){this._disposeAll(),this.trigger(k)},notify:function(e,n){var i=this,r=i.touches;if(this._isMultiTouch()){switch(e){case y:e=S;break;case w:e=D;break;case x:e=A}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(){for(var e=this.touches;e.length>0;)e.pop().dispose()},_isMoved:function(){return e.grep(this.touches,function(e){return e.isMoved()}).length},_select:function(e){(!this.allowSelection||this.trigger(_,{event:e}))&&i(e)},_start:function(t){var i,r,o=this,a=0,s=o.filter,l=n(t),d=l.length;if(!o._maxTouchesReached())for(F.current=null,o.currentTarget=t.currentTarget,o.stopPropagation&&t.stopPropagation();d>a&&!o._maxTouchesReached();a++)r=l[a],i=s?e(r.currentTarget):o.element,i.length&&(r=new P(o,i,r),o.touches.push(r),r.press(),o._isMultiTouch()&&o.notify("gesturestart",{}))},_move:function(e){this._eachTouch("move",e)},_end:function(e){this._eachTouch("end",e)},_eachTouch:function(e,t){var i,r,o,a,s=this,l={},d=n(t),c=s.touches;for(i=0;ia;a++)if(r=n[a],r.element[0]===e)return{target:r,targetElement:e};for(a=0;l>a;a++)if(o=i[a],g.matchesSelector.call(e,o.options.filter))return{target:o,targetElement:e};e=e.parentNode}return t}var l,d,c,u,p,h,f=window.kendo,g=f.support,m=window.document,v=f.Class,_=f.ui.Widget,b=f.Observable,y=f.UserEvents,w=e.proxy,k=e.extend,x=f.getOffset,C={},T={},S={},D=g.mobileOS,A=D&&D.android,E=A&&"chrome"==D.browser,P="keyup",F="change",I="dragstart",z="hold",M="drag",B="dragend",R="dragcancel",H="dragenter",L="dragleave",O="drop",V=b.extend({init:function(t,n){var i=this,r=t[0];i.capture=!1,r.addEventListener?(e.each(f.eventMap.down.split(" "),function(){r.addEventListener(this,w(i._press,i),!0)}),e.each(f.eventMap.up.split(" "),function(){r.addEventListener(this,w(i._release,i),!0)})):(e.each(f.eventMap.down.split(" "),function(){r.attachEvent(this,w(i._press,i))}),e.each(f.eventMap.up.split(" "),function(){r.attachEvent(this,w(i._release,i))})),b.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())}}),N=b.extend({init:function(t){var n=this;b.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(F,t)}}),U=b.extend({init:function(e){var t=this;b.fn.init.call(t),t.x=new N(k({horizontal:!0},e)),t.y=new N(k({horizontal:!1},e)),t.container=e.container,t.forcedMinScale=e.minScale,t.maxScale=e.maxScale||100,t.bind(F,e)},rescale:function(e){this.x.rescale(e),this.y.rescale(e),this.refresh()},centerCoordinates:function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},refresh:function(){var e=this;e.x.update(),e.y.update(),e.enabled=e.x.enabled||e.y.enabled,e.minScale=e.forcedMinScale||Math.min(e.x.minScale,e.y.minScale),e.fitScale=Math.max(e.x.minScale,e.y.minScale),e.trigger(F)}}),W=b.extend({init:function(e){var t=this;k(t,e),b.fn.init.call(t)},dragMove:function(e){var t=this,n=t.dimension,i=t.axis,r=t.movable,o=r[i]+e;n.enabled&&((oe||o>n.max&&e>0)&&(e*=t.resistance),r.translateAxis(i,e),t.trigger(F,t))}}),j=v.extend({init:function(e){var t,n,i,r,o=this;k(o,{elastic:!0},e),i=o.elastic?.5:0,r=o.movable,o.x=t=new W({axis:"x",dimension:o.dimensions.x,resistance:i,movable:r}),o.y=n=new W({axis:"y",dimension:o.dimensions.y,resistance:i,movable:r}),o.userEvents.bind(["move","end","gesturestart","gesturechange"],{gesturestart:function(e){o.gesture=e,o.offset=o.dimensions.container.offset()},gesturechange:function(e){var i,a,s,l=o.gesture,d=l.center,c=e.center,u=e.distance/l.distance,p=o.dimensions.minScale,h=o.dimensions.maxScale;r.scale<=p&&1>u&&(u+=.8*(1-u)),r.scale*u>=h&&(u=h/r.scale),a=r.x+o.offset.left,s=r.y+o.offset.top,i={x:(a-d.x)*u+c.x-a,y:(s-d.y)*u+c.y-s},r.scaleWith(u),t.dragMove(i.x),n.dragMove(i.y),o.dimensions.rescale(r.scale),o.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=g.transitions.prefix+"Transform";d=g.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=b.extend({init:function(t){var n=this;b.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){k(this,e),this.refresh()},refresh:function(){var e,t=this,n=t.x,i=t.y;t.round&&(n=Math.round(n),i=Math.round(i)),e=d(n,i,t.scale),e!=t.coordinates&&(f.support.browser.msie&&f.support.browser.version<10?(t.element[0].style.position="absolute",t.element[0].style.left=t.x+"px",t.element[0].style.top=t.y+"px"):t.element[0].style[q]=e,t._saveCoordinates(e),t.trigger(F))},_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:[H,L,O],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:g,ease:p.easeOutExpo})}}),P=h.extend({init:function(e){var n=this;t.effects.Animation.fn.init.call(this),a(n,e,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return f(this.offset.y)');a(n,t,{element:r,elementSize:0,movable:new d(r),scrollMovable:t.movable,size:i?"width":"height"}),n.scrollMovable.bind(T,o(n._move,n)),n.container.append(r)},_move:function(){var e=this,t=e.axis,n=e.dimension,i=n.size,r=e.scrollMovable,o=i/n.total,a=Math.round(-r[t]*o),s=Math.round(i*o);a+s>i?s=i-a:0>a&&(s+=a,a=0),e.elementSize!=s&&(e.element.css(e.size,s+"px"),e.elementSize=s),e.movable.moveAxis(t,a)},show:function(){this.element.css({opacity:m,visibility:"visible"})},hide:function(){this.element.css({opacity:0})}}),I=s.extend({init:function(e,n){var i,r,o,l,p,h,g,m,v,_=this;return s.fn.init.call(_,e,n),e=_.element,_._native=_.options.useNative&&t.support.hasNativeScrolling,_._native?(e.addClass("km-native-scroller").prepend('
    '),a(_,{scrollElement:e,fixedContainer:e.children().first()}),undefined):(e.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('
    ').prepend('
    '),i=e.children().eq(1),r=new t.TapCapture(e),o=new d(i),l=new u({element:i,container:e,forcedEnabled:_.options.zoom}),p=this.options.avoidScrolling,h=new t.UserEvents(e,{allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:_.options.zoom,start:function(e){l.refresh();var t=f(e.x.velocity),n=f(e.y.velocity),i=2*t>=n,r=2*n>=t;!p(e)&&_.enabled&&(l.x.enabled&&i||l.y.enabled&&r)?h.capture():h.cancel()}}),g=new c({movable:o,dimensions:l,userEvents:h,elastic:_.options.elastic}),m=new A({movable:o,dimensions:l,userEvents:h,tapCapture:r}),v=new P({moveTo:function(e){_.scrollTo(e.x,e.y)}}),o.bind(T,function(){_.scrollTop=-o.y,_.scrollLeft=-o.x,_.trigger(D,{scrollTop:_.scrollTop,scrollLeft:_.scrollLeft})}),a(_,{movable:o,dimensions:l,zoomSnapBack:m,animatedScroller:v,userEvents:h,pane:g,tapCapture:r,pulled:!1,enabled:!0,scrollElement:i,scrollTop:0,scrollLeft:0,fixedContainer:e.children().first()}),_._initAxis("x"),_._initAxis("y"),l.refresh(),_.options.pullToRefresh&&_._initPullToRefresh(),undefined)},makeVirtual:function(){this.dimensions.y.makeVirtual()},virtualSize:function(e,t){this.dimensions.y.virtualSize(e,t)},height:function(){return this.dimensions.y.size},scrollHeight:function(){return this.scrollElement[0].scrollHeight},scrollWidth:function(){return this.scrollElement[0].scrollWidth},options:{name:"Scroller",zoom:!1,pullOffset:140,elastic:!0,useNative:!1,avoidScrolling:function(){return!1},pullToRefresh:!1,pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"},events:[C,D,S],_resize:function(){this._native||this.dimensions.refresh(),this.reset()},setOptions:function(e){var t=this;s.fn.setOptions.call(t,e),e.pullToRefresh&&t._initPullToRefresh()},reset:function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},zoomOut:function(){var e=this.dimensions;e.refresh(),this._scale(e.fitScale),this.movable.moveTo(e.centerCoordinates())},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},scrollTo:function(e,t){this._native?(this.scrollElement.scrollLeft(e),this.scrollElement.scrollTop(t)):(this.dimensions.refresh(),this.movable.moveTo({x:e,y:t}))},animatedScrollTo:function(e,t){var n={x:this.movable.x,y:this.movable.y},i={x:e,y:t};this.animatedScroller.setCoordinates(n,i),this.animatedScroller.start()},pullHandled:function(){var e=this;e.refreshHint.removeClass(x),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd()},destroy:function(){s.fn.destroy.call(this),this.userEvents&&this.userEvents.destroy()},_scale:function(e){this.dimensions.rescale(e),this.movable.scaleTo(e)},_initPullToRefresh:function(){var e=this;e.dimensions.y.forceEnabled(),e.pullTemplate=t.template(e.options.pullTemplate),e.releaseTemplate=t.template(e.options.releaseTemplate),e.refreshTemplate=t.template(e.options.refreshTemplate),e.scrollElement.prepend(''+e.pullTemplate({})+""),e.refreshHint=e.scrollElement.children().first(),e.hintContainer=e.refreshHint.children(".km-template"),e.pane.y.bind("change",o(e._paneChange,e)),e.userEvents.bind("end",o(e._dragEnd,e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(k).addClass(x),e.hintContainer.html(e.refreshTemplate({})),e.yinertia.freeze(e.options.pullOffset/2),e.trigger("pull"))},_paneChange:function(){var e=this;e.movable.y/y>e.options.pullOffset?e.pulled||(e.pulled=!0,e.refreshHint.removeClass(x).addClass(k),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(k),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var t=this,n=t.movable,i=t.dimensions[e],r=t.tapCapture,o=new F({axis:e,movable:n,dimension:i,container:t.element});t.pane[e].bind(T,function(){o.show()}),t[e+"inertia"]=new E({axis:e,movable:n,tapCapture:r,userEvents:t.userEvents,dimension:i,elastic:t.options.elastic,friction:t.options.friction||v,velocityMultiplier:t.options.velocityMultiplier||_,end:function(){o.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,o=!1,a=".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,h,f=this,g=n.guid(),m=r(f._intializePositions,f),v=f._dropCuePositions=[];i.fn.init.call(f,s,c),o=n.support.isRtl(s),h=o?"right":"left",f.draggable=p=f.options.draggable||new n.ui.Draggable(f.element,{filter:f.options.draggableElements,hint:l,group:g}),u=f.groupContainer=e(f.options.groupContainer,f.element).kendoDropTarget({group:p.options.group,dragenter:function(e){f._canDrag(e.draggable.currentTarget)&&(e.draggable.hint.find(".k-drag-status").removeClass("k-denied").addClass("k-add"),d.css("top",t(u)).css(h,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,a=r.attr(n.attr("field")),s=r.attr(n.attr("title")),l=f.indicator(a),c=f._dropCuePositions,u=c[c.length-1];(r.hasClass("k-group-indicator")||f._canDrag(r))&&(u?(i=f._dropCuePosition(n.getOffset(d).left+parseInt(u.element.css("marginLeft"),10)*(o?-1:1)+parseInt(u.element.css("marginRight"),10)),i&&f._canDrop(e(l),i.element,i.left)&&(i.before?i.element.before(l||f.buildIndicator(a,s)):i.element.after(l||f.buildIndicator(a,s)),f._change())):(f.groupContainer.append(f.buildIndicator(a,s)),f._change()))}}).kendoDraggable({filter:"div.k-group-indicator",hint:l,group:p.options.group,dragcancel:r(f._dragCancel,f),dragstart:function(e){var n=e.currentTarget,i=parseInt(n.css("marginLeft"),10),r=n.position(),a=o?r.left-i:r.left+n.outerWidth();m(),d.css({top:t(u),left:a}).appendTo(u),this.hint.find(".k-drag-status").removeClass("k-denied").addClass("k-add")},dragend:function(){f._dragEnd(this)},drag:r(f._drag,f)}).on("click"+a,".k-button",function(t){t.preventDefault(),f._removeIndicator(e(this).parent())}).on("click"+a,".k-link",function(t){var i=e(this).parent(),r=f.buildIndicator(i.attr(n.attr("field")),i.attr(n.attr("title")),"asc"==i.attr(n.attr("dir"))?"desc":"asc");i.before(r).remove(),f._change(),t.preventDefault()}),p.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){f._dragEnd(this)},dragcancel:r(f._dragCancel,f),dragstart:function(e){var t,n,i;return f.options.allowDrag||f._canDrag(e.currentTarget)?(m(),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(f._drag,f)}),f.dataSource=f.options.dataSource,f.dataSource&&(f._refreshHandler=r(f.refresh,f),f.dataSource.bind("change",f._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(a).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,o,a,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=[],o=0,a=i.length;a>o;o++)r.push({field:s,aggregate:i[o]});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,a,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,a=parseInt(n.element.css("marginLeft"),10),s=parseInt(n.element.css("marginRight"),10),t>=r&&!o||i>t&&o?t={left:n.element.position().left+(o?-a:n.element.outerWidth()+s),element:n.element,before:!1}:(t=e.grep(l,function(e){return e.left<=t&&t<=e.right||o&&t>e.right})[0],t&&(t={left:o?t.element.position().left+t.element.outerWidth()+s:t.element.position().left-a,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]||!o&&n>i.position().left||o&&n
    '),a.find(l.options.filter).kendoDropTarget({group:l.options.group,dragenter:function(e){if(d._draggable){var i,r=this.element,o=r[0]===d._draggable[0];t(e.draggable.hint,o),o||(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=a.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(a)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o=e.proxy,a=n.isFunction,s=e.extend,l="horizontal",d="vertical",c="start",u="resize",p="resizeend",h=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:o(n._resize,n),dragcancel:o(n._cancel,n),dragstart:o(n._start,n),dragend:o(n._stop,n)}),n.userEvents=n.draggable.userEvents},events:[u,p,c],options:{name:"Resizable",orientation:l},resize:function(){},_max:function(e){var n=this,i=n.hint?n.hint[n._sizingDom]():0,r=n.options.max;return a(r)?r(e):r!==t?n._initialElementPosition+r-i:r},_min:function(e){var n=this,i=n.options.min;return a(i)?i(e):i!==t?n._initialElementPosition+i:i},_start:function(t){var n=this,i=n.options.hint,r=e(t.currentTarget);n._initialElementPosition=r.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,i&&(n.hint=a(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,o=(e(n.currentTarget),r._maxPosition),a=r._minPosition,l=r._initialElementPosition+(n[r._positionMouse].location-r._initialMousePosition);i=a!==t?Math.max(a,l):l,r.position=i=o!==t?Math.min(o,i):i,r.hint&&r.hint.toggleClass(r.options.invalidClass||"",i==o||i==a).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,o=n.position;o===t&&(o=r[i]),r[i]=o+e,n.userEvents.move(r.left,r.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});n.ui.plugin(h)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.proxy,r="dir",o="asc",a="single",s="field",l="desc",d=".kendoSortable",c=".k-link",u="aria-sort",p=n.ui.Widget,h=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:a,allowUnsort:!0,compare:null,filter:""},destroy:function(){var e=this;p.fn.destroy.call(e),e.element.off(d),e.dataSource.unbind("change",e._refreshHandler)},refresh:function(){var t,i,a,d,c=this,p=c.dataSource.sort()||[],h=c.element,f=h.attr(n.attr(s));for(h.removeAttr(n.attr(r)),h.removeAttr(u),t=0,i=p.length;i>t;t++)a=p[t],f==a.field&&h.attr(n.attr(r),a.dir);d=h.attr(n.attr(r)),h.find(".k-i-arrow-n,.k-i-arrow-s").remove(),d===o?(e('').appendTo(c.link),h.attr(u,"ascending")):d===l&&(e('').appendTo(c.link),h.attr(u,"descending"))},_click:function(e){var i,d,c=this,u=c.element,p=u.attr(n.attr(s)),h=u.attr(n.attr(r)),f=c.options,g=c.options.compare,m=c.dataSource.sort()||[];if(e.preventDefault(),!f.filter||u.is(f.filter)){if(h=h===o?l:h===l&&f.allowUnsort?t:o,f.mode===a)m=[{field:p,dir:h,compare:g}];else if("multiple"===f.mode){for(i=0,d=m.length;d>i;i++)if(m[i].field===p){m.splice(i,1);break}m.push({field:p,dir:h,compare:g})}c.dataSource.sort(m)}}});n.ui.plugin(h)}(window.kendo.jQuery),function(e){function t(e,t){var n=r.getOffset(e),i=t.left+t.width,o=t.top+t.height;return n.right=n.left+e.outerWidth(),n.bottom=n.top+e.outerHeight(),!(n.left>i||n.righto||n.bottomo;o++)s=e.eq(o),t(s,i)?s.hasClass(d)?r&&n!==s[0]&&s.removeClass(d).addClass(f):s.hasClass(c)||s.hasClass(f)||s.addClass(c):s.hasClass(c)?s.removeClass(c):r&&s.hasClass(f)&&s.removeClass(f).addClass(d)}var i,r=window.kendo,o=r.ui.Widget,a=e.proxy,s=Math.abs,l="aria-selected",d="k-state-selected",c="k-state-selecting",u="k-selectable",p="change",h=".kendoSelectable",f="k-state-unselecting",g=!1;!function(e){!function(){e('
    ').on("click",">*",function(){g=!0}).find("span").click().end().off()}()}(e),i=o.extend({init:function(t,n){var i,s=this;o.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:(g?"":"."+u+" ")+s.options.filter,tap:a(s._tap,s)}),i&&s.userEvents.bind("start",a(s._start,s)).bind("move",a(s._move,s)).bind("end",a(s._end,s)).bind("select",a(s._select,s))},events:[p],options:{name:"Selectable",filter:">*",multiple:!1},_tap:function(t){var n,i=e(t.target),r=this,o=t.event.ctrlKey||t.event.metaKey,a=r.options.multiple,s=a&&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),a&&o||r.clear(),s?r.selectRange(r._firstSelectee(),i):(n&&o?(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),o=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}),o||n.clear(),r&&(n._selectElement(i,!0),o&&i.addClass(f)),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+"."+f)).removeClass(f),e.value(e.element.find(e.options.filter+"."+c)),e._lastActive=e._downTarget},value:function(e){var t=this,n=a(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){var n="input,a,textarea,.k-multiselect-wrap,select",i=r.support.browser.msie;e(t.event.target).is(n)?(this.userEvents.cancel(),this._downTarget=null):(!i||i&&!e(r._activeElement()).is(n))&&t.preventDefault()},clear:function(){var e=this.element.find(this.options.filter+"."+d);this._unselect(e)},selectRange:function(t,n){var i,r,o,s,l=this,c=!1,u=l.element.find(l.options.filter),h=a(l._selectElement,l);for(t=e(t)[0],n=e(n)[0],i=0,r=u.length;r>i;i++)s=u[i],c?(h(s),c=s!==n):s===t?(c=t!==n,h(s)):s===n?(o=t,t=n,n=o,c=!0,h(s)):e(s).removeClass(d);l._notify(p)},destroy:function(){var e=this;o.fn.destroy.call(e),e.element.off(h),e.userEvents.destroy()}}),r.ui.plugin(i)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui.Widget,r=e.proxy,o=n.keys,a="click",s="k-button",l="k-button-icon",d="k-button-icontext",c=".kendoButton",u="disabled",p="k-state-disabled",h="k-state-focused",f="k-state-selected",g=i.extend({init:function(e,t){var o=this;i.fn.init.call(o,e,t),e=o.wrapper=o.element,t=o.options,e.addClass(s).attr("role","button"),t.enable=t.enable&&!e.attr(u),o.enable(t.enable),o._tabindex(),o._graphics(),e.on(a+c,r(o._click,o)).on("focus"+c,r(o._focus,o)).on("blur"+c,r(o._blur,o)).on("keydown"+c,r(o._keydown,o)).on("keyup"+c,r(o._keyup,o)),n.notify(o)},events:[a],options:{name:"Button",icon:"",spriteCssClass:"",imageUrl:"",enable:!0},_isNativeButton:function(){return"button"==this.element.prop("tagName").toLowerCase()},_click:function(e){this.options.enable&&this.trigger(a,{event:e})},_focus:function(){this.options.enable&&this.element.addClass(h)},_blur:function(){this.element.removeClass(h)},_keydown:function(e){var t=this;t._isNativeButton()||(e.keyCode==o.ENTER||e.keyCode==o.SPACEBAR)&&(e.keyCode==o.SPACEBAR&&(e.preventDefault(),t.options.enable&&t.element.addClass(f)),t._click(e))},_keyup:function(){this.element.removeClass(f)},_graphics:function(){var t,n,i,r=this,o=r.element,a=r.options,s=a.icon,c=a.spriteCssClass,u=a.imageUrl;(c||u||s)&&(i=!0,o.contents().not("span.k-sprite").not("span.k-icon").not("img.k-image").each(function(e,t){(1==t.nodeType||3==t.nodeType&&t.nodeValue.trim().length>0)&&(i=!1)}),i?o.addClass(l):o.addClass(d)),s?(t=o.children("span.k-icon").first(),t[0]||(t=e('').prependTo(o)),t.addClass("k-i-"+s)):c?(t=o.children("span.k-sprite").first(),t[0]||(t=e('').prependTo(o)),t.addClass(c)):u&&(n=o.children("img.k-image").first(),n[0]||(n=e('icon').prependTo(o)),n.attr("src",u))},enable:function(e){var n=this,i=n.element;e===t&&(e=!0),e=!!e,n.options.enable=e,i.toggleClass(p,!e).attr("aria-disabled",!e).attr(u,!e)}});n.ui.plugin(g)}(window.kendo.jQuery),function(e,t){function n(e,t,n,i){return e({idx:t,text:n,ns:d.ns,numeric:i})}function i(e,t,n){return k({className:e.substring(1),text:t,wrapClassName:n||""})}function r(e,t,n,i){e.find(t).parent().attr(d.attr("page"),n).attr("tabindex",-1).toggleClass("k-state-disabled",i)}function o(e,t){r(e,h,1,1>=t)}function a(e,t){r(e,g,Math.max(1,t-1),1>=t)}function s(e,t,n){r(e,m,Math.min(n,t+1),t>=n)}function l(e,t,n){r(e,f,n,t>=n)}var d=window.kendo,c=d.ui,u=c.Widget,p=e.proxy,h=".k-i-seek-w",f=".k-i-seek-e",g=".k-i-arrow-w",m=".k-i-arrow-e",v="change",_=".kendoPager",b="click",y="keydown",w="disabled",k=d.template('
    #=text#'),x=u.extend({init:function(t,n){var r,c,w=this;u.fn.init.call(w,t,n),n=w.options,w.dataSource=d.data.DataSource.create(n.dataSource),w.linkTemplate=d.template(w.options.linkTemplate),w.selectTemplate=d.template(w.options.selectTemplate),r=w.page(),c=w.totalPages(),w._refreshHandler=p(w.refresh,w),w.dataSource.bind(v,w._refreshHandler),n.previousNext&&(w.element.find(h).length||(w.element.append(i(h,n.messages.first,"k-pager-first")),o(w.element,r,c)),w.element.find(g).length||(w.element.append(i(g,n.messages.previous)),a(w.element,r,c))),n.numeric&&(w.list=w.element.find(".k-pager-numbers"),w.list.length||(w.list=e('
      ').appendTo(w.element))),n.input&&(w.element.find(".k-pager-input").length||w.element.append(''+n.messages.page+''+d.format(n.messages.of,c)+""),w.element.on(y+_,".k-pager-input input",p(w._keydown,w))),n.previousNext&&(w.element.find(m).length||(w.element.append(i(m,n.messages.next)),s(w.element,r,c)),w.element.find(f).length||(w.element.append(i(f,n.messages.last,"k-pager-last")),l(w.element,r,c))),n.pageSizes&&(w.element.find(".k-pager-sizes").length||e(''+d.format(f.messages.of,v)).find("input").val(h).attr(w,1>m).toggleClass("k-state-disabled",1>m),f.previousNext&&(o(c.element,h,v),a(c.element,h,v),s(c.element,h,v),l(c.element,h,v)),f.pageSizes&&c.element.find(".k-pager-sizes select").val(g).filter("["+d.attr("role")+"=dropdownlist]").kendoDropDownList("value",g).kendoDropDownList("text",g)}},_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,o=n.support,a=n.getOffset,s=n._activeElement,l="open",d="close",c="deactivate",u="activate",p="center",h="left",f="right",g="top",m="bottom",v="absolute",_="hidden",b="body",y="location",w="position",k="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",A="down",E=e(window),P=e(document.documentElement),F="resize scroll",I=o.transitions.css,z=I+"transform",M=e.extend,B=".kendoPopup",R=["font-family","font-size","font-stretch","font-style","font-weight","line-height"],H=r.extend({init:function(t,i){var o,a=this;i=i||{},i.isRtl&&(i.origin=i.origin||m+" "+f,i.position=i.position||g+" "+f),r.fn.init.call(a,t,i),t=a.element,i=a.options,a.collisions=i.collision?i.collision.split(" "):[],1===a.collisions.length&&a.collisions.push(a.collisions[0]),o=e(a.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),i.appendTo=e(e(i.appendTo)[0]||o[0]||b),a.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!i.isRtl).css({position:v}).appendTo(i.appendTo).on("mouseenter"+B,function(){a._hovered=!0}).on("mouseleave"+B,function(){a._hovered=!1}),a.wrapper=e(),i.animation===!1&&(i.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),M(i.animation.open,{complete:function(){a.wrapper.css({overflow:k}),a.trigger(u)}}),M(i.animation.close,{complete:function(){a.wrapper.hide();var r,o,s=a.wrapper.data(y),l=e(i.anchor);s&&a.wrapper.css(s),i.anchor!=b&&(r=(l[0].className.match(S)||["","down"])[1],o=T+"-"+r,l.removeClass(o).children(D).removeClass(C).removeClass(o),t.removeClass(T+"-"+n.directions[r].reverse)),a._closing=!1,a.trigger(c)}}),a._mousedownProxy=function(e){a._mousedown(e)},a._resizeProxy=function(e){a._resize(e)},i.toggleTarget&&e(i.toggleTarget).on(i.toggleEvent+B,e.proxy(a.toggle,a))},events:[l,u,d,c],options:{name:"Popup",toggleEvent:"click",origin:m+" "+h,position:g+" "+h,anchor:b,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},destroy:function(){var t,i=this,o=i.options,a=i.element.off(B);r.fn.destroy.call(i),o.toggleTarget&&e(o.toggleTarget).off(B),o.modal||(P.unbind(A,i._mousedownProxy),E.unbind(F,i._resizeProxy)),o.appendTo[0]===document.body&&(t=a.parent(".k-animation-container"),t[0]?t.remove():a.remove()),n.destroy(i.element.children())},open:function(t,i){var r,a,s,d=this,c={isFixed:!isNaN(parseInt(i,10)),x:t,y:i},u=d.element,p=d.options,h="down",f=e(p.anchor);if(!d.visible()){if(p.copyAnchorStyles&&u.css(n.getComputedStyles(f[0],R)),u.data("animating")||d.trigger(l))return;p.modal||(P.unbind(A,d._mousedownProxy).bind(A,d._mousedownProxy),o.mobileOS.ios||o.mobileOS.android||E.unbind(F,d._resizeProxy).bind(F,d._resizeProxy)),d.wrapper=a=n.wrap(u,p.autosize).css({overflow:_,display:"block",position:v}),o.mobileOS.android&&a.add(f).css(z,"translatez(0)"),a.css(w),e(p.appendTo)[0]==document.body&&a.css(g,"-10000px"),r=M(!0,{},p.animation.open),d.flipped=d._position(c),r.effects=n.parseEffects(r.effects,d.flipped),h=r.effects.slideIn?r.effects.slideIn.direction:h,p.anchor!=b&&(s=T+"-"+h,u.addClass(T+"-"+n.directions[h].reverse),f.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(":"+k)},close:function(){var t,i,r,o,a=this,s=a.options;if(a.visible()){if(t=a.wrapper[0]?a.wrapper:n.wrap(a.element).hide(),a._closing||a.trigger(d))return;a.element.find(".k-popup").each(function(){var t=e(this),n=t.data("kendoPopup");n&&n.close()}),P.unbind(A,a._mousedownProxy),E.unbind(F,a._resizeProxy),i=M(!0,{},s.animation.close),r=a.element.data(x),o=i.effects,!o&&!n.size(o)&&r&&n.size(r)&&(i.effects=r,i.reverse=!0),a._closing=!0,a.element.kendoStop(!0),t.css({overflow:_}),a.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,o=r.element[0],a=r.options,s=e(a.anchor)[0],l=a.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])&&"popover"!==e(i.target).closest("a").data("rel")&&(t(o,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,o,a){var s=0;return a=a||t,o!==r&&o!==p&&r!==p&&(e+a>i&&(s+=-(n+t)),0>e+s&&(s+=n+t)),s},_position:function(t){var n,i,r,s,l,d,c,u,p,h=this,f=h.element.css(w,""),g=h.wrapper,m=h.options,_=e(m.viewport),b=e(_).offset(),k=e(m.anchor),x=m.origin.toLowerCase().split(" "),C=m.position.toLowerCase().split(" "),T=h.collisions,S=o.zoomLevel(),D=10002,A=0,E=k.parents().filter(g.siblings());if(E[0])if(i=Number(e(E).css("zIndex")))D=i+1;else for(n=k.parentsUntil(E),r=n.length;r>A;A++)i=Number(e(n[A]).css("zIndex")),i&&i>D&&(D=i+1);return g.css("zIndex",D),t&&t.isFixed?g.css({left:t.x,top:t.y}):g.css(h._align(x,C)),s=a(g,w,k[0]===g.offsetParent()[0]),l=a(g),d=k.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),d.length&&(s=a(g,w,!0),l=a(g)),_[0]===window?(l.top-=window.pageYOffset||document.documentElement.scrollTop||0,l.left-=window.pageXOffset||document.documentElement.scrollLeft||0):(l.top-=b.top,l.left-=b.left),h.wrapper.data(y)||g.data(y,M({},s)),c=M({},l),u=M({},s),"fit"===T[0]&&(u.top+=h._fit(c.top,g.outerHeight(),_.height()/S)),"fit"===T[1]&&(u.left+=h._fit(c.left,g.outerWidth(),_.width()/S)),p=M({},u),"flip"===T[0]&&(u.top+=h._flip(c.top,f.outerHeight(),k.outerHeight(),_.height()/S,x[0],C[0],g.outerHeight())),"flip"===T[1]&&(u.left+=h._flip(c.left,f.outerWidth(),k.outerWidth(),_.width()/S,x[1],C[1],g.outerWidth())),f.css(w,v),g.css(u),u.left!=p.left||u.top!=p.top},_align:function(t,n){var i,r=this,o=r.wrapper,s=e(r.options.anchor),l=t[0],d=t[1],c=n[0],u=n[1],h=a(s),g=e(r.options.appendTo),v=o.outerWidth(),_=o.outerHeight(),b=s.outerWidth(),y=s.outerHeight(),w=h.top,k=h.left,x=Math.round;return g[0]!=document.body&&(i=a(g),w-=i.top,k-=i.left),l===m&&(w+=y),l===p&&(w+=x(y/2)),c===m&&(w-=_),c===p&&(w-=x(_/2)),d===f&&(k+=b),d===p&&(k+=x(b/2)),u===f&&(k-=v),u===p&&(k-=x(v/2)),{top:w,left:k}}});i.plugin(H)}(window.kendo.jQuery),function(e){function t(e){for(;e.length;)n(e),e=e.parent()}function n(e){var t=e.data(o.ns+"title");t&&(e.attr("title",t),e.removeData(o.ns+"title"))}function i(e){var t=e.attr("title");t&&(e.data(o.ns+"title",t),e.attr("title",""))}function r(e){for(;e.length&&!e.is("body");)i(e),e=e.parent()}var o=window.kendo,a=o.ui.Widget,s=o.ui.Popup,l=o.isFunction,d=e.isPlainObject,c=e.extend,u=e.proxy,p=e(document),h=o.isLocalUrl,f="_tt_active",g="aria-describedby",m="show",v="hide",_="error",b="contentLoad",y="requestStart",w="k-content-frame",k='',x=o.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"},A={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}},E=function(e){return e.target.data(o.ns+"title")},P=a.extend({init:function(e,t){var n,i=this;a.fn.init.call(i,e,t),n=i.options.position.match(/left|right/)?"horizontal":"vertical",i.dimensions=A[n],i._documentKeyDownHandler=u(i._documentKeyDown,i),i.element.on(i.options.showOn+C,i.options.filter,u(i._showOn,i)).on("mouseenter"+C,i.options.filter,u(i._mouseenter,i)),this.options.autoHide&&i.element.on("mouseleave"+C,i.options.filter,u(i._mouseleave,i))},options:{name:"Tooltip",filter:"",content:E,showAfter:100,callout:!0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{effects:"fade:out",duration:40,hide:!0}}},events:[m,v,b,_,y],_mouseenter:function(t){r(e(t.currentTarget))},_showOn:function(t){var n=this,i=e(t.currentTarget);n.options.showOn&&n.options.showOn.match(/click|focus/)?n._show(i):(clearTimeout(n.timeout),n.timeout=setTimeout(function(){n._show(i)},n.options.showAfter))},_appendContent:function(e){var t,n=this,i=n.options.content,r=n.content,a=n.options.iframe;d(i)&&i.url?("iframe"in n.options||(a=!h(i.url)),n.trigger(y,{options:i,target:e}),a?(r.hide(),t=r.find("."+w)[0],t?t.src=i.url||t.src:r.html(x({content:i})),r.find("."+w).off("load"+C).on("load"+C,function(){n.trigger(b),r.show()})):(r.empty(),o.ui.progress(r,!0),n._ajaxRequest(i))):i&&l(i)?(i=i({sender:this,target:e}),n.content.html(i||"")):n.content.html(i)},_ajaxRequest:function(e){var t=this;jQuery.ajax(c({type:"GET",dataType:"html",cache:!1,error:function(e,n){o.ui.progress(t.content,!1),t.trigger(_,{status:n,xhr:e})},success:u(function(e){o.ui.progress(t.content,!1),t.content.html(e),t.trigger(b)},t)},e))},_documentKeyDown:function(e){e.keyCode===o.keys.ESC&&this.hide()},refresh:function(){var e=this,t=e.popup;t&&t.options.anchor&&e._appendContent(t.options.anchor)},hide:function(){this.popup&&this.popup.close()},show:function(e){e=e||this.element,r(e),this._show(e)},_show:function(e){var 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(g),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(o.template(k)({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(g,i+f),this.element.attr("id",i+f)),n.callout&&t._positionCallout(),this.element.removeAttr("aria-hidden"),p.on("keydown"+C,t._documentKeyDownHandler),t.trigger(m)},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(),o=n.pageX,a=n.pageY;if(r.right=r.left+i.outerWidth(),r.bottom=r.top+i.outerHeight(),o>r.left&&or.top&&a').css({overflow:s.kineticScrollNeeded?"":"auto"}).on("mouseenter"+a,u,function(){e(this).addClass(g)}).on("mouseleave"+a,u,function(){e(this).removeClass(g)}).on("click"+a,u,T(r._click,r)).attr({tabIndex:-1,role:"listbox","aria-hidden":!0}),r.list=e("
      ").append(r.ul).on("mousedown"+a,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._header(),r._accessors(),r._initValue()},options:{valuePrimitive:!1,headerTemplate:""},setOptions:function(e){o.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,o=r.filter()||{};n(o,i.dataTextField),e&&(o=o.filters||[],o.push(e)),r.filter(o)},_header:function(){var t,n=this.options.headerTemplate;e.isFunction(n)&&(n=n()),n&&(this.list.prepend(n),t=this.ul.prev(),this.header=t[0]?t:null)},_initValue:function(){var e=this,t=e.options.value;null!==t?e.element.val(t):(t=e._accessor(),e.options.value=t),e._old=t},_ignoreCase:function(){var e,t=this,n=t.dataSource.reader.model;n&&n.fields&&(e=n.fields[t.options.dataTextField],e&&e.type&&"string"!==e.type&&(t.options.ignoreCase=!1))},items:function(){return this.ul[0].children},current:function(e){var n=this,i=n._optionID;return e===t?n._current:(n._current&&(n._current.removeClass(f).removeAttr("aria-selected").removeAttr(c),n._focused.removeAttr("aria-activedescendant")),e&&(e.addClass(f),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;o.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,o=t.attr(i.attr("text-field")),a=t.attr(i.attr("value-field"));o&&(n.dataTextField=o),a&&(n.dataValueField=a),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,o=n.value();n._isSelect&&!n._bound&&r&&(o=r),o!==n._old?e=!0:i!==t&&i!==n._oldIndex&&(e=!0),e&&(n._old=o,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(b,{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="border-box"!==n.css("box-sizing")?t-(n.outerWidth()-n.width()):t,n.css({fontFamily:r.css("font-family"),width:i}).data(x,i),!0},_popup:function(){var e=this,t=e.list,n=e._focused,o=e.options,a=e.wrapper;e.popup=new r.Popup(t,C({},o.popup,{anchor:a,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:o.animation,isRtl:s.isRtl(a)})),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(g,"mouseenter"===t.type)},_toggle:function(e){var n=this;e=e!==t?e:!n.popup.visible(),s.touch||n._focused[0]===d()||n._focused.focus(),n[e?v:_]()},_scroll:function(e){if(e){e[0]&&(e=e[0]);var t,n,i=this.ul[0],r=e.offsetTop,o=e.offsetHeight,a=i.scrollTop,s=i.clientHeight,l=r+o,d=this._touchScroller;d?(t=d.dimensions.y,t.enabled&&r>t.size&&(r=r-t.size+o+4,d.scrollTo(0,-r))):(n=this.header?this.header.outerHeight():0,i.scrollTop=a>r?r-n:l>a+s?l-s-n:a)}},_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(w,e._progressHandler).unbind(k,e._requestEndHandler).unbind("error",e._errorHandler)}});C(P,{caret:function(e){var t,n=e.ownerDocument.selection;return t=n?Math.abs(n.createRange().moveStart(h,-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(h,t),i.moveEnd(h,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=P,r.Select=P.extend({init:function(e,t){P.fn.init.call(this,e,t),this._initial=this.element.val()},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this._bound=!1,this.options.autoBind&&this.dataSource.fetch()},close:function(){this.popup.close()},select:function(e){var n=this;return e===t?n.selectedIndex:(n._select(e),n._triggerCascade(),n._old=n._accessor(),n._oldIndex=n.selectedIndex,t)},_accessor:function(e,n){var i,r=this.element[0],o=this._isSelect,a=r.selectedIndex;return e===t?(o?a>-1&&(i=r.options[a],i&&(e=i.value)):e=r.value,e):(o?(a>-1&&r.options[a].removeAttribute(y),r.selectedIndex=n,i=r.options[n],i&&i.setAttribute(y,y)):r.value=e,t)},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrow.removeClass(m),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(m)},100))},_requestEnd:function(){this._request=!1},_dataSource:function(){var t,n=this,r=n.element,o=n.options,a=o.dataSource||{};a=e.isArray(a)?{data:a}:a,n._isSelect&&(t=r[0].selectedIndex,t>-1&&(o.index=t),a.select=r,a.fields=[{field:o.dataTextField},{field:o.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(a).bind(p,n._refreshHandler).bind(w,n._progressHandler).bind(k,n._requestEndHandler).bind("error",n._errorHandler)},_get:function(t){var n,i,r=this,o=r._data();if("function"==typeof t)for(n=0,i=o.length;i>n;n++)if(t(o[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,o=i.ul[0],s=i.popup.visible()?"_select":"_accept",l=i._current,d=r===a.DOWN;if(r===a.UP||d){if(e.altKey)i.toggle(d);else{if(t=o.firstChild,!t&&!i._accessor()&&"filter"!==i._state)return i._fetch||(i.dataSource.one(p,function(){i._move(e),i._fetch=!1}),i._fetch=!0,i._filterSource()),e.preventDefault(),!0;d?(!l||-1===i.selectedIndex&&!i.value()&&l[0]===t?l=t:(l=l[0].nextSibling,l||t!==o.lastChild||(l=t)),i[s](l)):(l=l?l[0].previousSibling:o.lastChild,l||t!==o.lastChild||(l=t),i[s](l))}e.preventDefault(),n=!0}else r===a.ENTER||r===a.TAB?(i.popup.visible()&&e.preventDefault(),i._accept(l),n=!0):r===a.ESC&&(i.popup.visible()&&e.preventDefault(),i.close(),n=!0);return n},_selectItem:function(){var e,t,n=this,i=n.options,r=n.selectedIndex;e=n._isSelect&&!n._initial&&!i.value&&i.index&&!n._bound,e||(t=n._selectedValue||i.value||n._accessor()),t?n.value(t):(!n._bound||r>-1)&&(n._bound||(r=i.index),n.select(r))},_fetchItems:function(e){var n=this,i=n.ul[0].firstChild;return n._request?!0:n._fetch||i?t:n.options.cascadeFrom?!i:(n.dataSource.one(p,function(){n.value(e),n._fetch=!1}),n._fetch=!0,n.dataSource.fetch(),!0)},_options:function(n,i){var r,o,a,s,d=this,c=d.element,u=c[0].selectedIndex,p=n.length,h="",f=0;for(i&&(f=1,h=i,-1===i.indexOf(e(c[0].firstChild).text())&&(u+=1));p>f;f++)r="",h+=r;c.html(h),c[0].selectedIndex=-1===u?0:u},_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,o,a,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,o=l.cascadeFromField||t.options.dataValueField,a=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,o),i=e.filters||[],i.push({field:o,operator:"eq",value:l}),s.dataSource.one(p,a).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,o=e.getFullYear(),a=t.getFullYear(),s=n.getFullYear();return o-=o%i,r=o+(i-1),a>o&&(o=a),r>s&&(r=s),o+"-"+r}function i(e){for(var t,n=0,i=e.min,r=e.max,o=e.start,a=e.setter,l=e.build,d=e.cells||12,c=e.perRow||4,u=e.content||F,p=e.empty||I,h=e.html||'';d>n;n++)n>0&&0===n%c&&(h+=''),t=l(o,n),h+=s(o,i,r)?u(t):p(t),a(o,1);return h+"
      "}function r(e,t,n){var i=e.getFullYear(),r=t.getFullYear(),o=r,a=0;return n&&(r-=r%n,o=r-r%n+n-1),i>o?a=1:r>i&&(a=-1),a}function o(){var e=new ft;return new ft(e.getFullYear(),e.getMonth(),e.getDate())}function a(e,t,n){var i=o();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(Y,it.indexOf(t.type)>-1||t.type==tt)}function u(e){e.preventDefault()}function p(e){return A(e).calendars.standard}function h(e){var n=gt[e.start],i=gt[e.depth],r=A(e.culture);e.format=S(e.format||r.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=U),(i===t||i>n)&&(e.depth=U),e.dates||(e.dates=[])}function f(e){M&&e.find("*").attr("unselectable","on")}function g(e,t){for(var n=0,i=t.length;i>n;n++)if(e===+t[n])return!0;return!1}function m(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate():!1}function v(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth():!1}var _,b=window.kendo,y=b.support,w=b.ui,k=w.Widget,x=b.keys,C=b.parseDate,T=b.date.adjustDST,S=b._extractFormat,D=b.template,A=b.getCulture,E=b.support.transitions,P=E?E.css+"transform-origin":"",F=D('#=data.value#',{useWithBlock:!1}),I=D(' ',{useWithBlock:!1}),z=b.support.browser,M=z.msie&&z.version<9,B=".kendoCalendar",R="click"+B,H="keydown"+B,L="id",O="min",V="left",N="slideIn",U="month",W="century",j="change",q="navigate",G="value",Y="k-state-hover",Q="k-state-disabled",$="k-state-focused",K="k-other-month",X=' class="'+K+'"',Z="k-nav-today",J="td:has(.k-link)",et="blur"+B,tt="focus",nt=tt+B,it=y.touch?"touchstart":"mouseenter",rt=y.touch?"touchstart"+B:"mouseenter"+B,ot=y.touch?"touchend"+B+" touchmove"+B:"mouseleave"+B,at=6e4,st=864e5,lt="_prevArrow",dt="_nextArrow",ct="aria-disabled",ut="aria-selected",pt=e.proxy,ht=e.extend,ft=Date,gt={month:0,year:1,decade:2,century:3},mt=k.extend({init:function(t,n){var i,r,o=this;k.fn.init.call(o,t,n),t=o.wrapper=o.element,n=o.options,n.url=window.unescape(n.url),o._templates(),o._header(),o._footer(o.footer),r=t.addClass("k-widget k-calendar").on(rt+" "+ot,J,c).on(H,"table.k-content",pt(o._move,o)).on(R,J,function(t){var n=t.currentTarget.firstChild;-1!=n.href.indexOf("#")&&t.preventDefault(),o._click(e(n))}).on("mouseup"+B,function(){o._focusView(o.options.focusOnNav!==!1)}).attr(L),r&&(o._cellID=r+"_cell_selected"),h(n),i=C(n.value,n.format,n.culture),o._index=gt[n.start],o._current=new ft(+a(i,n.min,n.max)),o._addClassProxy=function(){o._active=!0,o._cell.addClass($)},o._removeClassProxy=function(){o._active=!1,o._cell.removeClass($)},o.value(i),b.notify(o)},options:{name:"Calendar",value:null,min:new ft(1900,0,1),max:new ft(2099,11,31),dates:[],url:"",culture:"",footer:"",format:"",month:{},start:U,depth:U,animation:{horizontal:{effects:N,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}}},events:[j,q],setOptions:function(e){h(e),k.fn.setOptions.call(this,e)},destroy:function(){var e=this,t=e._today;e.element.off(B),e._title.off(B),e[lt].off(B),e[dt].off(B),b.destroy(e._table),t&&b.destroy(t.off(B)),k.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(O,e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(lt,-1)},navigateToFuture:function(){this._navigate(dt,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass(Q)||e.navigate(e._current,++t)},navigateDown:function(e){var n=this,i=n._index,r=n.options.depth;if(e)return i===gt[r]?(+n._value!=+e&&(n.value(e),n.trigger(j)),t):(n.navigate(e,--i),t)},navigate:function(n,i){i=isNaN(i)?gt[i]:i;var r,o,s,l,d=this,c=d.options,u=c.culture,p=c.min,h=c.max,g=d._title,m=d._table,v=d._oldTable,b=d._value,y=d._current,w=n&&+n>+y,k=i!==t&&i!==d._index;n||(n=y),d._current=n=new ft(+a(n,p,h)),i===t?i=d._index:d._index=i,d._view=o=_.views[i],s=o.compare,l=i===gt[W],g.toggleClass(Q,l).attr(ct,l),l=s(n,p)<1,d[lt].toggleClass(Q,l).attr(ct,l),l=s(n,h)>-1,d[dt].toggleClass(Q,l).attr(ct,l),m&&v&&v.data("animating")&&(v.kendoStop(!0,!0),m.kendoStop(!0,!0)),d._oldTable=m,(!m||d._changeView)&&(g.html(o.title(n,p,h,u)),d._table=r=e(o.content(ht({min:p,max:h,date:n,url:c.url,dates:c.dates,format:c.format,culture:u},d[o.name]))),f(r),d._animate({from:m,to:r,vertical:k,future:w}),d._focus(n),d.trigger(q)),i===gt[c.depth]&&b&&d._class("k-state-selected",o.toDateString(b)),d._class($,o.toDateString(n)),!m&&d._cell&&d._cell.removeClass($),d._changeView=!0},value:function(e){var n=this,i=n._view,r=n.options,o=n._view,a=r.min,l=r.max;return e===t?n._value:(e=C(e,r.format,r.culture),null!==e&&(e=new ft(+e),s(e,a,l)||(e=null)),n._value=e,o&&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,o,s=this,l=s.options,d=t.keyCode,c=s._view,u=s._index,p=new ft(+s._current),h=b.support.isRtl(s.wrapper);return t.target===s._table[0]&&(s._active=!0),t.ctrlKey?d==x.RIGHT&&!h||d==x.LEFT&&h?(s.navigateToFuture(),i=!0):d==x.LEFT&&!h||d==x.RIGHT&&h?(s.navigateToPast(),i=!0):d==x.UP?(s.navigateUp(),i=!0):d==x.DOWN&&(s._click(e(s._cell[0].firstChild)),i=!0):(d==x.RIGHT&&!h||d==x.LEFT&&h?(n=1,i=!0):d==x.LEFT&&!h||d==x.RIGHT&&h?(n=-1,i=!0):d==x.UP?(n=0===u?-7:-4,i=!0):d==x.DOWN?(n=0===u?7:4,i=!0):d==x.ENTER?(s._click(e(s._cell[0].firstChild)),i=!0):d==x.HOME||d==x.END?(r=d==x.HOME?"first":"last",o=c[r](p),p=new ft(o.getFullYear(),o.getMonth(),o.getDate(),p.getHours(),p.getMinutes(),p.getSeconds(),p.getMilliseconds()),i=!0):d==x.PAGEUP?(i=!0,s.navigateToPast()):d==x.PAGEDOWN&&(i=!0,s.navigateToFuture()),(n||r)&&(r||c.setDate(p,n),s._focus(a(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,o=r._active,a=r.options.animation.horizontal,s=a.effects,l=e.outerWidth();s&&-1!=s.indexOf(N)&&(e.add(n).css({width:l}),e.wrap("
      "),r._focusView(o,e),e.parent().css({position:"relative",width:2*l,"float":V,"margin-left":i?0:-l}),n[i?"insertAfter":"insertBefore"](e),ht(a,{effects:N+":"+(i?"right":V),complete:function(){e.remove(),n.unwrap(),r._focusView(o),r._oldTable=t}}),e.parent().kendoStop(!0,!0).kendoAnimate(a))},_vertical:function(e,n){var i,r,o=this,a=o.options.animation.vertical,s=a.effects,l=o._active;s&&-1!=s.indexOf("zoom")&&(n.css({position:"absolute",top:e.prev().outerHeight(),left:0}).insertBefore(e),P&&(i=o._cellByDate(o._view.toDateString(o._current)),r=i.position(),r=r.left+parseInt(i.width()/2,10)+"px"+" "+(r.top+parseInt(i.height()/2,10)+"px"),n.css(P,r)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.remove(),n.css({position:"static",top:0,left:0}),o._focusView(l),o._oldTable=t}}),n.kendoStop(!0,!0).kendoAnimate(a))},_cellByDate:function(t){return this._table.find("td:not(."+K+")").filter(function(){return e(this.firstChild).attr(b.attr(G))===t})},_class:function(t,n){var i=this,r=i._cellID,o=i._cell;o&&o.removeAttr(ut).removeAttr(L),o=i._table.find("td:not(."+K+")").removeClass(t).filter(function(){return e(this.firstChild).attr(b.attr(G))===n}).attr(ut,!0),t!==$||i._active||i.options.focusOnNav===!1||(t=""),o.addClass(t),o[0]&&(i._cell=o),r&&(o.attr(L,r),i._table.removeAttr("aria-activedescendant").attr("aria-activedescendant",r))},_bindTable:function(e){e.on(nt,this._addClassProxy).on(et,this._removeClassProxy)},_click:function(e){var t=this,n=t.options,i=new Date(+t._current),r=e.attr(b.attr(G)).split("/");r=new ft(r[0],r[1],r[2]),T(r,0),t._view.setDate(i,r),t.navigateDown(a(i,n.min,n.max))},_focus:function(e){var t=this,n=t._view;0!==n.compare(e,t._current)?t.navigate(e):(t._current=e,t._class($,n.toDateString(e)))},_focusView:function(e,t){e&&this.focus(t)},_footer:function(n){var i=this,r=o(),a=i.element,s=a.find(".k-footer");return n?(s[0]||(s=e('').appendTo(a)),i._today=s.show().find(".k-link").html(n(r)).attr("title",b.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(rt+" "+ot+" "+nt+" "+et,c).click(!1),t._title=e.eq(1).on(R,function(){t._focusView(i),t.navigateUp()}),t[lt]=e.eq(0).on(R,function(){t._focusView(i),t.navigateToPast()}),t[dt]=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(Q)||(i>3?r.setFullYear(r.getFullYear()+100*t):_.views[i].setDate(r,t),n.navigate(r))},_option:function(e,n){var i,r=this,o=r.options,a=r._value||r._current;return n===t?o[e]:(n=C(n,o.format,o.culture),n&&(o[e]=new ft(+n),i=e===O?n>a:a>n,(i||v(a,n))&&(r._value=null,r._changeView=!0),r._changeView||(r._changeView=!(!o.month.content&&!o.month.empty)),r.navigate(r._value),r._toggle()),t)},_toggle:function(e){var n=this,i=n.options,r=n._today;e===t&&(e=s(o(),i.min,i.max)),r&&(r.off(R),e?r.addClass(Z).removeClass(Q).on(R,pt(n._todayClick,n)):r.removeClass(Z).addClass(Q).on(R,u))},_todayClick:function(e){var t=this,n=gt[t.options.depth],i=o();e.preventDefault(),0===t._view.compare(t._current,i)&&t._index==n&&(t._changeView=!1),t._value=i,t.navigate(i,n),t.trigger(j)},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month,r=i.content,o=i.empty;e.month={content:D(''+(r||"#=data.value#")+"",{useWithBlock:!!r}),empty:D(''+(o||" ")+"",{useWithBlock:!!o})},n!==!1&&(e.footer=D(n||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}))}});w.plugin(mt),_={firstDayOfMonth:function(e){return new ft(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t=t||b.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;)_.setTime(i,-1*st);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:U,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,o=e.max,a=e.date,s=e.dates,d=e.format,c=e.culture,u=e.url,h=u&&s[0],f=p(c),m=f.firstDay,v=f.days,y=l(v.names,m),w=l(v.namesShort,m),k=_.firstVisibleDay(a,f),x=t.first(a),C=t.last(a),S=t.toDateString,D=new ft,A='';7>n;n++)A+='";return D=new ft(D.getFullYear(),D.getMonth(),D.getDate()),T(D,0),D=+D,i({cells:42,perRow:7,html:A+='',start:new ft(k.getFullYear(),k.getMonth(),k.getDate()),min:new ft(r.getFullYear(),r.getMonth(),r.getDate()),max:new ft(o.getFullYear(),o.getMonth(),o.getDate()),content:e.content,empty:e.empty,setter:t.setDate,build:function(e){var t=[],n=e.getDay(),i="",r="#";return(x>e||e>C)&&t.push(K),+e===D&&t.push("k-today"),(0===n||6===n)&&t.push("k-weekend"),h&&g(+e,s)&&(r=u.replace("{0}",b.toString(e,d,c)),i=" k-action-link"),{date:e,dates:s,ns:b.ns,title:b.toString(e,"D",c),value:e.getDate(),dateString:S(e),cssClass:t[0]?' class="'+t.join(" ")+'"':"",linkClass:i,url:r}}})},first:function(e){return _.firstDayOfMonth(e)},last:function(e){var t=new ft(e.getFullYear(),e.getMonth()+1,0),n=_.firstDayOfMonth(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t},compare:function(e,t){var n,i=e.getMonth(),r=e.getFullYear(),o=t.getMonth(),a=t.getFullYear();return n=r>a?1:a>r?-1:i==o?0:i>o?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof ft?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):_.setTime(e,t*st),T(e,n)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/"+e.getDate()}},{name:"year",title:function(e){return e.getFullYear()},content:function(e){var t=p(e.culture).months.namesAbbr,n=this.toDateString,r=e.min,o=e.max;return i({min:new ft(r.getFullYear(),r.getMonth(),1),max:new ft(o.getFullYear(),o.getMonth(),1),start:new ft(e.date.getFullYear(),0,1),setter:this.setDate,build:function(e){return{value:t[e.getMonth()],ns:b.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)),T(e,i)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/1"}},{name:"decade",title:function(e,t,i){return n(e,t,i,10)},content:function(e){var t=e.date.getFullYear(),n=this.toDateString;return i({start:new 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:b.ns,dateString:n(e),cssClass:0===t||11==t?X:""}}})},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:W,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(),o=this.toDateString,a=n,s=r;return a-=a%10,s-=s%10,10>s-a&&(s=a+9),i({start:new ft(t-t%100-10,0,1),min:new ft(a,0,1),max:new ft(s,0,1),setter:this.setDate,build:function(e,t){var i=e.getFullYear(),a=i+9;return n>i&&(i=n),a>r&&(a=r),{ns:b.ns,value:i+" - "+a,dateString:o(e),cssClass:0===t||11==t?X:""}}})},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"}}]},_.isEqualDatePart=m,_.makeUnselectable=f,_.restrictValue=a,_.isInRange=s,_.normalize=h,_.viewsEnum=gt,b.calendar=_}(window.kendo.jQuery),function(e,t){function n(t){var n=t.parseFormats,i=t.format;L.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,o=window.kendo,a=o.ui,s=a.Widget,l=o.parseDate,d=o.keys,c=o.template,u=o._activeElement,p="
      ",h="",f=".kendoDatePicker",g="click"+f,m="open",v="close",_="change",b="dateView",y="disabled",w="readonly",k="k-state-default",x="k-state-focused",C="k-state-selected",T="k-state-disabled",S="k-state-hover",D="keydown"+f,A="mouseenter"+f+" mouseleave"+f,E="mousedown"+f,P="id",F="min",I="max",z="month",M="aria-disabled",B="aria-expanded",R="aria-hidden",H="aria-readonly",L=o.calendar,O=L.isInRange,V=L.restrictValue,N=L.isEqualDatePart,U=e.extend,W=e.proxy,j=Date,q=function(t){var n,i=this,s=document.body,l=r.sharedCalendar,d=e(p).attr(R,"true").addClass("k-calendar-container").appendTo(s);l||(l=r.sharedCalendar=new a.Calendar(e(p).attr(P,o.guid()).hide().appendTo(s),{focusOnNav:!1}),L.makeUnselectable(l.element)),i.calendar=l,i.options=t=t||{},n=t.id,n&&(n+="_dateview",d.attr(P,n),i._dateViewID=n),i.popup=new a.Popup(d,U(t.popup,t,{name:"Popup",isRtl:o.support.isRtl(t.anchor)})),i.div=d,i._templates(),i.value(t.value)};q.prototype={_calendar:function(){var e=this,t=e.popup,n=e.options,r=e.calendar,o=r.element;o.data(b)!==e&&(o.appendTo(t.element).data(b,e).off(g+" "+D).on(g,"td:has(.k-link)",W(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,o=i.calendar,a=o.element,s=a.data(b);(s===t||s===i)&&(n=e(".k-calendar-container"),n.length>1?a.hide().appendTo(document.body):(a.off(f),o.destroy(),o.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(F,e)},max:function(e){this._option(I,e)},toggle:function(){var e=this;e[e.popup.visible()?v:m]()},move:function(e){var n=this,i=e.keyCode,r=n.calendar,o=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 o&&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 j(+V(e,i.min,i.max)),n.element.data(b)===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(b)===n&&r[e](t)},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month||{},r=i.content,a=i.empty;e.month={content:c(''+(r||"#=data.value#")+"",{useWithBlock:!!r}),empty:c("
      ",{useWithBlock:!!a})},n!==!1&&(e.footer=c(n||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}))}},q.normalize=n,o.DateView=q,r=s.extend({init:function(e,t){var i,r,a=this;s.fn.init.call(a,e,t),e=a.element,t=a.options,n(t),a._wrapper(),a.dateView=new q(U({},t,{id:e.attr(P),anchor:a.wrapper,change:function(){a._change(this.value()),a.close()},close:function(t){a.trigger(v)?t.preventDefault():(e.attr(B,!1),r.attr(R,!0))},open:function(t){var n,i=a.options;a.trigger(m)?t.preventDefault():(a.element.val()!==a._oldText&&(n=l(e.val(),i.parseFormats,i.culture),n?(a.dateView._current=n,a.dateView.calendar._focus(n)):a.dateView.value(n)),e.attr(B,!0),r.attr(R,!1))}})),r=a.dateView.div,a._icon();try{e[0].setAttribute("type","text")}catch(d){e[0].type="text"}e.addClass("k-input").attr({role:"textbox","aria-haspopup":!0,"aria-expanded":!1,"aria-owns":a.dateView._dateViewID}),a._reset(),a._template(),i=e.is("[disabled]"),i?a.enable(!1):a.readonly(e.is("[readonly]")),a._old=a._update(t.value||a.element.val()),a._oldText=e.val(),o.notify(a)},events:[m,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=U(r,t.options,{change:r.change,close:r.close,open:r.open})},_editable:function(e){var t=this,n=t._dateIcon.off(f),r=t.element.off(f),o=t._inputWrapper.off(f),a=e.readonly,s=e.disable;a||s?(o.addClass(s?T:k).removeClass(s?k:T),r.attr(y,s).attr(w,a).attr(M,s).attr(H,a)):(o.addClass(k).removeClass(T).on(A,t._toggleHover),r.removeAttr(y).removeAttr(w).attr(M,!1).attr(H,!1).on("keydown"+f,W(t._keydown,t)).on("blur"+f,W(t._blur,t)).on("focus"+f,function(){t._inputWrapper.addClass(x)}),n.on(g,W(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(f),e._dateIcon.off(f),e._inputWrapper.off(f),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option(F,e)},max:function(e){return this._option(I,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(),o.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 j(+n),i.dateView[e](n)),t)},_update:function(e){var t,n=this,i=n.options,r=i.min,a=i.max,s=l(e,i.parseFormats,i.culture);return+s===+n._value?(t=o.toString(s,i.format,i.culture),t!==e&&n.element.val(null===s?e:t),s):(null!==s&&N(s,r)?s=V(s,r,a):O(s,r,a)||(s=null),n._value=s,n.dateView.value(s),n.element.val(s?o.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(h).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(h).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}))}}),a.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 o=t.split(r);return o.splice(n(e,t,r),1,i),r&&""!==o[o.length-1]&&o.push(""),o.join(r)}function o(e){var t=e.value.length;S(e,t,t)}var a=window.kendo,s=a.support,l=a._activeElement,d=s.placeholder,c=a.ui,u=a.keys,p=a.data.DataSource,h=c.List,f="aria-disabled",g="aria-readonly",m="k-state-default",v="disabled",_="readonly",b="k-state-focused",y="k-state-selected",w="k-state-disabled",k="k-state-hover",x=".kendoAutoComplete",C="mouseenter"+x+" mouseleave"+x,T=h.caret,S=h.selectText,D=e.proxy,A=h.extend({init:function(t,n){var i,r=this;r.ns=x,n=e.isArray(n)?{dataSource:n}:n,h.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(b)}).on("blur"+x,function(){r._change(),r._placeholder(),i.removeClass(b)}).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(),a.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:{},value:null},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._refreshHandler=D(e.refresh,e),e._progressHandler=D(e._showBusy,e)),e.dataSource=p.create(e.options.dataSource).bind("change",e._refreshHandler).bind("progress",e._progressHandler)},setDataSource:function(e){this.options.dataSource=e,this._dataSource()},events:["open","close","change","select","dataBinding","dataBound"],setOptions:function(e){h.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,o=e.disable;r||o?(i.addClass(o?w:m).removeClass(o?m:w),n.attr(v,o).attr(_,r).attr(f,o).attr(g,r)):(i.addClass(m).removeClass(w).on(C,t._toggleHover),n.removeAttr(v).removeAttr(_).attr(f,!1).attr(g,!1))},close:function(){var e=this,t=e._current;t&&t.removeClass(y),e.current(null),e.popup.close()},destroy:function(){var e=this;e.element.off(x),e.wrapper.off(x),h.fn.destroy.call(e)},refresh:function(){var n,i=this,r=i.ul[0],o=i.popup,s=i.options,d=i._data(),c=d.length;i.trigger("dataBinding"),r.innerHTML=a.render(i.template,d),i._height(c),o.visible()&&o._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"),o[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,o=r.ignoreCase,a=r.separator;e=e||n._accessor(),n._current=null,clearTimeout(n._typing),a&&(e=i(T(n.element[0]),e,a)),t=e.length,t?t>=n.options.minLength&&(n._open=!0,n._filterSource({value:o?e.toLowerCase():e,operator:r.filter,field:r.dataTextField,ignoreCase:o})):n.popup.close()},suggest:function(e){var i,r=this,o=r._last,a=r._accessor(),s=r.element[0],d=T(s),c=r.options.separator,p=a.split(c),f=n(d,a,c),g=d;return o==u.BACKSPACE||o==u.DELETE?(r._last=t,t):(e=e||"","string"!=typeof e&&(i=h.inArray(e[0],r.ul[0]),e=i>-1?r._text(r._data()[i]):""),0>=d&&(d=a.toLowerCase().indexOf(e.toLowerCase())+1),i=a.substring(0,d).lastIndexOf(c),i=i>-1?d-(i+c.length):d,a=p[f].substring(0,i),e&&(i=e.toLowerCase().indexOf(a.toLowerCase()),i>-1&&(e=e.substring(i+a.length),g=d+e.length,a+=e),c&&""!==p[p.length-1]&&p.push("")),p[f]=a,r._accessor(p.join(c||"")),s===l()&&S(s,d,g),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),o(t.element[0])},_keydown:function(t){var n=this,i=n.ul[0],r=t.keyCode,o=n._current,a=n.popup.visible();n._last=r,r===u.DOWN?(a&&n._move(o?o.next():e(i.firstChild)),t.preventDefault()):r===u.UP?(a&&n._move(o?o.prev():e(i.lastChild)),t.preventDefault()):r===u.ENTER||r===u.TAB?(r===u.ENTER&&n.popup.visible()&&t.preventDefault(),n._accept(o)):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,o=i.options.placeholder;if(o){if(n=r.val(),e===t&&(e=!n),e||(o=n!==o?n:""),n===i._old&&!e)return;r.toggleClass("k-readonly",e).val(o),o||r[0]!==document.activeElement||h.selectText(r[0],0,0)}}},_search:function(){var e=this;clearTimeout(e._typing),e._typing=setTimeout(function(){e._prev!==e._accessor()&&(e._prev=e._accessor(),e.search())},e.options.delay)},_select:function(t){var n,i,o=this,a=o.options.separator,s=o._data();t=e(t),t[0]&&!t.hasClass(y)&&(i=h.inArray(t[0],o.ul[0]),i>-1&&(s=s[i],n=o._text(s),a&&(n=r(T(o.element[0]),o._accessor(),n,a)),o._accessor(n),o.current(t.addClass(y))))},_loader:function(){this._loading=e('').insertAfter(this.element)},_toggleHover:function(t){e(t.currentTarget).toggleClass(k,"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(A)}(window.kendo.jQuery),function(e,t){function n(e,t,n){for(var i,r=0,o=t.length-1;o>r;++r)i=t[r],i in e||(e[i]={}),e=e[i];e[t[o]]=n}var i=window.kendo,r=i.ui,o=r.Select,a=i.support.mobileOS,s=".kendoDropDownList",l="disabled",d="readonly",c="change",u="k-state-focused",p="k-state-default",h="k-state-disabled",f="aria-disabled",g="aria-readonly",m="k-state-selected",v="mouseenter"+s+" mouseleave"+s,_="tabindex",b=e.proxy,y=o.extend({init:function(n,r){var a,l,d,c=this,u=r&&r.index;c.ns=s,r=e.isArray(r)?{dataSource:r}:r,o.fn.init.call(c,n,r),c._focusHandler=function(){c.wrapper.focus()},r=c.options,n=c.element.on("focus"+s,c._focusHandler),this._inputTemplate(),c._reset(),c._word="",c._wrapper(),c._tabindex(),c.wrapper.data(_,c.wrapper.attr(_)),c._aria(),c._span(),c._popup(),c._mobile(),c._dataSource(),c._ignoreCase(),c._enable(),c._oldIndex=c.selectedIndex=-1,c._cascade(),u!==t&&(r.index=u),r.autoBind?c.dataSource.fetch():-1===c.selectedIndex&&(d=r.text||"",d||(a=r.optionLabel,l=a&&0===r.index,c._isSelect?d=l?a:n.children(":selected").text():!n[0].value&&l&&(d=a)),c._textAccessor(d)),i.notify(c)},options:{name:"DropDownList",enabled:!0,autoBind:!0,index:0,text:null,value:null,template:"",valueTemplate:"",delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{}},events:["open","close",c,"select","dataBinding","dataBound","cascade"],setOptions:function(e){o.fn.setOptions.call(this,e),this._template(),this._inputTemplate(),this._accessors(),this._aria()},destroy:function(){var e=this;e.wrapper.off(s),e.element.off(s),e._inputWrapper.off(s),o.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._textAccessor()!==r&&(e.element.val(""),e._textAccessor(""))),e._bound=!!n,e.trigger("dataBound")},search:function(e){if(e){var n=this,i=n.options.ignoreCase;i&&(e=e.toLowerCase()),n._select(function(r){var o=n._text(r);return o!==t?(o+="",i&&(o=o.toLowerCase()),0===o.indexOf(e)):t})}},text:function(e){var n,i,r=this,o=r.options.ignoreCase;return e=null===e?"":e,e===t?r._textAccessor():("string"==typeof e&&(i=o?e.toLowerCase():e,n=r._select(function(e){return e=r._text(e),o&&(e=(e+"").toLowerCase()),e===i}),n&&(e=n)),r._textAccessor(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,r=e.disable,o=e.readonly,a=t.wrapper.off(s),c=t._inputWrapper.off(v),m=function(){c.addClass(u),t._blured=!1},y=function(){if(!t._blured){t._triggerCascade();var e=window.self!==window.top;i.support.mobileOS.ios&&e?t._change():t._blur(),c.removeClass(u),t._blured=!0,n.blur()}};o||r?(r?(a.removeAttr(_),c.addClass(h).removeClass(p)):(c.addClass(p).removeClass(h),a.on("focusin"+s,m).on("focusout"+s,y)),n.attr(l,r).attr(d,o),a.attr(f,r).attr(g,o)):(n.removeAttr(l).removeAttr(d),c.addClass(p).removeClass(h).on(v,t._toggleHover),a.attr(_,a.data(_)).attr(f,!1).attr(g,!1).on("click"+s,function(e){t._blured=!1,e.preventDefault(),t.toggle()}).on("keydown"+s,b(t._keydown,t)).on("keypress"+s,b(t._keypress,t)).on("focusin"+s,m).on("focusout"+s,y))},_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,o=t.dataTextField,a=t.dataValueField,s=e.dataSource.view(),l=s.length,d=r,c=0;if(r&&l){for("object"==typeof r?d=r:o&&(d={},o=o.split("."),a=a.split("."),n(d,a,""),n(d,o,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,o=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(o.firstChild)):n===r.END&&(e.preventDefault(),t._select(o.lastChild))},_selectNext:function(e,n){for(var i,r=this,o=n,a=r._data(),s=a.length,l=r.options.ignoreCase,d=function(n,i){return n+="",l&&(n=n.toLowerCase()),0===n.indexOf(e)?(r._select(i),r._triggerEvents(),!0):t};s>n;n++)if(i=r._text(a[n]),i&&d(i,n))return!0;if(o>0)for(n=0;o>=n;n++)if(i=r._text(a[n]),i&&d(i,n))return!0;return!1},_keypress:function(e){if(0!==e.charCode){var t=this,n=String.fromCharCode(e.charCode||e.keyCode),i=t.selectedIndex,r=t._word;t.options.ignoreCase&&(n=n.toLowerCase())," "===n&&e.preventDefault(),t._last===n&&r.length<=1&&i>-1&&(r||(r=n),t._selectNext(r,i+1))||(t._word=r+n,t._last=n,t._search())}},_popup:function(){o.fn._popup.call(this),this.popup.one("open",function(){this.wrapper=i.wrap(this.element).addClass("km-popup")})},_search:function(){var e=this,n=e.dataSource,i=e.selectedIndex,r=e._word;return clearTimeout(e._typing),e._typing=setTimeout(function(){e._word=""},e.options.delay),e.ul[0].firstChild?(e._selectNext(r,i),e._triggerEvents(),t):(n.one(c,function(){n.data()[0]&&e._selectNext(r,i)}).fetch(),t)},_select:function(e){var n,i,o=this,a=o._current,s=null;return e=o._get(e),e&&e[0]&&!e.hasClass(m)&&(a&&a.removeClass(m),i=r.List.inArray(e[0],o.ul[0]),i>-1&&(s=o._data()[i],n=o._value(s),o.selectedIndex=i,o._textAccessor(s),o._accessor(n!==t?n:o._text(s),i),o._selectedValue=o._accessor(),o.current(e.addClass(m)),o._optionID&&o._current.attr("aria-selected",!0))),s},_triggerEvents:function(){this.popup.visible()||(this._triggerCascade(),this._change())},_mobile:function(){var e=this,t=e.popup,n=t.element.parents(".km-root").eq(0);n.length&&a&&(t.options.animation.open.effects=a.android||a.meego?"fadeIn":a.ios||a.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.selectedIndex=-1,e.element.val(""),e._textAccessor(n),t)},_inputTemplate:function(){var t=this,n=t.options.valueTemplate;n=n?i.template(n):e.proxy(i.template("#:this._text(data)#"),t),t.valueTemplate=n},_textAccessor:function(n){var r=this.dataItem(),o=this.span;return n===t?o.text():(e.isPlainObject(n)||n instanceof i.data.ObservableObject?r=n:r&&this._text(r)===n||(this.options.dataTextField?(r={},r[this.options.dataTextField]=n,r[this.options.dataValueField]=this._accessor()):r=n),o.html(this.valueTemplate(r)),t)}});r.plugin(y)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,r=i.List,o=i.Select,a=n.support,s=a.placeholder,l=n._activeElement,d=n.keys,c=".kendoComboBox",u="click"+c,p="mousedown"+c,h="disabled",f="readonly",g="change",m="k-state-default",v="k-state-focused",_="k-state-disabled",b="aria-disabled",y="aria-readonly",w="k-state-selected",k="filter",x="accept",C="rebind",T="mouseenter"+c+" mouseleave"+c,S=null,D=e.proxy,A=o.extend({init:function(t,i){var r,a=this;a.ns=c,i=e.isArray(i)?{dataSource:i}:i,o.fn.init.call(a,t,i),a._focusHandler=function(){a.input.focus()},i=a.options,t=a.element.on("focus"+c,a._focusHandler),i.placeholder=i.placeholder||t.attr("placeholder"),a._reset(),a._wrapper(),a._input(),a._tabindex(a.input),a._popup(),a._dataSource(),a._ignoreCase(),a._enable(),a._cascade(),a._aria(),a._oldIndex=a.selectedIndex=-1,i.autoBind?a._filterSource():(r=i.text,!r&&a._isSelect&&(r=t.children(":selected").text()),r&&(a.input.val(r),a._prev=r)),r||a._placeholder(),n.notify(a)},options:{name:"ComboBox",enabled:!0,index:-1,text:null,value:null,autoBind:!0,delay:200,dataTextField:"",dataValueField:"",minLength:0,height:200,highlightFirst:!0,template:"",filter:"none",placeholder:"",suggest:!1,cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{}},events:["open","close",g,"select","dataBinding","dataBound","cascade"],setOptions:function(e){o.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(w),o.fn.current.call(n,e),t)},destroy:function(){var e=this;e.input.off(c),e.element.off(c),e._inputWrapper.off(c),o.fn.destroy.call(e)},_editable:function(e){var t=this,n=e.disable,i=e.readonly,r=t._inputWrapper.off(c),o=t.element.add(t.input.off(c)),a=t._arrow.parent().off(u+" "+p);i||n?(r.addClass(n?_:m).removeClass(n?m:_),o.attr(h,n).attr(f,i).attr(b,n).attr(y,i)):(r.addClass(m).removeClass(_).on(T,t._toggleHover),o.removeAttr(h).removeAttr(f).attr(b,!1).attr(y,!1),a.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,o,a,s=this,d=s.ul[0],c=s.options,u=s._state,p=s._data(),h=p.length;s.trigger("dataBinding"),d.innerHTML=n.render(s.template,p),s._height(h),s.popup.visible()&&s.popup._position(),s._isSelect&&(i=s.element[0].firstChild,u===C&&(s._state="",r=s.value()),a=s._option,s._option=t,s._options(p),a&&a[0].selected?s._custom(a.val()):s._bound||i||s._custom("")),h&&(c.highlightFirst&&s.current(e(d.firstChild)),c.suggest&&s.input.val()&&s._request!==t&&s.suggest(e(d.firstChild))),u===k||s._fetch||s._selectItem(),s._open&&(s._open=!1,o=!!h,s._typing&&s.input[0]!==l()&&(o=!1),s.toggle(o),s._typing=t),s._touchScroller&&s._touchScroller.reset(),s._makeUnselectable(),s._hideBusy(),s._bound=!0,s.trigger("dataBound")},search:function(e){e="string"==typeof e?e:this.text();var t=this,n=e.length,i=t.options,r=i.ignoreCase,o=i.filter,a=i.dataTextField;clearTimeout(t._typing),n>=i.minLength&&(t._state=k,"none"===o?t._filter(e):(t._open=!0,t._filterSource({value:r?e.toLowerCase():e,field:a,operator:o,ignoreCase:r})))},suggest:function(e){var n,i=this,o=i.input[0],a=i.text(),s=r.caret(o),c=i._last;return c==d.BACKSPACE||c==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=a.toLowerCase().indexOf(e.toLowerCase())+1),e?(n=e.toLowerCase().indexOf(a.toLowerCase()),n>-1&&(a+=e.substring(n+a.length))):a=a.substring(0,s),a.length===s&&e||(o.value=a,o===l()&&r.selectText(o,s,a.length)),t)},text:function(e){e=null===e?"":e;var n,i=this,r=i.input[0],o=i.options.ignoreCase,a=e;return e===t?r.value:(n=i.dataItem(),n&&i._text(n)===e&&""+i._value(n)===i._old?(i._triggerCascade(),t):(o&&(a=a.toLowerCase()),i._select(function(e){return e=i._text(e),o&&(e=(e+"").toLowerCase()),e===a}),i.selectedIndex<0&&(i._custom(e),r.value=e),i._prev=r.value,i._triggerCascade(),t))},toggle:function(e){var t=this;t._toggle(e)},value:function(e){var n,i=this,r=i.options;return e===t?i._accessor():(null!==e&&(e=""+e),i._selectedValue=e,!i._open&&e&&i._fetchItems(e)||(n=i._index(e),n>-1?i.select(n):(i.current(S),i._custom(e),(r.value!==e||r.text!==i.input.val())&&(i.text(e),i._placeholder())),i._old=i._accessor(),i._oldIndex=i.selectedIndex),t)},_accept:function(e){var t=this;e?t._focus(e):(t.text(t.text()),t._change())},_custom:function(t){var n=this,i=n.element,r=n._option;n._state===k&&(n._state=x),n._isSelect?(r||(r=n._option=e("
      '+w[n]+"
      "+(a||" ")+"
      # for (var i = 0; i < colors.length; ++i) { ## if (i && i % columns == 0) { # # } #'+"# } #"+"
      ")}),D=T.extend({init:function(t,n){var i=this;T.fn.init.call(i,t,n),n=i.options,t=i.element,i.wrapper=t.addClass("k-widget k-flatcolorpicker").append(i._template(n)),i._hueElements=e(".k-hsv-rectangle, .k-transparency-slider .k-slider-track",t),i._selectedColor=e(".k-selected-color-display",t),i._colorAsText=e("input.k-color-value",t),i._sliders(),i._hsvArea(),i._updateUI(i._value||new E(1,0,0,1)),t.find("input.k-color-value").on(k,function(t){var n,r,o=this;if(t.keyCode==f.ENTER)try{n=a(o.value),r=i.color(),i._select(n,n.equals(r))}catch(s){e(o).addClass("k-state-error")}else i.options.autoupdate&&setTimeout(function(){var e=a(o.value,!0);e&&i._updateUI(e,!0)},10)}).end().on(w,".k-controls button.apply",function(){i._select(i._getHSV())}).on(w,".k-controls button.cancel",function(){i._updateUI(i.color()),i._cancel()}),C&&i._applyIEFilter()},destroy:function(){this._hueSlider.destroy(),this._opacitySlider&&this._opacitySlider.destroy(),this._hueSlider=this._opacitySlider=this._hsvRect=this._hsvHandle=this._hueElements=this._selectedColor=this._colorAsText=null,T.fn.destroy.call(this)},options:{name:"FlatColorPicker",opacity:!1,buttons:!1,input:!0,preview:!0,autoupdate:!0,messages:b},_applyIEFilter:function(){var e=this.element.find(".k-hue-slider .k-slider-track")[0],t=e.currentStyle.backgroundImage;t=t.replace(/^url\([\'\"]?|[\'\"]?\)$/g,""),e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+t+"', sizingMethod='scale')"},_sliders:function(){function e(e){n._updateUI(n._getHSV(e.value,null,null,null))}function t(e){n._updateUI(n._getHSV(null,null,null,e.value/100))}var n=this,i=n.element;n._hueSlider=i.find(".k-hue-slider").kendoSlider({min:0,max:359,tickPlacement:"none",showButtons:!1,slide:e,change:e}).data("kendoSlider"),n._opacitySlider=i.find(".k-transparency-slider").kendoSlider({min:0,max:100,tickPlacement:"none",showButtons:!1,slide:t,change:t}).data("kendoSlider")},_hsvArea:function(){function e(e,n){var i=this.offset,r=e-i.left,o=n-i.top,a=this.width,s=this.height;r=0>r?0:r>a?a:r,o=0>o?0:o>s?s:o,t._svChange(r/a,1-o/s)}var t=this,n=t.element,i=n.find(".k-hsv-rectangle"),r=i.find(".k-draghandle").attr("tabIndex",0).on(k,d(t._keydown,t));t._hsvEvents=new c.UserEvents(i,{global:!0,press:function(t){this.offset=c.getOffset(i),this.width=i.width(),this.height=i.height(),r.focus(),e.call(this,t.x.location,t.y.location)},start:function(){i.addClass("k-dragging"),r.focus()},move:function(t){t.preventDefault(),e.call(this,t.x.location,t.y.location)},end:function(){i.removeClass("k-dragging")}}),t._hsvRect=i,t._hsvHandle=r},_onEnable:function(e){this._hueSlider.enable(e),this._opacitySlider&&this._opacitySlider.enable(e),this.wrapper.find("input").attr("disabled",!e);var t=this._hsvRect.find(".k-draghandle");e?t.attr("tabIndex",0):t.removeAttr("tabIndex")},_keydown:function(e){function t(t,n){var r=i._getHSV();r[t]+=n*(e.shiftKey?.01:.05),r[t]<0&&(r[t]=0),r[t]>1&&(r[t]=1),i._updateUI(r),l(e)}function n(t){var n=i._getHSV();n.h+=t*(e.shiftKey?1:5),n.h<0&&(n.h=0),n.h>359&&(n.h=359),i._updateUI(n),l(e)}var i=this;switch(e.keyCode){case f.LEFT:e.ctrlKey?n(-1):t("s",-1);break;case f.RIGHT:e.ctrlKey?n(1):t("s",1);break;case f.UP:t(e.ctrlKey&&i._opacitySlider?"a":"v",1);break;case f.DOWN:t(e.ctrlKey&&i._opacitySlider?"a":"v",-1);break;case f.ENTER:i._select(i._getHSV());break;case f.F2:i.wrapper.find("input.k-color-value").focus().select();break;case f.ESC:i._cancel()}},focus:function(){this._hsvHandle.focus()},_getHSV:function(e,t,n,i){var r=this._hsvRect,o=r.width(),a=r.height(),s=this._hsvHandle.position();return null==e&&(e=this._hueSlider.value()),null==t&&(t=s.left/o),null==n&&(n=1-s.top/a),null==i&&(i=this._opacitySlider?this._opacitySlider.value()/100:1),new F(e,t,n,i)},_svChange:function(e,t){var n=this._getHSV(null,e,t,null);this._updateUI(n)},_updateUI:function(e,t){var n=this,i=n._hsvRect;e&&(this._colorAsText.removeClass("k-state-error"),n._selectedColor.css(g,e.toDisplay()),t||n._colorAsText.val(n._opacitySlider?e.toCssRgba():e.toCss()),n._triggerSelect(e),e=e.toHSV(),n._hsvHandle.css({left:e.s*i.width()+"px",top:(1-e.v)*i.height()+"px"}),n._hueElements.css(g,new F(e.h,1,1,1).toCss()),n._hueSlider.value(e.h),n._opacitySlider&&n._opacitySlider.value(100*e.a))},_selectOnHide:function(){return this.options.buttons?null:this._getHSV()},_template:c.template('# if (preview) { #
      # } #
      # if (opacity) { ## } ## if (buttons) { #
      # } #')}),A=u.extend({toHSV:function(){return this},toRGB:function(){return this},toHex:function(){return this.toBytes().toHex()},toBytes:function(){return this},toCss:function(){return"#"+this.toHex()},toCssRgba:function(){var e=this.toBytes();return"rgba("+e.r+", "+e.g+", "+e.b+", "+o(this.a)+")"},toDisplay:function(){return C?this.toCss():this.toCssRgba()},equals:function(e){return e===this||null!==e&&this.toCssRgba()==a(e).toCssRgba()},diff:function(e){if(null==e)return 0/0;var t=this.toBytes();return e=e.toBytes(),Math.sqrt(Math.pow(.3*(t.r-e.r),2)+Math.pow(.59*(t.g-e.g),2)+Math.pow(.11*(t.b-e.b),2))},clone:function(){var e=this.toBytes();return e===this&&(e=new P(e.r,e.g,e.b,e.a)),e}}),E=A.extend({init:function(e,t,n,i){this.r=e,this.g=t,this.b=n,this.a=i},toHSV:function(){var e,t,n=this.r,i=this.g,r=this.b,o=Math.min(n,i,r),a=Math.max(n,i,r),s=a,l=a-o;return 0===l?new F(0,0,s,this.a):(0!==a?(t=l/a,e=n==a?(i-r)/l:i==a?2+(r-n)/l:4+(n-i)/l,e*=60,0>e&&(e+=360)):(t=0,e=-1),new F(e,t,s,this.a))},toBytes:function(){return new P(255*this.r,255*this.g,255*this.b,this.a)}}),P=E.extend({init:function(e,t,n,i){this.r=Math.round(e),this.g=Math.round(t),this.b=Math.round(n),this.a=i},toRGB:function(){return new E(this.r/255,this.g/255,this.b/255,this.a)},toHSV:function(){return this.toRGB().toHSV()},toHex:function(){return r(this.r,2)+r(this.g,2)+r(this.b,2)},toBytes:function(){return this}}),F=A.extend({init:function(e,t,n,i){this.h=e,this.s=t,this.v=n,this.a=i},toRGB:function(){var e,t,n,i,r,o,a,s,l=this.h,d=this.s,c=this.v;if(0===d)t=n=i=c;else switch(l/=60,e=Math.floor(l),r=l-e,o=c*(1-d),a=c*(1-d*r),s=c*(1-d*(1-r)),e){case 0:t=c,n=s,i=o;break;case 1:t=a,n=c,i=o;break;case 2:t=o,n=c,i=s;break;case 3:t=o,n=a,i=c;break;case 4:t=s,n=o,i=c;break;default:t=c,n=o,i=a}return new E(t,n,i,this.a)},toBytes:function(){return this.toRGB().toBytes()}}),I=h.extend({init:function(t,n){var i,r,o,s=this;h.fn.init.call(s,t,n),n=s.options,t=s.element,i=t.attr("value")||t.val(),i=i?a(i,!0):a(n.value,!0),s._value=n.value=i,r=s.wrapper=e(s._template(n)),t.hide().after(r),t.is("input")&&t.appendTo(r),s.enable(!t.attr("disabled")),o=t.attr("accesskey"),o&&(t.attr("accesskey",null),r.attr("accesskey",o)),s.bind("activate",function(e){e.isDefaultPrevented()||s.toggle()}),s._updateUI(i)},destroy:function(){this.wrapper.off(y).find("*").off(y),this._popup&&(this._selector.destroy(),this._popup.destroy()),this._selector=this._popup=this.wrapper=null,h.fn.destroy.call(this)},enable:function(e){var t=this,n=t.wrapper,i=n.children(".k-picker-wrap"),r=i.find(".k-select");0===arguments.length&&(e=!0),t.element.attr("disabled",!e),n.attr("disabled",!e),r.off(y).on("mousedown"+y,l),n.addClass("k-state-disabled").removeAttr("tabIndex").add("*",n).off(y),e&&n.removeClass("k-state-disabled").attr("tabIndex",0).on("mouseenter"+y,function(){i.addClass("k-state-hover")}).on("mouseleave"+y,function(){i.removeClass("k-state-hover")}).on("focus"+y,function(){i.addClass("k-state-focused")}).on("blur"+y,function(){i.removeClass("k-state-focused")}).on(k,d(t._keydown,t)).on(w,".k-icon",d(t.toggle,t)).on(w,t.options.toolIcon?".k-tool-icon":".k-selected-color",function(){t.trigger("activate")})},_template:c.template('# if (toolIcon) { ## } else { ## } #'),options:{name:"ColorPicker",palette:null,columns:10,toolIcon:null,value:null,messages:b,opacity:!1,buttons:!0,preview:!0},events:["activate","change","select","open","close"],open:function(){this._getPopup().open()},close:function(){this._getPopup().close()},toggle:function(){this._getPopup().toggle()},color:T.fn.color,value:T.fn.value,_select:T.fn._select,_triggerSelect:T.fn._triggerSelect,_isInputTypeColor:function(){var e=this.element[0];return/^input$/i.test(e.tagName)&&/^color$/i.test(e.type)},_updateUI:function(e){e&&(this._isInputTypeColor()||1==e.a?this.element.val(e.toCss()):this.element.val(e.toCssRgba())),this._triggerSelect(e),this.wrapper.find(".k-selected-color").css(g,e?e.toDisplay():"transparent")},_keydown:function(e){var t=e.keyCode;this._getPopup().visible()?(t==f.ESC?this._selector._cancel():this._selector._keydown(e),l(e)):(t==f.ENTER||t==f.DOWN)&&(this.open(),l(e))},_getPopup:function(){var t,i,r,o=this,s=o._popup;return s||(t=this.options,i=t.palette?S:D,t._standalone=!1,delete t.select,delete t.change,delete t.cancel,r=this._selector=new i(e("
      ").appendTo(document.body),t),o._popup=s=r.wrapper.kendoPopup({anchor:o.wrapper}).data("kendoPopup"),r.bind({select:function(e){o._updateUI(a(e.value))},change:function(){o._select(r.color()),o.close()},cancel:function(){o.close()}}),s.bind({close:function(e){if(o.trigger("close"))return e.preventDefault(),n;o.wrapper.children(".k-picker-wrap").removeClass("k-state-focused");var t=r._selectOnHide();t?o._select(t):(o.wrapper.focus(),o._updateUI(o.color()))},open:function(e){o.trigger("open")?e.preventDefault():o.wrapper.children(".k-picker-wrap").addClass("k-state-focused")},activate:function(){r._select(o.color(),!0),r.focus(),o.wrapper.children(".k-picker-wrap").addClass("k-state-focused")}})),s}});p.plugin(S),p.plugin(D),p.plugin(I),c.parseColor=a,c.Color={fromBytes:function(e,t,n,i){return new P(e,t,n,null!=i?i:1)},fromRGB:function(e,t,n,i){return new E(e,t,n,null!=i?i:1)},fromHSV:function(e,t,n,i){return new F(e,t,n,null!=i?i:1)}}}(jQuery,parseInt),function(e,t){function n(t){return e.trim(t).replace(/ /gi,"")}var i=window.kendo,r=i.ui,o=e.proxy,a=e.extend,s=e.grep,l=e.map,d=e.inArray,c="k-state-selected",u="asc",p="desc",h="change",f="init",g="select",m="kendoPopup",v="kendoFilterMenu",_="kendoMenu",b=".kendoColumnMenu",y=r.Widget,w=y.extend({init:function(t,n){var r,a=this;y.fn.init.call(a,t,n),t=a.element,n=a.options,a.owner=n.owner,a.dataSource=n.dataSource,a.field=t.attr(i.attr("field")),r=t.find(".k-header-column-menu"),r[0]||(r=t.prepend('').find(".k-header-column-menu")),a.link=r.attr("tabindex",-1).on("click"+b,o(a._click,a)),a.wrapper=e('
      ')},_init:function(){var e=this;e.pane=e.element.closest(i.roleSelector("pane")).data("kendoMobilePane"),e.pane&&(e._isMobile=!0),e._isMobile?e._createMobileMenu():e._createMenu(),e._sort(),e._columns(),e._filter(),e.trigger(f,{field:e.field,container:e.wrapper})},events:[f],options:{name:"ColumnMenu",messages:{sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filter:"Filter",columns:"Columns",done:"Done",settings:"Column Settings"},filter:"",columns:!0,sortable:!0,filterable:!0,animations:{left:"slide"}},_createMenu:function(){var e=this,t=e.options;e.wrapper.html(i.template(k)({ns:i.ns,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns})),e.popup=e.wrapper[m]({anchor:e.link,open:o(e._open,e),activate:o(e._activate,e),close:e.options.closeCallback}).data(m),e.menu=e.wrapper.children()[_]({orientation:"vertical",closeOnClick:!1}).data(_)},_createMobileMenu:function(){var e=this,t=e.options,n=i.template(x)({ns:i.ns,field:e.field,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns});e.view=e.pane.append(n),e.wrapper=e.view.element.find(".k-column-menu"),e.menu=new C(e.wrapper.children(),{pane:e.pane}),e.view.element.on("click",".k-done",function(t){e.close(),t.preventDefault()})},destroy:function(){var e=this;y.fn.destroy.call(e),e.filterMenu&&e.filterMenu.destroy(),e._refreshHandler&&e.dataSource.unbind(h,e._refreshHandler),e.options.columns&&(e.owner.unbind("columnShow",e._updateColumnsMenuHandler),e.owner.unbind("columnHide",e._updateColumnsMenuHandler)),e.menu&&(e.menu.element.off(b),e.menu.destroy()),e.wrapper.off(b),e.popup&&e.popup.destroy(),e.view&&e.view.purge(),e.link.off(b)},close:function(){this.menu.close(),this.popup&&(this.popup.close(),this.popup.element.off("keydown"+b))},_click:function(e){e.preventDefault(),e.stopPropagation();var t=this.options;t.filter&&this.element.is(!t.filter)||(this.popup||this.pane||this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle())},_open:function(){var t=this;e(".k-column-menu").not(t.wrapper).each(function(){e(this).data(m).close()}),t.popup.element.on("keydown"+b,function(e){e.keyCode==i.keys.ESC&&t.close()})},_activate:function(){this.menu.element.focus()},_ownerColumns:function(){var e=this.owner.columns,t=s(e,function(e){var t=!0,i=n(e.title||"");return(e.menu===!1||!e.field&&!i.length)&&(t=!1),t});return l(t,function(t){return{originalField:t.field,field:t.field||t.title,title:t.title||t.field,hidden:t.hidden,index:d(t,e)}})},_sort:function(){var t=this;t.options.sortable&&(t.refresh(),t._refreshHandler=o(t.refresh,t),t.dataSource.bind(h,t._refreshHandler),t.menu.bind(g,function(n){var i,r=e(n.item);r.hasClass("k-sort-asc")?i=u:r.hasClass("k-sort-desc")&&(i=p),i&&(r.parent().find(".k-sort-"+(i==u?p:u)).removeClass(c),t._sortDataSource(r,i),t.close())}))},_sortDataSource:function(e,n){var i,r,o=this,a=o.options.sortable,s=o.dataSource,l=s.sort()||[];if(e.hasClass(c)&&a&&a.allowUnsort!==!1?(e.removeClass(c),n=t):e.addClass(c),a===!0||"single"===a.mode)l=[{field:o.field,dir:n}];else{for(i=0,r=l.length;r>i;i++)if(l[i].field===o.field){l.splice(i,1);break}l.push({field:o.field,dir:n})}s.sort(l)},_columns:function(){var t=this;t.options.columns&&(t._updateColumnsMenu(),t._updateColumnsMenuHandler=o(t._updateColumnsMenu,t),t.owner.bind(["columnHide","columnShow"],t._updateColumnsMenuHandler),t.menu.bind(g,function(n){var r,o,a,l,c=e(n.item),u=t.owner.columns;t._isMobile&&n.preventDefault(),c.parent().closest("li.k-columns-item")[0]&&(r=c.find(":checkbox"),r.attr("disabled")||(l=r.attr(i.attr("field")),a=s(u,function(e){return e.field==l||e.title==l})[0],o=d(a,u),a.hidden===!0?t.owner.showColumn(o):t.owner.hideColumn(o)))}))},_updateColumnsMenu:function(){var t=i.attr("field"),n=s(this._ownerColumns(),function(e){return!e.hidden}),r=s(n,function(e){return e.originalField}).length;n=l(n,function(e){return e.field}),this.wrapper.find(".k-columns-item input["+t+"]").prop("checked",!1).filter(function(){return d(e(this).attr(t),n)>-1}).prop("checked",!0).prop("disabled",1==r)},_filter:function(){var t=this,n=t.options;n.filterable!==!1&&(t.filterMenu=t.wrapper.find(".k-filterable")[v](a(!0,{},{appendToElement:!0,dataSource:n.dataSource,values:n.values,field:t.field},n.filterable)).data(v),t._isMobile&&t.menu.bind(g,function(n){var i=e(n.item);i.hasClass("k-filter-item")&&t.pane.navigate(t.filterMenu.view,t.options.animations.left)}))},refresh:function(){var e,t,n,i=this,r=i.options.dataSource.sort()||[],o=i.field;for(i.wrapper.find(".k-sort-asc, .k-sort-desc").removeClass(c),t=0,n=r.length;n>t;t++)e=r[t],o==e.field&&i.wrapper.find(".k-sort-"+e.dir).addClass(c)}}),k='
        #if(sortable){#
      • ${messages.sortAscending}
      • ${messages.sortDescending}
      • #if(showColumns || filterable){#
      • #}##}##if(showColumns){#
      • ${messages.columns}
          #for (var idx = 0; idx < columns.length; idx++) {#
        • #=columns[idx].title#
        • #}#
      • #if(filterable){#
      • #}##}##if(filterable){#
      • ${messages.filter}
      • #}#
      ',x='
      ${messages.settings}
      • ${field}
          #if(sortable){#
        • ${messages.sortAscending}
        • ${messages.sortDescending}
        • #}##if(filterable){#
        • ${messages.filter}
        • #}#
      • #if(showColumns){#
      • ${messages.columns}
          #for (var idx = 0; idx < columns.length; idx++) {#
        • #}#
      • #}#
      ',C=y.extend({init:function(e,t){y.fn.init.call(this,e,t),this.element.on("click"+b,"li:not(.k-separator)","_click")},events:[g],_click:function(e){this.trigger(g,{item:e.currentTarget})&&e.preventDefault()},close:function(){this.options.pane.navigate("")},destroy:function(){y.fn.destroy.call(this),this.element.off(b)}});r.plugin(w)}(window.kendo.jQuery),function(e,t){function n(e){return Array(e+1).join(' ')}function i(e){var t,n=" ";if(e){if(typeof e===ht)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 o(t,n){e("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",n)}function a(e){var t,n,i={},r={};if(!B(e))for(F(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,o,a;for(n=F(n)?n:[n],i=0,r=n.length;r>i;i++)o=n[i],D(o)&&o.click&&(a=o.name||o.text,t.on(dt+q,"a.k-grid-"+(a||"").replace(/\s/g,""),{commandName:a},z(o.click,e)))}function d(e){return P(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",A({},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 o,a=t.find(">colgroup"),s=E(n,function(e){return o=e.width,o&&0!==parseInt(o,10)?b.format('',typeof o===ht?o:o+"px"):""});(i||a.find(".k-hierarchy-col").length)&&s.splice(0,0,''),a.length&&a.remove(),a=e(Array(r+1).join('')+s.join("")),a.is("colgroup")||(a=e("").append(a)),t.prepend(a),xt.msie&&8==xt.version&&(t.css("display","inline-table"),window.setTimeout(function(){t.css("display","") },1))}function h(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 f(e,t,n){var i=n&&n.length&&D(n[0])&&"value"in n[0],r=i?h(n)[e]:e;return r=null!=r?r:"",t?b.format(t,r):r}function g(e,t,n){for(var i,r=0,o=e[r];o;){if(i=n?!0:"none"!==o.style.display,i&&!yt.test(o.className)&&--t<0){o.style.display=n?"":"none";break}o=e[++r]}}function m(e,t){var n,i,r;if(typeof e===ht&&e===t)return e;if(D(e)&&e.name===t)return e;if(F(e))for(n=0,i=e.length;i>n;n++)if(r=e[n],typeof r===ht&&r===t||r.name===t)return r;return null}function v(t,n){var i,r,o,a=xt.msie;if(n===!0){if(t=e(t),o=a&&t.parent().is(".k-grid-content,.k-grid-header-wrap"),o&&(i=t.parent().scrollTop(),r=t.parent().scrollLeft()),a)try{t[0].setActive()}catch(s){t[0].focus()}else t[0].focus();o&&(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];b.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,span.k-link,.k-input,.k-multiselect-wrap"))&&setTimeout(function(){Tt&&e(b._activeElement()).hasClass("k-widget")||v(r,!0)}),i&&t.preventDefault())}var b=window.kendo,y=b.ui,w=b.data.DataSource,k=y.Groupable,x=b.support.tbodyInnerHtml,C=b._activeElement,T=y.Widget,S=b.keys,D=e.isPlainObject,A=e.extend,E=e.map,P=e.grep,F=e.isArray,I=e.inArray,z=e.proxy,M=b.isFunction,B=e.isEmptyObject,R=Math,H="progress",L="error",O=":not(.k-group-cell):not(.k-hierarchy-cell):visible",V="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",N="tr:not(.k-footer-template):visible",U=":not(.k-group-cell):not(.k-hierarchy-cell):visible",W=N+":first>"+U+":first",j="th.k-header:not(.k-group-cell,.k-hierarchy-cell)",q=".kendoGrid",G="edit",Y="save",Q="remove",$="detailInit",K="filterMenuInit",X="columnMenuInit",Z="change",J="columnHide",et="columnShow",tt="saveChanges",nt="dataBound",it="detailExpand",rt="detailCollapse",ot="k-state-focused",at="k-state-selected",st="columnResize",lt="columnReorder",dt="click",ct="height",ut="tabIndex",pt="function",ht="string",ft="Are you sure you want to delete this record?",gt="Delete",mt="Cancel",vt=/(\}|\#)/gi,_t=/#/gi,bt="[\\x20\\t\\r\\n\\f]",yt=RegExp("(^|"+bt+")"+"(k-group-cell|k-hierarchy-cell)"+"("+bt+"|$)"),wt='#=text#',kt=!1,xt=b.support.browser,Ct=xt.msie&&7==xt.version,Tt=xt.msie&&8==xt.version,St=T.extend({init:function(e,t){var n=this;T.fn.init.call(n,e,t),n._refreshHandler=z(n.refresh,n),n.setDataSource(t.dataSource),n.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(Z,t._refreshHandler),t.dataSource=e,t.dataSource.bind(Z,t._refreshHandler)},options:{name:"VirtualScrollable",itemHeight:e.noop},destroy:function(){var e=this;T.fn.destroy.call(e),e.dataSource.unbind(Z,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off(q),e.drag&&e.drag.destroy()},wrap:function(){var t,n=this,i=b.support.scrollbar()+1,r=n.element;r.css({width:"auto",overflow:"hidden"}).css(kt?"padding-left":"padding-right",i),n.content=r.children().first(),t=n.wrapper=n.content.wrap('
      ').parent().bind("DOMMouseScroll"+q+" mousewheel"+q,z(n._wheelScroll,n)),b.support.kineticScrollNeeded&&(n.drag=new b.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"+q,z(n._scroll,n))},_wheelScroll:function(e){var n,i=this,r=i.verticalScrollbar.scrollTop(),o=e.originalEvent,a=o.wheelDeltaY;o.wheelDelta?(a===t||a)&&(n=o.wheelDelta):o.detail&&o.axis===o.VERTICAL_AXIS&&(n=10*-o.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,o=i.skip()||0,a=t._rangeStart||o,s=t.element.innerHeight(),l=!!(t._scrollbarTop&&t._scrollbarTop>n),d=R.max(R.floor(n/r),0),c=R.max(d+R.floor(s/r),0);t._scrollTop=n-a*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,o=i.itemHeight,a=r.take(),s=i._rangeStart||r.skip()||0,l=R.floor(e/a)*a,d=!1,c=.33;return s>e?(d=!0,s=R.max(0,t-a),i._scrollTop=(e-s)*o,i._page(s,a)):t>=s+a&&!n?(d=!0,s=e,i._scrollTop=o,i._page(s,a)):i._fetching||(l+a-a*c>e&&e>a&&r.prefetch(l-a,a),t>l+a*c&&r.prefetch(l+a,a)),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):(b.ui.progress(n.wrapper.parent(),!0),n._timeout=setTimeout(function(){i.range(e,t)},100))},refresh:function(){var e,t,n,i,r=this,o="",a=25e4,s=r.dataSource,l=r._rangeStart,d=b.support.kineticScrollNeeded?0:b.support.scrollbar(),c=r.wrapper[0];for(b.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%a&&(o+='
      '),r.verticalScrollbar.html(o),c.scrollTop=r._scrollTop,r.drag&&r.drag.cancel(),l&&!r._fetching&&(r._rangeStart=s.skip()),r._fetching=!1}}),Dt={create:{text:"Add new record",imageClass:"k-add",className:"k-grid-add",iconClass:"k-icon"},cancel:{text:"Cancel changes",imageClass:"k-cancel",className:"k-grid-cancel-changes",iconClass:"k-icon"},save:{text:"Save changes",imageClass:"k-update",className:"k-grid-save-changes",iconClass:"k-icon"},destroy:{text:"Delete",imageClass:"k-delete",className:"k-grid-delete",iconClass:"k-icon"},edit:{text:"Edit",imageClass:"k-edit",className:"k-grid-edit",iconClass:"k-icon"},update:{text:"Update",imageClass:"k-update",className:"k-grid-update",iconClass:"k-icon"},canceledit:{text:"Cancel",imageClass:"k-cancel",className:"k-grid-cancel",iconClass:"k-icon"}},At=T.extend({init:function(e,t){var n=this;t=F(t)?{dataSource:t}:t,T.fn.init.call(n,e,t),kt=b.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(),b.notify(n)},events:[Z,"dataBinding","cancel",nt,it,rt,$,K,X,G,Y,Q,tt,st,lt,et,J],setDataSource:function(e){var t=this;t.options.dataSource=e,t._dataSource(),t._pageable(),t.options.groupable&&t._groupable(),t._thead(),t.virtualScrollable&&t.virtualScrollable.setDataSource(t.options.dataSource),t.options.autoBind&&e.fetch()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,navigatable:!1,pageable:!1,editable:!1,groupable:!1,rowTemplate:"",altRowTemplate:"",dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1,detailTemplate:null,columnResizeHandleWidth:3},destroy:function(){var t,n=this;T.fn.destroy.call(n),n.pager&&n.pager.destroy(),n.groupable&&n.groupable.destroy(),n.options.reorderable&&n.wrapper.data("kendoReorderable").destroy(),n.resizable&&(n.resizable.destroy(),n._resizeUserEvents&&(n._resizeHandleDocumentClickHandler&&e(document).off("click",n._resizeHandleDocumentClickHandler),n._resizeUserEvents.destroy())),n.virtualScrollable&&n.virtualScrollable.destroy(),n._destroyColumnAttachments(),n._destroyEditable(),n.dataSource.unbind(Z,n._refreshHandler).unbind(H,n._progressHandler).unbind(L,n._errorHandler),t=n.element.add(n.wrapper).add(n.table).add(n.thead).add(n.wrapper.find(">.k-grid-toolbar")),n.content&&(t=t.add(n.content).add(n.content.find(">.k-virtual-scrollable-wrap"))),n.pane&&n.pane.destroy(),t.off(q),b.destroy(n.wrapper)},setOptions:function(e){var t=this;T.fn.setOptions.call(this,e),t._templates()},items:function(){return this.tbody.children(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")},_destroyColumnAttachments:function(){var t=this;t.resizeHandle=null,t.thead.find("th").each(function(){var t=e(this),n=t.data("kendoFilterMenu"),i=t.data("kendoSortable"),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("").appendTo(t.element))),Ct&&n.attr("cellspacing",0),t.table=n.attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_createResizeHandle:function(t,n){var i,o,a,s,l,d=this,c=d.options.columnResizeHandleWidth,u=d.options.scrollable,p=d.resizeHandle;p||(p=d.resizeHandle=e('
      '),t.append(p)),kt?(o=n.closest(".k-grid-header-wrap"),a=xt.msie?o.scrollLeft():0,s=xt.webkit?o[0].scrollWidth-o[0].offsetWidth-o.scrollLeft():0,l=xt.mozilla?o[0].scrollWidth-o[0].offsetWidth-(o[0].scrollWidth-o[0].offsetWidth-o.scrollLeft()):0,i=n.position().left-s+l-a):(i=n[0].offsetWidth,n.prevAll(":visible").each(function(){i+=this.offsetWidth})),p.css({top:u?0:r(d.wrapper),left:i-c,height:n.outerHeight(),width:3*c}).data("th",n).show()},_positionColumnResizeHandle:function(t){var n=this,i=n.resizeHandle,r=n.options.columnResizeHandleWidth;n.thead.on("mousemove"+q,"th:not(.k-group-cell,.k-hierarchy-cell)",function(a){var s=e(this),l=a.clientX,d=e(window).scrollLeft(),c=s.offset().left+(kt?0:this.offsetWidth);l+d>c-r&&c+r>l+d?n._createResizeHandle(t,s):i?i.hide():o(n.wrapper,"")})},_resizeHandleDocumentClick:function(t){e(t.target).closest(".k-column-active").length||(e(document).off(t),this._hideResizeHandle())},_hideResizeHandle:function(){this.resizeHandle&&(this.resizeHandle.data("th").removeClass("k-column-active"),this.resizeHandle.hide())},_positionColumnResizeHandleTouch:function(t){var n=this;n._resizeUserEvents=new b.UserEvents(n.thead,{filter:"th:not(.k-group-cell,.k-hierarchy-cell)",threshold:10,hold:function(i){var r=e(i.target);i.preventDefault(),r.addClass("k-column-active"),n._createResizeHandle(t,r),n._resizeHandleDocumentClickHandler||(n._resizeHandleDocumentClickHandler=z(n._resizeHandleDocumentClick,n)),e(document).on("click",n._resizeHandleDocumentClickHandler)}})},_resizable:function(){var t,n,i,r,a,s,l=this,d=l.options,c=this._isMobile;d.resizable&&(t=d.scrollable?l.wrapper.find(".k-grid-header-wrap:first"):l.wrapper,c?l._positionColumnResizeHandleTouch(t):l._positionColumnResizeHandle(t),l.resizable=new y.Resizable(t,{handle:".k-resize-handle",hint:function(t){return e('
      ').css({height:t.data("th").outerHeight()+l.tbody.attr("clientHeight")})},start:function(t){s=e(t.currentTarget).data("th"),c&&l._hideResizeHandle();var u=e.inArray(s[0],s.parent().children(":visible")),p=l.tbody.parent(),h=l.footer||e();o(l.wrapper,"col-resize"),a=d.scrollable?l.thead.parent().find("col:eq("+u+")").add(p.children("colgroup").find("col:eq("+u+")")).add(h.find("colgroup").find("col:eq("+u+")")):p.children("colgroup").find("col:eq("+u+")"),n=t.x.location,i=s.outerWidth(),r=l.tbody.outerWidth()},resize:function(t){var o=kt?-1:1,s=i+t.x.location*o-n*o,c=l.footer||e();s>10&&(a.css("width",s),d.scrollable&&r&&(l._footerWidth=r+t.x.location*o-n*o,l.tbody.parent().add(l.thead.parent()).add(c.find("table")).css("width",l._footerWidth)))},resizeend:function(){var e,t=s.outerWidth();o(l.wrapper,""),i!=t&&(e=l.columns[s.parent().find("th:not(.k-group-cell,.k-hierarchy-cell)").index(s)],e.width=t,l.trigger(st,{column:e,oldWidth:i,newWidth:t})),l._hideResizeHandle(),s=null}}))},_draggable:function(){var t=this;t.options.reorderable&&(t._draggableInstance&&t._draggableInstance.destroy(),t._draggableInstance=t.wrapper.kendoDraggable({group:b.guid(),filter:t.content?".k-grid-header:first "+j:"table:first>.k-grid-header "+j,drag:function(){t._hideResizeHandle()},hint:function(t){return e('
      ').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(t.attr(b.attr("title"))||t.attr(b.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=I(e.columns[t.newIndex],e.columns),i=e.columns[t.oldIndex];e.trigger(lt,{newIndex:n,oldIndex:I(i,e.columns),column:i}),e.reorderColumn(n,i)}})},reorderColumn:function(e,t){var n,i,r,o=this,a=I(t,o.columns),l=I(t,d(o.columns)),c=I(o.columns[e],d(o.columns)),u=o.footer||o.wrapper.find(".k-grid-footer");if(a!==e)for(o._hideResizeHandle(),o.columns.splice(a,1),o.columns.splice(e,0,t),o._templates(),s(o.thead.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),l,c),o.options.scrollable&&s(o.tbody.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),l,c),s(o.thead.find(".k-header:not(.k-group-cell,.k-hierarchy-cell)"),a,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)"),a,e)),n=o.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)"),a,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(b.attr("uid"));return this.dataSource.getByUid(n)},_editable:function(){var t,n=this,i=n.selectable&&n.selectable.options.multiple,r=n.options.editable,o=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(dt+q,"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"+q,function(){clearTimeout(n.timer),n.timer=null}).on("focusout"+q,function(){n.timer=setTimeout(o,1)}):r.update!==!1&&n.wrapper.on(dt+q,"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(dt+q,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible .k-grid-delete",function(t){t.preventDefault(),t.stopPropagation(),n.removeRow(e(this).closest("tr"))}):n.wrapper.on(dt+q,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible button.k-grid-delete",function(e){e.stopPropagation(),n._confirmation()||e.preventDefault()}))},editCell:function(t){t=e(t);var n=this,i=n.columns[n.cellIndex(t)],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(Y,{values:e.values,container:t,model:r})&&e.preventDefault()}}).data("kendoEditable"),t.parent().addClass("k-grid-edit-row"),n.trigger(G,{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._destroyEditView())};e.editable&&("popup"!==e._editMode()||e._isMobile?t():e._editContainer.data("kendoWindow").bind("deactivate",t).close())},_destroyEditView:function(){this.editView&&(this.editView.purge(),this.editView=null,this.pane.navigate(""))},_attachModelChange:function(e){var t=this;t._modelChangeHandler=function(e){t._modelChange({field:e.field,model:this})},e.bind("change",t._modelChangeHandler)},_detachModelChange:function(){var e=this,t=e._editContainer,n=e._modelForContainer(t);n&&n.unbind(Z,e._modelChangeHandler)},closeCell:function(t){var n,i,r,o=this,a=o._editContainer;a&&(n=a.closest("tr").attr(b.attr("uid")),r=o.dataSource.getByUid(n),t&&o.trigger("cancel",{container:a,model:r})||(a.removeClass("k-edit-cell"),i=o.columns[o.cellIndex(a)],a.parent().removeClass("k-grid-edit-row"),o._destroyEditable(),o._displayCell(a,i,r),a.hasClass("k-dirty-cell")&&e('').prependTo(a)))},_displayCell:function(e,t,n){var i=this,r={storage:{},count:0},o=A({},b.Template,i.options.templateSettings),a=b.template(i._cellTmpl(t,r),o);r.count>0&&(a=z(a,r.storage)),e.empty().html(a(n))},removeRow:function(e){this._confirmation(e)&&this._removeRow(e)},_removeRow:function(t){var n,i,r=this;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){var i,r,o,a,s=this;n instanceof b.data.ObservableObject?i=n:(n=e(n),i=s._modelForContainer(n)),r=s._editMode(),o=s.options.navigatable,s.cancelRow(),i&&(s._attachModelChange(i),"popup"===r?s._createPopupEditor(i):"inline"===r?s._createInlineEditor(n,i):"incell"===r&&e(n).children(O).each(function(){var n=e(this),r=s.columns[n.index()];return i=s._modelForContainer(n),i&&(!i.editable||i.editable(r.field))&&r.field?(s.editCell(n),!1):t}),a=s.editView?s.editView.element:s._editContainer,a.on(dt+q,"a.k-grid-cancel",function(t){if(t.preventDefault(),t.stopPropagation(),!s.trigger("cancel",{container:a,model:i})){var n=s.items().index(e(s.current()).parent());s.cancelRow(),o&&(s.current(s.items().eq(n).children().filter(U).first()),v(s.table,!0))}}),a.on(dt+q,"a.k-grid-update",function(e){e.preventDefault(),e.stopPropagation(),s.saveRow()}))},_createPopupEditor:function(n){var i,r,o,a,s,l,d,c,u,p,h,f=this,g="
      ',_=[],y=f.options.editable,w=y.template,k=D(y)?y.window:{},x=A({},b.Template,f.options.templateSettings);if(k=k||{},w)for(typeof w===ht&&(w=window.unescape(w)),g+=b.template(w,x)(n),o=0,a=f.columns.length;a>o;o++)i=f.columns[o],i.command&&(c=m(i.command,"edit"),c&&(r=c));else for(o=0,a=f.columns.length;a>o;o++)i=f.columns[o],i.command?i.command&&(c=m(i.command,"edit"),c&&(r=c)):(g+='
      ",n.editable&&!n.editable(i.field)||!i.field?(p={storage:{},count:0},s=b.template(f._cellTmpl(i,p),x),p.count>0&&(s=z(s,p.storage)),g+='
      '+s(n)+"
      "):(_.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),g+="
      '));r&&D(r)&&(r.text&&D(r.text)&&(l=r.text.update,d=r.text.cancel),r.attr&&(u=r.attr)),f._isMobile?(g+="
      ",f.editView=f.pane.append("
      '+"
      '+f._createButton({name:"update",text:l,attr:u})+(k.title||"Edit")+f._createButton({name:"canceledit",text:d,attr:u})+"
      "+g+"
      "),h=f._editContainer=f.editView.element.find(".k-popup-edit-form")):(g+='
      ',g+=f._createButton({name:"update",text:l,attr:u})+f._createButton({name:"canceledit",text:d,attr:u}),g+="
      ",h=f._editContainer=e(g).appendTo(f.wrapper).eq(0).kendoWindow(A({modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1,close:function(i){if(i.userTriggered){if(f.trigger("cancel",{container:h,model:n}))return i.preventDefault(),t;var r=f.items().index(e(f.current()).parent());f.cancelRow(),f.options.navigatable&&(f.current(f.items().eq(r).children().filter(U).first()),v(f.table,!0))}}},k))),f.editable=f._editContainer.kendoEditable({fields:_,model:n,clearContainer:!1}).data("kendoEditable"),f._isMobile&&h.find("input[type=checkbox],input[type=radio]").parent(".k-edit-field").addClass("k-check").prev(".k-edit-label").addClass("k-check").click(function(){e(this).next().children("input").click()}),f._openPopUpEditor(),f.trigger(G,{container:h,model:n})},_openPopUpEditor:function(){this._isMobile?this.pane.navigate(this.editView,this._editAnimation):this._editContainer.data("kendoWindow").center().open()},_createInlineEditor:function(t,n){var i,r,o,a=this,s=[];t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){if(r=e(this),i=a.columns[a.cellIndex(r)],i.command||!i.field||n.editable&&!n.editable(i.field)){if(i.command&&(o=m(i.command,"edit"))){r.empty();var t,l,d;D(o)&&(o.text&&D(o.text)&&(t=o.text.update,l=o.text.cancel),o.attr&&(d=o.attr)),e(a._createButton({name:"update",text:t,attr:d})+a._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(b.attr("container-for"),i.field),r.empty()}),a._editContainer=t,a.editable=t.addClass("k-grid-edit-row").kendoEditable({fields:s,model:n,clearContainer:!1}).data("kendoEditable"),a.trigger(G,{container:t,model:n})},cancelRow:function(){var e,t=this,n=t._editContainer;n&&(e=t._modelForContainer(n),t._destroyEditable(),t.dataSource.cancelChanges(e),"popup"!==t._editMode()?t._displayRow(n):t._displayRow(t.items().filter("["+b.attr("uid")+"="+e.uid+"]")))},saveRow:function(){var e=this,t=e._editContainer,n=e._modelForContainer(t),i=e.editable;t&&i&&i.end()&&!e.trigger(Y,{container:t,model:n})&&e.dataSource.sync()},_displayRow:function(t){var n=this,i=n._modelForContainer(t);i&&t.replaceWith(e((t.hasClass("k-alt")?n.altRowTemplate:n.rowTemplate)(i)))},_showMessage:function(t,n){var i,r,o,a=this;return a._isMobile?(i=b.template(''),r=e(i(t)).appendTo(a.view.element),o=new b.mobile.ui.ActionSheet(r,{cancel:t.cancelDelete,cancelTemplate:'
    • #:cancel#
    • ',close:function(){this.destroy()},command:function(t){var i=e(t.currentTarget).parent();i.hasClass("km-actionsheet-cancel")||a._removeRow(n)},popup:a._actionSheetPopupOptions}),o.open(n),!1):window.confirm(t.title)},_confirmation:function(e){var t=this,n=t.options.editable,i=n===!0||typeof n===ht?ft:n.confirmation;return i!==!1&&null!=i?t._showMessage({confirmDelete:n.confirmDelete||gt,cancelDelete:n.cancelDelete||mt,title:i===!0?ft:i},e):!0},cancelChanges:function(){this.dataSource.cancelChanges()},saveChanges:function(){var e=this;(e.editable&&e.editable.end()||!e.editable)&&!e.trigger(tt)&&e.dataSource.sync()},addRow:function(){var e,t,n,i,r,o=this,a=o.dataSource,s=o._editMode(),l=o.options.editable.createAt||"",d=a.pageSize(),c=a.view()||[];(o.editable&&o.editable.end()||!o.editable)&&("incell"!=s&&o.cancelRow(),e=a.indexOf(c[0]),"bottom"==l.toLowerCase()&&(e+=c.length,d&&!a.options.serverPaging&&d<=c.length&&(e-=1)),0>e&&(e=a.page()>a.totalPages()?(a.page()-1)*d:0),t=a.insert(e,{}),n=t.uid,i=o.table.find("tr["+b.attr("uid")+"="+n+"]"),r=i.children("td:not(.k-group-cell,.k-hierarchy-cell)").eq(o._firstEditableColumnIndex(i)),"inline"===s&&i.length?o.editRow(i):"popup"===s?o.editRow(t):r.length&&o.editCell(r))},_firstEditableColumnIndex:function(e){var t,n,i,r=this,o=r.columns,a=r._modelForContainer(e);for(n=0,i=o.length;i>n;n++)if(t=o[n],a&&(!a.editable||a.editable(t.field))&&!t.command&&t.field)return n;return-1},_toolbar:function(){var t,n=this,i=n.wrapper,r=n.options.toolbar,o=n.options.editable;r&&(t=n.wrapper.find(".k-grid-toolbar"),t.length||(M(r)||(r=typeof r===ht?r:n._toolbarTmpl(r).replace(_t,"\\#"),r=z(b.template(r),n)),t=e('
      ').html(r({})).prependTo(i)),o&&o.create!==!1&&t.on(dt+q,".k-grid-add",function(e){e.preventDefault(),n.addRow()}).on(dt+q,".k-grid-cancel-changes",function(e){e.preventDefault(),n.cancelChanges()}).on(dt+q,".k-grid-save-changes",function(e){e.preventDefault(),n.saveChanges()}))},_toolbarTmpl:function(e){var t,n,i=this,r="";if(F(e))for(t=0,n=e.length;n>t;t++)r+=i._createButton(e[t]);return r},_createButton:function(e){var t=e.template||wt,n=typeof e===ht?e:e.name||e.text,r=Dt[n]?Dt[n].className:"k-grid-"+(n||"").replace(/\s/g,""),o={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+=" "+o.className),"edit"===n&&D(e.text)&&(e=A(!0,{},e),e.text=e.text.edit),e.attr&&D(e.attr)&&(e.attr=i(e.attr)),o=A(!0,o,Dt[n],e)):o=A(!0,o,Dt[n]),b.template(t)(o)},_hasFooters:function(){var e,t=this.columns,n=t.length;for(e=0;n>e;e++)if(""!==t[e].footerTemplate||""!==t[e].groupFooterTemplate)return!0;return!1},_groupable:function(){var t=this;t._groupableClickHandler?t.table.off(dt+q,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(dt+q,".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,r=j+":visible["+b.attr("field")+"]",o=j+"["+b.attr("field")+"]";i&&(n.has("div.k-grouping-header")[0]||e("
       
      ").addClass("k-grouping-header").prependTo(n),t.groupable&&t.groupable.destroy(),t.groupable=new k(n,A({},i,{draggable:t._draggableInstance,groupContainer:">div.k-grouping-header",dataSource:t.dataSource,draggableElements:t.content?".k-grid-header:first "+r:"table:first>.k-grid-header "+r,filter:t.content?".k-grid-header:first "+o:"table:first>.k-grid-header "+o,allowDrag:t.options.reorderable})))},_selectable:function(){var e,n,i=this,r=[],o=i.options.selectable;o&&(e=typeof o===ht&&o.toLowerCase().indexOf("multiple")>-1,n=typeof o===ht&&o.toLowerCase().indexOf("cell")>-1,i._hasDetails()&&(r[r.length]=".k-detail-row"),(i.options.groupable||i._hasFooters())&&(r[r.length]=".k-grouping-row,.k-group-footer"),r=r.join(","),""!==r&&(r=":not("+r+")"),i.selectable=new b.ui.Selectable(i.table,{filter:">"+(n?V:"tbody>tr"+r),aria:!0,multiple:e,change:function(){i.trigger(Z)}}),i.options.navigatable&&i.table.on("keydown"+q,function(r){var o=i.current();if(r.keyCode===S.SPACEBAR&&r.target==i.table[0]&&!o.is(".k-edit-cell,.k-header")&&o.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")){if(r.preventDefault(),r.stopPropagation(),o=n?o:o.parent(),e)if(r.ctrlKey){if(o.hasClass(at))return o.removeClass(at),i.trigger(Z),t}else i.selectable.clear();else i.selectable.clear();i.selectable.value(o)}}))},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger(Z)},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,o=i._current,a=i.table.add(i.thead.parent());return n!==t&&n.length&&(o&&o[0]===n[0]||(o&&(o.removeClass(ot).removeAttr("id"),a.removeAttr("aria-activedescendant")),n.attr("id",i._cellId),i._current=n.addClass(ot),a.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(ot),this._current=null)},_scrollTo:function(e,t){var n=e.tagName.toLowerCase(),i="td"===n||"th"===n,r=e[i?"offsetLeft":"offsetTop"],o=e[i?"offsetWidth":"offsetHeight"],a=t[i?"scrollLeft":"scrollTop"],s=t[i?"clientWidth":"clientHeight"],l=r+o,d=0;d=a>r?r:l>a+s?s>=o?l-s:r:a,t[i?"scrollLeft":"scrollTop"]=d},_navigatable:function(){var t=this,n=z(t.current,t),i=t.table,r=t.thead.parent(),o=i,a=b.support.isRtl(t.element);t.options.navigatable&&(t.options.scrollable&&(o=i.add(r),r.attr(ut,-1)),r.on("keydown"+q,function(e){e.altKey&&e.keyCode==S.DOWN&&(n().find(".k-grid-filter, .k-header-column-menu").click(),e.stopImmediatePropagation())}).find("a.k-link").attr("tabIndex",-1),i.attr(ut,R.max(i.attr(ut)||0,0)).on("mousedown"+q+" keydown"+q,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}),o.on(b.support.touch?"touchstart"+q:"mousedown"+q,N+">"+U,z(_,t)).on("focus"+q,function(){if(!b.support.touch){var t=n();t&&t.is(":visible")?t.addClass(ot):n(e(this).find(W)),this==i[0]?(r.attr(ut,-1),i.attr(ut,0)):(i.attr(ut,-1),r.attr(ut,0))}}).on("focusout"+q,function(){var e=n();e&&e.removeClass(ot)}).on("keydown"+q,function(r){var o,s,l,d,c,u,p,h,f=r.keyCode,g=!1,m=!r.isDefaultPrevented()&&!e(r.target).is(":button,a,:input,a>.k-icon"),_=t.options.pageable,b=t.dataSource,y="incell"==t._editMode(),w=r.shiftKey,k=n();k&&k.is("th")&&(m=!0),m&&f==S.UP?(k?(l=k.parent().prevAll(N).first(),l[0]||(c=t.thead.parent(),v(c,!0),l=c.find(N).first()),d=k.index(),k=l.children().eq(d),k[0]&&k.is(U)||(k=l.children(U).first())):k=i.find(W),g=!0,n(k)):m&&f==S.DOWN?(k?(l=k.parent().nextAll(N).first(),!l[0]&&k.is("th")&&(v(t.tbody.parent()),l=t.tbody.find(N).first()),d=k.index(),k=l.children().eq(d),k[0]&&k.is(U)||(k=l.children(U).first())):k=i.find(W),g=!0,n(k)):m&&f==(a?S.RIGHT:S.LEFT)?(n(k?k.prevAll(O+":first"):i.find(W)),g=!0):m&&f==(a?S.LEFT:S.RIGHT)?(k?k.next()[0]&&(k=k.nextAll(O+":first")):k=i.find(W),g=!0,n(k)):m&&_&&S.PAGEDOWN==f?(b.page(b.page()+1),g=!0):m&&_&&S.PAGEUP==f?(b.page(b.page()-1),g=!0):f==S.ENTER||S.F2==f?(k=k?k:i.find(W),k.is("th")?(k.find(".k-link").click(),g=!0):k.parent().is(".k-master-row,.k-grouping-row")?(k.parent().find(".k-icon:first").click(),g=!0):(u=k.find(":kendoFocusable:first"),!k.hasClass("k-edit-cell")&&u[0]&&k.hasClass("k-state-focused")?(u.focus(),g=!0):t.options.editable&&!e(r.target).is(":button,.k-button,textarea")&&(p=e(r.target).closest("[role=gridcell]"),p[0]||(p=k),t._handleEditing(p),g=!0))):S.ESC==f?(o=C(),k&&e.contains(k[0],o)&&!k.hasClass("k-edit-cell")&&!k.parent().hasClass("k-grid-edit-row")?(v(t.table[0],!0),g=!0):!t._editContainer||k&&!t._editContainer.has(k[0])&&k[0]!==t._editContainer[0]||(y?t.closeCell(!0):(s=t.items().index(e(k).parent()),o&&o.blur(),t.cancelRow(),s>=0&&t.current(t.items().eq(s).children().filter(U).first())),xt.msie&&xt.version<9&&document.body.focus(),v(i,!0),g=!0)):S.TAB==f&&(k=e(k),t.options.editable&&y&&(h=e(C()).closest(".k-edit-cell"),h[0]&&h[0]!==k[0]&&(k=h)),h=w?k.prevAll(O+":first"):k.nextAll(":visible:first"),h.length||(h=k.parent()[w?"prevAll":"nextAll"]("tr:not(.k-grouping-row):not(.k-detail-row):visible:first").children(O+(w?":last":":first"))),!k.is("th")&&h.length&&t.options.editable&&y&&(t._handleEditing(k,h),g=!0)),g&&(r.preventDefault(),r.stopPropagation())}))},_handleEditing:function(n,i){var r,o,a=this,s=e(C()),l=a._editMode(),d=xt.msie,c=d&&xt.version<9,u=a._editContainer;if(o="incell"==l?n.hasClass("k-edit-cell"):n.parent().hasClass("k-grid-edit-row"),a.editable){if(e.contains(u[0],s[0])&&(xt.opera||c?s.change().triggerHandler("blur"):(s.blur(),d&&s.blur())),!a.editable)return v(a.table),t; if(!a.editable.end())return"incell"==l?a.current(u):a.current(u.children().filter(O).first()),r=u.find(":kendoFocusable:first")[0],r&&r.focus(),t;"incell"==l?a.closeCell():(a.saveRow(),o=!0)}i&&a.current(i),c&&document.body.focus(),v(a.table,!0),(!o&&!i||i)&&("incell"==l?a.editCell(a.current()):a.editRow(a.current().parent()))},_wrapper:function(){var e=this,t=e.table,n=e.options.height,i=e.element;i.is("div")||(i=i.wrap("
      ").parent()),e.wrapper=i.addClass("k-grid k-widget k-secondary"),n&&(e.wrapper.css(ct,n),t.css(ct,"auto")),e._initMobile()},_initMobile:function(){var t,n=this.options;this._isMobile=n.mobile===!0&&b.support.mobileOS||"phone"===n.mobile||"tablet"===n.mobile,this._isMobile&&(t=this.wrapper.addClass("k-grid-mobile").wrap("
      ').parent(),this.pane=b.mobile.ui.Pane.wrap(t),this.view=this.pane.view(),this._actionSheetPopupOptions=e(document.documentElement).hasClass("km-root")?{modal:!1}:{align:"bottom center",position:"bottom center",effect:"slideIn:up"},n.height&&this.pane.element.parent().css(ct,n.height),this._editAnimation="slide")},_tbody:function(){var t,n=this,i=n.table;t=i.find(">tbody"),t.length||(t=e("
      ").appendTo(i)),n.tbody=t},_scrollable:function(){var t,n,i,r,o,a=this,s=a.options,l=s.scrollable,d=l!==!0&&l.virtual&&!a.virtualScrollable,c=!b.support.kineticScrollNeeded||d?b.support.scrollbar():0;l&&(t=a.wrapper.children(".k-grid-header"),t[0]||(t=e('
      ').insertBefore(a.table)),t.css(kt?"padding-left":"padding-right",l.virtual?c+1:c),n=e('
      '),Ct&&n.attr("cellspacing",0),n.append(a.thead),t.empty().append(e('
      ').append(n)),a.content=a.table.parent(),a.content.is(".k-virtual-scrollable-wrap")&&(a.content=a.content.parent()),a.content.is(".k-grid-content, .k-virtual-scrollable-wrap")||(a.content=a.table.wrap('
      ').parent()),d&&(a.virtualScrollable=new St(a.content,{dataSource:a.dataSource,itemHeight:z(a._averageRowHeight,a)})),a.scrollables=t.children(".k-grid-header-wrap"),i=a.wrapper.find(".k-grid-footer"),r=kt&&xt.webkit?c:0,i.length&&(a.scrollables=a.scrollables.add(i.children(".k-grid-footer-wrap"))),l.virtual?a.content.find(">.k-virtual-scrollable-wrap").bind("scroll"+q,function(){a.scrollables.scrollLeft(this.scrollLeft+r)}):(a.content.bind("scroll"+q,function(){a.scrollables.scrollLeft(this.scrollLeft+r)}),o=b.touchScroller(a.content),o&&o.movable&&o.movable.bind("change",function(e){a.scrollables.scrollLeft(-e.sender.x)})))},_setContentWidth:function(){var t,n=this,i="k-grid-content-expander",r='
      ',o=n.resizable;n.options.scrollable&&(t=n.table.parent().children("."+i),n._setContentWidthHandler=z(n._setContentWidth,n),n.dataSource.view().length?t[0]&&(t.remove(),o&&o.unbind("resize",n._setContentWidthHandler)):(t[0]||(t=e(r).appendTo(n.table.parent()),o&&o.bind("resize",n._setContentWidthHandler)),t.width(n.thead.width())))},_setContentHeight:function(){var e,t=this,n=t.options,i=t.wrapper.innerHeight(),r=t.wrapper.children(".k-grid-header"),o=b.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*o?t.content.height(i):t.content.height(2*o+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=F(r)?{data:r}:r,D(r)&&(A(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(Z,n._refreshHandler).unbind(H,n._progressHandler).unbind(L,n._errorHandler):(n._refreshHandler=z(n.refresh,n),n._progressHandler=z(n._requestStart,n),n._errorHandler=z(n._error,n)),n.dataSource=w.create(r).bind(Z,n._refreshHandler).bind(H,n._progressHandler).bind(L,n._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_modelChange:function(t){var n,i,r,o,a=this,s=t.model,l=a.tbody.find("tr["+b.attr("uid")+"="+s.uid+"]"),d=l.hasClass("k-alt"),c=a.items().index(l);if(l.children(".k-edit-cell").length&&!a.options.rowTemplate)l.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){n=e(this),i=a.columns[a.cellIndex(n)],i.field===t.field&&(n.hasClass("k-edit-cell")?n.addClass("k-dirty-cell"):(a._displayCell(n,i,s),e('').prependTo(n)))});else if(!l.hasClass("k-grid-edit-row")){for(r=(d?a.altRowTemplate:a.rowTemplate)(s),l.replaceWith(r),r=a.items().eq(c),c=0,o=a.columns.length;o>c;c++)i=a.columns[c],i.field===t.field&&(n=r.children(":not(.k-group-cell,.k-hierarchy-cell)").eq(c),e('').prependTo(n));a.trigger("itemChange",{item:r,data:s,ns:y})}},_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 b.ui.Pager?i:new b.ui.Pager(t,A({},i,{dataSource:n.dataSource})))},_footer:function(){var t,n,i=this,r=i.dataSource.aggregates(),o="",s=i.footerTemplate,l=i.options,d=i.footer||i.wrapper.find(".k-grid-footer");s?(r=B(r)?a(i.dataSource.aggregate()):r,o=e(i._wrapFooter(s(r))),d.length?(n=o,d.replaceWith(n),d=i.footer=n):d=i.footer=l.scrollable?l.pageable?o.insertBefore(i.wrapper.children("div.k-grid-pager")):o.appendTo(i.wrapper):o.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=b.support.mobileOS?0:b.support.scrollbar();return n.options.scrollable?(i=e('
      "+t+"
      "),n._appendCols(i.find("table")),i.css(kt?"padding-left":"padding-right",r),i):''+t+""},_columnMenu:function(){var t,n,i,r,o,a,s=this,l=s.columns,d=s.options,c=d.columnMenu,u=this._isMobile,p=function(){v(s.thead.parent(),!0)},h=function(e){s.trigger(X,{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],a=e(this),n.command||!n.field&&!a.attr("data-"+b.ns+"field")||(t=a.data("kendoColumnMenu"),t&&t.destroy(),r=n.sortable!==!1&&c.sortable!==!1?d.sortable:!1,o=d.filterable&&n.filterable!==!1&&c.filterable!==!1?A({},n.filterable,d.filterable):!1,i={dataSource:s.dataSource,values:n.values,columns:c.columns,sortable:r,filterable:o,messages:c.messages,owner:s,closeCallback:p,init:h,filter:u?":not(.k-column-active)":""},a.kendoColumnMenu(i))}))},_filterable:function(){var t,n,i=this,r=i.columns,o=function(){v(i.thead.parent(),!0)},a=i.options.filterable;a&&!i.options.columnMenu&&i.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(s){var l,d;t=e(this),r[s].filterable===!1||r[s].command||!r[s].field&&!t.attr("data-"+b.ns+"field")||(n=t.data("kendoFilterMenu"),n&&n.destroy(),l=r[s].filterable,d=A({},a,l,{dataSource:i.dataSource,values:r[s].values,closeCallback:o,init:function(e){i.trigger(K,{field:e.field,container:e.container})}}),l&&l.messages&&(d.messages=A(!0,{},a.messages,l.messages)),t.kendoFilterMenu(d))})},_sortable:function(){var t,n,i,r=this,o=r.columns,a=r.options.sortable;a&&r.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(s){t=o[s],t.sortable!==!1&&!t.command&&t.field&&(n=e(this),i=n.data("kendoSortable"),i&&i.destroy(),n.attr("data-"+b.ns+"field",t.field).kendoSortable(A({},a,t.sortable,{dataSource:r.dataSource,aria:!0,filter:":not(.k-column-active)"})))})},_columns:function(t){var n,i=this,r=i.table,o=r.find("col"),a=i.options.dataSource;t=t.length?t:E(r.find("th"),function(t,n){t=e(t);var i=t.attr(b.attr("sortable")),r=t.attr(b.attr("filterable")),a=t.attr(b.attr("type")),s=t.attr(b.attr("groupable")),l=t.attr(b.attr("field")),d=t.attr(b.attr("menu"));return l||(l=t.text().replace(/\s|[^A-z0-9]/g,"")),{field:l,type:a,sortable:"false"!==i,filterable:"false"!==r,groupable:"false"!==s,menu:d,template:t.attr(b.attr("template")),width:o.eq(n).css("width")}}),n=!(i.table.find("tbody tr").length>0&&(!a||!a.transport)),i.columns=E(t,function(e){return e=typeof e===ht?{field:e}:e,e.hidden&&(e.attributes=c(e.attributes),e.footerAttributes=c(e.footerAttributes),e.headerAttributes=c(e.headerAttributes)),A({encoded:n},e)})},_groups:function(){var e=this.dataSource.group();return e?e.length:0},_tmpl:function(e,t){var r,o,a,s,l=this,d=A({},b.Template,l.options.templateSettings),c=l.columns.length,u={storage:{},count:0},p=l._hasDetails(),h=[],f=l._groups();if(!e){for(e="0&&(e+=n(f)),p&&(e+=''),r=0;c>r;r++)a=l.columns[r],o=a.template,s=typeof o,e+="",e+=l._cellTmpl(a,u),e+="";e+=""}return e=b.template(e,d),u.count>0?z(e,u.storage):e},_headerCellText:function(e){var t=this,n=A({},b.Template,t.options.templateSettings),i=e.headerTemplate,r=typeof i,o=e.title||e.field||"";return r===pt?o=b.template(i,n)({}):r===ht&&(o=i),o},_cellTmpl:function(e,t){var n,i,r=this,o=A({},b.Template,r.options.templateSettings),a=e.template,s=o.paramName,l=e.field,d="",c=e.format,u=typeof a,p=e.values;if(e.command){if(F(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===pt?(t.storage["tmpl"+t.count]=a,d+="#=this.tmpl"+t.count+"("+s+")#",t.count++):u===ht?d+=a:p&&p.length&&D(p[0])&&"value"in p[0]&&l?(d+="#var v ="+b.stringify(h(p))+"#",d+="#var f = v[",o.useWithBlock||(d+=s+"."),d+=l+"]#",d+="${f != null ? f : ''}"):(d+=e.encoded?"#:":"#=",c&&(d+='kendo.format("'+c.replace(vt,"\\$1")+'",'),l?(l=b.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(),o=t.footer||t.wrapper.find(".k-grid-footer"),a=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&&!B(a)||!B(a)&&!o.length||P(t.columns,function(e){return e.footerTemplate}).length)&&(t.footerTemplate=t._footerTmpl(a,"footerTemplate","k-footer-template")),r&&P(t.columns,function(e){return e.groupFooterTemplate}).length&&(a=e.map(r,function(e){return e.aggregates}),t.groupFooterTemplate=t._footerTmpl(a,"groupFooterTemplate","k-group-footer"))},_footerTmpl:function(e,t,r){var o,s,l,d,c,u=this,p=A({},b.Template,u.options.templateSettings),h=p.paramName,f="",g=u.columns,m={},v=0,_={},y=u._groups(),w=a(e);for(f+='',y>0&&(f+=n(y)),u._hasDetails()&&(f+=' '),o=0,s=u.columns.length;s>o;o++)c=g[o],l=c[t],d=typeof l,f+="",l?(d!==pt&&(_=w[c.field]?A({},p,{paramName:h+"."+c.field}):{},l=b.template(l,_)),m["tmpl"+v]=l,f+="#=this.tmpl"+v+"("+h+")#",v++):f+=" ",f+="";return f+="",f=b.template(f,p),v>0?z(f,m):f},_detailTmpl:function(e){var t=this,i="",r=A({},b.Template,t.options.templateSettings),o=r.paramName,a={},s=0,l=t._groups(),c=d(t.columns).length,u=typeof e;return i+='',l>0&&(i+=n(l)),i+='",u===pt?(a["tmpl"+s]=e,i+="#=this.tmpl"+s+"("+o+")#",s++):i+=e,i+="",i=b.template(i,r),s>0?z(i,a):i},_hasDetails:function(){var e=this;return null!==e.options.detailTemplate||(e._events[$]||[]).length},_details:function(){var t=this;t.table.on(dt+q,".k-hierarchy-cell .k-plus, .k-hierarchy-cell .k-minus",function(n){var i,r,o=e(this),a=o.hasClass("k-plus"),s=o.closest("tr.k-master-row"),l=t.detailTemplate,d=t._hasDetails();return o.toggleClass("k-plus",!a).toggleClass("k-minus",a),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($,{masterRow:s,detailRow:s.next(),data:r,detailCell:s.next().find(".k-detail-cell")})),i=s.next(),t.trigger(a?it:rt,{masterRow:s,detailRow:i}),i.toggle(a),t._current&&t._current.attr("aria-expanded",a),n.preventDefault(),!1})},dataItem:function(t){if(t=e(t)[0],!t)return null;var n,i,r=this.tbody.children(),o=/k-grouping-row|k-detail-row|k-group-footer/,a=t.sectionRowIndex;for(i=a,n=0;a>n;n++)o.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,o,a,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)),o=l.element.find("tr:has(th):first"),o.length||(o=p.children().first(),o.length||(o=e(""))),o.children().length)c&&!o.find(".k-hierarchy-cell")[0]&&o.prepend(' ');else{for(c&&(u+=' '),n=0,r=d.length;r>n;n++)s=d[n],a=l._headerCellText(s),s.command?u+=""+a+"":(u+=""+a+"");o.html(u)}o.find("th").addClass("k-header"),l.options.scrollable||p.addClass("k-grid-header"),o.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="",o=i.rowTemplate,a=i.altRowTemplate;for(t=0,n=e.length;n>t;t++)r+=t%2?a(e[t]):o(e[t]),i._data.push(e[t]);return r},_groupRowHtml:function(e,t,i){var r,o,a=this,s="",l=e.field,d=P(a.columns,function(e){return e.field==l})[0]||{},c=d.groupHeaderTemplate,u=(d.title||l)+": "+f(e.value,d.format,d.values),p=A({},{field:e.field,value:e.value},e.aggregates[e.field]),h=a._groupAggregatesDefaultObject||{},g=e.items;if(c&&(u=typeof c===pt?c(p):b.template(c)(p)),s+=''+n(i)+''+'

      '+''+u+"

      ",e.hasSubgroups)for(r=0,o=g.length;o>r;r++)s+=a._groupRowHtml(g[r],t-1,i+1);else s+=a._rowsHtml(g);return a.groupFooterTemplate&&(s+=a.groupFooterTemplate(A(h,e.aggregates))),s},collapseGroup:function(n){n=e(n).find(".k-icon").addClass("k-i-expand").removeClass("k-i-collapse").end();var i,r,o=n.find(".k-group-cell").length,a=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")?a++:r.hasClass("k-group-footer")&&a--,o>=i||r.hasClass("k-group-footer")&&0>a?!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,o=this,a=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,a>=r?!1:(r!=a+1||i.hasClass("k-detail-row")||(i.show(),i.hasClass("k-grouping-row")&&i.find(".k-icon").hasClass("k-i-collapse")&&o.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(P(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,o,a,s,l,u,p,h=this,f=0,m=h.footer||h.wrapper.find(".k-grid-footer"),v=h.columns;if(t="number"==typeof t?v[t]:P(v,function(e){return e.field===t})[0],t&&!t.hidden){for(p=I(t,d(v)),t.hidden=!0,t.attributes=c(t.attributes),t.footerAttributes=c(t.footerAttributes),t.headerAttributes=c(t.headerAttributes),h._templates(),h._updateCols(),g(h.thead.find(">tr")[0].cells,p,!1),m[0]&&(h._appendCols(m.find("table:first")),g(m.find(".k-footer-template")[0].cells,p,!1)),n=h.tbody.children(),a=0,u=n.length;u>a;a+=1)i=n.eq(a),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")),g(i[0].cells,p,!1));for(s=h.thead.prev().find("col"),a=0,u=s.length;u>a;a+=1){if(l=s[a].style.width,!l||-1!=l.indexOf("%")){f=0;break}f+=parseInt(l,10)}o=e(">.k-grid-header table:first,>.k-grid-footer table:first",h.wrapper).add(h.table),h._footerWidth=null,f&&(o.width(f),h._footerWidth=f),xt.msie&&8==xt.version&&(o.css("display","inline-table"),setTimeout(function(){o.css("display","table")},1)),h.trigger(J,{column:t})}},showColumn:function(t){var n,i,r,o,a,s,l,c,h,f,m=this,v=m.columns,_=m.footer||m.wrapper.find(".k-grid-footer");if(t="number"==typeof t?v[t]:P(v,function(e){return e.field===t})[0],t&&t.hidden){for(f=I(t,v),t.hidden=!1,t.attributes=u(t.attributes),t.footerAttributes=u(t.footerAttributes),t.headerAttributes=u(t.headerAttributes),m._templates(),m._updateCols(),g(m.thead.find(">tr")[0].cells,f,!0),_[0]&&(m._appendCols(_.find("table:first")),g(_.find(".k-footer-template")[0].cells,f,!0)),n=m.tbody.children(),i=0,r=n.length;r>i;i+=1)o=n.eq(i),o.is(".k-grouping-row,.k-detail-row")?(a=o.children(":not(.k-group-cell):first,.k-detail-cell").last(),a.attr("colspan",parseInt(a.attr("colspan"),10)+1)):(o.hasClass("k-grid-edit-row")&&(a=o.children(".k-edit-container")[0])&&(a=e(a),a.attr("colspan",parseInt(a.attr("colspan"),10)+1),p(a.find(">form>table"),d(v),!1,0),o=a.find("tr:first")),g(o[0].cells,f,!0));if(s=e(">.k-grid-header table:first,>.k-grid-footer table:first",m.wrapper).add(m.table),t.width){for(l=0,h=m.thead.prev().find("col"),i=0,r=h.length;r>i;i+=1){if(c=h[i].style.width,c.indexOf("%")>-1){l=0;break}l+=parseInt(c,10)}m._footerWidth=null,l&&(s.width(l),m._footerWidth=l)}else s.width("");m.trigger(et,{column:t})}},_progress:function(e){var t=this,n=t.element.is("table")?t.element.parent():t.content&&t.content.length?t.content:t.element;b.ui.progress(n,e)},refresh:function(t){var n,i,r,o,s,l,c=this,u="",p=c.dataSource.view(),h=c.options.navigatable,f=e(c.current()),g=!1,m=(c.dataSource.group()||[]).length,_=m+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(),h&&(c.table[0]===l||e.contains(c.table[0],l)||c._editContainer&&c._editContainer.data("kendoWindow"))&&(g=f.is("th"),s=0,g&&(s=c.thead.find("th:not(.k-group-cell)").index(f))),c._destroyEditable(),c._progress(!1),c._hideResizeHandle(),c._data=[],c.columns.length||(c._autoColumns(c._firstDataItem(p[0],m)),_=m+c.columns.length),c._group=m>0||c._group,c._group&&(c._templates(),c._updateCols(),c._updateHeader(m),c._group=m>0),m>0)for(c.detailTemplate&&_++,c.groupFooterTemplate&&(c._groupAggregatesDefaultObject=a(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:(o=document.createElement("div"),o.innerHTML=""+u+"
      ",r=o.firstChild.firstChild,c.table[0].replaceChild(r,c.tbody[0]),c.tbody=e(r)),c._footer(),c._setContentHeight(),c._setContentWidth(),s>=0&&(c._removeCurrent(),g?c.current(c.thead.find("th:not(.k-group-cell)").eq(s)):c.current(c.items().eq(s).children().filter(O).first()),c._current&&v(c._current.closest("table")[0],!0)),c.trigger(nt)}}});y.plugin(At),y.plugin(St)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i="change",r="cancel",o="dataBound",a="dataBinding",s=n.ui.Widget,l=n.keys,d=">*",c="progress",u="error",p="k-state-focused",h="k-state-selected",f="k-edit-item",g="string",m="edit",v="remove",_="save",b="click",y=".kendoListView",w=e.proxy,k=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._templates(),r._navigatable(),r._selectable(),r._pageable(),r._crudHandlers(),r.options.autoBind&&r.dataSource.fetch(),n.notify(r)},events:[i,r,a,o,m,v,_],options:{name:"ListView",autoBind:!0,selectable:!1,navigatable:!1,template:"",altTemplate:"",editTemplate:""},setOptions:function(e){s.fn.setOptions.call(this,e),this._templates()},_templates:function(){var e=this.options;this.template=n.template(e.template||""),this.altTemplate=n.template(e.altTemplate||e.template),this.editTemplate=n.template(e.editTemplate||"")},_item:function(e){return this.element.children()[e]()},items:function(){return this.element.children()},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&e.fetch()},_unbindDataSource:function(){var e=this;e.dataSource.unbind(i,e._refreshHandler).unbind(c,e._progressHandler).unbind(u,e._errorHandler)},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._refreshHandler=w(e.refresh,e),e._progressHandler=w(e._progress,e),e._errorHandler=w(e._error,e)),e.dataSource=C.create(e.options.dataSource).bind(i,e._refreshHandler).bind(c,e._progressHandler).bind(u,e._errorHandler)},_progress:function(){x(this.element,!0)},_error:function(){x(this.element,!1)},_element:function(){this.element.addClass("k-widget k-listview").attr("role","listbox")},refresh:function(e){var i,r,s,l,d,c=this,u=c.dataSource.view(),p="",h=c.template,f=c.altTemplate,g=k();if(e=e||{},"itemchange"===e.action)return c._hasBindingTarget()||c.editable||(i=e.items[0],s=c.items().filter("["+n.attr("uid")+"="+i.uid+"]"),s.length>0&&(l=s.index(),s.replaceWith(h(i)),s=c.items().eq(l),s.attr(n.attr("uid"),i.uid),c.trigger("itemChange",{item:s,data:i}))),t;if(!c.trigger(a,{action:e.action||"rebind",items:e.items,index:e.index})){for(c._destroyEditable(),l=0,d=u.length;d>l;l++)p+=l%2?f(u[l]):h(u[l]);for(c.element.html(p),r=c.items(),l=0,d=u.length;d>l;l++)r.eq(l).attr(n.attr("uid"),u[l].uid).attr("role","option").attr("aria-selected","false");c.element[0]===g&&c.options.navigatable&&c.current(r.eq(0)),c.trigger(o)}},_pageable:function(){var t,i,r=this,o=r.options.pageable;e.isPlainObject(o)&&(i=o.pagerId,t=e.extend({},o,{dataSource:r.dataSource,pagerId:null}),r.pager=new n.ui.Pager(e("#"+i),t))},_selectable:function(){var e,r,o=this,a=o.options.selectable,s=o.options.navigatable;a&&(e=typeof a===g&&a.toLowerCase().indexOf("multiple")>-1,e&&o.element.attr("aria-multiselectable",!0),o.selectable=new n.ui.Selectable(o.element,{aria:!0,multiple:e,filter:d,change:function(){o.trigger(i)}}),s&&o.element.on("keydown"+y,function(n){if(n.keyCode===l.SPACEBAR){if(r=o.current(),n.target==n.currentTarget&&n.preventDefault(),e)if(n.ctrlKey){if(r&&r.hasClass(h))return r.removeClass(h),t}else o.selectable.clear();else o.selectable.clear();o.selectable.value(r)}}))},current:function(e){var n=this,i=n.element,r=n._current,o=n._itemId;return e===t?r:(r&&r[0]&&(r[0].id===o&&r.removeAttr("id"),r.removeClass(p),i.removeAttr("aria-activedescendant")),e&&e[0]&&(o=e[0].id||o,n._scrollTo(e[0]),i.attr("aria-activedescendant",o),e.addClass(p).attr("id",o)),n._current=e,t)},_scrollTo:function(t){var n,i,r=this,o=!1,a="scroll";"auto"==r.wrapper.css("overflow")||r.wrapper.css("overflow")==a?n=r.wrapper[0]:(n=window,o=!0),i=function(i,r){var s=o?e(t).offset()[i.toLowerCase()]:t["offset"+i],l=t["client"+r],d=e(n)[a+i](),c=e(n)[r.toLowerCase()]();s+l>d+c?e(n)[a+i](s+l-c):d>s&&e(n)[a+i](s)},i("Top","Height"),i("Left","Width")},_navigatable:function(){var t=this,i=t.options.navigatable,r=t.element,o=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"+y,function(){var e=t._current;e&&e.is(":visible")||(e=t._item("first")),t.current(e)}).on("focusout"+y,function(){t._current&&t._current.removeClass(p)}).on("keydown"+y,function(i){var o,a,s=i.keyCode,d=t.current(),c=e(i.target),u=!c.is(":button,textarea,a,a>.t-icon,input"),p=c.is(":text"),h=n.preventDefault,g=r.find("."+f),m=k();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")),h(i);else if(l.DOWN===s||l.RIGHT===s)d&&(d=d.next()),t.current(d&&d[0]?d:t._item("first")),h(i);else if(l.PAGEUP===s)t.current(null),t.dataSource.page(t.dataSource.page()-1),h(i);else if(l.PAGEDOWN===s)t.current(null),t.dataSource.page(t.dataSource.page()+1),h(i);else if(l.HOME===s)t.current(t._item("first")),h(i);else if(l.END===s)t.current(t._item("last")),h(i);else if(l.ENTER===s)0!==g.length&&(u||p)?(o=t.items().index(g),m&&m.blur(),t.save(),a=function(){t.element.trigger("focus"),t.current(t.items().eq(o))},t.one("dataBound",a)):""!==t.options.editTemplate&&t.edit(d);else if(l.ESC===s){if(g=r.find("."+f),0===g.length)return;o=t.items().index(g),t.cancel(),t.element.trigger("focus"),t.current(t.items().eq(o))}}),r.on("mousedown"+y+" touchstart"+y,d,w(o,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,o=r.editable,a=r.template,s=!0;return o&&(e&&(s=o.end()),s&&(o.element.index()%2&&(a=r.altTemplate),t=r._modelFromElement(o.element),r._destroyEditable(),i=o.element.index(),o.element.replaceWith(a(t)),r.items().eq(i).attr(n.attr("uid"),t.uid))),s},edit:function(e){var t,i,r=this,o=r._modelFromElement(e),a=o.uid;r.cancel(),e=r.items().filter("["+n.attr("uid")+"="+a+"]"),i=e.index(),e.replaceWith(r.editTemplate(o)),t=r.items().eq(i).addClass(f).attr(n.attr("uid"),o.uid),r.editable=t.kendoEditable({model:o,clearContainer:!1,errorTemplate:!1}).data("kendoEditable"),r.trigger(m,{model:o,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=b+y;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(y),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"+x,function(){t(),r=new Date,i||(i=setInterval(function(){var e=new Date-r;e>100&&(n(),clearInterval(i),i=null)},100))}).on("dragover"+x,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}function o(e,t){var n=e[t];return p(n)?n.from||n.field||t:n}var a,s,l,d,c=window.kendo,u=c.ui.Widget,p=e.isPlainObject,h=e.proxy,f=e.extend,g=c.support.placeholder,m=c.support.browser,v=c.isFunction,_=/(^\/|\/$)/g,b="change",y="apply",w="error",k="click",x=".kendoImageBrowser",C=".kendoBreadcrumbs",T=".kendoSearchBox",S="name",D="size",A="type",E={field:A,dir:"asc"},P=c.template('
    • ${text}
    • '),F='
      # 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(w,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(c.attr("uid"))),o=r.get(S),a=n.options.transport.thumbnailUrl,s=e("",{alt:o}),l="?";s.hide().on("load"+x,function(){e(this).prev().remove().end().addClass("k-image").fadeIn()}),i.find(".k-loading").after(s),v(a)?a=a(n.path(),encodeURIComponent(o)):(a.indexOf("?")>=0&&(l="&"),a=a+l+"path="+n.path()+encodeURIComponent(o)),s.attr("src",a),t.loaded=!0},_scroll:function(){var e=this;e.options.transport&&e.options.transport.thumbnailUrl&&(clearTimeout(e._timeout),e._timeout=setTimeout(function(){var 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("+A+' == "d") { #',e+='
      ',e+="#}else{#",e+='
      ',e+="#}#",e+="#if("+A+' == "d") { #',e+='',e+="#}#",e+="
    • ",h(c.template(e),{sizeFormatter:r})},_itemTmpl:function(){var e=this,t='
    • ',t+="#if("+A+' == "d") { #',t+='
      ',t+="#}else{#",t+=e.options.transport&&e.options.transport.thumbnailUrl?'
      ':'
      ',t+="#}#",t+="${"+S+"}",t+="#if("+A+' == "f") { # ${this.sizeFormatter('+D+")} #}#",t+="
    • ",h(c.template(t),{sizeFormatter:r})},path:function(e){var n=this,i=n._path||"";return e!==t?(n._path=e.replace(_,"")+"/",n.dataSource.read({path:n._path}),t):(i&&(i=i.replace(_,"")),"/"===i||""===i?"":i+"/")}}),l=u.extend({init:function(e,t){var n=this;t=t||{},u.fn.init.call(n,e,t),g&&n.element.attr("placeholder",n.options.label),n._wrapper(),n.element.on("keydown"+T,h(n._keydown,n)).on("change"+T,h(n._updateValue,n)),n.wrapper.on(k+T,"a",h(n._click,n)),g||n.element.on("focus"+T,h(n._focus,n)).on("blur"+T,h(n._blur,n))},options:{name:"SearchBox",label:"Search",value:""},events:[b],destroy:function(){var e=this;e.wrapper.add(e.element).add(e.label).off(T),u.fn.destroy.call(e)},_keydown:function(e){13===e.keyCode&&this._updateValue()},_click:function(e){e.preventDefault(),this._updateValue()},_updateValue:function(){var e=this,t=e.element.val();t!==e.value()&&(e.value(t),e.trigger(b))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){g||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(),g||e('").insertBefore(t),e('').appendTo(n)),this.wrapper=n,this.label=n.find(">label")},value:function(e){var n=this;return e!==t?(n.options.value=e,n.element.val(e),n._toggleLabel(),t):n.options.value}}),d=u.extend({init:function(e,t){var n=this;t=t||{},u.fn.init.call(n,e,t),n._wrapper(),n.wrapper.on("focus"+C,"input",h(n._focus,n)).on("blur"+C,"input",h(n._blur,n)).on("keydown"+C,"input",h(n._keydown,n)).on(k+C,"a.k-i-arrow-n:first",h(n._rootClick,n)).on(k+C,"a:not(.k-i-arrow-n)",h(n._click,n)),n.value(n.options.value)},options:{name:"Breadcrumbs",gap:50},events:[b],destroy:function(){var e=this;u.fn.destroy.call(e),e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(C)},_update:function(e){e="/"===(e||"").charAt(0)?e:"/"+(e||""),e!==this.value()&&(this.value(e),this.trigger(b))},_click:function(t){t.preventDefault(),this._update(this._path(e(t.target).prevAll("a:not(.k-i-arrow-n)").addBack()))},_rootClick:function(e){e.preventDefault(),this._update("")},_focus:function(){var e=this,t=e.element;e.overlay.hide(),e.element.val(e.value()),setTimeout(function(){t.select()})},_blur:function(){if(!this.overlay.is(":visible")){var e=this,t=e.element,n=t.val().replace(/\/{2,}/g,"/");e.overlay.show(),t.val(""),e._update(n)}},_keydown:function(e){var t=this;13===e.keyCode&&(t._blur(),setTimeout(function(){t.overlay.find("a:first").focus()}))},_wrapper:function(){var t,n=this.element,i=n.parents(".k-breadcrumbs");n[0].style.width="",n.addClass("k-input"),i.length||(i=n.wrap(e('
      ')).parent()),t=i.find(".k-breadcrumbs-wrap"),t.length||(t=e('
      ').appendTo(i)),this.wrapper=i,this.overlay=t},refresh:function(){var n,i,r,o,a="",s=this.value();for(s!==t&&s.match(/^\//)||(s="/"+(s||"")),n=s.split("/"),r=0,o=n.length;o>r;r++)i=n[r],i&&(a||(a+='root'),a+=''+n[r]+"",a+='>');this.overlay.empty().append(e(a)),this._adjustSectionWidth()},_adjustSectionWidth:function(){var t,n=this,i=n.wrapper,r=i.width()-n.options.gap,o=n.overlay.find("a");o.each(function(n){t=e(this),t.parent().width()>r&&(n==o.length-1?t.width(r):t.prev().addBack().hide())})},value:function(e){return e!==t?(this._value=e.replace(/\/{2,}/g,"/"),this.refresh(),t):this._value},_path:function(t){return"/"+e.map(t,function(t){return e(t).text()}).join("/")}}),c.ui.plugin(s),c.ui.plugin(d),c.ui.plugin(l)}(window.kendo.jQuery),function(e,t){var n,i,r=window.kendo,o=r.Class,a=r.ui.Widget,s=r.support.mobileOS,l=r.support.browser,d=e.extend,c=e.proxy,u=r.deepExtend,p=".kendoEditor",h=r.keys,f=o.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return r.template(e.template,{useWithBlock:!1})(e)}}),g={editorWrapperTemplate:'',buttonTemplate:'#= data.title #',colorPickerTemplate:'
      ',comboBoxTemplate:'',separatorTemplate:'',formatByName:function(t,n){for(var i=0;i=0)return n[i]},registerTool:function(e,t){var n=t.options;n&&n.template&&(n.template.options.cssClass="k-"+e),t.name||(t.options.name=e,t.name=e.toLowerCase()),b.defaultTools[e]=t},registerFormat:function(e,t){b.fn.options.formats[e]=t}},m={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",superscript:"Superscript",subscript:"Subscript",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertHtml:"Insert HTML",viewHtml:"View HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",formatting:"Format",foreColor:"Color",backColor:"Background color",style:"Styles",emptyFolder:"Empty Folder",uploadFile:"Upload",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found.",imageWebAddress:"Web address",imageAltText:"Alternate text",linkWebAddress:"Web address",linkText:"Text",linkToolTip:"ToolTip",linkOpenInNewWindow:"Open link in new window",dialogUpdate:"Update",dialogInsert:"Insert",dialogButtonSeparator:"or",dialogCancel:"Cancel",createTable:"Create table",addColumnLeft:"Add column on the left",addColumnRight:"Add column on the right",addRowAbove:"Add row above",addRowBelow:"Add row below",deleteRow:"Delete row",deleteColumn:"Delete column"},v=!s||s.ios&&s.flatVersion>=500||!s.ios&&t!==document.documentElement.contentEditable,_={basic:["bold","italic","underline"],alignment:["justifyLeft","justifyCenter","justifyRight"],lists:["insertUnorderedList","insertOrderedList"],indenting:["indent","outdent"],links:["createLink","unlink"],tables:["createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"]},b=a.extend({init:function(t,n){var i,o,s,l=this,h=r.ui.editor,f=h.Dom.name(t);v&&(a.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"==f?(l._wrapTextarea(),o=l.wrapper.find(".k-editor-toolbar"),t[0].id&&o.attr("aria-controls",t[0].id)):(l.element.addClass("k-widget k-editor k-editor-inline"),s.popup=!0,o=e('"),s=this.isBlock(t),_.focus(),l=_.getRange(),l.deleteContents(),l.startContainer==_.document&&l.selectNodeContents(_.body),d=new c,p=d.addCaret(l),h=this.splittableParent(s,p),f=!1,g=h!=_.body&&!a.is(h,"td"),n.split&&g&&(s||a.isInline(h))&&(l.selectNode(p),i.RangeUtils.split(l,h,!0),f=!0),m=this.htmlToFragment(t),m.firstChild&&"k-paste-container"===m.firstChild.className){for(v=[],r=0,o=m.childNodes.length;o>r;r++)v.push(m.childNodes[r].innerHTML);m=this.htmlToFragment(v.join("
      "))}if(e(m.childNodes).filter("table").addClass("k-table").end().find("table").addClass("k-table"),l.insertNode(m),h=this.splittableParent(s,p),f){for(;p.parentNode!=h;)a.unwrap(p.parentNode);a.unwrap(p.parentNode)}a.normalize(l.commonAncestorContainer),p.style.display="inline",a.restoreScrollTop(_.document),a.scrollTo(p),d.removeCaret(l),_.selectRange(l)}}),w=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}}),k=w.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,o,s,l,d,c,u=e(a.blockElements.join(","),t),p=-1,h={ul:{},ol:{}},f=t;for(i=0;ip||!l)&&(l=a.create(document,o),f==t?a.insertBefore(l,r):f.appendChild(l),h[o][s]=l),n!=o)for(d in h)for(c in h[d])e.contains(l,h[d][c])&&delete h[d][c];a.remove(r.firstChild),f=a.create(document,"li",{innerHTML:r.innerHTML}),l.appendChild(f),a.remove(r),p=s,n=o}else r.innerHTML?(h={ul:{},ol:{}},f=t,p=-1):a.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"==a.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,o,s;for(n=0;ni;i++)r-1>i&&a.insertAfter(a.create(document,"br"),s[i]),a.unwrap(s[i])},removeDefaultColors:function(e){for(var t=0;t]*"?/gi,"")}}),x=w.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:h,InsertHtmlCommand:f,InsertHtmlTool:g,UndoRedoStack:m,TypingHandler:v,SystemHandler:_,Keyboard:b,Clipboard:y,Cleaner:w,MSWordFormatCleaner:k,WebkitFormatCleaner:x}),o("insertHtml",new g({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,o=i.EditorUtils,a=i.Tool,s=i.ToolTemplate,l=i.FormatTool,d=i.Dom,c=i.RangeUtils,u=e.extend,p=i.EditorUtils.registerTool,h=i.EditorUtils.registerFormat,f="k-marker",g=n.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,n=0,i=0,r=0,o=e.parentNode;for(t=o.firstChild;t;t=t.nextSibling)t!=e&&(t.className==f?r++:3==t.nodeType?n++:i++);return r>1&&o.firstChild.className==f&&o.lastChild.className==f?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,o,a=this.format,s=d.attrEquals;for(t=0,n=a.length;n>t;t++){if(i=e,r=a[t].tags,o=a[t].attr,i&&d.ofType(i,r)&&s(i,o))return i;for(;i;)if(i=d.parentOfType(i,r),i&&s(i,o))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}}),m=n.extend({init:function(e,t){var n=this;n.finder=new g(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,o=this,a=[];for(t=0,n=e.length;n>t;t++)i=e[t],r=o.finder.findSuitable(i),r?d.attr(r,o.attributes):r=o.wrap(i),a.push(r);o.consolidate(a)},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==f&&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=g.extend({init:function(e,t){var n=this;n.format=e,n.greedyProperty=t,g.fn.init.call(n,e)},getInlineCssValue:function(t){var n,i,r,o,a,s,l,c,u,p,h,f,g=t.attributes,m=e.trim;if(g)for(n=0,i=g.length;i>n;n++)if(r=g[n],o=r.nodeName,a=r.nodeValue,r.specified&&"style"==o)for(s=m(a||t.style.cssText).split(";"),c=0,u=s.length;u>c;c++)if(l=s[c],l.length){if(p=l.split(":"),h=m(p[0].toLowerCase()),f=m(p[1]),h!=this.greedyProperty)continue;return h.indexOf("color")>=0?d.toHex(f):f}},getFormatInner:function(t){var n,i,r,o=e(d.isDataNode(t)?t.parentNode:t),a=o.parentsUntil("[contentEditable]").addBack();for(n=0,i=a.length;i>n;n++)if(r="className"==this.greedyProperty?a[n].className:this.getInlineCssValue(a[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)}}),_=m.extend({init:function(e,t,n){var i=this;m.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,o="apply";i.split(e),r&&(n=r.replace(/-([a-z])/,function(e,t){return t.toUpperCase()}),"inherit"==i.values.style[n]&&(o="remove")),i[o](t)}}),b=l.extend({init:function(e){l.fn.init.call(this,u(e,{finder:new g(e.format),formatter:function(){return new m(e.format)}}))}}),y=a.extend({update:function(e,t){var n=e.data(this.type);n.close(),n.value(this.finder.getFormat(t))}}),w=y.extend({init:function(e){var n=this;a.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,o=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[o]),e[this.type]({dataTextField:"text",dataValueField:"value",dataSource:n,change:function(){a.exec(i,o,this.value())},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+o).find("*").addBack().attr("unselectable","on"),e.data(this.type).value("inherit")}}),k=a.extend({init:function(e){a.fn.init.call(this,e),this.format=[{tags:["span"]}],this.finder=new v(this.format,e.cssAttr)},options:{palette:"websafe"},update:function(){this._widget.close()},command:function(e){var t=this.options,n=this.format,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,o=this.name,s=u({},k.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&&a.exec(r,o,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:g,InlineFormatter:m,DelayedExecutionTool:y,GreedyInlineFormatFinder:v,GreedyInlineFormatter:_,InlineFormatTool:b,FontTool:w,ColorTool:k}),h("bold",[{tags:["strong","b"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),p("bold",new b({key:"B",ctrl:!0,format:r.bold,template:new s({template:o.buttonTemplate,title:"Bold"})})),h("italic",[{tags:["em","i"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),p("italic",new b({key:"I",ctrl:!0,format:r.italic,template:new s({template:o.buttonTemplate,title:"Italic"})})),h("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}},{tags:["u"]}]),p("underline",new b({key:"U",ctrl:!0,format:r.underline,template:new s({template:o.buttonTemplate,title:"Underline"})})),h("strikethrough",[{tags:["del","strike"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),p("strikethrough",new b({format:r.strikethrough,template:new s({template:o.buttonTemplate,title:"Strikethrough"})})),h("superscript",[{tags:["sup"]}]),p("superscript",new b({format:r.superscript,template:new s({template:o.buttonTemplate,title:"Superscript"})})),h("subscript",[{tags:["sub"]}]),p("subscript",new b({format:r.subscript,template:new s({template:o.buttonTemplate,title:"Subscript"})})),p("foreColor",new k({cssAttr:"color",domAttr:"color",name:"foreColor",template:new s({template:o.colorPickerTemplate,title:"Color"})})),p("backColor",new k({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new s({template:o.colorPickerTemplate,title:"Background Color"})})),p("fontName",new w({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new s({template:o.comboBoxTemplate,title:"Font Name"})})),p("fontSize",new w({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new s({template:o.comboBoxTemplate,title:"Font Size"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,r=t.ui.editor,o=t.ui.Editor.fn.options.formats,a=r.Dom,s=r.Command,l=r.ToolTemplate,d=r.FormatTool,c=r.EditorUtils,u=c.registerTool,p=c.registerFormat,h=r.RangeUtils,f=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||!a.isAncestorOrSelf(e,r))return!1;return!0},findSuitable:function(t){var n,i,r,o=this.format,s=[];for(n=0,i=t.length;i>n;n++){if(r=a.ofType(t[n],o[0].tags)?t[n]:a.parentOfType(t[n],o[0].tags),!r||"true"===r.contentEditable)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,o,s=this.format;for(t=0,n=s.length;n>t;t++)for(i=e,r=s[t].tags,o=s[t].attr;i;){if(a.ofType(i,r)&&a.attrEquals(i,o))return i;i=i.parentNode}return null},getFormat:function(e){var t,n,i=this,r=function(e){return i.findFormat(a.isDataNode(e)?e.parentNode:e)},o=r(e[0]);if(!o)return"";for(t=1,n=e.length;n>t;t++)if(o!=r(e[t]))return"";return o.nodeName.toLowerCase()},isFormatted:function(e){for(var t=0,n=e.length;n>t;t++)if(!this.findFormat(e[t]))return!1;return!0}}),g=n.extend({init:function(e,t){this.format=e,this.values=t,this.finder=new f(e)},wrap:function(e,t,n){var i,r,o,s,l,d=1==n.length?a.blockParentOrBody(n[0]):a.commonAncestor.apply(null,n);for(a.isInline(d)&&(d=a.blockParentOrBody(d)),o=a.significantChildNodes(d),s=a.findNodeIndex(o[0]),l=a.create(d.ownerDocument,e,t),i=0;il;l++)r=c.formatByName(a.name(s[l]),this.format),a.attr(s[l],n(r));else r=this.format[0],this.wrap(r.tags[0],n(r),o)},remove:function(e){var t,n,i,r,o;for(t=0,n=e.length;n>t;t++)i=this.finder.findFormat(e[t]),i&&(o=a.name(i),"div"!=o||i.getAttribute("class")?(r=c.formatByName(o,this.format),r.attr.style&&a.unstyle(i,r.attr.style),r.attr.className&&a.removeClass(i,r.attr.className)):a.unwrap(i))},toggle:function(e){var t=this,n=h.nodes(e);t.finder.isFormatted(n)?t.remove(n):t.apply(n)}}),m=n.extend({init:function(e,t){var n=this;n.format=e,n.values=t,n.finder=new f(e)},apply:function(e){var t,n,i,o,s,l,d=this.format,c=a.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++)a.is(c[t],"li")?(i=c[t].parentNode,o=new r.ListFormatter(i.nodeName.toLowerCase(),u),s=this.editor.createRange(),s.selectNode(c[t]),o.toggle(s)):(l=a.changeTag(c[t],u),a.attr(l,d[0].attr));else new g(d,this.values).apply(e)},toggle:function(e){var t=h.textNodes(e);t.length||(e.selectNodeContents(e.commonAncestorContainer),t=h.textNodes(e),t.length||(t=a.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 f(e.format),formatter:function(){return new g(e.format)}}))}});i(r,{BlockFormatFinder:f,BlockFormatter:g,GreedyBlockFormatter:m,FormatCommand:v,BlockFormatTool:_}),p("justifyLeft",[{tags:a.blockElements,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left"}}}]),u("justifyLeft",new _({format:o.justifyLeft,template:new l({template:c.buttonTemplate,title:"Justify Left"})})),p("justifyCenter",[{tags:a.blockElements,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto"}}}]),u("justifyCenter",new _({format:o.justifyCenter,template:new l({template:c.buttonTemplate,title:"Justify Center"})})),p("justifyRight",[{tags:a.blockElements,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right"}}}]),u("justifyRight",new _({format:o.justifyRight,template:new l({template:c.buttonTemplate,title:"Justify Right"})})),p("justifyFull",[{tags:a.blockElements,attr:{style:{textAlign:"justify"}}}]),u("justifyFull",new _({format:o.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,o=i.Command,a=i.Tool,s=i.BlockFormatter,l=r.normalize,d=i.RangeUtils,c=i.EditorUtils.registerTool,u=o.extend({init:function(e){this.options=e,o.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},_moveFocus:function(e,t){if(r.is(t,"img"))e.setStartBefore(t);else{e.selectNodeContents(t);var n=d.textNodes(e)[0];if(n)e.selectNodeContents(n);else{for(;t.childNodes.length&&!r.is(t.firstChild,"br");)t=t.firstChild;e.selectNodeContents(t)}}},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,o,a,c,u,p,h=this.getRange(),f=d.documentFromRange(h),g=i.emptyElementContent,m=this.shouldTrim(h);h.deleteContents(),a=this._insertMarker(f,h),c=r.closestEditableOfType(a,["li"]),u=r.closestEditableOfType(a,"h1,h2,h3,h4,h5,h6".split(",")),c?(p=h.cloneRange(),p.selectNode(c),d.textNodes(p).length||(o=r.create(f,"p"),c.nextSibling&&d.split(p,c.parentNode),r.insertAfter(o,c.parentNode),r.remove(1==c.parentNode.childNodes.length?c.parentNode:c),o.innerHTML=g,n=o)):u&&!a.nextSibling&&(o=r.create(f,"p"),r.insertAfter(o,u),o.innerHTML=g,r.remove(a),n=o),n||(c||u||new s([{tags:["p"]}]).apply([a]),h.selectNode(a),e=r.parentOfType(a,[c?"li":u?r.name(u):"p"]),d.split(h,e,m),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),this._moveFocus(h,n),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.isEmpty(e)&&/^\s*$/.test(e.innerHTML)&&(e.innerHTML=i.emptyElementContent)}}}),p=o.extend({init:function(e){this.options=e,o.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 a({key:13,shift:!0,command:p})),c("insertParagraph",new a({key:13,command:u}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,r=t.ui.editor,o=r.Dom,a=r.RangeUtils,s=r.EditorUtils,l=r.Command,d=r.ToolTemplate,c=r.FormatTool,u=r.BlockFormatFinder,p=a.textNodes,h=r.EditorUtils.registerTool,f=u.extend({init:function(e){this.tag=e;var t=this.tags=["ul"==e?"ol":"ul",e];u.fn.init.call(this,[{tags:t}])},isFormatted:function(e){var t,n,i=[];for(n=0;nr;r++)l=this.finder.findFormat(c[r]),l&&(d=e(l).parents("ul,ol"),d[0]?a.split(t,d.last()[0],!0):a.split(t,l,!0))},merge:function(e,t){for(var n,i=t.previousSibling;i&&("k-marker"==i.className||3==i.nodeType&&o.isWhitespace(i));)i=i.previousSibling;if(i&&o.name(i)==e){for(;t.firstChild;)i.appendChild(t.firstChild);o.remove(t),t=i}for(n=t.nextSibling;n&&("k-marker"==n.className||3==n.nodeType&&o.isWhitespace(n));)n=n.nextSibling;if(n&&o.name(n)==e){for(;t.lastChild;)n.insertBefore(t.lastChild,n.firstChild);o.remove(t)}},breakable:function(e){return e!=e.ownerDocument.body&&!/table|tbody|tr|td/.test(o.name(e))&&!e.attributes.contentEditable},applyOnSection:function(t,n){function i(){u.push(this)}var r,a,s,l,d=this.tag,c=o.closestSplittableParent(n),u=[],p=this.finder.findSuitable(n);for(p||(p=new f("ul"==d?"ol":"ul").findSuitable(n)),/table|tbody/.test(o.name(c))?r=e.map(n,function(e){return o.parentOfType(e,["td"])}):(r=o.significantChildNodes(c),e.grep(r,o.isBlock).length&&(r=e.grep(r,e.proxy(function(e){return this.containsAny(e,n)},this))),r.length||(r=n)),a=0;an;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)}}),m=l.extend({init:function(e){e.formatter=new g(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 f(e.tag)}))},command:function(e){return new m(i(e,{tag:this.options.tag}))}});i(r,{ListFormatFinder:f,ListFormatter:g,ListCommand:m,ListTool:v}),h("insertUnorderedList",new v({tag:"ul",template:new d({template:s.buttonTemplate,title:"Remove Link"})})),h("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,o=r.Dom,a=r.RangeUtils,s=r.EditorUtils,l=r.Command,d=r.Tool,c=r.ToolTemplate,u=r.InlineFormatter,p=r.InlineFormatFinder,h=a.textNodes,f=r.EditorUtils.registerTool,g=n.extend({findSuitable:function(e){return o.parentOfType(e,["a"])}}),m=n.extend({init:function(){this.finder=new g},apply:function(e,t){var n,i,r,s,l=h(e);t.innerHTML?(n=a.getMarkers(e),i=a.documentFromRange(e),e.deleteContents(),s=o.create(i,"a",t),e.insertNode(s),"a"==o.name(s.parentNode)&&o.insertAfter(s,s.parentNode),n.length>1&&(o.insertAfter(n[n.length-1],s),o.insertAfter(n[1],s),o[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(h(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 m,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,r,a,s=d.element,l=e("#k-editor-link-url",s).val();l&&"http://"!=l&&(l.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(l)&&(l="mailto:"+l),c.attributes={href:l},n=e("#k-editor-link-title",s).val(),n&&(c.attributes.title=n),r=e("#k-editor-link-text",s).val(),r||f?r&&r!==f&&(c.attributes.innerHTML=o.stripBom(r)):c.attributes.innerHTML=l,a=e("#k-editor-link-target",s).is(":checked"),c.attributes.target=a?"_blank":null,c.formatter.apply(u,c.attributes)),i(t),c.change&&c.change()}function i(e){e.preventDefault(),d.destroy(),o.windowFromDocument(a.documentFromRange(u)).focus(),c.releaseRange(u)}function r(e){var t="";return 1==e.length?t=e[0].nodeValue:e.length&&(t=e[0].nodeValue+e[1].nodeValue),o.stripBom(t)}var s,l,d,c=this,u=c.getRange(),p=u.collapsed,f="",g=c.editor.options.messages;u=c.lockRange(!0),s=h(u),l=s.length?c.formatter.finder.findSuitable(s[0]):null,d=this.createDialog(c._dialogTemplate(),{title:g.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(l?l.getAttribute("href",2):"http://").end().find("#k-editor-link-text").val(r(s)).end().find("#k-editor-link-title").val(l?l.title:"").end().find("#k-editor-link-target").attr("checked",l?"_blank"==l.target:!1).end().data("kendoWindow").center().open(),s.length>0&&!p&&(f=e("#k-editor-link-text",d.element).val()),e("#k-editor-link-url",d.element).focus().select()},redo:function(){var e=this,t=e.lockRange(!0);e.formatter.apply(t,e.attributes),e.releaseRange(t)}}),b=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:g,LinkFormatter:m,UnlinkCommand:v,LinkCommand:_,UnlinkTool:b}),f("createLink",new d({key:"K",ctrl:!0,command:_,template:new c({template:s.buttonTemplate,title:"Create Link"})})),f("unlink",new b({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,o=r.EditorUtils,a=r.Dom,s=o.registerTool,l=r.ToolTemplate,d=r.RangeUtils,c=r.Command,u=n.keys,p="#k-editor-image-url",h="#k-editor-image-title",f=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=a.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||a.insertAfter(i.createTextNode(""),e),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;a.attr(e,n)}return!1},_dialogTemplate:function(e){return n.template('
      # if (showBrowser) { #
      # } #
      ')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();e.insertImage(d.image(t),t)||e.releaseRange(t)},exec:function(){function e(e){var t=s.element;l.attributes={src:t.find(p).val().replace(/ /g,"%20"),alt:t.find(h).val()},f=l.insertImage(g,c),r(e),l.change&&l.change()}function r(e){e.preventDefault(),s.destroy(),a.windowFromDocument(d.documentFromRange(c)).focus(),f||l.releaseRange(c)}function o(t){t.keyCode==u.ENTER?e(t):t.keyCode==u.ESC&&r(t)}var s,l=this,c=l.lockRange(),f=!1,g=d.image(c),m=l.editor.options,v=m.messages,_=m.imageBrowser,b=!!(n.ui.ImageBrowser&&_&&_.transport&&_.transport.read!==t);s=this.createDialog(l._dialogTemplate(b),{title:v.insertImage,close:r,visible:!1,resizable:b}).toggleClass("k-imagebrowser-dialog",b).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(r).end().find(".k-edit-field input").keydown(o).end().find(p).val(g?g.getAttribute("src",2):"http://").end().find(h).val(g?g.alt:"").end().data("kendoWindow"),b&&new n.ui.ImageBrowser(s.element.find(".k-imagebrowser"),i({},_,{change:function(){s.element.find(p).val(this.value())},apply:e})),s.center().open(),s.element.find(p).focus().select()}});n.ui.editor.ImageCommand=f,s("insertImage",new r.Tool({command:f,template:new l({template:o.buttonTemplate,title:"Insert Image"})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui.DropDownList,r=n.ui.editor.Dom,o=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(),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(){var t=e(this.element),n=e("
      ",indent:function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"\n").replace(/<(ul|ol)([^>]*)>
    • \n/gi,"
      \n").replace(/\n$/,"")}}),t.ui.editor.ViewHtmlCommand=l,i.EditorUtils.registerTool("viewHtml",new a({command:l,template:new s({template:r.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,o=this.options.items;for(i=0;i=0?new i.GreedyInlineFormatter(o):new i.GreedyBlockFormatter(o)}})},initialize:function(e,t){var i=t.editor,o=this.options,a=o.name,s=this;e.width(o.width),e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:o.items||i.options[a],title:i.options.messages[a],autoSize:!0,change:function(){r.exec(i,a,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-"+a).find("*").addBack().attr("unselectable","on")},getFormattingValue:function(t,n){var i,r,o,a,s,l,d;for(i=0;i").parent().prepend("").kendoWindow({title:!1,resizable:!1,draggable:{dragHandle:".k-editortoolbar-dragHandle"},animation:{open:{effects:"fade:in"},close:{effects:"fade:out"}},minHeight:42,visible:!1,autoFocus:!1,actions:[],dragend:function(){this._moved=!0}}).on("mousedown",function(t){e(t.target).is(".k-icon")||t.preventDefault()}).data("kendoWindow")},items:function(){return this.element.children().find("> *, select")},focused:function(){return this.element.find(".k-state-focused").length>0},toolById:function(e){var t,n=this.tools;for(t in n)if(t.toLowerCase()==e)return n[t]},toolGroupFor:function(t){var n,i=this.groups;if(this.isCustomTool(t))return"custom";for(n in i)if(e.inArray(t,i[n])>=0)return n},bindTo:function(t){var n=this,i=n.window;n._editor&&n._editor.unbind("select",a(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._toolName(this),o=n.tools[r],a=o&&o.options,s=t.options.messages,l=a&&a.tooltip||s[r],d=e(this);o&&o.initialize&&(("fontSize"==r||"fontName"==r)&&(i=s[r+"Inherit"],d.find("input").val(i).end().find("span.k-input").text(i).end()),o.initialize(d,{title:n._appendShortcutSequence(l,o),editor:n._editor}),d.closest(".k-widget",n.element).addClass("k-editor-widget"),d.closest(".k-colorpicker",n.element).next(".k-colorpicker").addClass("k-editor-widget"))}),t.bind("select",a(n._update,n)),n._updateContext(),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.element,n=this._editor.element.attr(e);t.attr(e,n||0).focus().find(d).first().focus(),n||0===n||t.removeAttr(e)},_appendShortcutSequence:function(e,t){if(!t.key)return e;var n=e+" (";return t.ctrl&&(n+="Ctrl + "),t.shift&&(n+="Shift + "),t.alt&&(n+="Alt + "),n+=t.key+")"},_nativeTools:["insertLineBreak","insertParagraph","redo","undo"],tools:{},isCustomTool:function(e){return!(e in t.ui.Editor.defaultTools)},expandTools:function(n){var r,a,s,l,d=this._nativeTools,c=t.deepExtend({},t.ui.Editor.defaultTools),u={};for(a=0;a")}var o,s,l,d,c,u,p,h,f=this,g=f.tools,m=f._editor.element,v=f.element.empty(),_=f._editor.options.tools,b=t.support.browser;for(v.empty(),r(),h=0;h<_.length;h++)d=_[h].name||_[h],o=g[d]&&g[d].options,!o&&e.isPlainObject(d)&&(o=d),s=o&&o.template,"break"==d&&(i(),e("
    • ").appendTo(f.element),r()),s&&(u=f.toolGroupFor(d),c!=u&&(i(),r(),c=u),s=n(s),l=e(s).appendTo(p),"custom"==u&&(i(),r()),o.exec&&l.hasClass("k-tool")&&l.click(a(o.exec,m[0])));i(),e(f.element).children(":has(> .k-tool)").addClass("k-button-group"),f.options.popup&&b.msie&&b.version<9&&f.window.wrapper.find("*").attr("unselectable","on"),this.updateGroups()},updateGroups:function(){e(this.element).children().each(function(){e(this).children().filter(function(){return"none"!==this.style.display}).first().addClass("k-group-start").end().last().addClass("k-group-end").end()})},destroy:function(){r.fn.destroy.call(this);var e,t=this.tools;for(e in t)t[e].destroy&&t[e].destroy();this.window&&this.window.destroy()},_attachEvents:function(){var t=this,n="[role=button].k-tool",i=n+":not(.k-state-disabled)",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,function(e){e.preventDefault()}).on("keydown"+l,d,function(n){function i(e,n){var i=t.element.find(d),r=i.index(o)+e;return n&&(r=Math.max(0,Math.min(i.length-1,r))),i[r]}var r,o=this,a=n.keyCode;a==s.RIGHT||a==s.LEFT?e(o).hasClass(".k-dropdown")||(r=i(a==s.RIGHT?1:-1,!0)):a==s.ESC?r=t._editor:a!=s.TAB||n.ctrlKey||n.altKey||(n.shiftKey?r=i(-1):(r=i(1),r||(r=t._editor))),r&&(n.preventDefault(),r.focus())}).on("click"+l,i,function(n){var i=e(this);n.preventDefault(),n.stopPropagation(),i.removeClass("k-state-hover"),i.is("[data-popup]")||t._editor.exec(t._toolName(this))}).on("click"+l,r,function(e){e.preventDefault()})},_toolName:function(t){var n,i;if(t)return n=t.className,/k-tool\b/i.test(n)&&(n=t.firstChild.className),i=e.grep(n.split(" "),function(e){return!/^k-(widget|tool|tool-icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(e)}),i[0]?i[0].substring(i[0].lastIndexOf("-")+1):"custom"},_update:function(){var n=this,i=n._editor,r=i.getRange(),o=t.ui.editor.RangeUtils.textNodes(r);o.length||(o=[r.startContainer]),n.items().each(function(){var t=n.tools[n._toolName(this)];t&&t.update&&t.update(e(this),o)}),this._updateContext()},_updateContext:function(){this.element.children().children().each(function(){var t=e(this);t.css("display",t.hasClass("k-state-disabled")?"none":"")}),this.updateGroups()}});e.extend(i,{Toolbar:c})}(window.jQuery),function(e){var t=window.kendo,n=e.extend,i=e.proxy,r=t.ui.editor,o=r.Dom,a=r.EditorUtils,s=r.Command,l=".kendoEditor",d="k-state-active",c="k-state-selected",u=r.Tool,p=r.ToolTemplate,h=r.BlockFormatFinder,f=r.EditorUtils.registerTool,g=""+r.emptyElementContent+"",m=new h([{tags:["table"]}]),v=s.extend({_tableHtml:function(e,t){return e=e||1,t=t||1,""+Array(e+1).join(""+Array(t+1).join(g)+"")+"
      "},exec:function(){var t,n,i=this.options,r=this.editor,o=this._tableHtml(i.rows,i.columns);r.selectRange(i.range),r.clipboard.paste(o),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");n.hasClass("k-state-disabled")||this.popup().toggle()},update:function(e){this.popup().close(),e.removeClass("k-state-hover")},destroy:function(){this._popup.destroy()}}),b=_.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()-f.top)/o)+1,col:Math.floor((t.clientX+n.scrollLeft()-f.left)/r)+1}}function i(e){return e.row>0&&e.col>0&&e.row<=v&&e.col<=m}var r,o,a=this,s=a._popup.element,d=s.find(".k-status"),u=s.find(".k-ct-cell"),p=u.eq(0),h=u.eq(u.length-1),f=t.getOffset(p),g=t.getOffset(h),m=a.cols,v=a.rows;g.left+=h[0].offsetWidth,g.top+=h[0].offsetHeight,r=(g.left-f.left)/m,o=(g.top-f.top)/v,s.on("mousemove"+l,function(r){var o=n(r);i(o)?(d.text(t.format("Create a {0} x {1} table",o.row,o.col)),u.each(function(t){e(this).toggleClass(c,t%m'+t+""}function i(n,i){var r,o,a,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),o=l.text.length,a=o+s.text.length,i=[o,a])),i}var r=window.kendo,o=r.keys,a=r.ui,s=a.Widget,l=r._activeElement,d=r._extractFormat,c=r.parseFloat,u=r.support.placeholder,p=r.getCulture,h=r._round,f="change",g="disabled",m="readonly",v="k-input",_="spin",b=".kendoNumericTextBox",y="touchend",w="mouseleave"+b,k="mouseenter"+b+" "+w,x="k-state-default",C="k-state-focused",T="k-state-hover",S="focus",D=".",A="k-state-selected",E="k-state-disabled",P="aria-disabled",F="aria-readonly",I=/^(-)?(\d*)$/,z=null,M=e.proxy,B=s.extend({init:function(e,n){var i,o,a,l,c,u=this,p=n&&n.step!==t;s.fn.init.call(u,e,n),n=u.options,e=u.element.on("blur"+b,M(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(y+b+" "+S+b,function(t){u._toggleText(!1),t.type===S&&e.focus()}):u._text.on(S+b,M(u._click,u)),i=u.min(e.attr("min")),o=u.max(e.attr("max")),a=u._parse(e.attr("step")),n.min===z&&i!==z&&(n.min=i),n.max===z&&o!==z&&(n.max=o),p||a===z||(n.step=a),e.attr("aria-valuemin",n.min).attr("aria-valuemax",n.max),n.format=d(n.format),l=n.value,u.value(l!==z?l:e.val()),c=e.is("[disabled]"),c?u.enable(!1):u.readonly(e.is("[readonly]")),r.notify(u)},options:{name:"NumericTextBox",decimals:z,min:z,max:z,value:z,step:1,culture:"",format:"n",spinners:!0,placeholder:"",upArrowText:"Increase value",downArrowText:"Decrease value"},events:[f,_],_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,o=t._text.add(n),a=t._inputWrapper.off(k);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),n.off("keydown"+b).off("keypress"+b).off("paste"+b),r||i?(a.addClass(i?E:x).removeClass(i?x:E),o.attr(g,i).attr(m,r).attr(P,i).attr(F,r)):(a.addClass(x).removeClass(E).on(k,t._toggleHover),o.removeAttr(g).removeAttr(m).attr(P,!1).attr(F,!1),t._upArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(A)}),t._downArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(A)}),t.element.on("keydown"+b,M(t._keydown,t)).on("keypress"+b,M(t._keypress,t)).on("paste"+b,M(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(b),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===z?e:(i!==z&&i>e?e=i:r!==z&&e>r&&(e=r),e)},_arrows:function(){var t,i=this,o=function(){clearTimeout(i._spinning),t.removeClass(A)},a=i.options,s=a.spinners,l=i.element;t=l.siblings(".k-icon"),t[0]||(t=e(n("n",a.upArrowText)+n("s",a.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:o}),i._downArrow=t.eq(1),i._downArrowEventHandler=new r.UserEvents(i._downArrow,{release:o})},_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,o,a=e.target,s=i(a)[0],l=a.value.substring(0,s),d=t._format(t.options.format),c=d[","],u=0;c&&(r=RegExp("\\"+c,"g"),o=RegExp("([\\d\\"+c+"]+)(\\"+d[D]+")?(\\d+)?")),o&&(n=o.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(f),t.element.trigger(f))},_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],o=r.accessKey,a=n.wrapper;t=a.find(D+i),t[0]||(t=e('').insertBefore(r).addClass(i));try{r.setAttribute("type","text")}catch(s){r.type="text"}t[0].tabIndex=r.tabIndex,t[0].style.cssText=r.style.cssText,t.prop("placeholder",n.options.placeholder),o&&(t.attr("accesskey",o),r.accessKey=""),n._text=t.addClass(r.className)},_keydown:function(e){var t=this,n=e.keyCode;n==o.DOWN?t._step(-1):n==o.UP?t._step(1):n==o.ENTER&&t._change(t.element.val())},_keypress:function(e){var t,n,r,a,s,l,d;0!==e.which&&e.keyCode!==o.BACKSPACE&&(t=this.element,n=String.fromCharCode(e.which),r=i(t[0]),a=r[0],s=r[1],l=this.options.min,d=t.val(),d=d.substring(0,a)+n+d.substring(s),(null!==l&&l>=0&&"-"===d.charAt(0)||!this._numericRegex().test(d))&&e.preventDefault())},_numericRegex:function(){var e=this,t=e.options,n=e._format(t.format),i=n[D],r=t.decimals;return i===D&&(i="\\"+i),r===z&&(r=n.decimals),0===r?I:(e._separator!==i&&(e._separator=i,e._floatRegExp=RegExp("^(-)?(((\\d+("+i+"\\d*)?)|("+i+"\\d*)))?$")),e._floatRegExp)},_paste:function(e){var t=this,n=e.target,i=n.value;setTimeout(function(){t._parse(n.value)===z&&t._update(i)})},_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,o=i.format,a=i.decimals,s=n._culture(),l=n._format(o,s);a===z&&(a=l.decimals),e=n._parse(e,s),t=e!==z,t&&(e=parseFloat(h(e,a))),n._value=e=n._adjust(e),n._placeholder(r.toString(e,o,s)),t?(e=""+e,-1!==e.indexOf("e")&&(e=h(+e,a)),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))}});a.plugin(B)}(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 o(t){t=e(t),t.addClass("k-item").children(k).addClass(P),t.children("a").addClass(T).children(k).addClass(P),t.filter(":not([disabled])").addClass(U),t.filter(".k-separator:empty").append(" "),t.filter("li[disabled]").addClass(q).removeAttr("disabled").attr("aria-disabled",!0),t.filter("[role]").length||t.attr("role","menuitem"),t.children("."+T).length||t.contents().filter(function(){return!(this.nodeName.match(y)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll(""),a(t),s(t)}function a(t){t=e(t),t.find("> .k-link > [class*=k-i-arrow]").remove(),t.filter(":has(.k-group)").children(".k-link:not(:has([class*=k-i-arrow]))").each(function(){var t=e(this),n=t.parent().parent();t.append("")})}function s(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(E),t.filter(".k-last:not(:last-child)").removeClass(S),t.filter(":first-child").addClass(E),t.filter(":last-child").addClass(S)}var l=window.kendo,d=l.ui,c=l._activeElement,u=l.support.touch&&l.support.mobileOS,p="mousedown",h="click",f=e.extend,g=e.proxy,m=e.each,v=l.template,_=l.keys,b=d.Widget,y=/^(ul|a|div)$/i,w=".kendoMenu",k="img",x="open",C="k-menu",T="k-link",S="k-last",D="close",A="timer",E="k-first",P="k-image",F="select",I="zIndex",z="activate",M="deactivate",B="touchstart"+w+" MSPointerDown"+w+" pointerdown"+w,R=l.support.pointers,H=l.support.msPointers,L=R?"pointerover":H?"MSPointerOver":"mouseenter",O=R?"pointerout":H?"MSPointerOut":"mouseleave",V=u||H||R,N="kendoPopup",U="k-state-default",W="k-state-hover",j="k-state-focused",q="k-state-disabled",G=".k-group",Y=":not(.k-list) > .k-item",Q=".k-item.k-state-disabled",$=".k-item:not(.k-state-disabled)",K=".k-item:not(.k-state-disabled) > .k-link",X=":not(.k-item.k-separator)",Z=X+":eq(0)",J=X+":last",et="div:not(.k-animation-container,.k-list-container)",tt={content:v("
      #= content(item) #
      "),group:v(""),itemWrapper:v("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= arrow(data) #"),item:v("
    • "),image:v(""),arrow:v(""),sprite:v(""),empty:v("")},nt={wrapperCssClass:function(e,t){var n="k-item",i=t.index; return n+=t.enabled===!1?" k-state-disabled":" k-state-default",e.firstLevel&&0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),t.cssClass&&(n+=" "+t.cssClass),n},textClass:function(){return T},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},arrowClass:function(e,t){var n="k-icon";return n+=t.horizontal?" k-i-arrow-s":" k-i-arrow-e"},text:function(e){return e.encoded===!1?e.text:l.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},groupCssClass:function(){return"k-group"},content:function(e){return e.content?e.content:" "}},it=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(B,i._focusProxy).on(h+w,Q,!1).on(h+w,$,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(B+" "+p+w,".k-content",g(i._preventClose,i)).on("blur"+w,g(i._removeHoverItem,i)).on("blur"+w,"[tabindex]",g(i._checkActiveElement,i)).on(L+w,$,g(i._mouseenter,i)).on(O+w,$,g(i._mouseleave,i)).on(L+w+" "+O+w+" "+p+w+" "+h+w,K,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:[x,D,z,M,F],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=f(!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 m(n.items,function(){n.group.append(this),a(this)}),a(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 m(n.items,function(){t.before(this),a(this),s(this)}),s(t),this},insertAfter:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return m(n.items,function(){t.after(this),a(this),s(this)}),s(t),this},_insert:function(t,n,i){var r,a,s,l,d=this;return n&&n.length||(i=d.element),s=e.isPlainObject(t),l={firstLevel:i.hasClass(C),horizontal:i.hasClass(C+"-horizontal"),expanded:!0,length:i.children().length},n&&!i.length&&(i=e(it.renderGroup({group:l})).appendTo(n)),s||e.isArray(t)?r=e(e.map(s?[t]:t,function(t,n){return"string"==typeof t?e(t).get():e(it.renderItem({group:l,item:f(t,{index:n})})).get()})):(r=e(t),a=r.find("> ul").addClass("k-group").attr("role","menu"),r=r.filter("li"),r.add(a.find("> li")).each(function(){o(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,Y),i=e.parent("ul"),e.remove(),i&&!i.children(Y).length&&(r=i.parent(".k-animation-container"),r.length?r.remove():i.remove()),n.length&&(n=n.eq(0),a(n),s(n)),t},open:function(r){var o=this,a=o.options,s="horizontal"==a.orientation,d=a.direction,c=l.support.isRtl(o.wrapper);return r=o.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(A)),r.data(A,setTimeout(function(){var l,u,p,h,g,m,v=r.find(".k-group:first:hidden");v[0]&&o.trigger(x,{item:r[0]})===!1&&(!v.find(".k-group")[0]&&v.children(".k-item").length>1?v.css({maxHeight:e(window).height(),overflow:"auto"}):v.css({maxHeight:"",overflow:""}),r.data(I,r.css(I)),r.css(I,o.nextItemZIndex++),l=v.data(N),u=r.parent().hasClass(C),p=u&&s,h=i(d,u,c),g=a.animation.open.effects,m=g!==t?g:"slideIn:"+n(d,u),l?(l=v.data(N),l.options.origin=h.origin,l.options.position=h.position,l.options.animation.open.effects=m):l=v.kendoPopup({activate:function(){o.trigger(z,{item:this.wrapper.parent()})},deactivate:function(){o.trigger(M,{item:this.wrapper.parent()})},origin:h.origin,position:h.position,collision:a.popupCollision!==t?a.popupCollision:p?"fit":"fit flip",anchor:r,appendTo:r,animation:{open:f(!0,{effects:m},a.animation.open),close:a.animation.close},close:function(e){var t=e.sender.wrapper.parent();o.trigger(D,{item:t[0]})?e.preventDefault():(t.css(I,t.data(I)),t.removeData(I),V&&(t.removeClass(W),o._removeHoverItem()))}}).data(N),v.removeAttr("aria-hidden"),l.open())},o.options.hoverDelay))}),o},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(A)),t.data(A,setTimeout(function(){var e=t.find(".k-group:not(.k-list-container):not(.k-calendar-container):first:visible").data(N);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(U,n).toggleClass(q,!n).attr("aria-disabled",!n)})},_toggleHover:function(t){var n=e(l.eventTarget(t)||t.target).closest(Y),i=t.type==L||-1!==p.indexOf(t.type);n.parents("li."+q).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(t?t.currentTarget:this._hoverItem()),o=n._findRootParent(i)[0];this._closurePrevented||setTimeout(function(){(!document.hasFocus()||!r(o,l._activeElement())&&t&&!r(o,t.currentTarget))&&n.close(o)},0),this._closurePrevented=!1},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(j)&&(e.removeClass(j),this._oldHoverItem=null)},_updateClasses:function(){var e,t=this.element;t.addClass("k-widget k-reset k-header "+C).addClass(C+"-"+this.options.orientation),t.find("li > ul").addClass("k-group").attr("role","menu").attr("aria-hidden",t.is(":visible")).end().find("li > div").addClass("k-content").attr("tabindex","-1"),e=t.find("> li,.k-group > li"),e.each(function(){o(this)})},_mouseenter:function(t){var n=this,i=e(t.currentTarget),o=i.children(".k-animation-container").length||i.children(G).length;t.delegateTarget==i.parents(".k-menu")[0]&&(n.options.openOnClick&&!n.clicked||u||!r(t.currentTarget,t.relatedTarget)&&o&&n.open(i),(n.options.openOnClick&&n.clicked||V)&&i.siblings().each(g(function(e,t){n.close(t)},n)))},_mouseleave:function(n){var i=this,o=e(n.currentTarget),a=o.children(".k-animation-container").length||o.children(G).length;return o.parentsUntil(".k-animation-container",".k-list-container,.k-calendar-container")[0]?(n.stopImmediatePropagation(),t):(i.options.openOnClick||u||(R||H)&&n.originalEvent.pointerType==n.originalEvent.MSPOINTER_TYPE_TOUCH||r(n.currentTarget,n.relatedTarget||n.target)||!a||i.close(o),t)},_click:function(n){var i,r,o,a=this,s=a.options,d=e(l.eventTarget(n)),c=d[0]?d[0].nodeName.toUpperCase():"",u="INPUT"==c||"SELECT"==c||"BUTTON"==c||"LABEL"==c,p=d.closest("."+T),h=d.closest(Y),f=p.attr("href"),g=!!f&&f!==e("").attr("href");if(!h.children(et)[0]){if(h.hasClass(q))return n.preventDefault(),t;if(n.handled||!a.trigger(F,{item:h[0]})||u||n.preventDefault(),n.handled=!0,r=h.children(G+",.k-animation-container"),o=r.is(":visible"),s.closeOnClick&&!g&&(!r.length||s.openOnClick&&o))return h.removeClass(W).css("height"),a._oldHoverItem=a._findRootParent(h),a.close(p.parentsUntil(a.element,Y)),a.clicked=!1,-1!="MSPointerUp".indexOf(n.type)&&n.preventDefault(),t;g&&n.enterKey&&p[0].click(),(h.parent().hasClass(C)&&s.openOnClick||l.support.touch)&&(g||u||n.preventDefault(),a.clicked=!0,i=r.is(":visible")?D:x,(s.closeOnClick||i!=D)&&a[i](h))}},_documentClick:function(e){r(this.element[0],e.target)||(this.clicked=!1)},_focus:function(n){var i=this,r=n.target,o=i._hoverItem(),a=c();return r==i.wrapper[0]||e(r).is(":kendoFocusable")?(a===n.currentTarget&&(o.length?i._moveHover([],o):i._oldHoverItem||i._moveHover([],i.wrapper.children().first())),t):(n.stopPropagation(),e(r).closest(".k-content").closest(".k-group").closest(".k-item").addClass(j),i.wrapper.focus(),t)},_keydown:function(e){var n,i,r,o=this,a=e.keyCode,s=o._oldHoverItem,d=l.support.isRtl(o.wrapper);if(e.target==e.currentTarget||a==_.ESC){if(s||(s=o._oldHoverItem=o._hoverItem()),i=o._itemBelongsToVertival(s),r=o._itemHasChildren(s),a==_.RIGHT)n=o[d?"_itemLeft":"_itemRight"](s,i,r);else if(a==_.LEFT)n=o[d?"_itemRight":"_itemLeft"](s,i,r);else if(a==_.DOWN)n=o._itemDown(s,i,r);else if(a==_.UP)n=o._itemUp(s,i,r);else if(a==_.ESC)n=o._itemEsc(s,i);else if(a==_.ENTER||a==_.SPACEBAR)n=s.children(".k-link"),n.length>0&&(o._click({target:n[0],preventDefault:function(){},enterKey:!0}),o._moveHover(s,o._findRootParent(s)));else if(a==_.TAB)return n=o._findRootParent(s),o._moveHover(s,n),o._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(j),e[0].id===i&&e.removeAttr("id")),t.length&&(t[0].id&&(i=t[0].id),t.addClass(j),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,o=this;if(!e.hasClass(q))return t?n?(o.open(e),i=e.find(".k-group").children().first()):"horizontal"==o.options.orientation&&(r=o._findRootParent(e),o.close(r),i=r.nextAll(Z)):(i=e.nextAll(Z),i.length||(i=e.prevAll(J))),i&&!i.length?i=o.wrapper.children(".k-item").first():i||(i=[]),o._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(Z))):(n=e.prevAll(Z),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(Z);else{if(!n||e.hasClass(q))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(Z),!n.length&&e.length?n=e.parent().children().last():e.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_itemEsc:function(e,t){var n,i=this;return t?(n=e.parent().closest(".k-item"),i.close(n),i._moveHover(e,n),n):e},_focusHandler:function(t){var n=this,i=e(l.eventTarget(t)).closest(Y);setTimeout(function(){n._moveHover([],i),i.children(".k-content")[0]&&i.parent().closest(".k-item").removeClass(j)},200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})}});f(it,{renderItem:function(e){e=f({menu:{},group:{}},e);var t=tt.empty,n=e.item;return tt.item(f(e,{image:n.imageUrl?tt.image:t,sprite:n.spriteCssClass?tt.sprite:t,itemWrapper:tt.itemWrapper,renderContent:it.renderContent,arrow:n.items||n.content?tt.arrow:t,subGroup:it.renderGroup},nt))},renderGroup:function(e){return tt.group(f({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,o=f({length:r},e.group);r>n;n++)t+=it.renderItem(f(e,{group:o,item:f({index:n},i[n])}));return t}},e,nt))},renderContent:function(e){return tt.content(f(e,nt))}}),l.ui.plugin(it)}(window.kendo.jQuery),function(e,t){function n(t){return t=null!=t?t:"",t.type||e.type(t)||"string"}function i(t){t.find(":input:not(:button, ["+s.attr("role")+"=upload], ["+s.attr("skip")+"], [type=file]), select").each(function(){var t=s.attr("bind"),n=this.getAttribute(t)||"",i="checkbox"===this.type||"radio"===this.type?"checked:":"value:",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],o=n(r),a=r?r.validation:{},l=s.attr("type"),d=s.attr("bind"),c={name:e.field};for(t in a)i=a[t],f(t,_)>=0?c[l]=t:p(i)||(c[t]=h(i)?i.value||t:i),c[s.attr(t+"-msg")]=i.message;return f(o,_)>=0&&(c[l]=o),c[d]=("boolean"===o?"checked:":"value:")+e.field,c}function o(e){var t,n,i,r,o,a;if(e&&e.length)for(a=[],t=0,n=e.length;n>t;t++)i=e[t],o=i.text||i.value||i,r=null==i.value?i.text||i:i.value,a[t]={text:o,value:r};return a}function a(e,t){var n,i,r=e?e.validation||{}:{};for(n in r)i=r[n],h(i)&&i.value&&(i=i.value),p(i)&&(t[n]=i)}var s=window.kendo,l=s.ui,d=l.Widget,c=e.extend,u=s.support.browser.msie&&s.support.browser.version<9,p=s.isFunction,h=e.isPlainObject,f=e.inArray,g=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,m='
      #=message#
      ',v="change",_=["url","email","number","date","boolean"],b={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),o=n.format;o&&(o=s._extractFormat(o)),i[s.attr("format")]=o,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#
      ',v='
      #=messages.info#
      #if(values){##}else{##}##if(extra){##if(values){##}else{##}##}#
      ',_='
      #=field#
      • #=messages.info#
        • #if(extra){#
        • #}#
      ',b='
      #=field#
      • #=messages.info#
      ',y=g.extend({init:function(t,n){var i,o,s,l,c=this,u="string";g.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,a(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=a(l.parse,l)))),n.values&&(u="enums"),c.type=u,i=i[u]||n.operators[u];for(o in i)break;c._defaultFilter=function(){return{field:c.field,operator:o||"eq",value:""}},c._refreshHandler=a(c.refresh,c),c.dataSource.bind("change",c._refreshHandler),n.appendToElement?c._init():c.refresh()},_init:function(){var t,n=this,i=n.options.ui,o=f(i);n.pane=n.element.closest(r.roleSelector("pane")).data("kendoMobilePane"),n.pane&&(n._isMobile=!0),o||(t=i||p[n.type]),n._isMobile?n._createMobileForm(t):n._createForm(t),n.form.on("submit"+d,a(n._submit,n)).on("reset"+d,a(n._reset,n)),o&&n.form.find(".k-textbox").removeClass("k-textbox").each(function(){i(e(this))}),n.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"),n.refresh(),n.trigger(l,{field:n.field,container:n.form})},_createForm:function(t){var i=this,o=i.options,l=i.operators||{},c=i.type;l=l[c]||o.operators[c],i.form=e('
      ').html(r.template("boolean"===c?m:v)({field:i.field,format:o.format,ns:r.ns,messages:o.messages,extra:o.extra,operators:l,type:c,role:t,values:n(o.values)})),o.appendToElement?(i.element.append(i.form),i.popup=i.element.closest(".k-popup").data(s)):i.popup=i.form[s]({anchor:i.link,open:a(i._open,i),activate:a(i._activate,i),close:i.options.closeCallback}).data(s),i.form.on("keydown"+d,a(i._keydown,i))},_createMobileForm:function(t){var i=this,o=i.options,a=i.operators||{},s=i.type;a=a[s]||o.operators[s],i.form=e("
      ").html(r.template("boolean"===s?b:_)({field:i.field,format:o.format,ns:r.ns,messages:o.messages,extra:o.extra,operators:a,type:s,role:t,useRole:!r.support.input.date&&"date"===s||"number"===s,inputType:h[s],values:n(o.values)})),i.view=i.pane.append(i.form.html()),i.form=i.view.element.find("form"),i.view.element.on("click",".k-submit",function(e){i.form.submit(),e.preventDefault()}).on("click",".k-cancel",function(e){i._closeForm(),e.preventDefault()})},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;g.fn.destroy.call(e),e.form&&(r.unbind(e.form),r.destroy(e.form),e.form.unbind(d),e.popup&&e.popup.destroy()),e.view&&e.view.purge(),e.link.unbind(d),e._refreshHandler&&e.dataSource.unbind("change",e._refreshHandler)},_bind:function(e){var t,n,i,r,o=this,a=e.filters,s=!1,l=0,d=o.filterModel;for(t=0,n=a.length;n>t;t++)r=a[t],r.field==o.field?(d.set("logic",e.logic),i=d.filters[l],i||(d.filters.push({field:o.field}),i=d.filters[l]),i.set("value",o._parse(r.value)),i.set("operator",r.operator),l++,s=!0):r.filters&&(s=s||o._bind(r));return s},_merge:function(n){var i,r,o,a=this,s=n.logic||"and",l=n.filters,d=a.dataSource.filter()||{filters:[],logic:"and"};for(t(d,a.field),l=e.grep(l,function(e){return""!==e.value&&null!=e.value}),r=0,o=l.length;o>r;r++)i=l[r],i.value=a._parse(i.value);return l.length&&(d.filters.length?(n.filters=l,"and"!==d.logic&&(d.filters=[{logic:d.logic,filters:d.filters}],d.logic="and"),l.length>1?d.filters.push(n):d.filters.push(l[0])):(d.filters=l,d.logic=s)),d},filter:function(e){e=this._merge(e),e.filters.length&&this.dataSource.filter(e)},clear:function(){var t=this,n=t.dataSource.filter()||{filters:[]};n.filters=e.grep(n.filters,function(e){return e.filters?(e.filters=i(e.filters,t.field),e.filters.length):e.field!=t.field}),n.filters.length||(n=null),t.dataSource.filter(n)},_submit:function(e){e.preventDefault(),this.filter(this.filterModel.toJSON()),this._closeForm()},_reset:function(){this.clear(),this._closeForm()},_closeForm:function(){this._isMobile?this.pane.navigate("",this.options.animations.right):this.popup.close()},_click:function(e){e.preventDefault(),e.stopPropagation(),this.popup||this.pane||this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle()},_open:function(){var t;e(".k-filter-menu").not(this.form).each(function(){t=e(this).data(s),t&&t.close()})},_activate:function(){this.form.find(":kendoFocusable:first").focus()},_keydown:function(e){e.keyCode==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-",operator:"Operator",value:"Value",cancel:"Cancel"},animations:{left:"slide",right:"slide:right"}}});o.plugin(y)}(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(g),t.filter(":first-child").addClass(x),t.filter(":last-child").addClass(g)}var r=window.kendo,o=r.ui,a=r.keys,s=e.extend,l=e.each,d=r.template,c=o.Widget,u=/^(ul|a|div)$/i,p=".kendoPanelBar",h="img",f="href",g="k-last",m="k-link",v="."+m,_="error",b=".k-item",y=".k-group",w=y+":visible",k="k-image",x="k-first",C="expand",T="select",S="k-content",D="activate",A="collapse",E="mouseenter",P="mouseleave",F="contentLoad",I="k-state-active",z="> .k-panel",M="> .k-content",B="k-state-focused",R="k-state-disabled",H="k-state-selected",L="."+H,O="k-state-highlight",V=b+":not(.k-state-disabled)",N=V+" > .k-link",U=b+".k-state-disabled > .k-link",W="> li > "+L+", .k-panel > li > "+L,j="k-state-default",q="aria-disabled",G="aria-expanded",Y="aria-hidden",Q="aria-selected",$=":visible",K=":empty",X="single",Z={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("")},J={aria:function(e){var t="";return(e.items||e.content||e.contentUrl)&&(t+=G+"='"+(e.expanded?"true":"false")+"' "),e.enabled===!1&&(t+=q+"='true'"),t},wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" "+R:t.expanded===!0?" "+I:" 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=m;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,o=this;c.fn.init.call(o,t,n),t=o.wrapper=o.element.addClass("k-widget k-reset k-header k-panelbar"),n=o.options,t[0].id&&(o._itemId=t[0].id+"_pb_active"),o._tabindex(),o._initData(n),o._updateClasses(),o._animations(n),t.on("click"+p,N,function(t){o._click(e(t.currentTarget))&&t.preventDefault() }).on(E+p+" "+P+p,N,o._toggleHover).on("click"+p,U,!1).on("keydown"+p,e.proxy(o._keydown,o)).on("focus"+p,function(){var e=o.select();o._current(e[0]?e:o._first())}).on("blur"+p,function(){o._current(null)}).attr("role","menu"),i=t.find("li."+I+" > ."+S),i[0]&&o.expand(i.parent(),!1),r.notify(o)},events:[C,A,T,D,_,F],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(o,a){a=e(a);var s=a.find(z).add(a.find(M));if(!a.hasClass(R)&&s.length>0){if(i.options.expandMode==X&&i._collapseAllExpanded(a))return i;t.find("."+O).removeClass(O),a.addClass(O),n||(r=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(C,a)||i._toggleItem(a,!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,o){o=e(o);var a=o.find(z).add(o.find(M));!o.hasClass(R)&&a.is($)&&(o.removeClass(O),n||(r=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(A,o)||i._toggleItem(o,!0),n||(i.options.animation=r))}),i},_toggleDisabled:function(e,t){e=this.element.find(e),e.toggleClass(j,t).toggleClass(R,!t).attr(q,!t)},select:function(n){var i=this;return n===t?i.element.find(W).parent():(i.element.find(n).each(function(){var n=e(this),r=n.children(v);return n.hasClass(R)?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,b),o=e.parent("ul");return e.remove(),!o||o.hasClass("k-panelbar")||o.children(b).length||o.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($))})},_first:function(){return this.element.children(V).first()},_last:function(){var e=this.element.children(V).last(),t=e.children(w);return t[0]?t.children(V).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(B)),e&&(r=e[0].id||r,e.attr("id",r).children(v).addClass(B),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==a.DOWN||n==a.RIGHT?(t._current(t._nextItem(i)),e.preventDefault()):n==a.UP||n==a.LEFT?(t._current(t._prevItem(i)),e.preventDefault()):n==a.ENTER||n==a.SPACEBAR?(t._click(i.children(v)),e.preventDefault()):n==a.HOME?(t._current(t._first()),e.preventDefault()):n==a.END&&(t._current(t._last()),e.preventDefault()))},_nextItem:function(e){if(!e)return this._first();var t=e.children(w),n=e.next();return t[0]&&(n=t.children("."+x)),n[0]||(n=e.parent(w).parent(b).next()),n[0]&&n.is(":visible")||(n=this._first()),n.hasClass(R)&&(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(w).children("."+g),t[0]&&(n=t);else n=e.parent(w).parent(b),n[0]||(n=this._last());return n.hasClass(R)&&(n=this._prevItem(n)),n},_insert:function(t,n,i){var r,o,a=this,l=e.isPlainObject(t),d=n&&n[0];return d||(i=a.element),o={firstLevel:i.hasClass("k-panelbar"),expanded:i.parent().hasClass(I),length:i.children().length},d&&!i.length&&(i=e(et.renderGroup({group:o})).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:o,item:s(t,{index:n})}))}),d&&n.attr(G,!1)):(r=e(t),a._updateItemsClasses(r)),{items:r,group:i}},_toggleHover:function(t){var n=e(t.currentTarget);n.parents("li."+R).length||n.toggleClass("k-state-hover",t.type==E)},_updateClasses:function(){var t,r,o=this;t=o.element.find("li > ul").not(function(){return e(this).parentsUntil(".k-panelbar","div").length}).addClass("k-group k-panel").attr("role","group"),t.parent().attr(G,!1).not("."+I).children("ul").attr(Y,!0).hide(),r=o.element.add(t).children(),o._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,o,a=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(h).addClass(k),o=t.children("a").addClass(m),o[0]&&(o.attr("href",l),o.children(h).addClass(k)),t.filter(":not([disabled]):not([class*=k-state])").addClass("k-state-default"),t.filter("li[disabled]").addClass("k-state-disabled").attr(q,!0).removeAttr("disabled"),t.children("div").addClass(S).attr("role","region").attr(Y,!0).hide().parent().attr(G,!1),o=t.children(L),o[0]&&(a&&a.removeAttr(Q).children(L).removeClass(H),o.addClass(H),this._selected=t.attr(Q,!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,o,a,s,l=this,d=l.element;if(!e.parents("li."+R).length&&e.closest(".k-widget")[0]==d[0]){if(o=e.closest(v),a=o.closest(b),l._updateSelected(o),n=a.find(z).add(a.find(M)),i=o.attr(f),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,a)&&(t=!0),t!==!1)return l.options.expandMode==X&&l._collapseAllExpanded(a)?t:(n.length&&(s=n.is($),l._triggerEvent(s?A:C,a)||(t=l._toggleItem(a,s))),t)}},_toggleItem:function(e,t){var n,i,r=this,o=e.find(z);return o.length?(this._toggleGroup(o,t),n=!0):(i=e.children("."+S),i.length&&(n=!0,i.is(K)?r._ajaxRequest(e,i,t):r._toggleGroup(i,t))),n},_toggleGroup:function(e,t){var n=this,i=n.options.animation,r=i.expand,o=s({},i.collapse),a=o&&"effects"in o;e.is($)==t&&(e.parent().attr(G,!t).attr(Y,t).toggleClass(j,t).toggleClass(I,!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(a?o:s({reverse:!0},r),{hide:!0}):s({complete:function(e){n._triggerEvent(D,e.closest(b))}},r),e.kendoStop(!0,!0).kendoAnimate(r))},_collapseAllExpanded:function(n){var i,r,o=this,a=!1;return n.children(v).hasClass("k-header")?(r=n.find(z).add(n.find(M)),r.is($)&&(a=!0),r.is($)||0===r.length||(i=e(o.element).children(),i.find(z).add(i.find(M)).filter(function(){return e(this).is($)}).each(function(t,n){n=e(n),a=o._triggerEvent(A,n.closest(b)),a||o._toggleGroup(n,!0)})),a):t},_ajaxRequest:function(t,n,i){var r=this,o=t.find(".k-panelbar-collapse, .k-panelbar-expand"),a=t.find(v),s=setTimeout(function(){o.addClass("k-loading")},100),l={},d=a.attr(f);e.ajax({type:"GET",cache:!1,url:d,dataType:"html",data:l,error:function(e,t){o.removeClass("k-loading"),r.trigger(_,{xhr:e,status:t})&&this.complete()},complete:function(){clearTimeout(s),o.removeClass("k-loading")},success:function(e){try{n.html(e)}catch(o){var a=window.console;a&&a.error&&a.error(o.name+": "+o.message+" in "+d),this.error(this.xhr,"error")}r._toggleGroup(n,i),r.trigger(F,{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(b),r=t._selected;r&&r.removeAttr(Q),t._selected=i.attr(Q,!0),n.find(W).removeClass(H),n.find("> ."+O+", .k-panel > ."+O).removeClass(O),e.addClass(H),e.parentsUntil(n,b).filter(":has(.k-header)").addClass(O),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=Z.empty,n=e.item;return Z.item(s(e,{image:n.imageUrl?Z.image:t,sprite:n.spriteCssClass?Z.sprite:t,itemWrapper:Z.itemWrapper,renderContent:et.renderContent,arrow:n.items||n.content||n.contentUrl?Z.arrow:t,subGroup:et.renderGroup},J))},renderGroup:function(e){return Z.group(s({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,o=s({length:r},e.group);r>n;n++)t+=et.renderItem(s(e,{group:o,item:s({index:n},i[n])}));return t}},e,J))},renderContent:function(e){return Z.content(s(e,J))}}),r.ui.plugin(et)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o="horizontal",a="vertical",s=0,l=100,d=0,c=5,u="k-progressbar",p="k-progressbar-reverse",h="k-progressbar-indeterminate",f="k-complete",g="k-state-selected",m="k-progress-status",v="k-state-selected",_="k-state-default",b="k-state-disabled",y={VALUE:"value",PERCENT:"percent",CHUNK:"chunk"},w="change",k="complete",x="boolean",C=Math,T=e.extend,S=e.proxy,D=100,A=400,E=3,P={progressStatus:""},F=r.extend({init:function(e,t){var n=this;r.fn.init.call(this,e,t),t=n.options,n._progressProperty=t.orientation===o?"width":"height",n._fields(),t.value=n._validateValue(t.value),n._validateType(t.type),n._wrapper(),n._progressAnimation(),t.value!==t.min&&t.value!==!1&&n._updateProgress()},setOptions:function(e){var t=this;r.fn.setOptions.call(t,e),e.hasOwnProperty("reverse")&&t.wrapper.toggleClass("k-progressbar-reverse",e.reverse),e.hasOwnProperty("enable")&&t.enable(e.enable),t._progressAnimation(),t._validateValue(),t._updateProgress()},events:[w,k],options:{name:"ProgressBar",orientation:o,reverse:!1,min:s,max:l,value:d,enable:!0,type:y.VALUE,chunkCount:c,showStatus:!0,animation:{}},_fields:function(){var t=this;t._isStarted=!1,t.progressWrapper=t.progressStatus=e()},_validateType:function(i){var r=!1;if(e.each(y,function(e,n){return n===i?(r=!0,!1):t}),!r)throw Error(n.format("Invalid ProgressBar type '{0}'",i))},_wrapper:function(){var e,t=this,n=t.wrapper=t.element,i=t.options,r=i.orientation;n.addClass("k-widget "+u),n.addClass(u+"-"+(r===o?o:a)),i.enable===!1&&n.addClass(b),i.reverse&&n.addClass(p),i.value===!1&&n.addClass(h),i.type===y.CHUNK?t._addChunkProgressWrapper():i.showStatus&&(t.progressStatus=t.wrapper.prepend(P.progressStatus).find("."+m),e=i.value!==!1?i.value:i.min,i.type===y.VALUE?t.progressStatus.text(e):t.progressStatus.text(t._calculatePercentage(e)+"%"))},value:function(e){return this._value(e)},_value:function(e){var n,i=this,r=i.options;return e===t?r.value:(typeof e!==x?(e=i._roundValue(e),isNaN(e)||(n=i._validateValue(e),n!==r.value&&(i.wrapper.removeClass(h),r.value=n,i._isStarted=!0,i._updateProgress()))):e||(i.wrapper.addClass(h),r.value=!1),t)},_roundValue:function(e){e=parseFloat(e);var t=C.pow(10,E);return C.floor(e*t)/t},_validateValue:function(e){var t=this,n=t.options;if(e!==!1){if(e<=n.min||e===!0)return n.min;if(e>=n.max)return n.max}else if(e===!1)return!1;return isNaN(t._roundValue(e))?n.min:e},_updateProgress:function(){var e=this,t=e.options,n=e._calculatePercentage();t.type===y.CHUNK?(e._updateChunks(n),e._onProgressUpdateAlways(t.value)):e._updateProgressWrapper(n)},_updateChunks:function(e){var t,n=this,i=n.options,r=i.chunkCount,s=parseInt(100*(D/r),10)/100,l=parseInt(100*e,10)/100,d=C.floor(l/s);t=i.orientation===o&&!i.reverse||i.orientation===a&&i.reverse?n.wrapper.find("li.k-item:lt("+d+")"):n.wrapper.find("li.k-item:gt(-"+(d+1)+")"),n.wrapper.find("."+v).removeClass(v).addClass(_),t.removeClass(_).addClass(v)},_updateProgressWrapper:function(e){var t=this,n=t.options,i=t.wrapper.find("."+g),r=t._isStarted?t._animation.duration:0,o={};0===i.length&&t._addRegularProgressWrapper(),o[t._progressProperty]=e+"%",t.progressWrapper.animate(o,{duration:r,start:S(t._onProgressAnimateStart,t),progress:S(t._onProgressAnimate,t),complete:S(t._onProgressAnimateComplete,t,n.value),always:S(t._onProgressUpdateAlways,t,n.value)})},_onProgressAnimateStart:function(){this.progressWrapper.show()},_onProgressAnimate:function(e){var t,n=this,i=n.options,r=parseFloat(e.elem.style[n._progressProperty],10);i.showStatus&&(t=1e4/parseFloat(n.progressWrapper[0].style[n._progressProperty]),n.progressWrapper.find(".k-progress-status-wrap").css(n._progressProperty,t+"%")),i.type!==y.CHUNK&&98>=r&&n.progressWrapper.removeClass(f)},_onProgressAnimateComplete:function(e){var t=this,n=t.options,i=parseFloat(t.progressWrapper[0].style[t._progressProperty]);n.type!==y.CHUNK&&i>98&&t.progressWrapper.addClass(f),n.showStatus&&(n.type===y.VALUE?t.progressStatus.text(e):t.progressStatus.text(C.floor(t._calculatePercentage(e))+"%")),e===n.min&&t.progressWrapper.hide()},_onProgressUpdateAlways:function(e){var t=this,n=t.options;t._isStarted&&t.trigger(w,{value:e}),e===n.max&&t._isStarted&&t.trigger(k,{value:n.max})},enable:function(e){var n=this,i=n.options;i.enable=t===e?!0:e,n.wrapper.toggleClass(b,!i.enable)},destroy:function(){var e=this;r.fn.destroy.call(e)},_addChunkProgressWrapper:function(){var e,t=this,n=t.options,i=t.wrapper,r=D/n.chunkCount,o="";for(n.chunkCount<=1&&(n.chunkCount=c),o+="
        ",e=n.chunkCount-1;e>=0;e--)o+="
      • ";o+="
      ",i.append(o).find(".k-item").css(t._progressProperty,r+"%").first().addClass("k-first").end().last().addClass("k-last"),t._normalizeChunkSize()},_normalizeChunkSize:function(){var e=this,t=e.options,n=e.wrapper.find(".k-item:last"),i=parseFloat(n[0].style[e._progressProperty]),r=D-t.chunkCount*i;r>0&&n.css(e._progressProperty,i+r+"%")},_addRegularProgressWrapper:function(){var t=this;t.progressWrapper=e("
      ").appendTo(t.wrapper),t.options.showStatus&&(t.progressWrapper.append(P.progressStatus),t.progressStatus=t.wrapper.find("."+m))},_calculateChunkSize:function(){var e=this,t=e.options.chunkCount,n=e.wrapper.find("ul.k-reset");return(parseInt(n.css(e._progressProperty),10)-(t-1))/t},_calculatePercentage:function(e){var n=this,i=n.options,r=e!==t?e:i.value,o=i.min,a=i.max;return n._onePercent=C.abs((a-o)/100),C.abs((r-o)/n._onePercent)},_progressAnimation:function(){var e=this,t=e.options,n=t.animation;e._animation=n===!1?{duration:0}:T({duration:A},t.animation)}});n.ui.plugin(F)}(window.kendo.jQuery),function(e,t){function n(t){t.children(g).addClass(x),t.children("a").addClass(_).children(g).addClass(x),t.filter(":not([disabled]):not([class*=k-state-disabled])").addClass(z),t.filter("li[disabled]").addClass(I).removeAttr("disabled"),t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass(M+" "+H),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(h)||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(b),t.filter(":first-child").addClass(C),t.filter(":last-child").addClass(b)}var r=window.kendo,o=r.ui,a=r.keys,s=e.map,l=e.each,d=e.trim,c=e.extend,u=r.template,p=o.Widget,h=/^(a|div)$/i,f=".kendoTabStrip",g="img",m="href",v="prev",_="k-link",b="k-last",y="click",w="error",k=":empty",x="k-image",C="k-first",T="select",S="activate",D="k-content",A="contentUrl",E="mouseenter",P="mouseleave",F="contentLoad",I="k-state-disabled",z="k-state-default",M="k-state-active",B="k-state-focused",R="k-state-hover",H="k-tab-on-top",L=".k-item:not(."+I+")",O=".k-tabstrip-items > "+L+":not(."+M+")",V={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("")},N={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+'"':""}},U=p.extend({init:function(t,n){var i,o,a=this;p.fn.init.call(a,t,n),a._animations(a.options),a.wrapper=a.element.is("ul")?a.element.wrapAll("
      ").parent():a.element,n=a.options,a._isRtl=r.support.isRtl(a.wrapper),a._tabindex(),a._updateClasses(),a._dataSource(),n.dataSource&&a.dataSource.fetch(),a.options.contentUrls&&a.wrapper.find(".k-tabstrip-items > .k-item").each(function(t,n){e(n).find(">."+_).data(A,a.options.contentUrls[t])}),a.wrapper.on(E+f+" "+P+f,O,a._toggleHover).on("keydown"+f,e.proxy(a._keydown,a)).on("focus"+f,e.proxy(a._active,a)).on("blur"+f,function(){a._current(null)}),a.wrapper.children(".k-tabstrip-items").on(y+f,".k-state-disabled .k-link",!1).on(y+f," > "+L,function(t){a.wrapper[0]!==document.activeElement&&a.wrapper.focus(),a._click(e(t.currentTarget))&&t.preventDefault()}),i=a.tabGroup.children("li."+M),o=a.contentHolder(i.index()),o.length>0&&0===o[0].childNodes.length&&a.activateTab(i.eq(0)),a.element.attr("role","tablist"),a.element[0].id&&(a._ariaId=a.element[0].id+"_ts_active"),r.notify(a)},_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(L)[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(I)&&(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(B)),e&&(e.hasClass(M)||e.addClass(B),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,o=i._current(),s=i._isRtl;if(e.target==e.currentTarget){if(r==a.DOWN||r==a.RIGHT)n=s?v:"next";else if(r==a.UP||r==a.LEFT)n=s?"next":v;else if(r==a.ENTER||r==a.SPACEBAR)i._click(o),e.preventDefault();else{if(r==a.HOME)return i._click(i._endItem("first")),e.preventDefault(),t;if(r==a.END)return i._click(i._endItem("last")),e.preventDefault(),t}n&&(i._click(i._item(o,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,o,a=this,s=a.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),h=r.getter(s.dataSpriteCssClass),f=[],g=a.dataSource.view();for(e=e||{},i=e.action,i&&(g=e.items),t=0,o=g.length;o>t;t++)n={text:l(g[t])},s.dataContentField&&(n.content=d(g[t])),s.dataContentUrlField&&(n.contentUrl=c(g[t])),s.dataUrlField&&(n.url=p(g[t])),s.dataImageUrlField&&(n.imageUrl=u(g[t])),s.dataSpriteCssClass&&(n.spriteCssClass=h(g[t])),f[t]=n;if("add"==e.action)e.index"),n(r)),{tabs:r,contents:o}},_toggleDisabled:function(t,n){t=this.tabGroup.find(t),t.each(function(){e(this).toggleClass(z,n).toggleClass(I,!n)})},_updateClasses:function(){var r,o,a,s=this;s.wrapper.addClass("k-widget k-header k-tabstrip"),s.tabGroup=s.wrapper.children("ul").addClass("k-tabstrip-items k-reset"),s.tabGroup[0]||(s.tabGroup=e("
        ").appendTo(s.wrapper)),r=s.tabGroup.find("li").addClass("k-item"),r.length&&(o=r.filter("."+M).index(),a=o>=0?o:t,s.tabGroup.contents().filter(function(){return 3==this.nodeType&&!d(this.nodeValue)}).remove()),o>=0&&r.eq(o).addClass(H),s.contentElements=s.wrapper.children("div"),s.contentElements.addClass(D).eq(a).addClass(M).css({display:"block"}),r.length&&(n(r),i(s.tabGroup),s._updateContentElements())},_updateContentElements:function(){var t=this,n=t.options.contentUrls||[],i=t.element.attr("id")||r.guid(),o=t.wrapper.children("div");t.tabGroup.find(".k-item").each(function(r){var a=o.eq(r),s=i+"-"+(r+1);this.setAttribute("aria-controls",s),!a.length&&n[r]?e("
        ").appendTo(t.wrapper).attr("id",s):(a.attr("id",s),e(this).children(".k-loading")[0]||n[r]||e("").prependTo(this)),a.attr("role","tabpanel"),a.filter(":not(."+M+")").attr("aria-hidden",!0).attr("aria-expanded",!1),a.filter("."+M).attr("aria-expanded",!0)}),t.contentElements=t.contentAnimators=t.wrapper.children("div"),r.kineticScrollNeeded&&r.mobile.ui.Scroller&&(r.touchScroller(t.contentElements),t.contentElements=t.contentElements.children(".km-scroll-container"))},_toggleHover:function(t){e(t.currentTarget).toggleClass(R,t.type==E)},_click:function(e){var t,n,i=this,r=e.find("."+_),o=r.attr(m),a=i.options.collapsible,s=i.contentHolder(e.index());if(e.closest(".k-widget")[0]==i.wrapper[0]){if(e.is("."+I+(a?"":",."+M)))return!0;if(n=r.data(A)||o&&("#"==o.charAt(o.length-1)||-1!=o.indexOf("#"+i.element[0].id+"-")),t=!o||n,i.tabGroup.children("[data-animating]").length)return t;if(i.trigger(T,{item:e[0],contentElement:s[0]}))return!0;if(t!==!1)return a&&e.is("."+M)?(i.deactivateTab(e),!0):(i.activateTab(e)&&(t=!0),t)}},deactivateTab:function(e){var t=this,n=t.options.animation,i=n.open,o=c({},n.close),a=o&&"effects"in o;e=t.tabGroup.find(e),o=c(a?o:c({reverse:!0},i),{hide:!0}),r.size(i.effects)?(e.kendoAddClass(z,{duration:i.duration}),e.kendoRemoveClass(M,{duration:i.duration})):(e.addClass(z),e.removeClass(M)),e.removeAttr("aria-selected"),t.contentAnimators.filter("."+M).kendoStop(!0,!0).kendoAnimate(o).removeClass(M).attr("aria-hidden",!0)},activateTab:function(e){var t,n,i,o,a,s,l,d,u,p,h,f,g,m,v;return e=this.tabGroup.find(e),t=this,n=t.options.animation,i=n.open,o=c({},n.close),a=o&&"effects"in o,s=e.parent().children(),l=s.filter("."+M),d=s.index(e),o=c(a?o:c({reverse:!0},i),{hide:!0}),r.size(i.effects)?(l.kendoRemoveClass(M,{duration:o.duration}),e.kendoRemoveClass(R,{duration:o.duration})):(l.removeClass(M),e.removeClass(R)),u=t.contentAnimators,t.inRequest&&(t.xhr.abort(),t.inRequest=!1),0===u.length?(l.removeClass(H),e.addClass(H).css("z-index"),e.addClass(M),t._current(e),t.trigger("change"),!1):(p=u.filter("."+M),h=t.contentHolder(d),f=h.closest(".k-content"),0===h.length?(p.removeClass(M).attr("aria-hidden",!0).kendoStop(!0,!0).kendoAnimate(o),!1):(e.attr("data-animating",!0),g=(e.children("."+_).data(A)||!1)&&h.is(k),m=function(){l.removeClass(H),e.addClass(H).css("z-index"),r.size(i.effects)?(l.kendoAddClass(z,{duration:i.duration}),e.kendoAddClass(M,{duration:i.duration})):(l.addClass(z),e.addClass(M)),l.removeAttr("aria-selected"),e.attr("aria-selected",!0),t._current(e),f.addClass(M).removeAttr("aria-hidden").kendoStop(!0,!0).attr("aria-expanded",!0).kendoAnimate(c({init:function(){t.trigger(S,{item:e[0],contentElement:h[0]})}},i,{complete:function(){e.removeAttr("data-animating")}}))},v=function(){g?(e.removeAttr("data-animating"),t.ajaxRequest(e,h,function(){e.attr("data-animating",!0),m(),t.trigger("change")})):(m(),t.trigger("change"))},p.removeClass(M),p.attr("aria-hidden",!0),p.attr("aria-expanded",!1),p.length?p.kendoStop(!0,!0).kendoAnimate(c({complete:v},o)):v(),!0))},contentElement:function(e){var n,i,o,a;if(isNaN(e-0))return t;if(n=this.contentElements&&this.contentElements[0]&&!r.kineticScrollNeeded?this.contentElements:this.contentAnimators,i=RegExp("-"+(e+1)+"$"),n)for(o=0,a=n.length;a>o;o++)if(i.test(n.closest(".k-content")[o].id))return n[o];return t},contentHolder:function(t){var n=e(this.contentElement(t)),i=n.children(".km-scroll-container");return r.support.touch&&i[0]?i:n},ajaxRequest:function(t,n,i,r){t=this.tabGroup.find(t);var o=this,a=e.ajaxSettings.xhr,s=t.find("."+_),l={},d=!1,c=t.find(".k-loading").removeClass("k-complete");c[0]||(c=e("").prependTo(t)),r=r||s.data(A)||s.attr(m),o.inRequest=!0,o.xhr=e.ajax({type:"GET",cache:!1,url:r,dataType:"html",data:l,xhr:function(){var t=this,n=a(),i=10,r=t.progressUpload?"progressUpload":t.progress?"progress":!1;return n&&e.each([n,n.upload],function(){this.addEventListener&&this.addEventListener("progress",function(e){r&&t[r](e)},!1)}),t.progress||(d=setInterval(function(){t.progress({lengthComputable:!0,loaded:Math.min(i,100),total:100})},100),i+=10),n},progress:function(e){if(e.lengthComputable){var t=parseInt(100*(e.loaded/e.total),10)+"%";c.width(t)}},error:function(e,t){o.trigger("error",{xhr:e,status:t})&&this.complete()},complete:function(){o.inRequest=!1,clearInterval(d),c.css("width","")},success:function(e){c.addClass("k-complete");try{n.html(e)}catch(a){var s=window.console;s&&s.error&&s.error(a.name+": "+a.message+" in "+r),this.error(this.xhr,"error")}i&&i.call(o,n),o.trigger(F,{item:t[0],contentElement:n[0]})}})}});c(U,{renderItem:function(e){e=c({tabStrip:{},group:{}},e);var t=V.empty,n=e.item;return V.item(c(e,{image:n.imageUrl?V.image:t,sprite:n.spriteCssClass?V.sprite:t,itemWrapper:V.itemWrapper},N))},renderContent:function(e){return V.content(c(e,N))}}),r.ui.plugin(U)}(window.kendo.jQuery),function(e,t){function n(e,t,n){var i,r=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-r,e.setTime(e.getTime()+i*I))}function i(){var e=new G,t=new G(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),n=new G(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0);return-1*(t.getTimezoneOffset()-n.getTimezoneOffset())}function r(e){return 60*e.getHours()*I+e.getMinutes()*I+1e3*e.getSeconds()+e.getMilliseconds()}function o(e,t,n){var i,o=r(t),a=r(n);return e&&o!=a?(i=r(e),o>i&&(i+=z),o>a&&(a+=z),i>=o&&a>=i):!0}function a(e){var t=e.parseFormats;e.format=h(e.format||c.getCulture(e.culture).calendars.standard.patterns.t),t=W(t)?t:[t],t.splice(0,0,e.format),e.parseFormats=t}function s(e){e.preventDefault()}var l,d,c=window.kendo,u=c.keys,p=c._activeElement,h=c._extractFormat,f=c.support,g=f.browser,m=c.ui,v=m.Widget,_="open",b="close",y="change",w=".kendoTimePicker",k="click"+w,x="k-state-default",C="disabled",T="readonly",S="li",D="",A="k-state-focused",E="k-state-hover",P="mouseenter"+w+" mouseleave"+w,F="mousedown"+w,I=6e4,z=864e5,M="k-state-selected",B="k-state-disabled",R="aria-selected",H="aria-expanded",L="aria-hidden",O="aria-disabled",V="aria-readonly",N="aria-activedescendant",U="id",W=e.isArray,j=e.extend,q=e.proxy,G=Date,Y=new G;Y=new G(Y.getFullYear(),Y.getMonth(),Y.getDate(),0,0,0),l=function(t){var n=this,i=t.id;n.options=t,n.ul=e('