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