OwlCyberSecurity - MANAGER
Edit File: kendo.popup.min.js
/*! * Copyright 2021 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved. * * 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("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",P="location",S="position",E="visible",I="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:E}),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(P);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.off(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(o,n){var i,s,r=this,l={isFixed:!isNaN(parseInt(n,10)),x:o,y:n},d=r.element,p=r.options,f=e(p.anchor),u=d[0]&&d.hasClass("km-widget");if(!r.visible()){if(p.copyAnchorStyles&&(u&&"font-size"==Y[0]&&Y.shift(),d.css(a.getComputedStyles(f[0],Y))),d.data("animating")||r._trigger(m))return;r._activated=!1,p.modal||(H.off(r.downEvent,r._mousedownProxy).on(r.downEvent,r._mousedownProxy),r._toggleResize(!1),r._toggleResize(!0)),r.wrapper=s=a.wrap(d,p.autosize).css({overflow:z,display:"block",position:T}).attr("aria-hidden",!1),c.mobileOS.android&&s.css(M,"translatez(0)"),s.css(S),e(p.appendTo)[0]==document.body&&s.css(k,"-10000px"),r.flipped=r._position(l),i=r._openAnimation(),p.anchor!=C&&r._showDirClass(i),d.is(":visible")||d.data("olddisplay")!==t||(d.show(),d.data("olddisplay",d.css("display")),d.hide()),d.data(I,i.effects).kendoStop(!0).kendoAnimate(i).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(S),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(":"+E)},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.off(l.downEvent,l._mousedownProxy),o?i={hide:!0,effects:{}}:(i=K(!0,{},d.animation.close),s=l.element.data(I),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||c.browser.safari||(o+=" "+L),e&&!this.scrollableParents&&(this.scrollableParents=this._scrollableParents()),this.scrollableParents&&this.scrollableParents.length&&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,E=z.wrapper,I=z.options,R=e(I.viewport),A=c.zoomLevel(),D=!!(R[0]==window&&window.innerWidth&&A<=1.02),O=e(I.anchor),F=I.origin.toLowerCase().split(" "),H=I.position.toLowerCase().split(" "),N=z.collisions,W=10002,L=0,j=document.documentElement;if(r=I.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=I.isRtl?-1:1,l-=p*a.support.scrollbar()),o=O.parents().filter(E.siblings()),o[0])if(i=Math.max(+o.css("zIndex"),0))W=i+10;else for(n=O.parentsUntil(o),s=n.length;L<s;L++)i=+e(n[L]).css("zIndex"),i&&W<i&&(W=i+10);return E.css("zIndex",W),E.css(t&&t.isFixed?{left:t.x,top:t.y}:z._align(F,H)),m=f(E,S,O[0]===E.offsetParent()[0]),g=f(E),w=O.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),w.length&&(m=f(E,S,!0),g=f(E)),g.top-=r.top,g.left-=r.left,z.wrapper.data(P)||E.data(P,K({},m)),v=K({},g),_=K({},m),b=I.adjustSize,"fit"===N[0]&&(_.top+=z._fit(v.top,h(E)+b.height,d/A)),"fit"===N[1]&&(_.left+=z._fit(v.left,u(E)+b.width,l/A)),y=K({},_),k=h(C),x=h(E),!E.height()&&k&&(x+=k),"flip"===N[0]&&(_.top+=z._flip(v.top,k,h(O),d/A,F[0],H[0],x)),"flip"===N[1]&&(_.left+=z._flip(v.left,u(C),u(O),l/A,F[1],H[1],u(E))),C.css(S,T),E.css(_),_.left!=y.left||_.top!=y.top},_align:function(t,o){var n,i=this,s=i.wrapper,r=e(i.options.anchor),a=t[0],l=t[1],d=o[0],p=o[1],c=f(r),m=e(i.options.appendTo),g=u(s),w=h(s)||h(s.children().first()),v=u(r),b=h(r),k=c.top,T=c.left,z=Math.round;return m[0]!=document.body&&(n=f(m),k-=n.top,T-=n.left),a===x&&(k+=b),a===_&&(k+=z(b/2)),d===x&&(k-=w),d===_&&(k-=z(w/2)),l===y&&(T+=v),l===_&&(T+=z(v/2)),p===y&&(T-=g),p===_&&(T-=z(g/2)),{top:k,left:T}}});l.plugin(Q),n=a.support.stableSort,i="kendoTabKeyTrap",s="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], *[contenteditable]",r=p.extend({init:function(t){this.element=e(t),this.element.autoApplyNS(i)},trap:function(){this.element.on("keydown",N(this._keepInTrap,this))},removeTrap:function(){this.element.kendoDestroy(i)},destroy:function(){this.element.kendoDestroy(i),this.element=t},shouldTrap:function(){return!0},_keepInTrap:function(e){var t,o,n;9===e.which&&this.shouldTrap()&&!e.isDefaultPrevented()&&(t=this._focusableElements(),o=this._sortFocusableElements(t),n=this._nextFocusable(e,o),this._focus(n),e.preventDefault())},_focusableElements:function(){var t=this.element.find(s).filter(function(t,o){return o.tabIndex>=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)()});