diff --git a/assets/index-DldcPy6s.css b/assets/index-DldcPy6s.css new file mode 100644 index 0000000..5dec7b0 --- /dev/null +++ b/assets/index-DldcPy6s.css @@ -0,0 +1 @@ +:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;min-height:100vh} diff --git a/assets/index-_URrUaSR.js b/assets/index-_URrUaSR.js new file mode 100644 index 0000000..13cbaa7 --- /dev/null +++ b/assets/index-_URrUaSR.js @@ -0,0 +1,6301 @@ +var Kt=Object.defineProperty;var Zt=(j,_,st)=>_ in j?Kt(j,_,{enumerable:!0,configurable:!0,writable:!0,value:st}):j[_]=st;var Ct=(j,_,st)=>(Zt(j,typeof _!="symbol"?_+"":_,st),st);(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const ht of document.querySelectorAll('link[rel="modulepreload"]'))at(ht);new MutationObserver(ht=>{for(const ft of ht)if(ft.type==="childList")for(const p of ft.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&at(p)}).observe(document,{childList:!0,subtree:!0});function st(ht){const ft={};return ht.integrity&&(ft.integrity=ht.integrity),ht.referrerPolicy&&(ft.referrerPolicy=ht.referrerPolicy),ht.crossOrigin==="use-credentials"?ft.credentials="include":ht.crossOrigin==="anonymous"?ft.credentials="omit":ft.credentials="same-origin",ft}function at(ht){if(ht.ep)return;ht.ep=!0;const ft=st(ht);fetch(ht.href,ft)}})();function Dt(){}function Vt(j){return j()}function Xt(){return Object.create(null)}function Bt(j){j.forEach(Vt)}function Yt(j){return typeof j=="function"}function Jt(j,_){return j!=j?_==_:j!==_||j&&typeof j=="object"||typeof j=="function"}function Qt(j){return Object.keys(j).length===0}function $t(j,_,st){j.insertBefore(_,st||null)}function Wt(j){j.parentNode&&j.parentNode.removeChild(j)}function jt(j){return document.createElement(j)}function kt(j){return Array.from(j.childNodes)}function Lt(j,_,st,at){st==null?j.style.removeProperty(_):j.style.setProperty(_,st,at?"important":"")}let wt;function Ot(j){wt=j}function qt(){if(!wt)throw new Error("Function called outside component initialization");return wt}function _t(j){qt().$$.on_mount.push(j)}const Mt=[],Gt=[];let Ft=[];const zt=[],te=Promise.resolve();let Nt=!1;function ee(){Nt||(Nt=!0,te.then(Ht))}function Ut(j){Ft.push(j)}const It=new Set;let Pt=0;function Ht(){if(Pt!==0)return;const j=wt;do{try{for(;Ptj.indexOf(at)===-1?_.push(at):st.push(at)),st.forEach(at=>at()),Ft=_}const ne=new Set;function re(j,_){j&&j.i&&(ne.delete(j),j.i(_))}function ae(j,_,st){const{fragment:at,after_update:ht}=j.$$;at&&at.m(_,st),Ut(()=>{const ft=j.$$.on_mount.map(Vt).filter(Yt);j.$$.on_destroy?j.$$.on_destroy.push(...ft):Bt(ft),j.$$.on_mount=[]}),ht.forEach(Ut)}function oe(j,_){const st=j.$$;st.fragment!==null&&(se(st.after_update),Bt(st.on_destroy),st.fragment&&st.fragment.d(_),st.on_destroy=st.fragment=null,st.ctx=[])}function he(j,_){j.$$.dirty[0]===-1&&(Mt.push(j),ee(),j.$$.dirty.fill(0)),j.$$.dirty[_/31|0]|=1<<_%31}function le(j,_,st,at,ht,ft,p=null,S=[-1]){const t=wt;Ot(j);const d=j.$$={fragment:null,ctx:[],props:ft,update:Dt,not_equal:ht,bound:Xt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(_.context||(t?t.$$.context:[])),callbacks:Xt(),dirty:S,skip_bound:!1,root:_.target||t.$$.root};p&&p(d.root);let c=!1;if(d.ctx=st?st(j,_.props||{},(l,r,...n)=>{const e=n.length?n[0]:r;return d.ctx&&ht(d.ctx[l],d.ctx[l]=e)&&(!d.skip_bound&&d.bound[l]&&d.bound[l](e),c&&he(j,l)),r}):[],d.update(),c=!0,Bt(d.before_update),d.fragment=at?at(d.ctx):!1,_.target){if(_.hydrate){const l=kt(_.target);d.fragment&&d.fragment.l(l),l.forEach(Wt)}else d.fragment&&d.fragment.c();_.intro&&re(j.$$.fragment),ae(j,_.target,_.anchor),Ht()}Ot(t)}class ue{constructor(){Ct(this,"$$");Ct(this,"$$set")}$destroy(){oe(this,1),this.$destroy=Dt}$on(_,st){if(!Yt(st))return Dt;const at=this.$$.callbacks[_]||(this.$$.callbacks[_]=[]);return at.push(st),()=>{const ht=at.indexOf(st);ht!==-1&&at.splice(ht,1)}}$set(_){this.$$set&&!Qt(_)&&(this.$$.skip_bound=!0,this.$$set(_),this.$$.skip_bound=!1)}}const fe="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(fe);var de=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ve(j){return j&&j.__esModule&&Object.prototype.hasOwnProperty.call(j,"default")?j.default:j}var bt={exports:{}};(function(j,_){(function(at,ht){j.exports=ht()})(de,()=>(()=>{var st={6659:p=>{var S=Object.prototype.hasOwnProperty,t="~";function d(){}Object.create&&(d.prototype=Object.create(null),new d().__proto__||(t=!1));function c(e,s,u){this.fn=e,this.context=s,this.once=u||!1}function l(e,s,u,i,a){if(typeof u!="function")throw new TypeError("The listener must be a function");var o=new c(u,i||e,a),h=t?t+s:s;return e._events[h]?e._events[h].fn?e._events[h]=[e._events[h],o]:e._events[h].push(o):(e._events[h]=o,e._eventsCount++),e}function r(e,s){--e._eventsCount===0?e._events=new d:delete e._events[s]}function n(){this._events=new d,this._eventsCount=0}n.prototype.eventNames=function(){var s=[],u,i;if(this._eventsCount===0)return s;for(i in u=this._events)S.call(u,i)&&s.push(t?i.slice(1):i);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(u)):s},n.prototype.listeners=function(s){var u=t?t+s:s,i=this._events[u];if(!i)return[];if(i.fn)return[i.fn];for(var a=0,o=i.length,h=new Array(o);a{/** + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82590),c=function(l,r,n,e){for(var s=l[0],u=1;u{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6124),c=function(l,r,n,e,s){return d(l,"angle",r,n,e,s)};p.exports=c},22015:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){c===void 0&&(c=0);for(var l=c;l{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){c===void 0&&(c=0);for(var l=t.length-1;l>=c;l--){var r=t[l],n=!0;for(var e in d)r[e]!==d[e]&&(n=!1);if(n)return r}return null};p.exports=S},12673:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40327),c=t(84093),l=t(72632),r=t(72283),n=t(71030),e=new n({sys:{queueDepthSort:r,events:{once:r}}},0,0,1,1).setOrigin(0,0),s=function(u,i){i===void 0&&(i={});var a=i.hasOwnProperty("width"),o=i.hasOwnProperty("height"),h=l(i,"width",-1),f=l(i,"height",-1),v=l(i,"cellWidth",1),m=l(i,"cellHeight",v),x=l(i,"position",c.TOP_LEFT),g=l(i,"x",0),y=l(i,"y",0),T=0,E=0,C=h*v,A=f*m;e.setPosition(g,y),e.setSize(v,m);for(var P=0;P{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6124),c=function(l,r,n,e,s){return d(l,"alpha",r,n,e,s)};p.exports=c},3877:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6124),c=function(l,r,n,e,s){return d(l,"x",r,n,e,s)};p.exports=c},71020:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6124),c=function(l,r,n,e,s,u,i){return n==null&&(n=r),d(l,"x",r,e,u,i),d(l,"y",n,s,u,i)};p.exports=c},28970:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6124),c=function(l,r,n,e,s){return d(l,"y",r,n,e,s)};p.exports=c},82249:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){c===void 0&&(c=0),l===void 0&&(l=6.28);for(var r=c,n=(l-c)/t.length,e=d.x,s=d.y,u=d.radius,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){c===void 0&&(c=0),l===void 0&&(l=6.28);for(var r=c,n=(l-c)/t.length,e=d.width/2,s=d.height/2,u=0;u{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8570),c=function(l,r){for(var n=d(r,l.length),e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40053),c=t(77640),l=t(38487),r=function(n,e,s){s===void 0&&(s=0);var u=d(e,!1,n.length);s>0?c(u,s):s<0&&l(u,Math.abs(s));for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(58813),c=function(l,r,n){var e=d({x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2},n),s=d({x1:r.x2,y1:r.y2,x2:r.x3,y2:r.y3},n),u=d({x1:r.x3,y1:r.y3,x2:r.x1,y2:r.y1},n);e.pop(),s.pop(),u.pop(),e=e.concat(s,u);for(var i=e.length/l.length,a=0,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r,n){l===void 0&&(l=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,s=0,u=t.length;if(n===1)for(e=r;e=0;e--)t[e][d]+=c+s*l,s++;return t};p.exports=S},23646:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r,n){l===void 0&&(l=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,s=0,u=t.length;if(n===1)for(e=r;e=0;e--)t[e][d]=c+s*l,s++;return t};p.exports=S},4392:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(30977),c=function(l,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72006),c=function(l,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74077),c=function(l,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(30001),c=function(l,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(99761),c=function(l,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6124),c=function(l,r,n,e,s){return d(l,"rotation",r,n,e,s)};p.exports=c},87299:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72395),c=t(53996),l=function(r,n,e){for(var s=n.x,u=n.y,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72395),c=function(l,r,n,e){var s=r.x,u=r.y;if(e===0)return l;for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6124),c=function(l,r,n,e,s){return d(l,"scaleX",r,n,e,s)};p.exports=c},51449:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6124),c=function(l,r,n,e,s,u,i){return n==null&&(n=r),d(l,"scaleX",r,e,u,i),d(l,"scaleY",n,s,u,i)};p.exports=c},64895:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6124),c=function(l,r,n,e,s){return d(l,"scaleY",r,n,e,s)};p.exports=c},30329:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s){return d(l,"alpha",r,n,e,s)};p.exports=c},43954:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e){return d(l,"blendMode",r,0,n,e)};p.exports=c},70688:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s){return d(l,"depth",r,n,e,s)};p.exports=c},8314:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s,u,i){return n==null&&(n=r),d(l,"originX",r,e,u,i),d(l,"originY",n,s,u,i),l.forEach(function(a){a.updateDisplayOrigin()}),l};p.exports=c},38767:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s){return d(l,"rotation",r,n,e,s)};p.exports=c},18584:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s,u,i){return n==null&&(n=r),d(l,"scaleX",r,e,u,i),d(l,"scaleY",n,s,u,i)};p.exports=c},17381:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s){return d(l,"scaleX",r,n,e,s)};p.exports=c},74370:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s){return d(l,"scaleY",r,n,e,s)};p.exports=c},27773:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s,u,i){return n==null&&(n=r),d(l,"scrollFactorX",r,e,u,i),d(l,"scrollFactorY",n,s,u,i)};p.exports=c},75257:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s){return d(l,"scrollFactorX",r,n,e,s)};p.exports=c},54512:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s){return d(l,"scrollFactorY",r,n,e,s)};p.exports=c},69423:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e){return d(l,"visible",r,0,n,e)};p.exports=c},94833:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s){return d(l,"x",r,n,e,s)};p.exports=c},14284:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s,u,i){return n==null&&(n=r),d(l,"x",r,e,u,i),d(l,"y",n,s,u,i)};p.exports=c},96574:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23646),c=function(l,r,n,e,s){return d(l,"y",r,n,e,s)};p.exports=c},74086:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736),c=function(l,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=new d);var u,i,a=l.length;if(a===1)u=l[0].x,i=l[0].y,l[0].x=r,l[0].y=n;else{var o=1,h=0;e===0&&(h=a-1,o=a-2),u=l[h].x,i=l[h].y,l[h].x=r,l[h].y=n;for(var f=0;f=a||o===-1)){var v=l[o],m=v.x,x=v.y;v.x=u,v.y=i,u=m,i=x,e===0?o--:o++}}return s.x=u,s.y=i,s};p.exports=c},86347:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(18592),c=function(l){return d(l)};p.exports=c},1558:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(5514),c=function(l,r,n,e,s){s===void 0&&(s=!1);var u=Math.abs(e-n)/l.length,i;if(s)for(i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87736),c=function(l,r,n,e,s){s===void 0&&(s=!1);var u=Math.abs(e-n)/l.length,i;if(s)for(i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r){if(r===void 0&&(r=!1),t.length===0)return t;if(t.length===1)return r?t[0][d]+=(l+c)/2:t[0][d]=(l+c)/2,t;var n=Math.abs(l-c)/(t.length-1),e;if(r)for(e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){for(var d=0;d{/** + * @author Richard Davey + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(1071),c=function(l,r,n){n===void 0&&(n=0);for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AlignTo:t(62270),Angle:t(61148),Call:t(22015),GetFirst:t(31060),GetLast:t(52367),GridAlign:t(12673),IncAlpha:t(691),IncX:t(3877),IncXY:t(71020),IncY:t(28970),PlaceOnCircle:t(82249),PlaceOnEllipse:t(30285),PlaceOnLine:t(61557),PlaceOnRectangle:t(63549),PlaceOnTriangle:t(51629),PlayAnimation:t(1045),PropertyValueInc:t(6124),PropertyValueSet:t(23646),RandomCircle:t(4392),RandomEllipse:t(94985),RandomLine:t(63305),RandomRectangle:t(90739),RandomTriangle:t(91417),Rotate:t(26182),RotateAround:t(87299),RotateAroundDistance:t(92194),ScaleX:t(30363),ScaleXY:t(51449),ScaleY:t(64895),SetAlpha:t(30329),SetBlendMode:t(43954),SetDepth:t(70688),SetHitArea:t(8314),SetOrigin:t(12894),SetRotation:t(38767),SetScale:t(18584),SetScaleX:t(17381),SetScaleY:t(74370),SetScrollFactor:t(27773),SetScrollFactorX:t(75257),SetScrollFactorY:t(54512),SetTint:t(69423),SetVisible:t(58291),SetX:t(94833),SetXY:t(14284),SetY:t(96574),ShiftPosition:t(74086),Shuffle:t(86347),SmootherStep:t(9938),SmoothStep:t(1558),Spread:t(71060),ToggleVisible:t(11207),WrapInRectangle:t(24404)}},85463:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=t(56694),l=t(16938),r=t(2406),n=t(71519),e=t(10850),s=t(28834),u=new c({initialize:function(a,o,h){this.manager=a,this.key=o,this.type="frame",this.frames=this.getFrames(a.textureManager,e(h,"frames",[]),e(h,"defaultTextureKey",null),e(h,"sortFrames",!0)),this.frameRate=e(h,"frameRate",null),this.duration=e(h,"duration",null),this.msPerFrame,this.skipMissedFrames=e(h,"skipMissedFrames",!0),this.delay=e(h,"delay",0),this.repeat=e(h,"repeat",0),this.repeatDelay=e(h,"repeatDelay",0),this.yoyo=e(h,"yoyo",!1),this.showBeforeDelay=e(h,"showBeforeDelay",!1),this.showOnStart=e(h,"showOnStart",!1),this.hideOnComplete=e(h,"hideOnComplete",!1),this.randomFrame=e(h,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(l.PAUSE_ALL,this.pause,this),this.manager.on(l.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(i,a,o,h){o===null&&h===null?(i.frameRate=24,i.duration=24/a*1e3):o&&h===null?(i.duration=o,i.frameRate=a/(o/1e3)):(i.frameRate=h,i.duration=a/h*1e3),i.msPerFrame=1e3/i.frameRate},addFrame:function(i){return this.addFrameAt(this.frames.length,i)},addFrameAt:function(i,a){var o=this.getFrames(this.manager.textureManager,a);if(o.length>0){if(i===0)this.frames=o.concat(this.frames);else if(i===this.frames.length)this.frames=this.frames.concat(o);else{var h=this.frames.slice(0,i),f=this.frames.slice(i);this.frames=h.concat(o,f)}this.updateFrameSequence()}return this},checkFrame:function(i){return i>=0&&i0){m.isLast=!0,m.nextFrame=f[0],f[0].prevFrame=m;var F=1/(f.length-1);for(g=0;g0?i.inReverse&&i.forward?i.forward=!1:this.repeatAnimation(i):i.complete():this.updateAndGetNextTick(i,a.nextFrame)},handleYoyoFrame:function(i,a){if(a||(a=!1),i.inReverse===!a&&i.repeatCounter>0){(i.repeatDelay===0||i.pendingRepeat)&&(i.forward=a),this.repeatAnimation(i);return}if(i.inReverse!==a&&i.repeatCounter===0){i.complete();return}i.forward=a;var o=a?i.currentFrame.nextFrame:i.currentFrame.prevFrame;this.updateAndGetNextTick(i,o)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(i){var a=i.currentFrame;a.isFirst?i.yoyo?this.handleYoyoFrame(i,!0):i.repeatCounter>0?i.inReverse&&!i.forward?this.repeatAnimation(i):(i.forward=!0,this.repeatAnimation(i)):i.complete():this.updateAndGetNextTick(i,a.prevFrame)},updateAndGetNextTick:function(i,a){i.setCurrentFrame(a),this.getNextTick(i)},removeFrame:function(i){var a=this.frames.indexOf(i);return a!==-1&&this.removeFrameAt(a),this},removeFrameAt:function(i){return this.frames.splice(i,1),this.updateFrameSequence(),this},repeatAnimation:function(i){if(i._pendingStop===2){if(i._pendingStopValue===0)return i.stop();i._pendingStopValue--}i.repeatDelay>0&&!i.pendingRepeat?(i.pendingRepeat=!0,i.accumulator-=i.nextTick,i.nextTick+=i.repeatDelay):(i.repeatCounter--,i.forward?i.setCurrentFrame(i.currentFrame.nextFrame):i.setCurrentFrame(i.currentFrame.prevFrame),i.isPlaying&&(this.getNextTick(i),i.handleRepeat()))},toJSON:function(){var i={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(a){i.frames.push(a.toJSON())}),i},updateFrameSequence:function(){for(var i=this.frames.length,a=1/(i-1),o,h=0;h1?(o.isLast=!0,o.prevFrame=this.frames[i-2],o.nextFrame=this.frames[0]):i>1&&(o.prevFrame=this.frames[h-1],o.nextFrame=this.frames[h+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(l.PAUSE_ALL,this.pause,this),this.manager.off(l.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r,n,e,s,u){u===void 0&&(u=!1),this.textureKey=r,this.textureFrame=n,this.index=e,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=u},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});p.exports=c},90249:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(85463),c=t(56694),l=t(33885),r=t(6659),n=t(16938),e=t(97081),s=t(72632),u=t(10850),i=t(83392),a=t(13401),o=t(76400),h=new c({Extends:r,initialize:function(v){r.call(this),this.game=v,this.textureManager=null,this.globalTimeScale=1,this.anims=new l,this.mixes=new l,this.paused=!1,this.name="AnimationManager",v.events.once(e.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(e.DESTROY,this.destroy,this)},addMix:function(f,v,m){var x=this.anims,g=this.mixes,y=typeof f=="string"?f:f.key,T=typeof v=="string"?v:v.key;if(x.has(y)&&x.has(T)){var E=g.get(y);E||(E={}),E[T]=m,g.set(y,E)}return this},removeMix:function(f,v){var m=this.mixes,x=typeof f=="string"?f:f.key,g=m.get(x);if(g)if(v){var y=typeof v=="string"?v:v.key;g.hasOwnProperty(y)&&delete g[y]}else v||m.delete(x);return this},getMix:function(f,v){var m=this.mixes,x=typeof f=="string"?f:f.key,g=typeof v=="string"?v:v.key,y=m.get(x);return y&&y.hasOwnProperty(g)?y[g]:0},add:function(f,v){return this.anims.has(f)?(console.warn("Animation key exists: "+f),this):(v.key=f,this.anims.set(f,v),this.emit(n.ADD_ANIMATION,f,v),this)},exists:function(f){return this.anims.has(f)},createFromAseprite:function(f,v,m){var x=[],g=this.game.cache.json.get(f);if(!g)return console.warn("No Aseprite data found for: "+f),x;var y=this,T=u(g,"meta",null),E=u(g,"frames",null);if(T&&E){var C=u(T,"frameTags",[]);C.forEach(function(A){var P=[],R=s(A,"name",null),F=s(A,"from",0),L=s(A,"to",0),B=s(A,"direction","forward");if(R&&(!v||v&&v.indexOf(R)>-1)){for(var N=0,U=F;U<=L;U++){var z=U.toString(),w=E[z];if(w){var I=s(w,"duration",i.MAX_SAFE_INTEGER);P.push({key:f,frame:z,duration:I}),N+=I}}var M=N/P.length;P.forEach(function(G){G.duration-=M}),B==="reverse"&&(P=P.reverse());var O={key:R,frames:P,duration:N,yoyo:B==="pingpong"},D;m?m.anims&&(D=m.anims.create(O)):D=y.create(O),D&&x.push(D)}})}return x},create:function(f){var v=f.key,m=!1;return v&&(m=this.get(v),m?console.warn("AnimationManager key already exists: "+v):(m=new d(this,v,f),this.anims.set(v,m),this.emit(n.ADD_ANIMATION,v,m))),m},fromJSON:function(f,v){v===void 0&&(v=!1),v&&this.anims.clear(),typeof f=="string"&&(f=JSON.parse(f));var m=[];if(f.hasOwnProperty("anims")&&Array.isArray(f.anims)){for(var x=0;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(85463),c=t(17489),l=t(56694),r=t(33885),n=t(16938),e=t(72632),s=new l({initialize:function(i){this.parent=i,this.animationManager=i.scene.sys.anims,this.animationManager.on(n.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(u){var i=this.parent;if(u===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,i;Array.isArray(u)||(u=[u]);for(var a=0;ah&&(m=0),this.randomFrame&&(m=c(0,h-1));var x=o.frames[m];m===0&&!this.forward&&(x=o.getLastFrame()),this.currentFrame=x}return this.parent},pause:function(u){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),u!==void 0&&this.setCurrentFrame(u),this.parent},resume:function(u){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),u!==void 0&&this.setCurrentFrame(u),this.parent},playAfterDelay:function(u,i){if(!this.isPlaying)this.delayCounter=i,this.play(u,!0);else{var a=this.nextAnim,o=this.nextAnimsQueue;a&&o.unshift(a),this.nextAnim=u,this._pendingStop=1,this._pendingStopValue=i}return this.parent},playAfterRepeat:function(u,i){if(i===void 0&&(i=1),!this.isPlaying)this.play(u);else{var a=this.nextAnim,o=this.nextAnimsQueue;a&&o.unshift(a),this.repeatCounter!==-1&&i>this.repeatCounter&&(i=this.repeatCounter),this.nextAnim=u,this._pendingStop=2,this._pendingStopValue=i}return this.parent},play:function(u,i){i===void 0&&(i=!1);var a=this.currentAnim,o=this.parent,h=typeof u=="string"?u:u.key;if(i&&this.isPlaying&&a.key===h)return o;if(a&&this.isPlaying){var f=this.animationManager.getMix(a.key,u);if(f>0)return this.playAfterDelay(u,f)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(u)},playReverse:function(u,i){i===void 0&&(i=!1);var a=typeof u=="string"?u:u.key;return i&&this.isPlaying&&this.currentAnim.key===a?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(u))},startAnimation:function(u){this.load(u);var i=this.currentAnim,a=this.parent;return i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,i.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,this.delayCounter===0?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),a},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(n.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(n.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(n.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(n.ANIMATION_COMPLETE,n.ANIMATION_COMPLETE_KEY)},emitEvents:function(u,i){var a=this.currentAnim;if(a){var o=this.currentFrame,h=this.parent,f=o.textureFrame;h.emit(u,a,o,h,f),i&&h.emit(i+a.key,a,o,h,f)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var u=this.currentFrame;if(!u)return 0;var i=u.progress;return this.inReverse&&(i*=-1),i},setProgress:function(u){return this.forward||(u=1-u),this.setCurrentFrame(this.currentAnim.getFrameByProgress(u)),this.parent},setRepeat:function(u){return this.repeatCounter=u===-1?Number.MAX_VALUE:u,this.parent},globalRemove:function(u,i){i===void 0&&(i=this.currentAnim),this.isPlaying&&i.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(u,i){u===void 0&&(u=!1),i===void 0&&(i=!1);var a=this.currentAnim,o=this.parent;return a?(i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),a.getFirstTick(this),this.emitEvents(n.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!u,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(a.frames[0]),this.parent):o},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var u=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(u)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var u=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(u)}return this.parent},stopAfterDelay:function(u){return this._pendingStop=1,this._pendingStopValue=u,this.parent},stopAfterRepeat:function(u){return u===void 0&&(u=1),this.repeatCounter!==-1&&u>this.repeatCounter&&(u=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=u,this.parent},stopOnFrame:function(u){return this._pendingStop=3,this._pendingStopValue=u,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(u,i){var a=this.currentAnim;if(!(!this.isPlaying||!a||a.paused)){if(this.accumulator+=i*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=i,this._pendingStopValue<=0))return this.stop();if(!this.hasStarted)this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart());else if(this.accumulator>=this.nextTick&&(this.forward?a.nextFrame(this):a.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var o=0;do this.forward?a.nextFrame(this):a.previousFrame(this),o++;while(this.isPlaying&&this.accumulator>this.nextTick&&o<60)}}},setCurrentFrame:function(u){var i=this.parent;return this.currentFrame=u,i.texture=u.frame.texture,i.frame=u.frame,i.isCropped&&i.frame.updateCropUVs(i._crop,i.flipX,i.flipY),u.setAlpha&&(i.alpha=u.alpha),i.setSizeToFrame(),i._originComponent&&(u.frame.customPivot?i.setOrigin(u.frame.pivotX,u.frame.pivotY):i.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(n.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===u&&this.stop()),i},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(u){return this.anims?this.anims.get(u):null},exists:function(u){return this.anims?this.anims.has(u):!1},create:function(u){var i=u.key,a=!1;return i&&(a=this.get(i),a?console.warn("Animation key already exists: "+i):(a=new d(this,i,u),this.anims||(this.anims=new r),this.anims.set(i,a))),a},createFromAseprite:function(u,i){return this.animationManager.createFromAseprite(u,i,this.parent)},generateFrameNames:function(u,i){return this.animationManager.generateFrameNames(u,i)},generateFrameNumbers:function(u,i){return this.animationManager.generateFrameNumbers(u,i)},remove:function(u){var i=this.get(u);return i&&(this.currentAnim===i&&this.stop(),this.anims.delete(u)),i},destroy:function(){this.animationManager.off(n.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});p.exports=s},44509:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="add"},84563:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationcomplete"},61586:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationcomplete-"},72175:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationrepeat"},568:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationrestart"},37690:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationstart"},58525:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationstop"},5243:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationupdate"},10598:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pauseall"},4860:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="remove"},31865:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resumeall"},16938:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADD_ANIMATION:t(44509),ANIMATION_COMPLETE:t(84563),ANIMATION_COMPLETE_KEY:t(61586),ANIMATION_REPEAT:t(72175),ANIMATION_RESTART:t(568),ANIMATION_START:t(37690),ANIMATION_STOP:t(58525),ANIMATION_UPDATE:t(5243),PAUSE_ALL:t(10598),REMOVE_ANIMATION:t(4860),RESUME_ALL:t(31865)}},13517:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Animation:t(85463),AnimationFrame:t(71519),AnimationManager:t(90249),AnimationState:t(16569),Events:t(16938)}},23740:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(33885),l=t(6659),r=t(69773),n=new d({initialize:function(){this.entries=new c,this.events=new l},add:function(e,s){return this.entries.set(e,s),this.events.emit(r.ADD,this,e,s),this},has:function(e){return this.entries.has(e)},exists:function(e){return this.entries.has(e)},get:function(e){return this.entries.get(e)},remove:function(e){var s=this.get(e);return s&&(this.entries.delete(e),this.events.emit(r.REMOVE,this,e,s.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});p.exports=n},43474:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23740),c=t(56694),l=t(97081),r=new c({initialize:function(e){this.game=e,this.binary=new d,this.bitmapFont=new d,this.json=new d,this.physics=new d,this.shader=new d,this.audio=new d,this.video=new d,this.text=new d,this.html=new d,this.obj=new d,this.tilemap=new d,this.xml=new d,this.custom={},this.game.events.once(l.DESTROY,this.destroy,this)},addCustom:function(n){return this.custom.hasOwnProperty(n)||(this.custom[n]=new d),this.custom[n]},destroy:function(){for(var n=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="add"},75968:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="remove"},69773:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADD:t(94762),REMOVE:t(75968)}},45820:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BaseCache:t(23740),CacheManager:t(43474),Events:t(69773)}},51052:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(64937),l=t(75606),r=t(6659),n=t(89787),e=t(74118),s=t(69360),u=t(93222),i=t(93736),a=new d({Extends:r,Mixins:[c.AlphaSingle,c.Visible],initialize:function(h,f,v,m){h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=0),r.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new e,this.dirty=!0,this._x=h,this._y=f,this._width=v,this._height=m,this._bounds=new e,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new s,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new i(v/2,m/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(o){this.renderList.push(o)},setOrigin:function(o,h){return o===void 0&&(o=.5),h===void 0&&(h=o),this.originX=o,this.originY=h,this},getScroll:function(o,h,f){f===void 0&&(f=new i);var v=this.width*.5,m=this.height*.5;return f.x=o-v,f.y=h-m,this.useBounds&&(f.x=this.clampX(f.x),f.y=this.clampY(f.y)),f},centerOnX:function(o){var h=this.width*.5;return this.midPoint.x=o,this.scrollX=o-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(o){var h=this.height*.5;return this.midPoint.y=o,this.scrollY=o-h,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(o,h){return this.centerOnX(o),this.centerOnY(h),this},centerToBounds:function(){if(this.useBounds){var o=this._bounds,h=this.width*.5,f=this.height*.5;this.midPoint.set(o.centerX,o.centerY),this.scrollX=o.centerX-h,this.scrollY=o.centerY-f}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(o){if(this.disableCull)return o;var h=this.matrix.matrix,f=h[0],v=h[1],m=h[2],x=h[3],g=f*x-v*m;if(!g)return o;var y=h[4],T=h[5],E=this.scrollX,C=this.scrollY,A=this.width,P=this.height,R=this.y,F=R+P,L=this.x,B=L+A,N=this.culledObjects,U=o.length;g=1/g,N.length=0;for(var z=0;zL&&GR&&Xm&&(o=m),o},clampY:function(o){var h=this._bounds,f=this.displayHeight,v=h.y+(f-this.height)/2,m=Math.max(v,v+h.height-f);return om&&(o=m),o},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(o){return o===void 0&&(o=0),this.rotation=l(o),this},setBackgroundColor:function(o){return o===void 0&&(o="rgba(0,0,0,0)"),this.backgroundColor=u(o),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(o,h,f,v,m){return m===void 0&&(m=!1),this._bounds.setTo(o,h,f,v),this.dirty=!0,this.useBounds=!0,m?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(o){o===void 0&&(o=new e);var h=this._bounds;return o.setTo(h.x,h.y,h.width,h.height),o},setName:function(o){return o===void 0&&(o=""),this.name=o,this},setPosition:function(o,h){return h===void 0&&(h=o),this.x=o,this.y=h,this},setRotation:function(o){return o===void 0&&(o=0),this.rotation=o,this},setRoundPixels:function(o){return this.roundPixels=o,this},setScene:function(o,h){h===void 0&&(h=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=o,this.isSceneCamera=h;var f=o.sys;return this.sceneManager=f.game.scene,this.scaleManager=f.scale,this.cameraManager=f.cameras,this.updateSystem(),this},setScroll:function(o,h){return h===void 0&&(h=o),this.scrollX=o,this.scrollY=h,this},setSize:function(o,h){return h===void 0&&(h=o),this.width=o,this.height=h,this},setViewport:function(o,h,f,v){return this.x=o,this.y=h,this.width=f,this.height=v,this},setZoom:function(o,h){return o===void 0&&(o=1),h===void 0&&(h=o),o===0&&(o=.001),h===0&&(h=.001),this.zoomX=o,this.zoomY=h,this},setMask:function(o,h){return h===void 0&&(h=!0),this.mask=o,this._maskCamera=h?this.cameraManager.default:this,this},clearMask:function(o){return o===void 0&&(o=!1),o&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var o={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(o.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),o},update:function(){},setIsSceneCamera:function(o){return this.isSceneCamera=o,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var o=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,h=this.sceneManager;o&&!this._customViewport?h.customViewports++:!o&&this._customViewport&&h.customViewports--,this.dirty=!0,this._customViewport=o}},destroy:function(){this.emit(n.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(o){this._x=o,this.updateSystem()}},y:{get:function(){return this._y},set:function(o){this._y=o,this.updateSystem()}},width:{get:function(){return this._width},set:function(o){this._width=o,this.updateSystem()}},height:{get:function(){return this._height},set:function(o){this._height=o,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(o){o!==this._scrollX&&(this._scrollX=o,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(o){o!==this._scrollY&&(this._scrollY=o,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(o){this._zoomX=o,this._zoomY=o,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(o){this._zoomX=o,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(o){this._zoomY=o,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(o){this._rotation=o,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});p.exports=a},47751:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(51052),c=t(79993),l=t(82897),r=t(56694),n=t(64937),e=t(53030),s=t(89787),u=t(42798),i=t(74118),a=t(93736),o=new r({Extends:d,Mixins:[n.PostPipeline],initialize:function(f,v,m,x){d.call(this,f,v,m,x),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new e.Fade(this),this.flashEffect=new e.Flash(this),this.shakeEffect=new e.Shake(this),this.panEffect=new e.Pan(this),this.rotateToEffect=new e.RotateTo(this),this.zoomEffect=new e.Zoom(this),this.lerp=new a(1,1),this.followOffset=new a,this.deadzone=null,this._follow=null},setDeadzone:function(h,f){if(h===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=h,this.deadzone.height=f):this.deadzone=new i(0,0,h,f),this._follow){var v=this.width/2,m=this.height/2,x=this._follow.x-this.followOffset.x,g=this._follow.y-this.followOffset.y;this.midPoint.set(x,g),this.scrollX=x-v,this.scrollY=g-m}c(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(h,f,v,m,x,g){return this.fadeEffect.start(!1,h,f,v,m,!0,x,g)},fadeOut:function(h,f,v,m,x,g){return this.fadeEffect.start(!0,h,f,v,m,!0,x,g)},fadeFrom:function(h,f,v,m,x,g,y){return this.fadeEffect.start(!1,h,f,v,m,x,g,y)},fade:function(h,f,v,m,x,g,y){return this.fadeEffect.start(!0,h,f,v,m,x,g,y)},flash:function(h,f,v,m,x,g,y){return this.flashEffect.start(h,f,v,m,x,g,y)},shake:function(h,f,v,m,x){return this.shakeEffect.start(h,f,v,m,x)},pan:function(h,f,v,m,x,g,y){return this.panEffect.start(h,f,v,m,x,g,y)},rotateTo:function(h,f,v,m,x,g,y){return this.rotateToEffect.start(h,f,v,m,x,g,y)},zoomTo:function(h,f,v,m,x,g){return this.zoomEffect.start(h,f,v,m,x,g)},preRender:function(){this.renderList.length=0;var h=this.width,f=this.height,v=h*.5,m=f*.5,x=this.zoom,g=this.matrix,y=h*this.originX,T=f*this.originY,E=this._follow,C=this.deadzone,A=this.scrollX,P=this.scrollY;C&&c(C,this.midPoint.x,this.midPoint.y);var R=!1;if(E&&!this.panEffect.isRunning){var F=this.lerp,L=E.x-this.followOffset.x,B=E.y-this.followOffset.y;C?(LC.right&&(A=u(A,A+(L-C.right),F.x)),BC.bottom&&(P=u(P,P+(B-C.bottom),F.y))):(A=u(A,L-y,F.x),P=u(P,B-T,F.y)),R=!0}this.useBounds&&(A=this.clampX(A),P=this.clampY(P)),this.scrollX=A,this.scrollY=P;var N=A+v,U=P+m;this.midPoint.set(N,U);var z=h/x,w=f/x,I=Math.floor(N-z/2),M=Math.floor(U-w/2);this.worldView.setTo(I,M,z,w),g.applyITRS(Math.floor(this.x+y),Math.floor(this.y+T),this.rotation,x,x),g.translate(-y,-T),this.shakeEffect.preRender(),R&&this.emit(s.FOLLOW_UPDATE,this,E)},setLerp:function(h,f){return h===void 0&&(h=1),f===void 0&&(f=h),this.lerp.set(h,f),this},setFollowOffset:function(h,f){return h===void 0&&(h=0),f===void 0&&(f=0),this.followOffset.set(h,f),this},startFollow:function(h,f,v,m,x,g){f===void 0&&(f=!1),v===void 0&&(v=1),m===void 0&&(m=v),x===void 0&&(x=0),g===void 0&&(g=x),this._follow=h,this.roundPixels=f,v=l(v,0,1),m=l(m,0,1),this.lerp.set(v,m),this.followOffset.set(x,g);var y=this.width/2,T=this.height/2,E=h.x-x,C=h.y-g;return this.midPoint.set(E,C),this.scrollX=E-y,this.scrollY=C-T,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(h,f){this.visible&&(this.rotateToEffect.update(h,f),this.panEffect.update(h,f),this.zoomEffect.update(h,f),this.shakeEffect.update(h,f),this.flashEffect.update(h,f),this.fadeEffect.update(h,f))},destroy:function(){this.resetFX(),d.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});p.exports=o},62382:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(47751),c=t(56694),l=t(72632),r=t(91963),n=t(94287),e=t(40444),s=t(7599),u=new c({initialize:function(a){this.scene=a,this.systems=a.sys,this.roundPixels=a.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,a.sys.events.once(s.BOOT,this.boot,this),a.sys.events.on(s.START,this.start,this)},boot:function(){var i=this.systems;i.settings.cameras?this.fromJSON(i.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new d(0,0,i.scale.width,i.scale.height).setScene(this.scene),i.game.scale.on(e.RESIZE,this.onResize,this),this.systems.events.once(s.DESTROY,this.destroy,this)},start:function(){if(!this.main){var i=this.systems;i.settings.cameras?this.fromJSON(i.settings.cameras):this.add(),this.main=this.cameras[0]}var a=this.systems.events;a.on(s.UPDATE,this.update,this),a.once(s.SHUTDOWN,this.shutdown,this)},add:function(i,a,o,h,f,v){i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=this.scene.sys.scale.width),h===void 0&&(h=this.scene.sys.scale.height),f===void 0&&(f=!1),v===void 0&&(v="");var m=new d(i,a,o,h);return m.setName(v),m.setScene(this.scene),m.setRoundPixels(this.roundPixels),m.id=this.getNextID(),this.cameras.push(m),f&&(this.main=m),m},addExisting:function(i,a){a===void 0&&(a=!1);var o=this.cameras.indexOf(i);return o===-1?(i.id=this.getNextID(),i.setRoundPixels(this.roundPixels),this.cameras.push(i),a&&(this.main=i),i):null},getNextID:function(){for(var i=this.cameras,a=1,o=0;o<32;o++){for(var h=!1,f=0;f0){v.preRender();var m=this.getVisibleChildren(a.getChildren(),v);i.render(o,m,v)}}},getVisibleChildren:function(i,a){return i.filter(function(o){return o.willRender(a)})},resetAll:function(){for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=t(56694),l=t(89787),r=new c({initialize:function(e){this.camera=e,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(n,e,s,u,i,a,o,h){if(n===void 0&&(n=!0),e===void 0&&(e=1e3),s===void 0&&(s=0),u===void 0&&(u=0),i===void 0&&(i=0),a===void 0&&(a=!1),o===void 0&&(o=null),h===void 0&&(h=this.camera.scene),!a&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=n,this.progress=0,this.red=s,this.green=u,this.blue=i,this.alpha=n?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=h;var f=n?l.FADE_OUT_START:l.FADE_IN_START;return this.camera.emit(f,this.camera,this,e,s,u,i),this.camera},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=t(56694),l=t(89787),r=new c({initialize:function(e){this.camera=e,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(n,e,s,u,i,a,o){return n===void 0&&(n=250),e===void 0&&(e=255),s===void 0&&(s=255),u===void 0&&(u=255),i===void 0&&(i=!1),a===void 0&&(a=null),o===void 0&&(o=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=n,this.progress=0,this.red=e,this.green=s,this.blue=u,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=o,this.camera.emit(l.FLASH_START,this.camera,this,n,e,s,u),this.camera)},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=t(56694),l=t(35060),r=t(89787),n=t(93736),e=new c({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.source=new n,this.current=new n,this.destination=new n,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(s,u,i,a,o,h,f){i===void 0&&(i=1e3),a===void 0&&(a=l.Linear),o===void 0&&(o=!1),h===void 0&&(h=null),f===void 0&&(f=this.camera.scene);var v=this.camera;return!o&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(v.scrollX,v.scrollY),this.destination.set(s,u),v.getScroll(s,u,this.current),typeof a=="string"&&l.hasOwnProperty(a)?this.ease=l[a]:typeof a=="function"&&(this.ease=a),this._elapsed=0,this._onUpdate=h,this._onUpdateScope=f,this.camera.emit(r.PAN_START,this.camera,this,i,s,u)),v},update:function(s,u){if(this.isRunning){this._elapsed+=u;var i=d(this._elapsed/this.duration,0,1);this.progress=i;var a=this.camera;if(this._elapsed{/** + * @author Jason Nicholls + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */var d=t(82897),c=t(56694),l=t(89787),r=t(35060),n=new c({initialize:function(s){this.camera=s,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(e,s,u,i,a,o,h){u===void 0&&(u=1e3),i===void 0&&(i=r.Linear),a===void 0&&(a=!1),o===void 0&&(o=null),h===void 0&&(h=this.camera.scene),s===void 0&&(s=!1),this.shortestPath=s;var f=e;e<0?(f=-1*e,this.clockwise=!1):this.clockwise=!0;var v=360*Math.PI/180;f=f-Math.floor(f/v)*v;var m=this.camera;if(!a&&this.isRunning)return m;if(this.isRunning=!0,this.duration=u,this.progress=0,this.source=m.rotation,this.destination=f,typeof i=="string"&&r.hasOwnProperty(i)?this.ease=r[i]:typeof i=="function"&&(this.ease=i),this._elapsed=0,this._onUpdate=o,this._onUpdateScope=h,this.shortestPath){var x=0,g=0;this.destination>this.source?x=Math.abs(this.destination-this.source):x=Math.abs(this.destination+v)-this.source,this.source>this.destination?g=Math.abs(this.source-this.destination):g=Math.abs(this.source+v)-this.destination,xg&&(this.clockwise=!1)}return this.camera.emit(l.ROTATE_START,this.camera,this,u,f),m},update:function(e,s){if(this.isRunning){this._elapsed+=s;var u=d(this._elapsed/this.duration,0,1);this.progress=u;var i=this.camera;if(this._elapsed=v?o=Math.abs(f-v):o=Math.abs(f+h)-v;var m=0;this.clockwise?m=i.rotation+o*a:m=i.rotation-o*a,i.rotation=m,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,u,m)}else i.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,u,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(l.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});p.exports=n},3241:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=t(56694),l=t(89787),r=t(93736),n=new c({initialize:function(s){this.camera=s,this.isRunning=!1,this.duration=0,this.intensity=new r,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(e,s,u,i,a){return e===void 0&&(e=100),s===void 0&&(s=.05),u===void 0&&(u=!1),i===void 0&&(i=null),a===void 0&&(a=this.camera.scene),!u&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=e,this.progress=0,typeof s=="number"?this.intensity.set(s):this.intensity.set(s.x,s.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=i,this._onUpdateScope=a,this.camera.emit(l.SHAKE_START,this.camera,this,e,s),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(e,s){if(this.isRunning)if(this._elapsed+=s,this.progress=d(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=t(56694),l=t(35060),r=t(89787),n=new c({initialize:function(s){this.camera=s,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(e,s,u,i,a,o){s===void 0&&(s=1e3),u===void 0&&(u=l.Linear),i===void 0&&(i=!1),a===void 0&&(a=null),o===void 0&&(o=this.camera.scene);var h=this.camera;return!i&&this.isRunning||(this.isRunning=!0,this.duration=s,this.progress=0,this.source=h.zoom,this.destination=e,typeof u=="string"&&l.hasOwnProperty(u)?this.ease=l[u]:typeof u=="function"&&(this.ease=u),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=o,this.camera.emit(r.ZOOM_START,this.camera,this,s,e)),h},update:function(e,s){this.isRunning&&(this._elapsed+=s,this.progress=d(this._elapsed/this.duration,0,1),this._elapsed{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Fade:t(92522),Flash:t(22151),Pan:t(37551),Shake:t(3241),RotateTo:t(1771),Zoom:t(13383)}},39577:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="cameradestroy"},85373:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerafadeincomplete"},92057:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerafadeinstart"},1903:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerafadeoutcomplete"},96131:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerafadeoutstart"},85409:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="cameraflashcomplete"},25500:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="cameraflashstart"},44071:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="followupdate"},19818:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerapancomplete"},80002:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerapanstart"},87966:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postrender"},74217:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prerender"},34805:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerarotatecomplete"},30408:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerarotatestart"},49856:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerashakecomplete"},69189:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerashakestart"},67657:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerazoomcomplete"},14229:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerazoomstart"},89787:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={DESTROY:t(39577),FADE_IN_COMPLETE:t(85373),FADE_IN_START:t(92057),FADE_OUT_COMPLETE:t(1903),FADE_OUT_START:t(96131),FLASH_COMPLETE:t(85409),FLASH_START:t(25500),FOLLOW_UPDATE:t(44071),PAN_COMPLETE:t(19818),PAN_START:t(80002),POST_RENDER:t(87966),PRE_RENDER:t(74217),ROTATE_COMPLETE:t(34805),ROTATE_START:t(30408),SHAKE_COMPLETE:t(49856),SHAKE_START:t(69189),ZOOM_COMPLETE:t(67657),ZOOM_START:t(14229)}},32356:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Camera:t(47751),BaseCamera:t(51052),CameraManager:t(62382),Effects:t(53030),Events:t(89787)}},84219:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(10850),l=new d({initialize:function(n){this.camera=c(n,"camera",null),this.left=c(n,"left",null),this.right=c(n,"right",null),this.up=c(n,"up",null),this.down=c(n,"down",null),this.zoomIn=c(n,"zoomIn",null),this.zoomOut=c(n,"zoomOut",null),this.zoomSpeed=c(n,"zoomSpeed",.01),this.minZoom=c(n,"minZoom",.001),this.maxZoom=c(n,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=c(n,"speed",null);typeof e=="number"?(this.speedX=e,this.speedY=e):(this.speedX=c(n,"speed.x",0),this.speedY=c(n,"speed.y",0)),this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(r){return this.camera=r,this},update:function(r){if(this.active){r===void 0&&(r=1);var n=this.camera;this.up&&this.up.isDown?n.scrollY-=this.speedY*r|0:this.down&&this.down.isDown&&(n.scrollY+=this.speedY*r|0),this.left&&this.left.isDown?n.scrollX-=this.speedX*r|0:this.right&&this.right.isDown&&(n.scrollX+=this.speedX*r|0),this.zoomIn&&this.zoomIn.isDown?(n.zoom-=this.zoomSpeed,n.zoomthis.maxZoom&&(n.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});p.exports=l},69370:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(10850),l=new d({initialize:function(n){this.camera=c(n,"camera",null),this.left=c(n,"left",null),this.right=c(n,"right",null),this.up=c(n,"up",null),this.down=c(n,"down",null),this.zoomIn=c(n,"zoomIn",null),this.zoomOut=c(n,"zoomOut",null),this.zoomSpeed=c(n,"zoomSpeed",.01),this.minZoom=c(n,"minZoom",.001),this.maxZoom=c(n,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=c(n,"acceleration",null);typeof e=="number"?(this.accelX=e,this.accelY=e):(this.accelX=c(n,"acceleration.x",0),this.accelY=c(n,"acceleration.y",0)),this.dragX=0,this.dragY=0;var s=c(n,"drag",null);typeof s=="number"?(this.dragX=s,this.dragY=s):(this.dragX=c(n,"drag.x",0),this.dragY=c(n,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var u=c(n,"maxSpeed",null);typeof u=="number"?(this.maxSpeedX=u,this.maxSpeedY=u):(this.maxSpeedX=c(n,"maxSpeed.x",0),this.maxSpeedY=c(n,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(r){return this.camera=r,this},update:function(r){if(this.active){r===void 0&&(r=1);var n=this.camera;this._speedX>0?(this._speedX-=this.dragX*r,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*r,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*r,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*r,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,this._speedX!==0&&(n.scrollX-=this._speedX*r|0),this._speedY!==0&&(n.scrollY-=this._speedY*r|0),this._zoom!==0&&(n.zoom+=this._zoom,n.zoomthis.maxZoom&&(n.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});p.exports=l},6524:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={FixedKeyControl:t(84219),SmoothedKeyControl:t(69370)}},44143:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Controls:t(6524),Scene2D:t(32356)}},86459:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={VERSION:"3.70.0",BlendModes:t(95723),ScaleModes:t(27394),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};p.exports=d},14033:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(86459),l=t(18360),r=t(77290),n=t(72632),e=t(10850),s=t(42911),u=t(72283),i=t(5923),a=t(65641),o=t(93222),h=new d({initialize:function(v){v===void 0&&(v={});var m=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],x="#ffffff",g=e(v,"scale",null);this.width=e(g,"width",1024,v),this.height=e(g,"height",768,v),this.zoom=e(g,"zoom",1,v),this.parent=e(g,"parent",void 0,v),this.scaleMode=e(g,g?"mode":"scaleMode",0,v),this.expandParent=e(g,"expandParent",!0,v),this.autoRound=e(g,"autoRound",!1,v),this.autoCenter=e(g,"autoCenter",0,v),this.resizeInterval=e(g,"resizeInterval",500,v),this.fullscreenTarget=e(g,"fullscreenTarget",null,v),this.minWidth=e(g,"min.width",0,v),this.maxWidth=e(g,"max.width",0,v),this.minHeight=e(g,"min.height",0,v),this.maxHeight=e(g,"max.height",0,v),this.renderType=e(v,"type",c.AUTO),this.canvas=e(v,"canvas",null),this.context=e(v,"context",null),this.canvasStyle=e(v,"canvasStyle",null),this.customEnvironment=e(v,"customEnvironment",!1),this.sceneConfig=e(v,"scene",null),this.seed=e(v,"seed",[(Date.now()*Math.random()).toString()]),i.RND=new i.RandomDataGenerator(this.seed),this.gameTitle=e(v,"title",""),this.gameURL=e(v,"url","https://phaser.io"),this.gameVersion=e(v,"version",""),this.autoFocus=e(v,"autoFocus",!0),this.stableSort=e(v,"stableSort",-1),this.stableSort===-1&&(this.stableSort=r.browser.es2019?1:0),r.features.stableSort=this.stableSort,this.domCreateContainer=e(v,"dom.createContainer",!1),this.domPointerEvents=e(v,"dom.pointerEvents","none"),this.inputKeyboard=e(v,"input.keyboard",!0),this.inputKeyboardEventTarget=e(v,"input.keyboard.target",window),this.inputKeyboardCapture=e(v,"input.keyboard.capture",[]),this.inputMouse=e(v,"input.mouse",!0),this.inputMouseEventTarget=e(v,"input.mouse.target",null),this.inputMousePreventDefaultDown=e(v,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=e(v,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=e(v,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=e(v,"input.mouse.preventDefaultWheel",!0),this.inputTouch=e(v,"input.touch",r.input.touch),this.inputTouchEventTarget=e(v,"input.touch.target",null),this.inputTouchCapture=e(v,"input.touch.capture",!0),this.inputActivePointers=e(v,"input.activePointers",1),this.inputSmoothFactor=e(v,"input.smoothFactor",0),this.inputWindowEvents=e(v,"input.windowEvents",!0),this.inputGamepad=e(v,"input.gamepad",!1),this.inputGamepadEventTarget=e(v,"input.gamepad.target",window),this.disableContextMenu=e(v,"disableContextMenu",!1),this.audio=e(v,"audio",{}),this.hideBanner=e(v,"banner",null)===!1,this.hidePhaser=e(v,"banner.hidePhaser",!1),this.bannerTextColor=e(v,"banner.text",x),this.bannerBackgroundColor=e(v,"banner.background",m),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=e(v,"fps",null),this.disablePreFX=e(v,"disablePreFX",!1),this.disablePostFX=e(v,"disablePostFX",!1);var y=e(v,"render",null);this.pipeline=e(y,"pipeline",null,v),this.autoMobilePipeline=e(y,"autoMobilePipeline",!0,v),this.defaultPipeline=e(y,"defaultPipeline",a.MULTI_PIPELINE,v),this.antialias=e(y,"antialias",!0,v),this.antialiasGL=e(y,"antialiasGL",!0,v),this.mipmapFilter=e(y,"mipmapFilter","",v),this.desynchronized=e(y,"desynchronized",!1,v),this.roundPixels=e(y,"roundPixels",!0,v),this.pixelArt=e(y,"pixelArt",this.zoom!==1,v),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=e(y,"transparent",!1,v),this.clearBeforeRender=e(y,"clearBeforeRender",!0,v),this.preserveDrawingBuffer=e(y,"preserveDrawingBuffer",!1,v),this.premultipliedAlpha=e(y,"premultipliedAlpha",!0,v),this.failIfMajorPerformanceCaveat=e(y,"failIfMajorPerformanceCaveat",!1,v),this.powerPreference=e(y,"powerPreference","default",v),this.batchSize=e(y,"batchSize",4096,v),this.maxTextures=e(y,"maxTextures",-1,v),this.maxLights=e(y,"maxLights",10,v);var T=e(v,"backgroundColor",0);this.backgroundColor=o(T),this.transparent&&(this.backgroundColor=o(0),this.backgroundColor.alpha=0),this.preBoot=e(v,"callbacks.preBoot",u),this.postBoot=e(v,"callbacks.postBoot",u),this.physics=e(v,"physics",{}),this.defaultPhysicsSystem=e(this.physics,"default",!1),this.loaderBaseURL=e(v,"loader.baseURL",""),this.loaderPath=e(v,"loader.path",""),this.loaderMaxParallelDownloads=e(v,"loader.maxParallelDownloads",r.os.android?6:32),this.loaderCrossOrigin=e(v,"loader.crossOrigin",void 0),this.loaderResponseType=e(v,"loader.responseType",""),this.loaderAsync=e(v,"loader.async",!0),this.loaderUser=e(v,"loader.user",""),this.loaderPassword=e(v,"loader.password",""),this.loaderTimeout=e(v,"loader.timeout",0),this.loaderWithCredentials=e(v,"loader.withCredentials",!1),this.loaderImageLoadType=e(v,"loader.imageLoadType","XHR"),this.loaderLocalScheme=e(v,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=e(v,"fx.glow.quality",.1),this.glowFXDistance=e(v,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var E=e(v,"plugins",null),C=l.DefaultScene;E&&(Array.isArray(E)?this.defaultPlugins=E:s(E)&&(this.installGlobalPlugins=n(E,"global",[]),this.installScenePlugins=n(E,"scene",[]),Array.isArray(E.default)?C=E.default:Array.isArray(E.defaultMerge)&&(C=C.concat(E.defaultMerge)))),this.defaultPlugins=C;var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=e(v,"images.default",A+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=e(v,"images.missing",A+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=e(v,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=c.WEBGL:window.FORCE_CANVAS&&(this.renderType=c.CANVAS))}});p.exports=h},50150:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70616),c=t(61068),l=t(86459),r=t(90185),n=function(e){var s=e.config;if((s.customEnvironment||s.canvas)&&s.renderType===l.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!s.customEnvironment&&!s.canvas&&s.renderType!==l.HEADLESS)if(s.renderType===l.AUTO&&(s.renderType=r.webGL?l.WEBGL:l.CANVAS),s.renderType===l.WEBGL){if(!r.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(s.renderType===l.CANVAS){if(!r.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+s.renderType);s.antialias||c.disableSmoothing();var u=e.scale.baseSize,i=u.width,a=u.height;if(s.canvas?(e.canvas=s.canvas,e.canvas.width=i,e.canvas.height=a):e.canvas=c.create(e,i,a,s.renderType),s.canvasStyle&&(e.canvas.style=s.canvasStyle),s.antialias||d.setCrisp(e.canvas),s.renderType!==l.HEADLESS){var o,h;o=t(91135),h=t(11857),s.renderType===l.WEBGL?e.renderer=new h(e):(e.renderer=new o(e),e.context=e.renderer.gameContext)}};p.exports=n},77291:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(86459),c=function(l){var r=l.config;if(!r.hideBanner){var n="WebGL";r.renderType===d.CANVAS?n="Canvas":r.renderType===d.HEADLESS&&(n="Headless");var e=r.audio,s=l.device.audio,u;if(s.webAudio&&!e.disableWebAudio?u="Web Audio":e.noAudio||!s.webAudio&&!s.audioData?u="No Audio":u="HTML5 Audio",l.device.browser.ie)window.console&&console.log("Phaser v"+d.VERSION+" / https://phaser.io");else{var i="",a=[i];if(Array.isArray(r.bannerBackgroundColor)){var o;r.bannerBackgroundColor.forEach(function(f){i=i.concat("%c "),a.push("background: "+f),o=f}),a[a.length-1]="color: "+r.bannerTextColor+"; background: "+o}else i=i.concat("%c "),a.push("color: "+r.bannerTextColor+"; background: "+r.bannerBackgroundColor);a.push("background: transparent"),r.gameTitle&&(i=i.concat(r.gameTitle),r.gameVersion&&(i=i.concat(" v"+r.gameVersion)),r.hidePhaser||(i=i.concat(" / ")));var h="";r.hidePhaser||(i=i.concat("Phaser v"+d.VERSION+h+" ("+n+" | "+u+")")),i=i.concat(" %c "+r.gameURL),a[0]=i,console.log.apply(console,a)}}};p.exports=c},15213:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(99584),c=t(90249),l=t(43474),r=t(61068),n=t(56694),e=t(14033),s=t(85178),u=t(50150),i=t(81078),a=t(77291),o=t(77290),h=t(21546),f=t(6659),v=t(97081),m=t(69898),x=t(91963),g=t(49274),y=t(756),T=t(13553),E=t(38203),C=t(6237),A=t(26617),P=t(26493),R=t(84191),F=new n({initialize:function(B){this.config=new e(B),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new f,this.anims=new c(this),this.textures=new C(this),this.cache=new l(this),this.registry=new i(this,new f),this.input=new m(this,this.config),this.scene=new T(this,this.config.sceneConfig),this.device=o,this.scale=new y(this,this.config),this.sound=null,this.sound=R.create(this),this.loop=new A(this,this.config.fps),this.plugins=new g(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,h(this.boot.bind(this))},boot:function(){if(!x.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),s(this),a(this),d(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(v.BOOT)},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),P(this);var L=this.events;L.on(v.HIDDEN,this.onHidden,this),L.on(v.VISIBLE,this.onVisible,this),L.on(v.BLUR,this.onBlur,this),L.on(v.FOCUS,this.onFocus,this)},step:function(L,B){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var N=this.events;N.emit(v.PRE_STEP,L,B),N.emit(v.STEP,L,B),this.scene.update(L,B),N.emit(v.POST_STEP,L,B);var U=this.renderer;U.preRender(),N.emit(v.PRE_RENDER,U,L,B),this.scene.render(U),U.postRender(),N.emit(v.POST_RENDER,U,L,B)}},headlessStep:function(L,B){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var N=this.events;N.emit(v.PRE_STEP,L,B),N.emit(v.STEP,L,B),this.scene.update(L,B),N.emit(v.POST_STEP,L,B),this.scene.isProcessing=!1,N.emit(v.PRE_RENDER,null,L,B),N.emit(v.POST_RENDER,null,L,B)}},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},pause:function(){var L=this.isPaused;this.isPaused=!0,L||this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},resume:function(){var L=this.isPaused;this.isPaused=!1,L&&this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(L,B){B===void 0&&(B=!1),this.pendingDestroy=!0,this.removeCanvas=L,this.noReturn=B},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(r.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});p.exports=F},26617:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(10850),l=t(72283),r=t(27385),n=new d({initialize:function(s,u){this.game=s,this.raf=new r,this.started=!1,this.running=!1,this.minFps=c(u,"min",5),this.targetFps=c(u,"target",60),this.fpsLimit=c(u,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=l,this.forceSetTimeOut=c(u,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=c(u,"deltaHistory",10),this.panicMax=c(u,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=c(u,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var e=window.performance.now();this.time=e,this.lastTime=e,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0;for(var s=0;s0||!this.inFocus)&&(this._coolDown--,e=Math.min(e,this._target)),e>this._min&&(e=u[s],e=Math.min(e,this._min)),u[s]=e,this.deltaIndex++,this.deltaIndex>=i&&(this.deltaIndex=0);for(var a=0,o=0;o=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(e,this.delta),this.delta=0),this.lastTime=e,this.frame++},step:function(e){this.now=e;var s=Math.max(0,e-this.lastTime);this.rawDelta=s,this.time+=this.rawDelta,this.smoothStep&&(s=this.smoothDelta(s)),this.delta=s,e>=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.callback(e,s),this.lastTime=e,this.frame++},tick:function(){var e=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(e):this.step(e)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(e){e===void 0&&(e=!1);var s=window.performance.now();if(!this.running){e&&(this.startTime+=-this.lastTime+(this.lastTime+s));var u=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(u,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=s+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});p.exports=n},26493:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97081),c=function(l){var r,n=l.events;if(document.hidden!==void 0)r="visibilitychange";else{var e=["webkit","moz","ms"];e.forEach(function(u){document[u+"Hidden"]!==void 0&&(document.hidden=function(){return document[u+"Hidden"]},r=u+"visibilitychange")})}var s=function(u){document.hidden||u.type==="pause"?n.emit(d.HIDDEN):n.emit(d.VISIBLE)};r&&document.addEventListener(r,s,!1),window.onblur=function(){n.emit(d.BLUR)},window.onfocus=function(){n.emit(d.FOCUS)},window.focus&&l.config.autoFocus&&window.focus()};p.exports=c},41651:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="blur"},5520:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="boot"},51673:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="contextlost"},25055:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},23767:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="focus"},57564:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="hidden"},38327:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},43807:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postrender"},73652:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="poststep"},780:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prerender"},13781:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prestep"},38247:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="ready"},29129:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},34994:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="step"},55237:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="systemready"},98704:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="visible"},97081:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BLUR:t(41651),BOOT:t(5520),CONTEXT_LOST:t(51673),DESTROY:t(25055),FOCUS:t(23767),HIDDEN:t(57564),PAUSE:t(38327),POST_RENDER:t(43807),POST_STEP:t(73652),PRE_RENDER:t(780),PRE_STEP:t(13781),READY:t(38247),RESUME:t(29129),STEP:t(34994),SYSTEM_READY:t(55237),VISIBLE:t(98704)}},80293:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Config:t(14033),CreateRenderer:t(50150),DebugHeader:t(77291),Events:t(97081),TimeStep:t(26617),VisibilityHandler:t(26493)}},52780:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(81543),c=t(61068),l=t(10850),r=function(n){var e=l(n,"data",[]),s=l(n,"canvas",null),u=l(n,"palette",d),i=l(n,"pixelWidth",1),a=l(n,"pixelHeight",i),o=l(n,"resizeCanvas",!0),h=l(n,"clearCanvas",!0),f=l(n,"preRender",null),v=l(n,"postRender",null),m=Math.floor(Math.abs(e[0].length*i)),x=Math.floor(Math.abs(e.length*a));s||(s=c.create2D(this,m,x),o=!1,h=!1),o&&(s.width=m,s.height=x);var g=s.getContext("2d",{willReadFrequently:!0});h&&g.clearRect(0,0,m,x),f&&f(s,g);for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={GenerateTexture:t(52780),Palettes:t(25235)}},81543:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},75846:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},83206:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},13194:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},50686:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},25235:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ARNE16:t(81543),C64:t(75846),CGA:t(83206),JMP:t(13194),MSX:t(50686)}},63120:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(34631),l=t(38517),r=t(93736),n=new d({Extends:l,initialize:function(s,u,i,a){l.call(this,"CubicBezierCurve"),Array.isArray(s)&&(a=new r(s[6],s[7]),i=new r(s[4],s[5]),u=new r(s[2],s[3]),s=new r(s[0],s[1])),this.p0=s,this.p1=u,this.p2=i,this.p3=a},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,s){s===void 0&&(s=new r);var u=this.p0,i=this.p1,a=this.p2,o=this.p3;return s.set(c(e,u.x,i.x,a.x,o.x),c(e,u.y,i.y,a.y,o.y))},draw:function(e,s){s===void 0&&(s=32);var u=this.getPoints(s);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var i=1;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(80222),l=t(74118),r=t(93736),n=new d({initialize:function(s){this.type=s,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new r,this._tmpVec2B=new r},draw:function(e,s){return s===void 0&&(s=32),e.strokePoints(this.getPoints(s))},getBounds:function(e,s){e||(e=new l),s===void 0&&(s=16);var u=this.getLength();s>u&&(s=u/2);var i=Math.max(1,Math.round(u/s));return c(this.getSpacedPoints(i),e)},getDistancePoints:function(e){var s=this.getLength(),u=Math.max(1,s/e);return this.getSpacedPoints(u)},getEndPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(1,e)},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(e===void 0&&(e=this.arcLengthDivisions),this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var s=[],u,i=this.getPoint(0,this._tmpVec2A),a=0;s.push(0);for(var o=1;o<=e;o++)u=this.getPoint(o/e,this._tmpVec2B),a+=u.distance(i),s.push(a),i.copy(u);return this.cacheArcLengths=s,s},getPointAt:function(e,s){var u=this.getUtoTmapping(e);return this.getPoint(u,s)},getPoints:function(e,s,u){u===void 0&&(u=[]),e||(s?e=this.getLength()/s:e=this.defaultDivisions);for(var i=0;i<=e;i++)u.push(this.getPoint(i/e));return u},getRandomPoint:function(e){return e===void 0&&(e=new r),this.getPoint(Math.random(),e)},getSpacedPoints:function(e,s,u){u===void 0&&(u=[]),e||(s?e=this.getLength()/s:e=this.defaultDivisions);for(var i=0;i<=e;i++){var a=this.getUtoTmapping(i/e,null,e);u.push(this.getPoint(a))}return u},getStartPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(0,e)},getTangent:function(e,s){s===void 0&&(s=new r);var u=1e-4,i=e-u,a=e+u;return i<0&&(i=0),a>1&&(a=1),this.getPoint(i,this._tmpVec2A),this.getPoint(a,s),s.subtract(this._tmpVec2A).normalize()},getTangentAt:function(e,s){var u=this.getUtoTmapping(e);return this.getTangent(u,s)},getTFromDistance:function(e,s){return e<=0?0:this.getUtoTmapping(0,e,s)},getUtoTmapping:function(e,s,u){var i=this.getLengths(u),a=0,o=i.length,h;s?h=Math.min(s,i[o-1]):h=e*i[o-1];for(var f=0,v=o-1,m;f<=v;)if(a=Math.floor(f+(v-f)/2),m=i[a]-h,m<0)f=a+1;else if(m>0)v=a-1;else{v=a;break}if(a=v,i[a]===h)return a/(o-1);var x=i[a],g=i[a+1],y=g-x,T=(h-x)/y;return(a+T)/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});p.exports=n},48835:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(38517),l=t(75606),r=t(10850),n=t(23701),e=t(93736),s=new d({Extends:c,initialize:function(i,a,o,h,f,v,m,x){if(typeof i=="object"){var g=i;i=r(g,"x",0),a=r(g,"y",0),o=r(g,"xRadius",0),h=r(g,"yRadius",o),f=r(g,"startAngle",0),v=r(g,"endAngle",360),m=r(g,"clockwise",!1),x=r(g,"rotation",0)}else h===void 0&&(h=o),f===void 0&&(f=0),v===void 0&&(v=360),m===void 0&&(m=!1),x===void 0&&(x=0);c.call(this,"EllipseCurve"),this.p0=new e(i,a),this._xRadius=o,this._yRadius=h,this._startAngle=l(f),this._endAngle=l(v),this._clockwise=m,this._rotation=l(x)},getStartPoint:function(u){return u===void 0&&(u=new e),this.getPoint(0,u)},getResolution:function(u){return u*2},getPoint:function(u,i){i===void 0&&(i=new e);for(var a=Math.PI*2,o=this._endAngle-this._startAngle,h=Math.abs(o)a;)o-=a;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(38517),l=t(80222),r=t(74118),n=t(93736),e=new d({Extends:c,initialize:function(u,i){c.call(this,"LineCurve"),Array.isArray(u)&&(i=new n(u[2],u[3]),u=new n(u[0],u[1])),this.p0=u,this.p1=i,this.arcLengthDivisions=1},getBounds:function(s){return s===void 0&&(s=new r),l([this.p0,this.p1],s)},getStartPoint:function(s){return s===void 0&&(s=new n),s.copy(this.p0)},getResolution:function(s){return s===void 0&&(s=1),s},getPoint:function(s,u){return u===void 0&&(u=new n),s===1?u.copy(this.p1):(u.copy(this.p1).subtract(this.p0).scale(s).add(this.p0),u)},getPointAt:function(s,u){return this.getPoint(s,u)},getTangent:function(s,u){return u===void 0&&(u=new n),u.copy(this.p1).subtract(this.p0).normalize(),u},getUtoTmapping:function(s,u,i){var a;if(u){var o=this.getLengths(i),h=o[o.length-1],f=Math.min(u,h);a=f/h}else a=s;return a},draw:function(s){return s.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),s},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});e.fromJSON=function(s){var u=s.points,i=new n(u[0],u[1]),a=new n(u[2],u[3]);return new e(i,a)},p.exports=e},64761:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(38517),l=t(16252),r=t(93736),n=new d({Extends:c,initialize:function(s,u,i){c.call(this,"QuadraticBezierCurve"),Array.isArray(s)&&(i=new r(s[4],s[5]),u=new r(s[2],s[3]),s=new r(s[0],s[1])),this.p0=s,this.p1=u,this.p2=i},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,s){s===void 0&&(s=new r);var u=this.p0,i=this.p1,a=this.p2;return s.set(l(e,u.x,i.x,a.x),l(e,u.y,i.y,a.y))},draw:function(e,s){s===void 0&&(s=32);var u=this.getPoints(s);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var i=1;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(14976),c=t(56694),l=t(38517),r=t(93736),n=new c({Extends:l,initialize:function(s){s===void 0&&(s=[]),l.call(this,"SplineCurve"),this.points=[],this.addPoints(s)},addPoints:function(e){for(var s=0;su.length-2?u.length-1:a+1],m=u[a>u.length-3?u.length-1:a+2];return s.set(d(o,h.x,f.x,v.x,m.x),d(o,h.y,f.y,v.y,m.y))},toJSON:function(){for(var e=[],s=0;s{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Path:t(12822),MoveTo:t(53639),CubicBezier:t(63120),Curve:t(38517),Ellipse:t(48835),Line:t(58084),QuadraticBezier:t(64761),Spline:t(11956)}},53639:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(93736),l=new d({initialize:function(n,e){this.active=!1,this.p0=new c(n,e)},getPoint:function(r,n){return n===void 0&&(n=new c),n.copy(this.p0)},getPointAt:function(r,n){return this.getPoint(r,n)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});p.exports=l},12822:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(63120),l=t(48835),r=t(61286),n=t(58084),e=t(53639),s=t(64761),u=t(74118),i=t(11956),a=t(93736),o=t(83392),h=new d({initialize:function(v,m){v===void 0&&(v=0),m===void 0&&(m=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new a,this._tmpVec2A=new a,this._tmpVec2B=new a,typeof v=="object"?this.fromJSON(v):this.startPoint.set(v,m)},add:function(f){return this.curves.push(f),this},circleTo:function(f,v,m){return v===void 0&&(v=!1),this.ellipseTo(f,f,0,360,v,m)},closePath:function(){var f=this.curves[0].getPoint(0),v=this.curves[this.curves.length-1].getPoint(1);return f.equals(v)||this.curves.push(new n(v,f)),this},cubicBezierTo:function(f,v,m,x,g,y){var T=this.getEndPoint(),E,C,A;return f instanceof a?(E=f,C=v,A=m):(E=new a(m,x),C=new a(g,y),A=new a(f,v)),this.add(new c(T,E,C,A))},quadraticBezierTo:function(f,v,m,x){var g=this.getEndPoint(),y,T;return f instanceof a?(y=f,T=v):(y=new a(m,x),T=new a(f,v)),this.add(new s(g,y,T))},draw:function(f,v){for(var m=0;m=v)return this.curves[x];x++}return null},getEndPoint:function(f){return f===void 0&&(f=new a),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,f):f.copy(this.startPoint),f},getLength:function(){var f=this.getCurveLengths();return f[f.length-1]},getPoint:function(f,v){v===void 0&&(v=new a);for(var m=f*this.getLength(),x=this.getCurveLengths(),g=0;g=m){var y=x[g]-m,T=this.curves[g],E=T.getLength(),C=E===0?0:1-y/E;return T.getPointAt(C,v)}g++}return null},getPoints:function(f,v){!f&&!v&&(f=this.defaultDivisions);for(var m=[],x,g=0;g1&&!m[m.length-1].equals(m[0])&&m.push(m[0]),m},getRandomPoint:function(f){return f===void 0&&(f=new a),this.getPoint(Math.random(),f)},getSpacedPoints:function(f){f===void 0&&(f=40);for(var v=[],m=0;m<=f;m++)v.push(this.getPoint(m/f));return this.autoClose&&v.push(v[0]),v},getStartPoint:function(f){return f===void 0&&(f=new a),f.copy(this.startPoint)},getTangent:function(f,v){v===void 0&&(v=new a);for(var m=f*this.getLength(),x=this.getCurveLengths(),g=0;g=m){var y=x[g]-m,T=this.curves[g],E=T.getLength(),C=E===0?0:1-y/E;return T.getTangentAt(C,v)}g++}return null},lineTo:function(f,v){f instanceof a?this._tmpVec2B.copy(f):this._tmpVec2B.set(f,v);var m=this.getEndPoint(this._tmpVec2A);return this.add(new n([m.x,m.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(f){return f.unshift(this.getEndPoint()),this.add(new i(f))},moveTo:function(f,v){return f instanceof a?this.add(new e(f.x,f.y)):this.add(new e(f,v))},toJSON:function(){for(var f=[],v=0;v{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(35026),l=new d({initialize:function(n,e){this.parent=n,this.events=e,e||(this.events=n.events?n.events:n),this.list={},this.values={},this._frozen=!1,!n.hasOwnProperty("sys")&&this.events&&this.events.once(c.DESTROY,this.destroy,this)},get:function(r){var n=this.list;if(Array.isArray(r)){for(var e=[],s=0;s{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(81078),l=t(91963),r=t(7599),n=new d({Extends:c,initialize:function(s){c.call(this,s,s.sys.events),this.scene=s,this.systems=s.sys,s.sys.events.once(r.BOOT,this.boot,this),s.sys.events.on(r.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){c.prototype.destroy.call(this),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});l.register("DataManagerPlugin",n,"data"),p.exports=n},73569:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="changedata"},15590:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="changedata-"},37669:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},87090:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removedata"},90142:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="setdata"},35026:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CHANGE_DATA:t(73569),CHANGE_DATA_KEY:t(15590),DESTROY:t(37669),REMOVE_DATA:t(87090),SET_DATA:t(90142)}},1999:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={DataManager:t(81078),DataManagerPlugin:t(76508),Events:t(35026)}},10720:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(1350),c={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function l(){if(typeof importScripts=="function")return c;c.audioData=!!window.Audio,c.webAudio=!!(window.AudioContext||window.webkitAudioContext);var r=document.createElement("audio"),n=!!r.canPlayType;try{if(n){var e=function(i,a){var o=r.canPlayType("audio/"+i).replace(/^no$/,"");return a?!!(o||r.canPlayType("audio/"+a).replace(/^no$/,"")):!!o};if(c.ogg=e('ogg; codecs="vorbis"'),c.opus=e('ogg; codecs="opus"',"opus"),c.mp3=e("mpeg"),c.wav=e("wav"),c.m4a=e("x-m4a"),c.aac=e("aac"),c.flac=e("flac","x-flac"),c.webm=e('webm; codecs="vorbis"'),r.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(d.edge)c.dolby=!0;else if(d.safari&&d.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var s=parseInt(RegExp.$1,10),u=parseInt(RegExp.$2,10);(s===10&&u>=11||s>10)&&(c.dolby=!0)}}}}catch{}return c}p.exports=l()},1350:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36580),c={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};function l(){var r=navigator.userAgent;return/Edg\/\d+/.test(r)?(c.edge=!0,c.es2019=!0):/OPR/.test(r)?(c.opera=!0,c.es2019=!0):/Chrome\/(\d+)/.test(r)&&!d.windowsPhone?(c.chrome=!0,c.chromeVersion=parseInt(RegExp.$1,10),c.es2019=c.chromeVersion>69):/Firefox\D+(\d+)/.test(r)?(c.firefox=!0,c.firefoxVersion=parseInt(RegExp.$1,10),c.es2019=c.firefoxVersion>10):/AppleWebKit/.test(r)&&d.iOS?(c.mobileSafari=!0,c.es2019=!0):/MSIE (\d+\.\d+);/.test(r)?(c.ie=!0,c.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(r)&&!d.windowsPhone?(c.safari=!0,c.safariVersion=parseInt(RegExp.$1,10),c.es2019=c.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(r)&&(c.ie=!0,c.trident=!0,c.tridentVersion=parseInt(RegExp.$1,10),c.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(r)&&(c.silk=!0),c}p.exports=l()},98581:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61068),c={supportInverseAlpha:!1,supportNewBlendModes:!1};function l(){var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",u=new Image;return u.onload=function(){var i=new Image;i.onload=function(){var a=d.create2D(i,6),o=a.getContext("2d",{willReadFrequently:!0});if(o.globalCompositeOperation="multiply",o.drawImage(u,0,0),o.drawImage(i,2,0),!o.getImageData(2,0,1,1))return!1;var h=o.getImageData(2,0,1,1).data;d.remove(i),c.supportNewBlendModes=h[0]===255&&h[1]===0&&h[2]===0},i.src=e+"/wCKxvRF"+s},u.src=e+"AP804Oa6"+s,!1}function r(){var e=d.create2D(this,2),s=e.getContext("2d",{willReadFrequently:!0});s.fillStyle="rgba(10, 20, 30, 0.5)",s.fillRect(0,0,1,1);var u=s.getImageData(0,0,1,1);if(u===null)return!1;s.putImageData(u,1,0);var i=s.getImageData(1,0,1,1),a=i.data[0]===u.data[0]&&i.data[1]===u.data[1]&&i.data[2]===u.data[2]&&i.data[3]===u.data[3];return d.remove(this),a}function n(){return typeof importScripts!="function"&&document!==void 0&&(c.supportNewBlendModes=l(),c.supportInverseAlpha=r()),c}p.exports=n()},90185:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36580),c=t(1350),l=t(61068),r={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};function n(){var s=new ArrayBuffer(4),u=new Uint8Array(s),i=new Uint32Array(s);return u[0]=161,u[1]=178,u[2]=195,u[3]=212,i[0]===3569595041?!0:i[0]===2712847316?!1:null}function e(){if(typeof importScripts=="function")return r;r.canvas=!!window.CanvasRenderingContext2D;try{r.localStorage=!!localStorage.getItem}catch{r.localStorage=!1}r.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,r.fileSystem=!!window.requestFileSystem;var s=!1,u=function(){if(window.WebGLRenderingContext)try{var i=l.createWebGL(this),a=i.getContext("webgl")||i.getContext("experimental-webgl"),o=l.create2D(this),h=o.getContext("2d",{willReadFrequently:!0}),f=h.createImageData(1,1);return s=f.data instanceof Uint8ClampedArray,l.remove(i),l.remove(o),!!a}catch{return!1}return!1};return r.webGL=u(),r.worker=!!window.Worker,r.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,r.getUserMedia=r.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,c.firefox&&c.firefoxVersion<21&&(r.getUserMedia=!1),!d.iOS&&(c.ie||c.firefox||c.chrome)&&(r.canvasBitBltShift=!0),(c.safari||c.mobileSafari)&&(r.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(r.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(r.littleEndian=n()),r.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&r.littleEndian!==null&&s,r}p.exports=e()},33553:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={available:!1,cancel:"",keyboard:!1,request:""};function t(){if(typeof importScripts=="function")return S;var d,c="Fullscreen",l="FullScreen",r=["request"+c,"request"+l,"webkitRequest"+c,"webkitRequest"+l,"msRequest"+c,"msRequest"+l,"mozRequest"+l,"mozRequest"+c];for(d=0;d{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(1350),c={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function l(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(c.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(c.mspointer=!0),navigator.getGamepads&&(c.gamepads=!0),"onwheel"in window||d.ie&&"WheelEvent"in window?c.wheelEvent="wheel":"onmousewheel"in window?c.wheelEvent="mousewheel":d.firefox&&"MouseScrollEvent"in window&&(c.wheelEvent="DOMMouseScroll")),c}p.exports=l()},36580:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};function t(){if(typeof importScripts=="function")return S;var d=navigator.userAgent;/Windows/.test(d)?S.windows=!0:/Mac OS/.test(d)&&!/like Mac OS/.test(d)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(S.iOS=!0,S.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),S.iOSVersion=parseInt(RegExp.$1,10)):S.macOS=!0:/Android/.test(d)?S.android=!0:/Linux/.test(d)?S.linux=!0:/iP[ao]d|iPhone/i.test(d)?(S.iOS=!0,navigator.appVersion.match(/OS (\d+)/),S.iOSVersion=parseInt(RegExp.$1,10),S.iPhone=d.toLowerCase().indexOf("iphone")!==-1,S.iPad=d.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(d)||/\bKF[A-Z][A-Z]+/.test(d)||/Silk.*Mobile Safari/.test(d)?S.kindle=!0:/CrOS/.test(d)&&(S.chromeOS=!0),(/Windows Phone/i.test(d)||/IEMobile/i.test(d))&&(S.android=!1,S.iOS=!1,S.macOS=!1,S.windows=!0,S.windowsPhone=!0);var c=/Silk/.test(d);return(S.windows||S.macOS||S.linux&&!c||S.chromeOS)&&(S.desktop=!0),(S.windowsPhone||/Windows NT/i.test(d)&&/Touch/i.test(d))&&(S.desktop=!1),navigator.standalone&&(S.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(S.cordova=!0),window.ejecta!==void 0&&(S.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(S.node=!0),S.node&&typeof process.versions=="object"&&(S.nodeWebkit=!!process.versions["node-webkit"],S.electron=!!process.versions.electron),/Crosswalk/.test(d)&&(S.crosswalk=!0),S.pixelRatio=window.devicePixelRatio||1,S}p.exports=t()},53861:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72632),c={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function l(){if(typeof importScripts=="function")return c;var r=document.createElement("video"),n=!!r.canPlayType,e=/^no$/;try{n&&(r.canPlayType('video/ogg; codecs="theora"').replace(e,"")&&(c.ogg=!0),r.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(e,"")&&(c.h264=!0,c.mp4=!0),r.canPlayType("video/x-m4v").replace(e,"")&&(c.m4v=!0),r.canPlayType('video/webm; codecs="vp8, vorbis"').replace(e,"")&&(c.webm=!0),r.canPlayType('video/webm; codecs="vp9"').replace(e,"")&&(c.vp9=!0),r.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(e,"")&&(c.hls=!0))}catch{}return r.parentNode&&r.parentNode.removeChild(r),c.getVideoURL=function(s){Array.isArray(s)||(s=[s]);for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={os:t(36580),browser:t(1350),features:t(90185),input:t(95872),audio:t(10720),video:t(53861),fullscreen:t(33553),canvasFeatures:t(98581)}},65246:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new Float32Array(20),l=new d({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(r){return this._matrix.set(r),this._dirty=!0,this},reset:function(){var r=this._matrix;return r.fill(0),r[0]=1,r[6]=1,r[12]=1,r[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var r=this._data;return this._dirty&&(r.set(this._matrix),r[4]/=255,r[9]/=255,r[14]/=255,r[19]/=255,this._dirty=!1),r},brightness:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r;return this.multiply([e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0],n)},saturate:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r*2/3+1,s=(e-1)*-.5;return this.multiply([e,s,s,0,0,s,e,s,0,0,s,s,e,0,0,0,0,0,1,0],n)},desaturate:function(r){return r===void 0&&(r=!1),this.saturate(-1,r)},hue:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1),r=r/180*Math.PI;var e=Math.cos(r),s=Math.sin(r),u=.213,i=.715,a=.072;return this.multiply([u+e*(1-u)+s*-u,i+e*-i+s*-i,a+e*-a+s*(1-a),0,0,u+e*-u+s*.143,i+e*(1-i)+s*.14,a+e*-a+s*-.283,0,0,u+e*-u+s*-(1-u),i+e*-i+s*i,a+e*(1-a)+s*a,0,0,0,0,0,1,0],n)},grayscale:function(r,n){return r===void 0&&(r=1),n===void 0&&(n=!1),this.saturate(-r,n)},blackWhite:function(r){return r===void 0&&(r=!1),this.multiply(l.BLACK_WHITE,r)},contrast:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r+1,s=-.5*(e-1);return this.multiply([e,0,0,0,s,0,e,0,0,s,0,0,e,0,s,0,0,0,1,0],n)},negative:function(r){return r===void 0&&(r=!1),this.multiply(l.NEGATIVE,r)},desaturateLuminance:function(r){return r===void 0&&(r=!1),this.multiply(l.DESATURATE_LUMINANCE,r)},sepia:function(r){return r===void 0&&(r=!1),this.multiply(l.SEPIA,r)},night:function(r,n){return r===void 0&&(r=.1),n===void 0&&(n=!1),this.multiply([r*-2,-r,0,0,0,-r,0,r,0,0,0,r,r*2,0,0,0,0,0,1,0],n)},lsd:function(r){return r===void 0&&(r=!1),this.multiply(l.LSD,r)},brown:function(r){return r===void 0&&(r=!1),this.multiply(l.BROWN,r)},vintagePinhole:function(r){return r===void 0&&(r=!1),this.multiply(l.VINTAGE,r)},kodachrome:function(r){return r===void 0&&(r=!1),this.multiply(l.KODACHROME,r)},technicolor:function(r){return r===void 0&&(r=!1),this.multiply(l.TECHNICOLOR,r)},polaroid:function(r){return r===void 0&&(r=!1),this.multiply(l.POLAROID,r)},shiftToBGR:function(r){return r===void 0&&(r=!1),this.multiply(l.SHIFT_BGR,r)},multiply:function(r,n){n===void 0&&(n=!1),n||this.reset();var e=this._matrix,s=c;return s.set(e),e.set([s[0]*r[0]+s[1]*r[5]+s[2]*r[10]+s[3]*r[15],s[0]*r[1]+s[1]*r[6]+s[2]*r[11]+s[3]*r[16],s[0]*r[2]+s[1]*r[7]+s[2]*r[12]+s[3]*r[17],s[0]*r[3]+s[1]*r[8]+s[2]*r[13]+s[3]*r[18],s[0]*r[4]+s[1]*r[9]+s[2]*r[14]+s[3]*r[19]+s[4],s[5]*r[0]+s[6]*r[5]+s[7]*r[10]+s[8]*r[15],s[5]*r[1]+s[6]*r[6]+s[7]*r[11]+s[8]*r[16],s[5]*r[2]+s[6]*r[7]+s[7]*r[12]+s[8]*r[17],s[5]*r[3]+s[6]*r[8]+s[7]*r[13]+s[8]*r[18],s[5]*r[4]+s[6]*r[9]+s[7]*r[14]+s[8]*r[19]+s[9],s[10]*r[0]+s[11]*r[5]+s[12]*r[10]+s[13]*r[15],s[10]*r[1]+s[11]*r[6]+s[12]*r[11]+s[13]*r[16],s[10]*r[2]+s[11]*r[7]+s[12]*r[12]+s[13]*r[17],s[10]*r[3]+s[11]*r[8]+s[12]*r[13]+s[13]*r[18],s[10]*r[4]+s[11]*r[9]+s[12]*r[14]+s[13]*r[19]+s[14],s[15]*r[0]+s[16]*r[5]+s[17]*r[10]+s[18]*r[15],s[15]*r[1]+s[16]*r[6]+s[17]*r[11]+s[18]*r[16],s[15]*r[2]+s[16]*r[7]+s[17]*r[12]+s[18]*r[17],s[15]*r[3]+s[16]*r[8]+s[17]*r[13]+s[18]*r[18],s[15]*r[4]+s[16]*r[9]+s[17]*r[14]+s[18]*r[19]+s[19]]),this._dirty=!0,this}});l.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],l.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],l.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],l.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],l.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],l.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],l.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],l.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],l.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],l.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],l.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],p.exports=l},39298:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72283),l=new d({initialize:function(n,e,s){this._rgb=[0,0,0],this.onChangeCallback=c,this.dirty=!1,this.set(n,e,s)},set:function(r,n,e){return r===void 0&&(r=0),n===void 0&&(n=0),e===void 0&&(e=0),this._rgb=[r,n,e],this.onChange(),this},equals:function(r,n,e){var s=this._rgb;return s[0]===r&&s[1]===n&&s[2]===e},onChange:function(){this.dirty=!0;var r=this._rgb;this.onChangeCallback.call(this,r[0],r[1],r[2])},r:{get:function(){return this._rgb[0]},set:function(r){this._rgb[0]=r,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(r){this._rgb[1]=r,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(r){this._rgb[2]=r,this.onChange()}},destroy:function(){this.onChangeCallback=null}});p.exports=l},84093:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12};p.exports=S},32058:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97328),c=t(59994),l=t(73174),r=t(28417),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),r(e,c(s)+u),l(e,d(s)+i),e};p.exports=n},85535:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97328),c=t(40163),l=t(73174),r=t(74465),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),r(e,c(s)-u),l(e,d(s)+i),e};p.exports=n},9605:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97328),c=t(70271),l=t(73174),r=t(19298),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),r(e,c(s)+u),l(e,d(s)+i),e};p.exports=n},22529:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(21843),c=t(59994),l=t(29568),r=function(n,e,s,u){return s===void 0&&(s=0),u===void 0&&(u=0),d(n,c(e)+s,l(e)+u),n};p.exports=r},5739:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29568),c=t(40163),l=t(81711),r=t(74465),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),r(e,c(s)-u),l(e,d(s)+i),e};p.exports=n},40327:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84093),c=[];c[d.BOTTOM_CENTER]=t(32058),c[d.BOTTOM_LEFT]=t(85535),c[d.BOTTOM_RIGHT]=t(9605),c[d.CENTER]=t(22529),c[d.LEFT_CENTER]=t(5739),c[d.RIGHT_CENTER]=t(27683),c[d.TOP_CENTER]=t(96439),c[d.TOP_LEFT]=t(81447),c[d.TOP_RIGHT]=t(47888),c[d.LEFT_BOTTOM]=c[d.BOTTOM_LEFT],c[d.LEFT_TOP]=c[d.TOP_LEFT],c[d.RIGHT_BOTTOM]=c[d.BOTTOM_RIGHT],c[d.RIGHT_TOP]=c[d.TOP_RIGHT];var l=function(r,n,e,s,u){return c[e](r,n,s,u)};p.exports=l},27683:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29568),c=t(70271),l=t(81711),r=t(19298),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),r(e,c(s)+u),l(e,d(s)+i),e};p.exports=n},96439:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(59994),c=t(47196),l=t(28417),r=t(84349),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),l(e,d(s)+u),r(e,c(s)-i),e};p.exports=n},81447:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40163),c=t(47196),l=t(74465),r=t(84349),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),l(e,d(s)-u),r(e,c(s)-i),e};p.exports=n},47888:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70271),c=t(47196),l=t(19298),r=t(84349),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),l(e,d(s)+u),r(e,c(s)-i),e};p.exports=n},46997:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BottomCenter:t(32058),BottomLeft:t(85535),BottomRight:t(9605),Center:t(22529),LeftCenter:t(5739),QuickSet:t(40327),RightCenter:t(27683),TopCenter:t(96439),TopLeft:t(81447),TopRight:t(47888)}},93545:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84093),c=t(98611),l={In:t(46997),To:t(86639)};l=c(!1,l,d),p.exports=l},27118:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97328),c=t(59994),l=t(28417),r=t(84349),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),l(e,c(s)+u),r(e,d(s)+i),e};p.exports=n},84469:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97328),c=t(40163),l=t(74465),r=t(84349),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),l(e,c(s)-u),r(e,d(s)+i),e};p.exports=n},51577:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97328),c=t(70271),l=t(19298),r=t(84349),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),l(e,c(s)+u),r(e,d(s)+i),e};p.exports=n},90271:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97328),c=t(40163),l=t(73174),r=t(19298),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),r(e,c(s)-u),l(e,d(s)+i),e};p.exports=n},30466:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29568),c=t(40163),l=t(81711),r=t(19298),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),r(e,c(s)-u),l(e,d(s)+i),e};p.exports=n},50087:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40163),c=t(47196),l=t(19298),r=t(84349),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),l(e,d(s)-u),r(e,c(s)-i),e};p.exports=n},82590:(p,S,t)=>{/** + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84093),c=[];c[d.BOTTOM_CENTER]=t(27118),c[d.BOTTOM_LEFT]=t(84469),c[d.BOTTOM_RIGHT]=t(51577),c[d.LEFT_BOTTOM]=t(90271),c[d.LEFT_CENTER]=t(30466),c[d.LEFT_TOP]=t(50087),c[d.RIGHT_BOTTOM]=t(13555),c[d.RIGHT_CENTER]=t(99049),c[d.RIGHT_TOP]=t(67788),c[d.TOP_CENTER]=t(78170),c[d.TOP_LEFT]=t(54145),c[d.TOP_RIGHT]=t(75548);var l=function(r,n,e,s,u){return c[e](r,n,s,u)};p.exports=l},13555:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97328),c=t(70271),l=t(73174),r=t(74465),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),r(e,c(s)+u),l(e,d(s)+i),e};p.exports=n},99049:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29568),c=t(70271),l=t(81711),r=t(74465),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),r(e,c(s)+u),l(e,d(s)+i),e};p.exports=n},67788:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70271),c=t(47196),l=t(74465),r=t(84349),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),l(e,d(s)+u),r(e,c(s)-i),e};p.exports=n},78170:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(59994),c=t(47196),l=t(73174),r=t(28417),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),r(e,d(s)+u),l(e,c(s)-i),e};p.exports=n},54145:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(40163),c=t(47196),l=t(73174),r=t(74465),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),r(e,d(s)-u),l(e,c(s)-i),e};p.exports=n},75548:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70271),c=t(47196),l=t(73174),r=t(19298),n=function(e,s,u,i){return u===void 0&&(u=0),i===void 0&&(i=0),r(e,d(s)+u),l(e,c(s)-i),e};p.exports=n},86639:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BottomCenter:t(27118),BottomLeft:t(84469),BottomRight:t(51577),LeftBottom:t(90271),LeftCenter:t(30466),LeftTop:t(50087),QuickSet:t(82590),RightBottom:t(13555),RightCenter:t(99049),RightTop:t(67788),TopCenter:t(78170),TopLeft:t(54145),TopRight:t(75548)}},21843:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(28417),c=t(81711),l=function(r,n,e){return d(r,n),c(r,e)};p.exports=l},97328:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.y+t.height-t.height*t.originY};p.exports=S},7126:(p,S,t)=>{/** + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97328),c=t(40163),l=t(70271),r=t(47196),n=t(74118),e=function(s,u){u===void 0&&(u=new n);var i=c(s),a=r(s);return u.x=i,u.y=a,u.width=l(s)-i,u.height=d(s)-a,u};p.exports=e},59994:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x-t.width*t.originX+t.width*.5};p.exports=S},29568:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.y-t.height*t.originY+t.height*.5};p.exports=S},40163:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x-t.width*t.originX};p.exports=S},52088:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.width*t.originX};p.exports=S},23379:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.height*t.originY};p.exports=S},70271:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x+t.width-t.width*t.originX};p.exports=S},47196:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.y-t.height*t.originY};p.exports=S},73174:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.y=d-t.height+t.height*t.originY,t};p.exports=S},28417:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.width*t.originX;return t.x=d+c-t.width*.5,t};p.exports=S},81711:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.height*t.originY;return t.y=d+c-t.height*.5,t};p.exports=S},74465:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x=d+t.width*t.originX,t};p.exports=S},19298:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x=d-t.width+t.width*t.originX,t};p.exports=S},84349:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.y=d+t.height*t.originY,t};p.exports=S},15252:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CenterOn:t(21843),GetBottom:t(97328),GetBounds:t(7126),GetCenterX:t(59994),GetCenterY:t(29568),GetLeft:t(40163),GetOffsetX:t(52088),GetOffsetY:t(23379),GetRight:t(70271),GetTop:t(47196),SetBottom:t(73174),SetCenterX:t(28417),SetCenterY:t(81711),SetLeft:t(74465),SetRight:t(19298),SetTop:t(84349)}},70616:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setCrisp:function(t){var d=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return d.forEach(function(c){t.style["image-rendering"]=c}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}};p.exports=S},61068:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(86459),c=t(8213),l=[],r=!1,n=function(){var e=function(m,x,g,y,T){x===void 0&&(x=1),g===void 0&&(g=1),y===void 0&&(y=d.CANVAS),T===void 0&&(T=!1);var E,C=i(y);return C===null?(C={parent:m,canvas:document.createElement("canvas"),type:y},y===d.CANVAS&&l.push(C),E=C.canvas):(C.parent=m,E=C.canvas),T&&(C.parent=E),E.width=x,E.height=g,r&&y===d.CANVAS&&c.disable(E.getContext("2d",{willReadFrequently:!1})),E},s=function(m,x,g){return e(m,x,g,d.CANVAS)},u=function(m,x,g){return e(m,x,g,d.WEBGL)},i=function(m){if(m===void 0&&(m=d.CANVAS),m===d.WEBGL)return null;for(var x=0;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S="",t=function(){var d=function(n){for(var e=["i","webkitI","msI","mozI","oI"],s=0;s{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d="none"),t.style.msTouchAction=d,t.style["ms-touch-action"]=d,t.style["touch-action"]=d,t};p.exports=S},36505:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d="none");var c=["-webkit-","-khtml-","-moz-","-ms-",""];return c.forEach(function(l){t.style[l+"user-select"]=d}),t.style["-webkit-touch-callout"]=d,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t};p.exports=S},23514:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CanvasInterpolation:t(70616),CanvasPool:t(61068),Smoothing:t(8213),TouchAction:t(59271),UserSelect:t(36505)}},27119:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(22946),l=t(5657),r=t(24650),n=t(68033),e=new d({initialize:function(u,i,a,o){u===void 0&&(u=0),i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(u,i,a,o)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(s,u,i,a,o){return a===void 0&&(a=255),o===void 0&&(o=!0),this._locked=!0,this.red=s,this.green=u,this.blue=i,this.alpha=a,this._locked=!1,this.update(o)},setGLTo:function(s,u,i,a){return a===void 0&&(a=1),this._locked=!0,this.redGL=s,this.greenGL=u,this.blueGL=i,this.alphaGL=a,this._locked=!1,this.update(!0)},setFromRGB:function(s){return this._locked=!0,this.red=s.r,this.green=s.g,this.blue=s.b,s.hasOwnProperty("a")&&(this.alpha=s.a),this._locked=!1,this.update(!0)},setFromHSV:function(s,u,i){return r(s,u,i,this)},update:function(s){if(s===void 0&&(s=!1),this._locked)return this;var u=this.r,i=this.g,a=this.b,o=this.a;return this._color=c(u,i,a),this._color32=l(u,i,a,o),this._rgba="rgba("+u+","+i+","+a+","+o/255+")",s&&n(u,i,a,this),this},updateHSV:function(){var s=this.r,u=this.g,i=this.b;return n(s,u,i,this),this},clone:function(){return new e(this.r,this.g,this.b,this.a)},gray:function(s){return this.setTo(s,s,s)},random:function(s,u){s===void 0&&(s=0),u===void 0&&(u=255);var i=Math.floor(s+Math.random()*(u-s)),a=Math.floor(s+Math.random()*(u-s)),o=Math.floor(s+Math.random()*(u-s));return this.setTo(i,a,o)},randomGray:function(s,u){s===void 0&&(s=0),u===void 0&&(u=255);var i=Math.floor(s+Math.random()*(u-s));return this.setTo(i,i,i)},saturate:function(s){return this.s+=s/100,this},desaturate:function(s){return this.s-=s/100,this},lighten:function(s){return this.v+=s/100,this},darken:function(s){return this.v-=s/100,this},brighten:function(s){var u=this.r,i=this.g,a=this.b;return u=Math.max(0,Math.min(255,u-Math.round(255*-(s/100)))),i=Math.max(0,Math.min(255,i-Math.round(255*-(s/100)))),a=Math.max(0,Math.min(255,a-Math.round(255*-(s/100)))),this.setTo(u,i,a)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(s){this.gl[0]=Math.min(Math.abs(s),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(s){this.gl[1]=Math.min(Math.abs(s),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(s){this.gl[2]=Math.min(Math.abs(s),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(s){this.gl[3]=Math.min(Math.abs(s),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(s){s=Math.floor(Math.abs(s)),this.r=Math.min(s,255),this.gl[0]=s/255,this.update(!0)}},green:{get:function(){return this.g},set:function(s){s=Math.floor(Math.abs(s)),this.g=Math.min(s,255),this.gl[1]=s/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(s){s=Math.floor(Math.abs(s)),this.b=Math.min(s,255),this.gl[2]=s/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(s){s=Math.floor(Math.abs(s)),this.a=Math.min(s,255),this.gl[3]=s/255,this.update()}},h:{get:function(){return this._h},set:function(s){this._h=s,r(s,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(s){this._s=s,r(this._h,s,this._v,this)}},v:{get:function(){return this._v},set:function(s){this._v=s,r(this._h,this._s,s,this)}}});p.exports=e},30245:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(22946),c=function(l){l===void 0&&(l=1024);var r=[],n=255,e,s=255,u=0,i=0;for(e=0;e<=n;e++)r.push({r:s,g:e,b:i,color:d(s,e,i)});for(u=255,e=n;e>=0;e--)r.push({r:e,g:u,b:i,color:d(e,u,i)});for(s=0,e=0;e<=n;e++,u--)r.push({r:s,g:u,b:e,color:d(s,u,e)});for(u=0,i=255,e=0;e<=n;e++,i--,s++)r.push({r:s,g:u,b:i,color:d(s,u,i)});if(l===1024)return r;var a=[],o=0,h=1024/l;for(e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d={r:t>>16&255,g:t>>8&255,b:t&255,a:255};return t>16777215&&(d.a=t>>>24),d};p.exports=S},25409:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d=t.toString(16);return d.length===1?"0"+d:d};p.exports=S},22946:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t<<16|d<<8|c};p.exports=S},5657:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){return l<<24|t<<16|d<<8|c};p.exports=S},74777:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27119),c=t(59998),l=function(r,n,e){var s=e,u=e,i=e;if(n!==0){var a=e<.5?e*(1+n):e+n-e*n,o=2*e-a;s=c(o,a,r+1/3),u=c(o,a,r),i=c(o,a,r-1/3)}var h=new d;return h.setGLTo(s,u,i,1)};p.exports=l},89263:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(24650),c=function(l,r){l===void 0&&(l=1),r===void 0&&(r=1);for(var n=[],e=0;e<=359;e++)n.push(d(e/359,l,r));return n};p.exports=c},24650:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(22946);function c(r,n,e,s){var u=(r+n*6)%6,i=Math.min(u,4-u,1);return Math.round(255*(s-s*e*Math.max(0,i)))}var l=function(r,n,e,s){n===void 0&&(n=1),e===void 0&&(e=1);var u=c(5,r,n,e),i=c(3,r,n,e),a=c(1,r,n,e);return s?s.setTo?s.setTo(u,i,a,s.alpha,!0):(s.r=u,s.g=i,s.b=a,s.color=d(u,i,a),s):{r:u,g:i,b:a,color:d(u,i,a)}};p.exports=l},91487:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27119),c=function(l){var r=new d;l=l.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(i,a,o,h){return a+a+o+o+h+h});var n=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(l);if(n){var e=parseInt(n[1],16),s=parseInt(n[2],16),u=parseInt(n[3],16);r.setTo(e,s,u)}return r};p.exports=c},59998:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?t+(d-t)*6*c:c<.5?d:c<.6666666666666666?t+(d-t)*(.6666666666666666-c)*6:t};p.exports=S},74853:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27119),c=t(15978),l=function(r){var n=c(r);return new d(n.r,n.g,n.b,n.a)};p.exports=l},15978:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:t&255}:{a:255,r:t>>16&255,g:t>>8&255,b:t&255}};p.exports=S},53756:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(42798),c=function(n,e,s,u,i,a,o,h){o===void 0&&(o=100),h===void 0&&(h=0);var f=h/o;return{r:d(n,u,f),g:d(e,i,f),b:d(s,a,f)}},l=function(n,e,s,u){return s===void 0&&(s=100),u===void 0&&(u=0),c(n.r,n.g,n.b,e.r,e.g,e.b,s,u)},r=function(n,e,s,u,i,a){return i===void 0&&(i=100),a===void 0&&(a=0),c(n.r,n.g,n.b,e,s,u,i,a)};p.exports={RGBWithRGB:c,ColorWithRGB:r,ColorWithColor:l}},73904:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27119),c=function(l){return new d(l.r,l.g,l.b,l.a)};p.exports=c},26841:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27119),c=function(l){var r=new d,n=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(l.toLowerCase());if(n){var e=parseInt(n[1],10),s=parseInt(n[2],10),u=parseInt(n[3],10),i=n[4]!==void 0?parseFloat(n[4]):1;r.setTo(e,s,u,i*255)}return r};p.exports=c},68033:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){l===void 0&&(l={h:0,s:0,v:0}),t/=255,d/=255,c/=255;var r=Math.min(t,d,c),n=Math.max(t,d,c),e=n-r,s=0,u=n===0?0:e/n,i=n;return n!==r&&(n===t?s=(d-c)/e+(d{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25409),c=function(l,r,n,e,s){return e===void 0&&(e=255),s===void 0&&(s="#"),s==="#"?"#"+((1<<24)+(l<<16)+(r<<8)+n).toString(16).slice(1,7):"0x"+d(e)+d(l)+d(r)+d(n)};p.exports=c},37243:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(17489),c=t(27119),l=function(r,n){return r===void 0&&(r=0),n===void 0&&(n=255),new c(d(r,n),d(r,n),d(r,n))};p.exports=l},93222:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(91487),c=t(74853),l=t(73904),r=t(26841),n=function(e){var s=typeof e;switch(s){case"string":return e.substr(0,3).toLowerCase()==="rgb"?r(e):d(e);case"number":return c(e);case"object":return l(e)}};p.exports=n},95509:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27119);d.ColorSpectrum=t(30245),d.ColorToRGBA=t(86672),d.ComponentToHex=t(25409),d.GetColor=t(22946),d.GetColor32=t(5657),d.HexStringToColor=t(91487),d.HSLToColor=t(74777),d.HSVColorWheel=t(89263),d.HSVToRGB=t(24650),d.HueToComponent=t(59998),d.IntegerToColor=t(74853),d.IntegerToRGB=t(15978),d.Interpolate=t(53756),d.ObjectToColor=t(73904),d.RandomRGB=t(37243),d.RGBStringToColor=t(26841),d.RGBToHSV=t(68033),d.RGBToString=t(4880),d.ValueToColor=t(93222),p.exports=d},24816:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Align:t(93545),BaseShader:t(31053),Bounds:t(15252),Canvas:t(23514),Color:t(95509),ColorMatrix:t(65246),Masks:t(93310),RGB:t(39298)}},76756:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(61286),l=new d({initialize:function(n,e,s,u,i,a){e||(e=n.sys.make.image({x:s,y:u,key:i,frame:a,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(r){this.bitmapMask=r},preRenderWebGL:function(r,n,e){r.pipelines.BITMAPMASK_PIPELINE.beginMask(this,n,e)},postRenderWebGL:function(r,n,e){r.pipelines.BITMAPMASK_PIPELINE.endMask(this,n,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});c.register("bitmapMask",function(r,n,e,s,u){return new l(this.scene,r,n,e,s,u)}),p.exports=l},63037:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r,n){this.geometryMask=n,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(l){return this.geometryMask=l,this},setInvertAlpha:function(l){return l===void 0&&(l=!0),this.invertAlpha=l,this},preRenderWebGL:function(l,r,n){var e=l.gl;l.flush(),l.maskStack.length===0&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),l.maskCount=0),l.currentCameraMask.mask!==this&&(l.currentMask.mask=this),l.maskStack.push({mask:this,camera:n}),this.applyStencil(l,n,!0),l.maskCount++},applyStencil:function(l,r,n){var e=l.gl,s=this.geometryMask,u=l.maskCount,i=255;e.colorMask(!1,!1,!1,!1),n?(e.stencilFunc(e.EQUAL,u,i),e.stencilOp(e.KEEP,e.KEEP,e.INCR),u++):(e.stencilFunc(e.EQUAL,u+1,i),e.stencilOp(e.KEEP,e.KEEP,e.DECR)),this.level=u,s.renderWebGL(l,s,r),l.flush(),e.colorMask(!0,!0,!0,!0),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),this.invertAlpha?e.stencilFunc(e.NOTEQUAL,u,i):e.stencilFunc(e.EQUAL,u,i)},postRenderWebGL:function(l){var r=l.gl;l.maskStack.pop(),l.maskCount--,l.flush();var n=l.currentMask;if(l.maskStack.length===0)n.mask=null,r.disable(r.STENCIL_TEST);else{var e=l.maskStack[l.maskStack.length-1];e.mask.applyStencil(l,e.camera,!1),l.currentCameraMask.mask!==e.mask?(n.mask=e.mask,n.camera=e.camera):n.mask=null}},preRenderCanvas:function(l,r,n){var e=this.geometryMask;l.currentContext.save(),e.renderCanvas(l,e,n,null,null,!0),l.currentContext.clip()},postRenderCanvas:function(l){l.currentContext.restore()},destroy:function(){this.geometryMask=null}});p.exports=c},93310:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BitmapMask:t(76756),GeometryMask:t(63037)}},31053:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r,n,e,s){(!n||n==="")&&(n=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join(` +`)),(!e||e==="")&&(e=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join(` +`)),s===void 0&&(s=null),this.key=r,this.fragmentSrc=n,this.vertexSrc=e,this.uniforms=s}});p.exports=c},99584:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c;if(d)typeof d=="string"?c=document.getElementById(d):typeof d=="object"&&d.nodeType===1&&(c=d);else if(t.parentElement||d===null)return t;return c||(c=document.body),c.appendChild(t),t};p.exports=S},85178:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(99584),c=function(l){var r=l.config;if(!(!r.parent||!r.domCreateContainer)){var n=document.createElement("div");n.style.cssText=["display: block;","width: "+l.scale.width+"px;","height: "+l.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+r.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),l.domContainer=n,d(n,r.parent)}};p.exports=c},21546:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36580),c=function(l){if(document.readyState==="complete"||document.readyState==="interactive"){l();return}var r=function(){document.removeEventListener("deviceready",r,!0),document.removeEventListener("DOMContentLoaded",r,!0),window.removeEventListener("load",r,!0),l()};document.body?d.cordova?document.addEventListener("deviceready",r,!1):(document.addEventListener("DOMContentLoaded",r,!0),window.addEventListener("load",r,!0)):window.setTimeout(r,20)};p.exports=c},74181:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){if(!t)return window.innerHeight;var d=Math.abs(window.orientation),c={w:0,h:0},l=document.createElement("div");return l.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(l),c.w=d===90?l.offsetHeight:window.innerWidth,c.h=d===90?window.innerWidth:l.offsetHeight,document.documentElement.removeChild(l),l=null,Math.abs(window.orientation)!==90?c.h:c.w};p.exports=S},9229:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(55301),c=function(l,r){var n=window.screen,e=n?n.orientation||n.mozOrientation||n.msOrientation:!1;if(e&&typeof e.type=="string")return e.type;if(typeof e=="string")return e;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return d.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return d.ORIENTATION.LANDSCAPE}else return r>l?d.ORIENTATION.PORTRAIT:d.ORIENTATION.LANDSCAPE};p.exports=c},2893:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d;return t!==""&&(typeof t=="string"?d=document.getElementById(t):t&&t.nodeType===1&&(d=t)),d||(d=document.body),d};p.exports=S},89200:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d="";try{if(window.DOMParser){var c=new DOMParser;d=c.parseFromString(t,"text/xml")}else d=new ActiveXObject("Microsoft.XMLDOM"),d.loadXML(t)}catch{d=null}return!d||!d.documentElement||d.getElementsByTagName("parsererror").length?null:d};p.exports=S},55638:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){t.parentNode&&t.parentNode.removeChild(t)};p.exports=S},27385:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72283),l=new d({initialize:function(){this.isRunning=!1,this.callback=c,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var n=this;this.step=function e(s){n.callback(s),n.isRunning&&(n.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){n.isRunning&&(n.timeOutID=window.setTimeout(e,n.delay)),n.callback(window.performance.now())}},start:function(r,n,e){this.isRunning||(this.callback=r,this.isSetTimeOut=n,this.delay=e,this.isRunning=!0,this.timeOutID=n?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=c}});p.exports=l},3590:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={AddToDOM:t(99584),DOMContentLoaded:t(21546),GetInnerHeight:t(74181),GetScreenOrientation:t(9229),GetTarget:t(2893),ParseXML:t(89200),RemoveFromDOM:t(55638),RequestAnimationFrame:t(27385)};p.exports=d},78491:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(6659),l=t(91963),r=new d({Extends:c,initialize:function(){c.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});l.register("EventEmitter",r,"events"),p.exports=r},95146:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={EventEmitter:t(78491)}},20170:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s){s===void 0&&(s=1),c.call(this,l.BARREL,e),this.amount=s}});p.exports=r},51182:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s,u,i,a,o,h){u===void 0&&(u=1),i===void 0&&(i=1),a===void 0&&(a=1),o===void 0&&(o=1),h===void 0&&(h=4),c.call(this,l.BLOOM,e),this.steps=h,this.offsetX=u,this.offsetY=i,this.blurStrength=a,this.strength=o,this.glcolor=[1,1,1],s!=null&&(this.color=s)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r},51498:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s,u,i,a,o,h){s===void 0&&(s=0),u===void 0&&(u=2),i===void 0&&(i=2),a===void 0&&(a=1),h===void 0&&(h=4),c.call(this,l.BLUR,e),this.quality=s,this.x=u,this.y=i,this.steps=h,this.strength=a,this.glcolor=[1,1,1],o!=null&&(this.color=o)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r},12042:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s,u,i,a,o,h,f){s===void 0&&(s=.5),u===void 0&&(u=1),i===void 0&&(i=.2),a===void 0&&(a=!1),o===void 0&&(o=1),h===void 0&&(h=1),f===void 0&&(f=1),c.call(this,l.BOKEH,e),this.radius=s,this.amount=u,this.contrast=i,this.isTiltShift=a,this.strength=f,this.blurX=o,this.blurY=h}});p.exports=r},69900:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s,u,i,a,o){s===void 0&&(s=8),a===void 0&&(a=1),o===void 0&&(o=.005),c.call(this,l.CIRCLE,e),this.scale=a,this.feather=o,this.thickness=s,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],u!=null&&(this.color=u),i!=null&&(this.backgroundColor=i)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}},backgroundColor:{get:function(){var n=this.glcolor2;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor2;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(n){this.glcolor2[3]=n}}});p.exports=r},48991:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(65246),l=t(47406),r=new d({Extends:c,initialize:function(e){c.call(this),this.type=l.COLOR_MATRIX,this.gameObject=e,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});p.exports=r},47551:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r,n){this.type=r,this.gameObject=n,this.active=!0},setActive:function(l){return this.active=l,this},destroy:function(){this.gameObject=null,this.active=!1}});p.exports=c},47909:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s,u,i){s===void 0&&(s="__WHITE"),u===void 0&&(u=.005),i===void 0&&(i=.005),c.call(this,l.DISPLACEMENT,e),this.x=u,this.y=i,this.glTexture,this.setTexture(s)},setTexture:function(n){var e=this.gameObject.scene.sys.textures.getFrame(n);return e&&(this.glTexture=e.glTexture),this}});p.exports=r},18919:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s,u,i,a){u===void 0&&(u=4),i===void 0&&(i=0),a===void 0&&(a=!1),c.call(this,l.GLOW,e),this.outerStrength=u,this.innerStrength=i,this.knockout=a,this.glcolor=[1,1,1,1],s!==void 0&&(this.color=s)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r},62494:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s,u,i,a,o,h,f,v){i===void 0&&(i=.2),a===void 0&&(a=0),o===void 0&&(o=0),h===void 0&&(h=0),f===void 0&&(f=1),v===void 0&&(v=0),c.call(this,l.GRADIENT,e),this.alpha=i,this.size=v,this.fromX=a,this.fromY=o,this.toX=h,this.toY=f,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],s!=null&&(this.color1=s),u!=null&&(this.color2=u)},color1:{get:function(){var n=this.glcolor1;return(n[0]<<16)+(n[1]<<8)+(n[2]|0)},set:function(n){var e=this.glcolor1;e[0]=n>>16&255,e[1]=n>>8&255,e[2]=n&255}},color2:{get:function(){var n=this.glcolor2;return(n[0]<<16)+(n[1]<<8)+(n[2]|0)},set:function(n){var e=this.glcolor2;e[0]=n>>16&255,e[1]=n>>8&255,e[2]=n&255}}});p.exports=r},68897:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s){s===void 0&&(s=1),c.call(this,l.PIXELATE,e),this.amount=s}});p.exports=r},58575:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s,u,i,a,o,h,f){s===void 0&&(s=0),u===void 0&&(u=0),i===void 0&&(i=.1),a===void 0&&(a=1),h===void 0&&(h=6),f===void 0&&(f=1),c.call(this,l.SHADOW,e),this.x=s,this.y=u,this.decay=i,this.power=a,this.glcolor=[0,0,0,1],this.samples=h,this.intensity=f,o!==void 0&&(this.color=o)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});p.exports=r},33755:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s,u,i,a){s===void 0&&(s=.5),u===void 0&&(u=.5),i===void 0&&(i=3),a===void 0&&(a=!1),c.call(this,l.SHINE,e),this.speed=s,this.lineWidth=u,this.gradient=i,this.reveal=a}});p.exports=r},24949:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s,u,i,a){s===void 0&&(s=.5),u===void 0&&(u=.5),i===void 0&&(i=.5),a===void 0&&(a=.5),c.call(this,l.VIGNETTE,e),this.x=s,this.y=u,this.radius=i,this.strength=a}});p.exports=r},66241:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(47551),l=t(47406),r=new d({Extends:c,initialize:function(e,s,u,i,a){s===void 0&&(s=.1),u===void 0&&(u=0),i===void 0&&(i=0),a===void 0&&(a=!1),c.call(this,l.WIPE,e),this.progress=0,this.wipeWidth=s,this.direction=u,this.axis=i,this.reveal=a}});p.exports=r},47406:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19};p.exports=S},96910:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(98611),c=t(47406),l={Barrel:t(20170),Controller:t(47551),Bloom:t(51182),Blur:t(51498),Bokeh:t(12042),Circle:t(69900),ColorMatrix:t(48991),Displacement:t(47909),Glow:t(18919),Gradient:t(62494),Pixelate:t(68897),Shadow:t(58575),Shine:t(33755),Vignette:t(24949),Wipe:t(66241)};l=d(!1,l,c),p.exports=l},88933:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95723),c=t(20494),l=function(r,n,e){n.x=c(e,"x",0),n.y=c(e,"y",0),n.depth=c(e,"depth",0),n.flipX=c(e,"flipX",!1),n.flipY=c(e,"flipY",!1);var s=c(e,"scale",null);typeof s=="number"?n.setScale(s):s!==null&&(n.scaleX=c(s,"x",1),n.scaleY=c(s,"y",1));var u=c(e,"scrollFactor",null);typeof u=="number"?n.setScrollFactor(u):u!==null&&(n.scrollFactorX=c(u,"x",1),n.scrollFactorY=c(u,"y",1)),n.rotation=c(e,"rotation",0);var i=c(e,"angle",null);i!==null&&(n.angle=i),n.alpha=c(e,"alpha",1);var a=c(e,"origin",null);if(typeof a=="number")n.setOrigin(a);else if(a!==null){var o=c(a,"x",.5),h=c(a,"y",.5);n.setOrigin(o,h)}n.blendMode=c(e,"blendMode",d.NORMAL),n.visible=c(e,"visible",!0);var f=c(e,"add",!0);return f&&r.sys.displayList.add(n),n.preUpdate&&r.sys.updateList.add(n),n};p.exports=l},32291:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20494),c=function(l,r){var n=d(r,"anims",null);if(n===null)return l;if(typeof n=="string")l.anims.play(n);else if(typeof n=="object"){var e=l.anims,s=d(n,"key",void 0);if(s){var u=d(n,"startFrame",void 0),i=d(n,"delay",0),a=d(n,"repeat",0),o=d(n,"repeatDelay",0),h=d(n,"yoyo",!1),f=d(n,"play",!1),v=d(n,"delayedPlay",0),m={key:s,delay:i,repeat:a,repeatDelay:o,yoyo:h,startFrame:u};f?e.play(m):v>0?e.playAfterDelay(m,v):e.load(m)}}return l};p.exports=c},91713:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(71207),l=t(91963),r=t(56631),n=t(7599),e=t(17922),s=new d({Extends:c,initialize:function(i){c.call(this,i),this.sortChildrenFlag=!1,this.scene=i,this.systems=i.sys,this.events=i.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.events.once(n.DESTROY,this.destroy,this)},addChildCallback:function(u){u.displayList&&u.displayList!==this&&u.removeFromDisplayList(),u.parentContainer&&u.parentContainer.remove(u),u.displayList||(this.queueDepthSort(),u.displayList=this,u.emit(r.ADDED_TO_SCENE,u,this.scene),this.events.emit(n.ADDED_TO_SCENE,u,this.scene))},removeChildCallback:function(u){this.queueDepthSort(),u.displayList=null,u.emit(r.REMOVED_FROM_SCENE,u,this.scene),this.events.emit(n.REMOVED_FROM_SCENE,u,this.scene)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(e(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(u,i){return u._depth-i._depth},getChildren:function(){return this.list},shutdown:function(){for(var u=this.list;u.length;)u[0].destroy(!0);this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});l.register("DisplayList",s,"displayList"),p.exports=s},89980:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(48129),l=t(81078),r=t(6659),n=t(56631),e=t(7599),s=new d({Extends:r,initialize:function(i,a){r.call(this),this.scene=i,this.displayList=null,this.type=a,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(n.ADDED_TO_SCENE,this.addedToScene,this),this.on(n.REMOVED_FROM_SCENE,this.removedFromScene,this),i.sys.queueDepthSort()},setActive:function(u){return this.active=u,this},setName:function(u){return this.name=u,this},setState:function(u){return this.state=u,this},setDataEnabled:function(){return this.data||(this.data=new l(this)),this},setData:function(u,i){return this.data||(this.data=new l(this)),this.data.set(u,i),this},incData:function(u,i){return this.data||(this.data=new l(this)),this.data.inc(u,i),this},toggleData:function(u){return this.data||(this.data=new l(this)),this.data.toggle(u),this},getData:function(u){return this.data||(this.data=new l(this)),this.data.get(u)},setInteractive:function(u,i,a){return this.scene.sys.input.enable(this,u,i,a),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return c(this)},willRender:function(u){var i=this.displayList&&this.displayList.active?this.displayList.willRender(u):!0;return!(!i||s.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&u.id)},getIndexList:function(){for(var u=this,i=this.parentContainer,a=[];i&&(a.unshift(i.getIndex(u)),u=i,i.parentContainer);)i=i.parentContainer;return this.displayList?a.unshift(this.displayList.getIndex(u)):a.unshift(this.scene.sys.displayList.getIndex(u)),a},addToDisplayList:function(u){return u===void 0&&(u=this.scene.sys.displayList),this.displayList&&this.displayList!==u&&this.removeFromDisplayList(),u.exists(this)||(this.displayList=u,u.add(this,!0),u.queueDepthSort(),this.emit(n.ADDED_TO_SCENE,this,this.scene),u.events.emit(e.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var u=this.displayList||this.scene.sys.displayList;return u&&u.exists(this)&&(u.remove(this,!0),u.queueDepthSort(),this.displayList=null,this.emit(n.REMOVED_FROM_SCENE,this,this.scene),u.events.emit(e.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(u){!this.scene||this.ignoreDestroy||(u===void 0&&(u=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(n.DESTROY,this,u),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});s.RENDER_MASK=15,p.exports=s},99325:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(91963),l=t(7599),r=new d({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(l.BOOT,this.boot,this),this.events.on(l.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(l.DESTROY,this.destroy,this)},start:function(){this.events.once(l.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(l.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(l.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});r.register=function(n,e){r.prototype.hasOwnProperty(n)||(r.prototype[n]=e)},r.remove=function(n){r.prototype.hasOwnProperty(n)&&delete r.prototype[n]},c.register("GameObjectCreator",r,"make"),p.exports=r},61286:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(91963),l=t(7599),r=new d({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(l.BOOT,this.boot,this),this.events.on(l.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(l.DESTROY,this.destroy,this)},start:function(){this.events.once(l.SHUTDOWN,this.shutdown,this)},existing:function(n){return(n.renderCanvas||n.renderWebGL)&&this.displayList.add(n),n.preUpdate&&this.updateList.add(n),n},shutdown:function(){this.events.off(l.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(l.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});r.register=function(n,e){r.prototype.hasOwnProperty(n)||(r.prototype[n]=e)},r.remove=function(n){r.prototype.hasOwnProperty(n)&&delete r.prototype[n]},c.register("GameObjectFactory",r,"add"),p.exports=r},73329:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(69360),c=new d,l=new d,r=new d,n={camera:c,sprite:l,calc:r},e=function(s,u,i){var a=c,o=l,h=r;return o.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),a.copyFrom(u.matrix),i?(a.multiplyWithOffset(i,-u.scrollX*s.scrollFactorX,-u.scrollY*s.scrollFactorY),o.e=s.x,o.f=s.y):(o.e-=u.scrollX*s.scrollFactorX,o.f-=u.scrollY*s.scrollFactorY),a.multiply(o,h),n};p.exports=e},92034:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(74623),l=t(91963),r=t(7599),n=new d({Extends:c,initialize:function(s){c.call(this),this.checkQueue=!0,this.scene=s,this.systems=s.sys,s.sys.events.once(r.BOOT,this.boot,this),s.sys.events.on(r.START,this.start,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(r.PRE_UPDATE,this.update,this),e.on(r.UPDATE,this.sceneUpdate,this),e.once(r.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,s){for(var u=this._active,i=u.length,a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r,n,e,s,u,i,a,o,h,f,v){var m=c.x-d.displayOriginX+r,x=c.y-d.displayOriginY+n,g=m+c.w,y=x+c.h,T=e.getXRound(m,x,s),E=e.getYRound(m,x,s),C=e.getXRound(m,y,s),A=e.getYRound(m,y,s),P=e.getXRound(g,y,s),R=e.getYRound(g,y,s),F=e.getXRound(g,x,s),L=e.getYRound(g,x,s);t.batchQuad(d,T,E,C,A,P,R,F,L,l.u0,l.v0,l.u1,l.v1,u,i,a,o,h,f,v)};p.exports=S},82173:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){if(c===void 0&&(c=!1),l===void 0)return l={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0},l;var r=t.text,n=r.length,e=t.maxWidth,s=t.wordWrapCharCode,u=Number.MAX_VALUE,i=Number.MAX_VALUE,a=0,o=0,h=t.fontData.chars,f=t.fontData.lineHeight,v=t.letterSpacing,m=t.lineSpacing,x=0,g=0,y=0,T=null,E=t._align,C=0,A=0,P=t.fontSize/t.fontData.size,R=P*t.scaleX,F=P*t.scaleY,L=null,B=0,N=[],U=Number.MAX_VALUE,z=0,w=0,I=0,M,O=[],D=[],G=null;if(e>0){for(M=0;Me||$>e?(W.push(H.i-1),H.cr?(W.push(H.i+H.word.length),Y=0,V=null):V=H):H.cr&&(W.push(H.i+H.word.length),Y=0,V=null)}var tt=function(ut,pt,gt){return ut.substr(0,pt)+gt+ut.substr(pt+1)};for(M=W.length-1;M>=0;M--)r=tt(r,W[M],` +`);l.wrappedText=r,n=r.length,O=[],G=null}var it=0;for(M=0;Mz&&(z=I),IC&&(u=C),i>A&&(i=A);var Q=C+T.xAdvance,q=A+f;az&&(z=I),I0)for(var nt=0;nt{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(31476),c=function(l,r,n,e,s,u,i){var a=l.sys.textures.get(n),o=a.get(e),h=l.sys.cache.xml.get(s);if(o&&h){var f=d(h,o,u,i,a);return l.sys.cache.bitmapFont.add(r,{data:f,texture:n,frame:e,fromAtlas:!0}),!0}else return!1};p.exports=c},39860:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10850),c=function(l,r){var n=r.width,e=r.height,s=Math.floor(n/2),u=Math.floor(e/2),i=d(r,"chars","");if(i!==""){var a=d(r,"image",""),o=l.sys.textures.getFrame(a),h=o.cutX,f=o.cutY,v=o.source.width,m=o.source.height,x=d(r,"offset.x",0),g=d(r,"offset.y",0),y=d(r,"spacing.x",0),T=d(r,"spacing.y",0),E=d(r,"lineSpacing",0),C=d(r,"charsPerRow",null);C===null&&(C=v/n,C>i.length&&(C=i.length));for(var A=x,P=g,R={retroFont:!0,font:a,size:n,lineHeight:e+E,chars:{}},F=0,L=0;L{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function S(d,c){return parseInt(d.getAttribute(c),10)}var t=function(d,c,l,r,n){l===void 0&&(l=0),r===void 0&&(r=0);var e=c.cutX,s=c.cutY,u=c.source.width,i=c.source.height,a=c.sourceIndex,o={},h=d.getElementsByTagName("info")[0],f=d.getElementsByTagName("common")[0];o.font=h.getAttribute("face"),o.size=S(h,"size"),o.lineHeight=S(f,"lineHeight")+r,o.chars={};var v=d.getElementsByTagName("char"),m=c!==void 0&&c.trimmed;if(m)var x=c.height,g=c.width;for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66863),c=t(98611),l={Parse:t(39860)};l=c(!1,l,d),p.exports=l},66863:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ`,TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:`ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' `,TEXT_SET7:`AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39`,TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:`ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};p.exports=S},13468:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(44616),c=t(56694),l=t(88899),r=new c({Extends:d,Mixins:[l],initialize:function(e,s,u,i,a,o,h){d.call(this,e,s,u,i,a,o,h),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(n,e){return this.cropWidth=n,this.cropHeight=e,this},setDisplayCallback:function(n){return this.displayCallback=n,this},setScrollX:function(n){return this.scrollX=n,this},setScrollY:function(n){return this.scrollY=n,this}});p.exports=r},93438:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(49584),c=function(l,r,n,e){var s=r._text,u=s.length,i=l.currentContext;if(!(u===0||!d(l,i,r,n,e))){n.addToRenderList(r);var a=r.fromAtlas?r.frame:r.texture.frames.__BASE,o=r.displayCallback,h=r.callbackData,f=r.fontData.chars,v=r.fontData.lineHeight,m=r._letterSpacing,x=0,g=0,y=0,T=null,E=0,C=0,A=0,P=0,R=0,F=0,L=null,B=0,N=r.frame.source.image,U=a.cutX,z=a.cutY,w=0,I=0,M=r._fontSize/r.fontData.size,O=r._align,D=0,G=0;r.getTextBounds(!1);var X=r._bounds.lines;O===1?G=(X.longest-X.lengths[0])/2:O===2&&(G=X.longest-X.lengths[0]),i.translate(-r.displayOriginX,-r.displayOriginY);var V=n.roundPixels;r.cropWidth>0&&r.cropHeight>0&&(i.beginPath(),i.rect(0,0,r.cropWidth,r.cropHeight),i.clip());for(var Y=0;Y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(13468),c=t(88933),l=t(99325),r=t(20494);l.register("dynamicBitmapText",function(n,e){n===void 0&&(n={});var s=r(n,"font",""),u=r(n,"text",""),i=r(n,"size",!1),a=new d(this.scene,0,0,s,u,i);return e!==void 0&&(n.add=e),c(this.scene,a,n),a})},94145:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(13468),c=t(61286);c.register("dynamicBitmapText",function(l,r,n,e,s){return this.displayList.add(new d(this.scene,l,r,n,e,s))})},88899:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(16873),l=t(93438),p.exports={renderWebGL:c,renderCanvas:l}},16873:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=t(69360),l=t(75512),r=new c,n=function(e,s,u,i){var a=s.text,o=a.length;if(o!==0){u.addToRenderList(s);var h=e.pipelines.set(s.pipeline,s),f=d(s,u,i);e.pipelines.preBatch(s);var v=f.sprite,m=f.calc,x=r,g=s.cropWidth>0||s.cropHeight>0;g&&(h.flush(),e.pushScissor(m.tx,m.ty,s.cropWidth*m.scaleX,s.cropHeight*m.scaleY));var y=s.frame,T=y.glTexture,E=s.tintFill,C=l.getTintAppendFloatAlpha(s.tintTopLeft,u.alpha*s._alphaTL),A=l.getTintAppendFloatAlpha(s.tintTopRight,u.alpha*s._alphaTR),P=l.getTintAppendFloatAlpha(s.tintBottomLeft,u.alpha*s._alphaBL),R=l.getTintAppendFloatAlpha(s.tintBottomRight,u.alpha*s._alphaBR),F=h.setGameObject(s),L=0,B=0,N=0,U=0,z=s.letterSpacing,w,I=0,M=0,O,D=s.scrollX,G=s.scrollY,X=s.fontData,V=X.chars,Y=X.lineHeight,W=s.fontSize/X.size,H=0,b=s._align,K=0,J=0,Z=s.getTextBounds(!1);s.maxWidth>0&&(a=Z.wrappedText,o=a.length);var $=s._bounds.lines;b===1?J=($.longest-$.lengths[0])/2:b===2&&(J=$.longest-$.lengths[0]);for(var tt=u.roundPixels,it=s.displayCallback,et=s.callbackData,Q=0;Q{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(82897),l=t(64937),r=t(89980),n=t(82173),e=t(68298),s=t(31476),u=t(74118),i=t(84557),a=new d({Extends:r,Mixins:[l.Alpha,l.BlendMode,l.Depth,l.GetBounds,l.Mask,l.Origin,l.Pipeline,l.PostPipeline,l.ScrollFactor,l.Texture,l.Tint,l.Transform,l.Visible,i],initialize:function(h,f,v,m,x,g,y){x===void 0&&(x=""),y===void 0&&(y=0),r.call(this,h,"BitmapText"),this.font=m;var T=this.scene.sys.cache.bitmapFont.get(m);T||console.warn("Invalid BitmapText key: "+m),this.fontData=T.data,this._text="",this._fontSize=g||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=y,this._bounds=n(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=T.fromAtlas,this.setTexture(T.texture,T.frame),this.setPosition(f,v),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(x)},setLeftAlign:function(){return this._align=a.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=a.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=a.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(o){return this._fontSize=o,this._dirty=!0,this},setLetterSpacing:function(o){return o===void 0&&(o=0),this._letterSpacing=o,this._dirty=!0,this},setLineSpacing:function(o){return o===void 0&&(o=0),this.lineSpacing=o,this},setText:function(o){return!o&&o!==0&&(o=""),Array.isArray(o)&&(o=o.join(` +`)),o!==this.text&&(this._text=o.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(o,h,f,v){return o===void 0&&(o=0),h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=.5),this.dropShadowX=o,this.dropShadowY=h,this.dropShadowColor=f,this.dropShadowAlpha=v,this},setCharacterTint:function(o,h,f,v,m,x,g){o===void 0&&(o=0),h===void 0&&(h=1),f===void 0&&(f=!1),v===void 0&&(v=-1),m===void 0&&(m=v,x=v,g=v);var y=this.text.length;h===-1&&(h=y),o<0&&(o=y+o),o=c(o,0,y-1);for(var T=c(o+h,o,y),E=this.charColors,C=o;C{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(49584),c=function(l,r,n,e){var s=r._text,u=s.length,i=l.currentContext;if(!(u===0||!d(l,i,r,n,e))){n.addToRenderList(r);var a=r.fromAtlas?r.frame:r.texture.frames.__BASE,o=r.fontData.chars,h=r.fontData.lineHeight,f=r._letterSpacing,v=r._lineSpacing,m=0,x=0,g=0,y=null,T=0,E=0,C=0,A=0,P=0,R=0,F=null,L=0,B=a.source.image,N=a.cutX,U=a.cutY,z=r._fontSize/r.fontData.size,w=r._align,I=0,M=0,O=r.getTextBounds(!1);r.maxWidth>0&&(s=O.wrappedText,u=s.length);var D=r._bounds.lines;w===1?M=(D.longest-D.lengths[0])/2:w===2&&(M=D.longest-D.lengths[0]),i.translate(-r.displayOriginX,-r.displayOriginY);for(var G=n.roundPixels,X=0;X{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(44616),c=t(88933),l=t(99325),r=t(20494),n=t(10850);l.register("bitmapText",function(e,s){e===void 0&&(e={});var u=n(e,"font",""),i=r(e,"text",""),a=r(e,"size",!1),o=n(e,"align",0),h=new d(this.scene,0,0,u,i,a,o);return s!==void 0&&(e.add=s),c(this.scene,h,e),h})},21797:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(44616),c=t(61286);c.register("bitmapText",function(l,r,n,e,s,u){return this.displayList.add(new d(this.scene,l,r,n,e,s,u))})},84557:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(26372),l=t(97545),p.exports={renderWebGL:c,renderCanvas:l}},26372:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8810),c=t(73329),l=t(75512),r=function(n,e,s,u){var i=e._text,a=i.length;if(a!==0){s.addToRenderList(e);var o=n.pipelines.set(e.pipeline,e),h=c(e,s,u).calc;n.pipelines.preBatch(e);var f=s.roundPixels,v=s.alpha,m=e.charColors,x=e.tintFill,g=l.getTintAppendFloatAlpha,y=g(e.tintTopLeft,v*e._alphaTL),T=g(e.tintTopRight,v*e._alphaTR),E=g(e.tintBottomLeft,v*e._alphaBL),C=g(e.tintBottomRight,v*e._alphaBR),A=e.frame.glTexture,P=o.setGameObject(e),R=e.getTextBounds(!1),F,L,B,N=R.characters,U=e.dropShadowX,z=e.dropShadowY,w=U!==0||z!==0;if(w){var I=e.dropShadowColor,M=e.dropShadowAlpha,O=g(I,v*M*e._alphaTL),D=g(I,v*M*e._alphaTR),G=g(I,v*M*e._alphaBL),X=g(I,v*M*e._alphaBR);for(F=0;F{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(92246),c=t(41664),l=t(56694),r=t(64937),n=t(82047),e=t(89980),s=t(71207),u=new l({Extends:e,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Size,r.Texture,r.Transform,r.Visible,d],initialize:function(a,o,h,f,v){e.call(this,a,"Blitter"),this.setTexture(f,v),this.setPosition(o,h),this.initPipeline(),this.initPostPipeline(),this.children=new s,this.renderList=[],this.dirty=!1},create:function(i,a,o,h,f){h===void 0&&(h=!0),f===void 0&&(f=this.children.length),o===void 0?o=this.frame:o instanceof n||(o=this.texture.get(o));var v=new c(this,i,a,o,h);return this.children.addAt(v,f,!1),this.dirty=!0,v},createFromCallback:function(i,a,o,h){for(var f=this.createMultiple(a,o,h),v=0;v0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});p.exports=u},33177:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r=d.getRenderList();if(r.length!==0){var n=t.currentContext,e=c.alpha*d.alpha;if(e!==0){c.addToRenderList(d),n.globalCompositeOperation=t.blendModes[d.blendMode],n.imageSmoothingEnabled=!d.frame.source.scaleMode;var s=d.x-c.scrollX*d.scrollFactorX,u=d.y-c.scrollY*d.scrollFactorY;n.save(),l&&l.copyToContext(n);for(var i=c.roundPixels,a=0;a0&&v.height>0&&(n.save(),n.translate(o.x+s,o.y+u),n.scale(g,y),n.drawImage(f.source.image,v.x,v.y,v.width,v.height,m,x,v.width,v.height),n.restore())):(i&&(m=Math.round(m),x=Math.round(x)),v.width>0&&v.height>0&&n.drawImage(f.source.image,v.x,v.y,v.width,v.height,m+o.x+s,x+o.y+u,v.width,v.height)))}n.restore()}}};p.exports=S},68452:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(52816),c=t(88933),l=t(99325),r=t(20494);l.register("blitter",function(n,e){n===void 0&&(n={});var s=r(n,"key",null),u=r(n,"frame",null),i=new d(this.scene,0,0,s,u);return e!==void 0&&(n.add=e),c(this.scene,i,n),i})},38906:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(52816),c=t(61286);c.register("blitter",function(l,r,n,e){return this.displayList.add(new d(this.scene,l,r,n,e))})},92246:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(89165),l=t(33177),p.exports={renderWebGL:c,renderCanvas:l}},89165:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(69360),c=t(75512),l=new d,r=function(n,e,s,u){var i=e.getRenderList(),a=s.alpha*e.alpha;if(!(i.length===0||a===0)){s.addToRenderList(e);var o=n.pipelines.set(this.pipeline,e),h=s.scrollX*e.scrollFactorX,f=s.scrollY*e.scrollFactorY,v=l.copyFrom(s.matrix);u&&(v.multiplyWithOffset(u,-h,-f),h=0,f=0);var m=e.x-h,x=e.y-f,g=-1,y=!1;n.pipelines.preBatch(e);for(var T=0;T{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(82047),l=new d({initialize:function(n,e,s,u,i){this.parent=n,this.x=e,this.y=s,this.frame=u,this.data={},this.tint=16777215,this._visible=i,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(r){return r===void 0?this.frame=this.parent.frame:r instanceof c&&r.texture===this.parent.texture?this.frame=r:this.frame=this.parent.texture.get(r),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(r,n,e){return this.x=r,this.y=n,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,e&&this.setFrame(e),this},setPosition:function(r,n){return this.x=r,this.y=n,this},setFlipX:function(r){return this.flipX=r,this},setFlipY:function(r){return this.flipY=r,this},setFlip:function(r,n){return this.flipX=r,this.flipY=n,this},setVisible:function(r){return this.visible=r,this},setAlpha:function(r){return this.alpha=r,this},setTint:function(r){return this.tint=r,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(r){this.parent.dirty|=this._visible!==r,this._visible=r}},alpha:{get:function(){return this._alpha},set:function(r){this.parent.dirty|=this._alpha>0!=r>0,this._alpha=r}}});p.exports=l},97123:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=2,l={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r,n,e,s){return r===void 0&&(r=1),n===void 0?this.alpha=r:(this._alphaTL=d(r,0,1),this._alphaTR=d(n,0,1),this._alphaBL=d(e,0,1),this._alphaBR=d(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(r){var n=d(r,0,1);this._alpha=n,this._alphaTL=n,this._alphaTR=n,this._alphaBL=n,this._alphaBR=n,n===0?this.renderFlags&=~c:this.renderFlags|=c}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(r){var n=d(r,0,1);this._alphaTL=n,n!==0&&(this.renderFlags|=c)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(r){var n=d(r,0,1);this._alphaTR=n,n!==0&&(this.renderFlags|=c)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(r){var n=d(r,0,1);this._alphaBL=n,n!==0&&(this.renderFlags|=c)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(r){var n=d(r,0,1);this._alphaBR=n,n!==0&&(this.renderFlags|=c)}}};p.exports=l},15720:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=2,l={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r){return r===void 0&&(r=1),this.alpha=r,this},alpha:{get:function(){return this._alpha},set:function(r){var n=d(r,0,1);this._alpha=n,n===0?this.renderFlags&=~c:this.renderFlags|=c}}};p.exports=l},69732:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95723),c={_blendMode:d.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(l){typeof l=="string"&&(l=d[l]),l|=0,l>=-1&&(this._blendMode=l)}},setBlendMode:function(l){return this.blendMode=l,this}};p.exports=c},28284:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,d){return this.width=t,this.height=d,this},setDisplaySize:function(t,d){return this.displayWidth=t,this.displayHeight=d,this}};p.exports=S},85293:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={texture:null,frame:null,isCropped:!1,setCrop:function(t,d,c,l){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,d,c,l,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};p.exports=S},14975:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return t===void 0&&(t=0),this.depth=t,this}};p.exports=S},88677:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(96910),l=t(72677),r=new d({initialize:function(e,s){this.gameObject=e,this.isPost=s,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(n){return n===void 0&&(n=0),this.padding=n,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(n){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,n!==void 0&&(this.padding=n),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var n=this.list,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,d){return this.flipX=t,this.flipY=d,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};p.exports=S},80693:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118),c=t(2386),l=t(93736),r={prepareBoundsOutput:function(n,e){if(e===void 0&&(e=!1),this.rotation!==0&&c(n,this.x,this.y,this.rotation),e&&this.parentContainer){var s=this.parentContainer.getBoundsTransformMatrix();s.transformPoint(n.x,n.y,n)}return n},getCenter:function(n,e){return n===void 0&&(n=new l),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getTopLeft:function(n,e){return n||(n=new l),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getTopCenter:function(n,e){return n||(n=new l),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getTopRight:function(n,e){return n||(n=new l),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getLeftCenter:function(n,e){return n||(n=new l),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getRightCenter:function(n,e){return n||(n=new l),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getBottomLeft:function(n,e){return n||(n=new l),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBottomCenter:function(n,e){return n||(n=new l),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBottomRight:function(n,e){return n||(n=new l),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBounds:function(n){n===void 0&&(n=new d);var e,s,u,i,a,o,h,f;if(this.parentContainer){var v=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(n),v.transformPoint(n.x,n.y,n),e=n.x,s=n.y,this.getTopRight(n),v.transformPoint(n.x,n.y,n),u=n.x,i=n.y,this.getBottomLeft(n),v.transformPoint(n.x,n.y,n),a=n.x,o=n.y,this.getBottomRight(n),v.transformPoint(n.x,n.y,n),h=n.x,f=n.y}else this.getTopLeft(n),e=n.x,s=n.y,this.getTopRight(n),u=n.x,i=n.y,this.getBottomLeft(n),a=n.x,o=n.y,this.getBottomRight(n),h=n.x,f=n.y;return n.x=Math.min(e,u,a,h),n.y=Math.min(s,i,o,f),n.width=Math.max(e,u,a,h)-n.x,n.height=Math.max(s,i,o,f)-n.y,n}};p.exports=r},39171:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(76756),c=t(63037),l={mask:null,setMask:function(r){return this.mask=r,this},clearMask:function(r){return r===void 0&&(r=!1),r&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(r,n,e,s,u){return r===void 0&&(this.texture||this.shader||this.geom)&&(r=this),new d(this.scene,r,n,e,s,u)},createGeometryMask:function(r){return r===void 0&&(this.type==="Graphics"||this.geom)&&(r=this),new c(this.scene,r)}};p.exports=l},28072:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,d){return t===void 0&&(t=.5),d===void 0&&(d=t),this.originX=t,this.originY=d,this.updateDisplayOrigin()},setOriginFromFrame:function(){return!this.frame||!this.frame.customPivot?this.setOrigin():(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin())},setDisplayOrigin:function(t,d){return t===void 0&&(t=0),d===void 0&&(d=t),this.displayOriginX=t,this.displayOriginY=d,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};p.exports=S},54211:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(75606),c=t(63130),l=t(10850),r=t(55303),n=t(93736),e={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:r.PLAYING_FORWARD,setPath:function(s,u){u===void 0&&(u=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=s,u&&this.startFollow(u),this},setRotateToPath:function(s,u){return u===void 0&&(u=0),this.rotateToPath=s,this.pathRotationOffset=u,this},isFollowing:function(){var s=this.pathTween;return s&&s.isPlaying()},startFollow:function(s,u){s===void 0&&(s={}),u===void 0&&(u=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),typeof s=="number"&&(s={duration:s}),s.from=l(s,"from",0),s.to=l(s,"to",1);var a=c(s,"positionOnPath",!1);this.rotateToPath=c(s,"rotateToPath",!1),this.pathRotationOffset=l(s,"rotationOffset",0);var o=l(s,"startAt",u);if(o&&(s.onStart=function(f){var v=f.data[0];v.progress=o,v.elapsed=v.duration*o;var m=v.ease(v.progress);v.current=v.start+(v.end-v.start)*m,v.setTargetValue()}),this.pathOffset||(this.pathOffset=new n(this.x,this.y)),this.pathVector||(this.pathVector=new n),this.pathDelta||(this.pathDelta=new n),this.pathDelta.reset(),s.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(s),this.path.getStartPoint(this.pathOffset),a&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=r.PLAYING_FORWARD,this.rotateToPath){var h=this.path.getPoint(.1);this.rotation=Math.atan2(h.y-this.y,h.x-this.x)+d(this.pathRotationOffset)}return this.pathConfig=s,this},pauseFollow:function(){var s=this.pathTween;return s&&s.isPlaying()&&s.pause(),this},resumeFollow:function(){var s=this.pathTween;return s&&s.isPaused()&&s.resume(),this},stopFollow:function(){var s=this.pathTween;return s&&s.isPlaying()&&s.stop(),this},pathUpdate:function(){var s=this.pathTween;if(s&&s.data){var u=s.data[0],i=this.pathDelta,a=this.pathVector;if(i.copy(a).negate(),u.state===r.COMPLETE){this.path.getPoint(u.end,a),i.add(a),a.add(this.pathOffset),this.setPosition(a.x,a.y);return}else if(u.state!==r.PLAYING_FORWARD&&u.state!==r.PLAYING_BACKWARD)return;this.path.getPoint(s.getValue(),a),i.add(a),a.add(this.pathOffset);var o=this.x,h=this.y;this.setPosition(a.x,a.y);var f=this.x-o,v=this.y-h;if(f===0&&v===0)return;if(u.state!==this._prevDirection){this._prevDirection=u.state;return}this.rotateToPath&&(this.rotation=Math.atan2(v,f)+d(this.pathRotationOffset))}}};p.exports=e},58210:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(28699),c={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(l){this.pipelineData={};var r=this.scene.sys.renderer;if(!r)return!1;var n=r.pipelines;if(n){l===void 0&&(l=n.default);var e=n.get(l);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}return!1},setPipeline:function(l,r,n){var e=this.scene.sys.renderer;if(!e)return this;var s=e.pipelines;if(s){var u=s.get(l);u&&(this.pipeline=u),r&&(this.pipelineData=n?d(r):r)}return this},setPipelineData:function(l,r){var n=this.pipelineData;return r===void 0?delete n[l]:n[l]=r,this},resetPipeline:function(l){return l===void 0&&(l=!1),this.pipeline=this.defaultPipeline,l&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline.name}};p.exports=c},44086:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(28699),c=t(88677),l=t(72677),r={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(n){this.postPipelines=[],this.postPipelineData={},this.postFX=new c(this,!0),n&&(this.preFX=new c(this,!1))},setPostPipeline:function(n,e,s){var u=this.scene.sys.renderer;if(!u)return this;var i=u.pipelines;if(i){Array.isArray(n)||(n=[n]);for(var a=0;a0,this},setPostPipelineData:function(n,e){var s=this.postPipelineData;return e===void 0?delete s[n]:s[n]=e,this},getPostPipeline:function(n){for(var e=typeof n=="string",s=this.postPipelines,u=[],i=0;i=0;u--){var i=s[u];(e&&i.name===n||!e&&i===n)&&(i.destroy(),l(s,u))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};p.exports=r},45900:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,d){return d===void 0&&(d=t),this.scrollFactorX=t,this.scrollFactorY=d,this}};p.exports=S},31654:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var d=this.input;return d&&!d.customHitArea&&(d.hitArea.width=this.width,d.hitArea.height=this.height),this},setSize:function(t,d){return this.width=t,this.height=d,this},setDisplaySize:function(t,d){return this.displayWidth=t,this.displayHeight=d,this}};p.exports=S},82081:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82047),c=8,l={texture:null,frame:null,isCropped:!1,setTexture:function(r,n,e,s){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n,e,s)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof d?(this.texture=this.scene.sys.textures.get(r.texture.key),this.frame=r):this.frame=this.texture.get(r),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~c:this.renderFlags|=c,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};p.exports=l},21850:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82047),c=8,l={texture:null,frame:null,isCropped:!1,setCrop:function(r,n,e,s){if(r===void 0)this.isCropped=!1;else if(this.frame){if(typeof r=="number")this.frame.setCropUVs(this._crop,r,n,e,s,this.flipX,this.flipY);else{var u=r;this.frame.setCropUVs(this._crop,u.x,u.y,u.width,u.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(r,n){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof d?(this.texture=this.scene.sys.textures.get(r.texture.key),this.frame=r):this.frame=this.texture.get(r),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~c:this.renderFlags|=c,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};p.exports=l},58072:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,d,c,l){return t===void 0&&(t=16777215),d===void 0&&(d=t,c=t,l=t),this.tintTopLeft=t,this.tintTopRight=d,this.tintBottomLeft=c,this.tintBottomRight=l,this.tintFill=!1,this},setTintFill:function(t,d,c,l){return this.setTint(t,d,c,l),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};p.exports=S},48129:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(d.textureKey=t.texture.key,d.frameKey=t.frame.name),d};p.exports=S},56584:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83392),c=t(69360),l=t(64462),r=t(35786),n=t(62138),e=t(93736),s=4,u={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(i){this._scaleX=i,this._scaleY=i,i===0?this.renderFlags&=~s:this.renderFlags|=s}},scaleX:{get:function(){return this._scaleX},set:function(i){this._scaleX=i,i===0?this.renderFlags&=~s:this._scaleY!==0&&(this.renderFlags|=s)}},scaleY:{get:function(){return this._scaleY},set:function(i){this._scaleY=i,i===0?this.renderFlags&=~s:this._scaleX!==0&&(this.renderFlags|=s)}},angle:{get:function(){return n(this._rotation*d.RAD_TO_DEG)},set:function(i){this.rotation=n(i)*d.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(i){this._rotation=r(i)}},setPosition:function(i,a,o,h){return i===void 0&&(i=0),a===void 0&&(a=i),o===void 0&&(o=0),h===void 0&&(h=0),this.x=i,this.y=a,this.z=o,this.w=h,this},copyPosition:function(i){return i.x!==void 0&&(this.x=i.x),i.y!==void 0&&(this.y=i.y),i.z!==void 0&&(this.z=i.z),i.w!==void 0&&(this.w=i.w),this},setRandomPosition:function(i,a,o,h){return i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=this.scene.sys.scale.width),h===void 0&&(h=this.scene.sys.scale.height),this.x=i+Math.random()*o,this.y=a+Math.random()*h,this},setRotation:function(i){return i===void 0&&(i=0),this.rotation=i,this},setAngle:function(i){return i===void 0&&(i=0),this.angle=i,this},setScale:function(i,a){return i===void 0&&(i=1),a===void 0&&(a=i),this.scaleX=i,this.scaleY=a,this},setX:function(i){return i===void 0&&(i=0),this.x=i,this},setY:function(i){return i===void 0&&(i=0),this.y=i,this},setZ:function(i){return i===void 0&&(i=0),this.z=i,this},setW:function(i){return i===void 0&&(i=0),this.w=i,this},getLocalTransformMatrix:function(i){return i===void 0&&(i=new c),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(i,a){i===void 0&&(i=new c);var o=this.parentContainer;if(!o)return this.getLocalTransformMatrix(i);for(a||(a=new c),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);o;)a.applyITRS(o.x,o.y,o._rotation,o._scaleX,o._scaleY),a.multiply(i,i),o=o.parentContainer;return i},getLocalPoint:function(i,a,o,h){o||(o=new e),h||(h=this.scene.sys.cameras.main);var f=h.scrollX,v=h.scrollY,m=i+f*this.scrollFactorX-f,x=a+v*this.scrollFactorY-v;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(m,x,o):l(m,x,this.x,this.y,this.rotation,this.scaleX,this.scaleY,o),this._originComponent&&(o.x+=this._displayOriginX,o.y+=this._displayOriginY),o},getParentRotation:function(){for(var i=0,a=this.parentContainer;a;)i+=a.rotation,a=a.parentContainer;return i}};p.exports=u},69360:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(83392),l=t(93736),r=new d({initialize:function(e,s,u,i,a,o){e===void 0&&(e=1),s===void 0&&(s=0),u===void 0&&(u=0),i===void 0&&(i=1),a===void 0&&(a=0),o===void 0&&(o=0),this.matrix=new Float32Array([e,s,u,i,a,o,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(n){this.matrix[0]=n}},b:{get:function(){return this.matrix[1]},set:function(n){this.matrix[1]=n}},c:{get:function(){return this.matrix[2]},set:function(n){this.matrix[2]=n}},d:{get:function(){return this.matrix[3]},set:function(n){this.matrix[3]=n}},e:{get:function(){return this.matrix[4]},set:function(n){this.matrix[4]=n}},f:{get:function(){return this.matrix[5]},set:function(n){this.matrix[5]=n}},tx:{get:function(){return this.matrix[4]},set:function(n){this.matrix[4]=n}},ty:{get:function(){return this.matrix[5]},set:function(n){this.matrix[5]=n}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var n=this.matrix,e=n[0],s=n[1],u=n[2],i=n[3];return e||s?s>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):u||i?c.TAU-(i>0?Math.acos(-u/this.scaleY):-Math.acos(u/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var n=this.matrix;return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,this},translate:function(n,e){var s=this.matrix;return s[4]=s[0]*n+s[2]*e+s[4],s[5]=s[1]*n+s[3]*e+s[5],this},scale:function(n,e){var s=this.matrix;return s[0]*=n,s[1]*=n,s[2]*=e,s[3]*=e,this},rotate:function(n){var e=Math.sin(n),s=Math.cos(n),u=this.matrix,i=u[0],a=u[1],o=u[2],h=u[3];return u[0]=i*s+o*e,u[1]=a*s+h*e,u[2]=i*-e+o*s,u[3]=a*-e+h*s,this},multiply:function(n,e){var s=this.matrix,u=n.matrix,i=s[0],a=s[1],o=s[2],h=s[3],f=s[4],v=s[5],m=u[0],x=u[1],g=u[2],y=u[3],T=u[4],E=u[5],C=e===void 0?s:e.matrix;return C[0]=m*i+x*o,C[1]=m*a+x*h,C[2]=g*i+y*o,C[3]=g*a+y*h,C[4]=T*i+E*o+f,C[5]=T*a+E*h+v,C},multiplyWithOffset:function(n,e,s){var u=this.matrix,i=n.matrix,a=u[0],o=u[1],h=u[2],f=u[3],v=u[4],m=u[5],x=e*a+s*h+v,g=e*o+s*f+m,y=i[0],T=i[1],E=i[2],C=i[3],A=i[4],P=i[5];return u[0]=y*a+T*h,u[1]=y*o+T*f,u[2]=E*a+C*h,u[3]=E*o+C*f,u[4]=A*a+P*h+x,u[5]=A*o+P*f+g,this},transform:function(n,e,s,u,i,a){var o=this.matrix,h=o[0],f=o[1],v=o[2],m=o[3],x=o[4],g=o[5];return o[0]=n*h+e*v,o[1]=n*f+e*m,o[2]=s*h+u*v,o[3]=s*f+u*m,o[4]=i*h+a*v+x,o[5]=i*f+a*m+g,this},transformPoint:function(n,e,s){s===void 0&&(s={x:0,y:0});var u=this.matrix,i=u[0],a=u[1],o=u[2],h=u[3],f=u[4],v=u[5];return s.x=n*i+e*o+f,s.y=n*a+e*h+v,s},invert:function(){var n=this.matrix,e=n[0],s=n[1],u=n[2],i=n[3],a=n[4],o=n[5],h=e*i-s*u;return n[0]=i/h,n[1]=-s/h,n[2]=-u/h,n[3]=e/h,n[4]=(u*o-i*a)/h,n[5]=-(e*o-s*a)/h,this},copyFrom:function(n){var e=this.matrix;return e[0]=n.a,e[1]=n.b,e[2]=n.c,e[3]=n.d,e[4]=n.e,e[5]=n.f,this},copyFromArray:function(n){var e=this.matrix;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],this},copyToContext:function(n){var e=this.matrix;return n.transform(e[0],e[1],e[2],e[3],e[4],e[5]),n},setToContext:function(n){return n.setTransform(this),n},copyToArray:function(n){var e=this.matrix;return n===void 0?n=[e[0],e[1],e[2],e[3],e[4],e[5]]:(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5]),n},setTransform:function(n,e,s,u,i,a){var o=this.matrix;return o[0]=n,o[1]=e,o[2]=s,o[3]=u,o[4]=i,o[5]=a,this},decomposeMatrix:function(){var n=this.decomposedMatrix,e=this.matrix,s=e[0],u=e[1],i=e[2],a=e[3],o=s*a-u*i;if(n.translateX=e[4],n.translateY=e[5],s||u){var h=Math.sqrt(s*s+u*u);n.rotation=u>0?Math.acos(s/h):-Math.acos(s/h),n.scaleX=h,n.scaleY=o/h}else if(i||a){var f=Math.sqrt(i*i+a*a);n.rotation=Math.PI*.5-(a>0?Math.acos(-i/f):-Math.acos(i/f)),n.scaleX=o/f,n.scaleY=f}else n.rotation=0,n.scaleX=0,n.scaleY=0;return n},applyITRS:function(n,e,s,u,i){var a=this.matrix,o=Math.sin(s),h=Math.cos(s);return a[4]=n,a[5]=e,a[0]=h*u,a[1]=o*u,a[2]=-o*i,a[3]=h*i,this},applyInverse:function(n,e,s){s===void 0&&(s=new l);var u=this.matrix,i=u[0],a=u[1],o=u[2],h=u[3],f=u[4],v=u[5],m=1/(i*h+o*-a);return s.x=h*m*n+-o*m*e+(v*o-f*h)*m,s.y=i*m*e+-a*m*n+(-v*i+f*a)*m,s},setQuad:function(n,e,s,u,i,a){i===void 0&&(i=!1),a===void 0&&(a=this.quad);var o=this.matrix,h=o[0],f=o[1],v=o[2],m=o[3],x=o[4],g=o[5];return i?(a[0]=Math.round(n*h+e*v+x),a[1]=Math.round(n*f+e*m+g),a[2]=Math.round(n*h+u*v+x),a[3]=Math.round(n*f+u*m+g),a[4]=Math.round(s*h+u*v+x),a[5]=Math.round(s*f+u*m+g),a[6]=Math.round(s*h+e*v+x),a[7]=Math.round(s*f+e*m+g)):(a[0]=n*h+e*v+x,a[1]=n*f+e*m+g,a[2]=n*h+u*v+x,a[3]=n*f+u*m+g,a[4]=s*h+u*v+x,a[5]=s*f+u*m+g,a[6]=s*h+e*v+x,a[7]=s*f+e*m+g),a},getX:function(n,e){return n*this.a+e*this.c+this.e},getY:function(n,e){return n*this.b+e*this.d+this.f},getXRound:function(n,e,s){var u=this.getX(n,e);return s&&(u=Math.round(u)),u},getYRound:function(n,e,s){var u=this.getY(n,e);return s&&(u=Math.round(u)),u},getCSSMatrix:function(){var n=this.matrix;return"matrix("+n[0]+","+n[1]+","+n[2]+","+n[3]+","+n[4]+","+n[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});p.exports=r},59694:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=1,t={_visible:!0,visible:{get:function(){return this._visible},set:function(d){d?(this._visible=!0,this.renderFlags|=S):(this._visible=!1,this.renderFlags&=~S)}},setVisible:function(d){return this.visible=d,this}};p.exports=t},64937:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Alpha:t(97123),AlphaSingle:t(15720),BlendMode:t(69732),ComputedSize:t(28284),Crop:t(85293),Depth:t(14975),Flip:t(92972),FX:t(88677),GetBounds:t(80693),Mask:t(39171),Origin:t(28072),PathFollower:t(54211),Pipeline:t(58210),PostPipeline:t(44086),ScrollFactor:t(45900),Size:t(31654),Texture:t(82081),TextureCrop:t(21850),Tint:t(58072),ToJSON:t(48129),Transform:t(56584),TransformMatrix:t(69360),Visible:t(59694)}},70339:(p,S,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(59959),c=t(95723),l=t(56694),r=t(64937),n=t(56631),e=t(89980),s=t(74118),u=t(98524),i=t(58795),a=t(93736),o=new l({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.ComputedSize,r.Depth,r.Mask,r.PostPipeline,r.Transform,r.Visible,u],initialize:function(f,v,m,x){e.call(this,f,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new r.TransformMatrix,this.tempTransformMatrix=new r.TransformMatrix,this._sortKey="",this._sysEvents=f.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(v,m),this.setBlendMode(c.SKIP_CHECK),x&&this.add(x)},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this.width*.5}},displayOriginY:{get:function(){return this.height*.5}},setExclusive:function(h){return h===void 0&&(h=!0),this.exclusive=h,this},getBounds:function(h){if(h===void 0&&(h=new s),h.setTo(this.x,this.y,0,0),this.parentContainer){var f=this.parentContainer.getBoundsTransformMatrix(),v=f.transformPoint(this.x,this.y);h.setTo(v.x,v.y,0,0)}if(this.list.length>0){var m=this.list,x=new s,g=!1;h.setEmpty();for(var y=0;y-1},setAll:function(h,f,v,m){return d.SetAll(this.list,h,f,v,m),this},each:function(h,f){var v=[null],m,x=this.list.slice(),g=x.length;for(m=2;m0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});p.exports=o},13916:p=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){c.addToRenderList(d);var r=d.list;if(r.length!==0){var n=d.localTransform;l?(n.loadIdentity(),n.multiply(l),n.translate(d.x,d.y),n.rotate(d.rotation),n.scale(d.scaleX,d.scaleY)):n.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY);var e=d.blendMode!==-1;e||t.setBlendMode(0);var s=d._alpha,u=d.scrollFactorX,i=d.scrollFactorY;d.mask&&d.mask.preRenderCanvas(t,null,c);for(var a=0;a{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(70339),l=t(99325),r=t(20494);l.register("container",function(n,e){n===void 0&&(n={});var s=r(n,"x",0),u=r(n,"y",0),i=r(n,"children",null),a=new c(this.scene,s,u,i);return e!==void 0&&(n.add=e),d(this.scene,a,n),a})},23400:(p,S,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70339),c=t(61286);c.register("container",function(l,r,n){return this.displayList.add(new d(this.scene,l,r,n))})},98524:(p,S,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(36934),l=t(13916),p.exports={renderWebGL:c,renderCanvas:l}},36934:p=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){c.addToRenderList(d);var r=d.list,n=r.length;if(n!==0){var e=d.localTransform;l?(e.loadIdentity(),e.multiply(l),e.translate(d.x,d.y),e.rotate(d.rotation),e.scale(d.scaleX,d.scaleY)):e.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY),t.pipelines.preBatch(d);var s=d.blendMode!==-1;s||t.setBlendMode(0);for(var u=d.alpha,i=d.scrollFactorX,a=d.scrollFactorY,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},38943:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(64937),l=t(11603),r=t(89980),n=t(42911),e=t(55638),s=t(7599),u=t(51729),i=new d({Extends:r,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Origin,c.ScrollFactor,c.Transform,c.Visible,l],initialize:function(o,h,f,v,m,x){r.call(this,o,"DOMElement"),this.parent=o.sys.game.domContainer,this.cache=o.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(h,f),typeof v=="string"?v[0]==="#"?this.setElement(v.substr(1),m,x):this.createElement(v,m,x):v&&this.setElement(v,m,x),o.sys.events.on(s.SLEEP,this.handleSceneEvent,this),o.sys.events.on(s.WAKE,this.handleSceneEvent,this),o.sys.events.on(s.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(a){var o=this.node,h=o.style;o&&(h.display=a.settings.visible?"block":"none")},setSkew:function(a,o){return a===void 0&&(a=0),o===void 0&&(o=a),this.skewX=a,this.skewY=o,this},setPerspective:function(a){return this.parent.style.perspective=a+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(a){this.parent.style.perspective=a+"px"}},addListener:function(a){if(this.node){a=a.split(" ");for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2452),c=t(89980),l=t(69360),r=new l,n=new l,e=new l,s=function(u,i,a,o){if(i.node){var h=i.node.style,f=i.scene.sys.settings;if(!h||!f.visible||c.RENDER_MASK!==i.renderFlags||i.cameraFilter!==0&&i.cameraFilter&a.id||i.parentContainer&&!i.parentContainer.willRender()){h.display="none";return}var v=i.parentContainer,m=a.alpha*i.alpha;v&&(m*=v.alpha);var x=r,g=n,y=e,T=0,E=0,C="0%",A="0%";o?(T=i.width*i.scaleX*i.originX,E=i.height*i.scaleY*i.originY,g.applyITRS(i.x-T,i.y-E,i.rotation,i.scaleX,i.scaleY),x.copyFrom(a.matrix),x.multiplyWithOffset(o,-a.scrollX*i.scrollFactorX,-a.scrollY*i.scrollFactorY),g.e=i.x-T,g.f=i.y-E,x.multiply(g,y)):(T=i.width*i.originX,E=i.height*i.originY,g.applyITRS(i.x-T,i.y-E,i.rotation,i.scaleX,i.scaleY),x.copyFrom(a.matrix),C=100*i.originX+"%",A=100*i.originY+"%",g.e-=a.scrollX*i.scrollFactorX,g.f-=a.scrollY*i.scrollFactorY,x.multiply(g,y)),i.transformOnly||(h.display="block",h.opacity=m,h.zIndex=i._depth,h.pointerEvents=i.pointerEvents,h.mixBlendMode=d[i._blendMode]),h.transform=y.getCSSMatrix()+" skew("+i.skewX+"rad, "+i.skewY+"rad) rotate3d("+i.rotate3d.x+","+i.rotate3d.y+","+i.rotate3d.z+","+i.rotate3d.w+i.rotate3dAngle+")",h.transformOrigin=C+" "+A}};p.exports=s},66788:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(38943),c=t(61286);c.register("dom",function(l,r,n,e,s){var u=new d(this.scene,l,r,n,e,s);return this.displayList.add(u),u})},11603:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(66070),l=t(66070),p.exports={renderWebGL:c,renderCanvas:l}},65492:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addedtoscene"},98398:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},40239:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removedfromscene"},17286:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},31496:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="created"},89587:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="error"},59792:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="locked"},96342:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loop"},6017:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="playing"},49614:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="play"},24418:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="seeked"},87318:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="seeking"},50009:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stalled"},61922:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stop"},79501:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="textureready"},4052:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="unlocked"},54857:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="unsupported"},56631:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADDED_TO_SCENE:t(65492),DESTROY:t(98398),REMOVED_FROM_SCENE:t(40239),VIDEO_COMPLETE:t(17286),VIDEO_CREATED:t(31496),VIDEO_ERROR:t(89587),VIDEO_LOCKED:t(59792),VIDEO_LOOP:t(96342),VIDEO_PLAY:t(49614),VIDEO_PLAYING:t(6017),VIDEO_SEEKED:t(24418),VIDEO_SEEKING:t(87318),VIDEO_STALLED:t(50009),VIDEO_STOP:t(61922),VIDEO_TEXTURE:t(79501),VIDEO_UNLOCKED:t(4052),VIDEO_UNSUPPORTED:t(54857)}},39419:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(64937),l=t(89980),r=t(79394),n=new d({Extends:l,Mixins:[c.Alpha,c.BlendMode,c.Depth,c.Flip,c.Origin,c.ScrollFactor,c.Size,c.Texture,c.Tint,c.Transform,c.Visible,r],initialize:function(s){l.call(this,s,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});p.exports=n},96699:()=>{},41155:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39419),c=t(61286);c.register("extern",function(){var l=new d(this.scene);return this.displayList.add(l),l})},79394:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(81410),l=t(96699),p.exports={renderWebGL:c,renderCanvas:l}},81410:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=function(l,r,n,e){l.pipelines.clear();var s=d(r,n,e).calc;r.render.call(r,l,n,s),l.pipelines.rebind()};p.exports=c},36266:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},33182:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(51052),c=t(56694),l=t(36266),r=t(64937),n=t(95669),e=t(89980),s=t(72632),u=t(10850),i=t(83392),a=t(60898),o=new c({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.Transform,r.Visible,r.ScrollFactor,a],initialize:function(f,v){var m=u(v,"x",0),x=u(v,"y",0);e.call(this,f,"Graphics"),this.setPosition(m,x),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(v)},setDefaultStyles:function(h){return u(h,"lineStyle",null)&&(this.defaultStrokeWidth=u(h,"lineStyle.width",1),this.defaultStrokeColor=u(h,"lineStyle.color",16777215),this.defaultStrokeAlpha=u(h,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),u(h,"fillStyle",null)&&(this.defaultFillColor=u(h,"fillStyle.color",16777215),this.defaultFillAlpha=u(h,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(h,f,v){return v===void 0&&(v=1),this.commandBuffer.push(l.LINE_STYLE,h,f,v),this._lineWidth=h,this},fillStyle:function(h,f){return f===void 0&&(f=1),this.commandBuffer.push(l.FILL_STYLE,h,f),this},fillGradientStyle:function(h,f,v,m,x,g,y,T){return x===void 0&&(x=1),g===void 0&&(g=x),y===void 0&&(y=x),T===void 0&&(T=x),this.commandBuffer.push(l.GRADIENT_FILL_STYLE,x,g,y,T,h,f,v,m),this},lineGradientStyle:function(h,f,v,m,x,g){return g===void 0&&(g=1),this.commandBuffer.push(l.GRADIENT_LINE_STYLE,h,g,f,v,m,x),this},beginPath:function(){return this.commandBuffer.push(l.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(l.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(l.FILL_PATH),this},fill:function(){return this.commandBuffer.push(l.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(l.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(l.STROKE_PATH),this},fillCircleShape:function(h){return this.fillCircle(h.x,h.y,h.radius)},strokeCircleShape:function(h){return this.strokeCircle(h.x,h.y,h.radius)},fillCircle:function(h,f,v){return this.beginPath(),this.arc(h,f,v,0,i.PI2),this.fillPath(),this},strokeCircle:function(h,f,v){return this.beginPath(),this.arc(h,f,v,0,i.PI2),this.strokePath(),this},fillRectShape:function(h){return this.fillRect(h.x,h.y,h.width,h.height)},strokeRectShape:function(h){return this.strokeRect(h.x,h.y,h.width,h.height)},fillRect:function(h,f,v,m){return this.commandBuffer.push(l.FILL_RECT,h,f,v,m),this},strokeRect:function(h,f,v,m){var x=this._lineWidth/2,g=h-x,y=h+x;return this.beginPath(),this.moveTo(h,f),this.lineTo(h,f+m),this.strokePath(),this.beginPath(),this.moveTo(h+v,f),this.lineTo(h+v,f+m),this.strokePath(),this.beginPath(),this.moveTo(g,f),this.lineTo(y+v,f),this.strokePath(),this.beginPath(),this.moveTo(g,f+m),this.lineTo(y+v,f+m),this.strokePath(),this},fillRoundedRect:function(h,f,v,m,x){x===void 0&&(x=20);var g=x,y=x,T=x,E=x;typeof x!="number"&&(g=s(x,"tl",20),y=s(x,"tr",20),T=s(x,"bl",20),E=s(x,"br",20));var C=g>=0,A=y>=0,P=T>=0,R=E>=0;return g=Math.abs(g),y=Math.abs(y),T=Math.abs(T),E=Math.abs(E),this.beginPath(),this.moveTo(h+g,f),this.lineTo(h+v-y,f),A?this.arc(h+v-y,f+y,y,-i.TAU,0):this.arc(h+v,f,y,Math.PI,i.TAU,!0),this.lineTo(h+v,f+m-E),R?this.arc(h+v-E,f+m-E,E,0,i.TAU):this.arc(h+v,f+m,E,-i.TAU,Math.PI,!0),this.lineTo(h+T,f+m),P?this.arc(h+T,f+m-T,T,i.TAU,Math.PI):this.arc(h,f+m,T,0,-i.TAU,!0),this.lineTo(h,f+g),C?this.arc(h+g,f+g,g,-Math.PI,-i.TAU):this.arc(h,f,g,i.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(h,f,v,m,x){x===void 0&&(x=20);var g=x,y=x,T=x,E=x,C=Math.min(v,m)/2;typeof x!="number"&&(g=s(x,"tl",20),y=s(x,"tr",20),T=s(x,"bl",20),E=s(x,"br",20));var A=g>=0,P=y>=0,R=T>=0,F=E>=0;return g=Math.min(Math.abs(g),C),y=Math.min(Math.abs(y),C),T=Math.min(Math.abs(T),C),E=Math.min(Math.abs(E),C),this.beginPath(),this.moveTo(h+g,f),this.lineTo(h+v-y,f),this.moveTo(h+v-y,f),P?this.arc(h+v-y,f+y,y,-i.TAU,0):this.arc(h+v,f,y,Math.PI,i.TAU,!0),this.lineTo(h+v,f+m-E),this.moveTo(h+v,f+m-E),F?this.arc(h+v-E,f+m-E,E,0,i.TAU):this.arc(h+v,f+m,E,-i.TAU,Math.PI,!0),this.lineTo(h+T,f+m),this.moveTo(h+T,f+m),R?this.arc(h+T,f+m-T,T,i.TAU,Math.PI):this.arc(h,f+m,T,0,-i.TAU,!0),this.lineTo(h,f+g),this.moveTo(h,f+g),A?this.arc(h+g,f+g,g,-Math.PI,-i.TAU):this.arc(h,f,g,i.TAU,0,!0),this.strokePath(),this},fillPointShape:function(h,f){return this.fillPoint(h.x,h.y,f)},fillPoint:function(h,f,v){return!v||v<1?v=1:(h-=v/2,f-=v/2),this.commandBuffer.push(l.FILL_RECT,h,f,v,v),this},fillTriangleShape:function(h){return this.fillTriangle(h.x1,h.y1,h.x2,h.y2,h.x3,h.y3)},strokeTriangleShape:function(h){return this.strokeTriangle(h.x1,h.y1,h.x2,h.y2,h.x3,h.y3)},fillTriangle:function(h,f,v,m,x,g){return this.commandBuffer.push(l.FILL_TRIANGLE,h,f,v,m,x,g),this},strokeTriangle:function(h,f,v,m,x,g){return this.commandBuffer.push(l.STROKE_TRIANGLE,h,f,v,m,x,g),this},strokeLineShape:function(h){return this.lineBetween(h.x1,h.y1,h.x2,h.y2)},lineBetween:function(h,f,v,m){return this.beginPath(),this.moveTo(h,f),this.lineTo(v,m),this.strokePath(),this},lineTo:function(h,f){return this.commandBuffer.push(l.LINE_TO,h,f),this},moveTo:function(h,f){return this.commandBuffer.push(l.MOVE_TO,h,f),this},strokePoints:function(h,f,v,m){f===void 0&&(f=!1),v===void 0&&(v=!1),m===void 0&&(m=h.length),this.beginPath(),this.moveTo(h[0].x,h[0].y);for(var x=1;x-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(h,f,v){var m=this.scene.sys,x=m.game.renderer;f===void 0&&(f=m.scale.width),v===void 0&&(v=m.scale.height),o.TargetCamera.setScene(this.scene),o.TargetCamera.setViewport(0,0,f,v),o.TargetCamera.scrollX=this.x,o.TargetCamera.scrollY=this.y;var g,y,T={willReadFrequently:!0};if(typeof h=="string")if(m.textures.exists(h)){g=m.textures.get(h);var E=g.getSourceImage();E instanceof HTMLCanvasElement&&(y=E.getContext("2d",T))}else g=m.textures.createCanvas(h,f,v),y=g.getSourceImage().getContext("2d",T);else h instanceof HTMLCanvasElement&&(y=h.getContext("2d",T));return y&&(this.renderCanvas(x,this,o.TargetCamera,null,y,!1),g&&g.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});o.TargetCamera=new d,p.exports=o},91543:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36266),c=t(49584),l=function(r,n,e,s,u,i){var a=n.commandBuffer,o=a.length,h=u||r.currentContext;if(!(o===0||!c(r,h,n,e,s))){e.addToRenderList(n);var f=1,v=1,m=0,x=0,g=1,y=0,T=0,E=0;h.beginPath();for(var C=0;C>>16,T=(m&65280)>>>8,E=m&255,h.strokeStyle="rgba("+y+","+T+","+E+","+f+")",h.lineWidth=g,C+=3;break;case d.FILL_STYLE:x=a[C+1],v=a[C+2],y=(x&16711680)>>>16,T=(x&65280)>>>8,E=x&255,h.fillStyle="rgba("+y+","+T+","+E+","+v+")",C+=2;break;case d.BEGIN_PATH:h.beginPath();break;case d.CLOSE_PATH:h.closePath();break;case d.FILL_PATH:i||h.fill();break;case d.STROKE_PATH:i||h.stroke();break;case d.FILL_RECT:i?h.rect(a[C+1],a[C+2],a[C+3],a[C+4]):h.fillRect(a[C+1],a[C+2],a[C+3],a[C+4]),C+=4;break;case d.FILL_TRIANGLE:h.beginPath(),h.moveTo(a[C+1],a[C+2]),h.lineTo(a[C+3],a[C+4]),h.lineTo(a[C+5],a[C+6]),h.closePath(),i||h.fill(),C+=6;break;case d.STROKE_TRIANGLE:h.beginPath(),h.moveTo(a[C+1],a[C+2]),h.lineTo(a[C+3],a[C+4]),h.lineTo(a[C+5],a[C+6]),h.closePath(),i||h.stroke(),C+=6;break;case d.LINE_TO:h.lineTo(a[C+1],a[C+2]),C+=2;break;case d.MOVE_TO:h.moveTo(a[C+1],a[C+2]),C+=2;break;case d.LINE_FX_TO:h.lineTo(a[C+1],a[C+2]),C+=5;break;case d.MOVE_FX_TO:h.moveTo(a[C+1],a[C+2]),C+=5;break;case d.SAVE:h.save();break;case d.RESTORE:h.restore();break;case d.TRANSLATE:h.translate(a[C+1],a[C+2]),C+=2;break;case d.SCALE:h.scale(a[C+1],a[C+2]),C+=2;break;case d.ROTATE:h.rotate(a[C+1]),C+=1;break;case d.GRADIENT_FILL_STYLE:C+=5;break;case d.GRADIENT_LINE_STYLE:C+=6;break}}h.restore()}};p.exports=l},41286:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(99325),c=t(33182);d.register("graphics",function(l,r){l===void 0&&(l={}),r!==void 0&&(l.add=r);var n=new c(this.scene,l);return l.add&&this.scene.sys.displayList.add(n),n})},13122:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(33182),c=t(61286);c.register("graphics",function(l){return this.displayList.add(new d(this.scene,l))})},60898:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(34429),l=t(91543),l=t(91543),p.exports={renderWebGL:c,renderCanvas:l}},34429:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(36266),c=t(73329),l=t(69360),r=t(75512),n=function(a,o,h){this.x=a,this.y=o,this.width=h},e=function(a,o,h){this.points=[],this.pointsLength=1,this.points[0]=new n(a,o,h)},s=[],u=new l,i=function(a,o,h,f){if(o.commandBuffer.length!==0){h.addToRenderList(o);var v=a.pipelines.set(o.pipeline,o);a.pipelines.preBatch(o);for(var m=c(o,h,f).calc,x=u.loadIdentity(),g=o.commandBuffer,y=h.alpha*o.alpha,T=1,E=v.fillTint,C=v.strokeTint,A=0,P=0,R=0,F=.01,L=Math.PI*2,B,N=[],U=0,z=!0,w=null,I=r.getTintAppendFloatAlpha,M=0;M0&&(Q=-L+Q%L):Q>L?Q=L:Q<0&&(Q=L+Q%L),w===null&&(w=new e($+Math.cos(et)*it,tt+Math.sin(et)*it,T),N.push(w),Z+=F);Z<1+k;)R=Q*Z+et,A=$+Math.cos(R)*it,P=tt+Math.sin(R)*it,w.points.push(new n(A,P,T)),Z+=F;R=Q+et,A=$+Math.cos(R)*it,P=tt+Math.sin(R)*it,w.points.push(new n(A,P,T));break}case d.FILL_RECT:{v.batchFillRect(g[++M],g[++M],g[++M],g[++M],x,m);break}case d.FILL_TRIANGLE:{v.batchFillTriangle(g[++M],g[++M],g[++M],g[++M],g[++M],g[++M],x,m);break}case d.STROKE_TRIANGLE:{v.batchStrokeTriangle(g[++M],g[++M],g[++M],g[++M],g[++M],g[++M],T,x,m);break}case d.LINE_TO:{w!==null?w.points.push(new n(g[++M],g[++M],T)):(w=new e(g[++M],g[++M],T),N.push(w));break}case d.MOVE_TO:{w=new e(g[++M],g[++M],T),N.push(w);break}case d.SAVE:{s.push(x.copyToArray());break}case d.RESTORE:{x.copyFromArray(s.pop());break}case d.TRANSLATE:{$=g[++M],tt=g[++M],x.translate($,tt);break}case d.SCALE:{$=g[++M],tt=g[++M],x.scale($,tt);break}case d.ROTATE:{x.rotate(g[++M]);break}}a.pipelines.postBatch(o)}};p.exports=i},59192:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83979),c=t(56694),l=t(56631),r=t(6659),n=t(71608),e=t(72632),s=t(10850),u=t(19256),i=t(42911),a=t(75757),o=t(58403),h=t(13747),f=new c({Extends:r,initialize:function(m,x,g){r.call(this),g?x&&!Array.isArray(x)&&(x=[x]):Array.isArray(x)?i(x[0])&&(g=x,x=null):i(x)&&(g=x,x=null),this.scene=m,this.children=new o,this.isParent=!0,this.type="Group",this.classType=e(g,"classType",h),this.name=e(g,"name",""),this.active=e(g,"active",!0),this.maxSize=e(g,"maxSize",-1),this.defaultKey=e(g,"defaultKey",null),this.defaultFrame=e(g,"defaultFrame",null),this.runChildUpdate=e(g,"runChildUpdate",!1),this.createCallback=e(g,"createCallback",null),this.removeCallback=e(g,"removeCallback",null),this.createMultipleCallback=e(g,"createMultipleCallback",null),this.internalCreateCallback=e(g,"internalCreateCallback",null),this.internalRemoveCallback=e(g,"internalRemoveCallback",null),x&&this.addMultiple(x),g&&this.createMultiple(g),this.on(l.ADDED_TO_SCENE,this.addedToScene,this),this.on(l.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(v,m,x,g,y,T){if(v===void 0&&(v=0),m===void 0&&(m=0),x===void 0&&(x=this.defaultKey),g===void 0&&(g=this.defaultFrame),y===void 0&&(y=!0),T===void 0&&(T=!0),this.isFull())return null;var E=new this.classType(this.scene,v,m,x,g);return E.addToDisplayList(this.scene.sys.displayList),E.addToUpdateList(),E.visible=y,E.setActive(T),this.add(E),E},createMultiple:function(v){if(this.isFull())return[];Array.isArray(v)||(v=[v]);var m=[];if(v[0].key)for(var x=0;x=0;R--)if(P=L[R],P.active===x){if(F++,F===m)break}else P=null;return P?(typeof y=="number"&&(P.x=y),typeof T=="number"&&(P.y=T),P):g?this.create(y,T,E,C,A):null},get:function(v,m,x,g,y){return this.getFirst(!1,!0,v,m,x,g,y)},getFirstAlive:function(v,m,x,g,y,T){return this.getFirst(!0,v,m,x,g,y,T)},getFirstDead:function(v,m,x,g,y,T){return this.getFirst(!1,v,m,x,g,y,T)},playAnimation:function(v,m){return d.PlayAnimation(this.children.entries,v,m),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(v){v===void 0&&(v=!0);for(var m=0,x=0;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(99325),c=t(59192);d.register("group",function(l){return new c(this.scene,null,l)})},62598:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(59192),c=t(61286);c.register("group",function(l,r){return this.updateList.add(new d(this.scene,l,r))})},1539:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(64937),l=t(89980),r=t(57322),n=new d({Extends:l,Mixins:[c.Alpha,c.BlendMode,c.Depth,c.Flip,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Size,c.TextureCrop,c.Tint,c.Transform,c.Visible,r],initialize:function(s,u,i,a,o){l.call(this,s,"Image"),this._crop=this.resetCropObject(),this.setTexture(a,o),this.setPosition(u,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=n},57786:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){c.addToRenderList(d),t.batchSprite(d,d.frame,c,l)};p.exports=S},83556:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(99325),l=t(20494),r=t(1539);c.register("image",function(n,e){n===void 0&&(n={});var s=l(n,"key",null),u=l(n,"frame",null),i=new r(this.scene,0,0,s,u);return e!==void 0&&(n.add=e),d(this.scene,i,n),i})},20927:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(1539),c=t(61286);c.register("image",function(l,r,n,e){return this.displayList.add(new d(this.scene,l,r,n,e))})},57322:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(59390),l=t(57786),p.exports={renderWebGL:c,renderCanvas:l}},59390:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){c.addToRenderList(d),this.pipeline.batchSprite(d,c,l)};p.exports=S},48013:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={Events:t(56631),DisplayList:t(91713),GameObjectCreator:t(99325),GameObjectFactory:t(61286),UpdateList:t(92034),Components:t(64937),GetCalcMatrix:t(73329),BuildGameObject:t(88933),BuildGameObjectAnimation:t(32291),GameObject:t(89980),BitmapText:t(44616),Blitter:t(52816),Bob:t(41664),Container:t(70339),DOMElement:t(38943),DynamicBitmapText:t(13468),Extern:t(39419),Graphics:t(33182),Group:t(59192),Image:t(1539),Layer:t(85305),Particles:t(27684),PathFollower:t(29598),RenderTexture:t(15996),RetroFont:t(55873),Rope:t(79968),Sprite:t(13747),Text:t(76555),GetTextSize:t(32979),MeasureText:t(27030),TextStyle:t(74744),TileSprite:t(35856),Zone:t(71030),Video:t(8630),Shape:t(91461),Arc:t(28593),Curve:t(15220),Ellipse:t(28591),Grid:t(39169),IsoBox:t(4415),IsoTriangle:t(65159),Line:t(579),Polygon:t(91249),Rectangle:t(517),Star:t(77843),Triangle:t(21873),Factories:{Blitter:t(38906),Container:t(23400),DOMElement:t(66788),DynamicBitmapText:t(94145),Extern:t(41155),Graphics:t(13122),Group:t(62598),Image:t(20927),Layer:t(17676),Particles:t(81212),PathFollower:t(19626),RenderTexture:t(29599),Rope:t(31982),Sprite:t(66135),StaticBitmapText:t(21797),Text:t(94627),TileSprite:t(20509),Zone:t(34546),Video:t(215),Arc:t(10369),Curve:t(10147),Ellipse:t(99869),Grid:t(9326),IsoBox:t(88154),IsoTriangle:t(67765),Line:t(85665),Polygon:t(88203),Rectangle:t(94355),Star:t(23962),Triangle:t(79296)},Creators:{Blitter:t(68452),Container:t(44516),DynamicBitmapText:t(67513),Graphics:t(41286),Group:t(61295),Image:t(83556),Layer:t(56378),Particles:t(765),RenderTexture:t(85692),Rope:t(96027),Sprite:t(89219),StaticBitmapText:t(95499),Text:t(75397),TileSprite:t(63950),Zone:t(24067),Video:t(65601)}};d.Shader=t(27902),d.Mesh=t(83321),d.NineSlice=t(44139),d.PointLight=t(13171),d.Plane=t(33412),d.Factories.Shader=t(51979),d.Factories.Mesh=t(8767),d.Factories.NineSlice=t(53778),d.Factories.PointLight=t(91201),d.Factories.Plane=t(58322),d.Creators.Shader=t(13908),d.Creators.Mesh=t(41839),d.Creators.NineSlice=t(40964),d.Creators.PointLight=t(162),d.Creators.Plane=t(10912),d.Light=t(14455),d.LightsManager=t(26193),d.LightsPlugin=t(50296),p.exports=d},85305:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95723),c=t(56694),l=t(64937),r=t(48129),n=t(81078),e=t(6659),s=t(56631),u=t(71207),i=t(47427),a=t(58010),o=t(7599),h=t(17922),f=new c({Extends:u,Mixins:[l.AlphaSingle,l.BlendMode,l.Depth,l.Mask,l.PostPipeline,l.Visible,e,a],initialize:function(m,x){u.call(this,m),e.call(this),this.scene=m,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=m.sys,this.events=m.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(d.SKIP_CHECK),x&&this.add(x),m.sys.queueDepthSort()},setActive:function(v){return this.active=v,this},setName:function(v){return this.name=v,this},setState:function(v){return this.state=v,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(v,m){return this.data||(this.data=new n(this)),this.data.set(v,m),this},incData:function(v,m){return this.data||(this.data=new n(this)),this.data.inc(v,m),this},toggleData:function(v){return this.data||(this.data=new n(this)),this.data.toggle(v),this},getData:function(v){return this.data||(this.data=new n(this)),this.data.get(v)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},add:function(v){return u.prototype.add.call(this,v),this},remove:function(v,m){var x=u.prototype.remove.call(this,v);if(m&&x){Array.isArray(x)||(x=[x]);for(var g=0;g{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=d.list;if(l.length!==0){d.depthSort();var r=d.blendMode!==-1;r||t.setBlendMode(0);var n=d._alpha;d.mask&&d.mask.preRenderCanvas(t,null,c);for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(85305),l=t(99325),r=t(20494);l.register("layer",function(n,e){n===void 0&&(n={});var s=r(n,"children",null),u=new c(this.scene,s);return e!==void 0&&(n.add=e),d(this.scene,u,n),u})},17676:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(85305),c=t(61286);c.register("layer",function(l){return this.displayList.add(new d(this.scene,l))})},58010:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(17576),l=t(834),p.exports={renderWebGL:c,renderCanvas:l}},17576:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=d.list,r=l.length;if(r!==0){d.depthSort(),t.pipelines.preBatch(d);var n=d.blendMode!==-1;n||t.setBlendMode(0);for(var e=d.alpha,s=0;s{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26673),c=t(56694),l=t(64937),r=t(39298),n=t(75512),e=new c({Extends:d,Mixins:[l.Origin,l.ScrollFactor,l.Transform,l.Visible],initialize:function(u,i,a,o,h,f,v){d.call(this,u,i,a),this.color=new r(o,h,f),this.intensity=v,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(a)},displayWidth:{get:function(){return this.diameter},set:function(s){this.diameter=s}},displayHeight:{get:function(){return this.diameter},set:function(s){this.diameter=s}},width:{get:function(){return this.diameter},set:function(s){this.diameter=s}},height:{get:function(){return this.diameter},set:function(s){this.diameter=s}},willRender:function(s){return!(e.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&s.id)},setColor:function(s){var u=n.getFloatsFromUintRGB(s);return this.color.set(u[0],u[1],u[2]),this},setIntensity:function(s){return this.intensity=s,this},setRadius:function(s){return this.radius=s,this}});e.RENDER_MASK=15,p.exports=e},26193:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26535),c=t(56694),l=t(53996),r=t(14455),n=t(13171),e=t(39298),s=t(72677),u=t(17922),i=t(75512),a=new c({initialize:function(){this.lights=[],this.ambientColor=new e(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(o,h,f,v,m,x){return this.systems.displayList.add(new n(this.scene,o,h,f,v,m,x))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(o){for(var h=this.lights,f=o.worldView,v=[],m=0;mthis.maxLights&&(u(v,this.sortByDistance),v=v.slice(0,this.maxLights)),this.visibleLights=v.length,v},sortByDistance:function(o,h){return o.distance>=h.distance},setAmbientColor:function(o){var h=i.getFloatsFromUintRGB(o);return this.ambientColor.set(h[0],h[1],h[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(o,h,f,v,m){o===void 0&&(o=0),h===void 0&&(h=0),f===void 0&&(f=128),v===void 0&&(v=16777215),m===void 0&&(m=1);var x=i.getFloatsFromUintRGB(v),g=new r(o,h,f,x[0],x[1],x[2],m);return this.lights.push(g),g},removeLight:function(o){var h=this.lights.indexOf(o);return h>=0&&s(this.lights,h),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});p.exports=a},50296:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(26193),l=t(91963),r=t(7599),n=new d({Extends:c,initialize:function(s){this.scene=s,this.systems=s.sys,s.sys.settings.isBooted||s.sys.events.once(r.BOOT,this.boot,this),c.call(this)},boot:function(){var e=this.systems.events;e.on(r.SHUTDOWN,this.shutdown,this),e.on(r.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});l.register("LightsPlugin",n,"lights"),p.exports=n},83321:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(64937),l=t(75606),r=t(18693),n=t(89980),e=t(53267),s=t(67623),u=t(73329),i=t(16650),a=t(23464),o=t(23701),h=t(17922),f=t(70015),v=t(85769),m=new d({Extends:n,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Size,c.Texture,c.Transform,c.Visible,a],initialize:function(g,y,T,E,C,A,P,R,F,L,B,N){y===void 0&&(y=0),T===void 0&&(T=0),E===void 0&&(E="__WHITE"),n.call(this,g,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new f,this.modelScale=new f(1,1,1),this.modelRotation=new f,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new i,this.viewPosition=new f,this.viewMatrix=new i,this.projectionMatrix=new i,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var U=g.sys.renderer;this.setPosition(y,T),this.setTexture(E,C),this.setSize(U.width,U.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(U.width,U.height),A&&this.addVertices(A,P,R,F,L,B,N)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(x){return this.viewPosition.addScale(f.LEFT,x),this.dirtyCache[10]=1,this},panY:function(x){return this.viewPosition.y+=f.DOWN.y*x,this.dirtyCache[10]=1,this},panZ:function(x){return this.viewPosition.z+=x,this.dirtyCache[10]=1,this},setPerspective:function(x,g,y,T,E){return y===void 0&&(y=45),T===void 0&&(T=.01),E===void 0&&(E=1e3),this.fov=y,this.projectionMatrix.perspective(l(y),x/g,T,E),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(x,g,y,T){return x===void 0&&(x=this.scene.sys.renderer.getAspectRatio()),g===void 0&&(g=1),y===void 0&&(y=-1e3),T===void 0&&(T=1e3),this.fov=0,this.projectionMatrix.ortho(-x,x,-g,g,y,T),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(x){x.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(x,g,y,T,E,C,A,P,R){var F=this.scene.sys.cache.obj.get(x),L;return F&&(L=e(F,this,g,y,T,E,C,A,P,R)),(!L||L.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",x),this},sortByDepth:function(x,g){return x.depth-g.depth},depthSort:function(){return h(this.faces,this.sortByDepth),this},addVertex:function(x,g,y,T,E,C,A){var P=new v(x,g,y,T,E,C,A);return this.vertices.push(P),P},addFace:function(x,g,y){var T=new r(x,g,y);return this.faces.push(T),this.dirtyCache[9]=-1,T},addVertices:function(x,g,y,T,E,C,A){var P=s(x,g,y,T,E,C,A);return P?(this.faces=this.faces.concat(P.faces),this.vertices=this.vertices.concat(P.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(x){return this.faces[x]},hasFaceAt:function(x,g,y){y===void 0&&(y=this.scene.sys.cameras.main);for(var T=u(this,y).calc,E=this.faces,C=0;C{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(){};p.exports=S},41839:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(99325),l=t(20494),r=t(10850),n=t(83321);c.register("mesh",function(e,s){e===void 0&&(e={});var u=l(e,"key",null),i=l(e,"frame",null),a=r(e,"vertices",[]),o=r(e,"uvs",[]),h=r(e,"indicies",[]),f=r(e,"containsZ",!1),v=r(e,"normals",[]),m=r(e,"colors",16777215),x=r(e,"alphas",1),g=new n(this.scene,0,0,u,i,a,o,h,f,v,m,x);return s!==void 0&&(e.add=s),d(this.scene,g,e),g})},8767:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83321),c=t(61286);c.register("mesh",function(l,r,n,e,s,u,i,a,o,h,f){return this.displayList.add(new d(this.scene,l,r,n,e,s,u,i,a,o,h,f))})},23464:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(57410),l=t(6317),p.exports={renderWebGL:c,renderCanvas:l}},57410:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=function(l,r,n,e){var s=r.faces,u=s.length;if(u!==0){n.addToRenderList(r);var i=l.pipelines.set(r.pipeline,r),a=d(r,n,e).calc;l.pipelines.preBatch(r);for(var o=i.setGameObject(r),h=i.vertexViewF32,f=i.vertexViewU32,v=i.vertexCount*i.currentShader.vertexComponentCount-1,m=r.tintFill,x=[],g=r.debugCallback,y=a.a,T=a.b,E=a.c,C=a.d,A=a.e,P=a.f,R=r.viewPosition.z,F=r.hideCCW,L=n.roundPixels,B=n.alpha*r.alpha,N=0,U=0;U{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(64937),l=t(89980),r=t(94456),n=t(85769),e=new d({Extends:l,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Texture,c.Transform,c.Visible,r],initialize:function(u,i,a,o,h,f,v,m,x,g,y){l.call(this,u,"NineSlice"),this._width,this._height,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth,this.rightWidth,this.topHeight,this.bottomHeight,this.tint=16777215,this.tintFill=!1;var T=u.textures.getFrame(o,h);this.is3Slice=!g&&!y,T.scale9&&(this.is3Slice=T.is3Slice);for(var E=this.is3Slice?18:54,C=0;C{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(99325),l=t(20494),r=t(10850),n=t(44139);c.register("nineslice",function(e,s){e===void 0&&(e={});var u=l(e,"key",null),i=l(e,"frame",null),a=r(e,"width",256),o=r(e,"height",256),h=r(e,"leftWidth",10),f=r(e,"rightWidth",10),v=r(e,"topHeight",0),m=r(e,"bottomHeight",0),x=new n(this.scene,0,0,u,i,a,o,h,f,v,m);return s!==void 0&&(e.add=s),d(this.scene,x,e),x})},53778:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(44139),c=t(61286);c.register("nineslice",function(l,r,n,e,s,u,i,a,o,h){return this.displayList.add(new d(this.scene,l,r,n,e,s,u,i,a,o,h))})},94456:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(27420),p.exports={renderWebGL:c,renderCanvas:l}},27420:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=t(75512),l=function(r,n,e,s){var u=n.vertices,i=u.length;if(i!==0){e.addToRenderList(n);var a=r.pipelines.set(n.pipeline,n),o=d(n,e,s,!1).calc;r.pipelines.preBatch(n);var h=a.setGameObject(n),f=a.vertexViewF32,v=a.vertexViewU32,m=a.vertexCount*a.currentShader.vertexComponentCount-1,x=e.roundPixels,g=n.tintFill,y=e.alpha*n.alpha,T=c.getTintAppendFloatAlpha(n.tint,y),E=a.vertexAvailable(),C=-1;E{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(93025),l=t(22946),r=t(21902),n=t(4840),e=t(15978),s=new d({Extends:c,initialize:function(i){c.call(this,i,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return this.propertyValue===null?0:9},setMethods:function(){var u=this.propertyValue,i=u,a=this.defaultEmit,o=this.defaultUpdate;if(this.method===9){this.start=u[0],this.ease=r("Linear"),this.interpolation=n("linear"),a=this.easedValueEmit,o=this.easeValueUpdate,i=u[0],this.active=!0;for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(17489),c=t(82897),l=t(56694),r=t(61616),n=t(21902),e=t(72632),s=t(4840),u=t(88462),i=t(1071),a=new l({initialize:function(h,f,v){v===void 0&&(v=!1),this.propertyKey=h,this.propertyValue=f,this.defaultValue=f,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=v,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(o,h){o===void 0&&(o={}),h&&(this.propertyKey=h),this.propertyValue=e(o,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(o){var h;switch(this.method){case 1:case 3:case 8:h=o;break;case 2:this.propertyValue.indexOf(o)>=0&&(h=o);break;case 4:var f=(this.end-this.start)/this.steps;h=u(o,f),this.counter=h;break;case 5:case 6:case 7:h=c(o,this.start,this.end);break;case 9:h=this.start[0];break}return this.current=h,this},getMethod:function(){var o=this.propertyValue;if(o===null)return 0;var h=typeof o;if(h==="number")return 1;if(Array.isArray(o))return 2;if(h==="function")return 3;if(h==="object"){if(this.hasBoth(o,"start","end"))return this.has(o,"steps")?4:5;if(this.hasBoth(o,"min","max"))return 6;if(this.has(o,"random"))return 7;if(this.hasEither(o,"onEmit","onUpdate"))return 8;if(this.hasEither(o,"values","interpolation"))return 9}return 0},setMethods:function(){var o=this.propertyValue,h=o,f=this.defaultEmit,v=this.defaultUpdate;switch(this.method){case 1:f=this.staticValueEmit;break;case 2:f=this.randomStaticValueEmit,h=o[0];break;case 3:this._onEmit=o,f=this.proxyEmit;break;case 4:this.start=o.start,this.end=o.end,this.steps=o.steps,this.counter=this.start,this.yoyo=this.has(o,"yoyo")?o.yoyo:!1,this.direction=0,f=this.steppedEmit,h=this.start;break;case 5:this.start=o.start,this.end=o.end;var m=this.has(o,"ease")?o.ease:"Linear";this.ease=n(m,o.easeParams),f=this.has(o,"random")&&o.random?this.randomRangedValueEmit:this.easedValueEmit,v=this.easeValueUpdate,h=this.start;break;case 6:this.start=o.min,this.end=o.max,f=this.has(o,"int")&&o.int?this.randomRangedIntEmit:this.randomRangedValueEmit,h=this.start;break;case 7:var x=o.random;Array.isArray(x)&&(this.start=x[0],this.end=x[1]),f=this.randomRangedIntEmit,h=this.start;break;case 8:this._onEmit=this.has(o,"onEmit")?o.onEmit:this.defaultEmit,this._onUpdate=this.has(o,"onUpdate")?o.onUpdate:this.defaultUpdate,f=this.proxyEmit,v=this.proxyUpdate;break;case 9:this.start=o.values;var g=this.has(o,"ease")?o.ease:"Linear";this.ease=n(g,o.easeParams),this.interpolation=s(o.interpolation),f=this.easedValueEmit,v=this.easeValueUpdate,h=this.start[0];break}return this.onEmit=f,this.onUpdate=v,this.current=h,this},has:function(o,h){return o.hasOwnProperty(h)},hasBoth:function(o,h,f){return o.hasOwnProperty(h)&&o.hasOwnProperty(f)},hasEither:function(o,h,f){return o.hasOwnProperty(h)||o.hasOwnProperty(f)},defaultEmit:function(o,h,f){return f},defaultUpdate:function(o,h,f,v){return v},proxyEmit:function(o,h,f){var v=this._onEmit(o,h,f);return this.current=v,v},proxyUpdate:function(o,h,f,v){var m=this._onUpdate(o,h,f,v);return this.current=m,m},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var o=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[o],this.current},randomRangedValueEmit:function(o,h){var f=r(this.start,this.end);return o&&o.data[h]&&(o.data[h].min=f,o.data[h].max=this.end),this.current=f,f},randomRangedIntEmit:function(o,h){var f=d(this.start,this.end);return o&&o.data[h]&&(o.data[h].min=f,o.data[h].max=this.end),this.current=f,f},steppedEmit:function(){var o=this.counter,h=o,f=(this.end-this.start)/this.steps;if(this.yoyo){var v;this.direction===0?(h+=f,h>=this.end&&(v=h-this.end,h=this.end-v,this.direction=1)):(h-=f,h<=this.start&&(v=this.start-h,h=this.start+v,this.direction=0)),this.counter=h}else this.counter=i(h+f,this.start,this.end);return this.current=o,o},easedValueEmit:function(o,h){if(o&&o.data[h]){var f=o.data[h];f.min=this.start,f.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(o,h,f){var v=o.data[h],m,x=this.ease(f);return this.interpolation?m=this.interpolation(this.start,x):m=(v.max-v.min)*x+v.min,this.current=m,m},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});p.exports=a},87811:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72632),l=t(30891),r=new d({Extends:l,initialize:function(e,s,u,i,a){if(typeof e=="object"){var o=e;e=c(o,"x",0),s=c(o,"y",0),u=c(o,"power",0),i=c(o,"epsilon",100),a=c(o,"gravity",50)}else e===void 0&&(e=0),s===void 0&&(s=0),u===void 0&&(u=0),i===void 0&&(i=100),a===void 0&&(a=50);l.call(this,e,s,!0),this._gravity=a,this._power=u*a,this._epsilon=i*i},update:function(n,e){var s=this.x-n.x,u=this.y-n.y,i=s*s+u*u;if(i!==0){var a=Math.sqrt(i);i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16569),c=t(82897),l=t(56694),r=t(75606),n=t(74118),e=t(2386),s=t(93736),u=new l({initialize:function(a){this.emitter=a,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new s,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=a.scene,this.anims=new d(this),this.bounds=new n},emit:function(i,a,o,h,f,v){return this.emitter.emit(i,a,o,h,f,v)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(i,a){i===void 0&&(i=0),a===void 0&&(a=0),this.x=i,this.y=a},fire:function(i,a){var o=this.emitter,h=o.ops,f=o.getAnim();if(f?this.anims.play(f):(this.frame=o.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(o.getEmitZone(this),i===void 0?this.x+=h.x.onEmit(this,"x"):h.x.steps>0?this.x+=i+h.x.onEmit(this,"x"):this.x+=i,a===void 0?this.y+=h.y.onEmit(this,"y"):h.y.steps>0?this.y+=a+h.y.onEmit(this,"y"):this.y+=a,this.life=h.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=h.delay.onEmit(this,"delay"),this.holdCurrent=h.hold.onEmit(this,"hold"),this.scaleX=h.scaleX.onEmit(this,"scaleX"),this.scaleY=h.scaleY.active?h.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=h.rotate.onEmit(this,"rotate"),this.rotation=r(this.angle),o.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&o.getDeathZone(this))return this.lifeCurrent=0,!1;var v=h.speedX.onEmit(this,"speedX"),m=h.speedY.active?h.speedY.onEmit(this,"speedY"):v;if(o.radial){var x=r(h.angle.onEmit(this,"angle"));this.velocityX=Math.cos(x)*Math.abs(v),this.velocityY=Math.sin(x)*Math.abs(m)}else if(o.moveTo){var g=h.moveToX.onEmit(this,"moveToX"),y=h.moveToY.onEmit(this,"moveToY"),T=this.life/1e3;this.velocityX=(g-this.x)/T,this.velocityY=(y-this.y)/T}else this.velocityX=v,this.velocityY=m;return o.acceleration&&(this.accelerationX=h.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=h.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=h.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=h.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=h.bounce.onEmit(this,"bounce"),this.alpha=h.alpha.onEmit(this,"alpha"),h.color.active?this.tint=h.color.onEmit(this,"tint"):this.tint=h.tint.onEmit(this,"tint"),!0},update:function(i,a,o){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=i,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=i,!1;this.anims.update(0,i);var h=this.emitter,f=h.ops,v=1-this.lifeCurrent/this.life;if(this.lifeT=v,this.x=f.x.onUpdate(this,"x",v,this.x),this.y=f.y.onUpdate(this,"y",v,this.y),h.moveTo){var m=f.moveToX.onUpdate(this,"moveToX",v,h.moveToX),x=f.moveToY.onUpdate(this,"moveToY",v,h.moveToY),g=this.lifeCurrent/1e3;this.velocityX=(m-this.x)/g,this.velocityY=(x-this.y)/g}return this.computeVelocity(h,i,a,o,v),this.scaleX=f.scaleX.onUpdate(this,"scaleX",v,this.scaleX),f.scaleY.active?this.scaleY=f.scaleY.onUpdate(this,"scaleY",v,this.scaleY):this.scaleY=this.scaleX,this.angle=f.rotate.onUpdate(this,"rotate",v,this.angle),this.rotation=r(this.angle),h.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=c(f.alpha.onUpdate(this,"alpha",v,this.alpha),0,1),f.color.active?this.tint=f.color.onUpdate(this,"color",v,this.tint):this.tint=f.tint.onUpdate(this,"tint",v,this.tint),this.lifeCurrent-=i,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(i,a,o,h,f){var v=i.ops,m=this.velocityX,x=this.velocityY,g=v.accelerationX.onUpdate(this,"accelerationX",f,this.accelerationX),y=v.accelerationY.onUpdate(this,"accelerationY",f,this.accelerationY),T=v.maxVelocityX.onUpdate(this,"maxVelocityX",f,this.maxVelocityX),E=v.maxVelocityY.onUpdate(this,"maxVelocityY",f,this.maxVelocityY);this.bounce=v.bounce.onUpdate(this,"bounce",f,this.bounce),m+=i.gravityX*o+g*o,x+=i.gravityY*o+y*o,m=c(m,-T,T),x=c(x,-E,E),this.velocityX=m,this.velocityY=x,this.x+=m*o,this.y+=x*o,i.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var C=0;C{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(30891),l=t(74118),r=new d({Extends:c,initialize:function(e,s,u,i,a,o,h,f){a===void 0&&(a=!0),o===void 0&&(o=!0),h===void 0&&(h=!0),f===void 0&&(f=!0),c.call(this,e,s,!0),this.bounds=new l(e,s,u,i),this.collideLeft=a,this.collideRight=o,this.collideTop=h,this.collideBottom=f},update:function(n){var e=this.bounds,s=-n.bounce,u=n.worldPosition;u.xe.right&&this.collideRight&&(n.x-=u.x-e.right,n.velocityX*=s),u.ye.bottom&&this.collideBottom&&(n.y-=u.y-e.bottom,n.velocityY*=s)}});p.exports=r},9216:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(64937),l=t(48129),r=t(29538),n=t(69361),e=t(54213),s=t(19737),u=t(93025),i=t(40629),a=t(89980),o=t(72632),h=t(72861),f=t(87811),v=t(53523),m=t(19256),x=t(7782),g=t(71207),y=t(14655),T=t(14909),E=t(68433),C=t(74118),A=t(90205),P=t(66458),R=t(69116),F=t(17922),L=t(69360),B=t(93736),N=t(1071),U=t(73106),z=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],w=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],I=new d({Extends:a,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Texture,c.Transform,c.Visible,R],initialize:function(O,D,G,X,V){a.call(this,O,"ParticleEmitter"),this.particleClass=T,this.ops={accelerationX:new u("accelerationX",0),accelerationY:new u("accelerationY",0),alpha:new u("alpha",1),angle:new u("angle",{min:0,max:360},!0),bounce:new u("bounce",0),color:new s("color"),delay:new u("delay",0,!0),hold:new u("hold",0,!0),lifespan:new u("lifespan",1e3,!0),maxVelocityX:new u("maxVelocityX",1e4),maxVelocityY:new u("maxVelocityY",1e4),moveToX:new u("moveToX",0),moveToY:new u("moveToY",0),quantity:new u("quantity",1,!0),rotate:new u("rotate",0),scaleX:new u("scaleX",1),scaleY:new u("scaleY",1),speedX:new u("speedX",0,!0),speedY:new u("speedY",0,!0),tint:new u("tint",16777215),x:new u("x",0),y:new u("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.follow=null,this.followOffset=new B,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this.skipping=!1,this.worldMatrix=new L,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new g(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(D,G),this.setTexture(X),V&&this.setConfig(V)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(M){if(!M)return this;var O=0,D="",G=this.ops;for(O=0;O=this.animQuantity&&(this.animCounter=0,this.currentAnim=N(this.currentAnim+1,0,O)),D},setAnim:function(M,O,D){O===void 0&&(O=!0),D===void 0&&(D=1),this.randomAnim=O,this.animQuantity=D,this.currentAnim=0;var G=typeof M;if(this.anims.length=0,Array.isArray(M))this.anims=this.anims.concat(M);else if(G==="string")this.anims.push(M);else if(G==="object"){var X=M;M=o(X,"anims",null),M&&(this.anims=this.anims.concat(M));var V=o(X,"cycle",!1);this.randomAnim=!V,this.animQuantity=o(X,"quantity",D)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(M){return M===void 0&&(M=!0),this.radial=M,this},addParticleBounds:function(M,O,D,G,X,V,Y,W){if(typeof M=="object"){var H=M;M=H.x,O=H.y,D=m(H,"w")?H.w:H.width,G=m(H,"h")?H.h:H.height}return this.addParticleProcessor(new U(M,O,D,G,X,V,Y,W))},setParticleSpeed:function(M,O){return O===void 0&&(O=M),this.ops.speedX.onChange(M),M===O?this.ops.speedY.active=!1:this.ops.speedY.onChange(O),this.radial=!0,this},setParticleScale:function(M,O){return M===void 0&&(M=1),O===void 0&&(O=M),this.ops.scaleX.onChange(M),this.ops.scaleY.onChange(O),this},setParticleGravity:function(M,O){return this.gravityX=M,this.gravityY=O,this},setParticleAlpha:function(M){return this.ops.alpha.onChange(M),this},setParticleTint:function(M){return this.ops.tint.onChange(M),this},setEmitterAngle:function(M){return this.ops.angle.onChange(M),this},setParticleLifespan:function(M){return this.ops.lifespan.onChange(M),this},setQuantity:function(M){return this.quantity=M,this},setFrequency:function(M,O){return this.frequency=M,this.flowCounter=M>0?M:0,O&&(this.quantity=O),this},addDeathZone:function(M){Array.isArray(M)||(M=[M]);for(var O,D=[],G=0;G-1&&(this.zoneTotal++,this.zoneTotal===G.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===D&&(this.zoneIndex=0)))}},getDeathZone:function(M){for(var O=this.deathZones,D=0;D=0&&(this.zoneIndex=O),this},addParticleProcessor:function(M){return this.processors.exists(M)||(M.emitter&&M.emitter.removeParticleProcessor(M),this.processors.add(M),M.emitter=this),M},removeParticleProcessor:function(M){return this.processors.exists(M)&&(this.processors.remove(M,!0),M.emitter=null),M},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(M){return this.addParticleProcessor(new f(M))},reserve:function(M){var O=this.dead;if(this.maxParticles>0){var D=this.getParticleCount();D+M>this.maxParticles&&(M=this.maxParticles-(D+M))}for(var G=0;G0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(M,O){return M===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof M=="function"&&(this.emitCallback=M,O&&(this.emitCallbackScope=O)),this},onParticleDeath:function(M,O){return M===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof M=="function"&&(this.deathCallback=M,O&&(this.deathCallbackScope=O)),this},killAll:function(){for(var M=this.dead,O=this.alive;O.length>0;)M.push(O.pop());return this},forEachAlive:function(M,O){for(var D=this.alive,G=D.length,X=0;X0&&this.fastForward(M),this.emitting=!0,this.resetCounters(this.frequency,!0),O!==void 0&&(this.duration=Math.abs(O)),this.emit(i.START,this)),this},stop:function(M){return M===void 0&&(M=!1),this.emitting&&(this.emitting=!1,M&&this.killAll(),this.emit(i.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(M,O){return M===void 0&&(M=""),O===void 0&&(O=this.true),this.sortProperty=M,this.sortOrderAsc=O,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(M){return this.sortProperty!==""?M=this.depthSortCallback:M=null,this.sortCallback=M,this},depthSort:function(){return F(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(M,O){var D=this.sortProperty;return this.sortOrderAsc?M[D]-O[D]:O[D]-M[D]},flow:function(M,O,D){return O===void 0&&(O=1),this.emitting=!1,this.frequency=M,this.quantity=O,D!==void 0&&(this.stopAfter=D),this.start()},explode:function(M,O,D){this.frequency=-1,this.resetCounters(-1,!0);var G=this.emitParticle(M,O,D);return this.emit(i.EXPLODE,this,G),G},emitParticleAt:function(M,O,D){return this.emitParticle(D,M,O)},emitParticle:function(M,O,D){if(!this.atLimit()){M===void 0&&(M=this.ops.quantity.onEmit());for(var G=this.dead,X=this.stopAfter,V=this.follow?this.follow.x+this.followOffset.x:O,Y=this.follow?this.follow.y+this.followOffset.y:D,W=0;W0&&(this.stopCounter++,this.stopCounter>=X)||this.atLimit())break}return H}},fastForward:function(M,O){O===void 0&&(O=1e3/60);var D=0;for(this.skipping=!0;D0){var K=this.deathCallback,J=this.deathCallbackScope;for(Y=H-1;Y>=0;Y--){var Z=W[Y];X.splice(Z.index,1),V.push(Z.particle),K&&K.call(J,Z.particle),Z.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&X.length===0&&(this.completeFlag=0,this.emit(i.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=O;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=O,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(M){for(var O=this.getWorldTransformMatrix(),D=this.alive,G=D.length,X=[],V=0;V0){var b=0;for(this.skipping=!0;b0&&x(G,M,M),G},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(M){this.ops.x.onChange(M)}},particleY:{get:function(){return this.ops.y.current},set:function(M){this.ops.y.onChange(M)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(M){this.ops.accelerationX.onChange(M)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(M){this.ops.accelerationY.onChange(M)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(M){this.ops.maxVelocityX.onChange(M)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(M){this.ops.maxVelocityY.onChange(M)}},speed:{get:function(){return this.ops.speedX.current},set:function(M){this.ops.speedX.onChange(M),this.ops.speedY.onChange(M)}},speedX:{get:function(){return this.ops.speedX.current},set:function(M){this.ops.speedX.onChange(M)}},speedY:{get:function(){return this.ops.speedY.current},set:function(M){this.ops.speedY.onChange(M)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(M){this.ops.moveToX.onChange(M)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(M){this.ops.moveToY.onChange(M)}},bounce:{get:function(){return this.ops.bounce.current},set:function(M){this.ops.bounce.onChange(M)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(M){this.ops.scaleX.onChange(M)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(M){this.ops.scaleY.onChange(M)}},particleColor:{get:function(){return this.ops.color.current},set:function(M){this.ops.color.onChange(M)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(M){this.ops.color.setEase(M)}},particleTint:{get:function(){return this.ops.tint.current},set:function(M){this.ops.tint.onChange(M)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(M){this.ops.alpha.onChange(M)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(M){this.ops.lifespan.onChange(M)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(M){this.ops.angle.onChange(M)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(M){this.ops.rotate.onChange(M)}},quantity:{get:function(){return this.ops.quantity.current},set:function(M){this.ops.quantity.onChange(M)}},delay:{get:function(){return this.ops.delay.current},set:function(M){this.ops.delay.onChange(M)}},hold:{get:function(){return this.ops.hold.current},set:function(M){this.ops.hold.onChange(M)}},flowCounter:{get:function(){return this.counters[0]},set:function(M){this.counters[0]=M}},frameCounter:{get:function(){return this.counters[1]},set:function(M){this.counters[1]=M}},animCounter:{get:function(){return this.counters[2]},set:function(M){this.counters[2]=M}},elapsed:{get:function(){return this.counters[3]},set:function(M){this.counters[3]=M}},stopCounter:{get:function(){return this.counters[4]},set:function(M){this.counters[4]=M}},completeFlag:{get:function(){return this.counters[5]},set:function(M){this.counters[5]=M}},zoneIndex:{get:function(){return this.counters[6]},set:function(M){this.counters[6]=M}},zoneTotal:{get:function(){return this.counters[7]},set:function(M){this.counters[7]=M}},currentFrame:{get:function(){return this.counters[8]},set:function(M){this.counters[8]=M}},currentAnim:{get:function(){return this.counters[9]},set:function(M){this.counters[9]=M}},preDestroy:function(){this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var M,O=this.ops;for(M=0;M{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(90205),c=t(69360),l=new c,r=new c,n=new c,e=new c,s=function(u,i,a,o){var h=l,f=r,v=n,m=e;o?(m.loadIdentity(),m.multiply(o),m.translate(i.x,i.y),m.rotate(i.rotation),m.scale(i.scaleX,i.scaleY)):m.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY);var x=u.currentContext,g=a.roundPixels,y=a.alpha,T=i.alpha,E=i.alive,C=E.length,A=i.viewBounds;if(!(!i.visible||C===0||A&&!d(A,a.worldView))){i.sortCallback&&i.depthSort(),a.addToRenderList(i);var P=i.scrollFactorX,R=i.scrollFactorY;x.save(),x.globalCompositeOperation=u.blendModes[i.blendMode];for(var F=0;F0&&U.height>0){var z=-N.halfWidth,w=-N.halfHeight;x.globalAlpha=B,x.save(),f.setToContext(x),g&&(z=Math.round(z),w=Math.round(w)),x.imageSmoothingEnabled=!N.source.scaleMode,x.drawImage(N.source.image,U.x,U.y,U.width,U.height,z,w,U.width,U.height),x.restore()}}}x.restore()}};p.exports=s},765:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(99325),l=t(20494),r=t(72632),n=t(9216);c.register("particles",function(e,s){e===void 0&&(e={});var u=l(e,"key",null),i=r(e,"config",null),a=new n(this.scene,0,0,u);return s!==void 0&&(e.add=s),d(this.scene,a,e),i&&a.setConfig(i),a})},81212:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(9216);d.register("particles",function(l,r,n,e){return l!==void 0&&typeof l=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new c(this.scene,l,r,n,e))})},69116:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(10275),l=t(10456),p.exports={renderWebGL:c,renderCanvas:l}},10275:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(90205),c=t(69360),l=t(75512),r=new c,n=new c,e=new c,s=new c,u=function(i,a,o,h){var f=i.pipelines.set(a.pipeline),v=r,m=n,x=e,g=s;h?(g.loadIdentity(),g.multiply(h),g.translate(a.x,a.y),g.rotate(a.rotation),g.scale(a.scaleX,a.scaleY)):g.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY);var y=l.getTintAppendFloatAlpha,T=o.alpha,E=a.alpha;i.pipelines.preBatch(a);var C=a.alive,A=C.length,P=a.viewBounds;if(!(A===0||P&&!d(P,o.worldView))){a.sortCallback&&a.depthSort(),o.addToRenderList(a),v.copyFrom(o.matrix),v.multiplyWithOffset(g,-o.scrollX*a.scrollFactorX,-o.scrollY*a.scrollFactorY),i.setBlendMode(a.blendMode),a.mask&&(a.mask.preRenderWebGL(i,a,o),i.pipelines.set(a.pipeline));for(var R=a.tintFill,F,L,B=0;B{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r,n,e){r===void 0&&(r=0),n===void 0&&(n=0),e===void 0&&(e=!0),this.emitter,this.x=r,this.y=n,this.active=e},update:function(){},destroy:function(){this.emitter=null}});p.exports=c},76100:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},26677:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="deathzone"},62736:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="explode"},56490:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},85715:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stop"},40629:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={COMPLETE:t(76100),DEATH_ZONE:t(26677),EXPLODE:t(62736),START:t(56490),STOP:t(85715)}},27684:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={EmitterColorOp:t(19737),EmitterOp:t(93025),Events:t(40629),GravityWell:t(87811),Particle:t(14909),ParticleBounds:t(73106),ParticleEmitter:t(9216),ParticleProcessor:t(30891),Zones:t(25962)}},69361:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r,n){this.source=r,this.killOnEnter=n},willKill:function(l){var r=l.worldPosition,n=this.source.contains(r.x,r.y);return n&&this.killOnEnter||!n&&!this.killOnEnter}});p.exports=c},54213:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r,n,e,s,u,i){s===void 0&&(s=!1),u===void 0&&(u=!0),i===void 0&&(i=-1),this.source=r,this.points=[],this.quantity=n,this.stepRate=e,this.yoyo=s,this.counter=-1,this.seamless=u,this._length=0,this._direction=0,this.total=i,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var l=this.points[0],r=this.points[this.points.length-1];l.x===r.x&&l.y===r.y&&this.points.pop()}var n=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(l){return this.source=l,this.updateSource()},getPoint:function(l){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var r=this.points[this.counter];r&&(l.x=r.x,l.y=r.y)}});p.exports=c},68433:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(93736),l=new d({initialize:function(n){this.source=n,this._tempVec=new c,this.total=-1},getPoint:function(r){var n=this._tempVec;this.source.getRandomPoint(n),r.x=n.x,r.y=n.y}});p.exports=l},25962:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={DeathZone:t(69361),EdgeZone:t(54213),RandomZone:t(68433)}},29598:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(64937),l=t(13747),r=new d({Extends:l,Mixins:[c.PathFollower],initialize:function(e,s,u,i,a,o){l.call(this,e,u,i,a,o),this.path=s},preUpdate:function(n,e){this.anims.update(n,e),this.pathUpdate(n)}});p.exports=r},19626:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(29598);d.register("follower",function(l,r,n,e,s){var u=new c(this.scene,l,r,n,e,s);return this.displayList.add(u),this.updateList.add(u),u})},33412:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16569),c=t(56694),l=t(99425),r=t(15978),n=t(83321),e=t(76583),s=new c({Extends:n,initialize:function(i,a,o,h,f,v,m,x){h||(h="__DEFAULT"),n.call(this,i,a,o,h,f),this.type="Plane",this.anims=new d(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(v,m,x),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(u,i,a){u===void 0&&(u=8),i===void 0&&(i=8),a===void 0&&(a=!1);var o=!1;return a&&(o=!0),this.gridWidth=u,this.gridHeight=i,this.isTiled=a,this.clear(),l({mesh:this,widthSegments:u,heightSegments:i,isOrtho:!1,tile:a,flipY:o}),this},setSizeToFrame:function(u){u===void 0&&(u=!0);var i=this.frame;if(this.setPerspective(this.width/i.width,this.height/i.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!u)return this;var a=this.gridWidth,o=this.gridHeight,h=this.vertices,f=i.u0,v=i.u1,m=i.v0,x=i.v1,g,y,T=0;if(this.isTiled)for(m=i.v1,x=i.v0,y=0;y7&&T>7?g.push(m.r,m.g,m.b,a):g.push(x.r,x.g,x.b,o);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,16,16,0,f.RGBA,f.UNSIGNED_BYTE,new Uint8Array(g)),v.isAlphaPremultiplied=!0,v.isRenderTexture=!1,v.width=16,v.height=16;var E=this.scene.sys.textures.addGLTexture(e(),v,16,16);return this.removeCheckerboard(),this._checkerboard=E,f.bindTexture(f.TEXTURE_2D,null),this.setTexture(E),this.setSizeToFrame(),this.setViewHeight(h),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(u,i){return this.anims.play(u,i)},playReverse:function(u,i){return this.anims.playReverse(u,i)},playAfterDelay:function(u,i){return this.anims.playAfterDelay(u,i)},playAfterRepeat:function(u,i){return this.anims.playAfterRepeat(u,i)},stop:function(){return this.anims.stop()},stopAfterDelay:function(u){return this.anims.stopAfterDelay(u)},stopAfterRepeat:function(u){return this.anims.stopAfterRepeat(u)},stopOnFrame:function(u){return this.anims.stopOnFrame(u)},preUpdate:function(u,i){n.prototype.preUpdate.call(this,u,i),this.anims.update(u,i)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});p.exports=s},10912:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(32291),l=t(99325),r=t(20494),n=t(10850),e=t(33412);l.register("plane",function(s,u){s===void 0&&(s={});var i=r(s,"key",null),a=r(s,"frame",null),o=n(s,"width",8),h=n(s,"height",8),f=n(s,"tile",!1),v=new e(this.scene,0,0,i,a,o,h,f);u!==void 0&&(s.add=u);var m=n(s,"checkerboard",null);if(m){var x=n(m,"color1",16777215),g=n(m,"color2",255),y=n(m,"alpha1",255),T=n(m,"alpha2",255),E=n(m,"height",128);v.createCheckerboard(x,g,y,T,E)}return d(this.scene,v,s),c(v,s),v})},58322:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(33412),c=t(61286);c.register("plane",function(l,r,n,e,s,u,i){return this.displayList.add(new d(this.scene,l,r,n,e,s,u,i))})},13171:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(64937),l=t(89980),r=t(74853),n=t(65641),e=t(71606),s=new d({Extends:l,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Transform,c.Visible,e],initialize:function(i,a,o,h,f,v,m){h===void 0&&(h=16777215),f===void 0&&(f=128),v===void 0&&(v=1),m===void 0&&(m=.1),l.call(this,i,"PointLight"),this.initPipeline(n.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(a,o),this.color=r(h),this.intensity=v,this.attenuation=m,this.width=f*2,this.height=f*2,this._radius=f},radius:{get:function(){return this._radius},set:function(u){this._radius=u,this.width=u*2,this.height=u*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});p.exports=s},162:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(99325),l=t(20494),r=t(13171);c.register("pointlight",function(n,e){n===void 0&&(n={});var s=l(n,"color",16777215),u=l(n,"radius",128),i=l(n,"intensity",1),a=l(n,"attenuation",.1),o=new r(this.scene,0,0,s,u,i,a);return e!==void 0&&(n.add=e),d(this.scene,o,n),o})},91201:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(13171);d.register("pointlight",function(l,r,n,e,s,u){return this.displayList.add(new c(this.scene,l,r,n,e,s,u))})},71606:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(80590),p.exports={renderWebGL:c,renderCanvas:l}},80590:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=function(l,r,n,e){n.addToRenderList(r);var s=l.pipelines.set(r.pipeline),u=d(r,n,e).calc,i=r.width,a=r.height,o=-r._radius,h=-r._radius,f=o+i,v=h+a,m=u.getX(0,0),x=u.getY(0,0),g=u.getX(o,h),y=u.getY(o,h),T=u.getX(o,v),E=u.getY(o,v),C=u.getX(f,v),A=u.getY(f,v),P=u.getX(f,h),R=u.getY(f,h);l.pipelines.preBatch(r),s.batchPointLight(r,n,g,y,T,E,C,A,P,R,m,x),l.pipelines.postBatch(r)};p.exports=c},15996:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(845),l=t(1539),r=new d({Extends:l,initialize:function(e,s,u,i,a){s===void 0&&(s=0),u===void 0&&(u=0),i===void 0&&(i=32),a===void 0&&(a=32);var o=new c(e.sys.textures,"",i,a);l.call(this,e,s,u,o),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(n,e){this.width=n,this.height=e,this.texture.setSize(n,e),this.updateDisplayOrigin();var s=this.input;return s&&!s.customHitArea&&(s.hitArea.width=n,s.hitArea.height=e),this},resize:function(n,e){return this.setSize(n,e),this},saveTexture:function(n){var e=this.texture;return e.key=n,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(n,e,s,u,i,a){return this.texture.fill(n,e,s,u,i,a),this},clear:function(){return this.texture.clear(),this},stamp:function(n,e,s,u,i){return this.texture.stamp(n,e,s,u,i),this},erase:function(n,e,s){return this.texture.erase(n,e,s),this},draw:function(n,e,s,u,i){return this.texture.draw(n,e,s,u,i),this},drawFrame:function(n,e,s,u,i,a){return this.texture.drawFrame(n,e,s,u,i,a),this},repeat:function(n,e,s,u,i,a,o,h,f){return this.texture.repeat(n,e,s,u,i,a,o,h,f),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(n,e,s,u,i){return this.texture.batchDraw(n,e,s,u,i),this},batchDrawFrame:function(n,e,s,u,i,a){return this.texture.batchDrawFrame(n,e,s,u,i,a),this},endDraw:function(n){return this.texture.endDraw(n),this},snapshotArea:function(n,e,s,u,i,a,o){return this.texture.snapshotArea(n,e,s,u,i,a,o),this},snapshot:function(n,e,s){return this.snapshotArea(0,0,this.width,this.height,n,e,s)},snapshotPixel:function(n,e,s){return this.snapshotArea(n,e,1,1,s,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});p.exports=r},85692:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(99325),l=t(20494),r=t(15996);c.register("renderTexture",function(n,e){n===void 0&&(n={});var s=l(n,"x",0),u=l(n,"y",0),i=l(n,"width",32),a=l(n,"height",32),o=new r(this.scene,s,u,i,a);return e!==void 0&&(n.add=e),d(this.scene,o,n),o})},29599:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(15996);d.register("renderTexture",function(l,r,n,e){return this.displayList.add(new c(this.scene,l,r,n,e))})},79968:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16569),c=t(56694),l=t(64937),r=t(89980),n=t(65641),e=t(58912),s=t(93736),u=new c({Extends:r,Mixins:[l.AlphaSingle,l.BlendMode,l.Depth,l.Flip,l.Mask,l.Pipeline,l.PostPipeline,l.Size,l.Texture,l.Transform,l.Visible,l.ScrollFactor,e],initialize:function(a,o,h,f,v,m,x,g,y){f===void 0&&(f="__DEFAULT"),m===void 0&&(m=2),x===void 0&&(x=!0),r.call(this,a,"Rope"),this.anims=new d(this),this.points=m,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=f==="__DEFAULT",this.dirty=!1,this.horizontal=x,this._flipX=!1,this._flipY=!1,this._perp=new s,this.debugCallback=null,this.debugGraphic=null,this.setTexture(f,v),this.setPosition(o,h),this.setSizeToFrame(),this.initPipeline(n.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(m)&&this.resizeArrays(m.length),this.setPoints(m,g,y),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(i,a){var o=this.anims.currentFrame;this.anims.update(i,a),this.anims.currentFrame!==o&&(this.updateUVs(),this.updateVertices())},play:function(i,a,o){return this.anims.play(i,a,o),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(i,a,o){return i===void 0&&(i=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(i,a,o))},setVertical:function(i,a,o){return i===void 0&&(i=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(i,a,o)):this},setTintFill:function(i){return i===void 0&&(i=!1),this.tintFill=i,this},setAlphas:function(i,a){var o=this.points.length;if(o<1)return this;var h=this.alphas;i===void 0?i=[1]:!Array.isArray(i)&&a===void 0&&(i=[i]);var f,v=0;if(a!==void 0)for(f=0;fv&&(m=i[v]),h[v]=m,i.length>v+1&&(m=i[v+1]),h[v+1]=m}return this},setColors:function(i){var a=this.points.length;if(a<1)return this;var o=this.colors;i===void 0?i=[16777215]:Array.isArray(i)||(i=[i]);var h,f=0;if(i.length===a)for(h=0;hf&&(v=i[f]),o[f]=v,i.length>f+1&&(v=i[f+1]),o[f+1]=v}return this},setPoints:function(i,a,o){if(i===void 0&&(i=2),typeof i=="number"){var h=i;h<2&&(h=2),i=[];var f,v,m;if(this.horizontal)for(m=-this.frame.halfWidth,v=this.frame.width/(h-1),f=0;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(){};p.exports=S},96027:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(99325),l=t(20494),r=t(10850),n=t(79968);c.register("rope",function(e,s){e===void 0&&(e={});var u=l(e,"key",null),i=l(e,"frame",null),a=l(e,"horizontal",!0),o=r(e,"points",void 0),h=r(e,"colors",void 0),f=r(e,"alphas",void 0),v=new n(this.scene,0,0,u,i,o,a,h,f);return s!==void 0&&(e.add=s),d(this.scene,v,e),v})},31982:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79968),c=t(61286);c.register("rope",function(l,r,n,e,s,u,i,a){return this.displayList.add(new d(this.scene,l,r,n,e,s,u,i,a))})},58912:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(49489),l=t(44598),p.exports={renderWebGL:c,renderCanvas:l}},49489:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=t(75512),l=function(r,n,e,s){e.addToRenderList(n);var u=r.pipelines.set(n.pipeline,n),i=d(n,e,s).calc,a=n.vertices,o=n.uv,h=n.colors,f=n.alphas,v=n.alpha,m=c.getTintAppendFloatAlpha,x=e.roundPixels,g=a.length,y=Math.floor(g*.5);u.flush(),r.pipelines.preBatch(n);var T=u.setGameObject(n),E=u.vertexViewF32,C=u.vertexViewU32,A=u.vertexCount*u.currentShader.vertexComponentCount-1,P=0,R=n.tintFill;n.dirty&&n.updateVertices();for(var F=n.debugCallback,L=[],B=0;B{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(64937),l=t(89980),r=t(72632),n=t(98611),e=t(22440),s=t(24252),u=t(69360),i=new d({Extends:l,Mixins:[c.ComputedSize,c.Depth,c.GetBounds,c.Mask,c.Origin,c.ScrollFactor,c.Transform,c.Visible,s],initialize:function(o,h,f,v,m,x,g,y){f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=128),x===void 0&&(x=128),l.call(this,o,"Shader"),this.blendMode=-1,this.shader;var T=o.sys.renderer;this.renderer=T,this.gl=T.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=T.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=T.width,this._rendererHeight=T.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(f,v),this.setSize(m,x),this.setOrigin(.5,.5),this.setShader(h,g,y)},willRender:function(a){return this.renderToTexture?!0:!(l.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&a.id)},setRenderToTexture:function(a,o){if(o===void 0&&(o=!1),!this.renderToTexture){var h=this.width,f=this.height,v=this.renderer;this.glTexture=v.createTextureFromSource(null,h,f,0),this.glTexture.flipY=o,this.framebuffer=v.createFramebuffer(h,f,this.glTexture,!1),this._rendererWidth=h,this._rendererHeight=f,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),a&&(this.texture=this.scene.sys.textures.addGLTexture(a,this.glTexture,h,f))}return this.shader&&(v.pipelines.clear(),this.load(),this.flush(),v.pipelines.rebind()),this},setShader:function(a,o,h){if(o===void 0&&(o=[]),typeof a=="string"){var f=this.scene.sys.cache.shader;if(!f.has(a))return console.warn("Shader missing: "+a),this;this.shader=f.get(a)}else this.shader=a;var v=this.gl,m=this.renderer;this.program&&v.deleteProgram(this.program);var x=m.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);v.uniformMatrix4fv(v.getUniformLocation(x,"uViewMatrix"),!1,this.viewMatrix),v.uniformMatrix4fv(v.getUniformLocation(x,"uProjectionMatrix"),!1,this.projectionMatrix),v.uniform2f(v.getUniformLocation(x,"uResolution"),this.width,this.height),this.program=x;var g=new Date,y={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[g.getFullYear(),g.getMonth(),g.getDate(),g.getHours()*60*60+g.getMinutes()*60+g.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=n(!0,{},this.shader.uniforms,y):this.uniforms=y;for(var T=0;T<4;T++)o[T]&&this.setSampler2D("iChannel"+T,o[T],T,h);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(a){return this.pointer=a,this},projOrtho:function(a,o,h,f){var v=-1e3,m=1e3,x=1/(a-o),g=1/(h-f),y=1/(v-m),T=this.projectionMatrix;T[0]=-2*x,T[5]=-2*g,T[10]=2*y,T[12]=(a+o)*x,T[13]=(f+h)*g,T[14]=(m+v)*y;var E=this.program,C=this.gl,A=this.renderer;A.setProgram(E),C.uniformMatrix4fv(C.getUniformLocation(E,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=o,this._rendererHeight=h},initUniforms:function(){var a=this.gl,o=this.renderer.glFuncMap,h=this.program;this._textureCount=0;for(var f in this.uniforms){var v=this.uniforms[f],m=v.type,x=o[m];v.uniformLocation=a.getUniformLocation(h,f),m!=="sampler2D"&&(v.glMatrix=x.matrix,v.glValueLength=x.length,v.glFunc=x.func)}},setSampler2DBuffer:function(a,o,h,f,v,m){v===void 0&&(v=0),m===void 0&&(m={});var x=this.uniforms[a];return x.value=o,m.width=h,m.height=f,x.textureData=m,this._textureCount=v,this.initSampler2D(x),this},setSampler2D:function(a,o,h,f){h===void 0&&(h=0);var v=this.scene.sys.textures;if(v.exists(o)){var m=v.getFrame(o);if(m.glTexture&&m.glTexture.isRenderTexture)return this.setSampler2DBuffer(a,m.glTexture,m.width,m.height,h,f);var x=this.uniforms[a],g=m.source;x.textureKey=o,x.source=g.image,x.value=m.glTexture,g.isGLTexture&&(f||(f={}),f.width=g.width,f.height=g.height),f&&(x.textureData=f),this._textureCount=h,this.initSampler2D(x)}return this},setUniform:function(a,o){return e(this.uniforms,a,o),this},getUniform:function(a){return r(this.uniforms,a,null)},setChannel0:function(a,o){return this.setSampler2D("iChannel0",a,0,o)},setChannel1:function(a,o){return this.setSampler2D("iChannel1",a,1,o)},setChannel2:function(a,o){return this.setSampler2D("iChannel2",a,2,o)},setChannel3:function(a,o){return this.setSampler2D("iChannel3",a,3,o)},initSampler2D:function(a){if(a.value){var o=this.gl;o.activeTexture(o.TEXTURE0+this._textureCount),o.bindTexture(o.TEXTURE_2D,a.value);var h=a.textureData;if(h&&!a.value.isRenderTexture){var f=o[r(h,"magFilter","linear").toUpperCase()],v=o[r(h,"minFilter","linear").toUpperCase()],m=o[r(h,"wrapS","repeat").toUpperCase()],x=o[r(h,"wrapT","repeat").toUpperCase()],g=o[r(h,"format","rgba").toUpperCase()];if(h.repeat&&(m=o.REPEAT,x=o.REPEAT),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!!h.flipY),h.width){var y=r(h,"width",512),T=r(h,"height",2),E=r(h,"border",0);o.texImage2D(o.TEXTURE_2D,0,g,y,T,E,g,o.UNSIGNED_BYTE,null)}else o.texImage2D(o.TEXTURE_2D,0,g,o.RGBA,o.UNSIGNED_BYTE,a.source);o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,f),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,v),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,m),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,x)}this.renderer.setProgram(this.program),o.uniform1i(a.uniformLocation,this._textureCount),this._textureCount++}},syncUniforms:function(){var a=this.gl,o=this.uniforms,h,f,v,m,x,g=0;for(var y in o)h=o[y],v=h.glFunc,f=h.glValueLength,m=h.uniformLocation,x=h.value,x!==null&&(f===1?h.glMatrix?v.call(a,m,h.transpose,x):v.call(a,m,x):f===2?v.call(a,m,x.x,x.y):f===3?v.call(a,m,x.x,x.y,x.z):f===4?v.call(a,m,x.x,x.y,x.z,x.w):h.type==="sampler2D"&&(a.activeTexture(a.TEXTURE0+g),a.bindTexture(a.TEXTURE_2D,x),a.uniform1i(m,g),g++))},load:function(a){var o=this.gl,h=this.width,f=this.height,v=this.renderer,m=this.program,x=this.viewMatrix;if(!this.renderToTexture){var g=-this._displayOriginX,y=-this._displayOriginY;x[0]=a[0],x[1]=a[1],x[4]=a[2],x[5]=a[3],x[8]=a[4],x[9]=a[5],x[12]=x[0]*g+x[4]*y,x[13]=x[1]*g+x[5]*y}o.useProgram(m),o.uniformMatrix4fv(o.getUniformLocation(m,"uViewMatrix"),!1,x),o.uniform2f(o.getUniformLocation(m,"uResolution"),this.width,this.height);var T=this.uniforms,E=T.resolution;E.value.x=h,E.value.y=f,T.time.value=v.game.loop.getDuration();var C=this.pointer;if(C){var A=T.mouse,P=C.x/h,R=1-C.y/f;A.value.x=P.toFixed(2),A.value.y=R.toFixed(2)}this.syncUniforms()},flush:function(){var a=this.width,o=this.height,h=this.program,f=this.gl,v=this.vertexBuffer,m=this.renderer,x=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(m.setFramebuffer(this.framebuffer),f.clearColor(0,0,0,0),f.clear(f.COLOR_BUFFER_BIT)),f.bindBuffer(f.ARRAY_BUFFER,v);var g=f.getAttribLocation(h,"inPosition");g!==-1&&(f.enableVertexAttribArray(g),f.vertexAttribPointer(g,2,f.FLOAT,!1,x,0));var y=this.vertexViewF32;y[3]=o,y[4]=a,y[5]=o,y[8]=a,y[9]=o,y[10]=a;var T=6;f.bufferSubData(f.ARRAY_BUFFER,0,this.bytes.subarray(0,T*x)),f.drawArrays(f.TRIANGLES,0,T),this.renderToTexture&&m.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var a=this.gl;a.deleteProgram(this.program),a.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});p.exports=i},10612:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(){};p.exports=S},13908:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(99325),l=t(20494),r=t(27902);c.register("shader",function(n,e){n===void 0&&(n={});var s=l(n,"key",null),u=l(n,"x",0),i=l(n,"y",0),a=l(n,"width",128),o=l(n,"height",128),h=new r(this.scene,s,u,i,a,o);return e!==void 0&&(n.add=e),d(this.scene,h,n),h})},51979:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27902),c=t(61286);c.register("shader",function(l,r,n,e,s,u,i){return this.displayList.add(new d(this.scene,l,r,n,e,s,u,i))})},24252:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(19782),l=t(10612),p.exports={renderWebGL:c,renderCanvas:l}},19782:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=function(l,r,n,e){if(r.shader){if(n.addToRenderList(r),l.pipelines.clear(),r.renderToTexture)r.load(),r.flush();else{var s=d(r,n,e).calc;(l.width!==r._rendererWidth||l.height!==r._rendererHeight)&&r.projOrtho(0,l.width,l.height,0),r.load(s.matrix),r.flush()}l.pipelines.rebind()}};p.exports=c},19543:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(75512),c=function(l,r,n,e,s,u){for(var i=d.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*e),a=n.pathData,o=n.pathIndexes,h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r=c||d.fillColor,n=l||d.fillAlpha,e=(r&16711680)>>>16,s=(r&65280)>>>8,u=r&255;t.fillStyle="rgba("+e+","+s+","+u+","+n+")"};p.exports=S},17876:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r=c||d.strokeColor,n=l||d.strokeAlpha,e=(r&16711680)>>>16,s=(r&65280)>>>8,u=r&255;t.strokeStyle="rgba("+e+","+s+","+u+","+n+")",t.lineWidth=d.lineWidth};p.exports=S},91461:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(64937),l=t(89980),r=t(88829),n=new d({Extends:l,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Transform,c.Visible],initialize:function(s,u,i){u===void 0&&(u="Shape"),l.call(this,s,u),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new r,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(e,s){return s===void 0&&(s=1),e===void 0?this.isFilled=!1:(this.fillColor=e,this.fillAlpha=s,this.isFilled=!0),this},setStrokeStyle:function(e,s,u){return u===void 0&&(u=1),e===void 0?this.isStroked=!1:(this.lineWidth=e,this.strokeColor=s,this.strokeAlpha=u,this.isStroked=!0),this},setClosePath:function(e){return this.closePath=e,this},setSize:function(e,s){return this.width=e,this.height=s,this},setDisplaySize:function(e,s){return this.displayWidth=e,this.displayHeight=s,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(e){this.scaleX=e/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(e){this.scaleY=e/this.height}}});p.exports=n},50262:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(75512),c=function(l,r,n,e,s){var u=l.strokeTint,i=d.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*n);u.TL=i,u.TR=i,u.BL=i,u.BR=i;var a=r.pathData,o=a.length-1,h=r.lineWidth,f=h/2,v=a[0]-e,m=a[1]-s;r.closePath||(o-=2);for(var x=2;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2213),c=t(56694),l=t(75606),r=t(11117),n=t(26673),e=t(83392),s=t(91461),u=new c({Extends:s,Mixins:[d],initialize:function(a,o,h,f,v,m,x,g,y){o===void 0&&(o=0),h===void 0&&(h=0),f===void 0&&(f=128),v===void 0&&(v=0),m===void 0&&(m=360),x===void 0&&(x=!1),s.call(this,a,"Arc",new n(0,0,f)),this._startAngle=v,this._endAngle=m,this._anticlockwise=x,this._iterations=.01,this.setPosition(o,h);var T=this.geom.radius*2;this.setSize(T,T),g!==void 0&&this.setFillStyle(g,y),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(i){this._iterations=i,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(i){this.geom.radius=i;var a=i*2;this.setSize(a,a),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(i){this._startAngle=i,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(i){this._endAngle=i,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(i){this._anticlockwise=i,this.updateData()}},setRadius:function(i){return this.radius=i,this},setIterations:function(i){return i===void 0&&(i=.01),this.iterations=i,this},setStartAngle:function(i,a){return this._startAngle=i,a!==void 0&&(this._anticlockwise=a),this.updateData()},setEndAngle:function(i,a){return this._endAngle=i,a!==void 0&&(this._anticlockwise=a),this.updateData()},updateData:function(){var i=this._iterations,a=i,o=this.geom.radius,h=l(this._startAngle),f=l(this._endAngle),v=this._anticlockwise,m=o,x=o;f-=h,v?f<-e.PI2?f=-e.PI2:f>0&&(f=-e.PI2+f%e.PI2):f>e.PI2?f=e.PI2:f<0&&(f=e.PI2+f%e.PI2);for(var g=[m+Math.cos(h)*o,x+Math.sin(h)*o],y;a<1;)y=f*a+h,g.push(m+Math.cos(y)*o,x+Math.sin(y)*o),a+=i;return y=f+h,g.push(m+Math.cos(y)*o,x+Math.sin(y)*o),g.push(m+Math.cos(h)*o,x+Math.sin(h)*o),this.pathIndexes=r(g),this.pathData=g,this}});p.exports=u},23560:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(75606),c=t(15608),l=t(17876),r=t(49584),n=function(e,s,u,i){u.addToRenderList(s);var a=e.currentContext;if(r(e,a,s,u,i)){var o=s.radius;a.beginPath(),a.arc(o-s.originX*(o*2),o-s.originY*(o*2),o,d(s._startAngle),d(s._endAngle),s.anticlockwise),s.closePath&&a.closePath(),s.isFilled&&(c(a,s),a.fill()),s.isStroked&&(l(a,s),a.stroke()),a.restore()}};p.exports=n},10369:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(28593),c=t(61286);c.register("arc",function(l,r,n,e,s,u,i,a){return this.displayList.add(new d(this.scene,l,r,n,e,s,u,i,a))}),c.register("circle",function(l,r,n,e,s){return this.displayList.add(new d(this.scene,l,r,n,0,360,!1,e,s))})},2213:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(58356),l=t(23560),p.exports={renderWebGL:c,renderCanvas:l}},58356:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=t(19543),l=t(50262),r=function(n,e,s,u){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=d(e,s,u),o=i.calcMatrix.copyFrom(a.calc),h=e._displayOriginX,f=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&c(i,o,e,v,h,f),e.isStroked&&l(i,e,v,h,f),n.pipelines.postBatch(e)};p.exports=r},15220:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(87203),l=t(11117),r=t(74118),n=t(91461),e=new d({Extends:n,Mixins:[c],initialize:function(u,i,a,o,h,f){i===void 0&&(i=0),a===void 0&&(a=0),n.call(this,u,"Curve",o),this._smoothness=32,this._curveBounds=new r,this.closePath=!1,this.setPosition(i,a),h!==void 0&&this.setFillStyle(h,f),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(s){this._smoothness=s,this.updateData()}},setSmoothness:function(s){return this._smoothness=s,this.updateData()},updateData:function(){var s=this._curveBounds,u=this._smoothness;this.geom.getBounds(s,u),this.setSize(s.width,s.height),this.updateDisplayOrigin();for(var i=[],a=this.geom.getPoints(u),o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15608),c=t(17876),l=t(49584),r=function(n,e,s,u){s.addToRenderList(e);var i=n.currentContext;if(l(n,i,e,s,u)){var a=e._displayOriginX+e._curveBounds.x,o=e._displayOriginY+e._curveBounds.y,h=e.pathData,f=h.length-1,v=h[0]-a,m=h[1]-o;i.beginPath(),i.moveTo(v,m),e.closePath||(f-=2);for(var x=2;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(15220);d.register("curve",function(l,r,n,e,s){return this.displayList.add(new c(this.scene,l,r,n,e,s))})},87203:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(82958),l=t(4024),p.exports={renderWebGL:c,renderCanvas:l}},82958:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19543),c=t(73329),l=t(50262),r=function(n,e,s,u){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,u),o=i.calcMatrix.copyFrom(a.calc),h=e._displayOriginX+e._curveBounds.x,f=e._displayOriginY+e._curveBounds.y,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,o,e,v,h,f),e.isStroked&&l(i,e,v,h,f),n.pipelines.postBatch(e)};p.exports=r},28591:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(11117),l=t(84171),r=t(95669),n=t(91461),e=new d({Extends:n,Mixins:[l],initialize:function(u,i,a,o,h,f,v){i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=128),h===void 0&&(h=128),n.call(this,u,"Ellipse",new r(o/2,h/2,o,h)),this._smoothness=64,this.setPosition(i,a),this.width=o,this.height=h,f!==void 0&&this.setFillStyle(f,v),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(s){this._smoothness=s,this.updateData()}},setSize:function(s,u){return this.width=s,this.height=u,this.geom.setPosition(s/2,u/2),this.geom.setSize(s,u),this.updateData()},setSmoothness:function(s){return this._smoothness=s,this.updateData()},updateData:function(){for(var s=[],u=this.geom.getPoints(this._smoothness),i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15608),c=t(17876),l=t(49584),r=function(n,e,s,u){s.addToRenderList(e);var i=n.currentContext;if(l(n,i,e,s,u)){var a=e._displayOriginX,o=e._displayOriginY,h=e.pathData,f=h.length-1,v=h[0]-a,m=h[1]-o;i.beginPath(),i.moveTo(v,m),e.closePath||(f-=2);for(var x=2;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(28591),c=t(61286);c.register("ellipse",function(l,r,n,e,s,u){return this.displayList.add(new d(this.scene,l,r,n,e,s,u))})},84171:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(17554),l=t(55881),p.exports={renderWebGL:c,renderCanvas:l}},17554:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19543),c=t(73329),l=t(50262),r=function(n,e,s,u){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,u),o=i.calcMatrix.copyFrom(a.calc),h=e._displayOriginX,f=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,o,e,v,h,f),e.isStroked&&l(i,e,v,h,f),n.pipelines.postBatch(e)};p.exports=r},39169:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(91461),l=t(88059),r=new d({Extends:c,Mixins:[l],initialize:function(e,s,u,i,a,o,h,f,v,m,x){s===void 0&&(s=0),u===void 0&&(u=0),i===void 0&&(i=128),a===void 0&&(a=128),o===void 0&&(o=32),h===void 0&&(h=32),c.call(this,e,"Grid",null),this.cellWidth=o,this.cellHeight=h,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(s,u),this.setSize(i,a),this.setFillStyle(f,v),m!==void 0&&this.setOutlineStyle(m,x),this.updateDisplayOrigin()},setFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showCells=!1:(this.fillColor=n,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showAltCells=!1:(this.altFillColor=n,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showOutline=!1:(this.outlineFillColor=n,this.outlineFillAlpha=e,this.showOutline=!0),this}});p.exports=r},95525:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15608),c=t(17876),l=t(49584),r=function(n,e,s,u){s.addToRenderList(e);var i=n.currentContext;if(l(n,i,e,s,u)){var a=-e._displayOriginX,o=-e._displayOriginY,h=s.alpha*e.alpha,f=e.width,v=e.height,m=e.cellWidth,x=e.cellHeight,g=Math.ceil(f/m),y=Math.ceil(v/x),T=m,E=x,C=m-(g*m-f),A=x-(y*x-v),P=e.showCells,R=e.showAltCells,F=e.showOutline,L=0,B=0,N=0,U=0,z=0;if(F&&(T--,E--,C===m&&C--,A===x&&A--),P&&e.fillAlpha>0)for(d(i,e),B=0;B0)for(d(i,e,e.altFillColor,e.altFillAlpha*h),B=0;B0){for(c(i,e,e.outlineFillColor,e.outlineFillAlpha*h),L=1;L{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(39169);d.register("grid",function(l,r,n,e,s,u,i,a,o,h){return this.displayList.add(new c(this.scene,l,r,n,e,s,u,i,a,o,h))})},88059:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(50639),l=t(95525),p.exports={renderWebGL:c,renderCanvas:l}},50639:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=t(75512),l=function(r,n,e,s){e.addToRenderList(n);var u=r.pipelines.set(n.pipeline),i=d(n,e,s),a=u.calcMatrix.copyFrom(i.calc);a.translate(-n._displayOriginX,-n._displayOriginY);var o=e.alpha*n.alpha,h=n.width,f=n.height,v=n.cellWidth,m=n.cellHeight,x=Math.ceil(h/v),g=Math.ceil(f/m),y=v,T=m,E=v-(x*v-h),C=m-(g*m-f),A,P,R=n.showCells,F=n.showAltCells,L=n.showOutline,B=0,N=0,U=0,z=0,w=0;if(L&&(y--,T--,E===v&&E--,C===m&&C--),r.pipelines.preBatch(n),R&&n.fillAlpha>0)for(A=u.fillTint,P=c.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*o),A.TL=P,A.TR=P,A.BL=P,A.BR=P,N=0;N0)for(A=u.fillTint,P=c.getTintAppendFloatAlpha(n.altFillColor,n.altFillAlpha*o),A.TL=P,A.TR=P,A.BL=P,A.BR=P,N=0;N0){var I=u.strokeTint,M=c.getTintAppendFloatAlpha(n.outlineFillColor,n.outlineFillAlpha*o);for(I.TL=M,I.TR=M,I.BL=M,I.BR=M,B=1;B{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72296),c=t(56694),l=t(91461),r=new c({Extends:l,Mixins:[d],initialize:function(e,s,u,i,a,o,h,f){s===void 0&&(s=0),u===void 0&&(u=0),i===void 0&&(i=48),a===void 0&&(a=32),o===void 0&&(o=15658734),h===void 0&&(h=10066329),f===void 0&&(f=13421772),l.call(this,e,"IsoBox",null),this.projection=4,this.fillTop=o,this.fillLeft=h,this.fillRight=f,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(s,u),this.setSize(i,a),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setFaces:function(n,e,s){return n===void 0&&(n=!0),e===void 0&&(e=!0),s===void 0&&(s=!0),this.showTop=n,this.showLeft=e,this.showRight=s,this},setFillStyle:function(n,e,s){return this.fillTop=n,this.fillLeft=e,this.fillRight=s,this.isFilled=!0,this}});p.exports=r},32884:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15608),c=t(49584),l=function(r,n,e,s){e.addToRenderList(n);var u=r.currentContext;if(c(r,u,n,e,s)&&n.isFilled){var i=n.width,a=n.height,o=i/2,h=i/n.projection;n.showTop&&(d(u,n,n.fillTop),u.beginPath(),u.moveTo(-o,-a),u.lineTo(0,-h-a),u.lineTo(o,-a),u.lineTo(o,-1),u.lineTo(0,h-1),u.lineTo(-o,-1),u.lineTo(-o,-a),u.fill()),n.showLeft&&(d(u,n,n.fillLeft),u.beginPath(),u.moveTo(-o,0),u.lineTo(0,h),u.lineTo(0,h-a),u.lineTo(-o,-a),u.lineTo(-o,0),u.fill()),n.showRight&&(d(u,n,n.fillRight),u.beginPath(),u.moveTo(o,0),u.lineTo(0,h),u.lineTo(0,h-a),u.lineTo(o,-a),u.lineTo(o,0),u.fill()),u.restore()}};p.exports=l},88154:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(4415);d.register("isobox",function(l,r,n,e,s,u,i){return this.displayList.add(new c(this.scene,l,r,n,e,s,u,i))})},72296:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(33101),l=t(32884),p.exports={renderWebGL:c,renderCanvas:l}},33101:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=t(75512),l=function(r,n,e,s){e.addToRenderList(n);var u=r.pipelines.set(n.pipeline),i=d(n,e,s),a=u.calcMatrix.copyFrom(i.calc),o=n.width,h=n.height,f=o/2,v=o/n.projection,m=e.alpha*n.alpha;if(n.isFilled){var x,g,y,T,E,C,A,P,R;r.pipelines.preBatch(n),n.showTop&&(x=c.getTintAppendFloatAlpha(n.fillTop,m),g=a.getX(-f,-h),y=a.getY(-f,-h),T=a.getX(0,-v-h),E=a.getY(0,-v-h),C=a.getX(f,-h),A=a.getY(f,-h),P=a.getX(0,v-h),R=a.getY(0,v-h),u.batchQuad(n,g,y,T,E,C,A,P,R,0,0,1,1,x,x,x,x,2)),n.showLeft&&(x=c.getTintAppendFloatAlpha(n.fillLeft,m),g=a.getX(-f,0),y=a.getY(-f,0),T=a.getX(0,v),E=a.getY(0,v),C=a.getX(0,v-h),A=a.getY(0,v-h),P=a.getX(-f,-h),R=a.getY(-f,-h),u.batchQuad(n,g,y,T,E,C,A,P,R,0,0,1,1,x,x,x,x,2)),n.showRight&&(x=c.getTintAppendFloatAlpha(n.fillRight,m),g=a.getX(f,0),y=a.getY(f,0),T=a.getX(0,v),E=a.getY(0,v),C=a.getX(0,v-h),A=a.getY(0,v-h),P=a.getX(f,-h),R=a.getY(f,-h),u.batchQuad(n,g,y,T,E,C,A,P,R,0,0,1,1,x,x,x,x,2)),r.pipelines.postBatch(n)}};p.exports=l},65159:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(93387),l=t(91461),r=new d({Extends:l,Mixins:[c],initialize:function(e,s,u,i,a,o,h,f,v){s===void 0&&(s=0),u===void 0&&(u=0),i===void 0&&(i=48),a===void 0&&(a=32),o===void 0&&(o=!1),h===void 0&&(h=15658734),f===void 0&&(f=10066329),v===void 0&&(v=13421772),l.call(this,e,"IsoTriangle",null),this.projection=4,this.fillTop=h,this.fillLeft=f,this.fillRight=v,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=o,this.isFilled=!0,this.setPosition(s,u),this.setSize(i,a),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setReversed:function(n){return this.isReversed=n,this},setFaces:function(n,e,s){return n===void 0&&(n=!0),e===void 0&&(e=!0),s===void 0&&(s=!0),this.showTop=n,this.showLeft=e,this.showRight=s,this},setFillStyle:function(n,e,s){return this.fillTop=n,this.fillLeft=e,this.fillRight=s,this.isFilled=!0,this}});p.exports=r},9923:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15608),c=t(49584),l=function(r,n,e,s){e.addToRenderList(n);var u=r.currentContext;if(c(r,u,n,e,s)&&n.isFilled){var i=n.width,a=n.height,o=i/2,h=i/n.projection,f=n.isReversed;n.showTop&&f&&(d(u,n,n.fillTop),u.beginPath(),u.moveTo(-o,-a),u.lineTo(0,-h-a),u.lineTo(o,-a),u.lineTo(0,h-a),u.fill()),n.showLeft&&(d(u,n,n.fillLeft),u.beginPath(),f?(u.moveTo(-o,-a),u.lineTo(0,h),u.lineTo(0,h-a)):(u.moveTo(-o,0),u.lineTo(0,h),u.lineTo(0,h-a)),u.fill()),n.showRight&&(d(u,n,n.fillRight),u.beginPath(),f?(u.moveTo(o,-a),u.lineTo(0,h),u.lineTo(0,h-a)):(u.moveTo(o,0),u.lineTo(0,h),u.lineTo(0,h-a)),u.fill()),u.restore()}};p.exports=l},67765:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(65159);d.register("isotriangle",function(l,r,n,e,s,u,i,a){return this.displayList.add(new c(this.scene,l,r,n,e,s,u,i,a))})},93387:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(54946),l=t(9923),p.exports={renderWebGL:c,renderCanvas:l}},54946:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=t(75512),l=function(r,n,e,s){e.addToRenderList(n);var u=r.pipelines.set(n.pipeline),i=d(n,e,s),a=u.calcMatrix.copyFrom(i.calc),o=n.width,h=n.height,f=o/2,v=o/n.projection,m=n.isReversed,x=e.alpha*n.alpha;if(n.isFilled){r.pipelines.preBatch(n);var g,y,T,E,C,A,P;if(n.showTop&&m){g=c.getTintAppendFloatAlpha(n.fillTop,x),y=a.getX(-f,-h),T=a.getY(-f,-h),E=a.getX(0,-v-h),C=a.getY(0,-v-h),A=a.getX(f,-h),P=a.getY(f,-h);var R=a.getX(0,v-h),F=a.getY(0,v-h);u.batchQuad(n,y,T,E,C,A,P,R,F,0,0,1,1,g,g,g,g,2)}n.showLeft&&(g=c.getTintAppendFloatAlpha(n.fillLeft,x),m?(y=a.getX(-f,-h),T=a.getY(-f,-h),E=a.getX(0,v),C=a.getY(0,v),A=a.getX(0,v-h),P=a.getY(0,v-h)):(y=a.getX(-f,0),T=a.getY(-f,0),E=a.getX(0,v),C=a.getY(0,v),A=a.getX(0,v-h),P=a.getY(0,v-h)),u.batchTri(n,y,T,E,C,A,P,0,0,1,1,g,g,g,2)),n.showRight&&(g=c.getTintAppendFloatAlpha(n.fillRight,x),m?(y=a.getX(f,-h),T=a.getY(f,-h),E=a.getX(0,v),C=a.getY(0,v),A=a.getX(0,v-h),P=a.getY(0,v-h)):(y=a.getX(f,0),T=a.getY(f,0),E=a.getX(0,v),C=a.getY(0,v),A=a.getX(0,v-h),P=a.getY(0,v-h)),u.batchTri(n,y,T,E,C,A,P,0,0,1,1,g,g,g,2)),r.pipelines.postBatch(n)}};p.exports=l},579:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(91461),l=t(88829),r=t(52660),n=new d({Extends:c,Mixins:[r],initialize:function(s,u,i,a,o,h,f,v,m){u===void 0&&(u=0),i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=0),h===void 0&&(h=128),f===void 0&&(f=0),c.call(this,s,"Line",new l(a,o,h,f));var x=Math.max(1,this.geom.right-this.geom.left),g=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(u,i),this.setSize(x,g),v!==void 0&&this.setStrokeStyle(1,v,m),this.updateDisplayOrigin()},setLineWidth:function(e,s){return s===void 0&&(s=e),this._startWidth=e,this._endWidth=s,this.lineWidth=e,this},setTo:function(e,s,u,i){return this.geom.setTo(e,s,u,i),this}});p.exports=n},52044:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(17876),c=t(49584),l=function(r,n,e,s){e.addToRenderList(n);var u=r.currentContext;if(c(r,u,n,e,s)){var i=n._displayOriginX,a=n._displayOriginY;n.isStroked&&(d(u,n),u.beginPath(),u.moveTo(n.geom.x1-i,n.geom.y1-a),u.lineTo(n.geom.x2-i,n.geom.y2-a),u.stroke()),u.restore()}};p.exports=l},85665:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(579);d.register("line",function(l,r,n,e,s,u,i,a){return this.displayList.add(new c(this.scene,l,r,n,e,s,u,i,a))})},52660:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(46952),l=t(52044),p.exports={renderWebGL:c,renderCanvas:l}},46952:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=t(75512),l=function(r,n,e,s){e.addToRenderList(n);var u=r.pipelines.set(n.pipeline),i=d(n,e,s);u.calcMatrix.copyFrom(i.calc);var a=n._displayOriginX,o=n._displayOriginY,h=e.alpha*n.alpha;if(r.pipelines.preBatch(n),n.isStroked){var f=u.strokeTint,v=c.getTintAppendFloatAlpha(n.strokeColor,n.strokeAlpha*h);f.TL=v,f.TR=v,f.BL=v,f.BR=v,u.batchLine(n.geom.x1-a,n.geom.y1-o,n.geom.x2-a,n.geom.y2-o,n._startWidth/2,n._endWidth/2,1,0,!1,i.sprite,i.camera)}r.pipelines.postBatch(n)};p.exports=l},91249:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70573),c=t(56694),l=t(11117),r=t(14045),n=t(8580),e=t(91461),s=t(18974),u=new c({Extends:e,Mixins:[d],initialize:function(a,o,h,f,v,m){o===void 0&&(o=0),h===void 0&&(h=0),e.call(this,a,"Polygon",new n(f));var x=r(this.geom);this.setPosition(o,h),this.setSize(x.width,x.height),v!==void 0&&this.setFillStyle(v,m),this.updateDisplayOrigin(),this.updateData()},smooth:function(i){i===void 0&&(i=1);for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15608),c=t(17876),l=t(49584),r=function(n,e,s,u){s.addToRenderList(e);var i=n.currentContext;if(l(n,i,e,s,u)){var a=e._displayOriginX,o=e._displayOriginY,h=e.pathData,f=h.length-1,v=h[0]-a,m=h[1]-o;i.beginPath(),i.moveTo(v,m),e.closePath||(f-=2);for(var x=2;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(91249);d.register("polygon",function(l,r,n,e,s){return this.displayList.add(new c(this.scene,l,r,n,e,s))})},70573:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(72841),l=t(40834),p.exports={renderWebGL:c,renderCanvas:l}},72841:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19543),c=t(73329),l=t(50262),r=function(n,e,s,u){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,u),o=i.calcMatrix.copyFrom(a.calc),h=e._displayOriginX,f=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,o,e,v,h,f),e.isStroked&&l(i,e,v,h,f),n.pipelines.postBatch(e)};p.exports=r},517:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(74118),l=t(91461),r=t(37673),n=new d({Extends:l,Mixins:[r],initialize:function(s,u,i,a,o,h,f){u===void 0&&(u=0),i===void 0&&(i=0),a===void 0&&(a=128),o===void 0&&(o=128),l.call(this,s,"Rectangle",new c(0,0,a,o)),this.setPosition(u,i),this.setSize(a,o),h!==void 0&&this.setFillStyle(h,f),this.updateDisplayOrigin(),this.updateData()},setSize:function(e,s){this.width=e,this.height=s,this.geom.setSize(e,s),this.updateData(),this.updateDisplayOrigin();var u=this.input;return u&&!u.customHitArea&&(u.hitArea.width=e,u.hitArea.height=s),this},updateData:function(){var e=[],s=this.geom,u=this._tempLine;return s.getLineA(u),e.push(u.x1,u.y1,u.x2,u.y2),s.getLineB(u),e.push(u.x2,u.y2),s.getLineC(u),e.push(u.x2,u.y2),s.getLineD(u),e.push(u.x2,u.y2),this.pathData=e,this}});p.exports=n},4091:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15608),c=t(17876),l=t(49584),r=function(n,e,s,u){s.addToRenderList(e);var i=n.currentContext;if(l(n,i,e,s,u)){var a=e._displayOriginX,o=e._displayOriginY;e.isFilled&&(d(i,e),i.fillRect(-a,-o,e.width,e.height)),e.isStroked&&(c(i,e),i.beginPath(),i.rect(-a,-o,e.width,e.height),i.stroke()),i.restore()}};p.exports=r},94355:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(517);d.register("rectangle",function(l,r,n,e,s,u){return this.displayList.add(new c(this.scene,l,r,n,e,s,u))})},37673:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(43532),l=t(4091),p.exports={renderWebGL:c,renderCanvas:l}},43532:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=t(50262),l=t(75512),r=function(n,e,s,u){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=d(e,s,u);i.calcMatrix.copyFrom(a.calc);var o=e._displayOriginX,h=e._displayOriginY,f=s.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var v=i.fillTint,m=l.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*f);v.TL=m,v.TR=m,v.BL=m,v.BR=m,i.batchFillRect(-o,-h,e.width,e.height)}e.isStroked&&c(i,e,f,o,h),n.pipelines.postBatch(e)};p.exports=r},77843:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87956),c=t(56694),l=t(11117),r=t(91461),n=new c({Extends:r,Mixins:[d],initialize:function(s,u,i,a,o,h,f,v){u===void 0&&(u=0),i===void 0&&(i=0),a===void 0&&(a=5),o===void 0&&(o=32),h===void 0&&(h=64),r.call(this,s,"Star",null),this._points=a,this._innerRadius=o,this._outerRadius=h,this.setPosition(u,i),this.setSize(h*2,h*2),f!==void 0&&this.setFillStyle(f,v),this.updateDisplayOrigin(),this.updateData()},setPoints:function(e){return this._points=e,this.updateData()},setInnerRadius:function(e){return this._innerRadius=e,this.updateData()},setOuterRadius:function(e){return this._outerRadius=e,this.updateData()},points:{get:function(){return this._points},set:function(e){this._points=e,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(e){this._innerRadius=e,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(e){this._outerRadius=e,this.updateData()}},updateData:function(){var e=[],s=this._points,u=this._innerRadius,i=this._outerRadius,a=Math.PI/2*3,o=Math.PI/s,h=i,f=i;e.push(h,f+-i);for(var v=0;v{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15608),c=t(17876),l=t(49584),r=function(n,e,s,u){s.addToRenderList(e);var i=n.currentContext;if(l(n,i,e,s,u)){var a=e._displayOriginX,o=e._displayOriginY,h=e.pathData,f=h.length-1,v=h[0]-a,m=h[1]-o;i.beginPath(),i.moveTo(v,m),e.closePath||(f-=2);for(var x=2;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(77843),c=t(61286);c.register("star",function(l,r,n,e,s,u,i){return this.displayList.add(new d(this.scene,l,r,n,e,s,u,i))})},87956:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(12037),l=t(11401),p.exports={renderWebGL:c,renderCanvas:l}},12037:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19543),c=t(73329),l=t(50262),r=function(n,e,s,u){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=c(e,s,u),o=i.calcMatrix.copyFrom(a.calc),h=e._displayOriginX,f=e._displayOriginY,v=s.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&d(i,o,e,v,h,f),e.isStroked&&l(i,e,v,h,f),n.pipelines.postBatch(e)};p.exports=r},21873:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(91461),l=t(66349),r=t(70498),n=new d({Extends:c,Mixins:[r],initialize:function(s,u,i,a,o,h,f,v,m,x,g){u===void 0&&(u=0),i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=128),h===void 0&&(h=64),f===void 0&&(f=0),v===void 0&&(v=128),m===void 0&&(m=128),c.call(this,s,"Triangle",new l(a,o,h,f,v,m));var y=this.geom.right-this.geom.left,T=this.geom.bottom-this.geom.top;this.setPosition(u,i),this.setSize(y,T),x!==void 0&&this.setFillStyle(x,g),this.updateDisplayOrigin(),this.updateData()},setTo:function(e,s,u,i,a,o){return this.geom.setTo(e,s,u,i,a,o),this.updateData()},updateData:function(){var e=[],s=this.geom,u=this._tempLine;return s.getLineA(u),e.push(u.x1,u.y1,u.x2,u.y2),s.getLineB(u),e.push(u.x2,u.y2),s.getLineC(u),e.push(u.x2,u.y2),this.pathData=e,this}});p.exports=n},60213:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15608),c=t(17876),l=t(49584),r=function(n,e,s,u){s.addToRenderList(e);var i=n.currentContext;if(l(n,i,e,s,u)){var a=e._displayOriginX,o=e._displayOriginY,h=e.geom.x1-a,f=e.geom.y1-o,v=e.geom.x2-a,m=e.geom.y2-o,x=e.geom.x3-a,g=e.geom.y3-o;i.beginPath(),i.moveTo(h,f),i.lineTo(v,m),i.lineTo(x,g),i.closePath(),e.isFilled&&(d(i,e),i.fill()),e.isStroked&&(c(i,e),i.stroke()),i.restore()}};p.exports=r},79296:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(21873);d.register("triangle",function(l,r,n,e,s,u,i,a,o,h){return this.displayList.add(new c(this.scene,l,r,n,e,s,u,i,a,o,h))})},70498:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(72291),l=t(60213),p.exports={renderWebGL:c,renderCanvas:l}},72291:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=t(50262),l=t(75512),r=function(n,e,s,u){s.addToRenderList(e);var i=n.pipelines.set(e.pipeline),a=d(e,s,u);i.calcMatrix.copyFrom(a.calc);var o=e._displayOriginX,h=e._displayOriginY,f=s.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var v=i.fillTint,m=l.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*f);v.TL=m,v.TR=m,v.BL=m,v.BR=m;var x=e.geom.x1-o,g=e.geom.y1-h,y=e.geom.x2-o,T=e.geom.y2-h,E=e.geom.x3-o,C=e.geom.y3-h;i.batchFillTriangle(x,g,y,T,E,C,a.sprite,a.camera)}e.isStroked&&c(i,e,f,o,h),n.pipelines.postBatch(e)};p.exports=r},13747:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16569),c=t(56694),l=t(64937),r=t(89980),n=t(20791),e=new c({Extends:r,Mixins:[l.Alpha,l.BlendMode,l.Depth,l.Flip,l.GetBounds,l.Mask,l.Origin,l.Pipeline,l.PostPipeline,l.ScrollFactor,l.Size,l.TextureCrop,l.Tint,l.Transform,l.Visible,n],initialize:function(u,i,a,o,h){r.call(this,u,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(o,h),this.setPosition(i,a),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(s,u){this.anims.update(s,u)},play:function(s,u){return this.anims.play(s,u)},playReverse:function(s,u){return this.anims.playReverse(s,u)},playAfterDelay:function(s,u){return this.anims.playAfterDelay(s,u)},playAfterRepeat:function(s,u){return this.anims.playAfterRepeat(s,u)},chain:function(s){return this.anims.chain(s)},stop:function(){return this.anims.stop()},stopAfterDelay:function(s){return this.anims.stopAfterDelay(s)},stopAfterRepeat:function(s){return this.anims.stopAfterRepeat(s)},stopOnFrame:function(s){return this.anims.stopOnFrame(s)},toJSON:function(){return l.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});p.exports=e},27573:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){c.addToRenderList(d),t.batchSprite(d,d.frame,c,l)};p.exports=S},89219:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(32291),l=t(99325),r=t(20494),n=t(13747);l.register("sprite",function(e,s){e===void 0&&(e={});var u=r(e,"key",null),i=r(e,"frame",null),a=new n(this.scene,0,0,u,i);return s!==void 0&&(e.add=s),d(this.scene,a,e),c(a,e),a})},66135:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(13747);d.register("sprite",function(l,r,n,e){return this.displayList.add(new c(this.scene,l,r,n,e))})},20791:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(21034),l=t(27573),p.exports={renderWebGL:c,renderCanvas:l}},21034:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){c.addToRenderList(d),d.pipeline.batchSprite(d,c,l)};p.exports=S},32979:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=t.canvas,r=t.context,n=t.style,e=[],s=0,u=c.length;n.maxLines>0&&n.maxLines1&&(a+=t.letterSpacing*(c[i].length-1)),n.wordWrap&&(a-=r.measureText(" ").width),e[i]=Math.ceil(a),s=Math.max(s,e[i])}var o=d.fontSize+n.strokeThickness,h=o*u,f=t.lineSpacing;return u>1&&(h+=f*(u-1)),{width:s,height:h,lines:u,lineWidths:e,lineSpacing:f,lineHeight:o}};p.exports=S},27030:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61068),c=function(l){var r=d.create(this),n=r.getContext("2d",{willReadFrequently:!0});l.syncFont(r,n);var e=n.measureText(l.testString);if("actualBoundingBoxAscent"in e){var s=e.actualBoundingBoxAscent,u=e.actualBoundingBoxDescent;return d.remove(r),{ascent:s,descent:u,fontSize:s+u}}var i=Math.ceil(e.width*l.baselineX),a=i,o=2*a;a=a*l.baselineY|0,r.width=i,r.height=o,n.fillStyle="#f00",n.fillRect(0,0,i,o),n.font=l._font,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(l.testString,0,a);var h={ascent:0,descent:0,fontSize:0},f=n.getImageData(0,0,i,o);if(!f)return h.ascent=a,h.descent=a+6,h.fontSize=h.ascent+h.descent,d.remove(r),h;var v=f.data,m=v.length,x=i*4,g,y,T=0,E=!1;for(g=0;ga;g--){for(y=0;y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(99584),c=t(61068),l=t(56694),r=t(64937),n=t(89980),e=t(32979),s=t(10850),u=t(55638),i=t(80032),a=t(74744),o=new l({Extends:n,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,i],initialize:function(f,v,m,x,g){v===void 0&&(v=0),m===void 0&&(m=0),n.call(this,f,"Text"),this.renderer=f.sys.renderer,this.setPosition(v,m),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=c.create(this),this.context,this.style=new a(this,g),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.letterSpacing=0,this.style.resolution===0&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=f.sys.textures.addCanvas(null,this.canvas,!0),this.context=this.texture.context,this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(x),g&&g.padding&&this.setPadding(g.padding),g&&g.lineSpacing&&this.setLineSpacing(g.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",d(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(h){var f=this.style;if(f.wordWrapCallback){var v=f.wordWrapCallback.call(f.wordWrapCallbackScope,h,this);return Array.isArray(v)&&(v=v.join(` +`)),v}else return f.wordWrapWidth?f.wordWrapUseAdvanced?this.advancedWordWrap(h,this.context,this.style.wordWrapWidth):this.basicWordWrap(h,this.context,this.style.wordWrapWidth):h},advancedWordWrap:function(h,f,v){for(var m="",x=h.replace(/ +/gi," ").split(this.splitRegExp),g=x.length,y=0;yA){if(R===0){for(var N=L;N.length&&(N=N.slice(0,-1),B=f.measureText(N).width,!(B<=A)););if(!N.length)throw new Error("wordWrapWidth < a single character");var U=F.substr(N.length);P[R]=U,E+=N}var z=P[R].length?R:R+1,w=P.slice(z).join(" ").replace(/[ \n]*$/gi,"");x.splice(y+1,0,w),g=x.length;break}else E+=L,A-=B}m+=E.replace(/[ \n]*$/gi,"")+` +`}return m=m.replace(/[\s|\n]*$/gi,""),m},basicWordWrap:function(h,f,v){for(var m="",x=h.split(this.splitRegExp),g=x.length-1,y=f.measureText(" ").width,T=0;T<=g;T++){for(var E=v,C=x[T].split(" "),A=C.length-1,P=0;P<=A;P++){var R=C[P],F=f.measureText(R).width,L=F;PE&&P>0&&(m+=` +`,E=v),m+=R,P0&&(F+=T.lineSpacing*L),v.rtl)R=A-R-E.left-E.right;else if(v.align==="right")R+=C-T.lineWidths[L];else if(v.align==="center")R+=(C-T.lineWidths[L])/2;else if(v.align==="justify"){var B=.85;if(T.lineWidths[L]/T.width>=B){var N=T.width-T.lineWidths[L],U=f.measureText(" ").width,z=y[L].trim(),w=z.split(" ");N+=(y[L].length-z.length)*U;for(var I=Math.floor(N/U),M=0;I>0;)w[M]+=" ",M=(M+1)%(w.length-1||1),--I;y[L]=w.join(" ")}}if(this.autoRound&&(R=Math.round(R),F=Math.round(F)),v.strokeThickness&&(v.syncShadow(f,v.shadowStroke),f.strokeText(y[L],R,F)),v.color){v.syncShadow(f,v.shadowFill);var O=this.letterSpacing;if(O!==0)for(var D=0,G=y[L].split(""),X=0;X{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){d.width===0||d.height===0||(c.addToRenderList(d),t.batchSprite(d,d.frame,c,l))};p.exports=S},75397:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(99325),l=t(20494),r=t(76555);c.register("text",function(n,e){n===void 0&&(n={});var s=l(n,"text",""),u=l(n,"style",null),i=l(n,"padding",null);i!==null&&(u.padding=i);var a=new r(this.scene,0,0,s,u);return e!==void 0&&(n.add=e),d(this.scene,a,n),a.autoRound=l(n,"autoRound",!0),a.resolution=l(n,"resolution",1),a})},94627:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(76555),c=t(61286);c.register("text",function(l,r,n,e){return this.displayList.add(new d(this.scene,l,r,n,e))})},80032:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(76128),l=t(71649),p.exports={renderWebGL:c,renderCanvas:l}},74744:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(20494),l=t(10850),r=t(27030),n={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},e=new d({initialize:function(u,i){this.parent=u,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(i,!1,!0)},setStyle:function(s,u,i){u===void 0&&(u=!0),i===void 0&&(i=!1),s&&s.hasOwnProperty("fontSize")&&typeof s.fontSize=="number"&&(s.fontSize=s.fontSize.toString()+"px");for(var a in n){var o=i?n[a][1]:this[a];a==="wordWrapCallback"||a==="wordWrapCallbackScope"?this[a]=l(s,n[a][0],o):this[a]=c(s,n[a][0],o)}var h=l(s,"font",null);h!==null&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var f=l(s,"fill",null);f!==null&&(this.color=f);var v=l(s,"metrics",!1);return v?this.metrics={ascent:l(v,"ascent",0),descent:l(v,"descent",0),fontSize:l(v,"fontSize",0)}:(u||!this.metrics)&&(this.metrics=r(this)),u?this.parent.updateText():this.parent},syncFont:function(s,u){u.font=this._font},syncStyle:function(s,u){u.textBaseline="alphabetic",u.fillStyle=this.color,u.strokeStyle=this.stroke,u.lineWidth=this.strokeThickness,u.lineCap="round",u.lineJoin="round"},syncShadow:function(s,u){u?(s.shadowOffsetX=this.shadowOffsetX,s.shadowOffsetY=this.shadowOffsetY,s.shadowColor=this.shadowColor,s.shadowBlur=this.shadowBlur):(s.shadowOffsetX=0,s.shadowOffsetY=0,s.shadowColor=0,s.shadowBlur=0)},update:function(s){return s&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=r(this)),this.parent.updateText()},setFont:function(s,u){u===void 0&&(u=!0);var i=s,a="",o="";if(typeof s!="string")i=l(s,"fontFamily","Courier"),a=l(s,"fontSize","16px"),o=l(s,"fontStyle","");else{var h=s.split(" "),f=0;o=h.length>2?h[f++]:"",a=h[f++]||"16px",i=h[f++]||"Courier"}return(i!==this.fontFamily||a!==this.fontSize||o!==this.fontStyle)&&(this.fontFamily=i,this.fontSize=a,this.fontStyle=o,u&&this.update(!0)),this.parent},setFontFamily:function(s){return this.fontFamily!==s&&(this.fontFamily=s,this.update(!0)),this.parent},setFontStyle:function(s){return this.fontStyle!==s&&(this.fontStyle=s,this.update(!0)),this.parent},setFontSize:function(s){return typeof s=="number"&&(s=s.toString()+"px"),this.fontSize!==s&&(this.fontSize=s,this.update(!0)),this.parent},setTestString:function(s){return this.testString=s,this.update(!0)},setFixedSize:function(s,u){return this.fixedWidth=s,this.fixedHeight=u,s&&(this.parent.width=s),u&&(this.parent.height=u),this.update(!1)},setBackgroundColor:function(s){return this.backgroundColor=s,this.update(!1)},setFill:function(s){return this.color=s,this.update(!1)},setColor:function(s){return this.color=s,this.update(!1)},setResolution:function(s){return this.resolution=s,this.update(!1)},setStroke:function(s,u){return u===void 0&&(u=this.strokeThickness),s===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==s||this.strokeThickness!==u)&&(this.stroke=s,this.strokeThickness=u,this.update(!0)),this.parent},setShadow:function(s,u,i,a,o,h){return s===void 0&&(s=0),u===void 0&&(u=0),i===void 0&&(i="#000"),a===void 0&&(a=0),o===void 0&&(o=!1),h===void 0&&(h=!0),this.shadowOffsetX=s,this.shadowOffsetY=u,this.shadowColor=i,this.shadowBlur=a,this.shadowStroke=o,this.shadowFill=h,this.update(!1)},setShadowOffset:function(s,u){return s===void 0&&(s=0),u===void 0&&(u=s),this.shadowOffsetX=s,this.shadowOffsetY=u,this.update(!1)},setShadowColor:function(s){return s===void 0&&(s="#000"),this.shadowColor=s,this.update(!1)},setShadowBlur:function(s){return s===void 0&&(s=0),this.shadowBlur=s,this.update(!1)},setShadowStroke:function(s){return this.shadowStroke=s,this.update(!1)},setShadowFill:function(s){return this.shadowFill=s,this.update(!1)},setWordWrapWidth:function(s,u){return u===void 0&&(u=!1),this.wordWrapWidth=s,this.wordWrapUseAdvanced=u,this.update(!1)},setWordWrapCallback:function(s,u){return u===void 0&&(u=null),this.wordWrapCallback=s,this.wordWrapCallbackScope=u,this.update(!1)},setAlign:function(s){return s===void 0&&(s="left"),this.align=s,this.update(!1)},setMaxLines:function(s){return s===void 0&&(s=0),this.maxLines=s,this.update(!1)},getTextMetrics:function(){var s=this.metrics;return{ascent:s.ascent,descent:s.descent,fontSize:s.fontSize}},toJSON:function(){var s={};for(var u in n)s[u]=this[u];return s.metrics=this.getTextMetrics(),s},destroy:function(){this.parent=void 0}});p.exports=e},76128:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(75512),c=function(l,r,n,e){if(!(r.width===0||r.height===0)){n.addToRenderList(r);var s=r.frame,u=s.width,i=s.height,a=d.getTintAppendFloatAlpha,o=l.pipelines.set(r.pipeline,r),h=o.setTexture2D(s.glTexture,r);o.batchTexture(r,s.glTexture,u,i,r.x,r.y,u/r.style.resolution,i/r.style.resolution,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.displayOriginX,r.displayOriginY,0,0,u,i,a(r.tintTopLeft,n.alpha*r._alphaTL),a(r.tintTopRight,n.alpha*r._alphaTR),a(r.tintBottomLeft,n.alpha*r._alphaBL),a(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,0,0,n,e,!1,h)}};p.exports=c},35856:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61068),c=t(56694),l=t(64937),r=t(89980),n=t(3504),e=t(8213),s=t(9271),u=t(93736),i=8,a=new c({Extends:r,Mixins:[l.Alpha,l.BlendMode,l.ComputedSize,l.Crop,l.Depth,l.Flip,l.GetBounds,l.Mask,l.Origin,l.Pipeline,l.PostPipeline,l.ScrollFactor,l.Tint,l.Transform,l.Visible,s],initialize:function(h,f,v,m,x,g,y){var T=h.sys.renderer;r.call(this,h,"TileSprite");var E=h.sys.textures.get(g),C=E.get(y);C.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),E=h.sys.textures.get("__MISSING"),C=E.get()),E.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),E=h.sys.textures.get("__MISSING"),C=E.get()),!m||!x?(m=C.width,x=C.height):(m=Math.floor(m),x=Math.floor(x)),this._tilePosition=new u,this._tileScale=new u(1,1),this.dirty=!1,this.renderer=T,this.canvas=d.create(this,m,x),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=E,this.displayFrame=C,this._crop=this.resetCropObject(),this.texture=h.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=n(C.width),this.potHeight=n(C.height),this.fillCanvas=d.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(f,v),this.setSize(m,x),this.setFrame(y),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(o,h){return this.displayTexture=this.scene.sys.textures.get(o),this.setFrame(h)},setFrame:function(o){var h=this.displayTexture.get(o);return this.potWidth=n(h.width),this.potHeight=n(h.height),this.canvas.width=0,!h.cutWidth||!h.cutHeight?this.renderFlags&=~i:this.renderFlags|=i,this.displayFrame=h,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(o,h){return o!==void 0&&(this.tilePositionX=o),h!==void 0&&(this.tilePositionY=h),this},setTileScale:function(o,h){return o===void 0&&(o=this.tileScaleX),h===void 0&&(h=o),this.tileScaleX=o,this.tileScaleY=h,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var o=this.displayFrame;if(o.source.isRenderTexture||o.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var h=this.fillContext,f=this.fillCanvas,v=this.potWidth,m=this.potHeight;(!this.renderer||!this.renderer.gl)&&(v=o.cutWidth,m=o.cutHeight),h.clearRect(0,0,v,m),f.width=v,f.height=m,h.drawImage(o.source.image,o.cutX,o.cutY,o.cutWidth,o.cutHeight,0,0,v,m),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(f,this.fillPattern):this.fillPattern=h.createPattern(f,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var o=this.canvas;if((o.width!==this.width||o.height!==this.height)&&(o.width=this.width,o.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var h=this.context;this.scene.sys.game.config.antialias||e.disable(h);var f=this._tileScale.x,v=this._tileScale.y,m=this._tilePosition.x,x=this._tilePosition.y;h.clearRect(0,0,this.width,this.height),h.save(),h.scale(f,v),h.translate(-m,-x),h.fillStyle=this.fillPattern,h.fillRect(m,x,this.width/f,this.height/v),h.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),d.remove(this.canvas),d.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(o){this._tilePosition.x=o,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(o){this._tilePosition.y=o,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(o){this._tileScale.x=o,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(o){this._tileScale.y=o,this.dirty=!0}}});p.exports=a},93305:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){d.updateCanvas(),c.addToRenderList(d),t.batchSprite(d,d.frame,c,l)};p.exports=S},63950:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(99325),l=t(20494),r=t(35856);c.register("tileSprite",function(n,e){n===void 0&&(n={});var s=l(n,"x",0),u=l(n,"y",0),i=l(n,"width",512),a=l(n,"height",512),o=l(n,"key",""),h=l(n,"frame",""),f=new r(this.scene,s,u,i,a,o,h);return e!==void 0&&(n.add=e),d(this.scene,f,n),f})},20509:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35856),c=t(61286);c.register("tileSprite",function(l,r,n,e,s,u){return this.displayList.add(new d(this.scene,l,r,n,e,s,u))})},9271:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(74287),l=t(93305),p.exports={renderWebGL:c,renderCanvas:l}},74287:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(75512),c=function(l,r,n,e){r.updateCanvas();var s=r.width,u=r.height;if(!(s===0||u===0)){n.addToRenderList(r);var i=d.getTintAppendFloatAlpha,a=l.pipelines.set(r.pipeline,r),o=a.setTexture2D(r.fillPattern,r);a.batchTexture(r,r.fillPattern,r.displayFrame.width*r.tileScaleX,r.displayFrame.height*r.tileScaleY,r.x,r.y,s,u,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.originX*s,r.originY*u,0,0,s,u,i(r.tintTopLeft,n.alpha*r._alphaTL),i(r.tintTopRight,n.alpha*r._alphaTR),i(r.tintBottomLeft,n.alpha*r._alphaBL),i(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,r.tilePositionX%r.displayFrame.width/r.displayFrame.width,r.tilePositionY%r.displayFrame.height/r.displayFrame.height,n,e,!1,o)}};p.exports=c},8630:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=t(56694),l=t(64937),r=t(56631),n=t(97081),e=t(89980),s=t(83392),u=t(76038),i=t(76583),a=t(77974),o=new c({Extends:e,Mixins:[l.Alpha,l.BlendMode,l.Depth,l.Flip,l.GetBounds,l.Mask,l.Origin,l.Pipeline,l.PostPipeline,l.ScrollFactor,l.Size,l.TextureCrop,l.Tint,l.Transform,l.Visible,a],initialize:function(f,v,m,x){e.call(this,f,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=i(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.metadata,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._rfvCallbackId=0;var g=f.sys.game;this._device=g.device.video,this.setPosition(v,m),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),g.events.on(n.PAUSE,this.globalPause,this),g.events.on(n.RESUME,this.globalResume,this);var y=f.sys.sound;y&&y.on(u.GLOBAL_MUTE,this.globalMute,this),x&&this.load(x)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(h){var f=this.scene.sys.cache.video.get(h);return f?(this.cacheKey=h,this.loadHandler(f.url,f.noAudio,f.crossOrigin)):console.warn("No video in cache for key: "+h),this},changeSource:function(h,f,v,m,x){f===void 0&&(f=!0),v===void 0&&(v=!1),this.cacheKey!==h&&(this.load(h),f&&this.play(v,m,x))},getVideoKey:function(){return this.cacheKey},loadURL:function(h,f,v){f===void 0&&(f=!1);var m=this._device.getVideoURL(h);return m?(this.cacheKey="",this.loadHandler(m.url,f,v)):console.warn("No supported video format found for "+h),this},loadMediaStream:function(h,f,v){return this.loadHandler(null,f,v,h)},loadHandler:function(h,f,v,m){f||(f=!1);var x=this.video;if(x?(this.removeLoadEventHandlers(),this.stop()):(x=document.createElement("video"),x.controls=!1,x.setAttribute("playsinline","playsinline"),x.setAttribute("preload","auto"),x.setAttribute("disablePictureInPicture","true")),f?(x.muted=!0,x.defaultMuted=!0,x.setAttribute("autoplay","autoplay")):(x.muted=!1,x.defaultMuted=!1,x.removeAttribute("autoplay")),v?x.setAttribute("crossorigin",v):x.removeAttribute("crossorigin"),m)if("srcObject"in x)try{x.srcObject=m}catch(g){if(g.name!=="TypeError")throw g;x.src=URL.createObjectURL(m)}else x.src=URL.createObjectURL(m);else x.src=h;return this.addLoadEventHandlers(),this.retry=0,this.video=x,this._playCalled=!1,x.load(),this},requestVideoFrame:function(h,f){var v=this.video;if(v){var m=f.width,x=f.height,g=this.videoTexture,y=this.videoTextureSource,T=!g||y.source!==v;T?(this._codePaused=v.paused,this._codeMuted=v.muted,g?(y.source=v,y.width=m,y.height=x,g.get().setSize(m,x)):(g=this.scene.sys.textures.create(this._key,v,m,x),g.add("__BASE",0,0,0,m,x),this.setTexture(g),this.videoTexture=g,this.videoTextureSource=g.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(r.VIDEO_TEXTURE,this,g)),this.setSizeToFrame(),this.updateDisplayOrigin()):y.update(),this.isStalled=!1,this.metadata=f;var E=f.mediaTime;T&&(this._lastUpdate=E,this.emit(r.VIDEO_CREATED,this,m,x),this.frameReady||(this.frameReady=!0,this.emit(r.VIDEO_PLAY,this))),this._playingMarker?E>=this._markerOut&&(v.loop?(v.currentTime=this._markerIn,this.emit(r.VIDEO_LOOP,this)):(this.stop(!1),this.emit(r.VIDEO_COMPLETE,this))):E-1&&v>f&&v=0&&!isNaN(v)&&v>f&&(this.markers[h]=[f,v]),this},playMarker:function(h,f){var v=this.markers[h];return v&&this.play(f,v[0],v[1]),this},removeMarker:function(h){return delete this.markers[h],this},snapshot:function(h,f){return h===void 0&&(h=this.width),f===void 0&&(f=this.height),this.snapshotArea(0,0,this.width,this.height,h,f)},snapshotArea:function(h,f,v,m,x,g){h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=this.width),m===void 0&&(m=this.height),x===void 0&&(x=v),g===void 0&&(g=m);var y=this.video,T=this.snapshotTexture;return T?(T.setSize(x,g),y&&T.context.drawImage(y,h,f,v,m,0,0,x,g)):(T=this.scene.sys.textures.createCanvas(i(),x,g),this.snapshotTexture=T,y&&T.context.drawImage(y,h,f,v,m,0,0,x,g)),T.update()},saveSnapshotTexture:function(h){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,h):this.snapshotTexture=this.scene.sys.textures.createCanvas(h,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(r.VIDEO_UNLOCKED,this));var h=this.scene.sys.sound;h&&h.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(h){var f=h.name;f==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(r.VIDEO_LOCKED,this)):f==="NotSupportedError"?(this.stop(!1),this.emit(r.VIDEO_UNSUPPORTED,this,h)):(this.stop(!1),this.emit(r.VIDEO_ERROR,this,h))},legacyPlayHandler:function(){var h=this.video;h&&(this.playSuccess(),h.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(r.VIDEO_PLAYING,this)},loadErrorHandler:function(h){this.stop(!1),this.emit(r.VIDEO_ERROR,this,h)},stalledHandler:function(h){this.isStalled=!0,this.emit(r.VIDEO_STALLED,this,h)},completeHandler:function(){this._playCalled=!1,this.emit(r.VIDEO_COMPLETE,this)},preUpdate:function(h,f){var v=this.video;!v||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=f,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(h){var f=this.video;if(f){var v=f.duration;if(v!==1/0&&!isNaN(v)){var m=v*h;this.setCurrentTime(m)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(h){var f=this.video;if(f){if(typeof h=="string"){var v=h[0],m=parseFloat(h.substr(1));v==="+"?h=f.currentTime+m:v==="-"&&(h=f.currentTime-m)}f.currentTime=h}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(r.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(r.VIDEO_SEEKED,this)},getProgress:function(){var h=this.video;if(h){var f=h.duration;if(f!==1/0&&!isNaN(f))return h.currentTime/f}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(h){h===void 0&&(h=!0),this._codeMuted=h;var f=this.video;return f&&(f.muted=this._systemMuted?!0:h),this},isMuted:function(){return this._codeMuted},globalMute:function(h,f){this._systemMuted=f;var v=this.video;v&&(v.muted=this._codeMuted?!0:f)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&!this.video.ended&&this.createPlayPromise()},setPaused:function(h){h===void 0&&(h=!0);var f=this.video;return this._codePaused=h,f&&!f.ended&&(h?f.paused||(this.removeEventHandlers(),f.pause()):h||(this._playCalled?f.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(h){return h===void 0&&(h=1),this.video&&(this.video.volume=d(h,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(h){return this.video&&(this.video.playbackRate=h),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(h){return h===void 0&&(h=!0),this.video&&(this.video.loop=h),this},isPlaying:function(){return this.video?!(this.video.paused||this.video.ended):!1},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(h,f){return f===void 0&&(f=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,h),this.videoTextureSource.setFlipY(f)),this._key=h,this.flipY=f,!!this.videoTexture},stop:function(h){h===void 0&&(h=!0);var f=this.video;return f&&(this.removeEventHandlers(),f.cancelVideoFrameCallback(this._rfvCallbackId),f.pause()),this.retry=0,this._playCalled=!1,h&&this.emit(r.VIDEO_STOP,this),this},removeVideoElement:function(){var h=this.video;if(h){for(h.parentNode&&h.parentNode.removeChild(h);h.hasChildNodes();)h.removeChild(h.firstChild);h.removeAttribute("autoplay"),h.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var h=this.scene.sys.game.events;h.off(n.PAUSE,this.globalPause,this),h.off(n.RESUME,this.globalResume,this);var f=this.scene.sys.sound;f&&f.off(u.GLOBAL_MUTE,this.globalMute,this)}});p.exports=o},56933:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){d.videoTexture&&(c.addToRenderList(d),t.batchSprite(d,d.frame,c,l))};p.exports=S},65601:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88933),c=t(99325),l=t(20494),r=t(8630);c.register("video",function(n,e){n===void 0&&(n={});var s=l(n,"key",null),u=new r(this.scene,0,0,s);return e!==void 0&&(n.add=e),d(this.scene,u,n),u})},215:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8630),c=t(61286);c.register("video",function(l,r,n){return this.displayList.add(new d(this.scene,l,r,n))})},77974:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(83572),l=t(56933),p.exports={renderWebGL:c,renderCanvas:l}},83572:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){d.videoTexture&&(c.addToRenderList(d),d.pipeline.batchSprite(d,c,l))};p.exports=S},71030:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95723),c=t(26673),l=t(65650),r=t(56694),n=t(64937),e=t(89980),s=t(74118),u=t(94287),i=new r({Extends:e,Mixins:[n.Depth,n.GetBounds,n.Origin,n.Transform,n.ScrollFactor,n.Visible],initialize:function(o,h,f,v,m){v===void 0&&(v=1),m===void 0&&(m=v),e.call(this,o,"Zone"),this.setPosition(h,f),this.width=v,this.height=m,this.blendMode=d.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(a){this.scaleX=a/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(a){this.scaleY=a/this.height}},setSize:function(a,o,h){h===void 0&&(h=!0),this.width=a,this.height=o,this.updateDisplayOrigin();var f=this.input;return h&&f&&!f.customHitArea&&(f.hitArea.width=a,f.hitArea.height=o),this},setDisplaySize:function(a,o){return this.displayWidth=a,this.displayHeight=o,this},setCircleDropZone:function(a){return this.setDropZone(new c(0,0,a),l)},setRectangleDropZone:function(a,o){return this.setDropZone(new s(0,0,a,o),u)},setDropZone:function(a,o){return this.input||this.setInteractive(a,o,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(a,o,h){h.addToRenderList(o)},renderWebGL:function(a,o,h){h.addToRenderList(o)}});p.exports=i},24067:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(99325),c=t(20494),l=t(71030);d.register("zone",function(r){var n=c(r,"x",0),e=c(r,"y",0),s=c(r,"width",1),u=c(r,"height",s);return new l(this.scene,n,e,s,u)})},34546:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(71030),c=t(61286);c.register("zone",function(l,r,n,e){return this.displayList.add(new d(this.scene,l,r,n,e))})},95847:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0};p.exports=S},26673:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(65650),l=t(94026),r=t(62941),n=t(52394),e=t(30977),s=new d({initialize:function(i,a,o){i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=0),this.type=n.CIRCLE,this.x=i,this.y=a,this._radius=o,this._diameter=o*2},contains:function(u,i){return c(this,u,i)},getPoint:function(u,i){return l(this,u,i)},getPoints:function(u,i,a){return r(this,u,i,a)},getRandomPoint:function(u){return e(this,u)},setTo:function(u,i,a){return this.x=u,this.y=i,this._radius=a,this._diameter=a*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(u,i){return i===void 0&&(i=u),this.x=u,this.y=i,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(u){this._radius=u,this._diameter=u*2}},diameter:{get:function(){return this._diameter},set:function(u){this._diameter=u,this._radius=u*.5}},left:{get:function(){return this.x-this._radius},set:function(u){this.x=u+this._radius}},right:{get:function(){return this.x+this._radius},set:function(u){this.x=u-this._radius}},top:{get:function(){return this.y-this._radius},set:function(u){this.y=u+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(u){this.y=u-this._radius}}});p.exports=s},37964:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return 2*(Math.PI*t.radius)};p.exports=S},72233:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r,n){return n===void 0&&(n=new d),n.x=l.x+l.radius*Math.cos(r),n.y=l.y+l.radius*Math.sin(r),n};p.exports=c},61761:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26673),c=function(l){return new d(l.x,l.y,l.radius)};p.exports=c},65650:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(t.radius>0&&d>=t.left&&d<=t.right&&c>=t.top&&c<=t.bottom){var l=(t.x-d)*(t.x-d),r=(t.y-c)*(t.y-c);return l+r<=t.radius*t.radius}else return!1};p.exports=S},39187:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65650),c=function(l,r){return d(l,r.x,r.y)};p.exports=c},58672:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65650),c=function(l,r){return d(l,r.x,r.y)&&d(l,r.right,r.y)&&d(l,r.x,r.bottom)&&d(l,r.right,r.bottom)};p.exports=c},42997:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.setTo(t.x,t.y,t.radius)};p.exports=S},94894:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.radius===d.radius};p.exports=S},48027:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118),c=function(l,r){return r===void 0&&(r=new d),r.x=l.left,r.y=l.top,r.width=l.diameter,r.height=l.diameter,r};p.exports=c},94026:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72233),c=t(91806),l=t(83392),r=t(79967),n=function(e,s,u){u===void 0&&(u=new r);var i=c(s,0,l.PI2);return d(e,i,u)};p.exports=n},62941:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37964),c=t(72233),l=t(91806),r=t(83392),n=function(e,s,u,i){i===void 0&&(i=[]),!s&&u>0&&(s=d(e)/u);for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S},88665:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S},30977:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r){r===void 0&&(r=new d);var n=2*Math.PI*Math.random(),e=Math.random()+Math.random(),s=e>1?2-e:e,u=s*Math.cos(n),i=s*Math.sin(n);return r.x=l.x+u*l.radius,r.y=l.y+i*l.radius,r};p.exports=c},6112:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26673);d.Area=t(95847),d.Circumference=t(37964),d.CircumferencePoint=t(72233),d.Clone=t(61761),d.Contains=t(65650),d.ContainsPoint=t(39187),d.ContainsRect=t(58672),d.CopyFrom=t(42997),d.Equals=t(94894),d.GetBounds=t(48027),d.GetPoint=t(94026),d.GetPoints=t(62941),d.Offset=t(34585),d.OffsetPoint=t(88665),d.Random=t(30977),p.exports=d},52394:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};p.exports=S},58605:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI};p.exports=S},39507:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d=t.width/2,c=t.height/2,l=Math.pow(d-c,2)/Math.pow(d+c,2);return Math.PI*(d+c)*(1+3*l/(10+Math.sqrt(4-3*l)))};p.exports=S},86998:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r,n){n===void 0&&(n=new d);var e=l.width/2,s=l.height/2;return n.x=l.x+e*Math.cos(r),n.y=l.y+s*Math.sin(r),n};p.exports=c},81773:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95669),c=function(l){return new d(l.x,l.y,l.width,l.height)};p.exports=c},72313:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(t.width<=0||t.height<=0)return!1;var l=(d-t.x)/t.width,r=(c-t.y)/t.height;return l*=l,r*=r,l+r<.25};p.exports=S},34368:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72313),c=function(l,r){return d(l,r.x,r.y)};p.exports=c},71431:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72313),c=function(l,r){return d(l,r.x,r.y)&&d(l,r.right,r.y)&&d(l,r.x,r.bottom)&&d(l,r.right,r.bottom)};p.exports=c},75459:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.setTo(t.x,t.y,t.width,t.height)};p.exports=S},95669:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72313),l=t(95340),r=t(54978),n=t(52394),e=t(72006),s=new d({initialize:function(i,a,o,h){i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=0),h===void 0&&(h=0),this.type=n.ELLIPSE,this.x=i,this.y=a,this.width=o,this.height=h},contains:function(u,i){return c(this,u,i)},getPoint:function(u,i){return l(this,u,i)},getPoints:function(u,i,a){return r(this,u,i,a)},getRandomPoint:function(u){return e(this,u)},setTo:function(u,i,a,o){return this.x=u,this.y=i,this.width=a,this.height=o,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(u,i){return i===void 0&&(i=u),this.x=u,this.y=i,this},setSize:function(u,i){return i===void 0&&(i=u),this.width=u,this.height=i,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(u){this.x=u+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(u){this.x=u-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(u){this.y=u+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(u){this.y=u-this.height/2}}});p.exports=s},98068:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.width===d.width&&t.height===d.height};p.exports=S},72897:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118),c=function(l,r){return r===void 0&&(r=new d),r.x=l.left,r.y=l.top,r.width=l.width,r.height=l.height,r};p.exports=c},95340:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(86998),c=t(91806),l=t(83392),r=t(79967),n=function(e,s,u){u===void 0&&(u=new r);var i=c(s,0,l.PI2);return d(e,i,u)};p.exports=n},54978:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(39507),c=t(86998),l=t(91806),r=t(83392),n=function(e,s,u,i){i===void 0&&(i=[]),!s&&u>0&&(s=d(e)/u);for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S},36233:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S},72006:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r){r===void 0&&(r=new d);var n=Math.random()*Math.PI*2,e=Math.sqrt(Math.random());return r.x=l.x+e*Math.cos(n)*l.width/2,r.y=l.y+e*Math.sin(n)*l.height/2,r};p.exports=c},40652:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95669);d.Area=t(58605),d.Circumference=t(39507),d.CircumferencePoint=t(86998),d.Clone=t(81773),d.Contains=t(72313),d.ContainsPoint=t(34368),d.ContainsRect=t(71431),d.CopyFrom=t(75459),d.Equals=t(98068),d.GetBounds=t(72897),d.GetPoint=t(95340),d.GetPoints=t(54978),d.Offset=t(77951),d.OffsetPoint=t(36233),d.Random=t(72006),p.exports=d},84068:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(52394),c=t(98611),l={Circle:t(6112),Ellipse:t(40652),Intersects:t(7563),Line:t(28482),Mesh:t(14293),Point:t(63472),Polygon:t(44359),Rectangle:t(66658),Triangle:t(87619)};l=c(!1,l,d),p.exports=l},22184:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(53996),c=function(l,r){return d(l.x,l.y,r.x,r.y)<=l.radius+r.radius};p.exports=c},26535:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=d.width/2,l=d.height/2,r=Math.abs(t.x-d.x-c),n=Math.abs(t.y-d.y-l),e=c+t.radius,s=l+t.radius;if(r>e||n>s)return!1;if(r<=c||n<=l)return!0;var u=r-c,i=n-l,a=u*u,o=i*i,h=t.radius*t.radius;return a+o<=h};p.exports=S},71145:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=t(22184),l=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.x,u=r.y,i=r.radius,a=n.x,o=n.y,h=n.radius,f,v,m,x,g;if(u===o)g=(h*h-i*i-a*a+s*s)/(2*(s-a)),f=1,v=-2*o,m=a*a+g*g-2*a*g+o*o-h*h,x=v*v-4*f*m,x===0?e.push(new d(g,-v/(2*f))):x>0&&(e.push(new d(g,(-v+Math.sqrt(x))/(2*f))),e.push(new d(g,(-v-Math.sqrt(x))/(2*f))));else{var y=(s-a)/(u-o),T=(h*h-i*i-a*a+s*s-o*o+u*u)/(2*(u-o));f=y*y+1,v=2*u*y-2*T*y-2*s,m=s*s+u*u+T*T-i*i-2*u*T,x=v*v-4*f*m,x===0?(g=-v/(2*f),e.push(new d(g,T-g*y))):x>0&&(g=(-v+Math.sqrt(x))/(2*f),e.push(new d(g,T-g*y)),g=(-v-Math.sqrt(x))/(2*f),e.push(new d(g,T-g*y)))}}return e};p.exports=l},62508:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26111),c=t(26535),l=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=n.getLineA(),u=n.getLineB(),i=n.getLineC(),a=n.getLineD();d(s,r,e),d(u,r,e),d(i,r,e),d(a,r,e)}return e};p.exports=l},26111:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=t(61472),l=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.x1,u=r.y1,i=r.x2,a=r.y2,o=n.x,h=n.y,f=n.radius,v=i-s,m=a-u,x=s-o,g=u-h,y=v*v+m*m,T=2*(v*x+m*g),E=x*x+g*g-f*f,C=T*T-4*y*E,A,P;if(C===0){var R=-T/(2*y);A=s+R*v,P=u+R*m,R>=0&&R<=1&&e.push(new d(A,P))}else if(C>0){var F=(-T-Math.sqrt(C))/(2*y);A=s+F*v,P=u+F*m,F>=0&&F<=1&&e.push(new d(A,P));var L=(-T+Math.sqrt(C))/(2*y);A=s+L*v,P=u+L*m,L>=0&&L<=1&&e.push(new d(A,P))}}return e};p.exports=l},96537:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70015),c=function(l,r,n,e){n===void 0&&(n=!1);var s=l.x1,u=l.y1,i=l.x2,a=l.y2,o=r.x1,h=r.y1,f=r.x2,v=r.y2,m=i-s,x=a-u,g=f-o,y=v-h,T=m*y-x*g;if(T===0)return null;var E,C,A;if(n){if(E=(m*(h-u)+x*(s-o))/(g*x-y*m),C=(o+g*E-s)/m,C<0||E<0||E>1)return null;A=C}else{if(E=((o-s)*y-(h-u)*g)/T,C=((u-h)*m-(s-o)*x)/T,E<0||E>1||C<0||C>1)return null;A=E}return e===void 0&&(e=new d),e.set(s+m*A,u+x*A,A)};p.exports=c},17647:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(96537),c=t(88829),l=t(70015),r=new c,n=new l,e=function(s,u,i,a){i===void 0&&(i=!1),a===void 0&&(a=new l);var o=!1;a.set(),n.set();for(var h=u[u.length-1],f=0;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70015),c=t(51729),l=t(17647),r=new d,n=function(e,s,u,i){i===void 0&&(i=new c),Array.isArray(s)||(s=[s]);var a=!1;i.set(),r.set();for(var o=0;o{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=t(25227),l=t(47910),r=function(n,e,s){if(s===void 0&&(s=[]),l(n,e))for(var u=e.getLineA(),i=e.getLineB(),a=e.getLineC(),o=e.getLineD(),h=[new d,new d,new d,new d],f=[c(u,n,h[0]),c(i,n,h[1]),c(a,n,h[2]),c(o,n,h[3])],v=0;v<4;v++)f[v]&&s.push(h[v]);return s};p.exports=r},7449:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(51729),c=t(68439),l=t(88829),r=new l;function n(u,i,a,o,h){var f=Math.cos(u),v=Math.sin(u);r.setTo(i,a,i+f,a+v);var m=c(r,o,!0);m&&h.push(new d(m.x,m.y,u,m.w))}function e(u,i){return u.z-i.z}var s=function(u,i,a){Array.isArray(a)||(a=[a]);for(var o=[],h=[],f=0;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118),c=t(90205),l=function(r,n,e){return e===void 0&&(e=new d),c(r,n)&&(e.x=Math.max(r.x,n.x),e.y=Math.max(r.y,n.y),e.width=Math.min(r.right,n.right)-e.x,e.height=Math.min(r.bottom,n.bottom)-e.y),e};p.exports=l},1946:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(9569),c=t(90205),l=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.getLineA(),u=r.getLineB(),i=r.getLineC(),a=r.getLineD();d(s,n,e),d(u,n,e),d(i,n,e),d(a,n,e)}return e};p.exports=l},34211:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(20370),c=t(9569),l=function(r,n,e){if(e===void 0&&(e=[]),d(r,n)){var s=n.getLineA(),u=n.getLineB(),i=n.getLineC();c(s,r,e),c(u,r,e),c(i,r,e)}return e};p.exports=l},80511:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26111),c=t(48411),l=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var s=r.getLineA(),u=r.getLineB(),i=r.getLineC();d(s,n,e),d(u,n,e),d(i,n,e)}return e};p.exports=l},31343:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=t(86117),l=t(25227),r=function(n,e,s){if(s===void 0&&(s=[]),c(n,e))for(var u=n.getLineA(),i=n.getLineB(),a=n.getLineC(),o=[new d,new d,new d],h=[l(u,e,o[0]),l(i,e,o[1]),l(a,e,o[2])],f=0;f<3;f++)h[f]&&s.push(o[f]);return s};p.exports=r},70534:(p,S,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(23589),c=t(31343),l=function(r,n,e){if(e===void 0&&(e=[]),d(r,n)){var s=n.getLineA(),u=n.getLineB(),i=n.getLineC();c(r,s,e),c(r,u,e),c(r,i,e)}return e};p.exports=l},61472:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65650),c=t(79967),l=new c,r=function(n,e,s){if(s===void 0&&(s=l),d(e,n.x1,n.y1))return s.x=n.x1,s.y=n.y1,!0;if(d(e,n.x2,n.y2))return s.x=n.x2,s.y=n.y2,!0;var u=n.x2-n.x1,i=n.y2-n.y1,a=e.x-n.x1,o=e.y-n.y1,h=u*u+i*i,f=u,v=i;if(h>0){var m=(a*u+o*i)/h;f*=m,v*=m}s.x=n.x1+f,s.y=n.y1+v;var x=f*f+v*v;return x<=h&&f*u+v*i>=0&&d(e,s.x,s.y)};p.exports=r},25227:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=t.x1,r=t.y1,n=t.x2,e=t.y2,s=d.x1,u=d.y1,i=d.x2,a=d.y2;if(l===n&&r===e||s===i&&u===a)return!1;var o=(a-u)*(n-l)-(i-s)*(e-r);if(o===0)return!1;var h=((i-s)*(r-u)-(a-u)*(l-s))/o,f=((n-l)*(r-u)-(e-r)*(l-s))/o;return h<0||h>1||f<0||f>1?!1:(c&&(c.x=l+h*(n-l),c.y=r+h*(e-r)),!0)};p.exports=S},47910:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.x1,l=t.y1,r=t.x2,n=t.y2,e=d.x,s=d.y,u=d.right,i=d.bottom,a=0;if(c>=e&&c<=u&&l>=s&&l<=i||r>=e&&r<=u&&n>=s&&n<=i)return!0;if(c=e){if(a=l+(n-l)*(e-c)/(r-c),a>s&&a<=i)return!0}else if(c>u&&r<=u&&(a=l+(n-l)*(u-c)/(r-c),a>=s&&a<=i))return!0;if(l=s){if(a=c+(r-c)*(s-l)/(n-l),a>=e&&a<=u)return!0}else if(l>i&&n<=i&&(a=c+(r-c)*(i-l)/(n-l),a>=e&&a<=u))return!0;return!1};p.exports=S},34426:p=>{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){c===void 0&&(c=1);var l=d.x1,r=d.y1,n=d.x2,e=d.y2,s=t.x,u=t.y,i=(n-l)*(n-l)+(e-r)*(e-r);if(i===0)return!1;var a=((s-l)*(n-l)+(u-r)*(e-r))/i;if(a<0)return Math.sqrt((l-s)*(l-s)+(r-u)*(r-u))<=c;if(a>=0&&a<=1){var o=((r-u)*(n-l)-(l-s)*(e-r))/i;return Math.abs(o)*Math.sqrt(i)<=c}else return Math.sqrt((n-s)*(n-s)+(e-u)*(e-u))<=c};p.exports=S},81414:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(34426),c=function(l,r){if(!d(l,r))return!1;var n=Math.min(r.x1,r.x2),e=Math.max(r.x1,r.x2),s=Math.min(r.y1,r.y2),u=Math.max(r.y1,r.y2);return l.x>=n&&l.x<=e&&l.y>=s&&l.y<=u};p.exports=c},90205:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.width<=0||t.height<=0||d.width<=0||d.height<=0?!1:!(t.rightd.right||t.y>d.bottom)};p.exports=S},20370:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25227),c=t(94287),l=t(86875),r=t(87279),n=function(e,s){if(s.left>e.right||s.righte.bottom||s.bottom0};p.exports=n},8786:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r,n){return n===void 0&&(n=0),!(d>t.right+n||ct.bottom+n||r{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61472),c=t(60689),l=function(r,n){return r.left>n.right||r.rightn.bottom||r.bottom{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25227),c=function(l,r){return!!(l.contains(r.x1,r.y1)||l.contains(r.x2,r.y2)||d(l.getLineA(),r)||d(l.getLineB(),r)||d(l.getLineC(),r))};p.exports=c},23589:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(86875),c=t(18680),l=t(25227),r=function(n,e){if(n.left>e.right||n.righte.bottom||n.bottom0||(f=c(e),v=d(n,f,!0),v.length>0)};p.exports=r},7563:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CircleToCircle:t(22184),CircleToRectangle:t(26535),GetCircleToCircle:t(71145),GetCircleToRectangle:t(62508),GetLineToCircle:t(26111),GetLineToLine:t(96537),GetLineToPoints:t(17647),GetLineToPolygon:t(68439),GetLineToRectangle:t(9569),GetRaysFromPointToPolygon:t(7449),GetRectangleIntersection:t(82931),GetRectangleToRectangle:t(1946),GetRectangleToTriangle:t(34211),GetTriangleToCircle:t(80511),GetTriangleToLine:t(31343),GetTriangleToTriangle:t(70534),LineToCircle:t(61472),LineToLine:t(25227),LineToRectangle:t(47910),PointToLine:t(34426),PointToLineSegment:t(81414),RectangleToRectangle:t(90205),RectangleToTriangle:t(20370),RectangleToValues:t(8786),TriangleToCircle:t(48411),TriangleToLine:t(86117),TriangleToTriangle:t(23589)}},50599:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)};p.exports=S},58813:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){d===void 0&&(d=1),c===void 0&&(c=[]);var l=Math.round(t.x1),r=Math.round(t.y1),n=Math.round(t.x2),e=Math.round(t.y2),s=Math.abs(n-l),u=Math.abs(e-r),i=l-u&&(o-=u,l+=i),f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=d-(t.x1+t.x2)/2,r=c-(t.y1+t.y2)/2;return t.x1+=l,t.y1+=r,t.x2+=l,t.y2+=r,t};p.exports=S},26718:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88829),c=function(l){return new d(l.x1,l.y1,l.x2,l.y2)};p.exports=c},88930:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.setTo(t.x1,t.y1,t.x2,t.y2)};p.exports=S},90656:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x1===d.x1&&t.y1===d.y1&&t.x2===d.x2&&t.y2===d.y2};p.exports=S},30897:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16028),c=function(l,r,n){n===void 0&&(n=r);var e=d(l),s=l.x2-l.x1,u=l.y2-l.y1;return r&&(l.x1=l.x1-s/e*r,l.y1=l.y1-u/e*r),n&&(l.x2=l.x2+s/e*n,l.y2=l.y2+u/e*n),l};p.exports=c},30684:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(92951),c=t(21902),l=t(79967),r=function(n,e,s,u,i){u===void 0&&(u=0),i===void 0&&(i=[]);var a=[],o=n.x1,h=n.y1,f=n.x2-o,v=n.y2-h,m=c(e,i),x,g,y=s-1;for(x=0;x0){var T=a[0],E=[T];for(x=1;x=u&&(E.push(C),T=C)}var A=a[a.length-1];return d(T,A){/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r){return r===void 0&&(r=new d),r.x=(l.x1+l.x2)/2,r.y=(l.y1+l.y2)/2,r};p.exports=c},11222:(p,S,t)=>{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r,n){n===void 0&&(n=new d);var e=l.x1,s=l.y1,u=l.x2,i=l.y2,a=(u-e)*(u-e)+(i-s)*(i-s);if(a===0)return n;var o=((r.x-e)*(u-e)+(r.y-s)*(i-s))/a;return n.x=e+o*(u-e),n.y=s+o*(i-s),n};p.exports=c},7377:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83392),c=t(50599),l=t(79967),r=function(n,e){e===void 0&&(e=new l);var s=c(n)-d.TAU;return e.x=Math.cos(s),e.y=Math.sin(s),e};p.exports=r},66464:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r,n){return n===void 0&&(n=new d),n.x=l.x1+(l.x2-l.x1)*r,n.y=l.y1+(l.y2-l.y1)*r,n};p.exports=c},8570:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16028),c=t(79967),l=function(r,n,e,s){s===void 0&&(s=[]),!n&&e>0&&(n=d(r)/e);for(var u=r.x1,i=r.y1,a=r.x2,o=r.y2,h=0;h{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.x1,l=t.y1,r=t.x2,n=t.y2,e=(r-c)*(r-c)+(n-l)*(n-l);if(e===0)return!1;var s=((l-d.y)*(r-c)-(c-d.x)*(n-l))/e;return Math.abs(s)*Math.sqrt(e)};p.exports=S},82996:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return Math.abs(t.y1-t.y2)};p.exports=S},16028:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))};p.exports=S},88829:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(66464),l=t(8570),r=t(52394),n=t(74077),e=t(93736),s=new d({initialize:function(i,a,o,h){i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=0),h===void 0&&(h=0),this.type=r.LINE,this.x1=i,this.y1=a,this.x2=o,this.y2=h},getPoint:function(u,i){return c(this,u,i)},getPoints:function(u,i,a){return l(this,u,i,a)},getRandomPoint:function(u){return n(this,u)},setTo:function(u,i,a,o){return u===void 0&&(u=0),i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=0),this.x1=u,this.y1=i,this.x2=a,this.y2=o,this},setFromObjects:function(u,i){return this.x1=u.x,this.y1=u.y,this.x2=i.x,this.y2=i.y,this},getPointA:function(u){return u===void 0&&(u=new e),u.set(this.x1,this.y1),u},getPointB:function(u){return u===void 0&&(u=new e),u.set(this.x2,this.y2),u},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(u){this.x1<=this.x2?this.x1=u:this.x2=u}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(u){this.x1>this.x2?this.x1=u:this.x2=u}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(u){this.y1<=this.y2?this.y1=u:this.y2=u}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(u){this.y1>this.y2?this.y1=u:this.y2=u}}});p.exports=s},73273:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83392),c=t(1071),l=t(50599),r=function(n){var e=l(n)-d.TAU;return c(e,-Math.PI,Math.PI)};p.exports=r},96936:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83392),c=t(50599),l=function(r){return Math.cos(c(r)-d.TAU)};p.exports=l},43581:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83392),c=t(50599),l=function(r){return Math.sin(c(r)-d.TAU)};p.exports=l},13990:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.x1+=d,t.y1+=c,t.x2+=d,t.y2+=c,t};p.exports=S},1298:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))};p.exports=S},74077:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r){r===void 0&&(r=new d);var n=Math.random();return r.x=l.x1+n*(l.x2-l.x1),r.y=l.y1+n*(l.y2-l.y1),r};p.exports=c},30473:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50599),c=t(73273),l=function(r,n){return 2*c(n)-Math.PI-d(r)};p.exports=l},25968:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(1809),c=function(l,r){var n=(l.x1+l.x2)/2,e=(l.y1+l.y2)/2;return d(l,n,e,r)};p.exports=c},24296:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(1809),c=function(l,r,n){return d(l,r.x,r.y,n)};p.exports=c},1809:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r=Math.cos(l),n=Math.sin(l),e=t.x1-d,s=t.y1-c;return t.x1=e*r-s*n+d,t.y1=e*n+s*r+c,e=t.x2-d,s=t.y2-c,t.x2=e*r-s*n+d,t.y2=e*n+s*r+c,t};p.exports=S},88171:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r){return t.x1=d,t.y1=c,t.x2=d+Math.cos(l)*r,t.y2=c+Math.sin(l)*r,t};p.exports=S},82797:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return(t.y2-t.y1)/(t.x2-t.x1)};p.exports=S},41067:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return Math.abs(t.x1-t.x2)};p.exports=S},28482:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(88829);d.Angle=t(50599),d.BresenhamPoints=t(58813),d.CenterOn=t(88513),d.Clone=t(26718),d.CopyFrom=t(88930),d.Equals=t(90656),d.Extend=t(30897),d.GetEasedPoints=t(30684),d.GetMidPoint=t(20487),d.GetNearestPoint=t(11222),d.GetNormal=t(7377),d.GetPoint=t(66464),d.GetPoints=t(8570),d.GetShortestDistance=t(65269),d.Height=t(82996),d.Length=t(16028),d.NormalAngle=t(73273),d.NormalX=t(96936),d.NormalY=t(43581),d.Offset=t(13990),d.PerpSlope=t(1298),d.Random=t(74077),d.ReflectAngle=t(30473),d.Rotate=t(25968),d.RotateAroundPoint=t(24296),d.RotateAroundXY=t(1809),d.SetToAngle=t(88171),d.Slope=t(82797),d.Width=t(41067),p.exports=d},18693:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(74118),l=t(93736);function r(e,s,u,i){var a=e-u,o=s-i,h=a*a+o*o;return Math.sqrt(h)}var n=new d({initialize:function(s,u,i){this.vertex1=s,this.vertex2=u,this.vertex3=i,this.bounds=new c,this._inCenter=new l},getInCenter:function(e){e===void 0&&(e=!0);var s=this.vertex1,u=this.vertex2,i=this.vertex3,a,o,h,f,v,m;e?(a=s.x,o=s.y,h=u.x,f=u.y,v=i.x,m=i.y):(a=s.vx,o=s.vy,h=u.vx,f=u.vy,v=i.vx,m=i.vy);var x=r(v,m,h,f),g=r(a,o,v,m),y=r(h,f,a,o),T=x+g+y;return this._inCenter.set((a*x+h*g+v*y)/T,(o*x+f*g+m*y)/T)},contains:function(e,s,u){var i=this.vertex1,a=this.vertex2,o=this.vertex3,h=i.vx,f=i.vy,v=a.vx,m=a.vy,x=o.vx,g=o.vy;if(u){var y=u.a,T=u.b,E=u.c,C=u.d,A=u.e,P=u.f;h=i.vx*y+i.vy*E+A,f=i.vx*T+i.vy*C+P,v=a.vx*y+a.vy*E+A,m=a.vx*T+a.vy*C+P,x=o.vx*y+o.vy*E+A,g=o.vx*T+o.vy*C+P}var R=x-h,F=g-f,L=v-h,B=m-f,N=e-h,U=s-f,z=R*R+F*F,w=R*L+F*B,I=R*N+F*U,M=L*L+B*B,O=L*N+B*U,D=z*M-w*w,G=D===0?0:1/D,X=(M*I-w*O)*G,V=(z*O-w*I)*G;return X>=0&&V>=0&&X+V<1},isCounterClockwise:function(e){var s=this.vertex1,u=this.vertex2,i=this.vertex3,a=(u.vx-s.vx)*(i.vy-s.vy)-(u.vy-s.vy)*(i.vx-s.vx);return e<=0?a>=0:a<0},load:function(e,s,u,i,a){return u=this.vertex1.load(e,s,u,i,a),u=this.vertex2.load(e,s,u,i,a),u=this.vertex3.load(e,s,u,i,a),u},transformCoordinatesLocal:function(e,s,u,i){return this.vertex1.transformCoordinatesLocal(e,s,u,i),this.vertex2.transformCoordinatesLocal(e,s,u,i),this.vertex3.transformCoordinatesLocal(e,s,u,i),this},updateBounds:function(){var e=this.vertex1,s=this.vertex2,u=this.vertex3,i=this.bounds;return i.x=Math.min(e.vx,s.vx,u.vx),i.y=Math.min(e.vy,s.vy,u.vy),i.width=Math.max(e.vx,s.vx,u.vx)-i.x,i.height=Math.max(e.vy,s.vy,u.vy)-i.y,this},isInView:function(e,s,u,i,a,o,h,f,v,m,x){this.update(i,a,o,h,f,v,m,x);var g=this.vertex1,y=this.vertex2,T=this.vertex3;if(g.ta<=0&&y.ta<=0&&T.ta<=0||s&&!this.isCounterClockwise(u))return!1;var E=this.bounds;E.x=Math.min(g.tx,y.tx,T.tx),E.y=Math.min(g.ty,y.ty,T.ty),E.width=Math.max(g.tx,y.tx,T.tx)-E.x,E.height=Math.max(g.ty,y.ty,T.ty)-E.y;var C=e.x+e.width,A=e.y+e.height;return E.width<=0||E.height<=0||e.width<=0||e.height<=0?!1:!(E.rightC||E.y>A)},scrollUV:function(e,s){return this.vertex1.scrollUV(e,s),this.vertex2.scrollUV(e,s),this.vertex3.scrollUV(e,s),this},scaleUV:function(e,s){return this.vertex1.scaleUV(e,s),this.vertex2.scaleUV(e,s),this.vertex3.scaleUV(e,s),this},setColor:function(e){return this.vertex1.color=e,this.vertex2.color=e,this.vertex3.color=e,this},update:function(e,s,u,i,a,o,h,f){return this.vertex1.update(s,u,i,a,o,h,f,e),this.vertex2.update(s,u,i,a,o,h,f,e),this.vertex3.update(s,u,i,a,o,h,f,e),this},translate:function(e,s){s===void 0&&(s=0);var u=this.vertex1,i=this.vertex2,a=this.vertex3;return u.x+=e,u.y+=s,i.x+=e,i.y+=s,a.x+=e,a.y+=s,this},x:{get:function(){return this.getInCenter().x},set:function(e){var s=this.getInCenter();this.translate(e-s.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(e){var s=this.getInCenter();this.translate(0,e-s.y)}},alpha:{get:function(){var e=this.vertex1,s=this.vertex2,u=this.vertex3;return(e.alpha+s.alpha+u.alpha)/3},set:function(e){this.vertex1.alpha=e,this.vertex2.alpha=e,this.vertex3.alpha=e}},depth:{get:function(){var e=this.vertex1,s=this.vertex2,u=this.vertex3;return(e.vz+s.vz+u.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});p.exports=n},99425:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(18693),c=t(72632),l=t(16650),r=t(70015),n=t(85769),e=new r,s=new r,u=new l,i=function(a){var o=c(a,"mesh"),h=c(a,"texture",null),f=c(a,"frame"),v=c(a,"width",1),m=c(a,"height",v),x=c(a,"widthSegments",1),g=c(a,"heightSegments",x),y=c(a,"x",0),T=c(a,"y",0),E=c(a,"z",0),C=c(a,"rotateX",0),A=c(a,"rotateY",0),P=c(a,"rotateZ",0),R=c(a,"zIsUp",!0),F=c(a,"isOrtho",o?o.dirtyCache[11]:!1),L=c(a,"colors",[16777215]),B=c(a,"alphas",[1]),N=c(a,"tile",!1),U=c(a,"flipY",!1),z=c(a,"width",null),w={faces:[],verts:[]};e.set(y,T,E),s.set(C,A,P),u.fromRotationXYTranslation(s,e,R);var I;if(!h&&o)h=o.texture,f||(I=o.frame);else if(o&&typeof h=="string")h=o.scene.sys.textures.get(h);else if(!h)return w;I||(I=h.get(f)),!z&&F&&h&&o&&(v=I.width/o.height,m=I.height/o.height);var M=v/2,O=m/2,D=Math.floor(x),G=Math.floor(g),X=D+1,V=G+1,Y=v/D,W=m/G,H=[],b=[],K,J,Z=0,$=1,tt=0,it=1;I&&(Z=I.u0,$=I.u1,U?(tt=I.v1,it=I.v0):(tt=I.v0,it=I.v1));var et=$-Z,Q=it-tt;for(J=0;J{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(18693),c=t(16650),l=t(70015),r=t(85769),n=new l,e=new l,s=new c,u=function(i,a,o,h,f,v,m,x,g,y){o===void 0&&(o=1),h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=0),y===void 0&&(y=!0);var T={faces:[],verts:[]},E=i.materials;n.set(h,f,v),e.set(m,x,g),s.fromRotationXYTranslation(e,n,y);for(var C=0;C{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(18693),c=t(85769),l=function(r,n,e,s,u,i,a,o){if(s===void 0&&(s=!1),i===void 0&&(i=16777215),a===void 0&&(a=1),o===void 0&&(o=!1),r.length!==n.length&&!s){console.warn("GenerateVerts: vertices and uvs count not equal");return}var h={faces:[],vertices:[]},f,v,m,x,g,y,T,E,C,A,P,R=s?3:2,F=Array.isArray(i),L=Array.isArray(a);if(Array.isArray(e)&&e.length>0)for(f=0;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=!0,t="untitled",d="",c="";function l(v){var m=v.indexOf("#");return m>-1?v.substring(0,m):v}function r(v){return v.models.length===0&&v.models.push({faces:[],name:t,textureCoords:[],vertexNormals:[],vertices:[]}),d="",v.models[v.models.length-1]}function n(v,m){var x=v.length>=2?v[1]:t;m.models.push({faces:[],name:x,textureCoords:[],vertexNormals:[],vertices:[]}),d=""}function e(v){v.length===2&&(d=v[1])}function s(v,m){var x=v.length,g=x>=2?parseFloat(v[1]):0,y=x>=3?parseFloat(v[2]):0,T=x>=4?parseFloat(v[3]):0;r(m).vertices.push({x:g,y,z:T})}function u(v,m){var x=v.length,g=x>=2?parseFloat(v[1]):0,y=x>=3?parseFloat(v[2]):0,T=x>=4?parseFloat(v[3]):0;isNaN(g)&&(g=0),isNaN(y)&&(y=0),isNaN(T)&&(T=0),S&&(y=1-y),r(m).textureCoords.push({u:g,v:y,w:T})}function i(v,m){var x=v.length,g=x>=2?parseFloat(v[1]):0,y=x>=3?parseFloat(v[2]):0,T=x>=4?parseFloat(v[3]):0;r(m).vertexNormals.push({x:g,y,z:T})}function a(v,m){var x=v.length-1;if(!(x<3)){for(var g={group:d,material:c,vertices:[]},y=0;y3)){var A=0,P=0,R=0;A=parseInt(E[0],10),C>1&&E[1]!==""&&(P=parseInt(E[1],10)),C>2&&(R=parseInt(E[2],10)),A!==0&&(A<0&&(A=r(m).vertices.length+1+A),P-=1,A-=1,R-=1,g.vertices.push({textureCoordsIndex:P,vertexIndex:A,vertexNormalIndex:R}))}}r(m).faces.push(g)}}function o(v,m){v.length>=2&&m.materialLibraries.push(v[1])}function h(v){v.length>=2&&(c=v[1])}var f=function(v,m){m===void 0&&(m=!0),S=m;var x={materials:{},materialLibraries:[],models:[]};d="",c="";for(var g=v.split(` +`),y=0;y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(22946),c=function(l){for(var r={},n=l.split(` +`),e="",s=0;s=2?Math.floor(i[2]*255):a,h=i.length>=3?Math.floor(i[3]*255):a;r[e]=d(a,o,h);break}}}}return r};p.exports=c},15313:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r,n;if(c===void 0&&l===void 0){var e=t.getInCenter();r=e.x,n=e.y}var s=Math.cos(d),u=Math.sin(d),i=t.vertex1,a=t.vertex2,o=t.vertex3,h=i.x-r,f=i.y-n;i.set(h*s-f*u+r,h*u+f*s+n),h=a.x-r,f=a.y-n,a.set(h*s-f*u+r,h*u+f*s+n),h=o.x-r,f=o.y-n,o.set(h*s-f*u+r,h*u+f*s+n)};p.exports=S},85769:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(75512),l=t(70015),r=new d({Extends:l,initialize:function(e,s,u,i,a,o,h,f,v,m){o===void 0&&(o=16777215),h===void 0&&(h=1),f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=0),l.call(this,e,s,u),this.vx=0,this.vy=0,this.vz=0,this.nx=f,this.ny=v,this.nz=m,this.u=i,this.v=a,this.color=o,this.alpha=h,this.tx=0,this.ty=0,this.ta=0,this.tu=i,this.tv=a},setUVs:function(n,e){return this.u=n,this.v=e,this.tu=n,this.tv=e,this},scrollUV:function(n,e){return this.tu+=n,this.tv+=e,this},scaleUV:function(n,e){return this.tu=this.u*n,this.tv=this.v*e,this},transformCoordinatesLocal:function(n,e,s,u){var i=this.x,a=this.y,o=this.z,h=n.val,f=i*h[0]+a*h[4]+o*h[8]+h[12],v=i*h[1]+a*h[5]+o*h[9]+h[13],m=i*h[2]+a*h[6]+o*h[10]+h[14],x=i*h[3]+a*h[7]+o*h[11]+h[15];this.vx=f/x*e,this.vy=-(v/x)*s,u<=0?this.vz=m/x:this.vz=-(m/x)},resize:function(n,e,s,u,i,a){return this.x=n,this.y=e,this.vx=this.x*s,this.vy=-this.y*u,this.vz=0,i<.5?this.vx+=s*(.5-i):i>.5&&(this.vx-=s*(i-.5)),a<.5?this.vy+=u*(.5-a):a>.5&&(this.vy-=u*(a-.5)),this},update:function(n,e,s,u,i,a,o,h){var f=this.vx*n+this.vy*s+i,v=this.vx*e+this.vy*u+a;return o&&(f=Math.round(f),v=Math.round(v)),this.tx=f,this.ty=v,this.ta=this.alpha*h,this},load:function(n,e,s,u,i){return n[++s]=this.tx,n[++s]=this.ty,n[++s]=this.tu,n[++s]=this.tv,n[++s]=u,n[++s]=i,e[++s]=c.getTintAppendFloatAlpha(this.color,this.ta),s}});p.exports=r},14293:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={Face:t(18693),GenerateGridVerts:t(99425),GenerateObjVerts:t(53267),GenerateVerts:t(67623),ParseObj:t(27291),ParseObjMaterial:t(76799),RotateFace:t(15313),Vertex:t(85769)};p.exports=d},77601:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))};p.exports=S},38933:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l){return new d(l.x,l.y)};p.exports=c},47103:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.setTo(t.x,t.y)};p.exports=S},13625:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x===d.x&&t.y===d.y};p.exports=S},12536:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))};p.exports=S},54205:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r){if(r===void 0&&(r=new d),!Array.isArray(l))throw new Error("GetCentroid points argument must be an array");var n=l.length;if(n<1)throw new Error("GetCentroid points array must not be empty");if(n===1)r.x=l[0].x,r.y=l[0].y;else{for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)};p.exports=S},82712:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x*t.x+t.y*t.y};p.exports=S},20052:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118),c=function(l,r){r===void 0&&(r=new d);for(var n=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY,i=0;in&&(n=a.x),a.xs&&(s=a.y),a.y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r,n,e){return n===void 0&&(n=0),e===void 0&&(e=new d),e.x=l.x+(r.x-l.x)*n,e.y=l.y+(r.y-l.y)*n,e};p.exports=c},42397:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.setTo(t.y,t.x)};p.exports=S},59464:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r){return r===void 0&&(r=new d),r.setTo(-l.x,-l.y)};p.exports=c},79967:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(52394),l=new d({initialize:function(n,e){n===void 0&&(n=0),e===void 0&&(e=n),this.type=c.POINT,this.x=n,this.y=e},setTo:function(r,n){return r===void 0&&(r=0),n===void 0&&(n=r),this.x=r,this.y=n,this}});p.exports=l},53581:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=t(82712),l=function(r,n,e){e===void 0&&(e=new d);var s=r.x*n.x+r.y*n.y,u=s/c(n);return u!==0&&(e.x=u*n.x,e.y=u*n.y),e};p.exports=l},50817:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r,n){n===void 0&&(n=new d);var e=l.x*r.x+l.y*r.y;return e!==0&&(n.x=e*r.x,n.y=e*r.y),n};p.exports=c},40525:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50083),c=function(l,r){if(l.x!==0||l.y!==0){var n=d(l);l.x/=n,l.y/=n}return l.x*=r,l.y*=r,l};p.exports=c},63472:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967);d.Ceil=t(77601),d.Clone=t(38933),d.CopyFrom=t(47103),d.Equals=t(13625),d.Floor=t(12536),d.GetCentroid=t(54205),d.GetMagnitude=t(50083),d.GetMagnitudeSq=t(82712),d.GetRectangleFromPoints=t(20052),d.Interpolate=t(77154),d.Invert=t(42397),d.Negative=t(59464),d.Project=t(53581),d.ProjectUnit=t(50817),d.SetMagnitude=t(40525),p.exports=d},19631:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8580),c=function(l){return new d(l.points)};p.exports=c},45604:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){for(var l=!1,r=-1,n=t.points.length-1;++r{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45604),c=function(l,r){return d(l,r.x,r.y)};p.exports=c},11117:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function S(w,I,M){M=M||2;var O=I&&I.length,D=O?I[0]*M:w.length,G=t(w,0,D,M,!0),X=[];if(!G||G.next===G.prev)return X;var V,Y,W,H,b,K,J;if(O&&(G=s(w,I,G,M)),w.length>80*M){V=W=w[0],Y=H=w[1];for(var Z=M;ZW&&(W=b),K>H&&(H=K);J=Math.max(W-V,H-Y),J=J!==0?32767/J:0}return c(G,X,M,V,Y,J,0),X}function t(w,I,M,O,D){var G,X;if(D===z(w,I,M,O)>0)for(G=I;G=I;G-=O)X=B(G,w[G],w[G+1],X);return X&&T(X,X.next)&&(N(X),X=X.next),X}function d(w,I){if(!w)return w;I||(I=w);var M=w,O;do if(O=!1,!M.steiner&&(T(M,M.next)||y(M.prev,M,M.next)===0)){if(N(M),M=I=M.prev,M===M.next)break;O=!0}else M=M.next;while(O||M!==I);return I}function c(w,I,M,O,D,G,X){if(w){!X&&G&&h(w,O,D,G);for(var V=w,Y,W;w.prev!==w.next;){if(Y=w.prev,W=w.next,G?r(w,O,D,G):l(w)){I.push(Y.i/M|0),I.push(w.i/M|0),I.push(W.i/M|0),N(w),w=W.next,V=W.next;continue}if(w=W,w===V){X?X===1?(w=n(d(w),I,M),c(w,I,M,O,D,G,2)):X===2&&e(w,I,M,O,D,G):c(d(w),I,M,O,D,G,1);break}}}}function l(w){var I=w.prev,M=w,O=w.next;if(y(I,M,O)>=0)return!1;for(var D=I.x,G=M.x,X=O.x,V=I.y,Y=M.y,W=O.y,H=DG?D>X?D:X:G>X?G:X,J=V>Y?V>W?V:W:Y>W?Y:W,Z=O.next;Z!==I;){if(Z.x>=H&&Z.x<=K&&Z.y>=b&&Z.y<=J&&x(D,V,G,Y,X,W,Z.x,Z.y)&&y(Z.prev,Z,Z.next)>=0)return!1;Z=Z.next}return!0}function r(w,I,M,O){var D=w.prev,G=w,X=w.next;if(y(D,G,X)>=0)return!1;for(var V=D.x,Y=G.x,W=X.x,H=D.y,b=G.y,K=X.y,J=VY?V>W?V:W:Y>W?Y:W,tt=H>b?H>K?H:K:b>K?b:K,it=v(J,Z,I,M,O),et=v($,tt,I,M,O),Q=w.prevZ,q=w.nextZ;Q&&Q.z>=it&&q&&q.z<=et;){if(Q.x>=J&&Q.x<=$&&Q.y>=Z&&Q.y<=tt&&Q!==D&&Q!==X&&x(V,H,Y,b,W,K,Q.x,Q.y)&&y(Q.prev,Q,Q.next)>=0||(Q=Q.prevZ,q.x>=J&&q.x<=$&&q.y>=Z&&q.y<=tt&&q!==D&&q!==X&&x(V,H,Y,b,W,K,q.x,q.y)&&y(q.prev,q,q.next)>=0))return!1;q=q.nextZ}for(;Q&&Q.z>=it;){if(Q.x>=J&&Q.x<=$&&Q.y>=Z&&Q.y<=tt&&Q!==D&&Q!==X&&x(V,H,Y,b,W,K,Q.x,Q.y)&&y(Q.prev,Q,Q.next)>=0)return!1;Q=Q.prevZ}for(;q&&q.z<=et;){if(q.x>=J&&q.x<=$&&q.y>=Z&&q.y<=tt&&q!==D&&q!==X&&x(V,H,Y,b,W,K,q.x,q.y)&&y(q.prev,q,q.next)>=0)return!1;q=q.nextZ}return!0}function n(w,I,M){var O=w;do{var D=O.prev,G=O.next.next;!T(D,G)&&E(D,O,O.next,G)&&R(D,G)&&R(G,D)&&(I.push(D.i/M|0),I.push(O.i/M|0),I.push(G.i/M|0),N(O),N(O.next),O=w=G),O=O.next}while(O!==w);return d(O)}function e(w,I,M,O,D,G){var X=w;do{for(var V=X.next.next;V!==X.prev;){if(X.i!==V.i&&g(X,V)){var Y=L(X,V);X=d(X,X.next),Y=d(Y,Y.next),c(X,I,M,O,D,G,0),c(Y,I,M,O,D,G,0);return}V=V.next}X=X.next}while(X!==w)}function s(w,I,M,O){var D=[],G,X,V,Y,W;for(G=0,X=I.length;G=M.next.y&&M.next.y!==M.y){var V=M.x+(D-M.y)*(M.next.x-M.x)/(M.next.y-M.y);if(V<=O&&V>G&&(G=V,X=M.x=M.x&&M.x>=W&&O!==M.x&&x(DX.x||M.x===X.x&&o(X,M)))&&(X=M,b=K)),M=M.next;while(M!==Y);return X}function o(w,I){return y(w.prev,w,I.prev)<0&&y(I.next,w,w.next)<0}function h(w,I,M,O){var D=w;do D.z===0&&(D.z=v(D.x,D.y,I,M,O)),D.prevZ=D.prev,D.nextZ=D.next,D=D.next;while(D!==w);D.prevZ.nextZ=null,D.prevZ=null,f(D)}function f(w){var I,M,O,D,G,X,V,Y,W=1;do{for(M=w,w=null,G=null,X=0;M;){for(X++,O=M,V=0,I=0;I0||Y>0&&O;)V!==0&&(Y===0||!O||M.z<=O.z)?(D=M,M=M.nextZ,V--):(D=O,O=O.nextZ,Y--),G?G.nextZ=D:w=D,D.prevZ=G,G=D;M=O}G.nextZ=null,W*=2}while(X>1);return w}function v(w,I,M,O,D){return w=(w-M)*D|0,I=(I-O)*D|0,w=(w|w<<8)&16711935,w=(w|w<<4)&252645135,w=(w|w<<2)&858993459,w=(w|w<<1)&1431655765,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,w|I<<1}function m(w){var I=w,M=w;do(I.x=(w-X)*(G-V)&&(w-X)*(O-V)>=(M-X)*(I-V)&&(M-X)*(G-V)>=(D-X)*(O-V)}function g(w,I){return w.next.i!==I.i&&w.prev.i!==I.i&&!P(w,I)&&(R(w,I)&&R(I,w)&&F(w,I)&&(y(w.prev,w,I.prev)||y(w,I.prev,I))||T(w,I)&&y(w.prev,w,w.next)>0&&y(I.prev,I,I.next)>0)}function y(w,I,M){return(I.y-w.y)*(M.x-I.x)-(I.x-w.x)*(M.y-I.y)}function T(w,I){return w.x===I.x&&w.y===I.y}function E(w,I,M,O){var D=A(y(w,I,M)),G=A(y(w,I,O)),X=A(y(M,O,w)),V=A(y(M,O,I));return!!(D!==G&&X!==V||D===0&&C(w,M,I)||G===0&&C(w,O,I)||X===0&&C(M,w,O)||V===0&&C(M,I,O))}function C(w,I,M){return I.x<=Math.max(w.x,M.x)&&I.x>=Math.min(w.x,M.x)&&I.y<=Math.max(w.y,M.y)&&I.y>=Math.min(w.y,M.y)}function A(w){return w>0?1:w<0?-1:0}function P(w,I){var M=w;do{if(M.i!==w.i&&M.next.i!==w.i&&M.i!==I.i&&M.next.i!==I.i&&E(M,M.next,w,I))return!0;M=M.next}while(M!==w);return!1}function R(w,I){return y(w.prev,w,w.next)<0?y(w,I,w.next)>=0&&y(w,w.prev,I)>=0:y(w,I,w.prev)<0||y(w,w.next,I)<0}function F(w,I){var M=w,O=!1,D=(w.x+I.x)/2,G=(w.y+I.y)/2;do M.y>G!=M.next.y>G&&M.next.y!==M.y&&D<(M.next.x-M.x)*(G-M.y)/(M.next.y-M.y)+M.x&&(O=!O),M=M.next;while(M!==w);return O}function L(w,I){var M=new U(w.i,w.x,w.y),O=new U(I.i,I.x,I.y),D=w.next,G=I.prev;return w.next=I,I.prev=w,M.next=D,D.prev=M,O.next=M,M.prev=O,G.next=O,O.prev=G,O}function B(w,I,M,O){var D=new U(w,I,M);return O?(D.next=O.next,D.prev=O,O.next.prev=D,O.next=D):(D.prev=D,D.next=D),D}function N(w){w.next.prev=w.prev,w.prev.next=w.next,w.prevZ&&(w.prevZ.nextZ=w.nextZ),w.nextZ&&(w.nextZ.prevZ=w.prevZ)}function U(w,I,M){this.i=w,this.x=I,this.y=M,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}S.deviation=function(w,I,M,O){var D=I&&I.length,G=D?I[0]*M:w.length,X=Math.abs(z(w,0,G,M));if(D)for(var V=0,Y=I.length;V0&&(O+=w[D-1].length,M.holes.push(O))}return M},p.exports=S},14045:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118),c=function(l,r){r===void 0&&(r=new d);for(var n=1/0,e=1/0,s=-n,u=-e,i,a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d=[]);for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16028),c=t(88829),l=t(5159),r=function(n,e,s,u){u===void 0&&(u=[]);var i=n.points,a=l(n);!e&&s>0&&(e=a/s);for(var o=0;of+y){f+=y;continue}var T=g.getPoint((h-f)/y);u.push(T);break}return u};p.exports=r},5159:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16028),c=t(88829),l=function(r){for(var n=r.points,e=0,s=0;s{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(45604),l=t(89294),r=t(52394),n=new d({initialize:function(s){this.type=r.POLYGON,this.area=0,this.points=[],s&&this.setTo(s)},contains:function(e,s){return c(this,e,s)},setTo:function(e){if(this.area=0,this.points=[],typeof e=="string"&&(e=e.split(" ")),!Array.isArray(e))return this;for(var s,u=0;u{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.points.reverse(),t};p.exports=S},95874:p=>{function S(n,e){var s=n.x-e.x,u=n.y-e.y;return s*s+u*u}function t(n,e,s){var u=e.x,i=e.y,a=s.x-u,o=s.y-i;if(a!==0||o!==0){var h=((n.x-u)*a+(n.y-i)*o)/(a*a+o*o);h>1?(u=s.x,i=s.y):h>0&&(u+=a*h,i+=o*h)}return a=n.x-u,o=n.y-i,a*a+o*o}function d(n,e){for(var s=n[0],u=[s],i,a=1,o=n.length;ae&&(u.push(i),s=i);return s!==i&&u.push(i),u}function c(n,e,s,u,i){for(var a=u,o,h=e+1;ha&&(o=h,a=f)}a>u&&(o-e>1&&c(n,e,o,u,i),i.push(n[o]),s-o>1&&c(n,o,s,u,i))}function l(n,e){var s=n.length-1,u=[n[0]];return c(n,0,s,e,u),u.push(n[s]),u}var r=function(n,e,s){e===void 0&&(e=1),s===void 0&&(s=!1);var u=n.points;if(u.length>2){var i=e*e;s||(u=d(u,i)),n.setTo(l(u,i))}return n};p.exports=r},18974:p=>{/** + * @author Richard Davey + * @author Igor Ognichenko + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(d,c){return d[0]=c[0],d[1]=c[1],d},t=function(d){var c,l=[],r=d.points;for(c=0;c0&&n.push(S([0,0],l[0])),c=0;c1&&n.push(S([0,0],l[l.length-1])),d.setTo(n)};p.exports=t},23490:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){for(var l=t.points,r=0;r{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8580);d.Clone=t(19631),d.Contains=t(45604),d.ContainsPoint=t(87289),d.Earcut=t(11117),d.GetAABB=t(14045),d.GetNumberArray=t(98286),d.GetPoints=t(89294),d.Perimeter=t(5159),d.Reverse=t(32244),d.Simplify=t(95874),d.Smooth=t(18974),d.Translate=t(23490),p.exports=d},1653:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.width*t.height};p.exports=S},33943:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t};p.exports=S},58662:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t};p.exports=S},79993:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.x=d-t.width/2,t.y=c-t.height/2,t};p.exports=S},81572:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118),c=function(l){return new d(l.x,l.y,l.width,l.height)};p.exports=c},94287:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.width<=0||t.height<=0?!1:t.x<=d&&t.x+t.width>=d&&t.y<=c&&t.y+t.height>=c};p.exports=S},28687:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(94287),c=function(l,r){return d(l,r.x,r.y)};p.exports=c},73222:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.width*d.height>t.width*t.height?!1:d.x>t.x&&d.xt.x&&d.rightt.y&&d.yt.y&&d.bottom{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.setTo(t.x,t.y,t.width,t.height)};p.exports=S},87279:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d=[]),d.push({x:t.x,y:t.y}),d.push({x:t.right,y:t.y}),d.push({x:t.right,y:t.bottom}),d.push({x:t.x,y:t.bottom}),d};p.exports=S},19989:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x===d.x&&t.y===d.y&&t.width===d.width&&t.height===d.height};p.exports=S},92628:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6700),c=function(l,r){var n=d(l);return n{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6700),c=function(l,r){var n=d(l);return n>d(r)?l.setSize(r.height*n,r.height):l.setSize(r.width,r.width/n),l.setPosition(r.centerX-l.width/2,r.centerY-l.height/2)};p.exports=c},71356:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t};p.exports=S},21687:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t};p.exports=S},80222:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118),c=t(83392),l=function(r,n){if(n===void 0&&(n=new d),r.length===0)return n;for(var e=Number.MAX_VALUE,s=Number.MAX_VALUE,u=c.MIN_SAFE_INTEGER,i=c.MIN_SAFE_INTEGER,a,o,h,f=0;f{/** + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118),c=function(l,r,n,e,s){return s===void 0&&(s=new d),s.setTo(Math.min(l,n),Math.min(r,e),Math.abs(l-n),Math.abs(r-e))};p.exports=c},6700:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.height===0?NaN:t.width/t.height};p.exports=S},35242:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r){return r===void 0&&(r=new d),r.x=l.centerX,r.y=l.centerY,r};p.exports=c},47698:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(85876),c=t(79967),l=function(r,n,e){if(e===void 0&&(e=new c),n<=0||n>=1)return e.x=r.x,e.y=r.y,e;var s=d(r)*n;return n>.5?(s-=r.width+r.height,s<=r.width?(e.x=r.right-s,e.y=r.bottom):(e.x=r.x,e.y=r.bottom-(s-r.width))):s<=r.width?(e.x=r.x+s,e.y=r.y):(e.x=r.right,e.y=r.y+(s-r.width)),e};p.exports=l},54932:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(47698),c=t(85876),l=function(r,n,e,s){s===void 0&&(s=[]),!n&&e>0&&(n=c(r)/e);for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r){return r===void 0&&(r=new d),r.x=l.width,r.y=l.height,r};p.exports=c},7782:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79993),c=function(l,r,n){var e=l.centerX,s=l.centerY;return l.setSize(l.width+r*2,l.height+n*2),d(l,e,s)};p.exports=c},66217:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118),c=t(90205),l=function(r,n,e){return e===void 0&&(e=new d),c(r,n)?(e.x=Math.max(r.x,n.x),e.y=Math.max(r.y,n.y),e.width=Math.min(r.right,n.right)-e.x,e.height=Math.min(r.bottom,n.bottom)-e.y):e.setEmpty(),e};p.exports=l},40053:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(85876),c=t(79967),l=function(r,n,e,s){if(s===void 0&&(s=[]),!n&&!e)return s;n?e=Math.round(d(r)/n):n=d(r)/e;for(var u=r.x,i=r.y,a=0,o=0;o=r.right&&(a=1,i+=u-r.right,u=r.right);break;case 1:i+=n,i>=r.bottom&&(a=2,u-=i-r.bottom,i=r.bottom);break;case 2:u-=n,u<=r.left&&(a=3,i-=r.left-u,u=r.left);break;case 3:i-=n,i<=r.top&&(a=0,i=r.top);break}return s};p.exports=l},86673:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){for(var c=t.x,l=t.right,r=t.y,n=t.bottom,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=Math.min(t.x,d.x),l=Math.max(t.right,d.right);t.x=c,t.width=l-c;var r=Math.min(t.y,d.y),n=Math.max(t.bottom,d.bottom);return t.y=r,t.height=n-r,t};p.exports=S},44755:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=Math.min(t.x,d),r=Math.max(t.right,d);t.x=l,t.width=r-l;var n=Math.min(t.y,c),e=Math.max(t.bottom,c);return t.y=n,t.height=e-n,t};p.exports=S},74466:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.x+=d,t.y+=c,t};p.exports=S},55946:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x+=d.x,t.y+=d.y,t};p.exports=S},97474:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.xd.x&&t.yd.y};p.exports=S},85876:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return 2*(t.width+t.height)};p.exports=S},20243:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=t(75606),l=function(r,n,e){e===void 0&&(e=new d),n=c(n);var s=Math.sin(n),u=Math.cos(n),i=u>0?r.width/2:r.width/-2,a=s>0?r.height/2:r.height/-2;return Math.abs(i*s){/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r){return r===void 0&&(r=new d),r.x=l.x+Math.random()*l.width,r.y=l.y+Math.random()*l.height,r};p.exports=c},97691:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(17489),c=t(73222),l=t(79967),r=function(n,e,s){if(s===void 0&&(s=new l),c(n,e))switch(d(0,3)){case 0:s.x=n.x+Math.random()*(e.right-n.x),s.y=n.y+Math.random()*(e.top-n.y);break;case 1:s.x=e.x+Math.random()*(n.right-e.x),s.y=e.bottom+Math.random()*(n.bottom-e.bottom);break;case 2:s.x=n.x+Math.random()*(e.x-n.x),s.y=e.y+Math.random()*(n.bottom-e.y);break;case 3:s.x=e.right+Math.random()*(n.right-e.right),s.y=n.y+Math.random()*(e.bottom-n.y);break}return s};p.exports=r},74118:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(94287),l=t(47698),r=t(54932),n=t(52394),e=t(88829),s=t(30001),u=new d({initialize:function(a,o,h,f){a===void 0&&(a=0),o===void 0&&(o=0),h===void 0&&(h=0),f===void 0&&(f=0),this.type=n.RECTANGLE,this.x=a,this.y=o,this.width=h,this.height=f},contains:function(i,a){return c(this,i,a)},getPoint:function(i,a){return l(this,i,a)},getPoints:function(i,a,o){return r(this,i,a,o)},getRandomPoint:function(i){return s(this,i)},setTo:function(i,a,o,h){return this.x=i,this.y=a,this.width=o,this.height=h,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(i,a){return a===void 0&&(a=i),this.x=i,this.y=a,this},setSize:function(i,a){return a===void 0&&(a=i),this.width=i,this.height=a,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(i){return i===void 0&&(i=new e),i.setTo(this.x,this.y,this.right,this.y),i},getLineB:function(i){return i===void 0&&(i=new e),i.setTo(this.right,this.y,this.right,this.bottom),i},getLineC:function(i){return i===void 0&&(i=new e),i.setTo(this.right,this.bottom,this.x,this.bottom),i},getLineD:function(i){return i===void 0&&(i=new e),i.setTo(this.x,this.bottom,this.x,this.y),i},left:{get:function(){return this.x},set:function(i){i>=this.right?this.width=0:this.width=this.right-i,this.x=i}},right:{get:function(){return this.x+this.width},set:function(i){i<=this.x?this.width=0:this.width=i-this.x}},top:{get:function(){return this.y},set:function(i){i>=this.bottom?this.height=0:this.height=this.bottom-i,this.y=i}},bottom:{get:function(){return this.y+this.height},set:function(i){i<=this.y?this.height=0:this.height=i-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(i){this.x=i-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(i){this.y=i-this.height/2}}});p.exports=u},51828:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.width===d.width&&t.height===d.height};p.exports=S},5691:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return c===void 0&&(c=d),t.width*=d,t.height*=c,t};p.exports=S},58795:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118),c=function(l,r,n){n===void 0&&(n=new d);var e=Math.min(l.x,r.x),s=Math.min(l.y,r.y),u=Math.max(l.right,r.right)-e,i=Math.max(l.bottom,r.bottom)-s;return n.setTo(e,s,u,i)};p.exports=c},66658:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118);d.Area=t(1653),d.Ceil=t(33943),d.CeilAll=t(58662),d.CenterOn=t(79993),d.Clone=t(81572),d.Contains=t(94287),d.ContainsPoint=t(28687),d.ContainsRect=t(73222),d.CopyFrom=t(29538),d.Decompose=t(87279),d.Equals=t(19989),d.FitInside=t(92628),d.FitOutside=t(85028),d.Floor=t(71356),d.FloorAll=t(21687),d.FromPoints=t(80222),d.FromXY=t(75785),d.GetAspectRatio=t(6700),d.GetCenter=t(35242),d.GetPoint=t(47698),d.GetPoints=t(54932),d.GetSize=t(31591),d.Inflate=t(7782),d.Intersection=t(66217),d.MarchingAnts=t(40053),d.MergePoints=t(86673),d.MergeRect=t(14655),d.MergeXY=t(44755),d.Offset=t(74466),d.OffsetPoint=t(55946),d.Overlaps=t(97474),d.Perimeter=t(85876),d.PerimeterPoint=t(20243),d.Random=t(30001),d.RandomOutside=t(97691),d.SameDimensions=t(51828),d.Scale=t(5691),d.Union=t(58795),p.exports=d},19108:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d=t.x1,c=t.y1,l=t.x2,r=t.y2,n=t.x3,e=t.y3;return Math.abs(((n-d)*(r-c)-(l-d)*(e-c))/2)};p.exports=S},41199:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66349),c=function(l,r,n){var e=n*(Math.sqrt(3)/2),s=l,u=r,i=l+n/2,a=r+e,o=l-n/2,h=r+e;return new d(s,u,i,a,o,h)};p.exports=c},88730:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(11117),c=t(66349),l=function(r,n,e,s,u){n===void 0&&(n=null),e===void 0&&(e=1),s===void 0&&(s=1),u===void 0&&(u=[]);for(var i=d(r,n),a,o,h,f,v,m,x,g,y,T=0;T{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66349),c=function(l,r,n,e){e===void 0&&(e=n);var s=l,u=r,i=l,a=r-e,o=l+n,h=r;return new d(s,u,i,a,o,h)};p.exports=c},1882:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56595),c=t(9640),l=function(r,n,e,s){s===void 0&&(s=d);var u=s(r),i=n-u.x,a=e-u.y;return c(r,i,a)};p.exports=l},56595:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r){return r===void 0&&(r=new d),r.x=(l.x1+l.x2+l.x3)/3,r.y=(l.y1+l.y2+l.y3)/3,r};p.exports=c},91835:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736);function c(r,n,e,s){return r*s-n*e}var l=function(r,n){n===void 0&&(n=new d);var e=r.x3,s=r.y3,u=r.x1-e,i=r.y1-s,a=r.x2-e,o=r.y2-s,h=2*c(u,i,a,o),f=c(i,u*u+i*i,o,a*a+o*o),v=c(u,u*u+i*i,a,a*a+o*o);return n.x=e-f/h,n.y=s+v/h,n};p.exports=l},97073:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26673),c=function(l,r){r===void 0&&(r=new d);var n=l.x1,e=l.y1,s=l.x2,u=l.y2,i=l.x3,a=l.y3,o=s-n,h=u-e,f=i-n,v=a-e,m=o*(n+s)+h*(e+u),x=f*(n+i)+v*(e+a),g=2*(o*(a-u)-h*(i-s)),y,T;if(Math.abs(g)<1e-6){var E=Math.min(n,s,i),C=Math.min(e,u,a);y=(Math.max(n,s,i)-E)*.5,T=(Math.max(e,u,a)-C)*.5,r.x=E+y,r.y=C+T,r.radius=Math.sqrt(y*y+T*T)}else r.x=(v*m-h*x)/g,r.y=(o*x-f*m)/g,y=r.x-n,T=r.y-e,r.radius=Math.sqrt(y*y+T*T);return r};p.exports=c},75974:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66349),c=function(l){return new d(l.x1,l.y1,l.x2,l.y2,l.x3,l.y3)};p.exports=c},60689:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=t.x3-t.x1,r=t.y3-t.y1,n=t.x2-t.x1,e=t.y2-t.y1,s=d-t.x1,u=c-t.y1,i=l*l+r*r,a=l*n+r*e,o=l*s+r*u,h=n*n+e*e,f=n*s+e*u,v=i*h-a*a,m=v===0?0:1/v,x=(h*o-a*f)*m,g=(i*f-a*o)*m;return x>=0&&g>=0&&x+g<1};p.exports=S},86875:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){c===void 0&&(c=!1),l===void 0&&(l=[]);for(var r=t.x3-t.x1,n=t.y3-t.y1,e=t.x2-t.x1,s=t.y2-t.y1,u=r*r+n*n,i=r*e+n*s,a=e*e+s*s,o=u*a-i*i,h=o===0?0:1/o,f,v,m,x,g,y,T=t.x1,E=t.y1,C=0;C=0&&v>=0&&f+v<1&&(l.push({x:d[C].x,y:d[C].y}),c)));C++);return l};p.exports=S},51532:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(60689),c=function(l,r){return d(l,r.x,r.y)};p.exports=c},42538:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};p.exports=S},18680:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d=[]),d.push({x:t.x1,y:t.y1}),d.push({x:t.x2,y:t.y2}),d.push({x:t.x3,y:t.y3}),d};p.exports=S},29977:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.x1===d.x1&&t.y1===d.y1&&t.x2===d.x2&&t.y2===d.y2&&t.x3===d.x3&&t.y3===d.y3};p.exports=S},56088:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=t(16028),l=function(r,n,e){e===void 0&&(e=new d);var s=r.getLineA(),u=r.getLineB(),i=r.getLineC();if(n<=0||n>=1)return e.x=s.x1,e.y=s.y1,e;var a=c(s),o=c(u),h=c(i),f=a+o+h,v=f*n,m=0;return va+o?(v-=a+o,m=v/h,e.x=i.x1+(i.x2-i.x1)*m,e.y=i.y1+(i.y2-i.y1)*m):(v-=a,m=v/o,e.x=u.x1+(u.x2-u.x1)*m,e.y=u.y1+(u.y2-u.y1)*m),e};p.exports=l},24402:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16028),c=t(79967),l=function(r,n,e,s){s===void 0&&(s=[]);var u=r.getLineA(),i=r.getLineB(),a=r.getLineC(),o=d(u),h=d(i),f=d(a),v=o+h+f;!n&&e>0&&(n=v/e);for(var m=0;mo+h?(x-=o+h,g=x/f,y.x=a.x1+(a.x2-a.x1)*g,y.y=a.y1+(a.y2-a.y1)*g):(x-=o,g=x/h,y.x=i.x1+(i.x2-i.x1)*g,y.y=i.y1+(i.y2-i.y1)*g),s.push(y)}return s};p.exports=l},83648:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967);function c(r,n,e,s){var u=r-e,i=n-s,a=u*u+i*i;return Math.sqrt(a)}var l=function(r,n){n===void 0&&(n=new d);var e=r.x1,s=r.y1,u=r.x2,i=r.y2,a=r.x3,o=r.y3,h=c(a,o,u,i),f=c(e,s,a,o),v=c(u,i,e,s),m=h+f+v;return n.x=(e*h+u*f+a*v)/m,n.y=(s*h+i*f+o*v)/m,n};p.exports=l},9640:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t.x1+=d,t.y1+=c,t.x2+=d,t.y2+=c,t.x3+=d,t.y3+=c,t};p.exports=S},95290:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16028),c=function(l){var r=l.getLineA(),n=l.getLineB(),e=l.getLineC();return d(r)+d(n)+d(e)};p.exports=c},99761:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(79967),c=function(l,r){r===void 0&&(r=new d);var n=l.x2-l.x1,e=l.y2-l.y1,s=l.x3-l.x1,u=l.y3-l.y1,i=Math.random(),a=Math.random();return i+a>=1&&(i=1-i,a=1-a),r.x=l.x1+(n*i+s*a),r.y=l.y1+(e*i+u*a),r};p.exports=c},21934:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19211),c=t(83648),l=function(r,n){var e=c(r);return d(r,e.x,e.y,n)};p.exports=l},68454:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19211),c=function(l,r,n){return d(l,r.x,r.y,n)};p.exports=c},19211:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r=Math.cos(l),n=Math.sin(l),e=t.x1-d,s=t.y1-c;return t.x1=e*r-s*n+d,t.y1=e*n+s*r+c,e=t.x2-d,s=t.y2-c,t.x2=e*r-s*n+d,t.y2=e*n+s*r+c,e=t.x3-d,s=t.y3-c,t.x3=e*r-s*n+d,t.y3=e*n+s*r+c,t};p.exports=S},66349:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(60689),l=t(56088),r=t(24402),n=t(52394),e=t(88829),s=t(99761),u=new d({initialize:function(a,o,h,f,v,m){a===void 0&&(a=0),o===void 0&&(o=0),h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),m===void 0&&(m=0),this.type=n.TRIANGLE,this.x1=a,this.y1=o,this.x2=h,this.y2=f,this.x3=v,this.y3=m},contains:function(i,a){return c(this,i,a)},getPoint:function(i,a){return l(this,i,a)},getPoints:function(i,a,o){return r(this,i,a,o)},getRandomPoint:function(i){return s(this,i)},setTo:function(i,a,o,h,f,v){return i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=0),h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),this.x1=i,this.y1=a,this.x2=o,this.y2=h,this.x3=f,this.y3=v,this},getLineA:function(i){return i===void 0&&(i=new e),i.setTo(this.x1,this.y1,this.x2,this.y2),i},getLineB:function(i){return i===void 0&&(i=new e),i.setTo(this.x2,this.y2,this.x3,this.y3),i},getLineC:function(i){return i===void 0&&(i=new e),i.setTo(this.x3,this.y3,this.x1,this.y1),i},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(i){var a=0;this.x1<=this.x2&&this.x1<=this.x3?a=this.x1-i:this.x2<=this.x1&&this.x2<=this.x3?a=this.x2-i:a=this.x3-i,this.x1-=a,this.x2-=a,this.x3-=a}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(i){var a=0;this.x1>=this.x2&&this.x1>=this.x3?a=this.x1-i:this.x2>=this.x1&&this.x2>=this.x3?a=this.x2-i:a=this.x3-i,this.x1-=a,this.x2-=a,this.x3-=a}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(i){var a=0;this.y1<=this.y2&&this.y1<=this.y3?a=this.y1-i:this.y2<=this.y1&&this.y2<=this.y3?a=this.y2-i:a=this.y3-i,this.y1-=a,this.y2-=a,this.y3-=a}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(i){var a=0;this.y1>=this.y2&&this.y1>=this.y3?a=this.y1-i:this.y2>=this.y1&&this.y2>=this.y3?a=this.y2-i:a=this.y3-i,this.y1-=a,this.y2-=a,this.y3-=a}}});p.exports=u},87619:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66349);d.Area=t(19108),d.BuildEquilateral=t(41199),d.BuildFromPolygon=t(88730),d.BuildRight=t(3635),d.CenterOn=t(1882),d.Centroid=t(56595),d.CircumCenter=t(91835),d.CircumCircle=t(97073),d.Clone=t(75974),d.Contains=t(60689),d.ContainsArray=t(86875),d.ContainsPoint=t(51532),d.CopyFrom=t(42538),d.Decompose=t(18680),d.Equals=t(29977),d.GetPoint=t(56088),d.GetPoints=t(24402),d.InCenter=t(83648),d.Perimeter=t(95290),d.Offset=t(9640),d.Random=t(99761),d.Rotate=t(21934),d.RotateAroundPoint=t(68454),d.RotateAroundXY=t(19211),p.exports=d},27395:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:d,hitAreaCallback:c,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};p.exports=S},18104:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return function(c,l,r,n){var e=t.getPixelAlpha(l,r,n.texture.key,n.frame.name);return e&&e>=d}};p.exports=S},69898:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72687),l=t(6659),r=t(33963),n=t(97081),e=t(71064),s=t(7905),u=t(40398),i=t(37579),a=t(69360),o=t(64462),h=new d({initialize:function(v,m){this.game=v,this.scaleManager,this.canvas,this.config=m,this.enabled=!0,this.events=new l,this.isOver=!0,this.defaultCursor="",this.keyboard=m.inputKeyboard?new e(this):null,this.mouse=m.inputMouse?new s(this):null,this.touch=m.inputTouch?new i(this):null,this.pointers=[],this.pointersTotal=m.inputActivePointers,m.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var x=0;x<=this.pointersTotal;x++){var g=new u(this,x);g.smoothFactor=m.inputSmoothFactor,this.pointers.push(g)}this.mousePointer=m.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new a,this._tempMatrix2=new a,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],v.events.once(n.BOOT,this.boot,this)},boot:function(){var f=this.game,v=f.events;this.canvas=f.canvas,this.scaleManager=f.scale,this.events.emit(r.MANAGER_BOOT),v.on(n.PRE_RENDER,this.preRender,this),v.once(n.DESTROY,this.destroy,this)},setCanvasOver:function(f){this.isOver=!0,this.events.emit(r.GAME_OVER,f)},setCanvasOut:function(f){this.isOver=!1,this.events.emit(r.GAME_OUT,f)},preRender:function(){var f=this.game.loop.now,v=this.game.loop.delta,m=this.game.scene.getScenes(!0,!0);this.time=f,this.events.emit(r.MANAGER_UPDATE);for(var x=0;x10&&(f=10-this.pointersTotal);for(var m=0;m{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(26673),c=t(65650),l=t(56694),r=t(72687),n=t(27395),e=t(18104),s=t(53996),u=t(95669),i=t(72313),a=t(33963),o=t(6659),h=t(72632),f=t(52394),v=t(63399),m=t(42911),x=t(91963),g=t(74118),y=t(94287),T=t(7599),E=t(66349),C=t(60689),A=new l({Extends:o,initialize:function(R){o.call(this),this.scene=R,this.systems=R.sys,this.settings=R.sys.settings,this.manager=R.sys.game.input,this.pluginEvents=new o,this.enabled=!0,this.displayList,this.cameras,v.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var F={cancelled:!1};this._eventContainer={stopPropagation:function(){F.cancelled=!0}},this._eventData=F,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,R.sys.events.once(T.BOOT,this.boot,this),R.sys.events.on(T.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(T.DESTROY,this.destroy,this),this.pluginEvents.emit(a.BOOT)},start:function(){var P=this.systems.events;P.on(T.TRANSITION_START,this.transitionIn,this),P.on(T.TRANSITION_OUT,this.transitionOut,this),P.on(T.TRANSITION_COMPLETE,this.transitionComplete,this),P.on(T.PRE_UPDATE,this.preUpdate,this),P.once(T.SHUTDOWN,this.shutdown,this),this.manager.events.on(a.GAME_OUT,this.onGameOut,this),this.manager.events.on(a.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(a.START)},onGameOver:function(P){this.isActive()&&this.emit(a.GAME_OVER,P.timeStamp,P)},onGameOut:function(P){this.isActive()&&this.emit(a.GAME_OUT,P.timeStamp,P)},preUpdate:function(){this.pluginEvents.emit(a.PRE_UPDATE);var P=this._pendingRemoval,R=this._pendingInsertion,F=P.length,L=R.length;if(!(F===0&&L===0)){for(var B=this._list,N=0;N-1&&(B.splice(z,1),this.clear(U,!0))}this._pendingRemoval.length=0,this._list=B.concat(R.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(P,R){if(!this.isActive())return!1;if(this.pluginEvents.emit(a.UPDATE,P,R),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var F,L=this.manager,B=L.pointers,N=L.pointersTotal;for(F=0;F0)if(this._pollTimer-=R,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var z=!1;for(F=0;F0&&(z=!0)}return z},update:function(P,R){if(!this.isActive())return!1;for(var F=R.length,L=!1,B=0;B0&&(L=!0)}return this._updatedThisFrame=!0,L},clear:function(P,R){R===void 0&&(R=!1),this.disable(P);var F=P.input;F&&(this.removeDebug(P),F.gameObject=void 0,F.target=void 0,F.hitArea=void 0,F.hitAreaCallback=void 0,F.callbackContext=void 0,P.input=null),R||this.queueForRemoval(P);var L=this._draggable.indexOf(P);return L>-1&&this._draggable.splice(L,1),P},disable:function(P){var R=P.input;R&&(R.enabled=!1,R.dragState=0);var F=this._temp,L=this._drag,B=this._over,N=this.manager,U=F.indexOf(P);U>-1&&F.splice(U,1);for(var z=0;z-1&&L[z].splice(U,1),U=B[z].indexOf(P),U>-1&&(B[z].splice(U,1),N.resetCursor(R));return this},enable:function(P,R,F,L){return L===void 0&&(L=!1),P.input?P.input.enabled=!0:this.setHitArea(P,R,F),P.input&&L&&!P.input.dropZone&&(P.input.dropZone=L),this},hitTestPointer:function(P){for(var R=this.cameras.getCamerasBelowPointer(P),F=0;F0)return P.camera=L,B}return P.camera=R[0],[]},processDownEvents:function(P){var R=0,F=this._temp,L=this._eventData,B=this._eventContainer;L.cancelled=!1;for(var N=!1,U=0;U0&&s(P.x,P.y,P.downX,P.downY)>=B||L>0&&R>=P.downTime+L)&&(F=!0),F)return this.setDragState(P,3),this.processDragStartList(P)},processDragStartList:function(P){if(this.getDragState(P)!==3)return 0;for(var R=this._drag[P.id],F=0;F1&&(this.sortGameObjects(F,P),this.topOnly&&F.splice(1)),this._drag[P.id]=F,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(P,3),this.processDragStartList(P)):(this.setDragState(P,2),0))},processDragMoveEvent:function(P){if(this.getDragState(P)===2&&this.processDragThresholdEvent(P,this.manager.game.loop.now),this.getDragState(P)!==4)return 0;for(var R=this._tempZones,F=this._drag[P.id],L=0;L0?(B.emit(a.GAMEOBJECT_DRAG_LEAVE,P,U),this.emit(a.DRAG_LEAVE,P,B,U),N.target=R[0],U=N.target,B.emit(a.GAMEOBJECT_DRAG_ENTER,P,U),this.emit(a.DRAG_ENTER,P,B,U)):(B.emit(a.GAMEOBJECT_DRAG_LEAVE,P,U),this.emit(a.DRAG_LEAVE,P,B,U),R[0]?(N.target=R[0],U=N.target,B.emit(a.GAMEOBJECT_DRAG_ENTER,P,U),this.emit(a.DRAG_ENTER,P,B,U)):N.target=null)}else!U&&R[0]&&(N.target=R[0],U=N.target,B.emit(a.GAMEOBJECT_DRAG_ENTER,P,U),this.emit(a.DRAG_ENTER,P,B,U));var w,I;if(!B.parentContainer)w=P.worldX-N.dragX,I=P.worldY-N.dragY;else{var M=P.worldX-N.dragStartXGlobal,O=P.worldY-N.dragStartYGlobal,D=B.getParentRotation(),G=M*Math.cos(D)+O*Math.sin(D),X=O*Math.cos(D)-M*Math.sin(D);G*=1/B.parentContainer.scaleX,X*=1/B.parentContainer.scaleY,w=G+N.dragStartX,I=X+N.dragStartY}B.emit(a.GAMEOBJECT_DRAG,P,w,I),this.emit(a.DRAG,P,B,w,I)}return F.length},processDragUpEvent:function(P){for(var R=this._drag[P.id],F=0;F0){var N=this.manager,U=this._eventData,z=this._eventContainer;U.cancelled=!1;for(var w=!1,I=0;I0){var B=this.manager,N=this._eventData,U=this._eventContainer;N.cancelled=!1;var z=!1;this.sortGameObjects(R,P);for(var w=0;w0){for(this.sortGameObjects(B,P),F=0;F0){for(this.sortGameObjects(N,P),F=0;F-1&&this._draggable.splice(B,1)}return this},makePixelPerfect:function(P){P===void 0&&(P=1);var R=this.systems.textures;return e(R,P)},setHitArea:function(P,R,F){if(R===void 0)return this.setHitAreaFromTexture(P);Array.isArray(P)||(P=[P]);var L=!1,B=!1,N=!1,U=!1,z=!1,w=!0;if(m(R)){var I=R;R=h(I,"hitArea",null),F=h(I,"hitAreaCallback",null),L=h(I,"draggable",!1),B=h(I,"dropZone",!1),N=h(I,"cursor",!1),U=h(I,"useHandCursor",!1),z=h(I,"pixelPerfect",!1);var M=h(I,"alphaTolerance",1);z&&(R={},F=this.makePixelPerfect(M)),(!R||!F)&&(this.setHitAreaFromTexture(P),w=!1)}else typeof R=="function"&&!F&&(F=R,R={});for(var O=0;O{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10850),c={},l={};l.register=function(r,n,e,s,u){c[r]={plugin:n,mapping:e,settingsKey:s,configKey:u}},l.getPlugin=function(r){return c[r]},l.install=function(r){var n=r.scene.sys,e=n.settings.input,s=n.game.config;for(var u in c){var i=c[u].plugin,a=c[u].mapping,o=c[u].settingsKey,h=c[u].configKey;d(e,o,s[h])&&(r[a]=new i(r))}},l.remove=function(r){c.hasOwnProperty(r)&&delete c[r]},p.exports=l},40398:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(90447),c=t(56694),l=t(53996),r=t(88456),n=t(44521),e=t(93736),s=t(36580),u=new c({initialize:function(a,o){this.manager=a,this.id=o,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new e,this.prevPosition=new e,this.midPoint=new e(-1,-1),this.velocity=new e,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=o===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(i){var a=i.getWorldPoint(this.x,this.y);return this.worldX=a.x,this.worldY=a.y,this},positionToCamera:function(i,a){return i.getWorldPoint(this.x,this.y,a)},updateMotion:function(){var i=this.position.x,a=this.position.y,o=this.midPoint.x,h=this.midPoint.y;if(!(i===o&&a===h)){var f=n(this.motionFactor,o,i),v=n(this.motionFactor,h,a);r(f,i,.1)&&(f=i),r(v,a,.1)&&(v=a),this.midPoint.set(f,v);var m=i-f,x=a-v;this.velocity.set(m,x),this.angle=d(f,v,i,a),this.distance=Math.sqrt(m*m+x*x)}},up:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.button=i.button,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),i.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=i.timeStamp,this.wasTouch=!1)},down:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.button=i.button,this.downElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),i.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),s.macOS&&i.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=i.timeStamp),this.wasTouch=!1},move:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.locked&&(this.movementX=i.movementX||i.mozMovementX||i.webkitMovementX||0,this.movementY=i.movementY||i.mozMovementY||i.webkitMovementY||0),this.moveTime=i.timeStamp,this.wasTouch=!1},wheel:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.deltaX=i.deltaX,this.deltaY=i.deltaY,this.deltaZ=i.deltaZ,this.wasTouch=!1},touchstart:function(i,a){i.pointerId&&(this.pointerId=i.pointerId),this.identifier=i.identifier,this.target=i.target,this.active=!0,this.buttons=1,this.event=a,this.downElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=a.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(i,a){this.event=a,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.moveTime=a.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(i,a){this.buttons=0,this.event=a,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=a.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(i,a){this.buttons=0,this.event=a,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=a.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return this.buttons===0},leftButtonDown:function(){return!!(this.buttons&1)},rightButtonDown:function(){return!!(this.buttons&2)},middleButtonDown:function(){return!!(this.buttons&4)},backButtonDown:function(){return!!(this.buttons&8)},forwardButtonDown:function(){return!!(this.buttons&16)},leftButtonReleased:function(){return this.button===0&&!this.isDown},rightButtonReleased:function(){return this.button===2&&!this.isDown},middleButtonReleased:function(){return this.button===1&&!this.isDown},backButtonReleased:function(){return this.button===3&&!this.isDown},forwardButtonReleased:function(){return this.button===4&&!this.isDown},getDistance:function(){return this.isDown?l(this.downX,this.downY,this.x,this.y):l(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?d(this.downX,this.downY,this.x,this.y):d(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(i,a){i===void 0&&(i=10),a===void 0&&(a=[]);for(var o=this.prevPosition.x,h=this.prevPosition.y,f=this.position.x,v=this.position.y,m=0;m{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};p.exports=S},14874:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="boot"},54168:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},526:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragend"},81623:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragenter"},94472:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drag"},9304:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragleave"},34265:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragover"},50151:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragstart"},98134:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drop"},56773:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectdown"},45824:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragend"},39578:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragenter"},72072:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drag"},82569:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragleave"},70833:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragover"},81442:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragstart"},32936:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drop"},99658:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectmove"},60515:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectout"},55254:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectover"},34782:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerdown"},41769:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointermove"},65588:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerout"},61640:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerover"},49342:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerup"},82662:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="wheel"},13058:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectup"},52426:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectwheel"},78072:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameout"},1545:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameover"},67137:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="boot"},27678:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="process"},22257:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},90379:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerlockchange"},88909:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerdown"},36548:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerdownoutside"},18483:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointermove"},22355:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerout"},7997:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerover"},66318:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerup"},94812:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerupoutside"},37310:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="wheel"},24196:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="preupdate"},27053:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="shutdown"},29413:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},25165:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},33963:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BOOT:t(14874),DESTROY:t(54168),DRAG_END:t(526),DRAG_ENTER:t(81623),DRAG:t(94472),DRAG_LEAVE:t(9304),DRAG_OVER:t(34265),DRAG_START:t(50151),DROP:t(98134),GAME_OUT:t(78072),GAME_OVER:t(1545),GAMEOBJECT_DOWN:t(56773),GAMEOBJECT_DRAG_END:t(45824),GAMEOBJECT_DRAG_ENTER:t(39578),GAMEOBJECT_DRAG:t(72072),GAMEOBJECT_DRAG_LEAVE:t(82569),GAMEOBJECT_DRAG_OVER:t(70833),GAMEOBJECT_DRAG_START:t(81442),GAMEOBJECT_DROP:t(32936),GAMEOBJECT_MOVE:t(99658),GAMEOBJECT_OUT:t(60515),GAMEOBJECT_OVER:t(55254),GAMEOBJECT_POINTER_DOWN:t(34782),GAMEOBJECT_POINTER_MOVE:t(41769),GAMEOBJECT_POINTER_OUT:t(65588),GAMEOBJECT_POINTER_OVER:t(61640),GAMEOBJECT_POINTER_UP:t(49342),GAMEOBJECT_POINTER_WHEEL:t(82662),GAMEOBJECT_UP:t(13058),GAMEOBJECT_WHEEL:t(52426),MANAGER_BOOT:t(67137),MANAGER_PROCESS:t(27678),MANAGER_UPDATE:t(22257),POINTER_DOWN:t(88909),POINTER_DOWN_OUTSIDE:t(36548),POINTER_MOVE:t(18483),POINTER_OUT:t(22355),POINTER_OVER:t(7997),POINTER_UP:t(66318),POINTER_UP_OUTSIDE:t(94812),POINTER_WHEEL:t(37310),POINTERLOCK_CHANGE:t(90379),PRE_UPDATE:t(24196),SHUTDOWN:t(27053),START:t(29413),UPDATE:t(25165)}},70848:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r,n){this.pad=r,this.events=r.events,this.index=n,this.value=0,this.threshold=.1},update:function(l){this.value=l},getValue:function(){return Math.abs(this.value){/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(43200),l=new d({initialize:function(n,e){this.pad=n,this.events=n.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(r){this.value=r;var n=this.pad,e=this.index;r>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(c.BUTTON_DOWN,n,this,r),this.pad.emit(c.GAMEPAD_BUTTON_DOWN,e,r,this)):this.pressed&&(this.pressed=!1,this.events.emit(c.BUTTON_UP,n,this,r),this.pad.emit(c.GAMEPAD_BUTTON_UP,e,r,this))},destroy:function(){this.pad=null,this.events=null}});p.exports=l},75956:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70848),c=t(21274),l=t(56694),r=t(6659),n=t(93736),e=new l({Extends:r,initialize:function(u,i){r.call(this),this.manager=u,this.pad=i,this.id=i.id,this.index=i.index;for(var a=[],o=0;o=2&&(this.leftStick.set(h[0].getValue(),h[1].getValue()),o>=4&&this.rightStick.set(h[2].getValue(),h[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var s;for(s=0;s{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(6659),l=t(43200),r=t(75956),n=t(10850),e=t(63399),s=t(33963),u=new d({Extends:c,initialize:function(a){c.call(this),this.scene=a.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=a,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,a.pluginEvents.once(s.BOOT,this.boot,this),a.pluginEvents.on(s.START,this.start,this)},boot:function(){var i=this.scene.sys.game,a=this.settings.input,o=i.config;this.enabled=n(a,"gamepad",o.inputGamepad)&&i.device.input.gamepads,this.target=n(a,"gamepad.target",o.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(s.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(s.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var i=this,a=this.target,o=function(h){h.defaultPrevented||!i.isActive()||(i.refreshPads(),i.queue.push(h))};this.onGamepadHandler=o,a.addEventListener("gamepadconnected",o,!1),a.addEventListener("gamepaddisconnected",o,!1),this.sceneInputPlugin.pluginEvents.on(s.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(s.UPDATE,this.update);for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},74982:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},43247:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},4898:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={DUALSHOCK_4:t(74982),SNES_USB:t(33171),XBOX_360:t(43247)}},17344:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="down"},36635:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="up"},85724:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="connected"},55832:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="disconnected"},772:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="down"},33608:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="up"},43200:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BUTTON_DOWN:t(17344),BUTTON_UP:t(36635),CONNECTED:t(85724),DISCONNECTED:t(55832),GAMEPAD_BUTTON_DOWN:t(772),GAMEPAD_BUTTON_UP:t(33608)}},92636:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Axis:t(70848),Button:t(21274),Events:t(43200),Gamepad:t(75956),GamepadPlugin:t(1379),Configs:t(4898)}},20873:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72687),c=t(98611),l={CreatePixelPerfectHandler:t(18104),CreateInteractiveObject:t(27395),Events:t(33963),Gamepad:t(92636),InputManager:t(69898),InputPlugin:t(12499),InputPluginCache:t(63399),Keyboard:t(28388),Mouse:t(11343),Pointer:t(40398),Touch:t(77423)};l=c(!1,l,d),p.exports=l},71064:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66458),c=t(56694),l=t(97081),r=t(33963),n=t(11873),e=t(72283),s=new c({initialize:function(i){this.manager=i,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=e,this.onKeyUp=e,i.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var u=this.manager.config;this.enabled=u.inputKeyboard,this.target=u.inputKeyboardEventTarget,this.addCapture(u.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(l.POST_STEP,this.postUpdate,this)},startListeners:function(){var u=this;this.onKeyDown=function(a){if(!(a.defaultPrevented||!u.enabled||!u.manager)){u.queue.push(a),u.manager.events.emit(r.MANAGER_PROCESS);var o=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey;u.preventDefault&&!o&&u.captures.indexOf(a.keyCode)>-1&&a.preventDefault()}},this.onKeyUp=function(a){if(!(a.defaultPrevented||!u.enabled||!u.manager)){u.queue.push(a),u.manager.events.emit(r.MANAGER_PROCESS);var o=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey;u.preventDefault&&!o&&u.captures.indexOf(a.keyCode)>-1&&a.preventDefault()}};var i=this.target;i&&(i.addEventListener("keydown",this.onKeyDown,!1),i.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var u=this.target;u.removeEventListener("keydown",this.onKeyDown,!1),u.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(u){typeof u=="string"&&(u=u.split(",")),Array.isArray(u)||(u=[u]);for(var i=this.captures,a=0;a0},removeCapture:function(u){typeof u=="string"&&(u=u.split(",")),Array.isArray(u)||(u=[u]);for(var i=this.captures,a=0;a0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(l.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});p.exports=s},89666:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(6659),l=t(94030),r=t(97081),n=t(10850),e=t(33963),s=t(63399),u=t(50165),i=t(11873),a=t(95625),o=t(48044),h=t(7599),f=t(84314),v=new d({Extends:c,initialize:function(x){c.call(this),this.game=x.systems.game,this.scene=x.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=x,this.manager=x.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,x.pluginEvents.once(e.BOOT,this.boot,this),x.pluginEvents.on(e.START,this.start,this)},boot:function(){var m=this.settings.input;this.enabled=n(m,"keyboard",!0);var x=n(m,"keyboard.capture",null);x&&this.addCaptures(x),this.sceneInputPlugin.pluginEvents.once(e.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(e.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(e.SHUTDOWN,this.shutdown,this),this.game.events.on(r.BLUR,this.resetKeys,this),this.scene.sys.events.on(h.PAUSE,this.resetKeys,this),this.scene.sys.events.on(h.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(m){return this.manager.addCapture(m),this},removeCapture:function(m){return this.manager.removeCapture(m),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:i.UP,down:i.DOWN,left:i.LEFT,right:i.RIGHT,space:i.SPACE,shift:i.SHIFT})},addKeys:function(m,x,g){x===void 0&&(x=!0),g===void 0&&(g=!1);var y={};if(typeof m=="string"){m=m.split(",");for(var T=0;T-1?y[T]=m:y[m.keyCode]=m,x&&this.addCapture(m.keyCode),m.setEmitOnRepeat(g),m}return typeof m=="string"&&(m=i[m.toUpperCase()]),y[m]||(y[m]=new u(this,m),x&&this.addCapture(m),y[m].setEmitOnRepeat(g)),y[m]},removeKey:function(m,x,g){x===void 0&&(x=!1),g===void 0&&(g=!1);var y=this.keys,T;if(m instanceof u){var E=y.indexOf(m);E>-1&&(T=this.keys[E],this.keys[E]=void 0)}else typeof m=="string"&&(m=i[m.toUpperCase()]);return y[m]&&(T=y[m],y[m]=void 0),T&&(T.plugin=null,g&&this.removeCapture(T.keyCode),x&&T.destroy()),this},removeAllKeys:function(m,x){m===void 0&&(m=!1),x===void 0&&(x=!1);for(var g=this.keys,y=0;ym._tick)return m._tick=g,!0}return!1},update:function(){var m=this.manager.queue,x=m.length;if(!(!this.isActive()||x===0))for(var g=this.keys,y=0;y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d.timeLastMatched=t.timeStamp,d.index++,d.index===d.size?!0:(d.current=d.keyCodes[d.index],!1)};p.exports=S},95625:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(94030),l=t(72632),r=t(2544),n=t(88754),e=new d({initialize:function(u,i,a){if(a===void 0&&(a={}),i.length<2)return!1;this.manager=u,this.enabled=!0,this.keyCodes=[];for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(60258),c=function(l,r){if(r.matched)return!0;var n=!1,e=!1;if(l.keyCode===r.current)if(r.index>0&&r.maxKeyDelay>0){var s=r.timeLastMatched+r.maxKeyDelay;l.timeStamp<=s&&(e=!0,n=d(l,r))}else e=!0,n=d(l,r);return!e&&r.resetOnWrongKey&&(r.index=0,r.current=r.keyCodes[0]),n&&(r.timeLastMatched=l.timeStamp,r.matched=!0,r.timeMatched=l.timeStamp),n};p.exports=c},88754:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t};p.exports=S},5044:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keydown"},40813:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keyup"},89319:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keycombomatch"},43267:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="down"},78595:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keydown-"},30056:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keyup-"},81939:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="up"},94030:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ANY_KEY_DOWN:t(5044),ANY_KEY_UP:t(40813),COMBO_MATCH:t(89319),DOWN:t(43267),KEY_DOWN:t(78595),KEY_UP:t(30056),UP:t(81939)}},28388:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Events:t(94030),KeyboardManager:t(71064),KeyboardPlugin:t(89666),Key:t(50165),KeyCodes:t(11873),KeyCombo:t(95625),AdvanceKeyCombo:t(60258),ProcessKeyCombo:t(2544),ResetKeyCombo:t(88754),JustDown:t(42460),JustUp:t(53162),DownDuration:t(64964),UpDuration:t(70331)}},64964:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d=50);var c=t.plugin.game.loop.time-t.timeDown;return t.isDown&&c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t._justDown?(t._justDown=!1,!0):!1};p.exports=S},53162:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t._justUp?(t._justUp=!1,!0):!1};p.exports=S},50165:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(6659),l=t(94030),r=new d({Extends:c,initialize:function(e,s){c.call(this),this.plugin=e,this.keyCode=s,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(n){return this.emitOnRepeat=n,this},onDown:function(n){this.originalEvent=n,this.enabled&&(this.altKey=n.altKey,this.ctrlKey=n.ctrlKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.location=n.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(l.DOWN,this,n):(this.isDown=!0,this.isUp=!1,this.timeDown=n.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(l.DOWN,this,n)))},onUp:function(n){this.originalEvent=n,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=n.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(l.UP,this,n))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});p.exports=r},11873:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175};p.exports=S},48044:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(11873),c={};for(var l in d)c[d[l]]=l;p.exports=c},70331:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d=50);var c=t.plugin.game.loop.time-t.timeUp;return t.isUp&&c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(90185),l=t(33963),r=t(72283),n=new d({initialize:function(s){this.manager=s,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=r,this.onMouseDown=r,this.onMouseUp=r,this.onMouseDownWindow=r,this.onMouseUpWindow=r,this.onMouseOver=r,this.onMouseOut=r,this.onMouseWheel=r,this.pointerLockChange=r,this.isTop=!0,s.events.once(l.MANAGER_BOOT,this.boot,this)},boot:function(){var e=this.manager.config;this.enabled=e.inputMouse,this.target=e.inputMouseEventTarget,this.passive=e.inputMousePassive,this.preventDefaultDown=e.inputMousePreventDefaultDown,this.preventDefaultUp=e.inputMousePreventDefaultUp,this.preventDefaultMove=e.inputMousePreventDefaultMove,this.preventDefaultWheel=e.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,e.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(e){return e.preventDefault(),!1}),this},requestPointerLock:function(){if(c.pointerLock){var e=this.target;e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock()}},releasePointerLock:function(){c.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var e=this.target;if(e){var s=this,u=this.manager,i=u.canvas,a=window&&window.focus&&u.game.config.autoFocus;this.onMouseMove=function(h){!h.defaultPrevented&&s.enabled&&u&&u.enabled&&(u.onMouseMove(h),s.preventDefaultMove&&h.preventDefault())},this.onMouseDown=function(h){a&&window.focus(),!h.defaultPrevented&&s.enabled&&u&&u.enabled&&(u.onMouseDown(h),s.preventDefaultDown&&h.target===i&&h.preventDefault())},this.onMouseDownWindow=function(h){!h.defaultPrevented&&s.enabled&&u&&u.enabled&&h.target!==i&&u.onMouseDown(h)},this.onMouseUp=function(h){!h.defaultPrevented&&s.enabled&&u&&u.enabled&&(u.onMouseUp(h),s.preventDefaultUp&&h.target===i&&h.preventDefault())},this.onMouseUpWindow=function(h){!h.defaultPrevented&&s.enabled&&u&&u.enabled&&h.target!==i&&u.onMouseUp(h)},this.onMouseOver=function(h){!h.defaultPrevented&&s.enabled&&u&&u.enabled&&u.setCanvasOver(h)},this.onMouseOut=function(h){!h.defaultPrevented&&s.enabled&&u&&u.enabled&&u.setCanvasOut(h)},this.onMouseWheel=function(h){!h.defaultPrevented&&s.enabled&&u&&u.enabled&&u.onMouseWheel(h),s.preventDefaultWheel&&h.target===i&&h.preventDefault()};var o={passive:!0};if(e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mouseover",this.onMouseOver,o),e.addEventListener("mouseout",this.onMouseOut,o),this.preventDefaultWheel?e.addEventListener("wheel",this.onMouseWheel,{passive:!1}):e.addEventListener("wheel",this.onMouseWheel,o),window&&u.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,o),window.top.addEventListener("mouseup",this.onMouseUpWindow,o)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o),this.isTop=!1}c.pointerLock&&(this.pointerLockChange=function(h){var f=s.target;s.locked=document.pointerLockElement===f||document.mozPointerLockElement===f||document.webkitPointerLockElement===f,u.onPointerLockChange(h)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var e=this.target;e.removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("mousedown",this.onMouseDown),e.removeEventListener("mouseup",this.onMouseUp),e.removeEventListener("mouseover",this.onMouseOver),e.removeEventListener("mouseout",this.onMouseOut),window&&(e=this.isTop?window.top:window,e.removeEventListener("mousedown",this.onMouseDownWindow),e.removeEventListener("mouseup",this.onMouseUpWindow)),c.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});p.exports=n},11343:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={MouseManager:t(7905)}},37579:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(33963),l=t(72283),r=new d({initialize:function(e){this.manager=e,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=l,this.onTouchStartWindow=l,this.onTouchMove=l,this.onTouchEnd=l,this.onTouchEndWindow=l,this.onTouchCancel=l,this.onTouchCancelWindow=l,this.isTop=!0,e.events.once(c.MANAGER_BOOT,this.boot,this)},boot:function(){var n=this.manager.config;this.enabled=n.inputTouch,this.target=n.inputTouchEventTarget,this.capture=n.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,n.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(n){return n.preventDefault(),!1}),this},startListeners:function(){var n=this.target;if(n){var e=this,s=this.manager,u=s.canvas,i=window&&window.focus&&s.game.config.autoFocus;this.onTouchMove=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchMove(f),e.capture&&f.cancelable&&f.preventDefault())},this.onTouchStart=function(f){i&&window.focus(),!f.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchStart(f),e.capture&&f.cancelable&&f.target===u&&f.preventDefault())},this.onTouchStartWindow=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&f.target!==u&&s.onTouchStart(f)},this.onTouchEnd=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchEnd(f),e.capture&&f.cancelable&&f.target===u&&f.preventDefault())},this.onTouchEndWindow=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&f.target!==u&&s.onTouchEnd(f)},this.onTouchCancel=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&(s.onTouchCancel(f),e.capture&&f.preventDefault())},this.onTouchCancelWindow=function(f){!f.defaultPrevented&&e.enabled&&s&&s.enabled&&s.onTouchCancel(f)};var a=this.capture,o={passive:!0},h={passive:!1};if(n.addEventListener("touchstart",this.onTouchStart,a?h:o),n.addEventListener("touchmove",this.onTouchMove,a?h:o),n.addEventListener("touchend",this.onTouchEnd,a?h:o),n.addEventListener("touchcancel",this.onTouchCancel,a?h:o),window&&s.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,h),window.top.addEventListener("touchend",this.onTouchEndWindow,h),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,h)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,h),window.addEventListener("touchend",this.onTouchEndWindow,h),window.addEventListener("touchcancel",this.onTouchCancelWindow,h),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var n=this.target;n.removeEventListener("touchstart",this.onTouchStart),n.removeEventListener("touchmove",this.onTouchMove),n.removeEventListener("touchend",this.onTouchEnd),n.removeEventListener("touchcancel",this.onTouchCancel),window&&(n=this.isTop?window.top:window,n.removeEventListener("touchstart",this.onTouchStartWindow),n.removeEventListener("touchend",this.onTouchEndWindow),n.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});p.exports=r},77423:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={TouchManager:t(37579)}},98035:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(683),r=t(72632),n=t(30750),e=t(43531),s=t(88490),u=t(33868),i=new d({initialize:function(o,h){if(this.loader=o,this.cache=r(h,"cache",!1),this.type=r(h,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=r(h,"key",!1);var f=this.key;if(o.prefix&&o.prefix!==""&&(this.key=o.prefix+f),!this.key)throw new Error("Invalid File key: "+this.key);var v=r(h,"url");v===void 0?v=o.path+f+"."+r(h,"extension",""):typeof v=="string"&&!v.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(v=o.path+v),this.url=v,this.src="",this.xhrSettings=u(r(h,"responseType",void 0)),r(h,"xhrSettings",!1)&&(this.xhrSettings=e(this.xhrSettings,r(h,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?c.FILE_POPULATED:c.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=r(h,"config",{}),this.multiFile,this.linkFile},setLink:function(a){this.linkFile=a,a.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===c.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=c.FILE_LOADING,this.src=n(this,this.loader.baseURL),this.src.indexOf("data:")===0?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=s(this,this.loader.xhr))},onLoad:function(a,o){var h=a.responseURL&&this.loader.localSchemes.some(function(m){return a.responseURL.indexOf(m)===0}),f=h&&o.target.status===0,v=!(o.target&&o.target.status!==200)||f;a.readyState===4&&a.status>=400&&a.status<=599&&(v=!1),this.state=c.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,v)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(a){a.lengthComputable&&(this.bytesLoaded=a.loaded,this.bytesTotal=a.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(l.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=c.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=c.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=c.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(a){if(this.state!==c.FILE_PENDING_DESTROY){a===void 0&&(a=this.data);var o=this.key,h=this.type;this.loader.emit(l.FILE_COMPLETE,o,h,a),this.loader.emit(l.FILE_KEY_COMPLETE+h+"-"+o,o,h,a),this.loader.flagForRemoval(this),this.state=c.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});i.createObjectURL=function(a,o,h){if(typeof URL=="function")a.src=URL.createObjectURL(o);else{var f=new FileReader;f.onload=function(){a.removeAttribute("crossOrigin"),a.src="data:"+(o.type||h)+";base64,"+f.result.split(",")[1]},f.onerror=a.onerror,f.readAsDataURL(o)}},i.revokeObjectURL=function(a){typeof URL=="function"&&URL.revokeObjectURL(a.src)},p.exports=i},76846:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={},t={install:function(d){for(var c in S)d[c]=S[c]},register:function(d,c){S[d]=c},destroy:function(){S={}}};p.exports=t},30750:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:d+t.url:!1};p.exports=S},67285:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(58403),r=t(6659),n=t(683),e=t(76846),s=t(72632),u=t(10850),i=t(91963),a=t(7599),o=t(33868),h=new d({Extends:r,initialize:function(v){r.call(this);var m=v.sys.game.config,x=v.sys.settings.loader;this.scene=v,this.systems=v.sys,this.cacheManager=v.sys.cache,this.textureManager=v.sys.textures,this.sceneManager=v.sys.game.scene,e.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(s(x,"baseURL",m.loaderBaseURL)),this.setPath(s(x,"path",m.loaderPath)),this.setPrefix(s(x,"prefix",m.loaderPrefix)),this.maxParallelDownloads=s(x,"maxParallelDownloads",m.loaderMaxParallelDownloads),this.xhr=o(s(x,"responseType",m.loaderResponseType),s(x,"async",m.loaderAsync),s(x,"user",m.loaderUser),s(x,"password",m.loaderPassword),s(x,"timeout",m.loaderTimeout),s(x,"withCredentials",m.loaderWithCredentials)),this.crossOrigin=s(x,"crossOrigin",m.loaderCrossOrigin),this.imageLoadType=s(x,"imageLoadType",m.loaderImageLoadType),this.localSchemes=s(x,"localScheme",m.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new l,this.inflight=new l,this.queue=new l,this._deleteQueue=new l,this.totalFailed=0,this.totalComplete=0,this.state=c.LOADER_IDLE,this.multiKeyIndex=0,v.sys.events.once(a.BOOT,this.boot,this),v.sys.events.on(a.START,this.pluginStart,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(a.SHUTDOWN,this.shutdown,this)},setBaseURL:function(f){return f===void 0&&(f=""),f!==""&&f.substr(-1)!=="/"&&(f=f.concat("/")),this.baseURL=f,this},setPath:function(f){return f===void 0&&(f=""),f!==""&&f.substr(-1)!=="/"&&(f=f.concat("/")),this.path=f,this},setPrefix:function(f){return f===void 0&&(f=""),this.prefix=f,this},setCORS:function(f){return this.crossOrigin=f,this},addFile:function(f){Array.isArray(f)||(f=[f]);for(var v=0;v0},isLoading:function(){return this.state===c.LOADER_LOADING||this.state===c.LOADER_PROCESSING},isReady:function(){return this.state===c.LOADER_IDLE||this.state===c.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(n.START,this),this.list.size===0?this.loadComplete():(this.state=c.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(a.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(n.PROGRESS,this.progress)},update:function(){this.state===c.LOADER_LOADING&&this.list.size>0&&this.inflight.size{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(98611),c=t(33868),l=function(r,n){var e=r===void 0?c():d({},r);if(n)for(var s in n)n[s]!==void 0&&(e[s]=n[s]);return e};p.exports=l},45176:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(683),r=new d({initialize:function(e,s,u,i){var a=[];i.forEach(function(f){f&&a.push(f)}),this.loader=e,this.type=s,this.key=u;var o=this.key;e.prefix&&e.prefix!==""&&(this.key=e.prefix+o),this.multiKeyIndex=e.multiKeyIndex++,this.files=a,this.state=c.FILE_PENDING,this.complete=!1,this.pending=a.length,this.failed=0,this.config={},this.baseURL=e.baseURL,this.path=e.path,this.prefix=e.prefix;for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43531),c=function(l,r){var n=d(r,l.xhrSettings),e=new XMLHttpRequest;if(e.open("GET",l.src,n.async,n.user,n.password),e.responseType=l.xhrSettings.responseType,e.timeout=n.timeout,n.headers)for(var s in n.headers)e.setRequestHeader(s,n.headers[s]);return n.header&&n.headerValue&&e.setRequestHeader(n.header,n.headerValue),n.requestedWith&&e.setRequestHeader("X-Requested-With",n.requestedWith),n.overrideMimeType&&e.overrideMimeType(n.overrideMimeType),n.withCredentials&&(e.withCredentials=!0),e.onload=l.onLoad.bind(l,e),e.onerror=l.onError.bind(l,e),e.onprogress=l.onProgress.bind(l),e.send(),e};p.exports=c},33868:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r,n){return t===void 0&&(t=""),d===void 0&&(d=!0),c===void 0&&(c=""),l===void 0&&(l=""),r===void 0&&(r=0),n===void 0&&(n=!1),{responseType:t,async:d,user:c,password:l,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}};p.exports=S},12117:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20};p.exports=S},7398:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addfile"},52187:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},36627:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="filecomplete"},81925:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="filecomplete-"},29774:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loaderror"},20943:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="load"},74693:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="fileprogress"},71176:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postprocess"},88984:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="progress"},72753:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},683:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADD:t(7398),COMPLETE:t(52187),FILE_COMPLETE:t(36627),FILE_KEY_COMPLETE:t(81925),FILE_LOAD_ERROR:t(29774),FILE_LOAD:t(20943),FILE_PROGRESS:t(74693),POST_PROCESS:t(71176),PROGRESS:t(88984),START:t(72753)}},46468:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(76846),l=t(70806),r=t(683),n=new d({Extends:l,initialize:function(s,u,i,a,o){l.call(this,s,u,i,a,o),this.type="animationJSON"},onProcess:function(){this.loader.once(r.POST_PROCESS,this.onLoadComplete,this),l.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});c.register("animation",function(e,s,u,i){if(Array.isArray(e))for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(76846),l=t(72632),r=t(42927),n=t(42911),e=t(70806),s=t(45176),u=new d({Extends:s,initialize:function(a,o,h,f,v,m){var x,g;if(n(o)){var y=o;o=l(y,"key"),x=new r(a,{key:o,url:l(y,"textureURL"),extension:l(y,"textureExtension","png"),normalMap:l(y,"normalMap"),xhrSettings:l(y,"textureXhrSettings")}),g=new e(a,{key:o,url:l(y,"atlasURL"),extension:l(y,"atlasExtension","json"),xhrSettings:l(y,"atlasXhrSettings")})}else x=new r(a,o,h,v),g=new e(a,o,f,m);x.linkFile?s.call(this,a,"atlasjson",o,[x,g,x.linkFile]):s.call(this,a,"atlasjson",o,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],o=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,a.data,o),a.addToCache(),this.complete=!0}}});c.register("aseprite",function(i,a,o,h,f){var v;if(Array.isArray(i))for(var m=0;m{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(76846),l=t(72632),r=t(42927),n=t(42911),e=t(70806),s=t(45176),u=new d({Extends:s,initialize:function(a,o,h,f,v,m){var x,g;if(n(o)){var y=o;o=l(y,"key"),x=new r(a,{key:o,url:l(y,"textureURL"),extension:l(y,"textureExtension","png"),normalMap:l(y,"normalMap"),xhrSettings:l(y,"textureXhrSettings")}),g=new e(a,{key:o,url:l(y,"atlasURL"),extension:l(y,"atlasExtension","json"),xhrSettings:l(y,"atlasXhrSettings")})}else x=new r(a,o,h,v),g=new e(a,o,f,m);x.linkFile?s.call(this,a,"atlasjson",o,[x,g,x.linkFile]):s.call(this,a,"atlasjson",o,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],o=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,a.data,o),this.complete=!0}}});c.register("atlas",function(i,a,o,h,f){var v;if(Array.isArray(i))for(var m=0;m{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(76846),l=t(72632),r=t(42927),n=t(42911),e=t(45176),s=t(15297),u=new d({Extends:e,initialize:function(a,o,h,f,v,m){var x,g;if(n(o)){var y=o;o=l(y,"key"),x=new r(a,{key:o,url:l(y,"textureURL"),extension:l(y,"textureExtension","png"),normalMap:l(y,"normalMap"),xhrSettings:l(y,"textureXhrSettings")}),g=new s(a,{key:o,url:l(y,"atlasURL"),extension:l(y,"atlasExtension","xml"),xhrSettings:l(y,"atlasXhrSettings")})}else x=new r(a,o,h,v),g=new s(a,o,f,m);x.linkFile?e.call(this,a,"atlasxml",o,[x,g,x.linkFile]):e.call(this,a,"atlasxml",o,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],o=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(i.key,i.data,a.data,o),this.complete=!0}}});c.register("atlasXML",function(i,a,o,h,f){var v;if(Array.isArray(i))for(var m=0;m{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(30929),s=t(42911),u=new d({Extends:l,initialize:function(a,o,h,f,v){if(s(o)){var m=o;o=n(m,"key"),f=n(m,"xhrSettings"),v=n(m,"context",v)}var x={type:"audio",cache:a.cacheManager.audio,extension:h.type,responseType:"arraybuffer",key:o,url:h.url,xhrSettings:f,config:{context:v}};l.call(this,a,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var i=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(a){i.data=a,i.onProcessComplete()},function(a){console.error("Error decoding audio: "+i.key+" - ",a?a.message:null),i.onProcessError()}),this.config.context=null}});u.create=function(i,a,o,h,f){var v=i.systems.game,m=v.config.audio,x=v.device.audio;s(a)&&(o=n(a,"url",[]),h=n(a,"config",{}));var g=u.getAudioURL(v,o);return g?x.webAudio&&!m.disableWebAudio?new u(i,a,g,f,v.sound.context):new e(i,a,g,h):(console.warn('No audio URLs for "%s" matched this device',a),null)},u.getAudioURL=function(i,a){Array.isArray(a)||(a=[a]);for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(67448),c=t(56694),l=t(76846),r=t(72632),n=t(42911),e=t(70806),s=t(45176),u=new c({Extends:s,initialize:function(a,o,h,f,v,m,x){if(n(o)){var g=o;o=r(g,"key"),h=r(g,"jsonURL"),f=r(g,"audioURL"),v=r(g,"audioConfig"),m=r(g,"audioXhrSettings"),x=r(g,"jsonXhrSettings")}var y;if(!f)y=new e(a,o,h,x),s.call(this,a,"audiosprite",o,[y]),this.config.resourceLoad=!0,this.config.audioConfig=v,this.config.audioXhrSettings=m;else{var T=d.create(a,o,f,v,m);T&&(y=new e(a,o,h,x),s.call(this,a,"audiosprite",o,[T,y]),this.config.resourceLoad=!1)}},onFileComplete:function(i){var a=this.files.indexOf(i);if(a!==-1&&(this.pending--,this.config.resourceLoad&&i.type==="json"&&i.data.hasOwnProperty("resources"))){var o=i.data.resources,h=r(this.config,"audioConfig"),f=r(this.config,"audioXhrSettings"),v=d.create(this.loader,i.key,o,h,f);v&&(this.addToMultiFile(v),this.loader.addFile(v))}},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1];i.addToCache(),a.addToCache(),this.complete=!0}}});l.register("audioSprite",function(i,a,o,h,f,v){var m=this.systems.game,x=m.config.audio,g=m.device.audio;if(x&&x.noAudio||!g.webAudio&&!g.audioData)return this;var y;if(Array.isArray(i))for(var T=0;T{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=new d({Extends:l,initialize:function(i,a,o,h,f){var v="bin";if(e(a)){var m=a;a=n(m,"key"),o=n(m,"url"),h=n(m,"xhrSettings"),v=n(m,"extension",v),f=n(m,"dataType",f)}var x={type:"binary",cache:i.cacheManager.binary,extension:v,responseType:"arraybuffer",key:a,url:o,xhrSettings:h,config:{dataType:f}};l.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var u=this.config.dataType;this.data=u?new u(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});r.register("binary",function(u,i,a,o){if(Array.isArray(u))for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(76846),l=t(72632),r=t(42927),n=t(42911),e=t(45176),s=t(31476),u=t(15297),i=new d({Extends:e,initialize:function(o,h,f,v,m,x){var g,y;if(n(h)){var T=h;h=l(T,"key"),g=new r(o,{key:h,url:l(T,"textureURL"),extension:l(T,"textureExtension","png"),normalMap:l(T,"normalMap"),xhrSettings:l(T,"textureXhrSettings")}),y=new u(o,{key:h,url:l(T,"fontDataURL"),extension:l(T,"fontDataExtension","xml"),xhrSettings:l(T,"fontDataXhrSettings")})}else g=new r(o,h,f,m),y=new u(o,h,v,x);g.linkFile?e.call(this,o,"bitmapfont",h,[g,y,g.linkFile]):e.call(this,o,"bitmapfont",h,[g,y])},addToCache:function(){if(this.isReadyToProcess()){var a=this.files[0],o=this.files[1];a.addToCache();var h=a.cache.get(a.key),f=s(o.data,a.cache.getFrame(a.key),0,0,h);this.loader.cacheManager.bitmapFont.add(a.key,{data:f,texture:a.key,frame:null}),this.complete=!0}}});c.register("bitmapFont",function(a,o,h,f,v){var m;if(Array.isArray(a))for(var x=0;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=new d({Extends:l,initialize:function(i,a,o,h){var f="css";if(e(a)){var v=a;a=n(v,"key"),o=n(v,"url"),h=n(v,"xhrSettings"),f=n(v,"extension",f)}var m={type:"script",cache:!1,extension:f,responseType:"text",key:a,url:o,xhrSettings:h};l.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("css",function(u,i,a){if(Array.isArray(u))for(var o=0;o{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73152),c=t(40612),l=t(56694),r=t(76846),n=t(72632),e=t(42927),s=t(42911),u=t(70806),i=t(67409),a=t(30657),o=t(80802),h=t(45176),f=t(24904),v=new l({Extends:h,initialize:function(x,g,y,T){if(y.multiAtlasURL){var E=new u(x,{key:g,url:y.multiAtlasURL,xhrSettings:T,config:y});h.call(this,x,"texture",g,[E])}else{var C=y.textureURL.substr(y.textureURL.length-3);y.type||(y.type=C.toLowerCase()==="ktx"?"KTX":"PVR");var A=new c(x,{key:g,url:y.textureURL,extension:C,xhrSettings:T,config:y});if(y.atlasURL){var P=new u(x,{key:g,url:y.atlasURL,xhrSettings:T,config:y});h.call(this,x,"texture",g,[A,P])}else h.call(this,x,"texture",g,[A])}this.config=y},onFileComplete:function(m){var x=this.files.indexOf(m);if(x!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(m.type==="json"&&m.data.hasOwnProperty("textures")){var g=m.data.textures,y=this.config,T=this.loader,E=T.baseURL,C=T.path,A=T.prefix,P=n(y,"multiBaseURL",this.baseURL),R=n(y,"multiPath",this.path),F=n(y,"prefix",this.prefix),L=n(y,"textureXhrSettings");P&&T.setBaseURL(P),R&&T.setPath(R),F&&T.setPrefix(F);for(var B=0;B{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=t(31053),u=new d({Extends:l,initialize:function(a,o,h,f,v){var m="glsl";if(e(o)){var x=o;o=n(x,"key"),h=n(x,"url"),f=n(x,"shaderType","fragment"),v=n(x,"xhrSettings"),m=n(x,"extension",m)}else f===void 0&&(f="fragment");var g={type:"glsl",cache:a.cacheManager.shader,extension:m,responseType:"text",key:o,url:h,config:{shaderType:f},xhrSettings:v};l.call(this,a,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i=this.data.split(` +`),a=this.extractBlock(i,0);if(a)for(;a;){var o=this.getShaderName(a.header),h=this.getShaderType(a.header),f=this.getShaderUniforms(a.header),v=a.shader;if(this.cache.has(o)){var m=this.cache.get(o);h==="fragment"?m.fragmentSrc=v:m.vertexSrc=v,m.uniforms||(m.uniforms=f)}else h==="fragment"?this.cache.add(o,new s(o,v,"",f)):this.cache.add(o,new s(o,"",v,f));a=this.extractBlock(i,a.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new s(this.key,this.data)):this.cache.add(this.key,new s(this.key,"",this.data))},getShaderName:function(i){for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(683),l=t(98035),r=t(72632),n=t(30750),e=t(42911),s=new d({Extends:l,initialize:function(i,a,o,h){if(e(a)){var f=a;a=r(f,"key"),h=r(f,"config",h)}var v={type:"audio",cache:i.cacheManager.audio,extension:o.type,key:a,url:o.url,config:h};l.call(this,i,v),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=new d({Extends:l,initialize:function(i,a,o,h){var f="html";if(e(a)){var v=a;a=n(v,"key"),o=n(v,"url"),h=n(v,"xhrSettings"),f=n(v,"extension",f)}var m={type:"text",cache:i.cacheManager.html,extension:f,responseType:"text",key:a,url:o,xhrSettings:h};l.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("html",function(u,i,a){if(Array.isArray(u))for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=new d({Extends:l,initialize:function(i,a,o,h,f,v){h===void 0&&(h=512),f===void 0&&(f=512);var m="html";if(e(a)){var x=a;a=n(x,"key"),o=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),h=n(x,"width",h),f=n(x,"height",f)}var g={type:"html",cache:i.textureManager,extension:m,responseType:"text",key:a,url:o,xhrSettings:v,config:{width:h,height:f}};l.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING;var u=this.config.width,i=this.config.height,a=[];a.push(''),a.push(''),a.push(''),a.push(this.xhrLoader.responseText),a.push(""),a.push(""),a.push("");var o=[a.join(` +`)],h=this;try{var f=new window.Blob(o,{type:"image/svg+xml;charset=utf-8"})}catch{h.state=c.FILE_ERRORED,h.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){l.revokeObjectURL(h.data),h.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(h.data),h.onProcessError()},l.createObjectURL(this.data,f,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("htmlTexture",function(u,i,a,o,h){if(Array.isArray(u))for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=t(30750),u=new d({Extends:l,initialize:function i(a,o,h,f,v){var m="png",x;if(e(o)){var g=o;o=n(g,"key"),h=n(g,"url"),x=n(g,"normalMap"),f=n(g,"xhrSettings"),m=n(g,"extension",m),v=n(g,"frameConfig")}Array.isArray(h)&&(x=h[1],h=h[0]);var y={type:"image",cache:a.textureManager,extension:m,responseType:"blob",key:o,url:h,xhrSettings:f,config:v};if(l.call(this,a,y),x){var T=new i(a,this.key,x,f,v);T.type="normalMap",this.setLink(T),a.addFile(T)}this.useImageElementLoad=a.imageLoadType==="HTMLImageElement",this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){l.revokeObjectURL(i.data),i.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(i.data),i.onProcessError()},l.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var i=this.state;this.state=c.FILE_PROCESSING,i===c.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=c.FILE_LOADING,this.src=s(this,this.loader.baseURL),this.src.indexOf("data:")===0)console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){i.state=c.FILE_LOADED,i.loader.nextFile(i,!0)},this.data.onerror=function(){i.loader.nextFile(i,!1)},this.data.src=this.src}},addToCache:function(){var i=this.linkFile;i?i.state>=c.FILE_COMPLETE&&(i.type==="spritesheet"?i.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,i.data,this.data):this.cache.addImage(this.key,this.data,i.data)):this.cache.addImage(this.key,this.data)}});r.register("image",function(i,a,o){if(Array.isArray(i))for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(10850),s=t(42911),u=new d({Extends:l,initialize:function(a,o,h,f,v){var m="json";if(s(o)){var x=o;o=n(x,"key"),h=n(x,"url"),f=n(x,"xhrSettings"),m=n(x,"extension",m),v=n(x,"dataKey",v)}var g={type:"json",cache:a.cacheManager.json,extension:m,responseType:"text",key:o,url:h,xhrSettings:f,config:v};l.call(this,a,g),s(h)&&(v?this.data=e(h,v):this.data=h,this.state=c.FILE_POPULATED)},onProcess:function(){if(this.state!==c.FILE_POPULATED){this.state=c.FILE_PROCESSING;try{var i=JSON.parse(this.xhrLoader.responseText)}catch(o){throw this.onProcessError(),o}var a=this.config;typeof a=="string"?this.data=e(i,a,i):this.data=i}this.onProcessComplete()}});r.register("json",function(i,a,o,h){if(Array.isArray(i))for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(76846),l=t(72632),r=t(42927),n=t(42911),e=t(70806),s=t(45176),u=new d({Extends:s,initialize:function(a,o,h,f,v,m,x){if(n(o)){var g=o;o=l(g,"key"),l(g,"url",!1)?h=l(g,"url"):h=l(g,"atlasURL"),m=l(g,"xhrSettings"),f=l(g,"path"),v=l(g,"baseURL"),x=l(g,"textureXhrSettings")}var y=new e(a,o,h,m);s.call(this,a,"multiatlas",o,[y]),this.config.path=f,this.config.baseURL=v,this.config.textureXhrSettings=x},onFileComplete:function(i){var a=this.files.indexOf(i);if(a!==-1&&(this.pending--,i.type==="json"&&i.data.hasOwnProperty("textures"))){var o=i.data.textures,h=this.config,f=this.loader,v=f.baseURL,m=f.path,x=f.prefix,g=l(h,"baseURL",this.baseURL),y=l(h,"path",this.path),T=l(h,"prefix",this.prefix),E=l(h,"textureXhrSettings");f.setBaseURL(g),f.setPath(y),f.setPrefix(T);for(var C=0;C{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(76846),l=t(72632),r=t(42911),n=t(45176),e=t(55188),s=new d({Extends:n,initialize:function(i,a,o,h){var f="js",v=[];if(r(a)){var m=a;a=l(m,"key"),o=l(m,"url"),h=l(m,"xhrSettings"),f=l(m,"extension",f)}Array.isArray(o)||(o=[o]);for(var x=0;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(76846),l=t(72632),r=t(42911),n=t(45176),e=t(27291),s=t(76799),u=t(86897),i=new d({Extends:n,initialize:function(o,h,f,v,m,x){var g,y,T=o.cacheManager.obj;if(r(h)){var E=h;h=l(E,"key"),g=new u(o,{key:h,type:"obj",cache:T,url:l(E,"url"),extension:l(E,"extension","obj"),xhrSettings:l(E,"xhrSettings"),config:{flipUV:l(E,"flipUV",m)}}),v=l(E,"matURL"),v&&(y=new u(o,{key:h,type:"mat",cache:T,url:v,extension:l(E,"matExtension","mat"),xhrSettings:l(E,"xhrSettings")}))}else g=new u(o,{key:h,url:f,type:"obj",cache:T,extension:"obj",xhrSettings:x,config:{flipUV:m}}),v&&(y=new u(o,{key:h,url:v,type:"mat",cache:T,extension:"mat",xhrSettings:x}));n.call(this,o,"obj",h,[g,y])},addToCache:function(){if(this.isReadyToProcess()){var a=this.files[0],o=this.files[1],h=e(a.data,a.config.flipUV);o&&(h.materials=s(o.data)),a.cache.add(a.key,h),this.complete=!0}}});c.register("obj",function(a,o,h,f,v){var m;if(Array.isArray(a))for(var x=0;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(76846),r=t(70806),n=new d({Extends:r,initialize:function(s,u,i,a,o){r.call(this,s,u,i,a,o),this.type="packfile"},onProcess:function(){if(this.state!==c.FILE_POPULATED&&(this.state=c.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var e={};e[this.config]=this.data,this.data=e}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});l.register("pack",function(e,s,u,i){if(Array.isArray(e))for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=new d({Extends:l,initialize:function(i,a,o,h,f,v){var m="js";if(e(a)){var x=a;a=n(x,"key"),o=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),h=n(x,"start"),f=n(x,"mapping")}var g={type:"plugin",cache:!1,extension:m,responseType:"text",key:a,url:o,xhrSettings:v,config:{start:h,mapping:f}};l.call(this,i,g),typeof o=="function"&&(this.data=o,this.state=c.FILE_POPULATED)},onProcess:function(){var u=this.loader.systems.plugins,i=this.config,a=n(i,"start",!1),o=n(i,"mapping",null);if(this.state===c.FILE_POPULATED)u.install(this.key,this.data,a,o);else{this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var h=u.install(this.key,window[this.key],a,o);(a||o)&&(this.loader.systems[o]=h,this.loader.scene[o]=h)}this.onProcessComplete()}});r.register("plugin",function(u,i,a,o,h){if(Array.isArray(u))for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=new d({Extends:l,initialize:function(i,a,o,h,f){var v="svg";if(e(a)){var m=a;a=n(m,"key"),o=n(m,"url"),h=n(m,"svgConfig",{}),f=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"svg",cache:i.textureManager,extension:v,responseType:"text",key:a,url:o,xhrSettings:f,config:{width:n(h,"width"),height:n(h,"height"),scale:n(h,"scale")}};l.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var u=this.xhrLoader.responseText,i=[u],a=this.config.width,o=this.config.height,h=this.config.scale;t:if(a&&o||h){var f=null,v=new DOMParser;f=v.parseFromString(u,"text/xml");var m=f.getElementsByTagName("svg")[0],x=m.hasAttribute("viewBox"),g=parseFloat(m.getAttribute("width")),y=parseFloat(m.getAttribute("height"));if(!x&&g&&y)m.setAttribute("viewBox","0 0 "+g+" "+y);else if(x&&!g&&!y){var T=m.getAttribute("viewBox").split(/\s+|,/);g=T[2],y=T[3]}if(h)if(g&&y)a=g*h,o=y*h;else break t;m.setAttribute("width",a.toString()+"px"),m.setAttribute("height",o.toString()+"px"),i=[new XMLSerializer().serializeToString(m)]}try{var E=new window.Blob(i,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var C=this,A=!1;this.data.onload=function(){A||l.revokeObjectURL(C.data),C.onProcessComplete()},this.data.onerror=function(){A?C.onProcessError():(A=!0,l.revokeObjectURL(C.data),C.data.src="data:image/svg+xml,"+encodeURIComponent(i.join("")))},l.createObjectURL(this.data,E,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("svg",function(u,i,a,o){if(Array.isArray(u))for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=new d({Extends:l,initialize:function(i,a,o,h){var f="js";if(e(a)){var v=a;a=n(v,"key"),o=n(v,"url"),h=n(v,"xhrSettings"),f=n(v,"extension",f)}var m={type:"text",extension:f,responseType:"text",key:a,url:o,xhrSettings:h};l.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var u=this.data.concat(`(function(){ +return new `+this.key+`(); +}).call(this);`),i=eval;this.loader.sceneManager.add(this.key,i(u)),this.complete=!0}});r.register("sceneFile",function(u,i,a){if(Array.isArray(u))for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=new d({Extends:l,initialize:function(i,a,o,h,f,v){var m="js";if(e(a)){var x=a;a=n(x,"key"),o=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),h=n(x,"systemKey"),f=n(x,"sceneKey")}var g={type:"scenePlugin",cache:!1,extension:m,responseType:"text",key:a,url:o,xhrSettings:v,config:{systemKey:h,sceneKey:f}};l.call(this,i,g),typeof o=="function"&&(this.data=o,this.state=c.FILE_POPULATED)},onProcess:function(){var u=this.loader.systems.plugins,i=this.config,a=this.key,o=n(i,"systemKey",a),h=n(i,"sceneKey",a);this.state===c.FILE_POPULATED?u.installScenePlugin(o,this.data,h,this.loader.scene,!0):(this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),u.installScenePlugin(o,window[this.key],h,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(u,i,a,o,h){if(Array.isArray(u))for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=new d({Extends:l,initialize:function(i,a,o,h,f){var v="js";if(e(a)){var m=a;a=n(m,"key"),o=n(m,"url"),h=n(m,"type","script"),f=n(m,"xhrSettings"),v=n(m,"extension",v)}else h===void 0&&(h="script");var x={type:h,cache:!1,extension:v,responseType:"text",key:a,url:o,xhrSettings:f};l.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("script",function(u,i,a,o){if(Array.isArray(u))for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(76846),r=t(42927),n=new d({Extends:r,initialize:function(s,u,i,a,o){r.call(this,s,u,i,o,a),this.type="spritesheet"},addToCache:function(){var e=this.linkFile;e?e.state>=c.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,e.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,e.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});l.register("spritesheet",function(e,s,u,i){if(Array.isArray(e))for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=new d({Extends:l,initialize:function(i,a,o,h){var f="text",v="txt",m=i.cacheManager.text;if(e(a)){var x=a;a=n(x,"key"),o=n(x,"url"),h=n(x,"xhrSettings"),v=n(x,"extension",v),f=n(x,"type",f),m=n(x,"cache",m)}var g={type:f,cache:m,extension:v,responseType:"text",key:a,url:o,xhrSettings:h};l.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("text",function(u,i,a){if(Array.isArray(u))for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=t(93560),u=new d({Extends:l,initialize:function(a,o,h,f){var v="csv";if(e(o)){var m=o;o=n(m,"key"),h=n(m,"url"),f=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"tilemapCSV",cache:a.cacheManager.tilemap,extension:v,responseType:"text",key:o,url:h,xhrSettings:f};l.call(this,a,x),this.tilemapFormat=s.CSV},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,i)}});r.register("tilemapCSV",function(i,a,o){if(Array.isArray(i))for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(76846),l=t(70806),r=t(93560),n=new d({Extends:l,initialize:function(s,u,i,a){l.call(this,s,u,i,a),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:r.WELTMEISTER,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapImpact",function(e,s,u){if(Array.isArray(e))for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(76846),l=t(70806),r=t(93560),n=new d({Extends:l,initialize:function(s,u,i,a){l.call(this,s,u,i,a),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:r.TILED_JSON,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapTiledJSON",function(e,s,u){if(Array.isArray(e))for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(76846),l=t(72632),r=t(42927),n=t(42911),e=t(45176),s=t(86897),u=new d({Extends:e,initialize:function(a,o,h,f,v,m){var x,g;if(n(o)){var y=o;o=l(y,"key"),x=new r(a,{key:o,url:l(y,"textureURL"),extension:l(y,"textureExtension","png"),normalMap:l(y,"normalMap"),xhrSettings:l(y,"textureXhrSettings")}),g=new s(a,{key:o,url:l(y,"atlasURL"),extension:l(y,"atlasExtension","txt"),xhrSettings:l(y,"atlasXhrSettings")})}else x=new r(a,o,h,v),g=new s(a,o,f,m);x.linkFile?e.call(this,a,"unityatlas",o,[x,g,x.linkFile]):e.call(this,a,"unityatlas",o,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],a=this.files[1],o=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(i.key,i.data,a.data,o),this.complete=!0}}});c.register("unityAtlas",function(i,a,o,h,f){var v;if(Array.isArray(i))for(var m=0;m{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(30750),e=t(72632),s=t(42911),u=new d({Extends:l,initialize:function(a,o,h,f){if(f===void 0&&(f=!1),s(o)){var v=o;o=e(v,"key"),h=e(v,"url",[]),f=e(v,"noAudio",!1)}var m=a.systems.game.device.video.getVideoURL(h);m||console.warn("VideoFile: No supported format for "+o);var x={type:"video",cache:a.cacheManager.video,extension:m.type,key:o,url:m.url,config:{noAudio:f}};l.call(this,a,x)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=n(this,this.loader.baseURL),this.state=c.FILE_LOADED,this.loader.nextFile(this,!0)}});r.register("video",function(i,a,o){if(Array.isArray(i))for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12117),l=t(98035),r=t(76846),n=t(72632),e=t(42911),s=t(89200),u=new d({Extends:l,initialize:function(a,o,h,f){var v="xml";if(e(o)){var m=o;o=n(m,"key"),h=n(m,"url"),f=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"xml",cache:a.cacheManager.xml,extension:v,responseType:"text",key:o,url:h,xhrSettings:f};l.call(this,a,x)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=s(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});r.register("xml",function(i,a,o){if(Array.isArray(i))for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AnimationJSONFile:t(46468),AsepriteFile:t(31648),AtlasJSONFile:t(73152),AtlasXMLFile:t(24616),AudioFile:t(67448),AudioSpriteFile:t(66109),BinaryFile:t(40612),BitmapFontFile:t(54565),CompressedTextureFile:t(47375),CSSFile:t(99898),GLSLFile:t(46568),HTML5AudioFile:t(30929),HTMLFile:t(77459),HTMLTextureFile:t(9755),ImageFile:t(42927),JSONFile:t(70806),MultiAtlasFile:t(80802),MultiScriptFile:t(39034),OBJFile:t(85527),PackFile:t(3616),PluginFile:t(12217),SceneFile:t(95171),ScenePluginFile:t(82458),ScriptFile:t(55188),SpriteSheetFile:t(33536),SVGFile:t(4474),TextFile:t(86897),TilemapCSVFile:t(58673),TilemapImpactFile:t(98896),TilemapJSONFile:t(50563),UnityAtlasFile:t(82857),VideoFile:t(22833),XMLFile:t(15297)}},95695:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12117),c=t(98611),l={Events:t(683),FileTypes:t(34034),File:t(98035),FileTypesManager:t(76846),GetURL:t(30750),LoaderPlugin:t(67285),MergeXHRSettings:t(43531),MultiFile:t(45176),XHRLoader:t(88490),XHRSettings:t(33868)};l=c(!1,l,d),p.exports=l},26042:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){for(var d=0,c=0;c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(8034),c=function(l,r){return d(l)/d(r)/d(l-r)};p.exports=c},17489:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return Math.floor(Math.random()*(d-t+1)+t)};p.exports=S},14976:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r){var n=(l-d)*.5,e=(r-c)*.5,s=t*t,u=t*s;return(2*c-2*l+n+e)*u+(-3*c+3*l-2*n-e)*s+n*t+c};p.exports=S},89129:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var l=Math.pow(c,-d);return Math.ceil(t*l)/l};p.exports=S},82897:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return Math.max(d,Math.min(c,t))};p.exports=S},75606:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83392),c=function(l){return l*d.DEG_TO_RAD};p.exports=c},767:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return Math.abs(t-d)};p.exports=S},9849:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=t(56694),l=t(16650),r=t(72283),n=new l,e=new c({initialize:function s(u,i,a,o){u===void 0&&(u=0),i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=s.DefaultOrder),this._x=u,this._y=i,this._z=a,this._order=o,this.onChangeCallback=r},x:{get:function(){return this._x},set:function(s){this._x=s,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(s){this._y=s,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(s){this._z=s,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(s){this._order=s,this.onChangeCallback(this)}},set:function(s,u,i,a){return a===void 0&&(a=this._order),this._x=s,this._y=u,this._z=i,this._order=a,this.onChangeCallback(this),this},copy:function(s){return this.set(s.x,s.y,s.z,s.order)},setFromQuaternion:function(s,u,i){return u===void 0&&(u=this._order),i===void 0&&(i=!1),n.fromQuat(s),this.setFromRotationMatrix(n,u,i)},setFromRotationMatrix:function(s,u,i){u===void 0&&(u=this._order),i===void 0&&(i=!1);var a=s.val,o=a[0],h=a[4],f=a[8],v=a[1],m=a[5],x=a[9],g=a[2],y=a[6],T=a[10],E=0,C=0,A=0,P=.99999;switch(u){case"XYZ":{C=Math.asin(d(f,-1,1)),Math.abs(f){/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){if(t===0)return 1;for(var d=t;--t;)d*=t;return d};p.exports=S},61616:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return Math.random()*(d-t)+t};p.exports=S},60679:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var l=Math.pow(c,-d);return Math.floor(t*l)/l};p.exports=S},91806:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=function(l,r,n){return l=d(l,0,1),(n-r)*l+r};p.exports=c},79366:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t/d/1e3};p.exports=S},43776:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t==parseFloat(t)?!(t%2):void 0};p.exports=S},58442:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t===parseFloat(t)?!(t%2):void 0};p.exports=S},42798:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return(d-t)*c+t};p.exports=S},61072:p=>{/** + * @author Greg McLean + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return c===void 0&&(c=0),t.clone().lerp(d,c)};p.exports=S},5341:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r){this.val=new Float32Array(9),r?this.copy(r):this.identity()},clone:function(){return new c(this)},set:function(l){return this.copy(l)},copy:function(l){var r=this.val,n=l.val;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],this},fromMat4:function(l){var r=l.val,n=this.val;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[4],n[4]=r[5],n[5]=r[6],n[6]=r[8],n[7]=r[9],n[8]=r[10],this},fromArray:function(l){var r=this.val;return r[0]=l[0],r[1]=l[1],r[2]=l[2],r[3]=l[3],r[4]=l[4],r[5]=l[5],r[6]=l[6],r[7]=l[7],r[8]=l[8],this},identity:function(){var l=this.val;return l[0]=1,l[1]=0,l[2]=0,l[3]=0,l[4]=1,l[5]=0,l[6]=0,l[7]=0,l[8]=1,this},transpose:function(){var l=this.val,r=l[1],n=l[2],e=l[5];return l[1]=l[3],l[2]=l[6],l[3]=r,l[5]=l[7],l[6]=n,l[7]=e,this},invert:function(){var l=this.val,r=l[0],n=l[1],e=l[2],s=l[3],u=l[4],i=l[5],a=l[6],o=l[7],h=l[8],f=h*u-i*o,v=-h*s+i*a,m=o*s-u*a,x=r*f+n*v+e*m;return x?(x=1/x,l[0]=f*x,l[1]=(-h*n+e*o)*x,l[2]=(i*n-e*u)*x,l[3]=v*x,l[4]=(h*r-e*a)*x,l[5]=(-i*r+e*s)*x,l[6]=m*x,l[7]=(-o*r+n*a)*x,l[8]=(u*r-n*s)*x,this):null},adjoint:function(){var l=this.val,r=l[0],n=l[1],e=l[2],s=l[3],u=l[4],i=l[5],a=l[6],o=l[7],h=l[8];return l[0]=u*h-i*o,l[1]=e*o-n*h,l[2]=n*i-e*u,l[3]=i*a-s*h,l[4]=r*h-e*a,l[5]=e*s-r*i,l[6]=s*o-u*a,l[7]=n*a-r*o,l[8]=r*u-n*s,this},determinant:function(){var l=this.val,r=l[0],n=l[1],e=l[2],s=l[3],u=l[4],i=l[5],a=l[6],o=l[7],h=l[8];return r*(h*u-i*o)+n*(-h*s+i*a)+e*(o*s-u*a)},multiply:function(l){var r=this.val,n=r[0],e=r[1],s=r[2],u=r[3],i=r[4],a=r[5],o=r[6],h=r[7],f=r[8],v=l.val,m=v[0],x=v[1],g=v[2],y=v[3],T=v[4],E=v[5],C=v[6],A=v[7],P=v[8];return r[0]=m*n+x*u+g*o,r[1]=m*e+x*i+g*h,r[2]=m*s+x*a+g*f,r[3]=y*n+T*u+E*o,r[4]=y*e+T*i+E*h,r[5]=y*s+T*a+E*f,r[6]=C*n+A*u+P*o,r[7]=C*e+A*i+P*h,r[8]=C*s+A*a+P*f,this},translate:function(l){var r=this.val,n=l.x,e=l.y;return r[6]=n*r[0]+e*r[3]+r[6],r[7]=n*r[1]+e*r[4]+r[7],r[8]=n*r[2]+e*r[5]+r[8],this},rotate:function(l){var r=this.val,n=r[0],e=r[1],s=r[2],u=r[3],i=r[4],a=r[5],o=Math.sin(l),h=Math.cos(l);return r[0]=h*n+o*u,r[1]=h*e+o*i,r[2]=h*s+o*a,r[3]=h*u-o*n,r[4]=h*i-o*e,r[5]=h*a-o*s,this},scale:function(l){var r=this.val,n=l.x,e=l.y;return r[0]=n*r[0],r[1]=n*r[1],r[2]=n*r[2],r[3]=e*r[3],r[4]=e*r[4],r[5]=e*r[5],this},fromQuat:function(l){var r=l.x,n=l.y,e=l.z,s=l.w,u=r+r,i=n+n,a=e+e,o=r*u,h=r*i,f=r*a,v=n*i,m=n*a,x=e*a,g=s*u,y=s*i,T=s*a,E=this.val;return E[0]=1-(v+x),E[3]=h+T,E[6]=f-y,E[1]=h-T,E[4]=1-(o+x),E[7]=m+g,E[2]=f+y,E[5]=m-g,E[8]=1-(o+v),this},normalFromMat4:function(l){var r=l.val,n=this.val,e=r[0],s=r[1],u=r[2],i=r[3],a=r[4],o=r[5],h=r[6],f=r[7],v=r[8],m=r[9],x=r[10],g=r[11],y=r[12],T=r[13],E=r[14],C=r[15],A=e*o-s*a,P=e*h-u*a,R=e*f-i*a,F=s*h-u*o,L=s*f-i*o,B=u*f-i*h,N=v*T-m*y,U=v*E-x*y,z=v*C-g*y,w=m*E-x*T,I=m*C-g*T,M=x*C-g*E,O=A*M-P*I+R*w+F*z-L*U+B*N;return O?(O=1/O,n[0]=(o*M-h*I+f*w)*O,n[1]=(h*z-a*M-f*U)*O,n[2]=(a*I-o*z+f*N)*O,n[3]=(u*I-s*M-i*w)*O,n[4]=(e*M-u*z+i*U)*O,n[5]=(s*z-e*I-i*N)*O,n[6]=(T*B-E*L+C*F)*O,n[7]=(E*R-y*B-C*P)*O,n[8]=(y*L-T*R+C*A)*O,this):null}});p.exports=c},16650:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(70015),l=1e-6,r=new d({initialize:function(o){this.val=new Float32Array(16),o?this.copy(o):this.identity()},clone:function(){return new r(this)},set:function(a){return this.copy(a)},setValues:function(a,o,h,f,v,m,x,g,y,T,E,C,A,P,R,F){var L=this.val;return L[0]=a,L[1]=o,L[2]=h,L[3]=f,L[4]=v,L[5]=m,L[6]=x,L[7]=g,L[8]=y,L[9]=T,L[10]=E,L[11]=C,L[12]=A,L[13]=P,L[14]=R,L[15]=F,this},copy:function(a){var o=a.val;return this.setValues(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9],o[10],o[11],o[12],o[13],o[14],o[15])},fromArray:function(a){return this.setValues(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(a,o,h){var f=n.fromQuat(h),v=f.val,m=o.x,x=o.y,g=o.z;return this.setValues(v[0]*m,v[1]*m,v[2]*m,0,v[4]*x,v[5]*x,v[6]*x,0,v[8]*g,v[9]*g,v[10]*g,0,a.x,a.y,a.z,1)},xyz:function(a,o,h){this.identity();var f=this.val;return f[12]=a,f[13]=o,f[14]=h,this},scaling:function(a,o,h){this.zero();var f=this.val;return f[0]=a,f[5]=o,f[10]=h,f[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var a=this.val,o=a[1],h=a[2],f=a[3],v=a[6],m=a[7],x=a[11];return a[1]=a[4],a[2]=a[8],a[3]=a[12],a[4]=o,a[6]=a[9],a[7]=a[13],a[8]=h,a[9]=v,a[11]=a[14],a[12]=f,a[13]=m,a[14]=x,this},getInverse:function(a){return this.copy(a),this.invert()},invert:function(){var a=this.val,o=a[0],h=a[1],f=a[2],v=a[3],m=a[4],x=a[5],g=a[6],y=a[7],T=a[8],E=a[9],C=a[10],A=a[11],P=a[12],R=a[13],F=a[14],L=a[15],B=o*x-h*m,N=o*g-f*m,U=o*y-v*m,z=h*g-f*x,w=h*y-v*x,I=f*y-v*g,M=T*R-E*P,O=T*F-C*P,D=T*L-A*P,G=E*F-C*R,X=E*L-A*R,V=C*L-A*F,Y=B*V-N*X+U*G+z*D-w*O+I*M;return Y?(Y=1/Y,this.setValues((x*V-g*X+y*G)*Y,(f*X-h*V-v*G)*Y,(R*I-F*w+L*z)*Y,(C*w-E*I-A*z)*Y,(g*D-m*V-y*O)*Y,(o*V-f*D+v*O)*Y,(F*U-P*I-L*N)*Y,(T*I-C*U+A*N)*Y,(m*X-x*D+y*M)*Y,(h*D-o*X-v*M)*Y,(P*w-R*U+L*B)*Y,(E*U-T*w-A*B)*Y,(x*O-m*G-g*M)*Y,(o*G-h*O+f*M)*Y,(R*N-P*z-F*B)*Y,(T*z-E*N+C*B)*Y)):this},adjoint:function(){var a=this.val,o=a[0],h=a[1],f=a[2],v=a[3],m=a[4],x=a[5],g=a[6],y=a[7],T=a[8],E=a[9],C=a[10],A=a[11],P=a[12],R=a[13],F=a[14],L=a[15];return this.setValues(x*(C*L-A*F)-E*(g*L-y*F)+R*(g*A-y*C),-(h*(C*L-A*F)-E*(f*L-v*F)+R*(f*A-v*C)),h*(g*L-y*F)-x*(f*L-v*F)+R*(f*y-v*g),-(h*(g*A-y*C)-x*(f*A-v*C)+E*(f*y-v*g)),-(m*(C*L-A*F)-T*(g*L-y*F)+P*(g*A-y*C)),o*(C*L-A*F)-T*(f*L-v*F)+P*(f*A-v*C),-(o*(g*L-y*F)-m*(f*L-v*F)+P*(f*y-v*g)),o*(g*A-y*C)-m*(f*A-v*C)+T*(f*y-v*g),m*(E*L-A*R)-T*(x*L-y*R)+P*(x*A-y*E),-(o*(E*L-A*R)-T*(h*L-v*R)+P*(h*A-v*E)),o*(x*L-y*R)-m*(h*L-v*R)+P*(h*y-v*x),-(o*(x*A-y*E)-m*(h*A-v*E)+T*(h*y-v*x)),-(m*(E*F-C*R)-T*(x*F-g*R)+P*(x*C-g*E)),o*(E*F-C*R)-T*(h*F-f*R)+P*(h*C-f*E),-(o*(x*F-g*R)-m*(h*F-f*R)+P*(h*g-f*x)),o*(x*C-g*E)-m*(h*C-f*E)+T*(h*g-f*x))},determinant:function(){var a=this.val,o=a[0],h=a[1],f=a[2],v=a[3],m=a[4],x=a[5],g=a[6],y=a[7],T=a[8],E=a[9],C=a[10],A=a[11],P=a[12],R=a[13],F=a[14],L=a[15],B=o*x-h*m,N=o*g-f*m,U=o*y-v*m,z=h*g-f*x,w=h*y-v*x,I=f*y-v*g,M=T*R-E*P,O=T*F-C*P,D=T*L-A*P,G=E*F-C*R,X=E*L-A*R,V=C*L-A*F;return B*V-N*X+U*G+z*D-w*O+I*M},multiply:function(a){var o=this.val,h=o[0],f=o[1],v=o[2],m=o[3],x=o[4],g=o[5],y=o[6],T=o[7],E=o[8],C=o[9],A=o[10],P=o[11],R=o[12],F=o[13],L=o[14],B=o[15],N=a.val,U=N[0],z=N[1],w=N[2],I=N[3];return o[0]=U*h+z*x+w*E+I*R,o[1]=U*f+z*g+w*C+I*F,o[2]=U*v+z*y+w*A+I*L,o[3]=U*m+z*T+w*P+I*B,U=N[4],z=N[5],w=N[6],I=N[7],o[4]=U*h+z*x+w*E+I*R,o[5]=U*f+z*g+w*C+I*F,o[6]=U*v+z*y+w*A+I*L,o[7]=U*m+z*T+w*P+I*B,U=N[8],z=N[9],w=N[10],I=N[11],o[8]=U*h+z*x+w*E+I*R,o[9]=U*f+z*g+w*C+I*F,o[10]=U*v+z*y+w*A+I*L,o[11]=U*m+z*T+w*P+I*B,U=N[12],z=N[13],w=N[14],I=N[15],o[12]=U*h+z*x+w*E+I*R,o[13]=U*f+z*g+w*C+I*F,o[14]=U*v+z*y+w*A+I*L,o[15]=U*m+z*T+w*P+I*B,this},multiplyLocal:function(a){var o=this.val,h=a.val;return this.setValues(o[0]*h[0]+o[1]*h[4]+o[2]*h[8]+o[3]*h[12],o[0]*h[1]+o[1]*h[5]+o[2]*h[9]+o[3]*h[13],o[0]*h[2]+o[1]*h[6]+o[2]*h[10]+o[3]*h[14],o[0]*h[3]+o[1]*h[7]+o[2]*h[11]+o[3]*h[15],o[4]*h[0]+o[5]*h[4]+o[6]*h[8]+o[7]*h[12],o[4]*h[1]+o[5]*h[5]+o[6]*h[9]+o[7]*h[13],o[4]*h[2]+o[5]*h[6]+o[6]*h[10]+o[7]*h[14],o[4]*h[3]+o[5]*h[7]+o[6]*h[11]+o[7]*h[15],o[8]*h[0]+o[9]*h[4]+o[10]*h[8]+o[11]*h[12],o[8]*h[1]+o[9]*h[5]+o[10]*h[9]+o[11]*h[13],o[8]*h[2]+o[9]*h[6]+o[10]*h[10]+o[11]*h[14],o[8]*h[3]+o[9]*h[7]+o[10]*h[11]+o[11]*h[15],o[12]*h[0]+o[13]*h[4]+o[14]*h[8]+o[15]*h[12],o[12]*h[1]+o[13]*h[5]+o[14]*h[9]+o[15]*h[13],o[12]*h[2]+o[13]*h[6]+o[14]*h[10]+o[15]*h[14],o[12]*h[3]+o[13]*h[7]+o[14]*h[11]+o[15]*h[15])},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,o){var h=a.val,f=o.val,v=h[0],m=h[4],x=h[8],g=h[12],y=h[1],T=h[5],E=h[9],C=h[13],A=h[2],P=h[6],R=h[10],F=h[14],L=h[3],B=h[7],N=h[11],U=h[15],z=f[0],w=f[4],I=f[8],M=f[12],O=f[1],D=f[5],G=f[9],X=f[13],V=f[2],Y=f[6],W=f[10],H=f[14],b=f[3],K=f[7],J=f[11],Z=f[15];return this.setValues(v*z+m*O+x*V+g*b,y*z+T*O+E*V+C*b,A*z+P*O+R*V+F*b,L*z+B*O+N*V+U*b,v*w+m*D+x*Y+g*K,y*w+T*D+E*Y+C*K,A*w+P*D+R*Y+F*K,L*w+B*D+N*Y+U*K,v*I+m*G+x*W+g*J,y*I+T*G+E*W+C*J,A*I+P*G+R*W+F*J,L*I+B*G+N*W+U*J,v*M+m*X+x*H+g*Z,y*M+T*X+E*H+C*Z,A*M+P*X+R*H+F*Z,L*M+B*X+N*H+U*Z)},translate:function(a){return this.translateXYZ(a.x,a.y,a.z)},translateXYZ:function(a,o,h){var f=this.val;return f[12]=f[0]*a+f[4]*o+f[8]*h+f[12],f[13]=f[1]*a+f[5]*o+f[9]*h+f[13],f[14]=f[2]*a+f[6]*o+f[10]*h+f[14],f[15]=f[3]*a+f[7]*o+f[11]*h+f[15],this},scale:function(a){return this.scaleXYZ(a.x,a.y,a.z)},scaleXYZ:function(a,o,h){var f=this.val;return f[0]=f[0]*a,f[1]=f[1]*a,f[2]=f[2]*a,f[3]=f[3]*a,f[4]=f[4]*o,f[5]=f[5]*o,f[6]=f[6]*o,f[7]=f[7]*o,f[8]=f[8]*h,f[9]=f[9]*h,f[10]=f[10]*h,f[11]=f[11]*h,this},makeRotationAxis:function(a,o){var h=Math.cos(o),f=Math.sin(o),v=1-h,m=a.x,x=a.y,g=a.z,y=v*m,T=v*x;return this.setValues(y*m+h,y*x-f*g,y*g+f*x,0,y*x+f*g,T*x+h,T*g-f*m,0,y*g-f*x,T*g+f*m,v*g*g+h,0,0,0,0,1)},rotate:function(a,o){var h=this.val,f=o.x,v=o.y,m=o.z,x=Math.sqrt(f*f+v*v+m*m);if(Math.abs(x){/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return Math.min(t+d,c)};p.exports=S},37394:p=>{/** + * @author Vladislav Forsh + * @copyright 2021 RoboWhale + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d=t.length;if(d===0)return 0;t.sort(function(l,r){return l-r});var c=Math.floor(d/2);return d%2===0?(t[c]+t[c-1])/2:t[c]};p.exports=S},17259:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return Math.max(t-d,c)};p.exports=S},61820:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){c===void 0&&(c=d+1);var r=(t-d)/(c-d);return r>1?l!==void 0?(r=(l-t)/(l-c),r<0&&(r=0)):r=1:r<0&&(r=0),r};p.exports=S},75003:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(5341),l=t(72283),r=t(70015),n=1e-6,e=new Int8Array([1,2,0]),s=new Float32Array([0,0,0]),u=new r(1,0,0),i=new r(0,1,0),a=new r,o=new c,h=new d({initialize:function(v,m,x,g){this.onChangeCallback=l,this.set(v,m,x,g)},x:{get:function(){return this._x},set:function(f){this._x=f,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(f){this._y=f,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(f){this._z=f,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(f){this._w=f,this.onChangeCallback(this)}},copy:function(f){return this.set(f)},set:function(f,v,m,x,g){return g===void 0&&(g=!0),typeof f=="object"?(this._x=f.x||0,this._y=f.y||0,this._z=f.z||0,this._w=f.w||0):(this._x=f||0,this._y=v||0,this._z=m||0,this._w=x||0),g&&this.onChangeCallback(this),this},add:function(f){return this._x+=f.x,this._y+=f.y,this._z+=f.z,this._w+=f.w,this.onChangeCallback(this),this},subtract:function(f){return this._x-=f.x,this._y-=f.y,this._z-=f.z,this._w-=f.w,this.onChangeCallback(this),this},scale:function(f){return this._x*=f,this._y*=f,this._z*=f,this._w*=f,this.onChangeCallback(this),this},length:function(){var f=this.x,v=this.y,m=this.z,x=this.w;return Math.sqrt(f*f+v*v+m*m+x*x)},lengthSq:function(){var f=this.x,v=this.y,m=this.z,x=this.w;return f*f+v*v+m*m+x*x},normalize:function(){var f=this.x,v=this.y,m=this.z,x=this.w,g=f*f+v*v+m*m+x*x;return g>0&&(g=1/Math.sqrt(g),this._x=f*g,this._y=v*g,this._z=m*g,this._w=x*g),this.onChangeCallback(this),this},dot:function(f){return this.x*f.x+this.y*f.y+this.z*f.z+this.w*f.w},lerp:function(f,v){v===void 0&&(v=0);var m=this.x,x=this.y,g=this.z,y=this.w;return this.set(m+v*(f.x-m),x+v*(f.y-x),g+v*(f.z-g),y+v*(f.w-y))},rotationTo:function(f,v){var m=f.x*v.x+f.y*v.y+f.z*v.z;return m<-.999999?(a.copy(u).cross(f).length().999999?this.set(0,0,0,1):(a.copy(f).cross(v),this._x=a.x,this._y=a.y,this._z=a.z,this._w=1+m,this.normalize())},setAxes:function(f,v,m){var x=o.val;return x[0]=v.x,x[3]=v.y,x[6]=v.z,x[1]=m.x,x[4]=m.y,x[7]=m.z,x[2]=-f.x,x[5]=-f.y,x[8]=-f.z,this.fromMat3(o).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(f,v){v=v*.5;var m=Math.sin(v);return this.set(m*f.x,m*f.y,m*f.z,Math.cos(v))},multiply:function(f){var v=this.x,m=this.y,x=this.z,g=this.w,y=f.x,T=f.y,E=f.z,C=f.w;return this.set(v*C+g*y+m*E-x*T,m*C+g*T+x*y-v*E,x*C+g*E+v*T-m*y,g*C-v*y-m*T-x*E)},slerp:function(f,v){var m=this.x,x=this.y,g=this.z,y=this.w,T=f.x,E=f.y,C=f.z,A=f.w,P=m*T+x*E+g*C+y*A;P<0&&(P=-P,T=-T,E=-E,C=-C,A=-A);var R=1-v,F=v;if(1-P>n){var L=Math.acos(P),B=Math.sin(L);R=Math.sin((1-v)*L)/B,F=Math.sin(v*L)/B}return this.set(R*m+F*T,R*x+F*E,R*g+F*C,R*y+F*A)},invert:function(){var f=this.x,v=this.y,m=this.z,x=this.w,g=f*f+v*v+m*m+x*x,y=g?1/g:0;return this.set(-f*y,-v*y,-m*y,x*y)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(f){f*=.5;var v=this.x,m=this.y,x=this.z,g=this.w,y=Math.sin(f),T=Math.cos(f);return this.set(v*T+g*y,m*T+x*y,x*T-m*y,g*T-v*y)},rotateY:function(f){f*=.5;var v=this.x,m=this.y,x=this.z,g=this.w,y=Math.sin(f),T=Math.cos(f);return this.set(v*T-x*y,m*T+g*y,x*T+v*y,g*T-m*y)},rotateZ:function(f){f*=.5;var v=this.x,m=this.y,x=this.z,g=this.w,y=Math.sin(f),T=Math.cos(f);return this.set(v*T+m*y,m*T-v*y,x*T+g*y,g*T-x*y)},calculateW:function(){var f=this.x,v=this.y,m=this.z;return this.w=-Math.sqrt(1-f*f-v*v-m*m),this},setFromEuler:function(f,v){var m=f.x/2,x=f.y/2,g=f.z/2,y=Math.cos(m),T=Math.cos(x),E=Math.cos(g),C=Math.sin(m),A=Math.sin(x),P=Math.sin(g);switch(f.order){case"XYZ":{this.set(C*T*E+y*A*P,y*A*E-C*T*P,y*T*P+C*A*E,y*T*E-C*A*P,v);break}case"YXZ":{this.set(C*T*E+y*A*P,y*A*E-C*T*P,y*T*P-C*A*E,y*T*E+C*A*P,v);break}case"ZXY":{this.set(C*T*E-y*A*P,y*A*E+C*T*P,y*T*P+C*A*E,y*T*E-C*A*P,v);break}case"ZYX":{this.set(C*T*E-y*A*P,y*A*E+C*T*P,y*T*P-C*A*E,y*T*E+C*A*P,v);break}case"YZX":{this.set(C*T*E+y*A*P,y*A*E+C*T*P,y*T*P-C*A*E,y*T*E-C*A*P,v);break}case"XZY":{this.set(C*T*E-y*A*P,y*A*E-C*T*P,y*T*P+C*A*E,y*T*E+C*A*P,v);break}}return this},setFromRotationMatrix:function(f){var v=f.val,m=v[0],x=v[4],g=v[8],y=v[1],T=v[5],E=v[9],C=v[2],A=v[6],P=v[10],R=m+T+P,F;return R>0?(F=.5/Math.sqrt(R+1),this.set((A-E)*F,(g-C)*F,(y-x)*F,.25/F)):m>T&&m>P?(F=2*Math.sqrt(1+m-T-P),this.set(.25*F,(x+y)/F,(g+C)/F,(A-E)/F)):T>P?(F=2*Math.sqrt(1+T-m-P),this.set((x+y)/F,.25*F,(E+A)/F,(g-C)/F)):(F=2*Math.sqrt(1+P-m-T),this.set((g+C)/F,(E+A)/F,.25*F,(y-x)/F)),this},fromMat3:function(f){var v=f.val,m=v[0]+v[4]+v[8],x;if(m>0)x=Math.sqrt(m+1),this.w=.5*x,x=.5/x,this._x=(v[7]-v[5])*x,this._y=(v[2]-v[6])*x,this._z=(v[3]-v[1])*x;else{var g=0;v[4]>v[0]&&(g=1),v[8]>v[g*3+g]&&(g=2);var y=e[g],T=e[y];x=Math.sqrt(v[g*3+g]-v[y*3+y]-v[T*3+T]+1),s[g]=.5*x,x=.5/x,s[y]=(v[y*3+g]+v[g*3+y])*x,s[T]=(v[T*3+g]+v[g*3+T])*x,this._x=s[0],this._y=s[1],this._z=s[2],this._w=(v[T*3+y]-v[y*3+T])*x}return this.onChangeCallback(this),this}});p.exports=h},23701:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83392),c=function(l){return l*d.RAD_TO_DEG};p.exports=c},16906:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d=1);var c=Math.random()*2*Math.PI;return t.x=Math.cos(c)*d,t.y=Math.sin(c)*d,t};p.exports=S},52417:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d=1);var c=Math.random()*2*Math.PI,l=Math.random()*2-1,r=Math.sqrt(1-l*l)*d;return t.x=Math.cos(c)*r,t.y=Math.sin(c)*r,t.z=l*d,t};p.exports=S},17915:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d=1),t.x=(Math.random()*2-1)*d,t.y=(Math.random()*2-1)*d,t.z=(Math.random()*2-1)*d,t.w=(Math.random()*2-1)*d,t};p.exports=S},52257:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.x,l=t.y;return t.x=c*Math.cos(d)-l*Math.sin(d),t.y=c*Math.sin(d)+l*Math.cos(d),t};p.exports=S},2386:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r=Math.cos(l),n=Math.sin(l),e=t.x-d,s=t.y-c;return t.x=e*r-s*n+d,t.y=e*n+s*r+c,t};p.exports=S},72395:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r){var n=l+Math.atan2(t.y-c,t.x-d);return t.x=d+r*Math.cos(n),t.y=c+r*Math.sin(n),t};p.exports=S},41061:p=>{/** + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r){return t.x=d+r*Math.cos(l),t.y=c+r*Math.sin(l),t};p.exports=S},93709:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(70015),c=t(16650),l=t(75003),r=new c,n=new l,e=new d,s=function(u,i,a){return n.setAxisAngle(i,a),r.fromRotationTranslation(n,e.set(0,0,0)),u.transformMat4(r)};p.exports=s},67233:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t>0?Math.ceil(t):Math.floor(t)};p.exports=S},64333:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var l=Math.pow(c,-d);return Math.round(t*l)/l};p.exports=S},59533:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){d===void 0&&(d=1),c===void 0&&(c=1),l===void 0&&(l=1),l*=Math.PI/t;for(var r=[],n=[],e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t<=d?0:t>=c?1:(t=(t-d)/(c-d),t*t*(3-2*t))};p.exports=S},87736:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t=Math.max(0,Math.min(1,(t-d)/(c-d))),t*t*t*(t*(t*6-15)+10)};p.exports=S},55805:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736),c=function(l,r,n,e){e===void 0&&(e=new d);var s=0,u=0,i=r*n;return l>0&&l<=i&&(l>r-1?(u=Math.floor(l/r),s=l-u*r):s=l),e.set(s,u)};p.exports=c},64462:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736),c=function(l,r,n,e,s,u,i,a){a===void 0&&(a=new d);var o=Math.sin(s),h=Math.cos(s),f=h*u,v=o*u,m=-o*i,x=h*i,g=1/(f*x+m*-v);return a.x=x*g*l+-m*g*r+(e*m-n*x)*g,a.y=f*g*r+-v*g*l+(-e*f+n*v)*g,a};p.exports=c},93736:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(88456),l=new d({initialize:function(n,e){this.x=0,this.y=0,typeof n=="object"?(this.x=n.x||0,this.y=n.y||0):(e===void 0&&(e=n),this.x=n||0,this.y=e||0)},clone:function(){return new l(this.x,this.y)},copy:function(r){return this.x=r.x||0,this.y=r.y||0,this},setFromObject:function(r){return this.x=r.x||0,this.y=r.y||0,this},set:function(r,n){return n===void 0&&(n=r),this.x=r,this.y=n,this},setTo:function(r,n){return this.set(r,n)},setToPolar:function(r,n){return n==null&&(n=1),this.x=Math.cos(r)*n,this.y=Math.sin(r)*n,this},equals:function(r){return this.x===r.x&&this.y===r.y},fuzzyEquals:function(r,n){return c(this.x,r.x,n)&&c(this.y,r.y,n)},angle:function(){var r=Math.atan2(this.y,this.x);return r<0&&(r+=2*Math.PI),r},setAngle:function(r){return this.setToPolar(r,this.length())},add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.x-=r.x,this.y-=r.y,this},multiply:function(r){return this.x*=r.x,this.y*=r.y,this},scale:function(r){return isFinite(r)?(this.x*=r,this.y*=r):(this.x=0,this.y=0),this},divide:function(r){return this.x/=r.x,this.y/=r.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(r){var n=r.x-this.x,e=r.y-this.y;return Math.sqrt(n*n+e*e)},distanceSq:function(r){var n=r.x-this.x,e=r.y-this.y;return n*n+e*e},length:function(){var r=this.x,n=this.y;return Math.sqrt(r*r+n*n)},setLength:function(r){return this.normalize().scale(r)},lengthSq:function(){var r=this.x,n=this.y;return r*r+n*n},normalize:function(){var r=this.x,n=this.y,e=r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=r*e,this.y=n*e),this},normalizeRightHand:function(){var r=this.x;return this.x=this.y*-1,this.y=r,this},normalizeLeftHand:function(){var r=this.x;return this.x=this.y,this.y=r*-1,this},dot:function(r){return this.x*r.x+this.y*r.y},cross:function(r){return this.x*r.y-this.y*r.x},lerp:function(r,n){n===void 0&&(n=0);var e=this.x,s=this.y;return this.x=e+n*(r.x-e),this.y=s+n*(r.y-s),this},transformMat3:function(r){var n=this.x,e=this.y,s=r.val;return this.x=s[0]*n+s[3]*e+s[6],this.y=s[1]*n+s[4]*e+s[7],this},transformMat4:function(r){var n=this.x,e=this.y,s=r.val;return this.x=s[0]*n+s[4]*e+s[12],this.y=s[1]*n+s[5]*e+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(r){var n=this.length();return n&&n>r&&this.scale(r/n),this},reflect:function(r){return r=r.clone().normalize(),this.subtract(r.scale(2*this.dot(r)))},mirror:function(r){return this.reflect(r).negate()},rotate:function(r){var n=Math.cos(r),e=Math.sin(r);return this.set(n*this.x-e*this.y,e*this.x+n*this.y)},project:function(r){var n=this.dot(r)/r.dot(r);return this.copy(r).scale(n)}});l.ZERO=new l,l.RIGHT=new l(1,0),l.LEFT=new l(-1,0),l.UP=new l(0,-1),l.DOWN=new l(0,1),l.ONE=new l(1,1),p.exports=l},70015:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r,n,e){this.x=0,this.y=0,this.z=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0):(this.x=r||0,this.y=n||0,this.z=e||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(l){return this.x=Math.min(this.x,l.x),this.y=Math.min(this.y,l.y),this.z=Math.min(this.z,l.z),this},max:function(l){return this.x=Math.max(this.x,l.x),this.y=Math.max(this.y,l.y),this.z=Math.max(this.z,l.z),this},clone:function(){return new c(this.x,this.y,this.z)},addVectors:function(l,r){return this.x=l.x+r.x,this.y=l.y+r.y,this.z=l.z+r.z,this},crossVectors:function(l,r){var n=l.x,e=l.y,s=l.z,u=r.x,i=r.y,a=r.z;return this.x=e*a-s*i,this.y=s*u-n*a,this.z=n*i-e*u,this},equals:function(l){return this.x===l.x&&this.y===l.y&&this.z===l.z},copy:function(l){return this.x=l.x,this.y=l.y,this.z=l.z||0,this},set:function(l,r,n){return typeof l=="object"?(this.x=l.x||0,this.y=l.y||0,this.z=l.z||0):(this.x=l||0,this.y=r||0,this.z=n||0),this},setFromMatrixPosition:function(l){return this.fromArray(l.val,12)},setFromMatrixColumn:function(l,r){return this.fromArray(l.val,r*4)},fromArray:function(l,r){return r===void 0&&(r=0),this.x=l[r],this.y=l[r+1],this.z=l[r+2],this},add:function(l){return this.x+=l.x,this.y+=l.y,this.z+=l.z||0,this},addScalar:function(l){return this.x+=l,this.y+=l,this.z+=l,this},addScale:function(l,r){return this.x+=l.x*r,this.y+=l.y*r,this.z+=l.z*r||0,this},subtract:function(l){return this.x-=l.x,this.y-=l.y,this.z-=l.z||0,this},multiply:function(l){return this.x*=l.x,this.y*=l.y,this.z*=l.z||1,this},scale:function(l){return isFinite(l)?(this.x*=l,this.y*=l,this.z*=l):(this.x=0,this.y=0,this.z=0),this},divide:function(l){return this.x/=l.x,this.y/=l.y,this.z/=l.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(l){var r=l.x-this.x,n=l.y-this.y,e=l.z-this.z||0;return Math.sqrt(r*r+n*n+e*e)},distanceSq:function(l){var r=l.x-this.x,n=l.y-this.y,e=l.z-this.z||0;return r*r+n*n+e*e},length:function(){var l=this.x,r=this.y,n=this.z;return Math.sqrt(l*l+r*r+n*n)},lengthSq:function(){var l=this.x,r=this.y,n=this.z;return l*l+r*r+n*n},normalize:function(){var l=this.x,r=this.y,n=this.z,e=l*l+r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=l*e,this.y=r*e,this.z=n*e),this},dot:function(l){return this.x*l.x+this.y*l.y+this.z*l.z},cross:function(l){var r=this.x,n=this.y,e=this.z,s=l.x,u=l.y,i=l.z;return this.x=n*i-e*u,this.y=e*s-r*i,this.z=r*u-n*s,this},lerp:function(l,r){r===void 0&&(r=0);var n=this.x,e=this.y,s=this.z;return this.x=n+r*(l.x-n),this.y=e+r*(l.y-e),this.z=s+r*(l.z-s),this},applyMatrix3:function(l){var r=this.x,n=this.y,e=this.z,s=l.val;return this.x=s[0]*r+s[3]*n+s[6]*e,this.y=s[1]*r+s[4]*n+s[7]*e,this.z=s[2]*r+s[5]*n+s[8]*e,this},applyMatrix4:function(l){var r=this.x,n=this.y,e=this.z,s=l.val,u=1/(s[3]*r+s[7]*n+s[11]*e+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*e+s[12])*u,this.y=(s[1]*r+s[5]*n+s[9]*e+s[13])*u,this.z=(s[2]*r+s[6]*n+s[10]*e+s[14])*u,this},transformMat3:function(l){var r=this.x,n=this.y,e=this.z,s=l.val;return this.x=r*s[0]+n*s[3]+e*s[6],this.y=r*s[1]+n*s[4]+e*s[7],this.z=r*s[2]+n*s[5]+e*s[8],this},transformMat4:function(l){var r=this.x,n=this.y,e=this.z,s=l.val;return this.x=s[0]*r+s[4]*n+s[8]*e+s[12],this.y=s[1]*r+s[5]*n+s[9]*e+s[13],this.z=s[2]*r+s[6]*n+s[10]*e+s[14],this},transformCoordinates:function(l){var r=this.x,n=this.y,e=this.z,s=l.val,u=r*s[0]+n*s[4]+e*s[8]+s[12],i=r*s[1]+n*s[5]+e*s[9]+s[13],a=r*s[2]+n*s[6]+e*s[10]+s[14],o=r*s[3]+n*s[7]+e*s[11]+s[15];return this.x=u/o,this.y=i/o,this.z=a/o,this},transformQuat:function(l){var r=this.x,n=this.y,e=this.z,s=l.x,u=l.y,i=l.z,a=l.w,o=a*r+u*e-i*n,h=a*n+i*r-s*e,f=a*e+s*n-u*r,v=-s*r-u*n-i*e;return this.x=o*a+v*-s+h*-i-f*-u,this.y=h*a+v*-u+f*-s-o*-i,this.z=f*a+v*-i+o*-u-h*-s,this},project:function(l){var r=this.x,n=this.y,e=this.z,s=l.val,u=s[0],i=s[1],a=s[2],o=s[3],h=s[4],f=s[5],v=s[6],m=s[7],x=s[8],g=s[9],y=s[10],T=s[11],E=s[12],C=s[13],A=s[14],P=s[15],R=1/(r*o+n*m+e*T+P);return this.x=(r*u+n*h+e*x+E)*R,this.y=(r*i+n*f+e*g+C)*R,this.z=(r*a+n*v+e*y+A)*R,this},projectViewMatrix:function(l,r){return this.applyMatrix4(l).applyMatrix4(r)},unprojectViewMatrix:function(l,r){return this.applyMatrix4(l).applyMatrix4(r)},unproject:function(l,r){var n=l.x,e=l.y,s=l.z,u=l.w,i=this.x-n,a=u-this.y-1-e,o=this.z;return this.x=2*i/s-1,this.y=2*a/u-1,this.z=2*o-1,this.project(r)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});c.ZERO=new c,c.RIGHT=new c(1,0,0),c.LEFT=new c(-1,0,0),c.UP=new c(0,-1,0),c.DOWN=new c(0,1,0),c.FORWARD=new c(0,0,1),c.BACK=new c(0,0,-1),c.ONE=new c(1,1,1),p.exports=c},51729:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r,n,e,s){this.x=0,this.y=0,this.z=0,this.w=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0,this.w=r.w||0):(this.x=r||0,this.y=n||0,this.z=e||0,this.w=s||0)},clone:function(){return new c(this.x,this.y,this.z,this.w)},copy:function(l){return this.x=l.x,this.y=l.y,this.z=l.z||0,this.w=l.w||0,this},equals:function(l){return this.x===l.x&&this.y===l.y&&this.z===l.z&&this.w===l.w},set:function(l,r,n,e){return typeof l=="object"?(this.x=l.x||0,this.y=l.y||0,this.z=l.z||0,this.w=l.w||0):(this.x=l||0,this.y=r||0,this.z=n||0,this.w=e||0),this},add:function(l){return this.x+=l.x,this.y+=l.y,this.z+=l.z||0,this.w+=l.w||0,this},subtract:function(l){return this.x-=l.x,this.y-=l.y,this.z-=l.z||0,this.w-=l.w||0,this},scale:function(l){return this.x*=l,this.y*=l,this.z*=l,this.w*=l,this},length:function(){var l=this.x,r=this.y,n=this.z,e=this.w;return Math.sqrt(l*l+r*r+n*n+e*e)},lengthSq:function(){var l=this.x,r=this.y,n=this.z,e=this.w;return l*l+r*r+n*n+e*e},normalize:function(){var l=this.x,r=this.y,n=this.z,e=this.w,s=l*l+r*r+n*n+e*e;return s>0&&(s=1/Math.sqrt(s),this.x=l*s,this.y=r*s,this.z=n*s,this.w=e*s),this},dot:function(l){return this.x*l.x+this.y*l.y+this.z*l.z+this.w*l.w},lerp:function(l,r){r===void 0&&(r=0);var n=this.x,e=this.y,s=this.z,u=this.w;return this.x=n+r*(l.x-n),this.y=e+r*(l.y-e),this.z=s+r*(l.z-s),this.w=u+r*(l.w-u),this},multiply:function(l){return this.x*=l.x,this.y*=l.y,this.z*=l.z||1,this.w*=l.w||1,this},divide:function(l){return this.x/=l.x,this.y/=l.y,this.z/=l.z||1,this.w/=l.w||1,this},distance:function(l){var r=l.x-this.x,n=l.y-this.y,e=l.z-this.z||0,s=l.w-this.w||0;return Math.sqrt(r*r+n*n+e*e+s*s)},distanceSq:function(l){var r=l.x-this.x,n=l.y-this.y,e=l.z-this.z||0,s=l.w-this.w||0;return r*r+n*n+e*e+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(l){var r=this.x,n=this.y,e=this.z,s=this.w,u=l.val;return this.x=u[0]*r+u[4]*n+u[8]*e+u[12]*s,this.y=u[1]*r+u[5]*n+u[9]*e+u[13]*s,this.z=u[2]*r+u[6]*n+u[10]*e+u[14]*s,this.w=u[3]*r+u[7]*n+u[11]*e+u[15]*s,this},transformQuat:function(l){var r=this.x,n=this.y,e=this.z,s=l.x,u=l.y,i=l.z,a=l.w,o=a*r+u*e-i*n,h=a*n+i*r-s*e,f=a*e+s*n-u*r,v=-s*r-u*n-i*e;return this.x=o*a+v*-s+h*-i-f*-u,this.y=h*a+v*-u+f*-s-o*-i,this.z=f*a+v*-i+o*-u-h*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});c.prototype.sub=c.prototype.subtract,c.prototype.mul=c.prototype.multiply,c.prototype.div=c.prototype.divide,c.prototype.dist=c.prototype.distance,c.prototype.distSq=c.prototype.distanceSq,c.prototype.len=c.prototype.length,c.prototype.lenSq=c.prototype.lengthSq,p.exports=c},9557:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return Math.abs(t-d)<=c};p.exports=S},1071:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=c-d;return d+((t-d)%l+l)%l};p.exports=S},90447:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){return Math.atan2(l-d,c-t)};p.exports=S},94240:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return Math.atan2(d.y-t.y,d.x-t.x)};p.exports=S},84066:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return Math.atan2(d.x-t.x,d.y-t.y)};p.exports=S},9678:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){return Math.atan2(c-t,l-d)};p.exports=S},76861:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83392),c=function(l){return l>Math.PI&&(l-=d.PI2),Math.abs(((l+d.TAU)%d.PI2-d.PI2)%d.PI2)};p.exports=c},37570:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t=t%(2*Math.PI),t>=0?t:t+2*Math.PI};p.exports=S},87597:(p,S,t)=>{/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61616),c=function(){return d(-Math.PI,Math.PI)};p.exports=c},74493:(p,S,t)=>{/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61616),c=function(){return d(-180,180)};p.exports=c},19049:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(37570),c=function(l){return d(l+Math.PI)};p.exports=c},90612:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83392),c=function(l,r,n){return n===void 0&&(n=.05),l===r||(Math.abs(r-l)<=n||Math.abs(r-l)>=d.PI2-n?l=r:(Math.abs(r-l)>Math.PI&&(rl?l+=n:r{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=d-t;if(c===0)return 0;var l=Math.floor((c- -180)/360);return c-l*360};p.exports=S},35786:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(1071),c=function(l){return d(l,-Math.PI,Math.PI)};p.exports=c},62138:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(1071),c=function(l){return d(l,-180,180)};p.exports=c},22153:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Between:t(90447),BetweenPoints:t(94240),BetweenPointsY:t(84066),BetweenY:t(9678),CounterClockwise:t(76861),Normalize:t(37570),Random:t(87597),RandomDegrees:t(74493),Reverse:t(19049),RotateTo:t(90612),ShortestBetween:t(93954),Wrap:t(35786),WrapDegrees:t(62138)}},83392:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={PI2:Math.PI*2,TAU:Math.PI*.5,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};p.exports=S},53996:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r=t-c,n=d-l;return Math.sqrt(r*r+n*n)};p.exports=S},92951:p=>{/** + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.x-d.x,l=t.y-d.y;return Math.sqrt(c*c+l*l)};p.exports=S},12161:p=>{/** + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.x-d.x,l=t.y-d.y;return c*c+l*l};p.exports=S},38057:p=>{/** + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){return Math.max(Math.abs(t-c),Math.abs(d-l))};p.exports=S},33297:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r){return r===void 0&&(r=2),Math.sqrt(Math.pow(c-t,r)+Math.pow(l-d,r))};p.exports=S},90366:p=>{/** + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){return Math.abs(t-c)+Math.abs(d-l)};p.exports=S},35032:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r=t-c,n=d-l;return r*r+n*n};p.exports=S},10130:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Between:t(53996),BetweenPoints:t(92951),BetweenPointsSquared:t(12161),Chebyshev:t(38057),Power:t(33297),Snake:t(90366),Squared:t(35032)}},35060:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25265),c=t(57428),l=t(73214),r=t(71778),n=t(36468),e=t(88258),s=t(52910),u=t(67799),i=t(74083),a=t(92284),o=t(28035),h=t(8754);p.exports={Power0:s,Power1:u.Out,Power2:r.Out,Power3:i.Out,Power4:a.Out,Linear:s,Quad:u.Out,Cubic:r.Out,Quart:i.Out,Quint:a.Out,Sine:o.Out,Expo:e.Out,Circ:l.Out,Elastic:n.Out,Back:d.Out,Bounce:c.Out,Stepped:h,"Quad.easeIn":u.In,"Cubic.easeIn":r.In,"Quart.easeIn":i.In,"Quint.easeIn":a.In,"Sine.easeIn":o.In,"Expo.easeIn":e.In,"Circ.easeIn":l.In,"Elastic.easeIn":n.In,"Back.easeIn":d.In,"Bounce.easeIn":c.In,"Quad.easeOut":u.Out,"Cubic.easeOut":r.Out,"Quart.easeOut":i.Out,"Quint.easeOut":a.Out,"Sine.easeOut":o.Out,"Expo.easeOut":e.Out,"Circ.easeOut":l.Out,"Elastic.easeOut":n.Out,"Back.easeOut":d.Out,"Bounce.easeOut":c.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":r.InOut,"Quart.easeInOut":i.InOut,"Quint.easeInOut":a.InOut,"Sine.easeInOut":o.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":l.InOut,"Elastic.easeInOut":n.InOut,"Back.easeInOut":d.InOut,"Bounce.easeInOut":c.InOut}},25860:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d=1.70158),t*t*((d+1)*t-d)};p.exports=S},45264:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d=1.70158);var c=d*1.525;return(t*=2)<1?.5*(t*t*((c+1)*t-c)):.5*((t-=2)*t*((c+1)*t+c)+2)};p.exports=S},36699:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d=1.70158),--t*t*((d+1)*t+d)+1};p.exports=S},25265:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(25860),Out:t(36699),InOut:t(45264)}},62191:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t=1-t,t<.36363636363636365?1-7.5625*t*t:t<.7272727272727273?1-(7.5625*(t-=.5454545454545454)*t+.75):t<.9090909090909091?1-(7.5625*(t-=.8181818181818182)*t+.9375):1-(7.5625*(t-=.9545454545454546)*t+.984375)};p.exports=S},24799:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d=!1;return t<.5?(t=1-t*2,d=!0):t=t*2-1,t<.36363636363636365?t=7.5625*t*t:t<.7272727272727273?t=7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?t=7.5625*(t-=.8181818181818182)*t+.9375:t=7.5625*(t-=.9545454545454546)*t+.984375,d?(1-t)*.5:t*.5+.5};p.exports=S},60819:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375};p.exports=S},57428:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(62191),Out:t(60819),InOut:t(24799)}},86855:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return 1-Math.sqrt(1-t*t)};p.exports=S},7280:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)};p.exports=S},18058:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return Math.sqrt(1- --t*t)};p.exports=S},73214:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(86855),Out:t(18058),InOut:t(7280)}},91532:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t*t*t};p.exports=S},63180:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};p.exports=S},16518:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return--t*t*t+1};p.exports=S},71778:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(91532),Out:t(16518),InOut:t(63180)}},24729:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var l=c/4;return d<1?d=1:l=c*Math.asin(1/d)/(2*Math.PI),-(d*Math.pow(2,10*(t-=1))*Math.sin((t-l)*(2*Math.PI)/c))};p.exports=S},50325:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var l=c/4;return d<1?d=1:l=c*Math.asin(1/d)/(2*Math.PI),(t*=2)<1?-.5*(d*Math.pow(2,10*(t-=1))*Math.sin((t-l)*(2*Math.PI)/c)):d*Math.pow(2,-10*(t-=1))*Math.sin((t-l)*(2*Math.PI)/c)*.5+1};p.exports=S},84074:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var l=c/4;return d<1?d=1:l=c*Math.asin(1/d)/(2*Math.PI),d*Math.pow(2,-10*t)*Math.sin((t-l)*(2*Math.PI)/c)+1};p.exports=S},36468:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(24729),Out:t(84074),InOut:t(50325)}},95638:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return Math.pow(2,10*(t-1))-.001};p.exports=S},10357:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))};p.exports=S},14894:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return 1-Math.pow(2,-10*t)};p.exports=S},88258:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(95638),Out:t(14894),InOut:t(10357)}},33063:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Back:t(25265),Bounce:t(57428),Circular:t(73214),Cubic:t(71778),Elastic:t(36468),Expo:t(88258),Linear:t(52910),Quadratic:t(67799),Quartic:t(74083),Quintic:t(92284),Sine:t(28035),Stepped:t(8754)}},43927:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t};p.exports=S},52910:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports=t(43927)},77471:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t*t};p.exports=S},83863:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)};p.exports=S},44383:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t*(2-t)};p.exports=S},67799:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(77471),Out:t(44383),InOut:t(83863)}},48311:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t*t*t*t};p.exports=S},55248:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)};p.exports=S},23135:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return 1- --t*t*t*t};p.exports=S},74083:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(48311),Out:t(23135),InOut:t(55248)}},7313:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t*t*t*t*t};p.exports=S},98759:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)};p.exports=S},26670:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return--t*t*t*t*t+1};p.exports=S},92284:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(7313),Out:t(26670),InOut:t(98759)}},52929:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t===0?0:t===1?1:1-Math.cos(t*Math.PI/2)};p.exports=S},66333:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t===0?0:t===1?1:.5*(1-Math.cos(Math.PI*t))};p.exports=S},37255:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t===0?0:t===1?1:Math.sin(t*Math.PI/2)};p.exports=S},28035:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(52929),Out:t(37255),InOut:t(66333)}},52770:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d=1),t<=0?0:t>=1?1:((d*t|0)+1)*(1/d)};p.exports=S},8754:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports=t(52770)},17247:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d=1e-4),Math.ceil(t-d)};p.exports=S},88456:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return c===void 0&&(c=1e-4),Math.abs(t-d){/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d=1e-4),Math.floor(t+d)};p.exports=S},41935:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return c===void 0&&(c=1e-4),t>d-c};p.exports=S},54726:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return c===void 0&&(c=1e-4),t{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Ceil:t(17247),Equal:t(88456),Floor:t(61824),GreaterThan:t(41935),LessThan:t(54726)}},5923:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(83392),c=t(98611),l={Angle:t(22153),Distance:t(10130),Easing:t(33063),Fuzzy:t(52778),Interpolation:t(48528),Pow2:t(73773),Snap:t(23679),RandomDataGenerator:t(81429),Average:t(26042),Bernstein:t(22824),Between:t(17489),CatmullRom:t(14976),CeilTo:t(89129),Clamp:t(82897),DegToRad:t(75606),Difference:t(767),Euler:t(9849),Factorial:t(8034),FloatBetween:t(61616),FloorTo:t(60679),FromPercent:t(91806),GetSpeed:t(79366),IsEven:t(43776),IsEvenStrict:t(58442),Linear:t(42798),LinearXY:t(61072),MaxAdd:t(69635),Median:t(37394),MinSub:t(17259),Percent:t(61820),RadToDeg:t(23701),RandomXY:t(16906),RandomXYZ:t(52417),RandomXYZW:t(17915),Rotate:t(52257),RotateAround:t(2386),RotateAroundDistance:t(72395),RotateTo:t(41061),RoundAwayFromZero:t(67233),RoundTo:t(64333),SinCosTableGenerator:t(59533),SmootherStep:t(87736),SmoothStep:t(5514),ToXY:t(55805),TransformXY:t(64462),Within:t(9557),Wrap:t(1071),Vector2:t(93736),Vector3:t(70015),Vector4:t(51729),Matrix3:t(5341),Matrix4:t(16650),Quaternion:t(75003),RotateVec3:t(93709)};l=c(!1,l,d),p.exports=l},63210:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(22824),c=function(l,r){for(var n=0,e=l.length-1,s=0;s<=e;s++)n+=Math.pow(1-r,e-s)*Math.pow(r,s)*l[s]*d(e,s);return n};p.exports=c},88332:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(14976),c=function(l,r){var n=l.length-1,e=n*r,s=Math.floor(e);return l[0]===l[n]?(r<0&&(s=Math.floor(e=n*(1+r))),d(e-s,l[(s-1+n)%n],l[s],l[(s+1)%n],l[(s+2)%n])):r<0?l[0]-(d(-e,l[0],l[0],l[1],l[1])-l[0]):r>1?l[n]-(d(e-n,l[n],l[n],l[n-1],l[n-1])-l[n]):d(e-s,l[s?s-1:0],l[s],l[n{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function S(r,n){var e=1-r;return e*e*e*n}function t(r,n){var e=1-r;return 3*e*e*r*n}function d(r,n){return 3*(1-r)*r*r*n}function c(r,n){return r*r*r*n}var l=function(r,n,e,s,u){return S(r,n)+t(r,e)+d(r,s)+c(r,u)};p.exports=l},47614:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(42798),c=function(l,r){var n=l.length-1,e=n*r,s=Math.floor(e);return r<0?d(l[0],l[1],e):r>1?d(l[n],l[n-1],n-e):d(l[s],l[s+1>n?n:s+1],e-s)};p.exports=c},16252:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function S(l,r){var n=1-l;return n*n*r}function t(l,r){return 2*(1-l)*l*r}function d(l,r){return l*l*r}var c=function(l,r,n,e){return S(l,r)+t(l,n)+d(l,e)};p.exports=c},44521:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(5514),c=function(l,r,n){return r+(n-r)*d(l,0,1)};p.exports=c},45507:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(87736),c=function(l,r,n){return r+(n-r)*d(l,0,1)};p.exports=c},48528:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Bezier:t(63210),CatmullRom:t(88332),CubicBezier:t(34631),Linear:t(47614),QuadraticBezier:t(16252),SmoothStep:t(44521),SmootherStep:t(45507)}},3504:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d=Math.log(t)/.6931471805599453;return 1<{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t>0&&(t&t-1)===0&&d>0&&(d&d-1)===0};p.exports=S},2018:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t>0&&(t&t-1)===0};p.exports=S},73773:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={GetNext:t(3504),IsSize:t(28621),IsValue:t(2018)}},81429:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r){r===void 0&&(r=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],r&&this.init(r)},rnd:function(){var l=2091639*this.s0+this.c*23283064365386963e-26;return this.c=l|0,this.s0=this.s1,this.s1=this.s2,this.s2=l-this.c,this.s2},hash:function(l){var r,n=this.n;l=l.toString();for(var e=0;e>>0,r-=n,r*=n,n=r>>>0,r-=n,n+=r*4294967296;return this.n=n,(n>>>0)*23283064365386963e-26},init:function(l){typeof l=="string"?this.state(l):this.sow(l)},sow:function(l){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!l)for(var r=0;r0;n--){var e=Math.floor(this.frac()*(n+1)),s=l[e];l[e]=l[n],l[n]=s}return l}});p.exports=c},82127:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.ceil(t/d),l?(c+t)/d:c+t)};p.exports=S},84314:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.floor(t/d),l?(c+t)/d:c+t)};p.exports=S},88462:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.round(t/d),l?(c+t)/d:c+t)};p.exports=S},23679:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Ceil:t(82127),Floor:t(84314),To:t(88462)}},92491:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */t(75205);var d=t(86459),c=t(98611),l={Actions:t(83979),Animations:t(13517),BlendModes:t(95723),Cache:t(45820),Cameras:t(44143),Core:t(80293),Class:t(56694),Create:t(84106),Curves:t(73962),Data:t(1999),Display:t(24816),DOM:t(3590),Events:t(95146),FX:t(96910),Game:t(15213),GameObjects:t(48013),Geom:t(84068),Input:t(20873),Loader:t(95695),Math:t(5923),Physics:t(53954),Plugins:t(45615),Renderer:t(42069),Scale:t(86754),ScaleModes:t(27394),Scene:t(87157),Scenes:t(20436),Structs:t(20010),Textures:t(87499),Tilemaps:t(52678),Time:t(97121),Tweens:t(75193),Utils:t(22178)};l.Sound=t(56751),l=c(!1,l,d),p.exports=l,t.g.Phaser=l},62832:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(7864),l=t(1539),r=new d({Extends:l,Mixins:[c.Acceleration,c.Angular,c.Bounce,c.Collision,c.Debug,c.Drag,c.Enable,c.Friction,c.Gravity,c.Immovable,c.Mass,c.Pushable,c.Size,c.Velocity],initialize:function(e,s,u,i,a){l.call(this,e,s,u,i,a),this.body=null}});p.exports=r},66150:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(75606),l=t(53996),r=t(35032),n=t(99523),e=t(72632),s=t(30657),u=t(2732),i=t(15147),a=t(91963),o=t(7599),h=t(93736),f=t(85233),v=new d({initialize:function(x){this.scene=x,this.systems=x.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,x.sys.events.once(o.BOOT,this.boot,this),x.sys.events.on(o.START,this.start,this)},boot:function(){this.world=new f(this.scene,this.config),this.add=new n(this.world),this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new f(this.scene,this.config),this.add=new n(this.world));var m=this.systems.events;e(this.config,"customUpdate",!1)||m.on(o.UPDATE,this.world.update,this.world),m.on(o.POST_UPDATE,this.world.postUpdate,this.world),m.once(o.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(o.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(o.UPDATE,this.world.update,this.world)},getConfig:function(){var m=this.systems.game.config.physics,x=this.systems.settings.physics,g=s(e(x,"arcade",{}),e(m,"arcade",{}));return g},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(m,x,g,y,T){return g===void 0&&(g=null),y===void 0&&(y=null),T===void 0&&(T=g),this.world.collideObjects(m,x,g,y,T,!0)},collide:function(m,x,g,y,T){return g===void 0&&(g=null),y===void 0&&(y=null),T===void 0&&(T=g),this.world.collideObjects(m,x,g,y,T,!1)},collideTiles:function(m,x,g,y,T){return this.world.collideTiles(m,x,g,y,T)},overlapTiles:function(m,x,g,y,T){return this.world.overlapTiles(m,x,g,y,T)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(m,x,g,y,T,E){y===void 0&&(y=60);var C=Math.atan2(g-m.y,x-m.x);return m.body.acceleration.setToPolar(C,y),T!==void 0&&E!==void 0&&m.body.maxVelocity.set(T,E),C},accelerateToObject:function(m,x,g,y,T){return this.accelerateTo(m,x.x,x.y,g,y,T)},closest:function(m,x){x||(x=this.world.bodies.entries);for(var g=Number.MAX_VALUE,y=null,T=m.x,E=m.y,C=x.length,A=0;Ag&&(y=P,g=F)}}return y},moveTo:function(m,x,g,y,T){y===void 0&&(y=60),T===void 0&&(T=0);var E=Math.atan2(g-m.y,x-m.x);return T>0&&(y=l(m.x,m.y,x,g)/(T/1e3)),m.body.velocity.setToPolar(E,y),E},moveToObject:function(m,x,g,y){return this.moveTo(m,x.x,x.y,g,y)},velocityFromAngle:function(m,x,g){return x===void 0&&(x=60),g===void 0&&(g=new h),g.setToPolar(c(m),x)},velocityFromRotation:function(m,x,g){return x===void 0&&(x=60),g===void 0&&(g=new h),g.setToPolar(m,x)},overlapRect:function(m,x,g,y,T,E){return i(this.world,m,x,g,y,T,E)},overlapCirc:function(m,x,g,y,T){return u(this.world,m,x,g,y,T)},shutdown:function(){if(this.world){var m=this.systems.events;m.off(o.UPDATE,this.world.update,this.world),m.off(o.POST_UPDATE,this.world.postUpdate,this.world),m.off(o.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});a.register("ArcadePhysics",v,"arcadePhysics"),p.exports=v},25084:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(7864),l=t(13747),r=new d({Extends:l,Mixins:[c.Acceleration,c.Angular,c.Bounce,c.Collision,c.Debug,c.Drag,c.Enable,c.Friction,c.Gravity,c.Immovable,c.Mass,c.Pushable,c.Size,c.Velocity],initialize:function(e,s,u,i,a){l.call(this,e,s,u,i,a),this.body=null}});p.exports=r},97602:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(95239),l=t(47401),r=t(27037),n=t(23701),e=t(74118),s=t(94287),u=t(15084),i=t(93736),a=new d({Mixins:[c],initialize:function(h,f){var v=64,m=64,x={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},g=f!==void 0;g&&f.displayWidth&&(v=f.displayWidth,m=f.displayHeight),g||(f=x),this.world=h,this.gameObject=g?f:void 0,this.isBody=!0,this.transform={x:f.x,y:f.y,rotation:f.angle,scaleX:f.scaleX,scaleY:f.scaleY,displayOriginX:f.displayOriginX,displayOriginY:f.displayOriginY},this.debugShowBody=h.defaults.debugShowBody,this.debugShowVelocity=h.defaults.debugShowVelocity,this.debugBodyColor=h.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(f.x-f.scaleX*f.displayOriginX,f.y-f.scaleY*f.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=f.angle,this.preRotation=f.angle,this.width=v,this.height=m,this.sourceWidth=v,this.sourceHeight=m,f.frame&&(this.sourceWidth=f.frame.realWidth,this.sourceHeight=f.frame.realHeight),this.halfWidth=Math.abs(v/2),this.halfHeight=Math.abs(m/2),this.center=new i(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new i,this.newVelocity=new i,this.deltaMax=new i,this.acceleration=new i,this.allowDrag=!0,this.drag=new i,this.allowGravity=!0,this.gravity=new i,this.bounce=new i,this.worldBounce=null,this.customBoundsRectangle=h.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new i(1e4,1e4),this.maxSpeed=-1,this.friction=new i(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=l.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new i(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=u(!1),this.touching=u(!0),this.wasTouching=u(!0),this.blocked=u(!0),this.syncBounds=!1,this.physicsType=l.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=f.scaleX,this._sy=f.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new e,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var o=this.gameObject,h=this.transform;if(o.parentContainer){var f=o.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);h.x=f.tx,h.y=f.ty,h.rotation=n(f.rotation),h.scaleX=f.scaleX,h.scaleY=f.scaleY,h.displayOriginX=o.displayOriginX,h.displayOriginY=o.displayOriginY}else h.x=o.x,h.y=o.y,h.rotation=o.angle,h.scaleX=o.scaleX,h.scaleY=o.scaleY,h.displayOriginX=o.displayOriginX,h.displayOriginY=o.displayOriginY;var v=!1;if(this.syncBounds){var m=o.getBounds(this._bounds);this.width=m.width,this.height=m.height,v=!0}else{var x=Math.abs(h.scaleX),g=Math.abs(h.scaleY);(this._sx!==x||this._sy!==g)&&(this.width=this.sourceWidth*x,this.height=this.sourceHeight*g,this._sx=x,this._sy=g,v=!0)}v&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var o=this.transform;this.position.x=o.x+o.scaleX*(this.offset.x-o.displayOriginX),this.position.y=o.y+o.scaleY*(this.offset.y-o.displayOriginY),this.updateCenter()},resetFlags:function(o){o===void 0&&(o=!1);var h=this.wasTouching,f=this.touching,v=this.blocked;o?u(!0,h):(h.none=f.none,h.up=f.up,h.down=f.down,h.left=f.left,h.right=f.right),u(!0,f),u(!0,v),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(o,h){if(o&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var f=this.position;this.prev.x=f.x,this.prev.y=f.y,this.prevFrame.x=f.x,this.prevFrame.y=f.y}o&&this.update(h)},update:function(o){var h=this.prev,f=this.position,v=this.velocity;if(h.set(f.x,f.y),!this.moves){this._dx=f.x-h.x,this._dy=f.y-h.y;return}if(this.directControl){var m=this.autoFrame;v.set((f.x-m.x)/o,(f.y-m.y)/o),this.world.updateMotion(this,o),this._dx=f.x-m.x,this._dy=f.y-m.y}else this.world.updateMotion(this,o),this.newVelocity.set(v.x*o,v.y*o),f.add(this.newVelocity),this._dx=f.x-h.x,this._dy=f.y-h.y;var x=v.x,g=v.y;if(this.updateCenter(),this.angle=Math.atan2(g,x),this.speed=Math.sqrt(x*x+g*g),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var y=this.blocked;this.world.emit(r.WORLD_BOUNDS,this,y.up,y.down,y.left,y.right)}},postUpdate:function(){var o=this.position,h=o.x-this.prevFrame.x,f=o.y-this.prevFrame.y,v=this.gameObject;if(this.moves){var m=this.deltaMax.x,x=this.deltaMax.y;m!==0&&h!==0&&(h<0&&h<-m?h=-m:h>0&&h>m&&(h=m)),x!==0&&f!==0&&(f<0&&f<-x?f=-x:f>0&&f>x&&(f=x)),v&&(v.x+=h,v.y+=f)}h<0?this.facing=l.FACING_LEFT:h>0&&(this.facing=l.FACING_RIGHT),f<0?this.facing=l.FACING_UP:f>0&&(this.facing=l.FACING_DOWN),this.allowRotation&&v&&(v.angle+=this.deltaZ()),this._tx=h,this._ty=f,this.autoFrame.set(o.x,o.y)},setBoundsRectangle:function(o){return this.customBoundsRectangle=o||this.world.bounds,this},checkWorldBounds:function(){var o=this.position,h=this.velocity,f=this.blocked,v=this.customBoundsRectangle,m=this.world.checkCollision,x=this.worldBounce?-this.worldBounce.x:-this.bounce.x,g=this.worldBounce?-this.worldBounce.y:-this.bounce.y,y=!1;return o.xv.right&&m.right&&(o.x=v.right-this.width,h.x*=x,f.right=!0,y=!0),o.yv.bottom&&m.down&&(o.y=v.bottom-this.height,h.y*=g,f.down=!0,y=!0),y&&(this.blocked.none=!1,this.updateCenter()),y},setOffset:function(o,h){return h===void 0&&(h=o),this.offset.set(o,h),this},setGameObject:function(o,h){return h===void 0&&(h=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=o,o.body&&(o.body=this),this.setSize(),this.world.add(this),this.enable=h,this},setSize:function(o,h,f){f===void 0&&(f=!0);var v=this.gameObject;if(v&&(!o&&v.frame&&(o=v.frame.realWidth),!h&&v.frame&&(h=v.frame.realHeight)),this.sourceWidth=o,this.sourceHeight=h,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),f&&v&&v.getCenter){var m=(v.width-o)/2,x=(v.height-h)/2;this.offset.set(m,x)}return this.isCircle=!1,this.radius=0,this},setCircle:function(o,h,f){return h===void 0&&(h=this.offset.x),f===void 0&&(f=this.offset.y),o>0?(this.isCircle=!0,this.radius=o,this.sourceWidth=o*2,this.sourceHeight=o*2,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(h,f),this.updateCenter()):this.isCircle=!1,this},reset:function(o,h){this.stop();var f=this.gameObject;f&&(f.setPosition(o,h),this.rotation=f.angle,this.preRotation=f.angle);var v=this.position;f&&f.getTopLeft?f.getTopLeft(v):v.set(o,h),this.prev.copy(v),this.prevFrame.copy(v),this.autoFrame.copy(v),f&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(o){return o.x=this.x,o.y=this.y,o.right=this.right,o.bottom=this.bottom,o},hitTest:function(o,h){if(!this.isCircle)return s(this,o,h);if(this.radius>0&&o>=this.left&&o<=this.right&&h>=this.top&&h<=this.bottom){var f=(this.center.x-o)*(this.center.x-o),v=(this.center.y-h)*(this.center.y-h);return f+v<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(o){var h=this.position,f=h.x+this.halfWidth,v=h.y+this.halfHeight;this.debugShowBody&&(o.lineStyle(o.defaultStrokeWidth,this.debugBodyColor),this.isCircle?o.strokeCircle(f,v,this.width/2):(this.checkCollision.up&&o.lineBetween(h.x,h.y,h.x+this.width,h.y),this.checkCollision.right&&o.lineBetween(h.x+this.width,h.y,h.x+this.width,h.y+this.height),this.checkCollision.down&&o.lineBetween(h.x,h.y+this.height,h.x+this.width,h.y+this.height),this.checkCollision.left&&o.lineBetween(h.x,h.y,h.x,h.y+this.height))),this.debugShowVelocity&&(o.lineStyle(o.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),o.lineBetween(f,v,f+this.velocity.x/2,v+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(o){return o===void 0&&(o=!0),this.directControl=o,this},setCollideWorldBounds:function(o,h,f,v){o===void 0&&(o=!0),this.collideWorldBounds=o;var m=h!==void 0,x=f!==void 0;return(m||x)&&(this.worldBounce||(this.worldBounce=new i),m&&(this.worldBounce.x=h),x&&(this.worldBounce.y=f)),v!==void 0&&(this.onWorldBounds=v),this},setVelocity:function(o,h){return this.velocity.set(o,h),o=this.velocity.x,h=this.velocity.y,this.speed=Math.sqrt(o*o+h*h),this},setVelocityX:function(o){return this.setVelocity(o,this.velocity.y)},setVelocityY:function(o){return this.setVelocity(this.velocity.x,o)},setMaxVelocity:function(o,h){return this.maxVelocity.set(o,h),this},setMaxVelocityX:function(o){return this.maxVelocity.x=o,this},setMaxVelocityY:function(o){return this.maxVelocity.y=o,this},setMaxSpeed:function(o){return this.maxSpeed=o,this},setSlideFactor:function(o,h){return this.slideFactor.set(o,h),this},setBounce:function(o,h){return this.bounce.set(o,h),this},setBounceX:function(o){return this.bounce.x=o,this},setBounceY:function(o){return this.bounce.y=o,this},setAcceleration:function(o,h){return this.acceleration.set(o,h),this},setAccelerationX:function(o){return this.acceleration.x=o,this},setAccelerationY:function(o){return this.acceleration.y=o,this},setAllowDrag:function(o){return o===void 0&&(o=!0),this.allowDrag=o,this},setAllowGravity:function(o){return o===void 0&&(o=!0),this.allowGravity=o,this},setAllowRotation:function(o){return o===void 0&&(o=!0),this.allowRotation=o,this},setDrag:function(o,h){return this.drag.set(o,h),this},setDamping:function(o){return this.useDamping=o,this},setDragX:function(o){return this.drag.x=o,this},setDragY:function(o){return this.drag.y=o,this},setGravity:function(o,h){return this.gravity.set(o,h),this},setGravityX:function(o){return this.gravity.x=o,this},setGravityY:function(o){return this.gravity.y=o,this},setFriction:function(o,h){return this.friction.set(o,h),this},setFrictionX:function(o){return this.friction.x=o,this},setFrictionY:function(o){return this.friction.y=o,this},setAngularVelocity:function(o){return this.angularVelocity=o,this},setAngularAcceleration:function(o){return this.angularAcceleration=o,this},setAngularDrag:function(o){return this.angularDrag=o,this},setMass:function(o){return this.mass=o,this},setImmovable:function(o){return o===void 0&&(o=!0),this.immovable=o,this},setEnable:function(o){return o===void 0&&(o=!0),this.enable=o,this},processX:function(o,h,f,v){this.x+=o,this.updateCenter(),h!==null&&(this.velocity.x=h*this.slideFactor.x);var m=this.blocked;f&&(m.left=!0,m.none=!1),v&&(m.right=!0,m.none=!1)},processY:function(o,h,f,v){this.y+=o,this.updateCenter(),h!==null&&(this.velocity.y=h*this.slideFactor.y);var m=this.blocked;f&&(m.up=!0,m.none=!1),v&&(m.down=!0,m.none=!1)},x:{get:function(){return this.position.x},set:function(o){this.position.x=o}},y:{get:function(){return this.position.y},set:function(o){this.position.y=o}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});p.exports=a},3909:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r,n,e,s,u,i,a){this.world=r,this.name="",this.active=!0,this.overlapOnly=n,this.object1=e,this.object2=s,this.collideCallback=u,this.processCallback=i,this.callbackContext=a},setName:function(l){return this.name=l,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});p.exports=c},99523:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62832),c=t(25084),l=t(97602),r=t(56694),n=t(47401),e=t(10481),s=t(66634),u=t(46346),i=new r({initialize:function(o){this.world=o,this.scene=o.scene,this.sys=o.scene.sys},collider:function(a,o,h,f,v){return this.world.addCollider(a,o,h,f,v)},overlap:function(a,o,h,f,v){return this.world.addOverlap(a,o,h,f,v)},existing:function(a,o){var h=o?n.STATIC_BODY:n.DYNAMIC_BODY;return this.world.enableBody(a,h),a},staticImage:function(a,o,h,f){var v=new d(this.scene,a,o,h,f);return this.sys.displayList.add(v),this.world.enableBody(v,n.STATIC_BODY),v},image:function(a,o,h,f){var v=new d(this.scene,a,o,h,f);return this.sys.displayList.add(v),this.world.enableBody(v,n.DYNAMIC_BODY),v},staticSprite:function(a,o,h,f){var v=new c(this.scene,a,o,h,f);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,n.STATIC_BODY),v},sprite:function(a,o,h,f){var v=new c(this.scene,a,o,h,f);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,n.DYNAMIC_BODY),v},staticGroup:function(a,o){return this.sys.updateList.add(new u(this.world,this.world.scene,a,o))},group:function(a,o){return this.sys.updateList.add(new e(this.world,this.world.scene,a,o))},body:function(a,o,h,f){var v=new l(this.world);return v.position.set(a,o),h&&f&&v.setSize(h,f),this.world.add(v,n.DYNAMIC_BODY),v},staticBody:function(a,o,h,f){var v=new s(this.world);return v.position.set(a,o),h&&f&&v.setSize(h,f),this.world.add(v,n.STATIC_BODY),v},destroy:function(){this.world=null,this.scene=null,this.sys=null}});p.exports=i},44880:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d=0;if(!Array.isArray(t))d=t;else for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(47401),c=function(l,r,n,e){var s=0,u=l.deltaAbsX()+r.deltaAbsX()+e;return l._dx===0&&r._dx===0?(l.embedded=!0,r.embedded=!0):l._dx>r._dx?(s=l.right-r.x,s>u&&!n||l.checkCollision.right===!1||r.checkCollision.left===!1?s=0:(l.touching.none=!1,l.touching.right=!0,r.touching.none=!1,r.touching.left=!0,r.physicsType===d.STATIC_BODY&&!n&&(l.blocked.none=!1,l.blocked.right=!0),l.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.left=!0))):l._dxu&&!n||l.checkCollision.left===!1||r.checkCollision.right===!1?s=0:(l.touching.none=!1,l.touching.left=!0,r.touching.none=!1,r.touching.right=!0,r.physicsType===d.STATIC_BODY&&!n&&(l.blocked.none=!1,l.blocked.left=!0),l.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.right=!0))),l.overlapX=s,r.overlapX=s,s};p.exports=c},66185:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(47401),c=function(l,r,n,e){var s=0,u=l.deltaAbsY()+r.deltaAbsY()+e;return l._dy===0&&r._dy===0?(l.embedded=!0,r.embedded=!0):l._dy>r._dy?(s=l.bottom-r.y,s>u&&!n||l.checkCollision.down===!1||r.checkCollision.up===!1?s=0:(l.touching.none=!1,l.touching.down=!0,r.touching.none=!1,r.touching.up=!0,r.physicsType===d.STATIC_BODY&&!n&&(l.blocked.none=!1,l.blocked.down=!0),l.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.up=!0))):l._dyu&&!n||l.checkCollision.up===!1||r.checkCollision.down===!1?s=0:(l.touching.none=!1,l.touching.up=!0,r.touching.none=!1,r.touching.down=!0,r.physicsType===d.STATIC_BODY&&!n&&(l.blocked.none=!1,l.blocked.up=!0),l.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.down=!0))),l.overlapY=s,r.overlapY=s,s};p.exports=c},10481:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25084),c=t(56694),l=t(95239),r=t(47401),n=t(72632),e=t(59192),s=t(42911),u=new c({Extends:e,Mixins:[l],initialize:function(a,o,h,f){if(!h&&!f)f={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(s(h))f=h,h=null,f.internalCreateCallback=this.createCallbackHandler,f.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(h)&&s(h[0])){var v=this;h.forEach(function(m){m.internalCreateCallback=v.createCallbackHandler,m.internalRemoveCallback=v.removeCallbackHandler,m.classType=n(m,"classType",d)}),f=null}else f={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=a,f&&(f.classType=n(f,"classType",d)),this.physicsType=r.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this.defaults={setCollideWorldBounds:n(f,"collideWorldBounds",!1),setBoundsRectangle:n(f,"customBoundsRectangle",null),setAccelerationX:n(f,"accelerationX",0),setAccelerationY:n(f,"accelerationY",0),setAllowDrag:n(f,"allowDrag",!0),setAllowGravity:n(f,"allowGravity",!0),setAllowRotation:n(f,"allowRotation",!0),setDamping:n(f,"useDamping",!1),setBounceX:n(f,"bounceX",0),setBounceY:n(f,"bounceY",0),setDragX:n(f,"dragX",0),setDragY:n(f,"dragY",0),setEnable:n(f,"enable",!0),setGravityX:n(f,"gravityX",0),setGravityY:n(f,"gravityY",0),setFrictionX:n(f,"frictionX",0),setFrictionY:n(f,"frictionY",0),setMaxSpeed:n(f,"maxSpeed",-1),setMaxVelocityX:n(f,"maxVelocityX",1e4),setMaxVelocityY:n(f,"maxVelocityY",1e4),setVelocityX:n(f,"velocityX",0),setVelocityY:n(f,"velocityY",0),setAngularVelocity:n(f,"angularVelocity",0),setAngularAcceleration:n(f,"angularAcceleration",0),setAngularDrag:n(f,"angularDrag",0),setMass:n(f,"mass",1),setImmovable:n(f,"immovable",!1)},e.call(this,o,h,f),this.type="PhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,r.DYNAMIC_BODY);var a=i.body;for(var o in this.defaults)a[o](this.defaults[o])},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},setVelocity:function(i,a,o){o===void 0&&(o=0);for(var h=this.getChildren(),f=0;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S,t,d,c,l,r,n,e,s,u,i,a,o,h,f,v,m,x=function(A,P,R){S=A,t=P;var F=S.velocity.x,L=t.velocity.x;return d=S.pushable,s=S._dx<0,u=S._dx>0,i=S._dx===0,f=Math.abs(S.right-t.x)<=Math.abs(t.right-S.x),n=L-F*S.bounce.x,c=t.pushable,a=t._dx<0,o=t._dx>0,h=t._dx===0,v=!f,e=F-L*t.bounce.x,m=Math.abs(R),g()},g=function(){return u&&f&&t.blocked.right?(S.processX(-m,n,!1,!0),1):s&&v&&t.blocked.left?(S.processX(m,n,!0),1):o&&v&&S.blocked.right?(t.processX(-m,e,!1,!0),2):a&&f&&S.blocked.left?(t.processX(m,e,!0),2):0},y=function(){var A=S.velocity.x,P=t.velocity.x,R=Math.sqrt(P*P*t.mass/S.mass)*(P>0?1:-1),F=Math.sqrt(A*A*S.mass/t.mass)*(A>0?1:-1),L=(R+F)*.5;return R-=L,F-=L,l=L+R*S.bounce.x,r=L+F*t.bounce.x,s&&v?T(0):a&&f?T(1):u&&f?T(2):o&&v?T(3):!1},T=function(A){if(d&&c)m*=.5,A===0||A===3?(S.processX(m,l),t.processX(-m,r)):(S.processX(-m,l),t.processX(m,r));else if(d&&!c)A===0||A===3?S.processX(m,n,!0):S.processX(-m,n,!1,!0);else if(!d&&c)A===0||A===3?t.processX(-m,e,!1,!0):t.processX(m,e,!0);else{var P=m*.5;A===0?h?(S.processX(m,0,!0),t.processX(0,null,!1,!0)):o?(S.processX(P,0,!0),t.processX(-P,0,!1,!0)):(S.processX(P,t.velocity.x,!0),t.processX(-P,null,!1,!0)):A===1?i?(S.processX(0,null,!1,!0),t.processX(m,0,!0)):u?(S.processX(-P,0,!1,!0),t.processX(P,0,!0)):(S.processX(-P,null,!1,!0),t.processX(P,S.velocity.x,!0)):A===2?h?(S.processX(-m,0,!1,!0),t.processX(0,null,!0)):a?(S.processX(-P,0,!1,!0),t.processX(P,0,!0)):(S.processX(-P,t.velocity.x,!1,!0),t.processX(P,null,!0)):A===3&&(i?(S.processX(0,null,!0),t.processX(-m,0,!1,!0)):s?(S.processX(P,0,!0),t.processX(-P,0,!1,!0)):(S.processX(P,t.velocity.y,!0),t.processX(-P,null,!1,!0)))}return!0},E=function(A){A===1?t.velocity.x=0:f?t.processX(m,e,!0):t.processX(-m,e,!1,!0),S.moves&&(t.y+=(S.y-S.prev.y)*S.friction.y,t._dy=t.y-t.prev.y)},C=function(A){A===2?S.velocity.x=0:v?S.processX(m,n,!0):S.processX(-m,n,!1,!0),t.moves&&(S.y+=(t.y-t.prev.y)*t.friction.y,S._dy=S.y-S.prev.y)};p.exports={BlockCheck:g,Check:y,Set:x,Run:T,RunImmovableBody1:E,RunImmovableBody2:C}},67050:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S,t,d,c,l,r,n,e,s,u,i,a,o,h,f,v,m,x=function(A,P,R){S=A,t=P;var F=S.velocity.y,L=t.velocity.y;return d=S.pushable,s=S._dy<0,u=S._dy>0,i=S._dy===0,f=Math.abs(S.bottom-t.y)<=Math.abs(t.bottom-S.y),n=L-F*S.bounce.y,c=t.pushable,a=t._dy<0,o=t._dy>0,h=t._dy===0,v=!f,e=F-L*t.bounce.y,m=Math.abs(R),g()},g=function(){return u&&f&&t.blocked.down?(S.processY(-m,n,!1,!0),1):s&&v&&t.blocked.up?(S.processY(m,n,!0),1):o&&v&&S.blocked.down?(t.processY(-m,e,!1,!0),2):a&&f&&S.blocked.up?(t.processY(m,e,!0),2):0},y=function(){var A=S.velocity.y,P=t.velocity.y,R=Math.sqrt(P*P*t.mass/S.mass)*(P>0?1:-1),F=Math.sqrt(A*A*S.mass/t.mass)*(A>0?1:-1),L=(R+F)*.5;return R-=L,F-=L,l=L+R*S.bounce.y,r=L+F*t.bounce.y,s&&v?T(0):a&&f?T(1):u&&f?T(2):o&&v?T(3):!1},T=function(A){if(d&&c)m*=.5,A===0||A===3?(S.processY(m,l),t.processY(-m,r)):(S.processY(-m,l),t.processY(m,r));else if(d&&!c)A===0||A===3?S.processY(m,n,!0):S.processY(-m,n,!1,!0);else if(!d&&c)A===0||A===3?t.processY(-m,e,!1,!0):t.processY(m,e,!0);else{var P=m*.5;A===0?h?(S.processY(m,0,!0),t.processY(0,null,!1,!0)):o?(S.processY(P,0,!0),t.processY(-P,0,!1,!0)):(S.processY(P,t.velocity.y,!0),t.processY(-P,null,!1,!0)):A===1?i?(S.processY(0,null,!1,!0),t.processY(m,0,!0)):u?(S.processY(-P,0,!1,!0),t.processY(P,0,!0)):(S.processY(-P,null,!1,!0),t.processY(P,S.velocity.y,!0)):A===2?h?(S.processY(-m,0,!1,!0),t.processY(0,null,!0)):a?(S.processY(-P,0,!1,!0),t.processY(P,0,!0)):(S.processY(-P,t.velocity.y,!1,!0),t.processY(P,null,!0)):A===3&&(i?(S.processY(0,null,!0),t.processY(-m,0,!1,!0)):s?(S.processY(P,0,!0),t.processY(-P,0,!1,!0)):(S.processY(P,t.velocity.y,!0),t.processY(-P,null,!1,!0)))}return!0},E=function(A){A===1?t.velocity.y=0:f?t.processY(m,e,!0):t.processY(-m,e,!1,!0),S.moves&&(t.x+=(S.x-S.prev.x)*S.friction.x,t._dx=t.x-t.prev.x)},C=function(A){A===2?S.velocity.y=0:v?S.processY(m,n,!0):S.processY(-m,n,!1,!0),t.moves&&(S.x+=(t.x-t.prev.x)*t.friction.x,S._dx=S.x-S.prev.x)};p.exports={BlockCheck:g,Check:y,Set:x,Run:T,RunImmovableBody1:E,RunImmovableBody2:C}},61777:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(75671),c=t(22916),l=function(r,n,e,s,u){u===void 0&&(u=d(r,n,e,s));var i=r.immovable,a=n.immovable;if(e||u===0||i&&a||r.customSeparateX||n.customSeparateX)return u!==0||r.embedded&&n.embedded;var o=c.Set(r,n,u);return!i&&!a?o>0?!0:c.Check():(i?c.RunImmovableBody1(o):a&&c.RunImmovableBody2(o),!0)};p.exports=l},25299:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66185),c=t(67050),l=function(r,n,e,s,u){u===void 0&&(u=d(r,n,e,s));var i=r.immovable,a=n.immovable;if(e||u===0||i&&a||r.customSeparateY||n.customSeparateY)return u!==0||r.embedded&&n.embedded;var o=c.Set(r,n,u);return!i&&!a?o>0?!0:c.Check():(i?c.RunImmovableBody1(o):a&&c.RunImmovableBody2(o),!0)};p.exports=l},15084:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===void 0&&(d={}),d.none=t,d.up=!1,d.down=!1,d.left=!1,d.right=!1,t||(d.up=!0,d.down=!0,d.left=!0,d.right=!0),d};p.exports=S},66634:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65650),c=t(56694),l=t(95239),r=t(47401),n=t(94287),e=t(15084),s=t(93736),u=new c({Mixins:[l],initialize:function(a,o){var h=64,f=64,v={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},m=o!==void 0;m&&o.displayWidth&&(h=o.displayWidth,f=o.displayHeight),m||(o=v),this.world=a,this.gameObject=m?o:void 0,this.isBody=!0,this.debugShowBody=a.defaults.debugShowStaticBody,this.debugBodyColor=a.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new s,this.position=new s(o.x-h*o.originX,o.y-f*o.originY),this.width=h,this.height=f,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new s(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=s.ZERO,this.allowGravity=!1,this.gravity=s.ZERO,this.bounce=s.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=e(!1),this.touching=e(!0),this.wasTouching=e(!0),this.blocked=e(!0),this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(i,a){return i&&i!==this.gameObject&&(this.gameObject.body=null,i.body=this,this.gameObject=i),a&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var i=this.gameObject;return i.getTopLeft(this.position),this.width=i.displayWidth,this.height=i.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(i,a){return a===void 0&&(a=i),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(i,a),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(i,a,o){o===void 0&&(o=!0);var h=this.gameObject;if(h&&h.frame&&(i||(i=h.frame.realWidth),a||(a=h.frame.realHeight)),this.world.staticTree.remove(this),this.width=i,this.height=a,this.halfWidth=Math.floor(i/2),this.halfHeight=Math.floor(a/2),o&&h&&h.getCenter){var f=h.displayWidth/2,v=h.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(f-this.halfWidth,v-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(i,a,o){return a===void 0&&(a=this.offset.x),o===void 0&&(o=this.offset.y),i>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=i,this.width=i*2,this.height=i*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(a,o),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(i,a){var o=this.gameObject;i===void 0&&(i=o.x),a===void 0&&(a=o.y),this.world.staticTree.remove(this),o.setPosition(i,a),o.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(i){return i.x=this.x,i.y=this.y,i.right=this.right,i.bottom=this.bottom,i},hitTest:function(i,a){return this.isCircle?d(this,i,a):n(this,i,a)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(i){var a=this.position,o=a.x+this.halfWidth,h=a.y+this.halfHeight;this.debugShowBody&&(i.lineStyle(i.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?i.strokeCircle(o,h,this.width/2):i.strokeRect(a.x,a.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(i){return i<=0&&(i=.1),this.mass=i,this},x:{get:function(){return this.position.x},set:function(i){this.world.staticTree.remove(this),this.position.x=i,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(i){this.world.staticTree.remove(this),this.position.y=i,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});p.exports=u},46346:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25084),c=t(56694),l=t(95239),r=t(47401),n=t(72632),e=t(59192),s=t(42911),u=new c({Extends:e,Mixins:[l],initialize:function(a,o,h,f){!h&&!f?f={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:d}:s(h)?(f=h,h=null,f.internalCreateCallback=this.createCallbackHandler,f.internalRemoveCallback=this.removeCallbackHandler,f.createMultipleCallback=this.createMultipleCallbackHandler,f.classType=n(f,"classType",d)):Array.isArray(h)&&s(h[0])?(f=h,h=null,f.forEach(function(v){v.internalCreateCallback=this.createCallbackHandler,v.internalRemoveCallback=this.removeCallbackHandler,v.createMultipleCallback=this.createMultipleCallbackHandler,v.classType=n(v,"classType",d)})):f={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=a,this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,e.call(this,o,h,f),this.type="StaticPhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,r.STATIC_BODY)},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var i=this.children.entries,a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(94240),c=t(97602),l=t(82897),r=t(56694),n=t(3909),e=t(47401),s=t(53996),u=t(92951),i=t(6659),a=t(27037),o=t(88456),h=t(41935),f=t(54726),v=t(75671),m=t(66185),x=t(44662),g=t(10850),y=t(83392),T=t(74623),E=t(25163),C=t(74118),A=t(68687),P=t(27354),R=t(61777),F=t(25299),L=t(58403),B=t(66634),N=t(28808),U=t(69360),z=t(93736),w=t(1071),I=new r({Extends:i,initialize:function(O,D){i.call(this),this.scene=O,this.bodies=new L,this.staticBodies=new L,this.pendingDestroy=new L,this.colliders=new T,this.gravity=new z(g(D,"gravity.x",0),g(D,"gravity.y",0)),this.bounds=new C(g(D,"x",0),g(D,"y",0),g(D,"width",O.sys.scale.width),g(D,"height",O.sys.scale.height)),this.checkCollision={up:g(D,"checkCollision.up",!0),down:g(D,"checkCollision.down",!0),left:g(D,"checkCollision.left",!0),right:g(D,"checkCollision.right",!0)},this.fps=g(D,"fps",60),this.fixedStep=g(D,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=g(D,"timeScale",1),this.OVERLAP_BIAS=g(D,"overlapBias",4),this.TILE_BIAS=g(D,"tileBias",16),this.forceX=g(D,"forceX",!1),this.isPaused=g(D,"isPaused",!1),this._total=0,this.drawDebug=g(D,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:g(D,"debugShowBody",!0),debugShowStaticBody:g(D,"debugShowStaticBody",!0),debugShowVelocity:g(D,"debugShowVelocity",!0),bodyDebugColor:g(D,"debugBodyColor",16711935),staticBodyDebugColor:g(D,"debugStaticBodyColor",255),velocityDebugColor:g(D,"debugVelocityColor",65280)},this.maxEntries=g(D,"maxEntries",16),this.useTree=g(D,"useTree",!0),this.tree=new A(this.maxEntries),this.staticTree=new A(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new U,this._tempMatrix2=new U,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(M,O){O===void 0&&(O=e.DYNAMIC_BODY),Array.isArray(M)||(M=[M]);for(var D=0;D=X;for(this.fixedStep||(G=O*.001,W=!0,this._elapsed=0),D=0;D=X;)this._elapsed-=X,this.step(G)}},step:function(M){var O,D,G=this.bodies.entries,X=G.length;for(O=0;O0){var H=this.tree,b=this.staticTree;for(D=W.entries,G=D.length,M=0;M-1&&M.velocity.length()>J&&(M.velocity.normalize().scale(J),K=J),M.speed=K},separate:function(M,O,D,G,X){var V,Y,W=!1,H=!0;if(!M.enable||!O.enable||M.checkCollision.none||O.checkCollision.none||!this.intersects(M,O)||D&&D.call(G,M.gameObject,O.gameObject)===!1)return W;if(M.isCircle||O.isCircle){var b=this.separateCircle(M,O,X);b.result?(W=!0,H=!1):(V=b.x,Y=b.y,H=!0)}if(H){var K=!1,J=!1,Z=this.OVERLAP_BIAS;X?(K=R(M,O,X,Z,V),J=F(M,O,X,Z,Y)):this.forceX||Math.abs(this.gravity.y+M.gravity.y)q&&(J=s($,tt,q,Q)-it):tt>k&&($q&&(J=s($,tt,q,k)-it)),J*=-1}else J=M.halfWidth+O.halfWidth-u(V,Y);M.overlapR=J,O.overlapR=J;var nt=d(V,Y),rt=(J+y.EPSILON)*Math.cos(nt),vt=(J+y.EPSILON)*Math.sin(nt),dt={overlap:J,result:!1,x:rt,y:vt};if(D&&(!Z||Z&&J!==0))return dt.result=!0,dt;if(!Z&&J===0||W&&H||M.customSeparateX||O.customSeparateX)return dt.x=void 0,dt.y=void 0,dt;var lt=!M.pushable&&!O.pushable;if(Z){var ot=V.x-Y.x,ct=V.y-Y.y,ut=Math.sqrt(Math.pow(ot,2)+Math.pow(ct,2)),pt=(Y.x-V.x)/ut||0,gt=(Y.y-V.y)/ut||0,mt=2*(b.x*pt+b.y*gt-K.x*pt-K.y*gt)/(M.mass+O.mass);(W||H)&&(mt*=2),W||(b.x=b.x-mt/M.mass*pt,b.y=b.y-mt/M.mass*gt,b.multiply(M.bounce)),H||(K.x=K.x+mt/O.mass*pt,K.y=K.y+mt/O.mass*gt,K.multiply(O.bounce)),!W&&!H&&(rt*=.5,vt*=.5),W||(M.x-=rt,M.y-=vt,M.updateCenter()),H||(O.x+=rt,O.y+=vt,O.updateCenter()),dt.result=!0}else!W||M.pushable||lt?(M.x-=rt,M.y-=vt,M.updateCenter()):(!H||O.pushable||lt)&&(O.x+=rt,O.y+=vt,O.updateCenter()),dt.x=void 0,dt.y=void 0;return dt},intersects:function(M,O){return M===O?!1:!M.isCircle&&!O.isCircle?!(M.right<=O.left||M.bottom<=O.top||M.left>=O.right||M.top>=O.bottom):M.isCircle?O.isCircle?u(M.center,O.center)<=M.halfWidth+O.halfWidth:this.circleBodyIntersects(M,O):this.circleBodyIntersects(O,M)},circleBodyIntersects:function(M,O){var D=l(M.center.x,O.left,O.right),G=l(M.center.y,O.top,O.bottom),X=(M.center.x-D)*(M.center.x-D),V=(M.center.y-G)*(M.center.y-G);return X+V<=M.halfWidth*M.halfWidth},overlap:function(M,O,D,G,X){return D===void 0&&(D=null),G===void 0&&(G=null),X===void 0&&(X=D),this.collideObjects(M,O,D,G,X,!0)},collide:function(M,O,D,G,X){return D===void 0&&(D=null),G===void 0&&(G=null),X===void 0&&(X=D),this.collideObjects(M,O,D,G,X,!1)},collideObjects:function(M,O,D,G,X,V){var Y,W;M.isParent&&(M.physicsType===void 0||O===void 0||M===O)&&(M=M.children.entries),O&&O.isParent&&O.physicsType===void 0&&(O=O.children.entries);var H=Array.isArray(M),b=Array.isArray(O);if(this._total=0,!H&&!b)this.collideHandler(M,O,D,G,X,V);else if(!H&&b)for(Y=0;Y0},collideHandler:function(M,O,D,G,X,V){if(O===void 0&&M.isParent)return this.collideGroupVsGroup(M,M,D,G,X,V);if(!M||!O)return!1;if(M.body||M.isBody){if(O.body||O.isBody)return this.collideSpriteVsSprite(M,O,D,G,X,V);if(O.isParent)return this.collideSpriteVsGroup(M,O,D,G,X,V);if(O.isTilemap)return this.collideSpriteVsTilemapLayer(M,O,D,G,X,V)}else if(M.isParent){if(O.body||O.isBody)return this.collideSpriteVsGroup(O,M,D,G,X,V);if(O.isParent)return this.collideGroupVsGroup(M,O,D,G,X,V);if(O.isTilemap)return this.collideGroupVsTilemapLayer(M,O,D,G,X,V)}else if(M.isTilemap){if(O.body||O.isBody)return this.collideSpriteVsTilemapLayer(O,M,D,G,X,V);if(O.isParent)return this.collideGroupVsTilemapLayer(O,M,D,G,X,V)}},canCollide:function(M,O){return M&&O&&(M.collisionMask&O.collisionCategory)!==0&&(O.collisionMask&M.collisionCategory)!==0},collideSpriteVsSprite:function(M,O,D,G,X,V){var Y=M.isBody?M:M.body,W=O.isBody?O:O.body;return this.canCollide(Y,W)?(this.separate(Y,W,G,X,V)&&(D&&D.call(X,M,O),this._total++),!0):!1},collideSpriteVsGroup:function(M,O,D,G,X,V){var Y=M.isBody?M:M.body;if(!(O.length===0||!Y||!Y.enable||Y.checkCollision.none||!this.canCollide(Y,O))){var W,H,b;if(this.useTree||O.physicsType===e.STATIC_BODY){var K=this.treeMinMax;K.minX=Y.left,K.minY=Y.top,K.maxX=Y.right,K.maxY=Y.bottom;var J=O.physicsType===e.DYNAMIC_BODY?this.tree.search(K):this.staticTree.search(K);for(H=J.length,W=0;WJ.baseTileWidth){var Z=(J.tileWidth-J.baseTileWidth)*O.scaleX;W-=Z,b+=Z}if(J.tileHeight>J.baseTileHeight){var $=(J.tileHeight-J.baseTileHeight)*O.scaleY;K+=$}var tt=V?null:this.tileFilterOptions,it=x(W,H,b,K,tt,O.scene.cameras.main,O.layer);return it.length===0?!1:this.collideSpriteVsTilesHandler(M,it,D,G,X,V,!0)},collideSpriteVsTilesHandler:function(M,O,D,G,X,V,Y){for(var W=M.isBody?M:M.body,H,b={left:0,right:0,top:0,bottom:0},K,J=!1,Z=0;Z{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setAcceleration:function(t,d){return this.body.acceleration.set(t,d),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}};p.exports=S},29257:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}};p.exports=S},62122:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setBounce:function(t,d){return this.body.bounce.set(t,d),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,d,c,l){return this.body.setCollideWorldBounds(t,d,c,l),this}};p.exports=S},95239:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(44880),c={setCollisionCategory:function(l){var r=this.body?this.body:this;return r.collisionCategory=l,this},willCollideWith:function(l){var r=this.body?this.body:this;return(r.collisionMask&l)!==0},addCollidesWith:function(l){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask|l,this},removeCollidesWith:function(l){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask&~l,this},setCollidesWith:function(l){var r=this.body?this.body:this;return r.collisionMask=d(l),this},resetCollisionCategory:function(){var l=this.body?this.body:this;return l.collisionCategory=1,l.collisionMask=1,this}};p.exports=c},99803:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setDebug:function(t,d,c){return this.debugShowBody=t,this.debugShowVelocity=d,this.debugBodyColor=c,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}};p.exports=S},87145:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setDrag:function(t,d){return this.body.drag.set(t,d),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}};p.exports=S},96174:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,d,c,l,r){return t&&this.body.reset(d,c),l&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,d){return t===void 0&&(t=!1),d===void 0&&(d=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),d&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};p.exports=S},51702:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setFriction:function(t,d){return this.body.friction.set(t,d),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}};p.exports=S},25578:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setGravity:function(t,d){return this.body.gravity.set(t,d),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}};p.exports=S},72029:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setImmovable:function(t){return t===void 0&&(t=!0),this.body.immovable=t,this}};p.exports=S},34566:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setMass:function(t){return this.body.mass=t,this}};p.exports=S},2732:(p,S,t)=>{var d=t(15147),c=t(26673),l=t(22184),r=t(26535),n=function(e,s,u,i,a,o){var h=d(e,s-i,u-i,2*i,2*i,a,o);if(h.length===0)return h;for(var f=new c(s,u,i),v=new c,m=[],x=0;x{var S=function(t,d,c,l,r,n,e){n===void 0&&(n=!0),e===void 0&&(e=!1);var s=[],u=[],i=t.treeMinMax;if(i.minX=d,i.minY=c,i.maxX=d+l,i.maxY=c+r,e&&(u=t.staticTree.search(i)),n&&t.useTree)s=t.tree.search(i);else if(n){var a=t.bodies,o={position:{x:d,y:c},left:d,top:c,right:d+l,bottom:c+r,isCircle:!1},h=t.intersects;a.iterate(function(f){h(f,o)&&s.push(f)})}return u.concat(s)};p.exports=S},57527:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setPushable:function(t){return t===void 0&&(t=!0),this.body.pushable=t,this}};p.exports=S},77687:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setOffset:function(t,d){return this.body.setOffset(t,d),this},setSize:function(t,d,c){return this.body.setSize(t,d,c),this},setBodySize:function(t,d,c){return this.body.setSize(t,d,c),this},setCircle:function(t,d,c){return this.body.setCircle(t,d,c),this}};p.exports=S},66536:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setVelocity:function(t,d){return this.body.setVelocity(t,d),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,d){return this.body.maxVelocity.set(t,d),this}};p.exports=S},7864:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Acceleration:t(5321),Angular:t(29257),Bounce:t(62122),Collision:t(95239),Debug:t(99803),Drag:t(87145),Enable:t(96174),Friction:t(51702),Gravity:t(25578),Immovable:t(72029),Mass:t(34566),OverlapCirc:t(2732),OverlapRect:t(15147),Pushable:t(57527),Size:t(77687),Velocity:t(66536)}},47401:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14};p.exports=S},22346:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="collide"},95092:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="overlap"},15775:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},74142:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},22825:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="tilecollide"},10851:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="tileoverlap"},7543:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="worldbounds"},1487:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="worldstep"},27037:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={COLLIDE:t(22346),OVERLAP:t(95092),PAUSE:t(15775),RESUME:t(74142),TILE_COLLIDE:t(22825),TILE_OVERLAP:t(10851),WORLD_BOUNDS:t(7543),WORLD_STEP:t(1487)}},39977:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(47401),c=t(98611),l={ArcadePhysics:t(66150),Body:t(97602),Collider:t(3909),Components:t(7864),Events:t(27037),Factory:t(99523),GetCollidesWith:t(44880),GetOverlapX:t(75671),GetOverlapY:t(66185),SeparateX:t(61777),SeparateY:t(25299),Group:t(10481),Image:t(62832),Sprite:t(25084),StaticBody:t(66634),StaticGroup:t(46346),Tilemap:t(8413),World:t(85233)};l=c(!1,l,d),p.exports=l},25163:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,d,t):t.layer.callbacks[t.index]?!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,d,t):!0};p.exports=S},98209:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d<0?(t.blocked.none=!1,t.blocked.left=!0):d>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=d,t.updateCenter(),t.bounce.x===0?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x};p.exports=S},72792:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d<0?(t.blocked.none=!1,t.blocked.up=!0):d>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=d,t.updateCenter(),t.bounce.y===0?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y};p.exports=S},27354:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(14405),c=t(52926),l=t(28808),r=function(n,e,s,u,i,a,o){var h=u.left,f=u.top,v=u.right,m=u.bottom,x=s.faceLeft||s.faceRight,g=s.faceTop||s.faceBottom;if(o||(x=!0,g=!0),!x&&!g)return!1;var y=0,T=0,E=0,C=1;if(e.deltaAbsX()>e.deltaAbsY()?E=-1:e.deltaAbsX(){/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(98209),c=function(l,r,n,e,s,u){var i=0,a=r.faceLeft,o=r.faceRight,h=r.collideLeft,f=r.collideRight;return u||(a=!0,o=!0,h=!0,f=!0),l.deltaX()<0&&f&&l.checkCollision.left?o&&l.x0&&h&&l.checkCollision.right&&a&&l.right>n&&(i=l.right-n,i>s&&(i=0)),i!==0&&(l.customSeparateX?l.overlapX=i:d(l,i)),i};p.exports=c},52926:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72792),c=function(l,r,n,e,s,u){var i=0,a=r.faceTop,o=r.faceBottom,h=r.collideUp,f=r.collideDown;return u||(a=!0,o=!0,h=!0,f=!0),l.deltaY()<0&&f&&l.checkCollision.up?o&&l.y0&&h&&l.checkCollision.down&&a&&l.bottom>n&&(i=l.bottom-n,i>s&&(i=0)),i!==0&&(l.customSeparateY?l.overlapY=i:d(l,i)),i};p.exports=c},28808:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return!(d.right<=t.left||d.bottom<=t.top||d.position.x>=t.right||d.position.y>=t.bottom)};p.exports=S},8413:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={ProcessTileCallbacks:t(25163),ProcessTileSeparationX:t(98209),ProcessTileSeparationY:t(72792),SeparateTile:t(27354),TileCheckX:t(14405),TileCheckY:t(52926),TileIntersectsBody:t(28808)};p.exports=d},53954:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Arcade:t(39977),Matter:t(45949)}},63568:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(93736),l=new d({initialize:function(){this.boundsCenter=new c,this.centerDiff=new c},parseBody:function(r){if(r=r.hasOwnProperty("body")?r.body:r,!r.hasOwnProperty("bounds")||!r.hasOwnProperty("centerOfMass"))return!1;var n=this.boundsCenter,e=this.centerDiff,s=r.bounds.max.x-r.bounds.min.x,u=r.bounds.max.y-r.bounds.min.y,i=s*r.centerOfMass.x,a=u*r.centerOfMass.y;return n.set(s/2,u/2),e.set(i-n.x,a-n.y),!0},getTopLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,u=this.centerDiff;return new c(n+s.x+u.x,e+s.y+u.y)}return!1},getTopCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,u=this.centerDiff;return new c(n+u.x,e+s.y+u.y)}return!1},getTopRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,u=this.centerDiff;return new c(n-(s.x-u.x),e+s.y+u.y)}return!1},getLeftCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,u=this.centerDiff;return new c(n+s.x+u.x,e+u.y)}return!1},getCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.centerDiff;return new c(n+s.x,e+s.y)}return!1},getRightCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,u=this.centerDiff;return new c(n-(s.x-u.x),e+u.y)}return!1},getBottomLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,u=this.centerDiff;return new c(n+s.x+u.x,e-(s.y-u.y))}return!1},getBottomCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,u=this.centerDiff;return new c(n+u.x,e-(s.y-u.y))}return!1},getBottomRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,u=this.centerDiff;return new c(n-(s.x-u.x),e-(s.y-u.y))}return!1}});p.exports=l},18171:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16929);d.Body=t(84125),d.Composite=t(11299),d.World=t(72005),d.Collision=t(63454),d.Detector=t(13657),d.Pairs=t(91327),d.Pair=t(70584),d.Query=t(13390),d.Resolver=t(44272),d.Constraint=t(52838),d.Common=t(68758),d.Engine=t(45775),d.Events=t(39073),d.Sleeping=t(22806),d.Plugin=t(84474),d.Bodies=t(68516),d.Composites=t(56643),d.Axes=t(50658),d.Bounds=t(84091),d.Svg=t(92765),d.Vector=t(10438),d.Vertices=t(39745),d.World.add=d.Composite.add,d.World.remove=d.Composite.remove,d.World.addComposite=d.Composite.addComposite,d.World.addBody=d.Composite.addBody,d.World.addConstraint=d.Composite.addConstraint,d.World.clear=d.Composite.clear,p.exports=d},72653:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(68516),c=t(56694),l=t(56643),r=t(52838),n=t(92765),e=t(3860),s=t(7030),u=t(73658),i=t(84720),a=t(10998),o=t(72829),h=t(88596),f=t(39745),v=new c({initialize:function(x){this.world=x,this.scene=x.scene,this.sys=x.scene.sys},rectangle:function(m,x,g,y,T){var E=d.rectangle(m,x,g,y,T);return this.world.add(E),E},trapezoid:function(m,x,g,y,T,E){var C=d.trapezoid(m,x,g,y,T,E);return this.world.add(C),C},circle:function(m,x,g,y,T){var E=d.circle(m,x,g,y,T);return this.world.add(E),E},polygon:function(m,x,g,y,T){var E=d.polygon(m,x,g,y,T);return this.world.add(E),E},fromVertices:function(m,x,g,y,T,E,C){typeof g=="string"&&(g=f.fromPath(g));var A=d.fromVertices(m,x,g,y,T,E,C);return this.world.add(A),A},fromPhysicsEditor:function(m,x,g,y,T){T===void 0&&(T=!0);var E=a.parseBody(m,x,g,y);return T&&!this.world.has(E)&&this.world.add(E),E},fromSVG:function(m,x,g,y,T,E){y===void 0&&(y=1),T===void 0&&(T={}),E===void 0&&(E=!0);for(var C=g.getElementsByTagName("path"),A=[],P=0;P{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74527),c=t(72632),l=t(93736);function r(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var n=function(e,s,u,i){u===void 0&&(u={}),i===void 0&&(i=!0);var a=s.x,o=s.y;s.body={temp:!0,position:{x:a,y:o}};var h=[d.Bounce,d.Collision,d.Force,d.Friction,d.Gravity,d.Mass,d.Sensor,d.SetBody,d.Sleep,d.Static,d.Transform,d.Velocity];if(h.forEach(function(v){for(var m in v)r(v[m])?Object.defineProperty(s,m,{get:v[m].get,set:v[m].set}):Object.defineProperty(s,m,{value:v[m]})}),s.world=e,s._tempVec2=new l(a,o),u.hasOwnProperty("type")&&u.type==="body")s.setExistingBody(u,i);else{var f=c(u,"shape",null);f||(f="rectangle"),u.addToWorld=i,s.setBody(f,u)}return s};p.exports=n},7030:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(74527),l=t(89980),r=t(72632),n=t(1539),e=t(58210),s=t(93736),u=new d({Extends:n,Mixins:[c.Bounce,c.Collision,c.Force,c.Friction,c.Gravity,c.Mass,c.Sensor,c.SetBody,c.Sleep,c.Static,c.Transform,c.Velocity,e],initialize:function(a,o,h,f,v,m){l.call(this,a.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(f,v),this.setSizeToFrame(),this.setOrigin(),this.world=a,this._tempVec2=new s(o,h);var x=r(m,"shape",null);x?this.setBody(x,m):this.setRectangle(this.width,this.height,m),this.setPosition(o,h),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=u},50583:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84093),c=t(50658),l=t(68516),r=t(84125),n=t(63568),e=t(84091),s=t(56694),u=t(63454),i=t(68758),a=t(11299),o=t(56643),h=t(52838),f=t(13657),v=t(53996),m=t(72653),x=t(72632),g=t(10850),y=t(1675),T=t(80391),E=t(16929),C=t(44097),A=t(30657),P=t(70584),R=t(91327),F=t(84474),L=t(91963),B=t(13390),N=t(44272),U=t(7599),z=t(92765),w=t(10438),I=t(39745),M=t(31468);i.setDecomp(t(81084));var O=new s({initialize:function(G){this.scene=G,this.systems=G.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=r,this.composite=a,this.collision=u,this.detector=f,this.pair=P,this.pairs=R,this.query=B,this.resolver=N,this.constraint=h,this.bodies=l,this.composites=o,this.axes=c,this.bounds=e,this.svg=z,this.vector=w,this.vertices=I,this.verts=I,this._tempVec2=w.create(),g(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),g(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),g(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),N._restingThresh=g(this.config,"restingThresh",4),N._restingThreshTangent=g(this.config,"restingThreshTangent",6),N._positionDampen=g(this.config,"positionDampen",.9),N._positionWarming=g(this.config,"positionWarming",.8),N._frictionNormalMultiplier=g(this.config,"frictionNormalMultiplier",5),G.sys.events.once(U.BOOT,this.boot,this),G.sys.events.on(U.START,this.start,this)},boot:function(){this.world=new M(this.scene,this.config),this.add=new m(this.world),this.bodyBounds=new n,this.systems.events.once(U.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new M(this.scene,this.config),this.add=new m(this.world));var D=this.systems.events;D.on(U.UPDATE,this.world.update,this.world),D.on(U.POST_UPDATE,this.world.postUpdate,this.world),D.once(U.SHUTDOWN,this.shutdown,this)},getConfig:function(){var D=this.systems.game.config.physics,G=this.systems.settings.physics,X=A(x(G,"matter",{}),x(D,"matter",{}));return X},enableAttractorPlugin:function(){return F.register(y),F.use(E,y),this},enableWrapPlugin:function(){return F.register(C),F.use(E,C),this},enableCollisionEventsPlugin:function(){return F.register(T),F.use(E,T),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(D,G){this.world.step(D,G)},containsPoint:function(D,G,X){D=this.getMatterBodies(D);var V=w.create(G,X),Y=B.point(D,V);return Y.length>0},intersectPoint:function(D,G,X){X=this.getMatterBodies(X);var V=w.create(D,G),Y=[],W=B.point(X,V);return W.forEach(function(H){Y.indexOf(H)===-1&&Y.push(H)}),Y},intersectRect:function(D,G,X,V,Y,W){Y===void 0&&(Y=!1),W=this.getMatterBodies(W);var H={min:{x:D,y:G},max:{x:D+X,y:G+V}},b=[],K=B.region(W,H,Y);return K.forEach(function(J){b.indexOf(J)===-1&&b.push(J)}),b},intersectRay:function(D,G,X,V,Y,W){Y===void 0&&(Y=1),W=this.getMatterBodies(W);for(var H=[],b=B.ray(W,w.create(D,G),w.create(X,V),Y),K=0;K{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(16569),c=t(56694),l=t(74527),r=t(89980),n=t(72632),e=t(58210),s=t(13747),u=t(93736),i=new c({Extends:s,Mixins:[l.Bounce,l.Collision,l.Force,l.Friction,l.Gravity,l.Mass,l.Sensor,l.SetBody,l.Sleep,l.Static,l.Transform,l.Velocity,e],initialize:function(o,h,f,v,m,x){r.call(this,o.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(v,m),this.setSizeToFrame(),this.setOrigin(),this.world=o,this._tempVec2=new u(h,f);var g=n(x,"shape",null);g?this.setBody(g,x):this.setRectangle(this.width,this.height,x),this.setPosition(h,f),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=i},84720:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(68516),c=t(84125),l=t(56694),r=t(74527),n=t(28699),e=t(6659),s=t(72632),u=t(19256),i=t(39745),a=new l({Extends:e,Mixins:[r.Bounce,r.Collision,r.Friction,r.Gravity,r.Mass,r.Sensor,r.Sleep,r.Static],initialize:function(h,f,v){e.call(this),this.tile=f,this.world=h,f.physics.matterBody&&f.physics.matterBody.destroy(),f.physics.matterBody=this;var m=s(v,"body",null),x=s(v,"addToWorld",!0);if(m)this.setBody(m,x);else{var g=f.getCollisionGroup(),y=s(g,"objects",[]);y.length>0?this.setFromTileCollision(v):this.setFromTileRectangle(v)}if(f.flipX||f.flipY){var T={x:f.getCenterX(),y:f.getCenterY()},E=f.flipX?-1:1,C=f.flipY?-1:1;c.scale(m,E,C,T)}},setFromTileRectangle:function(o){o===void 0&&(o={}),u(o,"isStatic")||(o.isStatic=!0),u(o,"addToWorld")||(o.addToWorld=!0);var h=this.tile.getBounds(),f=h.x+h.width/2,v=h.y+h.height/2,m=d.rectangle(f,v,h.width,h.height,o);return this.setBody(m,o.addToWorld),this},setFromTileCollision:function(o){o===void 0&&(o={}),u(o,"isStatic")||(o.isStatic=!0),u(o,"addToWorld")||(o.addToWorld=!0);for(var h=this.tile.tilemapLayer.scaleX,f=this.tile.tilemapLayer.scaleY,v=this.tile.getLeft(),m=this.tile.getTop(),x=this.tile.getCollisionGroup(),g=s(x,"objects",[]),y=[],T=0;T1){var z=n(o);z.parts=y,this.setBody(c.create(z),z.addToWorld)}return this},setBody:function(o,h){return h===void 0&&(h=!0),this.body&&this.removeBody(),this.body=o,this.body.gameObject=this,h&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});p.exports=a},10998:(p,S,t)=>{/** + * @author Joachim Grill + * @author Richard Davey + * @copyright 2018 CodeAndWeb GmbH + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(68516),c=t(84125),l=t(68758),r=t(72632),n=t(39745),e={parseBody:function(s,u,i,a){a===void 0&&(a={});for(var o=r(i,"fixtures",[]),h=[],f=0;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(68516),c=t(84125),l={parseBody:function(r,n,e,s){s===void 0&&(s={});var u,i=e.vertices;if(i.length===1)s.vertices=i[0],u=c.create(s),d.flagCoincidentParts(u.parts);else{for(var a=[],o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84091),c=t(56694),l=t(11299),r=t(52838),n=t(13657),e=t(35416),s=t(33963),u=t(30657),i=t(22806),a=t(93736),o=t(39745),h=new c({initialize:function(v,m,x){x===void 0&&(x={});var g={label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}};this.scene=v,this.world=m,this.camera=null,this.pointer=null,this.active=!0,this.position=new a,this.body=null,this.part=null,this.constraint=r.create(u(x,g)),this.world.on(e.BEFORE_UPDATE,this.update,this),v.sys.input.on(s.POINTER_DOWN,this.onDown,this),v.sys.input.on(s.POINTER_UP,this.onUp,this)},onDown:function(f){this.pointer||(this.pointer=f,this.camera=f.camera)},onUp:function(f){f===this.pointer&&(this.pointer=null)},getBody:function(f){var v=this.position,m=this.constraint;this.camera.getWorldPoint(f.x,f.y,v);for(var x=l.allBodies(this.world.localWorld),g=0;g1?1:0,y=g;y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(68516),c=t(84125),l=t(56694),r=t(68758),n=t(11299),e=t(45775),s=t(6659),u=t(35416),i=t(72632),a=t(10850),o=t(84125),h=t(39073),f=t(84720),v=t(72005),m=t(10438),x=new l({Extends:s,initialize:function(y,T){s.call(this),this.scene=y,this.engine=e.create(T),this.localWorld=this.engine.world;var E=a(T,"gravity",null);E?this.setGravity(E.x,E.y,E.scale):E===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=a(T,"enabled",!0),this.getDelta=a(T,"getDelta",this.update60Hz);var C=i(T,"runner",{}),A=i(C,"fps",!1),P=i(C,"fps",60),R=i(C,"delta",1e3/P),F=i(C,"deltaMin",1e3/P),L=i(C,"deltaMax",1e3/(P*.5));A||(P=1e3/R),this.runner={fps:P,deltaSampleSize:i(C,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:i(C,"isFixed",!1),delta:R,deltaMin:F,deltaMax:L},this.autoUpdate=a(T,"autoUpdate",!0);var B=a(T,"debug",!1);if(this.drawDebug=typeof B=="object"?!0:B,this.debugGraphic,this.debugConfig={showAxes:i(B,"showAxes",!1),showAngleIndicator:i(B,"showAngleIndicator",!1),angleColor:i(B,"angleColor",15208787),showBroadphase:i(B,"showBroadphase",!1),broadphaseColor:i(B,"broadphaseColor",16757760),showBounds:i(B,"showBounds",!1),boundsColor:i(B,"boundsColor",16777215),showVelocity:i(B,"showVelocity",!1),velocityColor:i(B,"velocityColor",44783),showCollisions:i(B,"showCollisions",!1),collisionColor:i(B,"collisionColor",16094476),showSeparations:i(B,"showSeparations",!1),separationColor:i(B,"separationColor",16753920),showBody:i(B,"showBody",!0),showStaticBody:i(B,"showStaticBody",!0),showInternalEdges:i(B,"showInternalEdges",!1),renderFill:i(B,"renderFill",!1),renderLine:i(B,"renderLine",!0),fillColor:i(B,"fillColor",1075465),fillOpacity:i(B,"fillOpacity",1),lineColor:i(B,"lineColor",2678297),lineOpacity:i(B,"lineOpacity",1),lineThickness:i(B,"lineThickness",1),staticFillColor:i(B,"staticFillColor",857979),staticLineColor:i(B,"staticLineColor",1255396),showSleeping:i(B,"showSleeping",!1),staticBodySleepOpacity:i(B,"staticBodySleepOpacity",.7),sleepFillColor:i(B,"sleepFillColor",4605510),sleepLineColor:i(B,"sleepLineColor",10066585),showSensors:i(B,"showSensors",!0),sensorFillColor:i(B,"sensorFillColor",857979),sensorLineColor:i(B,"sensorLineColor",1255396),showPositions:i(B,"showPositions",!0),positionSize:i(B,"positionSize",4),positionColor:i(B,"positionColor",14697178),showJoint:i(B,"showJoint",!0),jointColor:i(B,"jointColor",14737474),jointLineOpacity:i(B,"jointLineOpacity",1),jointLineThickness:i(B,"jointLineThickness",2),pinSize:i(B,"pinSize",4),pinColor:i(B,"pinColor",4382944),springColor:i(B,"springColor",14697184),anchorColor:i(B,"anchorColor",15724527),anchorSize:i(B,"anchorSize",4),showConvexHulls:i(B,"showConvexHulls",!1),hullColor:i(B,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),i(T,"setBounds",!1)){var N=T.setBounds;if(typeof N=="boolean")this.setBounds();else{var U=i(N,"x",0),z=i(N,"y",0),w=i(N,"width",y.sys.scale.width),I=i(N,"height",y.sys.scale.height),M=i(N,"thickness",64),O=i(N,"left",!0),D=i(N,"right",!0),G=i(N,"top",!0),X=i(N,"bottom",!0);this.setBounds(U,z,w,I,M,O,D,G,X)}}},setCompositeRenderStyle:function(g){var y=g.bodies,T=g.constraints,E=g.composites,C,A,P;for(C=0;C0&&(A=C[0].bodyA,P=C[0].bodyB),g.emit(u.COLLISION_START,E,A,P)}),h.on(y,"collisionActive",function(E){var C=E.pairs,A,P;C.length>0&&(A=C[0].bodyA,P=C[0].bodyB),g.emit(u.COLLISION_ACTIVE,E,A,P)}),h.on(y,"collisionEnd",function(E){var C=E.pairs,A,P;C.length>0&&(A=C[0].bodyA,P=C[0].bodyB),g.emit(u.COLLISION_END,E,A,P)})},setBounds:function(g,y,T,E,C,A,P,R,F){return g===void 0&&(g=0),y===void 0&&(y=0),T===void 0&&(T=this.scene.sys.scale.width),E===void 0&&(E=this.scene.sys.scale.height),C===void 0&&(C=64),A===void 0&&(A=!0),P===void 0&&(P=!0),R===void 0&&(R=!0),F===void 0&&(F=!0),this.updateWall(A,"left",g-C,y-C,C,E+C*2),this.updateWall(P,"right",g+T,y-C,C,E+C*2),this.updateWall(R,"top",g,y-C,T,C),this.updateWall(F,"bottom",g,y+E,T,C),this},updateWall:function(g,y,T,E,C,A){var P=this.walls[y];g?(P&&v.remove(this.localWorld,P),T+=C/2,E+=A/2,this.walls[y]=this.create(T,E,C,A,{isStatic:!0,friction:0,frictionStatic:0})):(P&&v.remove(this.localWorld,P),this.walls[y]=null)},createDebugGraphic:function(){var g=this.scene.sys.add.graphics({x:0,y:0});return g.setDepth(Number.MAX_VALUE),this.debugGraphic=g,this.drawDebug=!0,g},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(g,y,T){return g===void 0&&(g=0),y===void 0&&(y=1),T===void 0&&(T=.001),this.localWorld.gravity.x=g,this.localWorld.gravity.y=y,this.localWorld.gravity.scale=T,this},create:function(g,y,T,E,C){var A=d.rectangle(g,y,T,E,C);return v.add(this.localWorld,A),A},add:function(g){return v.add(this.localWorld,g),this},remove:function(g,y){Array.isArray(g)||(g=[g]);for(var T=0;TE.deltaMax?E.deltaMax:y,E.delta=y),E.timeScalePrev=C.timeScale,E.frameCounter+=1,g-E.counterTimestamp>=1e3&&(E.fps=E.frameCounter*((g-E.counterTimestamp)/1e3),E.counterTimestamp=g,E.frameCounter=0),e.update(T,y)}},step:function(g){e.update(this.engine,g)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(g){var y=g.hasOwnProperty("body")?g.body:g;return n.get(this.localWorld,y.id,y.type)!==null},getAllBodies:function(){return n.allBodies(this.localWorld)},getAllConstraints:function(){return n.allConstraints(this.localWorld)},getAllComposites:function(){return n.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var g=this.debugConfig,y=this.engine,T=this.debugGraphic,E=n.allBodies(this.localWorld);this.debugGraphic.clear(),g.showBroadphase&&y.broadphase.controller&&this.renderGrid(y.broadphase,T,g.broadphaseColor,.5),g.showBounds&&this.renderBodyBounds(E,T,g.boundsColor,.5),(g.showBody||g.showStaticBody)&&this.renderBodies(E),g.showJoint&&this.renderJoints(),(g.showAxes||g.showAngleIndicator)&&this.renderBodyAxes(E,T,g.showAxes,g.angleColor,.5),g.showVelocity&&this.renderBodyVelocity(E,T,g.velocityColor,1,2),g.showSeparations&&this.renderSeparations(y.pairs.list,T,g.separationColor),g.showCollisions&&this.renderCollisions(y.pairs.list,T,g.collisionColor)}},renderGrid:function(g,y,T,E){y.lineStyle(1,T,E);for(var C=r.keys(g.buckets),A=0;A0){var B=L[0].vertex.x,N=L[0].vertex.y;L.length===2&&(B=(L[0].vertex.x+L[1].vertex.x)/2,N=(L[0].vertex.y+L[1].vertex.y)/2),F.bodyB===F.supports[0].body||F.bodyA.isStatic?y.lineBetween(B-F.normal.x*8,N-F.normal.y*8,B,N):y.lineBetween(B+F.normal.x*8,N+F.normal.y*8,B,N)}}return this},renderBodyBounds:function(g,y,T,E){y.lineStyle(1,T,E);for(var C=0;C1?1:0;F1?1:0;L1?1:0;L1&&this.renderConvexHull(I,y,z,D)}}},renderBody:function(g,y,T,E,C,A,P,R){E===void 0&&(E=null),C===void 0&&(C=null),A===void 0&&(A=1),P===void 0&&(P=null),R===void 0&&(R=null);for(var F=this.debugConfig,L=F.sensorFillColor,B=F.sensorLineColor,N=g.parts,U=N.length,z=U>1?1:0;z1){var P=g.vertices;y.lineStyle(E,T),y.beginPath(),y.moveTo(P[0].x,P[0].y);for(var R=1;R0&&(y.fillStyle(P),y.fillCircle(N.x,N.y,R),y.fillCircle(U.x,U.y,R)),this},resetCollisionIDs:function(){return c._nextCollidingGroupId=1,c._nextNonCollidingGroupId=-1,c._nextCategory=1,this},shutdown:function(){h.off(this.engine),this.removeAllListeners(),v.clear(this.localWorld,!1),e.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});p.exports=x},95349:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setBounce:function(t){return this.body.restitution=t,this}};p.exports=S},70679:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var d=0;if(!Array.isArray(t))d=t;else for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84125),c={applyForce:function(l){return this._tempVec2.set(this.body.position.x,this.body.position.y),d.applyForce(this.body,this._tempVec2,l),this},applyForceFrom:function(l,r){return d.applyForce(this.body,l,r),this},thrust:function(l){var r=this.body.angle;return this._tempVec2.set(l*Math.cos(r),l*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(l){var r=this.body.angle-Math.PI/2;return this._tempVec2.set(l*Math.cos(r),l*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(l){var r=this.body.angle+Math.PI/2;return this._tempVec2.set(l*Math.cos(r),l*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(l){var r=this.body.angle-Math.PI;return this._tempVec2.set(l*Math.cos(r),l*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};p.exports=c},74015:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setFriction:function(t,d,c){return this.body.friction=t,d!==void 0&&(this.body.frictionAir=d),c!==void 0&&(this.body.frictionStatic=c),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};p.exports=S},11535:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}};p.exports=S},74497:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84125),c=t(93736),l={setMass:function(r){return d.setMass(this.body,r),this},setDensity:function(r){return d.setDensity(this.body,r),this},centerOfMass:{get:function(){return new c(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};p.exports=l},75529:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}};p.exports=S},64024:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(68516),c=t(84125),l=t(88456),r=t(72632),n=t(10998),e=t(72829),s=t(39745),u={setRectangle:function(i,a,o){return this.setBody({type:"rectangle",width:i,height:a},o)},setCircle:function(i,a){return this.setBody({type:"circle",radius:i},a)},setPolygon:function(i,a,o){return this.setBody({type:"polygon",sides:a,radius:i},o)},setTrapezoid:function(i,a,o,h){return this.setBody({type:"trapezoid",width:i,height:a,slope:o},h)},setExistingBody:function(i,a){a===void 0&&(a=!0),this.body&&this.world.remove(this.body,!0),this.body=i;for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35416),c=t(22806),l=t(39073),r={setToSleep:function(){return c.set(this.body,!0),this},setAwake:function(){return c.set(this.body,!1),this},setSleepThreshold:function(n){return n===void 0&&(n=60),this.body.sleepThreshold=n,this},setSleepEvents:function(n,e){return this.setSleepStartEvent(n),this.setSleepEndEvent(e),this},setSleepStartEvent:function(n){if(n){var e=this.world;l.on(this.body,"sleepStart",function(s){e.emit(d.SLEEP_START,s,this)})}else l.off(this.body,"sleepStart");return this},setSleepEndEvent:function(n){if(n){var e=this.world;l.on(this.body,"sleepEnd",function(s){e.emit(d.SLEEP_END,s,this)})}else l.off(this.body,"sleepEnd");return this}};p.exports=r},82884:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84125),c={setStatic:function(l){return d.setStatic(this.body,l),this},isStatic:function(){return this.body.isStatic}};p.exports=c},4753:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84125),c=t(83392),l=t(35786),r=t(62138),n=4,e={x:{get:function(){return this.body.position.x},set:function(s){this._tempVec2.set(s,this.y),d.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(s){this._tempVec2.set(this.x,s),d.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(s){var u=1/this._scaleX,i=1/this._scaleY;this._scaleX=s,this._scaleX===0?this.renderFlags&=~n:this.renderFlags|=n,d.scale(this.body,u,i),d.scale(this.body,s,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(s){var u=1/this._scaleX,i=1/this._scaleY;this._scaleY=s,this._scaleY===0?this.renderFlags&=~n:this.renderFlags|=n,d.scale(this.body,u,i),d.scale(this.body,this._scaleX,s)}},angle:{get:function(){return r(this.body.angle*c.RAD_TO_DEG)},set:function(s){this.rotation=r(s)*c.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(s){this._rotation=l(s),d.setAngle(this.body,this._rotation)}},setPosition:function(s,u){return s===void 0&&(s=0),u===void 0&&(u=s),this._tempVec2.set(s,u),d.setPosition(this.body,this._tempVec2),this},setRotation:function(s){return s===void 0&&(s=0),this._rotation=l(s),d.setAngle(this.body,s),this},setFixedRotation:function(){return d.setInertia(this.body,1/0),this},setAngle:function(s){return s===void 0&&(s=0),this.angle=s,d.setAngle(this.body,this.rotation),this},setScale:function(s,u,i){s===void 0&&(s=1),u===void 0&&(u=s);var a=1/this._scaleX,o=1/this._scaleY;return this._scaleX=s,this._scaleY=u,d.scale(this.body,a,o,i),d.scale(this.body,s,u,i),this}};p.exports=e},37268:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84125),c={setVelocityX:function(l){return this._tempVec2.set(l,this.body.velocity.y),d.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(l){return this._tempVec2.set(this.body.velocity.x,l),d.setVelocity(this.body,this._tempVec2),this},setVelocity:function(l,r){return this._tempVec2.set(l,r),d.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return d.getVelocity(this.body)},setAngularVelocity:function(l){return d.setAngularVelocity(this.body,l),this},getAngularVelocity:function(){return d.getAngularVelocity(this.body)},setAngularSpeed:function(l){return d.setAngularSpeed(this.body,l),this},getAngularSpeed:function(){return d.getAngularSpeed(this.body)}};p.exports=c},74527:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Bounce:t(95349),Collision:t(70679),Force:t(77178),Friction:t(74015),Gravity:t(11535),Mass:t(74497),Sensor:t(75529),SetBody:t(64024),Sleep:t(25106),Static:t(82884),Transform:t(4753),Velocity:t(37268)}},63201:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="afteradd"},30474:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="afterremove"},44822:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="afterupdate"},88820:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="beforeadd"},94849:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="beforeremove"},6391:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="beforeupdate"},96738:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="collisionactive"},7916:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="collisionend"},59529:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="collisionstart"},10219:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragend"},183:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drag"},39143:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragstart"},16483:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},35806:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},22106:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="sleepend"},5803:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="sleepstart"},35416:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AFTER_ADD:t(63201),AFTER_REMOVE:t(30474),AFTER_UPDATE:t(44822),BEFORE_ADD:t(88820),BEFORE_REMOVE:t(94849),BEFORE_UPDATE:t(6391),COLLISION_ACTIVE:t(96738),COLLISION_END:t(7916),COLLISION_START:t(59529),DRAG_END:t(10219),DRAG:t(183),DRAG_START:t(39143),PAUSE:t(16483),RESUME:t(35806),SLEEP_END:t(22106),SLEEP_START:t(5803)}},45949:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BodyBounds:t(63568),Components:t(74527),Events:t(35416),Factory:t(72653),MatterGameObject:t(3860),Image:t(7030),Matter:t(18171),MatterPhysics:t(50583),PolyDecomp:t(81084),Sprite:t(73658),TileBody:t(84720),PhysicsEditorParser:t(10998),PhysicsJSONParser:t(72829),PointerConstraint:t(88596),World:t(31468)}},84125:(p,S,t)=>{var d={};p.exports=d;var c=t(39745),l=t(10438),r=t(22806),n=t(68758),e=t(84091),s=t(50658);(function(){d._timeCorrection=!0,d._inertiaScale=4,d._nextCollidingGroupId=1,d._nextNonCollidingGroupId=-1,d._nextCategory=1,d._baseDelta=16.666666666666668,d.create=function(i){var a={id:n.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:16.666666666666668,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!i.hasOwnProperty("position")&&i.hasOwnProperty("vertices")?i.position=c.centre(i.vertices):i.hasOwnProperty("vertices")||(a.vertices=c.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var o=n.extend(a,i);return u(o,i),o.setOnCollideWith=function(h,f){return f?this.onCollideWith[h.id]=f:delete this.onCollideWith[h.id],this},o},d.nextGroup=function(i){return i?d._nextNonCollidingGroupId--:d._nextCollidingGroupId++},d.nextCategory=function(){return d._nextCategory=d._nextCategory<<1,d._nextCategory};var u=function(i,a){if(a=a||{},d.set(i,{bounds:i.bounds||e.create(i.vertices),positionPrev:i.positionPrev||l.clone(i.position),anglePrev:i.anglePrev||i.angle,vertices:i.vertices,parts:i.parts||[i],isStatic:i.isStatic,isSleeping:i.isSleeping,parent:i.parent||i}),c.rotate(i.vertices,i.angle,i.position),s.rotate(i.axes,i.angle),e.update(i.bounds,i.vertices,i.velocity),d.set(i,{axes:a.axes||i.axes,area:a.area||i.area,mass:a.mass||i.mass,inertia:a.inertia||i.inertia}),i.parts.length===1){var o=i.bounds,h=i.centerOfMass,f=i.centerOffset,v=o.max.x-o.min.x,m=o.max.y-o.min.y;h.x=-(o.min.x-i.position.x)/v,h.y=-(o.min.y-i.position.y)/m,f.x=v*h.x,f.y=m*h.y}};d.set=function(i,a,o){var h;typeof a=="string"&&(h=a,a={},a[h]=o);for(h in a)if(Object.prototype.hasOwnProperty.call(a,h))switch(o=a[h],h){case"isStatic":d.setStatic(i,o);break;case"isSleeping":r.set(i,o);break;case"mass":d.setMass(i,o);break;case"density":d.setDensity(i,o);break;case"inertia":d.setInertia(i,o);break;case"vertices":d.setVertices(i,o);break;case"position":d.setPosition(i,o);break;case"angle":d.setAngle(i,o);break;case"velocity":d.setVelocity(i,o);break;case"angularVelocity":d.setAngularVelocity(i,o);break;case"speed":d.setSpeed(i,o);break;case"angularSpeed":d.setAngularSpeed(i,o);break;case"parts":d.setParts(i,o);break;case"centre":d.setCentre(i,o);break;default:i[h]=o}},d.setStatic=function(i,a){for(var o=0;o0&&l.rotateAbout(v.position,h,i.position,v.position)}},d.setVelocity=function(i,a){var o=i.deltaTime/d._baseDelta;i.positionPrev.x=i.position.x-a.x*o,i.positionPrev.y=i.position.y-a.y*o,i.velocity.x=(i.position.x-i.positionPrev.x)/o,i.velocity.y=(i.position.y-i.positionPrev.y)/o,i.speed=l.magnitude(i.velocity)},d.getVelocity=function(i){var a=d._baseDelta/i.deltaTime;return{x:(i.position.x-i.positionPrev.x)*a,y:(i.position.y-i.positionPrev.y)*a}},d.getSpeed=function(i){return l.magnitude(d.getVelocity(i))},d.setSpeed=function(i,a){d.setVelocity(i,l.mult(l.normalise(d.getVelocity(i)),a))},d.setAngularVelocity=function(i,a){var o=i.deltaTime/d._baseDelta;i.anglePrev=i.angle-a*o,i.angularVelocity=(i.angle-i.anglePrev)/o,i.angularSpeed=Math.abs(i.angularVelocity)},d.getAngularVelocity=function(i){return(i.angle-i.anglePrev)*d._baseDelta/i.deltaTime},d.getAngularSpeed=function(i){return Math.abs(d.getAngularVelocity(i))},d.setAngularSpeed=function(i,a){d.setAngularVelocity(i,n.sign(d.getAngularVelocity(i))*a)},d.translate=function(i,a,o){d.setPosition(i,l.add(i.position,a),o)},d.rotate=function(i,a,o,h){if(!o)d.setAngle(i,i.angle+a,h);else{var f=Math.cos(a),v=Math.sin(a),m=i.position.x-o.x,x=i.position.y-o.y;d.setPosition(i,{x:o.x+(m*f-x*v),y:o.y+(m*v+x*f)},h),d.setAngle(i,i.angle+a,h)}},d.scale=function(i,a,o,h){var f=0,v=0;h=h||i.position;for(var m=0;m0&&(f+=x.area,v+=x.inertia),x.position.x=h.x+(x.position.x-h.x)*a,x.position.y=h.y+(x.position.y-h.y)*o,e.update(x.bounds,x.vertices,i.velocity)}i.parts.length>1&&(i.area=f,i.isStatic||(d.setMass(i,i.density*f),d.setInertia(i,v))),i.circleRadius&&(a===o?i.circleRadius*=a:i.circleRadius=null)},d.update=function(i,a){a=(typeof a<"u"?a:16.666666666666668)*i.timeScale;var o=a*a,h=d._timeCorrection?a/(i.deltaTime||a):1,f=1-i.frictionAir*(a/n._baseDelta),v=(i.position.x-i.positionPrev.x)*h,m=(i.position.y-i.positionPrev.y)*h;i.velocity.x=v*f+i.force.x/i.mass*o,i.velocity.y=m*f+i.force.y/i.mass*o,i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y,i.position.x+=i.velocity.x,i.position.y+=i.velocity.y,i.deltaTime=a,i.angularVelocity=(i.angle-i.anglePrev)*f*h+i.torque/i.inertia*o,i.anglePrev=i.angle,i.angle+=i.angularVelocity,i.speed=l.magnitude(i.velocity),i.angularSpeed=Math.abs(i.angularVelocity);for(var x=0;x0&&(g.position.x+=i.velocity.x,g.position.y+=i.velocity.y),i.angularVelocity!==0&&(c.rotate(g.vertices,i.angularVelocity,i.position),s.rotate(g.axes,i.angularVelocity),x>0&&l.rotateAbout(g.position,i.angularVelocity,i.position,g.position)),e.update(g.bounds,g.vertices,i.velocity)}},d.updateVelocities=function(i){var a=d._baseDelta/i.deltaTime,o=i.velocity;o.x=(i.position.x-i.positionPrev.x)*a,o.y=(i.position.y-i.positionPrev.y)*a,i.speed=Math.sqrt(o.x*o.x+o.y*o.y),i.angularVelocity=(i.angle-i.anglePrev)*a,i.angularSpeed=Math.abs(i.angularVelocity)},d.applyForce=function(i,a,o){var h={x:a.x-i.position.x,y:a.y-i.position.y};i.force.x+=o.x,i.force.y+=o.y,i.torque+=h.x*o.y-h.y*o.x},d._totalProperties=function(i){for(var a={mass:0,area:0,inertia:0,centre:{x:0,y:0}},o=i.parts.length===1?0:1;o{var d={};p.exports=d;var c=t(39073),l=t(68758),r=t(84091),n=t(84125);(function(){d.create=function(e){return l.extend({id:l.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},d.setModified=function(e,s,u,i){if(c.trigger(e,"compositeModified",e),e.isModified=s,s&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),u&&e.parent&&d.setModified(e.parent,s,u,i),i)for(var a=0;a{var d={};p.exports=d;var c=t(11299);(function(){d.create=c.create,d.add=c.add,d.remove=c.remove,d.clear=c.clear,d.addComposite=c.addComposite,d.addBody=c.addBody,d.addConstraint=c.addConstraint})()},63454:(p,S,t)=>{var d={};p.exports=d;var c=t(39745),l=t(70584);(function(){var r=[],n={overlap:0,axis:null},e={overlap:0,axis:null};d.create=function(s,u){return{pair:null,collided:!1,bodyA:s,bodyB:u,parentA:s.parent,parentB:u.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},d.collides=function(s,u,i){if(d._overlapAxes(n,s.vertices,u.vertices,s.axes),n.overlap<=0||(d._overlapAxes(e,u.vertices,s.vertices,u.axes),e.overlap<=0))return null;var a=i&&i.table[l.id(s,u)],o;a?o=a.collision:(o=d.create(s,u),o.collided=!0,o.bodyA=s.idw?w=P:PI?I=P:Po?o=f:f{var S={};p.exports=S,function(){S.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}}()},13657:(p,S,t)=>{var d={};p.exports=d;var c=t(68758),l=t(63454);(function(){d.create=function(r){var n={bodies:[],pairs:null};return c.extend(n,r)},d.setBodies=function(r,n){r.bodies=n.slice(0)},d.clear=function(r){r.bodies=[]},d.collisions=function(r){var n=[],e=r.pairs,s=r.bodies,u=s.length,i=d.canCollide,a=l.collides,o,h;for(s.sort(d._compareBoundsX),o=0;om)break;if(!(xA.max.y)&&!(y&&(C.isStatic||C.isSleeping))&&i(f.collisionFilter,C.collisionFilter)){var P=C.parts.length;if(E&&P===1){var R=a(f,C,e);R&&n.push(R)}else for(var F=T>1?1:0,L=P>1?1:0,B=F;BA.max.x||v.max.xA.max.y)){var R=a(N,z,e);R&&n.push(R)}}}}}return n},d.canCollide=function(r,n){return r.group===n.group&&r.group!==0?r.group>0:(r.mask&n.category)!==0&&(n.mask&r.category)!==0},d._compareBoundsX=function(r,n){return r.bounds.min.x-n.bounds.min.x}})()},70584:(p,S,t)=>{var d={};p.exports=d;var c=t(17319);(function(){d.create=function(l,r){var n=l.bodyA,e=l.bodyB,s={id:d.id(n,e),bodyA:n,bodyB:e,collision:l,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||e.isSensor,timeCreated:r,timeUpdated:r,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return d.update(s,l,r),s},d.update=function(l,r,n){var e=l.contacts,s=r.supports,u=l.activeContacts,i=r.parentA,a=r.parentB,o=i.vertices.length;l.isActive=!0,l.timeUpdated=n,l.collision=r,l.separation=r.depth,l.inverseMass=i.inverseMass+a.inverseMass,l.friction=i.frictiona.frictionStatic?i.frictionStatic:a.frictionStatic,l.restitution=i.restitution>a.restitution?i.restitution:a.restitution,l.slop=i.slop>a.slop?i.slop:a.slop,r.pair=l,u.length=0;for(var h=0;h{var d={};p.exports=d;var c=t(70584),l=t(68758);(function(){d.create=function(r){return l.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},r)},d.update=function(r,n,e){var s=r.list,u=s.length,i=r.table,a=n.length,o=r.collisionStart,h=r.collisionEnd,f=r.collisionActive,v,m,x,g;for(o.length=0,h.length=0,f.length=0,g=0;g{var d={};p.exports=d;var c=t(10438),l=t(63454),r=t(84091),n=t(68516),e=t(39745);(function(){d.collides=function(s,u){for(var i=[],a=u.length,o=s.bounds,h=l.collides,f=r.overlaps,v=0;v{var d={};p.exports=d;var c=t(39745),l=t(68758),r=t(84091);(function(){d._restingThresh=2,d._restingThreshTangent=Math.sqrt(6),d._positionDampen=.9,d._positionWarming=.8,d._frictionNormalMultiplier=5,d._frictionMaxStatic=Number.MAX_VALUE,d.preSolvePosition=function(n){var e,s,u,i=n.length;for(e=0;eQ?(x=tt>0?tt:-tt,m=T.friction*(tt>0?1:-1)*i,m<-x?m=-x:m>x&&(m=x)):(m=tt,x=f);var q=G*L-X*F,k=V*L-Y*F,nt=w/(I+C.inverseInertia*q*q+A.inverseInertia*k*k),rt=(1+T.restitution)*$*nt;if(m*=nt,$0&&(O.normalImpulse=0),rt=O.normalImpulse-vt}if(tt<-o||tt>o)O.tangentImpulse=0;else{var dt=O.tangentImpulse;O.tangentImpulse+=m,O.tangentImpulse<-x&&(O.tangentImpulse=-x),O.tangentImpulse>x&&(O.tangentImpulse=x),m=O.tangentImpulse-dt}var lt=F*rt+B*m,ot=L*rt+N*m;C.isStatic||C.isSleeping||(C.positionPrev.x+=lt*C.inverseMass,C.positionPrev.y+=ot*C.inverseMass,C.anglePrev+=(G*ot-X*lt)*C.inverseInertia),A.isStatic||A.isSleeping||(A.positionPrev.x-=lt*A.inverseMass,A.positionPrev.y-=ot*A.inverseMass,A.anglePrev-=(V*ot-Y*lt)*A.inverseInertia)}}}}})()},52838:(p,S,t)=>{var d={};p.exports=d;var c=t(39745),l=t(10438),r=t(22806),n=t(84091),e=t(50658),s=t(68758);(function(){d._warming=.4,d._torqueDampen=1,d._minLength=1e-6,d.create=function(u){var i=u;i.bodyA&&!i.pointA&&(i.pointA={x:0,y:0}),i.bodyB&&!i.pointB&&(i.pointB={x:0,y:0});var a=i.bodyA?l.add(i.bodyA.position,i.pointA):i.pointA,o=i.bodyB?l.add(i.bodyB.position,i.pointB):i.pointB,h=l.magnitude(l.sub(a,o));i.length=typeof i.length<"u"?i.length:h,i.id=i.id||s.nextId(),i.label=i.label||"Constraint",i.type="constraint",i.stiffness=i.stiffness||(i.length>0?1:.7),i.damping=i.damping||0,i.angularStiffness=i.angularStiffness||0,i.angleA=i.bodyA?i.bodyA.angle:i.angleA,i.angleB=i.bodyB?i.bodyB.angle:i.angleB,i.plugin={};var f={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return i.length===0&&i.stiffness>.1?(f.type="pin",f.anchors=!1):i.stiffness<.9&&(f.type="spring"),i.render=s.extend(f,i.render),i},d.preSolveAll=function(u){for(var i=0;i=1||u.length===0,E=T?u.stiffness*i:u.stiffness*i*i,C=u.damping*i,A=l.mult(x,y*E),P=(a?a.inverseMass:0)+(o?o.inverseMass:0),R=(a?a.inverseInertia:0)+(o?o.inverseInertia:0),F=P+R,L,B,N,U,z;if(C>0){var w=l.create();N=l.div(x,g),z=l.sub(o&&l.sub(o.position,o.positionPrev)||w,a&&l.sub(a.position,a.positionPrev)||w),U=l.dot(N,z)}a&&!a.isStatic&&(B=a.inverseMass/P,a.constraintImpulse.x-=A.x*B,a.constraintImpulse.y-=A.y*B,a.position.x-=A.x*B,a.position.y-=A.y*B,C>0&&(a.positionPrev.x-=C*N.x*U*B,a.positionPrev.y-=C*N.y*U*B),L=l.cross(h,A)/F*d._torqueDampen*a.inverseInertia*(1-u.angularStiffness),a.constraintImpulse.angle-=L,a.angle-=L),o&&!o.isStatic&&(B=o.inverseMass/P,o.constraintImpulse.x+=A.x*B,o.constraintImpulse.y+=A.y*B,o.position.x+=A.x*B,o.position.y+=A.y*B,C>0&&(o.positionPrev.x+=C*N.x*U*B,o.positionPrev.y+=C*N.y*U*B),L=l.cross(f,A)/F*d._torqueDampen*o.inverseInertia*(1-u.angularStiffness),o.constraintImpulse.angle+=L,o.angle+=L)}}},d.postSolveAll=function(u){for(var i=0;i0&&(f.position.x+=o.x,f.position.y+=o.y),o.angle!==0&&(c.rotate(f.vertices,o.angle,a.position),e.rotate(f.axes,o.angle),h>0&&l.rotateAbout(f.position,o.angle,a.position,f.position)),n.update(f.bounds,f.vertices,a.velocity)}o.angle*=d._warming,o.x*=d._warming,o.y*=d._warming}}},d.pointAWorld=function(u){return{x:(u.bodyA?u.bodyA.position.x:0)+(u.pointA?u.pointA.x:0),y:(u.bodyA?u.bodyA.position.y:0)+(u.pointA?u.pointA.y:0)}},d.pointBWorld=function(u){return{x:(u.bodyB?u.bodyB.position.x:0)+(u.pointB?u.pointB.x:0),y:(u.bodyB?u.bodyB.position.y:0)+(u.pointB?u.pointB.y:0)}},d.currentLength=function(u){var i=(u.bodyA?u.bodyA.position.x:0)+(u.pointA?u.pointA.x:0),a=(u.bodyA?u.bodyA.position.y:0)+(u.pointA?u.pointA.y:0),o=(u.bodyB?u.bodyB.position.x:0)+(u.pointB?u.pointB.x:0),h=(u.bodyB?u.bodyB.position.y:0)+(u.pointB?u.pointB.y:0),f=i-o,v=a-h;return Math.sqrt(f*f+v*v)}})()},68758:(p,S,t)=>{var d={};p.exports=d,function(){d._baseDelta=16.666666666666668,d._nextId=0,d._seed=0,d._nowStartTime=+new Date,d._warnedOnce={},d._decomp=null,d.extend=function(l,r){var n,e;typeof r=="boolean"?(n=2,e=r):(n=1,e=!0);for(var s=n;s0;r--){var n=Math.floor(d.random()*(r+1)),e=l[r];l[r]=l[n],l[n]=e}return l},d.choose=function(l){return l[Math.floor(d.random()*l.length)]},d.isElement=function(l){return typeof HTMLElement<"u"?l instanceof HTMLElement:!!(l&&l.nodeType&&l.nodeName)},d.isArray=function(l){return Object.prototype.toString.call(l)==="[object Array]"},d.isFunction=function(l){return typeof l=="function"},d.isPlainObject=function(l){return typeof l=="object"&&l.constructor===Object},d.isString=function(l){return toString.call(l)==="[object String]"},d.clamp=function(l,r,n){return ln?n:l},d.sign=function(l){return l<0?-1:1},d.now=function(){if(typeof window<"u"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-d._nowStartTime},d.random=function(l,r){return l=typeof l<"u"?l:0,r=typeof r<"u"?r:1,l+c()*(r-l)};var c=function(){return d._seed=(d._seed*9301+49297)%233280,d._seed/233280};d.colorToNumber=function(l){return l=l.replace("#",""),l.length==3&&(l=l.charAt(0)+l.charAt(0)+l.charAt(1)+l.charAt(1)+l.charAt(2)+l.charAt(2)),parseInt(l,16)},d.logLevel=1,d.log=function(){console&&d.logLevel>0&&d.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.info=function(){console&&d.logLevel>0&&d.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.warn=function(){console&&d.logLevel>0&&d.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.warnOnce=function(){var l=Array.prototype.slice.call(arguments).join(" ");d._warnedOnce[l]||(d.warn(l),d._warnedOnce[l]=!0)},d.deprecated=function(l,r,n){l[r]=d.chain(function(){d.warnOnce("🔅 deprecated 🔅",n)},l[r])},d.nextId=function(){return d._nextId++},d.indexOf=function(l,r){if(l.indexOf)return l.indexOf(r);for(var n=0;n{var d={};p.exports=d;var c=t(22806),l=t(44272),r=t(13657),n=t(91327),e=t(39073),s=t(11299),u=t(52838),i=t(68758),a=t(84125);(function(){d.create=function(o){o=o||{};var h={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0}},f=i.extend(h,o);return f.world=o.world||s.create({label:"World"}),f.pairs=o.pairs||n.create(),f.detector=o.detector||r.create(),f.grid={buckets:[]},f.world.gravity=f.gravity,f.broadphase=f.grid,f.metrics={},f},d.update=function(o,h){var f=i.now(),v=o.world,m=o.detector,x=o.pairs,g=o.timing,y=g.timestamp,T;h=typeof h<"u"?h:i._baseDelta,h*=g.timeScale,g.timestamp+=h,g.lastDelta=h;var E={timestamp:g.timestamp,delta:h};e.trigger(o,"beforeUpdate",E);var C=s.allBodies(v),A=s.allConstraints(v);for(v.isModified&&(r.setBodies(m,C),s.setModified(v,!1,!1,!0)),o.enableSleeping&&c.update(C,h),d._bodiesApplyGravity(C,o.gravity),h>0&&d._bodiesUpdate(C,h),e.trigger(o,"beforeSolve",E),u.preSolveAll(C),T=0;T0&&e.trigger(o,"collisionStart",{pairs:x.collisionStart,timestamp:g.timestamp,delta:h});var R=i.clamp(20/o.positionIterations,0,1);for(l.preSolvePosition(x.list),T=0;T0&&e.trigger(o,"collisionActive",{pairs:x.collisionActive,timestamp:g.timestamp,delta:h}),x.collisionEnd.length>0&&e.trigger(o,"collisionEnd",{pairs:x.collisionEnd,timestamp:g.timestamp,delta:h}),d._bodiesClearForces(C),e.trigger(o,"afterUpdate",E),o.timing.lastElapsed=i.now()-f,o},d.merge=function(o,h){if(i.extend(o,h),h.world){o.world=h.world,d.clear(o);for(var f=s.allBodies(o.world),v=0;v{var d={};p.exports=d;var c=t(68758);(function(){d.on=function(l,r,n){for(var e=r.split(" "),s,u=0;u0){n||(n={}),e=r.split(" ");for(var o=0;o{var d={};p.exports=d;var c=t(84474),l=t(68758);(function(){d.name="matter-js",d.version="0.19.0",d.uses=[],d.used=[],d.use=function(){c.use(d,Array.prototype.slice.call(arguments))},d.before=function(r,n){return r=r.replace(/^Matter./,""),l.chainPathBefore(d,r,n)},d.after=function(r,n){return r=r.replace(/^Matter./,""),l.chainPathAfter(d,r,n)}})()},84474:(p,S,t)=>{var d={};p.exports=d;var c=t(68758);(function(){d._registry={},d.register=function(l){if(d.isPlugin(l)||c.warn("Plugin.register:",d.toString(l),"does not implement all required fields."),l.name in d._registry){var r=d._registry[l.name],n=d.versionParse(l.version).number,e=d.versionParse(r.version).number;n>e?(c.warn("Plugin.register:",d.toString(r),"was upgraded to",d.toString(l)),d._registry[l.name]=l):n-1},d.isFor=function(l,r){var n=l.for&&d.dependencyParse(l.for);return!l.for||r.name===n.name&&d.versionSatisfies(r.version,n.range)},d.use=function(l,r){if(l.uses=(l.uses||[]).concat(r||[]),l.uses.length===0){c.warn("Plugin.use:",d.toString(l),"does not specify any dependencies to install.");return}for(var n=d.dependencies(l),e=c.topologicalSort(n),s=[],u=0;u0&&!i.silent&&c.info(s.join(" "))},d.dependencies=function(l,r){var n=d.dependencyParse(l),e=n.name;if(r=r||{},!(e in r)){l=d.resolve(l)||l,r[e]=c.map(l.uses||[],function(u){d.isPlugin(u)&&d.register(u);var i=d.dependencyParse(u),a=d.resolve(u);return a&&!d.versionSatisfies(a.version,i.range)?(c.warn("Plugin.dependencies:",d.toString(a),"does not satisfy",d.toString(i),"used by",d.toString(n)+"."),a._warned=!0,l._warned=!0):a||(c.warn("Plugin.dependencies:",d.toString(u),"used by",d.toString(n),"could not be resolved."),l._warned=!0),i.name});for(var s=0;s=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;r.test(l)||c.warn("Plugin.versionParse:",l,"is not a valid version or range.");var n=r.exec(l),e=Number(n[4]),s=Number(n[5]),u=Number(n[6]);return{isRange:!!(n[1]||n[2]),version:n[3],range:l,operator:n[1]||n[2]||"",major:e,minor:s,patch:u,parts:[e,s,u],prerelease:n[7],number:e*1e8+s*1e4+u}},d.versionSatisfies=function(l,r){r=r||"*";var n=d.versionParse(r),e=d.versionParse(l);if(n.isRange){if(n.operator==="*"||l==="*")return!0;if(n.operator===">")return e.number>n.number;if(n.operator===">=")return e.number>=n.number;if(n.operator==="~")return e.major===n.major&&e.minor===n.minor&&e.patch>=n.patch;if(n.operator==="^")return n.major>0?e.major===n.major&&e.number>=n.number:n.minor>0?e.minor===n.minor&&e.patch>=n.patch:e.patch===n.patch}return l===r||l==="*"}})()},22806:(p,S,t)=>{var d={};p.exports=d;var c=t(84125),l=t(39073),r=t(68758);(function(){d._motionWakeThreshold=.18,d._motionSleepThreshold=.08,d._minBias=.9,d.update=function(n,e){for(var s=e/r._baseDelta,u=d._motionSleepThreshold,i=0;i0&&a.motion=a.sleepThreshold/s&&d.set(a,!0)):a.sleepCounter>0&&(a.sleepCounter-=1)}},d.afterCollisions=function(n){for(var e=d._motionSleepThreshold,s=0;se&&d.set(h,!1)}}}},d.set=function(n,e){var s=n.isSleeping;e?(n.isSleeping=!0,n.sleepCounter=n.sleepThreshold,n.positionImpulse.x=0,n.positionImpulse.y=0,n.positionPrev.x=n.position.x,n.positionPrev.y=n.position.y,n.anglePrev=n.angle,n.speed=0,n.angularSpeed=0,n.motion=0,s||l.trigger(n,"sleepStart")):(n.isSleeping=!1,n.sleepCounter=0,s&&l.trigger(n,"sleepEnd"))}})()},68516:(p,S,t)=>{var d={};p.exports=d;var c=t(39745),l=t(68758),r=t(84125),n=t(84091),e=t(10438);(function(){d.rectangle=function(s,u,i,a,o){o=o||{};var h={label:"Rectangle Body",position:{x:s,y:u},vertices:c.fromPath("L 0 0 L "+i+" 0 L "+i+" "+a+" L 0 "+a)};if(o.chamfer){var f=o.chamfer;h.vertices=c.chamfer(h.vertices,f.radius,f.quality,f.qualityMin,f.qualityMax),delete o.chamfer}return r.create(l.extend({},h,o))},d.trapezoid=function(s,u,i,a,o,h){h=h||{},o*=.5;var f=(1-o*2)*i,v=i*o,m=v+f,x=m+v,g;o<.5?g="L 0 0 L "+v+" "+-a+" L "+m+" "+-a+" L "+x+" 0":g="L 0 0 L "+m+" "+-a+" L "+x+" 0";var y={label:"Trapezoid Body",position:{x:s,y:u},vertices:c.fromPath(g)};if(h.chamfer){var T=h.chamfer;y.vertices=c.chamfer(y.vertices,T.radius,T.quality,T.qualityMin,T.qualityMax),delete h.chamfer}return r.create(l.extend({},y,h))},d.circle=function(s,u,i,a,o){a=a||{};var h={label:"Circle Body",circleRadius:i};o=o||25;var f=Math.ceil(Math.max(10,Math.min(o,i)));return f%2===1&&(f+=1),d.polygon(s,u,f,i,l.extend({},h,a))},d.polygon=function(s,u,i,a,o){if(o=o||{},i<3)return d.circle(s,u,a,o);for(var h=2*Math.PI/i,f="",v=h*.5,m=0;m0&&c.area(z)1?(g=r.create(l.extend({parts:y.slice(0)},a)),r.setPosition(g,{x:s,y:u}),g):y[0]},d.flagCoincidentParts=function(s,u){u===void 0&&(u=5);for(var i=0;i{var d={};p.exports=d;var c=t(11299),l=t(52838),r=t(68758),n=t(84125),e=t(68516);(function(){d.stack=function(s,u,i,a,o,h,f){for(var v=c.create({label:"Stack"}),m=s,x=u,g,y=0,T=0;TE&&(E=P),n.translate(A,{x:R*.5,y:P*.5}),m=A.bounds.max.x+o,c.addBody(v,A),g=A,y+=1}else m+=o}x+=E+h,m=s}return v},d.chain=function(s,u,i,a,o,h){for(var f=s.bodies,v=1;v0)for(v=0;v0&&(g=h[v-1+(f-1)*u],c.addConstraint(s,l.create(r.extend({bodyA:g,bodyB:x},o)))),a&&vE)){g=E-g;var A=g,P=i-1-g;if(!(xP)){T===1&&n.translate(y,{x:(x+(i%2===1?1:-1))*C,y:0});var R=y?x*C:0;return f(s+R+x*o,m,x,g,y,T)}}})},d.newtonsCradle=function(s,u,i,a,o){for(var h=c.create({label:"Newtons Cradle"}),f=0;f{var d={};p.exports=d;var c=t(10438),l=t(68758);(function(){d.fromVertices=function(r){for(var n={},e=0;e{var S={};p.exports=S,function(){S.create=function(t){var d={min:{x:0,y:0},max:{x:0,y:0}};return t&&S.update(d,t),d},S.update=function(t,d,c){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var l=0;lt.max.x&&(t.max.x=r.x),r.xt.max.y&&(t.max.y=r.y),r.y0?t.max.x+=c.x:t.min.x+=c.x,c.y>0?t.max.y+=c.y:t.min.y+=c.y)},S.contains=function(t,d){return d.x>=t.min.x&&d.x<=t.max.x&&d.y>=t.min.y&&d.y<=t.max.y},S.overlaps=function(t,d){return t.min.x<=d.max.x&&t.max.x>=d.min.x&&t.max.y>=d.min.y&&t.min.y<=d.max.y},S.translate=function(t,d){t.min.x+=d.x,t.max.x+=d.x,t.min.y+=d.y,t.max.y+=d.y},S.shift=function(t,d){var c=t.max.x-t.min.x,l=t.max.y-t.min.y;t.min.x=d.x,t.max.x=d.x+c,t.min.y=d.y,t.max.y=d.y+l}}()},92765:(p,S,t)=>{var d={};p.exports=d,t(84091);var c=t(68758);(function(){d.pathToVertices=function(l,r){typeof window<"u"&&!("SVGPathSeg"in window)&&c.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var n,e,s,u,i,a,o,h,f,v,m=[],x,g,y=0,T=0,E=0;r=r||15;var C=function(P,R,F){var L=F%2===1&&F>1;if(!f||P!=f.x||R!=f.y){f&&L?(x=f.x,g=f.y):(x=0,g=0);var B={x:x+P,y:g+R};(L||!f)&&(f=B),m.push(B),T=x+P,E=g+R}},A=function(P){var R=P.pathSegTypeAsLetter.toUpperCase();if(R!=="Z"){switch(R){case"M":case"L":case"T":case"C":case"S":case"Q":T=P.x,E=P.y;break;case"H":T=P.x;break;case"V":E=P.y;break}C(T,E,P.pathSegType)}};for(d._svgPathToAbsolute(l),s=l.getTotalLength(),a=[],n=0;n{var S={};p.exports=S,function(){S.create=function(t,d){return{x:t||0,y:d||0}},S.clone=function(t){return{x:t.x,y:t.y}},S.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},S.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},S.rotate=function(t,d,c){var l=Math.cos(d),r=Math.sin(d);c||(c={});var n=t.x*l-t.y*r;return c.y=t.x*r+t.y*l,c.x=n,c},S.rotateAbout=function(t,d,c,l){var r=Math.cos(d),n=Math.sin(d);l||(l={});var e=c.x+((t.x-c.x)*r-(t.y-c.y)*n);return l.y=c.y+((t.x-c.x)*n+(t.y-c.y)*r),l.x=e,l},S.normalise=function(t){var d=S.magnitude(t);return d===0?{x:0,y:0}:{x:t.x/d,y:t.y/d}},S.dot=function(t,d){return t.x*d.x+t.y*d.y},S.cross=function(t,d){return t.x*d.y-t.y*d.x},S.cross3=function(t,d,c){return(d.x-t.x)*(c.y-t.y)-(d.y-t.y)*(c.x-t.x)},S.add=function(t,d,c){return c||(c={}),c.x=t.x+d.x,c.y=t.y+d.y,c},S.sub=function(t,d,c){return c||(c={}),c.x=t.x-d.x,c.y=t.y-d.y,c},S.mult=function(t,d){return{x:t.x*d,y:t.y*d}},S.div=function(t,d){return{x:t.x/d,y:t.y/d}},S.perp=function(t,d){return d=d===!0?-1:1,{x:d*-t.y,y:d*t.x}},S.neg=function(t){return{x:-t.x,y:-t.y}},S.angle=function(t,d){return Math.atan2(d.y-t.y,d.x-t.x)},S._temp=[S.create(),S.create(),S.create(),S.create(),S.create(),S.create()]}()},39745:(p,S,t)=>{var d={};p.exports=d;var c=t(10438),l=t(68758);(function(){d.create=function(r,n){for(var e=[],s=0;s0)return!1;i=a}return!0},d.scale=function(r,n,e,s){if(n===1&&e===1)return r;s=s||d.centre(r);for(var u,i,a=0;a=0?a-1:r.length-1],h=r[a],f=r[(a+1)%r.length],v=n[a0&&(n|=2),n===3)return!1;return n!==0?!0:null},d.hull=function(r){var n=[],e=[],s,u;for(r=r.slice(0),r.sort(function(i,a){var o=i.x-a.x;return o!==0?o:i.y-a.y}),u=0;u=2&&c.cross3(e[e.length-2],e[e.length-1],s)<=0;)e.pop();e.push(s)}for(u=r.length-1;u>=0;u-=1){for(s=r[u];n.length>=2&&c.cross3(n[n.length-2],n[n.length-1],s)<=0;)n.pop();n.push(s)}return n.pop(),e.pop(),n.concat(e)}})()},1675:(p,S,t)=>{var d=t(18171),c={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.19.0",silent:!0,install:function(l){l.after("Body.create",function(){c.Body.init(this)}),l.before("Engine.update",function(r){c.Engine.update(r)})},Body:{init:function(l){l.plugin.attractors=l.plugin.attractors||[]}},Engine:{update:function(l){for(var r=d.Composite.allBodies(l.world),n=0;n0)for(var u=0;u{/** + * @author @dxu https://github.com/dxu/matter-collision-events + * @author Richard Davey + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.19.0",silent:!0,install:function(t){t.after("Engine.create",function(){t.Events.on(this,"collisionStart",function(d){d.pairs.map(function(c){var l=c.bodyA,r=c.bodyB;l.gameObject&&l.gameObject.emit("collide",l,r,c),r.gameObject&&r.gameObject.emit("collide",r,l,c),t.Events.trigger(l,"onCollide",{pair:c}),t.Events.trigger(r,"onCollide",{pair:c}),l.onCollideCallback&&l.onCollideCallback(c),r.onCollideCallback&&r.onCollideCallback(c),l.onCollideWith[r.id]&&l.onCollideWith[r.id](r,c),r.onCollideWith[l.id]&&r.onCollideWith[l.id](l,c)})}),t.Events.on(this,"collisionActive",function(d){d.pairs.map(function(c){var l=c.bodyA,r=c.bodyB;l.gameObject&&l.gameObject.emit("collideActive",l,r,c),r.gameObject&&r.gameObject.emit("collideActive",r,l,c),t.Events.trigger(l,"onCollideActive",{pair:c}),t.Events.trigger(r,"onCollideActive",{pair:c}),l.onCollideActiveCallback&&l.onCollideActiveCallback(c),r.onCollideActiveCallback&&r.onCollideActiveCallback(c)})}),t.Events.on(this,"collisionEnd",function(d){d.pairs.map(function(c){var l=c.bodyA,r=c.bodyB;l.gameObject&&l.gameObject.emit("collideEnd",l,r,c),r.gameObject&&r.gameObject.emit("collideEnd",r,l,c),t.Events.trigger(l,"onCollideEnd",{pair:c}),t.Events.trigger(r,"onCollideEnd",{pair:c}),l.onCollideEndCallback&&l.onCollideEndCallback(c),r.onCollideEndCallback&&r.onCollideEndCallback(c)})})})}};p.exports=S},44097:(p,S,t)=>{var d=t(18171),c={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.19.0",silent:!0,install:function(l){l.after("Engine.update",function(){c.Engine.update(this)})},Engine:{update:function(l){for(var r=l.world,n=d.Composite.allBodies(r),e=d.Composite.allComposites(r),s=0;sr.max.x?n=r.min.x-l.max.x:l.max.xr.max.y?e=r.min.y-l.max.y:l.max.y{/** + * @author Stefan Hedman (http://steffe.se) + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={decomp:A,quickDecomp:L,isSimple:R,removeCollinearPoints:B,removeDuplicatePoints:N,makeCCW:f};function S(w,I,M){M=M||0;var O=[0,0],D,G,X,V,Y,W,H;return D=w[1][1]-w[0][1],G=w[0][0]-w[1][0],X=D*w[0][0]+G*w[0][1],V=I[1][1]-I[0][1],Y=I[0][0]-I[1][0],W=V*I[0][0]+Y*I[0][1],H=D*Y-V*G,U(H,0,M)||(O[0]=(Y*X-G*W)/H,O[1]=(D*W-V*X)/H),O}function t(w,I,M,O){var D=I[0]-w[0],G=I[1]-w[1],X=O[0]-M[0],V=O[1]-M[1];if(X*G-V*D===0)return!1;var Y=(D*(M[1]-w[1])+G*(w[0]-M[0]))/(X*G-V*D),W=(X*(w[1]-M[1])+V*(M[0]-w[0]))/(V*D-X*G);return Y>=0&&Y<=1&&W>=0&&W<=1}function d(w,I,M){return(I[0]-w[0])*(M[1]-w[1])-(M[0]-w[0])*(I[1]-w[1])}function c(w,I,M){return d(w,I,M)>0}function l(w,I,M){return d(w,I,M)>=0}function r(w,I,M){return d(w,I,M)<0}function n(w,I,M){return d(w,I,M)<=0}var e=[],s=[];function u(w,I,M,O){if(O){var D=e,G=s;D[0]=I[0]-w[0],D[1]=I[1]-w[1],G[0]=M[0]-I[0],G[1]=M[1]-I[1];var X=D[0]*G[0]+D[1]*G[1],V=Math.sqrt(D[0]*D[0]+D[1]*D[1]),Y=Math.sqrt(G[0]*G[0]+G[1]*G[1]),W=Math.acos(X/(V*Y));return WM[I][0])&&(I=O);return c(a(w,I-1),a(w,I),a(w,I+1))?!1:(v(w),!0)}function v(w){for(var I=[],M=w.length,O=0;O!==M;O++)I.push(w.pop());for(var O=0;O!==M;O++)w[O]=I[O]}function m(w,I){return r(a(w,I-1),a(w,I),a(w,I+1))}var x=[],g=[];function y(w,I,M){var O,D,G=x,X=g;if(l(a(w,I+1),a(w,I),a(w,M))&&n(a(w,I-1),a(w,I),a(w,M)))return!1;D=i(a(w,I),a(w,M));for(var V=0;V!==w.length;++V)if(!((V+1)%w.length===I||V===I)&&l(a(w,I),a(w,M),a(w,V+1))&&n(a(w,I),a(w,M),a(w,V))&&(G[0]=a(w,I),G[1]=a(w,M),X[0]=a(w,V),X[1]=a(w,V+1),O=S(G,X),i(a(w,I),O)0?P(w,I):[w]}function P(w,I){if(I.length===0)return[w];if(I instanceof Array&&I.length&&I[0]instanceof Array&&I[0].length===2&&I[0][0]instanceof Array){for(var M=[w],O=0;OG)return console.warn("quickDecomp: max level ("+G+") reached."),I;for(var k=0;kZ&&(Z+=w.length),J=Number.MAX_VALUE,Z<$)return I;for(var nt=$;nt<=Z;++nt)l(a(Q,k-1),a(Q,k),a(Q,nt))&&n(a(Q,k+1),a(Q,k),a(Q,nt))&&(K=i(a(Q,k),a(Q,nt)),K3&&O>=0;--O)u(a(w,O-1),a(w,O),a(w,O+1),I)&&(w.splice(O%w.length,1),M++);return M}function N(w,I){for(var M=w.length-1;M>=1;--M)for(var O=w[M],D=M-1;D>=0;--D)if(z(O,w[D],I)){w.splice(M,1);continue}}function U(w,I,M){return M=M||0,Math.abs(w-I)<=M}function z(w,I,M){return U(w[0],I[0],M)&&U(w[1],I[1],M)}},88257:(p,S,t)=>{/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/var d=t(56694),c=new d({initialize:function(r){this.pluginManager=r,this.game=r.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});p.exports=c},18360:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};p.exports=S},91963:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={},t={},d={};d.register=function(c,l,r,n){n===void 0&&(n=!1),S[c]={plugin:l,mapping:r,custom:n}},d.registerCustom=function(c,l,r,n){t[c]={plugin:l,mapping:r,data:n}},d.hasCore=function(c){return S.hasOwnProperty(c)},d.hasCustom=function(c){return t.hasOwnProperty(c)},d.getCore=function(c){return S[c]},d.getCustom=function(c){return t[c]},d.getCustomClass=function(c){return t.hasOwnProperty(c)?t[c].plugin:null},d.remove=function(c){S.hasOwnProperty(c)&&delete S[c]},d.removeCustom=function(c){t.hasOwnProperty(c)&&delete t[c]},d.destroyCorePlugins=function(){for(var c in S)S.hasOwnProperty(c)&&delete S[c]},d.destroyCustomPlugins=function(){for(var c in t)t.hasOwnProperty(c)&&delete t[c]},p.exports=d},49274:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(97081),l=t(6659),r=t(76846),n=t(99325),e=t(61286),s=t(72632),u=t(91963),i=t(66458),a=new d({Extends:l,initialize:function(h){l.call(this),this.game=h,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],h.isBooted?this.boot():h.events.once(c.BOOT,this.boot,this)},boot:function(){var o,h,f,v,m,x,g,y=this.game.config,T=y.installGlobalPlugins;for(T=T.concat(this._pendingGlobal),o=0;o{/** +* @author Richard Davey +* @copyright 2013-2023 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/var d=t(88257),c=t(56694),l=t(7599),r=new c({Extends:d,initialize:function(e,s,u){d.call(this,s),this.scene=e,this.systems=e.sys,this.pluginKey=u,e.sys.events.once(l.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});p.exports=r},45615:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BasePlugin:t(88257),DefaultPlugins:t(18360),PluginCache:t(91963),PluginManager:t(49274),ScenePlugin:t(39283)}},75205:()=>{HTMLVideoElement&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(p){const S=performance.now(),t=this.getVideoPlaybackQuality(),d=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,c=(l,r)=>{const n=this.getVideoPlaybackQuality(),e=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames;if(e>d){const s=this.mozFrameDelay||n.totalFrameDelay-t.totalFrameDelay||0,u=r-l;p(r,{presentationTime:r+s*1e3,expectedDisplayTime:r+u,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+u/1e3,presentedFrames:e,processingDuration:s}),delete this._rvfcpolyfillmap[S]}else this._rvfcpolyfillmap[S]=requestAnimationFrame(s=>c(r,s))};return this._rvfcpolyfillmap[S]=requestAnimationFrame(l=>c(S,l)),S},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(p){cancelAnimationFrame(this._rvfcpolyfillmap[p]),delete this._rvfcpolyfillmap[p]})},95723:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},27394:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={DEFAULT:0,LINEAR:0,NEAREST:1};p.exports=S},91135:(p,S,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(89787),c=t(61840),l=t(56694),r=t(86459),n=t(6659),e=t(81044),s=t(32834),u=t(40444),i=t(38203),a=t(69360),o=new l({Extends:n,initialize:function(f){n.call(this);var v=f.config;this.config={clearBeforeRender:v.clearBeforeRender,backgroundColor:v.backgroundColor,antialias:v.antialias,roundPixels:v.roundPixels},this.game=f,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=f.canvas;var m={alpha:f.config.transparent,desynchronized:f.config.desynchronized,willReadFrequently:!1};this.gameContext=v.context?v.context:this.gameCanvas.getContext("2d",m),this.currentContext=this.gameContext,this.antialias=f.config.antialias,this.blendModes=s(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(i.READY,this.boot,this)},boot:function(){var h=this.game,f=h.scale.baseSize;this.width=f.width,this.height=f.height,this.isBooted=!0,h.scale.on(u.RESIZE,this.onResize,this),this.resize(f.width,f.height)},onResize:function(h,f){(f.width!==this.width||f.height!==this.height)&&this.resize(f.width,f.height)},resize:function(h,f){this.width=h,this.height=f,this.emit(e.RESIZE,h,f)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(h){return this.currentContext.globalCompositeOperation=h,this},setContext:function(h){return this.currentContext=h||this.gameContext,this},setAlpha:function(h){return this.currentContext.globalAlpha=h,this},preRender:function(){var h=this.gameContext,f=this.config,v=this.width,m=this.height;h.globalAlpha=1,h.globalCompositeOperation="source-over",h.setTransform(1,0,0,1,0,0),f.clearBeforeRender&&(h.clearRect(0,0,v,m),f.transparent||(h.fillStyle=f.backgroundColor.rgba,h.fillRect(0,0,v,m))),h.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(h,f,v){var m=f.length;this.emit(e.RENDER,h,v);var x=v.x,g=v.y,y=v.width,T=v.height,E=v.renderToTexture?v.context:h.sys.context;E.save(),this.game.scene.customViewports&&(E.beginPath(),E.rect(x,g,y,T),E.clip()),v.emit(d.PRE_RENDER,v),this.currentContext=E;var C=v.mask;C&&C.preRenderCanvas(this,null,v._maskCamera),v.transparent||(E.fillStyle=v.backgroundColor.rgba,E.fillRect(x,g,y,T)),E.globalAlpha=v.alpha,E.globalCompositeOperation="source-over",this.drawCount+=m,v.renderToTexture&&v.emit(d.PRE_RENDER,v),v.matrix.copyToContext(E);for(var A=0;A=0?U=-(U+P):U<0&&(U=Math.abs(U)-P)),h.flipY&&(z>=0?z=-(z+R):z<0&&(z=Math.abs(z)-R))}var I=1,M=1;h.flipX&&(F||(U+=-f.realWidth+B*2),I=-1),h.flipY&&(F||(z+=-f.realHeight+N*2),M=-1);var O=h.x,D=h.y;T.applyITRS(O,D,h.rotation,h.scaleX*I,h.scaleY*M),y.copyFrom(v.matrix),m?(y.multiplyWithOffset(m,-v.scrollX*h.scrollFactorX,-v.scrollY*h.scrollFactorY),T.e=O,T.f=D):(T.e-=v.scrollX*h.scrollFactorX,T.f-=v.scrollY*h.scrollFactorY),y.multiply(T),v.roundPixels&&(y.e=Math.round(y.e),y.f=Math.round(y.f)),g.save(),y.setToContext(g),g.globalCompositeOperation=this.blendModes[h.blendMode],g.globalAlpha=x,g.imageSmoothingEnabled=!f.source.scaleMode,h.mask&&h.mask.preRenderCanvas(this,h,v),P>0&&R>0&&(v.roundPixels?g.drawImage(f.source.image,C,A,P,R,Math.round(U),Math.round(z),Math.round(P/L),Math.round(R/L)):g.drawImage(f.source.image,C,A,P,R,U,z,P/L,R/L)),h.mask&&h.mask.postRenderCanvas(this,h,v),g.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});p.exports=o},6046:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CanvasRenderer:t(91135),GetBlendModes:t(32834),SetTransform:t(49584)}},32834:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95723),c=t(98581),l=function(){var r=[],n=c.supportNewBlendModes,e="source-over";return r[d.NORMAL]=e,r[d.ADD]="lighter",r[d.MULTIPLY]=n?"multiply":e,r[d.SCREEN]=n?"screen":e,r[d.OVERLAY]=n?"overlay":e,r[d.DARKEN]=n?"darken":e,r[d.LIGHTEN]=n?"lighten":e,r[d.COLOR_DODGE]=n?"color-dodge":e,r[d.COLOR_BURN]=n?"color-burn":e,r[d.HARD_LIGHT]=n?"hard-light":e,r[d.SOFT_LIGHT]=n?"soft-light":e,r[d.DIFFERENCE]=n?"difference":e,r[d.EXCLUSION]=n?"exclusion":e,r[d.HUE]=n?"hue":e,r[d.SATURATION]=n?"saturation":e,r[d.COLOR]=n?"color":e,r[d.LUMINOSITY]=n?"luminosity":e,r[d.ERASE]="destination-out",r[d.SOURCE_IN]="source-in",r[d.SOURCE_OUT]="source-out",r[d.SOURCE_ATOP]="source-atop",r[d.DESTINATION_OVER]="destination-over",r[d.DESTINATION_IN]="destination-in",r[d.DESTINATION_OUT]="destination-out",r[d.DESTINATION_ATOP]="destination-atop",r[d.LIGHTER]="lighter",r[d.COPY]="copy",r[d.XOR]="xor",r};p.exports=l},49584:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(73329),c=function(l,r,n,e,s){var u=e.alpha*n.alpha;if(u<=0)return!1;var i=d(n,e,s).calc;return r.globalCompositeOperation=l.blendModes[n.blendMode],r.globalAlpha=u,r.save(),i.setToContext(r),r.imageSmoothingEnabled=n.frame?!n.frame.source.scaleMode:l.antialias,!0};p.exports=c},70936:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postrender"},99298:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prerender"},7743:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="render"},99519:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resize"},81044:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={POST_RENDER:t(70936),PRE_RENDER:t(99298),RENDER:t(7743),RESIZE:t(99519)}},42069:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Canvas:t(6046),Events:t(81044),Snapshot:t(95528),WebGL:t(55478)}},61840:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61068),c=t(27119),l=t(72632),r=function(n,e){var s=l(e,"callback"),u=l(e,"type","image/png"),i=l(e,"encoder",.92),a=Math.abs(Math.round(l(e,"x",0))),o=Math.abs(Math.round(l(e,"y",0))),h=Math.floor(l(e,"width",n.width)),f=Math.floor(l(e,"height",n.height)),v=l(e,"getPixel",!1);if(v){var m=n.getContext("2d",{willReadFrequently:!1}),x=m.getImageData(a,o,1,1),g=x.data;s.call(null,new c(g[0],g[1],g[2],g[3]))}else if(a!==0||o!==0||h!==n.width||f!==n.height){var y=d.createWebGL(this,h,f),T=y.getContext("2d",{willReadFrequently:!0});h>0&&f>0&&T.drawImage(n,a,o,h,f,0,0,h,f);var E=new Image;E.onerror=function(){s.call(null),d.remove(y)},E.onload=function(){s.call(null,E),d.remove(y)},E.src=y.toDataURL(u,i)}else{var C=new Image;C.onerror=function(){s.call(null)},C.onload=function(){s.call(null,C)},C.src=n.toDataURL(u,i)}};p.exports=r},1217:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61068),c=t(27119),l=t(72632),r=function(n,e){var s=n,u=l(e,"callback"),i=l(e,"type","image/png"),a=l(e,"encoder",.92),o=Math.abs(Math.round(l(e,"x",0))),h=Math.abs(Math.round(l(e,"y",0))),f=l(e,"getPixel",!1),v=l(e,"isFramebuffer",!1),m=v?l(e,"bufferWidth",1):s.drawingBufferWidth,x=v?l(e,"bufferHeight",1):s.drawingBufferHeight;if(f){var g=new Uint8Array(4),y=v?h:x-h;s.readPixels(o,y,1,1,s.RGBA,s.UNSIGNED_BYTE,g),u.call(null,new c(g[0],g[1],g[2],g[3]))}else{var T=Math.floor(l(e,"width",m)),E=Math.floor(l(e,"height",x)),C=T*E*4,A=new Uint8Array(C);s.readPixels(o,x-h-E,T,E,s.RGBA,s.UNSIGNED_BYTE,A);for(var P=d.createWebGL(this,T,E),R=P.getContext("2d",{willReadFrequently:!0}),F=R.getImageData(0,0,T,E),L=F.data,B=0;B{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Canvas:t(61840),WebGL:t(1217)}},35217:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(65641),l=t(33885),r=t(77290),n=t(72632),e=t(37410),s=t(82127),u=t(5583),i=t(58136),a=t(47406),o=t(81828),h=t(66901),f=t(71264),v=t(77310),m=t(10919),x=t(21213),g=t(51212),y=t(60848),T=new d({initialize:function(C){this.game=C.game,this.renderer=C,this.classes=new l([[c.UTILITY_PIPELINE,y],[c.MULTI_PIPELINE,v],[c.BITMAPMASK_PIPELINE,u],[c.SINGLE_PIPELINE,g],[c.ROPE_PIPELINE,x],[c.LIGHT_PIPELINE,h],[c.POINTLIGHT_PIPELINE,m],[c.MOBILE_PIPELINE,f]]),this.postPipelineClasses=new l,this.pipelines=new l,this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(E,C,A){var P=this.renderer,R=this.renderTargets;this.frameInc=Math.floor(n(E,"frameInc",32));var F=P.width,L=P.height,B=this.game.config.disablePreFX,N=this.game.config.disablePostFX;if(N||this.postPipelineClasses.setAll([[String(a.BARREL),i.Barrel],[String(a.BLOOM),i.Bloom],[String(a.BLUR),i.Blur],[String(a.BOKEH),i.Bokeh],[String(a.CIRCLE),i.Circle],[String(a.COLOR_MATRIX),i.ColorMatrix],[String(a.DISPLACEMENT),i.Displacement],[String(a.GLOW),i.Glow],[String(a.GRADIENT),i.Gradient],[String(a.PIXELATE),i.Pixelate],[String(a.SHADOW),i.Shadow],[String(a.SHINE),i.Shine],[String(a.VIGNETTE),i.Vignette],[String(a.WIPE),i.Wipe]]),!B){this.classes.set(c.FX_PIPELINE,o);for(var U=Math.min(F,L),z=Math.ceil(U/this.frameInc),w=1;w=0;A--){var P=C[A];P.active&&P.preBatch(E)}}},postBatch:function(E){if(E.hasPostPipeline){this.flush();for(var C=E.postPipelines,A=0;A=0;A--){var P=C[A];P.active&&P.preBatch(E)}}},postBatchCamera:function(E){if(E.hasPostPipeline){this.flush();for(var C=E.postPipelines,A=0;Athis.maxDimension)return this.targetIndex=C.length-A,C[this.targetIndex];var P=(s(E,this.frameInc,0,!0)-1)*A;return this.targetIndex=P,C[P]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});p.exports=T},37410:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(81044),l=new d({initialize:function(n,e,s,u,i,a,o,h,f){u===void 0&&(u=1),i===void 0&&(i=0),a===void 0&&(a=!0),o===void 0&&(o=!1),h===void 0&&(h=!0),f===void 0&&(f=!0),this.renderer=n,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=u,this.minFilter=i,this.autoClear=a,this.autoResize=!0,this.hasDepthBuffer=h,this.forceClamp=f,this.resize(e,s),o?this.setAutoResize(!0):this.autoResize=!1},setAutoResize:function(r){return r&&!this.autoResize?(this.renderer.on(c.RESIZE,this.resize,this),this.autoResize=!0):!r&&this.autoResize&&(this.renderer.off(c.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(r,n){if(r=Math.round(r*this.scale),n=Math.round(n*this.scale),r<=0&&(r=1),n<=0&&(n=1),this.autoResize&&(r!==this.width||n!==this.height)){var e=this.renderer;e.deleteFramebuffer(this.framebuffer),e.deleteTexture(this.texture),this.texture=e.createTextureFromSource(null,r,n,this.minFilter,this.forceClamp),this.framebuffer=e.createFramebuffer(r,n,this.texture,this.hasDepthBuffer),this.width=r,this.height=n}return this},willResize:function(r,n){return r=Math.round(r*this.scale),n=Math.round(n*this.scale),r<=0&&(r=1),n<=0&&(n=1),r!==this.width||n!==this.height},bind:function(r,n,e){r===void 0&&(r=!1);var s=this.renderer;if(r&&s.flush(),n&&e&&this.resize(n,e),s.pushFramebuffer(this.framebuffer,!1,!1),r&&this.adjustViewport(),this.autoClear){var u=this.renderer.gl;u.clearColor(0,0,0,0),u.clear(u.COLOR_BUFFER_BIT)}s.clearStencilMask()},adjustViewport:function(){var r=this.renderer.gl;r.viewport(0,0,this.width,this.height),r.disable(r.SCISSOR_TEST)},clear:function(){var r=this.renderer,n=r.gl;r.pushFramebuffer(this.framebuffer),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),r.popFramebuffer(),r.resetScissor()},unbind:function(r){r===void 0&&(r=!1);var n=this.renderer;return r&&n.flush(),n.popFramebuffer()},destroy:function(){var r=this.renderer;r.off(c.RESIZE,this.resize,this),r.deleteFramebuffer(this.framebuffer),r.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});p.exports=l},75512:p=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @author Matthew Groves <@doormat> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={getTintFromFloats:function(S,t,d,c){var l=(S*255|0)&255,r=(t*255|0)&255,n=(d*255|0)&255,e=(c*255|0)&255;return(e<<24|l<<16|r<<8|n)>>>0},getTintAppendFloatAlpha:function(S,t){var d=(t*255|0)&255;return(d<<24|S)>>>0},getTintAppendFloatAlphaAndSwap:function(S,t){var d=(S>>16|0)&255,c=(S>>8|0)&255,l=(S|0)&255,r=(t*255|0)&255;return(r<<24|l<<16|c<<8|d)>>>0},getFloatsFromUintRGB:function(S){var t=(S>>16|0)&255,d=(S>>8|0)&255,c=(S|0)&255;return[t/255,d/255,c/255]},checkShaderMax:function(S,t){var d=Math.min(16,S.getParameter(S.MAX_TEXTURE_IMAGE_UNITS));return!t||t===-1?d:Math.min(d,t)},parseFragmentShaderMaxTextures:function(S,t){if(!S)return"";for(var d="",c=0;c0&&(d+=` + else `),c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(28699),l=t(6659),r=t(18970),n=t(72632),e=t(16650),s=t(81044),u=t(37410),i=t(75512),a=t(71305),o=new d({Extends:l,initialize:function(f){l.call(this);var v=f.game,m=v.renderer,x=m.gl;this.name=n(f,"name","WebGLPipeline"),this.game=v,this.renderer=m,this.manager,this.gl=x,this.view=v.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=n(f,"topology",x.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=n(f,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=f,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[]},boot:function(){var h,f=this.gl,v=this.config,m=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var x=this.renderTargets,g=n(v,"renderTarget",!1);typeof g=="boolean"&&g&&(g=1);var y=m.width,T=m.height;if(typeof g=="number")for(h=0;hL&&(L=F[h].vertexSize);var B=n(v,"batchSize",m.config.batchSize);this.vertexCapacity=B*6;var N=new ArrayBuffer(this.vertexCapacity*L);this.vertexData=N,this.bytes=new Uint8Array(N),this.vertexViewF32=new Float32Array(N),this.vertexViewU32=new Uint32Array(N);var U=n(v,"vertices",null);for(U?(this.vertexViewF32.set(U),this.vertexBuffer=m.createVertexBuffer(N,f.STATIC_DRAW)):this.vertexBuffer=m.createVertexBuffer(N.byteLength,f.DYNAMIC_DRAW),this.setVertexBuffer(),h=F.length-1;h>=0;h--)F[h].rebind();this.hasBooted=!0,m.on(s.RESIZE,this.resize,this),m.on(s.PRE_RENDER,this.onPreRender,this),m.on(s.RENDER,this.onRender,this),m.on(s.POST_RENDER,this.onPostRender,this),this.emit(r.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(h,f,v){var m=this.renderer;if(h!==this.currentShader||m.currentProgram!==this.currentShader.program){this.flush();var x=this.setVertexBuffer(v);x&&!f&&(f=!0),h.bind(f,!1),this.currentShader=h}return this},getShaderByName:function(h){for(var f=this.shaders,v=0;v-1&&(L=w.substring(20))}B&&N&&R.push(new a(this,L,B,N,c(U)))}this.shaders=R}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(h){return this.currentBatch={start:this.vertexCount,count:0,texture:[h],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=h,this.batch.push(this.currentBatch),0},addTextureToBatch:function(h){var f=this.currentBatch;f&&(f.texture.push(h),f.unit++,f.maxUnit++)},pushBatch:function(h){if(!this.currentBatch||this.forceZero&&h!==this.currentTexture)return this.createBatch(h);if(h===this.currentTexture)return this.currentUnit;var f=this.currentBatch,v=f.texture.indexOf(h);return v===-1?f.texture.length===this.renderer.maxTextures?this.createBatch(h):(f.unit++,f.maxUnit++,f.texture.push(h),this.currentUnit=f.unit,this.currentTexture=h,f.unit):(this.currentUnit=v,this.currentTexture=h,v)},setGameObject:function(h,f){return f===void 0&&(f=h.frame),this.pushBatch(f.source.glTexture)},shouldFlush:function(h){return h===void 0&&(h=0),this.vertexCount+h>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(h,f){(h!==this.width||f!==this.height)&&this.flush(),this.width=h,this.height=f;for(var v=this.renderTargets,m=0;m=0;v--){var m=f[v].rebind();(!h||m===h)&&(this.currentShader=m)}return this.activeTextures.length=0,this.emit(r.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(h){if(h===void 0&&(h=this.vertexBuffer),h!==this.activeBuffer){var f=this.gl;return this.gl.bindBuffer(f.ARRAY_BUFFER,h),this.activeBuffer=h,!0}return!1},preBatch:function(h){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(h),this},postBatch:function(h){return this.onDraw(this.currentRenderTarget),this.onPostBatch(h),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(h){if(h===void 0&&(h=!1),this.vertexCount>0){this.emit(r.BEFORE_FLUSH,this,h),this.onBeforeFlush(h);var f=this.gl,v=this.vertexCount,m=this.currentShader.vertexSize,x=this.topology;if(this.active){this.setVertexBuffer(),v===this.vertexCapacity?f.bufferData(f.ARRAY_BUFFER,this.vertexData,f.DYNAMIC_DRAW):f.bufferSubData(f.ARRAY_BUFFER,0,this.bytes.subarray(0,v*m));var g,y,T,E=this.batch,C=this.activeTextures;if(this.forceZero)for(C[0]||f.activeTexture(f.TEXTURE0),g=0;g{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66458),c=t(89787),l=t(56694),r=t(86459),n=t(6659),e=t(81044),s=t(28621),u=t(16650),i=t(72283),a=t(35217),o=t(37410),h=t(40444),f=t(38203),v=t(75512),m=t(1217),x=new l({Extends:n,initialize:function(y){n.call(this);var T=y.config,E={alpha:T.transparent,desynchronized:T.desynchronized,depth:!0,antialias:T.antialiasGL,premultipliedAlpha:T.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:T.failIfMajorPerformanceCaveat,powerPreference:T.powerPreference,preserveDrawingBuffer:T.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:T.clearBeforeRender,antialias:T.antialias,backgroundColor:T.backgroundColor,contextCreation:E,roundPixels:T.roundPixels,maxTextures:T.maxTextures,maxTextureSize:T.maxTextureSize,batchSize:T.batchSize,maxLights:T.maxLights,mipmapFilter:T.mipmapFilter},this.game=y,this.type=r.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=y.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=i,this.contextRestoredHandler=i,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(g){var y,T=this.game,E=this.canvas,C=g.backgroundColor;if(T.config.context?y=T.config.context:y=E.getContext("webgl",g.contextCreation)||E.getContext("experimental-webgl",g.contextCreation),!y||y.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=y;var A=this;this.contextLostHandler=function(z){A.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),z.preventDefault()},E.addEventListener("webglcontextlost",this.contextLostHandler,!1),T.context=y;for(var P=0;P<=27;P++)this.blendModes.push({func:[y.ONE,y.ONE_MINUS_SRC_ALPHA],equation:y.FUNC_ADD});this.blendModes[1].func=[y.ONE,y.DST_ALPHA],this.blendModes[2].func=[y.DST_COLOR,y.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[y.ONE,y.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[y.ZERO,y.ONE_MINUS_SRC_ALPHA],equation:y.FUNC_REVERSE_SUBTRACT},this.glFormats=[y.BYTE,y.SHORT,y.UNSIGNED_BYTE,y.UNSIGNED_SHORT,y.FLOAT],this.glFuncMap={mat2:{func:y.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:y.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:y.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:y.uniform1f,length:1},"1fv":{func:y.uniform1fv,length:1},"1i":{func:y.uniform1i,length:1},"1iv":{func:y.uniform1iv,length:1},"2f":{func:y.uniform2f,length:2},"2fv":{func:y.uniform2fv,length:1},"2i":{func:y.uniform2i,length:2},"2iv":{func:y.uniform2iv,length:1},"3f":{func:y.uniform3f,length:3},"3fv":{func:y.uniform3fv,length:1},"3i":{func:y.uniform3i,length:3},"3iv":{func:y.uniform3iv,length:1},"4f":{func:y.uniform4f,length:4},"4fv":{func:y.uniform4fv,length:1},"4i":{func:y.uniform4i,length:4},"4iv":{func:y.uniform4iv,length:1}};var R=y.getSupportedExtensions();(!g.maxTextures||g.maxTextures===-1)&&(g.maxTextures=y.getParameter(y.MAX_TEXTURE_IMAGE_UNITS)),g.maxTextureSize||(g.maxTextureSize=y.getParameter(y.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),this.supportedExtensions=R;var F="ANGLE_instanced_arrays";this.instancedArraysExtension=R.indexOf(F)>-1?y.getExtension(F):null;var L="OES_vertex_array_object";this.vaoExtension=R.indexOf(L)>-1?y.getExtension(L):null,y.disable(y.DEPTH_TEST),y.disable(y.CULL_FACE),y.enable(y.BLEND),y.clearColor(C.redGL,C.greenGL,C.blueGL,C.alphaGL);var B=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];B.indexOf(g.mipmapFilter)!==-1&&(this.mipmapFilter=y[g.mipmapFilter]),this.maxTextures=v.checkShaderMax(y,g.maxTextures),this.textureIndexes=[];for(var N=0;N0&&E>0;if(P&&R){var F=P[0],L=P[1],B=P[2],N=P[3];R=F!==g||L!==y||B!==T||N!==E}R&&(this.flush(),A.scissor(g,C-y-E,T,E))},resetScissor:function(){var g=this.gl;g.enable(g.SCISSOR_TEST);var y=this.currentScissor;if(y){var T=y[0],E=y[1],C=y[2],A=y[3];C>0&&A>0&&g.scissor(T,this.drawingBufferHeight-E-A,C,A)}},popScissor:function(){var g=this.scissorStack;g.pop();var y=g[g.length-1];y&&this.setScissor(y[0],y[1],y[2],y[3]),this.currentScissor=y},hasActiveStencilMask:function(){var g=this.currentMask.mask,y=this.currentCameraMask.mask;return g&&g.isStencil||y&&y.isStencil},resetViewport:function(){var g=this.gl;g.viewport(0,0,this.width,this.height),this.drawingBufferHeight=g.drawingBufferHeight},setBlendMode:function(g,y){y===void 0&&(y=!1);var T=this.gl,E=this.blendModes[g];return y||g!==r.BlendModes.SKIP_CHECK&&this.currentBlendMode!==g?(this.flush(),T.enable(T.BLEND),T.blendEquation(E.equation),E.func.length>2?T.blendFuncSeparate(E.func[0],E.func[1],E.func[2],E.func[3]):T.blendFunc(E.func[0],E.func[1]),this.currentBlendMode=g,!0):!1},addBlendMode:function(g,y){var T=this.blendModes.push({func:g,equation:y});return T-1},updateBlendMode:function(g,y,T){return this.blendModes[g]&&(this.blendModes[g].func=y,T&&(this.blendModes[g].equation=T)),this},removeBlendMode:function(g){return g>17&&this.blendModes[g]&&this.blendModes.splice(g,1),this},pushFramebuffer:function(g,y,T,E,C){return g===this.currentFramebuffer?this:(this.fboStack.push(g),this.setFramebuffer(g,y,T,E,C))},setFramebuffer:function(g,y,T,E,C){if(y===void 0&&(y=!1),T===void 0&&(T=!0),E===void 0&&(E=null),C===void 0&&(C=!1),g===this.currentFramebuffer)return this;var A=this.gl,P=this.width,R=this.height;return g&&g.renderTexture&&T?(P=g.renderTexture.width,R=g.renderTexture.height):this.flush(),A.bindFramebuffer(A.FRAMEBUFFER,g),T&&A.viewport(0,0,P,R),E&&A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,E,0),C&&(A.clearColor(0,0,0,0),A.clear(A.COLOR_BUFFER_BIT)),y&&(g?(this.drawingBufferHeight=R,this.pushScissor(0,0,P,R)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=g,this},popFramebuffer:function(g,y){g===void 0&&(g=!1),y===void 0&&(y=!0);var T=this.fboStack;T.pop();var E=T[T.length-1];return E||(E=null),this.setFramebuffer(E,g,y),E},restoreFramebuffer:function(g,y){g===void 0&&(g=!1),y===void 0&&(y=!0);var T=this.fboStack,E=T[T.length-1];E||(E=null),this.currentFramebuffer=null,this.setFramebuffer(E,g,y)},setProgram:function(g){return g!==this.currentProgram?(this.flush(),this.gl.useProgram(g),this.currentProgram=g,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram),this},createTextureFromSource:function(g,y,T,E,C){C===void 0&&(C=!1);var A=this.gl,P=A.NEAREST,R=A.NEAREST,F=A.CLAMP_TO_EDGE,L=null;y=g?g.width:y,T=g?g.height:T;var B=s(y,T);return B&&!C&&(F=A.REPEAT),E===r.ScaleModes.LINEAR&&this.config.antialias&&(P=B&&this.mipmapFilter?this.mipmapFilter:A.LINEAR,R=A.LINEAR),g&&g.compressed&&(P=A.LINEAR,R=A.LINEAR),!g&&typeof y=="number"&&typeof T=="number"?L=this.createTexture2D(0,P,R,F,F,A.RGBA,null,y,T):L=this.createTexture2D(0,P,R,F,F,A.RGBA,g),L},createTexture2D:function(g,y,T,E,C,A,P,R,F,L,B,N){L=L??!0,B===void 0&&(B=!1),N===void 0&&(N=!1);var U=this.gl,z=U.createTexture();U.activeTexture(U.TEXTURE0);var w=U.getParameter(U.TEXTURE_BINDING_2D);U.bindTexture(U.TEXTURE_2D,z),U.texParameteri(U.TEXTURE_2D,U.TEXTURE_MIN_FILTER,y),U.texParameteri(U.TEXTURE_2D,U.TEXTURE_MAG_FILTER,T),U.texParameteri(U.TEXTURE_2D,U.TEXTURE_WRAP_S,C),U.texParameteri(U.TEXTURE_2D,U.TEXTURE_WRAP_T,E),U.pixelStorei(U.UNPACK_PREMULTIPLY_ALPHA_WEBGL,L),N&&U.pixelStorei(U.UNPACK_FLIP_Y_WEBGL,!0);var I=!1;if(P==null)U.texImage2D(U.TEXTURE_2D,g,A,R,F,0,A,U.UNSIGNED_BYTE,null),I=s(R,F);else if(P.compressed){R=P.width,F=P.height,I=P.generateMipmap;for(var M=0;M0){var P=this.pipelines.setMulti();P.drawFillRect(y,T,E,C,v.getTintFromFloats(A.blueGL,A.greenGL,A.redGL,1),A.alphaGL)}},getCurrentStencilMask:function(){var g=null,y=this.maskStack,T=this.currentCameraMask;return y.length>0?g=y[y.length-1]:T.mask&&T.mask.isStencil&&(g=T),g},postRenderCamera:function(g){var y=g.flashEffect,T=g.fadeEffect;if(y.isRunning||T.isRunning||T.isComplete){var E=this.pipelines.setMulti();y.postRenderWebGL(E,v.getTintFromFloats),T.postRenderWebGL(E,v.getTintFromFloats)}g.dirty=!1,this.popScissor(),g.mask&&(this.currentCameraMask.mask=null,g.mask.postRenderWebGL(this,g._maskCamera)),this.pipelines.postBatchCamera(g),g.emit(c.POST_RENDER,g)},preRender:function(){if(!this.contextLost){var g=this.gl;if(g.bindFramebuffer(g.FRAMEBUFFER,null),this.config.clearBeforeRender){var y=this.config.backgroundColor;g.clearColor(y.redGL,y.greenGL,y.blueGL,y.alphaGL),g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT|g.STENCIL_BUFFER_BIT)}g.enable(g.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&g.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(e.PRE_RENDER)}},render:function(g,y,T){if(!this.contextLost){var E=y.length;if(this.emit(e.RENDER,g,T),this.preRenderCamera(T),E===0){this.setBlendMode(r.BlendModes.NORMAL),this.postRenderCamera(T);return}this.currentType="";for(var C=this.currentMask,A=0;A0&&A>0){E.activeTexture(E.TEXTURE0);var P=E.getParameter(E.TEXTURE_BINDING_2D);E.bindTexture(E.TEXTURE_2D,y),T&&E.pixelStorei(E.UNPACK_FLIP_Y_WEBGL,!0),E.pixelStorei(E.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),E.texImage2D(E.TEXTURE_2D,0,E.RGBA,E.RGBA,E.UNSIGNED_BYTE,g),y.width=C,y.height=A,P&&E.bindTexture(E.TEXTURE_2D,P)}return y},createVideoTexture:function(g,y,T){y===void 0&&(y=!1),T===void 0&&(T=!1);var E=this.gl,C=E.NEAREST,A=E.NEAREST,P=g.videoWidth,R=g.videoHeight,F=E.CLAMP_TO_EDGE,L=s(P,R);return!y&&L&&(F=E.REPEAT),this.config.antialias&&(C=L&&this.mipmapFilter?this.mipmapFilter:E.LINEAR,A=E.LINEAR),this.createTexture2D(0,C,A,F,F,E.RGBA,g,P,R,!0,!0,T)},updateVideoTexture:function(g,y,T){T===void 0&&(T=!1);var E=this.gl,C=g.videoWidth,A=g.videoHeight;if(C>0&&A>0){E.activeTexture(E.TEXTURE0);var P=E.getParameter(E.TEXTURE_BINDING_2D);E.bindTexture(E.TEXTURE_2D,y),E.pixelStorei(E.UNPACK_FLIP_Y_WEBGL,T),E.texImage2D(E.TEXTURE_2D,0,E.RGBA,E.RGBA,E.UNSIGNED_BYTE,g),y.width=C,y.height=A,P&&E.bindTexture(E.TEXTURE_2D,P)}return y},setTextureFilter:function(g,y){var T=this.gl,E=y===0?T.LINEAR:T.NEAREST;T.activeTexture(T.TEXTURE0);var C=T.getParameter(T.TEXTURE_BINDING_2D);return T.bindTexture(T.TEXTURE_2D,g),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,E),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,E),C&&T.bindTexture(T.TEXTURE_2D,C),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.maskTarget.destroy(),this.maskSource.destroy(),this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});p.exports=x},71305:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72632),l=t(71402),r=new d({initialize:function(e,s,u,i,a){this.pipeline=e,this.name=s,this.renderer=e.renderer,this.gl=this.renderer.gl,this.fragSrc=i,this.vertSrc=u,this.program=this.renderer.createProgram(u,i),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(a),this.createUniforms()},createAttributes:function(n){var e=0,s=0,u=[];this.vertexComponentCount=0;for(var i=0;i=0?(e.enableVertexAttribArray(y),e.vertexAttribPointer(y,h,f,g,s,v),o.enabled=!0,o.location=y):y!==-1&&e.disableVertexAttribArray(y)}else m?e.vertexAttribPointer(x,h,f,g,s,v):!m&&x>-1&&(e.disableVertexAttribArray(x),o.location=-1)}return this},createUniforms:function(){var n=this.gl,e=this.program,s=this.uniforms,u,i,a,o=n.getProgramParameter(e,n.ACTIVE_UNIFORMS);for(u=0;u0&&(i=i.substr(0,f),s.hasOwnProperty(i)||(a=n.getUniformLocation(e,i),a!==null&&(s[i]={name:i,location:a,value1:null,value2:null,value3:null,value4:null})))}}return this},hasUniform:function(n){return this.uniforms.hasOwnProperty(n)},resetUniform:function(n){var e=this.uniforms[n];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this},setUniform1:function(n,e,s,u){var i=this.uniforms[e];return i?((u||i.value1!==s)&&(i.value1=s,this.renderer.setProgram(this.program),n.call(this.gl,i.location,s),this.pipeline.currentShader=this),this):this},setUniform2:function(n,e,s,u,i){var a=this.uniforms[e];return a?((i||a.value1!==s||a.value2!==u)&&(a.value1=s,a.value2=u,this.renderer.setProgram(this.program),n.call(this.gl,a.location,s,u),this.pipeline.currentShader=this),this):this},setUniform3:function(n,e,s,u,i,a){var o=this.uniforms[e];return o?((a||o.value1!==s||o.value2!==u||o.value3!==i)&&(o.value1=s,o.value2=u,o.value3=i,this.renderer.setProgram(this.program),n.call(this.gl,o.location,s,u,i),this.pipeline.currentShader=this),this):this},setUniform4:function(n,e,s,u,i,a,o){var h=this.uniforms[e];return h?((o||h.value1!==s||h.value2!==u||h.value3!==i||h.value4!==a)&&(h.value1=s,h.value2=u,h.value3=i,h.value4=a,this.renderer.setProgram(this.program),n.call(this.gl,h.location,s,u,i,a),this.pipeline.currentShader=this),this):this},setBoolean:function(n,e){return this.setUniform1(this.gl.uniform1i,n,Number(e))},set1f:function(n,e){return this.setUniform1(this.gl.uniform1f,n,e)},set2f:function(n,e,s){return this.setUniform2(this.gl.uniform2f,n,e,s)},set3f:function(n,e,s,u){return this.setUniform3(this.gl.uniform3f,n,e,s,u)},set4f:function(n,e,s,u,i){return this.setUniform4(this.gl.uniform4f,n,e,s,u,i)},set1fv:function(n,e){return this.setUniform1(this.gl.uniform1fv,n,e,!0)},set2fv:function(n,e){return this.setUniform1(this.gl.uniform2fv,n,e,!0)},set3fv:function(n,e){return this.setUniform1(this.gl.uniform3fv,n,e,!0)},set4fv:function(n,e){return this.setUniform1(this.gl.uniform4fv,n,e,!0)},set1iv:function(n,e){return this.setUniform1(this.gl.uniform1iv,n,e,!0)},set2iv:function(n,e){return this.setUniform1(this.gl.uniform2iv,n,e,!0)},set3iv:function(n,e){return this.setUniform1(this.gl.uniform3iv,n,e,!0)},set4iv:function(n,e){return this.setUniform1(this.gl.uniform4iv,n,e,!0)},set1i:function(n,e){return this.setUniform1(this.gl.uniform1i,n,e)},set2i:function(n,e,s){return this.setUniform2(this.gl.uniform2i,n,e,s)},set3i:function(n,e,s,u){return this.setUniform3(this.gl.uniform3i,n,e,s,u)},set4i:function(n,e,s,u,i){return this.setUniform4(this.gl.uniform4i,n,e,s,u,i)},setMatrix2fv:function(n,e,s){return this.setUniform2(this.gl.uniformMatrix2fv,n,e,s,!0)},setMatrix3fv:function(n,e,s){return this.setUniform2(this.gl.uniformMatrix3fv,n,e,s,!0)},setMatrix4fv:function(n,e,s){return this.setUniform2(this.gl.uniformMatrix4fv,n,e,s,!0)},createProgram:function(n,e){n===void 0&&(n=this.vertSrc),e===void 0&&(e=this.fragSrc);var s=this.gl;return this.program&&s.deleteProgram(this.program),this.vertSrc=n,this.fragSrc=e,this.program=this.renderer.createProgram(n,e),this.createUniforms(),this.rebind()},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});p.exports=r},71402:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}};p.exports=S},55478:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(71402),c=t(98611),l={PipelineManager:t(35217),Pipelines:t(62253),RenderTarget:t(37410),Utils:t(75512),WebGLPipeline:t(44775),WebGLRenderer:t(11857),WebGLShader:t(71305)};l=c(!1,l,d),p.exports=l},5583:(p,S,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72632),l=t(91679),r=t(89053),n=t(71402),e=t(44775),s=new d({Extends:e,initialize:function(i){i.fragShader=c(i,"fragShader",l),i.vertShader=c(i,"vertShader",r),i.batchSize=c(i,"batchSize",1),i.vertices=c(i,"vertices",[-1,1,-1,-7,7,1]),i.attributes=c(i,"attributes",[{name:"inPosition",size:2,type:n.FLOAT}]),e.call(this,i)},boot:function(){e.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(u,i){e.prototype.resize.call(this,u,i),this.set2f("uResolution",u,i)},beginMask:function(u,i,a){this.renderer.beginBitmapMask(u,a)},endMask:function(u,i,a){var o=this.gl,h=this.renderer,f=u.bitmapMask;f&&o&&(h.drawBitmapMask(f,i,this),a&&this.set2f("uResolution",a.width,a.height),this.set1i("uInvertMaskAlpha",u.invertAlpha),o.drawArrays(this.topology,0,3),a&&this.set2f("uResolution",this.width,this.height),o.bindTexture(o.TEXTURE_2D,null))}});p.exports=s},81828:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(58136),l=t(47406),r=t(72632),n=t(87228),e=t(92462),s=t(75512),u=new d({Extends:n,initialize:function(a){a.shaders=[s.setGlowQuality(e.FXGlowFrag,a.game),e.FXShadowFrag,e.FXPixelateFrag,e.FXVignetteFrag,e.FXShineFrag,e.FXBlurLowFrag,e.FXBlurMedFrag,e.FXBlurHighFrag,e.FXGradientFrag,e.FXBloomFrag,e.ColorMatrixFrag,e.FXCircleFrag,e.FXBarrelFrag,e.FXDisplacementFrag,e.FXWipeFrag,e.FXBokehFrag],n.call(this,a);var o=this.game;this.glow=new c.Glow(o),this.shadow=new c.Shadow(o),this.pixelate=new c.Pixelate(o),this.vignette=new c.Vignette(o),this.shine=new c.Shine(o),this.gradient=new c.Gradient(o),this.circle=new c.Circle(o),this.barrel=new c.Barrel(o),this.wipe=new c.Wipe(o),this.bokeh=new c.Bokeh(o);var h=[];h[l.GLOW]=this.onGlow,h[l.SHADOW]=this.onShadow,h[l.PIXELATE]=this.onPixelate,h[l.VIGNETTE]=this.onVignette,h[l.SHINE]=this.onShine,h[l.BLUR]=this.onBlur,h[l.GRADIENT]=this.onGradient,h[l.BLOOM]=this.onBloom,h[l.COLOR_MATRIX]=this.onColorMatrix,h[l.CIRCLE]=this.onCircle,h[l.BARREL]=this.onBarrel,h[l.DISPLACEMENT]=this.onDisplacement,h[l.WIPE]=this.onWipe,h[l.BOKEH]=this.onBokeh,this.fxHandlers=h,this.source,this.target,this.swap},onDraw:function(i,a,o){this.source=i,this.target=a,this.swap=o;var h=i.width,f=i.height,v=this.tempSprite,m=this.fxHandlers;if(v&&v.preFX)for(var x=v.preFX.list,g=0;g{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72632),l=t(65045),r=t(77310),n=t(69360),e=t(93736),s=t(44775),u=new d({Extends:r,initialize:function(a){var o=c(a,"fragShader",l);a.fragShader=o.replace("%LIGHT_COUNT%",a.game.renderer.config.maxLights),r.call(this,a),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new e,this._tempMatrix=new n,this._tempMatrix2=new n},boot:function(){s.prototype.boot.call(this);var i=this.gl,a=i.createTexture();i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,a),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,1,1,0,i.RGBA,i.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:a}},onRender:function(i,a){var o=i.sys.lights;if(this.lightsActive=!1,!(!o||!o.active)){var h=o.getLights(a),f=h.length;this.lightsActive=!0;var v,m=this.renderer,x=m.height,g=a.matrix,y=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",a.x,a.y,a.rotation,a.zoom),this.set3f("uAmbientLightColor",o.ambientColor.r,o.ambientColor.g,o.ambientColor.b),this.set1i("uLightCount",f),v=0;v0&&this.flush();var a=this.inverseRotationMatrix;if(i){var o=-i,h=Math.cos(o),f=Math.sin(o);a[1]=f,a[3]=-f,a[0]=a[4]=h}else a[0]=a[4]=1,a[1]=a[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,a),this.currentNormalMapRotation=i}},setTexture2D:function(i,a){var o=this.renderer;i===void 0&&(i=o.whiteTexture);var h=this.getNormalMap(a);this.isNewNormalMap(i,h)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(h),this.currentNormalMap=h);var f=0;if(a&&a.parentContainer){var v=a.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);f=v.rotationNormalized}else a&&(f=a.rotation);return this.setNormalMapRotation(f),0},setGameObject:function(i,a){a===void 0&&(a=i.frame);var o=a.glTexture,h=this.getNormalMap(i);if(this.isNewNormalMap(o,h)&&(this.flush(),this.createBatch(o),this.addTextureToBatch(h),this.currentNormalMap=h),i.parentContainer){var f=i.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(f.rotationNormalized)}else this.setNormalMapRotation(i.rotation);return 0},isNewNormalMap:function(i,a){return this.currentTexture!==i||this.currentNormalMap!==a},getNormalMap:function(i){var a;return i?i.displayTexture?a=i.displayTexture.dataSource[i.displayFrame.sourceIndex]:i.texture?a=i.texture.dataSource[i.frame.sourceIndex]:i.tileset&&(Array.isArray(i.tileset)?a=i.tileset[0].image.dataSource[0]:a=i.tileset.image.dataSource[0]):a=this.defaultNormalMap,a||(a=this.defaultNormalMap),a.glTexture},batchSprite:function(i,a,o){this.lightsActive&&r.prototype.batchSprite.call(this,i,a,o)},batchTexture:function(i,a,o,h,f,v,m,x,g,y,T,E,C,A,P,R,F,L,B,N,U,z,w,I,M,O,D,G,X,V,Y,W){this.lightsActive&&r.prototype.batchTexture.call(this,i,a,o,h,f,v,m,x,g,y,T,E,C,A,P,R,F,L,B,N,U,z,w,I,M,O,D,G,X,V,Y,W)},batchTextureFrame:function(i,a,o,h,f,v,m){this.lightsActive&&r.prototype.batchTextureFrame.call(this,i,a,o,h,f,v,m)}});p.exports=u},71264:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72632),l=t(77310),r=t(85060),n=t(18166),e=t(71402),s=t(44775),u=new d({Extends:l,initialize:function(a){a.fragShader=c(a,"fragShader",r),a.vertShader=c(a,"vertShader",n),a.attributes=c(a,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),a.forceZero=!0,l.call(this,a)},boot:function(){s.prototype.boot.call(this);var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height),this.set1i("uRoundPixels",i.config.roundPixels)}});p.exports=u},77310:(p,S,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(11117),l=t(72632),r=t(53787),n=t(15968),e=t(69360),s=t(75512),u=t(71402),i=t(44775),a=new d({Extends:i,initialize:function(h){var f=h.game.renderer,v=l(h,"fragShader",r);h.fragShader=s.parseFragmentShaderMaxTextures(v,f.maxTextures),h.vertShader=l(h,"vertShader",n),h.attributes=l(h,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),i.call(this,h),this._tempMatrix1=new e,this._tempMatrix2=new e,this._tempMatrix3=new e,this.calcMatrix=new e,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){i.prototype.boot.call(this);var o=this.renderer;this.set1iv("uMainSampler",o.textureIndexes),this.set2f("uResolution",o.width,o.height),this.set1i("uRoundPixels",o.config.roundPixels)},batchSprite:function(o,h,f){this.manager.set(this,o);var v=this._tempMatrix1,m=this._tempMatrix2,x=this._tempMatrix3,g=o.frame,y=g.glTexture,T=g.u0,E=g.v0,C=g.u1,A=g.v1,P=g.x,R=g.y,F=g.cutWidth,L=g.cutHeight,B=g.customPivot,N=o.displayOriginX,U=o.displayOriginY,z=-N+P,w=-U+R;if(o.isCropped){var I=o._crop;(I.flipX!==o.flipX||I.flipY!==o.flipY)&&g.updateCropUVs(I,o.flipX,o.flipY),T=I.u0,E=I.v0,C=I.u1,A=I.v1,F=I.width,L=I.height,P=I.x,R=I.y,z=-N+P,w=-U+R}var M=1,O=1;o.flipX&&(B||(z+=-g.realWidth+N*2),M=-1),(o.flipY||g.source.isGLTexture&&!y.flipY)&&(B||(w+=-g.realHeight+U*2),O=-1);var D=o.x,G=o.y;m.applyITRS(D,G,o.rotation,o.scaleX*M,o.scaleY*O),v.copyFrom(h.matrix),f?(v.multiplyWithOffset(f,-h.scrollX*o.scrollFactorX,-h.scrollY*o.scrollFactorY),m.e=D,m.f=G):(m.e-=h.scrollX*o.scrollFactorX,m.f-=h.scrollY*o.scrollFactorY),v.multiply(m,x);var X=x.setQuad(z,w,z+F,w+L),V=s.getTintAppendFloatAlpha,Y=h.alpha,W=V(o.tintTopLeft,Y*o._alphaTL),H=V(o.tintTopRight,Y*o._alphaTR),b=V(o.tintBottomLeft,Y*o._alphaBL),K=V(o.tintBottomRight,Y*o._alphaBR);this.shouldFlush(6)&&this.flush();var J=this.setGameObject(o,g);this.manager.preBatch(o),this.currentShader.set1i("uRoundPixels",h.roundPixels),this.batchQuad(o,X[0],X[1],X[2],X[3],X[4],X[5],X[6],X[7],T,E,C,A,W,H,b,K,o.tintFill,y,J),this.manager.postBatch(o)},batchTexture:function(o,h,f,v,m,x,g,y,T,E,C,A,P,R,F,L,B,N,U,z,w,I,M,O,D,G,X,V,Y,W,H,b,K){K===void 0&&(K=!1),this.manager.set(this,o);var J=this._tempMatrix1,Z=this._tempMatrix2,$=this._tempMatrix3,tt=N/f+X,it=U/v+V,et=(N+z)/f+X,Q=(U+w)/v+V,q=g,k=y,nt=-L,rt=-B;if(o.isCropped){var vt=o._crop,dt=vt.width,lt=vt.height;q=dt,k=lt,g=dt,y=lt,N=vt.x,U=vt.y;var ot=N,ct=U;A&&(ot=z-vt.x-dt),P&&(ct=w-vt.y-lt),tt=ot/f+X,it=ct/v+V,et=(ot+dt)/f+X,Q=(ct+lt)/v+V,nt=-L+N,rt=-B+U}P=P^(!H&&h.isRenderTexture?1:0),A&&(q*=-1,nt+=g),P&&(k*=-1,rt+=y),Z.applyITRS(m,x,C,T,E),J.copyFrom(Y.matrix),W?(J.multiplyWithOffset(W,-Y.scrollX*R,-Y.scrollY*F),Z.e=m,Z.f=x):(Z.e-=Y.scrollX*R,Z.f-=Y.scrollY*F),J.multiply(Z,$);var ut=$.setQuad(nt,rt,nt+q,rt+k);b==null&&(b=this.setTexture2D(h)),o&&!K&&this.manager.preBatch(o),this.currentShader.set1i("uRoundPixels",Y.roundPixels),this.batchQuad(o,ut[0],ut[1],ut[2],ut[3],ut[4],ut[5],ut[6],ut[7],tt,it,et,Q,I,M,O,D,G,h,b),o&&!K&&this.manager.postBatch(o)},batchTextureFrame:function(o,h,f,v,m,x,g){this.manager.set(this);var y=this._tempMatrix1.copyFrom(x),T=this._tempMatrix2;g?y.multiply(g,T):T=y;var E=T.setQuad(h,f,h+o.width,f+o.height),C=this.setTexture2D(o.source.glTexture);v=s.getTintAppendFloatAlpha(v,m),this.batchQuad(null,E[0],E[1],E[2],E[3],E[4],E[5],E[6],E[7],o.u0,o.v0,o.u1,o.v1,v,v,v,v,0,o.glTexture,C)},batchFillRect:function(o,h,f,v,m,x){this.renderer.pipelines.set(this);var g=this.calcMatrix;x&&x.multiply(m,g);var y=g.setQuad(o,h,o+f,h+v),T=this.fillTint;this.batchQuad(null,y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],0,0,1,1,T.TL,T.TR,T.BL,T.BR,2)},batchFillTriangle:function(o,h,f,v,m,x,g,y){this.renderer.pipelines.set(this);var T=this.calcMatrix;y&&y.multiply(g,T);var E=T.getX(o,h),C=T.getY(o,h),A=T.getX(f,v),P=T.getY(f,v),R=T.getX(m,x),F=T.getY(m,x),L=this.fillTint;this.currentShader.set1i("uRoundPixels",!1),this.batchTri(null,E,C,A,P,R,F,0,0,1,1,L.TL,L.TR,L.BL,2)},batchStrokeTriangle:function(o,h,f,v,m,x,g,y,T){var E=this.tempTriangle;E[0].x=o,E[0].y=h,E[0].width=g,E[1].x=f,E[1].y=v,E[1].width=g,E[2].x=m,E[2].y=x,E[2].width=g,E[3].x=o,E[3].y=h,E[3].width=g,this.batchStrokePath(E,g,!1,y,T)},batchFillPath:function(o,h,f){this.renderer.pipelines.set(this);var v=this.calcMatrix;f&&f.multiply(h,v);for(var m=o.length,x=this.polygonCache,g,y,T=this.fillTint.TL,E=this.fillTint.TR,C=this.fillTint.BL,A=0;A0&&q[4]?this.batchQuad(null,J,Z,W,H,q[0],q[1],q[2],q[3],0,0,1,1,tt,it,et,Q,2):(k[0]=J,k[1]=Z,k[2]=W,k[3]=H,k[4]=1),T&&k[4]?this.batchQuad(null,V,Y,b,K,k[0],k[1],k[2],k[3],0,0,1,1,tt,it,et,Q,2):(q[0]=V,q[1]=Y,q[2]=b,q[3]=K,q[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,i.prototype.destroy.call(this),this}});p.exports=a},10919:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72632),l=t(83327),r=t(54677),n=t(44775),e=new d({Extends:n,initialize:function(u){u.vertShader=c(u,"vertShader",r),u.fragShader=c(u,"fragShader",l),u.attributes=c(u,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),n.call(this,u)},onRender:function(s,u){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",u.zoom)},batchPointLight:function(s,u,i,a,o,h,f,v,m,x,g,y){var T=s.color,E=s.intensity,C=s.radius,A=s.attenuation,P=T.r*E,R=T.g*E,F=T.b*E,L=u.alpha*s.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,a,g,y,C,A,P,R,F,L),this.batchLightVert(o,h,g,y,C,A,P,R,F,L),this.batchLightVert(f,v,g,y,C,A,P,R,F,L),this.batchLightVert(i,a,g,y,C,A,P,R,F,L),this.batchLightVert(f,v,g,y,C,A,P,R,F,L),this.batchLightVert(m,x,g,y,C,A,P,R,F,L),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(s,u,i,a,o,h,f,v,m,x){var g=this.vertexViewF32,y=this.vertexCount*this.currentShader.vertexComponentCount-1;g[++y]=s,g[++y]=u,g[++y]=i,g[++y]=a,g[++y]=o,g[++y]=h,g[++y]=f,g[++y]=v,g[++y]=m,g[++y]=x,this.vertexCount++}});p.exports=e},80486:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(65246),l=t(72632),r=t(12569),n=t(99365),e=t(44775),s=new d({Extends:e,initialize:function(i){i.renderTarget=l(i,"renderTarget",1),i.fragShader=l(i,"fragShader",r),i.vertShader=l(i,"vertShader",n),i.attributes=l(i,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),i.batchSize=1,i.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],e.call(this,i),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new c,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){e.prototype.boot.call(this);var u=this.manager.UTILITY_PIPELINE;this.fullFrame1=u.fullFrame1,this.fullFrame2=u.fullFrame2,this.halfFrame1=u.halfFrame1,this.halfFrame2=u.halfFrame2;var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height),this.set1i("uRoundPixels",i.config.roundPixels);for(var a=this.renderTargets,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95723),c=t(79993),l=t(56694),r=t(37486),n=t(72632),e=t(77310),s=t(12569),u=t(74118),i=t(37410),a=t(85060),o=t(18166),h=t(44775),f=new l({Extends:e,initialize:function(m){var x=n(m,"fragShader",s),g=n(m,"vertShader",o),y=n(m,"drawShader",s),T=[{name:"DrawSprite",fragShader:a,vertShader:o},{name:"CopySprite",fragShader:x,vertShader:g},{name:"DrawGame",fragShader:y,vertShader:o},{name:"ColorMatrix",fragShader:r}],E=n(m,"shaders",[]);m.shaders=T.concat(E),m.vertShader||(m.vertShader=g),m.batchSize=1,e.call(this,m),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new u,this.targetBounds=new u,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){h.prototype.boot.call(this);var v=this.shaders,m=this.renderer;this.drawSpriteShader=v[0],this.copyShader=v[1],this.gameShader=v[2],this.colorMatrixShader=v[3],this.fsTarget=new i(m,m.width,m.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var x=new ArrayBuffer(168);this.quadVertexData=x,this.quadVertexViewF32=new Float32Array(x),this.quadVertexBuffer=m.createVertexBuffer(x,this.gl.STATIC_DRAW),this.onResize(m.width,m.height),this.currentShader=this.copyShader,this.set2f("uResolution",m.width,m.height),this.set1i("uRoundPixels",m.config.roundPixels)},onResize:function(v,m){var x=this.quadVertexViewF32;x[1]=m,x[22]=m,x[14]=v,x[28]=v,x[35]=v,x[36]=m},batchQuad:function(v,m,x,g,y,T,E,C,A,P,R,F,L,B,N,U,z,w,I){var M=Math.min(m,g,T,C),O=Math.min(x,y,E,A),D=Math.max(m,g,T,C),G=Math.max(x,y,E,A),X=D-M,V=G-O,Y=this.spriteBounds.setTo(M,O,X,V),W=v?v.preFX.padding:0,H=X+W*2,b=V+W*2,K=Math.abs(Math.max(H,b)),J=this.manager.getRenderTarget(K),Z=this.targetBounds.setTo(0,0,J.width,J.height);c(Z,Y.centerX,Y.centerY),this.tempSprite=v;var $=this.gl,tt=this.renderer;tt.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",tt.width,tt.height),this.set1i("uRoundPixels",tt.config.roundPixels),this.flipProjectionMatrix(!0),v&&(this.onDrawSprite(v,J),v.preFX.onFX(this));var it=this.fsTarget;return this.flush(),$.viewport(0,0,tt.width,tt.height),$.bindFramebuffer($.FRAMEBUFFER,it.framebuffer),$.framebufferTexture2D($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_2D,it.texture,0),$.clearColor(0,0,0,0),$.clear($.COLOR_BUFFER_BIT),this.setTexture2D(I),this.batchVert(m,x,P,R,0,w,B),this.batchVert(g,y,P,L,0,w,U),this.batchVert(T,E,F,L,0,w,z),this.batchVert(m,x,P,R,0,w,B),this.batchVert(T,E,F,L,0,w,z),this.batchVert(C,A,F,R,0,w,N),this.flush(),this.flipProjectionMatrix(!1),$.activeTexture($.TEXTURE0),$.bindTexture($.TEXTURE_2D,J.texture),$.copyTexSubImage2D($.TEXTURE_2D,0,0,0,Z.x,Z.y,Z.width,Z.height),$.bindFramebuffer($.FRAMEBUFFER,null),$.bindTexture($.TEXTURE_2D,null),this.onBatch(v),this.currentShader=this.copyShader,this.onDraw(J,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(v,m,x,g,y,T,E){x===void 0&&(x=!0),g===void 0&&(g=!0),y===void 0&&(y=!1),E===void 0&&(E=this.copyShader);var C=this.gl,A=this.tempSprite;T&&(E=this.colorMatrixShader),this.currentShader=E;var P=this.setVertexBuffer(this.quadVertexBuffer);E.bind(P,!1);var R=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",R.width,R.height),this.set1i("uRoundPixels",R.config.roundPixels),A.preFX.onFXCopy(this),this.onCopySprite(v,m,A),T&&(this.set1fv("uColorMatrix",T.getData()),this.set1f("uAlpha",T.alpha)),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,v.texture),v.height>m.height)C.viewport(0,0,v.width,v.height),this.setTargetUVs(v,m);else{var F=m.height-v.height;C.viewport(0,F,v.width,v.height),this.resetUVs()}if(C.bindFramebuffer(C.FRAMEBUFFER,m.framebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,m.texture,0),x&&(C.clearColor(0,0,0,+!g),C.clear(C.COLOR_BUFFER_BIT)),y){var L=this.renderer.currentBlendMode;this.renderer.setBlendMode(d.ERASE)}C.bufferData(C.ARRAY_BUFFER,this.quadVertexData,C.STATIC_DRAW),C.drawArrays(C.TRIANGLES,0,6),y&&this.renderer.setBlendMode(L),C.bindFramebuffer(C.FRAMEBUFFER,null)},copy:function(v,m){var x=this.gl;this.set1i("uMainSampler",0),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,v.texture),x.viewport(0,0,v.width,v.height),this.setUVs(0,0,0,1,1,1,1,0),x.bindFramebuffer(x.FRAMEBUFFER,m.framebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,m.texture,0),x.clearColor(0,0,0,0),x.clear(x.COLOR_BUFFER_BIT),x.bufferData(x.ARRAY_BUFFER,this.quadVertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null)},blendFrames:function(v,m,x,g,y){this.manager.blendFrames(v,m,x,g,y)},blendFramesAdditive:function(v,m,x,g,y){this.manager.blendFramesAdditive(v,m,x,g,y)},drawToGame:function(v){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(v)},copyToGame:function(v){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(v)},bindAndDraw:function(v){var m=this.gl,x=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(v.texture);var g=this._tempMatrix1.loadIdentity(),y=this.targetBounds.x,T=this.targetBounds.y,E=y+v.width,C=T+v.height,A=g.getX(y,T),P=g.getX(y,C),R=g.getX(E,C),F=g.getX(E,T),L=g.getY(y,T),B=g.getY(y,C),N=g.getY(E,C),U=g.getY(E,T),z=16777215;this.batchVert(A,L,0,0,0,0,z),this.batchVert(P,B,0,1,0,0,z),this.batchVert(R,N,1,1,0,0,z),this.batchVert(A,L,0,0,0,0,z),this.batchVert(R,N,1,1,0,0,z),this.batchVert(F,U,1,0,0,0,z),x.restoreFramebuffer(!1,!0),x.currentFramebuffer||m.viewport(0,0,x.width,x.height),x.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(v){this.drawToGame(v)},setUVs:function(v,m,x,g,y,T,E,C){var A=this.quadVertexViewF32;A[2]=v,A[3]=m,A[9]=x,A[10]=g,A[16]=y,A[17]=T,A[23]=v,A[24]=m,A[30]=y,A[31]=T,A[37]=E,A[38]=C},setTargetUVs:function(v,m){var x=m.height/v.height;x>.5?x=.5-(x-.5):x=.5+(.5-x),this.setUVs(0,x,0,1+x,1,1+x,1,x)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.gl.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,e.prototype.destroy.call(this),this}});p.exports=f},21213:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72632),l=t(77310),r=new d({Extends:l,initialize:function(e){e.topology=5,e.batchSize=c(e,"batchSize",256),l.call(this,e)}});p.exports=r},51212:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72632),l=t(77310),r=t(85060),n=t(18166),e=t(44775),s=new d({Extends:l,initialize:function(i){i.fragShader=c(i,"fragShader",r),i.vertShader=c(i,"vertShader",n),i.forceZero=!0,l.call(this,i)},boot:function(){e.prototype.boot.call(this);var u=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",u.width,u.height),this.set1i("uRoundPixels",u.config.roundPixels)}});p.exports=s},60848:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(2529),c=t(95723),l=t(56694),r=t(65246),n=t(37486),e=t(79060),s=t(72632),u=t(98921),i=t(99365),a=t(44775),o=new l({Extends:a,initialize:function(f){f.renderTarget=s(f,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),f.vertShader=s(f,"vertShader",i),f.shaders=s(f,"shaders",[{name:"Copy",fragShader:e},{name:"AddBlend",fragShader:d},{name:"LinearBlend",fragShader:u},{name:"ColorMatrix",fragShader:n}]),f.attributes=s(f,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),f.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],f.batchSize=1,a.call(this,f),this.colorMatrix=new r,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){a.prototype.boot.call(this);var h=this.shaders,f=this.renderTargets;this.copyShader=h[0],this.addShader=h[1],this.linearShader=h[2],this.colorMatrixShader=h[3],this.fullFrame1=f[0],this.fullFrame2=f[1],this.halfFrame1=f[2],this.halfFrame2=f[3]},copyFrame:function(h,f,v,m,x){v===void 0&&(v=1),m===void 0&&(m=!0),x===void 0&&(x=!0);var g=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),g.activeTexture(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,h.texture),f?(g.viewport(0,0,f.width,f.height),g.bindFramebuffer(g.FRAMEBUFFER,f.framebuffer),g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.TEXTURE_2D,f.texture,0)):g.viewport(0,0,h.width,h.height),m&&(x?g.clearColor(0,0,0,0):g.clearColor(0,0,0,1),g.clear(g.COLOR_BUFFER_BIT)),g.bufferData(g.ARRAY_BUFFER,this.vertexData,g.STATIC_DRAW),g.drawArrays(g.TRIANGLES,0,6),g.bindFramebuffer(g.FRAMEBUFFER,null),g.bindTexture(g.TEXTURE_2D,null)},blitFrame:function(h,f,v,m,x,g,y){v===void 0&&(v=1),m===void 0&&(m=!0),x===void 0&&(x=!0),g===void 0&&(g=!1),y===void 0&&(y=!1);var T=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),T.activeTexture(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,h.texture),h.height>f.height)T.viewport(0,0,h.width,h.height),this.setTargetUVs(h,f);else{var E=f.height-h.height;T.viewport(0,E,h.width,h.height)}if(T.bindFramebuffer(T.FRAMEBUFFER,f.framebuffer),T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_2D,f.texture,0),m&&(x?T.clearColor(0,0,0,0):T.clearColor(0,0,0,1),T.clear(T.COLOR_BUFFER_BIT)),g){var C=this.renderer.currentBlendMode;this.renderer.setBlendMode(c.ERASE)}y&&this.flipY(),T.bufferData(T.ARRAY_BUFFER,this.vertexData,T.STATIC_DRAW),T.drawArrays(T.TRIANGLES,0,6),g&&this.renderer.setBlendMode(C),T.bindFramebuffer(T.FRAMEBUFFER,null),T.bindTexture(T.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(h,f,v,m,x,g,y,T){y===void 0&&(y=!0),T===void 0&&(T=!0);var E=this.gl;E.bindFramebuffer(E.FRAMEBUFFER,h.framebuffer),E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_2D,h.texture,0),y&&(T?E.clearColor(0,0,0,0):E.clearColor(0,0,0,1),E.clear(E.COLOR_BUFFER_BIT)),E.activeTexture(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,f.texture),E.copyTexSubImage2D(E.TEXTURE_2D,0,0,0,v,m,x,g),E.bindFramebuffer(E.FRAMEBUFFER,null),E.bindTexture(E.TEXTURE_2D,null)},copyToGame:function(h){var f=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,h.texture),f.bufferData(f.ARRAY_BUFFER,this.vertexData,f.STATIC_DRAW),f.drawArrays(f.TRIANGLES,0,6)},drawFrame:function(h,f,v,m){v===void 0&&(v=!0),m===void 0&&(m=this.colorMatrix);var x=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",m.getData()),this.set1f("uAlpha",m.alpha),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,h.texture),f?(x.viewport(0,0,f.width,f.height),x.bindFramebuffer(x.FRAMEBUFFER,f.framebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,f.texture,0)):x.viewport(0,0,h.width,h.height),v?x.clearColor(0,0,0,0):x.clearColor(0,0,0,1),x.clear(x.COLOR_BUFFER_BIT),x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null),x.bindTexture(x.TEXTURE_2D,null)},blendFrames:function(h,f,v,m,x,g){m===void 0&&(m=1),x===void 0&&(x=!0),g===void 0&&(g=this.linearShader);var y=this.gl;this.setShader(g),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",m),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,h.texture),y.activeTexture(y.TEXTURE1),y.bindTexture(y.TEXTURE_2D,f.texture),v?(y.bindFramebuffer(y.FRAMEBUFFER,v.framebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,v.texture,0),y.viewport(0,0,v.width,v.height)):y.viewport(0,0,h.width,h.height),x?y.clearColor(0,0,0,0):y.clearColor(0,0,0,1),y.clear(y.COLOR_BUFFER_BIT),y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null),y.bindTexture(y.TEXTURE_2D,null)},blendFramesAdditive:function(h,f,v,m,x){this.blendFrames(h,f,v,m,x,this.addShader)},clearFrame:function(h,f){f===void 0&&(f=!0);var v=this.gl;v.viewport(0,0,h.width,h.height),v.bindFramebuffer(v.FRAMEBUFFER,h.framebuffer),f?v.clearColor(0,0,0,0):v.clearColor(0,0,0,1),v.clear(v.COLOR_BUFFER_BIT);var m=this.renderer.currentFramebuffer;v.bindFramebuffer(v.FRAMEBUFFER,m)},setUVs:function(h,f,v,m,x,g,y,T){var E=this.vertexViewF32;E[2]=h,E[3]=f,E[6]=v,E[7]=m,E[10]=x,E[11]=g,E[14]=h,E[15]=f,E[18]=x,E[19]=g,E[22]=y,E[23]=T},setTargetUVs:function(h,f){var v=f.height/h.height;v>.5?v=.5-(v-.5):v=.5+(.5-v),this.setUVs(0,v,0,1+v,1,1+v,1,v)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});p.exports=o},65641:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"};p.exports=S},68726:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelineafterflush"},67186:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelinebeforeflush"},22709:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelinebind"},74469:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelineboot"},93953:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelinedestroy"},51687:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelinerebind"},25034:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelineresize"},18970:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AFTER_FLUSH:t(68726),BEFORE_FLUSH:t(67186),BIND:t(22709),BOOT:t(74469),DESTROY:t(93953),REBIND:t(51687),RESIZE:t(25034)}},32469:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(87751),l=t(80486),r=new d({Extends:l,initialize:function(e){l.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e){n=this.getController(n),this.set1f("amount",n.amount,e)}});p.exports=r},2134:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(88222),l=t(80486),r=new d({Extends:l,initialize:function(e){l.call(this,{game:e,fragShader:c}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(n){n=this.getController(n),this.set1f("strength",n.blurStrength),this.set3fv("color",n.glcolor)},onDraw:function(n){var e=this.getController(),s=this.fullFrame1,u=this.fullFrame2;this.copyFrame(n,u);for(var i=2/n.width*e.offsetX,a=2/n.height*e.offsetY,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(35491),l=t(75568),r=t(44481),n=t(80486),e=new d({Extends:n,initialize:function(u){n.call(this,{game:u,shaders:[{name:"Gaussian5",fragShader:c},{name:"Gaussian9",fragShader:l},{name:"Gaussian13",fragShader:r}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(s){var u=this.getController(),i=this.gl,a=this.fullFrame1,o=i.getParameter(i.FRAMEBUFFER_BINDING);this.bind(this.shaders[u.quality]),i.activeTexture(i.TEXTURE0),i.viewport(0,0,s.width,s.height),this.set1i("uMainSampler",0),this.set2f("resolution",s.width,s.height),this.set1f("strength",u.strength),this.set3fv("color",u.glcolor);for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(69960),l=t(80486),r=new d({Extends:l,initialize:function(e){l.call(this,{game:e,fragShader:c}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(n,e,s,u){n=this.getController(n),this.set1f("radius",n.radius,e),this.set1f("amount",n.amount,e),this.set1f("contrast",n.contrast,e),this.set1f("strength",n.strength,e),this.set2f("blur",n.blurX,n.blurY,e),this.setBoolean("isTiltShift",n.isTiltShift,e),s&&u&&this.set2f("resolution",s,u,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r},4323:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(33754),l=t(80486),r=new d({Extends:l,initialize:function(e){l.call(this,{game:e,fragShader:c}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(n,e,s,u){n=this.getController(n),this.set1f("scale",n.scale,e),this.set1f("feather",n.feather,e),this.set1f("thickness",n.thickness,e),this.set3fv("color",n.glcolor,e),this.set4fv("backgroundColor",n.glcolor2,e),s&&u&&this.set2f("resolution",s,u,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r},92066:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(80486),l=new d({Extends:c,initialize:function(n){c.call(this,{game:n})},onDraw:function(r){var n=this.fullFrame1;this.controller?this.manager.drawFrame(r,n,!0,this.controller):this.drawFrame(r,n),this.copyToGame(n)}});p.exports=l},89581:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(35668),l=t(80486),r=new d({Extends:l,initialize:function(e){l.call(this,{game:e,fragShader:c}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(n){var e=this.game.textures.getFrame(n);e&&(this.glTexture=e.glTexture)},onDraw:function(n){var e=this.getController(),s=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",e.x,e.y),this.bindTexture(e.glTexture,1),this.copySprite(n,s),this.copyToGame(s)}});p.exports=r},55084:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72632),l=t(69675),r=t(80486),n=t(75512),e=new d({Extends:r,initialize:function(u,i){var a=c(i,"quality",.1),o=c(i,"distance",10);r.call(this,{game:u,fragShader:n.setGlowQuality(l,u,a,o)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(s,u,i,a){s=this.getController(s),this.set1f("outerStrength",s.outerStrength,u),this.set1f("innerStrength",s.innerStrength,u),this.set4fv("glowColor",s.glcolor,u),this.setBoolean("knockout",s.knockout,u),i&&a&&this.set2f("resolution",i,a,u)},onDraw:function(s){this.set2f("resolution",s.width,s.height),this.bindAndDraw(s)}});p.exports=e},41653:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(90993),l=t(80486),r=new d({Extends:l,initialize:function(e){l.call(this,{game:e,fragShader:c}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(n,e){n=this.getController(n),this.set1f("alpha",n.alpha,e),this.set1i("size",n.size,e),this.set3fv("color1",n.glcolor1,e),this.set3fv("color2",n.glcolor2,e),this.set2f("positionFrom",n.fromX,n.fromY,e),this.set2f("positionTo",n.toX,n.toY,e)}});p.exports=r},73416:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(37945),l=t(80486),r=new d({Extends:l,initialize:function(e){l.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e,s,u){n=this.getController(n),this.set1f("amount",n.amount,e),s&&u&&this.set2f("resolution",s,u,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r},58049:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(85718),l=t(80486),r=new d({Extends:l,initialize:function(e){l.call(this,{game:e,fragShader:c}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(n,e){n=this.getController(n);var s=n.samples;this.set1i("samples",s,e),this.set1f("intensity",n.intensity,e),this.set1f("decay",n.decay,e),this.set1f("power",n.power/s,e),this.set2f("lightPosition",n.x,n.y,e),this.set4fv("color",n.glcolor,e)}});p.exports=r},18026:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(13740),l=t(80486),r=new d({Extends:l,initialize:function(e){l.call(this,{game:e,fragShader:c}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(n,e,s,u){n=this.getController(n),this.setTime("time",e),this.set1f("speed",n.speed,e),this.set1f("lineWidth",n.lineWidth,e),this.set1f("gradient",n.gradient,e),this.setBoolean("reveal",n.reveal,e),s&&u&&this.set2f("resolution",s,u,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r},72381:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(80617),l=t(80486),r=new d({Extends:l,initialize:function(e){l.call(this,{game:e,fragShader:c}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(n,e){n=this.getController(n),this.set1f("radius",n.radius,e),this.set1f("strength",n.strength,e),this.set2f("position",n.x,n.y,e)}});p.exports=r},80542:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(62879),l=t(80486),r=new d({Extends:l,initialize:function(e){l.call(this,{game:e,fragShader:c}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(n,e){n=this.getController(n);var s=n.progress,u=n.wipeWidth,i=n.direction,a=n.axis;this.set4f("config",s,u,i,a,e),this.setBoolean("reveal",n.reveal,e)}});p.exports=r},58136:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={Barrel:t(32469),Bloom:t(2134),Blur:t(63377),Bokeh:t(49745),Circle:t(4323),ColorMatrix:t(92066),Displacement:t(89581),Glow:t(55084),Gradient:t(41653),Pixelate:t(73416),Shadow:t(58049),Shine:t(18026),Vignette:t(72381),Wipe:t(80542)};p.exports=d},62253:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65641),c=t(98611),l={FX:t(58136),BitmapMaskPipeline:t(5583),Events:t(18970),FXPipeline:t(81828),LightPipeline:t(66901),MobilePipeline:t(71264),MultiPipeline:t(77310),PointLightPipeline:t(10919),PostFXPipeline:t(80486),PreFXPipeline:t(87228),RopePipeline:t(21213),SinglePipeline:t(51212),UtilityPipeline:t(60848)};l=c(!1,l,d),p.exports=l},2529:p=>{p.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join(` +`)},91679:p=>{p.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join(` +`)},89053:p=>{p.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join(` +`)},37486:p=>{p.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join(` +`)},79060:p=>{p.exports=["#define SHADER_NAME PHASER_COPY_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uBrightness;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}"].join(` +`)},87751:p=>{p.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join(` +`)},88222:p=>{p.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join(` +`)},44481:p=>{p.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` +`)},35491:p=>{p.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` +`)},75568:p=>{p.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` +`)},69960:p=>{p.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join(` +`)},33754:p=>{p.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join(` +`)},35668:p=>{p.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join(` +`)},69675:p=>{p.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join(` +`)},90993:p=>{p.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join(` +`)},37945:p=>{p.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join(` +`)},85718:p=>{p.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join(` +`)},13740:p=>{p.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join(` +`)},80617:p=>{p.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," col = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join(` +`)},62879:p=>{p.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join(` +`)},65045:p=>{p.exports=["#define SHADER_NAME PHASER_LIGHT_FS","precision mediump float;","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = %LIGHT_COUNT%;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}"].join(` +`)},98921:p=>{p.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}"].join(` +`)},25005:p=>{p.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join(` +`)},94914:p=>{p.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join(` +`)},11263:p=>{p.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` +`)},51852:p=>{p.exports=["#define SHADER_NAME PHASER_MOBILE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform int uRoundPixels;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," if (uRoundPixels == 1)"," {"," gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;"," }"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` +`)},53787:p=>{p.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler[%count%];","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture;"," %forloop%"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` +`)},15968:p=>{p.exports=["#define SHADER_NAME PHASER_MULTI_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform int uRoundPixels;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," if (uRoundPixels == 1)"," {"," gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;"," }"," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` +`)},83327:p=>{p.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","precision mediump float;","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);"," float distToSurf = length(center - gl_FragCoord.xy);"," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);"," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);"," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join(` +`)},54677:p=>{p.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}"].join(` +`)},12569:p=>{p.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join(` +`)},99365:p=>{p.exports=["#define SHADER_NAME PHASER_QUAD_VS","precision mediump float;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outFragCoord;","varying vec2 outTexCoord;","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;"," gl_Position = vec4(inPosition, 0, 1);","}"].join(` +`)},85060:p=>{p.exports=["#define SHADER_NAME PHASER_SINGLE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` +`)},18166:p=>{p.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform int uRoundPixels;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," if (uRoundPixels == 1)"," {"," gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;"," }"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` +`)},92462:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AddBlendFrag:t(2529),BitmapMaskFrag:t(91679),BitmapMaskVert:t(89053),ColorMatrixFrag:t(37486),CopyFrag:t(79060),FXBarrelFrag:t(87751),FXBloomFrag:t(88222),FXBlurHighFrag:t(44481),FXBlurLowFrag:t(35491),FXBlurMedFrag:t(75568),FXBokehFrag:t(69960),FXCircleFrag:t(33754),FXDisplacementFrag:t(35668),FXGlowFrag:t(69675),FXGradientFrag:t(90993),FXPixelateFrag:t(37945),FXShadowFrag:t(85718),FXShineFrag:t(13740),FXVignetteFrag:t(80617),FXWipeFrag:t(62879),LightFrag:t(65045),LinearBlendFrag:t(98921),MeshFrag:t(25005),MeshVert:t(94914),MobileFrag:t(11263),MobileVert:t(51852),MultiFrag:t(53787),MultiVert:t(15968),PointLightFrag:t(83327),PointLightVert:t(54677),PostFXFrag:t(12569),QuadVert:t(99365),SingleFrag:t(85060),SingleVert:t(18166)}},756:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(55301),c=t(56694),l=t(6659),r=t(40444),n=t(97081),e=t(74181),s=t(2893),u=t(9229),i=t(72283),a=t(74118),o=t(90881),h=t(84314),f=t(93736),v=t(47751),m=new c({Extends:l,initialize:function(g){l.call(this),this.game=g,this.canvas,this.canvasBounds=new a,this.parent=null,this.parentIsWindow=!1,this.parentSize=new o,this.gameSize=new o,this.baseSize=new o,this.displaySize=new o,this.scaleMode=d.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new f(1,1),this.autoRound=!1,this.autoCenter=d.CENTER.NO_CENTER,this.orientation=d.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:i,windowResize:i,fullScreenChange:i,fullScreenError:i}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(n.BOOT,this.boot,this)},boot:function(){var x=this.game;this.canvas=x.canvas,this.fullscreen=x.device.fullscreen,this.scaleMode!==d.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===d.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),x.events.on(n.PRE_STEP,this.step,this),x.events.once(n.READY,this.refresh,this),x.events.once(n.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(x){this.getParent(x),this.getParentBounds();var g=x.width,y=x.height,T=x.scaleMode,E=x.zoom,C=x.autoRound;if(typeof g=="string")if(g.substr(-1)!=="%")g=parseInt(g,10);else{var A=this.parentSize.width;A===0&&(A=window.innerWidth);var P=parseInt(g,10)/100;g=Math.floor(A*P)}if(typeof y=="string")if(y.substr(-1)!=="%")y=parseInt(y,10);else{var R=this.parentSize.height;R===0&&(R=window.innerHeight);var F=parseInt(y,10)/100;y=Math.floor(R*F)}this.scaleMode=T,this.autoRound=C,this.autoCenter=x.autoCenter,this.resizeInterval=x.resizeInterval,C&&(g=Math.floor(g),y=Math.floor(y)),this.gameSize.setSize(g,y),E===d.ZOOM.MAX_ZOOM&&(E=this.getMaxZoom()),this.zoom=E,E!==1&&(this._resetZoom=!0),this.baseSize.setSize(g,y),C&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),x.minWidth>0&&this.displaySize.setMin(x.minWidth*E,x.minHeight*E),x.maxWidth>0&&this.displaySize.setMax(x.maxWidth*E,x.maxHeight*E),this.displaySize.setSize(g,y),this.orientation=u(g,y)},getParent:function(x){var g=x.parent;if(g!==null){if(this.parent=s(g),this.parentIsWindow=this.parent===document.body,x.expandParent&&x.scaleMode!==d.SCALE_MODE.NONE){var y=this.parent.getBoundingClientRect();(this.parentIsWindow||y.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",y=this.parent.getBoundingClientRect(),!this.parentIsWindow&&y.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}x.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=s(x.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var x=this.parentSize,g=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(g.height=e(!0));var y=g.width,T=g.height;if(x.width!==y||x.height!==T)return x.setSize(y,T),!0;if(this.canvas){var E=this.canvasBounds,C=this.canvas.getBoundingClientRect();if(C.x!==E.x||C.y!==E.y)return!0}return!1},lockOrientation:function(x){var g=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return g?g.call(screen,x):!1},setParentSize:function(x,g){return this.parentSize.setSize(x,g),this.refresh()},setGameSize:function(x,g){var y=this.autoRound;y&&(x=Math.floor(x),g=Math.floor(g));var T=this.width,E=this.height;return this.gameSize.resize(x,g),this.baseSize.resize(x,g),y&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(x/g),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(T,E)},resize:function(x,g){var y=this.zoom,T=this.autoRound;T&&(x=Math.floor(x),g=Math.floor(g));var E=this.width,C=this.height;this.gameSize.resize(x,g),this.baseSize.resize(x,g),T&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(x*y,g*y),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var A=this.canvas.style,P=x*y,R=g*y;return T&&(P=Math.floor(P),R=Math.floor(R)),(P!==x||R!==g)&&(A.width=P+"px",A.height=R+"px"),this.refresh(E,C)},setZoom:function(x){return this.zoom=x,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(x,g){x===void 0&&(x=this.width),g===void 0&&(g=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var y=this.game.domContainer;if(y){this.baseSize.setCSS(y);var T=this.canvas.style,E=y.style;E.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",E.marginLeft=T.marginLeft,E.marginTop=T.marginTop}return this.emit(r.RESIZE,this.gameSize,this.baseSize,this.displaySize,x,g),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var x=u(this.width,this.height);x!==this.orientation&&(this.orientation=x,this.emit(r.ORIENTATION_CHANGE,x))}},updateScale:function(){var x=this.canvas.style,g=this.gameSize.width,y=this.gameSize.height,T,E,C=this.zoom,A=this.autoRound;this.scaleMode===d.SCALE_MODE.NONE?(this.displaySize.setSize(g*C,y*C),T=this.displaySize.width,E=this.displaySize.height,A&&(T=Math.floor(T),E=Math.floor(E)),this._resetZoom&&(x.width=T+"px",x.height=E+"px",this._resetZoom=!1)):this.scaleMode===d.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),T=this.displaySize.width,E=this.displaySize.height,A&&(T=Math.floor(T),E=Math.floor(E)),this.canvas.width=T,this.canvas.height=E):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),T=this.displaySize.width,E=this.displaySize.height,A&&(T=Math.floor(T),E=Math.floor(E)),x.width=T+"px",x.height=E+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var x=h(this.parentSize.width,this.gameSize.width,0,!0),g=h(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(x,g),1)},updateCenter:function(){var x=this.autoCenter;if(x!==d.CENTER.NO_CENTER){var g=this.canvas,y=g.style,T=g.getBoundingClientRect(),E=T.width,C=T.height,A=Math.floor((this.parentSize.width-E)/2),P=Math.floor((this.parentSize.height-C)/2);x===d.CENTER.CENTER_HORIZONTALLY?P=0:x===d.CENTER.CENTER_VERTICALLY&&(A=0),y.marginLeft=A+"px",y.marginTop=P+"px"}},updateBounds:function(){var x=this.canvasBounds,g=this.canvas.getBoundingClientRect();x.x=g.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),x.y=g.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),x.width=g.width,x.height=g.height},transformX:function(x){return(x-this.canvasBounds.left)*this.displayScale.x},transformY:function(x){return(x-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(x){x===void 0&&(x={navigationUI:"hide"});var g=this.fullscreen;if(!g.available){this.emit(r.FULLSCREEN_UNSUPPORTED);return}if(!g.active){var y=this.getFullscreenTarget();g.keyboard?y[g.request](Element.ALLOW_KEYBOARD_INPUT):y[g.request](x)}},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(r.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(x){this.removeFullscreenTarget(),this.emit(r.FULLSCREEN_FAILED,x)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var x=document.createElement("div");x.style.margin="0",x.style.padding="0",x.style.width="100%",x.style.height="100%",this.fullscreenTarget=x,this._createdFullscreenTarget=!0}if(this._createdFullscreenTarget){var g=this.canvas.parentNode;g.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)}return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var x=this.fullscreenTarget;if(x&&x.parentNode){var g=x.parentNode;g.insertBefore(this.canvas,x),g.removeChild(x)}}},stopFullscreen:function(){var x=this.fullscreen;if(!x.available)return this.emit(r.FULLSCREEN_UNSUPPORTED),!1;x.active&&document[x.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(r.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(x){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(x)},startListeners:function(){var x=this,g=this.domlisteners;if(g.orientationChange=function(){x.updateBounds(),x._checkOrientation=!0,x.dirty=!0},g.windowResize=function(){x.updateBounds(),x.dirty=!0},window.addEventListener("orientationchange",g.orientationChange,!1),window.addEventListener("resize",g.windowResize,!1),this.fullscreen.available){g.fullScreenChange=function(T){return x.onFullScreenChange(T)},g.fullScreenError=function(T){return x.onFullScreenError(T)};var y=["webkit","moz",""];y.forEach(function(T){document.addEventListener(T+"fullscreenchange",g.fullScreenChange,!1),document.addEventListener(T+"fullscreenerror",g.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",g.fullScreenChange,!1),document.addEventListener("MSFullscreenError",g.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(x,g){x instanceof v||(g=x,x=void 0),g===void 0&&(g=new a);var y=this.baseSize,T=this.parentSize,E=this.canvasBounds,C=this.displayScale,A=E.x>=0?0:-(E.x*C.x),P=E.y>=0?0:-(E.y*C.y),R;T.width>=E.width?R=y.width:R=y.width-(E.width-T.width)*C.x;var F;return T.height>=E.height?F=y.height:F=y.height-(E.height-T.height)*C.y,g.setTo(A,P,R,F),x&&(g.width/=x.zoomX,g.height/=x.zoomY,g.centerX=x.centerX+x.scrollX,g.centerY=x.centerY+x.scrollY),g},step:function(x,g){this.parent&&(this._lastCheck+=g,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var x=this.domlisteners;window.removeEventListener("orientationchange",x.orientationChange,!1),window.removeEventListener("resize",x.windowResize,!1);var g=["webkit","moz",""];g.forEach(function(y){document.removeEventListener(y+"fullscreenchange",x.fullScreenChange,!1),document.removeEventListener(y+"fullscreenerror",x.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",x.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",x.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===d.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===d.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});p.exports=m},35098:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},53539:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},12637:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},10217:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},55301:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={CENTER:t(35098),ORIENTATION:t(53539),SCALE_MODE:t(12637),ZOOM:t(10217)};p.exports=d},82085:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="enterfullscreen"},11826:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="fullscreenfailed"},56691:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="fullscreenunsupported"},34739:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="leavefullscreen"},26681:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="orientationchange"},11428:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resize"},40444:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ENTER_FULLSCREEN:t(82085),FULLSCREEN_FAILED:t(11826),FULLSCREEN_UNSUPPORTED:t(56691),LEAVE_FULLSCREEN:t(34739),ORIENTATION_CHANGE:t(26681),RESIZE:t(11428)}},86754:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(98611),c=t(55301),l={Center:t(35098),Events:t(40444),Orientation:t(53539),ScaleManager:t(756),ScaleModes:t(12637),Zoom:t(10217)};l=d(!1,l,c.CENTER),l=d(!1,l,c.ORIENTATION),l=d(!1,l,c.SCALE_MODE),l=d(!1,l,c.ZOOM),p.exports=l},47736:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72632),c=t(40587),l=function(r){var n=r.game.config.defaultPhysicsSystem,e=d(r.settings,"physics",!1);if(!(!n&&!e)){var s=[];if(n&&s.push(c(n+"Physics")),e)for(var u in e)u=c(u.concat("Physics")),s.indexOf(u)===-1&&s.push(u);return s}};p.exports=l},91088:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72632),c=function(l){var r=l.plugins.getDefaultScenePlugins(),n=d(l.settings,"plugins",!1);return Array.isArray(n)?n:r||[]};p.exports=c},90415:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};p.exports=S},87157:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(63946),l=new d({initialize:function(n){this.sys=new c(this,n),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});p.exports=l},13553:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(92980),l=t(7599),r=t(97081),n=t(10850),e=t(683),s=t(72283),u=t(87157),i=t(63946),a=new d({initialize:function(h,f){if(this.game=h,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,f){Array.isArray(f)||(f=[f]);for(var v=0;v-1&&(delete this.keys[v],this.scenes.splice(f,1),this._start.indexOf(v)>-1&&(f=this._start.indexOf(v),this._start.splice(f,1)),h.sys.destroy())}return this},bootScene:function(o){var h=o.sys,f=h.settings;h.sceneUpdate=s,o.init&&(o.init.call(o,f.data),f.status=c.INIT,f.isTransition&&h.events.emit(l.TRANSITION_INIT,f.transitionFrom,f.transitionDuration));var v;h.load&&(v=h.load,v.reset()),v&&o.preload?(o.preload.call(o),f.status=c.LOADING,v.once(e.COMPLETE,this.loadComplete,this),v.start()):this.create(o)},loadComplete:function(o){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(o.scene)},payloadComplete:function(o){this.bootScene(o.scene)},update:function(o,h){this.processQueue(),this.isProcessing=!0;for(var f=this.scenes.length-1;f>=0;f--){var v=this.scenes[f].sys;v.settings.status>c.START&&v.settings.status<=c.RUNNING&&v.step(o,h),v.scenePlugin._target&&v.scenePlugin.step(o,h)}},render:function(o){for(var h=0;h=c.LOADING&&f.settings.status=c.START&&m<=c.CREATING)return this;if(m>=c.RUNNING&&m<=c.SLEEPING)v.shutdown(),v.sceneUpdate=s,v.start(h);else{v.sceneUpdate=s,v.start(h);var x;if(v.load&&(x=v.load),x&&v.settings.hasOwnProperty("pack")&&(x.reset(),x.addPack({payload:v.settings.pack})))return v.settings.status=c.LOADING,x.once(e.COMPLETE,this.payloadComplete,this),x.start(),this}return this.bootScene(f),this},stop:function(o,h){var f=this.getScene(o);if(f&&!f.sys.isTransitioning()&&f.sys.settings.status!==c.SHUTDOWN){var v=f.sys.load;v&&(v.off(e.COMPLETE,this.loadComplete,this),v.off(e.COMPLETE,this.payloadComplete,this)),f.sys.shutdown(h)}return this},switch:function(o,h){var f=this.getScene(o),v=this.getScene(h);return f&&v&&f!==v&&(this.sleep(o),this.isSleeping(h)?this.wake(h):this.start(h)),this},getAt:function(o){return this.scenes[o]},getIndex:function(o){var h=this.getScene(o);return this.scenes.indexOf(h)},bringToTop:function(o){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:o,keyB:null});else{var h=this.getIndex(o);if(h!==-1&&h0){var f=this.getScene(o);this.scenes.splice(h,1),this.scenes.unshift(f)}}return this},moveDown:function(o){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:o,keyB:null});else{var h=this.getIndex(o);if(h>0){var f=h-1,v=this.getScene(o),m=this.getAt(f);this.scenes[h]=m,this.scenes[f]=v}}return this},moveUp:function(o){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:o,keyB:null});else{var h=this.getIndex(o);if(hf),0,m)}}return this},moveBelow:function(o,h){if(o===h)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:o,keyB:h});else{var f=this.getIndex(o),v=this.getIndex(h);if(f!==-1&&v!==-1&&v>f){var m=this.getAt(v);this.scenes.splice(v,1),f===0?this.scenes.unshift(m):this.scenes.splice(f-(v{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=t(56694),l=t(7599),r=t(72632),n=t(91963),e=new c({initialize:function(u){this.scene=u,this.systems=u.sys,this.settings=u.sys.settings,this.key=u.sys.settings.key,this.manager=u.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,u.sys.events.once(l.BOOT,this.boot,this),u.sys.events.on(l.START,this.pluginStart,this)},boot:function(){this.systems.events.once(l.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(l.SHUTDOWN,this.shutdown,this)},start:function(s,u){return s===void 0&&(s=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",s,u),this},restart:function(s){var u=this.key;return this.manager.queueOp("stop",u),this.manager.queueOp("start",u,s),this},transition:function(s){s===void 0&&(s={});var u=r(s,"target",!1),i=this.manager.getScene(u);if(!u||!this.checkValidTransition(i))return!1;var a=r(s,"duration",1e3);this._elapsed=0,this._target=i,this._duration=a,this._willSleep=r(s,"sleep",!1),this._willRemove=r(s,"remove",!1);var o=r(s,"onUpdate",null);o&&(this._onUpdate=o,this._onUpdateScope=r(s,"onUpdateScope",this.scene));var h=r(s,"allowInput",!1);this.settings.transitionAllowInput=h;var f=i.sys.settings;f.isTransition=!0,f.transitionFrom=this.scene,f.transitionDuration=a,f.transitionAllowInput=h,r(s,"moveAbove",!1)?this.manager.moveAbove(this.key,u):r(s,"moveBelow",!1)&&this.manager.moveBelow(this.key,u),i.sys.isSleeping()?i.sys.wake(r(s,"data")):this.manager.start(u,r(s,"data"));var v=r(s,"onStart",null),m=r(s,"onStartScope",this.scene);return v&&v.call(m,this.scene,i,a),this.systems.events.emit(l.TRANSITION_OUT,i,a),!0},checkValidTransition:function(s){return!(!s||s.sys.isActive()||s.sys.isTransitioning()||s===this.scene||this.systems.isTransitioning())},step:function(s,u){this._elapsed+=u,this.transitionProgress=d(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var s=this._target.sys,u=this._target.sys.settings;s.events.emit(l.TRANSITION_COMPLETE,this.scene),u.isTransition=!1,u.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(s,u,i,a){return this.manager.add(s,u,i,a)},launch:function(s,u){return s&&s!==this.key&&this.manager.queueOp("start",s,u),this},run:function(s,u){return s&&s!==this.key&&this.manager.queueOp("run",s,u),this},pause:function(s,u){return s===void 0&&(s=this.key),this.manager.queueOp("pause",s,u),this},resume:function(s,u){return s===void 0&&(s=this.key),this.manager.queueOp("resume",s,u),this},sleep:function(s,u){return s===void 0&&(s=this.key),this.manager.queueOp("sleep",s,u),this},wake:function(s,u){return s===void 0&&(s=this.key),this.manager.queueOp("wake",s,u),this},switch:function(s){return s!==this.key&&this.manager.queueOp("switch",this.key,s),this},stop:function(s,u){return s===void 0&&(s=this.key),this.manager.queueOp("stop",s,u),this},setActive:function(s,u,i){u===void 0&&(u=this.key);var a=this.manager.getScene(u);return a&&a.sys.setActive(s,i),this},setVisible:function(s,u){u===void 0&&(u=this.key);var i=this.manager.getScene(u);return i&&i.sys.setVisible(s),this},isSleeping:function(s){return s===void 0&&(s=this.key),this.manager.isSleeping(s)},isActive:function(s){return s===void 0&&(s=this.key),this.manager.isActive(s)},isPaused:function(s){return s===void 0&&(s=this.key),this.manager.isPaused(s)},isVisible:function(s){return s===void 0&&(s=this.key),this.manager.isVisible(s)},swapPosition:function(s,u){return u===void 0&&(u=this.key),s!==u&&this.manager.swapPosition(s,u),this},moveAbove:function(s,u){return u===void 0&&(u=this.key),s!==u&&this.manager.moveAbove(s,u),this},moveBelow:function(s,u){return u===void 0&&(u=this.key),s!==u&&this.manager.moveBelow(s,u),this},remove:function(s){return s===void 0&&(s=this.key),this.manager.remove(s),this},moveUp:function(s){return s===void 0&&(s=this.key),this.manager.moveUp(s),this},moveDown:function(s){return s===void 0&&(s=this.key),this.manager.moveDown(s),this},bringToTop:function(s){return s===void 0&&(s=this.key),this.manager.bringToTop(s),this},sendToBack:function(s){return s===void 0&&(s=this.key),this.manager.sendToBack(s),this},get:function(s){return this.manager.getScene(s)},getStatus:function(s){var u=this.manager.getScene(s);if(u)return u.sys.getStatus()},getIndex:function(s){return s===void 0&&(s=this.key),this.manager.getIndex(s)},shutdown:function(){var s=this.systems.events;s.off(l.SHUTDOWN,this.shutdown,this),s.off(l.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(l.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});n.register("ScenePlugin",e,"scenePlugin"),p.exports=e},36765:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(92980),c=t(10850),l=t(30657),r=t(90415),n={create:function(e){return typeof e=="string"?e={key:e}:e===void 0&&(e={}),{status:d.PENDING,key:c(e,"key",""),active:c(e,"active",!1),visible:c(e,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:c(e,"pack",!1),cameras:c(e,"cameras",null),map:c(e,"map",l(r,c(e,"mapAdd",{}))),physics:c(e,"physics",{}),loader:c(e,"loader",{}),plugins:c(e,"plugins",!1),input:c(e,"input",{})}}};p.exports=n},63946:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(92980),l=t(18360),r=t(7599),n=t(47736),e=t(91088),s=t(72283),u=t(36765),i=new d({initialize:function(o,h){this.scene=o,this.game,this.renderer,this.config=h,this.settings=u.create(h),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=s},init:function(a){this.settings.status=c.INIT,this.sceneUpdate=s,this.game=a,this.renderer=a.renderer,this.canvas=a.canvas,this.context=a.context;var o=a.plugins;this.plugins=o,o.addToScene(this,l.Global,[l.CoreScene,e(this),n(this)]),this.events.emit(r.BOOT,this),this.settings.isBooted=!0},step:function(a,o){var h=this.events;h.emit(r.PRE_UPDATE,a,o),h.emit(r.UPDATE,a,o),this.sceneUpdate.call(this.scene,a,o),h.emit(r.POST_UPDATE,a,o)},render:function(a){var o=this.displayList;o.depthSort(),this.events.emit(r.PRE_RENDER,a),this.cameras.render(a,o),this.events.emit(r.RENDER,a)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(a){var o=this.settings,h=this.getStatus();return h!==c.CREATING&&h!==c.RUNNING?console.warn("Cannot pause non-running Scene",o.key):this.settings.active&&(o.status=c.PAUSED,o.active=!1,this.events.emit(r.PAUSE,this,a)),this},resume:function(a){var o=this.events,h=this.settings;return this.settings.active||(h.status=c.RUNNING,h.active=!0,o.emit(r.RESUME,this,a)),this},sleep:function(a){var o=this.settings,h=this.getStatus();return h!==c.CREATING&&h!==c.RUNNING?console.warn("Cannot sleep non-running Scene",o.key):(o.status=c.SLEEPING,o.active=!1,o.visible=!1,this.events.emit(r.SLEEP,this,a)),this},wake:function(a){var o=this.events,h=this.settings;return h.status=c.RUNNING,h.active=!0,h.visible=!0,o.emit(r.WAKE,this,a),h.isTransition&&o.emit(r.TRANSITION_WAKE,h.transitionFrom,h.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var a=this.settings.status;return a>c.PENDING&&a<=c.RUNNING},isSleeping:function(){return this.settings.status===c.SLEEPING},isActive:function(){return this.settings.status===c.RUNNING},isPaused:function(){return this.settings.status===c.PAUSED},isTransitioning:function(){return this.settings.isTransition||this.scenePlugin._target!==null},isTransitionOut:function(){return this.scenePlugin._target!==null&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(a){return this.settings.visible=a,this},setActive:function(a,o){return a?this.resume(o):this.pause(o)},start:function(a){var o=this.events,h=this.settings;a&&(h.data=a),h.status=c.START,h.active=!0,h.visible=!0,o.emit(r.START,this),o.emit(r.READY,this,a)},shutdown:function(a){var o=this.events,h=this.settings;o.off(r.TRANSITION_INIT),o.off(r.TRANSITION_START),o.off(r.TRANSITION_COMPLETE),o.off(r.TRANSITION_OUT),h.status=c.SHUTDOWN,h.active=!1,h.visible=!1,o.emit(r.SHUTDOWN,this,a)},destroy:function(){var a=this.events,o=this.settings;o.status=c.DESTROYED,o.active=!1,o.visible=!1,a.emit(r.DESTROY,this),a.removeAllListeners();for(var h=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],f=0;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};p.exports=S},31803:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addedtoscene"},94817:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="boot"},28977:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="create"},91959:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},363:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},15643:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postupdate"},17058:p=>{/** + * @author samme + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prerender"},77125:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="preupdate"},76018:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="ready"},28620:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removedfromscene"},41538:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="render"},34268:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},2342:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="shutdown"},96541:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="sleep"},74244:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},17046:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitioncomplete"},13637:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitioninit"},14733:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitionout"},33899:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitionstart"},52418:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitionwake"},31735:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},8470:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="wake"},7599:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADDED_TO_SCENE:t(31803),BOOT:t(94817),CREATE:t(28977),DESTROY:t(91959),PAUSE:t(363),POST_UPDATE:t(15643),PRE_RENDER:t(17058),PRE_UPDATE:t(77125),READY:t(76018),REMOVED_FROM_SCENE:t(28620),RENDER:t(41538),RESUME:t(34268),SHUTDOWN:t(2342),SLEEP:t(96541),START:t(74244),TRANSITION_COMPLETE:t(17046),TRANSITION_INIT:t(13637),TRANSITION_OUT:t(14733),TRANSITION_START:t(33899),TRANSITION_WAKE:t(52418),UPDATE:t(31735),WAKE:t(8470)}},20436:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(92980),c=t(98611),l={Events:t(7599),GetPhysicsPlugins:t(47736),GetScenePlugins:t(91088),SceneManager:t(13553),ScenePlugin:t(64051),Settings:t(36765),Systems:t(63946)};l=c(!1,l,d),p.exports=l},25798:(p,S,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(6659),l=t(76038),r=t(98611),n=t(72283),e=new d({Extends:c,initialize:function(u,i,a){c.call(this),this.manager=u,this.key=i,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=r(this.config,a),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(s){return!s||!s.name||typeof s.name!="string"?!1:this.markers[s.name]?(console.error("addMarker "+s.name+" already exists in Sound"),!1):(s=r(!0,{name:"",start:0,duration:this.totalDuration-(s.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},s),this.markers[s.name]=s,!0)},updateMarker:function(s){return!s||!s.name||typeof s.name!="string"?!1:this.markers[s.name]?(this.markers[s.name]=r(!0,this.markers[s.name],s),!0):(console.warn("Audio Marker: "+s.name+" missing in Sound: "+this.key),!1)},removeMarker:function(s){var u=this.markers[s];return u?(this.markers[s]=null,u):null},play:function(s,u){if(s===void 0&&(s=""),typeof s=="object"&&(u=s,s=""),typeof s!="string")return!1;if(!s)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[s])return console.warn("Marker: "+s+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[s],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=r(this.currentConfig,u),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return this.isPaused||!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!this.isPaused||this.isPlaying?!1:(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!this.isPaused&&!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:n,calculateRate:function(){var s=1.0005777895065548,u=this.currentConfig.detune+this.manager.detune,i=Math.pow(s,u);this.totalRate=this.currentConfig.rate*this.manager.rate*i},destroy:function(){this.pendingRemove||(this.stop(),this.emit(l.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});p.exports=e},12486:(p,S,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(32742),l=t(6659),r=t(76038),n=t(97081),e=t(71608),s=t(51463),u=t(72283),i=t(93736),a=new d({Extends:l,initialize:function(h){l.call(this),this.game=h,this.jsonCache=h.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new i,h.events.on(n.BLUR,this.onGameBlur,this),h.events.on(n.FOCUS,this.onGameFocus,this),h.events.on(n.PRE_STEP,this.update,this),h.events.once(n.DESTROY,this.destroy,this)},add:u,addAudioSprite:function(o,h){h===void 0&&(h={});var f=this.add(o,h);f.spritemap=this.jsonCache.get(o).spritemap;for(var v in f.spritemap)if(f.spritemap.hasOwnProperty(v)){var m=c(h),x=f.spritemap[v];m.loop=x.hasOwnProperty("loop")?x.loop:!1,f.addMarker({name:v,start:x.start,duration:x.end-x.start,config:m})}return f},get:function(o){return s(this.sounds,"key",o)},getAll:function(o){return o?e(this.sounds,"key",o):e(this.sounds)},getAllPlaying:function(){return e(this.sounds,"isPlaying",!0)},play:function(o,h){var f=this.add(o);return f.once(r.COMPLETE,f.destroy,f),h?h.name?(f.addMarker(h),f.play(h.name)):f.play(h):f.play()},playAudioSprite:function(o,h,f){var v=this.addAudioSprite(o);return v.once(r.COMPLETE,v.destroy,v),v.play(h,f)},remove:function(o){var h=this.sounds.indexOf(o);return h!==-1?(o.destroy(),this.sounds.splice(h,1),!0):!1},removeAll:function(){this.sounds.forEach(function(o){o.destroy()}),this.sounds.length=0},removeByKey:function(o){for(var h=0,f=this.sounds.length-1;f>=0;f--){var v=this.sounds[f];v.key===o&&(v.destroy(),this.sounds.splice(f,1),h++)}return h},pauseAll:function(){this.forEachActiveSound(function(o){o.pause()}),this.emit(r.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(o){o.resume()}),this.emit(r.RESUME_ALL,this)},setListenerPosition:u,stopAll:function(){this.forEachActiveSound(function(o){o.stop()}),this.emit(r.STOP_ALL,this)},stopByKey:function(o){var h=0;return this.getAll(o).forEach(function(f){f.stop()&&h++}),h},unlock:u,onBlur:u,onFocus:u,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(o,h){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(r.UNLOCKED,this));for(var f=this.sounds.length-1;f>=0;f--)this.sounds[f].pendingRemove&&this.sounds.splice(f,1);this.sounds.forEach(function(v){v.update(o,h)})},destroy:function(){this.game.events.off(n.BLUR,this.onGameBlur,this),this.game.events.off(n.FOCUS,this.onGameFocus,this),this.game.events.off(n.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(o,h){var f=this;this.sounds.forEach(function(v,m){v&&!v.pendingRemove&&o.call(h||f,v,m,f.sounds)})},setRate:function(o){return this.rate=o,this},rate:{get:function(){return this._rate},set:function(o){this._rate=o,this.forEachActiveSound(function(h){h.calculateRate()}),this.emit(r.GLOBAL_RATE,this,o)}},setDetune:function(o){return this.detune=o,this},detune:{get:function(){return this._detune},set:function(o){this._detune=o,this.forEachActiveSound(function(h){h.calculateRate()}),this.emit(r.GLOBAL_DETUNE,this,o)}}});p.exports=a},84191:(p,S,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(27622),c=t(17546),l=t(55491),r={create:function(n){var e=n.config.audio,s=n.device.audio;return e.noAudio||!s.webAudio&&!s.audioData?new c(n):s.webAudio&&!e.disableWebAudio?new l(n):new d(n)}};p.exports=r},77578:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},19679:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="decodedall"},56951:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="decoded"},16436:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},55154:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="detune"},57818:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="detune"},57890:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="mute"},83022:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="rate"},99170:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="volume"},64289:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="looped"},67214:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loop"},53128:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="mute"},73078:p=>{/** + * @author pi-kei + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pan"},76763:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pauseall"},88426:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},13765:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="play"},80291:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="rate"},11124:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resumeall"},55382:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},71157:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="seek"},31776:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stopall"},39450:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stop"},21939:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="unlocked"},33019:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="volume"},76038:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={COMPLETE:t(77578),DECODED:t(56951),DECODED_ALL:t(19679),DESTROY:t(16436),DETUNE:t(55154),GLOBAL_DETUNE:t(57818),GLOBAL_MUTE:t(57890),GLOBAL_RATE:t(83022),GLOBAL_VOLUME:t(99170),LOOP:t(67214),LOOPED:t(64289),MUTE:t(53128),PAN:t(73078),PAUSE_ALL:t(76763),PAUSE:t(88426),PLAY:t(13765),RATE:t(80291),RESUME_ALL:t(11124),RESUME:t(55382),SEEK:t(71157),STOP_ALL:t(31776),STOP:t(39450),UNLOCKED:t(21939),VOLUME:t(33019)}},34350:(p,S,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25798),c=t(56694),l=t(76038),r=t(82897),n=new c({Extends:d,initialize:function(s,u,i){if(i===void 0&&(i={}),this.tags=s.game.cache.audio.get(u),!this.tags)throw new Error('No cached audio asset with key "'+u);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,d.call(this,s,u,i)},play:function(e,s){return this.manager.isLocked(this,"play",[e,s])||!d.prototype.play.call(this,e,s)||!this.pickAndPlayAudioTag()?!1:(this.emit(l.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!d.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(l.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!d.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(l.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!d.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(l.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var e=this.currentConfig.seek,s=this.currentConfig.delay,u=(this.currentMarker?this.currentMarker.start:0)+e;return this.previousTime=u,this.audio.currentTime=u,this.applyConfig(),s===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+s*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var e=0;e0){this.startTime=u-this.manager.loopEndOffset?(this.audio.currentTime=s+Math.max(0,i-u),i=this.audio.currentTime):i=u){this.reset(),this.stopAndReleaseAudioTag(),this.emit(l.COMPLETE,this);return}this.previousTime=i}},destroy:function(){d.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=r(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){d.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(e){this.currentConfig.mute=e,!this.manager.isLocked(this,"mute",e)&&(this.updateMute(),this.emit(l.MUTE,this,e))}},setMute:function(e){return this.mute=e,this},volume:{get:function(){return this.currentConfig.volume},set:function(e){this.currentConfig.volume=e,!this.manager.isLocked(this,"volume",e)&&(this.updateVolume(),this.emit(l.VOLUME,this,e))}},setVolume:function(e){return this.volume=e,this},rate:{get:function(){return this.currentConfig.rate},set:function(e){this.currentConfig.rate=e,!this.manager.isLocked(this,l.RATE,e)&&(this.calculateRate(),this.emit(l.RATE,this,e))}},setRate:function(e){return this.rate=e,this},detune:{get:function(){return this.currentConfig.detune},set:function(e){this.currentConfig.detune=e,!this.manager.isLocked(this,l.DETUNE,e)&&(this.calculateRate(),this.emit(l.DETUNE,this,e))}},setDetune:function(e){return this.detune=e,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(e){this.manager.isLocked(this,"seek",e)||this.startTime>0||(this.isPlaying||this.isPaused)&&(e=Math.min(Math.max(0,e),this.duration),this.isPlaying?(this.previousTime=e,this.audio.currentTime=e):this.isPaused&&(this.currentConfig.seek=e),this.emit(l.SEEK,this,e))}},setSeek:function(e){return this.seek=e,this},loop:{get:function(){return this.currentConfig.loop},set:function(e){this.currentConfig.loop=e,!this.manager.isLocked(this,"loop",e)&&(this.audio&&(this.audio.loop=e),this.emit(l.LOOP,this,e))}},setLoop:function(e){return this.loop=e,this},pan:{get:function(){return this.currentConfig.pan},set:function(e){this.currentConfig.pan=e,this.emit(l.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});p.exports=n},27622:(p,S,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12486),c=t(56694),l=t(76038),r=t(34350),n=new c({Extends:d,initialize:function(s){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,d.call(this,s)},add:function(e,s){var u=new r(this,e,s);return this.sounds.push(u),u},unlock:function(){this.locked=!1;var e=this;if(this.game.cache.audio.entries.each(function(a,o){for(var h=0;h{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={SoundManagerCreator:t(84191),Events:t(76038),BaseSound:t(25798),BaseSoundManager:t(12486),WebAudioSound:t(96008),WebAudioSoundManager:t(55491),HTML5AudioSound:t(34350),HTML5AudioSoundManager:t(27622),NoAudioSound:t(38662),NoAudioSoundManager:t(17546)}},38662:(p,S,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25798),c=t(56694),l=t(6659),r=t(98611),n=t(72283),e=function(){return!1},s=function(){return null},u=function(){return this},i=new c({Extends:l,initialize:function(o,h,f){f===void 0&&(f={}),l.call(this),this.manager=o,this.key=h,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=r({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},f),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:e,updateMarker:e,removeMarker:s,play:e,pause:e,resume:e,stop:e,setMute:u,setVolume:u,setRate:u,setDetune:u,setSeek:u,setLoop:u,setPan:u,applyConfig:s,resetConfig:s,update:n,calculateRate:s,destroy:function(){d.prototype.destroy.call(this)}});p.exports=i},17546:(p,S,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12486),c=t(56694),l=t(6659),r=t(38662),n=t(72283),e=new c({Extends:l,initialize:function(u){l.call(this),this.game=u,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(s,u){var i=new r(this,s,u);return this.sounds.push(i),i},addAudioSprite:function(s,u){var i=this.add(s,u);return i.spritemap={},i},get:function(s){return d.prototype.get.call(this,s)},getAll:function(s){return d.prototype.getAll.call(this,s)},play:function(s,u){return!1},playAudioSprite:function(s,u,i){return!1},remove:function(s){return d.prototype.remove.call(this,s)},removeAll:function(){return d.prototype.removeAll.call(this)},removeByKey:function(s){return d.prototype.removeByKey.call(this,s)},stopByKey:function(s){return d.prototype.stopByKey.call(this,s)},onBlur:n,onFocus:n,onGameBlur:n,onGameFocus:n,pauseAll:n,resumeAll:n,stopAll:n,update:n,setRate:n,setDetune:n,setMute:n,setVolume:n,unlock:n,forEachActiveSound:function(s,u){d.prototype.forEachActiveSound.call(this,s,u)},destroy:function(){d.prototype.destroy.call(this)}});p.exports=e},96008:(p,S,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(25798),c=t(56694),l=t(76038),r=t(72632),n=new c({Extends:d,initialize:function(s,u,i){if(i===void 0&&(i={}),this.audioBuffer=s.game.cache.audio.get(u),!this.audioBuffer)throw new Error('Audio key "'+u+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=s.context.createGain(),this.volumeNode=s.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),s.context.createPanner&&(this.spatialNode=s.context.createPanner(),this.volumeNode.connect(this.spatialNode)),s.context.createStereoPanner?(this.pannerNode=s.context.createStereoPanner(),s.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(s.destination)):s.context.createPanner?this.spatialNode.connect(s.destination):this.volumeNode.connect(s.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,d.call(this,s,u,i)},play:function(e,s){return d.prototype.play.call(this,e,s)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(l.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82329),c=t(12486),l=t(56694),r=t(76038),n=t(97081),e=t(96008),s=t(72632),u=new l({Extends:c,initialize:function(a){this.context=this.createAudioContext(a),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked=this.context.state==="suspended"&&("ontouchstart"in window||"onclick"in window),c.call(this,a),this.locked&&a.isBooted?this.unlock():a.events.once(n.BOOT,this.unlock,this)},createAudioContext:function(i){var a=i.config.audio;if(a.context)return a.context.resume(),a.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(i){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=i,this.masterMuteNode=i.createGain(),this.masterVolumeNode=i.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(i.destination),this.destination=this.masterMuteNode,this},add:function(i,a){var o=new e(this,i,a);return this.sounds.push(o),o},decodeAudio:function(i,a){var o;Array.isArray(i)?o=i:o=[{key:i,data:a}];for(var h=this.game.cache.audio,f=o.length,v=0;v{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(59959),c=t(56694),l=t(72283),r=t(17922),n=new c({initialize:function(s){this.parent=s,this.list=[],this.position=0,this.addCallback=l,this.removeCallback=l,this._sortKey=""},add:function(e,s){return s?d.Add(this.list,e):d.Add(this.list,e,0,this.addCallback,this)},addAt:function(e,s,u){return u?d.AddAt(this.list,e,s):d.AddAt(this.list,e,s,0,this.addCallback,this)},getAt:function(e){return this.list[e]},getIndex:function(e){return this.list.indexOf(e)},sort:function(e,s){return e?(s===void 0&&(s=function(u,i){return u[e]-i[e]}),r(this.list,s),this):this},getByName:function(e){return d.GetFirst(this.list,"name",e)},getRandom:function(e,s){return d.GetRandom(this.list,e,s)},getFirst:function(e,s,u,i){return d.GetFirst(this.list,e,s,u,i)},getAll:function(e,s,u,i){return d.GetAll(this.list,e,s,u,i)},count:function(e,s){return d.CountAllMatching(this.list,e,s)},swap:function(e,s){d.Swap(this.list,e,s)},moveTo:function(e,s){return d.MoveTo(this.list,e,s)},moveAbove:function(e,s){return d.MoveAbove(this.list,e,s)},moveBelow:function(e,s){return d.MoveBelow(this.list,e,s)},remove:function(e,s){return s?d.Remove(this.list,e):d.Remove(this.list,e,this.removeCallback,this)},removeAt:function(e,s){return s?d.RemoveAt(this.list,e):d.RemoveAt(this.list,e,this.removeCallback,this)},removeBetween:function(e,s,u){return u?d.RemoveBetween(this.list,e,s):d.RemoveBetween(this.list,e,s,this.removeCallback,this)},removeAll:function(e){for(var s=this.list.length;s--;)this.remove(this.list[s],e);return this},bringToTop:function(e){return d.BringToTop(this.list,e)},sendToBack:function(e){return d.SendToBack(this.list,e)},moveUp:function(e){return d.MoveUp(this.list,e),e},moveDown:function(e){return d.MoveDown(this.list,e),e},reverse:function(){return this.list.reverse(),this},shuffle:function(){return d.Shuffle(this.list),this},replace:function(e,s){return d.Replace(this.list,e,s)},exists:function(e){return this.list.indexOf(e)>-1},setAll:function(e,s,u,i){return d.SetAll(this.list,e,s,u,i),this},each:function(e,s){for(var u=[null],i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});p.exports=n},33885:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r){this.entries={},this.size=0,this.setAll(r)},setAll:function(l){if(Array.isArray(l))for(var r=0;r{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(6659),l=t(36716),r=new d({Extends:c,initialize:function(){c.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(n){return this._active.indexOf(n)>-1},isPending:function(n){return this._toProcess>0&&this._pending.indexOf(n)>-1},isDestroying:function(n){return this._destroy.indexOf(n)>-1},add:function(n){return this.checkQueue&&this.isActive(n)&&!this.isDestroying(n)||this.isPending(n)||(this._pending.push(n),this._toProcess++),n},remove:function(n){if(this.isPending(n)){var e=this._pending,s=e.indexOf(n);s!==-1&&e.splice(s,1)}else this.isActive(n)&&(this._destroy.push(n),this._toProcess++);return n},removeAll:function(){for(var n=this._active,e=this._destroy,s=n.length;s--;)e.push(n[s]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var n=this._destroy,e=this._active,s,u;for(s=0;s{/** + * @author Vladimir Agafonkin + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(53466);function c(g){if(!(this instanceof c))return new c(g);this._maxEntries=Math.max(4,g||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}c.prototype={all:function(){return this._all(this.data,[])},search:function(g){var y=this.data,T=[],E=this.toBBox;if(!v(g,y))return T;for(var C=[],A,P,R,F;y;){for(A=0,P=y.children.length;A=0&&A[y].children.length>this._maxEntries;)this._split(A,y),y--;this._adjustParentBBoxes(C,A,y)},_split:function(g,y){var T=g[y],E=T.children.length,C=this._minEntries;this._chooseSplitAxis(T,C,E);var A=this._chooseSplitIndex(T,C,E),P=m(T.children.splice(A,T.children.length-A));P.height=T.height,P.leaf=T.leaf,r(T,this.toBBox),r(P,this.toBBox),y?g[y-1].children.push(P):this._splitRoot(T,P)},_splitRoot:function(g,y){this.data=m([g,y]),this.data.height=g.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(g,y,T){var E,C,A,P,R,F,L,B;for(F=L=1/0,E=y;E<=T-y;E++)C=n(g,0,E,this.toBBox),A=n(g,E,T,this.toBBox),P=h(C,A),R=i(C)+i(A),P=y;F--)L=g.children[F],e(P,g.leaf?C(L):L),R+=a(P);return R},_adjustParentBBoxes:function(g,y,T){for(var E=T;E>=0;E--)e(y[E],g)},_condense:function(g){for(var y=g.length-1,T;y>=0;y--)g[y].children.length===0?y>0?(T=g[y-1].children,T.splice(T.indexOf(g[y]),1)):this.clear():r(g[y],this.toBBox)},compareMinX:function(g,y){return g.left-y.left},compareMinY:function(g,y){return g.top-y.top},toBBox:function(g){return{minX:g.left,minY:g.top,maxX:g.right,maxY:g.bottom}}};function l(g,y,T){if(!T)return y.indexOf(g);for(var E=0;E=g.minX&&y.maxY>=g.minY}function m(g){return{children:g,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(g,y,T,E,C){for(var A=[y,T],P;A.length;)T=A.pop(),y=A.pop(),!(T-y<=E)&&(P=y+Math.ceil((T-y)/E/2)*E,d(g,P,y,T,C),A.push(y,P,P,T))}p.exports=c},58403:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r){if(this.entries=[],Array.isArray(r))for(var n=0;n-1&&this.entries.splice(r,1),this},dump:function(){console.group("Set");for(var l=0;l-1},union:function(l){var r=new c;return l.entries.forEach(function(n){r.set(n)}),this.entries.forEach(function(n){r.set(n)}),r},intersect:function(l){var r=new c;return this.entries.forEach(function(n){l.contains(n)&&r.set(n)}),r},difference:function(l){var r=new c;return this.entries.forEach(function(n){l.contains(n)||r.set(n)}),r},size:{get:function(){return this.entries.length},set:function(l){return l{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82897),c=t(56694),l=t(84314),r=t(93736),n=new c({initialize:function(s,u,i,a){s===void 0&&(s=0),u===void 0&&(u=s),i===void 0&&(i=0),a===void 0&&(a=null),this._width=s,this._height=u,this._parent=a,this.aspectMode=i,this.aspectRatio=u===0?1:s/u,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new r},setAspectMode:function(e){return e===void 0&&(e=0),this.aspectMode=e,this.setSize(this._width,this._height)},setSnap:function(e,s){return e===void 0&&(e=0),s===void 0&&(s=e),this.snapTo.set(e,s),this.setSize(this._width,this._height)},setParent:function(e){return this._parent=e,this.setSize(this._width,this._height)},setMin:function(e,s){return e===void 0&&(e=0),s===void 0&&(s=e),this.minWidth=d(e,0,this.maxWidth),this.minHeight=d(s,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(e,s){return e===void 0&&(e=Number.MAX_VALUE),s===void 0&&(s=e),this.maxWidth=d(e,this.minWidth,Number.MAX_VALUE),this.maxHeight=d(s,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(e,s){switch(e===void 0&&(e=0),s===void 0&&(s=e),this.aspectMode){case n.NONE:this._width=this.getNewWidth(l(e,this.snapTo.x)),this._height=this.getNewHeight(l(s,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case n.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(l(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case n.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(l(s,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case n.FIT:this.constrain(e,s,!0);break;case n.ENVELOP:this.constrain(e,s,!1);break}return this},setAspectRatio:function(e){return this.aspectRatio=e,this.setSize(this._width,this._height)},resize:function(e,s){return this._width=this.getNewWidth(l(e,this.snapTo.x)),this._height=this.getNewHeight(l(s,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(e,s){return s===void 0&&(s=!0),e=d(e,this.minWidth,this.maxWidth),s&&this._parent&&e>this._parent.width&&(e=Math.max(this.minWidth,this._parent.width)),e},getNewHeight:function(e,s){return s===void 0&&(s=!0),e=d(e,this.minHeight,this.maxHeight),s&&this._parent&&e>this._parent.height&&(e=Math.max(this.minHeight,this._parent.height)),e},constrain:function(e,s,u){e===void 0&&(e=0),s===void 0&&(s=e),u===void 0&&(u=!0),e=this.getNewWidth(e),s=this.getNewHeight(s);var i=this.snapTo,a=s===0?1:e/s;return u&&this.aspectRatio>a||!u&&this.aspectRatio0&&(s=l(s,i.y),e=s*this.aspectRatio)):(u&&this.aspectRatioa)&&(s=l(s,i.y),e=s*this.aspectRatio,i.x>0&&(e=l(e,i.x),s=e*(1/this.aspectRatio))),this._width=e,this._height=s,this},fitTo:function(e,s){return this.constrain(e,s,!0)},envelop:function(e,s){return this.constrain(e,s,!1)},setWidth:function(e){return this.setSize(e,this._height)},setHeight:function(e){return this.setSize(this._width,e)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(e){e&&e.style&&(e.style.width=this._width+"px",e.style.height=this._height+"px")},copy:function(e){return e.setAspectMode(this.aspectMode),e.aspectRatio=this.aspectRatio,e.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(e){this.setSize(e,this._height)}},height:{get:function(){return this._height},set:function(e){this.setSize(this._width,e)}}});n.NONE=0,n.WIDTH_CONTROLS_HEIGHT=1,n.HEIGHT_CONTROLS_WIDTH=2,n.FIT=3,n.ENVELOP=4,p.exports=n},94160:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="add"},95393:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="remove"},36716:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={PROCESS_QUEUE_ADD:t(94160),PROCESS_QUEUE_REMOVE:t(95393)}},20010:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Events:t(36716),List:t(71207),Map:t(33885),ProcessQueue:t(74623),RTree:t(68687),Set:t(58403),Size:t(90881)}},17487:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(82897),l=t(27119),r=t(86459),n=t(28621),e=t(31673),s=new d({Extends:e,initialize:function(i,a,o,h,f){e.call(this,i,a,o,h,f),this.add("__BASE",0,0,0,h,f),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=h,this.height=f,this.imageData=this.context.getImageData(0,0,h,f),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===r.WEBGL&&this.refresh(),this},draw:function(u,i,a,o){return o===void 0&&(o=!0),this.context.drawImage(a,u,i),o&&this.update(),this},drawFrame:function(u,i,a,o,h){a===void 0&&(a=0),o===void 0&&(o=0),h===void 0&&(h=!0);var f=this.manager.getFrame(u,i);if(f){var v=f.canvasData,m=f.cutWidth,x=f.cutHeight,g=f.source.resolution;this.context.drawImage(f.source.image,v.x,v.y,m,x,a,o,m/g,x/g),h&&this.update()}return this},setPixel:function(u,i,a,o,h,f){f===void 0&&(f=255),u=Math.abs(Math.floor(u)),i=Math.abs(Math.floor(i));var v=this.getIndex(u,i);if(v>-1){var m=this.context.getImageData(u,i,1,1);m.data[0]=a,m.data[1]=o,m.data[2]=h,m.data[3]=f,this.context.putImageData(m,u,i)}return this},putData:function(u,i,a,o,h,f,v){return o===void 0&&(o=0),h===void 0&&(h=0),f===void 0&&(f=u.width),v===void 0&&(v=u.height),this.context.putImageData(u,i,a,o,h,f,v),this},getData:function(u,i,a,o){u=c(Math.floor(u),0,this.width-1),i=c(Math.floor(i),0,this.height-1),a=c(a,1,this.width-u),o=c(o,1,this.height-i);var h=this.context.getImageData(u,i,a,o);return h},getPixel:function(u,i,a){a||(a=new l);var o=this.getIndex(u,i);if(o>-1){var h=this.data,f=h[o+0],v=h[o+1],m=h[o+2],x=h[o+3];a.setTo(f,v,m,x)}return a},getPixels:function(u,i,a,o){u===void 0&&(u=0),i===void 0&&(i=0),a===void 0&&(a=this.width),o===void 0&&(o=a),u=Math.abs(Math.round(u)),i=Math.abs(Math.round(i));for(var h=c(u,0,this.width),f=c(u+a,0,this.width),v=c(i,0,this.height),m=c(i+o,0,this.height),x=new l,g=[],y=v;y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(95723),c=t(51052),l=t(61068),r=t(56694),n=t(86459),e=t(82047),s=t(72632),u=t(65641),i=t(37410),a=t(31673),o=t(75512),h=new r({Extends:a,initialize:function(v,m,x,g){x===void 0&&(x=256),g===void 0&&(g=256),this.type="DynamicTexture";var y=v.game.renderer,T=y&&y.type===n.CANVAS,E=T?l.create2D(this,x,g):[this];a.call(this,v,m,E,x,g),this.add("__BASE",0,0,0,x,g),this.renderer=y,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=T?E:null,this.context=T?E.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new c(0,0,x,g).setScene(v.game.scene.systemScene,!1),this.renderTarget=T?null:new i(y,x,g,1,0,!1,!0,!0,!1),this.pipeline=T?null:y.pipelines.get(u.SINGLE_PIPELINE),T||this.setSize(x,g)},setSize:function(f,v){v===void 0&&(v=f);var m=this.get(),x=m.source;if(f!==this.width||v!==this.height){this.canvas&&(this.canvas.width=f,this.canvas.height=v);var g=this.renderTarget;g&&(g.willResize(f,v)&&(g.resize(f,v),this.renderer.deleteTexture(x.glTexture)),this.setFromRenderTarget()),this.camera.setSize(f,v),x.width=f,x.height=v,m.setSize(f,v),this.width=f,this.height=v}else{var y=this.getSourceImage();m.cutX+f>y.width&&(f=y.width-m.cutX),m.cutY+v>y.height&&(v=y.height-m.cutY),m.setSize(f,v,m.cutX,m.cutY)}return this},setFromRenderTarget:function(){var f=this.get(),v=f.source,m=this.renderTarget;return f.glTexture=m.texture,v.isRenderTexture=!0,v.isGLTexture=!0,v.glTexture=m.texture,v.glTexture.flipY=!0,this},setIsSpriteTexture:function(f){return this.isSpriteTexture=f,this},fill:function(f,v,m,x,g,y){var T=this.camera,E=this.renderer;v===void 0&&(v=1),m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=this.width),y===void 0&&(y=this.height);var C=f>>16&255,A=f>>8&255,P=f&255,R=this.renderTarget;if(T.preRender(),R){R.bind(!0);var F=this.pipeline.manager.set(this.pipeline),L=E.width/R.width,B=E.height/R.height,N=R.height-(x+y);F.drawFillRect(m*L,N*B,g*L,y*B,o.getTintFromFloats(P/255,A/255,C/255,1),v),R.unbind(!0)}else{var U=this.context;E.setContext(U),U.globalCompositeOperation="source-over",U.fillStyle="rgba("+C+","+A+","+P+","+v+")",U.fillRect(m,x,g,y),E.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var f=this.context,v=this.renderTarget;v?v.clear():f&&(f.save(),f.setTransform(1,0,0,1,0,0),f.clearRect(0,0,this.width,this.height),f.restore()),this.dirty=!1}return this},stamp:function(f,v,m,x,g){m===void 0&&(m=0),x===void 0&&(x=0);var y=s(g,"alpha",1),T=s(g,"tint",16777215),E=s(g,"angle",0),C=s(g,"rotation",0),A=s(g,"scale",1),P=s(g,"scaleX",A),R=s(g,"scaleY",A),F=s(g,"originX",.5),L=s(g,"originY",.5),B=s(g,"blendMode",0),N=s(g,"erase",!1),U=s(g,"skipBatch",!1),z=this.manager.resetStamp(y,T);return z.setAngle(0),E!==0?z.setAngle(E):C!==0&&z.setRotation(C),z.setScale(P,R),z.setTexture(f,v),z.setOrigin(F,L),z.setBlendMode(B),N&&(this._eraseMode=!0),U?this.batchGameObject(z,m,x):this.draw(z,m,x),N&&(this._eraseMode=!1),this},erase:function(f,v,m){return this._eraseMode=!0,this.draw(f,v,m),this._eraseMode=!1,this},draw:function(f,v,m,x,g){return this.beginDraw(),this.batchDraw(f,v,m,x,g),this.endDraw(),this},drawFrame:function(f,v,m,x,g,y){return this.beginDraw(),this.batchDrawFrame(f,v,m,x,g,y),this.endDraw(),this},repeat:function(f,v,m,x,g,y,T,E,C){if(m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=this.width),y===void 0&&(y=this.height),T===void 0&&(T=1),E===void 0&&(E=16777215),C===void 0&&(C=!1),f instanceof e?v=f:v=this.manager.getFrame(f,v),!v)return this;var A=this.manager.resetStamp(T,E);A.setFrame(v),A.setOrigin(0);var P=v.width,R=v.height;g=Math.floor(g),y=Math.floor(y);var F=Math.ceil(g/P),L=Math.ceil(y/R),B=F*P-g,N=L*R-y;B>0&&(B=P-B),N>0&&(N=R-N),m<0&&(F+=Math.ceil(Math.abs(m)/P)),x<0&&(L+=Math.ceil(Math.abs(x)/R));var U=m,z=x,w=!1,I=this.manager.stampCrop.setTo(0,0,P,R);C||this.beginDraw();for(var M=0;M0&&O===F-1&&(w=!0,I.width=B),N>0&&M===L-1&&(w=!0,I.height=N),w&&A.setCrop(I),this.batchGameObject(A,U,z),A.isCropped=!1,I.setTo(0,0,P,R),U+=P}U=m,z+=R}return C||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var f=this.camera,v=this.renderer,m=this.renderTarget;f.preRender(),m?v.beginCapture(m.width,m.height):v.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(f,v,m,x,g){return Array.isArray(f)||(f=[f]),this.batchList(f,v,m,x,g),this},batchDrawFrame:function(f,v,m,x,g,y){m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=1),y===void 0&&(y=16777215);var T=this.manager.getFrame(f,v);return T&&(this.renderTarget?this.pipeline.batchTextureFrame(T,m,x,y,g,this.camera.matrix,null):this.batchTextureFrame(T,m,x,g,y)),this},endDraw:function(f){if(f===void 0&&(f=this._eraseMode),this.isDrawing){var v=this.renderer,m=this.renderTarget;if(m){var x=v.endCapture(),g=v.pipelines.setUtility();g.blitFrame(x,m,1,!1,!1,f,this.isSpriteTexture),v.resetScissor(),v.resetViewport()}else v.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(f,v,m,x,g){var y=f.length;if(y!==0)for(var T=0;T0&&C.height>0&&E.drawImage(A,C.x,C.y,C.width,C.height,v,m,C.width,C.height),E.restore()}},snapshotArea:function(f,v,m,x,g,y,T){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,g,!1,f,v,m,x,y,T):this.renderer.snapshotCanvas(this.canvas,g,!1,f,v,m,x,y,T),this},snapshot:function(f,v,m){return this.snapshotArea(0,0,this.width,this.height,f,v,m)},snapshotPixel:function(f,v,m){return this.snapshotArea(f,v,1,1,m,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(f,v,m,x){var g=this.manager.resetStamp();g.setTexture(this),g.setOrigin(0),g.renderWebGL(f,g,m,x)},renderCanvas:function(){},destroy:function(){var f=this.manager.stamp;f&&f.texture===this&&this.manager.resetStamp(),a.prototype.destroy.call(this),l.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});p.exports=h},82047:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(82897),l=t(98611),r=new d({initialize:function(e,s,u,i,a,o,h){this.texture=e,this.name=s,this.source=e.source[u],this.sourceIndex=u,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(o,h,i,a)},setSize:function(n,e,s,u){s===void 0&&(s=0),u===void 0&&(u=0),this.cutX=s,this.cutY=u,this.cutWidth=n,this.cutHeight=e,this.width=n,this.height=e,this.halfWidth=Math.floor(n*.5),this.halfHeight=Math.floor(e*.5),this.centerX=Math.floor(n/2),this.centerY=Math.floor(e/2);var i=this.data,a=i.cut;a.x=s,a.y=u,a.w=n,a.h=e,a.r=s+n,a.b=u+e,i.sourceSize.w=n,i.sourceSize.h=e,i.spriteSourceSize.w=n,i.spriteSourceSize.h=e,i.radius=.5*Math.sqrt(n*n+e*e);var o=i.drawImage;return o.x=s,o.y=u,o.width=n,o.height=e,this.updateUVs()},setTrim:function(n,e,s,u,i,a){var o=this.data,h=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=n,o.sourceSize.h=e,h.x=s,h.y=u,h.w=i,h.h=a,h.r=s+i,h.b=u+a,this.x=s,this.y=u,this.width=i,this.height=a,this.halfWidth=i*.5,this.halfHeight=a*.5,this.centerX=Math.floor(i/2),this.centerY=Math.floor(a/2),this.updateUVs()},setScale9:function(n,e,s,u){var i=this.data;return i.scale9=!0,i.is3Slice=e===0&&u===this.height,i.scale9Borders.x=n,i.scale9Borders.y=e,i.scale9Borders.w=s,i.scale9Borders.h=u,this},setCropUVs:function(n,e,s,u,i,a,o){var h=this.cutX,f=this.cutY,v=this.cutWidth,m=this.cutHeight,x=this.realWidth,g=this.realHeight;e=c(e,0,x),s=c(s,0,g),u=c(u,0,x-e),i=c(i,0,g-s);var y=h+e,T=f+s,E=u,C=i,A=this.data;if(A.trim){var P=A.spriteSourceSize;u=c(u,0,v-e),i=c(i,0,m-s);var R=e+u,F=s+i,L=!(P.rR||P.y>F);if(L){var B=Math.max(P.x,e),N=Math.max(P.y,s),U=Math.min(P.r,R)-B,z=Math.min(P.b,F)-N;E=U,C=z,a?y=h+(v-(B-P.x)-U):y=h+(B-P.x),o?T=f+(m-(N-P.y)-z):T=f+(N-P.y),e=B,s=N,u=U,i=z}else y=0,T=0,E=0,C=0}else a&&(y=h+(v-e-u)),o&&(T=f+(m-s-i));var w=this.source.width,I=this.source.height;return n.u0=Math.max(0,y/w),n.v0=Math.max(0,T/I),n.u1=Math.min(1,(y+E)/w),n.v1=Math.min(1,(T+C)/I),n.x=e,n.y=s,n.cx=y,n.cy=T,n.cw=E,n.ch=C,n.width=u,n.height=i,n.flipX=a,n.flipY=o,n},updateCropUVs:function(n,e,s){return this.setCropUVs(n,n.x,n.y,n.width,n.height,e,s)},setUVs:function(n,e,s,u,i,a){var o=this.data.drawImage;return o.width=n,o.height=e,this.u0=s,this.v0=u,this.u1=i,this.v1=a,this},updateUVs:function(){var n=this.cutX,e=this.cutY,s=this.cutWidth,u=this.cutHeight,i=this.data.drawImage;i.width=s,i.height=u;var a=this.source.width,o=this.source.height;return this.u0=n/a,this.v0=e/o,this.u1=(n+s)/a,this.v1=(e+u)/o,this},updateUVsInverted:function(){var n=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/n,this.v0=this.cutY/e,this.u1=this.cutX/n,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var n=new r(this.texture,this.name,this.sourceIndex);return n.cutX=this.cutX,n.cutY=this.cutY,n.cutWidth=this.cutWidth,n.cutHeight=this.cutHeight,n.x=this.x,n.y=this.y,n.width=this.width,n.height=this.height,n.halfWidth=this.halfWidth,n.halfHeight=this.halfHeight,n.centerX=this.centerX,n.centerY=this.centerY,n.rotated=this.rotated,n.data=l(!0,n.data,this.data),n.updateUVs(),n},destroy:function(){this.texture=null,this.source=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});p.exports=r},31673:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(82047),l=t(32547),r='Texture "%s" has no frame "%s"',n=new d({initialize:function(s,u,i,a,o){Array.isArray(i)||(i=[i]),this.manager=s,this.key=u,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61068),c=t(17487),l=t(56694),r=t(27119),n=t(86459),e=t(845),s=t(6659),u=t(38203),i=t(82047),a=t(97081),o=t(52780),h=t(10850),f=t(1539),v=t(42911),m=t(69150),x=t(74118),g=t(31673),y=new l({Extends:s,initialize:function(E){s.call(this),this.game=E,this.name="TextureManager",this.list={},this._tempCanvas=d.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new x,this.silentWarnings=!1,E.events.once(a.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(u.LOAD,this.updatePending,this),this.on(u.ERROR,this.updatePending,this);var T=this.game.config;this.addBase64("__DEFAULT",T.defaultImage),this.addBase64("__MISSING",T.missingImage),this.addBase64("__WHITE",T.whiteImage),this.game.events.once(a.DESTROY,this.destroy,this),this.game.events.once(a.SYSTEM_READY,function(E){this.stamp=new f(E).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(u.LOAD),this.off(u.ERROR),this.emit(u.READY))},checkKey:function(T){return this.exists(T)?(this.silentWarnings||console.error("Texture key already in use: "+T),!1):!0},remove:function(T){if(typeof T=="string")if(this.exists(T))T=this.get(T);else return this.silentWarnings||console.warn("No texture found matching key: "+T),this;var E=T.key;return this.list.hasOwnProperty(E)&&(T.destroy(),this.emit(u.REMOVE,E),this.emit(u.REMOVE_KEY+E)),this},removeKey:function(T){return this.list.hasOwnProperty(T)&&delete this.list[T],this},addBase64:function(T,E){if(this.checkKey(T)){var C=this,A=new Image;A.onerror=function(){C.emit(u.ERROR,T)},A.onload=function(){var P=C.create(T,A);m.Image(P,0),C.emit(u.ADD,T,P),C.emit(u.ADD_KEY+T,P),C.emit(u.LOAD,T,P)},A.src=E}return this},getBase64:function(T,E,C,A){C===void 0&&(C="image/png"),A===void 0&&(A=.92);var P="",R=this.getFrame(T,E);if(R&&(R.source.isRenderTexture||R.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(R){var F=R.canvasData,L=d.create2D(this,F.width,F.height),B=L.getContext("2d",{willReadFrequently:!0});F.width>0&&F.height>0&&B.drawImage(R.source.image,F.x,F.y,F.width,F.height,0,0,F.width,F.height),P=L.toDataURL(C,A),d.remove(L)}return P},addImage:function(T,E,C){var A=null;return this.checkKey(T)&&(A=this.create(T,E),m.Image(A,0),C&&A.setDataSource(C),this.emit(u.ADD,T,A),this.emit(u.ADD_KEY+T,A)),A},addGLTexture:function(T,E,C,A){var P=null;return this.checkKey(T)&&(C===void 0&&(C=E.width),A===void 0&&(A=E.height),P=this.create(T,E,C,A),P.add("__BASE",0,0,0,C,A),this.emit(u.ADD,T,P),this.emit(u.ADD_KEY+T,P)),P},addCompressedTexture:function(T,E,C){var A=null;if(this.checkKey(T)){if(A=this.create(T,E),A.add("__BASE",0,0,0,E.width,E.height),C)if(Array.isArray(C))for(var P=0;P=R.x&&T=R.y&&E=R.x&&T=R.y&&E{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61068),c=t(56694),l=t(28621),r=t(27394),n=new c({initialize:function(s,u,i,a,o){o===void 0&&(o=!1);var h=s.manager.game;this.renderer=h.renderer,this.texture=s,this.source=u,this.image=u.compressed?null:u,this.compressionAlgorithm=u.compressed?u.format:null,this.resolution=1,this.width=i||u.naturalWidth||u.videoWidth||u.width||0,this.height=a||u.naturalHeight||u.videoHeight||u.height||0,this.scaleMode=r.DEFAULT,this.isCanvas=u instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&u instanceof HTMLVideoElement,this.isRenderTexture=u.type==="RenderTexture"||u.type==="DynamicTexture",this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&u instanceof WebGLTexture,this.isPowerOf2=l(this.width,this.height),this.glTexture=null,this.flipY=o,this.init(h)},init:function(e){var s=this.renderer;if(s){var u=this.source;if(s.gl){var i=this.image,a=this.flipY,o=this.width,h=this.height,f=this.scaleMode;this.isCanvas?this.glTexture=s.createCanvasTexture(i,!1,a):this.isVideo?this.glTexture=s.createVideoTexture(i,!1,a):this.isRenderTexture?this.glTexture=s.createTextureFromSource(null,o,h,f):this.isGLTexture?this.glTexture=u:this.compressionAlgorithm?this.glTexture=s.createTextureFromSource(u):this.glTexture=s.createTextureFromSource(i,o,h,f)}else this.isRenderTexture&&(this.image=u.canvas)}e.config.antialias||this.setFilter(1)},setFilter:function(e){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,e),this.scaleMode=e},setFlipY:function(e){return e===void 0&&(e=!0),this.flipY=e,this},update:function(){var e=this.renderer,s=this.image,u=this.flipY,i=e.gl;i&&this.isCanvas?this.glTexture=e.updateCanvasTexture(s,this.glTexture,u):i&&this.isVideo&&(this.glTexture=e.updateVideoTexture(s,this.glTexture,u))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&d.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});p.exports=n},65154:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={LINEAR:0,NEAREST:1};p.exports=S},49644:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addtexture"},29569:p=>{/** + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addtexture-"},60079:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="onerror"},72665:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="onload"},93006:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="ready"},69018:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removetexture"},85549:p=>{/** + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removetexture-"},38203:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADD:t(49644),ADD_KEY:t(29569),ERROR:t(60079),LOAD:t(72665),READY:t(93006),REMOVE:t(69018),REMOVE_KEY:t(85549)}},87499:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(98611),c=t(65154),l={CanvasTexture:t(17487),DynamicTexture:t(845),Events:t(38203),FilterMode:c,Frame:t(82047),Parsers:t(69150),Texture:t(31673),TextureManager:t(6237),TextureSource:t(32547)};l=d(!1,l,c),p.exports=l},35082:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(!c.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var l=t.source[d];t.add("__BASE",d,0,0,l.width,l.height);for(var r=c.getElementsByTagName("SubTexture"),n,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.source[d];return t.add("__BASE",d,0,0,c.width,c.height),t};p.exports=S},21560:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.source[d];return t.add("__BASE",d,0,0,c.width,c.height),t};p.exports=S},64423:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(32742),c=function(l,r,n){if(!n.frames&&!n.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=l.source[r];l.add("__BASE",r,0,0,e.width,e.height);for(var s=Array.isArray(n.textures)?n.textures[r].frames:n.frames,u,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(32742),c=function(l,r,n){if(!n.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=l.source[r];l.add("__BASE",r,0,0,e.width,e.height);var s=n.frames,u;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];if(u=l.add(i,r,a.frame.x,a.frame.y,a.frame.w,a.frame.h),!u){console.warn("Invalid atlas json, frame already exists: "+i);continue}a.trimmed&&u.setTrim(a.sourceSize.w,a.sourceSize.h,a.spriteSourceSize.x,a.spriteSourceSize.y,a.spriteSourceSize.w,a.spriteSourceSize.h),a.rotated&&(u.rotated=!0,u.updateUVsInverted());var o=a.anchor||a.pivot;o&&(u.customPivot=!0,u.pivotX=o.x,u.pivotY=o.y),a.scale9Borders&&u.setScale9(a.scale9Borders.x,a.scale9Borders.y,a.scale9Borders.w,a.scale9Borders.h),u.customData=d(a)}for(var h in n)h!=="frames"&&(Array.isArray(n[h])?l.customData[h]=n[h].slice(0):l.customData[h]=n[h]);return l};p.exports=c},67409:p=>{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d=[171,75,84,88,32,49,49,187,13,10,26,10],c,l=new Uint8Array(t,0,12);for(c=0;c>1),x=Math.max(1,x>>1),v+=g}return{mipmaps:f,width:i,height:a,internalFormat:u,compressed:!0,generateMipmap:!1}};p.exports=S},24904:p=>{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function S(T,E,C,A,P,R,F){return F===void 0&&(F=16),Math.floor((T+C)/P)*Math.floor((E+A)/R)*F}function t(T,E){return T=Math.max(T,16),E=Math.max(E,8),T*E/4}function d(T,E){return T=Math.max(T,8),E=Math.max(E,8),T*E/2}function c(T,E){return S(T,E,3,3,4,4,8)}function l(T,E){return S(T,E,3,3,4,4)}function r(T,E){return S(T,E,4,3,5,4)}function n(T,E){return S(T,E,4,4,5,5)}function e(T,E){return S(T,E,5,4,6,5)}function s(T,E){return S(T,E,5,5,6,6)}function u(T,E){return S(T,E,7,4,8,5)}function i(T,E){return S(T,E,7,5,8,6)}function a(T,E){return S(T,E,7,7,8,8)}function o(T,E){return S(T,E,9,4,10,5)}function h(T,E){return S(T,E,9,5,10,6)}function f(T,E){return S(T,E,9,7,10,8)}function v(T,E){return S(T,E,9,9,10,10)}function m(T,E){return S(T,E,11,9,12,10)}function x(T,E){return S(T,E,11,11,12,12)}var g={0:{sizeFunc:t,glFormat:35841},1:{sizeFunc:t,glFormat:35843},2:{sizeFunc:d,glFormat:35840},3:{sizeFunc:d,glFormat:35842},6:{sizeFunc:c,glFormat:36196},7:{sizeFunc:c,glFormat:33776},8:{sizeFunc:l,glFormat:33777},9:{sizeFunc:l,glFormat:33778},11:{sizeFunc:l,glFormat:33779},22:{sizeFunc:c,glFormat:37492},23:{sizeFunc:l,glFormat:37496},24:{sizeFunc:c,glFormat:37494},25:{sizeFunc:c,glFormat:37488},26:{sizeFunc:l,glFormat:37490},27:{sizeFunc:l,glFormat:37808},28:{sizeFunc:r,glFormat:37809},29:{sizeFunc:n,glFormat:37810},30:{sizeFunc:e,glFormat:37811},31:{sizeFunc:s,glFormat:37812},32:{sizeFunc:u,glFormat:37813},33:{sizeFunc:i,glFormat:37814},34:{sizeFunc:a,glFormat:37815},35:{sizeFunc:o,glFormat:37816},36:{sizeFunc:h,glFormat:37817},37:{sizeFunc:f,glFormat:37818},38:{sizeFunc:v,glFormat:37819},39:{sizeFunc:m,glFormat:37820},40:{sizeFunc:x,glFormat:37821}},y=function(T){for(var E=new Uint32Array(T,0,13),C=E[2],A=g[C].glFormat,P=g[C].sizeFunc,R=E[11],F=E[7],L=E[6],B=52+E[12],N=new Uint8Array(T,B),U=new Array(R),z=0,w=F,I=L,M=0;M>1),I=Math.max(1,I>>1),z+=O}return{mipmaps:U,width:F,height:L,internalFormat:A,compressed:!0,generateMipmap:!1}};p.exports=y},6143:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72632),c=function(l,r,n,e,s,u,i){var a=d(i,"frameWidth",null),o=d(i,"frameHeight",a);if(a===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var h=l.source[r];l.add("__BASE",r,0,0,h.width,h.height);var f=d(i,"startFrame",0),v=d(i,"endFrame",-1),m=d(i,"margin",0),x=d(i,"spacing",0),g=Math.floor((s-m+x)/(a+x)),y=Math.floor((u-m+x)/(o+x)),T=g*y;T===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",l.key),(f>T||f<-T)&&(f=0),f<0&&(f=T+f),(v===-1||v>T||vs&&(A=L-s),B>u&&(P=B-u),F>=f&&F<=v&&(l.add(R,r,n+E,e+C,a-A,o-P),R++),E+=a+x,E+a>s&&(E=m,C+=o+x)}return l};p.exports=c},20030:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72632),c=function(l,r,n){var e=d(n,"frameWidth",null),s=d(n,"frameHeight",e);if(!e)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var u=l.source[0];l.add("__BASE",0,0,0,u.width,u.height),d(n,"startFrame",0),d(n,"endFrame",-1);for(var i=d(n,"margin",0),a=d(n,"spacing",0),o=r.cutX,h=r.cutY,f=r.cutWidth,v=r.cutHeight,m=r.realWidth,x=r.realHeight,g=Math.floor((m-i+a)/(e+a)),y=Math.floor((x-i+a)/(s+a)),T=r.x,E=e-T,C=e-(m-f-T),A=r.y,P=s-A,R=s-(x-v-A),F,L=i,B=i,N=0,U=0,z=0;z{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=0,t=function(c,l,r,n){var e=S-n.y-n.height;c.add(r,l,n.x,e,n.width,n.height)},d=function(c,l,r){var n=c.source[l];c.add("__BASE",l,0,0,n.width,n.height),S=n.height;for(var e=r.split(` +`),s=/^[ ]*(- )*(\w+)+[: ]+(.*)/,u="",i="",a={x:0,y:0,width:0,height:0},o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AtlasXML:t(35082),Canvas:t(83332),Image:t(21560),JSONArray:t(64423),JSONHash:t(17264),KTXParser:t(67409),PVRParser:t(24904),SpriteSheet:t(6143),SpriteSheetFromAtlas:t(20030),UnityYAML:t(89187)}},93560:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},97042:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r,n,e,s,u,i,a){(e===void 0||e<=0)&&(e=32),(s===void 0||s<=0)&&(s=32),u===void 0&&(u=0),i===void 0&&(i=0),this.name=r,this.firstgid=n|0,this.imageWidth=e|0,this.imageHeight=s|0,this.imageMargin=u|0,this.imageSpacing=i|0,this.properties=a||{},this.images=[],this.total=0},containsImageIndex:function(l){return l>=this.firstgid&&l{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=new d({initialize:function(r){if(this.gids=[],r!==void 0)for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93560),c=t(16586),l=t(90715),r=t(89797),n=function(e,s,u,i,a,o,h,f){u===void 0&&(u=32),i===void 0&&(i=32),a===void 0&&(a=10),o===void 0&&(o=10),f===void 0&&(f=!1);var v=null;if(Array.isArray(h)){var m=s!==void 0?s:"map";v=l(m,d.ARRAY_2D,h,u,i,f)}else if(s!==void 0){var x=e.cache.tilemap.get(s);x?v=l(s,x.format,x.data,u,i,f):console.warn("No map data found for key "+s)}return v===null&&(v=new c({tileWidth:u,tileHeight:i,width:a,height:o})),new r(e,v)};p.exports=n},29633:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(64937),l=t(12920),r=t(28699),n=t(66658),e=new d({Mixins:[c.AlphaSingle,c.Flip,c.Visible],initialize:function(u,i,a,o,h,f,v,m){this.layer=u,this.index=i,this.x=a,this.y=o,this.width=h,this.height=f,this.right,this.bottom,this.baseWidth=v!==void 0?v:h,this.baseHeight=m!==void 0?m:f,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(s,u){return!(sthis.right||u>this.bottom)},copy:function(s){return this.index=s.index,this.alpha=s.alpha,this.properties=r(s.properties),this.visible=s.visible,this.setFlip(s.flipX,s.flipY),this.tint=s.tint,this.rotation=s.rotation,this.collideUp=s.collideUp,this.collideDown=s.collideDown,this.collideLeft=s.collideLeft,this.collideRight=s.collideRight,this.collisionCallback=s.collisionCallback,this.collisionCallbackContext=s.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(s){var u=this.tilemapLayer;if(u){var i=u.tileToWorldXY(this.x,this.y,void 0,s);return i.x}return this.x*this.baseWidth},getRight:function(s){var u=this.tilemapLayer;return u?this.getLeft(s)+this.width*u.scaleX:this.getLeft(s)+this.width},getTop:function(s){var u=this.tilemapLayer;if(u){var i=u.tileToWorldXY(this.x,this.y,void 0,s);return i.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(s){var u=this.tilemapLayer;return u?this.getTop(s)+this.height*u.scaleY:this.getTop(s)+this.height},getBounds:function(s,u){return u===void 0&&(u=new n),u.x=this.getLeft(s),u.y=this.getTop(s),u.width=this.getRight(s)-u.x,u.height=this.getBottom(s)-u.y,u},getCenterX:function(s){return(this.getLeft(s)+this.getRight(s))/2},getCenterY:function(s){return(this.getTop(s)+this.getBottom(s))/2},intersects:function(s,u,i,a){return!(i<=this.pixelX||a<=this.pixelY||s>=this.right||u>=this.bottom)},isInteresting:function(s,u){return s&&u?this.canCollide||this.hasInterestingFace:s?this.collides:u?this.hasInterestingFace:!1},resetCollision:function(s){if(s===void 0&&(s=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,s){var u=this.tilemapLayer;u&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(s,u,i,a,o){if(u===void 0&&(u=s),i===void 0&&(i=s),a===void 0&&(a=s),o===void 0&&(o=!0),this.collideLeft=s,this.collideRight=u,this.collideUp=i,this.collideDown=a,this.faceLeft=s,this.faceRight=u,this.faceTop=i,this.faceBottom=a,o){var h=this.tilemapLayer;h&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(s,u){return s===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=s,this.collisionCallbackContext=u),this},setSize:function(s,u,i,a){return s!==void 0&&(this.width=s),u!==void 0&&(this.height=u),i!==void 0&&(this.baseWidth=i),a!==void 0&&(this.baseHeight=a),this.updatePixelXY(),this},updatePixelXY:function(){var s=this.layer.orientation;if(s===l.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(s===l.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(s===l.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(s===l.HEXAGONAL){var u=this.layer.staggerAxis,i=this.layer.staggerIndex,a=this.layer.hexSideLength,o,h;u==="y"?(h=(this.baseHeight-a)/2+a,i==="odd"?this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.pixelX=this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*h):u==="x"&&(o=(this.baseWidth-a)/2+a,this.pixelX=this.x*o,i==="odd"?this.pixelY=this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.pixelY=this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var s=this.layer.tilemapLayer;if(s){var u=s.gidMap[this.index];if(u)return u}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var s=this.tilemapLayer;return s?s.tilemap:null}}});p.exports=e},89797:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(14556),c=t(56694),l=t(75606),r=t(93560),n=t(72632),e=t(94990),s=t(46422),u=t(12920),i=t(52257),a=t(72677),o=t(13747),h=t(29633),f=t(5047),v=t(87177),m=t(47975),x=new c({initialize:function(y,T){this.scene=y,this.tileWidth=T.tileWidth,this.tileHeight=T.tileHeight,this.width=T.width,this.height=T.height,this.orientation=T.orientation,this.renderOrder=T.renderOrder,this.format=T.format,this.version=T.version,this.properties=T.properties,this.widthInPixels=T.widthInPixels,this.heightInPixels=T.heightInPixels,this.imageCollections=T.imageCollections,this.images=T.images,this.layers=T.layers,this.tiles=T.tiles,this.tilesets=T.tilesets,this.objects=T.objects,this.currentLayerIndex=0,this.hexSideLength=T.hexSideLength;var E=this.orientation;this._convert={WorldToTileXY:f.GetWorldToTileXYFunction(E),WorldToTileX:f.GetWorldToTileXFunction(E),WorldToTileY:f.GetWorldToTileYFunction(E),TileToWorldXY:f.GetTileToWorldXYFunction(E),TileToWorldX:f.GetTileToWorldXFunction(E),TileToWorldY:f.GetTileToWorldYFunction(E),GetTileCorners:f.GetTileCornersFunction(E)}},setRenderOrder:function(g){var y=["right-down","left-down","right-up","left-up"];return typeof g=="number"&&(g=y[g]),y.indexOf(g)>-1&&(this.renderOrder=g),this},addTilesetImage:function(g,y,T,E,C,A,P,R){if(g===void 0)return null;if(y==null&&(y=g),!this.scene.sys.textures.exists(y))return console.warn("Invalid Tileset Image: "+y),null;var F=this.scene.sys.textures.get(y),L=this.getTilesetIndex(g);if(L===null&&this.format===r.TILED_JSON)return console.warn("No data found for Tileset: "+g),null;var B=this.tilesets[L];return B?(B.setTileSize(T,E),B.setSpacing(C,A),B.setImage(F),B):(T===void 0&&(T=this.tileWidth),E===void 0&&(E=this.tileHeight),C===void 0&&(C=0),A===void 0&&(A=0),P===void 0&&(P=0),R===void 0&&(R={x:0,y:0}),B=new m(g,P,T,E,C,A,void 0,void 0,R),B.setImage(F),this.tilesets.push(B),this.tiles=d(this),B)},copy:function(g,y,T,E,C,A,P,R){return R=this.getLayer(R),R!==null?(f.Copy(g,y,T,E,C,A,P,R),this):null},createBlankLayer:function(g,y,T,E,C,A,P,R){T===void 0&&(T=0),E===void 0&&(E=0),C===void 0&&(C=this.width),A===void 0&&(A=this.height),P===void 0&&(P=this.tileWidth),R===void 0&&(R=this.tileHeight);var F=this.getLayerIndex(g);if(F!==null)return console.warn("Invalid Tilemap Layer ID: "+g),null;for(var L=new e({name:g,tileWidth:P,tileHeight:R,width:C,height:A,orientation:this.orientation}),B,N=0;N-1&&this.putTileAt(y,A.x,A.y,T,A.tilemapLayer)}return E},removeTileAt:function(g,y,T,E,C){return T===void 0&&(T=!0),E===void 0&&(E=!0),C=this.getLayer(C),C===null?null:f.RemoveTileAt(g,y,T,E,C)},removeTileAtWorldXY:function(g,y,T,E,C,A){return T===void 0&&(T=!0),E===void 0&&(E=!0),A=this.getLayer(A),A===null?null:f.RemoveTileAtWorldXY(g,y,T,E,C,A)},renderDebug:function(g,y,T){return T=this.getLayer(T),T===null?null:(this.orientation===u.ORTHOGONAL&&f.RenderDebug(g,y,T),this)},renderDebugFull:function(g,y){for(var T=this.layers,E=0;E{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(99325),c=t(15043);d.register("tilemap",function(l){var r=l!==void 0?l:{};return c(this.scene,r.key,r.tileWidth,r.tileHeight,r.width,r.height,r.data,r.insertNull)})},37940:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(61286),c=t(15043);d.register("tilemap",function(l,r,n,e,s,u,i){return l===null&&(l=void 0),r===null&&(r=void 0),n===null&&(n=void 0),e===null&&(e=void 0),s===null&&(s=void 0),c(this.scene,l,r,n,e,s,u,i)})},87177:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(95239),l=t(64937),r=t(89980),n=t(5047),e=t(96193),s=t(93736),u=new d({Extends:r,Mixins:[l.Alpha,l.BlendMode,l.ComputedSize,l.Depth,l.Flip,l.GetBounds,l.Mask,l.Origin,l.Pipeline,l.PostPipeline,l.Transform,l.Visible,l.ScrollFactor,c,e],initialize:function(a,o,h,f,v,m){r.call(this,a,"TilemapLayer"),this.isTilemap=!0,this.tilemap=o,this.layerIndex=h,this.layer=o.layers[h],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=n.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new s,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(f),this.setAlpha(this.layer.alpha),this.setPosition(v,m),this.setOrigin(0,0),this.setSize(o.tileWidth*this.layer.width,o.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(i){var a=[],o=[],h=this.tilemap;Array.isArray(i)||(i=[i]);for(var f=0;f=0&&i<4&&(this._renderOrder=i),this},calculateFacesAt:function(i,a){return n.CalculateFacesAt(i,a,this.layer),this},calculateFacesWithin:function(i,a,o,h){return n.CalculateFacesWithin(i,a,o,h,this.layer),this},createFromTiles:function(i,a,o,h,f){return n.CreateFromTiles(i,a,o,h,f,this.layer)},cull:function(i){return this.cullCallback(this.layer,i,this.culledTiles,this._renderOrder)},copy:function(i,a,o,h,f,v,m){return n.Copy(i,a,o,h,f,v,m,this.layer),this},fill:function(i,a,o,h,f,v){return n.Fill(i,a,o,h,f,v,this.layer),this},filterTiles:function(i,a,o,h,f,v,m){return n.FilterTiles(i,a,o,h,f,v,m,this.layer)},findByIndex:function(i,a,o){return n.FindByIndex(i,a,o,this.layer)},findTile:function(i,a,o,h,f,v,m){return n.FindTile(i,a,o,h,f,v,m,this.layer)},forEachTile:function(i,a,o,h,f,v,m){return n.ForEachTile(i,a,o,h,f,v,m,this.layer),this},setTint:function(i,a,o,h,f,v){i===void 0&&(i=16777215);var m=function(x){x.tint=i,x.tintFill=!1};return this.forEachTile(m,this,a,o,h,f,v)},setTintFill:function(i,a,o,h,f,v){i===void 0&&(i=16777215);var m=function(x){x.tint=i,x.tintFill=!0};return this.forEachTile(m,this,a,o,h,f,v)},getTileAt:function(i,a,o){return n.GetTileAt(i,a,o,this.layer)},getTileAtWorldXY:function(i,a,o,h){return n.GetTileAtWorldXY(i,a,o,h,this.layer)},getIsoTileAtWorldXY:function(i,a,o,h,f){o===void 0&&(o=!0);var v=this.tempVec;return n.IsometricWorldToTileXY(i,a,!0,v,f,this.layer,o),this.getTileAt(v.x,v.y,h)},getTilesWithin:function(i,a,o,h,f){return n.GetTilesWithin(i,a,o,h,f,this.layer)},getTilesWithinShape:function(i,a,o){return n.GetTilesWithinShape(i,a,o,this.layer)},getTilesWithinWorldXY:function(i,a,o,h,f,v){return n.GetTilesWithinWorldXY(i,a,o,h,f,v,this.layer)},hasTileAt:function(i,a){return n.HasTileAt(i,a,this.layer)},hasTileAtWorldXY:function(i,a,o){return n.HasTileAtWorldXY(i,a,o,this.layer)},putTileAt:function(i,a,o,h){return n.PutTileAt(i,a,o,h,this.layer)},putTileAtWorldXY:function(i,a,o,h,f){return n.PutTileAtWorldXY(i,a,o,h,f,this.layer)},putTilesAt:function(i,a,o,h){return n.PutTilesAt(i,a,o,h,this.layer),this},randomize:function(i,a,o,h,f){return n.Randomize(i,a,o,h,f,this.layer),this},removeTileAt:function(i,a,o,h){return n.RemoveTileAt(i,a,o,h,this.layer)},removeTileAtWorldXY:function(i,a,o,h,f){return n.RemoveTileAtWorldXY(i,a,o,h,f,this.layer)},renderDebug:function(i,a){return n.RenderDebug(i,a,this.layer),this},replaceByIndex:function(i,a,o,h,f,v){return n.ReplaceByIndex(i,a,o,h,f,v,this.layer),this},setSkipCull:function(i){return i===void 0&&(i=!0),this.skipCull=i,this},setCullPadding:function(i,a){return i===void 0&&(i=1),a===void 0&&(a=1),this.cullPaddingX=i,this.cullPaddingY=a,this},setCollision:function(i,a,o,h){return n.SetCollision(i,a,o,this.layer,h),this},setCollisionBetween:function(i,a,o,h){return n.SetCollisionBetween(i,a,o,h,this.layer),this},setCollisionByProperty:function(i,a,o){return n.SetCollisionByProperty(i,a,o,this.layer),this},setCollisionByExclusion:function(i,a,o){return n.SetCollisionByExclusion(i,a,o,this.layer),this},setCollisionFromCollisionGroup:function(i,a){return n.SetCollisionFromCollisionGroup(i,a,this.layer),this},setTileIndexCallback:function(i,a,o){return n.SetTileIndexCallback(i,a,o,this.layer),this},setTileLocationCallback:function(i,a,o,h,f,v){return n.SetTileLocationCallback(i,a,o,h,f,v,this.layer),this},shuffle:function(i,a,o,h){return n.Shuffle(i,a,o,h,this.layer),this},swapByIndex:function(i,a,o,h,f,v){return n.SwapByIndex(i,a,o,h,f,v,this.layer),this},tileToWorldX:function(i,a){return this.tilemap.tileToWorldX(i,a,this)},tileToWorldY:function(i,a){return this.tilemap.tileToWorldY(i,a,this)},tileToWorldXY:function(i,a,o,h){return this.tilemap.tileToWorldXY(i,a,o,h,this)},getTileCorners:function(i,a,o){return this.tilemap.getTileCorners(i,a,o,this)},weightedRandomize:function(i,a,o,h,f){return n.WeightedRandomize(a,o,h,f,i,this.layer),this},worldToTileX:function(i,a,o){return this.tilemap.worldToTileX(i,a,o,this)},worldToTileY:function(i,a,o){return this.tilemap.worldToTileY(i,a,o,this)},worldToTileXY:function(i,a,o,h,f){return this.tilemap.worldToTileXY(i,a,o,h,f,this)},destroy:function(i){i===void 0&&(i=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),i&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});p.exports=u},17394:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(69360),c=new d,l=new d,r=new d,n=function(e,s,u,i){var a=s.cull(u),o=a.length,h=u.alpha*s.alpha;if(!(o===0||h<=0)){var f=c,v=l,m=r;v.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),f.copyFrom(u.matrix);var x=e.currentContext,g=s.gidMap;x.save(),i?(f.multiplyWithOffset(i,-u.scrollX*s.scrollFactorX,-u.scrollY*s.scrollFactorY),v.e=s.x,v.f=s.y,f.multiply(v,m),m.copyToContext(x)):(v.e-=u.scrollX*s.scrollFactorX,v.f-=u.scrollY*s.scrollFactorY,v.copyToContext(x)),(!e.antialias||s.scaleX>1||s.scaleY>1)&&(x.imageSmoothingEnabled=!1);for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72283),c=d,l=d;c=t(51395),l=t(17394),p.exports={renderWebGL:c,renderCanvas:l}},51395:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(75512),c=function(l,r,n){var e=r.cull(n),s=e.length,u=n.alpha*r.alpha;if(!(s===0||u<=0)){var i=r.gidMap,a=l.pipelines.set(r.pipeline,r),o=d.getTintAppendFloatAlpha,h=r.scrollFactorX,f=r.scrollFactorY,v=r.x,m=r.y,x=r.scaleX,g=r.scaleY;l.pipelines.preBatch(r);for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(93736),l=new d({initialize:function(n,e,s,u,i,a,o,h,f){(s===void 0||s<=0)&&(s=32),(u===void 0||u<=0)&&(u=32),i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o={}),h===void 0&&(h={}),this.name=n,this.firstgid=e,this.tileWidth=s,this.tileHeight=u,this.tileMargin=i,this.tileSpacing=a,this.tileProperties=o,this.tileData=h,this.tileOffset=new c,f!==void 0&&this.tileOffset.set(f.x,f.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(r){return this.containsTileIndex(r)?this.tileProperties[r-this.firstgid]:null},getTileData:function(r){return this.containsTileIndex(r)?this.tileData[r-this.firstgid]:null},getTileCollisionGroup:function(r){var n=this.getTileData(r);return n&&n.objectgroup?n.objectgroup:null},containsTileIndex:function(r){return r>=this.firstgid&&r{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15494),c=function(l,r,n){var e=d(l,r,!0,n),s=d(l,r-1,!0,n),u=d(l,r+1,!0,n),i=d(l-1,r,!0,n),a=d(l+1,r,!0,n),o=e&&e.collides;return o&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),s&&s.collides&&(o&&(e.faceTop=!1),s.faceBottom=!o),u&&u.collides&&(o&&(e.faceBottom=!1),u.faceTop=!o),i&&i.collides&&(o&&(e.faceLeft=!1),i.faceRight=!o),a&&a.collides&&(o&&(e.faceRight=!1),a.faceLeft=!o),e&&!e.collides&&e.resetFaces(),e};p.exports=c},60386:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15494),c=t(50811),l=function(r,n,e,s,u){for(var i=null,a=null,o=null,h=null,f=c(r,n,e,s,null,u),v=0;v{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736),c=new d,l=function(r,n,e,s){var u=e.tilemapLayer,i=u.cullPaddingX,a=u.cullPaddingY,o=u.tilemap.tileToWorldXY(r,n,c,s,u);return o.x>s.worldView.x+u.scaleX*e.tileWidth*(-i-.5)&&o.xs.worldView.y+u.scaleY*e.tileHeight*(-a-1)&&o.y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(60386),c=t(50811),l=t(62839),r=t(29633),n=function(e,s,u,i,a,o,h,f){h===void 0&&(h=!0);var v=c(e,s,u,i,null,f),m=[];v.forEach(function(A){var P=new r(A.layer,A.index,A.x,A.y,A.width,A.height,A.baseWidth,A.baseHeight);P.copy(A),m.push(P)});for(var x=a-e,g=o-s,y=0;y{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=t(51202),l=function(r,n,e,s,u,i){e||(e={}),Array.isArray(r)||(r=[r]);var a=i.tilemapLayer;s||(s=a.scene),u||(u=s.cameras.main);var o=d(0,0,i.width,i.height,null,i),h=[],f;for(f=0;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(74118),c=t(82127),l=t(84314),r=new d,n=function(e,s){var u=e.tilemapLayer.tilemap,i=e.tilemapLayer,a=Math.floor(u.tileWidth*i.scaleX),o=Math.floor(u.tileHeight*i.scaleY),h=l(s.worldView.x-i.x,a,0,!0)-i.cullPaddingX,f=c(s.worldView.right-i.x,a,0,!0)+i.cullPaddingX,v=l(s.worldView.y-i.y,o,0,!0)-i.cullPaddingY,m=c(s.worldView.bottom-i.y,o,0,!0)+i.cullPaddingY;return r.setTo(h,v,f-h,m-v)};p.exports=n},381:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(71586),c=t(6987),l=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var u=r.tilemapLayer,i=d(r,n);return(u.skipCull||u.scrollFactorX!==1||u.scrollFactorY!==1)&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=l},97734:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=t(60386),l=t(68234),r=function(n,e,s,u,i,a,o){for(var h=o.collideIndexes.indexOf(n)!==-1,f=d(e,s,u,i,null,o),v=0;v{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=function(l,r,n,e,s,u,i,a){var o=d(n,e,s,u,i,a);return o.filter(l,r)};p.exports=c},37982:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){d===void 0&&(d=0),c===void 0&&(c=!1);var r=0,n,e,s;if(c){for(e=l.height-1;e>=0;e--)for(n=l.width-1;n>=0;n--)if(s=l.data[e][n],s&&s.index===t){if(r===d)return s;r+=1}}else for(e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=function(l,r,n,e,s,u,i,a){var o=d(n,e,s,u,i,a);return o.find(l,r)||null};p.exports=c},80916:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=function(l,r,n,e,s,u,i,a){var o=d(n,e,s,u,i,a);o.forEach(l,r)};p.exports=c},31493:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12920),c=t(381),l=t(37524),r=t(20887),n=t(72283),e=t(19242),s=function(u){return u===d.ORTHOGONAL?c:u===d.HEXAGONAL?l:u===d.STAGGERED?e:u===d.ISOMETRIC?r:n};p.exports=s},15494:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62839),c=function(l,r,n,e){if(n===void 0&&(n=!1),d(l,r,e)){var s=e.data[r][l]||null;return s?s.index===-1?n?s:null:s:null}else return null};p.exports=c},24640:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(15494),c=t(93736),l=new c,r=function(n,e,s,u,i){return i.tilemapLayer.worldToTileXY(n,e,!0,l,u),d(l.x,l.y,s,i)};p.exports=r},48495:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736),c=function(l,r,n,e){var s=e.baseTileWidth,u=e.baseTileHeight,i=e.tilemapLayer,a=0,o=0;i&&(n||(n=i.scene.cameras.main),a=i.x+n.scrollX*(1-i.scrollFactorX),o=i.y+n.scrollY*(1-i.scrollFactorY),s*=i.scaleX,u*=i.scaleY);var h=a+l*s,f=o+r*u;return[new d(h,f),new d(h+s,f),new d(h+s,f+u),new d(h,f+u)]};p.exports=c},7160:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12920),c=t(63634),l=t(72283),r=t(48495),n=function(e){return e===d.ORTHOGONAL?r:e===d.ISOMETRIC?l:e===d.HEXAGONAL?c:(e===d.STAGGERED,l)};p.exports=n},16884:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12920),c=t(72283),l=t(44150),r=function(n){return n===d.ORTHOGONAL?l:c};p.exports=r},68182:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12920),c=t(21715),l=t(21808),r=t(72283),n=t(33388),e=t(46836),s=function(u){return u===d.ORTHOGONAL?e:u===d.ISOMETRIC?l:u===d.HEXAGONAL?c:u===d.STAGGERED?n:r};p.exports=s},3752:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12920),c=t(72283),l=t(84132),r=t(42477),n=function(e){return e===d.ORTHOGONAL?r:e===d.STAGGERED?l:c};p.exports=n},50811:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72632),c=function(l,r,n,e,s,u){l===void 0&&(l=0),r===void 0&&(r=0),n===void 0&&(n=u.width),e===void 0&&(e=u.height),s||(s={});var i=d(s,"isNotEmpty",!1),a=d(s,"isColliding",!1),o=d(s,"hasInterestingFace",!1);l<0&&(n+=l,l=0),r<0&&(e+=r,r=0),l+n>u.width&&(n=Math.max(u.width-l,0)),r+e>u.height&&(e=Math.max(u.height-r,0));for(var h=[],f=r;f{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(84068),c=t(50811),l=t(7563),r=t(72283),n=t(93736),e=function(o,h){return l.RectangleToTriangle(h,o)},s=new n,u=new n,i=new n,a=function(o,h,f,v){if(o===void 0)return[];var m=r;o instanceof d.Circle?m=l.CircleToRectangle:o instanceof d.Rectangle?m=l.RectangleToRectangle:o instanceof d.Triangle?m=e:o instanceof d.Line&&(m=l.LineToRectangle),v.tilemapLayer.worldToTileXY(o.left,o.top,!0,u,f);var x=u.x,g=u.y;v.tilemapLayer.worldToTileXY(o.right,o.bottom,!1,i,f);var y=Math.ceil(i.x),T=Math.ceil(i.y),E=Math.max(y-x,1),C=Math.max(T-g,1),A=c(x,g,E,C,h,v),P=v.tileWidth,R=v.tileHeight;v.tilemapLayer&&(P*=v.tilemapLayer.scaleX,R*=v.tilemapLayer.scaleY);for(var F=[],L=new d.Rectangle(0,0,P,R),B=0;B{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=t(93736),l=new c,r=new c,n=function(e,s,u,i,a,o,h){var f=h.tilemapLayer.tilemap._convert.WorldToTileXY;f(e,s,!0,l,o,h);var v=l.x,m=l.y;f(e+u,s+i,!1,r,o,h);var x=Math.ceil(r.x),g=Math.ceil(r.y);return d(v,m,x-v,g-m,a,h)};p.exports=n},29296:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12920),c=t(10618),l=t(806),r=function(n){return n===d.ORTHOGONAL?l:c};p.exports=r},32688:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12920),c=t(11516),l=t(18750),r=t(72283),n=t(90562),e=t(45676),s=function(u){return u===d.ORTHOGONAL?e:u===d.ISOMETRIC?l:u===d.HEXAGONAL?c:u===d.STAGGERED?n:r};p.exports=s},74326:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12920),c=t(10618),l=t(3689),r=t(70520),n=function(e){return e===d.ORTHOGONAL?r:e===d.STAGGERED?l:c};p.exports=n},46598:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(62839),c=function(l,r,n){if(d(l,r,n)){var e=n.data[r][l];return e!==null&&e.index>-1}else return!1};p.exports=c},28654:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(46598),c=t(93736),l=new c,r=function(n,e,s,u){u.tilemapLayer.worldToTileXY(n,e,!0,l,s);var i=l.x,a=l.y;return d(i,a,u)};p.exports=r},6358:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82127),c=t(84314),l=function(r,n){var e=r.tilemapLayer.tilemap,s=r.tilemapLayer,u=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),a=r.hexSideLength,o,h,f,v;if(r.staggerAxis==="y"){var m=(i-a)/2+a;o=c(n.worldView.x-s.x,u,0,!0)-s.cullPaddingX,h=d(n.worldView.right-s.x,u,0,!0)+s.cullPaddingX,f=c(n.worldView.y-s.y,m,0,!0)-s.cullPaddingY,v=d(n.worldView.bottom-s.y,m,0,!0)+s.cullPaddingY}else{var x=(u-a)/2+a;o=c(n.worldView.x-s.x,x,0,!0)-s.cullPaddingX,h=d(n.worldView.right-s.x,x,0,!0)+s.cullPaddingX,f=c(n.worldView.y-s.y,i,0,!0)-s.cullPaddingY,v=d(n.worldView.bottom-s.y,i,0,!0)+s.cullPaddingY}return{left:o,right:h,top:f,bottom:v}};p.exports=l},37524:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(6358),c=t(6987),l=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var u=r.tilemapLayer,i=d(r,n);return u.skipCull&&u.scrollFactorX===1&&u.scrollFactorY===1&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=l},63634:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(21715),c=t(93736),l=new c,r=function(n,e,s,u){var i=u.baseTileWidth,a=u.baseTileHeight,o=u.tilemapLayer;o&&(i*=o.scaleX,a*=o.scaleY);var h=d(n,e,l,s,u),f=[],v=.5773502691896257,m,x;u.staggerAxis==="y"?(m=v*i,x=a/2):(m=i/2,x=v*a);for(var g=0;g<6;g++){var y=2*Math.PI*(.5-g)/6;f.push(new c(h.x+m*Math.cos(y),h.y+x*Math.sin(y)))}return f};p.exports=r},21715:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736),c=function(l,r,n,e,s){n||(n=new d);var u=s.baseTileWidth,i=s.baseTileHeight,a=s.tilemapLayer,o=0,h=0;a&&(e||(e=a.scene.cameras.main),o=a.x+e.scrollX*(1-a.scrollFactorX),h=a.y+e.scrollY*(1-a.scrollFactorY),u*=a.scaleX,i*=a.scaleY);var f=u/2,v=i/2,m,x;return s.staggerAxis==="y"?(m=o+u*l+u,x=h+1.5*r*v+v,r%2===0&&(this.staggerIndex==="odd"?m-=f:m+=f)):this.staggerAxis==="x"&&this.staggerIndex==="odd"&&(m=o+1.5*l*f+f,x=h+i*l+i,l%2===0&&(this.staggerIndex==="odd"?x-=v:x+=v)),n.set(m,x)};p.exports=c},11516:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736),c=function(l,r,n,e,s,u){e||(e=new d);var i=u.baseTileWidth,a=u.baseTileHeight,o=u.tilemapLayer;o&&(s||(s=o.scene.cameras.main),l=l-(o.x+s.scrollX*(1-o.scrollFactorX)),r=r-(o.y+s.scrollY*(1-o.scrollFactorY)),i*=o.scaleX,a*=o.scaleY);var h=.5773502691896257,f=-.3333333333333333,v=0,m=.6666666666666666,x=i/2,g=a/2,y,T,E,C,A;u.staggerAxis==="y"?(y=(l-x)/(h*i),T=(r-g)/g,E=h*y+f*T,C=v*y+m*T):(y=(l-x)/x,T=(r-g)/(h*a),E=f*y+h*T,C=m*y+v*T),A=-E-C;var P=Math.round(E),R=Math.round(C),F=Math.round(A),L=Math.abs(P-E),B=Math.abs(R-C),N=Math.abs(F-A);L>B&&L>N?P=-R-F:B>N&&(R=-P-F);var U,z=R;return u.staggerIndex==="odd"?U=z%2===0?R/2+P:R/2+P-.5:U=z%2===0?R/2+P:R/2+P+.5,e.set(U,z)};p.exports=c},62839:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t>=0&&t=0&&d{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(13125),c=function(l,r,n,e){n===void 0&&(n=[]),e===void 0&&(e=0),n.length=0;var s=l.tilemapLayer,u=l.data,i=l.width,a=l.height,o=s.skipCull,h=0,f=i,v=0,m=a,x,g,y;if(e===0){for(g=v;g=h;x--)if(o||d(x,g,l,r)){if(y=u[g][x],!y||y.index===-1||!y.visible||y.alpha===0)continue;n.push(y)}}else if(e===2){for(g=m;g>=v;g--)for(x=h;x=v;g--)for(x=f;x>=h;x--)if(o||d(x,g,l,r)){if(y=u[g][x],!y||y.index===-1||!y.visible||y.alpha===0)continue;n.push(y)}}return s.tilesDrawn=n.length,s.tilesTotal=i*a,n};p.exports=c},21808:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736),c=function(l,r,n,e,s){n||(n=new d);var u=s.baseTileWidth,i=s.baseTileHeight,a=s.tilemapLayer,o=0,h=0;a&&(e||(e=a.scene.cameras.main),o=a.x+e.scrollX*(1-a.scrollFactorX),u*=a.scaleX,h=a.y+e.scrollY*(1-a.scrollFactorY),i*=a.scaleY);var f=o+(l-r)*(u/2),v=h+(l+r)*(i/2);return n.set(f,v)};p.exports=c},18750:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736),c=function(l,r,n,e,s,u,i){e||(e=new d);var a=u.baseTileWidth,o=u.baseTileHeight,h=u.tilemapLayer;h&&(s||(s=h.scene.cameras.main),r=r-(h.y+s.scrollY*(1-h.scrollFactorY)),o*=h.scaleY,l=l-(h.x+s.scrollX*(1-h.scrollFactorX)),a*=h.scaleX);var f=a/2,v=o/2;l=l-f,i||(r=r-o);var m=.5*(l/f+r/v),x=.5*(-l/f+r/v);return n&&(m=Math.floor(m),x=Math.floor(x)),e.set(m,x)};p.exports=c},29003:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29633),c=t(62839),l=t(92839),r=t(68234),n=function(e,s,u,i,a){if(i===void 0&&(i=!0),!c(s,u,a))return null;var o,h=a.data[u][s],f=h&&h.collides;e instanceof d?(a.data[u][s]===null&&(a.data[u][s]=new d(a,e.index,s,u,a.tileWidth,a.tileHeight)),a.data[u][s].copy(e)):(o=e,a.data[u][s]===null?a.data[u][s]=new d(a,o,s,u,a.tileWidth,a.tileHeight):a.data[u][s].index=o);var v=a.data[u][s],m=a.collideIndexes.indexOf(v.index)!==-1;if(o=e instanceof d?e.index:e,o===-1)v.width=a.tileWidth,v.height=a.tileHeight;else{var x=a.tilemapLayer.tilemap,g=x.tiles,y=g[o][2],T=x.tilesets[y];v.width=T.tileWidth,v.height=T.tileHeight}return r(v,m),i&&f!==v.collides&&l(s,u,a),v};p.exports=n},48565:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29003),c=t(93736),l=new c,r=function(n,e,s,u,i,a){return a.tilemapLayer.worldToTileXY(e,s,!0,l,i,a),d(n,l.x,l.y,u,a)};p.exports=r},56547:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(60386),c=t(29003),l=function(r,n,e,s,u){if(s===void 0&&(s=!0),!Array.isArray(r))return null;Array.isArray(r[0])||(r=[r]);for(var i=r.length,a=r[0].length,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=t(72861),l=function(r,n,e,s,u,i){var a,o=d(r,n,e,s,{},i);if(!u)for(u=[],a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(29633),c=t(62839),l=t(92839),r=function(n,e,s,u,i){if(s===void 0&&(s=!0),u===void 0&&(u=!0),!c(n,e,i))return null;var a=i.data[e][n];if(a)i.data[e][n]=s?null:new d(i,-1,n,e,i.tileWidth,i.tileHeight);else return null;return u&&a&&a.collides&&l(n,e,i),a};p.exports=r},17384:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(929),c=t(93736),l=new c,r=function(n,e,s,u,i,a){return a.tilemapLayer.worldToTileXY(n,e,!0,l,i,a),d(l.x,l.y,s,u,a)};p.exports=r},93763:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=t(95509),l=new c(105,210,231,150),r=new c(243,134,48,200),n=new c(40,39,37,150),e=function(s,u,i){u===void 0&&(u={});var a=u.tileColor!==void 0?u.tileColor:l,o=u.collidingTileColor!==void 0?u.collidingTileColor:r,h=u.faceColor!==void 0?u.faceColor:n,f=d(0,0,i.width,i.height,null,i);s.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),s.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var v=0;v{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=function(l,r,n,e,s,u,i){for(var a=d(n,e,s,u,null,i),o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r=t.data,n=t.width,e=t.height,s=t.tilemapLayer,u=Math.max(0,d.left),i=Math.min(n,d.right),a=Math.max(0,d.top),o=Math.min(e,d.bottom),h,f,v;if(c===0)for(f=a;f=u;h--)v=r[f][h],!(!v||v.index===-1||!v.visible||v.alpha===0)&&l.push(v);else if(c===2)for(f=o;f>=a;f--)for(h=u;r[f]&&h=a;f--)for(h=i;r[f]&&h>=u;h--)v=r[f][h],!(!v||v.index===-1||!v.visible||v.alpha===0)&&l.push(v);return s.tilesDrawn=l.length,s.tilesTotal=n*e,l};p.exports=S},51710:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(68234),c=t(60386),l=t(91181),r=function(n,e,s,u,i){e===void 0&&(e=!0),s===void 0&&(s=!0),i===void 0&&(i=!0),Array.isArray(n)||(n=[n]);for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(68234),c=t(60386),l=t(91181),r=function(n,e,s,u,i,a){if(s===void 0&&(s=!0),u===void 0&&(u=!0),a===void 0&&(a=!0),!(n>e)){for(var o=n;o<=e;o++)l(o,s,i);if(a)for(var h=0;h=n&&v.index<=e&&d(v,s)}u&&c(0,0,i.width,i.height,i)}};p.exports=r},33158:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(68234),c=t(60386),l=t(91181),r=function(n,e,s,u){e===void 0&&(e=!0),s===void 0&&(s=!0),Array.isArray(n)||(n=[n]);for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(68234),c=t(60386),l=t(19256),r=function(n,e,s,u){e===void 0&&(e=!0),s===void 0&&(s=!0);for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(68234),c=t(60386),l=function(r,n,e){r===void 0&&(r=!0),n===void 0&&(n=!0);for(var s=0;s0&&d(i,r)}}n&&c(0,0,e.width,e.height,e)};p.exports=l},91181:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=c.collideIndexes.indexOf(t);d&&l===-1?c.collideIndexes.push(t):!d&&l!==-1&&c.collideIndexes.splice(l,1)};p.exports=S},68234:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};p.exports=S},11628:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){if(typeof t=="number")l.callbacks[t]=d!==null?{callback:d,callbackContext:c}:void 0;else for(var r=0,n=t.length;r{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=function(l,r,n,e,s,u,i){for(var a=d(l,r,n,e,null,i),o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=t(18592),l=function(r,n,e,s,u){var i=d(r,n,e,s,null,u),a=i.map(function(h){return h.index});c(a);for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(82127),c=t(84314),l=function(r,n){var e=r.tilemapLayer.tilemap,s=r.tilemapLayer,u=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),a=c(n.worldView.x-s.x,u,0,!0)-s.cullPaddingX,o=d(n.worldView.right-s.x,u,0,!0)+s.cullPaddingX,h=c(n.worldView.y-s.y,i/2,0,!0)-s.cullPaddingY,f=d(n.worldView.bottom-s.y,i/2,0,!0)+s.cullPaddingY;return{left:a,right:o,top:h,bottom:f}};p.exports=l},19242:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(53945),c=t(6987),l=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var u=r.tilemapLayer,i=d(r,n);return u.skipCull&&u.scrollFactorX===1&&u.scrollFactorY===1&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=l},33388:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736),c=function(l,r,n,e,s){n||(n=new d);var u=s.baseTileWidth,i=s.baseTileHeight,a=s.tilemapLayer,o=0,h=0;a&&(e||(e=a.scene.cameras.main),o=a.x+e.scrollX*(1-a.scrollFactorX),u*=a.scaleX,h=a.y+e.scrollY*(1-a.scrollFactorY),i*=a.scaleY);var f=o+l*u+r%2*(u/2),v=h+r*(i/2);return n.set(f,v)};p.exports=c},84132:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(d===void 0&&(d=r.scene.cameras.main),n=r.y+d.scrollY*(1-r.scrollFactorY),l*=r.scaleY),n+t*(l/2)+l};p.exports=S},90562:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736),c=function(l,r,n,e,s,u){e||(e=new d);var i=u.baseTileWidth,a=u.baseTileHeight,o=u.tilemapLayer;o&&(s||(s=o.scene.cameras.main),r=r-(o.y+s.scrollY*(1-o.scrollFactorY)),a*=o.scaleY,l=l-(o.x+s.scrollX*(1-o.scrollFactorX)),i*=o.scaleX);var h=n?Math.floor(r/(a/2)):r/(a/2),f=n?Math.floor((l+h%2*.5*i)/i):(l+h%2*.5*i)/i;return e.set(f,h)};p.exports=c},3689:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r=l.baseTileHeight,n=l.tilemapLayer;return n&&(c||(c=n.scene.cameras.main),t=t-(n.y+c.scrollY*(1-n.scrollFactorY)),r*=n.scaleY),d?Math.floor(t/(r/2)):t/(r/2)};p.exports=S},55217:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=function(l,r,n,e,s,u,i){for(var a=d(n,e,s,u,null,i),o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=c.baseTileWidth,r=c.tilemapLayer,n=0;return r&&(d||(d=r.scene.cameras.main),n=r.x+d.scrollX*(1-r.scrollFactorX),l*=r.scaleX),n+t*l};p.exports=S},46836:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(44150),c=t(42477),l=t(93736),r=function(n,e,s,u,i){return s||(s=new l(0,0)),s.x=d(n,u,i),s.y=c(e,u,i),s};p.exports=r},42477:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(d||(d=r.scene.cameras.main),n=r.y+d.scrollY*(1-r.scrollFactorY),l*=r.scaleY),n+t*l};p.exports=S},39677:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(50811),c=function(l,r,n,e,s,u){if(s){var i,a=d(l,r,n,e,null,u),o=0;for(i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45676),c=t(93736),l=new c,r=function(n,e,s,u){return d(n,0,e,l,s,u),l.x};p.exports=r},45676:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93736),c=function(l,r,n,e,s,u){n===void 0&&(n=!0),e||(e=new d);var i=u.baseTileWidth,a=u.baseTileHeight,o=u.tilemapLayer;o&&(s||(s=o.scene.cameras.main),l=l-(o.x+s.scrollX*(1-o.scrollFactorX)),r=r-(o.y+s.scrollY*(1-o.scrollFactorY)),i*=o.scaleX,a*=o.scaleY);var h=l/i,f=r/a;return n&&(h=Math.floor(h),f=Math.floor(f)),e.set(h,f)};p.exports=c},70520:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45676),c=t(93736),l=new c,r=function(n,e,s,u){return d(0,n,e,l,s,u),l.y};p.exports=r},5047:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CalculateFacesAt:t(92839),CalculateFacesWithin:t(60386),CheckIsoBounds:t(13125),Copy:t(17347),CreateFromTiles:t(93604),CullBounds:t(71586),CullTiles:t(381),Fill:t(97734),FilterTiles:t(63555),FindByIndex:t(37982),FindTile:t(48297),ForEachTile:t(80916),GetCullTilesFunction:t(31493),GetTileAt:t(15494),GetTileAtWorldXY:t(24640),GetTileCorners:t(48495),GetTileCornersFunction:t(7160),GetTilesWithin:t(50811),GetTilesWithinShape:t(31674),GetTilesWithinWorldXY:t(44662),GetTileToWorldXFunction:t(16884),GetTileToWorldXYFunction:t(68182),GetTileToWorldYFunction:t(3752),GetWorldToTileXFunction:t(29296),GetWorldToTileXYFunction:t(32688),GetWorldToTileYFunction:t(74326),HasTileAt:t(46598),HasTileAtWorldXY:t(28654),HexagonalCullBounds:t(6358),HexagonalCullTiles:t(37524),HexagonalGetTileCorners:t(63634),HexagonalTileToWorldXY:t(21715),HexagonalWorldToTileXY:t(11516),IsInLayerBounds:t(62839),IsometricCullTiles:t(20887),IsometricTileToWorldXY:t(21808),IsometricWorldToTileXY:t(18750),PutTileAt:t(29003),PutTileAtWorldXY:t(48565),PutTilesAt:t(56547),Randomize:t(91180),RemoveTileAt:t(929),RemoveTileAtWorldXY:t(17384),RenderDebug:t(93763),ReplaceByIndex:t(51202),RunCull:t(6987),SetCollision:t(51710),SetCollisionBetween:t(15216),SetCollisionByExclusion:t(33158),SetCollisionByProperty:t(4180),SetCollisionFromCollisionGroup:t(18625),SetLayerCollisionIndex:t(91181),SetTileCollision:t(68234),SetTileIndexCallback:t(11628),SetTileLocationCallback:t(72732),Shuffle:t(34397),StaggeredCullBounds:t(53945),StaggeredCullTiles:t(19242),StaggeredTileToWorldXY:t(33388),StaggeredTileToWorldY:t(84132),StaggeredWorldToTileXY:t(90562),StaggeredWorldToTileY:t(3689),SwapByIndex:t(55217),TileToWorldX:t(44150),TileToWorldXY:t(46836),TileToWorldY:t(42477),WeightedRandomize:t(39677),WorldToTileX:t(806),WorldToTileXY:t(45676),WorldToTileY:t(70520)}},12920:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},84758:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={ORIENTATION:t(12920)};p.exports=d},52678:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(98611),c=t(84758),l={Components:t(5047),Parsers:t(34124),Formats:t(93560),ImageCollection:t(97042),ParseToTilemap:t(15043),Tile:t(29633),Tilemap:t(89797),TilemapCreator:t(4843),TilemapFactory:t(37940),Tileset:t(47975),TilemapLayer:t(87177),Orientation:t(12920),LayerData:t(94990),MapData:t(16586),ObjectLayer:t(15256)};l=d(!1,l,c.ORIENTATION),p.exports=l},94990:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12920),l=t(72632),r=new d({initialize:function(e){e===void 0&&(e={}),this.name=l(e,"name","layer"),this.id=l(e,"id",0),this.x=l(e,"x",0),this.y=l(e,"y",0),this.width=l(e,"width",0),this.height=l(e,"height",0),this.tileWidth=l(e,"tileWidth",0),this.tileHeight=l(e,"tileHeight",0),this.baseTileWidth=l(e,"baseTileWidth",this.tileWidth),this.baseTileHeight=l(e,"baseTileHeight",this.tileHeight),this.orientation=l(e,"orientation",c.ORTHOGONAL),this.widthInPixels=l(e,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=l(e,"heightInPixels",this.height*this.baseTileHeight),this.alpha=l(e,"alpha",1),this.visible=l(e,"visible",!0),this.properties=l(e,"properties",[]),this.indexes=l(e,"indexes",[]),this.collideIndexes=l(e,"collideIndexes",[]),this.callbacks=l(e,"callbacks",[]),this.bodies=l(e,"bodies",[]),this.data=l(e,"data",[]),this.tilemapLayer=l(e,"tilemapLayer",null),this.hexSideLength=l(e,"hexSideLength",0),this.staggerAxis=l(e,"staggerAxis","y"),this.staggerIndex=l(e,"staggerIndex","odd")}});p.exports=r},16586:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(12920),l=t(72632),r=new d({initialize:function(e){e===void 0&&(e={}),this.name=l(e,"name","map"),this.width=l(e,"width",0),this.height=l(e,"height",0),this.infinite=l(e,"infinite",!1),this.tileWidth=l(e,"tileWidth",0),this.tileHeight=l(e,"tileHeight",0),this.widthInPixels=l(e,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=l(e,"heightInPixels",this.height*this.tileHeight),this.format=l(e,"format",null),this.orientation=l(e,"orientation",c.ORTHOGONAL),this.renderOrder=l(e,"renderOrder","right-down"),this.version=l(e,"version","1"),this.properties=l(e,"properties",{}),this.layers=l(e,"layers",[]),this.images=l(e,"images",[]),this.objects=l(e,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=l(e,"collision",{}),this.tilesets=l(e,"tilesets",[]),this.imageCollections=l(e,"imageCollections",[]),this.tiles=l(e,"tiles",[]),this.hexSideLength=l(e,"hexSideLength",0),this.staggerAxis=l(e,"staggerAxis","y"),this.staggerIndex=l(e,"staggerIndex","odd")}});p.exports=r},15256:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72632),l=new d({initialize:function(n){n===void 0&&(n={}),this.name=c(n,"name","object layer"),this.id=c(n,"id",0),this.opacity=c(n,"opacity",1),this.properties=c(n,"properties",{}),this.propertyTypes=c(n,"propertytypes",{}),this.type=c(n,"type","objectgroup"),this.visible=c(n,"visible",!0),this.objects=c(n,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});p.exports=l},21394:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(12920),c=function(l){return l=l.toLowerCase(),l==="isometric"?d.ISOMETRIC:l==="staggered"?d.STAGGERED:l==="hexagonal"?d.HEXAGONAL:d.ORTHOGONAL};p.exports=c},90715:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93560),c=t(84346),l=t(96097),r=t(2378),n=t(44909),e=function(s,u,i,a,o,h){var f;switch(u){case d.ARRAY_2D:f=c(s,i,a,o,h);break;case d.CSV:f=l(s,i,a,o,h);break;case d.TILED_JSON:f=r(s,i,h);break;case d.WELTMEISTER:f=n(s,i,h);break;default:console.warn("Unrecognized tilemap data format: "+u),f=null}return f};p.exports=e},84346:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93560),c=t(94990),l=t(16586),r=t(29633),n=function(e,s,u,i,a){for(var o=new c({tileWidth:u,tileHeight:i}),h=new l({name:e,tileWidth:u,tileHeight:i,format:d.ARRAY_2D,layers:[o]}),f=[],v=s.length,m=0,x=0;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93560),c=t(84346),l=function(r,n,e,s,u){var i=n.trim().split(` +`).map(function(o){return o.split(",")}),a=c(r,i,e,s,u);return a.format=d.CSV,a};p.exports=l},30951:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(94990),c=t(29633),l=function(r,n){for(var e=[],s=0;s-1?m=new c(i,v,f,h,u.tilesize,u.tilesize):m=n?null:new c(i,-1,f,h,u.tilesize,u.tilesize),a.push(m)}o.push(a),a=[]}i.data=o,e.push(i)}return e};p.exports=l},47488:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(47975),c=function(l){for(var r=[],n=[],e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(93560),c=t(16586),l=t(30951),r=t(47488),n=function(e,s,u){if(s.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var i=0,a=0,o=0;oi&&(i=s.layer[o].width),s.layer[o].height>a&&(a=s.layer[o].height);var h=new c({width:i,height:a,name:e,tileWidth:s.layer[0].tilesize,tileHeight:s.layer[0].tilesize,format:d.WELTMEISTER});return h.layers=l(s,u),h.tilesets=r(s),h};p.exports=n},24507:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ParseTileLayers:t(30951),ParseTilesets:t(47488),ParseWeltmeister:t(44909)}},34124:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={FromOrientationString:t(21394),Parse:t(90715),Parse2DArray:t(84346),ParseCSV:t(96097),Impact:t(24507),Tiled:t(50044)}},48646:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(98611),c=function(l){for(var r,n,e,s,u,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){for(var d=window.atob(t),c=d.length,l=new Array(c/4),r=0;r>>0;return l};p.exports=S},14556:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(47975),c=function(l){var r,n,e=[];for(r=0;r{/** + * @author Seth Berrier + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72632),c=function(l,r,n){if(!r)return{i:0,layers:l.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=r.x+d(r,"startx",0)*l.tilewidth+d(r,"offsetx",0),s=r.y+d(r,"starty",0)*l.tileheight+d(r,"offsety",0);return{i:0,layers:r.layers,name:n.name+r.name+"/",opacity:n.opacity*r.opacity,visible:n.visible&&r.visible,x:n.x+e,y:n.y+s}};p.exports=c},8847:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=2147483648,t=1073741824,d=536870912,c=function(l){var r=!!(l&S),n=!!(l&t),e=!!(l&d);l=l&~(S|t|d);var s=0,u=!1;return r&&n&&e?(s=Math.PI/2,u=!0):r&&n&&!e?(s=Math.PI,u=!1):r&&!n&&e?(s=Math.PI/2,u=!1):r&&!n&&!e?(s=0,u=!0):!r&&n&&e?(s=3*Math.PI/2,u=!1):!r&&n&&!e?(s=Math.PI,u=!0):!r&&!n&&e?(s=3*Math.PI/2,u=!0):!r&&!n&&!e&&(s=0,u=!1),{gid:l,flippedHorizontal:r,flippedVertical:n,flippedAntiDiagonal:e,rotation:s,flipped:u}};p.exports=c},78339:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72632),c=t(92044),l=function(r){for(var n=[],e=[],s=c(r);s.i0;){if(s.i>=s.layers.length){if(e.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=e.pop();continue}var u=s.layers[s.i];if(s.i++,u.type!=="imagelayer"){if(u.type==="group"){var i=c(r,u,s);e.push(s),s=i}continue}var a=d(u,"offsetx",0)+d(u,"startx",0),o=d(u,"offsety",0)+d(u,"starty",0);n.push({name:s.name+u.name,image:u.image,x:s.x+a+u.x,y:s.y+o+u.y,alpha:s.opacity*u.opacity,visible:s.visible&&u.visible,properties:d(u,"properties",{})})}return n};p.exports=l},2378:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(48646),c=t(14556),l=t(12920),r=t(28699),n=t(93560),e=t(21394),s=t(16586),u=t(78339),i=t(61136),a=t(95925),o=t(93392),h=function(f,v,m){var x=r(v),g=new s({width:x.width,height:x.height,name:f,tileWidth:x.tilewidth,tileHeight:x.tileheight,orientation:e(x.orientation),format:n.TILED_JSON,version:x.version,properties:x.properties,renderOrder:x.renderorder,infinite:x.infinite});g.orientation===l.HEXAGONAL&&(g.hexSideLength=x.hexsidelength,g.staggerAxis=x.staggeraxis,g.staggerIndex=x.staggerindex),g.layers=a(x,m),g.images=u(x);var y=o(x);return g.tilesets=y.tilesets,g.imageCollections=y.imageCollections,g.objects=i(x),g.tiles=c(g),d(g),g};p.exports=h},4281:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(28820),c=t(8847),l=function(e){return{x:e.x,y:e.y}},r=["id","name","type","rotation","properties","visible","x","y","width","height"],n=function(e,s,u){s===void 0&&(s=0),u===void 0&&(u=0);var i=d(e,r);if(i.x+=s,i.y+=u,e.gid){var a=c(e.gid);i.gid=a.gid,i.flippedHorizontal=a.flippedHorizontal,i.flippedVertical=a.flippedVertical,i.flippedAntiDiagonal=a.flippedAntiDiagonal}else e.polyline?i.polyline=e.polyline.map(l):e.polygon?i.polygon=e.polygon.map(l):e.ellipse?i.ellipse=e.ellipse:e.text?i.text=e.text:e.point?i.point=!0:i.rectangle=!0;return i};p.exports=n},61136:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72632),c=t(4281),l=t(15256),r=t(92044),n=function(e){for(var s=[],u=[],i=r(e);i.i0;){if(i.i>=i.layers.length){if(u.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=u.pop();continue}var a=i.layers[i.i];if(i.i++,a.opacity*=i.opacity,a.visible=i.visible&&a.visible,a.type!=="objectgroup"){if(a.type==="group"){var o=r(e,a,i);u.push(i),i=o}continue}a.name=i.name+a.name;for(var h=i.x+d(a,"startx",0)+d(a,"offsetx",0),f=i.y+d(a,"starty",0)+d(a,"offsety",0),v=[],m=0;m{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(43908),c=t(12920),l=t(92044),r=t(21394),n=t(72632),e=t(94990),s=t(8847),u=t(29633),i=function(a,o){for(var h=n(a,"infinite",!1),f=[],v=[],m=l(a);m.i0;){if(m.i>=m.layers.length){if(v.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}m=v.pop();continue}var x=m.layers[m.i];if(m.i++,x.type!=="tilelayer"){if(x.type==="group"){var g=l(a,x,m);v.push(m),m=g}continue}if(x.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+x.name+"'");continue}else if(x.encoding&&x.encoding==="base64"){if(x.chunks)for(var y=0;y0?(C=new u(T,E.gid,D,G,a.tilewidth,a.tileheight),C.rotation=E.rotation,C.flipX=E.flipped,P[G][D]=C):(A=o?null:new u(T,-1,D,G,a.tilewidth,a.tileheight),P[G][D]=A),R++,R===U.width&&(I++,R=0)}}else{T=new e({name:m.name+x.name,id:x.id,x:m.x+n(x,"offsetx",0)+x.x,y:m.y+n(x,"offsety",0)+x.y,width:x.width,height:x.height,tileWidth:a.tilewidth,tileHeight:a.tileheight,alpha:m.opacity*x.opacity,visible:m.visible&&x.visible,properties:n(x,"properties",[]),orientation:r(a.orientation)}),T.orientation===c.HEXAGONAL&&(T.hexSideLength=a.hexsidelength,T.staggerAxis=a.staggeraxis,T.staggerIndex=a.staggerindex);for(var X=[],V=0,Y=x.data.length;V0?(C=new u(T,E.gid,R,P.length,a.tilewidth,a.tileheight),C.rotation=E.rotation,C.flipX=E.flipped,X.push(C)):(A=o?null:new u(T,-1,R,P.length,a.tilewidth,a.tileheight),X.push(A)),R++,R===x.width&&(P.push(X),R=0,X=[])}T.data=P,f.push(T)}return f};p.exports=i},93392:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(47975),c=t(97042),l=t(4281),r=t(39642),n=function(e){for(var s=[],u=[],i=null,a,o=0;o1){var v=void 0,m=void 0;if(Array.isArray(h.tiles)){v=v||{},m=m||{};for(var x=0;x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){for(var c=0;c0){var n={},e={},s,u,i;if(Array.isArray(l.edgecolors))for(s=0;s{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AssignTileProperties:t(48646),Base64Decode:t(43908),BuildTilesetIndex:t(14556),CreateGroupLayer:t(92044),ParseGID:t(8847),ParseImageLayers:t(78339),ParseJSONTiled:t(2378),ParseObject:t(4281),ParseObjectLayers:t(61136),ParseTileLayers:t(95925),ParseTilesets:t(93392)}},73779:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(91963),l=t(7599),r=t(57911),n=t(66458),e=new d({initialize:function(u){this.scene=u,this.systems=u.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],u.sys.events.once(l.BOOT,this.boot,this),u.sys.events.on(l.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var s=this.systems.events;s.on(l.PRE_UPDATE,this.preUpdate,this),s.on(l.UPDATE,this.update,this),s.once(l.SHUTDOWN,this.shutdown,this)},addEvent:function(s){var u;return s instanceof r?(u=s,this.removeEvent(u),u.elapsed=u.startAt,u.hasDispatched=!1,u.repeatCount=u.repeat===-1||u.loop?999999999999:u.repeat):u=new r(s),this._pendingInsertion.push(u),u},delayedCall:function(s,u,i,a){return this.addEvent({delay:s,callback:u,args:i,callbackScope:a})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(s){Array.isArray(s)||(s=[s]);for(var u=0;u-1&&this._active.splice(o,1),a.destroy()}for(i=0;i=a.delay)){var o=a.elapsed-a.delay;if(a.elapsed=a.delay,!a.hasDispatched&&a.callback&&(a.hasDispatched=!0,a.callback.apply(a.callbackScope,a.args)),a.repeatCount>0){if(a.repeatCount--,o>=a.delay)for(;o>=a.delay&&a.repeatCount>0;)a.callback&&a.callback.apply(a.callbackScope,a.args),o-=a.delay,a.repeatCount--;a.elapsed=o,a.hasDispatched=!1}else a.hasDispatched&&this._pendingRemoval.push(a)}}}},shutdown:function(){var s;for(s=0;s{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(6659),l=t(61286),r=t(72632),n=t(7599),e=t(52944),s=new d({Extends:c,initialize:function(i,a){c.call(this),this.scene=i,this.systems=i.sys,this.elapsed=0,this.paused=!0,this.complete=!1,this.totalComplete=0,this.events=[];var o=this.systems.events;o.on(n.PRE_UPDATE,this.preUpdate,this),o.on(n.UPDATE,this.update,this),o.once(n.SHUTDOWN,this.destroy,this),a&&this.add(a)},preUpdate:function(u,i){this.paused||(this.elapsed+=i)},update:function(){if(!(this.paused||this.complete)){var u,i=this.events,a=!1,o=this.systems,h;for(u=0;u=i.length&&(this.complete=!0),this.complete&&this.emit(e.COMPLETE,this)}},play:function(u){return u===void 0&&(u=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,u&&this.reset(),this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(){this.elapsed=0;for(var u=0;u0&&(a=i[i.length-1].time);for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(72632),l=new d({initialize:function(n){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(n)},reset:function(r){if(this.delay=c(r,"delay",0),this.repeat=c(r,"repeat",0),this.loop=c(r,"loop",!1),this.callback=c(r,"callback",void 0),this.callbackScope=c(r,"callbackScope",this),this.args=c(r,"args",[]),this.timeScale=c(r,"timeScale",1),this.startAt=c(r,"startAt",0),this.paused=c(r,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=this.repeat===-1||this.loop?999999999999:this.repeat,this.delay===0&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var r=this.delay+this.delay*this.repeat,n=this.elapsed+this.delay*(this.repeat-this.repeatCount);return n/r}else return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return this.elapsed*.001},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return this.getRemaining()*.001},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return this.getOverallRemaining()*.001},remove:function(r){r===void 0&&(r=!1),this.elapsed=this.delay,this.hasDispatched=!r,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});p.exports=l},12144:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},52944:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={COMPLETE:t(12144)}},97121:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Clock:t(73779),Events:t(52944),Timeline:t(20517),TimerEvent:t(57911)}},64532:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66458),c=t(56694),l=t(5454),r=t(68710),n=t(91963),e=t(7599),s=t(91944),u=t(39366),i=t(68061),a=t(45641),o=t(56034),h=new c({initialize:function(v){this.scene=v,this.events=v.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(e.BOOT,this.boot,this),this.events.on(e.START,this.start,this)},boot:function(){this.events.once(e.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(e.UPDATE,this.update,this),this.events.once(e.SHUTDOWN,this.shutdown,this)},create:function(f){Array.isArray(f)||(f=[f]);for(var v=[],m=0;m-1},existing:function(f){return this.has(f)||this.tweens.push(f.reset()),this},addCounter:function(f){var v=r(this,f);return this.tweens.push(v.reset()),v},stagger:function(f,v){return s(f,v)},setLagSmooth:function(f,v){return f===void 0&&(f=1/1e-8),v===void 0&&(v=0),this.maxLag=f,this.lagSkip=Math.min(v,this.maxLag),this},setFps:function(f){return f===void 0&&(f=240),this.gap=1e3/f,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(f){var v=Date.now()-this.prevTime;v>this.maxLag&&(this.startTime+=v-this.lagSkip),this.prevTime+=v;var m=this.prevTime-this.startTime,x=m-this.nextTime,g=m-this.time*1e3;return x>0||f?(m/=1e3,this.time=m,this.nextTime+=x+(x>=this.gap?4:this.gap-x)):g=0,g},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(f){f===void 0&&(f=!1);var v=this.getDelta(f);if(!(v<=0)){this.processing=!0;var m,x,g=[],y=this.tweens;for(m=0;m0){for(m=0;m-1&&(x.isPendingRemove()||x.isDestroyed())&&(y.splice(E,1),x.destroy())}g.length=0}this.processing=!1}},remove:function(f){return this.processing?f.setPendingRemoveState():(d(this.tweens,f),f.setRemovedState()),this},reset:function(f){return this.existing(f),f.seek(),f.setActiveState(),this},makeActive:function(f){return this.existing(f),f.setActiveState(),this},each:function(f,v){var m,x=[null];for(m=1;m{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){return t&&t.hasOwnProperty(d)?t[d]:c};p.exports=S},21902:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(35060),c=t(40587),l=function(r,n){var e=d.Power0;if(typeof r=="string")if(d.hasOwnProperty(r))e=d[r];else{var s="";if(r.indexOf(".")){s=r.substring(r.indexOf(".")+1);var u=s.toLowerCase();u==="in"?s="easeIn":u==="out"?s="easeOut":u==="inout"&&(s="easeInOut")}r=c(r.substring(0,r.indexOf(".")+1)+s),d.hasOwnProperty(r)&&(e=d[r])}else typeof r=="function"&&(e=r);if(!n)return e;var i=n.slice(0);return i.unshift(0),function(a){return i[0]=a,e.apply(this,i)}};p.exports=l},4840:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(63210),c=t(88332),l=t(47614),r={bezier:d,catmull:c,catmullrom:c,linear:l},n=function(e){if(e===null)return null;var s=r.linear;return typeof e=="string"?r.hasOwnProperty(e)&&(s=r[e]):typeof e=="function"&&(s=e),s};p.exports=n},28348:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l;if(t.hasOwnProperty(d)){var r=typeof t[d];r==="function"?l=function(n,e,s,u,i,a){return t[d](n,e,s,u,i,a)}:l=function(){return t[d]}}else typeof c=="function"?l=c:l=function(){return c};return l};p.exports=S},92407:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(53709),c=function(l){var r,n=[];if(l.hasOwnProperty("props"))for(r in l.props)r.substring(0,1)!=="_"&&n.push({key:r,value:l.props[r]});else for(r in l)d.indexOf(r)===-1&&r.substring(0,1)!=="_"&&n.push({key:r,value:l[r]});return n};p.exports=c},65868:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10850),c=function(l){var r=d(l,"targets",null);return r===null||(typeof r=="function"&&(r=r.call()),Array.isArray(r)||(r=[r])),r};p.exports=c},9744:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(17489),c=t(61616);function l(u){return!!u.getActive&&typeof u.getActive=="function"}function r(u){return!!u.getStart&&typeof u.getStart=="function"}function n(u){return!!u.getEnd&&typeof u.getEnd=="function"}function e(u){return r(u)||n(u)||l(u)}var s=function(u,i){var a,o=function(U,z,w){return w},h=function(U,z,w){return w},f=null,v=typeof i;if(v==="number")o=function(){return i};else if(Array.isArray(i))h=function(){return i[0]},o=function(){return i[i.length-1]};else if(v==="string"){var m=i.toLowerCase(),x=m.substring(0,6)==="random",g=m.substring(0,3)==="int";if(x||g){var y=m.indexOf("("),T=m.indexOf(")"),E=m.indexOf(",");if(y&&T&&E){var C=parseFloat(m.substring(y+1,E)),A=parseFloat(m.substring(E+1,T));x?o=function(){return c(C,A)}:o=function(){return d(C,A)}}else throw new Error("invalid random() format")}else{m=m[0];var P=parseFloat(i.substr(2));switch(m){case"+":o=function(U,z,w){return w+P};break;case"-":o=function(U,z,w){return w-P};break;case"*":o=function(U,z,w){return w*P};break;case"/":o=function(U,z,w){return w/P};break;default:o=function(){return parseFloat(i)}}}}else if(v==="function")o=i;else if(v==="object")if(e(i))l(i)&&(f=i.getActive),n(i)&&(o=i.getEnd),r(i)&&(h=i.getStart);else if(i.hasOwnProperty("value"))a=s(u,i.value);else{var R=i.hasOwnProperty("to"),F=i.hasOwnProperty("from"),L=i.hasOwnProperty("start");if(R&&(F||L)){if(a=s(u,i.to),L){var B=s(u,i.start);a.getActive=B.getEnd}if(F){var N=s(u,i.from);a.getStart=N.getEnd}}}return a||(a={getActive:f,getEnd:o,getStart:h}),a};p.exports=s},68710:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(502),c=t(99730),l=t(20494),r=t(63130),n=t(21902),e=t(28348),s=t(10850),u=t(9744),i=t(72066),a=t(39366),o=function(h,f,v){if(f instanceof a)return f.parent=h,f;v===void 0?v=c:v=i(c,v);var m=s(f,"from",0),x=s(f,"to",1),g=[{value:m}],y=s(f,"delay",v.delay),T=s(f,"easeParams",v.easeParams),E=s(f,"ease",v.ease),C=u("value",x),A=new a(h,g),P=A.add(0,"value",C.getEnd,C.getStart,C.getActive,n(s(f,"ease",E),s(f,"easeParams",T)),e(f,"delay",y),s(f,"duration",v.duration),r(f,"yoyo",v.yoyo),s(f,"hold",v.hold),s(f,"repeat",v.repeat),s(f,"repeatDelay",v.repeatDelay),!1,!1);P.start=m,P.current=m,A.completeDelay=l(f,"completeDelay",0),A.loop=Math.round(l(f,"loop",0)),A.loopDelay=Math.round(l(f,"loopDelay",0)),A.paused=r(f,"paused",!1),A.persist=r(f,"persist",!1),A.callbackScope=s(f,"callbackScope",A);for(var R=d.TYPES,F=0;F{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(21902),c=t(10850),l=t(83392),r=function(n,e){e===void 0&&(e={});var s,u=c(e,"start",0),i=c(e,"ease",null),a=c(e,"grid",null),o=c(e,"from",0),h=o==="first",f=o==="center",v=o==="last",m=typeof o=="number",x=Array.isArray(n),g=parseFloat(x?n[0]:n),y=x?parseFloat(n[1]):0,T=Math.max(g,y);if(x&&(u+=g),a){var E=a[0],C=a[1],A=0,P=0,R=0,F=0,L=[];v?(A=E-1,P=C-1):m?(A=o%E,P=Math.floor(o/E)):f&&(A=(E-1)/2,P=(C-1)/2);for(var B=l.MIN_SAFE_INTEGER,N=0;NB&&(B=z),L[N][U]=z}}}var w=i?d(i):null;return a?s=function(I,M,O,D){var G=0,X=D%E,V=Math.floor(D/E);X>=0&&X=0&&V{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(502),c=t(99730),l=t(20494),r=t(63130),n=t(21902),e=t(4840),s=t(28348),u=t(92407),i=t(65868),a=t(10850),o=t(9744),h=t(72066),f=t(39366),v=function(m,x,g){if(x instanceof f)return x.parent=m,x;g===void 0?g=c:g=h(c,g);var y=i(x);!y&&g.targets&&(y=g.targets);for(var T=u(x),E=a(x,"delay",g.delay),C=a(x,"duration",g.duration),A=a(x,"easeParams",g.easeParams),P=a(x,"ease",g.ease),R=a(x,"hold",g.hold),F=a(x,"repeat",g.repeat),L=a(x,"repeatDelay",g.repeatDelay),B=r(x,"yoyo",g.yoyo),N=r(x,"flipX",g.flipX),U=r(x,"flipY",g.flipY),z=a(x,"interpolation",g.interpolation),w=function(b,K,J,Z){if(J==="texture"){var $=Z,tt=void 0;Array.isArray(Z)?($=Z[0],tt=Z[1]):Z.hasOwnProperty("value")?($=Z.value,Array.isArray(Z.value)?($=Z.value[0],tt=Z.value[1]):typeof Z.value=="string"&&($=Z.value)):typeof Z=="string"&&($=Z),b.addFrame(K,$,tt,s(Z,"delay",E),a(Z,"duration",C),a(Z,"hold",R),a(Z,"repeat",F),a(Z,"repeatDelay",L),r(Z,"flipX",N),r(Z,"flipY",U))}else{var it=o(J,Z),et=e(a(Z,"interpolation",z));b.add(K,J,it.getEnd,it.getStart,it.getActive,n(a(Z,"ease",P),a(Z,"easeParams",A)),s(Z,"delay",E),a(Z,"duration",C),r(Z,"yoyo",B),a(Z,"hold",R),a(Z,"repeat",F),a(Z,"repeatDelay",L),r(Z,"flipX",N),r(Z,"flipY",U),et,et?Z:null)}},I=new f(m,y),M=0;M{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(502),c=t(20494),l=t(63130),r=t(65868),n=t(10850),e=t(68061),s=t(45641),u=function(i,a){if(a instanceof s)return a.parent=i,a;var o=new s(i);o.startDelay=n(a,"delay",0),o.completeDelay=c(a,"completeDelay",0),o.loop=Math.round(c(a,"loop",n(a,"repeat",0))),o.loopDelay=Math.round(c(a,"loopDelay",n(a,"repeatDelay",0))),o.paused=l(a,"paused",!1),o.persist=l(a,"persist",!0),o.callbackScope=n(a,"callbackScope",o);var h,f=d.TYPES;for(h=0;h{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={GetBoolean:t(63130),GetEaseFunction:t(21902),GetInterpolationFunction:t(4840),GetNewValue:t(28348),GetProps:t(92407),GetTargets:t(65868),GetValueOp:t(9744),NumberTweenBuilder:t(68710),StaggerBuilder:t(91944),TweenBuilder:t(68061)}},5570:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="active"},6383:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},72582:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loop"},90281:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},80803:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="repeat"},13640:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},10472:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},5379:p=>{/** + * @author samme + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stop"},43449:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},61541:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="yoyo"},54272:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={TWEEN_ACTIVE:t(5570),TWEEN_COMPLETE:t(6383),TWEEN_LOOP:t(72582),TWEEN_PAUSE:t(90281),TWEEN_RESUME:t(13640),TWEEN_REPEAT:t(80803),TWEEN_START:t(10472),TWEEN_STOP:t(5379),TWEEN_UPDATE:t(43449),TWEEN_YOYO:t(61541)}},75193:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d={States:t(55303),Builders:t(79619),Events:t(54272),TweenManager:t(64532),Tween:t(39366),TweenData:t(15718),TweenFrameData:t(96490),BaseTween:t(502),TweenChain:t(45641)};p.exports=d},502:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(6659),l=t(54272),r=t(55303),n=new d({Extends:c,initialize:function(s){c.call(this),this.parent=s,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=r.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(e){return this.timeScale=e,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(l.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(l.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(l.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(l.TWEEN_COMPLETE,"onComplete")},complete:function(e){return e===void 0&&(e=0),e?(this.setCompleteDelayState(),this.countdown=e):this.onCompleteHandler(),this},completeAfterLoop:function(e){return e===void 0&&(e=0),this.loopCounter>e&&(this.loopCounter=e),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(l.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(e){this.countdown-=e,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(l.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(e){return this.countdown-=e,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(l.TWEEN_START,"onStart"),e=0),e},updateCompleteDelay:function(e){this.countdown-=e,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(e,s,u){return u===void 0&&(u=[]),this.callbacks.hasOwnProperty(e)&&(this.callbacks[e]={func:s,params:u}),this},setPendingState:function(){this.state=r.PENDING},setActiveState:function(){this.state=r.ACTIVE},setLoopDelayState:function(){this.state=r.LOOP_DELAY},setCompleteDelayState:function(){this.state=r.COMPLETE_DELAY},setStartDelayState:function(){this.state=r.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=r.PENDING_REMOVE},setRemovedState:function(){this.state=r.REMOVED},setFinishedState:function(){this.state=r.FINISHED},setDestroyedState:function(){this.state=r.DESTROYED},isPending:function(){return this.state===r.PENDING},isActive:function(){return this.state===r.ACTIVE},isLoopDelayed:function(){return this.state===r.LOOP_DELAY},isCompleteDelayed:function(){return this.state===r.COMPLETE_DELAY},isStartDelayed:function(){return this.state===r.START_DELAY},isPendingRemove:function(){return this.state===r.PENDING_REMOVE},isRemoved:function(){return this.state===r.REMOVED},isFinished:function(){return this.state===r.FINISHED},isDestroyed:function(){return this.state===r.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(e){e.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});n.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],p.exports=n},65521:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(56694),c=t(54272),l=t(55303),r=new d({initialize:function(e,s,u,i,a,o,h,f,v,m){this.tween=e,this.targetIndex=s,this.duration=i,this.totalDuration=0,this.delay=0,this.getDelay=u,this.yoyo=a,this.hold=o,this.repeat=h,this.repeatDelay=f,this.repeatCounter=0,this.flipX=v,this.flipY=m,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(n){n===void 0&&(n=this.current),this.tween.targets[this.targetIndex][this.key]=n},setCreatedState:function(){this.state=l.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=l.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=l.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=l.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=l.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=l.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=l.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=l.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===l.CREATED},isDelayed:function(){return this.state===l.DELAY},isPendingRender:function(){return this.state===l.PENDING_RENDER},isPlayingForward:function(){return this.state===l.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===l.PLAYING_BACKWARD},isHolding:function(){return this.state===l.HOLD_DELAY},isRepeating:function(){return this.state===l.REPEAT_DELAY},isComplete:function(){return this.state===l.COMPLETE},setStateFromEnd:function(n){this.yoyo?this.onRepeat(n,!0,!0):this.repeatCounter>0?this.onRepeat(n,!0,!1):this.setCompleteState()},setStateFromStart:function(n){this.repeatCounter>0?this.onRepeat(n,!1):this.setCompleteState()},reset:function(){var n=this.tween,e=n.totalTargets,s=this.targetIndex,u=n.targets[s],i=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(u,i,0,s,e,n),this.repeatCounter=this.repeat===-1?l.MAX:this.repeat,this.setPendingRenderState();var a=this.duration+this.hold;this.yoyo&&(a+=this.duration);var o=a+this.repeatDelay;this.totalDuration=this.delay+a,this.repeat===-1?(this.totalDuration+=o*l.MAX,n.isInfinite=!0):this.repeat>0&&(this.totalDuration+=o*this.repeat),this.totalDuration>n.duration&&(n.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(n,e,s){var u=this.tween,i=u.totalTargets,a=this.targetIndex,o=u.targets[a],h=this.key,f=h!=="texture";if(this.elapsed=n,this.progress=n/this.duration,this.flipX&&o.toggleFlipX(),this.flipY&&o.toggleFlipY(),f&&(e||s)&&(this.start=this.getStartValue(o,h,this.start,a,i,u)),s){this.setPlayingBackwardState(),this.dispatchEvent(c.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,f&&(this.end=this.getEndValue(o,h,this.start,a,i,u)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-n,f&&(this.current=this.start,o[h]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(c.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});p.exports=r},99730:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null};p.exports=S},53709:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},39366:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(502),c=t(56694),l=t(54272),r=t(99325),n=t(61286),e=t(83392),s=t(55303),u=t(15718),i=t(96490),a=new c({Extends:d,initialize:function(h,f){d.call(this,h),this.targets=f,this.totalTargets=f.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(o,h,f,v,m,x,g,y,T,E,C,A,P,R,F,L){var B=new u(this,o,h,f,v,m,x,g,y,T,E,C,A,P,R,F,L);return this.totalData=this.data.push(B),B},addFrame:function(o,h,f,v,m,x,g,y,T,E){var C=new i(this,o,h,f,v,m,x,g,y,T,E);return this.totalData=this.data.push(C),C},getValue:function(o){o===void 0&&(o=0);var h=null;return this.data&&(h=this.data[o].current),h},hasTarget:function(o){return this.targets&&this.targets.indexOf(o)!==-1},updateTo:function(o,h,f){if(f===void 0&&(f=!1),o!=="texture")for(var v=0;v0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(l.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,d.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(o,h,f){if(o===void 0&&(o=0),h===void 0&&(h=16.6),f===void 0&&(f=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;f||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(l.TWEEN_ACTIVE,"onActive");var v=this.paused;if(this.paused=!1,o>0){for(var m=Math.floor(o/h),x=o-m*h,g=0;g0&&this.update(x)}return this.paused=v,this.isSeeking=!1,this},initTweenData:function(o){o===void 0&&(o=!1),this.duration=0,this.startDelay=e.MAX_SAFE_INTEGER;for(var h=this.data,f=0;f0?this.totalDuration=v+m+(v+g)*x:this.totalDuration=v+m},reset:function(o){return o===void 0&&(o=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,this.loop===-1&&(this.isInfinite=!0,this.loopCounter=s.MAX),o||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(l.TWEEN_ACTIVE,"onActive")),this},update:function(o){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(o*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(o),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(o),!1;this.hasStarted||(this.startDelay-=o,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(l.TWEEN_START,"onStart"),o=0));var h=!1;if(this.isActive())for(var f=this.data,v=0;v{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(66458),c=t(502),l=t(56694),r=t(54272),n=t(99325),e=t(61286),s=t(55303),u=new l({Extends:c,initialize:function(a){c.call(this,a),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?s.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive"),this},add:function(i){var a=this.parent.create(i);Array.isArray(a)||(a=[a]);for(var o=this.data,h=0;h0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var i=this.data,a=this.totalData,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65521),c=t(82897),l=t(56694),r=t(54272),n=new l({Extends:d,initialize:function(s,u,i,a,o,h,f,v,m,x,g,y,T,E,C,A,P){d.call(this,s,u,v,m,x,g,y,T,E,C),this.key=i,this.getActiveValue=h,this.getEndValue=a,this.getStartValue=o,this.ease=f,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=A,this.interpolationData=P},reset:function(e){d.prototype.reset.call(this);var s=this.tween.targets[this.targetIndex],u=this.key;e&&(s[u]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(s[u]=this.getActiveValue(s,u,0))},update:function(e){var s=this.tween,u=s.totalTargets,i=this.targetIndex,a=s.targets[i],o=this.key;if(!a)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(a,o,a[o],i,u,s),this.end=this.getEndValue(a,o,this.start,i,u,s),this.current=this.start,a[o]=this.start,this.setPlayingForwardState(),!0;var h=this.isPlayingForward(),f=this.isPlayingBackward();if(h||f){var v=this.elapsed,m=this.duration,x=0,g=!1;v+=e,v>=m?(x=v-m,v=m,g=!0):v<0&&(v=0);var y=c(v/m,0,1);if(this.elapsed=v,this.progress=y,this.previous=this.current,g)h?(this.current=this.end,a[o]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(x)):(this.current=this.start,a[o]=this.start,this.setStateFromStart(x));else{h||(y=1-y);var T=this.ease(y);this.interpolation?this.current=this.interpolation(this.interpolationData,T):this.current=this.start+(this.end-this.start)*T,a[o]=this.current}this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var u=this.tween;if(!u.isSeeking){var i=u.targets[this.targetIndex],a=this.key,o=this.current,h=this.previous;u.emit(e,u,a,i,o,h);var f=u.callbacks[s];f&&f.func.apply(u.callbackScope,[u,i,a,o,h].concat(f.params))}},destroy:function(){d.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});p.exports=n},96490:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(65521),c=t(82897),l=t(56694),r=t(54272),n=new l({Extends:d,initialize:function(s,u,i,a,o,h,f,v,m,x,g){d.call(this,s,u,o,h,!1,f,v,m,x,g),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=a,this.yoyo=v!==0},reset:function(e){d.prototype.reset.call(this);var s=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=s.texture.key,this.startFrame=s.frame.name),e&&s.setTexture(this.startTexture,this.startFrame)},update:function(e){var s=this.tween,u=this.targetIndex,i=s.targets[u];if(!i)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&i.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var a=this.isPlayingForward(),o=this.isPlayingBackward();if(a||o){var h=this.elapsed,f=this.duration,v=0,m=!1;h+=e,h>=f?(v=h-f,h=f,m=!0):h<0&&(h=0);var x=c(h/f,0,1);this.elapsed=h,this.progress=x,m&&(a?(i.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(v)):(i.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(v))),this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var u=this.tween;if(!u.isSeeking){var i=u.targets[this.targetIndex],a=this.key;u.emit(e,u,a,i);var o=u.callbacks[s];o&&o.func.apply(u.callbackScope,[u,i,a].concat(o.params))}},destroy:function(){d.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});p.exports=n},55303:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999};p.exports=S},56694:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function S(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}function t(n,e,s){var u=s?n[e]:Object.getOwnPropertyDescriptor(n,e);return!s&&u.value&&typeof u.value=="object"&&(u=u.value),u&&S(u)?(typeof u.enumerable>"u"&&(u.enumerable=!0),typeof u.configurable>"u"&&(u.configurable=!0),u):!1}function d(n,e){var s=Object.getOwnPropertyDescriptor(n,e);return s?(s.value&&typeof s.value=="object"&&(s=s.value),s.configurable===!1):!1}function c(n,e,s,u){for(var i in e)if(e.hasOwnProperty(i)){var a=t(e,i,s);if(a!==!1){var o=u||n;if(d(o.prototype,i)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+i+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(n.prototype,i,a)}else n.prototype[i]=e[i]}}function l(n,e){if(e){Array.isArray(e)||(e=[e]);for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(){};p.exports=S},10618:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(){return null};p.exports=S},78991:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r){if(r===void 0&&(r=t),c>0){var n=c-t.length;if(n<=0)return null}if(!Array.isArray(d))return t.indexOf(d)===-1?(t.push(d),l&&l.call(r,d),d):null;for(var e=d.length-1;e>=0;)t.indexOf(d[e])!==-1&&d.splice(e,1),e--;if(e=d.length,e===0)return null;c>0&&e>n&&(d.splice(n),e=n);for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l,r,n){if(c===void 0&&(c=0),n===void 0&&(n=t),l>0){var e=l-t.length;if(e<=0)return null}if(!Array.isArray(d))return t.indexOf(d)===-1?(t.splice(c,0,d),r&&r.call(n,d),d):null;for(var s=d.length-1;s>=0;)t.indexOf(d[s])!==-1&&d.pop(),s--;if(s=d.length,s===0)return null;l>0&&s>e&&(d.splice(e),s=e);for(var u=s-1;u>=0;u--){var i=d[u];t.splice(c,0,i),r&&r.call(n,i)}return d};p.exports=S},58742:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.indexOf(d);return c!==-1&&c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45838),c=function(l,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=l.length);var u=0;if(d(l,e,s))for(var i=e;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l,r=[null];for(l=3;l{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45838),c=function(l,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=l.length),d(l,e,s)){var u,i=[null];for(u=5;u{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(d.length){if(d.length===1)return d[0]}else return NaN;var l=1,r,n;if(c){if(td.length&&(l=d.length),c?(r=d[l-1][c],n=d[l][c],n-t<=t-r?d[l]:d[l-1]):(r=d[l-1],n=d[l],n-t<=t-r?n:r)};p.exports=S},5454:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d=[]);for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45838),c=function(l,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=l.length);var u=[];if(d(l,e,s))for(var i=e;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45838),c=function(l,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=l.length),d(l,e,s))for(var u=e;u{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=t.length);var l=d+Math.floor(Math.random()*c);return t[l]===void 0?null:t[l]};p.exports=S},24218:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(d===c)return t;var l=t.indexOf(d),r=t.indexOf(c);if(l<0||r<0)throw new Error("Supplied items must be elements of the same array");return l>r||(t.splice(l,1),r===t.length-1?t.push(d):t.splice(r,0,d)),t};p.exports=S},58258:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(d===c)return t;var l=t.indexOf(d),r=t.indexOf(c);if(l<0||r<0)throw new Error("Supplied items must be elements of the same array");return l{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.indexOf(d);if(c>0){var l=t[c-1],r=t.indexOf(l);t[c]=l,t[r]=d}return t};p.exports=S},68396:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=t.indexOf(d);if(l===-1||c<0||c>=t.length)throw new Error("Supplied index out of bounds");return l!==c&&(t.splice(l,1),t.splice(c,0,d)),d};p.exports=S},27555:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.indexOf(d);if(c!==-1&&c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r=[],n,e=!1;if((c||l)&&(e=!0,c||(c=""),l||(l="")),d=d;n--)e?r.push(c+n.toString()+l):r.push(n);else for(n=t;n<=d;n++)e?r.push(c+n.toString()+l):r.push(n);return r};p.exports=S},89955:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(67233),c=function(l,r,n){l===void 0&&(l=0),r===void 0&&(r=null),n===void 0&&(n=1),r===null&&(r=l,l=0);for(var e=[],s=Math.max(d((r-l)/(n||1)),0),u=0;u{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function S(c,l,r){var n=c[l];c[l]=c[r],c[r]=n}function t(c,l){return cl?1:0}var d=function(c,l,r,n,e){for(r===void 0&&(r=0),n===void 0&&(n=c.length-1),e===void 0&&(e=t);n>r;){if(n-r>600){var s=n-r+1,u=l-r+1,i=Math.log(s),a=.5*Math.exp(2*i/3),o=.5*Math.sqrt(i*a*(s-a)/s)*(u-s/2<0?-1:1),h=Math.max(r,Math.floor(l-u*a/s+o)),f=Math.min(n,Math.floor(l+(s-u)*a/s+o));d(c,l,h,f,e)}var v=c[l],m=r,x=n;for(S(c,r,l),e(c[n],v)>0&&S(c,r,n);m0;)x--}e(c[r],v)===0?S(c,r,x):(x++,S(c,x,n)),x<=l&&(r=x+1),l<=x&&(n=x-1)}};p.exports=d},75757:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10850),c=t(18592),l=function(n,e,s){for(var u=[],i=0;i{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72677),c=function(l,r,n,e){e===void 0&&(e=l);var s;if(!Array.isArray(r))return s=l.indexOf(r),s!==-1?(d(l,s),n&&n.call(e,r),r):null;for(var u=r.length-1,i=[];u>=0;){var a=r[u];s=l.indexOf(a),s!==-1&&(d(l,s),i.push(a),n&&n.call(e,a)),u--}return i};p.exports=c},8324:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72677),c=function(l,r,n,e){if(e===void 0&&(e=l),r<0||r>l.length-1)throw new Error("Index out of bounds");var s=d(l,r);return n&&n.call(e,s),s};p.exports=c},47427:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45838),c=function(l,r,n,e,s){if(r===void 0&&(r=0),n===void 0&&(n=l.length),s===void 0&&(s=l),d(l,r,n)){var u=n-r,i=l.splice(r,u);if(e)for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(72677),c=function(l,r,n){r===void 0&&(r=0),n===void 0&&(n=l.length);var e=r+Math.floor(Math.random()*n);return d(l,e)};p.exports=c},80402:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=t.indexOf(d),r=t.indexOf(c);return l!==-1&&r===-1?(t[l]=c,!0):!1};p.exports=S},77640:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d=1);for(var c=null,l=0;l{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){d===void 0&&(d=1);for(var c=null,l=0;l{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){var r=t.length;if(d<0||d>r||d>=c||c>r){if(l)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};p.exports=S},27847:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){var c=t.indexOf(d);return c!==-1&&c>0&&(t.splice(c,1),t.unshift(d)),d};p.exports=S},6034:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(45838),c=function(l,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=l.length),d(l,e,s))for(var u=e;u{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){for(var d=t.length-1;d>0;d--){var c=Math.floor(Math.random()*(d+1)),l=t[d];t[d]=t[c],t[c]=l}return t};p.exports=S},28834:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d=/\D/g;return t.sort(function(c,l){return parseInt(c.replace(d,""),10)-parseInt(l.replace(d,""),10)}),t};p.exports=S},72677:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){if(!(d>=t.length)){for(var c=t.length-1,l=t[d],r=d;r{/** + * @author Richard Davey + * @author Angry Bytes (and contributors) + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(77290);function c(e,s){return String(e).localeCompare(s)}function l(e,s){var u=e.length;if(u<=1)return e;for(var i=new Array(u),a=1;aa&&(v=a),m>a&&(m=a),x=f,g=v;;)if(x{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(d===c)return t;var l=t.indexOf(d),r=t.indexOf(c);if(l<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[l]=c,t[r]=d,t};p.exports=S},59959:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Matrix:t(13515),Add:t(78991),AddAt:t(48522),BringToTop:t(58742),CountAllMatching:t(30164),Each:t(36337),EachInRange:t(46208),FindClosestInSorted:t(2406),Flatten:t(5454),GetAll:t(71608),GetFirst:t(51463),GetRandom:t(72861),MoveDown:t(51172),MoveTo:t(68396),MoveUp:t(27555),MoveAbove:t(24218),MoveBelow:t(58258),NumberArray:t(13401),NumberArrayStep:t(89955),QuickSelect:t(53466),Range:t(75757),Remove:t(66458),RemoveAt:t(8324),RemoveBetween:t(47427),RemoveRandomElement:t(50147),Replace:t(80402),RotateLeft:t(77640),RotateRight:t(38487),SafeRange:t(45838),SendToBack:t(27847),SetAll:t(6034),Shuffle:t(18592),SortByDigits:t(28834),SpliceOne:t(72677),StableSort:t(17922),Swap:t(96928)}},97494:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var d=t[0].length,c=1;c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(76400),c=t(97494),l=function(r){var n="";if(!c(r))return n;for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.reverse()};p.exports=S},51995:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){for(var d=0;d{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(63515),c=function(l){return d(l,180)};p.exports=c},42549:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(63515),c=function(l,r){r===void 0&&(r=1);for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(97494),c=t(78581),l=function(r,n){if(n===void 0&&(n=90),!d(r))return null;if(typeof n!="string"&&(n=(n%360+360)%360),n===90||n===-270||n==="rotateLeft")r=c(r),r.reverse();else if(n===-90||n===270||n==="rotateRight")r.reverse(),r=c(r);else if(Math.abs(n)===180||n==="rotate180"){for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(63515),c=function(l,r){r===void 0&&(r=1);for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(77640),c=t(38487),l=function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),e!==0&&(e<0?d(r,Math.abs(e)):c(r,e)),n!==0)for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){for(var d=t.length,c=t[0].length,l=new Array(c),r=0;r-1;n--)l[r][n]=t[n][r]}return l};p.exports=S},13515:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CheckMatrix:t(97494),MatrixToString:t(68428),ReverseColumns:t(59521),ReverseRows:t(51995),Rotate180:t(89011),RotateLeft:t(42549),RotateMatrix:t(63515),RotateRight:t(14305),Translate:t(27365),TransposeMatrix:t(78581)}},40581:p=>{/** + * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(d,c){for(var l=new Uint8Array(d),r=l.length,n=c?"data:"+c+";base64,":"",e=0;e>2],n+=S[(l[e]&3)<<4|l[e+1]>>4],n+=S[(l[e+1]&15)<<2|l[e+2]>>6],n+=S[l[e+2]&63];return r%3===2?n=n.substring(0,n.length-1)+"=":r%3===1&&(n=n.substring(0,n.length-2)+"=="),n};p.exports=t},82329:p=>{/** + * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */for(var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),d=0;d>4,h[e++]=(u&15)<<4|i>>2,h[e++]=(i&3)<<6|a&63;return o};p.exports=c},78417:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ArrayBufferToBase64:t(40581),Base64ToArrayBuffer:t(82329)}},22178:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Array:t(59959),Base64:t(78417),Objects:t(64615),String:t(50379),NOOP:t(72283),NULL:t(10618)}},32742:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d={};for(var c in t)Array.isArray(t[c])?d[c]=t[c].slice(0):d[c]=t[c];return d};p.exports=S},28699:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){var d,c,l;if(typeof t!="object"||t===null)return t;d=Array.isArray(t)?[]:{};for(l in t)c=t[l],d[l]=S(c);return d};p.exports=S},98611:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(42911),c=function(){var l,r,n,e,s,u,i=arguments[0]||{},a=1,o=arguments.length,h=!1;for(typeof i=="boolean"&&(h=i,i=arguments[1]||{},a=2),o===a&&(i=this,--a);a{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(5923),c=t(10850),l=function(r,n,e){var s=c(r,n,null);if(s===null)return e;if(Array.isArray(s))return d.RND.pick(s);if(typeof s=="object"){if(s.hasOwnProperty("randInt"))return d.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return d.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if(typeof s=="function")return s(n);return s};p.exports=l},72632:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){var l=typeof t;return!t||l==="number"||l==="string"?c:t.hasOwnProperty(d)&&t[d]!==void 0?t[d]:c};p.exports=S},94324:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(10850),c=t(82897),l=function(r,n,e,s,u){u===void 0&&(u=e);var i=d(r,n,u);return c(i,e,s)};p.exports=l},10850:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){if(!t&&!l||typeof t=="number")return c;if(t&&t.hasOwnProperty(d))return t[d];if(l&&l.hasOwnProperty(d))return l[d];if(d.indexOf(".")!==-1){for(var r=d.split("."),n=t,e=l,s=c,u=c,i=!0,a=!0,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.hasOwnProperty(d)};p.exports=S},42911:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){if(!t||typeof t!="object"||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};p.exports=S},30657:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(32742),c=function(l,r){var n=d(l);for(var e in r)n.hasOwnProperty(e)||(n[e]=r[e]);return n};p.exports=c},72066:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(32742),c=function(l,r){var n=d(l);for(var e in r)n.hasOwnProperty(e)&&(n[e]=r[e]);return n};p.exports=c},28820:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var d=t(19256),c=function(l,r){for(var n={},e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(d))return t[d]=c,!0;if(d.indexOf(".")!==-1){for(var l=d.split("."),r=t,n=t,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Clone:t(32742),DeepCopy:t(28699),Extend:t(98611),GetAdvancedValue:t(20494),GetFastValue:t(72632),GetMinMaxValue:t(94324),GetValue:t(10850),HasAll:t(87701),HasAny:t(53523),HasValue:t(19256),IsPlainObject:t(42911),Merge:t(30657),MergeRight:t(72066),Pick:t(28820),SetValue:t(22440)}},69429:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return t.replace(/%([0-9]+)/g,function(c,l){return d[Number(l)-1]})};p.exports=S},76400:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d,c,l){d===void 0&&(d=0),c===void 0&&(c=" "),l===void 0&&(l=3),t=t.toString();var r=0;if(d+1>=t.length)switch(l){case 1:t=new Array(d+1-t.length).join(c)+t;break;case 3:var n=Math.ceil((r=d-t.length)/2),e=r-n;t=new Array(e+1).join(c)+t+new Array(n+1).join(c);break;default:t=t+new Array(d+1-t.length).join(c);break}return t};p.exports=S},76872:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t,d){return d===0?t.slice(1):t.slice(0,d-1)+t.slice(d)};p.exports=S},8051:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t.split("").reverse().join("")};p.exports=S},76583:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var d=Math.random()*16|0,c=t==="x"?d:d&3|8;return c.toString(16)})};p.exports=S},40587:p=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var S=function(t){return t&&t[0].toUpperCase()+t.slice(1)};p.exports=S},50379:(p,S,t)=>{/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Format:t(69429),Pad:t(76400),RemoveAt:t(76872),Reverse:t(8051),UppercaseFirst:t(40587),UUID:t(76583)}}},at={};function ht(p){var S=at[p];if(S!==void 0)return S.exports;var t=at[p]={exports:{}};return st[p](t,t.exports,ht),t.exports}ht.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var ft=ht(92491);return ft})())})(bt);var ce=bt.exports;const Rt=ve(ce),At={width:2e3,height:2e3};class pe extends Rt.Scene{constructor(){super();Ct(this,"player",null);Ct(this,"cam",null);Ct(this,"text",null)}preload(){this.load.image("arrow","images/arrow.png"),this.load.image("grid","images/grid.png")}create(){this.add.tileSprite(0,0,At.width,At.height,"grid").setOrigin(0,0),this.add.rectangle(0,0,At.width,At.height,3447019,.7).setOrigin(0,0),this.physics.world.setBounds(0,0,At.width,At.height),this.cam=this.cameras.main,this.player=this.physics.add.image(400,100,"arrow"),this.player.setOrigin(.5),this.player.body&&this.player.setCircle(50,this.player.body.halfWidth-50,this.player.body.halfHeight-50),this.player.setScale(.7),this.player.setBounce(0),this.player.setCollideWorldBounds(!0),this.cam.startFollow(this.player),this.text=this.add.text(10,10,"x: 0, y: 0")}update(){var st,at;if(this.player){const ht=new Rt.Math.Vector2((st=this.cam)==null?void 0:st.centerX,(at=this.cam)==null?void 0:at.centerY),ft=new Rt.Math.Vector2(this.input.x,this.input.y),p=Rt.Math.Angle.Between(ht.x,ht.y,ft.x,ft.y),S=ht.subtract(ft).negate().normalize();this.text&&(this.text.text=`x: ${S.x.toFixed(2)}, y: ${S.y.toFixed(2)}`);const t=200;this.player.setVelocity(S.x*t,S.y*t),this.player.setRotation(p+Math.PI/2)}}}function ge(j){let _;return{c(){_=jt("div"),Lt(_,"width",j[1]+"px"),Lt(_,"height",j[2]+"px"),Lt(_,"overflow","hidden")},m(st,at){$t(st,_,at),j[3](_)},p(st,[at]){at&2&&Lt(_,"width",st[1]+"px"),at&4&&Lt(_,"height",st[2]+"px")},i:Dt,o:Dt,d(st){st&&Wt(_),j[3](null)}}}function me(j,_,st){let at,ht=0,ft=0;const p=()=>{st(0,at.innerHTML="",at),st(1,ht=window.innerWidth),st(2,ft=window.innerHeight);const t={type:Rt.AUTO,width:ht,height:ft,physics:{default:"arcade",arcade:{debug:!0,gravity:{y:200}}},scene:pe,parent:at};new Rt.Game(t)};_t(()=>{p()});function S(t){Gt[t?"unshift":"push"](()=>{at=t,st(0,at)})}return[at,ht,ft,S]}class xe extends ue{constructor(_){super(),le(this,_,me,ge,Jt,{})}}new xe({target:document.getElementById("app")}); diff --git a/images/arrow.png b/images/arrow.png new file mode 100644 index 0000000..2763214 Binary files /dev/null and b/images/arrow.png differ diff --git a/images/grid.png b/images/grid.png new file mode 100644 index 0000000..5d66b59 Binary files /dev/null and b/images/grid.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..e93c9ee --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + Supagame + + + + +
+ + diff --git a/vite.svg b/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file