/* * Kendo UI Complete v2013.3.1324 (http://kendoui.com) * Copyright 2014 Telerik AD. All rights reserved. * * Kendo UI Complete commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(define){return define([],function(){!function(e,t){function n(){}function i(e,t){if(t)return"'"+e.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var n=e.charAt(0),i=e.substring(1);return"="===n?"+("+i+")+":":"===n?"+e("+i+")+":";"+e+";o+="}function r(e,t,n){return e+="",t=t||2,n=t-e.length,n?B[t].substring(0,n)+e:e}function a(t,n){var i,r,a,o,s,l,d,c,u,p,f,h,m,g=kt.browser,v="rtl"==t.css("direction");return t.parent().hasClass("k-animation-container")?(h=t.parent(".k-animation-container"),m=h[0].style,h.is(":hidden")&&h.show(),i=bt.test(m.width)||bt.test(m.height),i||h.css({width:t.outerWidth(),height:t.outerHeight(),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})):(r=t.css(ut.support.transitions.css+"box-shadow")||t.css("box-shadow"),a=r?r.match(wt)||[0,0,0,0,0]:[0,0,0,0,0],o=vt.max(+a[3],+(a[4]||0)),s=-a[1]+o,l=+a[1]+o,d=+a[2]+o,c=t[0].style.width,u=t[0].style.height,p=bt.test(c),f=bt.test(u),g.opera&&(s=l=d=5),i=p||f,!p&&(!n||n&&c)&&(c=t.outerWidth()),!f&&(!n||n&&u)&&(u=t.outerHeight()),t.wrap(e("
").addClass("k-animation-container").css({width:c,height:u,marginLeft:s*(v?1:-1),paddingLeft:s,paddingRight:l,paddingBottom:d})),i&&t.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),g.msie&&vt.floor(g.version)<=7&&(t.css({zoom:1}),t.children(".k-menu").width(t.width())),t.parent()}function o(e){var t=1,n=arguments.length;for(t=1;n>t;t++)s(e,arguments[t]);return e}function s(e,t){var n,i,r,a,o=ut.data.ObservableArray,l=ut.data.DataSource;for(n in t)i=t[n],r=typeof i,r===Dt&&null!==i&&i.constructor!==Array&&i.constructor!==o&&i.constructor!==l?i instanceof Date?e[n]=new Date(i.getTime()):E(i.clone)?e[n]=i.clone():(a=e[n],e[n]=typeof a===Dt?a||{}:{},s(e[n],i)):r!==zt&&(e[n]=i);return e}function l(e,n,i){for(var r in n)if(n.hasOwnProperty(r)&&n[r].test(e))return r;return i!==t?i:e}function d(e){return e.replace(/([a-z][A-Z])/g,function(e){return e.charAt(0)+"-"+e.charAt(1).toLowerCase()})}function c(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})}function u(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[c(t)]})),ut.size(r)||(r=i),r}function p(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,a,o;return t||(t="offset"),i=e[t](),r=kt.mobileOS,kt.touch&&r.ios&&r.flatVersion<410&&(a="offset"==t?i:e.offset(),o=i.left==a.left&&i.top==a.top)?{top:i.top-window.scrollY,left:i.left-window.scrollX}:(kt.browser.msie&&(kt.pointers||kt.msPointers)&&!n&&(i.top-=window.pageYOffset-document.documentElement.scrollTop,i.left-=window.pageXOffset-document.documentElement.scrollLeft),i)}function h(e){var t={};return ft("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function m(e){return new ut.effects.Element(e)}function g(e,t,n,i){return typeof e===Tt&&(E(t)&&(i=t,t=400,n=!1),E(n)&&(i=n,n=!1),typeof t===Et&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:i}),pt({effects:{},duration:400,reverse:!1,init:gt,teardown:gt,hide:!1},e,{completeCallback:e.complete,complete:gt})}function v(t,n,i,r,a){for(var o,s=0,l=t.length;l>s;s++)o=e(t[s]),o.queue(function(){V.promise(o,g(n,i,r,a))});return t}function _(e,t,n,i,r,a){return V.transitionPromise(e,t,g(n,i,r,a))}function k(e,t,n,i){return t&&(t=t.split(" "),ft(t,function(t,n){e.toggleClass(n,i)})),e}function b(e){return(""+e).replace(W,"&").replace(U,"<").replace(q,">")}function y(e,n){var i;return 0===n.indexOf("data")&&(n=n.substring(4),n=n.charAt(0).toLowerCase()+n.substring(1)),n=n.replace(X,"-$1"),i=e.getAttribute("data-"+ut.ns+n),null===i?i=t:"null"===i?i=null:"true"===i?i=!0:"false"===i?i=!1:xt.test(i)?i=parseFloat(i):Q.test(i)&&!J.test(i)&&(i=Function("return ("+i+")")()),i}function w(n,i){var r,a,o={};for(r in i)a=y(n,r),a!==t&&(K.test(r)&&(a=ut.template(e("#"+a).html())),o[r]=a);return o}function x(t,n){return e.contains(t,n)?-1:1}function C(){var t=e(this);return e.inArray(t.attr("data-role"),["slider","rangeslider"])>0||t.is(":visible")}function T(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&S(e)}function S(t){return!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")||e.expr.filters.hidden(this)}).length}function D(e,t){return new D.fn.init(e,t)}var F,E,z,H,A,M,I,R,N,O,P,B,L,V,W,U,q,j,G,Y,$,K,Q,J,X,Z,et,tt,nt,it,rt,at,ot,st,lt,dt,ct,ut=window.kendo=window.kendo||{cultures:{}},pt=e.extend,ft=e.each,ht=e.isArray,mt=e.proxy,gt=e.noop,vt=Math,_t=window.JSON||{},kt={},bt=/%/,yt=/\{(\d+)(:[^\}]+)?\}/g,wt=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,xt=/^(\+|-?)\d+(\.?)\d*$/,Ct="function",Tt="string",St="number",Dt="object",Ft="null",Et="boolean",zt="undefined",Ht={},At={},Mt=[].slice,It=window.Globalize;ut.version="2013.3.1324",n.extend=function(e){var t,n,i=function(){},r=this,a=e&&e.init?e.init:function(){r.apply(this,arguments)};i.prototype=r.prototype,n=a.fn=a.prototype=new i;for(t in e)n[t]=typeof e[t]!==Dt||e[t]instanceof Array||null===e[t]?e[t]:pt(!0,{},i.prototype[t],e[t]);return n.constructor=a,a.extend=r.extend,a},n.prototype._initOptions=function(e){this.options=o({},this.options,e)},E=ut.isFunction=function(e){return"function"==typeof e},z=function(){this._defaultPrevented=!0},H=function(){return this._defaultPrevented===!0},A=n.extend({init:function(){this._events={}},bind:function(e,n,i){var r,a,o,s,l,d=this,c=typeof e===Tt?[e]:e,u=typeof n===Ct;if(n===t){for(r in e)d.bind(r,e[r]);return d}for(r=0,a=c.length;a>r;r++)e=c[r],s=u?n:n[e],s&&(i&&(o=s,s=function(){d.unbind(e,s),o.apply(d,arguments)}),l=d._events[e]=d._events[e]||[],l.push(s));return d},one:function(e,t){return this.bind(e,t,!0)},first:function(e,t){var n,i,r,a,o=this,s=typeof e===Tt?[e]:e,l=typeof t===Ct;for(n=0,i=s.length;i>n;n++)e=s[n],r=l?t:t[e],r&&(a=o._events[e]=o._events[e]||[],a.unshift(r));return o},trigger:function(e,t){var n,i,r=this,a=r._events[e];if(a){for(t=t||{},t.sender=r,t._defaultPrevented=!1,t.preventDefault=z,t.isDefaultPrevented=H,a=a.slice(),n=0,i=a.length;i>n;n++)a[n].call(r,t);return t._defaultPrevented===!0}return!1},unbind:function(e,n){var i,r=this,a=r._events[e];if(e===t)r._events={};else if(a)if(n)for(i=a.length-1;i>=0;i--)a[i]===n&&a.splice(i,1);else r._events[e]=[];return r}}),M=/^\w+/,I=/\$\{([^}]*)\}/g,R=/\\\}/g,N=/__CURLY__/g,O=/\\#/g,P=/__SHARP__/g,B=["","0","00","000","0000"],F={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 r,a,o,s=pt({},this,n),l=s.paramName,d=l.match(M)[0],c=s.useWithBlock,u="var o,e=kendo.htmlEncode;";if(E(t))return 2===t.length?function(n){return t(e,{data:n}).join("")}:t;for(u+=c?"with("+l+"){":"",u+="o=",a=t.replace(R,"__CURLY__").replace(I,"#=e($1)#").replace(N,"}").replace(O,"__SHARP__").split("#"),o=0;os;s++)p[s]=t(s,m)||Ft;return c=0===p.length?"[]":n?"[\n"+n+p.join(",\n"+n)+"\n"+h+"]":"["+p.join(",")+"]",n=h,c}if(a&&typeof a===Dt)for(u=a.length,s=0;u>s;s++)typeof a[s]===Tt&&(d=a[s],c=t(d,m),c&&p.push(e(d)+(n?": ":":")+c));else for(d in m)Object.hasOwnProperty.call(m,d)&&(c=t(d,m),c&&p.push(e(d)+(n?": ":":")+c));return c=0===p.length?"{}":n?"{\n"+n+p.join(",\n"+n)+"\n"+h+"}":"{"+p.join(",")+"}",n=h,c}}var n,i,a,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l={}.toString;typeof Date.prototype.toJSON!==Ct&&(Date.prototype.toJSON=function(){var e=this;return isFinite(e.valueOf())?r(e.getUTCFullYear(),4)+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),typeof _t.stringify!==Ct&&(_t.stringify=function(e,r,o){var s;if(n="",i="",typeof o===St)for(s=0;o>s;s+=1)i+=" ";else typeof o===Tt&&(i=o);if(a=r,r&&typeof r!==Ct&&(typeof r!==Dt||typeof r.length!==St))throw Error("JSON.stringify");return t("",{"":e})})}(),function(){function n(e){if(e){if(e.numberFormat)return e;if(typeof e===Tt){var t=ut.cultures;return t[e]||t[e.split("-")[0]]||null}return null}return null}function i(e){return e&&(e=n(e)),e||ut.cultures.current}function a(e){e.groupSizes=e.groupSize,e.percent.groupSizes=e.percent.groupSize,e.currency.groupSizes=e.currency.groupSize}function o(e,n,a){a=i(a);var o=a.calendars.standard,s=o.days,l=o.months;return n=o.patterns[n]||n,n.replace(u,function(n){var i;return"d"===n?i=e.getDate():"dd"===n?i=r(e.getDate()):"ddd"===n?i=s.namesAbbr[e.getDay()]:"dddd"===n?i=s.names[e.getDay()]:"M"===n?i=e.getMonth()+1:"MM"===n?i=r(e.getMonth()+1):"MMM"===n?i=l.namesAbbr[e.getMonth()]:"MMMM"===n?i=l.names[e.getMonth()]:"yy"===n?i=r(e.getFullYear()%100):"yyyy"===n?i=r(e.getFullYear(),4):"h"===n?i=e.getHours()%12||12:"hh"===n?i=r(e.getHours()%12||12):"H"===n?i=e.getHours():"HH"===n?i=r(e.getHours()):"m"===n?i=e.getMinutes():"mm"===n?i=r(e.getMinutes()):"s"===n?i=e.getSeconds():"ss"===n?i=r(e.getSeconds()):"f"===n?i=vt.floor(e.getMilliseconds()/100):"ff"===n?i=vt.floor(e.getMilliseconds()/10):"fff"===n?i=e.getMilliseconds():"tt"===n&&(i=e.getHours()<12?o.AM[0]:o.PM[0]),i!==t?i:n.slice(1,n.length-1)})}function s(e,n,r){r=i(r);var a,o,s,l,c,u,y,w,x,C,T,S,D,F,E,z,H,A,M,I,R,N,O,P=r.numberFormat,B=P.groupSize[0],L=P[v],V=P[g],W=P.decimals,U=P.pattern[0],q=[],j=0>e,G=m,Y=m,$=-1;if(e===t)return m;if(!isFinite(e))return e;if(!n)return r.name.length?e.toLocaleString():""+e;if(c=p.exec(n)){if(n=c[1].toLowerCase(),o="c"===n,s="p"===n,(o||s)&&(P=o?P.currency:P.percent,B=P.groupSize[0],L=P[v],V=P[g],W=P.decimals,a=P.symbol,U=P.pattern[j?0:1]),l=c[2],l&&(W=+l),"e"===n)return l?e.toExponential(W):e.toExponential();if(s&&(e*=100),e=d(e,W),j=0>e,e=e.split(g),u=e[0],y=e[1],j&&(u=u.substring(1)),Y=u,w=u.length,w>=B)for(Y=m,C=0;w>C;C++)C>0&&0===(w-C)%B&&(Y+=L),Y+=u.charAt(C);if(y&&(Y+=V+y),"n"===n&&!j)return Y;for(e=m,C=0,T=U.length;T>C;C++)S=U.charAt(C),e+="n"===S?Y:"$"===S||"%"===S?a:S;return e}if(j&&(e=-e),(n.indexOf("'")>-1||n.indexOf('"')>-1||n.indexOf("\\")>-1)&&(n=n.replace(f,function(e){var t=e.charAt(0).replace("\\",""),n=e.slice(1).replace(t,"");return q.push(n),b})),n=n.split(";"),j&&n[1])n=n[1],F=!0;else if(0===e){if(n=n[2]||n[0],-1==n.indexOf(_)&&-1==n.indexOf(k))return n}else n=n[0];if(I=n.indexOf("%"),R=n.indexOf("$"),s=-1!=I,o=-1!=R,s&&(e*=100),o&&"\\"===n[R-1]&&(n=n.split("\\").join(""),o=!1),(o||s)&&(P=o?P.currency:P.percent,B=P.groupSize[0],L=P[v],V=P[g],W=P.decimals,a=P.symbol),D=n.indexOf(v)>-1,D&&(n=n.replace(h,m)),E=n.indexOf(g),T=n.length,-1!=E?(y=(""+e).split("e"),y=y[1]?d(e,Math.abs(y[1])):y[0],y=y.split(g)[1]||m,H=n.lastIndexOf(k)-E,z=n.lastIndexOf(_)-E,A=H>-1,M=z>-1,C=y.length,A||M||(n=n.substring(0,E)+n.substring(E+1),T=n.length,E=-1,C=0),A&&H>z?C=H:z>H&&(M&&C>z?C=z:A&&H>C&&(C=H)),C>-1&&(e=d(e,C))):e=d(e),z=n.indexOf(_),N=H=n.indexOf(k),$=-1==z&&-1!=H?H:-1!=z&&-1==H?z:z>H?H:z,z=n.lastIndexOf(_),H=n.lastIndexOf(k),O=-1==z&&-1!=H?H:-1!=z&&-1==H?z:z>H?z:H,$==T&&(O=$),-1!=$){if(Y=(""+e).split(g),u=Y[0],y=Y[1]||m,w=u.length,x=y.length,j&&-1*e>=0&&(j=!1),D)if(w===B&&E-N>w)u=L+u;else if(w>B){for(Y=m,C=0;w>C;C++)C>0&&0===(w-C)%B&&(Y+=L),Y+=u.charAt(C);u=Y}for(e=n.substring(0,$),j&&!F&&(e+="-"),C=$;T>C;C++){if(S=n.charAt(C),-1==E){if(w>O-C){e+=u;break}}else if(-1!=H&&C>H&&(G=m),w>=E-C&&E-C>-1&&(e+=u,C=E),E===C){e+=(y?V:m)+y,C+=O-E+1;continue}S===k?(e+=S,G=S):S===_&&(e+=G)}if(O>=$&&(e+=n.substring(O+1)),o||s){for(Y=m,C=0,T=e.length;T>C;C++)S=e.charAt(C),Y+="$"===S||"%"===S?a:S;e=Y}if(T=q.length)for(C=0;T>C;C++)e=e.replace(b,q[C])}return e}var l,d,c,u=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|"[^"]*"|'[^']*'/g,p=/^(n|c|p|e)(\d*)$/i,f=/(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,h=/\,/g,m="",g=".",v=",",_="#",k="0",b="??",y="en-US",w={}.toString;ut.cultures["en-US"]={name:y,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}}},ut.culture=function(e){var i,r=ut.cultures;return e===t?r.current:(i=n(e)||r[y],i.calendar=i.calendars.standard,r.current=i,It&&a(i.numberFormat),t)},ut.findCulture=n,ut.getCulture=i,ut.culture(y),l=9e15,d=function(e,t){var n=Math.pow(10,t||0),i=Math.round(e*n);return i>l?e.toFixed(t):(i/n).toFixed(t)},c=function(e,n,i){if(n){if("[object Date]"===w.call(e))return o(e,n,i);if(typeof e===St)return s(e,n,i)}return e!==t?e:""},It&&(c=function(t,n,i){return e.isPlainObject(i)&&(i=i.name),It.format(t,n,i)}),ut.format=function(e){var t=arguments;return e.replace(yt,function(e,n,i){var r=t[parseInt(n,10)+1];return c(r,i?i.substring(1):"")})},ut._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},ut._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},ut._round=d,ut.toString=c}(),function(){function n(e,t,n){return!(e>=t&&n>=e)}function i(e){return e.charAt(0)}function r(t){return e.map(t,i)}function a(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}function o(e){for(var t=0,n=e.length,i=[];n>t;t++)i[t]=(e[t]+"").toLowerCase();return i}function s(e){var t,n={};for(t in e)n[t]=o(e[t]);return n}function l(e,i,o){if(!e)return null;var l,d,c,f,h,m,v,_,k,b,y,w,x,C,T=function(e){for(var t=0;i[O]===e;)t++,O++;return t>0&&(O-=1),t},S=function(t){var n=g[t]||RegExp("^\\d{1,"+t+"}"),i=e.substr(P,t).match(n);return i?(i=i[0],P+=i.length,parseInt(i,10)):null},D=function(t,n){for(var i,r,a,o=0,s=t.length;s>o;o++)if(i=t[o],r=i.length,a=e.substr(P,r),n&&(a=a.toLowerCase()),a==i)return P+=r,o+1;return null},F=function(){var t=!1;return e.charAt(P)===i[O]&&(P++,t=!0),t},E=o.calendars.standard,z=null,H=null,A=null,M=null,I=null,R=null,N=null,O=0,P=0,B=!1,L=new Date,V=E.twoDigitYearMax||2029,W=L.getFullYear();for(i||(i="d"),f=E.patterns[i],f&&(i=f),i=i.split(""),c=i.length;c>O;O++)if(l=i[O],B)"'"===l?B=!1:F();else if("d"===l){if(d=T("d"),E._lowerDays||(E._lowerDays=s(E.days)),A=3>d?S(2):D(E._lowerDays[3==d?"namesAbbr":"names"],!0),null===A||n(A,1,31))return null}else if("M"===l){if(d=T("M"),E._lowerMonths||(E._lowerMonths=s(E.months)),H=3>d?S(2):D(E._lowerMonths[3==d?"namesAbbr":"names"],!0),null===H||n(H,1,12))return null;H-=1}else if("y"===l){if(d=T("y"),z=S(d),null===z)return null;2==d&&("string"==typeof V&&(V=W+parseInt(V,10)),z=W-W%100+z,z>V&&(z-=100))}else if("h"===l){if(T("h"),M=S(2),12==M&&(M=0),null===M||n(M,0,11))return null}else if("H"===l){if(T("H"),M=S(2),null===M||n(M,0,23))return null}else if("m"===l){if(T("m"),I=S(2),null===I||n(I,0,59))return null}else if("s"===l){if(T("s"),R=S(2),null===R||n(R,0,59))return null}else if("f"===l){if(d=T("f"),C=e.substr(P,d).match(g[3]),N=S(d),null!==N&&(C=C[0].length,3>C&&(N*=Math.pow(10,3-C)),d>3&&(N=parseInt((""+N).substring(0,3),10))),null===N||n(N,0,999))return null}else if("t"===l){if(d=T("t"),k=E.AM,b=E.PM,1===d&&(k=r(k),b=r(b)),h=D(b),!h&&!D(k))return null}else if("z"===l){if(m=!0,d=T("z"),"Z"===e.substr(P,1)){if(!v)return null;F();continue}if(_=e.substr(P,6).match(d>2?p:u),!_)return null;if(_=_[0],P=_.length,_=_.split(":"),y=parseInt(_[0],10),n(y,-12,13))return null;if(d>2&&(w=parseInt(_[1],10),isNaN(w)||n(w,0,59)))return null}else if("T"===l)v=F();else if("'"===l)B=!0,F();else if(!F())return null;return x=null!==M||null!==I||R||null,null===z&&null===H&&null===A&&x?(z=W,H=L.getMonth(),A=L.getDate()):(null===z&&(z=W),null===A&&(A=1)),h&&12>M&&(M+=12),m?(y&&(M+=-y),w&&(I+=-w),e=new Date(Date.UTC(z,H,A,M,I,R,N))):(e=new Date(z,H,A,M,I,R,N),a(e,M)),100>z&&e.setFullYear(z),e.getDate()!==A&&m===t?null:e}var d=/\u00A0/g,c=/[eE][\-+]?[0-9]+/,u=/[+|\-]\d{1,2}/,p=/[+|\-]\d{1,2}:\d{2}/,f=/^\/Date\((.*?)\)\/$/,h=/[+-]{1}\d+/,m=["G","g","d","F","D","y","m","T","t"],g={2:/^\d{1,2}/,3:/^\d{1,3}/,4:/^\d{4}/},v={}.toString;ut.parseDate=function(e,t,n){var i,r,a,o,s;if("[object Date]"===v.call(e))return e;if(i=0,r=null,e&&0===e.indexOf("/D")&&(r=f.exec(e)))return r=r[1],s=h.exec(r),r=parseInt(r,10),s&&(r-=parseInt(s[0],10)*ut.date.MS_PER_MINUTE),new Date(r);if(n=ut.getCulture(n),!t){for(t=[],o=n.calendar.patterns,a=m.length;a>i;i++)t[i]=o[m[i]];i=0,t=["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"].concat(t)}for(t=ht(t)?t:[t],a=t.length;a>i;i++)if(r=l(e,t[i],n))return r;return r},ut.parseInt=function(e,t){var n=ut.parseFloat(e,t);return n&&(n=0|n),n},ut.parseFloat=function(e,t,n){if(!e&&0!==e)return null;if(typeof e===St)return e;e=""+e,t=ut.getCulture(t);var i,r,a=t.numberFormat,o=a.percent,s=a.currency,l=s.symbol,u=o.symbol,p=e.indexOf("-");return c.test(e)?(e=parseFloat(e.replace(a["."],".")),isNaN(e)&&(e=null),e):p>0?null:(p=p>-1,e.indexOf(l)>-1||n&&n.toLowerCase().indexOf("c")>-1?(a=s,i=a.pattern[0].replace("$",l).split("n"),e.indexOf(i[0])>-1&&e.indexOf(i[1])>-1&&(e=e.replace(i[0],"").replace(i[1],""),p=!0)):e.indexOf(u)>-1&&(r=!0,a=o,l=u),e=e.replace("-","").replace(l,"").replace(d," ").split(a[","].replace(d," ")).join("").replace(a["."],"."),e=parseFloat(e),isNaN(e)?e=null:p&&(e*=-1),e&&r&&(e/=100),e)},It&&(ut.parseDate=function(e,t,n){return"[object Date]"===v.call(e)?e:It.parseDate(e,t,n)},ut.parseFloat=function(n,i){return typeof n===St?n:n===t||null===n?null:(e.isPlainObject(i)&&(i=i.name),n=It.parseFloat(n,i),isNaN(n)?null:n)})}(),function(){var n,i,r,a,o,s,d;kt.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},kt.isRtl=function(t){return e(t).closest(".k-rtl").length>0},n=document.createElement("table");try{n.innerHTML="",kt.tbodyInnerHtml=!0}catch(c){kt.tbodyInnerHtml=!1}kt.touch="ontouchstart"in window,kt.msPointers=window.MSPointerEvent,kt.pointers=window.PointerEvent,i=kt.transitions=!1,r=kt.transforms=!1,a="HTMLElement"in window?HTMLElement.prototype:[],kt.hasHW3D="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix||"MozPerspective"in document.documentElement.style||"msPerspective"in document.documentElement.style,ft(["Moz","webkit","O","ms"],function(){var e,a=""+this,o=typeof n.style[a+"Transition"]===Tt;return o||typeof n.style[a+"Transform"]===Tt?(e=a.toLowerCase(),r={css:"ms"!=e?"-"+e+"-":"",prefix:a,event:"o"===e||"webkit"===e?e:""},o&&(i=r,i.event=i.event?i.event+"TransitionEnd":"transitionend"),!1):t}),n=null,kt.transforms=r,kt.transitions=i,kt.devicePixelRatio=window.devicePixelRatio===t?1:window.devicePixelRatio;try{kt.screenWidth=window.outerWidth||window.screen?window.screen.availWidth:window.innerWidth,kt.screenHeight=window.outerHeight||window.screen?window.screen.availHeight:window.innerHeight}catch(c){kt.screenWidth=window.screen.availWidth,kt.screenHeight=window.screen.availHeight}kt.detectOS=function(e){var t,n,i=!1,r=[],a=!/mobile safari/i.test(e),o={fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,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/,flat:/sailfish|ffos|tizen/i,meego:/meego/},d={tablet:/playbook|ipad|fire/i},c={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,chrome:/chrome/i,webkit:/webkit/i,ie:/MSIE|Windows\sPhone/i};for(n in o)if(o.hasOwnProperty(n)&&(r=e.match(o[n]))){if("windows"==n&&"plugins"in navigator)return!1;i={},i.device=n,i.tablet=l(n,d,!1),i.browser=l(e,c,"default"),i.name=l(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!==zt||typeof window.cordova!==zt,i.android&&(kt.devicePixelRatio<1.5&&i.flatVersion<400||a)&&(kt.screenWidth>800||kt.screenHeight>800)&&(i.tablet=n);break}return i},o=kt.mobileOS=kt.detectOS(navigator.userAgent),kt.wpDevicePixelRatio=o.wp?screen.width/320:0,kt.kineticScrollNeeded=o&&(kt.touch||kt.msPointers||kt.pointers),kt.hasNativeScrolling=!1,(o.ios&&o.majorVersion>4||o.android&&o.majorVersion>2||o.wp)&&(kt.hasNativeScrolling=o),kt.mouseAndTouchPresent=kt.touch&&!(kt.mobileOS.ios||kt.mobileOS.android),kt.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},kt.browser=kt.detectBrowser(navigator.userAgent),kt.zoomLevel=function(){try{return kt.touch?document.documentElement.clientWidth/window.innerWidth:kt.browser.msie&&kt.browser.version>=10?(top||window).document.documentElement.offsetWidth/(top||window).innerWidth:1}catch(e){return 1}},kt.cssBorderSpacing=t!==document.documentElement.style.borderSpacing&&!(kt.browser.msie&&kt.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)}(kt.browser),kt.eventCapture=document.documentElement.addEventListener,s=document.createElement("input"),kt.placeholder="placeholder"in s,kt.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],n=t.length,i="test",r={},a=0;n>a;a++)e=t[a],s.setAttribute("type",e),s.value=i,r[e.replace("-","")]="text"!==s.type&&s.value!==i;return r}(),s.style.cssText="float:left;",kt.cssFloat=!!s.style.cssFloat,s=null,kt.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]}(),kt.matchesSelector=a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.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},kt.pushState=window.history&&window.history.pushState,d=document.documentMode,kt.hashChange="onhashchange"in window&&!(kt.browser.msie&&(!d||8>=d))}(),L={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=ut.wrap(e);return i.append(t),e.hide(),t.show(),n.completeCallback&&n.completeCallback(e),e},disable:function(){this.promise=this.promiseShim,this.transitionPromise=this.transitionPromiseShim},enable:function(){this.promise=this.animatedPromise,this.transitionPromise=this.animatedTransitionPromise}}),V.promiseShim=V.promise,V.transitionPromiseShim=V.transitionPromise,"kendoAnimate"in e.fn||pt(e.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,n,i){return v(this,e,t,n,i)},kendoAnimateTo:function(e,t,n,i,r){return _(this,e,t,n,i,r)},kendoAddClass:function(e,t){return ut.toggleClass(this,e,t,!0)},kendoRemoveClass:function(e,t){return ut.toggleClass(this,e,t,!1)},kendoToggleClass:function(e,t,n){return ut.toggleClass(this,e,t,n)}}),W=/&/g,U=//g,j=function(e){return e.target},kt.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},ft(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,n){e.fn[n]=function(e){return this.bind(n,e)}})),kt.touch?kt.mobileOS?(kt.mousedown="touchstart",kt.mouseup="touchend",kt.mousemove="touchmove",kt.mousecancel="touchcancel",kt.click="touchend",kt.resize="orientationchange"):(kt.mousedown="mousedown touchstart",kt.mouseup="mouseup touchend",kt.mousemove="mousemove touchmove",kt.mousecancel="mouseleave touchcancel",kt.click="click",kt.resize="resize"):kt.pointers?(kt.mousemove="pointermove",kt.mousedown="pointerdown",kt.mouseup="pointerup",kt.mousecancel="pointercancel",kt.click="pointerup",kt.resize="orientationchange resize"):kt.msPointers?(kt.mousemove="MSPointerMove",kt.mousedown="MSPointerDown",kt.mouseup="MSPointerUp",kt.mousecancel="MSPointerCancel",kt.click="MSPointerUp",kt.resize="orientationchange resize"):(kt.mousemove="mousemove",kt.mousedown="mousedown",kt.mouseup="mouseup",kt.mousecancel="mouseleave",kt.click="click",kt.resize="resize"),G=function(e,t){var n,i,r,a,o=t||"d",s=1;for(i=0,r=e.length;r>i;i++)a=e[i],""!==a&&(n=a.indexOf("["),0!==n&&(-1==n?a="."+a:(s++,a="."+a.substring(0,n)+" || {})"+a.substring(n))),s++,o+=a+(r-1>i?" || {})":")"));return Array(s).join("(")+o},Y=/^([a-z]+:)?\/\//i,pt(ut,{ui:ut.ui||{},fx:ut.fx||m,effects:ut.effects||V,mobile:ut.mobile||{},data:ut.data||{},dataviz:ut.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:ut.support||kt,animate:ut.animate||v,ns:"",attr:function(e){return"data-"+ut.ns+e},wrap:a,deepExtend:o,getComputedStyles:u,size:p,toCamelCase:c,toHyphens:d,getOffset:ut.getOffset||f,parseEffects:ut.parseEffects||h,toggleClass:ut.toggleClass||k,directions:ut.directions||L,Observable:A,Class:n,Template:F,template:mt(F.compile,F),render:mt(F.render,F),stringify:mt(_t.stringify,_t),eventTarget:j,htmlEncode:b,isLocalUrl:function(e){return e&&!Y.test(e)},expr:function(e,t,n){return e=e||"",typeof t==Tt&&(n=t,t=!1),n=n||"d",e&&"["!==e.charAt(0)&&(e="."+e),e=t?G(e.split("."),n):n+e},getter:function(e,t){return Ht[e]=Ht[e]||Function("d","return "+ut.expr(e,t))},setter:function(e){return At[e]=At[e]||Function("d,value",ut.expr(e)+"=value")},accessor:function(e){return{get:ut.getter(e),set:ut.setter(e)}},guid:function(){var e,t,n="";for(e=0;32>e;e++)t=0|16*vt.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,"["+ut.attr("role")+"=$1],").slice(0,-1)},triggeredByInput:function(e){return/^(label|input|textarea|select)$/i.test(e.target.tagName)},logToConsole:function(e){var n=window.console;t!==n&&n.log&&n.log(e)}}),$=A.extend({init:function(e,t){var n=this;n.element=ut.jQuery(e).handler(n),A.fn.init.call(n),t=n.options=pt(!0,{},n.options,t),n.element.attr(ut.attr("role"))||n.element.attr(ut.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,a=i.events.length;a>r;r++)n=i.events[r],i.options[n]&&t[n]&&i.unbind(n,i.options[n]);e.extend(i.options,t),i.bind(i.events,t)},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 ut.dimensions(this.element)},size:function(e){return e?(this.setSize(e),t):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()}}),ut.dimensions=function(e,t){var n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}},ut.notify=gt,K=/template$/i,Q=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,J=/^\{(\d+)(:[^\}]+)?\}/,X=/([A-Z])/g,ut.initWidget=function(n,i,r){var a,o,s,l,d,c,u,p;if(r?r.roles&&(r=r.roles):r=ut.ui.roles,n=n.nodeType?n:n[0],c=n.getAttribute("data-"+ut.ns+"role"),c&&(s=-1===c.indexOf(".")?r[c]:ut.getter(c)(window))){for(p=y(n,"dataSource"),i=e.extend({},w(n,s.fn.options),i),p&&(i.dataSource=typeof p===Tt?ut.getter(p)(window):p),l=0,d=s.fn.events.length;d>l;l++)o=s.fn.events[l],u=y(n,o),u!==t&&(i[o]=ut.getter(u)(window));return a=e(n).data("kendo"+s.fn.options.prefix+s.fn.options.name),a?a.setOptions(i):a=new s(n,i),a}},ut.rolesFromNamespaces=function(e){var t,n,i=[];for(e[0]||(e=[ut.ui,ut.dataviz.ui]),t=0,n=e.length;n>t;t++)i[t]=e[t].roles;return pt.apply(null,[{}].concat(i.reverse()))},ut.init=function(t){var n=ut.rolesFromNamespaces(Mt.call(arguments,1));e(t).find("[data-"+ut.ns+"role]").addBack().each(function(){ut.initWidget(this,{},n)})},ut.destroy=function(t){e(t).find("[data-"+ut.ns+"role]").addBack().each(function(){var t=ut.widgetInstance(e(this));t&&t.destroy()})},ut.resize=function(t){var n,i=e(t).find("[data-"+ut.ns+"role]").addBack().filter(C);i.length&&(n=e.makeArray(i),n.sort(x),e.each(n,function(){var t=ut.widgetInstance(e(this)); t&&t.resize()}))},ut.parseOptions=w,pt(ut.ui,{Widget:$,roles:{},progress:function(t,n){var i,r,a,o,s=t.find(".k-loading-mask"),l=ut.support,d=l.browser;n?s.length||(i=l.isRtl(t),r=i?"right":"left",o=t.scrollLeft(),a=d.webkit?i?t[0].scrollWidth-t.width()-2*o:0:0,s=e("
Loading...
").width("100%").height("100%").css("top",t.scrollTop()).css(r,Math.abs(o)+a).prependTo(t)):s&&s.remove()},plugin:function(n,i,r){var a,o=n.fn.options.name;i=i||ut.ui,r=r||"",i[o]=n,i.roles[o.toLowerCase()]=n,a="getKendo"+r+o,o="kendo"+r+o,e.fn[o]=function(i){var r,a=this;return typeof i===Tt?(r=Mt.call(arguments,1),this.each(function(){var n,s,l=e.data(this,o);if(!l)throw Error(ut.format("Cannot call method '{0}' of {1} before it is initialized",i,o));if(n=l[i],typeof n!==Ct)throw Error(ut.format("Cannot find method '{0}' of {1}",i,o));return s=n.apply(l,r),s!==t?(a=s,!1):t})):this.each(function(){new n(this,i)}),a},e.fn[a]=function(){return this.data(o)}}}),Z={bind:function(){return this}},et=$.extend({init:function(e,t){$.fn.init.call(this,e,t),this.element.autoApplyNS(),this.wrapper=this.element,this.element.addClass("km-widget")},destroy:function(){$.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var e=this.element.closest(ut.roleSelector("view splitview modalview drawer"));return ut.widgetInstance(e,ut.mobile.ui)},container:function(){var e=this.element.closest(ut.roleSelector("view layout modalview drawer"));return ut.widgetInstance(e,ut.mobile.ui)||Z}}),pt(ut.mobile,{init:function(e){ut.init(e,ut.mobile.ui,ut.ui,ut.dataviz.ui)},ui:{Widget:et,roles:{},plugin:function(e){ut.ui.plugin(e,ut.mobile.ui,"Mobile")}}}),ut.touchScroller=function(t,n){return e(t).map(function(t,i){return i=e(i),kt.kineticScrollNeeded&&ut.mobile.ui.Scroller&&!i.data("kendoMobileScroller")?(i.kendoMobileScroller(n),i.data("kendoMobileScroller")):!1})[0]},ut.preventDefault=function(e){e.preventDefault()},ut.widgetInstance=function(e,t){var n,i,r,a,o,s=e.data(ut.ns+"role");if(s)for("content"===s&&(s="scroller"),n=t?[t.roles[s]]:[ut.ui.roles[s],ut.dataviz.ui.roles[s],ut.mobile.ui.roles[s]],s.indexOf(".")>=0&&(n=[ut.getter(s)(window)]),i=0,r=n.length;r>i;i++)if(a=n[i],a&&(o=e.data("kendo"+a.fn.options.prefix+a.fn.options.name)))return o},ut.onResize=function(t){var n=t;return kt.mobileOS.android&&(n=function(){setTimeout(t,600)}),e(window).on(kt.resize,n),n},ut.unbindResize=function(t){e(window).off(kt.resize,t)},ut.attrValue=function(e,t){return e.data(ut.ns+t)},ut.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 T(t,!isNaN(n)&&n>-1)}}),tt=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],nt="label, input, [data-rel=external]",it={setupMouseMute:function(){var t,n=0,i=tt.length,r=document.documentElement;if(!it.mouseTrap&&kt.eventCapture)for(it.mouseTrap=!0,it.bustClick=!1,it.captureMouse=!1,t=function(t){it.captureMouse&&("click"===t.type?it.bustClick&&!e(t.target).is(nt)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};i>n;n++)r.addEventListener(tt[n],t,!0)},muteMouse:function(e){it.captureMouse=!0,e.data.bustClick&&(it.bustClick=!0),clearTimeout(it.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(it.mouseTrapTimeoutID),it.mouseTrapTimeoutID=setTimeout(function(){it.captureMouse=!1,it.bustClick=!1},400)}},rt={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},kt.touch&&(kt.mobileOS.ios||kt.mobileOS.android)?rt={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:kt.pointers?rt={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:kt.msPointers&&(rt={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),!kt.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,a=t.relatedTarget,o=t.handleObj;return(!a||a!==r&&!e.contains(r,a))&&(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=n),i}}}),at=function(e){return rt[e]||e},ot=/([^ ]+)/g,ut.applyEventMap=function(e,t){return e=e.replace(ot,at),t&&(e=e.replace(ot,"$1."+t)),e},st=e.fn.on,pt(!0,D,e),D.fn=D.prototype=new e,D.fn.constructor=D,D.fn.init=function(t,n){return n&&n instanceof e&&!(n instanceof D)&&(n=D(n)),e.fn.init.call(this,t,n,lt)},D.fn.init.prototype=D.fn,lt=D(document),pt(D.fn,{handler:function(e){return this.data("handler",e),this},autoApplyNS:function(e){return this.data("kendoNS",e||ut.guid()),this},on:function(){var e,t,n,i,r,a,o=this,s=o.data("kendoNS");return 1===arguments.length?st.call(o,arguments[0]):(e=o,t=Mt.call(arguments),typeof t[t.length-1]===zt&&t.pop(),n=t[t.length-1],i=ut.applyEventMap(t[0],s),kt.mouseAndTouchPresent&&i.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(it.setupMouseMute(),r=2===t.length?null:t[1],a=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,st.call(this,{touchstart:it.muteMouse,touchend:it.unMuteMouse},r,{bustClick:a})),typeof n===Tt&&(e=o.data("handler"),n=e[n],t[t.length-1]=function(t){n.call(e,t)}),t[0]=i,st.apply(o,t),o)},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),ut.jQuery=D,ut.eventMap=rt,ut.timezone=function(){function e(e,t){var n,i,r,a=t[3],o=t[4],s=t[5],l=t[8];return l||(t[8]=l={}),l[e]?l[e]:(isNaN(o)?0===o.indexOf("last")?(n=new Date(Date.UTC(e,c[a]+1,1,s[0]-24,s[1],s[2],0)),i=u[o.substr(4,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r-(i>r?7:0))):o.indexOf(">=")>=0&&(n=new Date(Date.UTC(e,c[a],o.substr(5),s[0],s[1],s[2],0)),i=u[o.substr(0,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r+(r>i?7:0))):n=new Date(Date.UTC(e,c[a],o,s[0],s[1],s[2],0)),l[e]=n)}function t(t,n,i){var r,a,o;return(n=n[i])?(o=new Date(t).getUTCFullYear(),n=jQuery.grep(n,function(e){var t=e[0],n=e[1];return o>=t&&(n>=o||t==o&&"only"==n||"max"==n)}),n.push(t),n.sort(function(t,n){return"number"!=typeof t&&(t=Number(e(o,t))),"number"!=typeof n&&(n=Number(e(o,n))),t-n}),n[jQuery.inArray(t,n)-1]):(r=i.split(":"),a=0,r.length>1&&(a=60*r[0]+Number(r[1])),[-1e6,"max","-","Jan",1,[0,0,0],a,"-"])}function n(e,t,n){var i,r,a,o=t[n];if("string"==typeof o&&(o=t[o]),!o)throw Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(i=o.length-1;i>=0&&(r=o[i][3],!(r&&e>r));i--);if(a=o[i+1],!a)throw Error('Timezone "'+n+'" not found on '+e+".");return a}function i(e,i,r,a){typeof e!=St&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var o=n(e,i,a);return{zone:o,rule:t(e,r,o[1])}}function r(e,t){var n,r,a;return"Etc/UTC"==t||"Etc/GMT"==t?0:(n=i(e,this.zones,this.rules,t),r=n.zone,a=n.rule,a?r[0]-a[6]:r[0])}function a(e,t){var n=i(e,this.zones,this.rules,t),r=n.zone,a=n.rule,o=r[2];return o.indexOf("/")>=0?o.split("/")[a&&a[6]?1:0]:o.indexOf("%s")>=0?o.replace("%s",a&&"-"!=a[7]?a[7]:""):o}function o(e,t,n){var i,r;return typeof t==Tt&&(t=this.offset(e,t)),typeof n==Tt&&(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:o,apply:s,remove:l,abbr:a,toLocalDate:d}}(),ut.date=function(){function e(e,t){return 0===t&&23===e.getHours()?(e.setHours(e.getHours()+2),!0):!1}function t(t,n,i){var r=t.getHours();i=i||1,n=(n-t.getDay()+7*i)%7,t.setDate(t.getDate()+n),e(t,r)}function n(e,n,i){return e=new Date(e),t(e,n,i),e}function i(e){return new Date(e.getFullYear(),e.getMonth(),1)}function r(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),n=i(e),r=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return r&&t.setHours(n.getHours()+r/60),t}function a(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function o(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function s(e){return e.getTime()-a(e)}function l(e,t,n){var i,r=s(t),a=s(n);return e&&r!=a?(t>=n&&(n+=g),i=s(e),r>i&&(i+=g),r>a&&(a+=g),i>=r&&a>=i):!0}function d(e,t,n){var i,r=t.getTime(),a=n.getTime();return r>=a&&(a+=g),i=e.getTime(),i>=r&&a>=i}function c(t,n){var i=t.getHours();return t=new Date(t),u(t,n*g),e(t,i),t}function u(e,t,n){var i,r=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-r,e.setTime(e.getTime()+i*m))}function p(){return a(new Date)}function f(e){return a(e).getTime()==p().getTime()}function h(e){var t=new Date(1980,1,1,0,0,0);return e&&t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}var m=6e4,g=864e5;return{adjustDST:e,dayOfWeek:n,setDayOfWeek:t,getDate:a,isInDateRange:d,isInTimeRange:l,isToday:f,nextDay:function(e){return c(e,1)},previousDay:function(e){return c(e,-1)},toUtcTime:o,MS_PER_DAY:g,MS_PER_MINUTE:m,setTime:u,addDays:c,today:p,toInvariantTime:h,firstDayOfMonth:i,lastDayOfMonth:r,getMilliseconds:s}}(),ut.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)},dt=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},ut.animationFrame=function(e){dt.call(window,e)},ct=[],ut.queueAnimation=function(e){ct[ct.length]=e,1===ct.length&&ut.runNextAnimation()},ut.runNextAnimation=function(){var e=ct.shift();ut.animationFrame(function(){e(),dt[0]&&ut.runNextAnimation()})},ut.parseQueryStringParams=function(e){for(var t=e.split("?")[1]||"",n={},i=t.split(/&|=/),r=i.length,a=0;r>a;a+=2)""!==i[a]&&(n[decodeURIComponent(i[a])]=decodeURIComponent(i[a+1]));return n}}(jQuery),"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",a="back",o=i.support,s=window.location,l=window.history,d=50,c=/^#*/,u=window.document,p=i.Class.extend({init:function(e){this.root=e},navigate:function(e){return l.pushState({},u.title,t(e,this.root)),this.current()},current:function(){var e=s.pathname;return s.search&&(e+=s.search),n(this.root,e)},change:function(t){e(window).bind("popstate.kendo",t)},stop:function(){e(window).unbind("popstate.kendo")}}),f=i.Class.extend({navigate:function(e){return s.hash=e,e},change:function(t){o.hashChange?e(window).bind("hashchange.kendo",t):this._interval=setInterval(t,d)},stop:function(){e(window).unbind("popstate.kendo"),clearInterval(this._interval)},current:function(){return s.hash.replace(c,"")}}),h=i.Observable.extend({start:function(i){var d,h,m,g,v,_;if(i=i||{},this.bind([r,a],i),!this._started){if(this._started=!0,d=s.pathname,h=s.hash,m=o.pushState&&i.pushState,g=i.root||"/",v=g===d,this.adapter=m?new p(g):new f,i.pushState&&!o.pushState&&!v)return s.replace(g+"#"+n(g,d)),!0;m&&(g===d+"/"&&(_=g),v&&h&&(_=t(h.replace(c,""),g)),_&&l.replaceState({},u.title,_)),this.root=g,this.current=this.adapter.current(),this.locations=[this.current],this.adapter.change(e.proxy(this,"_checkUrl"))}},stop:function(){this._started&&(this.adapter.stop(),this.unbind(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 h}(window.kendo.jQuery),function(){function e(e,t){return t?e:"([^/]+)"}function t(t){return RegExp("^"+t.replace(f,"\\$&").replace(c,"(?:$1)?").replace(u,e).replace(p,"(.*?)")+"$")}function n(e){return e.replace(/(\?.*)|(#.*)/g,"")}var i=window.kendo,r=i.history,a=i.Observable,o="init",s="routeMissing",l="change",d="back",c=/\((.*?)\)/g,u=/(\(\?)?:\w+/g,p=/\*\w+/g,f=/[\-{}\[\]+?.,\\\^$|#\s]/g,h=i.Class.extend({init:function(e,n){e instanceof RegExp||(e=t(e)),this.route=e,this._callback=n},callback:function(e){var t,r,a=0,o=i.parseQueryStringParams(e);for(e=n(e),t=this.route.exec(e).slice(1),r=t.length;r>a;a++)void 0!==t[a]&&(t[a]=decodeURIComponent(t[a]));t.push(o),this._callback.apply(null,t)},worksWith:function(e){return this.route.test(n(e))?(this.callback(e),!0):!1}}),m=a.extend({init:function(e){a.fn.init.call(this),this.routes=[],this.pushState=e?e.pushState:!1,e&&e.root&&(this.root=e.root),this.bind([o,s,l],e)},destroy:function(){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(o,e)||t._urlChanged(e),this._urlChangedProxy=i,this._backProxy=n},route:function(e,t){this.routes.push(new h(e,t))},navigate:function(e,t){i.history.navigate(e,t)},_back:function(e){this.trigger(d,{url:e.url,to:e.to})&&e.preventDefault()},_urlChanged:function(e){var t,n,r,a,o=e.url;if(o||(o="/"),this.trigger(l,{url:e.url,params:i.parseQueryStringParams(e.url)}))return e.preventDefault(),void 0;for(n=0,r=this.routes,a=r.length;a>n;n++)if(t=r[n],t.worksWith(o))return;this.trigger(s,{url:o,params:i.parseQueryStringParams(o)})&&e.preventDefault()}});i.Router=m}(),function(e){var t=window.kendo,n=t.Observable,i="SCRIPT",r="init",a="show",o="hide",s=/unrecognized expression/,l=n.extend({init:function(e,t){var i=this;t=t||{},n.fn.init.call(i),i.content=e,i.tagName=t.tagName||"div",i.model=t.model,i._wrap=t.wrap!==!1,i.bind([r,a,o],t)},render:function(n){var i=this,o=!i.element;return o&&(i.element=i._createElement()),n&&e(n).append(i.element),o&&(t.bind(i.element,i.model),i.trigger(r)),n&&i.trigger(a),i.element},hide:function(){this.element.detach(),this.trigger(o)},destroy:function(){var e=this.element;e&&(t.unbind(e),t.destroy(e),e.remove())},_createElement:function(){var t,n,r=this;try{n=e(document.getElementById(r.content)||r.content)}catch(a){s.test(a.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 a(e){var t,n=[];for(t in e)n.push(t);return n}function o(e){for(var t in e)-1!=V.indexOf(t)&&-1==W.indexOf(t)&&delete e[t];return e}function s(e,t){var n,i,r,a,o=[],s={};for(i in t)n=i.toLowerCase(),a=z&&-1!=V.indexOf(n),!F.hasHW3D&&a&&-1==W.indexOf(n)?delete t[i]:(r=t[i],a?o.push(i+"("+r+")"):s[i]=r);return o.length&&(s[ot]=o.join(" ")),s}function l(e,t){var i,r,a;return z?(i=e.css(ot),i==$?"scale"==t?1:0:(r=i.match(RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),a=0,r?a=n(r[1]):(r=i.match(R)||[0,0,0,0,0],t=t.toLowerCase(),O.test(t)?a=parseFloat(r[3]/r[2]):"translatey"==t?a=parseFloat(r[4]/r[2]):"scale"==t?a=parseFloat(r[2]):"rotate"==t&&(a=parseFloat(Math.atan2(r[2],r[1])))),a)):parseFloat(e.css(t))}function d(e){return e.charAt(0).toUpperCase()+e.substring(1)}function c(e,t){var n=m.extend(t),i=n.prototype.directions;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,a){var o,s,l=this,d="out"===this._direction,c=l.element.data(n),u=!(isNaN(c)||c==i);o=u?c:t!==this._startValue?this._startValue:d?i:r,s=t!==this._endValue?this._endValue:d?r:i,this._reverse?(e[n]=s,a[n]=o):(e[n]=o,a[n]=s),l._shouldHide=a[n]===r}})}function p(e,t){var n=x.directions[t].vertical,i=e[n?J:Q]()/2+"px";return k[t].replace("$size",i)}var f,h,m,g,v,_,k,b,y,w,x=window.kendo,C=x.effects,T=e.each,S=e.extend,D=e.proxy,F=x.support,E=F.browser,z=F.transforms,H=F.transitions,A={scale:0,scalex:0,scaley:0,scale3d:0},M={translate:0,translatex:0,translatey:0,translate3d:0},I=t!==document.documentElement.style.zoom&&!z,R=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,N=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,O=/translatex?$/i,P=/(zoom|fade|expand)(\w+)/,B=/(zoom|fade|expand)/,L=/[xy]$/i,V=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],W=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],U={rotate:"deg",scale:"",skew:"px",translate:"px"},q=z.css,j=Math.round,G="",Y="px",$="none",K="auto",Q="width",J="height",X="hidden",Z="origin",et="abortId",tt="overflow",nt="translate",it="position",rt="completeCallback",at=q+"transition",ot=q+"transform",st=q+"backface-visibility",lt=q+"perspective",dt="1500px",ct="perspective("+dt+")",ut=F.mobileOS&&7==F.mobileOS.majorVersion,pt={left:{reverse:"right",property:"left",transition:"translatex",vertical:!1,modifier:-1},right:{reverse:"left",property:"left",transition:"translatex",vertical:!1,modifier:1},down:{reverse:"up",property:"top",transition:"translatey",vertical:!0,modifier:1},up:{reverse:"down",property:"top",transition:"translatey",vertical:!0,modifier:-1},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out",modifier:-1},out:{reverse:"in",modifier:1},vertical:{reverse:"vertical"},horizontal:{reverse:"horizontal"}};x.directions=pt,S(e.fn,{kendoStop:function(e,t){return H?C.stopQueue(this,e||!1,t||!1):this.stop(e,t)}}),z&&!H&&(T(W,function(n,i){e.fn[i]=function(n){if(t===n)return l(this,i);var r=e(this)[0],a=i+"("+n+U[i.replace(L,"")]+")";return-1==r.style.cssText.indexOf(ot)?e(this).css(ot,a):r.style.cssText=r.style.cssText.replace(RegExp(i+"\\(.*?\\)","i"),a),this},e.fx.step[i]=function(t){e(t.elem)[i](t.now)}}),f=e.fx.prototype.cur,e.fx.prototype.cur=function(){return-1!=W.indexOf(this.prop)?parseFloat(e(this.elem)[this.prop]()):f.apply(this,arguments)}),x.toggleClass=function(e,t,n,i){return t&&(t=t.split(" "),H&&(n=S({exclusive:"all",duration:400,ease:"ease-out"},n),e.css(at,n.exclusive+" "+n.duration+"ms "+n.ease),setTimeout(function(){e.css(at,"").css(J)},n.duration)),T(t,function(t,n){e.toggleClass(n,i)})),e},x.parseEffects=function(e,t){var n={};return"string"==typeof e?T(e.split(" "),function(e,i){var r=!B.test(i),a=i.replace(P,function(e,t,n){return t+":"+n.toLowerCase()}),o=a.split(":"),s=o[1],l={};o.length>1&&(l.direction=t&&r?pt[s].reverse:s),n[o[0]]=l}):T(e,function(e){var i=this.direction;i&&t&&!B.test(e)&&(this.direction=pt[i].reverse),n[e]=this}),n},H&&S(C,{transition:function(t,n,i){var r,o,l,d,c=0,u=t.data("keys")||[];i=S({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,d=function(){l||(l=!0,o&&(clearTimeout(o),o=null),t.removeData(et).dequeue().css(at,"").css(at),i.complete.call(t))},i.duration=e.fx?e.fx.speeds[i.duration]||i.duration:i.duration,r=s(t,n),e.merge(u,a(r)),t.data("keys",e.unique(u)).height(),t.css(at,i.exclusive+" "+i.duration+"ms "+i.ease).css(at),t.css(r).css(ot),H.event&&(t.one(H.event,d),0!==i.duration&&(c=500)),o=setTimeout(d,i.duration+c),t.data(et,o),t.data(rt,d)},stopQueue:function(e,t,n){var i,r=e.data("keys"),a=!n&&r,o=e.data(rt);return a&&(i=x.getComputedStyles(e[0],r)),o&&o(),a&&e.css(i),e.removeData("keys").stop(t)}}),h=x.Class.extend({init:function(e,t){var n=this;n.element=e,n.effects=[],n.options=t,n.restore=[]},run:function(t){var n,i,r,a,l,d,c,u=this,p=t.length,f=u.element,h=u.options,m=e.Deferred(),g={},v={};for(u.effects=t,m.then(e.proxy(u,"complete")),f.data("animating",!0),i=0;p>i;i++)for(n=t[i],n.setReverse(h.reverse),n.setOptions(h),u.addRestoreProperties(n.restore),n.prepare(g,v),l=n.children(),r=0,d=l.length;d>r;r++)l[r].duration(h.duration).run();for(c in h.effects)S(v,h.effects[c].properties);for(f.is(":visible")||S(g,{display:f.data("olddisplay")||"block"}),z&&!h.reset&&(a=f.data("targetTransform"),a&&(g=S(a,g))),g=s(f,g),z&&!H&&(g=o(g)),f.css(g).css(ot),i=0;p>i;i++)t[i].setup();return h.init&&h.init(),f.data("targetTransform",v),C.animate(f,v,S({},h,{complete:m.resolve})),m.promise()},stop:function(){e(this.element).kendoStop(!0,!0)},addRestoreProperties:function(e){for(var t,n=this.element,i=0,r=e.length;r>i;i++)t=e[i],this.restore.push(t),n.data(t)||n.data(t,n.css(t))},restoreCallback:function(){var e,t,n,i=this.element;for(e=0,t=this.restore.length;t>e;e++)n=this.restore[e],i.css(n,i.data(n))},complete:function(){var t=this,n=0,i=t.element,r=t.options,a=t.effects,o=a.length;for(i.removeData("animating").dequeue(),r.hide&&i.data("olddisplay",i.css("display")).hide(),this.restoreCallback(),I&&!z&&setTimeout(e.proxy(this,"restoreCallback"),0);o>n;n++)a[n].teardown();r.completeCallback&&r.completeCallback(i)}}),C.promise=function(e,t){var n,i,r,a=[],o=new h(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),a.push(i));a[0]?o.run(a):(e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.init&&t.init(),e.dequeue(),o.complete())},C.transitionPromise=function(e,t,n){return C.animateTo(e,t,n),e},S(C,{animate:function(n,r,a){var s=a.transition!==!1;delete a.transition,H&&"transition"in C&&s?C.transition(n,r,a):z?n.animate(o(r),{queue:!1,show:!1,hide:!1,duration:a.duration,complete:a.complete}):n.each(function(){var n=e(this),o={};T(V,function(e,a){var s,l,d,c,u,p,f,h=r?r[a]+" ":null;h&&(l=r,a in A&&r[a]!==t?(s=h.match(N),z&&S(l,{scale:+s[0]})):a in M&&r[a]!==t&&(d=n.css(it),c="absolute"==d||"fixed"==d,n.data(nt)||(c?n.data(nt,{top:i(n,"top")||0,left:i(n,"left")||0,bottom:i(n,"bottom"),right:i(n,"right")}):n.data(nt,{top:i(n,"marginTop")||0,left:i(n,"marginLeft")||0})),u=n.data(nt),s=h.match(N),s&&(p=a==nt+"y"?0:+s[1],f=a==nt+"y"?+s[1]:+s[2],c?(isNaN(u.right)?isNaN(p)||S(l,{left:u.left+p}):isNaN(p)||S(l,{right:u.right-p}),isNaN(u.bottom)?isNaN(f)||S(l,{top:u.top+f}):isNaN(f)||S(l,{bottom:u.bottom-f})):(isNaN(p)||S(l,{marginLeft:u.left+p}),isNaN(f)||S(l,{marginTop:u.top+f})))),!z&&"scale"!=a&&a in l&&delete l[a],l&&S(o,l))}),E.msie&&delete o.scale,n.animate(o,{queue:!1,show:!1,hide:!1,duration:a.duration,complete:a.complete})})},animateTo:function(t,n,i){function a(e){n[0].style.cssText="",t.each(function(){this.style.cssText=""}),F.mobileOS.android||d.css(tt,s),u||c.css(it,l),i.completeCallback&&i.completeCallback.call(t,e)}var o,s,l,d=t.parents().filter(n.parents()).first(),c=e().add(t.parent()).add(n.parent()),u="absolute"==t.css(it);u||(l=c.css(it),c.css(it,"absolute")),i=r(i),F.mobileOS.android||(s=d.css(tt),d.css(tt,"hidden")),e.each(i.effects,function(e,t){o=o||t.direction}),i.complete=E.msie?function(){setTimeout(a,0)}:a,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})}}),C.animatedPromise=C.promise,C.animatedTransitionPromise=C.transitionPromise,m=x.Class.extend({init:function(e,t){var n=this;n.element=e,n._direction=t,n.options={},n._additionalEffects=[],n.restore||(n.restore=[])},reverse:function(){return this._reverse=!0,this.run()},play:function(){return this._reverse=!1,this.run()},add:function(e){return this._additionalEffects.push(e),this},direction:function(e){return this._direction=e,this},duration:function(e){return this._duration=e,this},compositeRun:function(){var e=this,t=new h(e.element,{reverse:e._reverse,duration:e._duration}),n=e._additionalEffects.concat([e]);return t.run(n)},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n,i=this,r=i.element,a=0,l=i.restore,d=l.length,c=e.Deferred(),u={},p={},f=i.children(),h=f.length;for(c.then(e.proxy(i,"_complete")),r.data("animating",!0),a=0;d>a;a++)t=l[a],r.data(t)||r.data(t,r.css(t));for(a=0;h>a;a++)f[a].duration(i._duration).run();return i.prepare(u,p),r.is(":visible")||S(u,{display:r.data("olddisplay")||"block"}),z&&(n=r.data("targetTransform"),n&&(u=S(n,u))),u=s(r,u),z&&!H&&(u=o(u)),r.css(u).css(ot),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(),I&&!z&&setTimeout(e.proxy(t,"restoreCallback"),0),t.teardown()},setOptions:function(e){S(!0,this.options,e)},children:function(){return[]},shouldHide:e.noop,setup:e.noop,prepare:e.noop,teardown:e.noop,directions:[],setReverse:function(e){return this._reverse=e,this}}),g=["left","right","up","down"],v=["in","out"],c("slideIn",{directions:g,divisor:function(e){return this.options.divisor=e,this},prepare:function(e,t){var n,i=this,r=i.element,a=pt[i._direction],o=-a.modifier*(a.vertical?r.outerHeight():r.outerWidth()),s=o/(i.options&&i.options.divisor||1)+Y,l="0px";i._reverse&&(n=e,e=t,t=n),z?(e[a.transition]=s,t[a.transition]=l):(e[a.property]=s,t[a.property]=l)}}),c("tile",{directions:g,init:function(e,t,n){m.prototype.init.call(this,e,t),this.options={previous:n}},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,a=[x.fx(e.element).slideIn(r).setReverse(t)];return n&&a.push(x.fx(n).slideIn(pt[r].reverse).divisor(i).setReverse(!t)),a}}),u("fade","opacity",1,0),u("zoom","scale",1,.01),c("slideMargin",{prepare:function(e,t){var n,i=this,r=i.element,a=i.options,o=r.data(Z),s=a.offset,l=i._reverse;l||null!==o||r.data(Z,parseFloat(r.css("margin-"+a.axis))),n=r.data(Z)||0,t["margin-"+a.axis]=l?n:n+s}}),c("slideTo",{prepare:function(e,t){var n=this,i=n.element,r=n.options,a=r.offset.split(","),o=n._reverse;z?(t.translatex=o?0:a[0],t.translatey=o?0:a[1]):(t.left=o?0:a[0],t.top=o?0:a[1]),i.css("left")}}),c("expand",{directions:["horizontal","vertical"],restore:[tt],prepare:function(e,n){var i=this,r=i.element,a=i.options,o=i._reverse,s="vertical"===i._direction?J:Q,l=r[0].style[s],d=r.data(s),c=parseFloat(d||l),u=j(r.css(s,K)[s]());e.overflow=X,c=a&&a.reset?u||c:c||u,n[s]=(o?0:c)+Y,e[s]=(o?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?J:Q,i=t.data(n);(i==K||i===G)&&setTimeout(function(){t.css(n,K).css(n)},0)}}),_={position:"absolute",marginLeft:0,marginTop:0,scale:1},c("transfer",{init:function(e,t){this.element=e,this.options={target:t},this.restore=[]},setup:function(){this.element.appendTo(document.body)},prepare:function(e,t){var n,i,r,a,o,s,d,c,u,p,f,h,m,g=this,v=g.element,k=g.options,b=g._reverse,y=k.target,w=l(v,"scale"),x=y.offset(),C=y.outerHeight()/v.outerHeight();S(e,_),t.scale=1,v.css(ot,"scale(1)").css(ot),n=v.offset(),v.css(ot,"scale("+w+")"),i=0,r=0,a=x.left-n.left,o=x.top-n.top,s=i+v.outerWidth(),d=r,c=a+y.outerWidth(),u=o,p=(o-r)/(a-i),f=(u-d)/(c-s),h=(r-d-p*i+f*s)/(f-p),m=r+p*(h-i),e.top=n.top,e.left=n.left,e.transformOrigin=h+Y+" "+m+Y,b?e.scale=C:t.scale=C}}),k={top:"rect(auto auto $size auto)",bottom:"rect($size auto auto auto)",left:"rect(auto $size auto auto)",right:"rect(auto auto auto $size)"},b={top:{start:"rotatex(0deg)",end:"rotatex(180deg)"},bottom:{start:"rotatex(-180deg)",end:"rotatex(0deg)"},left:{start:"rotatey(0deg)",end:"rotatey(-180deg)"},right:{start:"rotatey(180deg)",end:"rotatey(0deg)"}},c("turningPage",{directions:g,init:function(e,t,n){m.prototype.init.call(this,e,t),this._container=n},prepare:function(e,t){var n=this,i=n._reverse,r=i?pt[n._direction].reverse:n._direction,a=b[r];e.zIndex=1,n._clipInHalf&&(e.clip=p(n._container,x.directions[r].reverse)),e[st]=X,t[ot]=ct+(i?a.start:a.end),e[ot]=ct+(i?a.end:a.start)},setup:function(){this._container.append(this.element)},face:function(e){return this._face=e,this},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},clipInHalf:function(e){return this._clipInHalf=e,this},temporary:function(){return this.element.addClass("temp-page"),this}}),c("staticPage",{directions:g,init:function(e,t,n){m.prototype.init.call(this,e,t),this._container=n},restore:["clip"],prepare:function(e,t){var n=this,i=n._reverse?pt[n._direction].reverse:n._direction;e.clip=p(n._container,i),e.opacity=.999,t.opacity=1},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},face:function(e){return this._face=e,this}}),c("pageturn",{directions:["horizontal","vertical"],init:function(e,t,n,i){m.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,n=t.options,i="horizontal"===t._direction?"left":"top",r=x.directions[i].reverse,a=t._reverse,o=n.face.clone(!0).removeAttr("id"),s=n.back.clone(!0).removeAttr("id"),l=t.element;return a&&(e=i,i=r,r=e),[x.fx(n.face).staticPage(i,l).face(!0).setReverse(a),x.fx(n.back).staticPage(r,l).setReverse(a),x.fx(o).turningPage(i,l).face(!0).clipInHalf(!0).temporary().setReverse(a),x.fx(s).turningPage(r,l).clipInHalf(!0).temporary().setReverse(a)]},prepare:function(e,t){e[lt]=dt,e.transformStyle="preserve-3d",e.opacity=.999,t.opacity=1},teardown:function(){this.element.find(".temp-page").remove()}}),c("flip",{directions:["horizontal","vertical"],init:function(e,t,n,i){m.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,n=t.options,i="horizontal"===t._direction?"left":"top",r=x.directions[i].reverse,a=t._reverse,o=t.element;return a&&(e=i,i=r,r=e),[x.fx(n.face).turningPage(i,o).face(!0).setReverse(a),x.fx(n.back).turningPage(r,o).setReverse(a)]},prepare:function(e){e[lt]=dt,e.transformStyle="preserve-3d"}}),y=x.Class.extend({init:function(){var e=this; e._tickProxy=D(e._tick,e),e._started=!1},tick:e.noop,done:e.noop,onEnd:e.noop,onCancel:e.noop,start:function(){this.done()||(this._started=!0,x.animationFrame(this._tickProxy))},cancel:function(){this._started=!1,this.onCancel()},_tick:function(){var e=this;e._started&&(e.tick(),e.done()?(e._started=!1,e.onEnd()):x.queueAnimation(e._tickProxy))}}),w=y.extend({init:function(e){var t=this;S(t,e),y.fn.init.call(t)},done:function(){return this.timePassed()>=this.duration},timePassed:function(){return Math.min(this.duration,new Date-this.startDate)},moveTo:function(e){var t=this,n=t.movable;t.initial=n[t.axis],t.delta=e.location-t.initial,t.duration="number"==typeof e.duration?e.duration:300,t.tick=t._easeProxy(e.ease),t.startDate=new Date,t.start()},_easeProxy:function(e){var t=this;return function(){t.movable.moveAxis(t.axis,e(t.timePassed(),t.initial,t.delta,t.duration))}}}),S(w,{easeOutExpo:function(e,t,n,i){return e==i?t+n:n*(-Math.pow(2,-10*e/i)+1)+t},easeOutBack:function(e,t,n,i,r){return r=1.70158,n*((e=e/i-1)*e*((r+1)*e+r)+1)+t}}),C.Animation=y,C.Transition=w,C.createEffect=c}(window.kendo.jQuery),function(e,t){function n(r){var o,s,l,d,c,u,p,f,h=[],m=r.logic||"and",g=r.filters;for(o=0,s=g.length;s>o;o++)r=g[o],l=r.field,p=r.value,u=r.operator,r.filters?r=n(r):(f=r.ignoreCase,l=l.replace(/\./g,"/"),r=a[u],r&&p!==t&&(d=e.type(p),"string"===d?(c="'{1}'",p=p.replace(/'/g,"''"),f===!0&&(l="tolower("+l+")")):c="date"===d?"datetime'{1:yyyy-MM-ddTHH:mm:ss}'":"{1}",r.length>3?"substringof"!==r?c="{0}({2},"+c+")":(c="{0}("+c+",{2})","doesnotcontain"===u&&(c+=" eq false")):c="{2} {0} "+c,r=i.format(c,r,p,l))),h.push(r);return r=h.join(" "+m+" "),h.length>1&&(r="("+r+")"),r}var i=window.kendo,r=e.extend,a={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith"},o={pageSize:e.noop,page:e.noop,filter:function(e,t){t&&(e.$filter=n(t))},sort:function(t,n){var i=e.map(n,function(e){var t=e.field.replace(/\./g,"/");return"desc"===e.dir&&(t+=" desc"),t}).join(",");i&&(t.$orderby=i)},skip:function(e,t){t&&(e.$skip=t)},take:function(e,t){t&&(e.$top=t)}},s={read:{dataType:"jsonp"}};r(!0,i.data,{schemas:{odata:{type:"json",data:function(e){return e.d.results||[e.d]},total:"d.__count"}},transports:{odata:{read:{cache:!0,dataType:"jsonp",jsonp:"$callback"},update:{cache:!0,dataType:"json",contentType:"application/json",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(e,t){var n,r,a,l;if(e=e||{},t=t||"read",l=(this.options||s)[t],l=l?l.dataType:"json","read"===t){n={$inlinecount:"allpages"},"json"!=l&&(n.$format="json");for(a in e)o[a]?o[a](n,e[a]):n[a]=e[a]}else{if("json"!==l)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(a in e)r=e[a],"number"==typeof r&&(e[a]=r+"");n=i.stringify(e)}}return n}}}})}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.isArray,r=e.isPlainObject,a=e.map,o=e.each,s=e.extend,l=n.getter,d=n.Class,c=d.extend({init:function(e){var t,l,d,c=this,u=e.total,p=e.model,f=e.parse,h=e.errors,m=e.serialize,g=e.data;p&&(r(p)&&(p.fields&&o(p.fields,function(e,t){t=r(t)&&t.field?s(t,{field:c.getter(t.field)}):{field:c.getter(t)},p.fields[e]=t}),t=p.id,t&&(l={},l[c.xpathToMember(t,!0)]={field:c.getter(t)},p.fields=s(l,p.fields),p.id=c.xpathToMember(t)),p=n.data.Model.define(p)),c.model=p),u&&("string"==typeof u?(u=c.getter(u),c.total=function(e){return parseInt(u(e),10)}):"function"==typeof u&&(c.total=u)),h&&("string"==typeof h?(h=c.getter(h),c.errors=function(e){return h(e)||null}):"function"==typeof h&&(c.errors=h)),g&&("string"==typeof g?(g=c.xpathToMember(g),c.data=function(e){var t,n=c.evaluate(e,g);return n=i(n)?n:[n],c.model&&p.fields?(t=new c.model,a(n,function(e){if(e){var n,i={};for(n in p.fields)i[n]=t._parse(n,p.fields[n].field(e));return i}})):n}):"function"==typeof g&&(c.data=g)),"function"==typeof f&&(d=c.parse,c.parse=function(e){var t=f.call(c,e);return d.call(c,t)}),"function"==typeof m&&(c.serialize=m)},total:function(e){return this.data(e).length},errors:function(e){return e?e.errors:null},serialize:function(e){return e},parseDOM:function(e){var n,r,a,o,s,l,d,c={},u=e.attributes,p=u.length;for(d=0;p>d;d++)l=u[d],c["@"+l.nodeName]=l.nodeValue;for(r=e.firstChild;r;r=r.nextSibling)a=r.nodeType,3===a||4===a?c["#text"]=r.nodeValue:1===a&&(n=this.parseDOM(r),o=r.nodeName,s=c[o],i(s)?s.push(n):s=s!==t?[s,n]:n,c[o]=s);return c},evaluate:function(e,t){for(var n,r,a,o,s,l=t.split(".");n=l.shift();)if(e=e[n],i(e)){for(r=[],t=l.join("."),s=0,a=e.length;a>s;s++)o=this.evaluate(e[s],t),o=i(o)?o:[o],r.push.apply(r,o);return r}return e},parse:function(t){var n,i,r={};return n=t.documentElement||e.parseXML(t).documentElement,i=this.parseDOM(n),r[n.nodeName]=i,r},xpathToMember:function(e,t){return e?(e=e.replace(/^\//,"").replace(/\//g,"."),e.indexOf("@")>=0?e.replace(/\.?(@.*)/,t?"$1":'["$1"]'):e.indexOf("text()")>=0?e.replace(/(\.?text\(\))/,t?"#text":'["#text"]'):e):""},getter:function(e){return l(this.xpathToMember(e),!0)}});e.extend(!0,n.data,{XmlDataReader:c,readers:{xml:c}})}(window.kendo.jQuery),function(e,t){function n(e,t,n,i){return function(r){var a,o={};for(a in r)o[a]=r[a];o.field=i?n+"."+r.field:n,t==vt&&e._notifyChange&&e._notifyChange(o),e.trigger(t,o)}}function i(t,n){if(t===n)return!0;var r,a=e.type(t),o=e.type(n);if(a!==o)return!1;if("date"===a)return t.getTime()===n.getTime();if("object"!==a&&"array"!==a)return!1;for(r in t)if(!i(t[r],n[r]))return!1;return!0}function r(e,t){var n,i;for(i in e){if(n=e[i],et(n)&&n.field&&n.field===t)return n;if(n===t)return n}return null}function a(e){this.data=e||[]}function o(e,n){if(e){var i=typeof e===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,a=e.filters;if(a)for(t=0,n=a.length;n>t;t++)i=a[t],r=i.operator,r&&typeof r===ut&&(i.operator=L[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 N(r,function(e){return{field:e.field,dir:e.dir||"asc",aggregates:e.aggregates}})}function u(e,t){return e&&e.getTime&&t&&t.getTime?e.getTime()===t.getTime():e===t}function p(e,t,n,i,r){var a,o,s,l,d;for(t=t||[],l=t.length,a=0;l>a;a++)o=t[a],s=o.aggregate,d=o.field,e[d]=e[d]||{},e[d][s]=V[s.toLowerCase()](e[d][s],n,st.accessor(d),i,r)}function f(e){return"number"==typeof e&&!isNaN(e)}function h(e){var t,n=e.length,i=Array(n);for(t=0;n>t;t++)i[t]=e[t].toJSON();return i}function m(e,t){t=t||{};var n=new a(e),i=t.aggregate,r=t.filter;return r&&(n=n.filter(r)),n.aggregate(i)}function g(e,t,n,i,r){var a,o,s,l,d;for(l=0,d=e.length;d>l;l++){a=e[l];for(o in t)s=r[o],s&&s!==o&&(a[s]=t[o](a),delete a[o])}}function v(e,t,n,i,r){var a,o,s,l,d;for(l=0,d=e.length;d>l;l++){a=e[l];for(o in t)a[o]=n._parse(o,t[o](a)),s=r[o],s&&s!==o&&delete a[s]}}function _(e,t,n,i,r){var a,o,s,l;for(o=0,l=e.length;l>o;o++)a=e[o],s=i[a.field],s&&s!=a.field&&(a.field=s),a.value=n._parse(a.field,a.value),a.hasSubgroups?_(a.items,t,n,i,r):v(a.items,t,n,i,r)}function k(e,t,n,i,r,a){return function(o){return o=e(o),o&&!tt(i)&&("[object Array]"===Nt.call(o)||o instanceof Vt||(o=[o]),n(o,i,new t,r,a)),o||[]}}function b(e,t,n,i){for(var r,a,o,s=0;t.length&&i&&(r=t[s],a=r.items,o=a.length,e&&e.field===r.field&&e.value===r.value?(e.hasSubgroups&&e.items.length?b(e.items[e.items.length-1],r.items,n,i):(a=a.slice(n,n+i),e.items=e.items.concat(a)),t.splice(s--,1)):r.hasSubgroups&&a.length?b(r,a,n,i):(a=a.slice(n,n+i),r.items=a,r.items.length||t.splice(s--,1)),0===a.length?n-=o:(n=0,i-=a.length),!(++s>=t.length)););st;t++)i=e[t].hasSubgroups?i.concat(y(e[t].items)):i.concat(e[t].items.slice());return i}function w(e,t){var n,i,r,a;if(t)for(n=0,i=e.length;i>n;n++)r=e[n],a=r.items,r.hasSubgroups?w(a,t):!a.length||a[0]instanceof t||(a.type=t,a.wrapAll(a,a))}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,a;for(r=e.length-1,a=0;r>=a;r--)i=e[r],n={value:t.get(i.field),field:i.field,items:n?[n]:[t],hasSubgroups:!!n,aggregates:{}};return n}function S(e,t){return t?F(e,function(e){return e[t.idField]===t.id}):-1}function D(e,t){return t?F(e,function(e){return e.uid==t.uid}):-1}function F(e,t){var n,i;for(n=0,i=e.length;i>n;n++)if(t(e[n]))return n;return-1}function E(e,t){var n,i;return e&&!tt(e)?(n=e[t],i=et(n)?n.from||n.field||t:e[t]||t,lt(i)?t:i):t}function z(e,t){var n,i,r,a={};for(r in e)"filters"!==r&&(a[r]=e[r]);if(e.filters)for(a.filters=[],n=0,i=e.filters.length;i>n;n++)a.filters[n]=z(e.filters[n],t);else a.field=E(t.fields,a.field);return a}function H(e,t){var n,i,r,a,o,s=[];for(n=0,i=e.length;i>n;n++){r={},a=e[n];for(o in a)r[o]=a[o];r.field=E(t.fields,r.field),r.aggregates&&nt(r.aggregates)&&(r.aggregates=H(r.aggregates,t)),s.push(r)}return s}function A(t,n){var i,r,a,o,s,l=e(t)[0].children,d=[],c=n[0],u=n[1];for(i=0,r=l.length;r>i;i++)a={},s=l[i],s.disabled||(a[c.field]=s.text,o=s.attributes.value,o=o&&o.specified?s.value:s.text,a[u.field]=o,d.push(a));return d}function M(t,n){var i,r,a,o,s,l,d,c=e(t)[0].tBodies[0],u=c?c.rows:[],p=n.length,f=[];for(i=0,r=u.length;r>i;i++){for(s={},d=!0,o=u[i].cells,a=0;p>a;a++)l=o[a],"th"!==l.nodeName.toLowerCase()&&(d=!1,s[n[a].field]=l.innerHTML);d||f.push(s)}return f}function I(e){return function(){var t=this._data,n=G.fn[e].apply(this,It.call(arguments));return this._data!=t&&this._attachBubbleHandlers(),n}}function R(t,n){function i(e,t){return e.filter(t).add(e.find(t))}var r,a,o,s,l,d,c,u,p=e(t).children(),f=[],h=n[0].field,m=n[1]&&n[1].field,g=n[2]&&n[2].field,v=n[3]&&n[3].field;for(r=0,a=p.length;a>r;r++)o={_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&&(o.id=l),d&&(o[h]=3==d.nodeType?d.nodeValue:u.text()),m&&(o[m]=i(u,"a").attr("href")),v&&(o[v]=i(u,"img").attr("src")),g&&(c=i(u,".k-sprite").prop("className"),o[g]=c&&e.trim(c.replace("k-sprite",""))),t.length&&(o.items=R(t.eq(0),n)),"true"==s.attr("data-hasChildren")&&(o.hasChildren=!0),f.push(o);return f}var N,O,P,B,L,V,W,U,q,j,G,Y,$,K,Q,J,X=e.extend,Z=e.proxy,et=e.isPlainObject,tt=e.isEmptyObject,nt=e.isArray,it=e.grep,rt=e.ajax,at=e.each,ot=e.noop,st=window.kendo,lt=st.isFunction,dt=st.Observable,ct=st.Class,ut="string",pt="function",ft="create",ht="read",mt="update",gt="destroy",vt="change",_t="sync",kt="get",bt="error",yt="requestStart",wt="progress",xt="requestEnd",Ct=[ft,ht,mt,gt],Tt=function(e){return e},St=st.getter,Dt=st.stringify,Ft=Math,Et=[].push,zt=[].join,Ht=[].pop,At=[].splice,Mt=[].shift,It=[].slice,Rt=[].unshift,Nt={}.toString,Ot=st.support.stableSort,Pt=/^\/Date\((.*?)\)\/$/,Bt=/(\r+|\n+)/g,Lt=/(?=['\\])/g,Vt=dt.extend({init:function(e,t){var n=this;n.type=t||Wt,dt.fn.init.call(n),n.length=e.length,n.wrapAll(e,n)},toJSON:function(){var e,t,n=this.length,i=Array(n);for(e=0;n>e;e++)t=this[e],t instanceof Wt&&(t=t.toJSON()),i[e]=t;return i},parent:ot,wrapAll:function(e,t){var n,i,r=this,a=function(){return r};for(t=t||[],n=0,i=e.length;i>n;n++)t[n]=r.wrap(e[n],a);return t},wrap:function(e,t){var n,i=this;return null!==e&&"[object Object]"===Nt.call(e)&&(n=e instanceof i.type||e instanceof jt,n||(e=e instanceof Wt?e.toJSON():e,e=new i.type(e)),e.parent=t,e.bind(vt,function(e){i.trigger(vt,{field:e.field,node:e.node,index:e.index,items:e.items||[this],action:e.node?e.action||"itemchange":"itemchange"})})),e},push:function(){var e,t=this.length,n=this.wrapAll(arguments);return e=Et.apply(this,n),this.trigger(vt,{action:"add",index:t,items:n}),e},slice:It,join:zt,pop:function(){var e=this.length,t=Ht.apply(this);return e&&this.trigger(vt,{action:"remove",index:e-1,items:[t]}),t},splice:function(e,t,n){var i,r,a,o=this.wrapAll(It.call(arguments,2));if(i=At.apply(this,[e,t].concat(o)),i.length)for(this.trigger(vt,{action:"remove",index:e,items:i}),r=0,a=i.length;a>r;r++)i[r].children&&i[r].unbind(vt);return n&&this.trigger(vt,{action:"add",index:e,items:o}),i},shift:function(){var e=this.length,t=Mt.apply(this);return e&&this.trigger(vt,{action:"remove",index:0,items:[t]}),t},unshift:function(){var e,t=this.wrapAll(arguments);return e=Rt.apply(this,t),this.trigger(vt,{action:"add",index:0,items:t}),e},indexOf:function(e){var t,n,i=this;for(t=0,n=i.length;n>t;t++)if(i[t]===e)return t;return-1},forEach:function(e){for(var t=0,n=this.length;n>t;t++)e(this[t],t,this)},map:function(e){for(var t=0,n=[],i=this.length;i>t;t++)n[t]=e(this[t],t,this);return n},filter:function(e){for(var t,n=0,i=[],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)}}),Wt=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 Wt||e instanceof Vt)&&(e=e.toJSON()),n[t]=e);return n},get:function(e){var t,n=this;return n.trigger(kt,{field:e}),t="this"===e?n:st.getter(e,!0)(n)},_set:function(e,t){var n,i,r,a=this,o=e.indexOf(".")>=0;if(o)for(n=e.split("."),i="";n.length>1;){if(i+=n.shift(),r=st.getter(i,!0)(a),r instanceof Wt)return r.set(n.join("."),t),o;i+="."}return st.setter(e)(a,t),o},set:function(e,t){var n=this,i=st.getter(e,!0)(n);i!==t&&(n.trigger("set",{field:e,value:t})||(!n._set(e,n.wrap(t,e,function(){return n}))||e.indexOf("(")>=0||e.indexOf("[")>=0)&&n.trigger(vt,{field:e}))},parent:ot,wrap:function(e,t,i){var r,a,o=this,s=Nt.call(e);return null==e||"[object Object]"!==s&&"[object Array]"!==s||(r=e instanceof Vt,a=e instanceof G,"[object Object]"!==s||a||r?("[object Array]"===s||r||a)&&(r||a||(e=new Vt(e)),e.parent()!=i()&&e.bind(vt,n(o,vt,t,!1))):(e instanceof Wt||(e=new Wt(e)),e.parent()!=i()&&(e.bind(kt,n(o,kt,t,!0)),e.bind(vt,n(o,vt,t,!0)))),e.parent=i),e}}),Ut={number:function(e){return st.parseFloat(e)},date:function(e){return st.parseDate(e)},"boolean":function(e){return typeof e===ut?"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return null!=e?e+"":e},"default":function(e){return e}},qt={string:"",number:0,date:new Date,"boolean":!1,"default":""},jt=Wt.extend({init:function(n){var i=this;(!n||e.isEmptyObject(n))&&(n=e.extend({},i.defaults,n)),Wt.fn.init.call(i,n),i.dirty=!1,i.idField&&(i.id=i.get(i.idField),i.id===t&&(i.id=i._defaultId))},shouldSerialize:function(e){return Wt.fn.shouldSerialize.call(this,e)&&"uid"!==e&&!("id"!==this.idField&&"id"===e)&&"dirty"!==e&&"_accessors"!==e},_parse:function(e,t){var n,i=this,a=e,o=i.fields||{};return e=o[e],e||(e=r(o,a)),e&&(n=e.parse,!n&&e.type&&(n=Ut[e.type.toLowerCase()])),n?n(t):t},_notifyChange:function(e){var t=e.action;("add"==t||"remove"==t)&&(this.dirty=!0)},editable:function(e){return e=(this.fields||{})[e],e?e.editable!==!1:!0},set:function(e,t,n){var r=this;r.editable(e)&&(t=r._parse(e,t),i(t,r.get(e))||(r.dirty=!0,Wt.fn.set.call(r,e,t,n)))},accept:function(e){var t,n,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}});jt.define=function(e,n){n===t&&(n=e,e=jt);var i,r,a,o,s,l,d,c,u=X({defaults:{}},n),p={},f=u.id;if(f&&(u.idField=f),u.id&&delete u.id,f&&(u.defaults[f]=u._defaultId=""),"[object Array]"===Nt.call(u.fields)){for(l=0,d=u.fields.length;d>l;l++)a=u.fields[l],typeof a===ut?p[a]={}:a.field&&(p[a.field]=a);u.fields=p}for(r in u.fields)a=u.fields[r],o=a.type||"default",s=null,c=r,r=typeof a.field===ut?a.field:r,a.nullable||(s=u.defaults[c!==r?c:r]=a.defaultValue!==t?a.defaultValue:qt[o.toLowerCase()]),n.id===r&&(u._defaultId=s),u.defaults[c!==r?c:r]=s,a.parse=a.parse||Ut[o];return i=e.extend(u),i.define=function(e){return jt.define(i,e)},u.fields&&(i.fields=u.fields,i.idField=u.idField),i},O={selector:function(e){return lt(e)?e:St(e)},compare:function(e){var t=this.selector(e);return function(e,n){return e=t(e),n=t(n),null==e&&null==n?0:null==e?-1:null==n?1:e.localeCompare?e.localeCompare(n):e>n?1:n>e?-1:0}},create:function(e){var t=e.compare||this.compare(e.field);return"desc"==e.dir?function(e,n){return t(n,e,!0)}:t},combine:function(e){return function(t,n){var i,r,a=e[0](t,n);for(i=1,r=e.length;r>i;i++)a=a||e[i](t,n);return a}}},P=X({},O,{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)}}),N=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},B=function(){function e(e){return e.replace(Lt,"\\").replace(Bt,"")}function t(t,n,i,r){var a;return null!=i&&(typeof i===ut&&(i=e(i),a=Pt.exec(i),a?i=new Date(+a[1]):r?(i="'"+i.toLowerCase()+"'",n="("+n+" || '').toLowerCase()"):i="'"+i+"'"),i.getTime&&(n="("+n+"?"+n+".getTime():"+n+")",i=i.getTime())),n+" "+t+" "+i}return{eq:function(e,n,i){return t("==",e,n,i)},neq:function(e,n,i){return t("!=",e,n,i)},gt:function(e,n,i){return t(">",e,n,i)},gte:function(e,n,i){return t(">=",e,n,i)},lt:function(e,n,i){return t("<",e,n,i)},lte:function(e,n,i){return t("<=",e,n,i)},startswith:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".lastIndexOf('"+n+"', 0) == 0"},endswith:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".indexOf('"+n+"', "+t+".length - "+(n||"").length+") >= 0"},contains:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".indexOf('"+n+"') >= 0"},doesnotcontain:function(t,n,i){return i&&(t="("+t+" || '').toLowerCase()",n&&(n=n.toLowerCase())),n&&(n=e(n)),t+".indexOf('"+n+"') == -1"}}}(),a.filterExpr=function(e){var n,i,r,o,s,l,d=[],c={and:" && ",or:" || "},u=[],p=[],f=e.filters;for(n=0,i=f.length;i>n;n++)r=f[n],s=r.field,l=r.operator,r.filters?(o=a.filterExpr(r),r=o.expression.replace(/__o\[(\d+)\]/g,function(e,t){return t=+t,"__o["+(p.length+t)+"]"}).replace(/__f\[(\d+)\]/g,function(e,t){return t=+t,"__f["+(u.length+t)+"]"}),p.push.apply(p,o.operators),u.push.apply(u,o.fields)):(typeof s===pt?(o="__f["+u.length+"](d)",u.push(s)):o=st.expr(s),typeof l===pt?(r="__o["+p.length+"]("+o+", "+r.value+")",p.push(l)):r=B[(l||"eq").toLowerCase()](o,r.value,r.ignoreCase!==t?r.ignoreCase:!0)),d.push(r);return{expression:"("+d.join(c[e.logic])+")",fields:u,operators:p}},L={"==":"eq",equals:"eq",isequalto:"eq",equalto:"eq",equal:"eq","!=":"neq",ne:"neq",notequals:"neq",isnotequalto:"neq",notequalto:"neq",notequal:"neq","<":"lt",islessthan:"lt",lessthan:"lt",less:"lt","<=":"lte",le:"lte",islessthanorequalto:"lte",lessthanequal:"lte",">":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain"},a.normalizeFilter=l,a.prototype={toArray:function(){return this.data},range:function(e,t){return new a(this.data.slice(e,e+t))},skip:function(e){return new a(this.data.slice(e))},take:function(e){return new a(this.data.slice(0,e))},select:function(e){return new a(N(this.data,e))},order:function(e,t){var n={dir:t};return e&&(e.compare?n.compare=e.compare:n.field=e),new a(this.data.slice(0).sort(O.create(n)))},orderBy:function(e){return this.order(e,"asc")},orderByDescending:function(e){return this.order(e,"desc")},sort:function(e,t,n){var i,r,a=o(e,t),s=[];if(n=n||O,a.length){for(i=0,r=a.length;r>i;i++)s.push(n.create(a[i]));return this.orderBy({compare:n.combine(s)})}return this},filter:function(e){var t,n,i,r,o,s,d,c,u=this.data,p=[];if(e=l(e),!e||0===e.filters.length)return this;for(r=a.filterExpr(e),s=r.fields,d=r.operators,o=c=Function("d, __f, __o","return "+r.expression),(s.length||d.length)&&(c=function(e){return o(e,s,d)}),t=0,i=u.length;i>t;t++)n=u[t],c(n)&&p.push(n);return new a(p)},group:function(e,t){e=c(e||[]),t=t||this.data;var n,i=this,r=new a(i.data);return e.length>0&&(n=e[0],r=r.groupBy(n).select(function(i){var r=new a(t).filter([{field:i.field,operator:"eq",value:i.value,ignoreCase:!1}]);return{field:i.field,value:i.value,items:e.length>1?new a(i.items).group(e.slice(1),r.toArray()).toArray():i.items,hasSubgroups:e.length>1,aggregates:r.aggregate(n.aggregates)}})),r},groupBy:function(e){if(tt(e)||!this.data.length)return new a([]);var t,n,i,r,o=e.field,s=this._sortForGrouping(o,e.dir||"asc"),l=st.accessor(o),d=l.get(s[0],o),c={field:o,value:d,items:[]},p=[c];for(i=0,r=s.length;r>i;i++)t=s[i],n=l.get(t,o),u(d,n)||(d=n,c={field:o,value:d,items:[]},p.push(c)),c.items.push(t);return new a(p)},_sortForGrouping:function(e,t){var n,i,r=this.data;if(!Ot){for(n=0,i=r.length;i>n;n++)r[n].__position=n;for(r=new a(r).sort(e,t,P).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}},V={sum:function(e,t,n){return(e||0)+n.get(t)},count:function(e){return(e||0)+1},average:function(e,t,n,i,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 f(e)||(e=i),e>i&&f(i)&&(e=i),e}},a.process=function(e,n){n=n||{};var i,r=new a(e),s=n.group,l=c(s||[]).concat(o(n.sort||[])),d=n.filter,u=n.skip,p=n.take;return d&&(r=r.filter(d),i=r.toArray().length),l&&(r=r.sort(l),s&&(e=r.toArray())),u!==t&&p!==t&&(r=r.range(u,p)),s&&(r=r.group(s,e)),{total:i,data:r.toArray()}},W=ct.extend({init:function(e){this.data=e.data},read:function(e){e.success(this.data)},update:function(e){e.success(e.data)},create:function(e){e.success(e.data)},destroy:function(e){e.success(e.data)}}),U=ct.extend({init:function(e){var t,n=this;e=n.options=X({},n.options,e),at(Ct,function(t,n){typeof e[n]===ut&&(e[n]={url:e[n]})}),n.cache=e.cache?q.create(e.cache):{find:ot,add:ot},t=e.parameterMap,n.parameterMap=lt(t)?t:function(e){var n={};return at(e,function(e,i){e in t&&(e=t[e],et(e)&&(i=e.value(i),e=e.key)),n[e]=i}),n}},options:{parameterMap:Tt},create:function(e){return rt(this.setup(e,ft))},read:function(n){var i,r,a,o=this,s=o.cache;n=o.setup(n,ht),i=n.success||ot,r=n.error||ot,a=s.find(n.data),a!==t?i(a):(n.success=function(e){s.add(n.data,e),i(e)},e.ajax(n))},update:function(e){return rt(this.setup(e,mt))},destroy:function(e){return rt(this.setup(e,gt))},setup:function(e,t){e=e||{};var n,i=this,r=i.options[t],a=lt(r.data)?r.data(e.data):r.data;return e=X(!0,{},r,e),n=X(!0,{},a,e.data),e.data=i.parameterMap(n,t),lt(e.url)&&(e.url=e.url(n)),e}}),q=ct.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[Dt(e)]=n)},find:function(e){return this._store[Dt(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[Dt(e)]}}),q.create=function(e){var t={inmemory:function(){return new q}};return et(e)&<(e.find)?e:e===!0?new q:t[e]()},j=ct.extend({init:function(e){var t,n,i,r,a,o,s,l,d,c,u,p,f,h=this;e=e||{};for(t in e)n=e[t],h[t]=typeof n===ut?St(n):n;r=e.modelBase||jt,et(h.model)&&(h.model=i=r.define(h.model)),h.model&&(o=Z(h.data,h),s=Z(h.groups,h),l=Z(h.serialize,h),d={},c={},u={},p={},f=!1,i=h.model,i.fields&&(at(i.fields,function(e,t){var n;a=e,et(t)&&t.field?a=t.field:typeof t===ut&&(a=t),et(t)&&t.from&&(n=t.from),f=f||n&&n!==e||a!==e,c[e]=St(n||a),u[e]=St(e),d[n||a]=e,p[e]=n||a}),!e.serialize&&f&&(h.serialize=k(l,i,g,u,d,p))),h.data=k(o,i,v,c,d,p),h.groups=k(s,i,_,c,d,p))},errors:function(e){return e?e.errors:null},parse:Tt,data:Tt,total:function(e){return e.length},groups:Tt,aggregates:function(){return{}},serialize:function(e){return e}}),G=dt.extend({init:function(e){var n,i,r=this;e&&(i=e.data),e=r.options=X({},r.options,e),r._map={},r._prefetch={},r._data=[],r._pristineData=[],r._ranges=[],r._view=[],r._pristine=[],r._destroyed=[],r._pageSize=e.pageSize,r._page=e.page||(e.pageSize?1:t),r._sort=o(e.sort),r._filter=l(e.filter),r._group=c(e.group),r._aggregate=e.aggregate,r._total=e.total,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([bt,vt,yt,_t,xt,wt],e)},options:{data:[],schema:{modelBase:jt},serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,batch:!1},_isServerGrouped:function(){var e=this.group()||[];return this.options.serverGrouping&&e.length},_flatData:function(e){return this._isServerGrouped()?y(e):e},parent:ot,get:function(e){var t,n,i=this._flatData(this._data);for(t=0,n=i.length;n>t;t++)if(i[t].id==e)return i[t]},getByUid:function(e){var t,n,i=this._flatData(this._data);if(i)for(t=0,n=i.length;n>t;t++)if(i[t].uid==e)return i[t]},indexOf:function(e){return D(this._data,e)},at:function(e){return this._data[e]},data:function(e){var n=this;return e===t?n._data:(n._data=this._observe(e),n._ranges=[],n._addRange(n._data),n._total=n._data.length,n._process(n._data),t)},view:function(){return this._view},add:function(e){return this.insert(this._data.length,e)},_createNewModel:function(e){return this.reader.model?new this.reader.model(e):new Wt(e)},insert:function(e,t){return t||(t=e,e=0),t instanceof jt||(t=this._createNewModel(t)),this._isServerGrouped()?this._data.splice(e,0,T(this.group(),t)):this._data.splice(e,0,t),t},remove:function(e){var n,i=this,r=i._isServerGrouped();return this._eachItem(i._data,function(a){return n=C(a,e),n&&r?(n.isNew&&n.isNew()||i._destroyed.push(n),!0):t}),e},sync:function(){var t,n,i,r=this,a=[],o=[],s=r._destroyed,l=r._flatData(r._data);if(r.reader.model){for(t=0,n=l.length;n>t;t++)l[t].isNew()?a.push(l[t]):l[t].dirty&&o.push(l[t]);i=r._send("create",a),i.push.apply(i,r._send("update",o)),i.push.apply(i,r._send("destroy",s)),e.when.apply(null,i).then(function(){var e,t;for(e=0,t=arguments.length;t>e;e++)r._accept(arguments[e]);r._change({action:"sync"}),r.trigger(_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,a=t.response,o=0,s=i._isServerGrouped(),l=i._pristineData,d=t.type;if(i.trigger(xt,{response:a,type:d}),a&&!tt(a)){if(a=i.reader.parse(a),i._handleCustomErrors(a))return;a=i.reader.data(a),e.isArray(a)||(a=[a])}else a=e.map(r,function(e){return e.toJSON()});for("destroy"===d&&(i._destroyed=[]),o=0,n=r.length;n>o;o++)"destroy"!==d?(r[o].accept(a[o]),"create"===d?l.push(s?T(i.group(),r[o]):a[o]):"update"===d&&i._updatePristineForModel(r[o],a[o])):i._removePristineForModel(r[o])},_updatePristineForModel:function(e,t){this._executeOnPristineForModel(e,function(e,n){st.deepExtend(n[e],t)})},_executeOnPristineForModel:function(e,n){this._eachPristineItem(function(i){var r=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,a=r.transport;return e.Deferred(function(e){r.trigger(yt,{type:i}),a[i].call(a,X({success:function(t){e.resolve({response:t,models:n,type:i})},error:function(t,n,i){e.reject(t),r.error(t,n,i)}},t))}).promise()},_send:function(e,t){var n,i,r=this,a=[],o=r.reader.serialize(h(t));if(r.options.batch)t.length&&a.push(r._promise({data:{models:o}},t,e));else for(n=0,i=t.length;i>n;n++)a.push(r._promise({data:o[n]},[t[n]],e));return a},read:function(e){var t=this,n=t._params(e);t._queueRequest(n,function(){t.trigger(yt,{type:"read"})?t._dequeueRequest():(t.trigger(wt),t._ranges=[],t.transport.read({data:n,success:Z(t.success,t),error:Z(t.error,t)}))})},success:function(n){var i=this,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(bt,{xhr:e,status:t,errorThrown:n})},_params:function(e){var t=this,n=X({take:t.take(),skip:t.skip(),page:t.page(),pageSize:t.pageSize(),sort:t._sort,filter:t._filter,group:t._group,aggregate:t._aggregate},e);return t.options.serverPaging||(delete n.take,delete n.skip,delete n.page,delete n.pageSize),t.options.serverGrouping?t.reader.model&&n.group&&(n.group=H(n.group,t.reader.model)):delete n.group,t.options.serverFiltering?t.reader.model&&n.filter&&(n.filter=z(n.filter,t.reader.model)):delete n.filter,t.options.serverSorting?t.reader.model&&n.sort&&(n.sort=H(n.sort,t.reader.model)):delete n.sort,t.options.serverAggregates?t.reader.model&&n.aggregate&&(n.aggregate=H(n.aggregate,t.reader.model)):delete n.aggregate,n},_queueRequest:function(e,n){var i=this;i._requestInProgress?i._pending={callback:Z(n,i),options:e}:(i._requestInProgress=!0,i._pending=t,n())},_dequeueRequest:function(){var e=this;e._requestInProgress=!1,e._pending&&e._queueRequest(e._pending.options,e._pending.callback)},_handleCustomErrors:function(e){if(this.reader.errors){var t=this.reader.errors(e);if(t)return this.trigger(bt,{xhr:null,status:"customerror",errorThrown:"custom error",errors:t}),!0}return!1},_observe:function(e){var t=this,n=t.reader.model,i=!1;return n&&e.length&&(i=!(e[0]instanceof n)),e instanceof Vt?i&&(e.type=t.reader.model,e.wrapAll(e,e)):(e=new Vt(e,t.reader.model),e.parent=function(){return t.parent()}),t._isServerGrouped()&&w(e,n),t._changeHandler&&t._data&&t._data instanceof Vt?t._data.unbind(vt,t._changeHandler):t._changeHandler=Z(t._change,t),e.bind(vt,t._changeHandler)},_change:function(e){var t,n,i,r=this,a=e?e.action:""; if("remove"===a)for(t=0,n=e.items.length;n>t;t++)e.items[t].isNew&&e.items[t].isNew()||r._destroyed.push(e.items[t]);!r.options.autoSync||"add"!==a&&"remove"!==a&&"itemchange"!==a?(i=parseInt(r._total||r.reader.total(r._pristine),10),"add"===a?i+=e.items.length:"remove"===a?i-=e.items.length:"itemchange"===a||"sync"===a||r.options.serverPaging||(i=r.reader.total(r._pristine)),r._total=i,r._process(r._data,e)):r.sync()},_process:function(e,n){var i,r=this,o={};r.options.serverPaging!==!0&&(o.skip=r._skip,o.take=r._take||r._pageSize,o.skip===t&&r._page!==t&&r._pageSize!==t&&(o.skip=(r._page-1)*r._pageSize)),r.options.serverSorting!==!0&&(o.sort=r._sort),r.options.serverFiltering!==!0&&(o.filter=r._filter),r.options.serverGrouping!==!0&&(o.group=r._group),r.options.serverAggregates!==!0&&(o.aggregate=r._aggregate,r._aggregateResult=m(e,o)),i=a.process(e,o),r._view=i.data,i.total===t||r.options.serverFiltering||(r._total=i.total),n=n||{},n.items=n.items||r._view,r.trigger(vt,n)},_mergeState:function(e){var n=this;return e!==t&&(n._pageSize=e.pageSize,n._page=e.page,n._sort=e.sort,n._filter=e.filter,n._group=e.group,n._aggregate=e.aggregate,n._skip=e.skip,n._take=e.take,n._skip===t&&(n._skip=n.skip(),e.skip=n.skip()),n._take===t&&n._pageSize!==t&&(n._take=n._pageSize,e.take=n._take),e.sort&&(n._sort=e.sort=o(e.sort)),e.filter&&(n._filter=e.filter=l(e.filter)),e.group&&(n._group=e.group=c(e.group)),e.aggregate&&(n._aggregate=e.aggregate=d(e.aggregate))),e},query:function(e){var n,i=this,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(yt,{type:"read"})||(i.trigger(wt),n=a.process(i._data,i._mergeState(e)),i.options.serverFiltering||(i._total=n.total!==t?n.total:i._data.length),i._view=n.data,i._aggregateResult=m(i._data,e),i.trigger(xt,{}),i.trigger(vt,{items:n.data}))},fetch:function(t){var n=this;return e.Deferred(function(e){var i=function(i){n.unbind(bt,r),e.resolve(),t&&t.call(n,i)},r=function(t){e.reject(t)};n.one(vt,i),n.one(bt,r),n._query()}).promise()},_query:function(e){var t=this;t.query(X({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate()},e))},next:function(e){var n=this,i=n.page(),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=Ft.max(Ft.min(Ft.max(e,1),i.totalPages()),1),i._query({page:e}),t):(n=i.skip(),n!==t?Ft.round((n||0)/(i.take()||1))+1:t)},pageSize:function(e){var n=this;return e!==t?(n._query({pageSize:e,page:1}),t):n.take()},sort:function(e){var n=this;return e!==t?(n._query({sort:e}),t):n._sort},filter:function(e){var n=this;return e===t?n._filter:(n._query({filter:e,page:1}),t)},group:function(e){var n=this;return e!==t?(n._query({group:e}),t):n._group},total:function(){return parseInt(this._total||0,10)},aggregate:function(e){var n=this;return e!==t?(n._query({aggregate:e}),t):n._aggregate},aggregates:function(){return this._aggregateResult},totalPages:function(){var e=this,t=e.pageSize()||e.total();return Ft.ceil((e.total()||0)/t)},inRange:function(e,t){var n=this,i=Ft.min(e+t,n.total());return!n.options.serverPaging&&n.data.length>0?!0:n._findRange(e,i).length>0},lastRange:function(){var e=this._ranges;return e[e.length-1]||{start:0,end:0,data:[]}},firstItemUid:function(){var e=this._ranges;return e.length&&e[0].data.length&&e[0].data[0].uid},range:function(e,n){var i,r,a,o,s,l,d;if(e=Ft.min(e||0,this.total()),r=this,a=Ft.max(Ft.floor(e/n),0)*n,o=Ft.min(a+n,r.total()),i=r._findRange(e,Ft.min(e+n,r.total())),i.length){r._skip=e>r.skip()?Ft.min(o,(r.totalPages()-1)*r.take()):a,r._take=n,s=r.options.serverPaging,l=r.options.serverSorting,d=r.options.serverFiltering;try{r.options.serverPaging=!0,r._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(a,o)?e>a&&r.prefetch(o,n,function(){r.range(e,n)}):r.prefetch(a,n,function(){e>a&&or;r++)if(i=k[r],e>=i.start&&e<=i.end){for(m=0,s=r;g>s;s++)if(i=k[s],h=_._flatData(i.data),h.length&&e+m>=i.start&&(u=i.data,p=i.end,w||(v=c(_.group()||[]).concat(o(_.sort()||[])),f=a.process(i.data,{sort:v,filter:_.filter()}),h=u=f.data,f.total!==t&&(p=f.total)),l=0,e+m>i.start&&(l=e+m-i.start),d=h.length,p>n&&(d-=p-n),m+=d-l,b=_._mergeGroups(b,u,l,d),n<=i.end&&m==n-e))return b;break}return[]},_mergeGroups:function(e,t,n,i){if(this._isServerGrouped()){var r,a=t.toJSON();return e.length&&(r=e[e.length-1]),b(r,a,n,i),e.concat(a)}return e.concat(t.slice(n,i))},skip:function(){var e=this;return e._skip===t?e._page!==t?(e._page-1)*(e.take()||1):t:e._skip},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(e,t,n){var i=this;return function(r){var a,o,s,l=!1,d={start:e,end:t,data:[]};if(i._dequeueRequest(),i.trigger(xt,{response:r,type:"read"}),r=i.reader.parse(r),s=i._readData(r),s.length){for(a=0,o=i._ranges.length;o>a;a++)if(i._ranges[a].start===e){l=!0,d=i._ranges[a];break}l||i._ranges.push(d)}d.data=i._observe(s),d.end=d.start+i._flatData(d.data).length,i._ranges.sort(function(e,t){return e.start-t.start}),i._total=i.reader.total(r),n&&s.length?n():i.trigger(vt,{})}},prefetch:function(e,t,n){var i=this,r=Ft.min(e+t,i.total()),a={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(e,r)?n&&n():(clearTimeout(i._timeout),i._timeout=setTimeout(function(){i._queueRequest(a,function(){i.trigger(yt,{type:"read"})?i._dequeueRequest():i.transport.read({data:i._params(a),success:i._prefetchSuccessHandler(e,r,n)})})},100))},_rangeExists:function(e,t){var n,i,r=this,a=r._ranges;for(n=0,i=a.length;i>n;n++)if(a[n].start<=e&&a[n].end>=t)return!0;return!1}}),Y={},Y.create=function(e,t){var n,i=e.transport;return i?(i.read=typeof i.read===ut?{url:i.read}:i.read,e.type&&(st.data.transports[e.type]&&!et(st.data.transports[e.type])?n=new st.data.transports[e.type](X(i,{data:t})):i=X(!0,{},st.data.transports[e.type],i),e.schema=X(!0,{},st.data.schemas[e.type],e.schema)),n||(n=lt(i.read)?i:new U(i))):n=new W({data:e.data}),n},G.create=function(e){e=e&&e.push?{data:e}:e;var t,n,i,r=e||{},a=r.data,o=r.fields,s=r.table,l=r.select,d={};if(a||!o||r.transport||(s?a=M(s,o):l&&(a=A(l,o))),st.data.Model&&o&&(!r.schema||!r.schema.model)){for(t=0,n=o.length;n>t;t++)i=o[t],i.type&&(d[i.field]=i);tt(d)||(r.schema=X(!0,r.schema,{model:{fields:d}}))}return r.data=a,r instanceof G?r:new G(r)},$=jt.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&&X(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 K||(e=i.children=new K(i._childrenOptions),t=e.transport,n=t.parameterMap,t.parameterMap=function(e){return e[i.idField||"id"]=i.id,n&&(e=n(e)),e},e.parent=function(){return i},e.bind(vt,function(e){e.node=e.node||i,i.trigger(vt,e)}),e.bind(bt,function(e){var t=i.parent();t&&(e.node=e.node||i,t.trigger(bt,e))}),i._updateChildrenField())},append:function(e){this._initChildren(),this.loaded(!0),this.children.add(e)},hasChildren:!1,level:function(){for(var e=this.parentNode(),t=0;e&&e.parentNode;)t++,e=e.parentNode?e.parentNode():null;return t},_updateChildrenField:function(){var e=this._childrenOptions.schema.data;this[e||"items"]=this.children.data()},_childrenLoaded:function(){this._loaded=!0,this._updateChildrenField()},load:function(){var e,n={},i="_query";this.hasChildren?(this._initChildren(),e=this.children,n[this.idField||"id"]=this.id,this._loaded||(e._data=t,i="read"),e.one(vt,Z(this._childrenLoaded,this)),e[i](n)):this.loaded(!0)},parentNode:function(){var e=this.parent();return e.parent()},loaded:function(e){return e===t?this._loaded:(this._loaded=e,t)},shouldSerialize:function(e){return jt.fn.shouldSerialize.call(this,e)&&"children"!==e&&"_loaded"!==e&&"hasChildren"!==e&&"_childrenOptions"!==e}}),K=G.extend({init:function(e){var t=$.define({children:e});G.fn.init.call(this,X(!0,{},{schema:{modelBase:t,model:t}},e)),this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var e=this;e._data.bind(bt,function(t){e.trigger(bt,t)})},remove:function(e){var t,n=e.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),t=G.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:I("success"),data:I("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),G.fn.insert.call(this,e,t)},_find:function(e,t){var n,i,r,a,o;if(r=G.fn[e].call(this,t))return r;if(a=this._flatData(this.data()))for(n=0,i=a.length;i>n;n++)if(o=a[n].children,o instanceof K&&(r=o[e](t)))return r},get:function(e){return this._find("get",e)},getByUid:function(e){return this._find("getByUid",e)}}),K.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},n=t.data,i=t.fields,r=t.list;return n&&n._dataSource?n._dataSource:(n||!i||t.transport||r&&(n=R(r,i)),t.data=n,t instanceof K?t:new K(t))},Q=st.Observable.extend({init:function(e,t,n){st.Observable.fn.init.call(this),this._prefetching=!1,this.dataSource=e,this.prefetch=!n;var i=this;e.bind("change",function(){i._change()}),this._syncWithDataSource(),this.setViewSize(t)},setViewSize:function(e){this.viewSize=e,this._recalculate()},at:function(e){var n,i,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=Ft.max(Ft.floor(n/t),0)*t+t;this.offset=n,this.dataSource.prefetch(i,t,function(){e._goToRange(n,!0)})},range:function(e){if(this.offset!==e){var t=this,n=this.pageSize,i=Ft.max(Ft.floor(e/n),0)*n+n,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}}),J=st.Observable.extend({init:function(e,t){var n=this;st.Observable.fn.init.call(n),this.dataSource=e,this.batchSize=t,this._total=0,this.buffer=new Q(e,3*t),this.buffer.bind({endreached:function(e){n.trigger("endreached",{index:e.index})},prefetching:function(e){n.trigger("prefetching",{skip:e.skip,take:e.take})},prefetched:function(e){n.trigger("prefetched",{skip:e.skip,take:e.take})},reset:function(){n._total=0,n.trigger("reset")},resize:function(){n._total=Math.ceil(this.length/n.batchSize),n.trigger("resize",{total:n.total(),offset:this.offset})}})},syncDataSource:function(){this.buffer.syncDataSource()},at:function(e){var n,i,r=this.buffer,a=e*this.batchSize,o=this.batchSize,s=[];for(r.offset>a&&r.at(r.offset-1),i=0;o>i&&(n=r.at(a+i),n!==t);i++)s.push(n);return s},total:function(){return this._total},destroy:function(){this.buffer.destroy(),this.unbind()}}),X(!0,st.data,{readers:{json:j},Query:a,DataSource:G,HierarchicalDataSource:K,Node:$,ObservableObject:Wt,ObservableArray:Vt,LocalTransport:W,RemoteTransport:U,Cache:q,DataReader:j,Model:jt,Buffer:Q,BatchBuffer:J})}(window.kendo.jQuery),function(e,t){function n(e){var t,i,r,a,o=[];for(t=0,i=e.length;i>t;t++)if(e[t].hasSubgroups)o=o.concat(n(e[t].items));else for(r=e[t].items,a=0;at;t++)i=l[t],a=i.indexOf(":"),o=i.substring(0,a),s=i.substring(a+1),"{"==s.charAt(0)&&(s=r(s)),d[o]=s;return d}function a(e,t,n){var i,r={};for(i in e)r[i]=new n(t,e[i]);return r}function o(e,t,n,s){var d,c,u,p=e.getAttribute("data-"+w.ns+"role"),f=e.getAttribute("data-"+w.ns+"bind"),v=e.children,k=[],b=!0,x={};if(s=s||[t],(p||f)&&l(e),p&&(u=i(e,n)),f&&(f=r(f.replace(y,"")),u||(x=w.parseOptions(e,{textField:"",valueField:"",template:"",valueUpdate:R,valuePrimitive:!1,autoBind:!0}),x.roles=n,u=new _(e,x)),u.source=t,c=a(f,s,h),x.template&&(c.template=new g(s,"",x.template)),c.click&&(f.events=f.events||{},f.events.click=f.click,delete c.click),c.source&&(b=!1),f.attr&&(c.attr=a(f.attr,s,h)),f.style&&(c.style=a(f.style,s,h)),f.events&&(c.events=a(f.events,s,m)),u.bind(c)),u&&(e.kendoBindingTarget=u),b&&v){for(d=0;di;i++)a=t[i],1===a.nodeType&&o(a,n,s)}function l(t){var n=t.kendoBindingTarget;n&&(n.destroy(),e.support.deleteExpando?delete t.kendoBindingTarget:t.removeAttribute?t.removeAttribute("kendoBindingTarget"):t.kendoBindingTarget=null)}function d(e){l(e),c(e)}function c(e){var t,n,i=e.children;if(i)for(t=0,n=i.length;n>t;t++)d(i[t])}function u(t){var n,i;for(t=e(t),n=0,i=t.length;i>n;n++)d(t[n])}function p(e,t){var n=e.element,i=n[0].kendoBindingTarget;i&&s(n,i.source,t)}var f,h,m,g,v,_,k,b,y,w=window.kendo,x=w.Observable,C=w.data.ObservableObject,T=w.data.ObservableArray,S={}.toString,D={},F=Array.prototype.splice,E=w.Class,z=e.proxy,H="value",A="source",M="events",I="checked",R="change";!function(){var e=document.createElement("a");e.innerText!==t?f="innerText":e.textContent!==t&&(f="textContent")}(),h=x.extend({init:function(e,t){var n=this;x.fn.init.call(n),n.source=e[0],n.parents=e,n.path=t,n.dependencies={},n.dependencies[t]=!0,n.observable=n.source instanceof x,n._access=function(e){n.dependencies[e.field]=!0},n.observable&&(n._change=function(e){n.change(e)},n.source.bind(R,n._change))},_parents:function(){var t,n=this.parents,i=this.get();return i&&"function"==typeof i.parent&&(t=i.parent(),e.inArray(t,n)<0&&(n=[t].concat(n))),n},change:function(e){var t,n,i=e.field,r=this;if("this"===r.path)r.trigger(R,e);else for(t in r.dependencies)if(0===t.indexOf(i)&&(n=t.charAt(i.length),!n||"."===n||"["===n)){r.trigger(R,e);break}},start:function(e){e.bind("get",this._access)},stop:function(e){e.unbind("get",this._access)},get:function(){var e=this,n=e.source,i=0,r=e.path,a=n;if(!e.observable)return a;for(e.start(e.source),a=n.get(r);a===t&&n;)n=e.parents[++i],n instanceof C&&(a=n.get(r));if(a===t)for(n=e.source;a===t&&n;)n=n.parent(),n instanceof C&&(a=n.get(r));return"function"==typeof a&&(i=r.lastIndexOf("."),i>0&&(n=n.get(r.substring(0,i))),e.start(n),a=a.call(n,e.source),e.stop(n)),n&&n!==e.source&&(e.currentSource=n,n.unbind(R,e._change).bind(R,e._change)),e.stop(e.source),a},set:function(e){var t=this,n=t.currentSource||t.source;n.set(t.path,e)},destroy:function(){this.observable&&this.source.unbind(R,this._change)}}),m=h.extend({get:function(){var e,t=this.source,n=this.path,i=0;for(e=t.get(n);!e&&t;)t=this.parents[++i],t instanceof C&&(e=t.get(n));return z(e,t)}}),g=h.extend({init:function(e,t,n){var i=this;h.fn.init.call(i,e,t),i.template=n},render:function(e){var t;return this.start(this.source),t=w.render(this.template,e),this.stop(this.source),t}}),v=E.extend({init:function(e,t,n){this.element=e,this.bindings=t,this.options=n},bind:function(e,t){var n=this;e=t?e[t]:e,e.bind(R,function(e){n.refresh(t||e)}),n.refresh(t)},destroy:function(){}}),D.attr=v.extend({refresh:function(e){this.element.setAttribute(e,this.bindings.attr[e].get())}}),D.style=v.extend({refresh:function(e){this.element.style[e]=this.bindings.style[e].get()||""}}),D.enabled=v.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),D.readonly=v.extend({refresh:function(){this.bindings.readonly.get()?this.element.setAttribute("readonly","readonly"):this.element.removeAttribute("readonly")}}),D.disabled=v.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),D.events=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n),this.handlers={}},refresh:function(t){var n=e(this.element),i=this.bindings.events[t],r=this.handlers[t];r&&n.off(t,r),r=this.handlers[t]=i.get(),n.on(t,i.source,r)},destroy:function(){var t,n=e(this.element);for(t in this.handlers)n.off(t,this.handlers[t])}}),D.text=v.extend({refresh:function(){var e=this.bindings.text.get();null==e&&(e=""),this.element[f]=e}}),D.visible=v.extend({refresh:function(){this.element.style.display=this.bindings.visible.get()?"":"none"}}),D.invisible=v.extend({refresh:function(){this.element.style.display=this.bindings.invisible.get()?"none":""}}),D.html=v.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),D.value=v.extend({init:function(t,n,i){v.fn.init.call(this,t,n,i),this._change=z(this.change,this),this.eventName=i.valueUpdate||R,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){var e,t;this._initChange=this.eventName!=R,e=this.element.value,t=this.element.type,"date"==t?e=w.parseDate(e,"yyyy-MM-dd"):"datetime-local"==t?e=w.parseDate(e,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==t&&(e=w.parseFloat(e)),this.bindings[H].set(e),this._initChange=!1},refresh:function(){var e,t;this._initChange||(e=this.bindings[H].get(),null==e&&(e=""),t=this.element.type,"date"==t?e=w.toString(e,"yyyy-MM-dd"):"datetime-local"==t&&(e=w.toString(e,"yyyy-MM-ddTHH:mm:ss")),this.element.value=e),this._initChange=!1},destroy:function(){e(this.element).off(this.eventName,this._change)}}),D.source=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n);var i=this.bindings.source.get();i instanceof w.data.DataSource&&n.autoBind!==!1&&i.fetch()},refresh:function(e){var t=this,n=t.bindings.source.get();n instanceof T||n instanceof w.data.DataSource?(e=e||{},"add"==e.action?t.add(e.index,e.items):"remove"==e.action?t.remove(e.index,e.items):"itemchange"!=e.action&&t.render()):t.render()},container:function(){var e=this.element;return"table"==e.nodeName.toLowerCase()&&(e.tBodies[0]||e.appendChild(document.createElement("tbody")),e=e.tBodies[0]),e},template:function(){var e=this.options,t=e.template,n=this.container().nodeName.toLowerCase();return t||(t="select"==n?e.valueField||e.textField?w.format('',e.valueField||e.textField,e.textField||e.valueField):"":"tbody"==n?"#:data#":"ul"==n||"ol"==n?"
  • #:data#
  • ":"#:data#",t=w.template(t)),t},destroy:function(){var e=this.bindings.source.get();e.unbind(R,this._change)},add:function(t,n){var i,r,a,s,l=this.container(),d=l.cloneNode(!1),c=l.children[t];if(e(d).html(w.render(this.template(),n)),d.children.length)for(i=this.bindings.source._parents(),r=0,a=n.length;a>r;r++)s=d.children[0],l.insertBefore(s,c||null),o(s,n[r],this.options.roles,[n[r]].concat(i))},remove:function(e,t){var n,i,r=this.container();for(n=0;nn;n++)o(s.children[n],a[n],this.options.roles,[a[n]].concat(t))}else e(s).html(w.render(l,a))}}),D.input={checked:v.extend({init:function(t,n,i){v.fn.init.call(this,t,n,i),this._change=z(this.change,this),e(this.element).change(this._change)},change:function(){var e,t,n=this.element,i=this.value();"radio"==n.type?this.bindings[I].set(i):"checkbox"==n.type&&(e=this.bindings[I].get(),e instanceof T?(i=this.element.value,"on"!==i&&"off"!==i&&(t=e.indexOf(i),t>-1?e.splice(t,1):e.push(i))):this.bindings[I].set(i))},refresh:function(){var e=this.bindings[I].get(),t=e,n=this.element;"checkbox"==n.type?(t instanceof T&&(e=this.element.value,t.indexOf(e)>=0&&(e=!0)),n.checked=e===!0):"radio"==n.type&&null!=e&&n.value===""+e&&(n.checked=!0)},value:function(){var e=this.element,t=e.value;return"checkbox"==e.type&&(t=e.checked),t},destroy:function(){e(this.element).off(R,this._change)}})},D.select={value:v.extend({init:function(t,n,i){v.fn.init.call(this,t,n,i),this._change=z(this.change,this),e(this.element).change(this._change)},change:function(){var e,t,n,i,r,a,o=[],s=this.element,l=this.options.valueField||this.options.textField,d=this.options.valuePrimitive;for(r=0,a=s.options.length;a>r;r++)t=s.options[r],t.selected&&(i=t.attributes.value,i=i&&i.specified?t.value:t.text,o.push(i));if(l)for(e=this.bindings.source.get(),n=0;nr;r++)if(e[r].get(l)==o[n]){o[n]=e[r];break}i=this.bindings[H].get(),i instanceof T?i.splice.apply(i,[0,i.length].concat(o)):d||!(i instanceof C)&&l?this.bindings[H].set(o[0].get(l)):this.bindings[H].set(o[0])},refresh:function(){var e,t,n,i=this.element,r=i.options,a=this.bindings[H].get(),o=a,s=this.options.valueField||this.options.textField,l=!1;for(o instanceof T||(o=new T([a])),i.selectedIndex=-1,n=0;ne;e++)d(i[e])},_ns:function(t){t=t||w.ui;var n=[w.ui,w.dataviz.ui,w.mobile.ui];return n.splice(e.inArray(t,n),1),n.unshift(t),w.rolesFromNamespaces(n)},dataBound:function(e){var t,i,r,a=this.widget,s=a.items(),l=a.dataSource,d=l.view(),c=l.group()||[];if(s.length)for(c.length&&(d=n(d)),r=this.bindings.source._parents(),t=0,i=d.length;i>t;t++)o(s[t],d[t],this._ns(e.ns),[d[t]].concat(r))},refresh:function(e){var t,n=this,i=n.widget;e=e||{},e.action||(n.destroy(),i.bind("dataBinding",n._dataBinding),i.bind("dataBound",n._dataBound),i.bind("itemChange",n._itemChange),t=n.bindings.source.get(),i.dataSource instanceof w.data.DataSource&&i.dataSource!=t&&(t instanceof w.data.DataSource?i.setDataSource(t):t&&t._dataSource?i.setDataSource(t._dataSource):i.dataSource.data(t)))},destroy:function(){var e=this.widget;e.unbind("dataBinding",this._dataBinding),e.unbind("dataBound",this._dataBound),e.unbind("itemChange",this._itemChange)}}),value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(R,this._change);var r=this.bindings.value.get();this._valueIsObservableObject=!i.valuePrimitive&&(null==r||r instanceof C),this._valueIsObservableArray=r instanceof T,this._initChange=!1},change:function(){var e,t,n,i,r,a,o,s=this.widget.value(),l=this.options.dataValueField||this.options.dataTextField,d="[object Array]"===S.call(s),c=this._valueIsObservableObject,u=[];if(this._initChange=!0,l)if(this.bindings.source&&(o=this.bindings.source.get()),""===s&&(c||this.options.valuePrimitive))s=null;else{for((!o||o instanceof w.data.DataSource)&&(o=this.widget.dataSource.view()),d&&(t=s.length,u=s.slice(0)),r=0,a=o.length;a>r;r++)if(n=o[r],i=n.get(l),d){for(e=0;t>e;e++)if(i==u[e]){u[e]=n;break}}else if(i==s){s=c?n:i;break}u[0]&&(s=this._valueIsObservableArray?u:c||!l?u[0]:u[0].get(l))}this.bindings.value.set(s),this._initChange=!1},refresh:function(){if(!this._initChange){var e,t=this.options.dataValueField||this.options.dataTextField,n=this.bindings.value.get(),i=0,r=[];if(t)if(n instanceof T){for(e=n.length;e>i;i++)r[i]=n[i].get(t);n=r}else n instanceof C&&(n=n.get(t));this.widget.value(n)}this._initChange=!1},destroy:function(){this.widget.unbind(R,this._change)}}),multiselect:{value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(R,this._change),this._initChange=!1},change:function(){var e,t,n,i,r,a,o,s,l,d,c,u=this,p=u.bindings[H].get(),f=u.options.valuePrimitive,h=f?u.widget.value():u.widget.dataItems(),m=this.options.dataValueField||this.options.dataTextField;if(h=h.slice(0),u._initChange=!0,p instanceof T){for(e=[],t=h.length,n=0,i=0,r=p[n],a=!1,d=0,c=p.length+1;r;){for(l=!1,i=0;t>i;i++)if(f?a=h[i]==r:(s=h[i],s=s.get?s.get(m):s,a=s==(r.get?r.get(m):r)),a){h.splice(i,1),t-=1,l=!0;break}if(l?n+=1:(e.push(r),F.call(p,n,1),o=n),r=p[n],d++,d>c)break}F.apply(p,[p.length,0].concat(h)),e.length&&p.trigger("change",{action:"remove",items:e,index:o}),h.length&&p.trigger("change",{action:"add",items:h,index:p.length-1})}else u.bindings[H].set(h);u._initChange=!1},refresh:function(){if(!this._initChange){var e,t,n=this.options.dataValueField||this.options.dataTextField,i=this.bindings.value.get(),r=0,a=[];if(n)if(i instanceof T){for(e=i.length;e>r;r++)t=i[r],a[r]=t.get?t.get(n):t;i=a}else i instanceof C&&(i=i.get(n));this.widget.value(i)}},destroy:function(){this.widget.unbind(R,this._change)}})}},_=E.extend({init:function(e,t){this.target=e,this.options=t,this.toDestroy=[]},bind:function(e){var t,n,i,r,a=this.target.nodeName.toLowerCase(),o=D[a]||{};for(t in e)t==H?n=!0:t==A?i=!0:t==M?r=!0:this.applyBinding(t,e,o);i&&this.applyBinding(A,e,o),n&&this.applyBinding(H,e,o),r&&this.applyBinding(M,e,o)},applyBinding:function(e,t,n){var i,r=n[e]||D[e],a=this.toDestroy,o=t[e];if(r)if(r=new r(this.target,t,this.options),a.push(r),o instanceof h)r.bind(o),a.push(o);else for(i in o)r.bind(o,i),a.push(o[i]);else if("template"!==e)throw Error("The "+e+" binding is not supported by the "+this.target.nodeName.toLowerCase()+" element")},destroy:function(){var e,t,n=this.toDestroy;for(e=0,t=n.length;t>e;e++)n[e].destroy()}}),k=_.extend({bind:function(e){var t,n=this,i=!1,r=!1,a=D.widget[n.target.options.name.toLowerCase()]||{};for(t in e)t==H?i=!0:t==A?r=!0:n.applyBinding(t,e);r&&n.applyBinding(A,e),i&&n.applyBinding(H,e,a[H])},applyBinding:function(e,t,n){var i,r=n||D.widget[e],a=this.toDestroy,o=t[e];if(!r)throw Error("The "+e+" binding is not supported by the "+this.target.options.name+" widget");if(r=new r(this.target,t,this.target.options),a.push(r),o instanceof h)r.bind(o),a.push(o);else for(i in o)r.bind(o,i),a.push(o[i])}}),b=/[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g,y=/\s/g,w.unbind=u,w.bind=s,w.data.binders=D,w.data.Binder=v,w.notify=p,w.observable=function(e){return e instanceof C||(e=new C(e)),e},w.observableHierarchy=function(e){function t(e){var n,i;for(n=0;n")}function i(e){return e=(e+"").split("."),e.length>1?e[1].length:0}function r(t){return e.parseHTML?e(e.parseHTML(t)):e(t)}var a,o=window.kendo,s=o.ui.Widget,l=".kendoValidator",d="k-invalid-msg",c=RegExp(d,"i"),u="k-invalid",p=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,f=/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,h=":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",m=":checkbox:not([disabled],[readonly])",g="[type=number],[type=range]",v="blur",_="name",k="form",b="novalidate",y=e.proxy,w=function(e,t){return"string"==typeof t&&(t=RegExp("^(?:"+t+")$")),t.test(e) },x=function(e,t,n){var i=e.val();return e.filter(t).length&&""!==i?w(i,n):!0},C=function(e,t){return e.length?null!=e[0].attributes[t]:!1};o.ui.validator||(o.ui.validator={rules:{},messages:{}}),a=s.extend({init:function(n,i){var r=this,a=t(n);i=i||{},i.rules=e.extend({},o.ui.validator.rules,a.rules,i.rules),i.messages=e.extend({},o.ui.validator.messages,a.messages,i.messages),s.fn.init.call(r,n,i),r._errorTemplate=o.template(r.options.errorTemplate),r.element.is(k)&&r.element.attr(b,b),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()?w(e.val(),e.attr("pattern")):!0},min:function(e){if(e.filter(g+",["+o.attr("type")+"=number]").filter("[min]").length&&""!==e.val()){var t=parseFloat(e.attr("min"))||0,n=o.parseFloat(e.val());return n>=t}return!0},max:function(e){if(e.filter(g+",["+o.attr("type")+"=number]").filter("[max]").length&&""!==e.val()){var t=parseFloat(e.attr("max"))||0,n=o.parseFloat(e.val());return t>=n}return!0},step:function(e){if(e.filter(g+",["+o.attr("type")+"=number]").filter("[step]").length&&""!==e.val()){var t,n=parseFloat(e.attr("min"))||0,r=parseFloat(e.attr("step"))||1,a=parseFloat(e.val()),s=i(r);return s?(t=Math.pow(10,s),0===(a-n)*t%(r*t)/Math.pow(100,s)):0===(a-n)%r}return!0},email:function(e){return x(e,"[type=email],["+o.attr("type")+"=email]",p)},url:function(e){return x(e,"[type=url],["+o.attr("type")+"=url]",f)},date:function(e){return e.filter("[type^=date],["+o.attr("type")+"=date]").length&&""!==e.val()?null!==o.parseDate(e.val(),e.attr(o.attr("format"))):!0}},validateOnBlur:!0},destroy:function(){s.fn.destroy.call(this),this.element.off(l)},_submit:function(e){return this.validate()?!0:(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault(),!1)},_attachEvents:function(){var t=this;t.element.is(k)&&t.element.on("submit"+l,y(t._submit,t)),t.options.validateOnBlur&&(t.element.is(h)?(t.element.on(v+l,function(){t.validateInput(t.element)}),t.element.is(m)&&t.element.on("click"+l,function(){t.validateInput(t.element)})):(t.element.on(v+l,h,function(){t.validateInput(e(this))}),t.element.on("click"+l,m,function(){t.validateInput(e(this))})))},validate:function(){var e,t,n,i,r=!1;if(this._errors={},this.element.is(h))r=this.validateInput(this.element);else{for(i=!1,e=this.element.find(h),t=0,n=e.length;n>t;t++)this.validateInput(e.eq(t))||(i=!0);r=!i}return this.trigger("validate",{valid:r}),r},validateInput:function(t){var i,a,o,s,l,c,p,f,h;return t=e(t),a=this,o=a._errorTemplate,s=a._checkValidity(t),l=s.valid,c="."+d,p=t.attr(_)||"",f=a._findMessageContainer(p).add(t.next(c)).hide(),t.removeAttr("aria-invalid"),l||(i=a._extractMessage(t,s.key),a._errors[p]=i,h=r(o({message:n(i)})),a._decorateMessageContainer(h,p),f.replaceWith(h).length||h.insertAfter(t),h.show(),t.attr("aria-invalid",!0)),t.toggleClass(u,!l),l},hideMessages:function(){var e=this,t="."+d,n=e.element;n.is(h)?n.next(t).hide():n.find(t).hide()},_findMessageContainer:function(t){var n,i,r,a,s,l=o.ui.validator.messageLocators,d=e(),u=this.element[0].getElementsByTagName("*");for(i=0,r=u.length;r>i;i++)a=u[i],c.test(a.className)&&(s=a.getAttribute(o.attr("for")),s===t&&(d=d.add(a)));for(n in l)d=d.add(l[n].locate(this.element,t));return d},_decorateMessageContainer:function(e,t){var n,i=o.ui.validator.messageLocators;e.addClass(d).attr(o.attr("for"),t||"");for(n in i)i[n].decorate(e,t);e.attr("role","alert")},_extractMessage:function(e,t){var n=this,i=n.options.messages[t],r=e.attr(_);return i=o.isFunction(i)?i(e):i,o.format(e.attr(o.attr(t+"-msg"))||e.attr("validationMessage")||e.attr("title")||i||"",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}}),o.ui.plugin(a)}(window.kendo.jQuery),function(e){function t(e,t){var n=e.x.location,i=e.y.location,r=t.x.location,a=t.y.location,o=n-r,s=i-a;return{center:{x:(n+r)/2,y:(i+a)/2},distance:Math.sqrt(o*o+s*s)}}function n(e){var t,n,i,r=[],a=e.originalEvent,s=e.currentTarget,l=0;if(e.api)r.push({id:2,event:e,target:e.target,currentTarget:e.target,location:e});else if(e.type.match(/touch/))for(n=a?a.changedTouches:[],t=n.length;t>l;l++)i=n[l],r.push({location:i,event:e,target:i.target,currentTarget:s,id:i.identifier});else o.pointers||o.msPointers?r.push({location:a,event:e,target:e.target,currentTarget:s,id:a.pointerId}):r.push({id:1,event:e,target:e.target,currentTarget:s,location:e});return r}function i(t){var n,i,r;t.preventDefault(),n=e(t.data.root),i=n.closest(".k-widget").parent(),i[0]||(i=n.parent()),r=e.extend(!0,{},t,{target:n[0]}),i.trigger(e.Event(t.type,r))}function r(e){for(var t=a.eventMap.up.split(" "),n=0,i=t.length;i>n;n++)e(t[n])}var a=window.kendo,o=a.support,s=window.document,l=a.Class,d=a.Observable,c=e.now,u=e.extend,p=o.mobileOS,f=p&&p.android,h=800,m=o.browser.msie?5:0,g="press",v="hold",_="select",k="start",b="move",y="end",w="cancel",x="tap",C="release",T="gesturestart",S="gesturechange",D="gestureend",F="gesturetap",E=l.extend({init:function(e,t){var n=this;n.axis=e,n._updateLocationData(t),n.startLocation=n.location,n.velocity=n.delta=0,n.timeStamp=c()},move:function(e){var t=this,n=e["page"+t.axis],i=c(),r=i-t.timeStamp||1;(n||!f)&&(t.delta=n-t.location,t._updateLocationData(e),t.initialDelta=n-t.startLocation,t.velocity=t.delta/r,t.timeStamp=i)},_updateLocationData:function(e){var t=this,n=t.axis;t.location=e["page"+n],t.client=e["client"+n],t.screen=e["screen"+n]}}),z=l.extend({init:function(e,t,n){var i=this;u(i,{x:new E("X",n.location),y:new E("Y",n.location),userEvents:e,target:t,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,_moved:!1,_finished:!1}),i.press=function(){i._trigger(g,n),i._holdTimeout=setTimeout(function(){i._trigger(v,n)},e.minHold)}},move:function(e){var t=this;if(!t._finished){if(t.x.move(e.location),t.y.move(e.location),!t._moved){if(t._withinIgnoreThreshold())return;if(H.current&&H.current!==t.userEvents)return t.dispose();t._start(e)}t._finished||t._trigger(b,e)}},end:function(e){var t=this;t.endTime=c(),t._finished||(t._finished=!0,t._moved?t._trigger(y,e):t._trigger(x,e),clearTimeout(t._holdTimeout),t._trigger(C,e),t.dispose())},dispose:function(){var t=this,n=t.userEvents,i=n.touches;t._finished=!0,i.splice(e.inArray(t,i),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(e){clearTimeout(this._holdTimeout),this.startTime=c(),this._moved=!0,this._trigger(k,e)},_trigger:function(e,t){var n=this,i=t.event,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}}),H=d.extend({init:function(t,n){var i,l,c,p=this,f=a.guid();n=n||{},i=p.filter=n.filter,p.threshold=n.threshold||m,p.minHold=n.minHold||h,p.touches=[],p._maxTouches=n.multiTouch?2:1,p.allowSelection=n.allowSelection,p.captureUpIfMoved=n.captureUpIfMoved,p.eventNS=f,t=e(t).handler(p),d.fn.init.call(p),u(p,{element:t,surface:n.global?e(s.documentElement):e(n.surface||t),stopPropagation:n.stopPropagation,pressed:!1}),p.surface.handler(p).on(a.applyEventMap("move",f),"_move").on(a.applyEventMap("up cancel",f),"_end"),t.on(a.applyEventMap("down",f),i,"_start"),(o.pointers||o.msPointers)&&t.css("-ms-touch-action","pinch-zoom double-tap-zoom"),n.preventDragEvent&&t.on(a.applyEventMap("dragstart",f),a.preventDefault),t.on(a.applyEventMap("mousedown selectstart",f),i,{root:t},"_select"),p.captureUpIfMoved&&o.eventCapture&&(l=p.surface[0],c=e.proxy(p.preventIfMoving,p),r(function(e){l.addEventListener(e,c,!0)})),p.bind([g,v,x,k,b,y,C,w,T,S,D,F,_],n)},preventIfMoving:function(e){this._isMoved()&&e.preventDefault()},destroy:function(){var e,t=this;t._destroyed||(t._destroyed=!0,t.captureUpIfMoved&&o.eventCapture&&(e=t.surface[0],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(){H.current=this},cancel:function(){this._disposeAll(),this.trigger(w)},notify:function(e,n){var i=this,r=i.touches;if(this._isMultiTouch()){switch(e){case b:e=S;break;case y:e=D;break;case x:e=F}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,a=this,o=0,s=a.filter,l=n(t),d=l.length;if(!a._maxTouchesReached())for(H.current=null,a.currentTarget=t.currentTarget,a.stopPropagation&&t.stopPropagation();d>o&&!a._maxTouchesReached();o++)r=l[o],i=s?e(r.currentTarget):a.element,i.length&&(r=new z(a,i,r),a.touches.push(r),r.press(),a._isMultiTouch()&&a.notify("gesturestart",{}))},_move:function(e){this._eachTouch("move",e)},_end:function(e){this._eachTouch("end",e)},_eachTouch:function(e,t){var i,r,a,o,s=this,l={},d=n(t),c=s.touches;for(i=0;io;o++)if(r=n[o],r.element[0]===e)return{target:r,targetElement:e};for(o=0;l>o;o++)if(a=i[o],m.matchesSelector.call(e,a.options.filter))return{target:a,targetElement:e};e=e.parentNode}return t}var l,d,c,u,p,f,h=window.kendo,m=h.support,g=window.document,v=h.Class,_=h.ui.Widget,k=h.Observable,b=h.UserEvents,y=e.proxy,w=e.extend,x=h.getOffset,C={},T={},S={},D=m.mobileOS,F=D&&D.android,E=F&&"chrome"==D.browser,z="keyup",H="change",A="dragstart",M="hold",I="drag",R="dragend",N="dragcancel",O="dragenter",P="dragleave",B="drop",L=k.extend({init:function(t,n){var i=this,r=t[0];i.capture=!1,r.addEventListener?(e.each(h.eventMap.down.split(" "),function(){r.addEventListener(this,y(i._press,i),!0)}),e.each(h.eventMap.up.split(" "),function(){r.addEventListener(this,y(i._release,i),!0)})):(e.each(h.eventMap.down.split(" "),function(){r.attachEvent(this,y(i._press,i))}),e.each(h.eventMap.up.split(" "),function(){r.attachEvent(this,y(i._release,i))})),k.fn.init.call(i),i.bind(["press","release"],n||{})},captureNext:function(){this.capture=!0},cancelCapture:function(){this.capture=!1},_press:function(e){var t=this;t.trigger("press"),t.capture&&e.preventDefault()},_release:function(e){var t=this;t.trigger("release"),t.capture&&(e.preventDefault(),t.cancelCapture())}}),V=k.extend({init:function(t){var n=this;k.fn.init.call(n),n.forcedEnabled=!1,e.extend(n,t),n.scale=1,n.horizontal?(n.measure="offsetWidth",n.scrollSize="scrollWidth",n.axis="x"):(n.measure="offsetHeight",n.scrollSize="scrollHeight",n.axis="y")},makeVirtual:function(){e.extend(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},virtualSize:function(e,t){(this._virtualMin!==e||this._virtualMax!==t)&&(this._virtualMin=e,this._virtualMax=t,this.update())},outOfBounds:function(e){return e>this.max||er,e||t.trigger(H,t)}}),W=k.extend({init:function(e){var t=this;k.fn.init.call(t),t.x=new V(w({horizontal:!0},e)),t.y=new V(w({horizontal:!1},e)),t.container=e.container,t.forcedMinScale=e.minScale,t.maxScale=e.maxScale||100,t.bind(H,e)},rescale:function(e){this.x.rescale(e),this.y.rescale(e),this.refresh()},centerCoordinates:function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},refresh:function(){var e=this;e.x.update(),e.y.update(),e.enabled=e.x.enabled||e.y.enabled,e.minScale=e.forcedMinScale||Math.min(e.x.minScale,e.y.minScale),e.fitScale=Math.max(e.x.minScale,e.y.minScale),e.trigger(H)}}),U=k.extend({init:function(e){var t=this;w(t,e),k.fn.init.call(t)},dragMove:function(e){var t=this,n=t.dimension,i=t.axis,r=t.movable,a=r[i]+e;n.enabled&&((ae||a>n.max&&e>0)&&(e*=t.resistance),r.translateAxis(i,e),t.trigger(H,t))}}),q=v.extend({init:function(e){var t,n,i,r,a=this;w(a,{elastic:!0},e),i=a.elastic?.5:0,r=a.movable,a.x=t=new U({axis:"x",dimension:a.dimensions.x,resistance:i,movable:r}),a.y=n=new U({axis:"y",dimension:a.dimensions.y,resistance:i,movable:r}),a.userEvents.bind(["move","end","gesturestart","gesturechange"],{gesturestart:function(e){a.gesture=e,a.offset=a.dimensions.container.offset()},gesturechange:function(e){var i,o,s,l=a.gesture,d=l.center,c=e.center,u=e.distance/l.distance,p=a.dimensions.minScale,f=a.dimensions.maxScale;r.scale<=p&&1>u&&(u+=.8*(1-u)),r.scale*u>=f&&(u=f/r.scale),o=r.x+a.offset.left,s=r.y+a.offset.top,i={x:(o-d.x)*u+c.x-o,y:(s-d.y)*u+c.y-s},r.scaleWith(u),t.dragMove(i.x),n.dragMove(i.y),a.dimensions.rescale(r.scale),a.gesture=e,e.preventDefault()},move:function(e){e.event.target.tagName.match(/textarea|input/i)||(t.dimension.enabled||n.dimension.enabled?(t.dragMove(e.x.delta),n.dragMove(e.y.delta),e.preventDefault()):e.touch.skip())},end:function(e){e.preventDefault()}})}}),j=m.transitions.prefix+"Transform";d=m.hasHW3D?function(e,t,n){return"translate3d("+e+"px,"+t+"px,0) scale("+n+")"}:function(e,t,n){return"translate("+e+"px,"+t+"px) scale("+n+")"},c=k.extend({init:function(t){var n=this;k.fn.init.call(n),n.element=e(t),n.element[0].style.webkitTransformOrigin="left top",n.x=0,n.y=0,n.scale=1,n._saveCoordinates(d(n.x,n.y,n.scale))},translateAxis:function(e,t){this[e]+=t,this.refresh()},scaleTo:function(e){this.scale=e,this.refresh()},scaleWith:function(e){this.scale*=e,this.refresh()},translate:function(e){this.x+=e.x,this.y+=e.y,this.refresh()},moveAxis:function(e,t){this[e]=t,this.refresh()},moveTo:function(e){w(this,e),this.refresh()},refresh:function(){var e,t=this,n=t.x,i=t.y;t.round&&(n=Math.round(n),i=Math.round(i)),e=d(n,i,t.scale),e!=t.coordinates&&(h.support.browser.msie&&h.support.browser.version<10?(t.element[0].style.position="absolute",t.element[0].style.left=t.x+"px",t.element[0].style.top=t.y+"px"):t.element[0].style[j]=e,t._saveCoordinates(e),t.trigger(H))},_saveCoordinates:function(e){this.coordinates=e}}),u=_.extend({init:function(e,t){var n,i=this;_.fn.init.call(i,e,t),n=i.options.group,n in T?T[n].push(i):T[n]=[i]},events:[O,P,B],options:{name:"DropTarget",group:"default"},destroy:function(){var e,t=this.options.group,n=T[t]||S[t];if(n.length>1){for(_.fn.destroy.call(this),e=0;et.max?t.max:t.min;e._moveTo(n)},_moveTo:function(e){this.transition.moveTo({location:e,duration:m,ease:p.easeOutExpo})}}),z=f.extend({init:function(e){var n=this;t.effects.Animation.fn.init.call(this),o(n,e,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return h(this.offset.y)');o(n,t,{element:r,elementSize:0,movable:new d(r),scrollMovable:t.movable,size:i?"width":"height"}),n.scrollMovable.bind(T,a(n._move,n)),n.container.append(r)},_move:function(){var e=this,t=e.axis,n=e.dimension,i=n.size,r=e.scrollMovable,a=i/n.total,o=Math.round(-r[t]*a),s=Math.round(i*a);o+s>i?s=i-o:0>o&&(s+=o,o=0),e.elementSize!=s&&(e.element.css(e.size,s+"px"),e.elementSize=s),e.movable.moveAxis(t,o)},show:function(){this.element.css({opacity:g,visibility:"visible"})},hide:function(){this.element.css({opacity:0})}}),A=s.extend({init:function(n,i){var r,a,l,p,f,m,g,v,_,k=this;return s.fn.init.call(k,n,i),n=k.element,k._native=k.options.useNative&&t.support.hasNativeScrolling,k._native?(n.addClass("km-native-scroller").prepend('
    '),o(k,{scrollElement:n,fixedContainer:n.children().first()}),undefined):(n.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('
    ').prepend('
    '),r=n.children().eq(1),a=new t.TapCapture(n),l=new d(r),p=new u({element:r,container:n,forcedEnabled:k.options.zoom}),f=this.options.avoidScrolling,m=new t.UserEvents(n,{allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:k.options.zoom,start:function(t){p.refresh();var n=h(t.x.velocity),i=h(t.y.velocity),r=2*n>=i,a=e.contains(k.fixedContainer[0],t.event.target),o=2*i>=n;!a&&!f(t)&&k.enabled&&(p.x.enabled&&r||p.y.enabled&&o)?m.capture():m.cancel()}}),g=new c({movable:l,dimensions:p,userEvents:m,elastic:k.options.elastic}),v=new F({movable:l,dimensions:p,userEvents:m,tapCapture:a}),_=new z({moveTo:function(e){k.scrollTo(e.x,e.y)}}),l.bind(T,function(){k.scrollTop=-l.y,k.scrollLeft=-l.x,k.trigger(D,{scrollTop:k.scrollTop,scrollLeft:k.scrollLeft})}),o(k,{movable:l,dimensions:p,zoomSnapBack:v,animatedScroller:_,userEvents:m,pane:g,tapCapture:a,pulled:!1,enabled:!0,scrollElement:r,scrollTop:0,scrollLeft:0,fixedContainer:n.children().first()}),k._initAxis("x"),k._initAxis("y"),p.refresh(),k.options.pullToRefresh&&k._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(),e.userEvents.cancel()},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",a(e._paneChange,e)),e.userEvents.bind("end",a(e._dragEnd,e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(w).addClass(x),e.hintContainer.html(e.refreshTemplate({})),e.yinertia.freeze(e.options.pullOffset/2),e.trigger("pull"))},_paneChange:function(){var e=this;e.movable.y/b>e.options.pullOffset?e.pulled||(e.pulled=!0,e.refreshHint.removeClass(x).addClass(w),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(w),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var t=this,n=t.movable,i=t.dimensions[e],r=t.tapCapture,a=new H({axis:e,movable:n,dimension:i,container:t.element});t.pane[e].bind(T,function(){a.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(){a.hide(),t.trigger("scrollEnd",{axis:e,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft})}})}});r.plugin(A)}(window.kendo.jQuery),function(e){function t(e){return e.position().top+3}var n=window.kendo,i=n.ui.Widget,r=e.proxy,a=!1,o=".kendoGroupable",s=n.template('',{useWithBlock:!1}),l=function(t){return e('
    ').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(t.attr(n.attr("title"))||t.attr(n.attr("field"))).prepend('')},d=e('
    '),c=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,u=i.extend({init:function(s,c){var u,p,f,h=this,m=n.guid(),g=r(h._intializePositions,h),v=h._dropCuePositions=[];i.fn.init.call(h,s,c),a=n.support.isRtl(s),f=a?"right":"left",h.draggable=p=h.options.draggable||new n.ui.Draggable(h.element,{filter:h.options.draggableElements,hint:l,group:m}),u=h.groupContainer=e(h.options.groupContainer,h.element).kendoDropTarget({group:p.options.group,dragenter:function(e){h._canDrag(e.draggable.currentTarget)&&(e.draggable.hint.find(".k-drag-status").removeClass("k-denied").addClass("k-add"),d.css("top",t(u)).css(f,0).appendTo(u))},dragleave:function(e){e.draggable.hint.find(".k-drag-status").removeClass("k-add").addClass("k-denied"),d.remove()},drop:function(t){var i,r=t.draggable.currentTarget,o=r.attr(n.attr("field")),s=r.attr(n.attr("title")),l=h.indicator(o),c=h._dropCuePositions,u=c[c.length-1];(r.hasClass("k-group-indicator")||h._canDrag(r))&&(u?(i=h._dropCuePosition(n.getOffset(d).left+parseInt(u.element.css("marginLeft"),10)*(a?-1:1)+parseInt(u.element.css("marginRight"),10)),i&&h._canDrop(e(l),i.element,i.left)&&(i.before?i.element.before(l||h.buildIndicator(o,s)):i.element.after(l||h.buildIndicator(o,s)),h._change())):(h.groupContainer.append(h.buildIndicator(o,s)),h._change()))}}).kendoDraggable({filter:"div.k-group-indicator",hint:l,group:p.options.group,dragcancel:r(h._dragCancel,h),dragstart:function(e){var n=e.currentTarget,i=parseInt(n.css("marginLeft"),10),r=n.position(),o=a?r.left-i:r.left+n.outerWidth();g(),d.css({top:t(u),left:o}).appendTo(u),this.hint.find(".k-drag-status").removeClass("k-denied").addClass("k-add")},dragend:function(){h._dragEnd(this)},drag:r(h._drag,h)}).on("click"+o,".k-button",function(t){t.preventDefault(),h._removeIndicator(e(this).parent())}).on("click"+o,".k-link",function(t){var i=e(this).parent(),r=h.buildIndicator(i.attr(n.attr("field")),i.attr(n.attr("title")),"asc"==i.attr(n.attr("dir"))?"desc":"asc");i.before(r).remove(),h._change(),t.preventDefault()}),p.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){h._dragEnd(this)},dragcancel:r(h._dragCancel,h),dragstart:function(e){var t,n,i;return h.options.allowDrag||h._canDrag(e.currentTarget)?(g(),v.length?(t=v[v.length-1].element,n=parseInt(t.css("marginRight"),10),i=t.position().left+t.outerWidth()+n):i=0,undefined):(e.preventDefault(),undefined)},drag:r(h._drag,h)}),h.dataSource=h.options.dataSource,h.dataSource&&(h._refreshHandler=r(h.refresh,h),h.dataSource.bind("change",h._refreshHandler)) },refresh:function(){var t=this,i=t.dataSource;t.groupContainer.empty().append(e.map(i.group()||[],function(e){var i=e.field.replace(c,"\\$1"),r=t.element.find(t.options.filter).filter("["+n.attr("field")+"="+i+"]");return t.buildIndicator(e.field,r.attr(n.attr("title")),e.dir)}).join("")),t._invalidateGroupContainer()},destroy:function(){var e=this;i.fn.destroy.call(e),e.groupContainer.off(o),e.groupContainer.data("kendoDropTarget")&&e.groupContainer.data("kendoDropTarget").destroy(),e.groupContainer.data("kendoDraggable")&&e.groupContainer.data("kendoDraggable").destroy(),e.options.draggable||e.draggable.destroy(),e.dataSource&&e._refreshHandler&&e.dataSource.unbind("change",e._refreshHandler)},options:{name:"Groupable",filter:"th",draggableElements:"th",messages:{empty:"Drag a column header and drop it here to group by that column"}},indicator:function(t){var i=e(".k-group-indicator",this.groupContainer);return e.grep(i,function(i){return e(i).attr(n.attr("field"))===t})[0]},buildIndicator:function(e,t,i){return s({field:e.replace(/"/g,"'"),dir:i,title:t,ns:n.ns})},descriptors:function(){var t,i,r,a,o,s=this,l=e(".k-group-indicator",s.groupContainer);return t=s.element.find(s.options.filter).map(function(){var t=e(this),r=t.attr(n.attr("aggregates")),s=t.attr(n.attr("field"));if(r&&""!==r)for(i=r.split(","),r=[],a=0,o=i.length;o>a;a++)r.push({field:s,aggregate:i[a]});return r}).toArray(),e.map(l,function(i){return i=e(i),r=i.attr(n.attr("field")),{field:r,dir:i.attr(n.attr("dir")),aggregates:t||[]}})},_removeIndicator:function(e){var t=this;e.remove(),t._invalidateGroupContainer(),t._change()},_change:function(){var e=this;e.dataSource&&e.dataSource.group(e.descriptors())},_dropCuePosition:function(t){var n,i,r,o,s,l=this._dropCuePositions;if(d.is(":visible")&&0!==l.length)return t=Math.ceil(t),n=l[l.length-1],i=n.left,r=n.right,o=parseInt(n.element.css("marginLeft"),10),s=parseInt(n.element.css("marginRight"),10),t>=r&&!a||i>t&&a?t={left:n.element.position().left+(a?-o:n.element.outerWidth()+s),element:n.element,before:!1}:(t=e.grep(l,function(e){return e.left<=t&&t<=e.right||a&&t>e.right})[0],t&&(t={left:a?t.element.position().left+t.element.outerWidth()+s:t.element.position().left-o,element:t.element,before:!0})),t},_drag:function(e){var t=this._dropCuePosition(e.x.location);t&&d.css({left:t.left,right:"auto"})},_canDrag:function(e){var t=e.attr(n.attr("field"));return"false"!=e.attr(n.attr("groupable"))&&t&&(e.hasClass("k-group-indicator")||!this.indicator(t))},_canDrop:function(e,t,n){var i=e.next(),r=e[0]!==t[0]&&(!i[0]||t[0]!==i[0]||!a&&n>i.position().left||a&&n
    '),o.find(l.options.filter).kendoDropTarget({group:l.options.group,dragenter:function(e){if(d._draggable){var i,r=this.element,a=r[0]===d._draggable[0];t(e.draggable.hint,a),a||(i=n.getOffset(r),d.reorderDropCue.css({height:r.outerHeight(),top:i.top,left:i.left+(r.index()>d._draggable.index()?r.outerWidth():0)}).appendTo(document.body))}},dragleave:function(e){t(e.draggable.hint,!0),d.reorderDropCue.remove()},drop:function(){if(d._draggable){var e,t=d._draggable[0],n=this.element[0];t!==n&&(e=o.find(l.options.filter),d.trigger(r,{element:d._draggable,oldIndex:e.index(t),newIndex:e.index(n)}))}}}),l.bind(["dragcancel","dragend","dragstart"],{dragcancel:function(){d.reorderDropCue.remove(),d._draggable=null},dragend:function(){d.reorderDropCue.remove(),d._draggable=null},dragstart:function(e){d._draggable=e.currentTarget}})},options:{name:"Reorderable",filter:"*"},events:[r],destroy:function(){var e=this;i.fn.destroy.call(e),e.draggable&&e.draggable.destroy(),n.destroy(e.element)}});n.ui.plugin(o)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,a=e.proxy,o=n.isFunction,s=e.extend,l="horizontal",d="vertical",c="start",u="resize",p="resizeend",f=r.extend({init:function(e,t){var n=this;r.fn.init.call(n,e,t),n.orientation=n.options.orientation.toLowerCase()!=d?l:d,n._positionMouse=n.orientation==l?"x":"y",n._position=n.orientation==l?"left":"top",n._sizingDom=n.orientation==l?"outerWidth":"outerHeight",n.draggable=new i.Draggable(e,{distance:0,filter:t.handle,drag:a(n._resize,n),dragcancel:a(n._cancel,n),dragstart:a(n._start,n),dragend:a(n._stop,n)}),n.userEvents=n.draggable.userEvents},events:[u,p,c],options:{name:"Resizable",orientation:l},resize:function(){},_max:function(e){var n=this,i=n.hint?n.hint[n._sizingDom]():0,r=n.options.max;return o(r)?r(e):r!==t?n._initialElementPosition+r-i:r},_min:function(e){var n=this,i=n.options.min;return o(i)?i(e):i!==t?n._initialElementPosition+i:i},_start:function(t){var n=this,i=n.options.hint,r=e(t.currentTarget);n._initialElementPosition=r.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,i&&(n.hint=o(i)?e(i(r)):i,n.hint.css({position:"absolute"}).css(n._position,n._initialElementPosition).appendTo(n.element)),n.trigger(c,t),n._maxPosition=n._max(t),n._minPosition=n._min(t),e(document.body).css("cursor",r.css("cursor"))},_resize:function(e){var n,i=this,r=i._maxPosition,a=i._minPosition,o=i._initialElementPosition+(e[i._positionMouse].location-i._initialMousePosition);n=a!==t?Math.max(a,o):o,i.position=n=r!==t?Math.min(r,n):n,i.hint&&i.hint.toggleClass(i.options.invalidClass||"",n==r||n==a).css(i._position,n),i.resizing=!0,i.trigger(u,s(e,{position:n}))},_stop:function(t){var n=this;n.hint&&n.hint.remove(),n.resizing=!1,n.trigger(p,s(t,{position:n.position})),e(document.body).css("cursor","")},_cancel:function(e){var n=this;n.hint&&(n.position=t,n.hint.css(n._position,n._initialElementPosition),n._stop(e))},destroy:function(){var e=this;r.fn.destroy.call(e),e.draggable&&e.draggable.destroy()},press:function(e){if(e){var t=e.position(),n=this;n.userEvents.press(t.left,t.top,e[0]),n.targetPosition=t,n.target=e}},move:function(e){var n=this,i=n._position,r=n.targetPosition,a=n.position;a===t&&(a=r[i]),r[i]=a+e,n.userEvents.move(r.left,r.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});n.ui.plugin(f)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.proxy,r="dir",a="asc",o="single",s="field",l="desc",d=".kendoSortable",c=".k-link",u="aria-sort",p=n.ui.Widget,f=p.extend({init:function(e,t){var n,r=this;p.fn.init.call(r,e,t),r._refreshHandler=i(r.refresh,r),r.dataSource=r.options.dataSource.bind("change",r._refreshHandler),n=r.element.find(c),n[0]||(n=r.element.wrapInner('').find(c)),r.link=n,r.element.on("click"+d,i(r._click,r))},options:{name:"Sortable",mode:o,allowUnsort:!0,compare:null,filter:""},destroy:function(){var e=this;p.fn.destroy.call(e),e.element.off(d),e.dataSource.unbind("change",e._refreshHandler)},refresh:function(){var t,i,o,d,c=this,p=c.dataSource.sort()||[],f=c.element,h=f.attr(n.attr(s));for(f.removeAttr(n.attr(r)),f.removeAttr(u),t=0,i=p.length;i>t;t++)o=p[t],h==o.field&&f.attr(n.attr(r),o.dir);d=f.attr(n.attr(r)),f.find(".k-i-arrow-n,.k-i-arrow-s").remove(),d===a?(e('').appendTo(c.link),f.attr(u,"ascending")):d===l&&(e('').appendTo(c.link),f.attr(u,"descending"))},_click:function(e){var i,d,c=this,u=c.element,p=u.attr(n.attr(s)),f=u.attr(n.attr(r)),h=c.options,m=null==c.options.compare?t:c.options.compare,g=c.dataSource.sort()||[];if(e.preventDefault(),!h.filter||u.is(h.filter)){if(f=f===a?l:f===l&&h.allowUnsort?t:a,h.mode===o)g=[{field:p,dir:f,compare:m}];else if("multiple"===h.mode){for(i=0,d=g.length;d>i;i++)if(g[i].field===p){g.splice(i,1);break}g.push({field:p,dir:f,compare:m})}c.dataSource.sort(g)}}});n.ui.plugin(f)}(window.kendo.jQuery),function(e){function t(e,t){var n=r.getOffset(e),i=t.left+t.width,a=t.top+t.height;return n.right=n.left+e.outerWidth(),n.bottom=n.top+e.outerHeight(),!(n.left>i||n.righta||n.bottoma;a++)s=e.eq(a),t(s,i)?s.hasClass(d)?r&&n!==s[0]&&s.removeClass(d).addClass(h):s.hasClass(c)||s.hasClass(h)||s.addClass(c):s.hasClass(c)?s.removeClass(c):r&&s.hasClass(h)&&s.removeClass(h).addClass(d)}var i,r=window.kendo,a=r.ui.Widget,o=e.proxy,s=Math.abs,l="aria-selected",d="k-state-selected",c="k-state-selecting",u="k-selectable",p="change",f=".kendoSelectable",h="k-state-unselecting",m=!1;!function(e){!function(){e('
    ').on("click",">*",function(){m=!0}).find("span").click().end().off()}()}(e),i=a.extend({init:function(t,n){var i,s=this;a.fn.init.call(s,t,n),s._marquee=e("
    "),s._lastActive=null,s.element.addClass(u),i=s.options.multiple,s.userEvents=new r.UserEvents(s.element,{global:!0,allowSelection:!0,filter:(m?"":"."+u+" ")+s.options.filter,tap:o(s._tap,s)}),i&&s.userEvents.bind("start",o(s._start,s)).bind("move",o(s._move,s)).bind("end",o(s._end,s)).bind("select",o(s._select,s))},events:[p],options:{name:"Selectable",filter:">*",multiple:!1},_tap:function(t){var n,i=e(t.target),r=this,a=t.event.ctrlKey||t.event.metaKey,o=r.options.multiple,s=o&&t.event.shiftKey,l=t.event.which,c=t.event.button;i.closest("."+u)[0]!==r.element[0]||l&&3==l||c&&2==c||(n=i.hasClass(d),o&&a||r.clear(),s?r.selectRange(r._firstSelectee(),i):(n&&a?(r._unselect(i),r._notify(p)):r.value(i),r._lastActive=r._downTarget=i))},_start:function(t){var n=this,i=e(t.target),r=i.hasClass(d),a=t.event.ctrlKey||t.event.metaKey;return n._downTarget=i,i.closest("."+u)[0]!==n.element[0]?(n.userEvents.cancel(),n._downTarget=null,undefined):(n._marquee.appendTo(document.body).css({left:t.x.client+1,top:t.y.client+1,width:0,height:0}),a||n.clear(),r&&(n._selectElement(i,!0),a&&i.addClass(h)),undefined)},_move:function(e){var t=this,i={left:e.x.startLocation>e.x.location?e.x.location:e.x.startLocation,top:e.y.startLocation>e.y.location?e.y.location:e.y.startLocation,width:s(e.x.initialDelta),height:s(e.y.initialDelta)},r=t.element.find(t.options.filter);t._marquee.css(i),n(r,t._downTarget[0],i,e.event.ctrlKey||e.event.metaKey),e.preventDefault()},_end:function(){var e=this;e._marquee.remove(),e._unselect(e.element.find(e.options.filter+"."+h)).removeClass(h),e.value(e.element.find(e.options.filter+"."+c)),e._lastActive=e._downTarget},value:function(e){var t=this,n=o(t._selectElement,t);return e?(e.each(function(){n(this)}),t._notify(p),undefined):t.element.find(t.options.filter+"."+d)},_firstSelectee:function(){var e,t=this;return null!==t._lastActive?t._lastActive:(e=t.value(),e.length>0?e[0]:t.element.find(t.options.filter))},_selectElement:function(t,n){var i=e(t),r=!n&&this._notify("select",{element:t});i.removeClass(c),r||(i.addClass(d),this.options.aria&&i.attr(l,!0))},_notify:function(e,t){return t=t||{},this.trigger(e,t)},_unselect:function(e){return e.removeClass(d),this.options.aria&&e.attr(l,!1),e},_select:function(t){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,a,s,l=this,c=!1,u=l.element.find(l.options.filter),f=o(l._selectElement,l);for(t=e(t)[0],n=e(n)[0],i=0,r=u.length;r>i;i++)s=u[i],c?(f(s),c=s!==n):s===t?(c=t!==n,f(s)):s===n?(a=t,t=n,n=a,c=!0,f(s)):e(s).removeClass(d);l._notify(p)},destroy:function(){var e=this;a.fn.destroy.call(e),e.element.off(f),e.userEvents.destroy()}}),r.ui.plugin(i)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui.Widget,r=e.proxy,a=n.keys,o="click",s="k-button",l="k-button-icon",d="k-button-icontext",c=".kendoButton",u="disabled",p="k-state-disabled",f="k-state-focused",h="k-state-selected",m=i.extend({init:function(e,t){var a=this;i.fn.init.call(a,e,t),e=a.wrapper=a.element,t=a.options,e.addClass(s).attr("role","button"),t.enable=t.enable&&!e.attr(u),a.enable(t.enable),a._tabindex(),a._graphics(),e.on(o+c,r(a._click,a)).on("focus"+c,r(a._focus,a)).on("blur"+c,r(a._blur,a)).on("keydown"+c,r(a._keydown,a)).on("keyup"+c,r(a._keyup,a)),n.notify(a)},events:[o],options:{name:"Button",icon:"",spriteCssClass:"",imageUrl:"",enable:!0},_isNativeButton:function(){return"button"==this.element.prop("tagName").toLowerCase()},_click:function(e){this.options.enable&&this.trigger(o,{event:e})},_focus:function(){this.options.enable&&this.element.addClass(f)},_blur:function(){this.element.removeClass(f)},_keydown:function(e){var t=this;t._isNativeButton()||(e.keyCode==a.ENTER||e.keyCode==a.SPACEBAR)&&(e.keyCode==a.SPACEBAR&&(e.preventDefault(),t.options.enable&&t.element.addClass(h)),t._click(e))},_keyup:function(){this.element.removeClass(h)},_graphics:function(){var t,n,i,r=this,a=r.element,o=r.options,s=o.icon,c=o.spriteCssClass,u=o.imageUrl;(c||u||s)&&(i=!0,a.contents().not("span.k-sprite").not("span.k-icon").not("img.k-image").each(function(t,n){(1==n.nodeType||3==n.nodeType&&e.trim(n.nodeValue).length>0)&&(i=!1)}),i?a.addClass(l):a.addClass(d)),s?(t=a.children("span.k-icon").first(),t[0]||(t=e('').prependTo(a)),t.addClass("k-i-"+s)):c?(t=a.children("span.k-sprite").first(),t[0]||(t=e('').prependTo(a)),t.addClass(c)):u&&(n=a.children("img.k-image").first(),n[0]||(n=e('icon').prependTo(a)),n.attr("src",u))},enable:function(e){var n=this,i=n.element;e===t&&(e=!0),e=!!e,n.options.enable=e,i.toggleClass(p,!e).attr("aria-disabled",!e).attr(u,!e)}});n.ui.plugin(m)}(window.kendo.jQuery),function(e,t){function n(e,t,n,i,r){return e({idx:t,text:n,ns:d.ns,numeric:i,title:r||""})}function i(e,t,n){return w({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 a(e,t){r(e,f,1,1>=t)}function o(e,t){r(e,m,Math.max(1,t-1),1>=t)}function s(e,t,n){r(e,g,Math.min(n,t+1),t>=n)}function l(e,t,n){r(e,h,n,t>=n)}var d=window.kendo,c=d.ui,u=c.Widget,p=e.proxy,f=".k-i-seek-w",h=".k-i-seek-e",m=".k-i-arrow-w",g=".k-i-arrow-e",v="change",_=".kendoPager",k="click",b="keydown",y="disabled",w=d.template('
    #=text#'),x=u.extend({init:function(t,n){var r,c,y=this;u.fn.init.call(y,t,n),n=y.options,y.dataSource=d.data.DataSource.create(n.dataSource),y.linkTemplate=d.template(y.options.linkTemplate),y.selectTemplate=d.template(y.options.selectTemplate),r=y.page(),c=y.totalPages(),y._refreshHandler=p(y.refresh,y),y.dataSource.bind(v,y._refreshHandler),n.previousNext&&(y.element.find(f).length||(y.element.append(i(f,n.messages.first,"k-pager-first")),a(y.element,r,c)),y.element.find(m).length||(y.element.append(i(m,n.messages.previous)),o(y.element,r,c))),n.numeric&&(y.list=y.element.find(".k-pager-numbers"),y.list.length||(y.list=e('
      ').appendTo(y.element))),n.input&&(y.element.find(".k-pager-input").length||y.element.append(''+n.messages.page+''+d.format(n.messages.of,c)+""),y.element.on(b+_,".k-pager-input input",p(y._keydown,y))),n.previousNext&&(y.element.find(g).length||(y.element.append(i(g,n.messages.next)),s(y.element,r,c)),y.element.find(h).length||(y.element.append(i(h,n.messages.last,"k-pager-last")),l(y.element,r,c))),n.pageSizes&&(y.element.find(".k-pager-sizes").length||e(''+d.format(h.messages.of,v)).find("input").val(f).attr(y,1>g).toggleClass("k-state-disabled",1>g),h.previousNext&&(a(c.element,f,v),o(c.element,f,v),s(c.element,f,v),l(c.element,f,v)),h.pageSizes&&c.element.find(".k-pager-sizes select").val(m).filter("["+d.attr("role")+"=dropdownlist]").kendoDropDownList("value",m).kendoDropDownList("text",m)}},_keydown:function(e){if(e.keyCode===d.keys.ENTER){var t=this.element.find(".k-pager-input").find("input"),n=parseInt(t.val(),10);(isNaN(n)||1>n||n>this.totalPages())&&(n=this.page()),t.val(n),this.page(n)}},_refreshClick:function(e){e.preventDefault(),this.dataSource.read()},_change:function(e){var t=parseInt(e.currentTarget.value,10);isNaN(t)||this.dataSource.pageSize(t)},_click:function(t){var n=e(t.currentTarget);t.preventDefault(),n.is(".k-state-disabled")||this.page(n.attr(d.attr("page")))},totalPages:function(){return Math.ceil((this.dataSource.total()||0)/this.pageSize())},pageSize:function(){return this.dataSource.pageSize()||this.dataSource.total()},page:function(e){return e===t?this.dataSource.total()>0?this.dataSource.page():0:(this.dataSource.page(e),this.trigger(v,{index:e}),t)}});c.plugin(x)}(window.kendo.jQuery),function(e){function t(t,n){return t===n||e.contains(t,n)}var n=window.kendo,i=n.ui,r=i.Widget,a=n.support,o=n.getOffset,s=n._activeElement,l="open",d="close",c="deactivate",u="activate",p="center",f="left",h="right",m="top",g="bottom",v="absolute",_="hidden",k="body",b="location",y="position",w="visible",x="effects",C="k-state-active",T="k-state-border",S=/k-state-border-(\w+)/,D=".k-picker-wrap, .k-dropdown-wrap, .k-link",F="down",E=e(window),z=e(document.documentElement),H="resize scroll",A=a.transitions.css,M=A+"transform",I=e.extend,R=".kendoPopup",N=["font-family","font-size","font-stretch","font-style","font-weight","line-height"],O=r.extend({init:function(t,i){var a,o=this;i=i||{},i.isRtl&&(i.origin=i.origin||g+" "+h,i.position=i.position||m+" "+h),r.fn.init.call(o,t,i),t=o.element,i=o.options,o.collisions=i.collision?i.collision.split(" "):[],1===o.collisions.length&&o.collisions.push(o.collisions[0]),a=e(o.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),i.appendTo=e(e(i.appendTo)[0]||a[0]||k),o.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!i.isRtl).css({position:v}).appendTo(i.appendTo).on("mouseenter"+R,function(){o._hovered=!0}).on("mouseleave"+R,function(){o._hovered=!1}),o.wrapper=e(),i.animation===!1&&(i.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),I(i.animation.open,{complete:function(){o.wrapper.css({overflow:w}),o.trigger(u)}}),I(i.animation.close,{complete:function(){o.wrapper.hide();var r,a,s=o.wrapper.data(b),l=e(i.anchor);s&&o.wrapper.css(s),i.anchor!=k&&(r=(l[0].className.match(S)||["","down"])[1],a=T+"-"+r,l.removeClass(a).children(D).removeClass(C).removeClass(a),t.removeClass(T+"-"+n.directions[r].reverse)),o._closing=!1,o.trigger(c)}}),o._mousedownProxy=function(e){o._mousedown(e)},o._resizeProxy=function(e){o._resize(e)},i.toggleTarget&&e(i.toggleTarget).on(i.toggleEvent+R,e.proxy(o.toggle,o))},events:[l,u,d,c],options:{name:"Popup",toggleEvent:"click",origin:g+" "+f,position:m+" "+f,anchor:k,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},destroy:function(){var t,i=this,a=i.options,o=i.element.off(R);r.fn.destroy.call(i),a.toggleTarget&&e(a.toggleTarget).off(R),a.modal||(z.unbind(F,i._mousedownProxy),E.unbind(H,i._resizeProxy)),n.destroy(i.element.children()),a.appendTo[0]===document.body&&(t=o.parent(".k-animation-container"),t[0]?t.remove():o.remove())},open:function(t,i){var r,o,s,d=this,c={isFixed:!isNaN(parseInt(i,10)),x:t,y:i},u=d.element,p=d.options,f="down",h=e(p.anchor);if(!d.visible()){if(p.copyAnchorStyles&&u.css(n.getComputedStyles(h[0],N)),u.data("animating")||d.trigger(l))return;p.modal||(z.unbind(F,d._mousedownProxy).bind(F,d._mousedownProxy),a.mobileOS.ios||a.mobileOS.android||E.unbind(H,d._resizeProxy).bind(H,d._resizeProxy)),d.wrapper=o=n.wrap(u,p.autosize).css({overflow:_,display:"block",position:v}),a.mobileOS.android&&o.add(h).css(M,"translatez(0)"),o.css(y),e(p.appendTo)[0]==document.body&&o.css(m,"-10000px"),r=I(!0,{},p.animation.open),d.flipped=d._position(c),r.effects=n.parseEffects(r.effects,d.flipped),f=r.effects.slideIn?r.effects.slideIn.direction:f,p.anchor!=k&&(s=T+"-"+f,u.addClass(T+"-"+n.directions[f].reverse),h.addClass(s).children(D).addClass(C).addClass(s)),u.data(x,r.effects).kendoStop(!0).kendoAnimate(r)}},toggle:function(){var e=this;e[e.visible()?d:l]()},visible:function(){return this.element.is(":"+w)},close:function(){var t,i,r,a,o=this,s=o.options;if(o.visible()){if(t=o.wrapper[0]?o.wrapper:n.wrap(o.element).hide(),o._closing||o.trigger(d))return;o.element.find(".k-popup").each(function(){var t=e(this),n=t.data("kendoPopup");n&&n.close()}),z.unbind(F,o._mousedownProxy),E.unbind(H,o._resizeProxy),i=I(!0,{},s.animation.close),r=o.element.data(x),a=i.effects,!a&&!n.size(a)&&r&&n.size(r)&&(i.effects=r,i.reverse=!0),o._closing=!0,o.element.kendoStop(!0),t.css({overflow:_}),o.element.kendoAnimate(i)}},_resize:function(e){var n=this;"resize"===e.type?(clearTimeout(n._resizeTimeout),n._resizeTimeout=setTimeout(function(){n._position(),n._resizeTimeout=null},50)):n._hovered||t(n.element[0],s())||n.close()},_mousedown:function(i){var r=this,a=r.element[0],o=r.options,s=e(o.anchor)[0],l=o.toggleTarget,d=n.eventTarget(i),c=e(d).closest(".k-popup"),u=c.parent().parent(".km-shim").length;c=c[0],(u||!c||c===r.element[0])&&"popover"!==e(i.target).closest("a").data("rel")&&(t(a,d)||t(s,d)||l&&t(e(l)[0],d)||r.close())},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),0>e&&(i=-e),i},_flip:function(e,t,n,i,r,a,o){var s=0;return o=o||t,a!==r&&a!==p&&r!==p&&(e+o>i&&(s+=-(n+t)),0>e+s&&(s+=n+t)),s},_position:function(t){var n,i,r,s,l,d,c,u,p,f=this,h=f.element.css(y,""),m=f.wrapper,g=f.options,_=e(g.viewport),k=e(_).offset(),w=e(g.anchor),x=g.origin.toLowerCase().split(" "),C=g.position.toLowerCase().split(" "),T=f.collisions,S=a.zoomLevel(),D=10002,F=0,E=w.parents().filter(m.siblings());if(E[0])if(i=Number(e(E).css("zIndex")))D=i+1;else for(n=w.parentsUntil(E),r=n.length;r>F;F++)i=Number(e(n[F]).css("zIndex")),i&&i>D&&(D=i+1);return m.css("zIndex",D),t&&t.isFixed?m.css({left:t.x,top:t.y}):m.css(f._align(x,C)),s=o(m,y,w[0]===m.offsetParent()[0]),l=o(m),d=w.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),d.length&&(s=o(m,y,!0),l=o(m)),_[0]===window?(l.top-=window.pageYOffset||document.documentElement.scrollTop||0,l.left-=window.pageXOffset||document.documentElement.scrollLeft||0):(l.top-=k.top,l.left-=k.left),f.wrapper.data(b)||m.data(b,I({},s)),c=I({},l),u=I({},s),"fit"===T[0]&&(u.top+=f._fit(c.top,m.outerHeight(),_.height()/S)),"fit"===T[1]&&(u.left+=f._fit(c.left,m.outerWidth(),_.width()/S)),p=I({},u),"flip"===T[0]&&(u.top+=f._flip(c.top,h.outerHeight(),w.outerHeight(),_.height()/S,x[0],C[0],m.outerHeight())),"flip"===T[1]&&(u.left+=f._flip(c.left,h.outerWidth(),w.outerWidth(),_.width()/S,x[1],C[1],m.outerWidth())),h.css(y,v),m.css(u),u.left!=p.left||u.top!=p.top},_align:function(t,n){var i,r=this,a=r.wrapper,s=e(r.options.anchor),l=t[0],d=t[1],c=n[0],u=n[1],f=o(s),m=e(r.options.appendTo),v=a.outerWidth(),_=a.outerHeight(),k=s.outerWidth(),b=s.outerHeight(),y=f.top,w=f.left,x=Math.round;return m[0]!=document.body&&(i=o(m),y-=i.top,w-=i.left),l===g&&(y+=b),l===p&&(y+=x(b/2)),c===g&&(y-=_),c===p&&(y-=x(_/2)),d===h&&(w+=k),d===p&&(w+=x(k/2)),u===h&&(w-=v),u===p&&(w-=x(v/2)),{top:y,left:w}}});i.plugin(O)}(window.kendo.jQuery),function(e){function t(e){for(;e.length;)n(e),e=e.parent()}function n(e){var t=e.data(a.ns+"title");t&&(e.attr("title",t),e.removeData(a.ns+"title"))}function i(e){var t=e.attr("title");t&&(e.data(a.ns+"title",t),e.attr("title",""))}function r(e){for(;e.length&&!e.is("body");)i(e),e=e.parent()}var a=window.kendo,o=a.ui.Widget,s=a.ui.Popup,l=a.isFunction,d=e.isPlainObject,c=e.extend,u=e.proxy,p=e(document),f=a.isLocalUrl,h="_tt_active",m="aria-describedby",g="show",v="hide",_="error",k="contentLoad",b="requestStart",y="k-content-frame",w='',x=a.template(""),C=".kendoTooltip",T={bottom:{origin:"bottom center",position:"top center"},top:{origin:"top center",position:"bottom center"},left:{origin:"center left",position:"center right",collision:"fit flip"},right:{origin:"center right",position:"center left",collision:"fit flip"},center:{position:"center center",origin:"center center"}},S={top:"bottom",bottom:"top",left:"right",right:"left",center:"center"},D={bottom:"n",top:"s",left:"e",right:"w",center:"n"},F={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}},E=function(e){return e.target.data(a.ns+"title")},z=o.extend({init:function(e,t){var n,i=this;o.fn.init.call(i,e,t),n=i.options.position.match(/left|right/)?"horizontal":"vertical",i.dimensions=F[n],i._documentKeyDownHandler=u(i._documentKeyDown,i),i.element.on(i.options.showOn+C,i.options.filter,u(i._showOn,i)).on("mouseenter"+C,i.options.filter,u(i._mouseenter,i)),this.options.autoHide&&i.element.on("mouseleave"+C,i.options.filter,u(i._mouseleave,i))},options:{name:"Tooltip",filter:"",content:E,showAfter:100,callout:!0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{effects:"fade:out",duration:40,hide:!0}}},events:[g,v,k,_,b],_mouseenter:function(t){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,o=n.options.iframe;d(i)&&i.url?("iframe"in n.options||(o=!f(i.url)),n.trigger(b,{options:i,target:e}),o?(r.hide(),t=r.find("."+y)[0],t?t.src=i.url||t.src:r.html(x({content:i})),r.find("."+y).off("load"+C).on("load"+C,function(){n.trigger(k),r.show()})):(r.empty(),a.ui.progress(r,!0),n._ajaxRequest(i))):i&&l(i)?(i=i({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){a.ui.progress(t.content,!1),t.trigger(_,{status:n,xhr:e})},success:u(function(e){a.ui.progress(t.content,!1),t.content.html(e),t.trigger(k)},t)},e))},_documentKeyDown:function(e){e.keyCode===a.keys.ESC&&this.hide()},refresh:function(){var e=this,t=e.popup;t&&t.options.anchor&&e._appendContent(t.options.anchor)},hide:function(){this.popup&&this.popup.close()},show:function(e){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(m),this.element.removeAttr("id").attr("aria-hidden",!0),p.off("keydown"+C,n._documentKeyDownHandler)}),n.popup.open()},_initPopup:function(){var t=this,n=t.options,i=e(a.template(w)({callout:n.callout&&"center"!==n.position,dir:D[n.position],autoHide:n.autoHide}));t.popup=new s(i,c({activate:function(){var e=this.options.anchor,i=e[0].id||t.element[0].id;i&&(e.attr(m,i+h),this.element.attr("id",i+h)),n.callout&&t._positionCallout(),this.element.removeAttr("aria-hidden"),p.on("keydown"+C,t._documentKeyDownHandler),t.trigger(g)},close:function(){t.trigger(v)},copyAnchorStyles:!1,animation:n.animation},T[n.position])),i.css({width:n.width,height:n.height}),t.content=i.find(".k-tooltip-content"),t.arrow=i.find(".k-callout"),n.autoHide?i.on("mouseleave"+C,u(t._mouseleave,t)):i.on("click"+C,".k-tooltip-button",u(t._closeButtonClick,t))},_closeButtonClick:function(e){e.preventDefault(),this.hide()},_mouseleave:function(n){if(this.popup){var i=e(n.currentTarget),r=i.offset(),a=n.pageX,o=n.pageY;if(r.right=r.left+i.outerWidth(),r.bottom=r.top+i.outerHeight(),a>r.left&&ar.top&&o').css({overflow:s.kineticScrollNeeded?"":"auto"}).on("mouseenter"+o,u,function(){e(this).addClass(m)}).on("mouseleave"+o,u,function(){e(this).removeClass(m)}).on("click"+o,u,T(r._click,r)).attr({tabIndex:-1,role:"listbox","aria-hidden":!0}),r.list=e("
      ").append(r.ul).on("mousedown"+o,function(e){e.preventDefault()}),i=t.attr(c),i&&(r.list.attr(c,i+"-list"),r.ul.attr(c,i+"_listbox"),r._optionID=i+"_option_selected"),r._header(),r._accessors(),r._initValue()},options:{valuePrimitive:!1,headerTemplate:""},setOptions:function(e){a.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable)},focus:function(){this._focused.focus()},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)})},_filterSource:function(e){var t=this,i=t.options,r=t.dataSource,a=r.filter()||{};n(a,i.dataTextField),e&&(a=a.filters||[],a.push(e)),r.filter(a)},_header:function(){var t,n=this.options.headerTemplate;e.isFunction(n)&&(n=n({})),n&&(this.list.prepend(n),t=this.ul.prev(),this.header=t[0]?t:null)},_initValue:function(){var e=this,t=e.options.value;null!==t?e.element.val(t):(t=e._accessor(),e.options.value=t),e._old=t},_ignoreCase:function(){var e,t=this,n=t.dataSource.reader.model;n&&n.fields&&(e=n.fields[t.options.dataTextField],e&&e.type&&"string"!==e.type&&(t.options.ignoreCase=!1))},items:function(){return this.ul[0].children},current:function(e){var n=this,i=n._optionID;return e===t?n._current:(n._current&&(n._current.removeClass(h).removeAttr("aria-selected").removeAttr(c),n._focused.removeAttr("aria-activedescendant")),e&&(e.addClass(h),n._scroll(e),i&&(e.attr("id",i),n._focused.attr("aria-activedescendant",i))),n._current=e,t)},destroy:function(){var e=this,t=e.ns;a.fn.destroy.call(e),e._unbindDataSource(),e.ul.off(t),e.list.off(t),e._touchScroller&&e._touchScroller.destroy(),e.popup.destroy(),e._form&&e._form.off("reset",e._resetHandler)},dataItem:function(e){var n=this;return e===t&&(e=n.selectedIndex),n._data()[e]},_accessors:function(){var e=this,t=e.element,n=e.options,r=i.getter,a=t.attr(i.attr("text-field")),o=t.attr(i.attr("value-field"));a&&(n.dataTextField=a),o&&(n.dataValueField=o),e._text=r(n.dataTextField),e._value=r(n.dataValueField)},_aria:function(e){var n=this,i=n.options,r=n._focused;i.suggest!==t&&r.attr("aria-autocomplete",i.suggest?"both":"list"),e=e?e+" "+n.ul[0].id:n.ul[0].id,r.attr("aria-owns",e),n.ul.attr("aria-live",i.filter&&"none"!==i.filter?"polite":"off")},_blur:function(){var e=this;e._change(),e.close()},_change:function(){var e,n=this,i=n.selectedIndex,r=n.options.value,a=n.value();n._isSelect&&!n._bound&&r&&(a=r),a!==n._old?e=!0:i!==t&&i!==n._oldIndex&&(e=!0),e&&(n._old=a,n._oldIndex=i,n.trigger(p),n.element.trigger(p))},_click:function(t){t.isDefaultPrevented()||this._accept(e(t.currentTarget))},_data:function(){return this.dataSource.view()},_enable:function(){var e=this,n=e.options,i=e.element.is("[disabled]");n.enable!==t&&(n.enabled=n.enable),!n.enabled||i?e.enable(!1):e.readonly(e.element.is("[readonly]"))},_focus:function(e){var n=this,i=!0;return n.popup.visible()&&e&&n.trigger(k,{item:e})?(n.close(),t):(n._select(e),n._triggerCascade(i),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,n=this,i=n.list,r=n.popup.visible(),a=n.options.height,o=n.header;t=i.add(i.parent(".k-animation-container")).show(),a=n.ul[0].scrollHeight>a?a:"auto",t.height(a),o&&n.ul.height("auto"==a?a:i.height()-o.height()),r||t.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,a=e.options,o=e.wrapper;e.popup=new r.Popup(t,C({},a.popup,{anchor:o,open:function(t){e._adjustListWidth(),e.trigger(v)?t.preventDefault():(n.attr("aria-expanded",!0),e.ul.attr("aria-hidden",!1))},close:function(t){e.trigger(_)?t.preventDefault():(n.attr("aria-expanded",!1),e.ul.attr("aria-hidden",!0))},animation:a.animation,isRtl:s.isRtl(o)})),e.popup.one(v,function(){e._height(e._data().length)}),e._touchScroller=i.touchScroller(e.popup.element)},_makeUnselectable:function(){D&&this.list.find("*").attr("unselectable","on")},_toggleHover:function(t){e(t.currentTarget).toggleClass(m,"mouseenter"===t.type)},_toggle:function(e){var n=this,i=s.touch&&s.MSPointers&&s.pointers;e=e!==t?e:!n.popup.visible(),i||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,a=e.offsetHeight,o=i.scrollTop,s=i.clientHeight,l=r+a,d=this._touchScroller;d?(t=d.dimensions.y,t.enabled&&r>t.size&&(r=r-t.size+a+4,d.scrollTo(0,-r))):(n=this.header?this.header.outerHeight():0,i.scrollTop=o>r?r-n:l>o+s?l-s-n:o)}},_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(e){var t=this,n=t.value();(!t._bound&&n||t._old!==n)&&t.trigger("cascade",{userTriggered:e})},_unbindDataSource:function(){var e=this;e.dataSource.unbind(p,e._refreshHandler).unbind(y,e._progressHandler).unbind(w,e._requestEndHandler).unbind("error",e._errorHandler)}});C(z,{caret:function(e){var t,n=e.ownerDocument.selection;return t=n?Math.abs(n.createRange().moveStart(f,-e.value.length)):e.selectionStart},selectText:function(e,t,n){try{if(e.createTextRange){e.focus();var i=e.createTextRange();i.collapse(!0),i.moveStart(f,t),i.moveEnd(f,n-t),i.select()}else e.setSelectionRange(t,n)}catch(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=z,r.Select=z.extend({init:function(e,t){z.fn.init.call(this,e,t),this._initial=this.element.val()},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this._bound=!1,this.options.autoBind&&this.dataSource.fetch()},close:function(){this.popup.close()},select:function(e){var n=this;return e===t?n.selectedIndex:(n._select(e),n._triggerCascade(),n._old=n._accessor(),n._oldIndex=n.selectedIndex,t)},_accessor:function(e,n){var i,r=this.element[0],a=this._isSelect,o=r.selectedIndex;return e===t?(a?o>-1&&(i=r.options[o],i&&(e=i.value)):e=r.value,e):(a?(o>-1&&r.options[o].removeAttribute(b),r.selectedIndex=n,i=r.options[n],i&&i.setAttribute(b,b)):r.value=e,t)},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrow.removeClass(g),e._focused.attr("aria-busy",!1),e._busy=null},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(function(){e._focused.attr("aria-busy",!0),e._arrow.addClass(g)},100))},_requestEnd:function(){this._request=!1},_dataSource:function(){var t,n=this,r=n.element,a=n.options,o=a.dataSource||{};o=e.isArray(o)?{data:o}:o,n._isSelect&&(t=r[0].selectedIndex,t>-1&&(a.index=t),o.select=r,o.fields=[{field:a.dataTextField},{field:a.dataValueField}]),n.dataSource&&n._refreshHandler?n._unbindDataSource():(n._refreshHandler=T(n.refresh,n),n._progressHandler=T(n._showBusy,n),n._requestEndHandler=T(n._requestEnd,n),n._errorHandler=T(n._hideBusy,n)),n.dataSource=i.data.DataSource.create(o).bind(p,n._refreshHandler).bind(y,n._progressHandler).bind(w,n._requestEndHandler).bind("error",n._errorHandler)},_get:function(t){var n,i,r=this,a=r._data();if("function"==typeof t)for(n=0,i=a.length;i>n;n++)if(t(a[n])){t=n;break}if("number"==typeof t){if(0>t)return e();t=e(r.ul[0].children[t])}return t&&t.nodeType&&(t=e(t)),t},_move:function(e){var t,n,i=this,r=e.keyCode,a=i.ul[0],s=i.popup.visible()?"_select":"_accept",l=i._current,d=r===o.DOWN;if(r===o.UP||d){if(e.altKey)i.toggle(d);else{if(t=a.firstChild,!t&&!i._accessor()&&"filter"!==i._state)return i._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!==a.lastChild||(l=t)),i[s](l)):(l=l?l[0].previousSibling:a.lastChild,l||t!==a.lastChild||(l=t),i[s](l))}e.preventDefault(),n=!0}else r===o.ENTER||r===o.TAB?(i.popup.visible()&&e.preventDefault(),(i._typing||!i.popup.visible()&&-1===i.selectedIndex)&&(l=null),i._accept(l),n=!0):r===o.ESC&&(i.popup.visible()&&e.preventDefault(),i.close(),n=!0);return n},_selectItem:function(){var e,n,i=this,r=i.options;e=i._isSelect&&!i._initial&&!r.value&&r.index&&!i._bound,e||(n=i._selectedValue||r.value||i._accessor()),n?i.value(n):i._bound===t&&i.select(r.index)},_fetchItems:function(e){var n=this,i=n.ul[0].firstChild;return n._request?!0:n._fetch||i?t:n.options.cascadeFrom?!i:(n.dataSource.one(p,function(){n.value(e),n._fetch=!1}),n._fetch=!0,n.dataSource.fetch(),!0)},_options:function(e,n){var i,r,a,o,s=this,d=s.element,c=e.length,u="",p=0;for(n&&(p=1,u=n);c>p;p++)i="",u+=i;d.html(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,a,o,s=this,l=s.options,d=l.cascadeFrom;if(d){if(s._selectedValue=l.value||s._accessor(),i=e("#"+d),t=i.data("kendo"+l.name),t||(t=i.data("kendo"+E[l.name])),!t)return;l.autoBind=!1,a=l.cascadeFromField||t.options.dataValueField,o=function(){var e=s._selectedValue||s.value();s._userTriggered?s._clearSelection(t,!0):e?(s.value(e),s.dataSource.view()[0]&&-1!==s.selectedIndex||s._clearSelection(t,!0)):s.select(l.index),s.enable(),s._triggerCascade(s._userTriggered),s._userTriggered=!1},r=function(){var e,i,r=t.dataItem(),l=r?t._value(r):null;l||0===l?(e=s.dataSource.filter()||{},n(e,a),i=e.filters||[],i.push({field:a,operator:"eq",value:l}),s.dataSource.one(p,o).filter(i)):(s.enable(!1),s._clearSelection(t),s._triggerCascade(s._userTriggered),s._userTriggered=!1)},t.bind("cascade",function(e){s._userTriggered=e.userTriggered,r()}),t._bound?r():t.value()||s.enable(!1)}}})}(window.kendo.jQuery),function(e,t){function n(e,t,n,i){var r,a=e.getFullYear(),o=t.getFullYear(),s=n.getFullYear();return a-=a%i,r=a+(i-1),o>a&&(a=o),r>s&&(r=s),a+"-"+r}function i(e){for(var t,n=0,i=e.min,r=e.max,a=e.start,o=e.setter,l=e.build,d=e.cells||12,c=e.perRow||4,u=e.content||H,p=e.empty||A,f=e.html||'';d>n;n++)n>0&&0===n%c&&(f+=''),t=l(a,n),f+=s(a,i,r)?u(t):p(t),o(a,1);return f+"
      "}function r(e,t,n){var i=e.getFullYear(),r=t.getFullYear(),a=r,o=0;return n&&(r-=r%n,a=r-r%n+n-1),i>a?o=1:r>i&&(o=-1),o}function a(){var e=new ht;return new ht(e.getFullYear(),e.getMonth(),e.getDate())}function o(e,t,n){var i=a();return e&&(i=new ht(+e)),t>i?i=new ht(+t):i>n&&(i=new ht(+n)),i}function s(e,t,n){return+e>=+t&&+n>=+e}function l(e,t){return e.slice(t).concat(e.slice(0,t))}function d(e,t,n){t=t instanceof ht?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function c(t){e(this).toggleClass(Y,it.indexOf(t.type)>-1||t.type==tt)}function u(e){e.preventDefault()}function p(e){return F(e).calendars.standard}function f(e){var n=mt[e.start],i=mt[e.depth],r=F(e.culture);e.format=S(e.format||r.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=W),(i===t||i>n)&&(e.depth=W),e.dates||(e.dates=[])}function h(e){I&&e.find("*").attr("unselectable","on")}function m(e,t){for(var n=0,i=t.length;i>n;n++)if(e===+t[n])return!0;return!1}function g(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate():!1}function v(e,t){return e?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth():!1}var _,k=window.kendo,b=k.support,y=k.ui,w=y.Widget,x=k.keys,C=k.parseDate,T=k.date.adjustDST,S=k._extractFormat,D=k.template,F=k.getCulture,E=k.support.transitions,z=E?E.css+"transform-origin":"",H=D('#=data.value#',{useWithBlock:!1}),A=D(' ',{useWithBlock:!1}),M=k.support.browser,I=M.msie&&M.version<9,R=".kendoCalendar",N="click"+R,O="keydown"+R,P="id",B="min",L="left",V="slideIn",W="month",U="century",q="change",j="navigate",G="value",Y="k-state-hover",$="k-state-disabled",K="k-state-focused",Q="k-other-month",J=' class="'+Q+'"',X="k-nav-today",Z="td:has(.k-link)",et="blur"+R,tt="focus",nt=tt+R,it=b.touch?"touchstart":"mouseenter",rt=b.touch?"touchstart"+R:"mouseenter"+R,at=b.touch?"touchend"+R+" touchmove"+R:"mouseleave"+R,ot=6e4,st=864e5,lt="_prevArrow",dt="_nextArrow",ct="aria-disabled",ut="aria-selected",pt=e.proxy,ft=e.extend,ht=Date,mt={month:0,year:1,decade:2,century:3},gt=w.extend({init:function(t,n){var i,r,a=this;w.fn.init.call(a,t,n),t=a.wrapper=a.element,n=a.options,n.url=window.unescape(n.url),a._templates(),a._header(),a._footer(a.footer),r=t.addClass("k-widget k-calendar").on(rt+" "+at,Z,c).on(O,"table.k-content",pt(a._move,a)).on(N,Z,function(t){var n=t.currentTarget.firstChild;-1!=n.href.indexOf("#")&&t.preventDefault(),a._click(e(n))}).on("mouseup"+R,function(){a._focusView(a.options.focusOnNav!==!1)}).attr(P),r&&(a._cellID=r+"_cell_selected"),f(n),i=C(n.value,n.format,n.culture),a._index=mt[n.start],a._current=new ht(+o(i,n.min,n.max)),a._addClassProxy=function(){a._active=!0,a._cell.addClass(K)},a._removeClassProxy=function(){a._active=!1,a._cell.removeClass(K)},a.value(i),k.notify(a)},options:{name:"Calendar",value:null,min:new ht(1900,0,1),max:new ht(2099,11,31),dates:[],url:"",culture:"",footer:"",format:"",month:{},start:W,depth:W,animation:{horizontal:{effects:V,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}}},events:[q,j],setOptions:function(e){var t=this;f(e),w.fn.setOptions.call(t,e),t._templates(),t._footer(t.footer),t._index=mt[t.options.start],t.navigate()},destroy:function(){var e=this,t=e._today;e.element.off(R),e._title.off(R),e[lt].off(R),e[dt].off(R),k.destroy(e._table),t&&k.destroy(t.off(R)),w.fn.destroy.call(e)},current:function(){return this._current},view:function(){return this._view},focus:function(e){e=e||this._table,this._bindTable(e),e.focus()},min:function(e){return this._option(B,e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(lt,-1)},navigateToFuture:function(){this._navigate(dt,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass($)||e.navigate(e._current,++t)},navigateDown:function(e){var n=this,i=n._index,r=n.options.depth;if(e)return i===mt[r]?(+n._value!=+e&&(n.value(e),n.trigger(q)),t):(n.navigate(e,--i),t)},navigate:function(n,i){i=isNaN(i)?mt[i]:i;var r,a,s,l,d=this,c=d.options,u=c.culture,p=c.min,f=c.max,m=d._title,g=d._table,v=d._oldTable,k=d._value,b=d._current,y=n&&+n>+b,w=i!==t&&i!==d._index;n||(n=b),d._current=n=new ht(+o(n,p,f)),i===t?i=d._index:d._index=i,d._view=a=_.views[i],s=a.compare,l=i===mt[U],m.toggleClass($,l).attr(ct,l),l=s(n,p)<1,d[lt].toggleClass($,l).attr(ct,l),l=s(n,f)>-1,d[dt].toggleClass($,l).attr(ct,l),g&&v&&v.data("animating")&&(v.kendoStop(!0,!0),g.kendoStop(!0,!0)),d._oldTable=g,(!g||d._changeView)&&(m.html(a.title(n,p,f,u)),d._table=r=e(a.content(ft({min:p,max:f,date:n,url:c.url,dates:c.dates,format:c.format,culture:u},d[a.name]))),h(r),d._animate({from:g,to:r,vertical:w,future:y}),d._focus(n),d.trigger(j)),i===mt[c.depth]&&k&&d._class("k-state-selected",a.toDateString(k)),d._class(K,a.toDateString(n)),!g&&d._cell&&d._cell.removeClass(K),d._changeView=!0},value:function(e){var n=this,i=n._view,r=n.options,a=n._view,o=r.min,l=r.max;return e===t?n._value:(e=C(e,r.format,r.culture),null!==e&&(e=new ht(+e),s(e,o,l)||(e=null)),n._value=e,a&&null===e&&n._cell?n._cell.removeClass("k-state-selected"):(n._changeView=!e||i&&0!==i.compare(e,n._current),n.navigate(e)),t)},_move:function(t){var n,i,r,a,s=this,l=s.options,d=t.keyCode,c=s._view,u=s._index,p=new ht(+s._current),f=k.support.isRtl(s.wrapper);return t.target===s._table[0]&&(s._active=!0),t.ctrlKey?d==x.RIGHT&&!f||d==x.LEFT&&f?(s.navigateToFuture(),i=!0):d==x.LEFT&&!f||d==x.RIGHT&&f?(s.navigateToPast(),i=!0):d==x.UP?(s.navigateUp(),i=!0):d==x.DOWN&&(s._click(e(s._cell[0].firstChild)),i=!0):(d==x.RIGHT&&!f||d==x.LEFT&&f?(n=1,i=!0):d==x.LEFT&&!f||d==x.RIGHT&&f?(n=-1,i=!0):d==x.UP?(n=0===u?-7:-4,i=!0):d==x.DOWN?(n=0===u?7:4,i=!0):d==x.ENTER?(s._click(e(s._cell[0].firstChild)),i=!0):d==x.HOME||d==x.END?(r=d==x.HOME?"first":"last",a=c[r](p),p=new ht(a.getFullYear(),a.getMonth(),a.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(o(p,l.min,l.max)))),i&&t.preventDefault(),s._current},_animate:function(e){var t=this,n=e.from,i=e.to,r=t._active;n?n.parent().data("animating")?(n.parent().kendoStop(!0,!0).remove(),n.remove(),i.insertAfter(t.element[0].firstChild),t._focusView(r)):n.is(":visible")&&t.options.animation!==!1?t[e.vertical?"_vertical":"_horizontal"](n,i,e.future):(i.insertAfter(n),n.remove(),t._focusView(r)):(i.insertAfter(t.element[0].firstChild),t._bindTable(i))},_horizontal:function(e,n,i){var r=this,a=r._active,o=r.options.animation.horizontal,s=o.effects,l=e.outerWidth();s&&-1!=s.indexOf(V)&&(e.add(n).css({width:l}),e.wrap("
      "),r._focusView(a,e),e.parent().css({position:"relative",width:2*l,"float":L,"margin-left":i?0:-l}),n[i?"insertAfter":"insertBefore"](e),ft(o,{effects:V+":"+(i?"right":L),complete:function(){e.remove(),n.unwrap(),r._focusView(a),r._oldTable=t}}),e.parent().kendoStop(!0,!0).kendoAnimate(o))},_vertical:function(e,n){var i,r,a=this,o=a.options.animation.vertical,s=o.effects,l=a._active;s&&-1!=s.indexOf("zoom")&&(n.css({position:"absolute",top:e.prev().outerHeight(),left:0}).insertBefore(e),z&&(i=a._cellByDate(a._view.toDateString(a._current)),r=i.position(),r=r.left+parseInt(i.width()/2,10)+"px"+" "+(r.top+parseInt(i.height()/2,10)+"px"),n.css(z,r)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.remove(),n.css({position:"static",top:0,left:0}),a._focusView(l),a._oldTable=t}}),n.kendoStop(!0,!0).kendoAnimate(o))},_cellByDate:function(t){return this._table.find("td:not(."+Q+")").filter(function(){return e(this.firstChild).attr(k.attr(G))===t})},_class:function(t,n){var i=this,r=i._cellID,a=i._cell;a&&a.removeAttr(ut).removeAttr("aria-label").removeAttr(P),a=i._table.find("td:not(."+Q+")").removeClass(t).filter(function(){return e(this.firstChild).attr(k.attr(G))===n}).attr(ut,!0),t!==K||i._active||i.options.focusOnNav===!1||(t=""),a.addClass(t),a[0]&&(i._cell=a),r&&(a.attr(P,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(k.attr(G)).split("/");r=new ht(r[0],r[1],r[2]),T(r,0),t._view.setDate(i,r),t.navigateDown(o(i,n.min,n.max))},_focus:function(e){var t=this,n=t._view;0!==n.compare(e,t._current)?t.navigate(e):(t._current=e,t._class(K,n.toDateString(e)))},_focusView:function(e,t){e&&this.focus(t)},_footer:function(n){var i=this,r=a(),o=i.element,s=o.find(".k-footer");return n?(s[0]||(s=e('').appendTo(o)),i._today=s.show().find(".k-link").html(n(r)).attr("title",k.toString(r,"D",i.options.culture)),i._toggle(),t):(i._toggle(!1),s.hide(),t)},_header:function(){var e,t=this,n=t.element;n.find(".k-header")[0]||n.html('
      '),e=n.find(".k-link").on(rt+" "+at+" "+nt+" "+et,c).click(!1),t._title=e.eq(1).on(N,function(){t._focusView(t.options.focusOnNav!==!1),t.navigateUp()}),t[lt]=e.eq(0).on(N,function(){t._focusView(t.options.focusOnNav!==!1),t.navigateToPast()}),t[dt]=e.eq(2).on(N,function(){t._focusView(t.options.focusOnNav!==!1),t.navigateToFuture()})},_navigate:function(e,t){var n=this,i=n._index+1,r=new ht(+n._current);e=n[e],e.hasClass($)||(i>3?r.setFullYear(r.getFullYear()+100*t):_.views[i].setDate(r,t),n.navigate(r))},_option:function(e,n){var i,r=this,a=r.options,o=r._value||r._current;return n===t?a[e]:(n=C(n,a.format,a.culture),n&&(a[e]=new ht(+n),i=e===B?n>o:o>n,(i||v(o,n))&&(i&&(r._value=null),r._changeView=!0),r._changeView||(r._changeView=!(!a.month.content&&!a.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(a(),i.min,i.max)),r&&(r.off(N),e?r.addClass(X).removeClass($).on(N,pt(n._todayClick,n)):r.removeClass(X).addClass($).on(N,u))},_todayClick:function(e){var t=this,n=mt[t.options.depth],i=a();e.preventDefault(),0===t._view.compare(t._current,i)&&t._index==n&&(t._changeView=!1),t._value=i,t.navigate(i,n),t.trigger(q)},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month,r=i.content,a=i.empty;e.month={content:D(''+(r||"#=data.value#")+"",{useWithBlock:!!r}),empty:D(''+(a||" ")+"",{useWithBlock:!!a})},e.footer=n!==!1?D(n||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}):null}});y.plugin(gt),_={firstDayOfMonth:function(e){return new ht(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t=t||k.culture().calendar;for(var n=t.firstDay,i=new ht(e.getFullYear(),e.getMonth(),0,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());i.getDay()!=n;)_.setTime(i,-1*st);return i},setTime:function(e,t){var n=e.getTimezoneOffset(),i=new ht(e.getTime()+t),r=i.getTimezoneOffset()-n;e.setTime(i.getTime()+r*ot)},views:[{name:W,title:function(e,t,n,i){return p(i).months.names[e.getMonth()]+" "+e.getFullYear()},content:function(e){for(var t=this,n=0,r=e.min,a=e.max,o=e.date,s=e.dates,d=e.format,c=e.culture,u=e.url,f=u&&s[0],h=p(c),g=h.firstDay,v=h.days,b=l(v.names,g),y=l(v.namesShort,g),w=_.firstVisibleDay(o,h),x=t.first(o),C=t.last(o),S=t.toDateString,D=new ht,F='';7>n;n++)F+='";return D=new ht(D.getFullYear(),D.getMonth(),D.getDate()),T(D,0),D=+D,i({cells:42,perRow:7,html:F+='',start:new ht(w.getFullYear(),w.getMonth(),w.getDate()),min:new ht(r.getFullYear(),r.getMonth(),r.getDate()),max:new ht(a.getFullYear(),a.getMonth(),a.getDate()),content:e.content,empty:e.empty,setter:t.setDate,build:function(e){var t=[],n=e.getDay(),i="",r="#";return(x>e||e>C)&&t.push(Q),+e===D&&t.push("k-today"),(0===n||6===n)&&t.push("k-weekend"),f&&m(+e,s)&&(r=u.replace("{0}",k.toString(e,d,c)),i=" k-action-link"),{date:e,dates:s,ns:k.ns,title:k.toString(e,"D",c),value:e.getDate(),dateString:S(e),cssClass:t[0]?' class="'+t.join(" ")+'"':"",linkClass:i,url:r}}})},first:function(e){return _.firstDayOfMonth(e)},last:function(e){var t=new ht(e.getFullYear(),e.getMonth()+1,0),n=_.firstDayOfMonth(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t},compare:function(e,t){var n,i=e.getMonth(),r=e.getFullYear(),a=t.getMonth(),o=t.getFullYear();return n=r>o?1:o>r?-1:i==a?0:i>a?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof ht?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):_.setTime(e,t*st),T(e,n)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/"+e.getDate()}},{name:"year",title:function(e){return e.getFullYear()},content:function(e){var t=p(e.culture).months.namesAbbr,n=this.toDateString,r=e.min,a=e.max;return i({min:new ht(r.getFullYear(),r.getMonth(),1),max:new ht(a.getFullYear(),a.getMonth(),1),start:new ht(e.date.getFullYear(),0,1),setter:this.setDate,build:function(e){return{value:t[e.getMonth()],ns:k.ns,dateString:n(e),cssClass:""}}})},first:function(e){return new ht(e.getFullYear(),0,e.getDate())},last:function(e){return new ht(e.getFullYear(),11,e.getDate())},compare:function(e,t){return r(e,t)},setDate:function(e,t){var n,i=e.getHours();t instanceof ht?(n=t.getMonth(),e.setFullYear(t.getFullYear(),n,e.getDate()),n!==e.getMonth()&&e.setDate(0)):(n=e.getMonth()+t,e.setMonth(n),n>11&&(n-=12),n>0&&e.getMonth()!=n&&e.setDate(0)),T(e,i)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/1"}},{name:"decade",title:function(e,t,i){return n(e,t,i,10)},content:function(e){var t=e.date.getFullYear(),n=this.toDateString;return i({start:new ht(t-t%10-1,0,1),min:new ht(e.min.getFullYear(),0,1),max:new ht(e.max.getFullYear(),0,1),setter:this.setDate,build:function(e,t){return{value:e.getFullYear(),ns:k.ns,dateString:n(e),cssClass:0===t||11==t?J:""}}})},first:function(e){var t=e.getFullYear();return new ht(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return new ht(t-t%10+9,e.getMonth(),e.getDate())},compare:function(e,t){return r(e,t,10)},setDate:function(e,t){d(e,t,1)},toDateString:function(e){return e.getFullYear()+"/0/1"}},{name:U,title:function(e,t,i){return n(e,t,i,100)},content:function(e){var t=e.date.getFullYear(),n=e.min.getFullYear(),r=e.max.getFullYear(),a=this.toDateString,o=n,s=r;return o-=o%10,s-=s%10,10>s-o&&(s=o+9),i({start:new ht(t-t%100-10,0,1),min:new ht(o,0,1),max:new ht(s,0,1),setter:this.setDate,build:function(e,t){var i=e.getFullYear(),o=i+9;return n>i&&(i=n),o>r&&(o=r),{ns:k.ns,value:i+" - "+o,dateString:a(e),cssClass:0===t||11==t?J:""}}})},first:function(e){var t=e.getFullYear();return new ht(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return new ht(t-t%100+99,e.getMonth(),e.getDate())},compare:function(e,t){return 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=g,_.makeUnselectable=h,_.restrictValue=o,_.isInRange=s,_.normalize=f,_.viewsEnum=mt,k.calendar=_}(window.kendo.jQuery),function(e,t){function n(t){var n=t.parseFormats,i=t.format;N.normalize(t),n=e.isArray(n)?n:[n],-1===e.inArray(i,n)&&n.splice(0,0,t.format),t.parseFormats=n}function i(e){e.preventDefault()}var r,a=window.kendo,o=a.ui,s=o.Widget,l=a.parseDate,d=a.keys,c=a.template,u=a._activeElement,p="
      ",f="",h=".kendoDatePicker",m="click"+h,g="open",v="close",_="change",k="disabled",b="readonly",y="k-state-default",w="k-state-focused",x="k-state-selected",C="k-state-disabled",T="k-state-hover",S="mouseenter"+h+" mouseleave"+h,D="mousedown"+h,F="id",E="min",z="max",H="month",A="aria-disabled",M="aria-expanded",I="aria-hidden",R="aria-readonly",N=a.calendar,O=N.isInRange,P=N.restrictValue,B=N.isEqualDatePart,L=e.extend,V=e.proxy,W=Date,U=function(t){var n,i=this,r=document.body,s=e(p).attr(I,"true").addClass("k-calendar-container").appendTo(r);i.options=t=t||{},n=t.id,n&&(n+="_dateview",s.attr(F,n),i._dateViewID=n),i.popup=new o.Popup(s,L(t.popup,t,{name:"Popup",isRtl:a.support.isRtl(t.anchor)})),i.div=s,i.value(t.value)};U.prototype={_calendar:function(){var t,n=this,r=n.calendar,s=n.options;r||(t=e(p).attr(F,a.guid()).appendTo(n.popup.element).on(D,i).on(m,"td:has(.k-link)",V(n._click,n)),n.calendar=r=new o.Calendar(t),n._setOptions(s),a.calendar.makeUnselectable(r.element),r.navigate(n._value||n._current,s.start),n.value(n._value))},_setOptions:function(e){this.calendar.setOptions({focusOnNav:!1,change:e.change,culture:e.culture,dates:e.dates,depth:e.depth,footer:e.footer,format:e.format,max:e.max,min:e.min,month:e.month,start:e.start})},setOptions:function(e){var t=this.options;this.options=L(t,e,{change:t.change,close:t.close,open:t.open}),this.calendar&&this._setOptions(this.options)},destroy:function(){this.popup.destroy()},open:function(){var e=this;e._calendar(),e.popup.open()},close:function(){this.popup.close()},min:function(e){this._option(E,e)},max:function(e){this._option(z,e)},toggle:function(){var e=this;e[e.popup.visible()?v:g]()},move:function(e){var n=this,i=e.keyCode,r=n.calendar,a=e.ctrlKey&&i==d.DOWN||i==d.ENTER;if(i==d.ESC)return n.close(),t;if(e.altKey)return i==d.DOWN?(n.open(),e.preventDefault()):i==d.UP&&(n.close(),e.preventDefault()),t;if(n.popup.visible())return a&&r._cell.hasClass(x)?(n.close(),e.preventDefault(),t):(n._current=r._move(e),t)},current:function(e){this._current=e,this.calendar._focus(e)},value:function(e){var t=this,n=t.calendar,i=t.options;t._value=e,t._current=new W(+P(e,i.min,i.max)),n&&n.value(e)},_click:function(e){-1!==e.currentTarget.className.indexOf(x)&&this.close()},_option:function(e,t){var n=this,i=n.calendar;n.options[e]=t,i&&i[e](t)}},U.normalize=n,a.DateView=U,r=s.extend({init:function(e,t){var i,r,o=this;s.fn.init.call(o,e,t),e=o.element,t=o.options,n(t),o._wrapper(),o.dateView=new U(L({},t,{id:e.attr(F),anchor:o.wrapper,change:function(){o._change(this.value()),o.close()},close:function(t){o.trigger(v)?t.preventDefault():(e.attr(M,!1),r.attr(I,!0))},open:function(t){var n,i=o.options;o.trigger(g)?t.preventDefault():(o.element.val()!==o._oldText&&(n=l(e.val(),i.parseFormats,i.culture),o.dateView[n?"current":"value"](n)),e.attr(M,!0),r.attr(I,!1),o._updateARIA(n))}})),r=o.dateView.div,o._icon();try{e[0].setAttribute("type","text")}catch(d){e[0].type="text"}e.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":o.dateView._dateViewID}),o._reset(),o._template(),i=e.is("[disabled]"),i?o.enable(!1):o.readonly(e.is("[readonly]")),o._old=o._update(t.value||o.element.val()),o._oldText=e.val(),a.notify(o)},events:[g,v,_],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:H,depth:H,animation:{},month:{},dates:[],ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#'},setOptions:function(e){var t=this,i=t._value; s.fn.setOptions.call(t,e),e=t.options,n(e),t.dateView.setOptions(e),i&&(t.element.val(a.toString(i,e.format,e.culture)),t._updateARIA(i))},_editable:function(e){var t=this,n=t._dateIcon.off(h),r=t.element.off(h),a=t._inputWrapper.off(h),o=e.readonly,s=e.disable;o||s?(a.addClass(s?C:y).removeClass(s?y:C),r.attr(k,s).attr(b,o).attr(A,s).attr(R,o)):(a.addClass(y).removeClass(C).on(S,t._toggleHover),r.removeAttr(k).removeAttr(b).attr(A,!1).attr(R,!1).on("keydown"+h,V(t._keydown,t)).on("blur"+h,V(t._blur,t)).on("focus"+h,function(){t._inputWrapper.addClass(w)}),n.on(m,V(t._click,t)).on(D,i))},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)})},destroy:function(){var e=this;s.fn.destroy.call(e),e.dateView.destroy(),e.element.off(h),e._dateIcon.off(h),e._inputWrapper.off(h),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option(E,e)},max:function(e){return this._option(z,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(T,"mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(w)},_click:function(){var e=this,t=e.element;e.dateView.toggle(),a.support.touch||t[0]===u()||t.focus()},_change:function(e){var t=this;e=t._update(e),+t._old!=+e&&(t._old=e,t._oldText=t.element.val(),t.trigger(_),t.element.trigger(_))},_keydown:function(e){var t=this,n=t.dateView,i=t.element.val();n.popup.visible()||e.keyCode!=d.ENTER||i===t._oldText?(n.move(e),t._updateARIA(n._current)):t._change(i)},_icon:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('select').insertAfter(i)),n._dateIcon=t.attr({role:"button","aria-controls":n.dateView._dateViewID})},_option:function(e,n){var i=this,r=i.options;return n===t?r[e]:(n=l(n,r.parseFormats,r.culture),n&&(r[e]=new W(+n),i.dateView[e](n)),t)},_update:function(e){var t,n=this,i=n.options,r=i.min,o=i.max,s=l(e,i.parseFormats,i.culture);return+s===+n._value?(t=a.toString(s,i.format,i.culture),t!==e&&n.element.val(null===s?e:t),s):(null!==s&&B(s,r)?s=P(s,r,o):O(s,r,o)||(s=null),n._value=s,n.dateView.value(s),n.element.val(s?a.toString(s,i.format,i.culture):e),n._updateARIA(s),s)},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-datepicker"),t[0]||(t=i.wrap(f).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(f).parent()),t[0].style.cssText=i[0].style.cssText,i.css({width:"100%",height:i[0].style.height}),n.wrapper=t.addClass("k-widget k-datepicker k-header").addClass(i[0].className),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue)},t._form=r.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=c(this.options.ARIATemplate)},_updateARIA:function(e){var t,n=this,i=n.dateView.calendar;n.element.removeAttr("aria-activedescendant"),i&&(t=i._cell,t.attr("aria-label",n._ariaTemplate({current:e||i.current()})),n.element.attr("aria-activedescendant",t.attr("id")))}}),o.plugin(r)}(window.kendo.jQuery),function(e,t){function n(e,t,n){return n?t.substring(0,e).split(n).length-1:0}function i(e,t,i){return t.split(i)[n(e,t,i)]}function r(e,t,i,r){var a=t.split(r);return a.splice(n(e,t,r),1,i),r&&""!==a[a.length-1]&&a.push(""),a.join(r)}function a(e){var t=e.value.length;S(e,t,t)}var o=window.kendo,s=o.support,l=o._activeElement,d=s.placeholder,c=o.ui,u=o.keys,p=o.data.DataSource,f=c.List,h="aria-disabled",m="aria-readonly",g="k-state-default",v="disabled",_="readonly",k="k-state-focused",b="k-state-selected",y="k-state-disabled",w="k-state-hover",x=".kendoAutoComplete",C="mouseenter"+x+" mouseleave"+x,T=f.caret,S=f.selectText,D=e.proxy,F=f.extend({init:function(t,n){var i,r=this;r.ns=x,n=e.isArray(n)?{dataSource:n}:n,f.fn.init.call(r,t,n),t=r.element,n=r.options,n.placeholder=n.placeholder||t.attr("placeholder"),d&&t.attr("placeholder",n.placeholder),r._wrapper(),r._loader(),r._dataSource(),r._ignoreCase(),t[0].type="text",i=r.wrapper,r._popup(),t.addClass("k-input").on("keydown"+x,D(r._keydown,r)).on("paste"+x,D(r._search,r)).on("focus"+x,function(){r._prev=r._accessor(),r._placeholder(!1),i.addClass(k)}).on("blur"+x,function(){r._change(),r._placeholder(),i.removeClass(k)}).attr({autocomplete:"off",role:"textbox","aria-haspopup":!0}),r._enable(),r._old=r._accessor(),t[0].id&&t.attr("aria-owns",r.ul[0].id),r._aria(),r._placeholder(),o.notify(r)},options:{name:"AutoComplete",enabled:!0,suggest:!1,template:"",dataTextField:"",minLength:1,delay:200,height:200,filter:"startswith",ignoreCase:!0,highlightFirst:!1,separator:null,placeholder:"",animation:{},value:null},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._refreshHandler=D(e.refresh,e),e._progressHandler=D(e._showBusy,e)),e.dataSource=p.create(e.options.dataSource).bind("change",e._refreshHandler).bind("progress",e._progressHandler)},setDataSource:function(e){this.options.dataSource=e,this._dataSource()},events:["open","close","change","select","dataBinding","dataBound"],setOptions:function(e){f.fn.setOptions.call(this,e),this._template(),this._accessors(),this._aria()},_editable:function(e){var t=this,n=t.element,i=t.wrapper.off(x),r=e.readonly,a=e.disable;r||a?(i.addClass(a?y:g).removeClass(a?g:y),n.attr(v,a).attr(_,r).attr(h,a).attr(m,r)):(i.addClass(g).removeClass(y).on(C,t._toggleHover),n.removeAttr(v).removeAttr(_).attr(h,!1).attr(m,!1))},close:function(){var e=this,t=e._current;t&&t.removeClass(b),e.current(null),e.popup.close()},destroy:function(){var e=this;e.element.off(x),e.wrapper.off(x),f.fn.destroy.call(e)},refresh:function(){var n,i=this,r=i.ul[0],a=i.popup,s=i.options,d=i._data(),c=d.length;i.trigger("dataBinding"),r.innerHTML=o.render(i.template,d),i._height(c),a.visible()&&a._position(),c&&(s.highlightFirst&&i.current(e(r.firstChild)),s.suggest&&i.suggest(e(r.firstChild))),i._open&&(i._open=!1,n=c?"open":"close",i._typing&&i.element[0]!==l()&&(n="close"),a[n](),i._typing=t),i._touchScroller&&i._touchScroller.reset(),i._makeUnselectable(),i._hideBusy(),i.trigger("dataBound")},select:function(e){this._select(e)},search:function(e){var t,n=this,r=n.options,a=r.ignoreCase,o=r.separator;e=e||n._accessor(),n._current=null,clearTimeout(n._typing),o&&(e=i(T(n.element[0]),e,o)),t=e.length,t?t>=n.options.minLength&&(n._open=!0,n._filterSource({value:a?e.toLowerCase():e,operator:r.filter,field:r.dataTextField,ignoreCase:a})):n.popup.close()},suggest:function(e){var i,r=this,a=r._last,o=r._accessor(),s=r.element[0],d=T(s),c=r.options.separator,p=o.split(c),h=n(d,o,c),m=d;return a==u.BACKSPACE||a==u.DELETE?(r._last=t,t):(e=e||"","string"!=typeof e&&(i=f.inArray(e[0],r.ul[0]),e=i>-1?r._text(r._data()[i]):""),0>=d&&(d=o.toLowerCase().indexOf(e.toLowerCase())+1),i=o.substring(0,d).lastIndexOf(c),i=i>-1?d-(i+c.length):d,o=p[h].substring(0,i),e&&(i=e.toLowerCase().indexOf(o.toLowerCase()),i>-1&&(e=e.substring(i+o.length),m=d+e.length,o+=e),c&&""!==p[p.length-1]&&p.push("")),p[h]=o,r._accessor(p.join(c||"")),s===l()&&S(s,d,m),t)},value:function(e){return e===t?this._accessor():(this._accessor(e),this._old=e,t)},_accessor:function(e){var n=this,i=n.element[0];return e===t?(e=i.value,i.className.indexOf("k-readonly")>-1?e===n.options.placeholder?"":e:e):(i.value=null===e?"":e,n._placeholder(),t)},_accept:function(e){var t=this;t._focus(e),a(t.element[0])},_keydown:function(t){var n=this,i=n.ul[0],r=t.keyCode,a=n._current,o=n.popup.visible();n._last=r,r===u.DOWN?(o&&n._move(a?a.next():e(i.firstChild)),t.preventDefault()):r===u.UP?(o&&n._move(a?a.prev():e(i.lastChild)),t.preventDefault()):r===u.ENTER||r===u.TAB?(r===u.ENTER&&n.popup.visible()&&t.preventDefault(),n._accept(a)):r===u.ESC?(n.popup.visible()&&t.preventDefault(),n.close()):n._search()},_move:function(e){var t=this;e=e[0]?e:null,t.current(e),t.options.suggest&&t.suggest(e)},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._loading.hide(),e.element.attr("aria-busy",!1),e._busy=null},_showBusy:function(){var e=this;e._busy||(e._busy=setTimeout(function(){e.element.attr("aria-busy",!0),e._loading.show()},100))},_placeholder:function(e){if(!d){var n,i=this,r=i.element,a=i.options.placeholder;if(a){if(n=r.val(),e===t&&(e=!n),e||(a=n!==a?n:""),n===i._old&&!e)return;r.toggleClass("k-readonly",e).val(a),a||r[0]!==document.activeElement||f.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,a=this,o=a.options.separator,s=a._data();t=e(t),t[0]&&!t.hasClass(b)&&(i=f.inArray(t[0],a.ul[0]),i>-1&&(s=s[i],n=a._text(s),o&&(n=r(T(a.element[0]),a._accessor(),n,o)),a._accessor(n),a._prev=a._accessor(),a.current(t.addClass(b))))},_loader:function(){this._loading=e('').insertAfter(this.element)},_toggleHover:function(t){e(t.currentTarget).toggleClass(w,"mouseenter"===t.type)},_wrapper:function(){var e,t=this,n=t.element,i=n[0];e=n.parent(),e.is("span.k-widget")||(e=n.wrap("").parent()),e.attr("tabindex",-1),e.attr("role","presentation"),e[0].style.cssText=i.style.cssText,n.css({width:"100%",height:i.style.height}),t._focused=t.element,t.wrapper=e.addClass("k-widget k-autocomplete k-header").addClass(i.className)}});c.plugin(F)}(window.kendo.jQuery),function(e,t){function n(e,t,n){for(var i,r=0,a=t.length-1;a>r;++r)i=t[r],i in e||(e[i]={}),e=e[i];e[t[a]]=n}var i=window.kendo,r=i.ui,a=r.Select,o=i.support.mobileOS,s=".kendoDropDownList",l="disabled",d="readonly",c="change",u="k-state-focused",p="k-state-default",f="k-state-disabled",h="aria-disabled",m="aria-readonly",g="k-state-selected",v="mouseenter"+s+" mouseleave"+s,_="tabindex",k=e.proxy,b=a.extend({init:function(n,r){var o,l,d,c=this,u=r&&r.index;c.ns=s,r=e.isArray(r)?{dataSource:r}:r,a.fn.init.call(c,n,r),c._focusHandler=function(){c.wrapper.focus()},r=c.options,n=c.element.on("focus"+s,c._focusHandler),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||(o=r.optionLabel,l=o&&0===r.index,c._isSelect?d=l?o:n.children(":selected").text():!n[0].value&&l&&(d=o)),c._textAccessor(d)),i.notify(c)},options:{name:"DropDownList",enabled:!0,autoBind:!0,index:0,text:null,value:null,template:"",valueTemplate:"",delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{}},events:["open","close",c,"select","dataBinding","dataBound","cascade"],setOptions:function(e){a.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),a.fn.destroy.call(e)},open:function(){var e=this;e.ul[0].firstChild?(e.popup.open(),e._scroll(e._current)):(e._open=!0,e._request||e.dataSource.fetch())},toggle:function(e){this._toggle(e)},refresh:function(){var e,t=this,n=t._data(),r=n.length,a=t.options.optionLabel,o=t.element[0];t.trigger("dataBinding"),t._current&&t.current(null),t.ul[0].innerHTML=i.render(t.template,n),t._height(r),t.popup.visible()&&t.popup._position(),t._isSelect&&(e=o.selectedIndex,a&&r&&(a='"),t._options(n,a),o.selectedIndex=-1===e?0:e),t._open&&(t._open=!1,t.toggle(!!r)),t._hideBusy(),t._makeUnselectable(),t._fetch||(r?t._selectItem():t._textAccessor()!==a&&(t.element.val(""),t._textAccessor(""))),t._bound=!!r,t.trigger("dataBound")},search:function(e){if(e){var n=this,i=n.options.ignoreCase;i&&(e=e.toLowerCase()),n._select(function(r){var a=n._text(r);return a!==t?(a+="",i&&(a=a.toLowerCase()),0===a.indexOf(e)):t})}},text:function(e){var n,i,r=this,a=r.options.ignoreCase;return e=null===e?"":e,e===t?r._textAccessor():("string"==typeof e&&(i=a?e.toLowerCase():e,n=r._select(function(e){return e=r._text(e),a&&(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,a=e.readonly,o=t.wrapper.off(s),c=t._inputWrapper.off(v),g=function(){c.addClass(u),t._blured=!1},b=function(){if(!t._blured){t._triggerCascade();var e=window.self!==window.top;i.support.mobileOS.ios&&e?t._change():t._blur(),c.removeClass(u),t._blured=!0,n.blur()}};a||r?(r?(o.removeAttr(_),c.addClass(f).removeClass(p)):(c.addClass(p).removeClass(f),o.on("focusin"+s,g).on("focusout"+s,b)),n.attr(l,r).attr(d,a),o.attr(h,r).attr(m,a)):(n.removeAttr(l).removeAttr(d),c.addClass(p).removeClass(f).on(v,t._toggleHover),o.attr(_,o.data(_)).attr(h,!1).attr(m,!1).on("click"+s,function(e){t._blured=!1,e.preventDefault(),t.toggle()}).on("keydown"+s,k(t._keydown,t)).on("keypress"+s,k(t._keypress,t)).on("focusin"+s,g).on("focusout"+s,b))},_accept:function(e){this._focus(e)},_optionLabelText:function(){var e=this.options,t=e.dataTextField,n=e.optionLabel;return n&&t&&"object"==typeof n?this._text(n):n},_data:function(){var e=this,t=e.options,r=t.optionLabel,a=t.dataTextField,o=t.dataValueField,s=e.dataSource.view(),l=s.length,d=r,c=0;if(r&&l){for("object"==typeof r?d=r:a&&(d={},a=a.split("."),o=o.split("."),n(d,o,""),n(d,a,r)),d=new i.data.ObservableArray([d]);l>c;c++)d.push(s[c]);s=d}return s},_selectItem:function(){a.fn._selectItem.call(this),this.current()||this.select(0)},_keydown:function(e){var t=this,n=e.keyCode,r=i.keys,a=t.ul[0];n===r.LEFT?n=r.UP:n===r.RIGHT&&(n=r.DOWN),e.keyCode=n,t._move(e),n===r.HOME?(e.preventDefault(),t._select(a.firstChild)):n===r.END&&(e.preventDefault(),t._select(a.lastChild))},_selectNext:function(e,n){for(var i,r=this,a=n,o=r._data(),s=o.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(o[n]),i&&d(i,n))return!0;if(a>0)for(n=0;a>=n;n++)if(i=r._text(o[n]),i&&d(i,n))return!0;return!1},_keypress:function(e){if(0!==e.charCode){var t=this,n=String.fromCharCode(e.charCode||e.keyCode),i=t.selectedIndex,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(){a.fn._popup.call(this),this.popup.one("open",function(){this.wrapper=i.wrap(this.element).addClass("km-popup")})},_search:function(){var e=this,n=e.dataSource,i=e.selectedIndex,r=e._word;return clearTimeout(e._typing),e._typing=setTimeout(function(){e._word=""},e.options.delay),-1===i&&(i=0),e.ul[0].firstChild?(e._selectNext(r,i),e._triggerEvents(),t):(n.one(c,function(){n.data()[0]&&i>-1&&e._selectNext(r,i)}).fetch(),t)},_select:function(e){var n,i,a=this,o=a._current,s=null;return e=a._get(e),e&&e[0]&&!e.hasClass(g)&&(o&&o.removeClass(g),i=r.List.inArray(e[0],a.ul[0]),i>-1&&(s=a._data()[i],n=a._value(s),a.selectedIndex=i,a._textAccessor(s),a._accessor(n!==t?n:a._text(s),i),a._selectedValue=a._accessor(),a.current(e.addClass(g)),a._optionID&&a._current.attr("aria-selected",!0))),s},_triggerEvents:function(){this.popup.visible()||(this._triggerCascade(),this._change())},_mobile:function(){var e=this,t=e.popup,n=t.element.parents(".km-root").eq(0);n.length&&o&&(t.options.animation.open.effects=o.android||o.meego?"fadeIn":o.ios||o.wp?"slideIn:up":t.options.animation.open.effects)},_span:function(){var t,n=this,i=n.wrapper,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.options.value="",e._selectedValue="",e.dataSource.view()[0]&&(n||e._userTriggered)?(e.select(0),t):(e.selectedIndex=-1,e.element.val(""),e._textAccessor(e.options.optionLabel),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(r){var a=this.dataItem(),o=this.options,s=this.span;return r===t?s.text():(e.isPlainObject(r)||r instanceof i.data.ObservableObject?a=r:a&&this._text(a)===r||(o.dataTextField?(a={},n(a,o.dataTextField.split("."),r),n(a,o.dataValueField.split("."),this._accessor())):a=r),s.html(this.valueTemplate(a)),t)}});r.plugin(b)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,r=i.List,a=i.Select,o=n.support,s=o.placeholder,l=n._activeElement,d=n.keys,c=".kendoComboBox",u="click"+c,p="mousedown"+c,f="disabled",h="readonly",m="change",g="k-state-default",v="k-state-focused",_="k-state-disabled",k="aria-disabled",b="aria-readonly",y="k-state-selected",w="filter",x="accept",C="rebind",T="mouseenter"+c+" mouseleave"+c,S=null,D=e.proxy,F=a.extend({init:function(t,i){var r,o=this;o.ns=c,i=e.isArray(i)?{dataSource:i}:i,a.fn.init.call(o,t,i),o._focusHandler=function(){o.input.focus()},i=o.options,t=o.element.on("focus"+c,o._focusHandler),i.placeholder=i.placeholder||t.attr("placeholder"),o._reset(),o._wrapper(),o._input(),o._tabindex(o.input),o._popup(),o._dataSource(),o._ignoreCase(),o._enable(),o._cascade(),o._aria(),o._oldIndex=o.selectedIndex=-1,i.autoBind?o._filterSource():(r=i.text,!r&&o._isSelect&&(r=t.children(":selected").text()),r&&(o.input.val(r),o._prev=r)),r||o._placeholder(),n.notify(o)},options:{name:"ComboBox",enabled:!0,index:-1,text:null,value:null,autoBind:!0,delay:200,dataTextField:"",dataValueField:"",minLength:0,height:200,highlightFirst:!0,template:"",filter:"none",placeholder:"",suggest:!1,cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{}},events:["open","close",m,"select","dataBinding","dataBound","cascade"],setOptions:function(e){a.fn.setOptions.call(this,e),this._template(),this._accessors(),this._aria()},current:function(e){var n=this,i=n._current;return e===t?i:(i&&i.removeClass(y),a.fn.current.call(n,e),t)},destroy:function(){var e=this;e.input.off(c),e.element.off(c),e._inputWrapper.off(c),a.fn.destroy.call(e)},_editable:function(e){var t=this,n=e.disable,i=e.readonly,r=t._inputWrapper.off(c),a=t.element.add(t.input.off(c)),o=t._arrow.parent().off(u+" "+p);i||n?(r.addClass(n?_:g).removeClass(n?g:_),a.attr(f,n).attr(h,i).attr(k,n).attr(b,i)):(r.addClass(g).removeClass(_).on(T,t._toggleHover),a.removeAttr(f).removeAttr(h).attr(k,!1).attr(b,!1),o.on(u,function(){t.toggle()}).on(p,function(e){e.preventDefault()}),t.input.on("keydown"+c,D(t._keydown,t)).on("focus"+c,function(){r.addClass(v),t._placeholder(!1)}).on("blur"+c,function(){r.removeClass(v),clearTimeout(t._typing),t.options.text!==t.input.val()&&t.text(t.text()),t._placeholder(),t._blur(),t.element.blur()}))},open:function(){var e=this,t=e.dataSource.options.serverFiltering;e.popup.visible()||(!e.ul[0].firstChild||e._state===x&&!t?(e._open=!0,e._state=C,e._filterSource()):(e.popup.open(),e._scroll(e._current)))},refresh:function(){var i,r,a,o=this,s=o.ul[0],d=o.options,c=o._state,u=o._data(),p=u.length,f=!0;o.trigger("dataBinding"),s.innerHTML=n.render(o.template,u),o._height(p),o.popup.visible()&&o.popup._position(),o._isSelect&&(i=o.element[0].firstChild,c===C&&(o._state=""),a=o._option,o._option=t,o._options(u),a&&a[0].selected?o._custom(a.val(),f):o._bound||i||o._custom("",f)),p&&(d.highlightFirst&&o.current(e(s.firstChild)),d.suggest&&o.input.val()&&o._request!==t&&o.suggest(e(s.firstChild))),c===w||o._fetch||o._selectItem(),o._open&&(o._open=!1,r=!!p,o._typing&&o.input[0]!==l()&&(r=!1),o.toggle(r),o._typing=t),o._touchScroller&&o._touchScroller.reset(),o._makeUnselectable(),o._hideBusy(),o._bound=!0,o.trigger("dataBound")},search:function(e){e="string"==typeof e?e:this.text();var t=this,n=e.length,i=t.options,r=i.ignoreCase,a=i.filter,o=i.dataTextField;clearTimeout(t._typing),n>=i.minLength&&(t._state=w,"none"===a?t._filter(e):(t._open=!0,t._filterSource({value:r?e.toLowerCase():e,field:o,operator:a,ignoreCase:r})))},suggest:function(e){var n,i=this,a=i.input[0],o=i.text(),s=r.caret(a),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=o.toLowerCase().indexOf(e.toLowerCase())+1),e?(n=e.toLowerCase().indexOf(o.toLowerCase()),n>-1&&(o+=e.substring(n+o.length))):o=o.substring(0,s),o.length===s&&e||(a.value=o,a===l()&&r.selectText(a,s,o.length)),t)},text:function(e){e=null===e?"":e;var n,i=this,r=i.input[0],a=i.options.ignoreCase,o=e;return e===t?r.value:(n=i.dataItem(),n&&i._text(n)===e&&""+i._value(n)===i._old?(i._triggerCascade(),t):(a&&(o=o.toLowerCase()),i._select(function(e){return e=i._text(e),a&&(e=(e+"").toLowerCase()),e===o}),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,n){var i=this,r=i.element,a=i._option;i._state!==w||n||(i._state=x),i._isSelect?(a||(a=i._option=e("
      '+y[n]+"
      # for (var i = 0; i < colors.length; ++i) { ## var selected = colors[i].equals(value); ## if (i && i % columns == 0) { # # } #'+"# } #"+"")}),D=T.extend({init:function(t,n){var i=this;T.fn.init.call(i,t,n),n=i.options,t=i.element,i.wrapper=t.addClass("k-widget k-flatcolorpicker").append(i._template(n)),i._hueElements=e(".k-hsv-rectangle, .k-transparency-slider .k-slider-track",t),i._selectedColor=e(".k-selected-color-display",t),i._colorAsText=e("input.k-color-value",t),i._sliders(),i._hsvArea(),i._updateUI(i._value||new E(1,0,0,1)),t.find("input.k-color-value").on(w,function(t){var n,r,a=this;if(t.keyCode==h.ENTER)try{n=o(a.value),r=i.color(),i._select(n,n.equals(r))}catch(s){e(a).addClass("k-state-error")}else i.options.autoupdate&&setTimeout(function(){var e=o(a.value,!0);e&&i._updateUI(e,!0)},10)}).end().on(y,".k-controls button.apply",function(){i._select(i._getHSV())}).on(y,".k-controls button.cancel",function(){i._updateUI(i.color()),i._cancel()}),C&&i._applyIEFilter()},destroy:function(){this._hueSlider.destroy(),this._opacitySlider&&this._opacitySlider.destroy(),this._hueSlider=this._opacitySlider=this._hsvRect=this._hsvHandle=this._hueElements=this._selectedColor=this._colorAsText=null,T.fn.destroy.call(this)},options:{name:"FlatColorPicker",opacity:!1,buttons:!1,input:!0,preview:!0,autoupdate:!0,messages:k},_applyIEFilter:function(){var e=this.element.find(".k-hue-slider .k-slider-track")[0],t=e.currentStyle.backgroundImage;t=t.replace(/^url\([\'\"]?|[\'\"]?\)$/g,""),e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+t+"', sizingMethod='scale')"},_sliders:function(){function e(e){n._updateUI(n._getHSV(e.value,null,null,null))}function t(e){n._updateUI(n._getHSV(null,null,null,e.value/100))}var n=this,i=n.element;n._hueSlider=i.find(".k-hue-slider").kendoSlider({min:0,max:359,tickPlacement:"none",showButtons:!1,slide:e,change:e}).data("kendoSlider"),n._opacitySlider=i.find(".k-transparency-slider").kendoSlider({min:0,max:100,tickPlacement:"none",showButtons:!1,slide:t,change:t}).data("kendoSlider")},_hsvArea:function(){function e(e,n){var i=this.offset,r=e-i.left,a=n-i.top,o=this.width,s=this.height;r=0>r?0:r>o?o:r,a=0>a?0:a>s?s:a,t._svChange(r/o,1-a/s)}var t=this,n=t.element,i=n.find(".k-hsv-rectangle"),r=i.find(".k-draghandle").attr("tabIndex",0).on(w,d(t._keydown,t));t._hsvEvents=new c.UserEvents(i,{global:!0,press:function(t){this.offset=c.getOffset(i),this.width=i.width(),this.height=i.height(),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 h.LEFT:e.ctrlKey?n(-1):t("s",-1);break;case h.RIGHT:e.ctrlKey?n(1):t("s",1);break;case h.UP:t(e.ctrlKey&&i._opacitySlider?"a":"v",1);break;case h.DOWN:t(e.ctrlKey&&i._opacitySlider?"a":"v",-1);break;case h.ENTER:i._select(i._getHSV());break;case h.F2:i.wrapper.find("input.k-color-value").focus().select();break;case h.ESC:i._cancel()}},focus:function(){this._hsvHandle.focus()},_getHSV:function(e,t,n,i){var r=this._hsvRect,a=r.width(),o=r.height(),s=this._hsvHandle.position();return null==e&&(e=this._hueSlider.value()),null==t&&(t=s.left/a),null==n&&(n=1-s.top/o),null==i&&(i=this._opacitySlider?this._opacitySlider.value()/100:1),new H(e,t,n,i)},_svChange:function(e,t){var n=this._getHSV(null,e,t,null);this._updateUI(n)},_updateUI:function(e,t){var n=this,i=n._hsvRect;e&&(this._colorAsText.removeClass("k-state-error"),n._selectedColor.css(m,e.toDisplay()),t||n._colorAsText.val(n._opacitySlider?e.toCssRgba():e.toCss()),n._triggerSelect(e),e=e.toHSV(),n._hsvHandle.css({left:e.s*i.width()+"px",top:(1-e.v)*i.height()+"px"}),n._hueElements.css(m,new H(e.h,1,1,1).toCss()),n._hueSlider.value(e.h),n._opacitySlider&&n._opacitySlider.value(100*e.a))},_selectOnHide:function(){return this.options.buttons?null:this._getHSV()},_template:c.template('# if (preview) { #
      # } #
      # if (opacity) { ## } ## if (buttons) { #
      # } #')}),F=u.extend({toHSV:function(){return this},toRGB:function(){return this},toHex:function(){return this.toBytes().toHex()},toBytes:function(){return this},toCss:function(){return"#"+this.toHex()},toCssRgba:function(){var e=this.toBytes();return"rgba("+e.r+", "+e.g+", "+e.b+", "+a(this.a)+")"},toDisplay:function(){return C?this.toCss():this.toCssRgba()},equals:function(e){return e===this||null!==e&&this.toCssRgba()==o(e).toCssRgba()},diff:function(e){if(null==e)return 0/0;var t=this.toBytes();return e=e.toBytes(),Math.sqrt(Math.pow(.3*(t.r-e.r),2)+Math.pow(.59*(t.g-e.g),2)+Math.pow(.11*(t.b-e.b),2))},clone:function(){var e=this.toBytes();return e===this&&(e=new z(e.r,e.g,e.b,e.a)),e}}),E=F.extend({init:function(e,t,n,i){this.r=e,this.g=t,this.b=n,this.a=i},toHSV:function(){var e,t,n=this.r,i=this.g,r=this.b,a=Math.min(n,i,r),o=Math.max(n,i,r),s=o,l=o-a;return 0===l?new H(0,0,s,this.a):(0!==o?(t=l/o,e=n==o?(i-r)/l:i==o?2+(r-n)/l:4+(n-i)/l,e*=60,0>e&&(e+=360)):(t=0,e=-1),new H(e,t,s,this.a))},toBytes:function(){return new z(255*this.r,255*this.g,255*this.b,this.a)}}),z=E.extend({init:function(e,t,n,i){this.r=Math.round(e),this.g=Math.round(t),this.b=Math.round(n),this.a=i},toRGB:function(){return new E(this.r/255,this.g/255,this.b/255,this.a)},toHSV:function(){return this.toRGB().toHSV()},toHex:function(){return r(this.r,2)+r(this.g,2)+r(this.b,2)},toBytes:function(){return this}}),H=F.extend({init:function(e,t,n,i){this.h=e,this.s=t,this.v=n,this.a=i},toRGB:function(){var e,t,n,i,r,a,o,s,l=this.h,d=this.s,c=this.v;if(0===d)t=n=i=c;else switch(l/=60,e=Math.floor(l),r=l-e,a=c*(1-d),o=c*(1-d*r),s=c*(1-d*(1-r)),e){case 0:t=c,n=s,i=a;break;case 1:t=o,n=c,i=a;break;case 2:t=a,n=c,i=s;break;case 3:t=a,n=o,i=c;break;case 4:t=s,n=a,i=c;break;default:t=c,n=a,i=o}return new E(t,n,i,this.a)},toBytes:function(){return this.toRGB().toBytes()}}),A=f.extend({init:function(t,n){var i,r,a,s=this;f.fn.init.call(s,t,n),n=s.options,t=s.element,i=t.attr("value")||t.val(),i=i?o(i,!0):o(n.value,!0),s._value=n.value=i,r=s.wrapper=e(s._template(n)),t.hide().after(r),t.is("input")&&t.appendTo(r),s.enable(!t.attr("disabled")),a=t.attr("accesskey"),a&&(t.attr("accesskey",null),r.attr("accesskey",a)),s.bind("activate",function(e){e.isDefaultPrevented()||s.toggle()}),s._updateUI(i)},destroy:function(){this.wrapper.off(b).find("*").off(b),this._popup&&(this._selector.destroy(),this._popup.destroy()),this._selector=this._popup=this.wrapper=null,f.fn.destroy.call(this)},enable:function(e){var t=this,n=t.wrapper,i=n.children(".k-picker-wrap"),r=i.find(".k-select");0===arguments.length&&(e=!0),t.element.attr("disabled",!e),n.attr("aria-disabled",!e),r.off(b).on("mousedown"+b,l),n.addClass("k-state-disabled").removeAttr("tabIndex").add("*",n).off(b),e&&n.removeClass("k-state-disabled").attr("tabIndex",0).on("mouseenter"+b,function(){i.addClass("k-state-hover")}).on("mouseleave"+b,function(){i.removeClass("k-state-hover")}).on("focus"+b,function(){i.addClass("k-state-focused")}).on("blur"+b,function(){i.removeClass("k-state-focused")}).on(w,d(t._keydown,t)).on(y,".k-icon",d(t.toggle,t)).on(y,t.options.toolIcon?".k-tool-icon":".k-selected-color",function(){t.trigger("activate")})},_template:c.template('# if (toolIcon) { ## } else { ## } #'),options:{name:"ColorPicker",palette:null,columns:10,toolIcon:null,value:null,messages:k,opacity:!1,buttons:!0,preview:!0,ARIATemplate:'Current selected color is #=data || ""#'},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){var t="";e&&(t=this._isInputTypeColor()||1==e.a?e.toCss():e.toCssRgba(),this.element.val(t)),this._ariaTemplate||(this._ariaTemplate=c.template(this.options.ARIATemplate)),this.wrapper.attr("aria-label",this._ariaTemplate(t)),this._triggerSelect(e),this.wrapper.find(".k-selected-color").css(m,e?e.toDisplay():"transparent")},_keydown:function(e){var t=e.keyCode;this._getPopup().visible()?(t==h.ESC?this._selector._cancel():this._selector._keydown(e),l(e)):(t==h.ENTER||t==h.DOWN)&&(this.open(),l(e))},_getPopup:function(){var t,i,r,a,s=this,l=s._popup;return l||(t=s.options,i=t.palette?S:D,t._standalone=!1,delete t.select,delete t.change,delete t.cancel,r=c.guid(),a=s._selector=new i(e('
      ').appendTo(document.body),t),s.wrapper.attr("aria-owns",r),s._popup=l=a.wrapper.kendoPopup({anchor:s.wrapper}).data("kendoPopup"),a.bind({select:function(e){s._updateUI(o(e.value))},change:function(){s._select(a.color()),s.close()},cancel:function(){s.close()}}),l.bind({close:function(e){if(s.trigger("close"))return e.preventDefault(),n;s.wrapper.children(".k-picker-wrap").removeClass("k-state-focused");var t=a._selectOnHide();t?s._select(t):(s.wrapper.focus(),s._updateUI(s.color()))},open:function(e){s.trigger("open")?e.preventDefault():s.wrapper.children(".k-picker-wrap").addClass("k-state-focused")},activate:function(){a._select(s.color(),!0),a.focus(),s.wrapper.children(".k-picker-wrap").addClass("k-state-focused")}})),l}});p.plugin(S),p.plugin(D),p.plugin(A),c.parseColor=o,c.Color={fromBytes:function(e,t,n,i){return new z(e,t,n,null!=i?i:1)},fromRGB:function(e,t,n,i){return new E(e,t,n,null!=i?i:1)},fromHSV:function(e,t,n,i){return new H(e,t,n,null!=i?i:1)}}}(jQuery,parseInt),function(e,t){function n(t){return e.trim(t).replace(/ /gi,"")}var i=window.kendo,r=i.ui,a=e.proxy,o=e.extend,s=e.grep,l=e.map,d=e.inArray,c="k-state-selected",u="asc",p="desc",f="change",h="init",m="select",g="kendoPopup",v="kendoFilterMenu",_="kendoMenu",k=".kendoColumnMenu",b=r.Widget,y=b.extend({init:function(t,n){var r,o=this;b.fn.init.call(o,t,n),t=o.element,n=o.options,o.owner=n.owner,o.dataSource=n.dataSource,o.field=t.attr(i.attr("field")),r=t.find(".k-header-column-menu"),r[0]||(r=t.addClass("k-with-icon").prepend('').find(".k-header-column-menu")),o.link=r.attr("tabindex",-1).on("click"+k,a(o._click,o)),o.wrapper=e('
      ')},_init:function(){var e=this;e.pane=e.options.pane,e.pane&&(e._isMobile=!0),e._isMobile?e._createMobileMenu():e._createMenu(),e._sort(),e._columns(),e._filter(),e.trigger(h,{field:e.field,container:e.wrapper})},events:[h],options:{name:"ColumnMenu",messages:{sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filter:"Filter",columns:"Columns",done:"Done",settings:"Column Settings"},filter:"",columns:!0,sortable:!0,filterable:!0,animations:{left:"slide"}},_createMenu:function(){var e=this,t=e.options;e.wrapper.html(i.template(w)({ns:i.ns,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns})),e.popup=e.wrapper[g]({anchor:e.link,open:a(e._open,e),activate:a(e._activate,e),close:e.options.closeCallback}).data(g),e.menu=e.wrapper.children()[_]({orientation:"vertical",closeOnClick:!1}).data(_)},_createMobileMenu:function(){var e=this,t=e.options,n=i.template(x)({ns:i.ns,field:e.field,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns});e.view=e.pane.append(n),e.wrapper=e.view.element.find(".k-column-menu"),e.menu=new C(e.wrapper.children(),{pane:e.pane}),e.view.element.on("click",".k-done",function(t){e.close(),t.preventDefault()})},destroy:function(){var e=this;b.fn.destroy.call(e),e.filterMenu&&e.filterMenu.destroy(),e._refreshHandler&&e.dataSource.unbind(f,e._refreshHandler),e.options.columns&&e.owner&&(e.owner.unbind("columnShow",e._updateColumnsMenuHandler),e.owner.unbind("columnHide",e._updateColumnsMenuHandler)),e.menu&&(e.menu.element.off(k),e.menu.destroy()),e.wrapper.off(k),e.popup&&e.popup.destroy(),e.view&&e.view.purge(),e.link.off(k)},close:function(){this.menu.close(),this.popup&&(this.popup.close(),this.popup.element.off("keydown"+k))},_click:function(e){e.preventDefault(),e.stopPropagation();var t=this.options;t.filter&&this.element.is(!t.filter)||(this.popup||this.pane||this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle())},_open:function(){var t=this;e(".k-column-menu").not(t.wrapper).each(function(){e(this).data(g).close()}),t.popup.element.on("keydown"+k,function(e){e.keyCode==i.keys.ESC&&t.close()})},_activate:function(){this.menu.element.focus()},_ownerColumns:function(){var e=this.owner.columns,t=s(e,function(e){var t=!0,i=n(e.title||"");return(e.menu===!1||!e.field&&!i.length)&&(t=!1),t});return l(t,function(t){return{originalField:t.field,field:t.field||t.title,title:t.title||t.field,hidden:t.hidden,index:d(t,e)}})},_sort:function(){var t=this;t.options.sortable&&(t.refresh(),t._refreshHandler=a(t.refresh,t),t.dataSource.bind(f,t._refreshHandler),t.menu.bind(m,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,a=this,o=a.options.sortable,s=a.dataSource,l=s.sort()||[];if(e.hasClass(c)&&o&&o.allowUnsort!==!1?(e.removeClass(c),n=t):e.addClass(c),o===!0||"single"===o.mode)l=[{field:a.field,dir:n}];else{for(i=0,r=l.length;r>i;i++)if(l[i].field===a.field){l.splice(i,1);break}l.push({field:a.field,dir:n})}s.sort(l)},_columns:function(){var t=this;t.options.columns&&(t._updateColumnsMenu(),t._updateColumnsMenuHandler=a(t._updateColumnsMenu,t),t.owner.bind(["columnHide","columnShow"],t._updateColumnsMenuHandler),t.menu.bind(m,function(n){var r,a,o,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")),o=s(u,function(e){return e.field==l||e.title==l})[0],a=d(o,u),o.hidden===!0?t.owner.showColumn(a):t.owner.hideColumn(a)))}))},_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](o(!0,{},{appendToElement:!0,dataSource:n.dataSource,values:n.values,field:t.field},n.filterable)).data(v),t._isMobile&&t.menu.bind(m,function(n){var i=e(n.item);i.hasClass("k-filter-item")&&t.pane.navigate(t.filterMenu.view,t.options.animations.left)}))},refresh:function(){var e,t,n,i=this,r=i.options.dataSource.sort()||[],a=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],a==e.field&&i.wrapper.find(".k-sort-"+e.dir).addClass(c)}}),w='
        #if(sortable){#
      • ${messages.sortAscending}
      • ${messages.sortDescending}
      • #if(showColumns || filterable){#
      • #}##}##if(showColumns){#
      • ${messages.columns}
          #for (var idx = 0; idx < columns.length; idx++) {#
        • #=columns[idx].title#
        • #}#
      • #if(filterable){#
      • #}##}##if(filterable){#
      • ${messages.filter}
      • #}#
      ',x='
      ${messages.settings}
      • ${field}
          #if(sortable){#
        • ${messages.sortAscending}
        • ${messages.sortDescending}
        • #}##if(filterable){#
        • ${messages.filter}
        • #}#
      • #if(showColumns){#
      • ${messages.columns}
          #for (var idx = 0; idx < columns.length; idx++) {#
        • #}#
      • #}#
      ',C=b.extend({init:function(e,t){b.fn.init.call(this,e,t),this.element.on("click"+k,"li:not(.k-separator)","_click")},events:[m],_click:function(e){this.trigger(m,{item:e.currentTarget})&&e.preventDefault()},close:function(){this.options.pane.navigate("")},destroy:function(){b.fn.destroy.call(this),this.element.off(k)}});r.plugin(y)}(window.kendo.jQuery),function(e,t){function n(e){return Array(e+1).join(' ')}function i(e){var t,n=" ";if(e){if(typeof e===ft)return e;for(t in e)n+=t+'="'+e[t]+'"'}return n}function r(t){var n=0;return e("> .k-grouping-header, > .k-grid-toolbar",t).each(function(){n+=this.offsetHeight}),n}function a(t,n){e("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",n)}function o(e){var t,n,i={},r={};if(!R(e))for(H(e)||(e=[e]),t=0,n=e.length;n>t;t++)i[e[t].aggregate]=0,r[e[t].field]=i; return r}function s(e,t,n){var i=e.eq(t),r=e.eq(n);i[t>n?"insertBefore":"insertAfter"](r)}function l(e,t,n){var i,r,a,o;for(n=H(n)?n:[n],i=0,r=n.length;r>i;i++)a=n[i],D(a)&&a.click&&(o=a.name||a.text,t.on(dt+j,"a.k-grid-"+(o||"").replace(/\s/g,""),{commandName:o},M(a.click,e)))}function d(e){return z(e,function(e){return!e.hidden})}function c(e){e=e||{};var t=e.style;return t?(t=t.replace(/((.*)?display)(.*)?:([^;]*)/i,"$1:none"),t===e.style&&(t=t.replace(/(.*)?/i,"display:none;$1"))):t="display:none",F({},e,{style:t})}function u(e){e=e||{};var t=e.style;return t&&(e.style=t.replace(/(display\s*:\s*none\s*;?)*/gi,"")),e}function p(t,n,i,r){var a,o=t.find(">colgroup"),s=E(n,function(e){return a=e.width,a&&0!==parseInt(a,10)?k.format('',typeof a===ft?a:a+"px"):""});(i||o.find(".k-hierarchy-col").length)&&s.splice(0,0,''),o.length&&o.remove(),o=e(Array(r+1).join('')+s.join("")),o.is("colgroup")||(o=e("").append(o)),t.prepend(o),xt.msie&&8==xt.version&&(t.css("display","inline-table"),window.setTimeout(function(){t.css("display","")},1))}function f(e){var t,n,i,r={};for(n=0,i=e.length;i>n;n++)t=e[n],r[t.value]=t.text;return r}function h(e,t,n){var i=n&&n.length&&D(n[0])&&"value"in n[0],r=i?f(n)[e]:e;return r=null!=r?r:"",t?k.format(t,r):r}function m(e,t,n){for(var i,r=0,a=e[r];a;){if(i=n?!0:"none"!==a.style.display,i&&!bt.test(a.className)&&--t<0){a.style.display=n?"":"none";break}a=e[++r]}}function g(e,t){var n,i,r;if(typeof e===ft&&e===t)return e;if(D(e)&&e.name===t)return e;if(H(e))for(n=0,i=e.length;i>n;n++)if(r=e[n],typeof r===ft&&r===t||r.name===t)return r;return null}function v(t,n){var i,r,a,o=xt.msie;if(n===!0){if(t=e(t),a=o&&t.parent().is(".k-grid-content,.k-grid-header-wrap"),a&&(i=t.parent().scrollTop(),r=t.parent().scrollLeft()),o)try{t[0].setActive()}catch(s){t[0].focus()}else t[0].focus();a&&(t.parent().scrollTop(i),t.parent().scrollLeft(r))}else e(t).one("focusin",function(e){e.preventDefault()}).focus()}function _(t){var n=e(t.currentTarget),i=n.is("th"),r=n.closest("table")[0];k.support.touch||(r===this.table[0]||r===this.thead.parent()[0])&&(this.current(n),(i||!e(t.target).is(":button,a,:input,a>.k-icon,textarea,span.k-icon,span.k-link,.k-input,.k-multiselect-wrap"))&&setTimeout(function(){Tt&&e(k._activeElement()).hasClass("k-widget")||v(r,!0)}),i&&t.preventDefault())}var k=window.kendo,b=k.ui,y=k.data.DataSource,w=b.Groupable,x=k.support.tbodyInnerHtml,C=k._activeElement,T=b.Widget,S=k.keys,D=e.isPlainObject,F=e.extend,E=e.map,z=e.grep,H=e.isArray,A=e.inArray,M=e.proxy,I=k.isFunction,R=e.isEmptyObject,N=Math,O="progress",P="error",B=":not(.k-group-cell):not(.k-hierarchy-cell):visible",L="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",V="tr:not(.k-footer-template):visible",W=":not(.k-group-cell):not(.k-hierarchy-cell):visible",U=V+":first>"+W+":first",q="th.k-header:not(.k-group-cell,.k-hierarchy-cell)",j=".kendoGrid",G="edit",Y="save",$="remove",K="detailInit",Q="filterMenuInit",J="columnMenuInit",X="change",Z="columnHide",et="columnShow",tt="saveChanges",nt="dataBound",it="detailExpand",rt="detailCollapse",at="k-state-focused",ot="k-state-selected",st="columnResize",lt="columnReorder",dt="click",ct="height",ut="tabIndex",pt="function",ft="string",ht="Are you sure you want to delete this record?",mt="Delete",gt="Cancel",vt=/(\}|\#)/gi,_t=/#/gi,kt="[\\x20\\t\\r\\n\\f]",bt=RegExp("(^|"+kt+")"+"(k-group-cell|k-hierarchy-cell)"+"("+kt+"|$)"),yt='#=text#',wt=!1,xt=k.support.browser,Ct=xt.msie&&7==xt.version,Tt=xt.msie&&8==xt.version,St=T.extend({init:function(e,t){var n=this;T.fn.init.call(n,e,t),n._refreshHandler=M(n.refresh,n),n.setDataSource(t.dataSource),n.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(X,t._refreshHandler),t.dataSource=e,t.dataSource.bind(X,t._refreshHandler)},options:{name:"VirtualScrollable",itemHeight:e.noop},destroy:function(){var e=this;T.fn.destroy.call(e),e.dataSource.unbind(X,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off(j),e.drag&&e.drag.destroy()},wrap:function(){var t,n=this,i=k.support.scrollbar()+1,r=n.element;r.css({width:"auto",overflow:"hidden"}).css(wt?"padding-left":"padding-right",i),n.content=r.children().first(),t=n.wrapper=n.content.wrap('
      ').parent().bind("DOMMouseScroll"+j+" mousewheel"+j,M(n._wheelScroll,n)),k.support.kineticScrollNeeded&&(n.drag=new k.UserEvents(n.wrapper,{global:!0,move:function(e){n.verticalScrollbar.scrollTop(n.verticalScrollbar.scrollTop()-e.y.delta),t.scrollLeft(t.scrollLeft()-e.x.delta),e.preventDefault()}})),n.verticalScrollbar=e('
      ').css({width:i}).appendTo(r).bind("scroll"+j,M(n._scroll,n))},_wheelScroll:function(e){var n,i=this,r=i.verticalScrollbar.scrollTop(),a=e.originalEvent,o=a.wheelDeltaY;a.wheelDelta?(o===t||o)&&(n=a.wheelDelta):a.detail&&a.axis===a.VERTICAL_AXIS&&(n=10*-a.detail),n&&(e.preventDefault(),i.verticalScrollbar.scrollTop(r+-n))},_scroll:function(e){var t=this,n=e.currentTarget.scrollTop,i=t.dataSource,r=t.itemHeight,a=i.skip()||0,o=t._rangeStart||a,s=t.element.innerHeight(),l=!!(t._scrollbarTop&&t._scrollbarTop>n),d=N.max(N.floor(n/r),0),c=N.max(d+N.floor(s/r),0);t._scrollTop=n-o*r,t._scrollbarTop=n,t._fetch(d,c,l)||(t.wrapper[0].scrollTop=t._scrollTop)},_fetch:function(e,t,n){var i=this,r=i.dataSource,a=i.itemHeight,o=r.take(),s=i._rangeStart||r.skip()||0,l=N.floor(e/o)*o,d=!1,c=.33;return s>e?(d=!0,s=N.max(0,t-o),i._scrollTop=(e-s)*a,i._page(s,o)):t>=s+o&&!n?(d=!0,s=e,i._scrollTop=a,i._page(s,o)):i._fetching||(l+o-o*c>e&&e>o&&r.prefetch(l-o,o),t>l+o*c&&r.prefetch(l+o,o)),d},_page:function(e,t){var n=this,i=n.dataSource;clearTimeout(n._timeout),n._fetching=!0,n._rangeStart=e,i.inRange(e,t)?i.range(e,t):(k.ui.progress(n.wrapper.parent(),!0),n._timeout=setTimeout(function(){i.range(e,t)},100))},refresh:function(){var e,t,n,i,r=this,a="",o=25e4,s=r.dataSource,l=r._rangeStart,d=k.support.kineticScrollNeeded?0:k.support.scrollbar(),c=r.wrapper[0];for(k.ui.progress(r.wrapper.parent(),!1),clearTimeout(r._timeout),n=r.itemHeight=r.options.itemHeight()||0,i=c.scrollWidth>c.offsetWidth?d:0,e=s.total()*n+i,t=0;t
      ';e%o&&(a+='
      '),r.verticalScrollbar.html(a),c.scrollTop=r._scrollTop,r.drag&&r.drag.cancel(),l&&!r._fetching&&(r._rangeStart=s.skip()),r._fetching=!1}}),Dt={create:{text:"Add new record",imageClass:"k-add",className:"k-grid-add",iconClass:"k-icon"},cancel:{text:"Cancel changes",imageClass:"k-cancel",className:"k-grid-cancel-changes",iconClass:"k-icon"},save:{text:"Save changes",imageClass:"k-update",className:"k-grid-save-changes",iconClass:"k-icon"},destroy:{text:"Delete",imageClass:"k-delete",className:"k-grid-delete",iconClass:"k-icon"},edit:{text:"Edit",imageClass:"k-edit",className:"k-grid-edit",iconClass:"k-icon"},update:{text:"Update",imageClass:"k-update",className:"k-grid-update",iconClass:"k-icon"},canceledit:{text:"Cancel",imageClass:"k-cancel",className:"k-grid-cancel",iconClass:"k-icon"}},Ft=T.extend({init:function(e,t){var n=this;t=H(t)?{dataSource:t}:t,T.fn.init.call(n,e,t),wt=k.support.isRtl(e),n._element(),n._aria(),n._columns(n.options.columns),n._dataSource(),n._tbody(),n._pageable(),n._thead(),n._groupable(),n._toolbar(),n._setContentHeight(),n._templates(),n._navigatable(),n._selectable(),n._details(),n._editable(),n._attachCustomCommandsEvent(),n.options.autoBind?n.dataSource.fetch():n._footer(),k.notify(n)},events:[X,"dataBinding","cancel",nt,it,rt,K,Q,J,G,Y,$,tt,st,lt,et,Z],setDataSource:function(e){var t=this;t.options.dataSource=e,t._dataSource(),t._pageable(),t.options.groupable&&t._groupable(),t._thead(),t.virtualScrollable&&t.virtualScrollable.setDataSource(t.options.dataSource),t.options.autoBind&&e.fetch()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,navigatable:!1,pageable:!1,editable:!1,groupable:!1,rowTemplate:"",altRowTemplate:"",dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1,detailTemplate:null,columnResizeHandleWidth:3,mobile:""},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.selectable&&n.selectable.destroy(),n.resizable&&(n.resizable.destroy(),n._resizeUserEvents&&(n._resizeHandleDocumentClickHandler&&e(document).off("click",n._resizeHandleDocumentClickHandler),n._resizeUserEvents.destroy())),n.virtualScrollable&&n.virtualScrollable.destroy(),n._destroyColumnAttachments(),n._destroyEditable(),n.dataSource.unbind(X,n._refreshHandler).unbind(O,n._progressHandler).unbind(P,n._errorHandler),t=n.element.add(n.wrapper).add(n.table).add(n.thead).add(n.wrapper.find(">.k-grid-toolbar")),n.content&&(t=t.add(n.content).add(n.content.find(">.k-virtual-scrollable-wrap"))),n.pane&&n.pane.destroy(),t.off(j),k.destroy(n.wrapper)},setOptions:function(e){var t=this;T.fn.setOptions.call(this,e),t._templates()},items:function(){return this.tbody.children(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")},_destroyColumnAttachments:function(){var t=this;t.resizeHandle=null,t.thead.find("th").each(function(){var t=e(this),n=t.data("kendoFilterMenu"),i=t.data("kendoSortable"),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,a,o,s,l,d=this,c=d.options.columnResizeHandleWidth,u=d.options.scrollable,p=d.resizeHandle;p||(p=d.resizeHandle=e('
      '),t.append(p)),wt?(a=n.closest(".k-grid-header-wrap"),o=xt.msie?a.scrollLeft():0,s=xt.webkit?a[0].scrollWidth-a[0].offsetWidth-a.scrollLeft():0,l=xt.mozilla?a[0].scrollWidth-a[0].offsetWidth-(a[0].scrollWidth-a[0].offsetWidth-a.scrollLeft()):0,i=n.position().left-s+l-o):(i=n[0].offsetWidth,n.prevAll(":visible").each(function(){i+=this.offsetWidth})),p.css({top:u?0: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"+j,"th:not(.k-group-cell,.k-hierarchy-cell)",function(o){var s=e(this),l=o.clientX,d=e(window).scrollLeft(),c=s.offset().left+(wt?0:this.offsetWidth);l+d>c-r&&c+r>l+d?n._createResizeHandle(t,s):i?i.hide():a(n.wrapper,"")})},_resizeHandleDocumentClick:function(t){e(t.target).closest(".k-column-active").length||(e(document).off(t),this._hideResizeHandle())},_hideResizeHandle:function(){this.resizeHandle&&(this.resizeHandle.data("th").removeClass("k-column-active"),this.resizeHandle.hide())},_positionColumnResizeHandleTouch:function(t){var n=this;n._resizeUserEvents=new k.UserEvents(n.thead,{filter:"th:not(.k-group-cell,.k-hierarchy-cell)",threshold:10,hold:function(i){var r=e(i.target);i.preventDefault(),r.addClass("k-column-active"),n._createResizeHandle(t,r),n._resizeHandleDocumentClickHandler||(n._resizeHandleDocumentClickHandler=M(n._resizeHandleDocumentClick,n)),e(document).on("click",n._resizeHandleDocumentClickHandler)}})},_resizable:function(){var t,n,i,r,o,s,l=this,d=l.options,c=this._isMobile;d.resizable&&(t=d.scrollable?l.wrapper.find(".k-grid-header-wrap:first"):l.wrapper,c?l._positionColumnResizeHandleTouch(t):l._positionColumnResizeHandle(t),l.resizable=new b.Resizable(t,{handle:".k-resize-handle",hint:function(t){return e('
      ').css({height:t.data("th").outerHeight()+l.tbody.attr("clientHeight")})},start:function(t){s=e(t.currentTarget).data("th"),c&&l._hideResizeHandle();var u=e.inArray(s[0],s.parent().children(":visible")),p=l.tbody.parent(),f=l.footer||e();a(l.wrapper,"col-resize"),o=d.scrollable?l.thead.parent().find("col:eq("+u+")").add(p.children("colgroup").find("col:eq("+u+")")).add(f.find("colgroup").find("col:eq("+u+")")):p.children("colgroup").find("col:eq("+u+")"),n=t.x.location,i=s.outerWidth(),r=l.tbody.outerWidth()},resize:function(t){var a=wt?-1:1,s=i+t.x.location*a-n*a,c=l.footer||e();s>10&&(o.css("width",s),d.scrollable&&r&&(l._footerWidth=r+t.x.location*a-n*a,l.tbody.parent().add(l.thead.parent()).add(c.find("table")).css("width",l._footerWidth)))},resizeend:function(){var e,t=s.outerWidth();a(l.wrapper,""),i!=t&&(e=l.columns[s.parent().find("th:not(.k-group-cell,.k-hierarchy-cell)").index(s)],e.width=t,l.trigger(st,{column:e,oldWidth:i,newWidth:t})),l._hideResizeHandle(),s=null}}))},_draggable:function(){var t=this;t.options.reorderable&&(t._draggableInstance&&t._draggableInstance.destroy(),t._draggableInstance=t.wrapper.kendoDraggable({group:k.guid(),filter:t.content?".k-grid-header:first "+q:"table:first>.k-grid-header "+q,drag:function(){t._hideResizeHandle()},hint:function(t){return e('
      ').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(t.attr(k.attr("title"))||t.attr(k.attr("field"))||t.text()).prepend('')}}).data("kendoDraggable"))},_reorderable:function(){var e=this;e.options.reorderable&&e.wrapper.kendoReorderable({draggable:e._draggableInstance,change:function(t){var n=A(e.columns[t.newIndex],e.columns),i=e.columns[t.oldIndex];e.trigger(lt,{newIndex:n,oldIndex:A(i,e.columns),column:i}),e.reorderColumn(n,i)}})},reorderColumn:function(e,t){var n,i,r,a=this,o=A(t,a.columns),l=A(t,d(a.columns)),c=A(a.columns[e],d(a.columns)),u=a.footer||a.wrapper.find(".k-grid-footer");if(o!==e)for(a._hideResizeHandle(),a.columns.splice(o,1),a.columns.splice(e,0,t),a._templates(),s(a.thead.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),l,c),a.options.scrollable&&s(a.tbody.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),l,c),s(a.thead.find(".k-header:not(.k-group-cell,.k-hierarchy-cell)"),o,e),u&&u.length&&(s(u.find(".k-grid-footer-wrap>table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),l,c),s(u.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),o,e)),n=a.tbody.children(":not(.k-grouping-row,.k-detail-row)"),i=0,r=n.length;r>i;i+=1)s(n.eq(i).find(">td:not(.k-group-cell,.k-hierarchy-cell)"),o,e)},cellIndex:function(t){return e(t).parent().children("td:not(.k-group-cell,.k-hierarchy-cell)").index(t)},_modelForContainer:function(t){t=e(t),t.is("tr")||"popup"===this._editMode()||(t=t.closest("tr"));var n=t.attr(k.attr("uid"));return this.dataSource.getByUid(n)},_editable:function(){var t,n=this,i=n.selectable&&n.selectable.options.multiple,r=n.options.editable,a=function(){var t=C(),i=n._editContainer;!i||e.contains(i[0],t)||i[0]===t||e(t).closest(".k-animation-container").length||n.editable.end()&&n.closeCell()};r&&(t=n._editMode(),"incell"===t?r.update!==!1&&n.wrapper.on(dt+j,"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"+j,function(){clearTimeout(n.timer),n.timer=null}).on("focusout"+j,function(){n.timer=setTimeout(a,1)}):r.update!==!1&&n.wrapper.on(dt+j,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit",function(t){t.preventDefault(),n.editRow(e(this).closest("tr"))}),r.destroy!==!1?n.wrapper.on(dt+j,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible .k-grid-delete",function(t){t.preventDefault(),t.stopPropagation(),n.removeRow(e(this).closest("tr"))}):n.wrapper.on(dt+j,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible button.k-grid-delete",function(e){e.stopPropagation(),n._confirmation()||e.preventDefault()}))},editCell:function(t){t=e(t);var n=this,i=n.columns[n.cellIndex(t)],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()),e._actionSheet&&(e._actionSheet.destroy(),e._actionSheet=null)},_destroyEditView:function(){this.editView&&(this.editView.purge(),this.editView=null,this.pane.navigate(""))},_attachModelChange:function(e){var t=this;t._modelChangeHandler=function(e){t._modelChange({field:e.field,model:this})},e.bind("change",t._modelChangeHandler)},_detachModelChange:function(){var e=this,t=e._editContainer,n=e._modelForContainer(t);n&&n.unbind(X,e._modelChangeHandler)},closeCell:function(t){var n,i,r,a=this,o=a._editContainer;o&&(n=o.closest("tr").attr(k.attr("uid")),r=a.dataSource.getByUid(n),t&&a.trigger("cancel",{container:o,model:r})||(o.removeClass("k-edit-cell"),i=a.columns[a.cellIndex(o)],o.parent().removeClass("k-grid-edit-row"),a._destroyEditable(),a._displayCell(o,i,r),o.hasClass("k-dirty-cell")&&e('').prependTo(o)))},_displayCell:function(e,t,n){var i=this,r={storage:{},count:0},a=F({},k.Template,i.options.templateSettings),o=k.template(i._cellTmpl(t,r),a);r.count>0&&(o=M(o,r.storage)),e.empty().html(o(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($,{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,a,o,s=this;n instanceof k.data.ObservableObject?i=n:(n=e(n),i=s._modelForContainer(n)),r=s._editMode(),a=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(B).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}),o=s.editView?s.editView.element:s._editContainer,o.on(dt+j,"a.k-grid-cancel",function(t){if(t.preventDefault(),t.stopPropagation(),!s.trigger("cancel",{container:o,model:i})){var n=s.items().index(e(s.current()).parent());s.cancelRow(),a&&(s.current(s.items().eq(n).children().filter(W).first()),v(s.table,!0))}}),o.on(dt+j,"a.k-grid-update",function(e){e.preventDefault(),e.stopPropagation(),s.saveRow()}))},_createPopupEditor:function(n){var i,r,a,o,s,l,d,c,u,p,f,h=this,m="
      ',_=[],b=h.options.editable,y=b.template,w=D(b)?b.window:{},x=F({},k.Template,h.options.templateSettings);if(w=w||{},y)for(typeof y===ft&&(y=window.unescape(y)),m+=k.template(y,x)(n),a=0,o=h.columns.length;o>a;a++)i=h.columns[a],i.command&&(c=g(i.command,"edit"),c&&(r=c));else for(a=0,o=h.columns.length;o>a;a++)i=h.columns[a],i.command?i.command&&(c=g(i.command,"edit"),c&&(r=c)):(m+='
      ",n.editable&&!n.editable(i.field)||!i.field?(p={storage:{},count:0},s=k.template(h._cellTmpl(i,p),x),p.count>0&&(s=M(s,p.storage)),m+='
      '+s(n)+"
      "):(_.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),m+="
      '));r&&D(r)&&(r.text&&D(r.text)&&(l=r.text.update,d=r.text.cancel),r.attr&&(u=r.attr)),h._isMobile?(m+="
      ",h.editView=h.pane.append("
      '+"
      '+h._createButton({name:"update",text:l,attr:u})+(w.title||"Edit")+h._createButton({name:"canceledit",text:d,attr:u})+"
      "+m+"
      "),f=h._editContainer=h.editView.element.find(".k-popup-edit-form")):(m+='
      ',m+=h._createButton({name:"update",text:l,attr:u})+h._createButton({name:"canceledit",text:d,attr:u}),m+="
      ",f=h._editContainer=e(m).appendTo(h.wrapper).eq(0).kendoWindow(F({modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1,close:function(i){if(i.userTriggered){if(i.sender.element.focus(),h.trigger("cancel",{container:f,model:n}))return i.preventDefault(),t;var r=h.items().index(e(h.current()).parent());h.cancelRow(),h.options.navigatable&&(h.current(h.items().eq(r).children().filter(W).first()),v(h.table,!0))}}},w))),h.editable=h._editContainer.kendoEditable({fields:_,model:n,clearContainer:!1}).data("kendoEditable"),h._isMobile&&f.find("input[type=checkbox],input[type=radio]").parent(".k-edit-field").addClass("k-check").prev(".k-edit-label").addClass("k-check").click(function(){e(this).next().children("input").click()}),h._openPopUpEditor(),h.trigger(G,{container:f,model:n})},_openPopUpEditor:function(){this._isMobile?this.pane.navigate(this.editView,this._editAnimation):this._editContainer.data("kendoWindow").center().open()},_createInlineEditor:function(t,n){var i,r,a,o=this,s=[];t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){if(r=e(this),i=o.columns[o.cellIndex(r)],i.command||!i.field||n.editable&&!n.editable(i.field)){if(i.command&&(a=g(i.command,"edit"))){r.empty();var t,l,d;D(a)&&(a.text&&D(a.text)&&(t=a.text.update,l=a.text.cancel),a.attr&&(d=a.attr)),e(o._createButton({name:"update",text:t,attr:d})+o._createButton({name:"canceledit",text:l,attr:d})).appendTo(r)}}else s.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),r.attr(k.attr("container-for"),i.field),r.empty()}),o._editContainer=t,o.editable=t.addClass("k-grid-edit-row").kendoEditable({fields:s,model:n,clearContainer:!1}).data("kendoEditable"),o.trigger(G,{container:t,model:n})},cancelRow:function(){var e,t=this,n=t._editContainer;n&&(e=t._modelForContainer(n),t._destroyEditable(),t.dataSource.cancelChanges(e),"popup"!==t._editMode()?t._displayRow(n):t._displayRow(t.items().filter("["+k.attr("uid")+"="+e.uid+"]")))},saveRow:function(){var e=this,t=e._editContainer,n=e._modelForContainer(t),i=e.editable;t&&i&&i.end()&&!e.trigger(Y,{container:t,model:n})&&e.dataSource.sync()},_displayRow:function(t){var n=this,i=n._modelForContainer(t);i&&t.replaceWith(e((t.hasClass("k-alt")?n.altRowTemplate:n.rowTemplate)(i)))},_showMessage:function(t,n){var i,r,a,o=this;return o._isMobile?(i=k.template(''),r=e(i(t)).appendTo(o.view.element),a=o._actionSheet=new k.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")||o._removeRow(n)},popup:o._actionSheetPopupOptions}),a.open(n),!1):window.confirm(t.title)},_confirmation:function(e){var t=this,n=t.options.editable,i=n===!0||typeof n===ft?ht:n.confirmation;return i!==!1&&null!=i?t._showMessage({confirmDelete:n.confirmDelete||mt,cancelDelete:n.cancelDelete||gt,title:i===!0?ht:i},e):!0},cancelChanges:function(){this.dataSource.cancelChanges()},saveChanges:function(){var e=this;(e.editable&&e.editable.end()||!e.editable)&&!e.trigger(tt)&&e.dataSource.sync()},addRow:function(){var e,t,n,i,r,a=this,o=a.dataSource,s=a._editMode(),l=a.options.editable.createAt||"",d=o.pageSize(),c=o.view()||[];(a.editable&&a.editable.end()||!a.editable)&&("incell"!=s&&a.cancelRow(),e=o.indexOf(c[0]),"bottom"==l.toLowerCase()&&(e+=c.length,d&&!o.options.serverPaging&&d<=c.length&&(e-=1)),0>e&&(e=o.page()>o.totalPages()?(o.page()-1)*d:0),t=o.insert(e,{}),n=t.uid,i=a.table.find("tr["+k.attr("uid")+"="+n+"]"),r=i.children("td:not(.k-group-cell,.k-hierarchy-cell)").eq(a._firstEditableColumnIndex(i)),"inline"===s&&i.length?a.editRow(i):"popup"===s?a.editRow(t):r.length&&a.editCell(r))},_firstEditableColumnIndex:function(e){var t,n,i,r=this,a=r.columns,o=r._modelForContainer(e);for(n=0,i=a.length;i>n;n++)if(t=a[n],o&&(!o.editable||o.editable(t.field))&&!t.command&&t.field)return n;return-1},_toolbar:function(){var t,n=this,i=n.wrapper,r=n.options.toolbar,a=n.options.editable;r&&(t=n.wrapper.find(".k-grid-toolbar"),t.length||(I(r)||(r=typeof r===ft?r:n._toolbarTmpl(r).replace(_t,"\\#"),r=M(k.template(r),n)),t=e('
      ').html(r({})).prependTo(i)),a&&a.create!==!1&&t.on(dt+j,".k-grid-add",function(e){e.preventDefault(),n.addRow()}).on(dt+j,".k-grid-cancel-changes",function(e){e.preventDefault(),n.cancelChanges()}).on(dt+j,".k-grid-save-changes",function(e){e.preventDefault(),n.saveChanges()}))},_toolbarTmpl:function(e){var t,n,i=this,r="";if(H(e))for(t=0,n=e.length;n>t;t++)r+=i._createButton(e[t]);return r},_createButton:function(e){var t=e.template||yt,n=typeof e===ft?e:e.name||e.text,r=Dt[n]?Dt[n].className:"k-grid-"+(n||"").replace(/\s/g,""),a={className:r,text:n,imageClass:"",attr:"",iconClass:""};if(!(n||D(e)&&e.template))throw Error("Custom commands should have name specified");return D(e)?(e.className&&(e.className+=" "+a.className),"edit"===n&&D(e.text)&&(e=F(!0,{},e),e.text=e.text.edit),e.attr&&D(e.attr)&&(e.attr=i(e.attr)),a=F(!0,a,Dt[n],e)):a=F(!0,a,Dt[n]),k.template(t)(a)},_hasFooters:function(){var e,t=this.columns,n=t.length;for(e=0;n>e;e++)if(""!==t[e].footerTemplate||""!==t[e].groupFooterTemplate)return!0;return!1},_groupable:function(){var t=this;t._groupableClickHandler?t.table.off(dt+j,t._groupableClickHandler):t._groupableClickHandler=function(n){var i=e(this),r=i.closest("tr");i.hasClass("k-i-collapse")?t.collapseGroup(r):t.expandGroup(r),n.preventDefault(),n.stopPropagation()},t.table.on(dt+j,".k-grouping-row .k-i-collapse, .k-grouping-row .k-i-expand",t._groupableClickHandler),t._attachGroupable()},_attachGroupable:function(){var t=this,n=t.wrapper,i=t.options.groupable,r=q+":visible["+k.attr("field")+"]",a=q+"["+k.attr("field")+"]";i&&(n.has("div.k-grouping-header")[0]||e("
       
      ").addClass("k-grouping-header").prependTo(n),t.groupable&&t.groupable.destroy(),t.groupable=new w(n,F({},i,{draggable:t._draggableInstance,groupContainer:">div.k-grouping-header",dataSource:t.dataSource,draggableElements:t.content?".k-grid-header:first "+r:"table:first>.k-grid-header "+r,filter:t.content?".k-grid-header:first "+a:"table:first>.k-grid-header "+a,allowDrag:t.options.reorderable})))},_selectable:function(){var e,n,i=this,r=[],a=i.options.selectable;a&&(e=typeof a===ft&&a.toLowerCase().indexOf("multiple")>-1,n=typeof a===ft&&a.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 k.ui.Selectable(i.table,{filter:">"+(n?L:"tbody>tr"+r),aria:!0,multiple:e,change:function(){i.trigger(X)}}),i.options.navigatable&&i.table.on("keydown"+j,function(r){var a=i.current();if(r.keyCode===S.SPACEBAR&&r.target==i.table[0]&&!a.is(".k-edit-cell,.k-header")&&a.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")){if(r.preventDefault(),r.stopPropagation(),a=n?a:a.parent(),e)if(r.ctrlKey){if(a.hasClass(ot))return a.removeClass(ot),i.trigger(X),t}else i.selectable.clear();else i.selectable.clear();i.selectable.value(a)}}))},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger(X)},select:function(n){var i=this,r=i.selectable;return n=e(n),n.length?(r.options.multiple||(r.clear(),n=n.first()),r.value(n),t):r.value()},current:function(n){var i=this,r=i.options.scrollable,a=i._current,o=i.table.add(i.thead.parent());return n!==t&&n.length&&(a&&a[0]===n[0]||(a&&(a.removeClass(at).removeAttr("id"),o.removeAttr("aria-activedescendant")),n.attr("id",i._cellId),i._current=n.addClass(at),o.attr("aria-activedescendant",i._cellId),n.length&&r&&(e.contains(i.content[0],n[0])&&i._scrollTo(n.parent()[0],i.content[0]),r.virtual?i._scrollTo(n[0],i.content.find(">.k-virtual-scrollable-wrap")[0]):i._scrollTo(n[0],i.content[0])))),i._current},_removeCurrent:function(){this._current&&(this._current.removeClass(at),this._current=null)},_scrollTo:function(e,t){var n=e.tagName.toLowerCase(),i="td"===n||"th"===n,r=e[i?"offsetLeft":"offsetTop"],a=e[i?"offsetWidth":"offsetHeight"],o=t[i?"scrollLeft":"scrollTop"],s=t[i?"clientWidth":"clientHeight"],l=r+a,d=0;d=o>r?r:l>o+s?s>=a?l-s:r:o,t[i?"scrollLeft":"scrollTop"]=d},_navigatable:function(){var t=this,n=M(t.current,t),i=t.table,r=t.thead.parent(),a=i,o=k.support.isRtl(t.element);t.options.navigatable&&(t.options.scrollable&&(a=i.add(r),r.attr(ut,-1)),r.on("keydown"+j,function(e){e.altKey&&e.keyCode==S.DOWN&&(n().find(".k-grid-filter, .k-header-column-menu").click(),e.stopImmediatePropagation())}).find("a.k-link").attr("tabIndex",-1),i.attr(ut,N.max(i.attr(ut)||0,0)).on("mousedown"+j+" keydown"+j,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}),a.on(k.support.touch?"touchstart"+j:"mousedown"+j,V+">"+W,M(_,t)).on("focus"+j,function(){if(!k.support.touch){var t=n();t&&t.is(":visible")?t.addClass(at):n(e(this).find(U)),this==i[0]?(r.attr(ut,-1),i.attr(ut,0)):(i.attr(ut,-1),r.attr(ut,0))}}).on("focusout"+j,function(){var e=n();e&&e.removeClass(at)}).on("keydown"+j,function(r){var a,s,l,d,c,u,p,f,h=r.keyCode,m=!1,g=!r.isDefaultPrevented()&&!e(r.target).is(":button,a,:input,a>.k-icon"),_=t.options.pageable,k=t.dataSource,b="incell"==t._editMode(),y=r.shiftKey,w=n();w&&w.is("th")&&(g=!0),g&&h==S.UP?(w?(l=w.parent().prevAll(V).first(),l[0]||(c=t.thead.parent(),v(c,!0),l=c.find(V).first()),d=w.index(),w=l.children().eq(d),w[0]&&w.is(W)||(w=l.children(W).first())):w=i.find(U),m=!0,n(w)):g&&h==S.DOWN?(w?(l=w.parent().nextAll(V).first(),!l[0]&&w.is("th")&&(v(t.tbody.parent()),l=t.tbody.find(V).first()),d=w.index(),w=l.children().eq(d),w[0]&&w.is(W)||(w=l.children(W).first())):w=i.find(U),m=!0,n(w)):g&&h==(o?S.RIGHT:S.LEFT)?(n(w?w.prevAll(B+":first"):i.find(U)),m=!0):g&&h==(o?S.LEFT:S.RIGHT)?(w?w.next()[0]&&(w=w.nextAll(B+":first")):w=i.find(U),m=!0,n(w)):g&&_&&S.PAGEDOWN==h?(k.page(k.page()+1),m=!0):g&&_&&S.PAGEUP==h?(k.page(k.page()-1),m=!0):h==S.ENTER||S.F2==h?(w=w?w:i.find(U),w.is("th")?(w.find(".k-link").click(),m=!0):w.parent().is(".k-master-row,.k-grouping-row")?(w.parent().find(".k-icon:first").click(),m=!0):(u=w.find(":kendoFocusable:first"),!w.hasClass("k-edit-cell")&&u[0]&&w.hasClass("k-state-focused")?(u.focus(),m=!0):t.options.editable&&!e(r.target).is(":button,.k-button,textarea")&&(p=e(r.target).closest("[role=gridcell]"),p[0]||(p=w),t._handleEditing(p),m=!0))):S.ESC==h?(a=C(),w&&e.contains(w[0],a)&&!w.hasClass("k-edit-cell")&&!w.parent().hasClass("k-grid-edit-row")?(v(t.table[0],!0),m=!0):!t._editContainer||w&&!t._editContainer.has(w[0])&&w[0]!==t._editContainer[0]||(b?t.closeCell(!0):(s=t.items().index(e(w).parent()),a&&a.blur(),t.cancelRow(),s>=0&&t.current(t.items().eq(s).children().filter(W).first())),xt.msie&&xt.version<9&&document.body.focus(),v(i,!0),m=!0)):S.TAB==h&&(w=e(w),t.options.editable&&b&&(f=e(C()).closest(".k-edit-cell"),f[0]&&f[0]!==w[0]&&(w=f)),f=y?w.prevAll(B+":first"):w.nextAll(":visible:first"),f.length||(f=w.parent()[y?"prevAll":"nextAll"]("tr:not(.k-grouping-row):not(.k-detail-row):visible:first").children(B+(y?":last":":first"))),!w.is("th")&&f.length&&t.options.editable&&b&&(t._handleEditing(w,f),m=!0)),m&&(r.preventDefault(),r.stopPropagation()) }))},_handleEditing:function(n,i){var r,a,o=this,s=e(C()),l=o._editMode(),d=xt.msie,c=d&&xt.version<9,u=o._editContainer;if(a="incell"==l?n.hasClass("k-edit-cell"):n.parent().hasClass("k-grid-edit-row"),o.editable){if(e.contains(u[0],s[0])&&(xt.opera||c?s.change().triggerHandler("blur"):(s.blur(),d&&s.blur())),!o.editable)return v(o.table),t;if(!o.editable.end())return"incell"==l?o.current(u):o.current(u.children().filter(B).first()),r=u.find(":kendoFocusable:first")[0],r&&r.focus(),t;"incell"==l?o.closeCell():(o.saveRow(),a=!0)}i&&o.current(i),c&&document.body.focus(),v(o.table,!0),(!a&&!i||i)&&("incell"==l?o.editCell(o.current()):o.editRow(o.current().parent()))},_wrapper:function(){var e=this,t=e.table,n=e.options.height,i=e.element;i.is("div")||(i=i.wrap("
      ").parent()),e.wrapper=i.addClass("k-grid k-widget k-secondary"),n&&(e.wrapper.css(ct,n),t.css(ct,"auto")),e._initMobile()},_initMobile:function(){var t,n=this.options;this._isMobile=n.mobile===!0&&k.support.mobileOS||"phone"===n.mobile||"tablet"===n.mobile,this._isMobile&&(t=this.wrapper.addClass("k-grid-mobile").wrap("
      ').parent(),this.pane=k.mobile.ui.Pane.wrap(t),this.view=this.pane.view(),this._actionSheetPopupOptions=e(document.documentElement).hasClass("km-root")?{modal:!1}:{align:"bottom center",position:"bottom center",effect:"slideIn:up"},n.height&&this.pane.element.parent().css(ct,n.height),this._editAnimation="slide")},_tbody:function(){var t,n=this,i=n.table;t=i.find(">tbody"),t.length||(t=e("
      ").appendTo(i)),n.tbody=t},_scrollable:function(){var t,n,i,r,a,o=this,s=o.options,l=s.scrollable,d=l!==!0&&l.virtual&&!o.virtualScrollable,c=!k.support.kineticScrollNeeded||d?k.support.scrollbar():0;l&&(t=o.wrapper.children(".k-grid-header"),t[0]||(t=e('
      ').insertBefore(o.table)),t.css(wt?"padding-left":"padding-right",l.virtual?c+1:c),n=e('
      '),Ct&&n.attr("cellspacing",0),n.append(o.thead),t.empty().append(e('
      ').append(n)),o.content=o.table.parent(),o.content.is(".k-virtual-scrollable-wrap")&&(o.content=o.content.parent()),o.content.is(".k-grid-content, .k-virtual-scrollable-wrap")||(o.content=o.table.wrap('
      ').parent()),d&&(o.virtualScrollable=new St(o.content,{dataSource:o.dataSource,itemHeight:M(o._averageRowHeight,o)})),o.scrollables=t.children(".k-grid-header-wrap"),i=o.wrapper.find(".k-grid-footer"),r=wt&&xt.webkit?c:0,i.length&&(o.scrollables=o.scrollables.add(i.children(".k-grid-footer-wrap"))),l.virtual?o.content.find(">.k-virtual-scrollable-wrap").bind("scroll"+j,function(){o.scrollables.scrollLeft(this.scrollLeft+r)}):(o.content.bind("scroll"+j,function(){o.scrollables.scrollLeft(this.scrollLeft+r)}),a=k.touchScroller(o.content),a&&a.movable&&a.movable.bind("change",function(e){o.scrollables.scrollLeft(-e.sender.x)})))},_setContentWidth:function(){var t,n=this,i="k-grid-content-expander",r='
      ',a=n.resizable;n.options.scrollable&&n.wrapper.is(":visible")&&(t=n.table.parent().children("."+i),n._setContentWidthHandler=M(n._setContentWidth,n),n.dataSource&&n.dataSource.view().length?t[0]&&(t.remove(),a&&a.unbind("resize",n._setContentWidthHandler)):(t[0]||(t=e(r).appendTo(n.table.parent()),a&&a.bind("resize",n._setContentWidthHandler)),n.thead&&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"),a=k.support.scrollbar();n.scrollable&&t.wrapper.is(":visible")&&(i-=r.outerHeight(),t.pager&&(i-=t.pager.element.outerHeight()),n.groupable&&(i-=t.wrapper.children(".k-grouping-header").outerHeight()),n.toolbar&&(i-=t.wrapper.children(".k-grid-toolbar").outerHeight()),t.footerTemplate&&(i-=t.wrapper.children(".k-grid-footer").outerHeight()),e=function(e){var t,n;return e[0].style.height?!0:(t=e.height(),e.height("auto"),n=e.height(),t!=n?(e.height(""),!0):(e.height(""),!1))},e(t.wrapper)&&(i>2*a?t.content.height(i):t.content.height(2*a+1)))},_averageRowHeight:function(){var e,t=this,n=t._rowHeight;return t._rowHeight||(t._rowHeight=n=t.table.outerHeight()/t.items().length,t._sum=n,t._measures=1),e=t.table.outerHeight()/t.items().length,n!==e&&(t._measures++,t._sum+=e,t._rowHeight=t._sum/t._measures),n},_dataSource:function(){var e,n=this,i=n.options,r=i.dataSource;r=H(r)?{data:r}:r,D(r)&&(F(r,{table:n.table,fields:n.columns}),e=i.pageable,D(e)&&e.pageSize!==t&&(r.pageSize=e.pageSize)),n.dataSource&&n._refreshHandler?n.dataSource.unbind(X,n._refreshHandler).unbind(O,n._progressHandler).unbind(P,n._errorHandler):(n._refreshHandler=M(n.refresh,n),n._progressHandler=M(n._requestStart,n),n._errorHandler=M(n._error,n)),n.dataSource=y.create(r).bind(X,n._refreshHandler).bind(O,n._progressHandler).bind(P,n._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_modelChange:function(t){var n,i,r,a,o=this,s=t.model,l=o.tbody.find("tr["+k.attr("uid")+"="+s.uid+"]"),d=l.hasClass("k-alt"),c=o.items().index(l);if(l.children(".k-edit-cell").length&&!o.options.rowTemplate)l.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){n=e(this),i=o.columns[o.cellIndex(n)],i.field===t.field&&(n.hasClass("k-edit-cell")?n.addClass("k-dirty-cell"):(o._displayCell(n,i,s),e('').prependTo(n)))});else if(!l.hasClass("k-grid-edit-row")){for(r=(d?o.altRowTemplate:o.rowTemplate)(s),l.replaceWith(r),r=o.items().eq(c),c=0,a=o.columns.length;a>c;c++)i=o.columns[c],i.field===t.field&&(n=r.children(":not(.k-group-cell,.k-hierarchy-cell)").eq(c),e('').prependTo(n));o.trigger("itemChange",{item:r,data:s,ns:b})}},_pageable:function(){var t,n=this,i=n.options.pageable;i&&(t=n.wrapper.children("div.k-grid-pager"),t.length||(t=e('
      ').appendTo(n.wrapper)),n.pager&&n.pager.destroy(),n.pager="object"==typeof i&&i instanceof k.ui.Pager?i:new k.ui.Pager(t,F({},i,{dataSource:n.dataSource})))},_footer:function(){var t,n,i=this,r=i.dataSource.aggregates(),a="",s=i.footerTemplate,l=i.options,d=i.footer||i.wrapper.find(".k-grid-footer");s?(r=R(r)?o(i.dataSource.aggregate()):r,a=e(i._wrapFooter(s(r))),d.length?(n=a,d.replaceWith(n),d=i.footer=n):d=i.footer=l.scrollable?l.pageable?a.insertBefore(i.wrapper.children("div.k-grid-pager")):a.appendTo(i.wrapper):a.insertBefore(i.tbody)):d&&!i.footer&&(i.footer=d),d.length&&(l.scrollable&&(t=d.attr("tabindex",-1).children(".k-grid-footer-wrap"),i.scrollables=i.scrollables.not(".k-grid-footer-wrap").add(t)),i._footerWidth&&d.find("table").css("width",i._footerWidth),t&&t.scrollLeft(i.content.scrollLeft()))},_wrapFooter:function(t){var n=this,i="",r=k.support.mobileOS?0:k.support.scrollbar();return n.options.scrollable?(i=e('
      "+t+"
      "),n._appendCols(i.find("table")),i.css(wt?"padding-left":"padding-right",r),i):''+t+""},_columnMenu:function(){var t,n,i,r,a,o,s=this,l=s.columns,d=s.options,c=d.columnMenu,u=this._isMobile,p=function(){v(s.thead.parent(),!0)},f=function(e){s.trigger(J,{field:e.field,container:e.container})};c&&("boolean"==typeof c&&(c={}),s.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(h){n=l[h],o=e(this),n.command||!n.field&&!o.attr("data-"+k.ns+"field")||(t=o.data("kendoColumnMenu"),t&&t.destroy(),r=n.sortable!==!1&&c.sortable!==!1?d.sortable:!1,a=d.filterable&&n.filterable!==!1&&c.filterable!==!1?F({pane:s.pane},n.filterable,d.filterable):!1,i={dataSource:s.dataSource,values:n.values,columns:c.columns,sortable:r,filterable:a,messages:c.messages,owner:s,closeCallback:p,init:f,pane:s.pane,filter:u?":not(.k-column-active)":""},o.kendoColumnMenu(i))}))},_filterable:function(){var t,n,i=this,r=i.columns,a=function(){v(i.thead.parent(),!0)},o=i.options.filterable;o&&!i.options.columnMenu&&i.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(s){var l,d;t=e(this),r[s].filterable===!1||r[s].command||!r[s].field&&!t.attr("data-"+k.ns+"field")||(n=t.data("kendoFilterMenu"),n&&n.destroy(),l=r[s].filterable,d=F({},o,l,{dataSource:i.dataSource,values:r[s].values,closeCallback:a,init:function(e){i.trigger(Q,{field:e.field,container:e.container})},pane:i.pane}),l&&l.messages&&(d.messages=F(!0,{},o.messages,l.messages)),t.kendoFilterMenu(d))})},_sortable:function(){var t,n,i,r=this,a=r.columns,o=r.options.sortable;o&&r.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(s){t=a[s],t.sortable!==!1&&!t.command&&t.field&&(n=e(this),i=n.data("kendoSortable"),i&&i.destroy(),n.attr("data-"+k.ns+"field",t.field).kendoSortable(F({},o,t.sortable,{dataSource:r.dataSource,aria:!0,filter:":not(.k-column-active)"})))})},_columns:function(t){var n,i=this,r=i.table,a=r.find("col"),o=i.options.dataSource;t=t.length?t:E(r.find("th"),function(t,n){t=e(t);var i=t.attr(k.attr("sortable")),r=t.attr(k.attr("filterable")),o=t.attr(k.attr("type")),s=t.attr(k.attr("groupable")),l=t.attr(k.attr("field")),d=t.attr(k.attr("menu"));return l||(l=t.text().replace(/\s|[^A-z0-9]/g,"")),{field:l,type:o,sortable:"false"!==i,filterable:"false"!==r,groupable:"false"!==s,menu:d,template:t.attr(k.attr("template")),width:a.eq(n).css("width")}}),n=!(i.table.find("tbody tr").length>0&&(!o||!o.transport)),i.columns=E(t,function(e){return e=typeof e===ft?{field:e}:e,e.hidden&&(e.attributes=c(e.attributes),e.footerAttributes=c(e.footerAttributes),e.headerAttributes=c(e.headerAttributes)),F({encoded:n},e)})},_groups:function(){var e=this.dataSource.group();return e?e.length:0},_tmpl:function(e,t){var r,a,o,s,l=this,d=F({},k.Template,l.options.templateSettings),c=l.columns.length,u={storage:{},count:0},p=l._hasDetails(),f=[],h=l._groups();if(!e){for(e="0&&(e+=n(h)),p&&(e+=''),r=0;c>r;r++)o=l.columns[r],a=o.template,s=typeof a,e+="",e+=l._cellTmpl(o,u),e+="";e+=""}return e=k.template(e,d),u.count>0?M(e,u.storage):e},_headerCellText:function(e){var t=this,n=F({},k.Template,t.options.templateSettings),i=e.headerTemplate,r=typeof i,a=e.title||e.field||"";return r===pt?a=k.template(i,n)({}):r===ft&&(a=i),a},_cellTmpl:function(e,t){var n,i,r=this,a=F({},k.Template,r.options.templateSettings),o=e.template,s=a.paramName,l=e.field,d="",c=e.format,u=typeof o,p=e.values;if(e.command){if(H(e.command)){for(n=0,i=e.command.length;i>n;n++)d+=r._createButton(e.command[n]);return d.replace(_t,"\\#")}return r._createButton(e.command).replace(_t,"\\#")}return u===pt?(t.storage["tmpl"+t.count]=o,d+="#=this.tmpl"+t.count+"("+s+")#",t.count++):u===ft?d+=o:p&&p.length&&D(p[0])&&"value"in p[0]&&l?(d+="#var v ="+k.stringify(f(p))+"#",d+="#var f = v[",a.useWithBlock||(d+=s+"."),d+=l+"]#",d+="${f != null ? f : ''}"):(d+=e.encoded?"#:":"#=",c&&(d+='kendo.format("'+c.replace(vt,"\\$1")+'",'),l?(l=k.expr(l,s),d+=l+"==null?'':"+l):d+="''",c&&(d+=")"),d+="#"),d},_templates:function(){var t=this,n=t.options,i=t.dataSource,r=i.group(),a=t.footer||t.wrapper.find(".k-grid-footer"),o=i.aggregate();t.rowTemplate=t._tmpl(n.rowTemplate),t.altRowTemplate=t._tmpl(n.altRowTemplate||n.rowTemplate,!0),t._hasDetails()&&(t.detailTemplate=t._detailTmpl(n.detailTemplate||"")),(t._group&&!R(o)||!R(o)&&!a.length||z(t.columns,function(e){return e.footerTemplate}).length)&&(t.footerTemplate=t._footerTmpl(o,"footerTemplate","k-footer-template")),r&&z(t.columns,function(e){return e.groupFooterTemplate}).length&&(o=e.map(r,function(e){return e.aggregates}),t.groupFooterTemplate=t._footerTmpl(o,"groupFooterTemplate","k-group-footer"))},_footerTmpl:function(e,t,r){var a,s,l,d,c,u=this,p=F({},k.Template,u.options.templateSettings),f=p.paramName,h="",m=u.columns,g={},v=0,_={},b=u._groups(),y=o(e);for(h+='',b>0&&(h+=n(b)),u._hasDetails()&&(h+=' '),a=0,s=u.columns.length;s>a;a++)c=m[a],l=c[t],d=typeof l,h+="",l?(d!==pt&&(_=y[c.field]?F({},p,{paramName:f+"."+c.field}):{},l=k.template(l,_)),g["tmpl"+v]=l,h+="#=this.tmpl"+v+"("+f+")#",v++):h+=" ",h+="";return h+="",h=k.template(h,p),v>0?M(h,g):h},_detailTmpl:function(e){var t=this,i="",r=F({},k.Template,t.options.templateSettings),a=r.paramName,o={},s=0,l=t._groups(),c=d(t.columns).length,u=typeof e;return i+='',l>0&&(i+=n(l)),i+='",u===pt?(o["tmpl"+s]=e,i+="#=this.tmpl"+s+"("+a+")#",s++):i+=e,i+="",i=k.template(i,r),s>0?M(i,o):i},_hasDetails:function(){var e=this;return null!==e.options.detailTemplate||(e._events[K]||[]).length},_details:function(){var t=this;t.table.on(dt+j,".k-hierarchy-cell .k-plus, .k-hierarchy-cell .k-minus",function(n){var i,r,a=e(this),o=a.hasClass("k-plus"),s=a.closest("tr.k-master-row"),l=t.detailTemplate,d=t._hasDetails();return a.toggleClass("k-plus",!o).toggleClass("k-minus",o),d&&!s.next().hasClass("k-detail-row")&&(r=t.dataItem(s),e(l(r)).addClass(s.hasClass("k-alt")?"k-alt":"").insertAfter(s),t.trigger(K,{masterRow:s,detailRow:s.next(),data:r,detailCell:s.next().find(".k-detail-cell")})),i=s.next(),t.trigger(o?it:rt,{masterRow:s,detailRow:i}),i.toggle(o),t._current&&t._current.attr("aria-expanded",o),n.preventDefault(),!1})},dataItem:function(t){if(t=e(t)[0],!t)return null;var n,i,r=this.tbody.children(),a=/k-grouping-row|k-detail-row|k-group-footer/,o=t.sectionRowIndex;for(i=o,n=0;o>n;n++)a.test(r[n].className)&&i--;return this._data[i]},expandRow:function(t){e(t).find("> td .k-plus, > td .k-i-expand").click()},collapseRow:function(t){e(t).find("> td .k-minus, > td .k-i-collapse").click()},_thead:function(){var n,r,a,o,s,l=this,d=l.columns,c=l._hasDetails()&&d.length,u="",p=l.table.find(">thead");if(p.length||(p=e("").insertBefore(l.tbody)),a=l.element.find("tr:has(th):first"),a.length||(a=p.children().first(),a.length||(a=e(""))),a.children().length)c&&!a.find(".k-hierarchy-cell")[0]&&a.prepend(' ');else{for(c&&(u+=' '),n=0,r=d.length;r>n;n++)s=d[n],o=l._headerCellText(s),s.command?u+=""+o+"":(u+=""+o+"");a.html(u)}a.find("th").addClass("k-header"),l.options.scrollable||p.addClass("k-grid-header"),a.find("script").remove().end().appendTo(p),l.thead&&l._destroyColumnAttachments(),l.thead=p,l._sortable(),l._filterable(),l._scrollable(),l._updateCols(),l._resizable(),l._draggable(),l._reorderable(),l.groupable&&l._attachGroupable(),l._columnMenu()},_updateCols:function(){var e=this;e._appendCols(e.thead.parent().add(e.table))},_appendCols:function(e){var t=this;p(e,d(t.columns),t._hasDetails(),t._groups())},_autoColumns:function(e){if(e&&e.toJSON){var t,n=this;e=e.toJSON();for(t in e)n.columns.push({field:t});n._thead(),n._templates()}},_rowsHtml:function(e){var t,n,i=this,r="",a=i.rowTemplate,o=i.altRowTemplate;for(t=0,n=e.length;n>t;t++)r+=t%2?o(e[t]):a(e[t]),i._data.push(e[t]);return r},_groupRowHtml:function(e,t,i){var r,a,o=this,s="",l=e.field,d=z(o.columns,function(e){return e.field==l})[0]||{},c=d.groupHeaderTemplate,u=(d.title||l)+": "+h(e.value,d.format,d.values),p=F({},{field:e.field,value:e.value},e.aggregates[e.field]),f=o._groupAggregatesDefaultObject||{},m=e.items;if(c&&(u=typeof c===pt?c(p):k.template(c)(p)),s+=''+n(i)+''+'

      '+''+u+"

      ",e.hasSubgroups)for(r=0,a=m.length;a>r;r++)s+=o._groupRowHtml(m[r],t-1,i+1);else s+=o._rowsHtml(m);return o.groupFooterTemplate&&(s+=o.groupFooterTemplate(F(f,e.aggregates))),s},collapseGroup:function(n){n=e(n).find(".k-icon").addClass("k-i-expand").removeClass("k-i-collapse").end();var i,r,a=n.find(".k-group-cell").length,o=1;n.find("td:first").attr("aria-expanded",!1),n.nextAll("tr").each(function(){return r=e(this),i=r.find(".k-group-cell").length,r.hasClass("k-grouping-row")?o++:r.hasClass("k-group-footer")&&o--,a>=i||r.hasClass("k-group-footer")&&0>o?!1:(r.hide(),t)})},expandGroup:function(n){n=e(n).find(".k-icon").addClass("k-i-collapse").removeClass("k-i-expand").end();var i,r,a=this,o=n.find(".k-group-cell").length,s=1;n.find("td:first").attr("aria-expanded",!0),n.nextAll("tr").each(function(){return i=e(this),r=i.find(".k-group-cell").length,o>=r?!1:(r!=o+1||i.hasClass("k-detail-row")||(i.show(),i.hasClass("k-grouping-row")&&i.find(".k-icon").hasClass("k-i-collapse")&&a.expandGroup(i),i.hasClass("k-master-row")&&i.find(".k-icon").hasClass("k-minus")&&i.next().show()),i.hasClass("k-grouping-row")&&s++,i.hasClass("k-group-footer")&&(1==s?i.show():s--),t)})},_updateHeader:function(t){var n=this,i=n.thead.find("th.k-group-cell"),r=i.length;t>r?e(Array(t-r+1).join(' ')).prependTo(n.thead.find("tr")):r>t&&(r-=t,e(z(i,function(e,t){return r>t})).remove())},_firstDataItem:function(e,t){return e&&t&&(e=e.hasSubgroups?this._firstDataItem(e.items[0],t):e.items[0]),e},hideColumn:function(t){var n,i,r,a,o,s,l,u,p,f=this,h=0,g=f.footer||f.wrapper.find(".k-grid-footer"),v=f.columns;if(t="number"==typeof t?v[t]:z(v,function(e){return e.field===t})[0],t&&!t.hidden){for(p=A(t,d(v)),t.hidden=!0,t.attributes=c(t.attributes),t.footerAttributes=c(t.footerAttributes),t.headerAttributes=c(t.headerAttributes),f._templates(),f._updateCols(),m(f.thead.find(">tr")[0].cells,p,!1),g[0]&&(f._appendCols(g.find("table:first")),m(g.find(".k-footer-template")[0].cells,p,!1)),n=f.tbody.children(),o=0,u=n.length;u>o;o+=1)i=n.eq(o),i.is(".k-grouping-row,.k-detail-row")?(r=i.children(":not(.k-group-cell):first,.k-detail-cell").last(),r.attr("colspan",parseInt(r.attr("colspan"),10)-1)):(i.hasClass("k-grid-edit-row")&&(r=i.children(".k-edit-container")[0])&&(r=e(r),r.attr("colspan",parseInt(r.attr("colspan"),10)-1),r.find("col").eq(p).remove(),i=r.find("tr:first")),m(i[0].cells,p,!1));for(s=f.thead.prev().find("col"),o=0,u=s.length;u>o;o+=1){if(l=s[o].style.width,!l||-1!=l.indexOf("%")){h=0;break}h+=parseInt(l,10)}a=e(">.k-grid-header table:first,>.k-grid-footer table:first",f.wrapper).add(f.table),f._footerWidth=null,h&&(a.width(h),f._footerWidth=h),xt.msie&&8==xt.version&&(a.css("display","inline-table"),setTimeout(function(){a.css("display","table")},1)),f.trigger(Z,{column:t})}},showColumn:function(t){var n,i,r,a,o,s,l,c,f,h,g=this,v=g.columns,_=g.footer||g.wrapper.find(".k-grid-footer");if(t="number"==typeof t?v[t]:z(v,function(e){return e.field===t})[0],t&&t.hidden){for(h=A(t,v),t.hidden=!1,t.attributes=u(t.attributes),t.footerAttributes=u(t.footerAttributes),t.headerAttributes=u(t.headerAttributes),g._templates(),g._updateCols(),m(g.thead.find(">tr")[0].cells,h,!0),_[0]&&(g._appendCols(_.find("table:first")),m(_.find(".k-footer-template")[0].cells,h,!0)),n=g.tbody.children(),i=0,r=n.length;r>i;i+=1)a=n.eq(i),a.is(".k-grouping-row,.k-detail-row")?(o=a.children(":not(.k-group-cell):first,.k-detail-cell").last(),o.attr("colspan",parseInt(o.attr("colspan"),10)+1)):(a.hasClass("k-grid-edit-row")&&(o=a.children(".k-edit-container")[0])&&(o=e(o),o.attr("colspan",parseInt(o.attr("colspan"),10)+1),p(o.find(">form>table"),d(v),!1,0),a=o.find("tr:first")),m(a[0].cells,h,!0));if(s=e(">.k-grid-header table:first,>.k-grid-footer table:first",g.wrapper).add(g.table),t.width){for(l=0,f=g.thead.prev().find("col"),i=0,r=f.length;r>i;i+=1){if(c=f[i].style.width,c.indexOf("%")>-1){l=0;break}l+=parseInt(c,10)}g._footerWidth=null,l&&(s.width(l),g._footerWidth=l)}else s.width("");g.trigger(et,{column:t})}},_progress:function(e){var t=this,n=t.element.is("table")?t.element.parent():t.content&&t.content.length?t.content:t.element;k.ui.progress(n,e)},_resize:function(){this.content&&(this._setContentHeight(),this._setContentWidth())},refresh:function(t){var n,i,r,a,s,l,c=this,u="",p=c.dataSource.view(),f=c.options.navigatable,h=e(c.current()),m=!1,g=(c.dataSource.group()||[]).length,_=g+d(c.columns).length;if(!(t&&"itemchange"===t.action&&c.editable||(t=t||{},c.trigger("dataBinding",{action:t.action||"rebind",index:t.index,items:t.items})))){if(l=C(),f&&(c.table[0]===l||e.contains(c.table[0],l)||c._editContainer&&c._editContainer.data("kendoWindow"))&&(m=h.is("th"),s=0,m&&(s=c.thead.find("th:not(.k-group-cell)").index(h))),c._destroyEditable(),c._progress(!1),c._hideResizeHandle(),c._data=[],c.columns.length||(c._autoColumns(c._firstDataItem(p[0],g)),_=g+c.columns.length),c._group=g>0||c._group,c._group&&(c._templates(),c._updateCols(),c._updateHeader(g),c._group=g>0),g>0)for(c.detailTemplate&&_++,c.groupFooterTemplate&&(c._groupAggregatesDefaultObject=o(c.dataSource.aggregate())),i=0,n=p.length;n>i;i++)u+=c._groupRowHtml(p[i],_,0);else u+=c._rowsHtml(p);x?c.tbody[0].innerHTML=u:(a=document.createElement("div"),a.innerHTML=""+u+"
      ",r=a.firstChild.firstChild,c.table[0].replaceChild(r,c.tbody[0]),c.tbody=e(r)),c._footer(),c._setContentHeight(),c._setContentWidth(),s>=0&&(c._removeCurrent(),m?c.current(c.thead.find("th:not(.k-group-cell)").eq(s)):c.current(c.items().eq(s).children().filter(B).first()),c._current&&v(c._current.closest("table")[0],!0)),c.trigger(nt)}}});b.plugin(Ft),b.plugin(St)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i="change",r="cancel",a="dataBound",o="dataBinding",s=n.ui.Widget,l=n.keys,d=">*",c="progress",u="error",p="k-state-focused",f="k-state-selected",h="k-edit-item",m="string",g="edit",v="remove",_="save",k="click",b=".kendoListView",y=e.proxy,w=n._activeElement,x=n.ui.progress,C=n.data.DataSource,T=s.extend({init:function(t,i){var r=this;i=e.isArray(i)?{dataSource:i}:i,s.fn.init.call(r,t,i),i=r.options,r.wrapper=t=r.element,t[0].id&&(r._itemId=t[0].id+"_lv_active"),r._element(),r._dataSource(),r._templates(),r._navigatable(),r._selectable(),r._pageable(),r._crudHandlers(),r.options.autoBind&&r.dataSource.fetch(),n.notify(r)},events:[i,r,o,a,g,v,_],options:{name:"ListView",autoBind:!0,selectable:!1,navigatable:!1,template:"",altTemplate:"",editTemplate:""},setOptions:function(e){s.fn.setOptions.call(this,e),this._templates()},_templates:function(){var e=this.options;this.template=n.template(e.template||""),this.altTemplate=n.template(e.altTemplate||e.template),this.editTemplate=n.template(e.editTemplate||"")},_item:function(e){return this.element.children()[e]()},items:function(){return this.element.children()},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&e.fetch()},_unbindDataSource:function(){var e=this;e.dataSource.unbind(i,e._refreshHandler).unbind(c,e._progressHandler).unbind(u,e._errorHandler)},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._refreshHandler=y(e.refresh,e),e._progressHandler=y(e._progress,e),e._errorHandler=y(e._error,e)),e.dataSource=C.create(e.options.dataSource).bind(i,e._refreshHandler).bind(c,e._progressHandler).bind(u,e._errorHandler)},_progress:function(){x(this.element,!0)},_error:function(){x(this.element,!1)},_element:function(){this.element.addClass("k-widget k-listview").attr("role","listbox")},refresh:function(e){var i,r,s,l,d,c=this,u=c.dataSource.view(),p="",f=c.template,h=c.altTemplate,m=w();if(e=e||{},"itemchange"===e.action)return c._hasBindingTarget()||c.editable||(i=e.items[0],s=c.items().filter("["+n.attr("uid")+"="+i.uid+"]"),s.length>0&&(l=s.index(),s.replaceWith(f(i)),s=c.items().eq(l),s.attr(n.attr("uid"),i.uid),c.trigger("itemChange",{item:s,data:i}))),t;if(!c.trigger(o,{action:e.action||"rebind",items:e.items,index:e.index})){for(c._destroyEditable(),l=0,d=u.length;d>l;l++)p+=l%2?h(u[l]):f(u[l]);for(c.element.html(p),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]===m&&c.options.navigatable&&c.current(r.eq(0)),c.trigger(a)}},_pageable:function(){var t,i,r=this,a=r.options.pageable;e.isPlainObject(a)&&(i=a.pagerId,t=e.extend({},a,{dataSource:r.dataSource,pagerId:null}),r.pager=new n.ui.Pager(e("#"+i),t))},_selectable:function(){var e,r,a=this,o=a.options.selectable,s=a.options.navigatable;o&&(e=typeof o===m&&o.toLowerCase().indexOf("multiple")>-1,e&&a.element.attr("aria-multiselectable",!0),a.selectable=new n.ui.Selectable(a.element,{aria:!0,multiple:e,filter:d,change:function(){a.trigger(i)}}),s&&a.element.on("keydown"+b,function(n){if(n.keyCode===l.SPACEBAR){if(r=a.current(),n.target==n.currentTarget&&n.preventDefault(),e)if(n.ctrlKey){if(r&&r.hasClass(f))return r.removeClass(f),t}else a.selectable.clear();else a.selectable.clear();a.selectable.value(r)}}))},current:function(e){var n=this,i=n.element,r=n._current,a=n._itemId;return e===t?r:(r&&r[0]&&(r[0].id===a&&r.removeAttr("id"),r.removeClass(p),i.removeAttr("aria-activedescendant")),e&&e[0]&&(a=e[0].id||a,n._scrollTo(e[0]),i.attr("aria-activedescendant",a),e.addClass(p).attr("id",a)),n._current=e,t)},_scrollTo:function(t){var n,i,r=this,a=!1,o="scroll";"auto"==r.wrapper.css("overflow")||r.wrapper.css("overflow")==o?n=r.wrapper[0]:(n=window,a=!0),i=function(i,r){var s=a?e(t).offset()[i.toLowerCase()]:t["offset"+i],l=t["client"+r],d=e(n)[o+i](),c=e(n)[r.toLowerCase()]();s+l>d+c?e(n)[o+i](s+l-c):d>s&&e(n)[o+i](s)},i("Top","Height"),i("Left","Width")},_navigatable:function(){var t=this,i=t.options.navigatable,r=t.element,a=function(n){t.current(e(n.currentTarget)),e(n.target).is(":button,a,:input,a>.k-icon,textarea")||r.focus()};i&&(t._tabindex(),r.on("focus"+b,function(){var e=t._current;e&&e.is(":visible")||(e=t._item("first")),t.current(e)}).on("focusout"+b,function(){t._current&&t._current.removeClass(p)}).on("keydown"+b,function(i){var a,o,s=i.keyCode,d=t.current(),c=e(i.target),u=!c.is(":button,textarea,a,a>.t-icon,input"),p=c.is(":text"),f=n.preventDefault,m=r.find("."+h),g=w();if(!(!u&&!p&&l.ESC!=s||p&&l.ESC!=s&&l.ENTER!=s))if(l.UP===s||l.LEFT===s)d&&(d=d.prev()),t.current(d&&d[0]?d:t._item("last")),f(i);else if(l.DOWN===s||l.RIGHT===s)d&&(d=d.next()),t.current(d&&d[0]?d:t._item("first")),f(i);else if(l.PAGEUP===s)t.current(null),t.dataSource.page(t.dataSource.page()-1),f(i);else if(l.PAGEDOWN===s)t.current(null),t.dataSource.page(t.dataSource.page()+1),f(i);else if(l.HOME===s)t.current(t._item("first")),f(i);else if(l.END===s)t.current(t._item("last")),f(i);else if(l.ENTER===s)0!==m.length&&(u||p)?(a=t.items().index(m),g&&g.blur(),t.save(),o=function(){t.element.trigger("focus"),t.current(t.items().eq(a))},t.one("dataBound",o)):""!==t.options.editTemplate&&t.edit(d);else if(l.ESC===s){if(m=r.find("."+h),0===m.length)return;a=t.items().index(m),t.cancel(),t.element.trigger("focus"),t.current(t.items().eq(a))}}),r.on("mousedown"+b+" touchstart"+b,d,y(a,t)))},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger(i)},select:function(n){var i=this,r=i.selectable;return n=e(n),n.length?(r.options.multiple||(r.clear(),n=n.first()),r.value(n),t):r.value()},_destroyEditable:function(){var e=this;e.editable&&(e.editable.destroy(),delete e.editable)},_modelFromElement:function(e){var t=e.attr(n.attr("uid"));return this.dataSource.getByUid(t)},_closeEditable:function(e){var t,i,r=this,a=r.editable,o=r.template,s=!0;return a&&(e&&(s=a.end()),s&&(a.element.index()%2&&(o=r.altTemplate),t=r._modelFromElement(a.element),r._destroyEditable(),i=a.element.index(),a.element.replaceWith(o(t)),r.items().eq(i).attr(n.attr("uid"),t.uid))),s},edit:function(e){var t,i,r=this,a=r._modelFromElement(e),o=a.uid;r.cancel(),e=r.items().filter("["+n.attr("uid")+"="+o+"]"),i=e.index(),e.replaceWith(r.editTemplate(a)),t=r.items().eq(i).addClass(h).attr(n.attr("uid"),a.uid),r.editable=t.kendoEditable({model:a,clearContainer:!1,errorTemplate:!1}).data("kendoEditable"),r.trigger(g,{model:a,item:t})},save:function(){var e,t=this,n=t.editable;n&&(n=n.element,e=t._modelFromElement(n),!t.trigger(_,{model:e,item:n})&&t._closeEditable(!0)&&t.dataSource.sync())},remove:function(e){var t=this,n=t.dataSource,i=t._modelFromElement(e);t.trigger(v,{model:i,item:e})||(e.hide(),n.remove(i),n.sync())},add:function(){var e=this,t=e.dataSource,n=t.indexOf((t.view()||[])[0]);0>n&&(n=0),e.cancel(),t.insert(n,{}),e.edit(e.element.children().first())},cancel:function(){var e,t,n=this,i=n.dataSource;n.editable&&(e=n.editable.element,t=n._modelFromElement(e),n.trigger(r,{model:t,container:e})||(i.cancelChanges(t),n._closeEditable(!1)))},_crudHandlers:function(){var t=this,i=k+b;t.element.on(i,".k-edit-button",function(i){var r=e(this).closest("["+n.attr("uid")+"]");t.edit(r),i.preventDefault()}),t.element.on(i,".k-delete-button",function(i){var r=e(this).closest("["+n.attr("uid")+"]");t.remove(r),i.preventDefault()}),t.element.on(i,".k-update-button",function(e){t.save(),e.preventDefault()}),t.element.on(i,".k-cancel-button",function(e){t.cancel(),e.preventDefault()})},destroy:function(){var e=this;s.fn.destroy.call(e),e._unbindDataSource(),e._destroyEditable(),e.element.off(b),e.pager&&e.pager.destroy(),e.selectable&&e.selectable.destroy(),n.destroy(e.element)}});n.ui.plugin(T)}(window.kendo.jQuery),function(e,t){function n(e,t,n){var i,r;e.on("dragenter"+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 a(e,t){var n=e[t];return p(n)?n.from||n.field||t:n}var o,s,l,d,c=window.kendo,u=c.ui.Widget,p=e.isPlainObject,f=e.proxy,h=e.extend,m=c.support.placeholder,g=c.support.browser,v=c.isFunction,_=/(^\/|\/$)/g,k="change",b="apply",y="error",w="click",x=".kendoImageBrowser",C=".kendoBreadcrumbs",T=".kendoSearchBox",S="name",D="size",F="type",E={field:F,dir:"asc"},z=c.template('
    • ${text}
    • '),H='
      # if (showUpload) { #
      #=messages.uploadFile#
      # } ## if (showCreate) { ## } ## if (showDelete) { # # } #
      ').appendTo(this.element);t.breadcrumbs=n.find("input:first").kendoBreadcrumbs({value:t.options.path,change:function(){t.path(this.value())}}).data("kendoBreadcrumbs"),t.searchBox=n.parent().find("input:last").kendoSearchBox({label:t.options.messages.search,change:function(){t.search(this.value())}}).data("kendoSearchBox")},_error:function(e){var t,n=this;n.trigger(y,e)||(t=e.xhr.status,"error"==e.status?"404"==t?n._showMessage(n.options.messages.directoryNotFound):"0"!=t&&n._showMessage("Error! The requested URL returned "+t+" - "+e.xhr.statusText):"timeout"==t&&n._showMessage("Error! Server timeout."))},_showMessage:function(e,t){return window[t||"alert"](e)},refresh:function(){var e=this;e._navigation(),e._toolbar(),e._content()},_loadImage:function(t){var n=this,i=e(t),r=n.dataSource.getByUid(i.attr(c.attr("uid"))),a=r.get(S),o=n.options.transport.thumbnailUrl,s=e("",{alt:a}),l="?";s.hide().on("load"+x,function(){e(this).prev().remove().end().addClass("k-image").fadeIn()}),i.find(".k-loading").after(s),v(o)?o=o(n.path(),encodeURIComponent(a)):(o.indexOf("?")>=0&&(l="&"),o=o+l+"path="+n.path()+encodeURIComponent(a)),s.attr("src",o),t.loaded=!0},_scroll:function(){var e=this;e.options.transport&&e.options.transport.thumbnailUrl&&(clearTimeout(e._timeout),e._timeout=setTimeout(function(){var n=e.list.outerHeight(),i=e.list.scrollTop(),r=i+n;e._tiles.each(function(){var n=o(this),a=n+this.offsetHeight;return(n>=i&&r>n||a>=i&&r>a)&&e._loadImage(this),n>r?!1:t}),e._tiles=e._tiles.filter(function(){return!this.loaded})},250))},_editTmpl:function(){var e='
    • ',e+="#if("+F+' == "d") { #',e+='
      ',e+="#}else{#",e+='
      ',e+="#}#",e+="#if("+F+' == "d") { #',e+='',e+="#}#",e+="
    • ",f(c.template(e),{sizeFormatter:r})},_itemTmpl:function(){var e=this,t='
    • ',t+="#if("+F+' == "d") { #',t+='
      ',t+="#}else{#",t+=e.options.transport&&e.options.transport.thumbnailUrl?'
      ':'
      ',t+="#}#",t+="${"+S+"}",t+="#if("+F+' == "f") { # ${this.sizeFormatter('+D+")} #}#",t+="
    • ",f(c.template(t),{sizeFormatter: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),m&&n.element.attr("placeholder",n.options.label),n._wrapper(),n.element.on("keydown"+T,f(n._keydown,n)).on("change"+T,f(n._updateValue,n)),n.wrapper.on(w+T,"a",f(n._click,n)),m||n.element.on("focus"+T,f(n._focus,n)).on("blur"+T,f(n._blur,n))},options:{name:"SearchBox",label:"Search",value:""},events:[k],destroy:function(){var e=this;e.wrapper.add(e.element).add(e.label).off(T),u.fn.destroy.call(e)},_keydown:function(e){13===e.keyCode&&this._updateValue()},_click:function(e){e.preventDefault(),this._updateValue()},_updateValue:function(){var e=this,t=e.element.val();t!==e.value()&&(e.value(t),e.trigger(k))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){m||this.label.toggle(!this.element.val())},_focus:function(){this.label.hide()},_wrapper:function(){var t=this.element,n=t.parents(".k-search-wrap");t[0].style.width="",t.addClass("k-input"),n.length||(n=t.wrap(e('
      ')).parent(),m||e('").insertBefore(t),e('').appendTo(n)),this.wrapper=n,this.label=n.find(">label")},value:function(e){var n=this;return e!==t?(n.options.value=e,n.element.val(e),n._toggleLabel(),t):n.options.value}}),d=u.extend({init:function(e,t){var n=this;t=t||{},u.fn.init.call(n,e,t),n._wrapper(),n.wrapper.on("focus"+C,"input",f(n._focus,n)).on("blur"+C,"input",f(n._blur,n)).on("keydown"+C,"input",f(n._keydown,n)).on(w+C,"a.k-i-arrow-n:first",f(n._rootClick,n)).on(w+C,"a:not(.k-i-arrow-n)",f(n._click,n)),n.value(n.options.value)},options:{name:"Breadcrumbs",gap:50},events:[k],destroy:function(){var e=this;u.fn.destroy.call(e),e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(C)},_update:function(e){e="/"===(e||"").charAt(0)?e:"/"+(e||""),e!==this.value()&&(this.value(e),this.trigger(k))},_click:function(t){t.preventDefault(),this._update(this._path(e(t.target).prevAll("a:not(.k-i-arrow-n)").addBack()))},_rootClick:function(e){e.preventDefault(),this._update("")},_focus:function(){var e=this,t=e.element;e.overlay.hide(),e.element.val(e.value()),setTimeout(function(){t.select()})},_blur:function(){if(!this.overlay.is(":visible")){var e=this,t=e.element,n=t.val().replace(/\/{2,}/g,"/");e.overlay.show(),t.val(""),e._update(n)}},_keydown:function(e){var t=this;13===e.keyCode&&(t._blur(),setTimeout(function(){t.overlay.find("a:first").focus()}))},_wrapper:function(){var t,n=this.element,i=n.parents(".k-breadcrumbs");n[0].style.width="",n.addClass("k-input"),i.length||(i=n.wrap(e('
      ')).parent()),t=i.find(".k-breadcrumbs-wrap"),t.length||(t=e('
      ').appendTo(i)),this.wrapper=i,this.overlay=t},refresh:function(){var n,i,r,a,o="",s=this.value();for(s!==t&&s.match(/^\//)||(s="/"+(s||"")),n=s.split("/"),r=0,a=n.length;a>r;r++)i=n[r],i&&(o||(o+='root'),o+=''+n[r]+"",o+='>');this.overlay.empty().append(e(o)),this._adjustSectionWidth()},_adjustSectionWidth:function(){var t,n=this,i=n.wrapper,r=i.width()-n.options.gap,a=n.overlay.find("a");a.each(function(n){t=e(this),t.parent().width()>r&&(n==a.length-1?t.width(r):t.prev().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,a=window.kendo,o=a.Class,s=a.ui.Widget,l=a.support.mobileOS,d=a.support.browser,c=e.extend,u=e.proxy,p=a.deepExtend,f=".kendoEditor",h=a.keys,m=o.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return a.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}},v={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",imageWidth:"Width (px)",imageHeight:"Height (px)",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"},_=!l||l.ios&&l.flatVersion>=500||!l.ios&&t!==document.documentElement.contentEditable,k={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=s.extend({init:function(t,n){var i,r,o,l,d=this,h=a.ui.editor;_&&(s.fn.init.call(d,t,n),d.options=p({},d.options,n),t=d.element,l=h.Dom.name(t[0]),t.closest("form").on("submit"+f,function(){d.update()}),o=c({},d.options),o.editor=d,"textarea"==l?(d._wrapTextarea(),r=d.wrapper.find(".k-editor-toolbar"),t[0].id&&r.attr("aria-controls",t[0].id)):(d.element.addClass("k-widget k-editor k-editor-inline"),o.popup=!0,r=e('"),s=this.isBlock(t),_.focus(),l=_.getRange(),l.deleteContents(),l.startContainer==_.document&&l.selectNodeContents(_.body),d=new c,p=d.addCaret(l),f=this.splittableParent(s,p),h=!1,m=f!=_.body&&!o.is(f,"td"),n.split&&m&&(s||o.isInline(f))&&(l.selectNode(p),i.RangeUtils.split(l,f,!0),h=!0),g=this.htmlToFragment(t),g.firstChild&&"k-paste-container"===g.firstChild.className){for(v=[],r=0,a=g.childNodes.length;a>r;r++)v.push(g.childNodes[r].innerHTML);g=this.htmlToFragment(v.join("
      "))}if(e(g.childNodes).filter("table").addClass("k-table").end().find("table").addClass("k-table"),l.insertNode(g),f=this.splittableParent(s,p),h){for(;p.parentNode!=f;)o.unwrap(p.parentNode);o.unwrap(p.parentNode)}o.normalize(l.commonAncestorContainer),p.style.display="inline",o.restoreScrollTop(_.document),o.scrollTo(p),d.removeCaret(l),_.selectRange(l)}}),y=n.extend({clean:function(e){var t,n,i=this,r=i.replacements;for(t=0,n=r.length;n>t;t+=2)e=e.replace(r[t],r[t+1]);return e}}),w=y.extend({init:function(){this.replacements=[/<(\/?)script([^>]*)>/i,"<$1telerik:script$2>"]},applicable:function(e){return/]*>/i.test(e)}}),x=y.extend({init:function(){this.replacements=[/<\?xml[^>]*>/gi,"",//g,"",/"/g,"'",/(?:
       [\s\r\n]+|
      )*(<\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:
       [\s\r\n]+|
      )*/g,"$1",/

      /g,"

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

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