"use strict";!function(){var t=ax5.ui,s=ax5.util,e=void 0;t.addClass({className:"mask"},function(){return function(){var i=this,n=void 0;this.instanceId=ax5.getGuid(),this.config={theme:"",target:jQuery(document.body).get(0),animateTime:250},this.maskContent="",this.status="off",n=this.config;var a=function(t,s){return t&&t.onStateChanged?t.onStateChanged.call(s,s):this.onStateChanged&&this.onStateChanged.call(s,s),t=null,s=null,!0},o=function(t){return"undefined"==typeof t.templateName&&(t.templateName="defaultMask"),e.tmpl.get.call(this,t.templateName,t)},l=function(t){this.maskContent=t};this.init=function(){this.onStateChanged=n.onStateChanged,this.onClick=n.onClick,this.config.content&&l.call(this,this.config.content)},this.open=function(t){"on"===this.status&&this.close(),t&&t.content&&l.call(this,t.content),t&&"undefined"==typeof t.templateName&&(t.templateName="defaultMask"),i.maskConfig=jQuery.extend(!0,{},this.config,t);var s=i.maskConfig,e=s.target,n=jQuery(e),u="ax-mask-"+ax5.getGuid(),h=void 0,c={},f={},m=s.templateName,d=o({theme:s.theme,maskId:u,body:this.maskContent,templateName:m});return jQuery(document.body).append(d),e&&e!==jQuery(document.body).get(0)&&(c={position:s.position||"absolute",left:n.offset().left,top:n.offset().top,width:n.outerWidth(),height:n.outerHeight()},n.addClass("ax-masking"),jQuery(window).on("resize.ax5mask-"+this.instanceId,function(t){this.align()}.bind(this))),"undefined"!=typeof i.maskConfig.zIndex&&(c["z-index"]=i.maskConfig.zIndex),this.$mask=h=jQuery("#"+u),this.$target=n,this.status="on",h.css(c),s.onClick&&h.on("click",function(t){f={self:i,state:"open",type:"click"},i.maskConfig.onClick.call(f,f)}),a.call(this,null,{self:this,state:"open"}),t=null,s=null,e=null,n=null,u=null,h=null,c=null,f=null,m=null,d=null,this},this.close=function(t){if(this.$mask){var s=function(){this.status="off",this.$mask.remove(),this.$target.removeClass("ax-masking"),a.call(this,null,{self:this,state:"close"}),jQuery(window).off("resize.ax5mask-"+this.instanceId)};t?setTimeout(function(){s.call(this)}.bind(this),t):s.call(this)}return this},this.fadeOut=function(){if(this.$mask){var t=function(){this.status="off",this.$mask.remove(),this.$target.removeClass("ax-masking"),a.call(this,null,{self:this,state:"close"}),jQuery(window).off("resize.ax5mask-"+this.instanceId)};this.$mask.addClass("fade-out"),setTimeout(function(){t.call(this)}.bind(this),n.animateTime)}return this},this.align=function(){if(this.maskConfig&&this.maskConfig.target&&this.maskConfig.target!==jQuery(document.body).get(0))try{var t={position:this.maskConfig.position||"absolute",left:this.$target.offset().left,top:this.$target.offset().top,width:this.$target.outerWidth(),height:this.$target.outerHeight()};this.$mask.css(t)}catch(t){}return this},this.pullRequest=function(){console.log("test pullRequest01"),console.log("test pullRequest02")},this.main=function(){t.mask_instance=t.mask_instance||[],t.mask_instance.push(this),arguments&&s.isObject(arguments[0])&&this.setConfig(arguments[0])}.apply(this,arguments)}}()),e=ax5.ui.mask}(),function(){var t=ax5.ui.mask,s=function(t){return'\n
\n
\n
\n
\n {{{body}}}\n
\n
\n
\n '};t.tmpl={defaultMask:s,get:function(s,e,i){return ax5.mustache.render(t.tmpl[s].call(this,i),e)}}}(); //# sourceMappingURL=ax5mask.min.js.map