/** * Kendo UI v2018.1.117 (http://www.telerik.com/kendo-ui) * Copyright 2018 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.popup.min",["kendo.core.min"],e)}(function(){return function(e,t){function o(t,o){return!(!t||!o)&&(t===o||e.contains(t,o))}var n,i,s,r,a=window.kendo,l=a.ui,d=l.Widget,p=a.Class,c=a.support,f=a.getOffset,u=a._outerWidth,h=a._outerHeight,m="open",g="close",w="deactivate",v="activate",_="center",b="left",y="right",k="top",x="bottom",T="absolute",z="hidden",C="body",S="location",E="position",I="visible",P="effects",R="k-state-active",A="k-state-border",D=/k-state-border-(\w+)/,O=".k-picker-wrap, .k-dropdown-wrap, .k-link",F="down",H=e(document.documentElement),N=e.proxy,W=e(window),L="scroll",j=c.transitions.css,M=j+"transform",K=e.extend,U=".kendoPopup",Y=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],Q=d.extend({init:function(t,o){var n,i=this;o=o||{},o.isRtl&&(o.origin=o.origin||x+" "+y,o.position=o.position||k+" "+y),d.fn.init.call(i,t,o),t=i.element,o=i.options,i.collisions=o.collision?o.collision.split(" "):[],i.downEvent=a.applyEventMap(F,a.guid()),1===i.collisions.length&&i.collisions.push(i.collisions[0]),n=e(i.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),o.appendTo=e(e(o.appendTo)[0]||n[0]||document.body),i.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!o.isRtl).css({position:T}).appendTo(o.appendTo).attr("aria-hidden",!0).on("mouseenter"+U,function(){i._hovered=!0}).on("wheel"+U,function(t){var o=e(t.target).find(".k-list"),n=o.parent();o.length&&o.is(":visible")&&(0===n.scrollTop()&&t.originalEvent.deltaY<0||n.scrollTop()===n.prop("scrollHeight")-n.prop("offsetHeight")&&t.originalEvent.deltaY>0)&&t.preventDefault()}).on("mouseleave"+U,function(){i._hovered=!1}),i.wrapper=e(),o.animation===!1&&(o.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),K(o.animation.open,{complete:function(){i.wrapper.css({overflow:I}),i._activated=!0,i._trigger(v)}}),K(o.animation.close,{complete:function(){i._animationClose()}}),i._mousedownProxy=function(e){i._mousedown(e)},i._resizeProxy=c.mobileOS.android?function(e){setTimeout(function(){i._resize(e)},600)}:function(e){i._resize(e)},o.toggleTarget&&e(o.toggleTarget).on(o.toggleEvent+U,e.proxy(i.toggle,i))},events:[m,v,g,w],options:{name:"Popup",toggleEvent:"click",origin:x+" "+b,position:k+" "+b,anchor:C,appendTo:null,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,adjustSize:{width:0,height:0},animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},_animationClose:function(){var e=this,t=e.wrapper.data(S);e.wrapper.hide(),t&&e.wrapper.css(t),e.options.anchor!=C&&e._hideDirClass(),e._closing=!1,e._trigger(w)},destroy:function(){var t,o=this,n=o.options,i=o.element.off(U);d.fn.destroy.call(o),n.toggleTarget&&e(n.toggleTarget).off(U),n.modal||(H.unbind(o.downEvent,o._mousedownProxy),o._toggleResize(!1)),a.destroy(o.element.children()),i.removeData(),n.appendTo[0]===document.body&&(t=i.parent(".k-animation-container"),t[0]?t.remove():i.remove())},open:function(t,o){var n,i,s=this,r={isFixed:!isNaN(parseInt(o,10)),x:t,y:o},l=s.element,d=s.options,p=e(d.anchor),f=l[0]&&l.hasClass("km-widget");if(!s.visible()){if(d.copyAnchorStyles&&(f&&"font-size"==Y[0]&&Y.shift(),l.css(a.getComputedStyles(p[0],Y))),l.data("animating")||s._trigger(m))return;s._activated=!1,d.modal||(H.unbind(s.downEvent,s._mousedownProxy).bind(s.downEvent,s._mousedownProxy),s._toggleResize(!1),s._toggleResize(!0)),s.wrapper=i=a.wrap(l,d.autosize).css({overflow:z,display:"block",position:T}).attr("aria-hidden",!1),c.mobileOS.android&&i.css(M,"translatez(0)"),i.css(E),e(d.appendTo)[0]==document.body&&i.css(k,"-10000px"),s.flipped=s._position(r),n=s._openAnimation(),d.anchor!=C&&s._showDirClass(n),l.data(P,n.effects).kendoStop(!0).kendoAnimate(n).attr("aria-hidden",!1)}},_location:function(t){var o,n,i=this,s=i.element,r=i.options,l=e(r.anchor),d=s[0]&&s.hasClass("km-widget");return r.copyAnchorStyles&&(d&&"font-size"==Y[0]&&Y.shift(),s.css(a.getComputedStyles(l[0],Y))),i.wrapper=o=a.wrap(s,r.autosize).css({overflow:z,display:"block",position:T}),c.mobileOS.android&&o.css(M,"translatez(0)"),o.css(E),e(r.appendTo)[0]==document.body&&o.css(k,"-10000px"),i._position(t||{}),n=o.offset(),{width:a._outerWidth(o),height:a._outerHeight(o),left:n.left,top:n.top}},_openAnimation:function(){var e=K(!0,{},this.options.animation.open);return e.effects=a.parseEffects(e.effects,this.flipped),e},_hideDirClass:function(){var t=e(this.options.anchor),o=((t.attr("class")||"").match(D)||["","down"])[1],n=A+"-"+o;t.removeClass(n).children(O).removeClass(R).removeClass(n),this.element.removeClass(A+"-"+a.directions[o].reverse)},_showDirClass:function(t){var o=t.effects.slideIn?t.effects.slideIn.direction:"down",n=A+"-"+o;e(this.options.anchor).addClass(n).children(O).addClass(R).addClass(n),this.element.addClass(A+"-"+a.directions[o].reverse)},position:function(){this.visible()&&(this.flipped=this._position())},toggle:function(){var e=this;e[e.visible()?g:m]()},visible:function(){return this.element.is(":"+I)},close:function(o){var n,i,s,r,l=this,d=l.options;if(l.visible()){if(n=l.wrapper[0]?l.wrapper:a.wrap(l.element).hide(),l._toggleResize(!1),l._closing||l._trigger(g))return l._toggleResize(!0),t;l.element.find(".k-popup").each(function(){var t=e(this),n=t.data("kendoPopup");n&&n.close(o)}),H.unbind(l.downEvent,l._mousedownProxy),o?i={hide:!0,effects:{}}:(i=K(!0,{},d.animation.close),s=l.element.data(P),r=i.effects,!r&&!a.size(r)&&s&&a.size(s)&&(i.effects=s,i.reverse=!0),l._closing=!0),l.element.kendoStop(!0).attr("aria-hidden",!0),n.css({overflow:z}).attr("aria-hidden",!0),l.element.kendoAnimate(i),o&&l._animationClose()}},_trigger:function(e){return this.trigger(e,{type:e})},_resize:function(e){var t=this;c.resize.indexOf(e.type)!==-1?(clearTimeout(t._resizeTimeout),t._resizeTimeout=setTimeout(function(){t._position(),t._resizeTimeout=null},50)):(!t._hovered||t._activated&&t.element.hasClass("k-list-container"))&&t.close()},_toggleResize:function(e){var t=e?"on":"off",o=c.resize;c.mobileOS.ios||c.mobileOS.android||(o+=" "+L),this._scrollableParents()[t](L,this._resizeProxy),W[t](o,this._resizeProxy)},_mousedown:function(t){var n=this,i=n.element[0],s=n.options,r=e(s.anchor)[0],l=s.toggleTarget,d=a.eventTarget(t),p=e(d).closest(".k-popup"),c=p.parent().parent(".km-shim").length;p=p[0],!c&&p&&p!==n.element[0]||"popover"!==e(t.target).closest("a").data("rel")&&(o(i,d)||o(r,d)||l&&o(e(l)[0],d)||n.close())},_fit:function(e,t,o){var n=0;return e+t>o&&(n=o-(e+t)),e<0&&(n=-e),n},_flip:function(e,t,o,n,i,s,r){var a=0;return r=r||t,s!==i&&s!==_&&i!==_&&(e+r>n&&(a+=-(o+t)),e+a<0&&(a+=o+t)),a},_scrollableParents:function(){return e(this.options.anchor).parentsUntil("body").filter(function(e,t){return a.isScrollable(t)})},_position:function(t){var o,n,i,s,r,l,d,p,m,g,w,v,_,b,y,k,x,z=this,C=z.element,I=z.wrapper,P=z.options,R=e(P.viewport),A=c.zoomLevel(),D=!!(R[0]==window&&window.innerWidth&&A<=1.02),O=e(P.anchor),F=P.origin.toLowerCase().split(" "),H=P.position.toLowerCase().split(" "),N=z.collisions,W=10002,L=0,j=document.documentElement;if(r=P.viewport===window?{top:window.pageYOffset||document.documentElement.scrollTop||0,left:window.pageXOffset||document.documentElement.scrollLeft||0}:R.offset(),D?(l=window.innerWidth,d=window.innerHeight):(l=R.width(),d=R.height()),D&&j.scrollHeight-j.clientHeight>0&&(p=P.isRtl?-1:1,l-=p*a.support.scrollbar()),o=O.parents().filter(I.siblings()),o[0])if(i=Math.max(+o.css("zIndex"),0))W=i+10;else for(n=O.parentsUntil(o),s=n.length;L=0&&e(o).is(":visible")&&!e(o).is(":disabled")});return this.element.is("[tabindex]")&&t.push(this.element[0]),t},_sortFocusableElements:function(e){var t,o;return n?t=e.sort(function(e,t){return e.tabIndex-t.tabIndex}):(o="__k_index",e.each(function(e,t){t.setAttribute(o,e)}),t=e.sort(function(e,t){return e.tabIndex===t.tabIndex?parseInt(e.getAttribute(o),10)-parseInt(t.getAttribute(o),10):e.tabIndex-t.tabIndex}),e.removeAttr(o)),t},_nextFocusable:function(e,t){var o=t.length,n=t.index(e.target);return t.get((n+(e.shiftKey?-1:1))%o)},_focus:function(e){return"IFRAME"==e.nodeName?(e.contentWindow.document.body.focus(),t):(e.focus(),"INPUT"==e.nodeName&&e.setSelectionRange&&this._haveSelectionRange(e)&&e.setSelectionRange(0,e.value.length),t)},_haveSelectionRange:function(e){var t=e.type.toLowerCase();return"text"===t||"search"===t||"url"===t||"tel"===t||"password"===t}}),l.Popup.TabKeyTrap=r}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,o){(o||t)()}); //# sourceMappingURL=kendo.popup.min.js.map