var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); (function(t){"use strict";if(BX.PopupWindowManager){return}BX.PopupWindowManager={_popups:[],_currentPopup:null,create:function(t,e,i){var n=t;if(BX.type.isPlainObject(t)&&!e&&!i){n=t.id;if(!BX.type.isNotEmptyString(n)){throw new Error("BX.PopupWindowManager: 'id' parameter is required.")}}var o=this.getPopupById(n);if(o===null){o=new BX.PopupWindow(t,e,i);BX.addCustomEvent(o,"onPopupShow",BX.delegate(this.onPopupShow,this));BX.addCustomEvent(o,"onPopupClose",BX.delegate(this.onPopupClose,this))}return o},onPopupWindowIsInitialized:function(t,e){BX.addCustomEvent(e,"onPopupDestroy",BX.delegate(this.onPopupDestroy,this));this._popups.push(e)},onPopupShow:function(t){if(this._currentPopup!==null){this._currentPopup.close()}this._currentPopup=t},onPopupClose:function(t){this._currentPopup=null},onPopupDestroy:function(t){var e;if((e=this._getPopupIndex(t.uniquePopupId))!==-1){this._popups=BX.util.deleteFromArray(this._popups,e)}},getCurrentPopup:function(){return this._currentPopup},isPopupExists:function(t){return this._getPopupIndex(t)!==-1},isAnyPopupShown:function(){for(var t=0,e=this._popups.length;t0&&this.contentContainer){var e=[];for(var i=0;i0&&BX.type.isNumber(s)){o+=s-BX.PopupWindow.defaultOptions.angleLeftOffset}this.angle={element:BX.create("div",{props:{className:e+" "+e+"-"+i}}),position:i,offset:0,defaultOffset:Math.max(o,n)};this.getPopupContainer().appendChild(this.angle.element)}if(typeof t==="object"&&t.position&&BX.util.in_array(t.position,["top","right","bottom","left","hide"])){BX.removeClass(this.angle.element,e+"-"+this.angle.position);BX.addClass(this.angle.element,e+"-"+t.position);this.angle.position=t.position}if(typeof t==="object"&&BX.type.isNumber(t.offset)){var p=t.offset;var u,a;if(this.angle.position==="top"){u=BX.PopupWindow.getOption("angleMinTop");a=this.getPopupContainer().offsetWidth-BX.PopupWindow.getOption("angleMaxTop");a=a=0){this[t]=e;this.getResizableContainer().style[t]=e+"px";this.getContentContainer().style.overflowX="auto";this.getPopupContainer().classList.add("popup-window-fixed-width");if(this.getTitleContainer()&&BX.browser.IsIE11()){this.getTitleContainer().style[t]=e+"px"}}else if(e===null||e===false){this[t]=null;this.getResizableContainer().style.removeProperty(BX.util.getCssName(t));var n=i.some(function(t){return this.getResizableContainer().style.getPropertyValue(BX.util.getCssName(t))!==""},this);if(!n){this.getContentContainer().style.removeProperty("overflow-x");this.getPopupContainer().classList.remove("popup-window-fixed-width")}if(this.getTitleContainer()&&BX.browser.IsIE11()){this.getTitleContainer().style.removeProperty(BX.util.getCssName(t))}}};BX.PopupWindow.prototype.setHeightProperty=function(t,e){var i=["height","minHeight","maxHeight"];if(i.indexOf(t)===-1){return}if(BX.type.isNumber(e)&&e>=0){this[t]=e;this.getResizableContainer().style[t]=e+"px";this.getContentContainer().style.overflowY="auto";this.getPopupContainer().classList.add("popup-window-fixed-height")}else if(e===null||e===false){this[t]=null;this.getResizableContainer().style.removeProperty(BX.util.getCssName(t));var n=i.some(function(t){return this.getResizableContainer().style.getPropertyValue(BX.util.getCssName(t))!==""},this);if(!n){this.getContentContainer().style.removeProperty("overflow-y");this.getPopupContainer().classList.remove("popup-window-fixed-height")}}};BX.PopupWindow.prototype.setPadding=function(t){if(BX.type.isNumber(t)&&t>=0){this.padding=t;this.getPopupContainer().style.padding=t+"px"}else if(t===null){this.padding=null;this.getPopupContainer().style.removeProperty("padding")}};BX.PopupWindow.prototype.getPadding=function(){return this.padding};BX.PopupWindow.prototype.setContentPadding=function(t){if(BX.type.isNumber(t)&&t>=0){this.contentPadding=t;this.getContentContainer().style.padding=t+"px"}else if(t===null){this.contentPadding=null;this.getContentContainer().style.removeProperty("padding")}};BX.PopupWindow.prototype.getContentPadding=function(){return this.contentPadding};BX.PopupWindow.prototype.setBackground=function(t){if(BX.type.isNotEmptyString(t)){this.background=t;this.getPopupContainer().style.background=t}else if(t===null){this.background=null;this.getPopupContainer().style.removeProperty("background")}};BX.PopupWindow.prototype.getBackground=function(){return this.background};BX.PopupWindow.prototype.setContentBackground=function(t){if(BX.type.isNotEmptyString(t)){this.contentBackground=t;this.getContentContainer().style.background=t}else if(t===null){this.contentBackground=null;this.getContentContainer().style.removeProperty("background")}};BX.PopupWindow.prototype.getContentBackground=function(){return this.contentBackground};BX.PopupWindow.prototype.isDestroyed=function(){return this.destroyed};BX.PopupWindow.prototype.setCacheable=function(t){this.cacheable=t!==false};BX.PopupWindow.prototype.isCacheable=function(){return this.cacheable};BX.PopupWindow.prototype.setResizeMode=function(t){if(t===true||BX.type.isPlainObject(t)){if(!this.resizeIcon){this.resizeIcon=BX.create("div",{props:{className:"popup-window-resize"},events:{mousedown:BX.proxy(this.onResizeMouseDown,this)}});this.getPopupContainer().appendChild(this.resizeIcon)}this.setMinWidth(t.minWidth);this.setMinHeight(t.minHeight)}else if(t===false&&this.resizeIcon){BX.remove(this.resizeIcon);this.resizeIcon=null}};BX.PopupWindow.prototype.getPopupContainer=function(){return this.popupContainer};BX.PopupWindow.prototype.getContentContainer=function(){return this.contentContainer};BX.PopupWindow.prototype.getResizableContainer=function(){return BX.browser.IsIE11()?this.getContentContainer():this.getPopupContainer()};BX.PopupWindow.prototype.getTitleContainer=function(){return this.titleBar};BX.PopupWindow.prototype.onTitleMouseDown=function(t){this._startDrag(t,{cursor:"move",callback:BX.proxy(this.move,this),eventName:"Drag"})};BX.PopupWindow.prototype.onResizeMouseDown=function(t){this._startDrag(t,{cursor:"nwse-resize",eventName:"Resize",callback:BX.proxy(this._resize,this)});this.resizeContentPos=BX.pos(this.getResizableContainer());this.resizeContentOffset=this.resizeContentPos.left-BX.pos(this.getPopupContainer()).left};BX.PopupWindow.prototype._resize=function(t,e,i,n){var o=i-this.resizeContentPos.left;var s=n-this.resizeContentPos.top;var p=BX.GetWindowScrollSize().scrollWidth;if(this.resizeContentPos.left+o+this.resizeContentOffset>=p){o=p-this.resizeContentPos.left-this.resizeContentOffset}o=Math.max(o,this.getMinWidth());s=Math.max(s,this.getMinHeight());if(this.getMaxWidth()!==null){o=Math.min(o,this.getMaxWidth())}if(this.getMaxHeight()!==null){s=Math.min(s,this.getMaxHeight())}this.setWidth(o);this.setHeight(s)};BX.PopupWindow.prototype.isTopAngle=function(){return this.angle!==null&&this.angle.position==="top"};BX.PopupWindow.prototype.isBottomAngle=function(){return this.angle!==null&&this.angle.position==="bottom"};BX.PopupWindow.prototype.isTopOrBottomAngle=function(){return this.angle!==null&&BX.util.in_array(this.angle.position,["top","bottom"])};BX.PopupWindow.prototype.getAngleHeight=function(){return this.isTopOrBottomAngle()?BX.PopupWindow.getOption("angleTopOffset"):0};BX.PopupWindow.prototype.setOffset=function(t){if(!BX.type.isPlainObject(t)){return}if(BX.type.isNumber(t.offsetLeft)){this.offsetLeft=t.offsetLeft+BX.PopupWindow.getOption("offsetLeft")}if(BX.type.isNumber(t.offsetTop)){this.offsetTop=t.offsetTop+BX.PopupWindow.getOption("offsetTop")}};BX.PopupWindow.prototype.setTitleBar=function(t){if(!this.titleBar){return}if(typeof t==="object"&&BX.type.isDomNode(t.content)){this.titleBar.innerHTML="";this.titleBar.appendChild(t.content)}else if(typeof t==="string"){this.titleBar.innerHTML="";this.titleBar.appendChild(BX.create("span",{props:{className:"popup-window-titlebar-text"},text:t}))}if(this.params.draggable){this.titleBar.style.cursor="move";BX.bind(this.titleBar,"mousedown",BX.proxy(this.onTitleMouseDown,this))}};BX.PopupWindow.prototype.setClosingByEsc=function(t){t=BX.type.isBoolean(t)?t:true;if(t){this.closeByEsc=true;this.bindClosingByEsc()}else{this.closeByEsc=false;this.unbindClosingByEsc()}};BX.PopupWindow.prototype.bindClosingByEsc=function(){if(this.closeByEsc&&!this.isCloseByEscBinded){BX.bind(document,"keyup",this.handleDocumentKeyUp);this.isCloseByEscBinded=true}};BX.PopupWindow.prototype.unbindClosingByEsc=function(){if(this.isCloseByEscBinded){BX.unbind(document,"keyup",this.handleDocumentKeyUp);this.isCloseByEscBinded=false}};BX.PopupWindow.prototype.setAutoHide=function(t){t=BX.type.isBoolean(t)?t:true;if(t){this.autoHide=true;this.bindAutoHide()}else{this.autoHide=false;this.unbindAutoHide()}};BX.PopupWindow.prototype.bindAutoHide=function(){if(this.autoHide&&!this.isAutoHideBinded&&this.isShown()){this.isAutoHideBinded=true;if(this.isCompatibleMode()){BX.bind(this.getPopupContainer(),"click",this.cancelBubble)}if(this.overlay&&this.overlay.element){BX.bind(this.overlay.element,"click",this.handleOverlayClick)}else{if(this.isCompatibleMode()){BX.bind(document,"click",this.handleAutoHide)}else{document.addEventListener("click",this.handleAutoHide,true)}}}};BX.PopupWindow.prototype.unbindAutoHide=function(){if(this.isAutoHideBinded){this.isAutoHideBinded=false;if(this.isCompatibleMode()){BX.unbind(this.getPopupContainer(),"click",this.cancelBubble)}if(this.overlay&&this.overlay.element){BX.unbind(this.overlay.element,"click",this.handleOverlayClick)}else{if(this.isCompatibleMode()){BX.unbind(document,"click",this.handleAutoHide)}else{document.removeEventListener("click",this.handleAutoHide,true)}}}};BX.PopupWindow.prototype.handleAutoHide=function(t){if(this.isDestroyed()){return}if(this.autoHideHandler!==null){if(this.autoHideHandler(t)){this._tryCloseByEvent(t)}}else if(t.target!==this.getPopupContainer()&&!this.getPopupContainer().contains(t.target)){this._tryCloseByEvent(t)}};BX.PopupWindow.prototype._tryCloseByEvent=function(t){if(this.isCompatibleMode()){this.tryCloseByEvent(t)}else{setTimeout(BX.proxy(this.tryCloseByEvent,this),0,t)}};BX.PopupWindow.prototype.handleOverlayClick=function(t){this.tryCloseByEvent(t);t.stopPropagation()};BX.PopupWindow.prototype.setOverlay=function(t){if(this.overlay===null){this.overlay={element:BX.create("div",{props:{className:"popup-window-overlay",id:"popup-window-overlay-"+this.uniquePopupId}})};this.adjustOverlayZindex();this.resizeOverlay();this.appendContainer.appendChild(this.overlay.element)}if(t&&t.hasOwnProperty("opacity")&&BX.type.isNumber(t.opacity)&&t.opacity>=0&&t.opacity<=100){if(BX.browser.IsIE()&&!BX.browser.IsIE9()){this.overlay.element.style.filter="alpha(opacity="+t.opacity+")"}else{this.overlay.element.style.filter="none";this.overlay.element.style.opacity=parseFloat(t.opacity/100).toPrecision(3)}}if(t&&t.backgroundColor){this.overlay.element.style.backgroundColor=t.backgroundColor}};BX.PopupWindow.prototype.removeOverlay=function(){if(this.overlay!==null&&this.overlay.element!==null){BX.remove(this.overlay.element)}if(this.overlayTimeout){clearInterval(this.overlayTimeout);this.overlayTimeout=null}this.overlay=null};BX.PopupWindow.prototype.hideOverlay=function(){if(this.overlay!==null&&this.overlay.element!==null){if(this.overlayTimeout){clearInterval(this.overlayTimeout);this.overlayTimeout=null}this.overlay.element.style.display="none"}};BX.PopupWindow.prototype.showOverlay=function(){if(this.overlay!==null&&this.overlay.element!==null){this.overlay.element.style.display="block";var t=this.getPopupContainer().offsetHeight;this.overlayTimeout=setInterval(function(){if(t!==this.getPopupContainer().offsetHeight){this.resizeOverlay();t=this.getPopupContainer().offsetHeight}}.bind(this),1e3)}};BX.PopupWindow.prototype.resizeOverlay=function(){if(this.overlay!==null&&this.overlay.element!==null){var t=BX.GetWindowScrollSize();var e=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);this.overlay.element.style.width=t.scrollWidth+"px";this.overlay.element.style.height=e+"px"}};BX.PopupWindow.prototype.getZindex=function(){if(this.overlay!==null){return this.params.zIndexAbsolute>0?this.params.zIndexAbsolute:BX.PopupWindow.getOption("popupOverlayZindex")+this.params.zIndex}else{return this.params.zIndexAbsolute>0?this.params.zIndexAbsolute:BX.PopupWindow.getOption("popupZindex")+this.params.zIndex}};BX.PopupWindow.prototype.adjustOverlayZindex=function(){if(this.overlay!==null&&this.overlay.element!==null){this.overlay.element.style.zIndex=parseInt(this.getPopupContainer().style.zIndex)-1}};BX.PopupWindow.prototype.show=function(){if(this.isShown()||this.isDestroyed()){return}if(!this.firstShow){BX.onCustomEvent(this,"onPopupFirstShow",[this]);this.firstShow=true}BX.onCustomEvent(this,"onPopupShow",[this]);this.showOverlay();this.getPopupContainer().style.display="block";this.adjustPosition();this.animateOpening(function(){if(this.isDestroyed()){return}BX.removeClass(this.getPopupContainer(),this.animationShowClassName);BX.onCustomEvent(this,"onAfterPopupShow",[this])}.bind(this));this.bindClosingByEsc();if(this.isCompatibleMode()){setTimeout(function(){this.bindAutoHide()}.bind(this),100)}else{this.bindAutoHide()}};BX.PopupWindow.prototype.animateOpening=function(t){BX.removeClass(this.getPopupContainer(),this.animationCloseClassName);if(this.animationShowClassName!==null){BX.addClass(this.getPopupContainer(),this.animationShowClassName);if(this.animationCloseEventType!==null){var e=this.animationCloseEventType+"end";this.getPopupContainer().addEventListener(e,function i(){this.removeEventListener(e,i);t()})}else{t()}}else{t()}};BX.PopupWindow.prototype.animateClosing=function(t){BX.removeClass(this.getPopupContainer(),this.animationShowClassName);if(this.animationCloseClassName!==null){BX.addClass(this.getPopupContainer(),this.animationCloseClassName);if(this.animationCloseEventType!==null){var e=this.animationCloseEventType+"end";this.getPopupContainer().addEventListener(e,function i(){this.removeEventListener(e,i);t()})}else{t()}}else{t()}};BX.PopupWindow.prototype.isShown=function(){return!this.isDestroyed()&&this.getPopupContainer().style.display==="block"};BX.PopupWindow.prototype.cancelBubble=function(e){e=e||t.event;if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}};BX.PopupWindow.prototype.close=function(){if(this.isDestroyed()||!this.isShown()){return}BX.onCustomEvent(this,"onPopupClose",[this]);if(this.isDestroyed()){return}this.animateClosing(function(){if(this.isDestroyed()){return}this.hideOverlay();this.getPopupContainer().style.display="none";BX.removeClass(this.getPopupContainer(),this.animationCloseClassName);this.unbindClosingByEsc();if(this.isCompatibleMode()){setTimeout(function(){this.unbindAutoHide()}.bind(this),0)}else{this.unbindAutoHide()}BX.onCustomEvent(this,"onPopupAfterClose",[this]);if(!this.isCacheable()){this.destroy()}}.bind(this))};BX.PopupWindow.prototype.toggle=function(){this.isShown()?this.close():this.show()};BX.PopupWindow.prototype.tryCloseByEvent=function(t){if(this.isLeftButton(t)){this.close()}};BX.PopupWindow.prototype.setAnimation=function(t){if(BX.type.isPlainObject(t)){this.animationShowClassName=BX.type.isNotEmptyString(t.showClassName)?t.showClassName:null;this.animationCloseClassName=BX.type.isNotEmptyString(t.closeClassName)?t.closeClassName:null;this.animationCloseEventType=BX.util.in_array(t.closeAnimationType,["animation","transition"])?t.closeAnimationType:null}else if(BX.type.isNotEmptyString(t)){var e=t;if(e==="fading"){this.animationShowClassName="popup-window-show-animation-opacity";this.animationCloseClassName="popup-window-close-animation-opacity";this.animationCloseEventType="animation"}else if(e==="fading-slide"){this.animationShowClassName="popup-window-show-animation-opacity-transform";this.animationCloseClassName="popup-window-close-animation-opacity";this.animationCloseEventType="animation"}else if(e==="scale"){this.animationShowClassName="popup-window-show-animation-scale";this.animationCloseClassName="popup-window-close-animation-opacity";this.animationCloseEventType="animation"}}else if(t===false||t===null){this.animationShowClassName=null;this.animationCloseClassName=null;this.animationCloseEventType=null}};BX.PopupWindow.prototype.handleCloseIconClick=function(t){this.tryCloseByEvent(t);t.stopPropagation()};BX.PopupWindow.prototype.isLeftButton=function(t){return t.button===0};BX.PopupWindow.prototype.handleDocumentKeyUp=function(e){e=e||t.event;if(e.keyCode===27){n(this.getZindex(),BX.proxy(this.close,this))}};BX.PopupWindow.prototype.destroy=function(){BX.onCustomEvent(this,"onPopupDestroy",[this]);this.destroyed=true;this.unbindClosingByEsc();if(this.isCompatibleMode()){setTimeout(function(){this.unbindAutoHide()}.bind(this),0)}else{this.unbindAutoHide()}BX.unbindAll(this);BX.unbind(document,"mousemove",BX.proxy(this._moveDrag,this));BX.unbind(document,"mouseup",BX.proxy(this._stopDrag,this));BX.unbind(t,"resize",this.handleResizeWindow);BX.remove(this.popupContainer);this.removeOverlay();this.popupContainer=null;this.contentContainer=null;this.closeIcon=null;this.titleBar=null;this.buttonsContainer=null;this.angle=null;this.resizeIcon=null};BX.PopupWindow.prototype.enterFullScreen=function(){if(BX.PopupWindow.fullscreenStatus){if(document.cancelFullScreen){document.cancelFullScreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else if(document.webkitCancelFullScreen){document.webkitCancelFullScreen()}}else{if(BX.browser.IsChrome()||BX.browser.IsSafari()){this.contentContainer.webkitRequestFullScreen(this.contentContainer.ALLOW_KEYBOARD_INPUT);BX.bind(t,"webkitfullscreenchange",this.fullscreenBind=BX.proxy(this.eventFullScreen,this))}else if(BX.browser.IsFirefox()){this.contentContainer.mozRequestFullScreen(this.contentContainer.ALLOW_KEYBOARD_INPUT);BX.bind(t,"mozfullscreenchange",this.fullscreenBind=BX.proxy(this.eventFullScreen,this))}}};BX.PopupWindow.prototype.eventFullScreen=function(e){if(BX.PopupWindow.fullscreenStatus){if(BX.browser.IsChrome()||BX.browser.IsSafari()){BX.unbind(t,"webkitfullscreenchange",this.fullscreenBind)}else if(BX.browser.IsFirefox()){BX.unbind(t,"mozfullscreenchange",this.fullscreenBind)}BX.removeClass(this.contentContainer,"popup-window-fullscreen",[this.contentContainer]);BX.PopupWindow.fullscreenStatus=false;BX.onCustomEvent(this,"onPopupFullscreenLeave");this.adjustPosition()}else{BX.addClass(this.contentContainer,"popup-window-fullscreen");BX.PopupWindow.fullscreenStatus=true;BX.onCustomEvent(this,"onPopupFullscreenEnter",[this.contentContainer]);this.adjustPosition()}};BX.PopupWindow.prototype.adjustPosition=function(t){if(t&&typeof t==="object"){this.bindOptions=t}var e=this.getBindElementPos(this.bindElement);if(!this.bindOptions.forceBindPosition&&this.bindElementPos!==null&&e.top===this.bindElementPos.top&&e.left===this.bindElementPos.left){return}this.bindElementPos=e;var i=e.windowSize?e.windowSize:BX.GetWindowInnerSize();var n=e.windowScroll?e.windowScroll:BX.GetWindowScrollPos();var o=e.popupWidth?e.popupWidth:this.popupContainer.offsetWidth;var s=e.popupHeight?e.popupHeight:this.popupContainer.offsetHeight;var p=BX.PopupWindow.getOption("angleTopOffset");var u=this.bindElementPos.left+this.offsetLeft-(this.isTopOrBottomAngle()?BX.PopupWindow.getOption("angleLeftOffset"):0);if(!this.bindOptions.forceLeft&&u+o+this.bordersWidth>=i.innerWidth+n.scrollLeft&&i.innerWidth+n.scrollLeft-o-this.bordersWidth>0){var a=u;u=i.innerWidth+n.scrollLeft-o-this.bordersWidth;if(this.isTopOrBottomAngle()){this.setAngle({offset:a-u+this.angle.defaultOffset})}}else if(this.isTopOrBottomAngle()){this.setAngle({offset:this.angle.defaultOffset+(u<0?u:0)})}if(u<0){u=0}var r=0;if(this.bindOptions.position&&this.bindOptions.position==="top"){r=this.bindElementPos.top-s-this.offsetTop-(this.isBottomAngle()?p:0);if(r<0||!this.bindOptions.forceTop&&ri.innerHeight+n.scrollTop&&this.bindElementPos.top-s-this.getAngleHeight()>=0){r=this.bindElementPos.top-s;if(this.isTopOrBottomAngle()){r-=p;this.setAngle({position:"bottom"})}r+=BX.PopupWindow.getOption("positionTopXOffset")}else if(this.isBottomAngle()){r+=p;this.setAngle({position:"top"})}}if(r<0){r=0}BX.adjust(this.popupContainer,{style:{top:r+"px",left:u+"px",zIndex:this.getZindex()}});this.adjustOverlayZindex()};BX.PopupWindow.prototype.handleResizeWindow=function(t){if(this.isShown()){this.adjustPosition();if(this.overlay!==null){this.resizeOverlay()}}};BX.PopupWindow.prototype.move=function(t,e,i,n){var o=parseInt(this.popupContainer.style.left)+t;var s=parseInt(this.popupContainer.style.top)+e;if(typeof this.params.draggable==="object"&&this.params.draggable.restrict){if(o<0){o=0}var p=BX.GetWindowScrollSize();var u=this.popupContainer.offsetWidth;var a=this.popupContainer.offsetHeight;if(o>p.scrollWidth-u){o=p.scrollWidth-u}if(s>p.scrollHeight-a){s=p.scrollHeight-a}if(s<0){s=0}}this.popupContainer.style.left=o+"px";this.popupContainer.style.top=s+"px"};BX.PopupWindow.prototype._startDrag=function(e,i){e=e||t.event;BX.fixEventPageXY(e);i=i||{};if(BX.type.isNotEmptyString(i.cursor)){this.dragOptions.cursor=i.cursor}if(BX.type.isNotEmptyString(i.eventName)){this.dragOptions.eventName=i.eventName}if(BX.type.isFunction(i.callback)){this.dragOptions.callback=i.callback}this.dragPageX=e.pageX;this.dragPageY=e.pageY;this.dragged=false;BX.bind(document,"mousemove",BX.proxy(this._moveDrag,this));BX.bind(document,"mouseup",BX.proxy(this._stopDrag,this));if(document.body.setCapture){document.body.setCapture()}document.body.ondrag=BX.False;document.body.onselectstart=BX.False;document.body.style.cursor=this.dragOptions.cursor;document.body.style.MozUserSelect="none";this.popupContainer.style.MozUserSelect="none";return BX.PreventDefault(e)};BX.PopupWindow.prototype._moveDrag=function(e){e=e||t.event;BX.fixEventPageXY(e);if(this.dragPageX===e.pageX&&this.dragPageY===e.pageY){return}this.dragOptions.callback(e.pageX-this.dragPageX,e.pageY-this.dragPageY,e.pageX,e.pageY);this.dragPageX=e.pageX;this.dragPageY=e.pageY;if(!this.dragged){BX.onCustomEvent(this,"onPopup"+this.dragOptions.eventName+"Start",[this]);this.dragged=true}BX.onCustomEvent(this,"onPopup"+this.dragOptions.eventName,[this])};BX.PopupWindow.prototype._stopDrag=function(t){if(document.body.releaseCapture){document.body.releaseCapture()}BX.unbind(document,"mousemove",BX.proxy(this._moveDrag,this));BX.unbind(document,"mouseup",BX.proxy(this._stopDrag,this));document.body.ondrag=null;document.body.onselectstart=null;document.body.style.cursor="";document.body.style.MozUserSelect="";this.popupContainer.style.MozUserSelect="";BX.onCustomEvent(this,"onPopup"+this.dragOptions.eventName+"End",[this]);this.dragged=false;return BX.PreventDefault(t)};BX.PopupWindow.options={};BX.PopupWindow.defaultOptions={angleLeftOffset:40,positionTopXOffset:-11,angleTopOffset:10,popupZindex:1e3,popupOverlayZindex:1100,angleMinLeft:10,angleMaxLeft:30,angleMinRight:10,angleMaxRight:30,angleMinBottom:23,angleMaxBottom:25,angleMinTop:23,angleMaxTop:25,offsetLeft:0,offsetTop:0};BX.PopupWindow.setOptions=function(t){if(!t||typeof t!=="object"){return}for(var e in t){BX.PopupWindow.options[e]=t[e]}};BX.PopupWindow.getOption=function(t,e){if(typeof BX.PopupWindow.options[t]!=="undefined"){return BX.PopupWindow.options[t]}else if(typeof e!=="undefined"){return e}else{return BX.PopupWindow.defaultOptions[t]}};BX.PopupWindowButton=function(t){this.popupWindow=null;this.params=t||{};this.text=this.params.text||"";this.id=this.params.id||"";this.className=this.params.className||"";this.events=this.params.events||{};this.contextEvents={};for(var e in this.events){this.contextEvents[e]=BX.proxy(this.events[e],this)}this.buttonNode=BX.create("span",{props:{className:"popup-window-button"+(this.className.length>0?" "+this.className:""),id:this.id},events:this.contextEvents,text:this.text})};BX.PopupWindowButton.prototype.render=function(){return this.buttonNode};BX.PopupWindowButton.prototype.getId=function(){return this.id};BX.PopupWindowButton.prototype.getName=function(){return this.name};BX.PopupWindowButton.prototype.getContainer=function(){return this.buttonNode};BX.PopupWindowButton.prototype.setName=function(t){this.text=t||"";if(this.buttonNode){BX.cleanNode(this.buttonNode);BX.adjust(this.buttonNode,{text:this.text})}};BX.PopupWindowButton.prototype.setClassName=function(t){if(this.buttonNode){if(BX.type.isString(this.className)&&this.className!==""){BX.removeClass(this.buttonNode,this.className)}BX.addClass(this.buttonNode,t)}this.className=t};BX.PopupWindowButton.prototype.addClassName=function(t){if(this.buttonNode){BX.addClass(this.buttonNode,t);this.className=this.buttonNode.className}};BX.PopupWindowButton.prototype.removeClassName=function(t){if(this.buttonNode){BX.removeClass(this.buttonNode,t);this.className=this.buttonNode.className}};BX.PopupWindowButtonLink=function(t){BX.PopupWindowButtonLink.superclass.constructor.apply(this,arguments);this.buttonNode=BX.create("span",{props:{className:"popup-window-button popup-window-button-link"+(this.className.length>0?" "+this.className:""),id:this.id},text:this.text,events:this.contextEvents})};BX.extend(BX.PopupWindowButtonLink,BX.PopupWindowButton);BX.PopupWindowCustomButton=function(t){BX.PopupWindowCustomButton.superclass.constructor.apply(this,arguments);this.buttonNode=BX.create("span",{props:{className:this.className.length>0?this.className:"",id:this.id},events:this.contextEvents,text:this.text})};BX.extend(BX.PopupWindowCustomButton,BX.PopupWindowButton);BX.PopupMenu={Data:{},currentItem:null,show:function(t){if(this.currentItem!==null){this.currentItem.popupWindow.close()}this.currentItem=this.create.apply(this,arguments);this.currentItem.popupWindow.show()},create:function(t){var e=null;var i=arguments[1];var n=arguments[2];var o=arguments[3];if(BX.type.isPlainObject(t)&&!i&&!n&&!o){e=t.id;if(!BX.type.isNotEmptyString(e)){throw new Error("BX.PopupMenu.create: 'id' parameter is required.")}}else{e=t}if(!this.Data[e]){this.Data[e]=new BX.PopupMenuWindow(t,i,n,o);BX.addCustomEvent(this.Data[e],"onPopupMenuDestroy",this.onPopupDestroy.bind(this))}return this.Data[e]},getCurrentMenu:function(){return this.currentItem},getMenuById:function(t){return this.Data[t]?this.Data[t]:null},onPopupDestroy:function(t){this.destroy(t.id)},destroy:function(t){var e=this.getMenuById(t);if(e){if(this.currentItem===e){this.currentItem=null}e.popupWindow.destroy();delete this.Data[t]}}};BX.PopupMenuWindow=function(t,e,i,n){if(BX.type.isPlainObject(t)&&!e&&!i&&!n){n=t;n.compatibleMode=false;t=n.id;e=n.bindElement;i=n.items;if(!BX.type.isNotEmptyString(t)){t="menu-popup-"+BX.util.getRandomString().toLowerCase()}}this.id=t;this.bindElement=e;this.menuItems=[];this.itemsContainer=null;this.params=n&&typeof n==="object"?n:{};this.parentMenuWindow=null;this.parentMenuItem=null;if(i&&BX.type.isArray(i)){for(var o=0;o=0){this.menuItems=BX.util.insertIntoArray(this.menuItems,n,i)}else{this.menuItems.push(i)}return i};BX.PopupMenuWindow.prototype.removeMenuItem=function(t){var e=this.getMenuItem(t);if(!e){return}for(var i=0;i0){var d=Math.ceil(h/e.height)*e.height;if(d>e.top){d-=Math.ceil((d-e.top)/e.height)*e.height}if(e.bottom>a-d){d-=e.bottom-(a-d)+this.getPopupPadding()}n+=d;o+=d}if(e.left+i+p>r){var f=e.left-p-this.subMenuOffsetX;if(f>0){i=-p-this.subMenuOffsetX;s="right"}}t.setBindElement(this.layout.item);t.setOffset({offsetLeft:i,offsetTop:-n});t.setAngle({position:s,offset:o});t.adjustPosition()},getPopupPadding:function(){if(!BX.type.isNumber(this.popupPadding)){if(this.subMenuWindow){var t=this.subMenuWindow.layout.menuContainer;this.popupPadding=parseInt(BX.style(t,"paddingTop"),10)}else{this.popupPadding=0}}return this.popupPadding},getSubMenu:function(){return this.subMenuWindow},getId:function(){return this.id},setMenuWindow:function(t){this.menuWindow=t},getMenuWindow:function(){return this.menuWindow},getMenuShowDelay:function(){return this.menuShowDelay},enable:function(){this.disabled=false;this.getContainer().classList.remove("menu-popup-item-disabled")},disable:function(){this.disabled=true;this.closeSubMenu();this.getContainer().classList.add("menu-popup-item-disabled")},isDisabled:function(){return this.disabled},setCacheable:function(t){this.cacheable=t!==false},isCacheable:function(){return this.cacheable}};t.BXInputPopup=function(t){this.id=t.id||"bx-inp-popup-"+Math.round(Math.random()*1e6);this.handler=t.handler||false;this.values=t.values||false;this.pInput=t.input;this.bValues=!!this.values;this.defaultValue=t.defaultValue||"";this.openTitle=t.openTitle||"";this.className=t.className||"";this.noMRclassName=t.noMRclassName||"ec-no-rm";this.emptyClassName=t.noMRclassName||"ec-label";var e=this;this.curInd=false;if(this.bValues){this.pInput.onfocus=this.pInput.onclick=function(t){if(this.value==e.defaultValue){this.value="";this.className=e.className}e.ShowPopup();return BX.PreventDefault(t)};this.pInput.onblur=function(){if(e.bShowed)setTimeout(function(){e.ClosePopup(true)},200);e.OnChange()}}else{this.pInput.className=this.noMRclassName;this.pInput.onblur=BX.proxy(this.OnChange,this)}};BXInputPopup.prototype={ShowPopup:function(){if(this.bShowed)return;var t=this;if(!this.oPopup){var e,i=BX.create("DIV",{props:{className:"bxecpl-loc-popup "+this.className}});for(var n=0,o=this.values.length;n0){for(var s=0;se){e=t;i=[o]}else if(t==e){i.push(o)}}}})(window); //# sourceMappingURL=core_popup.map.js } /* FILE ARCHIVED ON 02:44:50 Apr 02, 2022 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 14:46:33 Jan 13, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 146.088 exclusion.robots: 0.096 exclusion.robots.policy: 0.087 cdx.remote: 0.067 esindex: 0.01 LoadShardBlock: 73.33 (3) PetaboxLoader3.datanode: 119.117 (5) load_resource: 110.997 PetaboxLoader3.resolve: 57.342 loaddict: 32.762 */ } /* FILE ARCHIVED ON 09:31:46 Jan 18, 2024 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 11:26:01 Feb 11, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): exclusion.robots: 0.077 exclusion.robots.policy: 0.065 cdx.remote: 0.136 esindex: 0.012 LoadShardBlock: 122.648 (6) PetaboxLoader3.datanode: 125.186 (7) load_resource: 123.593 PetaboxLoader3.resolve: 77.115 */