sinzmise-cetastories 2.0.0-1729401485124 → 2.0.0-1730024687183
Sign up to get free protection for your applications and to get access to all the features.
- package/404/index.html +1 -1
- package/about/index.html +1 -1
- package/album/index.html +1 -1
- package/archives/2021/12/index.html +1 -1
- package/archives/2021/index.html +1 -1
- package/archives/2022/12/index.html +1 -1
- package/archives/2022/index.html +1 -1
- package/archives/2023/01/index.html +1 -1
- package/archives/2023/02/index.html +1 -1
- package/archives/2023/03/index.html +1 -1
- package/archives/2023/04/index.html +1 -1
- package/archives/2023/07/index.html +1 -1
- package/archives/2023/08/index.html +1 -1
- package/archives/2023/09/index.html +1 -1
- package/archives/2023/10/index.html +1 -1
- package/archives/2023/11/index.html +1 -1
- package/archives/2023/12/index.html +1 -1
- package/archives/2023/index.html +1 -1
- package/archives/2023/page/2/index.html +1 -1
- package/archives/2023/page/3/index.html +1 -1
- package/archives/2024/01/index.html +1 -1
- package/archives/2024/02/index.html +1 -1
- package/archives/2024/03/index.html +1 -1
- package/archives/2024/04/index.html +1 -1
- package/archives/2024/05/index.html +1 -1
- package/archives/2024/06/index.html +1 -1
- package/archives/2024/07/index.html +1 -1
- package/archives/2024/08/index.html +1 -1
- package/archives/2024/09/index.html +1 -1
- package/archives/2024/10/index.html +1 -1
- package/archives/2024/index.html +1 -1
- package/archives/2024/page/2/index.html +1 -1
- package/archives/index.html +1 -1
- package/archives/page/2/index.html +1 -1
- package/archives/page/3/index.html +1 -1
- package/archives/page/4/index.html +1 -1
- package/archives/page/5/index.html +1 -0
- package/assets/algolia/algoliasearch.js +2 -1
- package/assets/algolia/algoliasearchLite.js +2 -1
- package/atom.xml +114 -204
- package/bbs/bbs.html +1 -1
- package/bbs/bbs.js +2 -1
- package/bbs/index.html +1 -1
- package/categories/index.html +1 -1
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
- package/categories//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
- package/categories//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
- package/categories//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
- package/charts/index.html +1 -1
- package/comments/index.html +1 -1
- package/css/custom2.css +2 -1
- package/css/first.css +2 -0
- package/css/pace/big-counter.css +2 -1
- package/css/pace/corner-indicator.css +2 -1
- package/css/pace/flash.css +2 -1
- package/css/pace/mac-osx.css +2 -1
- package/css/pace/pace.css +2 -1
- package/css/plane.css +2 -1
- package/css/style.css +2 -0
- package/css/tags.css +2 -1
- package/essay/index.html +1 -1
- package/fcircle/index.html +1 -1
- package/games +3831 -509
- package/index.html +1 -1
- package/js/app.js +2 -0
- package/js/autoload.js +2 -1
- package/js/ceta/fancybox.css +2 -0
- package/js/ceta/fancybox.umd.js +2 -0
- package/js/ceta/iconfontInkss.js +2 -0
- package/js/ceta/lazyload.min.js +1 -0
- package/js/ceta/message.css +2 -0
- package/js/ceta/message.js +2 -0
- package/js/ceta/pjax.min.js +1 -0
- package/js/clock.js +2 -1
- package/js/kslink.js +2 -1
- package/js/newyear.js +2 -1
- package/js/plane.js +2 -1
- package/js/plugins/aplayer.js +2 -0
- package/js/plugins/parallax.js +2 -0
- package/js/plugins/rightMenus.js +2 -0
- package/js/plugins/tags/contributors.js +2 -0
- package/js/plugins/tags/friends.js +2 -0
- package/js/plugins/tags/sites.js +2 -0
- package/js/search/algolia.js +2 -0
- package/js/search/hexo.js +2 -0
- package/js/search/meilisearch.js +2 -0
- package/js/txmap.js +2 -1
- package/link/index.html +1 -1
- package/load.html +1 -1
- package/maps/assets/algolia/algoliasearch.js.map +1 -0
- package/maps/assets/algolia/algoliasearchLite.js.map +1 -0
- package/maps/bbs/bbs.js.map +1 -0
- package/maps/css/custom2.css.map +1 -0
- package/maps/css/first.css.map +1 -0
- package/maps/css/pace/big-counter.css.map +1 -0
- package/maps/css/pace/corner-indicator.css.map +1 -0
- package/maps/css/pace/flash.css.map +1 -0
- package/maps/css/pace/mac-osx.css.map +1 -0
- package/maps/css/pace/pace.css.map +1 -0
- package/maps/css/plane.css.map +1 -0
- package/maps/css/style.css.map +1 -0
- package/maps/css/tags.css.map +1 -0
- package/maps/js/app.js.map +1 -0
- package/maps/js/autoload.js.map +1 -0
- package/maps/js/ceta/fancybox.css.map +1 -0
- package/maps/js/ceta/fancybox.umd.js.map +1 -0
- package/maps/js/ceta/iconfontInkss.js.map +1 -0
- package/maps/js/ceta/message.css.map +1 -0
- package/maps/js/ceta/message.js.map +1 -0
- package/maps/js/clock.js.map +1 -0
- package/maps/js/kslink.js.map +1 -0
- package/maps/js/newyear.js.map +1 -0
- package/maps/js/plane.js.map +1 -0
- package/maps/js/plugins/aplayer.js.map +1 -0
- package/maps/js/plugins/parallax.js.map +1 -0
- package/maps/js/plugins/rightMenus.js.map +1 -0
- package/maps/js/plugins/tags/contributors.js.map +1 -0
- package/maps/js/plugins/tags/friends.js.map +1 -0
- package/maps/js/plugins/tags/sites.js.map +1 -0
- package/maps/js/search/algolia.js.map +1 -0
- package/maps/js/search/hexo.js.map +1 -0
- package/maps/js/search/meilisearch.js.map +1 -0
- package/maps/js/txmap.js.map +1 -0
- package/maps/sw.js.map +1 -0
- package/maps/weichuncai/css/style.css.map +1 -0
- package/maps/weichuncai/js/common.js.map +1 -0
- package/maps/weichuncai/js/jquery.js.map +1 -0
- package/maps/weichuncai/wcc-config.js.map +1 -0
- package/music/index.html +1 -1
- package/package.json +1 -1
- package/page/2/index.html +1 -1
- package/page/3/index.html +1 -1
- package/page/4/index.html +1 -1
- package/page/5/index.html +1 -0
- package/posts/10021/index.html +5 -1
- package/posts/10045/index.html +1 -1
- package/posts/10733/index.html +1 -1
- package/posts/10996/index.html +5 -1
- package/posts/12779/index.html +1 -1
- package/posts/13624/index.html +1 -1
- package/posts/15688/index.html +1 -1
- package/posts/15748/index.html +5 -1
- package/posts/15799/index.html +1 -1
- package/posts/15842/index.html +5 -1
- package/posts/16107/index.html +1 -1
- package/posts/18063/index.html +1 -1
- package/posts/20412/index.html +1 -1
- package/posts/21375/index.html +1 -1
- package/posts/22945/index.html +4 -1
- package/posts/23021/index.html +1 -1
- package/posts/27531/index.html +5 -1
- package/posts/28536/index.html +1 -1
- package/posts/28733/index.html +1 -1
- package/posts/29196/index.html +1 -1
- package/posts/38917/index.html +1 -1
- package/posts/38964/index.html +1 -1
- package/posts/42487/index.html +1 -1
- package/posts/42580/index.html +1 -1
- package/posts/45875/index.html +1 -1
- package/posts/46640/index.html +1 -1
- package/posts/48762/index.html +1 -1
- package/posts/50710/index.html +1 -1
- package/posts/52677/index.html +1 -1
- package/posts/53662/index.html +1 -1
- package/posts/54386/index.html +1 -1
- package/posts/54481/index.html +1 -1
- package/posts/54787/index.html +5 -1
- package/posts/56467/index.html +1 -1
- package/posts/57692/index.html +1 -1
- package/posts/58203/index.html +1 -1
- package/posts/61417/index.html +1 -1
- package/posts/61712/index.html +1 -0
- package/posts/646/index.html +1 -1
- package/posts/64856/index.html +1 -1
- package/posts/64935/index.html +1 -1
- package/search.xml +256 -343
- package/seas/index.html +1 -1
- package/sw.js +2 -1
- package/tags/Flash/347/233/270/345/205/263/index.html +1 -1
- package/tags/Steam/346/270/270/346/210/217/index.html +1 -1
- package/tags/Windows/350/275/257/344/273/266/index.html +1 -1
- package/tags/index.html +1 -1
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
- package/tags//345/205/266/345/256/203/346/270/270/346/210/217/index.html +1 -1
- package/tags//345/212/240/350/275/275/345/212/250/347/224/273/index.html +1 -1
- package/tags//346/202/254/346/265/256/345/256/240/347/211/251-/347/234/213/346/235/277/345/250/230/index.html +1 -1
- package/tags//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
- package/tags//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
- package/tags//347/253/231/347/202/271/345/272/225/351/203/250/351/255/224/346/224/271/index.html +1 -1
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
- package/tags//350/207/252/345/273/272/351/203/250/347/275/262/index.html +1 -1
- package/tags//351/241/265/351/235/242/351/255/224/346/224/271/index.html +1 -1
- package/tags//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
- package/update/index.html +1 -1
- package/weichuncai/css/style.css +2 -1
- package/weichuncai/js/common.js +2 -1
- package/weichuncai/js/jquery.js +2 -1
- package/weichuncai/wcc-config.js +2 -1
- package/css/index.css +0 -1
- package/css/plugins/bootstrap.min.css +0 -6
- package/css/plugins/bootstrap.row.css +0 -1
- package/css/plugins/font-awesome.min.css +0 -1
- package/failure.ico +0 -0
- package/fonts/webfonts/fa-brands-400.woff2 +0 -0
- package/fonts/webfonts/fa-regular-400.woff2 +0 -0
- package/fonts/webfonts/fa-solid-900.woff2 +0 -0
- package/img/404.jpg +0 -0
- package/img/avatar.jpg +0 -0
- package/img/banner.png +0 -0
- package/img/block.jpg +0 -0
- package/img/favicon.svg +0 -39
- package/js/main.js +0 -1
- package/js/plugins/danmu.js +0 -1
- package/js/plugins/local_search.js +0 -1
- package/js/plugins/typing.js +0 -1
- package/serviceworker.js +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).LazyLoad=t()}(this,(function(){"use strict";function n(){return(n=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n}).apply(this,arguments)}var t="undefined"!=typeof window,e=t&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),i=t&&"IntersectionObserver"in window,a=t&&"classList"in document.createElement("p"),o=t&&window.devicePixelRatio>1,r={elements_selector:".lazy",container:e||t?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1},c=function(t){return n({},r,t)},l=function(n,t){var e,i=new n(t);try{e=new CustomEvent("LazyLoad::Initialized",{detail:{instance:i}})}catch(n){(e=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:i})}window.dispatchEvent(e)},s=function(n,t){return n.getAttribute("data-"+t)},u=function(n,t,e){var i="data-"+t;null!==e?n.setAttribute(i,e):n.removeAttribute(i)},d=function(n){return s(n,"ll-status")},f=function(n,t){return u(n,"ll-status",t)},_=function(n){return f(n,null)},g=function(n){return null===d(n)},v=function(n){return"native"===d(n)},p=["loading","loaded","applied","error"],b=function(n,t,e,i){n&&(void 0===i?void 0===e?n(t):n(t,e):n(t,e,i))},h=function(n,t){a?n.classList.add(t):n.className+=(n.className?" ":"")+t},m=function(n,t){a?n.classList.remove(t):n.className=n.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},E=function(n){return n.llTempImage},I=function(n,t){if(t){var e=t._observer;e&&e.unobserve(n)}},y=function(n,t){n&&(n.loadingCount+=t)},A=function(n,t){n&&(n.toLoadCount=t)},L=function(n){for(var t,e=[],i=0;t=n.children[i];i+=1)"SOURCE"===t.tagName&&e.push(t);return e},w=function(n,t,e){e&&n.setAttribute(t,e)},z=function(n,t){n.removeAttribute(t)},k=function(n){return!!n.llOriginalAttrs},O=function(n){if(!k(n)){var t={};t.src=n.getAttribute("src"),t.srcset=n.getAttribute("srcset"),t.sizes=n.getAttribute("sizes"),n.llOriginalAttrs=t}},C=function(n){if(k(n)){var t=n.llOriginalAttrs;w(n,"src",t.src),w(n,"srcset",t.srcset),w(n,"sizes",t.sizes)}},N=function(n,t){w(n,"sizes",s(n,t.data_sizes)),w(n,"srcset",s(n,t.data_srcset)),w(n,"src",s(n,t.data_src))},x=function(n){z(n,"src"),z(n,"srcset"),z(n,"sizes")},M=function(n,t){var e=n.parentNode;e&&"PICTURE"===e.tagName&&L(e).forEach(t)},R=function(n,t){L(n).forEach(t)},G={IMG:function(n,t){M(n,(function(n){O(n),N(n,t)})),O(n),N(n,t)},IFRAME:function(n,t){w(n,"src",s(n,t.data_src))},VIDEO:function(n,t){R(n,(function(n){w(n,"src",s(n,t.data_src))})),w(n,"poster",s(n,t.data_poster)),w(n,"src",s(n,t.data_src)),n.load()}},T=function(n,t){var e=G[n.tagName];e&&e(n,t)},D=function(n,t,e){y(e,1),h(n,t.class_loading),f(n,"loading"),b(t.callback_loading,n,e)},F={IMG:function(n,t){u(n,t.data_src,null),u(n,t.data_srcset,null),u(n,t.data_sizes,null),M(n,(function(n){u(n,t.data_srcset,null),u(n,t.data_sizes,null)}))},IFRAME:function(n,t){u(n,t.data_src,null)},VIDEO:function(n,t){u(n,t.data_src,null),u(n,t.data_poster,null),R(n,(function(n){u(n,t.data_src,null)}))}},V=function(n,t){u(n,t.data_bg_multi,null),u(n,t.data_bg_multi_hidpi,null)},j=function(n,t){var e=F[n.tagName];e?e(n,t):function(n,t){u(n,t.data_bg,null),u(n,t.data_bg_hidpi,null)}(n,t)},P=["IMG","IFRAME","VIDEO"],S=function(n,t){!t||function(n){return n.loadingCount>0}(t)||function(n){return n.toLoadCount>0}(t)||b(n.callback_finish,t)},U=function(n,t,e){n.addEventListener(t,e),n.llEvLisnrs[t]=e},$=function(n,t,e){n.removeEventListener(t,e)},q=function(n){return!!n.llEvLisnrs},H=function(n){if(q(n)){var t=n.llEvLisnrs;for(var e in t){var i=t[e];$(n,e,i)}delete n.llEvLisnrs}},B=function(n,t,e){!function(n){delete n.llTempImage}(n),y(e,-1),function(n){n&&(n.toLoadCount-=1)}(e),m(n,t.class_loading),t.unobserve_completed&&I(n,e)},J=function(n,t,e){var i=E(n)||n;q(i)||function(n,t,e){q(n)||(n.llEvLisnrs={});var i="VIDEO"===n.tagName?"loadeddata":"load";U(n,i,t),U(n,"error",e)}(i,(function(a){!function(n,t,e,i){var a=v(t);B(t,e,i),h(t,e.class_loaded),f(t,"loaded"),j(t,e),b(e.callback_loaded,t,i),a||S(e,i)}(0,n,t,e),H(i)}),(function(a){!function(n,t,e,i){var a=v(t);B(t,e,i),h(t,e.class_error),f(t,"error"),b(e.callback_error,t,i),a||S(e,i)}(0,n,t,e),H(i)}))},K=function(n,t,e){!function(n){n.llTempImage=document.createElement("IMG")}(n),J(n,t,e),function(n,t,e){var i=s(n,t.data_bg),a=s(n,t.data_bg_hidpi),r=o&&a?a:i;r&&(n.style.backgroundImage='url("'.concat(r,'")'),E(n).setAttribute("src",r),D(n,t,e))}(n,t,e),function(n,t,e){var i=s(n,t.data_bg_multi),a=s(n,t.data_bg_multi_hidpi),r=o&&a?a:i;r&&(n.style.backgroundImage=r,function(n,t,e){h(n,t.class_applied),f(n,"applied"),V(n,t),t.unobserve_completed&&I(n,t),b(t.callback_applied,n,e)}(n,t,e))}(n,t,e)},Q=function(n,t,e){!function(n){return P.indexOf(n.tagName)>-1}(n)?K(n,t,e):function(n,t,e){J(n,t,e),T(n,t),D(n,t,e)}(n,t,e)},W=["IMG","IFRAME"],X=function(n){return n.use_native&&"loading"in HTMLImageElement.prototype},Y=function(n,t,e){n.forEach((function(n){return function(n){return n.isIntersecting||n.intersectionRatio>0}(n)?function(n,t,e,i){f(n,"entered"),function(n,t,e){t.unobserve_entered&&I(n,e)}(n,e,i),b(e.callback_enter,n,t,i),function(n){return p.indexOf(d(n))>=0}(n)||Q(n,e,i)}(n.target,n,t,e):function(n,t,e,i){g(n)||(function(n,t,e,i){e.cancel_on_exit&&function(n){return"loading"===d(n)}(n)&&"IMG"===n.tagName&&(H(n),function(n){M(n,(function(n){x(n)})),x(n)}(n),function(n){M(n,(function(n){C(n)})),C(n)}(n),m(n,e.class_loading),y(i,-1),_(n),b(e.callback_cancel,n,t,i))}(n,t,e,i),b(e.callback_exit,n,t,i))}(n.target,n,t,e)}))},Z=function(n){return Array.prototype.slice.call(n)},nn=function(n){return n.container.querySelectorAll(n.elements_selector)},tn=function(n){return function(n){return"error"===d(n)}(n)},en=function(n,t){return function(n){return Z(n).filter(g)}(n||nn(t))},an=function(n,e){var a=c(n);this._settings=a,this.loadingCount=0,function(n,t){i&&!X(n)&&(t._observer=new IntersectionObserver((function(e){Y(e,n,t)}),function(n){return{root:n.container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}}(n)))}(a,this),function(n,e){t&&window.addEventListener("online",(function(){!function(n,t){var e;(e=nn(n),Z(e).filter(tn)).forEach((function(t){m(t,n.class_error),_(t)})),t.update()}(n,e)}))}(a,this),this.update(e)};return an.prototype={update:function(n){var t,a,o=this._settings,r=en(n,o);A(this,r.length),!e&&i?X(o)?function(n,t,e){n.forEach((function(n){-1!==W.indexOf(n.tagName)&&(n.setAttribute("loading","lazy"),function(n,t,e){J(n,t,e),T(n,t),j(n,t),f(n,"native")}(n,t,e))})),A(e,0)}(r,o,this):(a=r,function(n){n.disconnect()}(t=this._observer),function(n,t){t.forEach((function(t){n.observe(t)}))}(t,a)):this.loadAll(r)},destroy:function(){this._observer&&this._observer.disconnect(),nn(this._settings).forEach((function(n){delete n.llOriginalAttrs})),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(n){var t=this,e=this._settings;en(n,e).forEach((function(n){I(n,t),Q(n,e,t)}))}},an.load=function(n,t){var e=c(t);Q(n,e)},an.resetStatus=function(n){_(n)},t&&function(n,t){if(t)if(t.length)for(var e,i=0;e=t[i];i+=1)l(n,e);else l(n,t)}(an,window.lazyLoadOptions),an}));
|
@@ -0,0 +1,2 @@
|
|
1
|
+
.iziToast-capsule{font-size:0;height:0;width:100%;transform:translateZ(0);backface-visibility:hidden;transition:transform .5s cubic-bezier(.25,.8,.25,1),height .5s cubic-bezier(.25,.8,.25,1)}.iziToast-capsule,.iziToast-capsule *{box-sizing:border-box}.iziToast-overlay{display:block;position:fixed;top:-100px;left:0;right:0;bottom:-100px;z-index:997}.iziToast{display:inline-block;clear:both;position:relative;font-family:Lato,Tahoma,Arial;font-size:14px;padding:8px 45px 9px 0;background:rgba(238,238,238,.9);border-color:rgba(238,238,238,.9);width:100%;pointer-events:all;cursor:default;transform:translateX(0);-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:54px}.iziToast>.iziToast-progressbar{position:absolute;left:0;bottom:0;width:100%;z-index:1;background:rgba(255,255,255,.2)}.iziToast>.iziToast-progressbar>div{height:2px;width:100%;background:rgba(0,0,0,.3);border-radius:0 0 3px 3px}.iziToast.iziToast-balloon:before{content:'';position:absolute;right:8px;left:auto;width:0;height:0;top:100%;border-right:0 solid transparent;border-left:15px solid transparent;border-top:10px solid #000;border-top-color:inherit;border-radius:0}.iziToast.iziToast-balloon .iziToast-progressbar{top:0;bottom:auto}.iziToast.iziToast-balloon>div{border-radius:0 0 0 3px}.iziToast>.iziToast-cover{position:absolute;left:0;top:0;bottom:0;height:100%;margin:0;background-size:100%;background-position:50% 50%;background-repeat:no-repeat;background-color:rgba(0,0,0,.1)}.iziToast>.iziToast-close{position:absolute;right:0;top:0;border:0;padding:0;opacity:.6;width:42px;height:100%;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAJPAAACTwBcGfW0QAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAD3SURBVFiF1ZdtDoMgDEBfdi4PwAX8vLFn0qT7wxantojKupmQmCi8R4tSACpgjC2ICCUbEBa8ingjsU1AXRBeR8aLN64FiknswN8CYefBBDQ3whuFESy7WyQMeC0ipEI0A+0FeBvHUFN8xPaUhAH/iKoWsnXHGegy4J0yxialOfaHJAz4bhRzQzgDvdGnz4GbAonZbCQMuBm1K/kcFu8Mp1N2cFFpsxsMuJqqbIGExGl4loARajU1twskJLLhIsID7+tvUoDnIjTg5T9DPH9EBrz8rxjPzciAl9+O8SxI8CzJ8CxKFfh3ynK8Dyb8wNHM/XDqejx/AtNyPO87tNybAAAAAElFTkSuQmCC) no-repeat 50% 50%;background-size:8px;cursor:pointer;outline:0}.iziToast>.iziToast-close:hover{opacity:1}.iziToast>.iziToast-body{position:relative;padding:0 0 0 10px;height:auto;min-height:36px;margin:0 0 0 15px;text-align:left}.iziToast>.iziToast-body:after{content:"";display:table;clear:both}.iziToast>.iziToast-body .iziToast-texts{margin:10px 0 0;padding-right:2px;display:inline-block;float:left}.iziToast>.iziToast-body .iziToast-inputs{min-height:19px;float:left;margin:3px -2px}.iziToast>.iziToast-body .iziToast-inputs>input:not([type=checkbox]):not([type=radio]),.iziToast>.iziToast-body .iziToast-inputs>select{position:relative;display:inline-block;margin:2px;border-radius:2px;border:0;padding:4px 7px;font-size:13px;letter-spacing:.02em;background:rgba(0,0,0,.1);color:#000;box-shadow:0 0 0 1px rgba(0,0,0,.2);min-height:26px}.iziToast>.iziToast-body .iziToast-inputs>input:not([type=checkbox]):not([type=radio]):focus,.iziToast>.iziToast-body .iziToast-inputs>select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.6)}.iziToast>.iziToast-body .iziToast-buttons{min-height:17px;float:left;margin:4px -2px}.iziToast>.iziToast-body .iziToast-buttons>a,.iziToast>.iziToast-body .iziToast-buttons>button,.iziToast>.iziToast-body .iziToast-buttons>input:not([type=checkbox]):not([type=radio]){position:relative;display:inline-block;margin:2px;border-radius:2px;border:0;padding:5px 10px;font-size:12px;letter-spacing:.02em;cursor:pointer;background:rgba(0,0,0,.1);color:#000}.iziToast>.iziToast-body .iziToast-buttons>a:hover,.iziToast>.iziToast-body .iziToast-buttons>button:hover,.iziToast>.iziToast-body .iziToast-buttons>input:not([type=checkbox]):not([type=radio]):hover{background:rgba(0,0,0,.2)}.iziToast>.iziToast-body .iziToast-buttons>a:focus,.iziToast>.iziToast-body .iziToast-buttons>button:focus,.iziToast>.iziToast-body .iziToast-buttons>input:not([type=checkbox]):not([type=radio]):focus{box-shadow:0 0 0 1px rgba(0,0,0,.6)}.iziToast>.iziToast-body .iziToast-buttons>a:active,.iziToast>.iziToast-body .iziToast-buttons>button:active,.iziToast>.iziToast-body .iziToast-buttons>input:not([type=checkbox]):not([type=radio]):active{top:1px}.iziToast>.iziToast-body .iziToast-icon{position:absolute;left:0;top:50%;display:table;font-size:23px;line-height:24px;margin-top:-12px;color:#000;width:24px;height:24px}.iziToast>.iziToast-body .iziToast-icon.ico-info{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCtoPsAAAAKXRSTlMA6PsIvDob+OapavVhWRYPrIry2MxGQ97czsOzpJaMcE0qJQOwVtKjfxCVFeIAAAI3SURBVFjDlJPZsoIwEETnCiGyb8q+qmjl/3/wFmGKwjBROS9QWbtnOqDDGPq4MdMkSc0m7gcDDhF4NRdv8NoL4EcMpzoJglPl/KTDz4WW3IdvXEvxkfIKn7BMZb1bFK4yZFqghZ03jk0nG8N5NBwzx9xU5cxAg8fXi20/hDdC316lcA8o7t16eRuQvW1XGd2d2P8QSHQDDbdIII/9CR3lUF+lbucfJy4WfMS64EJPORnrZxtfc2pjJdnbuags3l04TTtJMXrdTph4Pyg4XAjugAJqMDf5Rf+oXx2/qi4u6nipakIi7CsgiuMSEF9IGKg8heQJKkxIfFSUU/egWSwNrS1fPDtLfon8sZOcYUQml1Qv9a3kfwsEUyJEMgFBKzdV8o3Iw9yAjg1jdLQCV4qbd3no8yD2GugaC3oMbF0NYHCpJYSDhNI5N2DAWB4F4z9Aj/04Cna/x7eVAQ17vRjQZPh+G/kddYv0h49yY4NWNDWMMOMUIRYvlTECmrN8pUAjo5RCMn8KoPmbJ/+Appgnk//Sy90GYBCGgm7IAskQ7D9hFKW4ApB1ei3FSYD9PjGAKygAV+ARFYBH5BsVgG9kkBSAQWKUFYBRZpkUgGVinRWAdUZQDABBQdIcAElDVBUAUUXWHQBZx1gMAGMprM0AsLbVXHsA5trZe93/wp3svQ0YNb/jWV3AIOLsMtlznSNOH7JqjOpDVh7z8qCZR10ftvO4nxeOvPLkpSuvfXnxzKtvXr7j+v8C5ii0e71At7cAAAAASUVORK5CYII=) no-repeat 50% 50%;background-size:85%}.iziToast>.iziToast-body .iziToast-icon.ico-warning{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAMAAAAPzWOAAAAAkFBMVEUAAAAAAAABAAIAAAABAAIAAAMAAAABAAIBAAIBAAIAAAIAAAABAAIAAAABAAICAAICAAIAAAIAAAAAAAAAAAABAAIBAAIAAAMAAAABAAIBAAMBAAECAAIAAAIAAAIAAAABAAIBAAIBAAMBAAIBAAEAAAIAAAMAAAAAAAABAAECAAICAAIAAAIAAAMAAAQAAAE05yNAAAAAL3RSTlMAB+kD7V8Q+PXicwv7I9iYhkAzJxnx01IV5cmnk2xmHfzexsK4eEw5L7Gei39aRw640awAAAHQSURBVFjD7ZfJdoJAEEWJgCiI4oDiPM8m7///LidErRO7sHrY5u7YXLr7vKqu9kTC0HPmo9n8cJbEQOzqqAdAUHeUZACQuTkGDQBoDJwkHZR0XBz9FkpafXuHP0SJ09mGeJLZ5wwlTmcbA0THPmdEK7XPGTG1zxmInn3OiJ19zkB0jSVTKExMHT0wjAwlWzC0fSPHF1gWRpIhWMYm7fYTFcQGlbemf4dFfdTGg0B/KXM8qBU/3wntbq7rSGqvJ9kla6IpueFJet8fxfem5yhykjyOgNaWF1qSGd5JMNNxpNF7SZQaVh5JzLrTCZIEJ1GyEyVyd+pClMjdaSJK5O40giSRu5PfFiVyd1pAksjdKRnrSsbVdbiHrgT7yss315fkVQPLFQrL+4FHeOXKO5YRFEKv5AiFaMlKLlBpJuVCJlC5sJfvCgztru/3NmBYccPgGTxRAzxn1XGEMUf58pXZvjoOsOCgjL08+b53mtfAM/SVsZcjKLtysQZPqIy9HPP3m/3zKItRwT0LyQo8sTr26tcO83DIUMWIJjierHLsJda/tbNBFY0BP/bKtcM8HNIWCK3aYR4OMzgxo5w5EFLOLKDExXAm9gI4E3iAO94/Ct/lKWuM2LMGbgAAAABJRU5ErkJggg==) no-repeat 50% 50%;background-size:85%}.iziToast>.iziToast-body .iziToast-icon.ico-error{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAeFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVyEiIAAAAJ3RSTlMA3BsB98QV8uSyWVUFz7+kcWMM2LuZioBpTUVBNcq2qaibj4d1azLZZYABAAACZElEQVRYw7WX25KCMAyGAxUoFDkpiohnV97/DXeGBtoOUprZ2dyo1K82fxKbwJJVp+KQZ7so2mX5oThVQLKwjDe9YZu4DF3ptAn6rxY0qQPOEq9fNC9ha3y77a22ba24v+9Xbe8v8x03dPOC2/NdvB6xeSreLfGJpnx0TyotKqLm2s7Jd/WO6ivXNp0tCy02R/aFz5VQ5wUPlUL5fIfj5KIlVGU0nWHm/5QtoTVMWY8mzIVu1K9O7XH2JiU/xnOOT39gnUfj+lFHddx4tFjL3/H8jjzaFCy2Rf0c/fdQyQszI8BDR973IyMSKa4krjxAiW/lkRvMP+bKK9WbYS1ASQg8dKjaUGlYPwRe/WoIkz8tiQchH5QAEMv6T0k8MD4mUyWr4E7jAWqZ+xWcMIYkXvlwggJ3IvFK+wIOcpXAo8n8P0COAaXyKH4OsjBuZB4ew0IGu+H1SebhNazsQBbWm8yj+hFuUJB5eMsN0IUXmYendAFFfJB5uEkRMYwxmcd6zDGRtmQePEykAgubymMRFmMxCSIPCRbTuFNN5OGORTjmNGc0Po0m8Uv0gcCry6xUhR2QeLii9tofbEfhz/qvNti+OfPqNm2Mq6105FUMvdT4GPmufMiV8PqBMkc+DdT1bjYYbjzU/ew23VP4n3mLAz4n8Jtv/Ui3ceTT2mzz5o1mZt0gnBpmsdjqRqVlmplcPdqa7X23kL9brdm2t/uBYDPn2+tyu48mtIGD10JTuUrukVrbCFiwDzcHrPjxKt7PW+AZQyT/WESO+1WL7f3o+WLHL2dYMSZsg6dg/z360ofvP4//v1NPzgs28WlWAAAAAElFTkSuQmCC) no-repeat 50% 50%;background-size:80%}.iziToast>.iziToast-body .iziToast-icon.ico-success{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAIVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABt0UjBAAAACnRSTlMApAPhIFn82wgGv8mVtwAAAKVJREFUSMft0LEJAkEARNFFFEw1NFJb8CKjAy1AEOzAxNw+bEEEg6nyFjbY4LOzcBwX7S/gwUxoTdIn+Jbv4Lv8bx446+kB6VsBtK0B+wbMCKxrwL33wOrVeeChX28n7KTOTjgoEu6DRSYAgAAAAkAmAIAAAAIACQIkMkACAAgAIACAyECBKAOJuCagTJwSUCaUAEMAABEBRwAAEQFLbCJgO4bW+AZKGnktR+jAFAAAAABJRU5ErkJggg==) no-repeat 50% 50%;background-size:85%}.iziToast>.iziToast-body .iziToast-icon.ico-question{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhCQkUEhFovxTxAAAEDklEQVRo3s2ZTWgTQRTHf03ipTRUqghNSgsRjHgQrFUQC6JgD1Kak3gQUUoPqRdBglf1oBehBws9Cn4cGk+1SOmh2upBxAYVoeJHrR9tgq0i1Cq0lqYeks7MbpPdmU00/c8hm9n33v/t7Nt5M2+qMEWQI0QIibZKRrQpHvLL2KI2wnQzzBKrDm2RIeKEy01dTYKUI7G1ZRknQXV5yP10kTYgly1NF/5S6duZ8ES+1iZodyaocrjXxE0OFeifYYgp0mRIkwFChAkRJsIxGgrIP+I0n82fvZW5dc/zkss0O2o1c5mX6/TmaDWl77RFe5YkUW3tKEmyFv0lOvXJ/fTYnmCEFuMRbGHEZqVHLyT9DFjUJmkzJl9DG5MWWwM6Llif/gF1nukB6nhgGwUXdFrE+wiURA8QoM9i0zEWWpXQW+ZsyeRrOMuyEo5Fv4gmy4dXPvqcC+pH2VRYaMwy+OWG+iLGCgm0W0Kv9HdvR8ASjmKCXpuK/bxiV/76A/v5UdDIZuKcJGjrnec5KZ7wwsWFOp6xPX/9mt2sqDe7FO+Kf/fXHBPPDWpdXGhTpLvUG9VKwh1xMDDjkvu+cNDFBTk7ptX1QkKZ850m3duu6fcrWxwdaFFyREJ2j4vOpKP6Du6z4uJCv8sYJIVkCnJBGGZaBONO3roY2EqNrSfIPi7SKP4fdXyNUd6I6wbSAHEl33tFLe+FlSsusnK90A0+oEPcuufZgXnOi+u9LrKSJQZQw6LwqBnv2CKsfHORbFbyQhA6xN/pEuihSdj56Co7LWRjPiKie6gkB2LiKuUqK5kiPkLiz1QJ9K1cNXBAMoUCigNpQ9IqDtMI1HKA4/jyvUsaoSyZLA5kjOjDPFZen8Ql5TsvBskUgjciIPSX3QAXC86DT7VWvlEh/xZ+ij9BDVWJ0QL0SbZq6QaFxoLPcXPmBLveLCc4wXdDK6s+6/vwhCSniFLPXW0NJe5UB8zKCsviqpc7vGPVQFcyZbyPwGD+d5ZnxmNWlhG4xSBZZjivjIWHEQgoDkSMjMwTo54569JSE5IpA7EyJSMTyGTUAUFlO1ZKOtaHTMeL1PhYYFTcihmY2cQ5+ullj7EDkiVfVez2sCTz8yiv84djhg7IJVk81xFWJlPdfHBG0flkRC/zQFZ+DSllNtfDdUsOMCliyGX5uOzU3ZhIXFDof4m1gDuKbEx0t2YS25gVGpcMnr/I1kx3c6piB8P8ZoqEwfMX3ZyCXynJTmq/U7NUXqfUzCbWL1wqVKBQUeESzQYoUlW8TAcVL1RCxUu1G6BYXfFyfQ4VPbDI4T8d2WzgQ6sc/vmxnTsqfHCZQzUJxm1h5dxS5Tu6lQgTZ0ipqRVqSwzTbbLHMt+c19iO76tsx/cLZub+Ali+tYC93olEAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA5LTA5VDIwOjE4OjE3KzAyOjAwjKtfjgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wOS0wOVQyMDoxODoxNyswMjowMP325zIAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC) no-repeat 50% 50%;background-size:85%}.iziToast>.iziToast-body .iziToast-message,.iziToast>.iziToast-body .iziToast-title{padding:0;font-size:14px;line-height:16px;text-align:left;float:left;white-space:normal}.iziToast>.iziToast-body .iziToast-title{color:#000;margin:0}.iziToast>.iziToast-body .iziToast-message{margin:0 0 10px;color:rgba(0,0,0,.6)}.iziToast.iziToast-animateInside .iziToast-buttons-child,.iziToast.iziToast-animateInside .iziToast-icon,.iziToast.iziToast-animateInside .iziToast-inputs-child,.iziToast.iziToast-animateInside .iziToast-message,.iziToast.iziToast-animateInside .iziToast-title{opacity:0}.iziToast-target{position:relative;width:100%;margin:0 auto}.iziToast-target .iziToast-capsule{overflow:hidden}.iziToast-target .iziToast-capsule:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.iziToast-target .iziToast-capsule .iziToast{width:100%;float:left}.iziToast-wrapper{z-index:99999;position:fixed;width:100%;pointer-events:none;display:flex;flex-direction:column}.iziToast-wrapper .iziToast.iziToast-balloon:before{border-right:0 solid transparent;border-left:15px solid transparent;border-top:10px solid #000;border-top-color:inherit;right:8px;left:auto}.iziToast-wrapper-bottomLeft{left:0;bottom:0;text-align:left}.iziToast-wrapper-bottomLeft .iziToast.iziToast-balloon:before,.iziToast-wrapper-topLeft .iziToast.iziToast-balloon:before{border-right:15px solid transparent;border-left:0 solid transparent;right:auto;left:8px}.iziToast-wrapper-bottomRight{right:0;bottom:0;text-align:right}.iziToast-wrapper-topLeft{left:0;top:0;text-align:left}.iziToast-wrapper-topRight{top:0;right:0;text-align:right}.iziToast-wrapper-topCenter{top:0;left:0;right:0;text-align:center}.iziToast-wrapper-bottomCenter,.iziToast-wrapper-center{bottom:0;left:0;right:0;text-align:center}.iziToast-wrapper-center{top:0;justify-content:center;flex-flow:column;align-items:center}.iziToast-rtl{direction:rtl;padding:8px 0 9px 45px;font-family:Tahoma,Lato,Arial}.iziToast-rtl .iziToast-cover{left:auto;right:0}.iziToast-rtl .iziToast-close{right:auto;left:0}.iziToast-rtl .iziToast-body{padding:0 10px 0 0;margin:0 16px 0 0;text-align:right}.iziToast-rtl .iziToast-body .iziToast-buttons,.iziToast-rtl .iziToast-body .iziToast-inputs,.iziToast-rtl .iziToast-body .iziToast-message,.iziToast-rtl .iziToast-body .iziToast-texts,.iziToast-rtl .iziToast-body .iziToast-title{float:right;text-align:right}.iziToast-rtl .iziToast-body .iziToast-icon{left:auto;right:0}@media only screen and (min-width:568px){.iziToast-wrapper{padding:10px 15px}.iziToast{margin:5px 0;border-radius:3px;width:auto}.iziToast:after{content:'';z-index:-1;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:3px;box-shadow:inset 0 -10px 20px -10px rgba(0,0,0,.2),inset 0 0 5px rgba(0,0,0,.1),0 8px 8px -5px rgba(0,0,0,.25)}.iziToast:not(.iziToast-rtl) .iziToast-cover{border-radius:3px 0 0 3px}.iziToast.iziToast-rtl .iziToast-cover{border-radius:0 3px 3px 0}.iziToast.iziToast-color-dark:after{box-shadow:inset 0 -10px 20px -10px rgba(255,255,255,.3),0 10px 10px -5px rgba(0,0,0,.25)}.iziToast.iziToast-balloon .iziToast-progressbar{background:0 0}.iziToast.iziToast-balloon:after{box-shadow:0 10px 10px -5px rgba(0,0,0,.25),inset 0 10px 20px -5px rgba(0,0,0,.25)}.iziToast-target .iziToast:after{box-shadow:inset 0 -10px 20px -10px rgba(0,0,0,.2),inset 0 0 5px rgba(0,0,0,.1)}}.iziToast.iziToast-theme-dark{background:#565c70;border-color:#565c70}.iziToast.iziToast-theme-dark .iziToast-title{color:#fff}.iziToast.iziToast-theme-dark .iziToast-message{color:rgba(255,255,255,.7);font-weight:300}.iziToast.iziToast-theme-dark .iziToast-close{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfgCR4OIQIPSao6AAAAwElEQVRIx72VUQ6EIAwFmz2XB+AConhjzqTJ7JeGKhLYlyx/BGdoBVpjIpMJNjgIZDKTkQHYmYfwmR2AfAqGFBcO2QjXZCd24bEggvd1KBx+xlwoDpYmvnBUUy68DYXD77ESr8WDtYqvxRex7a8oHP4Wo1Mkt5I68Mc+qYqv1h5OsZmZsQ3gj/02h6cO/KEYx29hu3R+VTTwz6D3TymIP1E8RvEiiVdZfEzicxYLiljSxKIqlnW5seitTW6uYnv/Aqh4whX3mEUrAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE2LTA5LTMwVDE0OjMzOjAyKzAyOjAwl6RMVgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNi0wOS0zMFQxNDozMzowMiswMjowMOb59OoAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC) no-repeat 50% 50%;background-size:8px}.iziToast.iziToast-theme-dark .iziToast-icon{color:#fff}.iziToast.iziToast-theme-dark .iziToast-icon.ico-info{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////vroaSAAAAKXRSTlMA6PsIvDob+OapavVhWRYPrIry2MxGQ97czsOzpJaMcE0qJQOwVtKjfxCVFeIAAAI3SURBVFjDlJPZsoIwEETnCiGyb8q+qmjl/3/wFmGKwjBROS9QWbtnOqDDGPq4MdMkSc0m7gcDDhF4NRdv8NoL4EcMpzoJglPl/KTDz4WW3IdvXEvxkfIKn7BMZb1bFK4yZFqghZ03jk0nG8N5NBwzx9xU5cxAg8fXi20/hDdC316lcA8o7t16eRuQvW1XGd2d2P8QSHQDDbdIII/9CR3lUF+lbucfJy4WfMS64EJPORnrZxtfc2pjJdnbuags3l04TTtJMXrdTph4Pyg4XAjugAJqMDf5Rf+oXx2/qi4u6nipakIi7CsgiuMSEF9IGKg8heQJKkxIfFSUU/egWSwNrS1fPDtLfon8sZOcYUQml1Qv9a3kfwsEUyJEMgFBKzdV8o3Iw9yAjg1jdLQCV4qbd3no8yD2GugaC3oMbF0NYHCpJYSDhNI5N2DAWB4F4z9Aj/04Cna/x7eVAQ17vRjQZPh+G/kddYv0h49yY4NWNDWMMOMUIRYvlTECmrN8pUAjo5RCMn8KoPmbJ/+Appgnk//Sy90GYBCGgm7IAskQ7D9hFKW4ApB1ei3FSYD9PjGAKygAV+ARFYBH5BsVgG9kkBSAQWKUFYBRZpkUgGVinRWAdUZQDABBQdIcAElDVBUAUUXWHQBZx1gMAGMprM0AsLbVXHsA5trZe93/wp3svQ0YNb/jWV3AIOLsMtlznSNOH7JqjOpDVh7z8qCZR10ftvO4nxeOvPLkpSuvfXnxzKtvXr7j+v8C5ii0e71At7cAAAAASUVORK5CYII=) no-repeat 50% 50%;background-size:85%}.iziToast.iziToast-theme-dark .iziToast-icon.ico-warning{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAMAAAAPzWOAAAAAllBMVEUAAAD////+//3+//3+//3///////z+//3+//3+//3////////////9//3////+//39//3///3////////////+//3+//39//3///z+//z+//7///3///3///3///3////////+//3+//3+//3+//z+//3+//7///3///z////////+//79//3///3///z///v+//3///+trXouAAAAMHRSTlMAB+j87RBf+PXiCwQClSPYhkAzJxnx05tSyadzcmxmHRbp5d7Gwrh4TDkvsYt/WkdQzCITAAAB1UlEQVRYw+3XaXKCQBCGYSIIighoxCVqNJrEPfly/8vFImKXduNsf/Mc4K1y7FnwlMLQc/bUbj85R6bA1LXRDICg6RjJcZa7NQYtnLUGTpERSiOXxrOPkv9s30iGKDmtbYir3H7OUHJa2ylAuvZzRvzUfs7Ii/2cgfTt54x82s8ZSM848gJmYtroQzA2jHwA+LkBIEuMGt+QIng1igzlyMrkuP2CyOi47axRaYTL5jhDJehoR+aovC29s3iIyly3Eb+hRCvZo2qsGTnhKr2cLDS+J73GsqBI9W80UCmWWpEuhIjh6ZRGjyNRarjzKGJ2Ou2himCvjHwqI+rTqQdlRH06TZQR9ek0hiqiPp06mV4ke7QPX6ERUZxO8Uo3sqrfhxvoRrCpvXwL/UjR9GRHMIvLgke4d5QbiwhM6JV2YKKF4vIl7XIBkwm4keryJVmvk/TfwcmPwQNkUQuyA2/sYGwnXL7GPu4bW1jYsmevrNj09/MGZMOEPXslQVqO8hqykD17JfPHP/bmo2yGGpdZiH3IZvzZa7B3+IdDjjpjesHJcvbs5dZ/e+cddVoDdvlq7x12Nac+iN7e4R8OXTjp0pw5CGnOLNDEzeBs5gVwFniAO+8f8wvfeXP2hyqnmwAAAABJRU5ErkJggg==) no-repeat 50% 50%;background-size:85%}.iziToast.iziToast-theme-dark .iziToast-icon.ico-error{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMA3BsB98QV8uSyWVUFz6RxYwzYvbupmYqAaU1FQTXKv7abj4d1azKNUit3AAACZElEQVRYw7WXaZOCMAyGw30UORRQBLxX/v8/3BkaWjrY2szO5otKfGrzJrEp6Kw6F8f8sI+i/SE/FucKSBaWiT8p5idlaEtnXTB9tKDLLHAvdSatOan3je93k9F2vRF36+mr1a6eH2NFNydoHq/ieU/UXcWjjk9XykdNWq2ywtp4tXL6Wb2T/MqtzzZutsrNyfvA51KoQROhVCjfrnASIRpSVUZiD5v4RbWExjRdJzSmOsZFvzYz59kRSr6V5zE+/QELHkNdb3VRx45HS1b1u+zfkkcbRAZ3qJ9l/A4qefHUDMShJe+6kZKJDD2pLQ9Q4lu+5Q7rz7Plperd7AtQEgIPI6o2dxr2D4GXvxqCiKcn8cD4gxIAEt7/GYkHL16KqeJd0NB4gJbXfgVnzCGJlzGcocCVSLzUvoAj9xJ4NF7/R8gxoVQexc/hgBpSebjPjgPs59cHmYfn7NkDb6wXmUf1I1ygIPPw4gtgCE8yDw8eAop4J/PQcBExjQmZx37MsZB2ZB4cLKQCG5vKYxMWSzMxIg8pNtOyUkvkocEmXGo69mh8FgnxS4yBwMvDrJSNHZB4uC3ayz/YkcIP4lflwVIT+OU07ZSjrbTkZQ6dTPkYubZ8GC/Cqxu6WvJZII93dcCw46GdNqdpTeF/tiMOuDGB9z/NI6NvyWetGPM0g+bVNeovBmamHXWj0nCbEaGeTMN2PWrqd6cM26ZxP2DeJvj+ph/30Zi/GmRbtlK5SptI+nwGGnvH6gUruT+L16MJHF+58rwNIifTV0vM8+hwMeOXAb6Yx0wXT+b999WXfvn+8/X/F7fWzjdTord5AAAAAElFTkSuQmCC) no-repeat 50% 50%;background-size:80%}.iziToast.iziToast-theme-dark .iziToast-icon.ico-success{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMApAPhIFn82wgGv8mVtwAAAKVJREFUSMft0LEJAkEARNFFFEw1NFJb8CKjAy1AEOzAxNw+bEEEg6nyFjbY4LOzcBwX7S/gwUxoTdIn+Jbv4Lv8bx446+kB6VsBtK0B+wbMCKxrwL33wOrVeeChX28n7KTOTjgoEu6DRSYAgAAAAkAmAIAAAAIACQIkMkACAAgAIACAyECBKAOJuCagTJwSUCaUAEMAABEBRwAAEQFLbCJgO4bW+AZKGnktR+jAFAAAAABJRU5ErkJggg==) no-repeat 50% 50%;background-size:85%}.iziToast.iziToast-theme-dark .iziToast-icon.ico-question{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhCQkUEg18vki+AAAETUlEQVRo3s1ZTWhbRxD+VlIuxsLFCYVIIQYVopBDoK5bKDWUBupDMNbJ5FBKg/FBziUQdE9yaC+FHBrwsdCfQ9RTGoLxwWl+DqHEojUFFydxnB9bInZDqOsErBrr6yGvs/ueX97bldTKo4Pe7puZb3Z33s7srIIjMY1jyCEjP6ImvyX8pF64arSHznKC06wzijY5xSKz7YbuYokV2lODsyyxqz3gSY6z6gCuqcpxJluFH+Z8U+D/0jyHoxFUBHgfvsGHIS9WMIUlVFFDFTUAGWSRQRY5HMeBEP6b+Ew9dh/7INd2jGeO59kfKdXP85zbIbfGQVf4sYC3N1hm3lo6zzIbPvk6x+zBk7wQGMEMB5xncIAzAS0XrFySSV72iS1yyBVcdA1x0afrsoUJgdFfY2+z8ADAXl7zz0KcwJiPfZKpVuABgClO+nRG+QIHDdfb4qlWwUXvKW4Z7vi6L4J9vg+vbfCeCeZH2RfOdMOc/HbCA4BvIW6EMQz7XK/ltd+hP+VzR9mgva2YSfyGI17fA7ynnocqeQNFfIJ0oHsdv6CC2+rXGBN6cQdveY3fcVRtmy/HDete+93zy8jA8zV7YkwYMrjHzRddRsCdiVCwwmh6wg9iTNC7Y9XIF1iS7kbUpsvvGEdPuTfSgAEjRpR096x0liPFD/Eqt2NMuBQzB2XhrACAApjFsuQFh9XdGAX70B3oSuNdnMVBaX+sopYxjwVpHFBVACyKTXNoktjD+6Ll8xhenS9MAAkAI/Lux2YNUOs4I413Ypg1SgEAu7kpFvWjaeJe0fJHDGe/cNaZBkekudw8PMA+0fMwlndZeAsJ5KR/qhUDUJCnSiyvRsolkJHGUgvjH8QXDgZopEzKMKDqCKrwEQ4C6MH7GEXC665buLJG8hlQc4LP4paxfJrOqYVYYY2UARfEIazTbgDg2dB98GebzJd54b8L/iWNdLyooeR6CHyZ+6xk0yKxkYg6nEVSUG4VJ9QJ9cxRCxO+9WiOyvgUeexXP1hLGH5nGuBWVtiSp4vqe3VP0UFWI9Wan4Er3v8q7jjPWVtm4FtcQQMrOKO2nOQCM5AyDMi56FDrKHA/1nyppS1ppBpYaE8wciEjGI2AaeM41kI4doDX4XiT3Qm1gevyruCgZg9P8xIv8m1nCzTKq6oiJ9xTMiZ505P5m8cdZ0CnZMVXHVljM7WMBzxpyDxygtdxoCEFTaMIWbZU85UvBjgUMYy0fBaAF8V1Lj9qWQ1aMZ5f4k9r+AGMSkMP1vZoZih6k6sicc5h/OFHM9vDqU/VIU7zJZdYYsKGH4g4nAJMGiXZRds1pVMoZ69RM5vfkbh0qkBhsnS2RLMLilQdL9MBHS9UAh0v1e6CYnXHy/WeeCcvLDwl/9OVze69tPKM+M+v7eJN6OzFpWdEF0ucDbhVNFXadnVrmJFlkVNGTS2M6pzmhMvltfPhnN2B63sVuL7fcNP3D1TSk2ihosPrAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA5LTA5VDIwOjE4OjEzKzAyOjAweOR7nQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wOS0wOVQyMDoxODoxMyswMjowMAm5wyEAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC) no-repeat 50% 50%;background-size:85%}.iziToast.iziToast-theme-dark .iziToast-buttons>a,.iziToast.iziToast-theme-dark .iziToast-buttons>button,.iziToast.iziToast-theme-dark .iziToast-buttons>input{color:#fff;background:rgba(255,255,255,.1)}.iziToast.iziToast-theme-dark .iziToast-buttons>a:hover,.iziToast.iziToast-theme-dark .iziToast-buttons>button:hover,.iziToast.iziToast-theme-dark .iziToast-buttons>input:hover{background:rgba(255,255,255,.2)}.iziToast.iziToast-theme-dark .iziToast-buttons>a:focus,.iziToast.iziToast-theme-dark .iziToast-buttons>button:focus,.iziToast.iziToast-theme-dark .iziToast-buttons>input:focus{box-shadow:0 0 0 1px rgba(255,255,255,.6)}.iziToast.iziToast-color-red{background:rgba(255,175,180,.9);border-color:rgba(255,175,180,.9)}.iziToast.iziToast-color-orange{background:rgba(255,207,165,.9);border-color:rgba(255,207,165,.9)}.iziToast.iziToast-color-yellow{background:rgba(255,249,178,.9);border-color:rgba(255,249,178,.9)}.iziToast.iziToast-color-blue{background:rgba(157,222,255,.9);border-color:rgba(157,222,255,.9)}.iziToast.iziToast-color-green{background:rgba(166,239,184,.9);border-color:rgba(166,239,184,.9)}.iziToast.iziToast-layout2 .iziToast-body .iziToast-message,.iziToast.iziToast-layout2 .iziToast-body .iziToast-texts{width:100%}.iziToast.iziToast-layout3{border-radius:2px}.iziToast.iziToast-layout3::after{display:none}.iziToast .revealIn,.iziToast.revealIn{-webkit-animation:iziT-revealIn 1s cubic-bezier(.25,1.6,.25,1) both;-moz-animation:iziT-revealIn 1s cubic-bezier(.25,1.6,.25,1) both;animation:iziT-revealIn 1s cubic-bezier(.25,1.6,.25,1) both}.iziToast .slideIn,.iziToast.slideIn{-webkit-animation:iziT-slideIn 1s cubic-bezier(.16,.81,.32,1) both;-moz-animation:iziT-slideIn 1s cubic-bezier(.16,.81,.32,1) both;animation:iziT-slideIn 1s cubic-bezier(.16,.81,.32,1) both}.iziToast.bounceInLeft{-webkit-animation:iziT-bounceInLeft .7s ease-in-out both;animation:iziT-bounceInLeft .7s ease-in-out both}.iziToast.bounceInRight{-webkit-animation:iziT-bounceInRight .85s ease-in-out both;animation:iziT-bounceInRight .85s ease-in-out both}.iziToast.bounceInDown{-webkit-animation:iziT-bounceInDown .7s ease-in-out both;animation:iziT-bounceInDown .7s ease-in-out both}.iziToast.bounceInUp{-webkit-animation:iziT-bounceInUp .7s ease-in-out both;animation:iziT-bounceInUp .7s ease-in-out both}.iziToast .fadeIn,.iziToast.fadeIn{-webkit-animation:iziT-fadeIn .5s ease both;animation:iziT-fadeIn .5s ease both}.iziToast.fadeInUp{-webkit-animation:iziT-fadeInUp .7s ease both;animation:iziT-fadeInUp .7s ease both}.iziToast.fadeInDown{-webkit-animation:iziT-fadeInDown .7s ease both;animation:iziT-fadeInDown .7s ease both}.iziToast.fadeInLeft{-webkit-animation:iziT-fadeInLeft .85s cubic-bezier(.25,.8,.25,1) both;animation:iziT-fadeInLeft .85s cubic-bezier(.25,.8,.25,1) both}.iziToast.fadeInRight{-webkit-animation:iziT-fadeInRight .85s cubic-bezier(.25,.8,.25,1) both;animation:iziT-fadeInRight .85s cubic-bezier(.25,.8,.25,1) both}.iziToast.flipInX{-webkit-animation:iziT-flipInX .85s cubic-bezier(.35,0,.25,1) both;animation:iziT-flipInX .85s cubic-bezier(.35,0,.25,1) both}.iziToast.fadeOut{-webkit-animation:iziT-fadeOut .7s ease both;animation:iziT-fadeOut .7s ease both}.iziToast.fadeOutDown{-webkit-animation:iziT-fadeOutDown .7s cubic-bezier(.4,.45,.15,.91) both;animation:iziT-fadeOutDown .7s cubic-bezier(.4,.45,.15,.91) both}.iziToast.fadeOutUp{-webkit-animation:iziT-fadeOutUp .7s cubic-bezier(.4,.45,.15,.91) both;animation:iziT-fadeOutUp .7s cubic-bezier(.4,.45,.15,.91) both}.iziToast.fadeOutLeft{-webkit-animation:iziT-fadeOutLeft .5s ease both;animation:iziT-fadeOutLeft .5s ease both}.iziToast.fadeOutRight{-webkit-animation:iziT-fadeOutRight .5s ease both;animation:iziT-fadeOutRight .5s ease both}.iziToast.flipOutX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation:iziT-flipOutX .7s cubic-bezier(.4,.45,.15,.91) both;animation:iziT-flipOutX .7s cubic-bezier(.4,.45,.15,.91) both}.iziToast-overlay.fadeIn{-webkit-animation:iziT-fadeIn .5s ease both;animation:iziT-fadeIn .5s ease both}.iziToast-overlay.fadeOut{-webkit-animation:iziT-fadeOut .7s ease both;animation:iziT-fadeOut .7s ease both}@-webkit-keyframes iziT-revealIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,1)}to{opacity:1}}@-moz-keyframes iziT-revealIn{0%{opacity:0;-moz-transform:scale3d(.3,.3,1)}to{opacity:1}}@-webkit-keyframes iziT-slideIn{0%{opacity:0;-webkit-transform:translateX(50px)}to{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes iziT-slideIn{0%{opacity:0;-moz-transform:translateX(50px)}to{opacity:1;-moz-transform:translateX(0)}}@-webkit-keyframes iziT-bounceInLeft{0%{opacity:0;-webkit-transform:translateX(280px)}50%{opacity:1;-webkit-transform:translateX(-20px)}70%{-webkit-transform:translateX(10px)}to{-webkit-transform:translateX(0)}}@-webkit-keyframes iziT-bounceInRight{0%{opacity:0;-webkit-transform:translateX(-280px)}50%{opacity:1;-webkit-transform:translateX(20px)}70%{-webkit-transform:translateX(-10px)}to{-webkit-transform:translateX(0)}}@-webkit-keyframes iziT-bounceInDown{0%{opacity:0;-webkit-transform:translateY(-200px)}50%{opacity:1;-webkit-transform:translateY(10px)}70%{-webkit-transform:translateY(-5px)}to{-webkit-transform:translateY(0)}}@-webkit-keyframes iziT-bounceInUp{0%{opacity:0;-webkit-transform:translateY(200px)}50%{opacity:1;-webkit-transform:translateY(-10px)}70%{-webkit-transform:translateY(5px)}to{-webkit-transform:translateY(0)}}@-webkit-keyframes iziT-fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes iziT-fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes iziT-fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes iziT-fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(300px,0,0);transform:translate3d(300px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes iziT-fadeInRight{0%{opacity:0;-webkit-transform:translate3d(-300px,0,0);transform:translate3d(-300px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes iziT-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg)}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes iziT-fadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes iziT-fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes iziT-fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes iziT-fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-200px,0,0);transform:translate3d(-200px,0,0)}}@-webkit-keyframes iziT-fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(200px,0,0);transform:translate3d(200px,0,0)}}@-webkit-keyframes iziT-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@-moz-keyframes iziT-revealIn{0%{opacity:0;transform:scale3d(.3,.3,1)}to{opacity:1}}@-webkit-keyframes iziT-revealIn{0%{opacity:0;transform:scale3d(.3,.3,1)}to{opacity:1}}@-o-keyframes iziT-revealIn{0%{opacity:0;transform:scale3d(.3,.3,1)}to{opacity:1}}@keyframes iziT-revealIn{0%{opacity:0;transform:scale3d(.3,.3,1)}to{opacity:1}}@-moz-keyframes iziT-slideIn{0%{opacity:0;transform:translateX(50px)}to{opacity:1;transform:translateX(0)}}@-webkit-keyframes iziT-slideIn{0%{opacity:0;transform:translateX(50px)}to{opacity:1;transform:translateX(0)}}@-o-keyframes iziT-slideIn{0%{opacity:0;transform:translateX(50px)}to{opacity:1;transform:translateX(0)}}@keyframes iziT-slideIn{0%{opacity:0;transform:translateX(50px)}to{opacity:1;transform:translateX(0)}}@-moz-keyframes iziT-bounceInLeft{0%{opacity:0;transform:translateX(280px)}50%{opacity:1;transform:translateX(-20px)}70%{transform:translateX(10px)}to{transform:translateX(0)}}@-webkit-keyframes iziT-bounceInLeft{0%{opacity:0;transform:translateX(280px)}50%{opacity:1;transform:translateX(-20px)}70%{transform:translateX(10px)}to{transform:translateX(0)}}@-o-keyframes iziT-bounceInLeft{0%{opacity:0;transform:translateX(280px)}50%{opacity:1;transform:translateX(-20px)}70%{transform:translateX(10px)}to{transform:translateX(0)}}@keyframes iziT-bounceInLeft{0%{opacity:0;transform:translateX(280px)}50%{opacity:1;transform:translateX(-20px)}70%{transform:translateX(10px)}to{transform:translateX(0)}}@-moz-keyframes iziT-bounceInRight{0%{opacity:0;transform:translateX(-280px)}50%{opacity:1;transform:translateX(20px)}70%{transform:translateX(-10px)}to{transform:translateX(0)}}@-webkit-keyframes iziT-bounceInRight{0%{opacity:0;transform:translateX(-280px)}50%{opacity:1;transform:translateX(20px)}70%{transform:translateX(-10px)}to{transform:translateX(0)}}@-o-keyframes iziT-bounceInRight{0%{opacity:0;transform:translateX(-280px)}50%{opacity:1;transform:translateX(20px)}70%{transform:translateX(-10px)}to{transform:translateX(0)}}@keyframes iziT-bounceInRight{0%{opacity:0;transform:translateX(-280px)}50%{opacity:1;transform:translateX(20px)}70%{transform:translateX(-10px)}to{transform:translateX(0)}}@-moz-keyframes iziT-bounceInDown{0%{opacity:0;transform:translateY(-200px)}50%{opacity:1;transform:translateY(10px)}70%{transform:translateY(-5px)}to{transform:translateY(0)}}@-webkit-keyframes iziT-bounceInDown{0%{opacity:0;transform:translateY(-200px)}50%{opacity:1;transform:translateY(10px)}70%{transform:translateY(-5px)}to{transform:translateY(0)}}@-o-keyframes iziT-bounceInDown{0%{opacity:0;transform:translateY(-200px)}50%{opacity:1;transform:translateY(10px)}70%{transform:translateY(-5px)}to{transform:translateY(0)}}@keyframes iziT-bounceInDown{0%{opacity:0;transform:translateY(-200px)}50%{opacity:1;transform:translateY(10px)}70%{transform:translateY(-5px)}to{transform:translateY(0)}}@-moz-keyframes iziT-bounceInUp{0%{opacity:0;transform:translateY(200px)}50%{opacity:1;transform:translateY(-10px)}70%{transform:translateY(5px)}to{transform:translateY(0)}}@-webkit-keyframes iziT-bounceInUp{0%{opacity:0;transform:translateY(200px)}50%{opacity:1;transform:translateY(-10px)}70%{transform:translateY(5px)}to{transform:translateY(0)}}@-o-keyframes iziT-bounceInUp{0%{opacity:0;transform:translateY(200px)}50%{opacity:1;transform:translateY(-10px)}70%{transform:translateY(5px)}to{transform:translateY(0)}}@keyframes iziT-bounceInUp{0%{opacity:0;transform:translateY(200px)}50%{opacity:1;transform:translateY(-10px)}70%{transform:translateY(5px)}to{transform:translateY(0)}}@-moz-keyframes iziT-fadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes iziT-fadeIn{0%{opacity:0}to{opacity:1}}@-o-keyframes iziT-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes iziT-fadeIn{0%{opacity:0}to{opacity:1}}@-moz-keyframes iziT-fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes iziT-fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-o-keyframes iziT-fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes iziT-fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-moz-keyframes iziT-fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes iziT-fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-o-keyframes iziT-fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes iziT-fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-moz-keyframes iziT-fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(300px,0,0);transform:translate3d(300px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes iziT-fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(300px,0,0);transform:translate3d(300px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-o-keyframes iziT-fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(300px,0,0);transform:translate3d(300px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes iziT-fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(300px,0,0);transform:translate3d(300px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-moz-keyframes iziT-fadeInRight{0%{opacity:0;-webkit-transform:translate3d(-300px,0,0);transform:translate3d(-300px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes iziT-fadeInRight{0%{opacity:0;-webkit-transform:translate3d(-300px,0,0);transform:translate3d(-300px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-o-keyframes iziT-fadeInRight{0%{opacity:0;-webkit-transform:translate3d(-300px,0,0);transform:translate3d(-300px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes iziT-fadeInRight{0%{opacity:0;-webkit-transform:translate3d(-300px,0,0);transform:translate3d(-300px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@-moz-keyframes iziT-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg)}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes iziT-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg)}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-o-keyframes iziT-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg)}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes iziT-flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg)}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-moz-keyframes iziT-fadeOut{0%{opacity:1}to{opacity:0}}@-webkit-keyframes iziT-fadeOut{0%{opacity:1}to{opacity:0}}@-o-keyframes iziT-fadeOut{0%{opacity:1}to{opacity:0}}@keyframes iziT-fadeOut{0%{opacity:1}to{opacity:0}}@-moz-keyframes iziT-fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes iziT-fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-o-keyframes iziT-fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes iziT-fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-moz-keyframes iziT-fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes iziT-fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-o-keyframes iziT-fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes iziT-fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-moz-keyframes iziT-fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-200px,0,0);transform:translate3d(-200px,0,0)}}@-webkit-keyframes iziT-fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-200px,0,0);transform:translate3d(-200px,0,0)}}@-o-keyframes iziT-fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-200px,0,0);transform:translate3d(-200px,0,0)}}@keyframes iziT-fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-200px,0,0);transform:translate3d(-200px,0,0)}}@-moz-keyframes iziT-fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(200px,0,0);transform:translate3d(200px,0,0)}}@-webkit-keyframes iziT-fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(200px,0,0);transform:translate3d(200px,0,0)}}@-o-keyframes iziT-fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(200px,0,0);transform:translate3d(200px,0,0)}}@keyframes iziT-fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(200px,0,0);transform:translate3d(200px,0,0)}}@-moz-keyframes iziT-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@-webkit-keyframes iziT-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@-o-keyframes iziT-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes iziT-flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}
|
2
|
+
/*# sourceMappingURL=../../maps/js/ceta/message.css.map */
|
@@ -0,0 +1,2 @@
|
|
1
|
+
!function(t,e){"function"==typeof define&&define.amd?define([],e(t)):"object"==typeof exports?module.exports=e(t):t.iziToast=e(t)}("undefined"!=typeof global?global:window||this.window||this.global,(function(t){"use strict";var e={},o="iziToast",n=(document.querySelector("body"),!!/Mobi/.test(navigator.userAgent)),i=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),s="undefined"!=typeof InstallTrigger,a="ontouchstart"in document.documentElement,r=["bottomRight","bottomLeft","bottomCenter","topRight","topLeft","topCenter","center"],l=568,d={};e.children={};var c={id:null,class:"",title:"",titleColor:"",titleSize:"",titleLineHeight:"",message:"",messageColor:"",messageSize:"",messageLineHeight:"",backgroundColor:"",theme:"light",color:"",icon:"",iconText:"",iconColor:"",iconUrl:null,image:"",imageWidth:50,maxWidth:null,zindex:null,layout:1,balloon:!1,close:!0,closeOnEscape:!1,closeOnClick:!1,displayMode:0,position:"bottomRight",target:"",targetFirst:!0,timeout:5e3,rtl:!1,animateInside:!0,drag:!0,pauseOnHover:!0,resetOnHover:!1,progressBar:!0,progressBarColor:"",progressBarEasing:"linear",overlay:!1,overlayClose:!1,overlayColor:"rgba(0, 0, 0, 0.6)",transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",buttons:{},inputs:{},onOpening:function(){},onOpened:function(){},onClosing:function(){},onClosed:function(){}};if("remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),"function"!=typeof window.CustomEvent){var u=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),o};u.prototype=window.Event.prototype,window.CustomEvent=u}var p=function(t,e,o){if("[object Object]"===Object.prototype.toString.call(t))for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.call(o,t[n],n,t);else if(t)for(var i=0,s=t.length;s>i;i++)e.call(o,t[i],i,t)},m=function(t,e){var o={};return p(t,(function(e,n){o[n]=t[n]})),p(e,(function(t,n){o[n]=e[n]})),o},g=function(t){var e=document.createDocumentFragment(),o=document.createElement("div");for(o.innerHTML=t;o.firstChild;)e.appendChild(o.firstChild);return e},f={move:function(t,e,n,a){var r,l=.3,d=180;0!==a&&(t.classList.add(o+"-dragged"),t.style.transform="translateX("+a+"px)",a>0?l>(r=(d-a)/d)&&e.hide(m(n,{transitionOut:"fadeOutRight",transitionOutMobile:"fadeOutRight"}),t,"drag"):l>(r=(d+a)/d)&&e.hide(m(n,{transitionOut:"fadeOutLeft",transitionOutMobile:"fadeOutLeft"}),t,"drag"),t.style.opacity=r,l>r&&((i||s)&&(t.style.left=a+"px"),t.parentNode.style.opacity=l,this.stopMoving(t,null)))},startMoving:function(t,e,o,n){n=n||window.event;var i=a?n.touches[0].clientX:n.clientX,s=t.style.transform.replace("px)",""),r=i-(s=s.replace("translateX(",""));o.transitionIn&&t.classList.remove(o.transitionIn),o.transitionInMobile&&t.classList.remove(o.transitionInMobile),t.style.transition="",a?document.ontouchmove=function(n){n.preventDefault();var i=(n=n||window.event).touches[0].clientX-r;f.move(t,e,o,i)}:document.onmousemove=function(n){n.preventDefault();var i=(n=n||window.event).clientX-r;f.move(t,e,o,i)}},stopMoving:function(t,e){a?document.ontouchmove=function(){}:document.onmousemove=function(){},t.style.opacity="",t.style.transform="",t.classList.contains(o+"-dragged")&&(t.classList.remove(o+"-dragged"),t.style.transition="transform 0.4s ease, opacity 0.4s ease",setTimeout((function(){t.style.transition=""}),400))}};return e.setSetting=function(t,o,n){e.children[t][o]=n},e.getSetting=function(t,o){return e.children[t][o]},e.destroy=function(){p(document.querySelectorAll("."+o+"-overlay"),(function(t,e){t.remove()})),p(document.querySelectorAll("."+o+"-wrapper"),(function(t,e){t.remove()})),p(document.querySelectorAll("."+o),(function(t,e){t.remove()})),this.children={},document.removeEventListener(o+"-opened",{},!1),document.removeEventListener(o+"-opening",{},!1),document.removeEventListener(o+"-closing",{},!1),document.removeEventListener(o+"-closed",{},!1),document.removeEventListener("keyup",{},!1),d={}},e.settings=function(t){e.destroy(),d=t,c=m(c,t||{})},p({info:{color:"blue",icon:"ico-info"},success:{color:"green",icon:"ico-success"},warning:{color:"orange",icon:"ico-warning"},error:{color:"red",icon:"ico-error"},question:{color:"yellow",icon:"ico-question"}},(function(t,o){e[o]=function(e){var o=m(d,e||{});o=m(t,o||{}),this.show(o)}})),e.progress=function(t,e,n){var i=this,s=e.getAttribute("data-iziToast-ref"),a=m(this.children[s],t||{}),r=e.querySelector("."+o+"-progressbar div");return{start:function(){void 0===a.time.REMAINING&&(e.classList.remove(o+"-reseted"),null!==r&&(r.style.transition="width "+a.timeout+"ms "+a.progressBarEasing,r.style.width="0%"),a.time.START=(new Date).getTime(),a.time.END=a.time.START+a.timeout,a.time.TIMER=setTimeout((function(){clearTimeout(a.time.TIMER),e.classList.contains(o+"-closing")||(i.hide(a,e,"timeout"),"function"==typeof n&&n.apply(i))}),a.timeout),i.setSetting(s,"time",a.time))},pause:function(){if(void 0!==a.time.START&&!e.classList.contains(o+"-paused")&&!e.classList.contains(o+"-reseted")){if(e.classList.add(o+"-paused"),a.time.REMAINING=a.time.END-(new Date).getTime(),clearTimeout(a.time.TIMER),i.setSetting(s,"time",a.time),null!==r){var t=window.getComputedStyle(r).getPropertyValue("width");r.style.transition="none",r.style.width=t}"function"==typeof n&&setTimeout((function(){n.apply(i)}),10)}},resume:function(){void 0!==a.time.REMAINING?(e.classList.remove(o+"-paused"),null!==r&&(r.style.transition="width "+a.time.REMAINING+"ms "+a.progressBarEasing,r.style.width="0%"),a.time.END=(new Date).getTime()+a.time.REMAINING,a.time.TIMER=setTimeout((function(){clearTimeout(a.time.TIMER),e.classList.contains(o+"-closing")||(i.hide(a,e,"timeout"),"function"==typeof n&&n.apply(i))}),a.time.REMAINING),i.setSetting(s,"time",a.time)):this.start()},reset:function(){clearTimeout(a.time.TIMER),delete a.time.REMAINING,i.setSetting(s,"time",a.time),e.classList.add(o+"-reseted"),e.classList.remove(o+"-paused"),null!==r&&(r.style.transition="none",r.style.width="100%"),"function"==typeof n&&setTimeout((function(){n.apply(i)}),10)}}},e.hide=function(t,e,i){"object"!=typeof e&&(e=document.querySelector(e));var s=this,a=m(this.children[e.getAttribute("data-iziToast-ref")],t||{});a.closedBy=i||null,delete a.time.REMAINING,e.classList.add(o+"-closing"),function(){var t=document.querySelector("."+o+"-overlay");if(null!==t){var e=t.getAttribute("data-iziToast-ref"),n=(e=e.split(",")).indexOf(String(a.ref));-1!==n&&e.splice(n,1),t.setAttribute("data-iziToast-ref",e.join()),0===e.length&&(t.classList.remove("fadeIn"),t.classList.add("fadeOut"),setTimeout((function(){t.remove()}),700))}}(),a.transitionIn&&e.classList.remove(a.transitionIn),a.transitionInMobile&&e.classList.remove(a.transitionInMobile),n||window.innerWidth<=l?a.transitionOutMobile&&e.classList.add(a.transitionOutMobile):a.transitionOut&&e.classList.add(a.transitionOut);var r=e.parentNode.offsetHeight;e.parentNode.style.height=r+"px",e.style.pointerEvents="none",(!n||window.innerWidth>l)&&(e.parentNode.style.transitionDelay="0.2s");try{var d=new CustomEvent(o+"-closing",{detail:a,bubbles:!0,cancelable:!0});document.dispatchEvent(d)}catch(t){console.warn(t)}setTimeout((function(){e.parentNode.style.height="0px",e.parentNode.style.overflow="",setTimeout((function(){delete s.children[a.ref],e.parentNode.remove();try{var t=new CustomEvent(o+"-closed",{detail:a,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(t){console.warn(t)}void 0!==a.onClosed&&a.onClosed.apply(null,[a,e,i])}),1e3)}),200),void 0!==a.onClosing&&a.onClosing.apply(null,[a,e,i])},e.show=function(t){var i=this,s=m(d,t||{});if((s=m(c,s)).time={},null===s.id&&(s.id=function(t){return btoa(encodeURIComponent(t)).replace(/=/g,"")}(s.title+s.message+s.color)),1===s.displayMode||"once"==s.displayMode)try{if(document.querySelectorAll("."+o+"#"+s.id).length>0)return!1}catch(t){console.warn("["+o+"] Could not find an element with this selector: #"+s.id+". Try to set an valid id.")}if(2===s.displayMode||"replace"==s.displayMode)try{p(document.querySelectorAll("."+o+"#"+s.id),(function(t,e){i.hide(s,t,"replaced")}))}catch(t){console.warn("["+o+"] Could not find an element with this selector: #"+s.id+". Try to set an valid id.")}s.ref=(new Date).getTime()+Math.floor(1e7*Math.random()+1),e.children[s.ref]=s;var u,v={body:document.querySelector("body"),overlay:document.createElement("div"),toast:document.createElement("div"),toastBody:document.createElement("div"),toastTexts:document.createElement("div"),toastCapsule:document.createElement("div"),cover:document.createElement("div"),buttons:document.createElement("div"),inputs:document.createElement("div"),icon:s.iconUrl?document.createElement("img"):document.createElement("i"),wrapper:null};v.toast.setAttribute("data-iziToast-ref",s.ref),v.toast.appendChild(v.toastBody),v.toastCapsule.appendChild(v.toast),function(){if(v.toast.classList.add(o),v.toast.classList.add(o+"-opening"),v.toastCapsule.classList.add(o+"-capsule"),v.toastBody.classList.add(o+"-body"),v.toastTexts.classList.add(o+"-texts"),n||window.innerWidth<=l?s.transitionInMobile&&v.toast.classList.add(s.transitionInMobile):s.transitionIn&&v.toast.classList.add(s.transitionIn),s.class){var t=s.class.split(" ");p(t,(function(t,e){v.toast.classList.add(t)}))}s.id&&(v.toast.id=s.id),s.rtl&&(v.toast.classList.add(o+"-rtl"),v.toast.setAttribute("dir","rtl")),s.layout>1&&v.toast.classList.add(o+"-layout"+s.layout),s.balloon&&v.toast.classList.add(o+"-balloon"),s.maxWidth&&(isNaN(s.maxWidth)?v.toast.style.maxWidth=s.maxWidth:v.toast.style.maxWidth=s.maxWidth+"px"),""===s.theme&&"light"===s.theme||v.toast.classList.add(o+"-theme-"+s.theme),s.color&&(function(t){return"#"==t.substring(0,1)||"rgb"==t.substring(0,3)||"hsl"==t.substring(0,3)}(s.color)?v.toast.style.background=s.color:v.toast.classList.add(o+"-color-"+s.color)),s.backgroundColor&&(v.toast.style.background=s.backgroundColor,s.balloon&&(v.toast.style.borderColor=s.backgroundColor))}(),s.image&&(v.cover.classList.add(o+"-cover"),v.cover.style.width=s.imageWidth+"px",function(t){try{return btoa(atob(t))==t}catch(t){return!1}}(s.image.replace(/ /g,""))?v.cover.style.backgroundImage="url(data:image/png;base64,"+s.image.replace(/ /g,"")+")":v.cover.style.backgroundImage="url("+s.image+")",s.rtl?v.toastBody.style.marginRight=s.imageWidth+10+"px":v.toastBody.style.marginLeft=s.imageWidth+10+"px",v.toast.appendChild(v.cover)),s.close?(v.buttonClose=document.createElement("button"),v.buttonClose.type="button",v.buttonClose.classList.add(o+"-close"),v.buttonClose.addEventListener("click",(function(t){t.target,i.hide(s,v.toast,"button")})),v.toast.appendChild(v.buttonClose)):s.rtl?v.toast.style.paddingLeft="18px":v.toast.style.paddingRight="18px",s.progressBar&&(v.progressBar=document.createElement("div"),v.progressBarDiv=document.createElement("div"),v.progressBar.classList.add(o+"-progressbar"),v.progressBarDiv.style.background=s.progressBarColor,v.progressBar.appendChild(v.progressBarDiv),v.toast.appendChild(v.progressBar)),s.timeout&&(s.pauseOnHover&&!s.resetOnHover&&(v.toast.addEventListener("mouseenter",(function(t){i.progress(s,v.toast).pause()})),v.toast.addEventListener("mouseleave",(function(t){i.progress(s,v.toast).resume()}))),s.resetOnHover&&(v.toast.addEventListener("mouseenter",(function(t){i.progress(s,v.toast).reset()})),v.toast.addEventListener("mouseleave",(function(t){i.progress(s,v.toast).start()})))),s.iconUrl?(v.icon.setAttribute("class",o+"-icon"),v.icon.setAttribute("src",s.iconUrl)):s.icon&&(v.icon.setAttribute("class",o+"-icon "+s.icon),s.iconText&&v.icon.appendChild(document.createTextNode(s.iconText)),s.iconColor&&(v.icon.style.color=s.iconColor)),(s.icon||s.iconUrl)&&(s.rtl?v.toastBody.style.paddingRight="33px":v.toastBody.style.paddingLeft="33px",v.toastBody.appendChild(v.icon)),s.title.length>0&&(v.strong=document.createElement("strong"),v.strong.classList.add(o+"-title"),v.strong.appendChild(g(s.title)),v.toastTexts.appendChild(v.strong),s.titleColor&&(v.strong.style.color=s.titleColor),s.titleSize&&(isNaN(s.titleSize)?v.strong.style.fontSize=s.titleSize:v.strong.style.fontSize=s.titleSize+"px"),s.titleLineHeight&&(isNaN(s.titleSize)?v.strong.style.lineHeight=s.titleLineHeight:v.strong.style.lineHeight=s.titleLineHeight+"px")),s.message.length>0&&(v.p=document.createElement("p"),v.p.classList.add(o+"-message"),v.p.appendChild(g(s.message)),v.toastTexts.appendChild(v.p),s.messageColor&&(v.p.style.color=s.messageColor),s.messageSize&&(isNaN(s.titleSize)?v.p.style.fontSize=s.messageSize:v.p.style.fontSize=s.messageSize+"px"),s.messageLineHeight&&(isNaN(s.titleSize)?v.p.style.lineHeight=s.messageLineHeight:v.p.style.lineHeight=s.messageLineHeight+"px")),s.title.length>0&&s.message.length>0&&(s.rtl?v.strong.style.marginLeft="10px":2===s.layout||s.rtl||(v.strong.style.marginRight="10px")),v.toastBody.appendChild(v.toastTexts),s.inputs.length>0&&(v.inputs.classList.add(o+"-inputs"),p(s.inputs,(function(t,e){v.inputs.appendChild(g(t[0])),(u=v.inputs.childNodes)[e].classList.add(o+"-inputs-child"),t[3]&&setTimeout((function(){u[e].focus()}),300),u[e].addEventListener(t[1],(function(e){return(0,t[2])(i,v.toast,this,e)}))})),v.toastBody.appendChild(v.inputs)),s.buttons.length>0&&(v.buttons.classList.add(o+"-buttons"),p(s.buttons,(function(t,e){v.buttons.appendChild(g(t[0]));var n=v.buttons.childNodes;n[e].classList.add(o+"-buttons-child"),t[2]&&setTimeout((function(){n[e].focus()}),300),n[e].addEventListener("click",(function(e){return e.preventDefault(),(0,t[1])(i,v.toast,this,e,u)}))}))),v.toastBody.appendChild(v.buttons),s.message.length>0&&(s.inputs.length>0||s.buttons.length>0)&&(v.p.style.marginBottom="0"),(s.inputs.length>0||s.buttons.length>0)&&(s.rtl?v.toastTexts.style.marginLeft="10px":v.toastTexts.style.marginRight="10px",s.inputs.length>0&&s.buttons.length>0&&(s.rtl?v.inputs.style.marginLeft="8px":v.inputs.style.marginRight="8px")),v.toastCapsule.style.visibility="hidden",setTimeout((function(){var t=v.toast.offsetHeight,e=v.toast.currentStyle||window.getComputedStyle(v.toast),o=e.marginTop;o=o.split("px"),o=parseInt(o[0]);var n=e.marginBottom;n=n.split("px"),n=parseInt(n[0]),v.toastCapsule.style.visibility="",v.toastCapsule.style.height=t+n+o+"px",setTimeout((function(){v.toastCapsule.style.height="auto",s.target&&(v.toastCapsule.style.overflow="visible")}),500),s.timeout&&i.progress(s,v.toast).start()}),100),function(){var t=s.position;if(s.target)v.wrapper=document.querySelector(s.target),v.wrapper.classList.add(o+"-target"),s.targetFirst?v.wrapper.insertBefore(v.toastCapsule,v.wrapper.firstChild):v.wrapper.appendChild(v.toastCapsule);else{if(-1==r.indexOf(s.position))return void console.warn("["+o+"] Incorrect position.\nIt can be › "+r);t=n||window.innerWidth<=l?"bottomLeft"==s.position||"bottomRight"==s.position||"bottomCenter"==s.position?o+"-wrapper-bottomCenter":"topLeft"==s.position||"topRight"==s.position||"topCenter"==s.position?o+"-wrapper-topCenter":o+"-wrapper-center":o+"-wrapper-"+t,v.wrapper=document.querySelector("."+o+"-wrapper."+t),v.wrapper||(v.wrapper=document.createElement("div"),v.wrapper.classList.add(o+"-wrapper"),v.wrapper.classList.add(t),document.body.appendChild(v.wrapper)),"topLeft"==s.position||"topCenter"==s.position||"topRight"==s.position?v.wrapper.insertBefore(v.toastCapsule,v.wrapper.firstChild):v.wrapper.appendChild(v.toastCapsule)}isNaN(s.zindex)?console.warn("["+o+"] Invalid zIndex."):v.wrapper.style.zIndex=s.zindex}(),s.overlay&&(null!==document.querySelector("."+o+"-overlay.fadeIn")?(v.overlay=document.querySelector("."+o+"-overlay"),v.overlay.setAttribute("data-iziToast-ref",v.overlay.getAttribute("data-iziToast-ref")+","+s.ref),isNaN(s.zindex)||null===s.zindex||(v.overlay.style.zIndex=s.zindex-1)):(v.overlay.classList.add(o+"-overlay"),v.overlay.classList.add("fadeIn"),v.overlay.style.background=s.overlayColor,v.overlay.setAttribute("data-iziToast-ref",s.ref),isNaN(s.zindex)||null===s.zindex||(v.overlay.style.zIndex=s.zindex-1),document.querySelector("body").appendChild(v.overlay)),s.overlayClose?(v.overlay.removeEventListener("click",{}),v.overlay.addEventListener("click",(function(t){i.hide(s,v.toast,"overlay")}))):v.overlay.removeEventListener("click",{})),function(){if(s.animateInside){v.toast.classList.add(o+"-animateInside");var t=[200,100,300];"bounceInLeft"!=s.transitionIn&&"bounceInRight"!=s.transitionIn||(t=[400,200,400]),s.title.length>0&&setTimeout((function(){v.strong.classList.add("slideIn")}),t[0]),s.message.length>0&&setTimeout((function(){v.p.classList.add("slideIn")}),t[1]),(s.icon||s.iconUrl)&&setTimeout((function(){v.icon.classList.add("revealIn")}),t[2]);var e=150;s.buttons.length>0&&v.buttons&&setTimeout((function(){p(v.buttons.childNodes,(function(t,o){setTimeout((function(){t.classList.add("revealIn")}),e),e+=150}))}),s.inputs.length>0?150:0),s.inputs.length>0&&v.inputs&&(e=150,p(v.inputs.childNodes,(function(t,o){setTimeout((function(){t.classList.add("revealIn")}),e),e+=150})))}}(),s.onOpening.apply(null,[s,v.toast]);try{var h=new CustomEvent(o+"-opening",{detail:s,bubbles:!0,cancelable:!0});document.dispatchEvent(h)}catch(t){console.warn(t)}setTimeout((function(){v.toast.classList.remove(o+"-opening"),v.toast.classList.add(o+"-opened");try{var t=new CustomEvent(o+"-opened",{detail:s,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(t){console.warn(t)}s.onOpened.apply(null,[s,v.toast])}),1e3),s.drag&&(a?(v.toast.addEventListener("touchstart",(function(t){f.startMoving(this,i,s,t)}),!1),v.toast.addEventListener("touchend",(function(t){f.stopMoving(this,t)}),!1)):(v.toast.addEventListener("mousedown",(function(t){t.preventDefault(),f.startMoving(this,i,s,t)}),!1),v.toast.addEventListener("mouseup",(function(t){t.preventDefault(),f.stopMoving(this,t)}),!1))),s.closeOnEscape&&document.addEventListener("keyup",(function(t){27==(t=t||window.event).keyCode&&i.hide(s,v.toast,"esc")})),s.closeOnClick&&v.toast.addEventListener("click",(function(t){i.hide(s,v.toast,"toast")})),i.toast=v.toast},e}));
|
2
|
+
//# sourceMappingURL=../../maps/js/ceta/message.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Pjax=f()}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r}()({1:[function(require,module,exports){var executeScripts=require("./lib/execute-scripts");var forEachEls=require("./lib/foreach-els");var parseOptions=require("./lib/parse-options");var switches=require("./lib/switches");var newUid=require("./lib/uniqueid");var on=require("./lib/events/on");var trigger=require("./lib/events/trigger");var clone=require("./lib/util/clone");var contains=require("./lib/util/contains");var extend=require("./lib/util/extend");var noop=require("./lib/util/noop");var Pjax=function(options){this.state={numPendingSwitches:0,href:null,options:null};this.options=parseOptions(options);this.log("Pjax options",this.options);if(this.options.scrollRestoration&&"scrollRestoration"in history){history.scrollRestoration="manual"}this.maxUid=this.lastUid=newUid();this.parseDOM(document);on(window,"popstate",function(st){if(st.state){var opt=clone(this.options);opt.url=st.state.url;opt.title=st.state.title;opt.history=false;opt.scrollPos=st.state.scrollPos;if(st.state.uid<this.lastUid){opt.backward=true}else{opt.forward=true}this.lastUid=st.state.uid;this.loadUrl(st.state.url,opt)}}.bind(this))};Pjax.switches=switches;Pjax.prototype={log:require("./lib/proto/log"),getElements:function(el){return el.querySelectorAll(this.options.elements)},parseDOM:function(el){var parseElement=require("./lib/proto/parse-element");forEachEls(this.getElements(el),parseElement,this)},refresh:function(el){this.parseDOM(el||document)},reload:function(){window.location.reload()},attachLink:require("./lib/proto/attach-link"),attachForm:require("./lib/proto/attach-form"),forEachSelectors:function(cb,context,DOMcontext){return require("./lib/foreach-selectors").bind(this)(this.options.selectors,cb,context,DOMcontext)},switchSelectors:function(selectors,fromEl,toEl,options){return require("./lib/switches-selectors").bind(this)(this.options.switches,this.options.switchesOptions,selectors,fromEl,toEl,options)},latestChance:function(href){window.location=href},onSwitch:function(){trigger(window,"resize scroll");this.state.numPendingSwitches--;if(this.state.numPendingSwitches===0){this.afterAllSwitches()}},loadContent:function(html,options){if(typeof html!=="string"){trigger(document,"pjax:complete pjax:error",options);return}var tmpEl=document.implementation.createHTMLDocument("pjax");var htmlRegex=/<html[^>]+>/gi;var htmlAttribsRegex=/\s?[a-z:]+(?:=['"][^'">]+['"])*/gi;var matches=html.match(htmlRegex);if(matches&&matches.length){matches=matches[0].match(htmlAttribsRegex);if(matches.length){matches.shift();matches.forEach(function(htmlAttrib){var attr=htmlAttrib.trim().split("=");if(attr.length===1){tmpEl.documentElement.setAttribute(attr[0],true)}else{tmpEl.documentElement.setAttribute(attr[0],attr[1].slice(1,-1))}})}}tmpEl.documentElement.innerHTML=html;this.log("load content",tmpEl.documentElement.attributes,tmpEl.documentElement.innerHTML.length);if(document.activeElement&&contains(document,this.options.selectors,document.activeElement)){try{document.activeElement.blur()}catch(e){}}this.switchSelectors(this.options.selectors,tmpEl,document,options)},abortRequest:require("./lib/abort-request"),doRequest:require("./lib/send-request"),handleResponse:require("./lib/proto/handle-response"),loadUrl:function(href,options){options=typeof options==="object"?extend({},this.options,options):clone(this.options);this.log("load href",href,options);this.abortRequest(this.request);trigger(document,"pjax:send",options);this.request=this.doRequest(href,options,this.handleResponse.bind(this))},afterAllSwitches:function(){var autofocusEl=Array.prototype.slice.call(document.querySelectorAll("[autofocus]")).pop();if(autofocusEl&&document.activeElement!==autofocusEl){autofocusEl.focus()}this.options.selectors.forEach(function(selector){forEachEls(document.querySelectorAll(selector),function(el){executeScripts(el)})});var state=this.state;if(state.options.history){if(!window.history.state){this.lastUid=this.maxUid=newUid();window.history.replaceState({url:window.location.href,title:document.title,uid:this.maxUid,scrollPos:[0,0]},document.title)}this.lastUid=this.maxUid=newUid();window.history.pushState({url:state.href,title:state.options.title,uid:this.maxUid,scrollPos:[0,0]},state.options.title,state.href)}this.forEachSelectors(function(el){this.parseDOM(el)},this);trigger(document,"pjax:complete pjax:success",state.options);if(typeof state.options.analytics==="function"){state.options.analytics()}if(state.options.history){var a=document.createElement("a");a.href=this.state.href;if(a.hash){var name=a.hash.slice(1);name=decodeURIComponent(name);var curtop=0;var target=document.getElementById(name)||document.getElementsByName(name)[0];if(target){if(target.offsetParent){do{curtop+=target.offsetTop;target=target.offsetParent}while(target)}}window.scrollTo(0,curtop)}else if(state.options.scrollTo!==false){if(state.options.scrollTo.length>1){window.scrollTo(state.options.scrollTo[0],state.options.scrollTo[1])}else{window.scrollTo(0,state.options.scrollTo)}}}else if(state.options.scrollRestoration&&state.options.scrollPos){window.scrollTo(state.options.scrollPos[0],state.options.scrollPos[1])}this.state={numPendingSwitches:0,href:null,options:null}}};Pjax.isSupported=require("./lib/is-supported");if(Pjax.isSupported()){module.exports=Pjax}else{var stupidPjax=noop;for(var key in Pjax.prototype){if(Pjax.prototype.hasOwnProperty(key)&&typeof Pjax.prototype[key]==="function"){stupidPjax[key]=noop}}module.exports=stupidPjax}},{"./lib/abort-request":2,"./lib/events/on":4,"./lib/events/trigger":5,"./lib/execute-scripts":6,"./lib/foreach-els":7,"./lib/foreach-selectors":8,"./lib/is-supported":9,"./lib/parse-options":10,"./lib/proto/attach-form":11,"./lib/proto/attach-link":12,"./lib/proto/handle-response":13,"./lib/proto/log":14,"./lib/proto/parse-element":15,"./lib/send-request":16,"./lib/switches":18,"./lib/switches-selectors":17,"./lib/uniqueid":19,"./lib/util/clone":20,"./lib/util/contains":21,"./lib/util/extend":22,"./lib/util/noop":23}],2:[function(require,module,exports){var noop=require("./util/noop");module.exports=function(request){if(request&&request.readyState<4){request.onreadystatechange=noop;request.abort()}}},{"./util/noop":23}],3:[function(require,module,exports){module.exports=function(el){var code=el.text||el.textContent||el.innerHTML||"";var src=el.src||"";var parent=el.parentNode||document.querySelector("head")||document.documentElement;var script=document.createElement("script");if(code.match("document.write")){if(console&&console.log){console.log("Script contains document.write. Can’t be executed correctly. Code skipped ",el)}return false}script.type="text/javascript";script.id=el.id;if(src!==""){script.src=src;script.async=false}if(code!==""){try{script.appendChild(document.createTextNode(code))}catch(e){script.text=code}}parent.appendChild(script);if((parent instanceof HTMLHeadElement||parent instanceof HTMLBodyElement)&&parent.contains(script)){parent.removeChild(script)}return true}},{}],4:[function(require,module,exports){var forEachEls=require("../foreach-els");module.exports=function(els,events,listener,useCapture){events=typeof events==="string"?events.split(" "):events;events.forEach(function(e){forEachEls(els,function(el){el.addEventListener(e,listener,useCapture)})})}},{"../foreach-els":7}],5:[function(require,module,exports){var forEachEls=require("../foreach-els");module.exports=function(els,events,opts){events=typeof events==="string"?events.split(" "):events;events.forEach(function(e){var event;event=document.createEvent("HTMLEvents");event.initEvent(e,true,true);event.eventName=e;if(opts){Object.keys(opts).forEach(function(key){event[key]=opts[key]})}forEachEls(els,function(el){var domFix=false;if(!el.parentNode&&el!==document&&el!==window){domFix=true;document.body.appendChild(el)}el.dispatchEvent(event);if(domFix){el.parentNode.removeChild(el)}})})}},{"../foreach-els":7}],6:[function(require,module,exports){var forEachEls=require("./foreach-els");var evalScript=require("./eval-script");module.exports=function(el){if(el.tagName.toLowerCase()==="script"){evalScript(el)}forEachEls(el.querySelectorAll("script"),function(script){if(!script.type||script.type.toLowerCase()==="text/javascript"){if(script.parentNode){script.parentNode.removeChild(script)}evalScript(script)}})}},{"./eval-script":3,"./foreach-els":7}],7:[function(require,module,exports){module.exports=function(els,fn,context){if(els instanceof HTMLCollection||els instanceof NodeList||els instanceof Array){return Array.prototype.forEach.call(els,fn,context)}return fn.call(context,els)}},{}],8:[function(require,module,exports){var forEachEls=require("./foreach-els");module.exports=function(selectors,cb,context,DOMcontext){DOMcontext=DOMcontext||document;selectors.forEach(function(selector){forEachEls(DOMcontext.querySelectorAll(selector),cb,context)})}},{"./foreach-els":7}],9:[function(require,module,exports){module.exports=function(){return window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/)}},{}],10:[function(require,module,exports){var defaultSwitches=require("./switches");module.exports=function(options){options=options||{};options.elements=options.elements||"a[href], form[action]";options.selectors=options.selectors||["title",".js-Pjax"];options.switches=options.switches||{};options.switchesOptions=options.switchesOptions||{};options.history=typeof options.history==="undefined"?true:options.history;options.analytics=typeof options.analytics==="function"||options.analytics===false?options.analytics:defaultAnalytics;options.scrollTo=typeof options.scrollTo==="undefined"?0:options.scrollTo;options.scrollRestoration=typeof options.scrollRestoration!=="undefined"?options.scrollRestoration:true;options.cacheBust=typeof options.cacheBust==="undefined"?true:options.cacheBust;options.debug=options.debug||false;options.timeout=options.timeout||0;options.currentUrlFullReload=typeof options.currentUrlFullReload==="undefined"?false:options.currentUrlFullReload;if(!options.switches.head){options.switches.head=defaultSwitches.switchElementsAlt}if(!options.switches.body){options.switches.body=defaultSwitches.switchElementsAlt}return options};function defaultAnalytics(){if(window._gaq){_gaq.push(["_trackPageview"])}if(window.ga){ga("send","pageview",{page:location.pathname,title:document.title})}}},{"./switches":18}],11:[function(require,module,exports){var on=require("../events/on");var clone=require("../util/clone");var attrState="data-pjax-state";var formAction=function(el,event){if(isDefaultPrevented(event)){return}var options=clone(this.options);options.requestOptions={requestUrl:el.getAttribute("action")||window.location.href,requestMethod:el.getAttribute("method")||"GET"};var virtLinkElement=document.createElement("a");virtLinkElement.setAttribute("href",options.requestOptions.requestUrl);var attrValue=checkIfShouldAbort(virtLinkElement,options);if(attrValue){el.setAttribute(attrState,attrValue);return}event.preventDefault();if(el.enctype==="multipart/form-data"){options.requestOptions.formData=new FormData(el)}else{options.requestOptions.requestParams=parseFormElements(el)}el.setAttribute(attrState,"submit");options.triggerElement=el;this.loadUrl(virtLinkElement.href,options)};function parseFormElements(el){var requestParams=[];var formElements=el.elements;for(var i=0;i<formElements.length;i++){var element=formElements[i];var tagName=element.tagName.toLowerCase();if(!!element.name&&element.attributes!==undefined&&tagName!=="button"){var type=element.attributes.type;if(!type||type.value!=="checkbox"&&type.value!=="radio"||element.checked){var values=[];if(tagName==="select"){var opt;for(var j=0;j<element.options.length;j++){opt=element.options[j];if(opt.selected&&!opt.disabled){values.push(opt.hasAttribute("value")?opt.value:opt.text)}}}else{values.push(element.value)}for(var k=0;k<values.length;k++){requestParams.push({name:encodeURIComponent(element.name),value:encodeURIComponent(values[k])})}}}}return requestParams}function checkIfShouldAbort(virtLinkElement,options){if(virtLinkElement.protocol!==window.location.protocol||virtLinkElement.host!==window.location.host){return"external"}if(virtLinkElement.hash&&virtLinkElement.href.replace(virtLinkElement.hash,"")===window.location.href.replace(location.hash,"")){return"anchor"}if(virtLinkElement.href===window.location.href.split("#")[0]+"#"){return"anchor-empty"}if(options.currentUrlFullReload&&virtLinkElement.href===window.location.href.split("#")[0]){return"reload"}}var isDefaultPrevented=function(event){return event.defaultPrevented||event.returnValue===false};module.exports=function(el){var that=this;el.setAttribute(attrState,"");on(el,"submit",function(event){formAction.call(that,el,event)})}},{"../events/on":4,"../util/clone":20}],12:[function(require,module,exports){var on=require("../events/on");var clone=require("../util/clone");var attrState="data-pjax-state";var linkAction=function(el,event){if(isDefaultPrevented(event)){return}var options=clone(this.options);var attrValue=checkIfShouldAbort(el,event);if(attrValue){el.setAttribute(attrState,attrValue);return}event.preventDefault();if(this.options.currentUrlFullReload&&el.href===window.location.href.split("#")[0]){el.setAttribute(attrState,"reload");this.reload();return}el.setAttribute(attrState,"load");options.triggerElement=el;this.loadUrl(el.href,options)};function checkIfShouldAbort(el,event){if(event.which>1||event.metaKey||event.ctrlKey||event.shiftKey||event.altKey){return"modifier"}if(el.protocol!==window.location.protocol||el.host!==window.location.host){return"external"}if(el.hash&&el.href.replace(el.hash,"")===window.location.href.replace(location.hash,"")){return"anchor"}if(el.href===window.location.href.split("#")[0]+"#"){return"anchor-empty"}}var isDefaultPrevented=function(event){return event.defaultPrevented||event.returnValue===false};module.exports=function(el){var that=this;el.setAttribute(attrState,"");on(el,"click",function(event){linkAction.call(that,el,event)});on(el,"keyup",function(event){if(event.keyCode===13){linkAction.call(that,el,event)}}.bind(this))}},{"../events/on":4,"../util/clone":20}],13:[function(require,module,exports){var clone=require("../util/clone");var newUid=require("../uniqueid");var trigger=require("../events/trigger");module.exports=function(responseText,request,href,options){options=clone(options||this.options);options.request=request;if(responseText===false){trigger(document,"pjax:complete pjax:error",options);return}var currentState=window.history.state||{};window.history.replaceState({url:currentState.url||window.location.href,title:currentState.title||document.title,uid:currentState.uid||newUid(),scrollPos:[document.documentElement.scrollLeft||document.body.scrollLeft,document.documentElement.scrollTop||document.body.scrollTop]},document.title,window.location.href);var oldHref=href;if(request.responseURL){if(href!==request.responseURL){href=request.responseURL}}else if(request.getResponseHeader("X-PJAX-URL")){href=request.getResponseHeader("X-PJAX-URL")}else if(request.getResponseHeader("X-XHR-Redirected-To")){href=request.getResponseHeader("X-XHR-Redirected-To")}var a=document.createElement("a");a.href=oldHref;var oldHash=a.hash;a.href=href;if(oldHash&&!a.hash){a.hash=oldHash;href=a.href}this.state.href=href;this.state.options=options;try{this.loadContent(responseText,options)}catch(e){trigger(document,"pjax:error",options);if(!this.options.debug){if(console&&console.error){console.error("Pjax switch fail: ",e)}return this.latestChance(href)}else{throw e}}}},{"../events/trigger":5,"../uniqueid":19,"../util/clone":20}],14:[function(require,module,exports){module.exports=function(){if(this.options.debug&&console){if(typeof console.log==="function"){console.log.apply(console,arguments)}else if(console.log){console.log(arguments)}}}},{}],15:[function(require,module,exports){var attrState="data-pjax-state";module.exports=function(el){switch(el.tagName.toLowerCase()){case"a":if(!el.hasAttribute(attrState)){this.attachLink(el)}break;case"form":if(!el.hasAttribute(attrState)){this.attachForm(el)}break;default:throw"Pjax can only be applied on <a> or <form> submit"}}},{}],16:[function(require,module,exports){var updateQueryString=require("./util/update-query-string");module.exports=function(location,options,callback){options=options||{};var queryString;var requestOptions=options.requestOptions||{};var requestMethod=(requestOptions.requestMethod||"GET").toUpperCase();var requestParams=requestOptions.requestParams||null;var formData=requestOptions.formData||null;var requestPayload=null;var request=new XMLHttpRequest;var timeout=options.timeout||0;request.onreadystatechange=function(){if(request.readyState===4){if(request.status===200){callback(request.responseText,request,location,options)}else if(request.status!==0){callback(null,request,location,options)}}};request.onerror=function(e){console.log(e);callback(null,request,location,options)};request.ontimeout=function(){callback(null,request,location,options)};if(requestParams&&requestParams.length){queryString=requestParams.map(function(param){return param.name+"="+param.value}).join("&");switch(requestMethod){case"GET":location=location.split("?")[0];location+="?"+queryString;break;case"POST":requestPayload=queryString;break}}else if(formData){requestPayload=formData}if(options.cacheBust){location=updateQueryString(location,"t",Date.now())}request.open(requestMethod,location,true);request.timeout=timeout;request.setRequestHeader("X-Requested-With","XMLHttpRequest");request.setRequestHeader("X-PJAX","true");request.setRequestHeader("X-PJAX-Selectors",JSON.stringify(options.selectors));if(requestPayload&&requestMethod==="POST"&&!formData){request.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}request.send(requestPayload);return request}},{"./util/update-query-string":24}],17:[function(require,module,exports){var forEachEls=require("./foreach-els");var defaultSwitches=require("./switches");module.exports=function(switches,switchesOptions,selectors,fromEl,toEl,options){var switchesQueue=[];selectors.forEach(function(selector){var newEls=fromEl.querySelectorAll(selector);var oldEls=toEl.querySelectorAll(selector);if(this.log){this.log("Pjax switch",selector,newEls,oldEls)}if(newEls.length!==oldEls.length){throw"DOM doesn’t look the same on new loaded page: ’"+selector+"’ - new "+newEls.length+", old "+oldEls.length}forEachEls(newEls,function(newEl,i){var oldEl=oldEls[i];if(this.log){this.log("newEl",newEl,"oldEl",oldEl)}var callback=switches[selector]?switches[selector].bind(this,oldEl,newEl,options,switchesOptions[selector]):defaultSwitches.outerHTML.bind(this,oldEl,newEl,options);switchesQueue.push(callback)},this)},this);this.state.numPendingSwitches=switchesQueue.length;switchesQueue.forEach(function(queuedSwitch){queuedSwitch()})}},{"./foreach-els":7,"./switches":18}],18:[function(require,module,exports){var on=require("./events/on");module.exports={outerHTML:function(oldEl,newEl){oldEl.outerHTML=newEl.outerHTML;this.onSwitch()},innerHTML:function(oldEl,newEl){oldEl.innerHTML=newEl.innerHTML;if(newEl.className===""){oldEl.removeAttribute("class")}else{oldEl.className=newEl.className}this.onSwitch()},switchElementsAlt:function(oldEl,newEl){oldEl.innerHTML=newEl.innerHTML;if(newEl.hasAttributes()){var attrs=newEl.attributes;for(var i=0;i<attrs.length;i++){oldEl.attributes.setNamedItem(attrs[i].cloneNode())}}this.onSwitch()},replaceNode:function(oldEl,newEl){oldEl.parentNode.replaceChild(newEl,oldEl);this.onSwitch()},sideBySide:function(oldEl,newEl,options,switchOptions){var forEach=Array.prototype.forEach;var elsToRemove=[];var elsToAdd=[];var fragToAppend=document.createDocumentFragment();var animationEventNames="animationend webkitAnimationEnd MSAnimationEnd oanimationend";var animatedElsNumber=0;var sexyAnimationEnd=function(e){if(e.target!==e.currentTarget){return}animatedElsNumber--;if(animatedElsNumber<=0&&elsToRemove){elsToRemove.forEach(function(el){if(el.parentNode){el.parentNode.removeChild(el)}});elsToAdd.forEach(function(el){el.className=el.className.replace(el.getAttribute("data-pjax-classes"),"");el.removeAttribute("data-pjax-classes")});elsToAdd=null;elsToRemove=null;this.onSwitch()}}.bind(this);switchOptions=switchOptions||{};forEach.call(oldEl.childNodes,function(el){elsToRemove.push(el);if(el.classList&&!el.classList.contains("js-Pjax-remove")){if(el.hasAttribute("data-pjax-classes")){el.className=el.className.replace(el.getAttribute("data-pjax-classes"),"");el.removeAttribute("data-pjax-classes")}el.classList.add("js-Pjax-remove");if(switchOptions.callbacks&&switchOptions.callbacks.removeElement){switchOptions.callbacks.removeElement(el)}if(switchOptions.classNames){el.className+=" "+switchOptions.classNames.remove+" "+(options.backward?switchOptions.classNames.backward:switchOptions.classNames.forward)}animatedElsNumber++;on(el,animationEventNames,sexyAnimationEnd,true)}});forEach.call(newEl.childNodes,function(el){if(el.classList){var addClasses="";if(switchOptions.classNames){addClasses=" js-Pjax-add "+switchOptions.classNames.add+" "+(options.backward?switchOptions.classNames.forward:switchOptions.classNames.backward)}if(switchOptions.callbacks&&switchOptions.callbacks.addElement){switchOptions.callbacks.addElement(el)}el.className+=addClasses;el.setAttribute("data-pjax-classes",addClasses);elsToAdd.push(el);fragToAppend.appendChild(el);animatedElsNumber++;on(el,animationEventNames,sexyAnimationEnd,true)}});oldEl.className=newEl.className;oldEl.appendChild(fragToAppend)}}},{"./events/on":4}],19:[function(require,module,exports){module.exports=function(){var counter=0;return function(){var id="pjax"+(new Date).getTime()+"_"+counter;counter++;return id}}()},{}],20:[function(require,module,exports){module.exports=function(obj){if(null===obj||"object"!==typeof obj){return obj}var copy=obj.constructor();for(var attr in obj){if(obj.hasOwnProperty(attr)){copy[attr]=obj[attr]}}return copy}},{}],21:[function(require,module,exports){module.exports=function contains(doc,selectors,el){for(var i=0;i<selectors.length;i++){var selectedEls=doc.querySelectorAll(selectors[i]);for(var j=0;j<selectedEls.length;j++){if(selectedEls[j].contains(el)){return true}}}return false}},{}],22:[function(require,module,exports){module.exports=function(target){if(target==null){return null}var to=Object(target);for(var i=1;i<arguments.length;i++){var source=arguments[i];if(source!=null){for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){to[key]=source[key]}}}}return to}},{}],23:[function(require,module,exports){module.exports=function(){}},{}],24:[function(require,module,exports){module.exports=function(uri,key,value){var re=new RegExp("([?&])"+key+"=.*?(&|$)","i");var separator=uri.indexOf("?")!==-1?"&":"?";if(uri.match(re)){return uri.replace(re,"$1"+key+"="+value+"$2")}else{return uri+separator+key+"="+value}}},{}]},{},[1])(1)});
|
package/js/clock.js
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
!function(){var t,n=[];const e=["#33B5E5","#0099CC","#AA66CC","#9933CC","#99CC00","#669900","#FFBB33","#FF8800","#FF4444","#CC0000"];var o=[],f=[[[0,0,1,1,1,0,0],[0,1,1,0,1,1,0],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,0,1,1,0],[0,0,1,1,1,0,0]],[[0,0,0,1,1,0,0],[0,1,1,1,1,0,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[1,1,1,1,1,1,1]],[[0,1,1,1,1,1,0],[1,1,0,0,0,1,1],[0,0,0,0,0,1,1],[0,0,0,0,1,1,0],[0,0,0,1,1,0,0],[0,0,1,1,0,0,0],[0,1,1,0,0,0,0],[1,1,0,0,0,0,0],[1,1,0,0,0,1,1],[1,1,1,1,1,1,1]],[[1,1,1,1,1,1,1],[0,0,0,0,0,1,1],[0,0,0,0,1,1,0],[0,0,0,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,1,1,0],[0,0,0,0,0,1,1],[0,0,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,1,1,1,0]],[[0,0,0,0,1,1,0],[0,0,0,1,1,1,0],[0,0,1,1,1,1,0],[0,1,1,0,1,1,0],[1,1,0,0,1,1,0],[1,1,1,1,1,1,1],[0,0,0,0,1,1,0],[0,0,0,0,1,1,0],[0,0,0,0,1,1,0],[0,0,0,1,1,1,1]],[[1,1,1,1,1,1,1],[1,1,0,0,0,0,0],[1,1,0,0,0,0,0],[1,1,1,1,1,1,0],[0,0,0,0,0,1,1],[0,0,0,0,0,1,1],[0,0,0,0,0,1,1],[0,0,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,1,1,1,0]],[[0,0,0,0,1,1,0],[0,0,1,1,0,0,0],[0,1,1,0,0,0,0],[1,1,0,0,0,0,0],[1,1,0,1,1,1,0],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,1,1,1,0]],[[1,1,1,1,1,1,1],[1,1,0,0,0,1,1],[0,0,0,0,1,1,0],[0,0,0,0,1,1,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[0,0,1,1,0,0,0],[0,0,1,1,0,0,0],[0,0,1,1,0,0,0],[0,0,1,1,0,0,0]],[[0,1,1,1,1,1,0],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,1,1,1,0],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,1,1,1,0]],[[0,1,1,1,1,1,0],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,1,0,1,1],[0,0,0,0,0,1,1],[0,0,0,0,0,1,1],[0,0,0,0,1,1,0],[0,0,0,1,1,0,0],[0,1,1,0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,1,1,0],[0,1,1,0],[0,0,0,0],[0,0,0,0],[0,1,1,0],[0,1,1,0],[0,0,0,0],[0,0,0,0]]];function a(t){for(var o=t.num,a=f[o],h=0;h<a.length;h++)for(var r=0;r<a[h].length;r++)if(1==a[h][r]){var u={offsetX:t.offsetX+7+14*r,offsetY:37+14*h,color:e[Math.floor(Math.random()*e.length)],g:1.5+Math.random(),vx:4*Math.pow(-1,Math.ceil(10*Math.random()))+Math.random(),vy:-5};n.push(u)}}function h(t){for(var e=0;e<n.length;e++)t.beginPath(),t.fillStyle=n[e].color,t.arc(n[e].offsetX,n[e].offsetY,7,0,2*Math.PI),t.fill()}function r(){for(var t=0,e=0;e<n.length;e++){var o=n[e];o.offsetX+=o.vx,o.offsetY+=o.vy,o.vy+=o.g,o.offsetY>243&&(o.offsetY=243,o.vy=.65*-o.vy),o.offsetX>7&&o.offsetX<813&&(n[t]=n[e],t++)}for(;t<n.length;t++)n.pop()}function u(t,n,e,o){for(var a=f[e],h=0;h<a.length;h++)for(var r=0;r<a[h].length;r++)1==a[h][r]&&(o.beginPath(),o.arc(t+7+14*r,n+7+14*h,7,0,2*Math.PI),o.fill());return o.beginPath(),t+=7*a[0].length*2}var l=document.getElementById("canvas");l.width=820,l.height=250,t=l.getContext("2d");new Date;setInterval((function(){t.clearRect(0,0,t.canvas.width,t.canvas.height),function(n){var e=[];t.fillStyle="#005EAC";var f=new Date,l=70,s=f.getHours(),v=Math.floor(s/10),g=s%10;e.push({num:v}),e.push({num:g}),e.push({num:10});var i=f.getMinutes();v=Math.floor(i/10),g=i%10,e.push({num:v}),e.push({num:g}),e.push({num:10});var m=f.getSeconds();v=Math.floor(m/10),g=m%10,e.push({num:v}),e.push({num:g});for(var c=0;c<e.length;c++)e[c].offsetX=l,l=u(l,30,e[c].num,n),c<e.length-1&&10!=e[c].num&&10!=e[c+1].num&&(l+=10);if(0==o.length)o=e;else for(var M=0;M<o.length;M++)o[M].num!=e[M].num&&(a(e[M]),o[M].num=e[M].num);h(n),r()}(t)}),50)}();
|
1
|
+
!function(){var t,n=[];const e=["#33B5E5","#0099CC","#AA66CC","#9933CC","#99CC00","#669900","#FFBB33","#FF8800","#FF4444","#CC0000"];var o=[],f=[[[0,0,1,1,1,0,0],[0,1,1,0,1,1,0],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,0,1,1,0],[0,0,1,1,1,0,0]],[[0,0,0,1,1,0,0],[0,1,1,1,1,0,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[1,1,1,1,1,1,1]],[[0,1,1,1,1,1,0],[1,1,0,0,0,1,1],[0,0,0,0,0,1,1],[0,0,0,0,1,1,0],[0,0,0,1,1,0,0],[0,0,1,1,0,0,0],[0,1,1,0,0,0,0],[1,1,0,0,0,0,0],[1,1,0,0,0,1,1],[1,1,1,1,1,1,1]],[[1,1,1,1,1,1,1],[0,0,0,0,0,1,1],[0,0,0,0,1,1,0],[0,0,0,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,1,1,0],[0,0,0,0,0,1,1],[0,0,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,1,1,1,0]],[[0,0,0,0,1,1,0],[0,0,0,1,1,1,0],[0,0,1,1,1,1,0],[0,1,1,0,1,1,0],[1,1,0,0,1,1,0],[1,1,1,1,1,1,1],[0,0,0,0,1,1,0],[0,0,0,0,1,1,0],[0,0,0,0,1,1,0],[0,0,0,1,1,1,1]],[[1,1,1,1,1,1,1],[1,1,0,0,0,0,0],[1,1,0,0,0,0,0],[1,1,1,1,1,1,0],[0,0,0,0,0,1,1],[0,0,0,0,0,1,1],[0,0,0,0,0,1,1],[0,0,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,1,1,1,0]],[[0,0,0,0,1,1,0],[0,0,1,1,0,0,0],[0,1,1,0,0,0,0],[1,1,0,0,0,0,0],[1,1,0,1,1,1,0],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,1,1,1,0]],[[1,1,1,1,1,1,1],[1,1,0,0,0,1,1],[0,0,0,0,1,1,0],[0,0,0,0,1,1,0],[0,0,0,1,1,0,0],[0,0,0,1,1,0,0],[0,0,1,1,0,0,0],[0,0,1,1,0,0,0],[0,0,1,1,0,0,0],[0,0,1,1,0,0,0]],[[0,1,1,1,1,1,0],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,1,1,1,0],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,1,1,1,0]],[[0,1,1,1,1,1,0],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[1,1,0,0,0,1,1],[0,1,1,1,0,1,1],[0,0,0,0,0,1,1],[0,0,0,0,0,1,1],[0,0,0,0,1,1,0],[0,0,0,1,1,0,0],[0,1,1,0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,1,1,0],[0,1,1,0],[0,0,0,0],[0,0,0,0],[0,1,1,0],[0,1,1,0],[0,0,0,0],[0,0,0,0]]];function a(t){for(var o=t.num,a=f[o],h=0;h<a.length;h++)for(var r=0;r<a[h].length;r++)if(1==a[h][r]){var u={offsetX:t.offsetX+7+14*r,offsetY:37+14*h,color:e[Math.floor(Math.random()*e.length)],g:1.5+Math.random(),vx:4*Math.pow(-1,Math.ceil(10*Math.random()))+Math.random(),vy:-5};n.push(u)}}function h(t){for(var e=0;e<n.length;e++)t.beginPath(),t.fillStyle=n[e].color,t.arc(n[e].offsetX,n[e].offsetY,7,0,2*Math.PI),t.fill()}function r(){for(var t=0,e=0;e<n.length;e++){var o=n[e];o.offsetX+=o.vx,o.offsetY+=o.vy,o.vy+=o.g,o.offsetY>243&&(o.offsetY=243,o.vy=.65*-o.vy),o.offsetX>7&&o.offsetX<813&&(n[t]=n[e],t++)}for(;t<n.length;t++)n.pop()}function u(t,n,e,o){for(var a=f[e],h=0;h<a.length;h++)for(var r=0;r<a[h].length;r++)1==a[h][r]&&(o.beginPath(),o.arc(t+7+14*r,n+7+14*h,7,0,2*Math.PI),o.fill());return o.beginPath(),t+=7*a[0].length*2}var l=document.getElementById("canvas");l.width=820,l.height=250,t=l.getContext("2d");new Date;setInterval((function(){t.clearRect(0,0,t.canvas.width,t.canvas.height),function(n){var e=[];t.fillStyle="#005EAC";var f=new Date,l=70,s=f.getHours(),v=Math.floor(s/10),g=s%10;e.push({num:v}),e.push({num:g}),e.push({num:10});var i=f.getMinutes();v=Math.floor(i/10),g=i%10,e.push({num:v}),e.push({num:g}),e.push({num:10});var m=f.getSeconds();v=Math.floor(m/10),g=m%10,e.push({num:v}),e.push({num:g});for(var c=0;c<e.length;c++)e[c].offsetX=l,l=u(l,30,e[c].num,n),c<e.length-1&&10!=e[c].num&&10!=e[c+1].num&&(l+=10);if(0==o.length)o=e;else for(var M=0;M<o.length;M++)o[M].num!=e[M].num&&(a(e[M]),o[M].num=e[M].num);h(n),r()}(t)}),50)}();
|
2
|
+
//# sourceMappingURL=../maps/js/clock.js.map
|
package/js/kslink.js
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
var leonus={linkCom:e=>{var t=document.querySelector(".el-textarea__inner");"bf"==e?(t.value="```yml\n",t.value+="- name: \n link: \n avatar: \n descr: \n rss: ",t.style.height="165px",t.value+="\n```",t.setSelectionRange(15,15)):(t.value="站点名称:\n站点地址:\n头像链接:\n站点描述:\nRSS地址:",t.style.height="205px",t.setSelectionRange(5,5)),t.focus()},owoBig:()=>{if(!document.getElementById("post-comment")||document.body.clientWidth<768)return;let e=1,t="",n=document.createElement("div"),o=document.querySelector("body");n.id="owo-big",o.appendChild(n),new MutationObserver((l=>{for(let i=0;i<l.length;i++){let s=l[i].addedNodes,a="";if(2==s.length&&"OwO-body"==s[1].className)a=s[1];else{if(1!=s.length||"tk-comment"!=s[0].className)continue;a=s[0]}a.onmouseover=l=>{e&&("OwO-body"==a.className&&"IMG"==l.target.tagName||"tk-owo-emotion"==l.target.className)&&(e=0,t=setTimeout((()=>{let e=3*l.path[0].clientHeight,t=3*l.path[0].clientWidth,i=l.x-l.offsetX-(t-l.path[0].clientWidth)/2,s=l.y-l.offsetY;i+t>o.clientWidth&&(i-=i+t-o.clientWidth+10),i<0&&(i=10),n.style.cssText=`display:flex; height:${e}px; width:${t}px; left:${i}px; top:${s}px;`,n.innerHTML=`<img src="${l.target.src}">`}),300))},a.onmouseout=()=>{n.style.display="none",e=1,clearTimeout(t)}}})).observe(document.getElementById("post-comment"),{subtree:!0,childList:!0})}};
|
1
|
+
var leonus={linkCom:e=>{var t=document.querySelector(".el-textarea__inner");"bf"==e?(t.value="```yml\n",t.value+="- name: \n link: \n avatar: \n descr: \n rss: ",t.style.height="165px",t.value+="\n```",t.setSelectionRange(15,15)):(t.value="站点名称:\n站点地址:\n头像链接:\n站点描述:\nRSS地址:",t.style.height="205px",t.setSelectionRange(5,5)),t.focus()},owoBig:()=>{if(!document.getElementById("post-comment")||document.body.clientWidth<768)return;let e=1,t="",n=document.createElement("div"),o=document.querySelector("body");n.id="owo-big",o.appendChild(n),new MutationObserver((l=>{for(let i=0;i<l.length;i++){let s=l[i].addedNodes,a="";if(2==s.length&&"OwO-body"==s[1].className)a=s[1];else{if(1!=s.length||"tk-comment"!=s[0].className)continue;a=s[0]}a.onmouseover=l=>{e&&("OwO-body"==a.className&&"IMG"==l.target.tagName||"tk-owo-emotion"==l.target.className)&&(e=0,t=setTimeout((()=>{let e=3*l.path[0].clientHeight,t=3*l.path[0].clientWidth,i=l.x-l.offsetX-(t-l.path[0].clientWidth)/2,s=l.y-l.offsetY;i+t>o.clientWidth&&(i-=i+t-o.clientWidth+10),i<0&&(i=10),n.style.cssText=`display:flex; height:${e}px; width:${t}px; left:${i}px; top:${s}px;`,n.innerHTML=`<img src="${l.target.src}">`}),300))},a.onmouseout=()=>{n.style.display="none",e=1,clearTimeout(t)}}})).observe(document.getElementById("post-comment"),{subtree:!0,childList:!0})}};
|
2
|
+
//# sourceMappingURL=../maps/js/kslink.js.map
|
package/js/newyear.js
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
function newYear(){if(!document.querySelector("#newYear"))return;let e=new Date("2024-02-10 00:00:00"),n=e.getTime()/1e3,t={0:"周日",1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六"};function a(e){return(e=Number(e))>9?e:"0"+e}!function r(){let l=new Date;document.querySelector("#newYear .today").innerHTML=l.getFullYear()+"-"+(l.getMonth()+1)+"-"+l.getDate()+" "+t[l.getDay()];let o=n-Math.round(l.getTime()/1e3);if(o<0)window.newYearTimer=null,document.querySelector("#newYear .title").innerHTML="Happy New Year!",document.querySelector("#newYear .newYear-time").innerHTML='<span class="happyNewYear">新年快乐</span>';else if(document.querySelector("#newYear .title").innerHTML="距离"+e.getFullYear()+"年春节:",o>86400)document.querySelector("#newYear .newYear-time").innerHTML=`<span class="day">${Math.ceil(o/86400)}</span><span class="unit">天</span>`;else{let e=a(parseInt(o/3600));o%=3600;let n=a(parseInt(o/60));o%=60;let t=a(o);document.querySelector("#newYear .newYear-time").innerHTML=`<span class="time">${e}:${n}:${t}</span></span>`,window.newYearTimer||(window.newYearTimer=setInterval(r,1e3))}}()}function newYearSwiper(){var e=new Swiper(".newYear-slider",{passiveListeners:!0,loop:!0,autoplay:{disableOnInteraction:!0,delay:5e3},effect:"fade",mousewheel:!0,autoHeight:!0}),n=document.querySelector(".newYear-slider");null!==n&&(n.onmouseenter=()=>{e.autoplay.stop()},n.onmouseleave=()=>{e.autoplay.start()})}function whenDOMReady(){newYear(),newYearSwiper()}whenDOMReady(),document.addEventListener("pjax:complete",whenDOMReady);
|
1
|
+
function newYear(){if(!document.querySelector("#newYear"))return;let e=new Date("2024-02-10 00:00:00"),n=e.getTime()/1e3,t={0:"周日",1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六"};function a(e){return(e=Number(e))>9?e:"0"+e}!function r(){let l=new Date;document.querySelector("#newYear .today").innerHTML=l.getFullYear()+"-"+(l.getMonth()+1)+"-"+l.getDate()+" "+t[l.getDay()];let o=n-Math.round(l.getTime()/1e3);if(o<0)window.newYearTimer=null,document.querySelector("#newYear .title").innerHTML="Happy New Year!",document.querySelector("#newYear .newYear-time").innerHTML='<span class="happyNewYear">新年快乐</span>';else if(document.querySelector("#newYear .title").innerHTML="距离"+e.getFullYear()+"年春节:",o>86400)document.querySelector("#newYear .newYear-time").innerHTML=`<span class="day">${Math.ceil(o/86400)}</span><span class="unit">天</span>`;else{let e=a(parseInt(o/3600));o%=3600;let n=a(parseInt(o/60));o%=60;let t=a(o);document.querySelector("#newYear .newYear-time").innerHTML=`<span class="time">${e}:${n}:${t}</span></span>`,window.newYearTimer||(window.newYearTimer=setInterval(r,1e3))}}()}function newYearSwiper(){var e=new Swiper(".newYear-slider",{passiveListeners:!0,loop:!0,autoplay:{disableOnInteraction:!0,delay:5e3},effect:"fade",mousewheel:!0,autoHeight:!0}),n=document.querySelector(".newYear-slider");null!==n&&(n.onmouseenter=()=>{e.autoplay.stop()},n.onmouseleave=()=>{e.autoplay.start()})}function whenDOMReady(){newYear(),newYearSwiper()}whenDOMReady(),document.addEventListener("pjax:complete",whenDOMReady);
|
2
|
+
//# sourceMappingURL=../maps/js/newyear.js.map
|
package/js/plane.js
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
(function(window){var JSONP=function(){var t,e,s,i=0,n=this;return{get:function(a,o,h){for(s in e="?",o=o||{})o.hasOwnProperty(s)&&(e+=encodeURIComponent(s)+"="+encodeURIComponent(o[s])+"&");var r="json"+ ++i;return n[r]=function(t){h(t);try{delete n[r]}catch(t){}n[r]=null},function(e){var s=document.createElement("script"),i=!1;s.src=e,s.async=!0,s.onload=s.onreadystatechange=function(){i||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(i=!0,s.onload=s.onreadystatechange=null,s&&s.parentNode&&s.parentNode.removeChild(s))},t||(t=document.getElementsByTagName("head")[0])||(t=document.body),t.appendChild(s)}(a+e+"callback="+r),r}}}(),CORS={request:function(t,e,s){if(this.calledByExtension())return this._callbacks[this._callbackId++]=s,void window.postMessage(JSON.stringify({from:"kickassapp-page",url:t,type:"callApi",params:e}),"*");e=e||{};var i="?";for(key in e)e.hasOwnProperty(key)&&(i+=encodeURIComponent(key)+"="+encodeURIComponent(e[key])+"&");var n=new XMLHttpRequest;n.onreadystatechange=function(){4==n.readyState&&s(JSON.parse(n.responseText))},n.open("GET",t+i),n.withCredentials=!0,n.setRequestHeader("Content-Type","application/json"),n.send()},calledByExtension:function(){return!!document.getElementById("kickass-has-been-initialized-yes-yes-yes")},_callbacks:{},_callbackId:0};function getGlobalNamespace(){return window&&window.INSTALL_SCOPE?window.INSTALL_SCOPE:window}CORS.calledByExtension()&&window.addEventListener("message",(function(t){var e;try{e=JSON.parse(t.data)}catch(t){return}if("kickassapp-extension"===e.from&&"kickassapp-extension-version1"===e.sanityCheck){var s=e.payload;"response"===s.type?(CORS._callbacks[s.requestId](s.body),delete CORS._callbacks[s.requestId]):"destroy"===s.type&&window.KICKASSGAME.destroy()}}),!1);var Class=function(t){var e=function(){return e.$prototyping?this:"function"==typeof this.initialize?this.initialize.apply(this,arguments):void 0};for(var s in t.Extends&&(e.parent=t.Extends,t.Extends.$prototyping=!0,e.prototype=new t.Extends,t.Extends.$prototyping=!1),t)t.hasOwnProperty(s)&&(e.prototype[s]=t[s]);return e};"undefined"!=typeof exports&&(exports.Class=Class);var Vector=new Class({initialize:function(t,e){"object"==typeof t?(this.x=t.x,this.y=t.y):(this.x=t,this.y=e)},cp:function(){return new Vector(this.x,this.y)},mul:function(t){return this.x*=t,this.y*=t,this},mulNew:function(t){return new Vector(this.x*t,this.y*t)},div:function(t){return this.x/=t,this.y/=t,this},divNew:function(t){return new Vector(this.x/t,this.y/t)},add:function(t){return this.x+=t.x,this.y+=t.y,this},addNew:function(t){return new Vector(this.x+t.x,this.y+t.y)},sub:function(t){return this.x-=t.x,this.y-=t.y,this},subNew:function(t){return new Vector(this.x-t.x,this.y-t.y)},rotate:function(t){var e=this.x,s=this.y;return this.x=e*Math.cos(t)-Math.sin(t)*s,this.y=e*Math.sin(t)+Math.cos(t)*s,this},rotateNew:function(t){return this.cp().rotate(t)},setAngle:function(t){var e=this.len();return this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},setAngleNew:function(t){return this.cp().setAngle(t)},setLength:function(t){var e=this.len();return e?this.mul(t/e):this.x=this.y=t,this},setLengthNew:function(t){return this.cp().setLength(t)},normalize:function(){var t=this.len();return 0==t||(this.x/=t,this.y/=t),this},normalizeNew:function(){return this.cp().normalize()},angle:function(){return Math.atan2(this.y,this.x)},collidesWith:function(t){return this.x>t.x&&this.y>t.y&&this.x<t.x+t.width&&this.y<t.y+t.height},len:function(){var t=Math.sqrt(this.x*this.x+this.y*this.y);return t<.005&&t>-.005?0:t},is:function(t){return"object"==typeof t&&this.x==t.x&&this.y==t.y},dot:function(t){return this.x*t.x+this.y*t.y},inTriangle:function(t,e,s){var i=s.subNew(t),n=e.subNew(t),a=p.subNew(t),o=i.dot(i),h=i.dot(n),r=i.dot(a),l=n.dot(n),c=n.dot(a),d=1/(o*l-h*h),u=(l*r-h*c)*d,m=(o*c-h*r)*d;return u>0&&m>0&&u+m<1},distanceFrom:function(t){return Math.sqrt(Math.pow(this.x-t.x,2),Math.pow(this.y-t.y,2))},toString:function(){return"[Vector("+this.x+", "+this.y+") angle: "+this.angle()+", length: "+this.len()+"]"}});"undefined"!=typeof exports&&(exports.Vector=Vector);var Rect=new Class({initialize:function(t,e,s,i){this.pos=new Vector(t,e),this.size={width:s,height:i}},hasPoint:function(t){return t.x>this.getLeft()&&t.x<this.getRight()&&t.y>this.getTop()&&t.y<this.getBottom()},setLeft:function(t){this.pos.x=t+this.size.width/2},setTop:function(t){this.pos.y=t+this.size.height/2},getLeft:function(){return this.pos.x-this.size.width/2},getTop:function(){return this.pos.y-this.size.height/2},getRight:function(){return this.pos.x+this.size.width/2},getBottom:function(){return this.pos.y+this.size.height/2},cp:function(){return new Rect(this.pos.x,this.pos.y,this.size.width,this.size.height)}});"undefined"!=typeof exports&&(exports.Rect=Rect);var Fx=new Class({initialize:function(){this.listeners=[],this.tweens={},this.running={}},addListener:function(t){this.listeners.push(t)},add:function(t,e){if((e=e||{}).duration=e.duration||500,e.transition=e.transition||Tween.Linear,e.repeats=void 0!==e.repeats&&e.repeats,!e.tweens){var s=e.start||0,i=void 0===e.end?1:e.end;e.tweens=[[s,i]]}this.tweens[t]=e},update:function(t){for(var e in t="number"==typeof t?t:now(),this.tweens)if(this.tweens.hasOwnProperty(e)){if(!this.running[e]){this.tweenStart(e,t);continue}var s=this.tweens[e],i=t-this.running[e].startTime;if(i>s.duration){this.tweenFinished(s,e);continue}for(var n,a=s.transition(i/s.duration),o=[],h=0;n=s.tweens[h];h++){var r=a*(n[1]-n[0])+n[0];o.push(r)}this.fire(e,o,a)}},tweenStart:function(t,e){this.running[t]={startTime:e};for(var s,i=[],n=0;s=this.tweens[t].tweens[n];n++)i.push(s[0]);this.fire(t,i,0)},tweenFinished:function(t,e){for(var s,i=[],n=0;s=t.tweens[n];n++)i.push(s[1]);if(this.fire(e,i,1),!t.repeats)return delete this.running[e],void delete this.tweens[e];this.tweenStart(e,now())},fire:function(t,e,s){for(var i,n=0;i=this.listeners[n];n++)i.set.call(i,t,e,s)}}),Tween={Linear:function(t){return t},Quadratic:function(t){return t*t},Quintic:function(t){return t*t*t},Shake:function(t){return Math.sin(t)}},GameGlobals={FPS:60,useAnimationFrame:!0,boids:{flockRadius:400,size:100},path:function(){return"https://kickassapp.com/"+Array.prototype.slice.call(arguments).join("")},hasCanvas:void 0!==document.createElement("canvas").getContext,bulletColor:"black"};function now(){return(new Date).getTime()}function bind(t,e){return function(){return e.apply(t,arguments)}}function each(t,e,s){if("function"==typeof t.forEach)return t.forEach(e,s),t;for(var i in t)t.hasOwnProperty(i)&&e.call(s||window,t[i],i);return t}function addEvent(t,e,s){t.addEventListener?t.addEventListener(e,s,!1):t.attachEvent&&(t["e"+e+s]=s,t[e+s]=function(){return t["e"+e+s](window.event)},t.attachEvent("on"+e,t[e+s]))}function removeEvent(t,e,s){t.removeEventListener?t.removeEventListener(e,s,!1):t.detachEvent&&(t.detachEvent("on"+e,t[e+s]),t[e+s]=null,t["e"+e+s]=null)}function stopEvent(t){t.stopPropogation&&t.stopPropogation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function elementIsContainedIn(t,e){return element.contains?t.contains(e):!!(16&t.compareDocumentPosition(e))}function code(t){var e={38:"up",40:"down",37:"left",39:"right",27:"esc"};return e[t]?e[t]:String.fromCharCode(t)}function random(t,e){return Math.floor(Math.random()*(e-t+1)+t)}function getRect(t){if("function"==typeof t.getBoundingClientRect){var e=t.getBoundingClientRect(),s=window.pageXOffset,i=window.pageYOffset;return{width:e.width,height:e.height,left:e.left+s,top:e.top+i}}e={width:t.offsetWidth,height:t.offsetHeight,left:0,top:0};for(var n=t;n;)e.left+=n.offsetLeft,e.top+=n.offsetTop,n=n.offsetParent;return e}function getCompatElement(){var t=document;return t.compatMode&&"CSS1Compat"!=t.compatMode?t.body:t.documentElement}function getScrollSize(){var t=getCompatElement(),e={x:t.clientWidth,y:t.clientHeight},s=document.body;return{x:Math.max(t.scrollWidth,s.scrollWidth,e.x),y:Math.max(t.scrollHeight,s.scrollHeight,e.y)}}function getStyle(t,e){return t.style[e]?t.style[e]:t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function setStyles(t,e){for(var s in e)if(e.hasOwnProperty(s)){var i=e[s];"number"==typeof i&&"opacity"!==s&&"zIndex"!==s&&(i+="px"),t.style[s]=i}}function hasClass(t,e){return t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function addClass(t,e){hasClass(t,e)||(t.className+=" "+e)}function removeClass(t,e){if(hasClass(t,e)){var s=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(s," ")}}function cloneElement(t){return t.cloneNode(!0)}function newElement(t,e){var s=document.createElement(t);for(var i in e)e.hasOwnProperty(i)&&("styles"===i?setStyles(s,e[i]):s[i]=e[i]);return s}window.GameGlobals=GameGlobals,Array.prototype.indexOf||(Array.prototype.indexOf=function(t){if(null==this)throw new TypeError;var e=Object(this),s=e.length>>>0;if(0===s)return-1;var i=0;if(arguments.length>0&&((i=Number(arguments[1]))!=i?i=0:0!==i&&i!==1/0&&i!==-1/0&&(i=(i>0||-1)*Math.floor(Math.abs(i)))),i>=s)return-1;for(var n=i>=0?i:Math.max(s-Math.abs(i),0);n<s;n++)if(n in e&&e[n]===t)return n;return-1});var requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t,e){window.setTimeout(t,1e3/60)};function delay(t,e,s){return setTimeout(bind(s,e),t)}var KickAss=new Class({initialize:function(t){t&&t.mySite&&(this.mySite=t.mySite),this.players=[],this.elements=[],this.weaponClass=Weapons[1].cannonClass,this.scrollPos=new Vector(0,0),this.scrollSize=new Vector(0,0),this.windowSize={width:0,height:0},this.updateWindowInfo(),this.bulletManager=new BulletManager(this),this.bulletManager.updateEnemyIndex(),this.explosionManager=new ExplosionManager(this),this.ui=new UIManager(this),this.bombManager=new BombManager(this),this.menuManager=new MenuManager(this),this.menuManager.create(),void 0!==StatisticsManager&&(this.statisticsManager=new StatisticsManager(this)),this.sessionManager=new SessionManager(this),this.lastUpdate=now(),this.keyMap={},this.keydownEvent=bind(this,this.keydown),this.keyupEvent=bind(this,this.keyup),this.multiplier=10,this.isCampaign()?this.audioManager={explosion:new AudioManager(GameGlobals.path("static/sounds/game/explosion"),["mp3","ogg"]),shot:new AudioManager(GameGlobals.path("static/sounds/game/shot"),["mp3","ogg"])}:this.audioManager={},window.KickAssStyle&&"white"===window.KickAssStyle&&(GameGlobals.bulletColor="white"),addEvent(document,"keydown",this.keydownEvent),addEvent(document,"keyup",this.keyupEvent),addEvent(document,"keypress",this.keydownEvent)},begin:function(){this.addPlayer(),this.sessionManager.isPlaying=!0,GameGlobals.useAnimationFrame||(this.loopTimer=window.setInterval(bind(this,this.loop),1e3/GameGlobals.FPS)),GameGlobals.useAnimationFrame&&requestAnimFrame(bind(this,this.loop))},keydown:function(t){var e=code(t.keyCode);switch(this.keyMap[e]=!0,e){case"left":case"right":case"up":case"down":case"esc":case" ":stopEvent(t)}if("esc"===e)this.destroy()},keyup:function(t){var e=code(t.keyCode);switch(this.keyMap[e]=!1,e){case"left":case"right":case"up":case"down":case"esc":case" ":t.stopPropogation&&t.stopPropogation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}},loop:function(){var t=now(),e=(t-this.lastUpdate)/1e3;this.updateWindowInfo();for(var s,i=0;s=this.players[i];i++)s.update(e);this.bulletManager.update(e),this.bombManager.update(e),this.explosionManager.update(e),this.ui.update(e),this.statisticsManager&&this.statisticsManager.update(e),this.sessionManager.update(e),this.lastUpdate=t,GameGlobals.useAnimationFrame&&requestAnimFrame(bind(this,this.loop))},addPlayer:function(){var t=Ships.Standard;window.KICKASSSHIP&&window.KICKASSSHIP.points&&(t=KICKASSSHIP),this.mySite&&this.mySite.getShipConfig()&&(t=this.mySite.getShipConfig());var e=new Player(this);e.setShip(t),this.players.push(e),this.explosionManager.addExplosion(e.pos)},registerElement:function(t){if(!t)throw new Error("Can't register unexisting element.");this.elements.push(t)},unregisterElement:function(t){this.elements.splice(this.elements.indexOf(t),1)},isKickAssElement:function(t){for(var e,s=0;e=this.elements[s];s++)if(t===e||elementIsContainedIn(e,t))return!0;return!1},isKeyPressed:function(t){return!!this.keyMap[t]},updateWindowInfo:function(){var t=!!window.ActiveXObject&&"BackCompat"==document.compatMode;this.windowSize={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight},t&&(this.windowSize.width=document.body.clientWidth,this.windowSize.height=document.body.clientHeight),this.menuManager&&this.menuManager.isVisible()&&(this.windowSize.height-=this.menuManager.getHeight()),this.scrollPos.x=window.pageXOffset||document.documentElement.scrollLeft,this.scrollPos.y=window.pageYOffset||document.documentElement.scrollTop,this.scrollSize=getScrollSize()},hideAll:function(){for(var t,e=0;t=this.elements[e];e++)t.style.visibility="hidden"},showAll:function(){for(var t,e=0;t=this.elements[e];e++)t.style.visibility="visible"},updateShips:function(t,e){e||this.ui.showMessage("You're now flying<br /><em>"+t.name+"<em>!!");for(var s,i=0;s=this.players[i];i++)s.setShip(t)},changeWeapon:function(t,e){this.weaponClass=t.cannonClass,e||this.ui.showMessage("Changed to "+t.name.toUpperCase()+"!!!!");for(var s,i=0;s=this.players[i];i++)s.setCannons(t.cannonClass)},changeWeaponById:function(t,e){Weapons[t]&&this.changeWeapon(Weapons[t],e)},flyOutPlayers:function(t,e){for(var s,i=0;s=this.players[i];i++)s.flyTo(t,-s.size.height),s.isBound=!1},flyInPlayers:function(){for(var t,e=0;t=this.players[e];e++)t.flyTo(t.pos.x,100,(function(){this.isBound=!0}))},newRank:function(t){this.ui.showMessage("OMG. You leveled up to: <strong>"+t+"</strong>!<br /><small>Be sure to check what cool new stuff you get in the menu.</small>")},fireBomb:function(){this.bombManager.blow()},destroy:function(){removeEvent(document,"keydown",this.keydownEvent),removeEvent(document,"keypress",this.keydownEvent),removeEvent(document,"keyup",this.keyupEvent);for(var t,e=0;t=this.players[e];e++)t.destroy();this.bulletManager.destroy(),this.explosionManager.destroy(),this.menuManager.destroy(),GameGlobals.useAnimationFrame||clearInterval(this.loopTimer),getGlobalNamespace().KICKASSGAME=!1,this.isCampaign()&&document.location.reload()},isCampaign:function(){return getGlobalNamespace().IS_CLOUDFLARE_GAME},isMySite:function(){return!!getGlobalNamespace().KICKASS_SITE_KEY},shouldShowAd:function(){return!this.mySite&&!this.isCampaign()},shouldShowMenu:function(){return!this.mySite&&!this.isCampaign()},shouldShowHowToImage:function(){return this.mySite||this.isCampaign()}});window.KickAss=KickAss;var StatisticsManager=new Class({initialize:function(t){this.game=t,this.data={},this.data.startedPlaying=now(),this.data.elementsDestroyed=0,this.data.shotsFired=0,this.data.distanceFlownInPixels=0,this.data.totalPointsThisSession=0,this.data.usedThrusters=0,this.lastUpdate=0},usedThrusters:function(){this.data.usedThrusters=1},increaseDistanceWithPixels:function(t){this.data.distanceFlownInPixels+=t},increasePointsGainedWithPoints:function(t){this.data.totalPointsThisSession+=t},addShotFired:function(){this.data.shotsFired++,this.game.audioManager.shot&&this.game.audioManager.shot.play()},addElementsDestroyed:function(){this.data.elementsDestroyed++},update:function(t){this.lastUpdate+=t,this.lastUpdate>.25&&(this.syncWithServer(),this.lastUpdate=0)},syncWithServer:function(){var t=[];for(var e in this.data)this.data.hasOwnProperty(e)&&t.push(e+":"+this.data[e]);this.game.menuManager.sendMessageToMenu("stats:!"+t.join("|"))}}),MySite=new Class({initialize:function(t){this.key=t},load:function(t){CORS.request(GameGlobals.path("mysite/api.json"),{site_key:this.key,url:document.location.toString()},bind(this,(function(e){e&&e.embed?(this.mySiteData=e.embed,t(!0)):t(!1)})))},install:function(){},getShipId:function(){return this.mySiteData&&this.mySiteData.settings.ship},getShipConfig:function(){return this.mySiteData&&this.mySiteData.settings.ship_config},getShareURL:function(){return this.mySiteData&&this.mySiteData.settings.share_url}}),Menu=new Class({initialize:function(t){this.game=t,this.size={height:300}},generate:function(t){this.container=document.createElement("div"),this.container.className="KICKASSELEMENT",this.container.id="kickass-profile-menu",t.appendChild(this.container);var e=getGlobalNamespace().KICKASSSHIPID||"";this.url=GameGlobals.path("intermediate_postmessage.html?url="+encodeURIComponent(getGlobalNamespace().KICKASSURL||document.location.href)+"&origin="+encodeURIComponent(document.location.href)+"&preship="+e+"&is_campaign="+(this.game.isCampaign()?"true":"")+"&is_mysite="+(this.game.isMySite()?"true":"")),this.isSocketReady=!1,this.socketIframe=document.createElement("iframe"),this.socketIframe.frameborder="0",this.socketIframe.className="KICKASSELEMENT",this.socketIframe.width="100%",this.socketIframe.height=this.size.height+"px",this.container.appendChild(this.socketIframe),this.menuOrigin="https://kickassapp.com/".replace(/\/$/,""),this.socketIframe.src=this.url,this.onMessage=bind(this,(function(t){if(t.origin===this.menuOrigin||t.origin===this.menuOrigin.replace("http://","https://")){var e=t.data;if("ready"!==e){var s=e.split(":!");if(2===s.length){var i=s.shift().replace(/^./g,(function(t){return t.charAt(0).toUpperCase()}));"function"==typeof this["messageType"+i]&&this["messageType"+i](s.join(":!"))}}else this.onGameReady()}else console.log("ignoring event from",t.origin)})),window.addEventListener("message",this.onMessage,!1),this.game.registerElement(this.container)},socketPostMessage:function(t){this.socketIframe.contentWindow.postMessage(t,this.menuOrigin)},onGameReady:function(){this.isSocketReady=!0,this.game.registerElement(this.container.getElementsByTagName("iframe")[0]),this.socketPostMessage("url:!"+(getGlobalNamespace().KICKASSURL||document.location.href)),this.game.statisticsManager&&this.game.statisticsManager.syncWithServer(),this.game.menuManager.onGameReady()},sendMessage:function(t){if(this.isSocketReady&&t!=this.lastMessage){try{this.socketPostMessage(t)}catch(t){}this.lastMessage=t}},messageTypeChangeShip:function(t){var e=(t=t.split(","))[0],s=(t[1],"initial"===t[2]);this.shipId!==e&&(s&&getGlobalNamespace().KICKASSSHIP||(this.shipId=e,CORS.request(GameGlobals.path("designer/ship/"+e+"/construction.json"),{ship_id:e,is_initial:s?"1":"0"},bind(this,(function(t){this.game.updateShips(t.data,s);try{window.focus()}catch(t){}}))),s||this.parent.hideMenu()))},messageTypeChangeWeapon:function(t,e){this.game.changeWeaponById(t,e)},messageTypeSetMultiplier:function(t){t=parseInt(t,10),!isNaN(t)&&t&&(this.game.multiplier=t)},messageTypeNewRank:function(t){this.game.newRank(t)},messageTypePlayerMessage:function(t){this.game.ui.showMessage(t)},destroy:function(){this.game.unregisterElement(this.container),this.game.unregisterElement(this.iframe),window.removeEventListener("message",this.onMessage,!1),this.container.parentNode.removeChild(this.container)}}),MenuManager=new Class({initialize:function(t){this.game=t,this.numPoints=0,getGlobalNamespace().KICKASS_INLINE_CSS||this.includeCSS(GameGlobals.path("css/menustyles.css"))},generateDefaults:function(){for(var t in Weapons)Weapons.hasOwnProperty(t)&&this.addWeapon(Weapons[t],t);this.hideBombMenu()},create:function(){this.container=document.createElement("div"),this.container.className="KICKASSELEMENT KICKASShidden "+(this.game.shouldShowMenu()?"":"KICKASSNOMENU"),this.container.id="kickass-menu",this.game.shouldShowMenu()?(this.container.style.bottom="-250px",this.container.style.display="none"):removeClass(this.container,"KICKASShidden"),getAppContainerElement().appendChild(this.container);this.container.innerHTML='<div id="kickass-howto-image" class="KICKASSELEMENT kickass-howto-invisible"></div><div id="kickass-pointstab" style="width: 200px;" class="KICKASSELEMENT"><div id="kickass-bomb-menu" class="KICKASSELEMENT KICKASShidden"><ul id="kickass-bomb-list" class="KICKASSELEMENT"></ul></div><div id="kickass-weapons-menu" class="KICKASSELEMENT KICKASShidden" style="display:none"><ul id="kickass-weapons-list" class="KICKASSELEMENT"></ul></div><div id="kickass-pointstab-wrapper" class="KICKASSELEMENT"><div id="kickass-points" class="KICKASSELEMENT">'+this.numPoints+'</div><div id="kickass-esctoquit" class="KICKASSELEMENT">Press esc to quit</div>'+this.getShareHTML()+"</div></div>",this.pointsTab=document.getElementById("kickass-pointstab"),this.pointsTabWrapper=document.getElementById("kickass-pointstab-wrapper"),this.points=document.getElementById("kickass-points"),this.escToQuit=document.getElementById("kickass-esctoquit"),this.howToImage=document.getElementById("kickass-howto-image"),this.weaponsMenu=document.getElementById("kickass-weapons-menu"),this.weaponsList=document.getElementById("kickass-weapons-list"),this.bombLink=document.getElementById("kickass-bomb-menu");for(var t=this.container.getElementsByTagName("*"),e=0;e<t.length;e++)this.game.registerElement(t[e]);this.game.registerElement(this.container),this.game.shouldShowMenu()?(this.menu=new Menu(this.game),this.menu.parent=this,this.menu.generate(this.container)):setTimeout(function(){this.onGameReady()}.bind(this),100),addEvent(this.bombLink,"click",bind(this,(function(t){stopEvent(t),this.game.fireBomb()}))),addEvent(this.pointsTabWrapper,"click",bind(this,this.toggleMenu)),addEvent(this.weaponsMenu,"click",bind(this,this.toggleWeaponsMenu)),this.generateDefaults()},getShareHTML:function(){return""},onGameReady:function(){this.container.style.display="block",this.game.shouldShowHowToImage()&&(setTimeout(bind(this,(function(){removeClass(this.howToImage,"kickass-howto-invisible")})),10),setTimeout(bind(this,(function(){addClass(this.howToImage,"kickass-howto-invisible")})),4e3))},navigateTo:function(t,e){e||this.showMenu(),this.menu&&this.menu.socketPostMessage("navigate:!"+t)},toggleMenu:function(){this.game.shouldShowMenu()?hasClass(this.container,"KICKASShidden")?this.showMenu():this.hideMenu():this.showMenu()},toggleWeaponsMenu:function(){hasClass(this.weaponsMenu,"KICKASShidden")?this.showWeaponsMenu():this.hideWeaponsMenu()},hideWeaponsMenu:function(){this.weaponsMenu.style.width="",addClass(this.weaponsMenu,"KICKASShidden")},showWeaponsMenu:function(){var t=this.weaponsMenu.getElementsByTagName("li");t=t[t.length-1],this.weaponsMenu.style.width=t.offsetLeft+t.offsetWidth-47+"px",removeClass(this.weaponsMenu,"KICKASShidden")},showMenu:function(){this.game.shouldShowMenu()&&(this.container.style.bottom="",removeClass(this.container,"KICKASShidden"))},hideMenu:function(){this.container.style.bottom="",addClass(this.container,"KICKASShidden")},showBombMenu:function(){this.bombLink.style.width=""},hideBombMenu:function(){this.bombLink.style.width="0px"},getHeight:function(){return this.container.clientHeight},isVisible:function(){return!hasClass(this.container,"KICKASShidden")},addPoints:function(t,e){var s=t*this.game.multiplier;this.numPoints+=s,this.points.innerHTML=this.numPoints,this.game.statisticsManager&&this.game.statisticsManager.increasePointsGainedWithPoints(s),this.game.ui.addPointsBubbleAt(e,s)},includeCSS:function(t){var e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href=t,(document.head||document.body).appendChild(e)},sendMessageToMenu:function(t){this.menu&&this.menu.sendMessage(t)},addWeapon:function(t,e){var s=document.createElement("li");s.className="KICKASSELEMENT kickass-weapon-item",s.weapon=t,s.style.backgroundImage="url("+GameGlobals.path("css/gfx/kickass/weap-"+t.id+".png")+")",s.innerHTML='<span class="KICKASSELEMENT">'+t.name+"</span>",this.weaponsList.appendChild(s),addEvent(s,"click",bind(this,(function(s){stopEvent(s),this.changeWeapon(t),this.sendMessageToMenu("changeWeapon:!"+e)})))},changeWeapon:function(t){this.game.changeWeapon(t)},destroy:function(){for(var t=this.container.getElementsByTagName("*"),e=0;e<t.length;e++)this.game.unregisterElement(t[e]);this.game.unregisterElement(this.container),this.menu&&this.menu.destroy(),this.container.parentNode.removeChild(this.container)}}),UIManager=new Class({initialize:function(t){this.UNIQID=0,this.game=t,this.pointBubbles={},this.messages={},this.fx=new Fx,this.fx.addListener(this)},update:function(t){this.fx.update()},set:function(t,e,s){var i=t.split("-")[0],n=t.split("-")[1];if(this.pointBubbles[n]){var a=this.pointBubbles[n];a.style.top=e[0]+"px",a.style.opacity=e[1],1==s&&a.parentNode&&(a.parentNode.removeChild(a),delete this.pointBubbles[n])}else if(this.messages[n]&&"messagedown"==i){(o=this.messages[n]).style.top=e[0]+"px",1==s&&setTimeout(bind(this,(function(){this.fx.add("messageup-"+n,{tweens:[[e[0],-100]],transition:Tween.Quadratic,duration:300})})),o.staytime||4e3)}else if(this.messages[n]&&"messageup"==i){var o;(o=this.messages[n]).style.top=e[0]+"px",1==s&&(o.parentNode.removeChild(o),delete this.messages[n])}},addPointsBubbleAt:function(t,e){var s="bubble"+this.UNIQID++,i=this.game.scrollPos.y+t.y,n=newElement("span",{innerHTML:e,className:"KICKASSELEMENT",styles:{position:"absolute",font:"20px Arial",fontWeight:"bold",opacity:"1",color:"black",textShadow:"#fff 1px 1px 3px",top:i,zIndex:"10000000"}});n.style.left=t.x-n.offsetWidth/2+"px",getAppContainerElement().appendChild(n),this.pointBubbles[s]=n,this.fx.add("bubble-"+s,{tweens:[[i,i-15],[1,0]]})},showMessage:function(t,e){e=e||!1;var s=this.UNIQID++,i=newElement("div",{innerHTML:t,className:"KICKASSELEMENT",id:"kickass-message-"+s,styles:{position:"fixed",top:-100,left:"50%",marginLeft:-150,width:300,background:"#222",opacity:.8,padding:"10px",color:"#fff",textAlign:"center",borderRadius:15,font:"20px Arial",fontWeight:"bold",zIndex:"10000000"}});i.staytime=e,getAppContainerElement().appendChild(i);var n=this.getLowestBubbleY();return i.kickassto=n,this.fx.add("messagedown-"+s,{duration:300,tweens:[[-100,n]],transition:Tween.Quadratic}),this.messages[s]=i,i},getLowestBubbleY:function(){var t=100;for(var e in this.messages)this.messages.hasOwnProperty(e)&&(t=Math.max(this.messages[e].kickassto+this.messages[e].offsetHeight+10,t));return t}}),AudioManager=new Class({initialize:function(t,e){if(this.src=t,this.formats=e,channels=8,this.supportsAudio=void 0!==document.createElement("audio").play,this.supportsAudio){this.numChannels=channels,this.channels=[];for(var s=0;s<this.numChannels;s++)this.channels.push({isPlaying:!1,element:this.prepareElement(this.buildAudioElement())})}},buildAudioElement:function(){for(var t,e={ogg:"audio/ogg",mp3:"audio/mpeg"},s=document.createElement("audio"),i=0;t=this.formats[i];i++){var n=document.createElement("source");n.src=this.src+"."+t,n.type=e[t],s.appendChild(n)}return s},prepareElement:function(t){if(void 0===t.addEventListener)return t;var e=this;return t.addEventListener("ended",(function(s){e.audioEnded(t)}),!1),t},audioEnded:function(t){for(var e,s=0;e=this.channels[s];s++)e.element===t&&(e.isPlaying=!1)},play:function(){if(this.supportsAudio)for(var t,e=0;t=this.channels[e];e++)if(!t.isPlaying)return t.isPlaying=!0,void("function"==typeof t.element.play&&t.element.play())}}),Ships={Standard:{points:[[-10,10],[0,-15],[10,10]],thrusters:[{s:{w:20,h:7},p:{x:0,y:14},a:0}],cannons:[{p:{x:0,y:-15},a:0}]}},PLAYERIDS=0,Player=new Class({initialize:function(t){this.id=PLAYERIDS++,this.game=t,this.tween=!1,this.isBound=!0,this.pos=new Vector(1630,217),this.vel=new Vector(0,0),this.acc=new Vector(0,0),this.dir=new Vector(0,1),this.currentRotation=0,this.isBroken=!1,this.lineOffsets=[],this.deadTime=0,this.friction=.95,this.terminalVelocity=2e3,this.lastPos=new Vector(0,0)},setShip:function(t){this.ship=t,this.verts=[];for(var e,s=0;e=this.ship.points[s];s++)this.verts.push(new Vector(e[0],e[1]));this.verts.push(this.verts[0]),this.thrusters=[],this.cannons=[],this.addThrusters(this.ship.thrusters),this.addCannons(this.ship.cannons),this.size=this.getSizeFromVertsAndObjects(),this.bounds=this.calculateBounds(),this.sheet&&this.sheet.destroy(),this.sheet=new Sheet(new Rect(100,100,this.bounds.x,this.bounds.y)),this.forceRedraw=!0},setCannons:function(t){for(var e,s=[],i=0;e=this.cannons[i];i++){var n=new t(this,this.game,e.pos.x,e.pos.y,e.angle);s.push(n),e.destroy()}this.cannons=s},addThrusters:function(t){for(var e,s=0;e=t[s];s++){var i=new Thruster(e);this.thrusters.push(i)}},addCannons:function(t){for(var e,s=0;e=t[s];s++){var i=new(WeaponMap[e.m]||WeaponMap.cannon).cannonClass(this,this.game,e.p.x,e.p.y,e.a);i.player=this,i.game=this.game,this.cannons.push(i)}},update:function(t){if(this.isBroken){if(!this.lineOffsets.length)for(var e=0;e<this.verts.length-1;e++)this.lineOffsets[e]={pos:new Vector(0,0),dir:new Vector(1,1).setAngle(2*Math.PI*Math.random())};for(e=0;e<this.lineOffsets.length;e++)this.lineOffsets[e].pos.add(this.lineOffsets[e].dir.cp().setLength(50).mul(t));return this.sheet.clear(),this.sheet.setAngle(this.dir.angle()),this.sheet.setPosition(this.pos),this.sheet.drawBrokenPlayer(this.verts,this.lineOffsets),void(now()-this.deadTime>1e3&&(this.isBroken=!1,this.lineOffsets=[],this.randomPos()))}this.tween||(this.game.isKeyPressed("left")||this.game.isKeyPressed("right")?(this.game.isKeyPressed("left")&&this.rotateLeft(t),this.game.isKeyPressed("right")&&this.rotateRight(t)):this.stopRotate(),this.game.isKeyPressed("up")?this.activateThrusters():this.stopThrusters()),this.game.isKeyPressed(" ")?(this.isShooting=!0,this.isBroken||this.shootPressed()):this.isShooting&&(this.isShooting=!1,this.shootReleased()),this.currentRotation&&this.dir.setAngle(this.dir.angle()+this.currentRotation*t);var s=this.acc.mulNew(t).sub(this.vel.mulNew(t*this.friction));this.vel.add(s),this.vel.len()>this.terminalVelocity&&this.vel.setLength(this.terminalVelocity);var i=this.vel.mulNew(t);this.pos.add(i),this.game.statisticsManager&&this.game.statisticsManager.increaseDistanceWithPixels(i.len());var n=!this.acc.is({x:0,y:0});for(e=0;a=this.thrusters[e];e++)a.setIsShown(n),a.update(t);if(this.isBound&&this.checkBounds(),!this.lastPos.is(this.pos)||this.currentRotation||this.forceRedraw){if(this.forceRedraw=!1,this.sheet.clear(),this.sheet.setAngle(this.dir.angle()+Math.PI/2),this.sheet.setPosition(this.pos),n){var a;for(e=0;a=this.thrusters[e];e++)a.drawTo(this.sheet)}this.sheet.drawPlayer(this.verts),this.lastPos=this.pos.cp()}var o;for(e=0;o=this.cannons[e];e++)o.update(t)},randomPos:function(){var t=this.game.windowSize.width,e=this.game.windowSize.height;this.pos=new Vector(random(0,t),random(0,e))},checkBounds:function(){if(!this.tween){var t=this.game.windowSize.width,e=this.game.windowSize.height,s=this.pos.x+this.sheet.rect.size.width/2,i=this.pos.y+this.sheet.rect.size.height/2;s>t?(window.scrollTo(this.game.scrollPos.x+50,this.game.scrollPos.y),this.pos.x=0):this.pos.x<0&&(window.scrollTo(this.game.scrollPos.x-50,this.game.scrollPos.y),this.pos.x=t-this.sheet.rect.size.width/2),i>e?(window.scrollTo(this.game.scrollPos.x,this.game.scrollPos.y+.75*e),this.pos.y=0):this.pos.y<0&&(window.scrollTo(this.game.scrollPos.x,this.game.scrollPos.y-.75*e),this.pos.y=e-this.sheet.rect.size.height/2)}},inRect:function(t){for(var e,s=!1,i=0;e=this.verts[i];i++)t.hasPoint(new Vector(e.x+this.pos.x,e.y+this.pos.y))&&(s=!0);return s},hit:function(t){this.isBroken||(this.isBroken=!0,this.deadTime=now())},activateThrusters:function(){this.game.statisticsManager&&this.game.statisticsManager.usedThrusters(),this.acc=new Vector(500,0).setAngle(this.dir.angle())},stopThrusters:function(){this.acc=new Vector(0,0)},rotateLeft:function(t){this.currentRotation=Math.max(2*-Math.PI,this.currentRotation-10*Math.PI*t)},rotateRight:function(t){this.currentRotation=Math.min(2*Math.PI,this.currentRotation+10*Math.PI*t)},stopRotate:function(){this.currentRotation=0},getSizeFromVertsAndObjects:function(){for(var t,e=0,s=0;t=this.verts[s];s++)e=Math.max(e,new Vector(t).len());var i;for(s=0;i=this.thrusters[s];s++){var n=new Vector(i.pos.x-i.size.width/2,i.pos.y-i.size.height/2).rotate(i.angle),a=new Vector(i.pos.x+i.size.width/2,i.pos.y-i.size.height/2).rotate(i.angle),o=new Vector(i.pos.x-i.size.width/2,i.pos.y+i.size.height/2).rotate(i.angle),h=new Vector(i.pos.x+i.size.width/2,i.pos.y+i.size.height/2).rotate(i.angle);e=Math.max(e,n.len(),a.len(),o.len(),h.len())}return{width:2*e,height:2*e}},calculateBounds:function(){return{x:1*Math.max(this.size.width,this.size.height),y:1*Math.max(this.size.height,this.size.width)}},shootPressed:function(){for(var t,e=0;t=this.cannons[e];e++)t.shootPressed()},shootReleased:function(){for(var t,e=0;t=this.cannons[e];e++)t.shootReleased()},flyTo:function(t,e,s){this.tween={start:{pos:this.pos.cp(),dir:this.dir.cp()},to:new Vector(t,e),callback:s||function(){}},this.tween.time=this.getTimeforTween()},destroy:function(){this.sheet.destroy()}}),Thruster=new Class({initialize:function(t,e){this.pos=new Vector(t.p),this.size={width:t.s.w,height:t.s.h},this.angle=t.a||0,this.ship=e,this.isShown=!1,this.flameY=1,this.fx=new Fx,this.fx.addListener(this),this.flames={r:[],y:[]},this.lastFrameUpdate=0,this.generateFlames()},update:function(t){this.fx.update(),now()-this.lastFrameUpdate>1e3/60&&this.generateFlames()},set:function(t,e){if("flames"===t)this.flameY=e},setIsShown:function(t){!this.isShown&&t&&(this.flameY=0,this.generateFlames(),this.fx.add("flames",{start:this.flameY,end:1,duration:250,transition:Tween.Quintic})),this.isShown=t},drawTo:function(t){t.drawFlames(this.flames,this.angle)},generateFlames:function(){var t=this.size.width,e=.05*this.size.width,s=.8*this.size.width,i=.1*s,n=t/2,a=s/2,o=(this.size.height,this.pos.x),h=this.pos.y-this.size.height/2;function r(t,e){return new Vector(t,e)}this.flames.r=[r(-n+o,h)],this.flames.y=[r(-a+o,h)],this.flames.self=this;for(var l=0;l<t;l+=e)this.flames.r.push(r(l-n+o,this.flameY*random(.7*this.size.height,this.size.height)+h));this.flames.r.push(r(n+o,h));for(l=0;l<s;l+=i)this.flames.y.push(r(l-a+o,this.flameY*random(.4*this.size.height,.7*this.size.height)+h));this.flames.y.push(r(a+o,h)),this.lastFrameUpdate=now();for(var c=r(o,h),d=0;u=this.flames.r[d];d++)u.sub(c).rotate(this.angle).add(c);var u;for(d=0;u=this.flames.y[d];d++)u.sub(c).rotate(this.angle).add(c)}}),BombManager=new Class({initialize:function(t){this.game=t,this.bombShowDelay=30,this.nextBomb=this.bombShowDelay},update:function(t){this.game.isKeyPressed("F")&&this.isReady()&&this.blow(),-1!==this.nextBomb&&this.game.sessionManager.isPlaying&&(this.nextBomb-=t,this.nextBomb<0&&(this.game.menuManager.showBombMenu(),this.nextBomb=-1,this.game.ui.showMessage("BOMB IS READY<br />(lower right corner or F)")))},blow:function(){var t=this.game.ui.showMessage("3...",5e3);delay(1e3,(function(){t.innerHTML="2..."}),this),delay(2e3,(function(){t.innerHTML="1..."}),this),delay(3e3,(function(){t.innerHTML="boom"}),this),delay(3e3,this.blowStuffUp,this),this.nextBomb=this.bombShowDelay},blowStuffUp:function(){this.game.bulletManager.updateEnemyIndex();for(var t,e=this.game.bulletManager.enemyIndex,s=0;(t=e[s])&&s<10;s++){var i=getRect(t),n=new Vector(i.left+i.width/2,i.top+i.height/2);this.game.explosionManager.addExplosion(n,t,MegaParticleExplosion),t.parentNode.removeChild(t)}this.game.menuManager.hideBombMenu(),this.nextBomb=this.bombShowDelay},isReady:function(){return-1===this.nextBomb}}),ELEMENTSTHATARENOTTOBEINCLUDED=["BR","SCRIPT","STYLE","TITLE","META","HEAD","OPTION","OPTGROUP","LINK"],ELEMENTSIZETHRESHOLD=5,BulletManager=new Class({initialize:function(t){this.game=t,this.lastBlink=0,this.blinkActive=!1,this.enemyIndex=[],this.updateDelay=2.5,this.nextUpdate=this.updateDelay},update:function(t){this.game.isKeyPressed("B")?this.blink():this.blinkActive&&this.endBlink(),this.nextUpdate-=t,this.nextUpdate<0&&this.updateEnemyIndex()},blink:function(){if(now()-this.lastBlink>250){for(var t,e=0;t=this.enemyIndex[e];e++)this.blinkActive?t.style.outline=t.KICKASSOLDBORDER:t.style.outline="1px solid red";this.blinkActive=!this.blinkActive,this.lastBlink=now(),this.blinkActive||this.updateEnemyIndex()}},endBlink:function(){for(var t,e=0;t=this.enemyIndex[e];e++)t.style.outline=t.KICKASSOLDBORDER;this.lastBlink=0,this.blinkActive=!1},updateEnemyIndex:function(){var t=document.getElementsByTagName("*");this.enemyIndex=[];for(var e,s=0;e=t[s];s++)this.isDestroyable(e)&&(this.enemyIndex.push(e),e.KICKASSOLDBORDER=e.style.outline||document.defaultView.getComputedStyle(e,null).outline);this.nextUpdate=this.updateDelay},isDestroyable:function(t,e){if(this.shouldIgnoreElement(t,e))return!1;for(var s,i=0;s=t.childNodes[i];i++)if(1===s.nodeType&&-1===ELEMENTSTHATARENOTTOBEINCLUDED.indexOf(s.tagName)&&s.offsetWidth>=ELEMENTSIZETHRESHOLD&&s.offsetHeight>=ELEMENTSIZETHRESHOLD&&"hidden"!==document.defaultView.getComputedStyle(s,null).visibility)return!1;return!0},isDestroyableFromCollision:function(t){return this.isDestroyable(t,!0)},shouldIgnoreElement:function(t,e){return 1!==t.nodeType||(t==document.documentElement||t==document.body||(-1!==ELEMENTSTHATARENOTTOBEINCLUDED.indexOf(t.tagName)||("hidden"==t.style.visibility||"none"==t.style.display||("string"==typeof t.className&&-1!=t.className.indexOf("KICKASSELEMENT")||(!e&&(t.offsetWidth<ELEMENTSIZETHRESHOLD||t.offsetHeight<ELEMENTSIZETHRESHOLD)||((t.offsetLeft<0||t.offsetTop<0)&&((s=getRect(t)).left+s.width<0||s.top+s.height<0)||(s||(s=getRect(t)),s.top>=this.game.scrollSize.y)))))));var s},destroy:function(){for(var t in this.bullets)if(this.bullets.hasOwnProperty(t))for(var e,s=0;e=this.bullets[t][s];s++)e.destroy();this.bullets={}}}),SessionManager=new Class({initialize:function(t){this.game=t,this.isPlaying=!1},update:function(t){this.isPlaying&&0==this.game.bulletManager.enemyIndex.length&&this.weHaveWon()},weHaveWon:function(){this.isPlaying=!1,this.game.ui.showMessage("You're done!"),this.game.isCampaign()?(this.game.menuManager.showMenu(),this.game.menuManager.navigateTo("highscores")):this.game.menuManager.showMenu(),this.game.menuManager.sendMessageToMenu("gameFinished:!")}}),ExplosionManager=new Class({initialize:function(t){this.game=t,this.explosions=[]},update:function(t){for(var e,s=now(),i=0;e=this.explosions[i];i++)s-e.bornAt>(e.ttl||500)?(e.destroy(),this.explosions.splice(i,1)):e.update(t)},addExplosion:function(t,e,s){var i=new(s=s||ParticleExplosion)(t,e);i.game=this.game,i.checkBounds(),this.explosions.push(i),this.game.audioManager.explosion&&this.game.audioManager.explosion.play()},destroy:function(){for(var t,e=0;t=this.explosions[e];e++)t.destroy();this.explosions=[]}}),Cannon=new Class({initialize:function(t,e,s,i,n){this.player=t,this.game=e,this.pos=new Vector(s,i),this.angle=n||0},shootPressed:function(){},shootReleased:function(){},checkCollisions:function(){},getExplosionClass:function(){return ParticleExplosion},update:function(t){this.game.hideAll(),this.checkCollisions(t),this.game.showAll()},checkCollision:function(t){var e=t.checkCollision();return!!e&&(this.game.explosionManager.addExplosion(t.pos,e,this.getExplosionClass()),this.game.menuManager.addPoints(Math.min(e.getElementsByTagName("*").length+1,100),t.pos),e.isShot||e.parentNode.removeChild(e),this.game.statisticsManager&&this.game.statisticsManager.addElementsDestroyed(),!0)},createBullet:function(t){var e=new t(this.getABulletPos(),this.getABulletDir());return e.game=this.game,e.manager=this,e.initCanvas(),e.vel.add(e.vel.cp().setLength(this.player.vel.len())),e},getABulletPos:function(){return this.player.pos.cp().add(this.pos.cp().rotate(this.player.dir.angle()+Math.PI/2))},getABulletDir:function(){return this.player.dir.cp().rotate(this.angle)},destroy:function(){}}),LaserCannon=new Class({Extends:Cannon,initialize:function(t,e,s,i,n){Cannon.prototype.initialize.apply(this,arguments),this.lasers=[]},getExplosionClass:function(){return SplitExplosion},update:function(t){this.lasers.length&&(this.removeOld(),Cannon.prototype.update.call(this,t))},checkCollisions:function(t){for(var e,s=0;e=this.lasers[s];s++)e.update(t),this.checkCollision(e)},removeOld:function(){for(var t,e=0;t=this.lasers[e];e++)t.outOfBounds&&(t.destroy(),this.lasers.splice(e,1))},shootPressed:function(){this.lasers.length>5||now()-this.lastFired<500||(this.lastFired=now(),this.game.statisticsManager&&this.game.statisticsManager.addShotFired(),this.lasers.push(this.createBullet(LaserBullet)))},destroy:function(){if(this.lasers.length){for(var t,e=0;t=this.lasers[e];e++)t.destroy();this.lasers=[]}}}),BallCannon=new Class({Extends:Cannon,initialize:function(){Cannon.prototype.initialize.apply(this,arguments),this.lastFired=0,this.bullets=[]},getExplosionClass:function(){return ParticleExplosion},update:function(t){this.bullets.length&&(this.removeOld(),Cannon.prototype.update.call(this,t))},removeOld:function(){for(var t,e=now(),s=0;t=this.bullets[s];s++)e-t.bornAt>2e3&&(t.destroy(),this.bullets.splice(s,1))},checkCollisions:function(t){for(var e,s=0;e=this.bullets[s];s++)e.update(t),this.checkCollision(e)&&(e.destroy(),this.bullets.splice(s,1))},shootPressed:function(){now()-this.lastFired<200||(this.lastFired=now(),this.addBullet(),this.game.statisticsManager&&this.game.statisticsManager.addShotFired())},addBullet:function(){this.bullets.length>7&&(this.bullets[0].destroy(),this.bullets.shift());var t=this.createBullet(Bullet);this.bullets.push(t)},destroy:function(){for(var t,e=0;t=this.bullets[e];e++)t.destroy();this.bullets=[]}}),Bullet=new Class({initialize:function(t,e){this.pos=t.cp(),this.dir=e,this.vel=new Vector(500,500),this.bornAt=now()},initCanvas:function(){this.sheet=new Sheet(new Rect(this.pos.x,this.pos.y,5,5)),this.sheet.drawBullet()},draw:function(){this.sheet.setPosition(this.pos)},update:function(t){this.pos.add(this.vel.setAngle(this.dir.angle()).mulNew(t)),this.checkBounds(),this.draw()},checkCollision:function(){var t=document.elementFromPoint(this.pos.x,this.pos.y);return t&&3==t.nodeType&&(t=t.parentNode),!(!t||!this.game.bulletManager.isDestroyableFromCollision(t))&&t},checkBounds:function(){var t=this.game.windowSize.width,e=this.game.windowSize.height,s=this.pos.x+this.sheet.rect.size.width/2,i=this.pos.y+this.sheet.rect.size.height/2;s>t?this.pos.x=0:this.pos.x<0&&(this.pos.x=t-this.sheet.rect.size.width/2),i>e?this.pos.y=0:this.pos.y<0&&(this.pos.y=e-this.sheet.rect.size.height/2)},destroy:function(){this.sheet.destroy()}}),LaserBullet=new Class({Extends:Bullet,initialize:function(){Bullet.prototype.initialize.apply(this,arguments),this.vel=new Vector(750,750),this.lastDrawPos=this.pos.cp()},initCanvas:function(){var t=Math.max(GameGlobals.laserImage.width,GameGlobals.laserImage.height);this.sheet=new Sheet(new Rect(0,0,t,t))},update:function(t){Bullet.prototype.update.apply(this,arguments)},draw:function(){this.sheet.drawLaser(this.pos,this.dir),this.lastDrawPos=this.pos.cp()},checkBounds:function(){var t=this.game.windowSize.width,e=this.game.windowSize.height,s=this.pos.x+this.sheet.rect.size.width/2,i=this.pos.y+this.sheet.rect.size.height/2;(s>t||this.pos.x<0)&&(this.outOfBounds=!0),(i>e||this.pos.y<0)&&(this.outOfBounds=!0)},destroy:function(){this.sheet.destroy()}});GameGlobals.laserImage=document.createElement("img"),GameGlobals.laserImage.src=GameGlobals.path("css/gfx/kickass/laser.png");var Explosion=new Class({initialize:function(t,e){this.bornAt=now(),this.pos=t.cp()},update:function(t){},checkBounds:function(){},destroy:function(){}}),ParticleExplosion=new Class({Extends:Explosion,initialize:function(t,e){Explosion.prototype.initialize.apply(this,arguments),this.particleVel=new Vector(150,0),this.particles=[],this.generateParticles(),this.sheet=new Sheet(new Rect(t.x,t.y,250,250))},update:function(t){for(var e,s=0;e=this.particles[s];s++)e.pos.add(e.vel.mulNew(t).mul(random(.5,1)).setAngle(e.dir.angle()));this.sheet.clear(),this.sheet.drawExplosion(this.particles)},generateParticles:function(){for(var t=0,e=GameGlobals.hasCanvas?40:10;t<e;t++)this.particles.push({dir:new Vector(random(0,20)-10,random(0,20)-10).normalize(),vel:this.particleVel.cp(),pos:new Vector(0,0),color:["yellow","red"][random(0,1)]})},checkBounds:function(){var t=this.sheet.rect.getRight(),e=this.sheet.rect.getBottom(),s=this.game.windowSize.width,i=this.game.windowSize.height;t>s&&(this.pos.x-=t-s),e>i&&(this.pos.y-=e-i),this.sheet.setPosition(this.pos)},destroy:function(){this.sheet.destroy()}}),MegaParticleExplosion=new Class({Extends:ParticleExplosion,initialize:function(t,e){Explosion.prototype.initialize.apply(this,arguments),this.particleVel=new Vector(200,0),this.particles=[],this.generateParticles(),this.sheet=new Sheet(new Rect(t.x,t.y,500,500)),this.ttl=2e3,this.generationDelay=.6,this.generationTimes=2,this.nextGenerate=this.generationDelay},update:function(t){this.nextGenerate-=t,this.nextGenerate<=0&&this.generationTimes>0&&(this.nextGenerate=this.generationDelay,this.generateParticles(),this.generationTimes--),ParticleExplosion.prototype.update.call(this,t)}}),SplitExplosion=new Class({Extends:Explosion,initialize:function(t,e){e&&(Explosion.prototype.initialize.apply(this,arguments),this.element=e,this.fx=new Fx,this.fx.addListener(this),this.start())},update:function(t){this.element&&this.fx.update()},set:function(t,e){},start:function(){var t=this.createClones(),e=t[0],s=t[1],i="rotate(-"+random(30,50)+"deg) translate(-100px, 40px)",n="rotate("+random(30,50)+"deg) translate(100px, 40px)";setStyles(e,{transform:i}),setStyles(s,{transform:n}),this.left=e,this.right=s,this.fx.add("opacity",{start:1,end:.5,duration:500})},createClones:function(){var t=getRect(this.element),e=this.createContainer(t),s=this.createContainer(t),i=cloneElement(this.element),n=cloneElement(this.element);addClass(i,"KICKASSELEMENT"),addClass(n,"KICKASSELEMENT");var a={margin:0,overflow:"hidden"};return setStyles(i,a),setStyles(n,a),e.appendChild(i),s.appendChild(n),s.style.left=t.left+t.width/2+"px",s.scrollLeft+=t.width/2,this.element.style.opacity=0,this.element.style.visibility="hidden",this.element.style.display="none",each([e,s],(function(t){t.style.transition="transform 500ms ease-in"}))},createContainer:function(t){var e=document.createElement("div");return setStyles(e,{position:"absolute",left:t.left,top:t.top,width:.5*t.width,height:t.height,overflow:"hidden"}),getAppContainerElement().appendChild(e),e},destroy:function(){try{this.left.parentNode.removeChild(this.left),this.right.parentNode.removeChild(this.right),this.element.parentNode.removeChild(this.element)}catch(t){}}}),Weapons={1:{name:"Cannon",id:"cannon",cannonClass:BallCannon},2:{name:"Laser",id:"laser",cannonClass:LaserCannon}},WeaponMap={cannon:Weapons[1],laser:Weapons[2]},SheetCanvas=new Class({initialize:function(rect){with(this.canvas=document.createElement("canvas"),this.canvas.className="KICKASSELEMENT",this.canvas.style)position="absolute",zIndex="1000000";GameGlobals.kickass.registerElement(this.canvas),this.canvas.getContext&&(this.ctx=this.canvas.getContext("2d")),this.rect=rect,this.angle=0,this.updateCanvas(),getAppContainerElement().appendChild(this.canvas)},tracePoly:function(t){if(t[0]){this.ctx.save(),this.ctx.translate(this.rect.size.width/2,this.rect.size.height/2),this.ctx.rotate(this.angle),this.ctx.beginPath(),this.ctx.moveTo(t[0].x,t[0].y);for(var e=0;e<t.length;e++)this.ctx.lineTo(t[e].x,t[e].y);this.ctx.restore()}},setAngle:function(t){this.angle=t},updateCanvas:function(){this.canvas.width!=this.rect.size.width&&(this.canvas.width=this.rect.size.width),this.canvas.height!=this.rect.size.height&&(this.canvas.height=this.rect.size.height),this.canvas.style.left=GameGlobals.kickass.scrollPos.x+(this.rect.pos.x-this.rect.size.width/2)+"px",this.canvas.style.top=GameGlobals.kickass.scrollPos.y+(this.rect.pos.y-this.rect.size.height/2)+"px"},drawLine:function(t,e,s,i){this.ctx.save(),this.ctx.translate(this.rect.size.width/2,this.rect.size.height/2),this.ctx.beginPath(),this.ctx.moveTo(t,e),this.ctx.lineTo(s,i),this.ctx.closePath(),this.ctx.stroke(),this.ctx.restore()},drawCircle:function(t,e){e=e||{x:0,y:0},this.ctx.save(),this.ctx.translate(this.rect.size.width/2,this.rect.size.height/2),e&&this.ctx.translate(e.x,e.y),this.ctx.beginPath(),this.ctx.arc(0,0,t,0,2*Math.PI,!0),this.ctx.fill(),this.ctx.closePath(),this.ctx.restore()},drawRect:function(t,e,s,i){this.ctx.save(),this.ctx.translate(this.rect.size.width/2,this.rect.size.height/2),this.ctx.translate(t,e),this.ctx.fillRect(t,e,s,i),this.ctx.restore(),this.ctx.fill()},drawImageFull:function(t){this.ctx.drawImage(t,0,0,this.rect.size.width,this.rect.size.height)},drawImage:function(t,e,s){this.ctx.save(),this.ctx.translate(this.rect.size.width/2+e,this.rect.size.height/2+s),this.ctx.rotate(this.angle),this.ctx.drawImage(t,0,-11),this.ctx.restore()},setFillColor:function(t){this.ctx.fillStyle=t},setStrokeColor:function(t){this.ctx.strokeStyle=t},setLineWidth:function(t){this.ctx.lineWidth=t},fillPath:function(){this.ctx.fill()},strokePath:function(){this.ctx.stroke()},clear:function(){this.ctx.clearRect(0,0,this.rect.size.width,this.rect.size.height)},destroy:function(){GameGlobals.kickass.unregisterElement(this.canvas),this.canvas.parentNode.removeChild(this.canvas)}}),Sheet=new Class({initialize:function(t){this.rect=t,this.drawer=new SheetCanvas(t)},clear:function(){this.drawer.clear()},setPosition:function(t){this.rect.pos=t.cp(),this.drawer.rect=this.rect,this.drawer.updateCanvas()},setAngle:function(t){this.drawer.setAngle(t)},drawPlayer:function(t){this.drawer.setFillColor("white"),this.drawer.setStrokeColor("black"),this.drawer.setLineWidth(1.5),this.drawer.tracePoly(t),this.drawer.fillPath(),this.drawer.tracePoly(t),this.drawer.strokePath()},drawBrokenPlayer:function(t,e){this.drawer.setStrokeColor("black"),this.drawer.setLineWidth(1.5);for(var s,i=1,n=t[0];s=t[i];i++,n=s){var a=e[i-1];this.drawer.drawLine(n.x+a.pos.x,n.x+a.pos.y,s.x+a.pos.x,s.y+a.pos.y)}},drawFlames:function(t,e){this.drawer.setLineWidth(1.5),this.drawer.setFillColor("red"),this.drawer.tracePoly(t.r),this.drawer.fillPath(),this.drawer.setFillColor("yellow"),this.drawer.tracePoly(t.y),this.drawer.fillPath()},drawBullet:function(){this.drawer.setFillColor(GameGlobals.bulletColor),this.drawer.drawCircle(2.5)},drawExplosion:function(t){for(var e,s=0;e=t[s];s++)this.drawer.setFillColor(e.color),this.drawer.drawRect(e.pos.x,e.pos.y,3,3)},drawFace:function(t){this.drawer.drawImageFull(t)},drawLaser:function(t,e){this.clear(),this.setPosition(t),this.drawer.setAngle(e.angle()),this.drawer.drawImage(GameGlobals.laserImage,0,0)},transformToSheetCoordinates:function(t){return t.cp().sub(new Vector(this.rect.size.width/2,this.rect.size.height/2))},destroy:function(){this.drawer.destroy()}}),namespace=getGlobalNamespace(),initKickAss=function(){if(namespace.KICKASSGAME)namespace.KICKASSGAME.addPlayer();else if(namespace.KICKASS_SITE_KEY){var t=new MySite(namespace.KICKASS_SITE_KEY);t.load((function(e){namespace.KICKASSGAME=GameGlobals.kickass=new KickAss({mySite:!!e&&t}),namespace.KICKASSGAME.begin()}))}else namespace.KICKASSGAME=GameGlobals.kickass=new KickAss,namespace.KICKASSGAME.begin()};function getAppContainerElement(){return namespace.KICKASS_CONTAINER_ELEMENT?document.getElementById(namespace.KICKASS_CONTAINER_ELEMENT):document.body}namespace.LAZYLOAD_KICKASS?window.startBrowserBlaster=initKickAss:initKickAss()})("undefined"!=typeof exports?exports:window);
|
1
|
+
(function(window){var JSONP=function(){var t,e,s,i=0,n=this;return{get:function(a,o,h){for(s in e="?",o=o||{})o.hasOwnProperty(s)&&(e+=encodeURIComponent(s)+"="+encodeURIComponent(o[s])+"&");var r="json"+ ++i;return n[r]=function(t){h(t);try{delete n[r]}catch(t){}n[r]=null},function(e){var s=document.createElement("script"),i=!1;s.src=e,s.async=!0,s.onload=s.onreadystatechange=function(){i||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(i=!0,s.onload=s.onreadystatechange=null,s&&s.parentNode&&s.parentNode.removeChild(s))},t||(t=document.getElementsByTagName("head")[0])||(t=document.body),t.appendChild(s)}(a+e+"callback="+r),r}}}(),CORS={request:function(t,e,s){if(this.calledByExtension())return this._callbacks[this._callbackId++]=s,void window.postMessage(JSON.stringify({from:"kickassapp-page",url:t,type:"callApi",params:e}),"*");e=e||{};var i="?";for(key in e)e.hasOwnProperty(key)&&(i+=encodeURIComponent(key)+"="+encodeURIComponent(e[key])+"&");var n=new XMLHttpRequest;n.onreadystatechange=function(){4==n.readyState&&s(JSON.parse(n.responseText))},n.open("GET",t+i),n.withCredentials=!0,n.setRequestHeader("Content-Type","application/json"),n.send()},calledByExtension:function(){return!!document.getElementById("kickass-has-been-initialized-yes-yes-yes")},_callbacks:{},_callbackId:0};function getGlobalNamespace(){return window&&window.INSTALL_SCOPE?window.INSTALL_SCOPE:window}CORS.calledByExtension()&&window.addEventListener("message",(function(t){var e;try{e=JSON.parse(t.data)}catch(t){return}if("kickassapp-extension"===e.from&&"kickassapp-extension-version1"===e.sanityCheck){var s=e.payload;"response"===s.type?(CORS._callbacks[s.requestId](s.body),delete CORS._callbacks[s.requestId]):"destroy"===s.type&&window.KICKASSGAME.destroy()}}),!1);var Class=function(t){var e=function(){return e.$prototyping?this:"function"==typeof this.initialize?this.initialize.apply(this,arguments):void 0};for(var s in t.Extends&&(e.parent=t.Extends,t.Extends.$prototyping=!0,e.prototype=new t.Extends,t.Extends.$prototyping=!1),t)t.hasOwnProperty(s)&&(e.prototype[s]=t[s]);return e};"undefined"!=typeof exports&&(exports.Class=Class);var Vector=new Class({initialize:function(t,e){"object"==typeof t?(this.x=t.x,this.y=t.y):(this.x=t,this.y=e)},cp:function(){return new Vector(this.x,this.y)},mul:function(t){return this.x*=t,this.y*=t,this},mulNew:function(t){return new Vector(this.x*t,this.y*t)},div:function(t){return this.x/=t,this.y/=t,this},divNew:function(t){return new Vector(this.x/t,this.y/t)},add:function(t){return this.x+=t.x,this.y+=t.y,this},addNew:function(t){return new Vector(this.x+t.x,this.y+t.y)},sub:function(t){return this.x-=t.x,this.y-=t.y,this},subNew:function(t){return new Vector(this.x-t.x,this.y-t.y)},rotate:function(t){var e=this.x,s=this.y;return this.x=e*Math.cos(t)-Math.sin(t)*s,this.y=e*Math.sin(t)+Math.cos(t)*s,this},rotateNew:function(t){return this.cp().rotate(t)},setAngle:function(t){var e=this.len();return this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},setAngleNew:function(t){return this.cp().setAngle(t)},setLength:function(t){var e=this.len();return e?this.mul(t/e):this.x=this.y=t,this},setLengthNew:function(t){return this.cp().setLength(t)},normalize:function(){var t=this.len();return 0==t||(this.x/=t,this.y/=t),this},normalizeNew:function(){return this.cp().normalize()},angle:function(){return Math.atan2(this.y,this.x)},collidesWith:function(t){return this.x>t.x&&this.y>t.y&&this.x<t.x+t.width&&this.y<t.y+t.height},len:function(){var t=Math.sqrt(this.x*this.x+this.y*this.y);return t<.005&&t>-.005?0:t},is:function(t){return"object"==typeof t&&this.x==t.x&&this.y==t.y},dot:function(t){return this.x*t.x+this.y*t.y},inTriangle:function(t,e,s){var i=s.subNew(t),n=e.subNew(t),a=p.subNew(t),o=i.dot(i),h=i.dot(n),r=i.dot(a),l=n.dot(n),c=n.dot(a),d=1/(o*l-h*h),u=(l*r-h*c)*d,m=(o*c-h*r)*d;return u>0&&m>0&&u+m<1},distanceFrom:function(t){return Math.sqrt(Math.pow(this.x-t.x,2),Math.pow(this.y-t.y,2))},toString:function(){return"[Vector("+this.x+", "+this.y+") angle: "+this.angle()+", length: "+this.len()+"]"}});"undefined"!=typeof exports&&(exports.Vector=Vector);var Rect=new Class({initialize:function(t,e,s,i){this.pos=new Vector(t,e),this.size={width:s,height:i}},hasPoint:function(t){return t.x>this.getLeft()&&t.x<this.getRight()&&t.y>this.getTop()&&t.y<this.getBottom()},setLeft:function(t){this.pos.x=t+this.size.width/2},setTop:function(t){this.pos.y=t+this.size.height/2},getLeft:function(){return this.pos.x-this.size.width/2},getTop:function(){return this.pos.y-this.size.height/2},getRight:function(){return this.pos.x+this.size.width/2},getBottom:function(){return this.pos.y+this.size.height/2},cp:function(){return new Rect(this.pos.x,this.pos.y,this.size.width,this.size.height)}});"undefined"!=typeof exports&&(exports.Rect=Rect);var Fx=new Class({initialize:function(){this.listeners=[],this.tweens={},this.running={}},addListener:function(t){this.listeners.push(t)},add:function(t,e){if((e=e||{}).duration=e.duration||500,e.transition=e.transition||Tween.Linear,e.repeats=void 0!==e.repeats&&e.repeats,!e.tweens){var s=e.start||0,i=void 0===e.end?1:e.end;e.tweens=[[s,i]]}this.tweens[t]=e},update:function(t){for(var e in t="number"==typeof t?t:now(),this.tweens)if(this.tweens.hasOwnProperty(e)){if(!this.running[e]){this.tweenStart(e,t);continue}var s=this.tweens[e],i=t-this.running[e].startTime;if(i>s.duration){this.tweenFinished(s,e);continue}for(var n,a=s.transition(i/s.duration),o=[],h=0;n=s.tweens[h];h++){var r=a*(n[1]-n[0])+n[0];o.push(r)}this.fire(e,o,a)}},tweenStart:function(t,e){this.running[t]={startTime:e};for(var s,i=[],n=0;s=this.tweens[t].tweens[n];n++)i.push(s[0]);this.fire(t,i,0)},tweenFinished:function(t,e){for(var s,i=[],n=0;s=t.tweens[n];n++)i.push(s[1]);if(this.fire(e,i,1),!t.repeats)return delete this.running[e],void delete this.tweens[e];this.tweenStart(e,now())},fire:function(t,e,s){for(var i,n=0;i=this.listeners[n];n++)i.set.call(i,t,e,s)}}),Tween={Linear:function(t){return t},Quadratic:function(t){return t*t},Quintic:function(t){return t*t*t},Shake:function(t){return Math.sin(t)}},GameGlobals={FPS:60,useAnimationFrame:!0,boids:{flockRadius:400,size:100},path:function(){return"https://kickassapp.com/"+Array.prototype.slice.call(arguments).join("")},hasCanvas:void 0!==document.createElement("canvas").getContext,bulletColor:"black"};function now(){return(new Date).getTime()}function bind(t,e){return function(){return e.apply(t,arguments)}}function each(t,e,s){if("function"==typeof t.forEach)return t.forEach(e,s),t;for(var i in t)t.hasOwnProperty(i)&&e.call(s||window,t[i],i);return t}function addEvent(t,e,s){t.addEventListener?t.addEventListener(e,s,!1):t.attachEvent&&(t["e"+e+s]=s,t[e+s]=function(){return t["e"+e+s](window.event)},t.attachEvent("on"+e,t[e+s]))}function removeEvent(t,e,s){t.removeEventListener?t.removeEventListener(e,s,!1):t.detachEvent&&(t.detachEvent("on"+e,t[e+s]),t[e+s]=null,t["e"+e+s]=null)}function stopEvent(t){t.stopPropogation&&t.stopPropogation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function elementIsContainedIn(t,e){return element.contains?t.contains(e):!!(16&t.compareDocumentPosition(e))}function code(t){var e={38:"up",40:"down",37:"left",39:"right",27:"esc"};return e[t]?e[t]:String.fromCharCode(t)}function random(t,e){return Math.floor(Math.random()*(e-t+1)+t)}function getRect(t){if("function"==typeof t.getBoundingClientRect){var e=t.getBoundingClientRect(),s=window.pageXOffset,i=window.pageYOffset;return{width:e.width,height:e.height,left:e.left+s,top:e.top+i}}e={width:t.offsetWidth,height:t.offsetHeight,left:0,top:0};for(var n=t;n;)e.left+=n.offsetLeft,e.top+=n.offsetTop,n=n.offsetParent;return e}function getCompatElement(){var t=document;return t.compatMode&&"CSS1Compat"!=t.compatMode?t.body:t.documentElement}function getScrollSize(){var t=getCompatElement(),e={x:t.clientWidth,y:t.clientHeight},s=document.body;return{x:Math.max(t.scrollWidth,s.scrollWidth,e.x),y:Math.max(t.scrollHeight,s.scrollHeight,e.y)}}function getStyle(t,e){return t.style[e]?t.style[e]:t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function setStyles(t,e){for(var s in e)if(e.hasOwnProperty(s)){var i=e[s];"number"==typeof i&&"opacity"!==s&&"zIndex"!==s&&(i+="px"),t.style[s]=i}}function hasClass(t,e){return t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function addClass(t,e){hasClass(t,e)||(t.className+=" "+e)}function removeClass(t,e){if(hasClass(t,e)){var s=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(s," ")}}function cloneElement(t){return t.cloneNode(!0)}function newElement(t,e){var s=document.createElement(t);for(var i in e)e.hasOwnProperty(i)&&("styles"===i?setStyles(s,e[i]):s[i]=e[i]);return s}window.GameGlobals=GameGlobals,Array.prototype.indexOf||(Array.prototype.indexOf=function(t){if(null==this)throw new TypeError;var e=Object(this),s=e.length>>>0;if(0===s)return-1;var i=0;if(arguments.length>0&&((i=Number(arguments[1]))!=i?i=0:0!==i&&i!==1/0&&i!==-1/0&&(i=(i>0||-1)*Math.floor(Math.abs(i)))),i>=s)return-1;for(var n=i>=0?i:Math.max(s-Math.abs(i),0);n<s;n++)if(n in e&&e[n]===t)return n;return-1});var requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t,e){window.setTimeout(t,1e3/60)};function delay(t,e,s){return setTimeout(bind(s,e),t)}var KickAss=new Class({initialize:function(t){t&&t.mySite&&(this.mySite=t.mySite),this.players=[],this.elements=[],this.weaponClass=Weapons[1].cannonClass,this.scrollPos=new Vector(0,0),this.scrollSize=new Vector(0,0),this.windowSize={width:0,height:0},this.updateWindowInfo(),this.bulletManager=new BulletManager(this),this.bulletManager.updateEnemyIndex(),this.explosionManager=new ExplosionManager(this),this.ui=new UIManager(this),this.bombManager=new BombManager(this),this.menuManager=new MenuManager(this),this.menuManager.create(),void 0!==StatisticsManager&&(this.statisticsManager=new StatisticsManager(this)),this.sessionManager=new SessionManager(this),this.lastUpdate=now(),this.keyMap={},this.keydownEvent=bind(this,this.keydown),this.keyupEvent=bind(this,this.keyup),this.multiplier=10,this.isCampaign()?this.audioManager={explosion:new AudioManager(GameGlobals.path("static/sounds/game/explosion"),["mp3","ogg"]),shot:new AudioManager(GameGlobals.path("static/sounds/game/shot"),["mp3","ogg"])}:this.audioManager={},window.KickAssStyle&&"white"===window.KickAssStyle&&(GameGlobals.bulletColor="white"),addEvent(document,"keydown",this.keydownEvent),addEvent(document,"keyup",this.keyupEvent),addEvent(document,"keypress",this.keydownEvent)},begin:function(){this.addPlayer(),this.sessionManager.isPlaying=!0,GameGlobals.useAnimationFrame||(this.loopTimer=window.setInterval(bind(this,this.loop),1e3/GameGlobals.FPS)),GameGlobals.useAnimationFrame&&requestAnimFrame(bind(this,this.loop))},keydown:function(t){var e=code(t.keyCode);switch(this.keyMap[e]=!0,e){case"left":case"right":case"up":case"down":case"esc":case" ":stopEvent(t)}if("esc"===e)this.destroy()},keyup:function(t){var e=code(t.keyCode);switch(this.keyMap[e]=!1,e){case"left":case"right":case"up":case"down":case"esc":case" ":t.stopPropogation&&t.stopPropogation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}},loop:function(){var t=now(),e=(t-this.lastUpdate)/1e3;this.updateWindowInfo();for(var s,i=0;s=this.players[i];i++)s.update(e);this.bulletManager.update(e),this.bombManager.update(e),this.explosionManager.update(e),this.ui.update(e),this.statisticsManager&&this.statisticsManager.update(e),this.sessionManager.update(e),this.lastUpdate=t,GameGlobals.useAnimationFrame&&requestAnimFrame(bind(this,this.loop))},addPlayer:function(){var t=Ships.Standard;window.KICKASSSHIP&&window.KICKASSSHIP.points&&(t=KICKASSSHIP),this.mySite&&this.mySite.getShipConfig()&&(t=this.mySite.getShipConfig());var e=new Player(this);e.setShip(t),this.players.push(e),this.explosionManager.addExplosion(e.pos)},registerElement:function(t){if(!t)throw new Error("Can't register unexisting element.");this.elements.push(t)},unregisterElement:function(t){this.elements.splice(this.elements.indexOf(t),1)},isKickAssElement:function(t){for(var e,s=0;e=this.elements[s];s++)if(t===e||elementIsContainedIn(e,t))return!0;return!1},isKeyPressed:function(t){return!!this.keyMap[t]},updateWindowInfo:function(){var t=!!window.ActiveXObject&&"BackCompat"==document.compatMode;this.windowSize={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight},t&&(this.windowSize.width=document.body.clientWidth,this.windowSize.height=document.body.clientHeight),this.menuManager&&this.menuManager.isVisible()&&(this.windowSize.height-=this.menuManager.getHeight()),this.scrollPos.x=window.pageXOffset||document.documentElement.scrollLeft,this.scrollPos.y=window.pageYOffset||document.documentElement.scrollTop,this.scrollSize=getScrollSize()},hideAll:function(){for(var t,e=0;t=this.elements[e];e++)t.style.visibility="hidden"},showAll:function(){for(var t,e=0;t=this.elements[e];e++)t.style.visibility="visible"},updateShips:function(t,e){e||this.ui.showMessage("You're now flying<br /><em>"+t.name+"<em>!!");for(var s,i=0;s=this.players[i];i++)s.setShip(t)},changeWeapon:function(t,e){this.weaponClass=t.cannonClass,e||this.ui.showMessage("Changed to "+t.name.toUpperCase()+"!!!!");for(var s,i=0;s=this.players[i];i++)s.setCannons(t.cannonClass)},changeWeaponById:function(t,e){Weapons[t]&&this.changeWeapon(Weapons[t],e)},flyOutPlayers:function(t,e){for(var s,i=0;s=this.players[i];i++)s.flyTo(t,-s.size.height),s.isBound=!1},flyInPlayers:function(){for(var t,e=0;t=this.players[e];e++)t.flyTo(t.pos.x,100,(function(){this.isBound=!0}))},newRank:function(t){this.ui.showMessage("OMG. You leveled up to: <strong>"+t+"</strong>!<br /><small>Be sure to check what cool new stuff you get in the menu.</small>")},fireBomb:function(){this.bombManager.blow()},destroy:function(){removeEvent(document,"keydown",this.keydownEvent),removeEvent(document,"keypress",this.keydownEvent),removeEvent(document,"keyup",this.keyupEvent);for(var t,e=0;t=this.players[e];e++)t.destroy();this.bulletManager.destroy(),this.explosionManager.destroy(),this.menuManager.destroy(),GameGlobals.useAnimationFrame||clearInterval(this.loopTimer),getGlobalNamespace().KICKASSGAME=!1,this.isCampaign()&&document.location.reload()},isCampaign:function(){return getGlobalNamespace().IS_CLOUDFLARE_GAME},isMySite:function(){return!!getGlobalNamespace().KICKASS_SITE_KEY},shouldShowAd:function(){return!this.mySite&&!this.isCampaign()},shouldShowMenu:function(){return!this.mySite&&!this.isCampaign()},shouldShowHowToImage:function(){return this.mySite||this.isCampaign()}});window.KickAss=KickAss;var StatisticsManager=new Class({initialize:function(t){this.game=t,this.data={},this.data.startedPlaying=now(),this.data.elementsDestroyed=0,this.data.shotsFired=0,this.data.distanceFlownInPixels=0,this.data.totalPointsThisSession=0,this.data.usedThrusters=0,this.lastUpdate=0},usedThrusters:function(){this.data.usedThrusters=1},increaseDistanceWithPixels:function(t){this.data.distanceFlownInPixels+=t},increasePointsGainedWithPoints:function(t){this.data.totalPointsThisSession+=t},addShotFired:function(){this.data.shotsFired++,this.game.audioManager.shot&&this.game.audioManager.shot.play()},addElementsDestroyed:function(){this.data.elementsDestroyed++},update:function(t){this.lastUpdate+=t,this.lastUpdate>.25&&(this.syncWithServer(),this.lastUpdate=0)},syncWithServer:function(){var t=[];for(var e in this.data)this.data.hasOwnProperty(e)&&t.push(e+":"+this.data[e]);this.game.menuManager.sendMessageToMenu("stats:!"+t.join("|"))}}),MySite=new Class({initialize:function(t){this.key=t},load:function(t){CORS.request(GameGlobals.path("mysite/api.json"),{site_key:this.key,url:document.location.toString()},bind(this,(function(e){e&&e.embed?(this.mySiteData=e.embed,t(!0)):t(!1)})))},install:function(){},getShipId:function(){return this.mySiteData&&this.mySiteData.settings.ship},getShipConfig:function(){return this.mySiteData&&this.mySiteData.settings.ship_config},getShareURL:function(){return this.mySiteData&&this.mySiteData.settings.share_url}}),Menu=new Class({initialize:function(t){this.game=t,this.size={height:300}},generate:function(t){this.container=document.createElement("div"),this.container.className="KICKASSELEMENT",this.container.id="kickass-profile-menu",t.appendChild(this.container);var e=getGlobalNamespace().KICKASSSHIPID||"";this.url=GameGlobals.path("intermediate_postmessage.html?url="+encodeURIComponent(getGlobalNamespace().KICKASSURL||document.location.href)+"&origin="+encodeURIComponent(document.location.href)+"&preship="+e+"&is_campaign="+(this.game.isCampaign()?"true":"")+"&is_mysite="+(this.game.isMySite()?"true":"")),this.isSocketReady=!1,this.socketIframe=document.createElement("iframe"),this.socketIframe.frameborder="0",this.socketIframe.className="KICKASSELEMENT",this.socketIframe.width="100%",this.socketIframe.height=this.size.height+"px",this.container.appendChild(this.socketIframe),this.menuOrigin="https://kickassapp.com/".replace(/\/$/,""),this.socketIframe.src=this.url,this.onMessage=bind(this,(function(t){if(t.origin===this.menuOrigin||t.origin===this.menuOrigin.replace("http://","https://")){var e=t.data;if("ready"!==e){var s=e.split(":!");if(2===s.length){var i=s.shift().replace(/^./g,(function(t){return t.charAt(0).toUpperCase()}));"function"==typeof this["messageType"+i]&&this["messageType"+i](s.join(":!"))}}else this.onGameReady()}else console.log("ignoring event from",t.origin)})),window.addEventListener("message",this.onMessage,!1),this.game.registerElement(this.container)},socketPostMessage:function(t){this.socketIframe.contentWindow.postMessage(t,this.menuOrigin)},onGameReady:function(){this.isSocketReady=!0,this.game.registerElement(this.container.getElementsByTagName("iframe")[0]),this.socketPostMessage("url:!"+(getGlobalNamespace().KICKASSURL||document.location.href)),this.game.statisticsManager&&this.game.statisticsManager.syncWithServer(),this.game.menuManager.onGameReady()},sendMessage:function(t){if(this.isSocketReady&&t!=this.lastMessage){try{this.socketPostMessage(t)}catch(t){}this.lastMessage=t}},messageTypeChangeShip:function(t){var e=(t=t.split(","))[0],s=(t[1],"initial"===t[2]);this.shipId!==e&&(s&&getGlobalNamespace().KICKASSSHIP||(this.shipId=e,CORS.request(GameGlobals.path("designer/ship/"+e+"/construction.json"),{ship_id:e,is_initial:s?"1":"0"},bind(this,(function(t){this.game.updateShips(t.data,s);try{window.focus()}catch(t){}}))),s||this.parent.hideMenu()))},messageTypeChangeWeapon:function(t,e){this.game.changeWeaponById(t,e)},messageTypeSetMultiplier:function(t){t=parseInt(t,10),!isNaN(t)&&t&&(this.game.multiplier=t)},messageTypeNewRank:function(t){this.game.newRank(t)},messageTypePlayerMessage:function(t){this.game.ui.showMessage(t)},destroy:function(){this.game.unregisterElement(this.container),this.game.unregisterElement(this.iframe),window.removeEventListener("message",this.onMessage,!1),this.container.parentNode.removeChild(this.container)}}),MenuManager=new Class({initialize:function(t){this.game=t,this.numPoints=0,getGlobalNamespace().KICKASS_INLINE_CSS||this.includeCSS(GameGlobals.path("css/menustyles.css"))},generateDefaults:function(){for(var t in Weapons)Weapons.hasOwnProperty(t)&&this.addWeapon(Weapons[t],t);this.hideBombMenu()},create:function(){this.container=document.createElement("div"),this.container.className="KICKASSELEMENT KICKASShidden "+(this.game.shouldShowMenu()?"":"KICKASSNOMENU"),this.container.id="kickass-menu",this.game.shouldShowMenu()?(this.container.style.bottom="-250px",this.container.style.display="none"):removeClass(this.container,"KICKASShidden"),getAppContainerElement().appendChild(this.container);this.container.innerHTML='<div id="kickass-howto-image" class="KICKASSELEMENT kickass-howto-invisible"></div><div id="kickass-pointstab" style="width: 200px;" class="KICKASSELEMENT"><div id="kickass-bomb-menu" class="KICKASSELEMENT KICKASShidden"><ul id="kickass-bomb-list" class="KICKASSELEMENT"></ul></div><div id="kickass-weapons-menu" class="KICKASSELEMENT KICKASShidden" style="display:none"><ul id="kickass-weapons-list" class="KICKASSELEMENT"></ul></div><div id="kickass-pointstab-wrapper" class="KICKASSELEMENT"><div id="kickass-points" class="KICKASSELEMENT">'+this.numPoints+'</div><div id="kickass-esctoquit" class="KICKASSELEMENT">Press esc to quit</div>'+this.getShareHTML()+"</div></div>",this.pointsTab=document.getElementById("kickass-pointstab"),this.pointsTabWrapper=document.getElementById("kickass-pointstab-wrapper"),this.points=document.getElementById("kickass-points"),this.escToQuit=document.getElementById("kickass-esctoquit"),this.howToImage=document.getElementById("kickass-howto-image"),this.weaponsMenu=document.getElementById("kickass-weapons-menu"),this.weaponsList=document.getElementById("kickass-weapons-list"),this.bombLink=document.getElementById("kickass-bomb-menu");for(var t=this.container.getElementsByTagName("*"),e=0;e<t.length;e++)this.game.registerElement(t[e]);this.game.registerElement(this.container),this.game.shouldShowMenu()?(this.menu=new Menu(this.game),this.menu.parent=this,this.menu.generate(this.container)):setTimeout(function(){this.onGameReady()}.bind(this),100),addEvent(this.bombLink,"click",bind(this,(function(t){stopEvent(t),this.game.fireBomb()}))),addEvent(this.pointsTabWrapper,"click",bind(this,this.toggleMenu)),addEvent(this.weaponsMenu,"click",bind(this,this.toggleWeaponsMenu)),this.generateDefaults()},getShareHTML:function(){return""},onGameReady:function(){this.container.style.display="block",this.game.shouldShowHowToImage()&&(setTimeout(bind(this,(function(){removeClass(this.howToImage,"kickass-howto-invisible")})),10),setTimeout(bind(this,(function(){addClass(this.howToImage,"kickass-howto-invisible")})),4e3))},navigateTo:function(t,e){e||this.showMenu(),this.menu&&this.menu.socketPostMessage("navigate:!"+t)},toggleMenu:function(){this.game.shouldShowMenu()?hasClass(this.container,"KICKASShidden")?this.showMenu():this.hideMenu():this.showMenu()},toggleWeaponsMenu:function(){hasClass(this.weaponsMenu,"KICKASShidden")?this.showWeaponsMenu():this.hideWeaponsMenu()},hideWeaponsMenu:function(){this.weaponsMenu.style.width="",addClass(this.weaponsMenu,"KICKASShidden")},showWeaponsMenu:function(){var t=this.weaponsMenu.getElementsByTagName("li");t=t[t.length-1],this.weaponsMenu.style.width=t.offsetLeft+t.offsetWidth-47+"px",removeClass(this.weaponsMenu,"KICKASShidden")},showMenu:function(){this.game.shouldShowMenu()&&(this.container.style.bottom="",removeClass(this.container,"KICKASShidden"))},hideMenu:function(){this.container.style.bottom="",addClass(this.container,"KICKASShidden")},showBombMenu:function(){this.bombLink.style.width=""},hideBombMenu:function(){this.bombLink.style.width="0px"},getHeight:function(){return this.container.clientHeight},isVisible:function(){return!hasClass(this.container,"KICKASShidden")},addPoints:function(t,e){var s=t*this.game.multiplier;this.numPoints+=s,this.points.innerHTML=this.numPoints,this.game.statisticsManager&&this.game.statisticsManager.increasePointsGainedWithPoints(s),this.game.ui.addPointsBubbleAt(e,s)},includeCSS:function(t){var e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href=t,(document.head||document.body).appendChild(e)},sendMessageToMenu:function(t){this.menu&&this.menu.sendMessage(t)},addWeapon:function(t,e){var s=document.createElement("li");s.className="KICKASSELEMENT kickass-weapon-item",s.weapon=t,s.style.backgroundImage="url("+GameGlobals.path("css/gfx/kickass/weap-"+t.id+".png")+")",s.innerHTML='<span class="KICKASSELEMENT">'+t.name+"</span>",this.weaponsList.appendChild(s),addEvent(s,"click",bind(this,(function(s){stopEvent(s),this.changeWeapon(t),this.sendMessageToMenu("changeWeapon:!"+e)})))},changeWeapon:function(t){this.game.changeWeapon(t)},destroy:function(){for(var t=this.container.getElementsByTagName("*"),e=0;e<t.length;e++)this.game.unregisterElement(t[e]);this.game.unregisterElement(this.container),this.menu&&this.menu.destroy(),this.container.parentNode.removeChild(this.container)}}),UIManager=new Class({initialize:function(t){this.UNIQID=0,this.game=t,this.pointBubbles={},this.messages={},this.fx=new Fx,this.fx.addListener(this)},update:function(t){this.fx.update()},set:function(t,e,s){var i=t.split("-")[0],n=t.split("-")[1];if(this.pointBubbles[n]){var a=this.pointBubbles[n];a.style.top=e[0]+"px",a.style.opacity=e[1],1==s&&a.parentNode&&(a.parentNode.removeChild(a),delete this.pointBubbles[n])}else if(this.messages[n]&&"messagedown"==i){(o=this.messages[n]).style.top=e[0]+"px",1==s&&setTimeout(bind(this,(function(){this.fx.add("messageup-"+n,{tweens:[[e[0],-100]],transition:Tween.Quadratic,duration:300})})),o.staytime||4e3)}else if(this.messages[n]&&"messageup"==i){var o;(o=this.messages[n]).style.top=e[0]+"px",1==s&&(o.parentNode.removeChild(o),delete this.messages[n])}},addPointsBubbleAt:function(t,e){var s="bubble"+this.UNIQID++,i=this.game.scrollPos.y+t.y,n=newElement("span",{innerHTML:e,className:"KICKASSELEMENT",styles:{position:"absolute",font:"20px Arial",fontWeight:"bold",opacity:"1",color:"black",textShadow:"#fff 1px 1px 3px",top:i,zIndex:"10000000"}});n.style.left=t.x-n.offsetWidth/2+"px",getAppContainerElement().appendChild(n),this.pointBubbles[s]=n,this.fx.add("bubble-"+s,{tweens:[[i,i-15],[1,0]]})},showMessage:function(t,e){e=e||!1;var s=this.UNIQID++,i=newElement("div",{innerHTML:t,className:"KICKASSELEMENT",id:"kickass-message-"+s,styles:{position:"fixed",top:-100,left:"50%",marginLeft:-150,width:300,background:"#222",opacity:.8,padding:"10px",color:"#fff",textAlign:"center",borderRadius:15,font:"20px Arial",fontWeight:"bold",zIndex:"10000000"}});i.staytime=e,getAppContainerElement().appendChild(i);var n=this.getLowestBubbleY();return i.kickassto=n,this.fx.add("messagedown-"+s,{duration:300,tweens:[[-100,n]],transition:Tween.Quadratic}),this.messages[s]=i,i},getLowestBubbleY:function(){var t=100;for(var e in this.messages)this.messages.hasOwnProperty(e)&&(t=Math.max(this.messages[e].kickassto+this.messages[e].offsetHeight+10,t));return t}}),AudioManager=new Class({initialize:function(t,e){if(this.src=t,this.formats=e,channels=8,this.supportsAudio=void 0!==document.createElement("audio").play,this.supportsAudio){this.numChannels=channels,this.channels=[];for(var s=0;s<this.numChannels;s++)this.channels.push({isPlaying:!1,element:this.prepareElement(this.buildAudioElement())})}},buildAudioElement:function(){for(var t,e={ogg:"audio/ogg",mp3:"audio/mpeg"},s=document.createElement("audio"),i=0;t=this.formats[i];i++){var n=document.createElement("source");n.src=this.src+"."+t,n.type=e[t],s.appendChild(n)}return s},prepareElement:function(t){if(void 0===t.addEventListener)return t;var e=this;return t.addEventListener("ended",(function(s){e.audioEnded(t)}),!1),t},audioEnded:function(t){for(var e,s=0;e=this.channels[s];s++)e.element===t&&(e.isPlaying=!1)},play:function(){if(this.supportsAudio)for(var t,e=0;t=this.channels[e];e++)if(!t.isPlaying)return t.isPlaying=!0,void("function"==typeof t.element.play&&t.element.play())}}),Ships={Standard:{points:[[-10,10],[0,-15],[10,10]],thrusters:[{s:{w:20,h:7},p:{x:0,y:14},a:0}],cannons:[{p:{x:0,y:-15},a:0}]}},PLAYERIDS=0,Player=new Class({initialize:function(t){this.id=PLAYERIDS++,this.game=t,this.tween=!1,this.isBound=!0,this.pos=new Vector(1630,217),this.vel=new Vector(0,0),this.acc=new Vector(0,0),this.dir=new Vector(0,1),this.currentRotation=0,this.isBroken=!1,this.lineOffsets=[],this.deadTime=0,this.friction=.95,this.terminalVelocity=2e3,this.lastPos=new Vector(0,0)},setShip:function(t){this.ship=t,this.verts=[];for(var e,s=0;e=this.ship.points[s];s++)this.verts.push(new Vector(e[0],e[1]));this.verts.push(this.verts[0]),this.thrusters=[],this.cannons=[],this.addThrusters(this.ship.thrusters),this.addCannons(this.ship.cannons),this.size=this.getSizeFromVertsAndObjects(),this.bounds=this.calculateBounds(),this.sheet&&this.sheet.destroy(),this.sheet=new Sheet(new Rect(100,100,this.bounds.x,this.bounds.y)),this.forceRedraw=!0},setCannons:function(t){for(var e,s=[],i=0;e=this.cannons[i];i++){var n=new t(this,this.game,e.pos.x,e.pos.y,e.angle);s.push(n),e.destroy()}this.cannons=s},addThrusters:function(t){for(var e,s=0;e=t[s];s++){var i=new Thruster(e);this.thrusters.push(i)}},addCannons:function(t){for(var e,s=0;e=t[s];s++){var i=new(WeaponMap[e.m]||WeaponMap.cannon).cannonClass(this,this.game,e.p.x,e.p.y,e.a);i.player=this,i.game=this.game,this.cannons.push(i)}},update:function(t){if(this.isBroken){if(!this.lineOffsets.length)for(var e=0;e<this.verts.length-1;e++)this.lineOffsets[e]={pos:new Vector(0,0),dir:new Vector(1,1).setAngle(2*Math.PI*Math.random())};for(e=0;e<this.lineOffsets.length;e++)this.lineOffsets[e].pos.add(this.lineOffsets[e].dir.cp().setLength(50).mul(t));return this.sheet.clear(),this.sheet.setAngle(this.dir.angle()),this.sheet.setPosition(this.pos),this.sheet.drawBrokenPlayer(this.verts,this.lineOffsets),void(now()-this.deadTime>1e3&&(this.isBroken=!1,this.lineOffsets=[],this.randomPos()))}this.tween||(this.game.isKeyPressed("left")||this.game.isKeyPressed("right")?(this.game.isKeyPressed("left")&&this.rotateLeft(t),this.game.isKeyPressed("right")&&this.rotateRight(t)):this.stopRotate(),this.game.isKeyPressed("up")?this.activateThrusters():this.stopThrusters()),this.game.isKeyPressed(" ")?(this.isShooting=!0,this.isBroken||this.shootPressed()):this.isShooting&&(this.isShooting=!1,this.shootReleased()),this.currentRotation&&this.dir.setAngle(this.dir.angle()+this.currentRotation*t);var s=this.acc.mulNew(t).sub(this.vel.mulNew(t*this.friction));this.vel.add(s),this.vel.len()>this.terminalVelocity&&this.vel.setLength(this.terminalVelocity);var i=this.vel.mulNew(t);this.pos.add(i),this.game.statisticsManager&&this.game.statisticsManager.increaseDistanceWithPixels(i.len());var n=!this.acc.is({x:0,y:0});for(e=0;a=this.thrusters[e];e++)a.setIsShown(n),a.update(t);if(this.isBound&&this.checkBounds(),!this.lastPos.is(this.pos)||this.currentRotation||this.forceRedraw){if(this.forceRedraw=!1,this.sheet.clear(),this.sheet.setAngle(this.dir.angle()+Math.PI/2),this.sheet.setPosition(this.pos),n){var a;for(e=0;a=this.thrusters[e];e++)a.drawTo(this.sheet)}this.sheet.drawPlayer(this.verts),this.lastPos=this.pos.cp()}var o;for(e=0;o=this.cannons[e];e++)o.update(t)},randomPos:function(){var t=this.game.windowSize.width,e=this.game.windowSize.height;this.pos=new Vector(random(0,t),random(0,e))},checkBounds:function(){if(!this.tween){var t=this.game.windowSize.width,e=this.game.windowSize.height,s=this.pos.x+this.sheet.rect.size.width/2,i=this.pos.y+this.sheet.rect.size.height/2;s>t?(window.scrollTo(this.game.scrollPos.x+50,this.game.scrollPos.y),this.pos.x=0):this.pos.x<0&&(window.scrollTo(this.game.scrollPos.x-50,this.game.scrollPos.y),this.pos.x=t-this.sheet.rect.size.width/2),i>e?(window.scrollTo(this.game.scrollPos.x,this.game.scrollPos.y+.75*e),this.pos.y=0):this.pos.y<0&&(window.scrollTo(this.game.scrollPos.x,this.game.scrollPos.y-.75*e),this.pos.y=e-this.sheet.rect.size.height/2)}},inRect:function(t){for(var e,s=!1,i=0;e=this.verts[i];i++)t.hasPoint(new Vector(e.x+this.pos.x,e.y+this.pos.y))&&(s=!0);return s},hit:function(t){this.isBroken||(this.isBroken=!0,this.deadTime=now())},activateThrusters:function(){this.game.statisticsManager&&this.game.statisticsManager.usedThrusters(),this.acc=new Vector(500,0).setAngle(this.dir.angle())},stopThrusters:function(){this.acc=new Vector(0,0)},rotateLeft:function(t){this.currentRotation=Math.max(2*-Math.PI,this.currentRotation-10*Math.PI*t)},rotateRight:function(t){this.currentRotation=Math.min(2*Math.PI,this.currentRotation+10*Math.PI*t)},stopRotate:function(){this.currentRotation=0},getSizeFromVertsAndObjects:function(){for(var t,e=0,s=0;t=this.verts[s];s++)e=Math.max(e,new Vector(t).len());var i;for(s=0;i=this.thrusters[s];s++){var n=new Vector(i.pos.x-i.size.width/2,i.pos.y-i.size.height/2).rotate(i.angle),a=new Vector(i.pos.x+i.size.width/2,i.pos.y-i.size.height/2).rotate(i.angle),o=new Vector(i.pos.x-i.size.width/2,i.pos.y+i.size.height/2).rotate(i.angle),h=new Vector(i.pos.x+i.size.width/2,i.pos.y+i.size.height/2).rotate(i.angle);e=Math.max(e,n.len(),a.len(),o.len(),h.len())}return{width:2*e,height:2*e}},calculateBounds:function(){return{x:1*Math.max(this.size.width,this.size.height),y:1*Math.max(this.size.height,this.size.width)}},shootPressed:function(){for(var t,e=0;t=this.cannons[e];e++)t.shootPressed()},shootReleased:function(){for(var t,e=0;t=this.cannons[e];e++)t.shootReleased()},flyTo:function(t,e,s){this.tween={start:{pos:this.pos.cp(),dir:this.dir.cp()},to:new Vector(t,e),callback:s||function(){}},this.tween.time=this.getTimeforTween()},destroy:function(){this.sheet.destroy()}}),Thruster=new Class({initialize:function(t,e){this.pos=new Vector(t.p),this.size={width:t.s.w,height:t.s.h},this.angle=t.a||0,this.ship=e,this.isShown=!1,this.flameY=1,this.fx=new Fx,this.fx.addListener(this),this.flames={r:[],y:[]},this.lastFrameUpdate=0,this.generateFlames()},update:function(t){this.fx.update(),now()-this.lastFrameUpdate>1e3/60&&this.generateFlames()},set:function(t,e){if("flames"===t)this.flameY=e},setIsShown:function(t){!this.isShown&&t&&(this.flameY=0,this.generateFlames(),this.fx.add("flames",{start:this.flameY,end:1,duration:250,transition:Tween.Quintic})),this.isShown=t},drawTo:function(t){t.drawFlames(this.flames,this.angle)},generateFlames:function(){var t=this.size.width,e=.05*this.size.width,s=.8*this.size.width,i=.1*s,n=t/2,a=s/2,o=(this.size.height,this.pos.x),h=this.pos.y-this.size.height/2;function r(t,e){return new Vector(t,e)}this.flames.r=[r(-n+o,h)],this.flames.y=[r(-a+o,h)],this.flames.self=this;for(var l=0;l<t;l+=e)this.flames.r.push(r(l-n+o,this.flameY*random(.7*this.size.height,this.size.height)+h));this.flames.r.push(r(n+o,h));for(l=0;l<s;l+=i)this.flames.y.push(r(l-a+o,this.flameY*random(.4*this.size.height,.7*this.size.height)+h));this.flames.y.push(r(a+o,h)),this.lastFrameUpdate=now();for(var c=r(o,h),d=0;u=this.flames.r[d];d++)u.sub(c).rotate(this.angle).add(c);var u;for(d=0;u=this.flames.y[d];d++)u.sub(c).rotate(this.angle).add(c)}}),BombManager=new Class({initialize:function(t){this.game=t,this.bombShowDelay=30,this.nextBomb=this.bombShowDelay},update:function(t){this.game.isKeyPressed("F")&&this.isReady()&&this.blow(),-1!==this.nextBomb&&this.game.sessionManager.isPlaying&&(this.nextBomb-=t,this.nextBomb<0&&(this.game.menuManager.showBombMenu(),this.nextBomb=-1,this.game.ui.showMessage("BOMB IS READY<br />(lower right corner or F)")))},blow:function(){var t=this.game.ui.showMessage("3...",5e3);delay(1e3,(function(){t.innerHTML="2..."}),this),delay(2e3,(function(){t.innerHTML="1..."}),this),delay(3e3,(function(){t.innerHTML="boom"}),this),delay(3e3,this.blowStuffUp,this),this.nextBomb=this.bombShowDelay},blowStuffUp:function(){this.game.bulletManager.updateEnemyIndex();for(var t,e=this.game.bulletManager.enemyIndex,s=0;(t=e[s])&&s<10;s++){var i=getRect(t),n=new Vector(i.left+i.width/2,i.top+i.height/2);this.game.explosionManager.addExplosion(n,t,MegaParticleExplosion),t.parentNode.removeChild(t)}this.game.menuManager.hideBombMenu(),this.nextBomb=this.bombShowDelay},isReady:function(){return-1===this.nextBomb}}),ELEMENTSTHATARENOTTOBEINCLUDED=["BR","SCRIPT","STYLE","TITLE","META","HEAD","OPTION","OPTGROUP","LINK"],ELEMENTSIZETHRESHOLD=5,BulletManager=new Class({initialize:function(t){this.game=t,this.lastBlink=0,this.blinkActive=!1,this.enemyIndex=[],this.updateDelay=2.5,this.nextUpdate=this.updateDelay},update:function(t){this.game.isKeyPressed("B")?this.blink():this.blinkActive&&this.endBlink(),this.nextUpdate-=t,this.nextUpdate<0&&this.updateEnemyIndex()},blink:function(){if(now()-this.lastBlink>250){for(var t,e=0;t=this.enemyIndex[e];e++)this.blinkActive?t.style.outline=t.KICKASSOLDBORDER:t.style.outline="1px solid red";this.blinkActive=!this.blinkActive,this.lastBlink=now(),this.blinkActive||this.updateEnemyIndex()}},endBlink:function(){for(var t,e=0;t=this.enemyIndex[e];e++)t.style.outline=t.KICKASSOLDBORDER;this.lastBlink=0,this.blinkActive=!1},updateEnemyIndex:function(){var t=document.getElementsByTagName("*");this.enemyIndex=[];for(var e,s=0;e=t[s];s++)this.isDestroyable(e)&&(this.enemyIndex.push(e),e.KICKASSOLDBORDER=e.style.outline||document.defaultView.getComputedStyle(e,null).outline);this.nextUpdate=this.updateDelay},isDestroyable:function(t,e){if(this.shouldIgnoreElement(t,e))return!1;for(var s,i=0;s=t.childNodes[i];i++)if(1===s.nodeType&&-1===ELEMENTSTHATARENOTTOBEINCLUDED.indexOf(s.tagName)&&s.offsetWidth>=ELEMENTSIZETHRESHOLD&&s.offsetHeight>=ELEMENTSIZETHRESHOLD&&"hidden"!==document.defaultView.getComputedStyle(s,null).visibility)return!1;return!0},isDestroyableFromCollision:function(t){return this.isDestroyable(t,!0)},shouldIgnoreElement:function(t,e){return 1!==t.nodeType||(t==document.documentElement||t==document.body||(-1!==ELEMENTSTHATARENOTTOBEINCLUDED.indexOf(t.tagName)||("hidden"==t.style.visibility||"none"==t.style.display||("string"==typeof t.className&&-1!=t.className.indexOf("KICKASSELEMENT")||(!e&&(t.offsetWidth<ELEMENTSIZETHRESHOLD||t.offsetHeight<ELEMENTSIZETHRESHOLD)||((t.offsetLeft<0||t.offsetTop<0)&&((s=getRect(t)).left+s.width<0||s.top+s.height<0)||(s||(s=getRect(t)),s.top>=this.game.scrollSize.y)))))));var s},destroy:function(){for(var t in this.bullets)if(this.bullets.hasOwnProperty(t))for(var e,s=0;e=this.bullets[t][s];s++)e.destroy();this.bullets={}}}),SessionManager=new Class({initialize:function(t){this.game=t,this.isPlaying=!1},update:function(t){this.isPlaying&&0==this.game.bulletManager.enemyIndex.length&&this.weHaveWon()},weHaveWon:function(){this.isPlaying=!1,this.game.ui.showMessage("You're done!"),this.game.isCampaign()?(this.game.menuManager.showMenu(),this.game.menuManager.navigateTo("highscores")):this.game.menuManager.showMenu(),this.game.menuManager.sendMessageToMenu("gameFinished:!")}}),ExplosionManager=new Class({initialize:function(t){this.game=t,this.explosions=[]},update:function(t){for(var e,s=now(),i=0;e=this.explosions[i];i++)s-e.bornAt>(e.ttl||500)?(e.destroy(),this.explosions.splice(i,1)):e.update(t)},addExplosion:function(t,e,s){var i=new(s=s||ParticleExplosion)(t,e);i.game=this.game,i.checkBounds(),this.explosions.push(i),this.game.audioManager.explosion&&this.game.audioManager.explosion.play()},destroy:function(){for(var t,e=0;t=this.explosions[e];e++)t.destroy();this.explosions=[]}}),Cannon=new Class({initialize:function(t,e,s,i,n){this.player=t,this.game=e,this.pos=new Vector(s,i),this.angle=n||0},shootPressed:function(){},shootReleased:function(){},checkCollisions:function(){},getExplosionClass:function(){return ParticleExplosion},update:function(t){this.game.hideAll(),this.checkCollisions(t),this.game.showAll()},checkCollision:function(t){var e=t.checkCollision();return!!e&&(this.game.explosionManager.addExplosion(t.pos,e,this.getExplosionClass()),this.game.menuManager.addPoints(Math.min(e.getElementsByTagName("*").length+1,100),t.pos),e.isShot||e.parentNode.removeChild(e),this.game.statisticsManager&&this.game.statisticsManager.addElementsDestroyed(),!0)},createBullet:function(t){var e=new t(this.getABulletPos(),this.getABulletDir());return e.game=this.game,e.manager=this,e.initCanvas(),e.vel.add(e.vel.cp().setLength(this.player.vel.len())),e},getABulletPos:function(){return this.player.pos.cp().add(this.pos.cp().rotate(this.player.dir.angle()+Math.PI/2))},getABulletDir:function(){return this.player.dir.cp().rotate(this.angle)},destroy:function(){}}),LaserCannon=new Class({Extends:Cannon,initialize:function(t,e,s,i,n){Cannon.prototype.initialize.apply(this,arguments),this.lasers=[]},getExplosionClass:function(){return SplitExplosion},update:function(t){this.lasers.length&&(this.removeOld(),Cannon.prototype.update.call(this,t))},checkCollisions:function(t){for(var e,s=0;e=this.lasers[s];s++)e.update(t),this.checkCollision(e)},removeOld:function(){for(var t,e=0;t=this.lasers[e];e++)t.outOfBounds&&(t.destroy(),this.lasers.splice(e,1))},shootPressed:function(){this.lasers.length>5||now()-this.lastFired<500||(this.lastFired=now(),this.game.statisticsManager&&this.game.statisticsManager.addShotFired(),this.lasers.push(this.createBullet(LaserBullet)))},destroy:function(){if(this.lasers.length){for(var t,e=0;t=this.lasers[e];e++)t.destroy();this.lasers=[]}}}),BallCannon=new Class({Extends:Cannon,initialize:function(){Cannon.prototype.initialize.apply(this,arguments),this.lastFired=0,this.bullets=[]},getExplosionClass:function(){return ParticleExplosion},update:function(t){this.bullets.length&&(this.removeOld(),Cannon.prototype.update.call(this,t))},removeOld:function(){for(var t,e=now(),s=0;t=this.bullets[s];s++)e-t.bornAt>2e3&&(t.destroy(),this.bullets.splice(s,1))},checkCollisions:function(t){for(var e,s=0;e=this.bullets[s];s++)e.update(t),this.checkCollision(e)&&(e.destroy(),this.bullets.splice(s,1))},shootPressed:function(){now()-this.lastFired<200||(this.lastFired=now(),this.addBullet(),this.game.statisticsManager&&this.game.statisticsManager.addShotFired())},addBullet:function(){this.bullets.length>7&&(this.bullets[0].destroy(),this.bullets.shift());var t=this.createBullet(Bullet);this.bullets.push(t)},destroy:function(){for(var t,e=0;t=this.bullets[e];e++)t.destroy();this.bullets=[]}}),Bullet=new Class({initialize:function(t,e){this.pos=t.cp(),this.dir=e,this.vel=new Vector(500,500),this.bornAt=now()},initCanvas:function(){this.sheet=new Sheet(new Rect(this.pos.x,this.pos.y,5,5)),this.sheet.drawBullet()},draw:function(){this.sheet.setPosition(this.pos)},update:function(t){this.pos.add(this.vel.setAngle(this.dir.angle()).mulNew(t)),this.checkBounds(),this.draw()},checkCollision:function(){var t=document.elementFromPoint(this.pos.x,this.pos.y);return t&&3==t.nodeType&&(t=t.parentNode),!(!t||!this.game.bulletManager.isDestroyableFromCollision(t))&&t},checkBounds:function(){var t=this.game.windowSize.width,e=this.game.windowSize.height,s=this.pos.x+this.sheet.rect.size.width/2,i=this.pos.y+this.sheet.rect.size.height/2;s>t?this.pos.x=0:this.pos.x<0&&(this.pos.x=t-this.sheet.rect.size.width/2),i>e?this.pos.y=0:this.pos.y<0&&(this.pos.y=e-this.sheet.rect.size.height/2)},destroy:function(){this.sheet.destroy()}}),LaserBullet=new Class({Extends:Bullet,initialize:function(){Bullet.prototype.initialize.apply(this,arguments),this.vel=new Vector(750,750),this.lastDrawPos=this.pos.cp()},initCanvas:function(){var t=Math.max(GameGlobals.laserImage.width,GameGlobals.laserImage.height);this.sheet=new Sheet(new Rect(0,0,t,t))},update:function(t){Bullet.prototype.update.apply(this,arguments)},draw:function(){this.sheet.drawLaser(this.pos,this.dir),this.lastDrawPos=this.pos.cp()},checkBounds:function(){var t=this.game.windowSize.width,e=this.game.windowSize.height,s=this.pos.x+this.sheet.rect.size.width/2,i=this.pos.y+this.sheet.rect.size.height/2;(s>t||this.pos.x<0)&&(this.outOfBounds=!0),(i>e||this.pos.y<0)&&(this.outOfBounds=!0)},destroy:function(){this.sheet.destroy()}});GameGlobals.laserImage=document.createElement("img"),GameGlobals.laserImage.src=GameGlobals.path("css/gfx/kickass/laser.png");var Explosion=new Class({initialize:function(t,e){this.bornAt=now(),this.pos=t.cp()},update:function(t){},checkBounds:function(){},destroy:function(){}}),ParticleExplosion=new Class({Extends:Explosion,initialize:function(t,e){Explosion.prototype.initialize.apply(this,arguments),this.particleVel=new Vector(150,0),this.particles=[],this.generateParticles(),this.sheet=new Sheet(new Rect(t.x,t.y,250,250))},update:function(t){for(var e,s=0;e=this.particles[s];s++)e.pos.add(e.vel.mulNew(t).mul(random(.5,1)).setAngle(e.dir.angle()));this.sheet.clear(),this.sheet.drawExplosion(this.particles)},generateParticles:function(){for(var t=0,e=GameGlobals.hasCanvas?40:10;t<e;t++)this.particles.push({dir:new Vector(random(0,20)-10,random(0,20)-10).normalize(),vel:this.particleVel.cp(),pos:new Vector(0,0),color:["yellow","red"][random(0,1)]})},checkBounds:function(){var t=this.sheet.rect.getRight(),e=this.sheet.rect.getBottom(),s=this.game.windowSize.width,i=this.game.windowSize.height;t>s&&(this.pos.x-=t-s),e>i&&(this.pos.y-=e-i),this.sheet.setPosition(this.pos)},destroy:function(){this.sheet.destroy()}}),MegaParticleExplosion=new Class({Extends:ParticleExplosion,initialize:function(t,e){Explosion.prototype.initialize.apply(this,arguments),this.particleVel=new Vector(200,0),this.particles=[],this.generateParticles(),this.sheet=new Sheet(new Rect(t.x,t.y,500,500)),this.ttl=2e3,this.generationDelay=.6,this.generationTimes=2,this.nextGenerate=this.generationDelay},update:function(t){this.nextGenerate-=t,this.nextGenerate<=0&&this.generationTimes>0&&(this.nextGenerate=this.generationDelay,this.generateParticles(),this.generationTimes--),ParticleExplosion.prototype.update.call(this,t)}}),SplitExplosion=new Class({Extends:Explosion,initialize:function(t,e){e&&(Explosion.prototype.initialize.apply(this,arguments),this.element=e,this.fx=new Fx,this.fx.addListener(this),this.start())},update:function(t){this.element&&this.fx.update()},set:function(t,e){},start:function(){var t=this.createClones(),e=t[0],s=t[1],i="rotate(-"+random(30,50)+"deg) translate(-100px, 40px)",n="rotate("+random(30,50)+"deg) translate(100px, 40px)";setStyles(e,{transform:i}),setStyles(s,{transform:n}),this.left=e,this.right=s,this.fx.add("opacity",{start:1,end:.5,duration:500})},createClones:function(){var t=getRect(this.element),e=this.createContainer(t),s=this.createContainer(t),i=cloneElement(this.element),n=cloneElement(this.element);addClass(i,"KICKASSELEMENT"),addClass(n,"KICKASSELEMENT");var a={margin:0,overflow:"hidden"};return setStyles(i,a),setStyles(n,a),e.appendChild(i),s.appendChild(n),s.style.left=t.left+t.width/2+"px",s.scrollLeft+=t.width/2,this.element.style.opacity=0,this.element.style.visibility="hidden",this.element.style.display="none",each([e,s],(function(t){t.style.transition="transform 500ms ease-in"}))},createContainer:function(t){var e=document.createElement("div");return setStyles(e,{position:"absolute",left:t.left,top:t.top,width:.5*t.width,height:t.height,overflow:"hidden"}),getAppContainerElement().appendChild(e),e},destroy:function(){try{this.left.parentNode.removeChild(this.left),this.right.parentNode.removeChild(this.right),this.element.parentNode.removeChild(this.element)}catch(t){}}}),Weapons={1:{name:"Cannon",id:"cannon",cannonClass:BallCannon},2:{name:"Laser",id:"laser",cannonClass:LaserCannon}},WeaponMap={cannon:Weapons[1],laser:Weapons[2]},SheetCanvas=new Class({initialize:function(rect){with(this.canvas=document.createElement("canvas"),this.canvas.className="KICKASSELEMENT",this.canvas.style)position="absolute",zIndex="1000000";GameGlobals.kickass.registerElement(this.canvas),this.canvas.getContext&&(this.ctx=this.canvas.getContext("2d")),this.rect=rect,this.angle=0,this.updateCanvas(),getAppContainerElement().appendChild(this.canvas)},tracePoly:function(t){if(t[0]){this.ctx.save(),this.ctx.translate(this.rect.size.width/2,this.rect.size.height/2),this.ctx.rotate(this.angle),this.ctx.beginPath(),this.ctx.moveTo(t[0].x,t[0].y);for(var e=0;e<t.length;e++)this.ctx.lineTo(t[e].x,t[e].y);this.ctx.restore()}},setAngle:function(t){this.angle=t},updateCanvas:function(){this.canvas.width!=this.rect.size.width&&(this.canvas.width=this.rect.size.width),this.canvas.height!=this.rect.size.height&&(this.canvas.height=this.rect.size.height),this.canvas.style.left=GameGlobals.kickass.scrollPos.x+(this.rect.pos.x-this.rect.size.width/2)+"px",this.canvas.style.top=GameGlobals.kickass.scrollPos.y+(this.rect.pos.y-this.rect.size.height/2)+"px"},drawLine:function(t,e,s,i){this.ctx.save(),this.ctx.translate(this.rect.size.width/2,this.rect.size.height/2),this.ctx.beginPath(),this.ctx.moveTo(t,e),this.ctx.lineTo(s,i),this.ctx.closePath(),this.ctx.stroke(),this.ctx.restore()},drawCircle:function(t,e){e=e||{x:0,y:0},this.ctx.save(),this.ctx.translate(this.rect.size.width/2,this.rect.size.height/2),e&&this.ctx.translate(e.x,e.y),this.ctx.beginPath(),this.ctx.arc(0,0,t,0,2*Math.PI,!0),this.ctx.fill(),this.ctx.closePath(),this.ctx.restore()},drawRect:function(t,e,s,i){this.ctx.save(),this.ctx.translate(this.rect.size.width/2,this.rect.size.height/2),this.ctx.translate(t,e),this.ctx.fillRect(t,e,s,i),this.ctx.restore(),this.ctx.fill()},drawImageFull:function(t){this.ctx.drawImage(t,0,0,this.rect.size.width,this.rect.size.height)},drawImage:function(t,e,s){this.ctx.save(),this.ctx.translate(this.rect.size.width/2+e,this.rect.size.height/2+s),this.ctx.rotate(this.angle),this.ctx.drawImage(t,0,-11),this.ctx.restore()},setFillColor:function(t){this.ctx.fillStyle=t},setStrokeColor:function(t){this.ctx.strokeStyle=t},setLineWidth:function(t){this.ctx.lineWidth=t},fillPath:function(){this.ctx.fill()},strokePath:function(){this.ctx.stroke()},clear:function(){this.ctx.clearRect(0,0,this.rect.size.width,this.rect.size.height)},destroy:function(){GameGlobals.kickass.unregisterElement(this.canvas),this.canvas.parentNode.removeChild(this.canvas)}}),Sheet=new Class({initialize:function(t){this.rect=t,this.drawer=new SheetCanvas(t)},clear:function(){this.drawer.clear()},setPosition:function(t){this.rect.pos=t.cp(),this.drawer.rect=this.rect,this.drawer.updateCanvas()},setAngle:function(t){this.drawer.setAngle(t)},drawPlayer:function(t){this.drawer.setFillColor("white"),this.drawer.setStrokeColor("black"),this.drawer.setLineWidth(1.5),this.drawer.tracePoly(t),this.drawer.fillPath(),this.drawer.tracePoly(t),this.drawer.strokePath()},drawBrokenPlayer:function(t,e){this.drawer.setStrokeColor("black"),this.drawer.setLineWidth(1.5);for(var s,i=1,n=t[0];s=t[i];i++,n=s){var a=e[i-1];this.drawer.drawLine(n.x+a.pos.x,n.x+a.pos.y,s.x+a.pos.x,s.y+a.pos.y)}},drawFlames:function(t,e){this.drawer.setLineWidth(1.5),this.drawer.setFillColor("red"),this.drawer.tracePoly(t.r),this.drawer.fillPath(),this.drawer.setFillColor("yellow"),this.drawer.tracePoly(t.y),this.drawer.fillPath()},drawBullet:function(){this.drawer.setFillColor(GameGlobals.bulletColor),this.drawer.drawCircle(2.5)},drawExplosion:function(t){for(var e,s=0;e=t[s];s++)this.drawer.setFillColor(e.color),this.drawer.drawRect(e.pos.x,e.pos.y,3,3)},drawFace:function(t){this.drawer.drawImageFull(t)},drawLaser:function(t,e){this.clear(),this.setPosition(t),this.drawer.setAngle(e.angle()),this.drawer.drawImage(GameGlobals.laserImage,0,0)},transformToSheetCoordinates:function(t){return t.cp().sub(new Vector(this.rect.size.width/2,this.rect.size.height/2))},destroy:function(){this.drawer.destroy()}}),namespace=getGlobalNamespace(),initKickAss=function(){if(namespace.KICKASSGAME)namespace.KICKASSGAME.addPlayer();else if(namespace.KICKASS_SITE_KEY){var t=new MySite(namespace.KICKASS_SITE_KEY);t.load((function(e){namespace.KICKASSGAME=GameGlobals.kickass=new KickAss({mySite:!!e&&t}),namespace.KICKASSGAME.begin()}))}else namespace.KICKASSGAME=GameGlobals.kickass=new KickAss,namespace.KICKASSGAME.begin()};function getAppContainerElement(){return namespace.KICKASS_CONTAINER_ELEMENT?document.getElementById(namespace.KICKASS_CONTAINER_ELEMENT):document.body}namespace.LAZYLOAD_KICKASS?window.startBrowserBlaster=initKickAss:initKickAss()})("undefined"!=typeof exports?exports:window);
|
2
|
+
//# sourceMappingURL=../maps/js/plane.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
const RightMenuAplayer=(()=>{let e;const a={},l={checkAPlayer:()=>{void 0===e||void 0===a.player?l.setAPlayerObject():void 0===a.observer&&l.setAPlayerObserver()},setAPlayerObject:()=>{let e=document.querySelectorAll(".footer meting-js");0==e.length&&(e=document.querySelectorAll("meting-js")),a.player=void 0,e.forEach(((e,t)=>{e.meta.id==volantis.GLOBAL_CONFIG.plugins.aplayer.id&&e.aplayer&&void 0===a.player&&(a.player=e.aplayer,l.setAPlayerObserver(),l.updateTitle())}))},setAPlayerObserver:()=>{try{a.player.on("play",(function(e){l.updateAPlayerControllerStatus(e),a.status="play"})),a.player.on("pause",(function(e){l.updateAPlayerControllerStatus(e),a.status="pause"})),a.player.on("volumechange",(function(e){l.onUpdateAPlayerVolume(e)})),a.player.on("loadstart",(function(e){l.updateTitle(e)})),a.volumeBarWrap=document.getElementsByClassName("nav volume")[0].children[0],a.volumeBar=a.volumeBarWrap.children[0];const e=e=>{l.updateAPlayerVolume(e)},t=r=>{a.volumeBarWrap.classList.remove("aplayer-volume-bar-wrap-active"),document.removeEventListener("mouseup",t),document.removeEventListener("mousemove",e),l.updateAPlayerVolume(r)};a.volumeBarWrap.addEventListener("mousedown",(l=>{l.stopPropagation(),a.volumeBarWrap.classList.add("aplayer-volume-bar-wrap-active"),document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)})),a.volumeBarWrap.addEventListener("click",(e=>{e.stopPropagation()})),l.updateAPlayerControllerStatus(),l.onUpdateAPlayerVolume(),a.observer=!0}catch(e){console.log(e),a.observer=void 0}},updateAPlayerVolume:e=>{let l=((e.clientX||e.changedTouches[0].clientX)-a.volumeBar.getBoundingClientRect().left)/a.volumeBar.clientWidth;l=Math.max(l,0),l=Math.min(l,1),a.player.volume(l)},onUpdateAPlayerVolume:()=>{try{a.volumeBar.children[0].style.width=100*a.player.audio.volume+"%"}catch(e){console.log(e)}},updateAPlayerControllerStatus:()=>{try{a.player.audio.paused?(e="pause",document.getElementsByClassName("nav toggle")[0].children[0].classList.add("fa-play"),document.getElementsByClassName("nav toggle")[0].children[0].classList.remove("fa-pause")):(e="play",document.getElementsByClassName("nav toggle")[0].children[0].classList.remove("fa-play"),document.getElementsByClassName("nav toggle")[0].children[0].classList.add("fa-pause"))}catch(e){console.log(e)}},aplayerToggle:()=>{l.checkAPlayer();try{a.player.toggle()}catch(e){console.log(e)}},aplayerBackward:()=>{l.checkAPlayer();try{a.player.skipBack(),a.player.play()}catch(e){console.log(e)}},aplayerForward:()=>{l.checkAPlayer();try{a.player.skipForward(),a.player.play()}catch(e){console.log(e)}},aplayerVolume:e=>{l.checkAPlayer();try{a.player.volume(e)}catch(e){console.log(e)}},updateTitle:()=>{l.checkAPlayer();try{const e=a.player.list.index,l=a.player.list.audios[e];document.getElementsByClassName("nav music-title")[0].innerHTML=l.title}catch(e){}}};return{checkAPlayer:l.checkAPlayer,aplayerBackward:l.aplayerBackward,aplayerToggle:l.aplayerToggle,aplayerForward:l.aplayerForward,APlayer:a}})();Object.freeze(RightMenuAplayer),volantis.requestAnimationFrame((()=>{RightMenuAplayer.checkAPlayer()}));
|
2
|
+
//# sourceMappingURL=../../maps/js/plugins/aplayer.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
let Parallax={options:{}};Parallax.options.speed=.25,Parallax.options.zIndex=-100,Parallax.options.fade=1500,Parallax.slidein=()=>{let a=Parallax.mirrors[0].slider;Parallax.mirrors.length>=2&&(a=Parallax.mirrors[1].slider);var l=parseFloat(a.style.opacity);1!==l?Parallax.mirrors.length>=2?(l+=.1,a.style.opacity=l,setTimeout(Parallax.slidein,Parallax.options.fade/10)):a.style.opacity=1:Parallax.mirrors.length>=2&&(Parallax.mirrors[0].mirror.remove(),Parallax.mirrors.shift())},Parallax.start=()=>{let a=document.createElement("div");a.classList.add("parallax-mirror"),a.style.visibility="hidden",a.style.zIndex=Parallax.options.zIndex,a.style.position="fixed",a.style.top=0,a.style.left=0,a.style.overflow="hidden",Parallax.window.appendChild(a);let l=document.createElement("img");l.src=Parallax.options.src,l.alt="parallax",l.classList.add("parallax-slider"),l.style.opacity=0,a.appendChild(l),Parallax.mirrors||(Parallax.mirrors=[]);let o={};o.mirror=a,o.slider=l,Parallax.mirrors.push(o),Parallax.slidein(),l.addEventListener("load",(function(){Parallax.update()}),!1)},Parallax.init=()=>{function a(){Parallax.wH=document.documentElement.clientHeight,Parallax.wW=document.documentElement.clientWidth}function l(){var a;return window.pageYOffset?a=window.pageYOffset:document.compatMode&&"BackCompat"!=document.compatMode?a=document.documentElement.scrollTop:document.body&&(a=document.body.scrollTop),a}window.addEventListener("resize",(function(){a(),Parallax.update()}),!1),a();let o=-1;!function a(){const t=l();o!==t&&(o=t,function(){const a=l();Parallax.sT=Math.max(0,a),Parallax.sL=Math.max(0,document.body.scrollLeft),Parallax.overScroll=Math.min(a,0)}(),Parallax.update()),window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame,window.requestAnimationFrame(a)}()},Parallax.refreshItem=a=>{Parallax.options.aspectRatio=a.naturalWidth/(a.naturalHeight||1);const l=Parallax.options.aspectRatio||1;Parallax.options.boxWidth=Parallax.window.clientWidth,Parallax.options.boxHeight=Parallax.window.clientHeight,Parallax.options.boxOffsetTop=Parallax.window.scrollTop,Parallax.options.boxOffsetLeft=Parallax.window.scrollLeft,Parallax.options.boxOffsetBottom=Parallax.options.boxOffsetTop+Parallax.options.boxHeight;const o=Parallax.wH,t=Parallax.options.boxOffsetTop,r=Math.max(Parallax.options.boxOffsetTop+Parallax.options.boxHeight-o,0),i=Parallax.options.boxHeight+(t-r)*(1-Parallax.options.speed)|0,e=(Parallax.options.boxOffsetTop-t)*(1-Parallax.options.speed)|0;let s;Parallax.options.boxWidth<i*l?(Parallax.options.imageWidth=i*l|0,Parallax.options.imageHeight=i,Parallax.options.offsetBaseTop=e,s=Parallax.options.imageWidth-Parallax.options.boxWidth,Parallax.options.offsetLeft=-s/2|0):(Parallax.options.imageWidth=Parallax.options.boxWidth,Parallax.options.imageHeight=Parallax.options.boxWidth/l|0,Parallax.options.offsetLeft=0,s=Parallax.options.imageHeight-i,Parallax.options.offsetBaseTop=e-s/2|0)},Parallax.renderItem=(a,l)=>{const o=Parallax.sT,t=Parallax.sL,r=o+Parallax.wH;Parallax.options.boxOffsetBottom>o&&Parallax.options.boxOffsetTop<=r?(Parallax.options.visibility="visible",Parallax.options.mirrorTop=Parallax.options.boxOffsetTop-o,Parallax.options.mirrorLeft=Parallax.options.boxOffsetLeft-t,Parallax.options.offsetTop=Parallax.options.offsetBaseTop-Parallax.options.mirrorTop*(1-Parallax.options.speed)):Parallax.options.visibility="hidden",a.style.transform="translate3d("+Parallax.options.mirrorLeft+"px, "+Parallax.options.mirrorTop+"px, 0px)",a.style.visibility=Parallax.options.visibility,a.style.height=Parallax.options.boxHeight+"px",a.style.width=Parallax.options.boxWidth+"px",l.style.transform="translate3d("+Parallax.options.offsetLeft+"px, "+Parallax.options.offsetTop+"px, 0px)",l.style.position="absolute",l.style.height=Parallax.options.imageHeight+"px",l.style.width=Parallax.options.imageWidth+"px",l.style.maxWidth="none"},Parallax.update=()=>{Parallax.mirrors&&Parallax.mirrors.forEach((a=>{Parallax.refreshItem(a.slider),Parallax.renderItem(a.mirror,a.slider)}))};
|
2
|
+
//# sourceMappingURL=../../maps/js/plugins/parallax.js.map
|