9 lines
18 KiB
JavaScript
9 lines
18 KiB
JavaScript
/*
|
|
* Kendo UI v2015.3.1111 (http://www.telerik.com/kendo-ui)
|
|
* Copyright 2015 Telerik AD. All rights reserved.
|
|
*
|
|
* Kendo UI 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(e,define){define(["./kendo.core.min"],e)}(function(){return function(e,t){function n(e){return parseInt(e,10)}function i(e,t){return n(e.css(t))}function o(e){var t,n=[];for(t in e)n.push(t);return n}function r(e){for(var t in e)-1!=U.indexOf(t)&&-1==j.indexOf(t)&&delete e[t];return e}function s(e,t){var n,i,o,r,s=[],a={};for(i in t)n=i.toLowerCase(),r=P&&-1!=U.indexOf(n),!M.hasHW3D&&r&&-1==j.indexOf(n)?delete t[i]:(o=t[i],r?s.push(i+"("+o+")"):a[i]=o);return s.length&&(a[ae]=s.join(" ")),a}function a(e,t){var i,o,r;return P?(i=e.css(ae),i==Q?"scale"==t?1:0:(o=i.match(RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),r=0,o?r=n(o[1]):(o=i.match(z)||[0,0,0,0,0],t=t.toLowerCase(),O.test(t)?r=parseFloat(o[3]/o[2]):"translatey"==t?r=parseFloat(o[4]/o[2]):"scale"==t?r=parseFloat(o[2]):"rotate"==t&&(r=parseFloat(Math.atan2(o[2],o[1])))),r)):parseFloat(e.css(t))}function l(e){return e.charAt(0).toUpperCase()+e.substring(1)}function c(e,t){var n=p.extend(t),i=n.prototype.directions;S[l(e)]=n,S.Element.prototype[e]=function(e,t,i,o){return new n(this.element,e,t,i,o)},T(i,function(t,i){S.Element.prototype[e+l(i)]=function(e,t,o){return new n(this.element,i,e,t,o)}})}function u(e,n,i,o){c(e,{directions:m,startValue:function(e){return this._startValue=e,this},endValue:function(e){return this._endValue=e,this},shouldHide:function(){return this._shouldHide},prepare:function(e,r){var s,a,l=this,c="out"===this._direction,u=l.element.data(n),h=!(isNaN(u)||u==i);s=h?u:t!==this._startValue?this._startValue:c?i:o,a=t!==this._endValue?this._endValue:c?o:i,this._reverse?(e[n]=a,r[n]=s):(e[n]=s,r[n]=a),l._shouldHide=r[n]===o}})}function h(e,t){var n=C.directions[t].vertical,i=e[n?Z:K]()/2+"px";return _[t].replace("$size",i)}var d,f,p,g,m,v,_,w,y,b,x,k,C=window.kendo,S=C.effects,T=e.each,A=e.extend,D=e.proxy,M=C.support,E=M.browser,P=M.transforms,I=M.transitions,R={scale:0,scalex:0,scaley:0,scale3d:0},B={translate:0,translatex:0,translatey:0,translate3d:0},L=t!==document.documentElement.style.zoom&&!P,z=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,F=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,O=/translatex?$/i,N=/(zoom|fade|expand)(\w+)/,V=/(zoom|fade|expand)/,H=/[xy]$/i,U=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],j=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],W={rotate:"deg",scale:"",skew:"px",translate:"px"},G=P.css,q=Math.round,$="",Y="px",Q="none",X="auto",K="width",Z="height",J="hidden",ee="origin",te="abortId",ne="overflow",ie="translate",oe="position",re="completeCallback",se=G+"transition",ae=G+"transform",le=G+"backface-visibility",ce=G+"perspective",ue="1500px",he="perspective("+ue+")",de={left:{reverse:"right",property:"left",transition:"translatex",vertical:!1,modifier:-1},right:{reverse:"left",property:"left",transition:"translatex",vertical:!1,modifier:1},down:{reverse:"up",property:"top",transition:"translatey",vertical:!0,modifier:1},up:{reverse:"down",property:"top",transition:"translatey",vertical:!0,modifier:-1},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out",modifier:-1},out:{reverse:"in",modifier:1},vertical:{reverse:"vertical"},horizontal:{reverse:"horizontal"}};C.directions=de,A(e.fn,{kendoStop:function(e,t){return I?S.stopQueue(this,e||!1,t||!1):this.stop(e,t)}}),P&&!I&&(T(j,function(n,i){e.fn[i]=function(n){if(t===n)return a(this,i);var o=e(this)[0],r=i+"("+n+W[i.replace(H,"")]+")";return-1==o.style.cssText.indexOf(ae)?e(this).css(ae,r):o.style.cssText=o.style.cssText.replace(RegExp(i+"\\(.*?\\)","i"),r),this},e.fx.step[i]=function(t){e(t.elem)[i](t.now)}}),d=e.fx.prototype.cur,e.fx.prototype.cur=function(){return-1!=j.indexOf(this.prop)?parseFloat(e(this.elem)[this.prop]()):d.apply(this,arguments)}),C.toggleClass=function(e,t,n,i){return t&&(t=t.split(" "),I&&(n=A({exclusive:"all",duration:400,ease:"ease-out"},n),e.css(se,n.exclusive+" "+n.duration+"ms "+n.ease),setTimeout(function(){e.css(se,"").css(Z)},n.duration)),T(t,function(t,n){e.toggleClass(n,i)})),e},C.parseEffects=function(e,t){var n={};return"string"==typeof e?T(e.split(" "),function(e,i){var o=!V.test(i),r=i.replace(N,function(e,t,n){return t+":"+n.toLowerCase()}),s=r.split(":"),a=s[1],l={};s.length>1&&(l.direction=t&&o?de[a].reverse:a),n[s[0]]=l}):T(e,function(e){var i=this.direction;i&&t&&!V.test(e)&&(this.direction=de[i].reverse),n[e]=this}),n},I&&A(S,{transition:function(t,n,i){var r,a,l,c,u=0,h=t.data("keys")||[];i=A({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,c=function(){l||(l=!0,a&&(clearTimeout(a),a=null),t.removeData(te).dequeue().css(se,"").css(se),i.complete.call(t))},i.duration=e.fx?e.fx.speeds[i.duration]||i.duration:i.duration,r=s(t,n),e.merge(h,o(r)),t.data("keys",e.unique(h)).height(),t.css(se,i.exclusive+" "+i.duration+"ms "+i.ease).css(se),t.css(r).css(ae),I.event&&(t.one(I.event,c),0!==i.duration&&(u=500)),a=setTimeout(c,i.duration+u),t.data(te,a),t.data(re,c)},stopQueue:function(e,t,n){var i,o=e.data("keys"),r=!n&&o,s=e.data(re);return r&&(i=C.getComputedStyles(e[0],o)),s&&s(),r&&e.css(i),e.removeData("keys").stop(t)}}),f=C.Class.extend({init:function(e,t){var n=this;n.element=e,n.effects=[],n.options=t,n.restore=[]},run:function(t){var n,i,o,a,l,c,u,h=this,d=t.length,f=h.element,p=h.options,g=e.Deferred(),m={},v={};for(h.effects=t,g.then(e.proxy(h,"complete")),f.data("animating",!0),i=0;d>i;i++)for(n=t[i],n.setReverse(p.reverse),n.setOptions(p),h.addRestoreProperties(n.restore),n.prepare(m,v),l=n.children(),o=0,c=l.length;c>o;o++)l[o].duration(p.duration).run();for(u in p.effects)A(v,p.effects[u].properties);for(f.is(":visible")||A(m,{display:f.data("olddisplay")||"block"}),P&&!p.reset&&(a=f.data("targetTransform"),a&&(m=A(a,m))),m=s(f,m),P&&!I&&(m=r(m)),f.css(m).css(ae),i=0;d>i;i++)t[i].setup();return p.init&&p.init(),f.data("targetTransform",v),S.animate(f,v,A({},p,{complete:g.resolve})),g.promise()},stop:function(){e(this.element).kendoStop(!0,!0)},addRestoreProperties:function(e){for(var t,n=this.element,i=0,o=e.length;o>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,o=t.options,r=t.effects,s=r.length;for(i.removeData("animating").dequeue(),o.hide&&i.data("olddisplay",i.css("display")).hide(),this.restoreCallback(),L&&!P&&setTimeout(e.proxy(this,"restoreCallback"),0);s>n;n++)r[n].teardown();o.completeCallback&&o.completeCallback(i)}}),S.promise=function(e,t){var n,i,o,r=[],s=new f(e,t),a=C.parseEffects(t.effects);t.effects=a;for(o in a)n=S[l(o)],n&&(i=new n(e,a[o].direction),r.push(i));r[0]?s.run(r):(e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.init&&t.init(),e.dequeue(),s.complete())},A(S,{animate:function(n,o,s){var a=s.transition!==!1;delete s.transition,I&&"transition"in S&&a?S.transition(n,o,s):P?n.animate(r(o),{queue:!1,show:!1,hide:!1,duration:s.duration,complete:s.complete}):n.each(function(){var n=e(this),r={};T(U,function(e,s){var a,l,c,u,h,d,f,p=o?o[s]+" ":null;p&&(l=o,s in R&&o[s]!==t?(a=p.match(F),P&&A(l,{scale:+a[0]})):s in B&&o[s]!==t&&(c=n.css(oe),u="absolute"==c||"fixed"==c,n.data(ie)||(u?n.data(ie,{top:i(n,"top")||0,left:i(n,"left")||0,bottom:i(n,"bottom"),right:i(n,"right")}):n.data(ie,{top:i(n,"marginTop")||0,left:i(n,"marginLeft")||0})),h=n.data(ie),a=p.match(F),a&&(d=s==ie+"y"?0:+a[1],f=s==ie+"y"?+a[1]:+a[2],u?(isNaN(h.right)?isNaN(d)||A(l,{left:h.left+d}):isNaN(d)||A(l,{right:h.right-d}),isNaN(h.bottom)?isNaN(f)||A(l,{top:h.top+f}):isNaN(f)||A(l,{bottom:h.bottom-f})):(isNaN(d)||A(l,{marginLeft:h.left+d}),isNaN(f)||A(l,{marginTop:h.top+f})))),!P&&"scale"!=s&&s in l&&delete l[s],l&&A(r,l))}),E.msie&&delete r.scale,n.animate(r,{queue:!1,show:!1,hide:!1,duration:s.duration,complete:s.complete})})}}),S.animatedPromise=S.promise,p=C.Class.extend({init:function(e,t){var n=this;n.element=e,n._direction=t,n.options={},n._additionalEffects=[],n.restore||(n.restore=[])},reverse:function(){return this._reverse=!0,this.run()},play:function(){return this._reverse=!1,this.run()},add:function(e){return this._additionalEffects.push(e),this},direction:function(e){return this._direction=e,this},duration:function(e){return this._duration=e,this},compositeRun:function(){var e=this,t=new f(e.element,{reverse:e._reverse,duration:e._duration}),n=e._additionalEffects.concat([e]);return t.run(n)},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n,i=this,o=i.element,a=0,l=i.restore,c=l.length,u=e.Deferred(),h={},d={},f=i.children(),p=f.length;for(u.then(e.proxy(i,"_complete")),o.data("animating",!0),a=0;c>a;a++)t=l[a],o.data(t)||o.data(t,o.css(t));for(a=0;p>a;a++)f[a].duration(i._duration).run();return i.prepare(h,d),o.is(":visible")||A(h,{display:o.data("olddisplay")||"block"}),P&&(n=o.data("targetTransform"),n&&(h=A(n,h))),h=s(o,h),P&&!I&&(h=r(h)),o.css(h).css(ae),i.setup(),o.data("targetTransform",d),S.animate(o,d,{duration:i._duration,complete:u.resolve}),u.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(),L&&!P&&setTimeout(e.proxy(t,"restoreCallback"),0),t.teardown()},setOptions:function(e){A(!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"],m=["in","out"],c("slideIn",{directions:g,divisor:function(e){return this.options.divisor=e,this},prepare:function(e,t){var n,i=this,o=i.element,r=de[i._direction],s=-r.modifier*(r.vertical?o.outerHeight():o.outerWidth()),a=s/(i.options&&i.options.divisor||1)+Y,l="0px";i._reverse&&(n=e,e=t,t=n),P?(e[r.transition]=a,t[r.transition]=l):(e[r.property]=a,t[r.property]=l)}}),c("tile",{directions:g,init:function(e,t,n){p.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,o=e._direction,r=[C.fx(e.element).slideIn(o).setReverse(t)];return n&&r.push(C.fx(n).slideIn(de[o].reverse).divisor(i).setReverse(!t)),r}}),u("fade","opacity",1,0),u("zoom","scale",1,.01),c("slideMargin",{prepare:function(e,t){var n,i=this,o=i.element,r=i.options,s=o.data(ee),a=r.offset,l=i._reverse;l||null!==s||o.data(ee,parseFloat(o.css("margin-"+r.axis))),n=o.data(ee)||0,t["margin-"+r.axis]=l?n:n+a}}),c("slideTo",{prepare:function(e,t){var n=this,i=n.element,o=n.options,r=o.offset.split(","),s=n._reverse;P?(t.translatex=s?0:r[0],t.translatey=s?0:r[1]):(t.left=s?0:r[0],t.top=s?0:r[1]),i.css("left")}}),c("expand",{directions:["horizontal","vertical"],restore:[ne],prepare:function(e,n){var i=this,o=i.element,r=i.options,s=i._reverse,a="vertical"===i._direction?Z:K,l=o[0].style[a],c=o.data(a),u=parseFloat(c||l),h=q(o.css(a,X)[a]());e.overflow=J,u=r&&r.reset?h||u:u||h,n[a]=(s?0:u)+Y,e[a]=(s?u:0)+Y,c===t&&o.data(a,l)},shouldHide:function(){return this._reverse},teardown:function(){var e=this,t=e.element,n="vertical"===e._direction?Z:K,i=t.data(n);(i==X||i===$)&&setTimeout(function(){t.css(n,X).css(n)},0)}}),v={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=this,i=n.element,o=S.box(i),r=S.box(n.options.target),s=a(i,"scale"),l=S.fillScale(r,o),c=S.transformOrigin(r,o);A(e,v),t.scale=1,i.css(ae,"scale(1)").css(ae),i.css(ae,"scale("+s+")"),e.top=o.top,e.left=o.left,e.transformOrigin=c.x+Y+" "+c.y+Y,n._reverse?e.scale=l:t.scale=l}}),_={top:"rect(auto auto $size auto)",bottom:"rect($size auto auto auto)",left:"rect(auto $size auto auto)",right:"rect(auto auto auto $size)"},w={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){p.prototype.init.call(this,e,t),this._container=n},prepare:function(e,t){var n=this,i=n._reverse,o=i?de[n._direction].reverse:n._direction,r=w[o];e.zIndex=1,n._clipInHalf&&(e.clip=h(n._container,C.directions[o].reverse)),e[le]=J,t[ae]=he+(i?r.start:r.end),e[ae]=he+(i?r.end:r.start)},setup:function(){this._container.append(this.element)},face:function(e){return this._face=e,this},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},clipInHalf:function(e){return this._clipInHalf=e,this},temporary:function(){return this.element.addClass("temp-page"),this}}),c("staticPage",{directions:g,init:function(e,t,n){p.prototype.init.call(this,e,t),this._container=n},restore:["clip"],prepare:function(e,t){var n=this,i=n._reverse?de[n._direction].reverse:n._direction;e.clip=h(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){p.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",o=C.directions[i].reverse,r=t._reverse,s=n.face.clone(!0).removeAttr("id"),a=n.back.clone(!0).removeAttr("id"),l=t.element;return r&&(e=i,i=o,o=e),[C.fx(n.face).staticPage(i,l).face(!0).setReverse(r),C.fx(n.back).staticPage(o,l).setReverse(r),C.fx(s).turningPage(i,l).face(!0).clipInHalf(!0).temporary().setReverse(r),C.fx(a).turningPage(o,l).clipInHalf(!0).temporary().setReverse(r)]},prepare:function(e,t){e[ce]=ue,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){p.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",o=C.directions[i].reverse,r=t._reverse,s=t.element;return r&&(e=i,i=o,o=e),[C.fx(n.face).turningPage(i,s).face(!0).setReverse(r),C.fx(n.back).turningPage(o,s).setReverse(r)]},prepare:function(e){e[ce]=ue,e.transformStyle="preserve-3d"}}),y=!M.mobileOS.android,b=".km-touch-scrollbar, .km-actionsheet-wrapper",c("replace",{_before:e.noop,_after:e.noop,init:function(t,n,i){p.prototype.init.call(this,t),this._previous=e(n),this._transitionClass=i},duration:function(){throw Error("The replace effect does not support duration setting; the effect duration may be customized through the transition class rule")},beforeTransition:function(e){return this._before=e,this},afterTransition:function(e){return this._after=e,this},_both:function(){return e().add(this._element).add(this._previous)},_containerClass:function(){var e=this._direction,t="k-fx k-fx-start k-fx-"+this._transitionClass;return e&&(t+=" k-fx-"+e),this._reverse&&(t+=" k-fx-reverse"),t},complete:function(t){if(!(!this.deferred||t&&e(t.target).is(b))){var n=this.container;n.removeClass("k-fx-end").removeClass(this._containerClass()).off(I.event,this.completeProxy),this._previous.hide().removeClass("k-fx-current"),this.element.removeClass("k-fx-next"),y&&n.css(ne,""),this.isAbsolute||this._both().css(oe,""),this.deferred.resolve(),delete this.deferred}},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n=this,i=n.element,o=n._previous,r=i.parents().filter(o.parents()).first(),s=n._both(),a=e.Deferred(),l=i.css(oe);return r.length||(r=i.parent()),this.container=r,this.deferred=a,this.isAbsolute="absolute"==l,this.isAbsolute||s.css(oe,"absolute"),y&&(t=r.css(ne),r.css(ne,"hidden")),I?(i.addClass("k-fx-hidden"),r.addClass(this._containerClass()),this.completeProxy=e.proxy(this,"complete"),r.on(I.event,this.completeProxy),C.animationFrame(function(){i.removeClass("k-fx-hidden").addClass("k-fx-next"),o.css("display","").addClass("k-fx-current"),n._before(o,i),C.animationFrame(function(){r.removeClass("k-fx-start").addClass("k-fx-end"),n._after(o,i)})})):this.complete(),a.promise()},stop:function(){this.complete()}}),x=C.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.enabled()&&(this.done()?this.onEnd():(this._started=!0,C.animationFrame(this._tickProxy)))},enabled:function(){return!0},cancel:function(){this._started=!1,this.onCancel()},_tick:function(){var e=this;e._started&&(e.tick(),e.done()?(e._started=!1,e.onEnd()):C.animationFrame(e._tickProxy))}}),k=x.extend({init:function(e){var t=this;A(t,e),x.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))}}}),A(k,{easeOutExpo:function(e,t,n,i){return e==i?t+n:n*(-Math.pow(2,-10*e/i)+1)+t},easeOutBack:function(e,t,n,i,o){return o=1.70158,n*((e=e/i-1)*e*((o+1)*e+o)+1)+t}}),S.Animation=x,S.Transition=k,S.createEffect=c,S.box=function(t){t=e(t);var n=t.offset();return n.width=t.outerWidth(),n.height=t.outerHeight(),n},S.transformOrigin=function(e,t){var n=(e.left-t.left)*t.width/(t.width-e.width),i=(e.top-t.top)*t.height/(t.height-e.height);return{x:isNaN(n)?0:n,y:isNaN(i)?0:i}},S.fillScale=function(e,t){return Math.min(e.width/t.width,e.height/t.height)},S.fitScale=function(e,t){return Math.max(e.width/t.width,e.height/t.height)}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()}); |