function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(x){x.fn.waitMe=function(k){return this.each(function(){var l,f,u,b,m,p,y=x(this),g="waitMe",h=!1,w="background-color",v="",_="",e={init:function(){switch(m=x.extend({effect:"bounce",text:"",bg:"rgba(255,255,255,0.7)",color:"#000",maxSize:"",source:"",onClose:function(){}},k),p=(new Date).getMilliseconds(),b=x('<div class="'+g+'" data-waitme_id="'+p+'"></div>'),m.effect){case"none":u=0;break;case"bounce":u=3;break;case"rotateplane":u=1;break;case"stretch":u=5;break;case"orbit":u=2;break;case"roundBounce":u=12;break;case"win8":case"win8_linear":u=5,h=!0;break;case"ios":u=12;break;case"facebook":u=3;break;case"rotation":u=1,w="border-color";break;case"timer":u=2,e=x.isArray(m.color)?m.color[0]:m.color,v="border-color:"+e;break;case"pulse":u=1,w="border-color";break;case"progressBar":u=1;break;case"bouncePulse":u=3;break;case"img":u=1}if(""!==v&&(v+=";"),0<u){if("img"===m.effect)_='<img src="'+m.source+'">';else for(var e,o=1;o<=u;++o)x.isArray(m.color)?null==(e=m.color[o])&&(e="#000"):e=m.color,_+=h?'<div class="'+g+"_progress_elem"+o+'"><div style="'+w+":"+e+'"></div></div>':'<div class="'+g+"_progress_elem"+o+'" style="'+w+":"+e+'"></div>';f=x('<div class="'+g+"_progress "+m.effect+'" style="'+v+'">'+_+"</div>")}m.text&&""===m.maxSize&&(e=x.isArray(m.color)?m.color[0]:m.color,l=x('<div class="'+g+'_text" style="color:'+e+'">'+m.text+"</div>"));var t,r,i,a,n=y.find("> ."+g),s=(n&&n.remove(),x('<div class="'+g+'_content"></div>')),c=(s.append(f,l),b.append(s),(y="HTML"==y[0].tagName?x("body"):y).addClass(g+"_container").attr("data-waitme_id",p).append(b),n=y.find("> ."+g),y.find("."+g+"_content"));function d(e){c.css({top:"auto",transform:"translateY("+e+"px) translateZ(0)"})}return n.css({background:m.bg}),c.css({marginTop:-c.outerHeight()/2+"px"}),""!==m.maxSize&&(a=f.outerHeight(),f.outerWidth(),a=a,"img"===m.effect?(f.css({height:m.maxSize+"px"}),f.find(">img").css({maxHeight:"100%"}),c.css({marginTop:-c.outerHeight()/2+"px"})):m.maxSize<a&&s.css({transform:"scale("+m.maxSize/a+")"})),y.outerHeight()>x(window).height()&&(s=x(window).scrollTop(),t=c.outerHeight(),r=y.offset().top,i=y.outerHeight(),d(a=0<=(a=(a=s-r+x(window).height()/2)<0?Math.abs(a):a)-t&&a+t<=i?r-s>x(window).height()/2?t:a:r+i-t<s?s-r-t:s-r+t),x(document).scroll(function(){var e=x(window).scrollTop()-r+x(window).height()/2;0<=e-t&&e+t<=i&&d(e)})),n.on("destroyed",function(){m.onClose&&x.isFunction(m.onClose)&&m.onClose(),n.trigger("close")}),x.event.special.destroyed={remove:function(e){e.handler&&e.handler()}},n},hide:function(){var e;e=y.attr("data-waitme_id"),y.removeClass(g+"_container").removeAttr("data-waitme_id"),y.find("."+g+'[data-waitme_id="'+e+'"]').remove()}};return e[k]?e[k].apply(this,Array.prototype.slice.call(arguments,1)):"object"!==_typeof(k)&&k?void 0:e.init.apply(this,arguments)})},x(window).on("load",function(){x("body.waitMe_body").addClass("hideMe"),setTimeout(function(){x("body.waitMe_body").find(".waitMe_container:not([data-waitme_id])").remove(),x("body.waitMe_body").removeClass("waitMe_body hideMe")},200)})}(jQuery);