17 lines
44 KiB
JavaScript
17 lines
44 KiB
JavaScript
/**
|
|
* Copyright 2014 Telerik AD
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
!function(e,define){define([],e)}(function(){return function(e,t){function n(){}function r(e,t){if(t)return"'"+e.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var n=e.charAt(0),r=e.substring(1);return"="===n?"+("+r+")+":":"===n?"+e("+r+")+":";"+e+";o+="}function o(e,t,n){return e+="",t=t||2,n=t-e.length,n?R[t].substring(0,n)+e:e}function i(e){var t=e.css(pt.support.transitions.css+"box-shadow")||e.css("box-shadow"),n=t?t.match(Dt)||[0,0,0,0,0]:[0,0,0,0,0],r=bt.max(+n[3],+(n[4]||0));return{left:-n[1]+r,right:+n[1]+r,bottom:+n[2]+r}}function a(t,n){var r,o,a,s,u,l,c,d,f=St.browser,m="rtl"==t.css("direction");return t.parent().hasClass("k-animation-container")?(c=t.parent(".k-animation-container"),d=c[0].style,c.is(":hidden")&&c.show(),r=Tt.test(d.width)||Tt.test(d.height),r||c.css({width:t.outerWidth(),height:t.outerHeight(),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})):(o=i(t),a=t[0].style.width,s=t[0].style.height,u=Tt.test(a),l=Tt.test(s),f.opera&&(o.left=o.right=o.bottom=5),r=u||l,!u&&(!n||n&&a)&&(a=t.outerWidth()),!l&&(!n||n&&s)&&(s=t.outerHeight()),t.wrap(e("<div/>").addClass("k-animation-container").css({width:a,height:s,marginLeft:o.left*(m?1:-1),paddingLeft:o.left,paddingRight:o.right,paddingBottom:o.bottom})),r&&t.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),f.msie&&bt.floor(f.version)<=7&&(t.css({zoom:1}),t.children(".k-menu").width(t.width())),t.parent()}function s(e){var t=1,n=arguments.length;for(t=1;n>t;t++)u(e,arguments[t]);return e}function u(e,t){var n,r,o,i,a=pt.data.ObservableArray,s=pt.data.DataSource,l=pt.data.HierarchicalDataSource;for(n in t)r=t[n],o=typeof r,o===Ht&&null!==r&&r.constructor!==Array&&r.constructor!==a&&r.constructor!==s&&r.constructor!==l?r instanceof Date?e[n]=new Date(r.getTime()):C(r.clone)?e[n]=r.clone():(i=e[n],e[n]=typeof i===Ht?i||{}:{},u(e[n],r)):o!==Nt&&(e[n]=r);return e}function l(e,n,r){for(var o in n)if(n.hasOwnProperty(o)&&n[o].test(e))return o;return r!==t?r:e}function c(e){return e.replace(/([a-z][A-Z])/g,function(e){return e.charAt(0)+"-"+e.charAt(1).toLowerCase()})}function d(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})}function f(t,n){var r,o={};return document.defaultView&&document.defaultView.getComputedStyle?(r=document.defaultView.getComputedStyle(t,""),n&&e.each(n,function(e,t){o[t]=r.getPropertyValue(t)})):(r=t.currentStyle,n&&e.each(n,function(e,t){o[t]=r[d(t)]})),pt.size(o)||(o=r),o}function m(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n}function p(e,t,n){t||(t="offset");var r=e[t]();return St.browser.msie&&(St.pointers||St.msPointers)&&!n&&(r.top-=window.pageYOffset-document.documentElement.scrollTop,r.left-=window.pageXOffset-document.documentElement.scrollLeft),r}function h(e){var t={};return gt("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function g(e){return new pt.effects.Element(e)}function y(e,t,n,r){return typeof e===zt&&(C(t)&&(r=t,t=400,n=!1),C(n)&&(r=n,n=!1),typeof t===At&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:r}),ht({effects:{},duration:400,reverse:!1,init:wt,teardown:wt,hide:!1},e,{completeCallback:e.complete,complete:wt})}function v(t,n,r,o,i){for(var a,s=0,u=t.length;u>s;s++)a=e(t[s]),a.queue(function(){L.promise(a,y(n,r,o,i))});return t}function w(e,t,n,r){return t&&(t=t.split(" "),gt(t,function(t,n){e.toggleClass(n,r)})),e}function b(e){return(""+e).replace(j,"&").replace(B,"<").replace(Y,">").replace($,""").replace(J,"'")}function M(e,n){var r;return 0===n.indexOf("data")&&(n=n.substring(4),n=n.charAt(0).toLowerCase()+n.substring(1)),n=n.replace(tt,"-$1"),r=e.getAttribute("data-"+pt.ns+n),null===r?r=t:"null"===r?r=null:"true"===r?r=!0:"false"===r?r=!1:Ot.test(r)?r=parseFloat(r):X.test(r)&&!et.test(r)&&(r=Function("return ("+r+")")()),r}function S(n,r){var o,i,a={};for(o in r)i=M(n,o),i!==t&&(K.test(o)&&(i=pt.template(e("#"+i).html())),a[o]=i);return a}function T(t,n){return e.contains(t,n)?-1:1}function x(){var t=e(this);return e.inArray(t.attr("data-role"),["slider","rangeslider"])>0||t.is(":visible")}function D(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&O(e)}function O(t){return!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")||e.expr.filters.hidden(this)}).length}function k(e,t){return new k.fn.init(e,t)}var z,C,H,E,A,N,P,F,_,I,U,R,W,L,j,B,$,J,Y,V,q,G,Q,Z,K,X,et,tt,nt,rt,ot,it,at,st,ut,lt,ct,dt,ft,mt,pt=window.kendo=window.kendo||{cultures:{}},ht=e.extend,gt=e.each,yt=e.isArray,vt=e.proxy,wt=e.noop,bt=Math,Mt=window.JSON||{},St={},Tt=/%/,xt=/\{(\d+)(:[^\}]+)?\}/g,Dt=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,Ot=/^(\+|-?)\d+(\.?)\d*$/,kt="function",zt="string",Ct="number",Ht="object",Et="null",At="boolean",Nt="undefined",Pt={},Ft={},_t=[].slice,It=window.Globalize;pt.version="2014.2.716",n.extend=function(e){var t,n,r=function(){},o=this,i=e&&e.init?e.init:function(){o.apply(this,arguments)};r.prototype=o.prototype,n=i.fn=i.prototype=new r;for(t in e)n[t]=null!=e[t]&&e[t].constructor===Object?ht(!0,{},r.prototype[t],e[t]):e[t];return n.constructor=i,i.extend=o.extend,i},n.prototype._initOptions=function(e){this.options=s({},this.options,e)},C=pt.isFunction=function(e){return"function"==typeof e},H=function(){this._defaultPrevented=!0},E=function(){return this._defaultPrevented===!0},A=n.extend({init:function(){this._events={}},bind:function(e,n,r){var o,i,a,s,u,l=this,c=typeof e===zt?[e]:e,d=typeof n===kt;if(n===t){for(o in e)l.bind(o,e[o]);return l}for(o=0,i=c.length;i>o;o++)e=c[o],s=d?n:n[e],s&&(r&&(a=s,s=function(){l.unbind(e,s),a.apply(l,arguments)},s.original=a),u=l._events[e]=l._events[e]||[],u.push(s));return l},one:function(e,t){return this.bind(e,t,!0)},first:function(e,t){var n,r,o,i,a=this,s=typeof e===zt?[e]:e,u=typeof t===kt;for(n=0,r=s.length;r>n;n++)e=s[n],o=u?t:t[e],o&&(i=a._events[e]=a._events[e]||[],i.unshift(o));return a},trigger:function(e,t){var n,r,o=this,i=o._events[e];if(i){for(t=t||{},t.sender=o,t._defaultPrevented=!1,t.preventDefault=H,t.isDefaultPrevented=E,i=i.slice(),n=0,r=i.length;r>n;n++)i[n].call(o,t);return t._defaultPrevented===!0}return!1},unbind:function(e,n){var r,o=this,i=o._events[e];if(e===t)o._events={};else if(i)if(n)for(r=i.length-1;r>=0;r--)(i[r]===n||i[r].original===n)&&i.splice(r,1);else o._events[e]=[];return o}}),N=/^\w+/,P=/\$\{([^}]*)\}/g,F=/\\\}/g,_=/__CURLY__/g,I=/\\#/g,U=/__SHARP__/g,R=["","0","00","000","0000"],z={paramName:"data",useWithBlock:!0,render:function(e,t){var n,r,o="";for(n=0,r=t.length;r>n;n++)o+=e(t[n]);return o},compile:function(e,t){var n,o,i,a=ht({},this,t),s=a.paramName,u=s.match(N)[0],l=a.useWithBlock,c="var o,e=kendo.htmlEncode;";if(C(e))return e;for(c+=l?"with("+s+"){":"",c+="o=",o=e.replace(F,"__CURLY__").replace(P,"#=e($1)#").replace(_,"}").replace(I,"__SHARP__").split("#"),i=0;o.length>i;i++)c+=r(o[i],i%2===0);c+=l?";}":";",c+="return o;",c=c.replace(U,"#");try{return n=Function(u,c),n._slotCount=Math.floor(o.length/2),n}catch(d){throw Error(pt.format("Invalid template:'{0}' Generated code:'{1}'",e,c))}}},function(){function e(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,function(e){var t=s[e];return typeof t===zt?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function t(o,a){var s,l,c,d,f,m,p=n,h=a[o];if(h&&typeof h===Ht&&typeof h.toJSON===kt&&(h=h.toJSON(o)),typeof i===kt&&(h=i.call(a,o,h)),m=typeof h,m===zt)return e(h);if(m===Ct)return isFinite(h)?h+"":Et;if(m===At||m===Et)return h+"";if(m===Ht){if(!h)return Et;if(n+=r,f=[],"[object Array]"===u.apply(h)){for(d=h.length,s=0;d>s;s++)f[s]=t(s,h)||Et;return c=0===f.length?"[]":n?"[\n"+n+f.join(",\n"+n)+"\n"+p+"]":"["+f.join(",")+"]",n=p,c}if(i&&typeof i===Ht)for(d=i.length,s=0;d>s;s++)typeof i[s]===zt&&(l=i[s],c=t(l,h),c&&f.push(e(l)+(n?": ":":")+c));else for(l in h)Object.hasOwnProperty.call(h,l)&&(c=t(l,h),c&&f.push(e(l)+(n?": ":":")+c));return c=0===f.length?"{}":n?"{\n"+n+f.join(",\n"+n)+"\n"+p+"}":"{"+f.join(",")+"}",n=p,c}}var n,r,i,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},u={}.toString;typeof Date.prototype.toJSON!==kt&&(Date.prototype.toJSON=function(){var e=this;return isFinite(e.valueOf())?o(e.getUTCFullYear(),4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),typeof Mt.stringify!==kt&&(Mt.stringify=function(e,o,a){var s;if(n="",r="",typeof a===Ct)for(s=0;a>s;s+=1)r+=" ";else typeof a===zt&&(r=a);if(i=o,o&&typeof o!==kt&&(typeof o!==Ht||typeof o.length!==Ct))throw Error("JSON.stringify");return t("",{"":e})})}(),function(){function n(e){if(e){if(e.numberFormat)return e;if(typeof e===zt){var t=pt.cultures;return t[e]||t[e.split("-")[0]]||null}return null}return null}function r(e){return e&&(e=n(e)),e||pt.cultures.current}function i(e){e.groupSizes=e.groupSize,e.percent.groupSizes=e.percent.groupSize,e.currency.groupSizes=e.currency.groupSize}function a(e,n,i){i=r(i);var a=i.calendars.standard,s=a.days,u=a.months;return n=a.patterns[n]||n,n.replace(c,function(n){var r;return"d"===n?r=e.getDate():"dd"===n?r=o(e.getDate()):"ddd"===n?r=s.namesAbbr[e.getDay()]:"dddd"===n?r=s.names[e.getDay()]:"M"===n?r=e.getMonth()+1:"MM"===n?r=o(e.getMonth()+1):"MMM"===n?r=u.namesAbbr[e.getMonth()]:"MMMM"===n?r=u.names[e.getMonth()]:"yy"===n?r=o(e.getFullYear()%100):"yyyy"===n?r=o(e.getFullYear(),4):"h"===n?r=e.getHours()%12||12:"hh"===n?r=o(e.getHours()%12||12):"H"===n?r=e.getHours():"HH"===n?r=o(e.getHours()):"m"===n?r=e.getMinutes():"mm"===n?r=o(e.getMinutes()):"s"===n?r=e.getSeconds():"ss"===n?r=o(e.getSeconds()):"f"===n?r=bt.floor(e.getMilliseconds()/100):"ff"===n?(r=e.getMilliseconds(),r>99&&(r=bt.floor(r/10)),r=o(r)):"fff"===n?r=o(e.getMilliseconds(),3):"tt"===n&&(r=e.getHours()<12?a.AM[0]:a.PM[0]),r!==t?r:n.slice(1,n.length-1)})}function s(e,n,o){o=r(o);var i,a,s,l,c,b,M,S,T,x,D,O,k,z,C,H,E,A,N,P,F,_,I,U=o.numberFormat,R=U.groupSize[0],W=U[g],L=U[h],j=U.decimals,B=U.pattern[0],$=[],J=0>e,Y=p,V=p,q=-1;if(e===t)return p;if(!isFinite(e))return e;if(!n)return o.name.length?e.toLocaleString():""+e;if(c=d.exec(n)){if(n=c[1].toLowerCase(),a="c"===n,s="p"===n,(a||s)&&(U=a?U.currency:U.percent,R=U.groupSize[0],W=U[g],L=U[h],j=U.decimals,i=U.symbol,B=U.pattern[J?0:1]),l=c[2],l&&(j=+l),"e"===n)return l?e.toExponential(j):e.toExponential();if(s&&(e*=100),e=u(e,j),J=0>e,e=e.split(h),b=e[0],M=e[1],J&&(b=b.substring(1)),V=b,S=b.length,S>=R)for(V=p,x=0;S>x;x++)x>0&&(S-x)%R===0&&(V+=W),V+=b.charAt(x);if(M&&(V+=L+M),"n"===n&&!J)return V;for(e=p,x=0,D=B.length;D>x;x++)O=B.charAt(x),e+="n"===O?V:"$"===O||"%"===O?i:O;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 $.push(n),w})),n=n.split(";"),J&&n[1])n=n[1],z=!0;else if(0===e){if(n=n[2]||n[0],-1==n.indexOf(y)&&-1==n.indexOf(v))return n}else n=n[0];if(P=n.indexOf("%"),F=n.indexOf("$"),s=-1!=P,a=-1!=F,s&&(e*=100),a&&"\\"===n[F-1]&&(n=n.split("\\").join(""),a=!1),(a||s)&&(U=a?U.currency:U.percent,R=U.groupSize[0],W=U[g],L=U[h],j=U.decimals,i=U.symbol),k=n.indexOf(g)>-1,k&&(n=n.replace(m,p)),C=n.indexOf(h),D=n.length,-1!=C?(M=(""+e).split("e"),M=M[1]?u(e,Math.abs(M[1])):M[0],M=M.split(h)[1]||p,E=n.lastIndexOf(v)-C,H=n.lastIndexOf(y)-C,A=E>-1,N=H>-1,x=M.length,A||N||(n=n.substring(0,C)+n.substring(C+1),D=n.length,C=-1,x=0),A&&E>H?x=E:H>E&&(N&&x>H?x=H:A&&E>x&&(x=E)),x>-1&&(e=u(e,x))):e=u(e),H=n.indexOf(y),_=E=n.indexOf(v),q=-1==H&&-1!=E?E:-1!=H&&-1==E?H:H>E?E:H,H=n.lastIndexOf(y),E=n.lastIndexOf(v),I=-1==H&&-1!=E?E:-1!=H&&-1==E?H:H>E?H:E,q==D&&(I=q),-1!=q){if(V=(""+e).split(h),b=V[0],M=V[1]||p,S=b.length,T=M.length,J&&-1*e>=0&&(J=!1),k)if(S===R&&C-_>S)b=W+b;else if(S>R){for(V=p,x=0;S>x;x++)x>0&&(S-x)%R===0&&(V+=W),V+=b.charAt(x);b=V}for(e=n.substring(0,q),J&&!z&&(e+="-"),x=q;D>x;x++){if(O=n.charAt(x),-1==C){if(S>I-x){e+=b;break}}else if(-1!=E&&x>E&&(Y=p),S>=C-x&&C-x>-1&&(e+=b,x=C),C===x){e+=(M?L:p)+M,x+=I-C+1;continue}O===v?(e+=O,Y=O):O===y&&(e+=Y)}if(I>=q&&(e+=n.substring(I+1)),a||s){for(V=p,x=0,D=e.length;D>x;x++)O=e.charAt(x),V+="$"===O||"%"===O?i:O;e=V}if(D=$.length)for(x=0;D>x;x++)e=e.replace(w,$[x])}return e}var u,l,c=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|"[^"]*"|'[^']*'/g,d=/^(n|c|p|e)(\d*)$/i,f=/(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,m=/\,/g,p="",h=".",g=",",y="#",v="0",w="??",b="en-US",M={}.toString;pt.cultures["en-US"]={name:b,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"$"}},calendars:{standard:{days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December"],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",F:"dddd, MMMM dd, yyyy h:mm:ss tt",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",m:"MMMM dd",M:"MMMM dd",s:"yyyy'-'MM'-'ddTHH':'mm':'ss",t:"h:mm tt",T:"h:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":"/",":":":",firstDay:0,twoDigitYearMax:2029}}},pt.culture=function(e){var r,o=pt.cultures;return e===t?o.current:(r=n(e)||o[b],r.calendar=r.calendars.standard,o.current=r,It&&!It.load&&i(r.numberFormat),t)},pt.findCulture=n,pt.getCulture=r,pt.culture(b),u=function(e,t){return t=t||0,e=(""+e).split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t))),e=(""+e).split("e"),e=+(e[0]+"e"+(e[1]?+e[1]-t:-t)),e.toFixed(t)},l=function(e,n,r){if(n){if("[object Date]"===M.call(e))return a(e,n,r);if(typeof e===Ct)return s(e,n,r)}return e!==t?e:""},It&&!It.load&&(l=function(t,n,r){return e.isPlainObject(r)&&(r=r.name),It.format(t,n,r)}),pt.format=function(e){var t=arguments;return e.replace(xt,function(e,n,r){var o=t[parseInt(n,10)+1];return l(o,r?r.substring(1):"")})},pt._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},pt._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},pt._round=u,pt.toString=l}(),function(){function n(e,t,n){return!(e>=t&&n>=e)}function r(e){return e.charAt(0)}function o(t){return e.map(t,r)}function i(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}function a(e){for(var t=0,n=e.length,r=[];n>t;t++)r[t]=(e[t]+"").toLowerCase();return r}function s(e){var t,n={};for(t in e)n[t]=a(e[t]);return n}function u(e,r,a){if(!e)return null;var u,l,c,d,p,h,g,v,w,b,M,S,T,x,D=function(e){for(var t=0;r[I]===e;)t++,I++;return t>0&&(I-=1),t},O=function(t){var n=y[t]||RegExp("^\\d{1,"+t+"}"),r=e.substr(U,t).match(n);return r?(r=r[0],U+=r.length,parseInt(r,10)):null},k=function(t,n){for(var r,o,i,a=0,s=t.length;s>a;a++)if(r=t[a],o=r.length,i=e.substr(U,o),n&&(i=i.toLowerCase()),i==r)return U+=o,a+1;return null},z=function(){var t=!1;return e.charAt(U)===r[I]&&(U++,t=!0),t},C=a.calendars.standard,H=null,E=null,A=null,N=null,P=null,F=null,_=null,I=0,U=0,R=!1,W=new Date,L=C.twoDigitYearMax||2029,j=W.getFullYear();for(r||(r="d"),d=C.patterns[r],d&&(r=d),r=r.split(""),c=r.length;c>I;I++)if(u=r[I],R)"'"===u?R=!1:z();else if("d"===u){if(l=D("d"),C._lowerDays||(C._lowerDays=s(C.days)),A=3>l?O(2):k(C._lowerDays[3==l?"namesAbbr":"names"],!0),null===A||n(A,1,31))return null}else if("M"===u){if(l=D("M"),C._lowerMonths||(C._lowerMonths=s(C.months)),E=3>l?O(2):k(C._lowerMonths[3==l?"namesAbbr":"names"],!0),null===E||n(E,1,12))return null;E-=1}else if("y"===u){if(l=D("y"),H=O(l),null===H)return null;2==l&&("string"==typeof L&&(L=j+parseInt(L,10)),H=j-j%100+H,H>L&&(H-=100))}else if("h"===u){if(D("h"),N=O(2),12==N&&(N=0),null===N||n(N,0,11))return null}else if("H"===u){if(D("H"),N=O(2),null===N||n(N,0,23))return null}else if("m"===u){if(D("m"),P=O(2),null===P||n(P,0,59))return null}else if("s"===u){if(D("s"),F=O(2),null===F||n(F,0,59))return null}else if("f"===u){if(l=D("f"),x=e.substr(U,l).match(y[3]),_=O(l),null!==_&&(x=x[0].length,3>x&&(_*=Math.pow(10,3-x)),l>3&&(_=parseInt((""+_).substring(0,3),10))),null===_||n(_,0,999))return null}else if("t"===u){if(l=D("t"),w=C.AM,b=C.PM,1===l&&(w=o(w),b=o(b)),p=k(b),!p&&!k(w))return null}else if("z"===u){if(h=!0,l=D("z"),"Z"===e.substr(U,1)){if(!g)return null;z();continue}if(v=e.substr(U,6).match(l>2?m:f),!v)return null;if(v=v[0],U=v.length,v=v.split(":"),M=parseInt(v[0],10),n(M,-12,13))return null;if(l>2&&(S=parseInt(v[1],10),isNaN(S)||n(S,0,59)))return null}else if("T"===u)g=z();else if("'"===u)R=!0,z();else if(!z())return null;return T=null!==N||null!==P||F||null,null===H&&null===E&&null===A&&T?(H=j,E=W.getMonth(),A=W.getDate()):(null===H&&(H=j),null===A&&(A=1)),p&&12>N&&(N+=12),h?(M&&(N+=-M),S&&(P+=-S),e=new Date(Date.UTC(H,E,A,N,P,F,_))):(e=new Date(H,E,A,N,P,F,_),i(e,N)),100>H&&e.setFullYear(H),e.getDate()!==A&&h===t?null:e}function l(e){var t="-"===e.substr(0,1)?-1:1;return e=e.substring(1),e=60*parseInt(e.substr(0,2),10)+parseInt(e.substring(2),10),t*e}var c=/\u00A0/g,d=/[eE][\-+]?[0-9]+/,f=/[+|\-]\d{1,2}/,m=/[+|\-]\d{1,2}:\d{2}/,p=/^\/Date\((.*?)\)\/$/,h=/[+-]\d*/,g=["G","g","d","F","D","y","m","T","t"],y={2:/^\d{1,2}/,3:/^\d{1,3}/,4:/^\d{4}/},v={}.toString;pt.parseDate=function(e,t,n){var r,o,i,a,s;if("[object Date]"===v.call(e))return e;if(r=0,o=null,e&&0===e.indexOf("/D")&&(o=p.exec(e)))return o=o[1],s=h.exec(o.substring(1)),o=new Date(parseInt(o,10)),s&&(s=l(s[0]),o=pt.timezone.apply(o,0),o=pt.timezone.convert(o,0,-1*s)),o;if(n=pt.getCulture(n),!t){for(t=[],a=n.calendar.patterns,i=g.length;i>r;r++)t[r]=a[g[r]];r=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:mm:ss.fffffff","yyyy-MM-ddTHH:mm:ss.fff","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","HH:mm:ss","HH:mm"].concat(t)}for(t=yt(t)?t:[t],i=t.length;i>r;r++)if(o=u(e,t[r],n))return o;return o},pt.parseInt=function(e,t){var n=pt.parseFloat(e,t);return n&&(n=0|n),n},pt.parseFloat=function(e,t,n){if(!e&&0!==e)return null;if(typeof e===Ct)return e;e=""+e,t=pt.getCulture(t);var r,o,i=t.numberFormat,a=i.percent,s=i.currency,u=s.symbol,l=a.symbol,f=e.indexOf("-");return d.test(e)?(e=parseFloat(e.replace(i["."],".")),isNaN(e)&&(e=null),e):f>0?null:(f=f>-1,e.indexOf(u)>-1||n&&n.toLowerCase().indexOf("c")>-1?(i=s,r=i.pattern[0].replace("$",u).split("n"),e.indexOf(r[0])>-1&&e.indexOf(r[1])>-1&&(e=e.replace(r[0],"").replace(r[1],""),f=!0)):e.indexOf(l)>-1&&(o=!0,i=a,u=l),e=e.replace("-","").replace(u,"").replace(c," ").split(i[","].replace(c," ")).join("").replace(i["."],"."),e=parseFloat(e),isNaN(e)?e=null:f&&(e*=-1),e&&o&&(e/=100),e)},It&&!It.load&&(pt.parseDate=function(e,t,n){return"[object Date]"===v.call(e)?e:It.parseDate(e,t,n)},pt.parseFloat=function(n,r){return typeof n===Ct?n:n===t||null===n?null:(e.isPlainObject(r)&&(r=r.name),n=It.parseFloat(n,r),isNaN(n)?null:n)})}(),function(){var n,r,o,i,a,s,u;St.scrollbar=function(){var e,t=document.createElement("div");return t.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",t.innerHTML=" ",document.body.appendChild(t),e=t.offsetWidth-t.scrollWidth,document.body.removeChild(t),e},St.isRtl=function(t){return e(t).closest(".k-rtl").length>0},n=document.createElement("table");try{n.innerHTML="<tr><td></td></tr>",St.tbodyInnerHtml=!0}catch(c){St.tbodyInnerHtml=!1}St.touch="ontouchstart"in window,St.msPointers=window.MSPointerEvent,St.pointers=window.PointerEvent,r=St.transitions=!1,o=St.transforms=!1,i="HTMLElement"in window?HTMLElement.prototype:[],St.hasHW3D="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix||"MozPerspective"in document.documentElement.style||"msPerspective"in document.documentElement.style,gt(["Moz","webkit","O","ms"],function(){var e,i=""+this,a=typeof n.style[i+"Transition"]===zt;return a||typeof n.style[i+"Transform"]===zt?(e=i.toLowerCase(),o={css:"ms"!=e?"-"+e+"-":"",prefix:i,event:"o"===e||"webkit"===e?e:""},a&&(r=o,r.event=r.event?r.event+"TransitionEnd":"transitionend"),!1):t}),n=null,St.transforms=o,St.transitions=r,St.devicePixelRatio=window.devicePixelRatio===t?1:window.devicePixelRatio;try{St.screenWidth=window.outerWidth||window.screen?window.screen.availWidth:window.innerWidth,St.screenHeight=window.outerHeight||window.screen?window.screen.availHeight:window.innerHeight}catch(c){St.screenWidth=window.screen.availWidth,St.screenHeight=window.screen.availHeight}St.detectOS=function(e){var t,n,r=!1,o=[],i=!/mobile safari/i.test(e),a={fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,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/},u={tablet:/playbook|ipad|fire/i},c={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,chrome:/chrome|crios/i,webkit:/webkit/i,ie:/MSIE|Windows\sPhone/i};for(n in a)if(a.hasOwnProperty(n)&&(o=e.match(a[n]))){if("windows"==n&&"plugins"in navigator)return!1;r={},r.device=n,r.tablet=l(n,u,!1),r.browser=l(e,c,"default"),r.name=l(n,s),r[r.name]=!0,r.majorVersion=o[2],r.minorVersion=o[3].replace("_","."),t=r.minorVersion.replace(".","").substr(0,2),r.flatVersion=r.majorVersion+t+Array(3-(3>t.length?t.length:2)).join("0"),r.cordova=typeof window.PhoneGap!==Nt||typeof window.cordova!==Nt,r.appMode=window.navigator.standalone||/file|local|wmapp/.test(window.location.protocol)||r.cordova,r.android&&(1.5>St.devicePixelRatio&&400>r.flatVersion||i)&&(St.screenWidth>800||St.screenHeight>800)&&(r.tablet=n);break}return r},a=St.mobileOS=St.detectOS(navigator.userAgent),St.wpDevicePixelRatio=a.wp?screen.width/320:0,St.kineticScrollNeeded=a&&(St.touch||St.msPointers||St.pointers),St.hasNativeScrolling=!1,(a.ios||a.android&&a.majorVersion>2||a.wp)&&(St.hasNativeScrolling=a),St.mouseAndTouchPresent=St.touch&&!(St.mobileOS.ios||St.mobileOS.android),St.detectBrowser=function(e){var t,n=!1,r=[],o={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 o)if(o.hasOwnProperty(t)&&(r=e.match(o[t]))){n={},n[t]=!0,n[r[1].toLowerCase()]=!0,n.version=parseInt(document.documentMode||r[2],10);break}return n},St.browser=St.detectBrowser(navigator.userAgent),St.zoomLevel=function(){try{return St.touch?document.documentElement.clientWidth/window.innerWidth:St.browser.msie&&St.browser.version>=10?(top||window).document.documentElement.offsetWidth/(top||window).innerWidth:1}catch(e){return 1}},St.cssBorderSpacing=t!==document.documentElement.style.borderSpacing&&!(St.browser.msie&&8>St.browser.version),function(t){var n="",r=e(document.documentElement),o=parseInt(t.version,10);t.msie?n="ie":t.mozilla?n="ff":t.safari?n="safari":t.webkit?n="webkit":t.opera&&(n="opera"),n&&(n="k-"+n+" k-"+n+o),St.mobileOS&&(n+=" k-mobile"),r.addClass(n)}(St.browser),St.eventCapture=document.documentElement.addEventListener,s=document.createElement("input"),St.placeholder="placeholder"in s,St.propertyChangeEvent="onpropertychange"in s,St.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],n=t.length,r="test",o={},i=0;n>i;i++)e=t[i],s.setAttribute("type",e),s.value=r,o[e.replace("-","")]="text"!==s.type&&s.value!==r;return o}(),s.style.cssText="float:left;",St.cssFloat=!!s.style.cssFloat,s=null,St.stableSort=function(){var e,t=513,n=[{index:0,field:"b"}];for(e=1;t>e;e++)n.push({index:e,field:"a"});return n.sort(function(e,t){return e.field>t.field?1:t.field>e.field?-1:0}),1===n[0].index}(),St.matchesSelector=i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.matchesSelector||i.matches||function(t){for(var n=document.querySelectorAll?(this.parentNode||document).querySelectorAll(t)||[]:e(t),r=n.length;r--;)if(n[r]==this)return!0;return!1},St.pushState=window.history&&window.history.pushState,u=document.documentMode,St.hashChange="onhashchange"in window&&!(St.browser.msie&&(!u||8>=u))}(),W={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}},L={},e.extend(L,{enabled:!0,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()},disable:function(){this.enabled=!1,this.promise=this.promiseShim},enable:function(){this.enabled=!0,this.promise=this.animatedPromise}}),L.promiseShim=L.promise,"kendoAnimate"in e.fn||ht(e.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,n,r){return v(this,e,t,n,r)},kendoAddClass:function(e,t){return pt.toggleClass(this,e,t,!0)},kendoRemoveClass:function(e,t){return pt.toggleClass(this,e,t,!1)},kendoToggleClass:function(e,t,n){return pt.toggleClass(this,e,t,n)}}),j=/&/g,B=/</g,$=/"/g,J=/'/g,Y=/>/g,V=function(e){return e.target},St.touch&&(V=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},gt(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,n){e.fn[n]=function(e){return this.bind(n,e)}})),St.touch?St.mobileOS?(St.mousedown="touchstart",St.mouseup="touchend",St.mousemove="touchmove",St.mousecancel="touchcancel",St.click="touchend",St.resize="orientationchange"):(St.mousedown="mousedown touchstart",St.mouseup="mouseup touchend",St.mousemove="mousemove touchmove",St.mousecancel="mouseleave touchcancel",St.click="click",St.resize="resize"):St.pointers?(St.mousemove="pointermove",St.mousedown="pointerdown",St.mouseup="pointerup",St.mousecancel="pointercancel",St.click="pointerup",St.resize="orientationchange resize"):St.msPointers?(St.mousemove="MSPointerMove",St.mousedown="MSPointerDown",St.mouseup="MSPointerUp",St.mousecancel="MSPointerCancel",St.click="MSPointerUp",St.resize="orientationchange resize"):(St.mousemove="mousemove",St.mousedown="mousedown",St.mouseup="mouseup",St.mousecancel="mouseleave",St.click="click",St.resize="resize"),q=function(e,t){var n,r,o,i,a=t||"d",s=1;for(r=0,o=e.length;o>r;r++)i=e[r],""!==i&&(n=i.indexOf("["),0!==n&&(-1==n?i="."+i:(s++,i="."+i.substring(0,n)+" || {})"+i.substring(n))),s++,a+=i+(o-1>r?" || {})":")"));return Array(s).join("(")+a},G=/^([a-z]+:)?\/\//i,ht(pt,{ui:pt.ui||{},fx:pt.fx||g,effects:pt.effects||L,mobile:pt.mobile||{},data:pt.data||{},dataviz:pt.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,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110},support:pt.support||St,animate:pt.animate||v,ns:"",attr:function(e){return"data-"+pt.ns+e},getShadows:i,wrap:a,deepExtend:s,getComputedStyles:f,size:m,toCamelCase:d,toHyphens:c,getOffset:pt.getOffset||p,parseEffects:pt.parseEffects||h,toggleClass:pt.toggleClass||w,directions:pt.directions||W,Observable:A,Class:n,Template:z,template:vt(z.compile,z),render:vt(z.render,z),stringify:vt(Mt.stringify,Mt),eventTarget:V,htmlEncode:b,isLocalUrl:function(e){return e&&!G.test(e)},expr:function(e,t,n){return e=e||"",typeof t==zt&&(n=t,t=!1),n=n||"d",e&&"["!==e.charAt(0)&&(e="."+e),e=t?q(e.split("."),n):n+e},getter:function(e,t){return Pt[e]=Pt[e]||Function("d","return "+pt.expr(e,t))},setter:function(e){return Ft[e]=Ft[e]||Function("d,value",pt.expr(e)+"=value")},accessor:function(e){return{get:pt.getter(e),set:pt.setter(e)}},guid:function(){var e,t,n="";for(e=0;32>e;e++)t=16*bt.random()|0,(8==e||12==e||16==e||20==e)&&(n+="-"),n+=(12==e?4:16==e?3&t|8:t).toString(16);return n},roleSelector:function(e){return e.replace(/(\S+)/g,"["+pt.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;!pt.suppressLog&&t!==n&&n.log&&n.log(e)}}),Q=A.extend({init:function(e,t){var n=this;n.element=pt.jQuery(e).handler(n),n.angular("init",t),A.fn.init.call(n),t=n.options=ht(!0,{},n.options,t),n.element.attr(pt.attr("role"))||n.element.attr(pt.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",r=e.attr(n)||t.attr(n);t.removeAttr(n),e.attr(n,isNaN(r)?0:r)},setOptions:function(t){this._setEvents(t),e.extend(this.options,t)},_setEvents:function(e){for(var t,n=this,r=0,o=n.events.length;o>r;r++)t=n.events[r],n.options[t]&&e[t]&&n.unbind(t,n.options[t]);n.bind(n.events,e)},resize:function(e){var t=this.getSize(),n=this._size;(e||!n||t.width!==n.width||t.height!==n.height)&&(this._size=t,this._resize(t),this.trigger("resize",t))},getSize:function(){return pt.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()},angular:function(){}}),Z=Q.extend({dataItems:function(){return this.dataSource.view()},_angularItems:function(e){var t=this;t.angular(e,function(){return{elements:t.items(),data:t.dataItems().map(function(e){return{dataItem:e}})}})}}),pt.dimensions=function(e,t){var n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}},pt.notify=wt,K=/template$/i,X=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,et=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]*\]$/,tt=/([A-Z])/g,pt.initWidget=function(n,r,o){var i,a,s,u,l,c,d,f,m,p,h,g;if(o?o.roles&&(o=o.roles):o=pt.ui.roles,n=n.nodeType?n:n[0],c=n.getAttribute("data-"+pt.ns+"role")){s=-1===c.indexOf(".")?o[c]:pt.getter(c)(window),m=e(n).data(),p=s?"kendo"+s.fn.options.prefix+s.fn.options.name:"",h=RegExp("^kendo.*"+c+"$","i");for(g in m)if(g.match(h)){if(g!==p)return m[g];i=m[g]}if(s){for(f=M(n,"dataSource"),r=e.extend({},S(n,s.fn.options),r),f&&(r.dataSource=typeof f===zt?pt.getter(f)(window):f),u=0,l=s.fn.events.length;l>u;u++)a=s.fn.events[u],d=M(n,a),d!==t&&(r[a]=pt.getter(d)(window));return i?i.setOptions(r):i=new s(n,r),i}}},pt.rolesFromNamespaces=function(e){var t,n,r=[];
|
|
for(e[0]||(e=[pt.ui,pt.dataviz.ui]),t=0,n=e.length;n>t;t++)r[t]=e[t].roles;return ht.apply(null,[{}].concat(r.reverse()))},pt.init=function(t){var n=pt.rolesFromNamespaces(_t.call(arguments,1));e(t).find("[data-"+pt.ns+"role]").addBack().each(function(){pt.initWidget(this,{},n)})},pt.destroy=function(t){e(t).find("[data-"+pt.ns+"role]").addBack().each(function(){var t,n=e(this).data();for(t in n)0===t.indexOf("kendo")&&typeof n[t].destroy===kt&&n[t].destroy()})},pt.resize=function(t,n){var r,o=e(t).find("[data-"+pt.ns+"role]").addBack().filter(x);o.length&&(r=e.makeArray(o),r.sort(T),e.each(r,function(){var t=pt.widgetInstance(e(this));t&&t.resize(n)}))},pt.parseOptions=S,ht(pt.ui,{Widget:Q,DataBoundWidget:Z,roles:{},progress:function(t,n){var r,o,i,a,s=t.find(".k-loading-mask"),u=pt.support,l=u.browser;n?s.length||(r=u.isRtl(t),o=r?"right":"left",a=t.scrollLeft(),i=l.webkit&&r?t[0].scrollWidth-t.width()-2*a:0,s=e("<div class='k-loading-mask'><span class='k-loading-text'>Loading...</span><div class='k-loading-image'/><div class='k-loading-color'/></div>").width("100%").height("100%").css("top",t.scrollTop()).css(o,Math.abs(a)+i).prependTo(t)):s&&s.remove()},plugin:function(n,r,o){var i,a=n.fn.options.name;r=r||pt.ui,o=o||"",r[a]=n,r.roles[a.toLowerCase()]=n,i="getKendo"+o+a,a="kendo"+o+a,e.fn[a]=function(r){var o,i=this;return typeof r===zt?(o=_t.call(arguments,1),this.each(function(){var n,s,u=e.data(this,a);if(!u)throw Error(pt.format("Cannot call method '{0}' of {1} before it is initialized",r,a));if(n=u[r],typeof n!==kt)throw Error(pt.format("Cannot find method '{0}' of {1}",r,a));return s=n.apply(u,o),s!==t?(i=s,!1):t})):this.each(function(){new n(this,r)}),i},e.fn[i]=function(){return this.data(a)}}}),nt={bind:function(){return this},nullObject:!0,options:{}},rt=Q.extend({init:function(e,t){Q.fn.init.call(this,e,t),this.element.autoApplyNS(),this.wrapper=this.element,this.element.addClass("km-widget")},destroy:function(){Q.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var e=this.element.closest(pt.roleSelector("view splitview modalview drawer"));return pt.widgetInstance(e,pt.mobile.ui)||nt},viewHasNativeScrolling:function(){var e=this.view();return e&&e.options.useNativeScrolling},container:function(){var e=this.element.closest(pt.roleSelector("view layout modalview drawer splitview"));return pt.widgetInstance(e.eq(0),pt.mobile.ui)||nt}}),ht(pt.mobile,{init:function(e){pt.init(e,pt.mobile.ui,pt.ui,pt.dataviz.ui)},appLevelNativeScrolling:function(){return pt.mobile.application&&pt.mobile.application.options&&pt.mobile.application.options.useNativeScrolling},ui:{Widget:rt,DataBoundWidget:Z.extend(rt.prototype),roles:{},plugin:function(e){pt.ui.plugin(e,pt.mobile.ui,"Mobile")}}}),pt.touchScroller=function(t,n){return e(t).map(function(t,r){return r=e(r),St.kineticScrollNeeded&&pt.mobile.ui.Scroller&&!r.data("kendoMobileScroller")?(r.kendoMobileScroller(n),r.data("kendoMobileScroller")):!1})[0]},pt.preventDefault=function(e){e.preventDefault()},pt.widgetInstance=function(e,t){var n,r,o,i,a=e.data(pt.ns+"role"),s=[];if(a){if("content"===a&&(a="scroller"),t)if(t[0])for(n=0,r=t.length;r>n;n++)s.push(t[n].roles[a]);else s.push(t.roles[a]);else s=[pt.ui.roles[a],pt.dataviz.ui.roles[a],pt.mobile.ui.roles[a]];for(a.indexOf(".")>=0&&(s=[pt.getter(a)(window)]),n=0,r=s.length;r>n;n++)if(o=s[n],o&&(i=e.data("kendo"+o.fn.options.prefix+o.fn.options.name)))return i}},pt.onResize=function(t){var n=t;return St.mobileOS.android&&(n=function(){setTimeout(t,600)}),e(window).on(St.resize,n),n},pt.unbindResize=function(t){e(window).off(St.resize,t)},pt.attrValue=function(e,t){return e.data(pt.ns+t)},pt.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 D(t,!isNaN(n)&&n>-1)}}),ot=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],it="label, input, [data-rel=external]",at={setupMouseMute:function(){var t,n=0,r=ot.length,o=document.documentElement;if(!at.mouseTrap&&St.eventCapture)for(at.mouseTrap=!0,at.bustClick=!1,at.captureMouse=!1,t=function(t){at.captureMouse&&("click"===t.type?at.bustClick&&!e(t.target).is(it)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};r>n;n++)o.addEventListener(ot[n],t,!0)},muteMouse:function(e){at.captureMouse=!0,e.data.bustClick&&(at.bustClick=!0),clearTimeout(at.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(at.mouseTrapTimeoutID),at.mouseTrapTimeoutID=setTimeout(function(){at.captureMouse=!1,at.bustClick=!1},400)}},st={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},St.touch&&(St.mobileOS.ios||St.mobileOS.android)?st={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:St.pointers?st={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:St.msPointers&&(st={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),!St.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 r,o=this,i=t.relatedTarget,a=t.handleObj;return(!i||i!==o&&!e.contains(o,i))&&(t.type=a.origType,r=a.handler.apply(this,arguments),t.type=n),r}}}),ut=function(e){return st[e]||e},lt=/([^ ]+)/g,pt.applyEventMap=function(e,t){return e=e.replace(lt,ut),t&&(e=e.replace(lt,"$1."+t)),e},ct=e.fn.on,ht(!0,k,e),k.fn=k.prototype=new e,k.fn.constructor=k,k.fn.init=function(t,n){return n&&n instanceof e&&!(n instanceof k)&&(n=k(n)),e.fn.init.call(this,t,n,dt)},k.fn.init.prototype=k.fn,dt=k(document),ht(k.fn,{handler:function(e){return this.data("handler",e),this},autoApplyNS:function(e){return this.data("kendoNS",e||pt.guid()),this},on:function(){var e,t,n,r,o,i,a=this,s=a.data("kendoNS");return 1===arguments.length?ct.call(a,arguments[0]):(e=a,t=_t.call(arguments),typeof t[t.length-1]===Nt&&t.pop(),n=t[t.length-1],r=pt.applyEventMap(t[0],s),St.mouseAndTouchPresent&&r.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(at.setupMouseMute(),o=2===t.length?null:t[1],i=r.indexOf("click")>-1&&r.indexOf("touchend")>-1,ct.call(this,{touchstart:at.muteMouse,touchend:at.unMuteMouse},o,{bustClick:i})),typeof n===zt&&(e=a.data("handler"),n=e[n],t[t.length-1]=function(t){n.call(e,t)}),t[0]=r,ct.apply(a,t),a)},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),pt.jQuery=k,pt.eventMap=st,pt.timezone=function(){function e(e,t){var n,r,o,i=t[3],a=t[4],s=t[5],u=t[8];return u||(t[8]=u={}),u[e]?u[e]:(isNaN(a)?0===a.indexOf("last")?(n=new Date(Date.UTC(e,c[i]+1,1,s[0]-24,s[1],s[2],0)),r=d[a.substr(4,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+r-o-(r>o?7:0))):a.indexOf(">=")>=0&&(n=new Date(Date.UTC(e,c[i],a.substr(5),s[0],s[1],s[2],0)),r=d[a.substr(0,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+r-o+(o>r?7:0))):n=new Date(Date.UTC(e,c[i],a,s[0],s[1],s[2],0)),u[e]=n)}function t(t,n,r){var o,i,a,s;return(n=n[r])?(a=new Date(t).getUTCFullYear(),n=jQuery.grep(n,function(e){var t=e[0],n=e[1];return a>=t&&(n>=a||t==a&&"only"==n||"max"==n)}),n.push(t),n.sort(function(t,n){return"number"!=typeof t&&(t=+e(a,t)),"number"!=typeof n&&(n=+e(a,n)),t-n}),s=n[jQuery.inArray(t,n)-1]||n[n.length-1],isNaN(s)?s:null):(o=r.split(":"),i=0,o.length>1&&(i=60*o[0]+ +o[1]),[-1e6,"max","-","Jan",1,[0,0,0],i,"-"])}function n(e,t,n){var r,o,i,a=t[n];if("string"==typeof a&&(a=t[a]),!a)throw Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(r=a.length-1;r>=0&&(o=a[r][3],!(o&&e>o));r--);if(i=a[r+1],!i)throw Error('Timezone "'+n+'" not found on '+e+".");return i}function r(e,r,o,i){typeof e!=Ct&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var a=n(e,r,i);return{zone:a,rule:t(e,o,a[1])}}function o(e,t){var n,o,i;return"Etc/UTC"==t||"Etc/GMT"==t?0:(n=r(e,this.zones,this.rules,t),o=n.zone,i=n.rule,pt.parseFloat(i?o[0]-i[6]:o[0]))}function i(e,t){var n=r(e,this.zones,this.rules,t),o=n.zone,i=n.rule,a=o[2];return a.indexOf("/")>=0?a.split("/")[i&&+i[6]?1:0]:a.indexOf("%s")>=0?a.replace("%s",i&&"-"!=i[7]?i[7]:""):a}function a(e,t,n){var r,o;return typeof t==zt&&(t=this.offset(e,t)),typeof n==zt&&(n=this.offset(e,n)),r=e.getTimezoneOffset(),e=new Date(e.getTime()+6e4*(t-n)),o=e.getTimezoneOffset(),new Date(e.getTime()+6e4*(o-r))}function s(e,t){return this.convert(e,e.getTimezoneOffset(),t)}function u(e,t){return this.convert(e,t,e.getTimezoneOffset())}function l(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},d={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};return{zones:{},rules:{},offset:o,convert:a,apply:s,remove:u,abbr:i,toLocalDate:l}}(),pt.date=function(){function e(e,t){return 0===t&&23===e.getHours()?(e.setHours(e.getHours()+2),!0):!1}function t(t,n,r){var o=t.getHours();r=r||1,n=(n-t.getDay()+7*r)%7,t.setDate(t.getDate()+n),e(t,o)}function n(e,n,r){return e=new Date(e),t(e,n,r),e}function r(e){return new Date(e.getFullYear(),e.getMonth(),1)}function o(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),n=r(e),o=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return o&&t.setHours(n.getHours()+o/60),t}function i(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function a(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function s(e){return e.getTime()-i(e)}function u(e,t,n){var r,o=s(t),i=s(n);return e&&o!=i?(t>=n&&(n+=g),r=s(e),o>r&&(r+=g),o>i&&(i+=g),r>=o&&i>=r):!0}function l(e,t,n){var r,o=t.getTime(),i=n.getTime();return o>=i&&(i+=g),r=e.getTime(),r>=o&&i>=r}function c(t,n){var r=t.getHours();return t=new Date(t),d(t,n*g),e(t,r),t}function d(e,t,n){var r,o=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(r=e.getTimezoneOffset()-o,e.setTime(e.getTime()+r*h))}function f(){return i(new Date)}function m(e){return i(e).getTime()==f().getTime()}function p(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 h=6e4,g=864e5;return{adjustDST:e,dayOfWeek:n,setDayOfWeek:t,getDate:i,isInDateRange:l,isInTimeRange:u,isToday:m,nextDay:function(e){return c(e,1)},previousDay:function(e){return c(e,-1)},toUtcTime:a,MS_PER_DAY:g,MS_PER_HOUR:60*h,MS_PER_MINUTE:h,setTime:d,addDays:c,today:f,toInvariantTime:p,firstDayOfMonth:r,lastDayOfMonth:o,getMilliseconds:s}}(),pt.stripWhitespace=function(e){var t,n,r;if(document.createNodeIterator)for(t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,function(t){return t.parentNode==e?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);t.nextNode();)t.referenceNode&&!t.referenceNode.textContent.trim()&&t.referenceNode.parentNode.removeChild(t.referenceNode);else for(n=0;e.childNodes.length>n;n++)r=e.childNodes[n],3!=r.nodeType||/\S/.test(r.nodeValue)||(e.removeChild(r),n--),1==r.nodeType&&pt.stripWhitespace(r)},ft=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},pt.animationFrame=function(e){ft.call(window,e)},mt=[],pt.queueAnimation=function(e){mt[mt.length]=e,1===mt.length&&pt.runNextAnimation()},pt.runNextAnimation=function(){pt.animationFrame(function(){mt[0]&&(mt.shift()(),mt[0]&&pt.runNextAnimation())})},pt.parseQueryStringParams=function(e){for(var t=e.split("?")[1]||"",n={},r=t.split(/&|=/),o=r.length,i=0;o>i;i+=2)""!==r[i]&&(n[decodeURIComponent(r[i])]=decodeURIComponent(r[i+1]));return n},pt.elementUnderCursor=function(e){return document.elementFromPoint(e.x.client,e.y.client)},pt.wheelDeltaY=function(e){var n,r=e.originalEvent,o=r.wheelDeltaY;return r.wheelDelta?(o===t||o)&&(n=r.wheelDelta):r.detail&&r.axis===r.VERTICAL_AXIS&&(n=10*-r.detail),n},pt.throttle=function(e,n){var r,o=0;return!n||0>=n?e:function(){function i(){o=+new Date,e.apply(a,u)}var a=this,s=+new Date-o,u=arguments;return o?(r&&clearTimeout(r),s>n?i():r=setTimeout(i,n-s),t):i()}},pt.caret=function(n,r,o){var i,a,s,u,l=r!==t;if(o===t&&(o=r),n[0]&&(n=n[0]),!l||!n.disabled){try{n.selectionStart!==t?l?(n.focus(),n.setSelectionRange(r,o)):r=[n.selectionStart,n.selectionEnd]:document.selection&&(e(n).is(":visible")&&n.focus(),i=n.createTextRange(),l?(i.collapse(!0),i.moveStart("character",r),i.moveEnd("character",o-r),i.select()):(a=i.duplicate(),i.moveToBookmark(document.selection.createRange().getBookmark()),a.setEndPoint("EndToStart",i),s=a.text.length,u=s+i.text.length,r=[s,u]))}catch(c){r=[]}return r}}}(jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()}); |