mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +00:00
1 line
No EOL
1 MiB
1 line
No EOL
1 MiB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(this,(()=>(()=>{var t={6659:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function n(t,e,s,n,a){if("function"!=typeof s)throw new TypeError("The listener must be a function");var o=new r(s,n||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,s,r=[];if(0===this._eventsCount)return r;for(s in t=this._events)e.call(t,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,n=s.length,a=new Array(n);r<n;r++)a[r]=s[r].fn;return a},o.prototype.listenerCount=function(t){var e=i?i+t:t,s=this._events[e];return s?s.fn?1:s.length:0},o.prototype.emit=function(t,e,s,r,n,a){var o=i?i+t:t;if(!this._events[o])return!1;var h,l,u=this._events[o],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,s),!0;case 4:return u.fn.call(u.context,e,s,r),!0;case 5:return u.fn.call(u.context,e,s,r,n),!0;case 6:return u.fn.call(u.context,e,s,r,n,a),!0}for(l=1,h=new Array(c-1);l<c;l++)h[l-1]=arguments[l];u.fn.apply(u.context,h)}else{var d,f=u.length;for(l=0;l<f;l++)switch(u[l].once&&this.removeListener(t,u[l].fn,void 0,!0),c){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,e);break;case 3:u[l].fn.call(u[l].context,e,s);break;case 4:u[l].fn.call(u[l].context,e,s,r);break;default:if(!h)for(d=1,h=new Array(c-1);d<c;d++)h[d-1]=arguments[d];u[l].fn.apply(u[l].context,h)}}return!0},o.prototype.on=function(t,e,i){return n(this,t,e,i,!1)},o.prototype.once=function(t,e,i){return n(this,t,e,i,!0)},o.prototype.removeListener=function(t,e,s,r){var n=i?i+t:t;if(!this._events[n])return this;if(!e)return a(this,n),this;var o=this._events[n];if(o.fn)o.fn!==e||r&&!o.once||s&&o.context!==s||a(this,n);else{for(var h=0,l=[],u=o.length;h<u;h++)(o[h].fn!==e||r&&!o[h].once||s&&o[h].context!==s)&&l.push(o[h]);l.length?this._events[n]=1===l.length?l[0]:l:a(this,n)}return this},o.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&a(this,e)):(this._events=new s,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=i,o.EventEmitter=o,t.exports=o},62270:(t,e,i)=>{var s=i(82590);t.exports=function(t,e,i,r){for(var n=t[0],a=1;a<t.length;a++){var o=t[a];s(o,n,e,i,r),n=o}return t}},61148:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,r,n){return s(t,"angle",e,i,r,n)}},22015:t=>{t.exports=function(t,e,i){for(var s=0;s<t.length;s++){var r=t[s];e.call(i,r)}return t}},31060:t=>{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s<t.length;s++){var r=t[s],n=!0;for(var a in e)r[a]!==e[a]&&(n=!1);if(n)return r}return null}},52367:t=>{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=t.length-1;s>=i;s--){var r=t[s],n=!0;for(var a in e)r[a]!==e[a]&&(n=!1);if(n)return r}return null}},12673:(t,e,i)=>{var s=i(40327),r=i(84093),n=i(72632),a=i(72283),o=new(i(71030))({sys:{queueDepthSort:a,events:{once:a}}},0,0,1,1).setOrigin(0,0);t.exports=function(t,e){void 0===e&&(e={});var i=e.hasOwnProperty("width"),a=e.hasOwnProperty("height"),h=n(e,"width",-1),l=n(e,"height",-1),u=n(e,"cellWidth",1),c=n(e,"cellHeight",u),d=n(e,"position",r.TOP_LEFT),f=n(e,"x",0),p=n(e,"y",0),g=0,v=0,m=h*u,x=l*c;o.setPosition(f,p),o.setSize(u,c);for(var y=0;y<t.length;y++)if(s(t[y],o,d),i&&-1===h)o.x+=u;else if(a&&-1===l)o.y+=c;else if(a&&!i){if(v+=c,o.y+=c,v===x&&(v=0,g+=u,o.y=p,o.x+=u,g===m))break}else if(g+=u,o.x+=u,g===m&&(g=0,v+=c,o.x=f,o.y+=c,v===x))break;return t}},691:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,r,n){return s(t,"alpha",e,i,r,n)}},3877:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,r,n){return s(t,"x",e,i,r,n)}},71020:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,r,n,a,o){return null==i&&(i=e),s(t,"x",e,r,a,o),s(t,"y",i,n,a,o)}},28970:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,r,n){return s(t,"y",e,i,r,n)}},82249:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var r=i,n=(s-i)/t.length,a=e.x,o=e.y,h=e.radius,l=0;l<t.length;l++)t[l].x=a+h*Math.cos(r),t[l].y=o+h*Math.sin(r),r+=n;return t}},30285:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var r=i,n=(s-i)/t.length,a=e.width/2,o=e.height/2,h=0;h<t.length;h++)t[h].x=e.x+a*Math.cos(r),t[h].y=e.y+o*Math.sin(r),r+=n;return t}},61557:(t,e,i)=>{var s=i(8570),r=i(30684);t.exports=function(t,e,i){var n;n=i?r(e,i,t.length):s(e,t.length);for(var a=0;a<t.length;a++){var o=t[a],h=n[a];o.x=h.x,o.y=h.y}return t}},63549:(t,e,i)=>{var s=i(40053),r=i(77640),n=i(38487);t.exports=function(t,e,i){void 0===i&&(i=0);var a=s(e,!1,t.length);i>0?r(a,i):i<0&&n(a,Math.abs(i));for(var o=0;o<t.length;o++)t[o].x=a[o].x,t[o].y=a[o].y;return t}},51629:(t,e,i)=>{var s=i(58813);t.exports=function(t,e,i){var r=s({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),n=s({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),a=s({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);r.pop(),n.pop(),a.pop();for(var o=(r=r.concat(n,a)).length/t.length,h=0,l=0;l<t.length;l++){var u=t[l],c=r[Math.floor(h)];u.x=c.x,u.y=c.y,h+=o}return t}},1045:t=>{t.exports=function(t,e,i){for(var s=0;s<t.length;s++){var r=t[s];r.anims&&r.anims.play(e,i)}return t}},6124:t=>{t.exports=function(t,e,i,s,r,n){var a;void 0===s&&(s=0),void 0===r&&(r=0),void 0===n&&(n=1);var o=0,h=t.length;if(1===n)for(a=r;a<h;a++)t[a][e]+=i+o*s,o++;else for(a=r;a>=0;a--)t[a][e]+=i+o*s,o++;return t}},23646:t=>{t.exports=function(t,e,i,s,r,n){var a;void 0===s&&(s=0),void 0===r&&(r=0),void 0===n&&(n=1);var o=0,h=t.length;if(1===n)for(a=r;a<h;a++)t[a][e]=i+o*s,o++;else for(a=r;a>=0;a--)t[a][e]=i+o*s,o++;return t}},4392:(t,e,i)=>{var s=i(30977);t.exports=function(t,e){for(var i=0;i<t.length;i++)s(e,t[i]);return t}},94985:(t,e,i)=>{var s=i(72006);t.exports=function(t,e){for(var i=0;i<t.length;i++)s(e,t[i]);return t}},63305:(t,e,i)=>{var s=i(74077);t.exports=function(t,e){for(var i=0;i<t.length;i++)s(e,t[i]);return t}},90739:(t,e,i)=>{var s=i(30001);t.exports=function(t,e){for(var i=0;i<t.length;i++)s(e,t[i]);return t}},91417:(t,e,i)=>{var s=i(99761);t.exports=function(t,e){for(var i=0;i<t.length;i++)s(e,t[i]);return t}},26182:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,r,n){return s(t,"rotation",e,i,r,n)}},87299:(t,e,i)=>{var s=i(72395),r=i(53996);t.exports=function(t,e,i){for(var n=e.x,a=e.y,o=0;o<t.length;o++){var h=t[o];s(h,n,a,i,Math.max(1,r(h.x,h.y,n,a)))}return t}},92194:(t,e,i)=>{var s=i(72395);t.exports=function(t,e,i,r){var n=e.x,a=e.y;if(0===r)return t;for(var o=0;o<t.length;o++)s(t[o],n,a,i,r);return t}},30363:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,r,n){return s(t,"scaleX",e,i,r,n)}},51449:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,r,n,a,o){return null==i&&(i=e),s(t,"scaleX",e,r,a,o),s(t,"scaleY",i,n,a,o)}},64895:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,r,n){return s(t,"scaleY",e,i,r,n)}},30329:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n){return s(t,"alpha",e,i,r,n)}},43954:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r){return s(t,"blendMode",e,0,i,r)}},70688:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n){return s(t,"depth",e,i,r,n)}},8314:t=>{t.exports=function(t,e,i){for(var s=0;s<t.length;s++)t[s].setInteractive(e,i);return t}},12894:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n,a,o){return null==i&&(i=e),s(t,"originX",e,r,a,o),s(t,"originY",i,n,a,o),t.forEach((function(t){t.updateDisplayOrigin()})),t}},38767:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n){return s(t,"rotation",e,i,r,n)}},18584:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n,a,o){return null==i&&(i=e),s(t,"scaleX",e,r,a,o),s(t,"scaleY",i,n,a,o)}},17381:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n){return s(t,"scaleX",e,i,r,n)}},74370:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n){return s(t,"scaleY",e,i,r,n)}},27773:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n,a,o){return null==i&&(i=e),s(t,"scrollFactorX",e,r,a,o),s(t,"scrollFactorY",i,n,a,o)}},75257:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n){return s(t,"scrollFactorX",e,i,r,n)}},54512:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n){return s(t,"scrollFactorY",e,i,r,n)}},69423:t=>{t.exports=function(t,e,i,s,r){for(var n=0;n<t.length;n++)t[n].setTint(e,i,s,r);return t}},58291:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r){return s(t,"visible",e,0,i,r)}},94833:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n){return s(t,"x",e,i,r,n)}},14284:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n,a,o){return null==i&&(i=e),s(t,"x",e,r,a,o),s(t,"y",i,n,a,o)}},96574:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,r,n){return s(t,"y",e,i,r,n)}},74086:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,r,n){var a,o;void 0===r&&(r=0),void 0===n&&(n=new s);var h=t.length;if(1===h)a=t[0].x,o=t[0].y,t[0].x=e,t[0].y=i;else{var l=1,u=0;0===r&&(u=h-1,l=h-2),a=t[u].x,o=t[u].y,t[u].x=e,t[u].y=i;for(var c=0;c<h;c++)if(!(l>=h||-1===l)){var d=t[l],f=d.x,p=d.y;d.x=a,d.y=o,a=f,o=p,0===r?l--:l++}}return n.x=a,n.y=o,n}},86347:(t,e,i)=>{var s=i(18592);t.exports=function(t){return s(t)}},1558:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i,r,n){void 0===n&&(n=!1);var a,o=Math.abs(r-i)/t.length;if(n)for(a=0;a<t.length;a++)t[a][e]+=s(a*o,i,r);else for(a=0;a<t.length;a++)t[a][e]=s(a*o,i,r);return t}},9938:(t,e,i)=>{var s=i(87736);t.exports=function(t,e,i,r,n){void 0===n&&(n=!1);var a,o=Math.abs(r-i)/t.length;if(n)for(a=0;a<t.length;a++)t[a][e]+=s(a*o,i,r);else for(a=0;a<t.length;a++)t[a][e]=s(a*o,i,r);return t}},71060:t=>{t.exports=function(t,e,i,s,r){if(void 0===r&&(r=!1),0===t.length)return t;if(1===t.length)return r?t[0][e]+=(s+i)/2:t[0][e]=(s+i)/2,t;var n,a=Math.abs(s-i)/(t.length-1);if(r)for(n=0;n<t.length;n++)t[n][e]+=n*a+i;else for(n=0;n<t.length;n++)t[n][e]=n*a+i;return t}},11207:t=>{t.exports=function(t){for(var e=0;e<t.length;e++)t[e].visible=!t[e].visible;return t}},24404:(t,e,i)=>{var s=i(1071);t.exports=function(t,e,i){void 0===i&&(i=0);for(var r=0;r<t.length;r++){var n=t[r];n.x=s(n.x,e.left-i,e.right+i),n.y=s(n.y,e.top-i,e.bottom+i)}return t}},83979:(t,e,i)=>{t.exports={AlignTo:i(62270),Angle:i(61148),Call:i(22015),GetFirst:i(31060),GetLast:i(52367),GridAlign:i(12673),IncAlpha:i(691),IncX:i(3877),IncXY:i(71020),IncY:i(28970),PlaceOnCircle:i(82249),PlaceOnEllipse:i(30285),PlaceOnLine:i(61557),PlaceOnRectangle:i(63549),PlaceOnTriangle:i(51629),PlayAnimation:i(1045),PropertyValueInc:i(6124),PropertyValueSet:i(23646),RandomCircle:i(4392),RandomEllipse:i(94985),RandomLine:i(63305),RandomRectangle:i(90739),RandomTriangle:i(91417),Rotate:i(26182),RotateAround:i(87299),RotateAroundDistance:i(92194),ScaleX:i(30363),ScaleXY:i(51449),ScaleY:i(64895),SetAlpha:i(30329),SetBlendMode:i(43954),SetDepth:i(70688),SetHitArea:i(8314),SetOrigin:i(12894),SetRotation:i(38767),SetScale:i(18584),SetScaleX:i(17381),SetScaleY:i(74370),SetScrollFactor:i(27773),SetScrollFactorX:i(75257),SetScrollFactorY:i(54512),SetTint:i(69423),SetVisible:i(58291),SetX:i(94833),SetXY:i(14284),SetY:i(96574),ShiftPosition:i(74086),Shuffle:i(86347),SmootherStep:i(9938),SmoothStep:i(1558),Spread:i(71060),ToggleVisible:i(11207),WrapInRectangle:i(24404)}},85463:(t,e,i)=>{var s=i(82897),r=i(56694),n=i(16938),a=i(2406),o=i(71519),h=i(10850),l=i(28834),u=new r({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,h(i,"frames",[]),h(i,"defaultTextureKey",null),h(i,"sortFrames",!0)),this.frameRate=h(i,"frameRate",null),this.duration=h(i,"duration",null),this.msPerFrame,this.skipMissedFrames=h(i,"skipMissedFrames",!0),this.delay=h(i,"delay",0),this.repeat=h(i,"repeat",0),this.repeatDelay=h(i,"repeatDelay",0),this.yoyo=h(i,"yoyo",!1),this.showBeforeDelay=h(i,"showBeforeDelay",!1),this.showOnStart=h(i,"showOnStart",!1),this.hideOnComplete=h(i,"hideOnComplete",!1),this.randomFrame=h(i,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(n.PAUSE_ALL,this.pause,this),this.manager.on(n.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,s){null===i&&null===s?(t.frameRate=24,t.duration=24/e*1e3):i&&null===s?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=s,t.duration=e/s*1e3),t.msPerFrame=1e3/t.frameRate},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var s=this.frames.slice(0,t),r=this.frames.slice(t);this.frames=s.concat(i,r)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t<this.frames.length},getFirstTick:function(t){t.accumulator=0,t.nextTick=t.currentFrame.duration?t.currentFrame.duration:t.msPerFrame},getFrameAt:function(t){return this.frames[t]},getFrames:function(t,e,i,s){void 0===s&&(s=!0);var r,n,a,u,c=[],d=1;if("string"==typeof e){if(u=e,!t.exists(u))return console.warn('Texture "%s" not found',u),c;var f=t.get(u).getFrameNames();s&&l(f),e=[],f.forEach((function(t){e.push({key:u,frame:t})}))}if(!Array.isArray(e)||0===e.length)return c;for(a=0;a<e.length;a++){var p=e[a],g=h(p,"key",i);if(g){var v=h(p,"frame",0),m=t.getFrame(g,v);m?((n=new o(g,v,d,m)).duration=h(p,"duration",0),n.isFirst=!r,r&&(r.nextFrame=n,n.prevFrame=r),c.push(n),r=n,d++):console.warn('Texture "%s" not found',g)}}if(c.length>0){n.isLast=!0,n.nextFrame=c[0],c[0].prevFrame=n;var x=1/(c.length-1);for(a=0;a<c.length;a++)c[a].progress=a*x}return c},getNextTick:function(t){t.accumulator-=t.nextTick,t.nextTick=t.currentFrame.duration?t.currentFrame.duration:t.msPerFrame},getFrameByProgress:function(t){return t=s(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t.yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t.inReverse===!e&&t.repeatCounter>0)return(0===t.repeatDelay||t.pendingRepeat)&&(t.forward=e),void this.repeatAnimation(t);if(t.inReverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?(t.inReverse&&!t.forward||(t.forward=!0),this.repeatAnimation(t)):t.complete():this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.setCurrentFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop){if(0===t._pendingStopValue)return t.stop();t._pendingStopValue--}t.repeatDelay>0&&!t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t.repeatDelay):(t.repeatCounter--,t.forward?t.setCurrentFrame(t.currentFrame.nextFrame):t.setCurrentFrame(t.currentFrame.prevFrame),t.isPlaying&&(this.getNextTick(t),t.handleRepeat()))},toJSON:function(){var t={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(e){t.frames.push(e.toJSON())})),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),s=0;s<e;s++)(t=this.frames[s]).index=s+1,t.isFirst=!1,t.isLast=!1,t.progress=s*i,0===s?(t.isFirst=!0,1===e?(t.isLast=!0,t.nextFrame=t,t.prevFrame=t):(t.isLast=!1,t.prevFrame=this.frames[e-1],t.nextFrame=this.frames[s+1])):s===e-1&&e>1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[s-1],t.nextFrame=this.frames[s+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(n.PAUSE_ALL,this.pause,this),this.manager.off(n.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var t=0;t<this.frames.length;t++)this.frames[t].destroy();this.frames=[],this.manager=null}});t.exports=u},71519:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,r){void 0===r&&(r=!1),this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=r},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=s},90249:(t,e,i)=>{var s=i(85463),r=i(56694),n=i(33885),a=i(6659),o=i(16938),h=i(97081),l=i(72632),u=i(10850),c=i(83392),d=i(13401),f=i(76400),p=new r({Extends:a,initialize:function(t){a.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new n,this.mixes=new n,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var s=this.anims,r=this.mixes,n="string"==typeof t?t:t.key,a="string"==typeof e?e:e.key;if(s.has(n)&&s.has(a)){var o=r.get(n);o||(o={}),o[a]=i,r.set(n,o)}return this},removeMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,r=i.get(s);if(r)if(e){var n="string"==typeof e?e:e.key;r.hasOwnProperty(n)&&delete r[n]}else e||i.delete(s);return this},getMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,r="string"==typeof e?e:e.key,n=i.get(s);return n&&n.hasOwnProperty(r)?n[r]:0},add:function(t,e){return this.anims.has(t)?(console.warn("Animation key exists: "+t),this):(e.key=t,this.anims.set(t,e),this.emit(o.ADD_ANIMATION,t,e),this)},exists:function(t){return this.anims.has(t)},createFromAseprite:function(t,e,i){var s=[],r=this.game.cache.json.get(t);if(!r)return console.warn("No Aseprite data found for: "+t),s;var n=this,a=u(r,"meta",null),o=u(r,"frames",null);a&&o&&u(a,"frameTags",[]).forEach((function(r){var a=[],h=l(r,"name",null),u=l(r,"from",0),d=l(r,"to",0),f=l(r,"direction","forward");if(h&&(!e||e&&e.indexOf(h)>-1)){for(var p=0,g=u;g<=d;g++){var v=g.toString(),m=o[v];if(m){var x=l(m,"duration",c.MAX_SAFE_INTEGER);a.push({key:t,frame:v,duration:x}),p+=x}}"reverse"===f&&(a=a.reverse());var y,T={key:h,frames:a,duration:p,yoyo:"pingpong"===f};i?i.anims&&(y=i.anims.create(T)):y=n.create(T),y&&s.push(y)}}));return s},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))?console.warn("AnimationManager key already exists: "+e):(i=new s(this,e,t),this.anims.set(e,i),this.emit(o.ADD_ANIMATION,e,i))),i},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var s=0;s<t.anims.length;s++)i.push(this.create(t.anims[s]));t.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=t.globalTimeScale)}else t.hasOwnProperty("key")&&"frame"===t.type&&i.push(this.create(t));return i},generateFrameNames:function(t,e){var i=u(e,"prefix",""),s=u(e,"start",0),r=u(e,"end",0),n=u(e,"suffix",""),a=u(e,"zeroPad",0),o=u(e,"outputArray",[]),h=u(e,"frames",!1);if(!this.textureManager.exists(t))return console.warn('Texture "%s" not found',t),o;var l,c=this.textureManager.get(t);if(!c)return o;if(e)for(h||(h=d(s,r)),l=0;l<h.length;l++){var p=i+f(h[l],a,"0",1)+n;c.has(p)?o.push({key:t,frame:p}):console.warn('Frame "%s" not found in texture "%s"',p,t)}else for(h=c.getFrameNames(),l=0;l<h.length;l++)o.push({key:t,frame:h[l]});return o},generateFrameNumbers:function(t,e){var i=u(e,"start",0),s=u(e,"end",-1),r=u(e,"first",!1),n=u(e,"outputArray",[]),a=u(e,"frames",!1);if(!this.textureManager.exists(t))return console.warn('Texture "%s" not found',t),n;var o=this.textureManager.get(t);if(!o)return n;r&&o.has(r)&&n.push({key:t,frame:r}),a||(-1===s&&(s=o.frameTotal-2),a=d(i,s));for(var h=0;h<a.length;h++){var l=a[h];o.has(l)?n.push({key:t,frame:l}):console.warn('Frame "%s" not found in texture "%s"',l,t)}return n},get:function(t){return this.anims.get(t)},getAnimsFromTexture:function(t){for(var e=this.textureManager.get(t).key,i=this.anims.getArray(),s=[],r=0;r<i.length;r++)for(var n=i[r],a=n.frames,o=0;o<a.length;o++)if(a[o].textureKey===e){s.push(n.key);break}return s},pauseAll:function(){return this.paused||(this.paused=!0,this.emit(o.PAUSE_ALL)),this},play:function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)e[i].anims.play(t);return this},staggerPlay:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=!0),Array.isArray(e)||(e=[e]);var r=e.length;s||r--;for(var n=0;n<e.length;n++){var a=i<0?Math.abs(i)*(r-n):i*n;e[n].anims.playAfterDelay(t,a)}return this},remove:function(t){var e=this.get(t);return e&&(this.emit(o.REMOVE_ANIMATION,t,e),this.anims.delete(t),this.removeMix(t)),e},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit(o.RESUME_ALL)),this},toJSON:function(t){var e={anims:[],globalTimeScale:this.globalTimeScale};return void 0!==t&&""!==t?e.anims.push(this.anims.get(t).toJSON()):this.anims.each((function(t,i){e.anims.push(i.toJSON())})),e},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}});t.exports=p},16569:(t,e,i)=>{var s=i(85463),r=i(17489),n=i(56694),a=i(33885),o=i(16938),h=i(72632),l=new n({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(o.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(t){var e=this.parent;if(void 0===t)return this.nextAnimsQueue.length=0,this.nextAnim=null,e;Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var s=t[i];this.nextAnim?this.nextAnimsQueue.push(s):this.nextAnim=s}return this.parent},getName:function(){return this.currentAnim?this.currentAnim.key:""},getFrameName:function(){return this.currentFrame?this.currentFrame.textureFrame:""},load:function(t){this.isPlaying&&this.stop();var e=this.animationManager,i="string"==typeof t?t:h(t,"key",null),s=this.exists(i)?this.get(i):e.get(i);if(s){this.currentAnim=s;var n=s.getTotalFrames(),a=h(t,"frameRate",s.frameRate),o=h(t,"duration",s.duration);s.calculateDuration(this,n,o,a),this.delay=h(t,"delay",s.delay),this.repeat=h(t,"repeat",s.repeat),this.repeatDelay=h(t,"repeatDelay",s.repeatDelay),this.yoyo=h(t,"yoyo",s.yoyo),this.showBeforeDelay=h(t,"showBeforeDelay",s.showBeforeDelay),this.showOnStart=h(t,"showOnStart",s.showOnStart),this.hideOnComplete=h(t,"hideOnComplete",s.hideOnComplete),this.skipMissedFrames=h(t,"skipMissedFrames",s.skipMissedFrames),this.randomFrame=h(t,"randomFrame",s.randomFrame),this.timeScale=h(t,"timeScale",this.timeScale);var l=h(t,"startFrame",0);l>n&&(l=0),this.randomFrame&&(l=r(0,n-1));var u=s.frames[l];0!==l||this.forward||(u=s.getLastFrame()),this.currentFrame=u}else console.warn("Missing animation: "+i);return this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){if(this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e}else this.delayCounter=e,this.play(t,!0);return this.parent},playAfterRepeat:function(t,e){if(void 0===e&&(e=1),this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e}else this.play(t);return this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent,r="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===r)return s;if(i&&this.isPlaying){var n=this.animationManager.getMix(i.key,t);if(n>0)return this.playAfterDelay(t,n)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){void 0===e&&(e=!1);var i="string"==typeof t?t:t.key;return e&&this.isPlaying&&this.currentAnim.key===i?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t))},startAnimation:function(t){this.load(t);var e=this.currentAnim,i=this.parent;return e?(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame),i):i},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(o.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(o.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(o.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(o.ANIMATION_COMPLETE,o.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim;if(i){var s=this.currentFrame,r=this.parent,n=s.textureFrame;r.emit(t,i,s,r,n),e&&r.emit(e+i.key,i,s,r,n)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;if(!t)return 0;var e=t.progress;return this.inReverse&&(e*=-1),e},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},setRepeat:function(t){return this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},globalRemove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent;return i?(e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),i.getFirstTick(this),this.emitEvents(o.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!t,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(i.frames[0]),this.parent):s},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(t)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)}return this.parent},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopAfterRepeat:function(t){return void 0===t&&(t=1),-1!==this.repeatCounter&&t>this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale*this.animationManager.globalTimeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var s=0;do{this.forward?i.nextFrame(this):i.previousFrame(this),s++}while(this.isPlaying&&this.accumulator>this.nextTick&&s<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(o.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))?console.warn("Animation key already exists: "+e):(i=new s(this,e,t),this.anims||(this.anims=new a),this.anims.set(e,i))),i},createFromAseprite:function(t,e){return this.animationManager.createFromAseprite(t,e,this.parent)},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(o.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}}});t.exports=l},44509:t=>{t.exports="add"},84563:t=>{t.exports="animationcomplete"},61586:t=>{t.exports="animationcomplete-"},72175:t=>{t.exports="animationrepeat"},568:t=>{t.exports="animationrestart"},37690:t=>{t.exports="animationstart"},58525:t=>{t.exports="animationstop"},5243:t=>{t.exports="animationupdate"},10598:t=>{t.exports="pauseall"},4860:t=>{t.exports="remove"},31865:t=>{t.exports="resumeall"},16938:(t,e,i)=>{t.exports={ADD_ANIMATION:i(44509),ANIMATION_COMPLETE:i(84563),ANIMATION_COMPLETE_KEY:i(61586),ANIMATION_REPEAT:i(72175),ANIMATION_RESTART:i(568),ANIMATION_START:i(37690),ANIMATION_STOP:i(58525),ANIMATION_UPDATE:i(5243),PAUSE_ALL:i(10598),REMOVE_ANIMATION:i(4860),RESUME_ALL:i(31865)}},13517:(t,e,i)=>{t.exports={Animation:i(85463),AnimationFrame:i(71519),AnimationManager:i(90249),AnimationState:i(16569),Events:i(16938)}},23740:(t,e,i)=>{var s=i(56694),r=i(33885),n=i(6659),a=i(69773),o=new s({initialize:function(){this.entries=new r,this.events=new n},add:function(t,e){return this.entries.set(t,e),this.events.emit(a.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(a.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},43474:(t,e,i)=>{var s=i(23740),r=i(56694),n=i(97081),a=new r({initialize:function(t){this.game=t,this.binary=new s,this.bitmapFont=new s,this.json=new s,this.physics=new s,this.shader=new s,this.audio=new s,this.video=new s,this.text=new s,this.html=new s,this.obj=new s,this.tilemap=new s,this.xml=new s,this.custom={},this.game.events.once(n.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new s),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e<t.length;e++)this[t[e]].destroy(),this[t[e]]=null;for(var i in this.custom)this.custom[i].destroy();this.custom=null,this.game=null}});t.exports=a},94762:t=>{t.exports="add"},75968:t=>{t.exports="remove"},69773:(t,e,i)=>{t.exports={ADD:i(94762),REMOVE:i(75968)}},45820:(t,e,i)=>{t.exports={BaseCache:i(23740),CacheManager:i(43474),Events:i(69773)}},51052:(t,e,i)=>{var s=i(56694),r=i(64937),n=i(75606),a=i(6659),o=i(89787),h=i(74118),l=i(69360),u=i(93222),c=i(93736),d=new s({Extends:a,Mixins:[r.AlphaSingle,r.Visible],initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),a.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=s,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,s/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var s=.5*this.width,r=.5*this.height;return i.x=t-s,i.y=e-r,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],s=e[1],r=e[2],n=e[3],a=i*n-s*r;if(!a)return t;var o=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.y,p=f+d,g=this.x,v=g+c,m=this.culledObjects,x=t.length;a=1/a,m.length=0;for(var y=0;y<x;++y){var T=t[y];if(T.hasOwnProperty("width")&&!T.parentContainer){var w=T.width,E=T.height,S=T.x-l*T.scrollFactorX-w*T.originX,b=T.y-u*T.scrollFactorY-E*T.originY;(S+w)*i+(b+E)*r+o>g&&S*i+b*r+o<v&&(S+w)*s+(b+E)*n+h>f&&S*s+b*n+h<p&&m.push(T)}else m.push(T)}return m},getWorldPoint:function(t,e,i){void 0===i&&(i=new c);var s=this.matrix.matrix,r=s[0],n=s[1],a=s[2],o=s[3],h=s[4],l=s[5],u=r*o-n*a;if(!u)return i.x=t,i.y=e,i;var d=o*(u=1/u),f=-n*u,p=-a*u,g=r*u,v=(a*l-o*h)*u,m=(n*h-r*l)*u,x=Math.cos(this.rotation),y=Math.sin(this.rotation),T=this.zoomX,w=this.zoomY,E=this.scrollX,S=this.scrollY,b=t+(E*x-S*y)*T,A=e+(E*y+S*x)*w;return i.x=b*d+A*p+v,i.y=b*f+A*g+m,i},ignore:function(t){var e=this.id;Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var s=t[i];Array.isArray(s)?this.ignore(s):s.isParent?this.ignore(s.getChildren()):s.cameraFilter|=e}return this},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,s=.5*e,r=this.zoomX,n=this.zoomY,a=this.matrix,o=t*this.originX,h=e*this.originY,l=this.scrollX,u=this.scrollY;this.useBounds&&(l=this.clampX(l),u=this.clampY(u)),this.scrollX=l,this.scrollY=u;var c=l+i,d=u+s;this.midPoint.set(c,d);var f=t/r,p=e/n;this.worldView.setTo(c-f/2,d-p/2,f,p),a.applyITRS(this.x+o,this.y+h,this.rotation,r,n),a.translate(-o,-h)},clampX:function(t){var e=this._bounds,i=this.displayWidth,s=e.x+(i-this.width)/2,r=Math.max(s,s+e.width-i);return t<s?t=s:t>r&&(t=r),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,s=e.y+(i-this.height)/2,r=Math.max(s,s+e.height-i);return t<s?t=s:t>r&&(t=r),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=n(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,s,r){return void 0===r&&(r=!1),this._bounds.setTo(t,e,i,s),this.dirty=!0,this.useBounds=!0,r?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t,e){void 0===e&&(e=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t,this.isSceneCamera=e;var i=t.sys;return this.sceneManager=i.game.scene,this.scaleManager=i.scale,this.cameraManager=i.cameras,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setZoom:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),0===t&&(t=.001),0===e&&(e=.001),this.zoomX=t,this.zoomY=e,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={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&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},setIsSceneCamera:function(t){return this.isSceneCamera=t,this},updateSystem:function(){if(this.scaleManager&&this.isSceneCamera){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(o.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(t){this._x=t,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){t!==this._scrollX&&(this._scrollX=t,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(t){t!==this._scrollY&&(this._scrollY=t,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(t){this._zoomX=t,this._zoomY=t,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(t){this._zoomX=t,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(t){this._zoomY=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,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}}});t.exports=d},47751:(t,e,i)=>{var s=i(51052),r=i(79993),n=i(82897),a=i(56694),o=i(64937),h=i(53030),l=i(89787),u=i(42798),c=i(74118),d=i(93736),f=new a({Extends:s,Mixins:[o.PostPipeline],initialize:function(t,e,i,r){s.call(this,t,e,i,r),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new h.Fade(this),this.flashEffect=new h.Flash(this),this.shakeEffect=new h.Shake(this),this.panEffect=new h.Pan(this),this.rotateToEffect=new h.RotateTo(this),this.zoomEffect=new h.Zoom(this),this.lerp=new d(1,1),this.followOffset=new d,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new c(0,0,t,e),this._follow){var i=this.width/2,s=this.height/2,n=this._follow.x-this.followOffset.x,a=this._follow.y-this.followOffset.y;this.midPoint.set(n,a),this.scrollX=n-i,this.scrollY=a-s}r(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(t,e,i,s,r,n){return this.fadeEffect.start(!1,t,e,i,s,!0,r,n)},fadeOut:function(t,e,i,s,r,n){return this.fadeEffect.start(!0,t,e,i,s,!0,r,n)},fadeFrom:function(t,e,i,s,r,n,a){return this.fadeEffect.start(!1,t,e,i,s,r,n,a)},fade:function(t,e,i,s,r,n,a){return this.fadeEffect.start(!0,t,e,i,s,r,n,a)},flash:function(t,e,i,s,r,n,a){return this.flashEffect.start(t,e,i,s,r,n,a)},shake:function(t,e,i,s,r){return this.shakeEffect.start(t,e,i,s,r)},pan:function(t,e,i,s,r,n,a){return this.panEffect.start(t,e,i,s,r,n,a)},rotateTo:function(t,e,i,s,r,n,a){return this.rotateToEffect.start(t,e,i,s,r,n,a)},zoomTo:function(t,e,i,s,r,n){return this.zoomEffect.start(t,e,i,s,r,n)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,s=.5*e,n=this.zoom,a=this.matrix,o=t*this.originX,h=e*this.originY,c=this._follow,d=this.deadzone,f=this.scrollX,p=this.scrollY;d&&r(d,this.midPoint.x,this.midPoint.y);var g=!1;if(c&&!this.panEffect.isRunning){var v=this.lerp,m=c.x-this.followOffset.x,x=c.y-this.followOffset.y;d?(m<d.x?f=u(f,f-(d.x-m),v.x):m>d.right&&(f=u(f,f+(m-d.right),v.x)),x<d.y?p=u(p,p-(d.y-x),v.y):x>d.bottom&&(p=u(p,p+(x-d.bottom),v.y))):(f=u(f,m-o,v.x),p=u(p,x-h,v.y)),g=!0}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.scrollX=f,this.scrollY=p;var y=f+i,T=p+s;this.midPoint.set(y,T);var w=t/n,E=e/n,S=Math.floor(y-w/2),b=Math.floor(T-E/2);this.worldView.setTo(S,b,w,E),a.applyITRS(Math.floor(this.x+o),Math.floor(this.y+h),this.rotation,n,n),a.translate(-o,-h),this.shakeEffect.preRender(),g&&this.emit(l.FOLLOW_UPDATE,this,c)},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,s,r,a){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===s&&(s=i),void 0===r&&(r=0),void 0===a&&(a=r),this._follow=t,this.roundPixels=e,i=n(i,0,1),s=n(s,0,1),this.lerp.set(i,s),this.followOffset.set(r,a);var o=this.width/2,h=this.height/2,l=t.x-r,u=t.y-a;return this.midPoint.set(l,u),this.scrollX=l-o,this.scrollY=u-h,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(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},62382:(t,e,i)=>{var s=i(47751),r=i(56694),n=i(72632),a=i(91963),o=i(94287),h=i(40444),l=i(7599),u=new r({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,t.sys.events.once(l.BOOT,this.boot,this),t.sys.events.on(l.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new s(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(h.RESIZE,this.onResize,this),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on(l.UPDATE,this.update,this),e.once(l.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,r,n,a){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===r&&(r=this.scene.sys.scale.height),void 0===n&&(n=!1),void 0===a&&(a="");var o=new s(t,e,i,r);return o.setName(a),o.setScene(this.scene),o.setRoundPixels(this.roundPixels),o.id=this.getNextID(),this.cameras.push(o),n&&(this.main=o),o},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var s=!1,r=0;r<t.length;r++){var n=t[r];n&&n.id===e&&(s=!0)}if(!s)return e;e<<=1}return 0},getTotal:function(t){void 0===t&&(t=!1);for(var e=0,i=this.cameras,s=0;s<i.length;s++){var r=i[s];(!t||t&&r.visible)&&e++}return e},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.scale.width,i=this.scene.sys.scale.height,s=0;s<t.length;s++){var r=t[s],a=n(r,"x",0),o=n(r,"y",0),h=n(r,"width",e),l=n(r,"height",i),u=this.add(a,o,h,l);u.name=n(r,"name",""),u.zoom=n(r,"zoom",1),u.rotation=n(r,"rotation",0),u.scrollX=n(r,"scrollX",0),u.scrollY=n(r,"scrollY",0),u.roundPixels=n(r,"roundPixels",!1),u.visible=n(r,"visible",!0);var c=n(r,"backgroundColor",!1);c&&u.setBackgroundColor(c);var d=n(r,"bounds",null);if(d){var f=n(d,"x",0),p=n(d,"y",0),g=n(d,"width",e),v=n(d,"height",i);u.setBounds(f,p,g,v)}}return this},getCamera:function(t){for(var e=this.cameras,i=0;i<e.length;i++)if(e[i].name===t)return e[i];return null},getCamerasBelowPointer:function(t){for(var e=this.cameras,i=t.x,s=t.y,r=[],n=0;n<e.length;n++){var a=e[n];a.visible&&a.inputEnabled&&o(a,i,s)&&r.unshift(a)}return r},remove:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0,s=this.cameras,r=0;r<t.length;r++){var n=s.indexOf(t[r]);-1!==n&&(e?s[n].destroy():s[n].renderList=[],s.splice(n,1),i++)}return!this.main&&s[0]&&(this.main=s[0]),i},render:function(t,e){for(var i=this.scene,s=this.cameras,r=0;r<s.length;r++){var n=s[r];if(n.visible&&n.alpha>0){n.preRender();var a=this.getVisibleChildren(e.getChildren(),n);t.render(i,a,n)}}},getVisibleChildren:function(t,e){return t.filter((function(t){return t.willRender(e)}))},resetAll:function(){for(var t=0;t<this.cameras.length;t++)this.cameras[t].destroy();return this.cameras=[],this.main=this.add(),this.main},update:function(t,e){for(var i=0;i<this.cameras.length;i++)this.cameras[i].update(t,e)},onResize:function(t,e,i,s,r){for(var n=0;n<this.cameras.length;n++){var a=this.cameras[n];0===a._x&&0===a._y&&a._width===s&&a._height===r&&a.setSize(e.width,e.height)}},resize:function(t,e){for(var i=0;i<this.cameras.length;i++)this.cameras[i].setSize(t,e)},shutdown:function(){this.main=void 0;for(var t=0;t<this.cameras.length;t++)this.cameras[t].destroy();this.cameras=[];var e=this.systems.events;e.off(l.UPDATE,this.update,this),e.off(l.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.systems.events.off(l.START,this.start,this),this.systems.events.off(l.DESTROY,this.destroy,this),this.systems.game.scale.off(h.RESIZE,this.onResize,this),this.scene=null,this.systems=null}});a.register("CameraManager",u,"cameras"),t.exports=u},92522:(t,e,i)=>{var s=i(82897),r=i(56694),n=i(89787),a=new r({initialize:function(t){this.camera=t,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(t,e,i,s,r,a,o,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=0),void 0===a&&(a=!1),void 0===o&&(o=null),void 0===h&&(h=this.camera.scene),!a&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=s,this.blue=r,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=h;var l=t?n.FADE_OUT_START:n.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,s,r),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this.direction?this.progress:1-this.progress:(this.alpha=this.direction?1:0,this.effectComplete()))},postRenderCanvas:function(t){if(!this.isRunning&&!this.isComplete)return!1;var e=this.camera;return t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(t,e){if(!this.isRunning&&!this.isComplete)return!1;var i=this.camera,s=this.red/255,r=this.green/255,n=this.blue/255;return t.drawFillRect(i.x,i.y,i.width,i.height,e(n,r,s,1),this.alpha),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var t=this.direction?n.FADE_OUT_COMPLETE:n.FADE_IN_COMPLETE;this.camera.emit(t,this.camera,this)},reset:function(){this.isRunning=!1,this.isComplete=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=a},22151:(t,e,i)=>{var s=i(82897),r=i(56694),n=i(89787),a=new r({initialize:function(t){this.camera=t,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(t,e,i,s,r,a,o){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===s&&(s=255),void 0===r&&(r=!1),void 0===a&&(a=null),void 0===o&&(o=this.camera.scene),!r&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=s,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=o,this.camera.emit(n.FLASH_START,this.camera,this,t,e,i,s)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this._alpha*(1-this.progress):this.effectComplete())},postRenderCanvas:function(t){if(!this.isRunning)return!1;var e=this.camera;return t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(t,e){if(!this.isRunning)return!1;var i=this.camera,s=this.red/255,r=this.green/255,n=this.blue/255;return t.drawFillRect(i.x,i.y,i.width,i.height,e(n,r,s,1),this.alpha),!0},effectComplete:function(){this.alpha=this._alpha,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(n.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=a},37551:(t,e,i)=>{var s=i(82897),r=i(56694),n=i(35060),a=i(89787),o=i(93736),h=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new o,this.current=new o,this.destination=new o,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,r,o,h){void 0===i&&(i=1e3),void 0===s&&(s=n.Linear),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===h&&(h=this.camera.scene);var l=this.camera;return!r&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(l.scrollX,l.scrollY),this.destination.set(t,e),l.getScroll(t,e,this.current),"string"==typeof s&&n.hasOwnProperty(s)?this.ease=n[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=o,this._onUpdateScope=h,this.camera.emit(a.PAN_START,this.camera,this,i,t,e)),l},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var r=this.camera;if(this._elapsed<this.duration){var n=this.ease(i);r.getScroll(this.destination.x,this.destination.y,this.current);var a=this.source.x+(this.current.x-this.source.x)*n,o=this.source.y+(this.current.y-this.source.y)*n;r.setScroll(a,o),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,i,a,o)}else r.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,i,r.scrollX,r.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(a.PAN_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}});t.exports=h},1771:(t,e,i)=>{var s=i(82897),r=i(56694),n=i(89787),a=i(35060),o=new r({initialize:function(t){this.camera=t,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(t,e,i,s,r,o,h){void 0===i&&(i=1e3),void 0===s&&(s=a.Linear),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===h&&(h=this.camera.scene),void 0===e&&(e=!1),this.shortestPath=e;var l=t;t<0?(l=-1*t,this.clockwise=!1):this.clockwise=!0;var u=360*Math.PI/180;l-=Math.floor(l/u)*u;var c=this.camera;if(!r&&this.isRunning)return c;if(this.isRunning=!0,this.duration=i,this.progress=0,this.source=c.rotation,this.destination=l,"string"==typeof s&&a.hasOwnProperty(s)?this.ease=a[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=o,this._onUpdateScope=h,this.shortestPath){var d=0,f=0;(d=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(f=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>f&&(this.clockwise=!1)}return this.camera.emit(n.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var r=this.camera;if(this._elapsed<this.duration){var n=this.ease(i);this.current=r.rotation;var a=0,o=360*Math.PI/180,h=this.destination,l=this.current;!1===this.clockwise&&(h=this.current,l=this.destination),a=h>=l?Math.abs(h-l):Math.abs(h+o)-l;var u=0;u=this.clockwise?r.rotation+a*n:r.rotation-a*n,r.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,i,u)}else r.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(n.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}});t.exports=o},3241:(t,e,i)=>{var s=i(82897),r=i(56694),n=i(89787),a=i(93736),o=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new a,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,r){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===s&&(s=null),void 0===r&&(r=this.camera.scene),!i&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=r,this.camera.emit(n.SHAKE_START,this.camera,this,t,e)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var i=this.intensity,r=this.camera.width,n=this.camera.height,a=this.camera.zoom;this._offsetX=(Math.random()*i.x*r*2-i.x*r)*a,this._offsetY=(Math.random()*i.y*n*2-i.y*n)*a,this.camera.roundPixels&&(this._offsetX=Math.round(this._offsetX),this._offsetY=Math.round(this._offsetY))}else this.effectComplete()},effectComplete:function(){this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(n.SHAKE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.intensity=null}});t.exports=o},13383:(t,e,i)=>{var s=i(82897),r=i(56694),n=i(35060),a=i(89787),o=new r({initialize:function(t){this.camera=t,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(t,e,i,s,r,o){void 0===e&&(e=1e3),void 0===i&&(i=n.Linear),void 0===s&&(s=!1),void 0===r&&(r=null),void 0===o&&(o=this.camera.scene);var h=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&n.hasOwnProperty(i)?this.ease=n[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=o,this.camera.emit(a.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._elapsed<this.duration?(this.camera.zoom=this.source+(this.destination-this.source)*this.ease(this.progress),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.camera.zoom)):(this.camera.zoom=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.destination),this.effectComplete()))},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(a.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=o},53030:(t,e,i)=>{t.exports={Fade:i(92522),Flash:i(22151),Pan:i(37551),Shake:i(3241),RotateTo:i(1771),Zoom:i(13383)}},39577:t=>{t.exports="cameradestroy"},85373:t=>{t.exports="camerafadeincomplete"},92057:t=>{t.exports="camerafadeinstart"},1903:t=>{t.exports="camerafadeoutcomplete"},96131:t=>{t.exports="camerafadeoutstart"},85409:t=>{t.exports="cameraflashcomplete"},25500:t=>{t.exports="cameraflashstart"},44071:t=>{t.exports="followupdate"},19818:t=>{t.exports="camerapancomplete"},80002:t=>{t.exports="camerapanstart"},87966:t=>{t.exports="postrender"},74217:t=>{t.exports="prerender"},34805:t=>{t.exports="camerarotatecomplete"},30408:t=>{t.exports="camerarotatestart"},49856:t=>{t.exports="camerashakecomplete"},69189:t=>{t.exports="camerashakestart"},67657:t=>{t.exports="camerazoomcomplete"},14229:t=>{t.exports="camerazoomstart"},89787:(t,e,i)=>{t.exports={DESTROY:i(39577),FADE_IN_COMPLETE:i(85373),FADE_IN_START:i(92057),FADE_OUT_COMPLETE:i(1903),FADE_OUT_START:i(96131),FLASH_COMPLETE:i(85409),FLASH_START:i(25500),FOLLOW_UPDATE:i(44071),PAN_COMPLETE:i(19818),PAN_START:i(80002),POST_RENDER:i(87966),PRE_RENDER:i(74217),ROTATE_COMPLETE:i(34805),ROTATE_START:i(30408),SHAKE_COMPLETE:i(49856),SHAKE_START:i(69189),ZOOM_COMPLETE:i(67657),ZOOM_START:i(14229)}},32356:(t,e,i)=>{t.exports={Camera:i(47751),BaseCamera:i(51052),CameraManager:i(62382),Effects:i(53030),Events:i(89787)}},84219:(t,e,i)=>{var s=i(56694),r=i(10850),n=new s({initialize:function(t){this.camera=r(t,"camera",null),this.left=r(t,"left",null),this.right=r(t,"right",null),this.up=r(t,"up",null),this.down=r(t,"down",null),this.zoomIn=r(t,"zoomIn",null),this.zoomOut=r(t,"zoomOut",null),this.zoomSpeed=r(t,"zoomSpeed",.01),this.minZoom=r(t,"minZoom",.001),this.maxZoom=r(t,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=r(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=r(t,"speed.x",0),this.speedY=r(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoom<this.minZoom&&(e.zoom=this.minZoom)):this.zoomOut&&this.zoomOut.isDown&&(e.zoom+=this.zoomSpeed,e.zoom>this.maxZoom&&(e.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}});t.exports=n},69370:(t,e,i)=>{var s=i(56694),r=i(10850),n=new s({initialize:function(t){this.camera=r(t,"camera",null),this.left=r(t,"left",null),this.right=r(t,"right",null),this.up=r(t,"up",null),this.down=r(t,"down",null),this.zoomIn=r(t,"zoomIn",null),this.zoomOut=r(t,"zoomOut",null),this.zoomSpeed=r(t,"zoomSpeed",.01),this.minZoom=r(t,"minZoom",.001),this.maxZoom=r(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=r(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=r(t,"acceleration.x",0),this.accelY=r(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=r(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=r(t,"drag.x",0),this.dragY=r(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var s=r(t,"maxSpeed",null);"number"==typeof s?(this.maxSpeedX=s,this.maxSpeedY=s):(this.maxSpeedX=r(t,"maxSpeed.x",0),this.maxSpeedY=r(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,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,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<this.minZoom?e.zoom=this.minZoom:e.zoom>this.maxZoom&&(e.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}});t.exports=n},6524:(t,e,i)=>{t.exports={FixedKeyControl:i(84219),SmoothedKeyControl:i(69370)}},44143:(t,e,i)=>{t.exports={Controls:i(6524),Scene2D:i(32356)}},86459:(t,e,i)=>{var s={VERSION:"3.80.0-beta.2",BlendModes:i(95723),ScaleModes:i(27394),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},14033:(t,e,i)=>{var s=i(56694),r=i(86459),n=i(18360),a=i(77290),o=i(72632),h=i(10850),l=i(42911),u=i(72283),c=i(5923),d=i(65641),f=i(93222),p=new s({initialize:function(t){void 0===t&&(t={});var e=h(t,"scale",null);this.width=h(e,"width",1024,t),this.height=h(e,"height",768,t),this.zoom=h(e,"zoom",1,t),this.parent=h(e,"parent",void 0,t),this.scaleMode=h(e,e?"mode":"scaleMode",0,t),this.expandParent=h(e,"expandParent",!0,t),this.autoRound=h(e,"autoRound",!1,t),this.autoCenter=h(e,"autoCenter",0,t),this.resizeInterval=h(e,"resizeInterval",500,t),this.fullscreenTarget=h(e,"fullscreenTarget",null,t),this.minWidth=h(e,"min.width",0,t),this.maxWidth=h(e,"max.width",0,t),this.minHeight=h(e,"min.height",0,t),this.maxHeight=h(e,"max.height",0,t),this.renderType=h(t,"type",r.AUTO),this.canvas=h(t,"canvas",null),this.context=h(t,"context",null),this.canvasStyle=h(t,"canvasStyle",null),this.customEnvironment=h(t,"customEnvironment",!1),this.sceneConfig=h(t,"scene",null),this.seed=h(t,"seed",[(Date.now()*Math.random()).toString()]),c.RND=new c.RandomDataGenerator(this.seed),this.gameTitle=h(t,"title",""),this.gameURL=h(t,"url","https://phaser.io"),this.gameVersion=h(t,"version",""),this.autoFocus=h(t,"autoFocus",!0),this.stableSort=h(t,"stableSort",-1),-1===this.stableSort&&(this.stableSort=a.browser.es2019?1:0),a.features.stableSort=this.stableSort,this.domCreateContainer=h(t,"dom.createContainer",!1),this.domPointerEvents=h(t,"dom.pointerEvents","none"),this.inputKeyboard=h(t,"input.keyboard",!0),this.inputKeyboardEventTarget=h(t,"input.keyboard.target",window),this.inputKeyboardCapture=h(t,"input.keyboard.capture",[]),this.inputMouse=h(t,"input.mouse",!0),this.inputMouseEventTarget=h(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=h(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=h(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=h(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=h(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=h(t,"input.touch",a.input.touch),this.inputTouchEventTarget=h(t,"input.touch.target",null),this.inputTouchCapture=h(t,"input.touch.capture",!0),this.inputActivePointers=h(t,"input.activePointers",1),this.inputSmoothFactor=h(t,"input.smoothFactor",0),this.inputWindowEvents=h(t,"input.windowEvents",!0),this.inputGamepad=h(t,"input.gamepad",!1),this.inputGamepadEventTarget=h(t,"input.gamepad.target",window),this.disableContextMenu=h(t,"disableContextMenu",!1),this.audio=h(t,"audio",{}),this.hideBanner=!1===h(t,"banner",null),this.hidePhaser=h(t,"banner.hidePhaser",!1),this.bannerTextColor=h(t,"banner.text","#ffffff"),this.bannerBackgroundColor=h(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=h(t,"fps",null),this.disablePreFX=h(t,"disablePreFX",!1),this.disablePostFX=h(t,"disablePostFX",!1);var i=h(t,"render",null);this.pipeline=h(i,"pipeline",null,t),this.autoMobilePipeline=h(i,"autoMobilePipeline",!0,t),this.defaultPipeline=h(i,"defaultPipeline",d.MULTI_PIPELINE,t),this.antialias=h(i,"antialias",!0,t),this.antialiasGL=h(i,"antialiasGL",!0,t),this.mipmapFilter=h(i,"mipmapFilter","",t),this.desynchronized=h(i,"desynchronized",!1,t),this.roundPixels=h(i,"roundPixels",!0,t),this.pixelArt=h(i,"pixelArt",1!==this.zoom,t),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=h(i,"transparent",!1,t),this.clearBeforeRender=h(i,"clearBeforeRender",!0,t),this.preserveDrawingBuffer=h(i,"preserveDrawingBuffer",!1,t),this.premultipliedAlpha=h(i,"premultipliedAlpha",!0,t),this.failIfMajorPerformanceCaveat=h(i,"failIfMajorPerformanceCaveat",!1,t),this.powerPreference=h(i,"powerPreference","default",t),this.batchSize=h(i,"batchSize",4096,t),this.maxTextures=h(i,"maxTextures",-1,t),this.maxLights=h(i,"maxLights",10,t);var s=h(t,"backgroundColor",0);this.backgroundColor=f(s),this.transparent&&(this.backgroundColor=f(0),this.backgroundColor.alpha=0),this.preBoot=h(t,"callbacks.preBoot",u),this.postBoot=h(t,"callbacks.postBoot",u),this.physics=h(t,"physics",{}),this.defaultPhysicsSystem=h(this.physics,"default",!1),this.loaderBaseURL=h(t,"loader.baseURL",""),this.loaderPath=h(t,"loader.path",""),this.loaderMaxParallelDownloads=h(t,"loader.maxParallelDownloads",a.os.android?6:32),this.loaderCrossOrigin=h(t,"loader.crossOrigin",void 0),this.loaderResponseType=h(t,"loader.responseType",""),this.loaderAsync=h(t,"loader.async",!0),this.loaderUser=h(t,"loader.user",""),this.loaderPassword=h(t,"loader.password",""),this.loaderTimeout=h(t,"loader.timeout",0),this.loaderWithCredentials=h(t,"loader.withCredentials",!1),this.loaderImageLoadType=h(t,"loader.imageLoadType","XHR"),this.loaderLocalScheme=h(t,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=h(t,"fx.glow.quality",.1),this.glowFXDistance=h(t,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var p=h(t,"plugins",null),g=n.DefaultScene;p&&(Array.isArray(p)?this.defaultPlugins=p:l(p)&&(this.installGlobalPlugins=o(p,"global",[]),this.installScenePlugins=o(p,"scene",[]),Array.isArray(p.default)?g=p.default:Array.isArray(p.defaultMerge)&&(g=g.concat(p.defaultMerge)))),this.defaultPlugins=g;var v="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=h(t,"images.default",v+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=h(t,"images.missing",v+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=h(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=r.WEBGL:window.FORCE_CANVAS&&(this.renderType=r.CANVAS))}});t.exports=p},50150:(t,e,i)=>{var s=i(70616),r=i(61068),n=i(86459),a=i(90185);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===n.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==n.HEADLESS)if(e.renderType===n.AUTO&&(e.renderType=a.webGL?n.WEBGL:n.CANVAS),e.renderType===n.WEBGL){if(!a.webGL)throw new Error("Cannot create WebGL context, aborting.")}else{if(e.renderType!==n.CANVAS)throw new Error("Unknown value for renderer type: "+e.renderType);if(!a.canvas)throw new Error("Cannot create Canvas context, aborting.")}e.antialias||r.disableSmoothing();var o,h,l=t.scale.baseSize,u=l.width,c=l.height;(e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=r.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||s.setCrisp(t.canvas),e.renderType!==n.HEADLESS)&&(o=i(91135),h=i(11857),e.renderType===n.WEBGL?t.renderer=new h(t):(t.renderer=new o(t),t.context=t.renderer.gameContext))}},77291:(t,e,i)=>{var s=i(86459);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===s.CANVAS?i="Canvas":e.renderType===s.HEADLESS&&(i="Headless");var r,n=e.audio,a=t.device.audio;if(r=a.webAudio&&!n.disableWebAudio?"Web Audio":n.noAudio||!a.webAudio&&!a.audioData?"No Audio":"HTML5 Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+s.VERSION+" / https://phaser.io");else{var o,h="",l=[h];if(Array.isArray(e.bannerBackgroundColor))e.bannerBackgroundColor.forEach((function(t){h=h.concat("%c "),l.push("background: "+t),o=t})),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+o;else h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor);l.push("background: transparent"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / ")));e.hidePhaser||(h=h.concat("Phaser v"+s.VERSION+" ("+i+" | "+r+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},15213:(t,e,i)=>{var s=i(99584),r=i(90249),n=i(43474),a=i(61068),o=i(56694),h=i(14033),l=i(85178),u=i(50150),c=i(81078),d=i(77291),f=i(77290),p=i(21546),g=i(6659),v=i(97081),m=i(69898),x=i(91963),y=i(49274),T=i(756),w=i(13553),E=i(38203),S=i(6237),b=i(26617),A=i(26493),_=i(84191),C=new o({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new r(this),this.textures=new S(this),this.cache=new n(this),this.registry=new c(this,new g),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=_.create(this),this.loop=new b(this,this.config.fps),this.plugins=new y(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,p(this.boot.bind(this))},boot:function(){x.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),s(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},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)),A(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var s=this.renderer;s.preRender(),i.emit(v.PRE_RENDER,s,t,e),this.scene.render(s),s.postRender(),i.emit(v.POST_RENDER,s,t,e)}},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),this.scene.isProcessing=!1,i.emit(v.PRE_RENDER,null,t,e),i.emit(v.POST_RENDER,null,t,e)}},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},pause:function(){var t=this.isPaused;this.isPaused=!0,t||this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},resume:function(){var t=this.isPaused;this.isPaused=!1,t&&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(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(a.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}});t.exports=C},26617:(t,e,i)=>{var s=i(56694),r=i(10850),n=i(72283),a=i(27385),o=new s({initialize:function(t,e){this.game=t,this.raf=new a,this.started=!1,this.running=!1,this.minFps=r(e,"min",5),this.targetFps=r(e,"target",60),this.fpsLimit=r(e,"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=n,this.forceSetTimeOut=r(e,"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=r(e,"deltaHistory",10),this.panicMax=r(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=r(e,"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 t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=Math.min(this._target,this.deltaHistory[e]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(t){if(this.started)return this;this.started=!0,this.running=!0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=t;var i=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(i,this.forceSetTimeOut,this._target)},smoothDelta:function(t){var e=this.deltaIndex,i=this.deltaHistory,s=this.deltaSmoothingMax;(this._coolDown>0||!this.inFocus)&&(this._coolDown--,t=Math.min(t,this._target)),t>this._min&&(t=i[e],t=Math.min(t,this._min)),i[e]=t,this.deltaIndex++,this.deltaIndex>=s&&(this.deltaIndex=0);for(var r=0,n=0;n<s;n++)r+=i[n];return r/=s},updateFPS:function(t){this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0},stepLimitFPS:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta+=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(t,this.delta),this.delta=0),this.lastTime=t,this.frame++},step:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.callback(t,e),this.lastTime=t,this.frame++},tick:function(){var t=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(t):this.step(t)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){void 0===t&&(t=!1);var e=window.performance.now();if(!this.running){t&&(this.startTime+=-this.lastTime+(this.lastTime+e));var i=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(i,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=e+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}});t.exports=o},26493:(t,e,i)=>{var s=i(97081);t.exports=function(t){var e,i=t.events;if(void 0!==document.hidden)e="visibilitychange";else{["webkit","moz","ms"].forEach((function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")}))}e&&document.addEventListener(e,(function(t){document.hidden||"pause"===t.type?i.emit(s.HIDDEN):i.emit(s.VISIBLE)}),!1),window.onblur=function(){i.emit(s.BLUR)},window.onfocus=function(){i.emit(s.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},41651:t=>{t.exports="blur"},5520:t=>{t.exports="boot"},51673:t=>{t.exports="contextlost"},25055:t=>{t.exports="destroy"},23767:t=>{t.exports="focus"},57564:t=>{t.exports="hidden"},38327:t=>{t.exports="pause"},43807:t=>{t.exports="postrender"},73652:t=>{t.exports="poststep"},780:t=>{t.exports="prerender"},13781:t=>{t.exports="prestep"},38247:t=>{t.exports="ready"},29129:t=>{t.exports="resume"},34994:t=>{t.exports="step"},55237:t=>{t.exports="systemready"},98704:t=>{t.exports="visible"},97081:(t,e,i)=>{t.exports={BLUR:i(41651),BOOT:i(5520),CONTEXT_LOST:i(51673),DESTROY:i(25055),FOCUS:i(23767),HIDDEN:i(57564),PAUSE:i(38327),POST_RENDER:i(43807),POST_STEP:i(73652),PRE_RENDER:i(780),PRE_STEP:i(13781),READY:i(38247),RESUME:i(29129),STEP:i(34994),SYSTEM_READY:i(55237),VISIBLE:i(98704)}},80293:(t,e,i)=>{t.exports={Config:i(14033),CreateRenderer:i(50150),DebugHeader:i(77291),Events:i(97081),TimeStep:i(26617),VisibilityHandler:i(26493)}},52780:(t,e,i)=>{var s=i(81543),r=i(61068),n=i(10850);t.exports=function(t){var e=n(t,"data",[]),i=n(t,"canvas",null),a=n(t,"palette",s),o=n(t,"pixelWidth",1),h=n(t,"pixelHeight",o),l=n(t,"resizeCanvas",!0),u=n(t,"clearCanvas",!0),c=n(t,"preRender",null),d=n(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*o)),p=Math.floor(Math.abs(e.length*h));i||(i=r.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d",{willReadFrequently:!0});u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;v<e.length;v++)for(var m=e[v],x=0;x<m.length;x++){var y=m[x];"."!==y&&" "!==y&&(g.fillStyle=a[y],g.fillRect(x*o,v*h,o,h))}return d&&d(i,g),i}},84106:(t,e,i)=>{t.exports={GenerateTexture:i(52780),Palettes:i(25235)}},81543:t=>{t.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:t=>{t.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:t=>{t.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:t=>{t.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:t=>{t.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:(t,e,i)=>{t.exports={ARNE16:i(81543),C64:i(75846),CGA:i(83206),JMP:i(13194),MSX:i(50686)}},63120:(t,e,i)=>{var s=i(56694),r=i(34631),n=i(38517),a=i(93736),o=new s({Extends:n,initialize:function(t,e,i,s){n.call(this,"CubicBezierCurve"),Array.isArray(t)&&(s=new a(t[6],t[7]),i=new a(t[4],t[5]),e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=s},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new a);var i=this.p0,s=this.p1,n=this.p2,o=this.p3;return e.set(r(t,i.x,s.x,n.x,o.x),r(t,i.y,s.y,n.y,o.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s<i.length;s++)t.lineTo(i[s].x,i[s].y);return t.strokePath(),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y,this.p3.x,this.p3.y]}}});o.fromJSON=function(t){var e=t.points,i=new a(e[0],e[1]),s=new a(e[2],e[3]),r=new a(e[4],e[5]),n=new a(e[6],e[7]);return new o(i,s,r,n)},t.exports=o},38517:(t,e,i)=>{var s=i(56694),r=i(80222),n=i(74118),a=i(93736),o=new s({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new a,this._tmpVec2B=new a},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new n),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var s=Math.max(1,Math.round(i/e));return r(this.getSpacedPoints(s),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new a),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],s=this.getPoint(0,this._tmpVec2A),r=0;i.push(0);for(var n=1;n<=t;n++)r+=(e=this.getPoint(n/t,this._tmpVec2B)).distance(s),i.push(r),s.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++)i.push(this.getPoint(s/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new a),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++){var r=this.getUtoTmapping(s/t,null,t);i.push(this.getPoint(r))}return i},getStartPoint:function(t){return void 0===t&&(t=new a),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new a);var i=1e-4,s=t-i,r=t+i;return s<0&&(s=0),r>1&&(r=1),this.getPoint(s,this._tmpVec2A),this.getPoint(r,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var s,r=this.getLengths(i),n=0,a=r.length;s=e?Math.min(e,r[a-1]):t*r[a-1];for(var o,h=0,l=a-1;h<=l;)if((o=r[n=Math.floor(h+(l-h)/2)]-s)<0)h=n+1;else{if(!(o>0)){l=n;break}l=n-1}if(r[n=l]===s)return n/(a-1);var u=r[n];return(n+(s-u)/(r[n+1]-u))/(a-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=o},48835:(t,e,i)=>{var s=i(56694),r=i(38517),n=i(75606),a=i(10850),o=i(23701),h=i(93736),l=new s({Extends:r,initialize:function(t,e,i,s,o,l,u,c){if("object"==typeof t){var d=t;t=a(d,"x",0),e=a(d,"y",0),i=a(d,"xRadius",0),s=a(d,"yRadius",i),o=a(d,"startAngle",0),l=a(d,"endAngle",360),u=a(d,"clockwise",!1),c=a(d,"rotation",0)}else void 0===s&&(s=i),void 0===o&&(o=0),void 0===l&&(l=360),void 0===u&&(u=!1),void 0===c&&(c=0);r.call(this,"EllipseCurve"),this.p0=new h(t,e),this._xRadius=i,this._yRadius=s,this._startAngle=n(o),this._endAngle=n(l),this._clockwise=u,this._rotation=n(c)},getStartPoint:function(t){return void 0===t&&(t=new h),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new h);for(var i=2*Math.PI,s=this._endAngle-this._startAngle,r=Math.abs(s)<Number.EPSILON;s<0;)s+=i;for(;s>i;)s-=i;s<Number.EPSILON&&(s=r?0:i),this._clockwise&&!r&&(s===i?s=-i:s-=i);var n=this._startAngle+t*s,a=this.p0.x+this._xRadius*Math.cos(n),o=this.p0.y+this._yRadius*Math.sin(n);if(0!==this._rotation){var l=Math.cos(this._rotation),u=Math.sin(this._rotation),c=a-this.p0.x,d=o-this.p0.y;a=c*l-d*u+this.p0.x,o=c*u+d*l+this.p0.y}return e.set(a,o)},setXRadius:function(t){return this.xRadius=t,this},setYRadius:function(t){return this.yRadius=t,this},setWidth:function(t){return this.xRadius=t/2,this},setHeight:function(t){return this.yRadius=t/2,this},setStartAngle:function(t){return this.startAngle=t,this},setEndAngle:function(t){return this.endAngle=t,this},setClockwise:function(t){return this.clockwise=t,this},setRotation:function(t){return this.rotation=t,this},x:{get:function(){return this.p0.x},set:function(t){this.p0.x=t}},y:{get:function(){return this.p0.y},set:function(t){this.p0.y=t}},xRadius:{get:function(){return this._xRadius},set:function(t){this._xRadius=t}},yRadius:{get:function(){return this._yRadius},set:function(t){this._yRadius=t}},startAngle:{get:function(){return o(this._startAngle)},set:function(t){this._startAngle=n(t)}},endAngle:{get:function(){return o(this._endAngle)},set:function(t){this._endAngle=n(t)}},clockwise:{get:function(){return this._clockwise},set:function(t){this._clockwise=t}},angle:{get:function(){return o(this._rotation)},set:function(t){this._rotation=n(t)}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t}},toJSON:function(){return{type:this.type,x:this.p0.x,y:this.p0.y,xRadius:this._xRadius,yRadius:this._yRadius,startAngle:o(this._startAngle),endAngle:o(this._endAngle),clockwise:this._clockwise,rotation:o(this._rotation)}}});l.fromJSON=function(t){return new l(t)},t.exports=l},58084:(t,e,i)=>{var s=i(56694),r=i(38517),n=i(80222),a=i(74118),o=i(93736),h=new s({Extends:r,initialize:function(t,e){r.call(this,"LineCurve"),Array.isArray(t)&&(e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.arcLengthDivisions=1},getBounds:function(t){return void 0===t&&(t=new a),n([this.p0,this.p1],t)},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return void 0===t&&(t=1),t},getPoint:function(t,e){return void 0===e&&(e=new o),1===t?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(t,e){return void 0===e&&(e=new o),e.copy(this.p1).subtract(this.p0).normalize(),e},getUtoTmapping:function(t,e,i){var s;if(e){var r=this.getLengths(i),n=r[r.length-1];s=Math.min(e,n)/n}else s=t;return s},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});h.fromJSON=function(t){var e=t.points,i=new o(e[0],e[1]),s=new o(e[2],e[3]);return new h(i,s)},t.exports=h},64761:(t,e,i)=>{var s=i(56694),r=i(38517),n=i(16252),a=i(93736),o=new s({Extends:r,initialize:function(t,e,i){r.call(this,"QuadraticBezierCurve"),Array.isArray(t)&&(i=new a(t[4],t[5]),e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new a);var i=this.p0,s=this.p1,r=this.p2;return e.set(n(t,i.x,s.x,r.x),n(t,i.y,s.y,r.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s<i.length;s++)t.lineTo(i[s].x,i[s].y);return t.strokePath(),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y]}}});o.fromJSON=function(t){var e=t.points,i=new a(e[0],e[1]),s=new a(e[2],e[3]),r=new a(e[4],e[5]);return new o(i,s,r)},t.exports=o},11956:(t,e,i)=>{var s=i(14976),r=i(56694),n=i(38517),a=i(93736),o=new r({Extends:n,initialize:function(t){void 0===t&&(t=[]),n.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;e<t.length;e++){var i=new a;"number"==typeof t[e]?(i.x=t[e],i.y=t[e+1],e++):Array.isArray(t[e])?(i.x=t[e][0],i.y=t[e][1]):(i.x=t[e].x,i.y=t[e].y),this.points.push(i)}return this},addPoint:function(t,e){var i=new a(t,e);return this.points.push(i),i},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.points[0])},getResolution:function(t){return t*this.points.length},getPoint:function(t,e){void 0===e&&(e=new a);var i=this.points,r=(i.length-1)*t,n=Math.floor(r),o=r-n,h=i[0===n?n:n-1],l=i[n],u=i[n>i.length-2?i.length-1:n+1],c=i[n>i.length-3?i.length-1:n+2];return e.set(s(o,h.x,l.x,u.x,c.x),s(o,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e<this.points.length;e++)t.push(this.points[e].x),t.push(this.points[e].y);return{type:this.type,points:t}}});o.fromJSON=function(t){return new o(t.points)},t.exports=o},73962:(t,e,i)=>{t.exports={Path:i(12822),MoveTo:i(53639),CubicBezier:i(63120),Curve:i(38517),Ellipse:i(48835),Line:i(58084),QuadraticBezier:i(64761),Spline:i(11956)}},53639:(t,e,i)=>{var s=i(56694),r=i(93736),n=new s({initialize:function(t,e){this.active=!1,this.p0=new r(t,e)},getPoint:function(t,e){return void 0===e&&(e=new r),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=n},12822:(t,e,i)=>{var s=i(56694),r=i(63120),n=i(48835),a=i(61286),o=i(58084),h=i(53639),l=i(64761),u=i(74118),c=i(11956),d=i(93736),f=i(83392),p=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new o(e,t)),this},cubicBezierTo:function(t,e,i,s,n,a){var o,h,l,u=this.getEndPoint();return t instanceof d?(o=t,h=e,l=i):(o=new d(i,s),h=new d(n,a),l=new d(t,e)),this.add(new r(u,o,h,l))},quadraticBezierTo:function(t,e,i,s){var r,n,a=this.getEndPoint();return t instanceof d?(r=t,n=e):(r=new d(i,s),n=new d(t,e)),this.add(new l(a,r,n))},draw:function(t,e){for(var i=0;i<this.curves.length;i++){var s=this.curves[i];s.active&&s.draw(t,e)}return t},ellipseTo:function(t,e,i,s,r,a){var o=new n(0,0,t,e,i,s,r,a),h=this.getEndPoint(this._tmpVec2A),l=o.getStartPoint(this._tmpVec2B);return h.subtract(l),o.x=h.x,o.y=h.y,this.add(o)},fromJSON:function(t){this.curves=[],this.cacheLengths=[],this.startPoint.set(t.x,t.y),this.autoClose=t.autoClose;for(var e=0;e<t.curves.length;e++){var i=t.curves[e];switch(i.type){case"LineCurve":this.add(o.fromJSON(i));break;case"EllipseCurve":this.add(n.fromJSON(i));break;case"SplineCurve":this.add(c.fromJSON(i));break;case"CubicBezierCurve":this.add(r.fromJSON(i));break;case"QuadraticBezierCurve":this.add(l.fromJSON(i))}}return this},getBounds:function(t,e){void 0===t&&(t=new u),void 0===e&&(e=16),t.x=Number.MAX_VALUE,t.y=Number.MAX_VALUE;for(var i=new u,s=f.MIN_SAFE_INTEGER,r=f.MIN_SAFE_INTEGER,n=0;n<this.curves.length;n++){var a=this.curves[n];a.active&&(a.getBounds(i,e),t.x=Math.min(t.x,i.x),t.y=Math.min(t.y,i.y),s=Math.max(s,i.right),r=Math.max(r,i.bottom))}return t.right=s,t.bottom=r,t},getCurveLengths:function(){if(this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0;i<this.curves.length;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t,t},getCurveAt:function(t){for(var e=t*this.getLength(),i=this.getCurveLengths(),s=0;s<i.length;){if(i[s]>=e)return this.curves[s];s++}return null},getEndPoint:function(t){return void 0===t&&(t=new d),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),r=0;r<s.length;){if(s[r]>=i){var n=s[r]-i,a=this.curves[r],o=a.getLength(),h=0===o?0:1-n/o;return a.getPointAt(h,e)}r++}return null},getPoints:function(t,e){t||e||(t=this.defaultDivisions);for(var i,s=[],r=0;r<this.curves.length;r++){var n=this.curves[r];if(n.active)for(var a=n.getResolution(t),o=n.getPoints(a,e),h=0;h<o.length;h++){var l=o[h];i&&i.equals(l)||(s.push(l),i=l)}}return this.autoClose&&s.length>1&&!s[s.length-1].equals(s[0])&&s.push(s[0]),s},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),r=0;r<s.length;){if(s[r]>=i){var n=s[r]-i,a=this.curves[r],o=a.getLength(),h=0===o?0:1-n/o;return a.getTangentAt(h,e)}r++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new o([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e<this.curves.length;e++)t.push(this.curves[e].toJSON());return{type:"Path",x:this.startPoint.x,y:this.startPoint.y,autoClose:this.autoClose,curves:t}},updateArcLengths:function(){this.cacheLengths=[],this.getCurveLengths()},destroy:function(){this.curves.length=0,this.cacheLengths.length=0,this.startPoint=void 0}});a.register("path",(function(t,e){return new p(t,e)})),t.exports=p},81078:(t,e,i)=>{var s=i(56694),r=i(35026),n=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s<t.length;s++)i.push(e[t[s]]);return i}return e[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if("string"==typeof t)return this.setValue(t,e);for(var i in t)this.setValue(i,t[i]);return this},inc:function(t,e){if(this._frozen)return this;void 0===e&&(e=1);var i=this.get(t);return void 0===i&&(i=0),this.set(t,i+e),this},toggle:function(t){return this._frozen||this.set(t,!this.get(t)),this},setValue:function(t,e){if(this._frozen)return this;if(this.has(t))this.values[t]=e;else{var i=this,s=this.list,n=this.events,a=this.parent;Object.defineProperty(this.values,t,{enumerable:!0,configurable:!0,get:function(){return s[t]},set:function(e){if(!i._frozen){var o=s[t];s[t]=e,n.emit(r.CHANGE_DATA,a,t,e,o),n.emit(r.CHANGE_DATA_KEY+t,a,e,o)}}}),s[t]=e,n.emit(r.SET_DATA,a,t,e)}return this},each:function(t,e){for(var i=[this.parent,null,void 0],s=1;s<arguments.length;s++)i.push(arguments[s]);for(var r in this.list)i[1]=r,i[2]=this.list[r],t.apply(e,i);return this},merge:function(t,e){for(var i in void 0===e&&(e=!0),t)t.hasOwnProperty(i)&&(e||!e&&!this.has(i))&&this.setValue(i,t[i]);return this},remove:function(t){if(this._frozen)return this;if(!Array.isArray(t))return this.removeValue(t);for(var e=0;e<t.length;e++)this.removeValue(t[e]);return this},removeValue:function(t){if(this.has(t)){var e=this.list[t];delete this.list[t],delete this.values[t],this.events.emit(r.REMOVE_DATA,this.parent,t,e)}return this},pop:function(t){var e=void 0;return!this._frozen&&this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(r.REMOVE_DATA,this.parent,t,e)),e},has:function(t){return this.list.hasOwnProperty(t)},setFreeze:function(t){return this._frozen=t,this},reset:function(){for(var t in this.list)delete this.list[t],delete this.values[t];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(r.CHANGE_DATA),this.events.off(r.SET_DATA),this.events.off(r.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t=0;for(var e in this.list)void 0!==this.list[e]&&t++;return t}}});t.exports=n},76508:(t,e,i)=>{var s=i(56694),r=i(81078),n=i(91963),a=i(7599),o=new s({Extends:r,initialize:function(t){r.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(a.DESTROY,this.destroy,this)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){r.prototype.destroy.call(this),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null}});n.register("DataManagerPlugin",o,"data"),t.exports=o},73569:t=>{t.exports="changedata"},15590:t=>{t.exports="changedata-"},37669:t=>{t.exports="destroy"},87090:t=>{t.exports="removedata"},90142:t=>{t.exports="setdata"},35026:(t,e,i)=>{t.exports={CHANGE_DATA:i(73569),CHANGE_DATA_KEY:i(15590),DESTROY:i(37669),REMOVE_DATA:i(87090),SET_DATA:i(90142)}},1999:(t,e,i)=>{t.exports={DataManager:i(81078),DataManagerPlugin:i(76508),Events:i(35026)}},10720:(t,e,i)=>{var s=i(1350),r={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return r;r.audioData=!!window.Audio,r.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(r.ogg=i('ogg; codecs="vorbis"'),r.opus=i('ogg; codecs="opus"',"opus"),r.mp3=i("mpeg"),r.wav=i("wav"),r.m4a=i("x-m4a"),r.aac=i("aac"),r.flac=i("flac","x-flac"),r.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)r.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var n=parseInt(RegExp.$1,10),a=parseInt(RegExp.$2,10);(10===n&&a>=11||n>10)&&(r.dolby=!0)}}}catch(t){}return r}()},1350:(t,e,i)=>{var s,r=i(36580),n={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};t.exports=(s=navigator.userAgent,/Edg\/\d+/.test(s)?(n.edge=!0,n.es2019=!0):/OPR/.test(s)?(n.opera=!0,n.es2019=!0):/Chrome\/(\d+)/.test(s)&&!r.windowsPhone?(n.chrome=!0,n.chromeVersion=parseInt(RegExp.$1,10),n.es2019=n.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(n.firefox=!0,n.firefoxVersion=parseInt(RegExp.$1,10),n.es2019=n.firefoxVersion>10):/AppleWebKit/.test(s)&&r.iOS?(n.mobileSafari=!0,n.es2019=!0):/MSIE (\d+\.\d+);/.test(s)?(n.ie=!0,n.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(s)&&!r.windowsPhone?(n.safari=!0,n.safariVersion=parseInt(RegExp.$1,10),n.es2019=n.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(n.ie=!0,n.trident=!0,n.tridentVersion=parseInt(RegExp.$1,10),n.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(n.silk=!0),n)},98581:(t,e,i)=>{var s,r,n,a=i(61068),o={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(o.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(n=new Image).onload=function(){var t=new Image;t.onload=function(){var e=a.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(n,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;a.remove(t),o.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+r},n.src=s+"AP804Oa6"+r,!1),o.supportInverseAlpha=function(){var t=a.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return a.remove(this),s}()),o)},90185:(t,e,i)=>{var s=i(36580),r=i(1350),n=i(61068),a={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};t.exports=function(){if("function"==typeof importScripts)return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,o=!1;return a.webGL=function(){if(window.WebGLRenderingContext)try{var t=n.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=n.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return o=s.data instanceof Uint8ClampedArray,n.remove(t),n.remove(i),!!e}catch(t){return!1}return!1}(),a.worker=!!window.Worker,a.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,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(a.getUserMedia=!1),!s.iOS&&(r.ie||r.firefox||r.chrome)&&(a.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&o,a}()},33553:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",r=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t<r.length;t++)if(document.documentElement[r[t]]){e.available=!0,e.request=r[t];break}var n=["cancel"+s,"exit"+i,"webkitCancel"+s,"webkitExit"+i,"msCancel"+s,"msExit"+i,"mozCancel"+s,"mozExit"+i];if(e.available)for(t=0;t<n.length;t++)if(document[n[t]]){e.cancel=n[t];break}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(e.keyboard=!0),Object.defineProperty(e,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),e}()},95872:(t,e,i)=>{var s=i(1350),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},36580:t=>{var e={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};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},53861:(t,e,i)=>{var s=i(72632),r={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};t.exports=function(){if("function"==typeof importScripts)return r;var t=document.createElement("video"),e=!!t.canPlayType,i=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(i,"")&&(r.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(i,"")&&(r.h264=!0,r.mp4=!0),t.canPlayType("video/x-m4v").replace(i,"")&&(r.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(i,"")&&(r.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(i,"")&&(r.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(i,"")&&(r.hls=!0))}catch(t){}return t.parentNode&&t.parentNode.removeChild(t),r.getVideoURL=function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i,n=s(t[e],"url",t[e]);if(0===n.indexOf("blob:"))return{url:n,type:""};if(i=0===n.indexOf("data:")?n.split(",")[0].match(/\/(.*?);/):n.match(/\.([a-zA-Z0-9]+)($|\?)/),i=s(t[e],"type",i?i[1]:"").toLowerCase(),r[i])return{url:n,type:i}}return null},r}()},77290:(t,e,i)=>{t.exports={os:i(36580),browser:i(1350),features:i(90185),input:i(95872),audio:i(10720),video:i(53861),fullscreen:i(33553),canvasFeatures:i(98581)}},65246:(t,e,i)=>{var s=i(56694),r=new Float32Array(20),n=new s({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(t){return this._matrix.set(t),this._dirty=!0,this},reset:function(){var t=this._matrix;return t.fill(0),t[0]=1,t[6]=1,t[12]=1,t[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var t=this._data;return this._dirty&&(t.set(this._matrix),t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._dirty=!1),t},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),r=.213,n=.715,a=.072;return this.multiply([r+.787*i+s*-r,n+i*-n+s*-n,a+i*-a+.928*s,0,0,r+i*-r+.143*s,n+i*(1-n)+.14*s,a+i*-a+-.283*s,0,0,r+i*-r+-.787*s,n+i*-n+s*n,a+.928*i+s*a,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply(n.BLACK_WHITE,t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply(n.NEGATIVE,t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply(n.DESATURATE_LUMINANCE,t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply(n.SEPIA,t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply(n.LSD,t)},brown:function(t){return void 0===t&&(t=!1),this.multiply(n.BROWN,t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply(n.VINTAGE,t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply(n.KODACHROME,t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply(n.TECHNICOLOR,t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply(n.POLAROID,t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply(n.SHIFT_BGR,t)},multiply:function(t,e){void 0===e&&(e=!1),e||this.reset();var i=this._matrix,s=r;return s.set(i),i.set([s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19]]),this._dirty=!0,this}});n.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],n.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],n.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],n.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],n.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],n.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],n.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],n.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],n.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],n.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],n.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t.exports=n},39298:(t,e,i)=>{var s=i(56694),r=i(72283),n=new s({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=r,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this._rgb=[t,e,i],this.onChange(),this},equals:function(t,e,i){var s=this._rgb;return s[0]===t&&s[1]===e&&s[2]===i},onChange:function(){this.dirty=!0;var t=this._rgb;this.onChangeCallback.call(this,t[0],t[1],t[2])},r:{get:function(){return this._rgb[0]},set:function(t){this._rgb[0]=t,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(t){this._rgb[1]=t,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(t){this._rgb[2]=t,this.onChange()}},destroy:function(){this.onChangeCallback=null}});t.exports=n},84093:t=>{t.exports={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}},32058:(t,e,i)=>{var s=i(97328),r=i(59994),n=i(73174),a=i(28417);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,r(e)+i),n(t,s(e)+o),t}},85535:(t,e,i)=>{var s=i(97328),r=i(40163),n=i(73174),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,r(e)-i),n(t,s(e)+o),t}},9605:(t,e,i)=>{var s=i(97328),r=i(70271),n=i(73174),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,r(e)+i),n(t,s(e)+o),t}},22529:(t,e,i)=>{var s=i(21843),r=i(59994),n=i(29568);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,r(e)+i,n(e)+a),t}},5739:(t,e,i)=>{var s=i(29568),r=i(40163),n=i(81711),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,r(e)-i),n(t,s(e)+o),t}},40327:(t,e,i)=>{var s=i(84093),r=[];r[s.BOTTOM_CENTER]=i(32058),r[s.BOTTOM_LEFT]=i(85535),r[s.BOTTOM_RIGHT]=i(9605),r[s.CENTER]=i(22529),r[s.LEFT_CENTER]=i(5739),r[s.RIGHT_CENTER]=i(27683),r[s.TOP_CENTER]=i(96439),r[s.TOP_LEFT]=i(81447),r[s.TOP_RIGHT]=i(47888),r[s.LEFT_BOTTOM]=r[s.BOTTOM_LEFT],r[s.LEFT_TOP]=r[s.TOP_LEFT],r[s.RIGHT_BOTTOM]=r[s.BOTTOM_RIGHT],r[s.RIGHT_TOP]=r[s.TOP_RIGHT];t.exports=function(t,e,i,s,n){return r[i](t,e,s,n)}},27683:(t,e,i)=>{var s=i(29568),r=i(70271),n=i(81711),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,r(e)+i),n(t,s(e)+o),t}},96439:(t,e,i)=>{var s=i(59994),r=i(47196),n=i(28417),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i),a(t,r(e)-o),t}},81447:(t,e,i)=>{var s=i(40163),r=i(47196),n=i(74465),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)-i),a(t,r(e)-o),t}},47888:(t,e,i)=>{var s=i(70271),r=i(47196),n=i(19298),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i),a(t,r(e)-o),t}},46997:(t,e,i)=>{t.exports={BottomCenter:i(32058),BottomLeft:i(85535),BottomRight:i(9605),Center:i(22529),LeftCenter:i(5739),QuickSet:i(40327),RightCenter:i(27683),TopCenter:i(96439),TopLeft:i(81447),TopRight:i(47888)}},93545:(t,e,i)=>{var s=i(84093),r=i(98611),n={In:i(46997),To:i(86639)};n=r(!1,n,s),t.exports=n},27118:(t,e,i)=>{var s=i(97328),r=i(59994),n=i(28417),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,r(e)+i),a(t,s(e)+o),t}},84469:(t,e,i)=>{var s=i(97328),r=i(40163),n=i(74465),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,r(e)-i),a(t,s(e)+o),t}},51577:(t,e,i)=>{var s=i(97328),r=i(70271),n=i(19298),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,r(e)+i),a(t,s(e)+o),t}},90271:(t,e,i)=>{var s=i(97328),r=i(40163),n=i(73174),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,r(e)-i),n(t,s(e)+o),t}},30466:(t,e,i)=>{var s=i(29568),r=i(40163),n=i(81711),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,r(e)-i),n(t,s(e)+o),t}},50087:(t,e,i)=>{var s=i(40163),r=i(47196),n=i(19298),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)-i),a(t,r(e)-o),t}},82590:(t,e,i)=>{var s=i(84093),r=[];r[s.BOTTOM_CENTER]=i(27118),r[s.BOTTOM_LEFT]=i(84469),r[s.BOTTOM_RIGHT]=i(51577),r[s.LEFT_BOTTOM]=i(90271),r[s.LEFT_CENTER]=i(30466),r[s.LEFT_TOP]=i(50087),r[s.RIGHT_BOTTOM]=i(13555),r[s.RIGHT_CENTER]=i(99049),r[s.RIGHT_TOP]=i(67788),r[s.TOP_CENTER]=i(78170),r[s.TOP_LEFT]=i(54145),r[s.TOP_RIGHT]=i(75548);t.exports=function(t,e,i,s,n){return r[i](t,e,s,n)}},13555:(t,e,i)=>{var s=i(97328),r=i(70271),n=i(73174),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,r(e)+i),n(t,s(e)+o),t}},99049:(t,e,i)=>{var s=i(29568),r=i(70271),n=i(81711),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,r(e)+i),n(t,s(e)+o),t}},67788:(t,e,i)=>{var s=i(70271),r=i(47196),n=i(74465),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i),a(t,r(e)-o),t}},78170:(t,e,i)=>{var s=i(59994),r=i(47196),n=i(73174),a=i(28417);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,s(e)+i),n(t,r(e)-o),t}},54145:(t,e,i)=>{var s=i(40163),r=i(47196),n=i(73174),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,s(e)-i),n(t,r(e)-o),t}},75548:(t,e,i)=>{var s=i(70271),r=i(47196),n=i(73174),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,s(e)+i),n(t,r(e)-o),t}},86639:(t,e,i)=>{t.exports={BottomCenter:i(27118),BottomLeft:i(84469),BottomRight:i(51577),LeftBottom:i(90271),LeftCenter:i(30466),LeftTop:i(50087),QuickSet:i(82590),RightBottom:i(13555),RightCenter:i(99049),RightTop:i(67788),TopCenter:i(78170),TopLeft:i(54145),TopRight:i(75548)}},21843:(t,e,i)=>{var s=i(28417),r=i(81711);t.exports=function(t,e,i){return s(t,e),r(t,i)}},97328:t=>{t.exports=function(t){return t.y+t.height-t.height*t.originY}},7126:(t,e,i)=>{var s=i(97328),r=i(40163),n=i(70271),a=i(47196),o=i(74118);t.exports=function(t,e){void 0===e&&(e=new o);var i=r(t),h=a(t);return e.x=i,e.y=h,e.width=n(t)-i,e.height=s(t)-h,e}},59994:t=>{t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},29568:t=>{t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},40163:t=>{t.exports=function(t){return t.x-t.width*t.originX}},52088:t=>{t.exports=function(t){return t.width*t.originX}},23379:t=>{t.exports=function(t){return t.height*t.originY}},70271:t=>{t.exports=function(t){return t.x+t.width-t.width*t.originX}},47196:t=>{t.exports=function(t){return t.y-t.height*t.originY}},73174:t=>{t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},28417:t=>{t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},81711:t=>{t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},74465:t=>{t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},19298:t=>{t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},84349:t=>{t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},15252:(t,e,i)=>{t.exports={CenterOn:i(21843),GetBottom:i(97328),GetBounds:i(7126),GetCenterX:i(59994),GetCenterY:i(29568),GetLeft:i(40163),GetOffsetX:i(52088),GetOffsetY:i(23379),GetRight:i(70271),GetTop:i(47196),SetBottom:i(73174),SetCenterX:i(28417),SetCenterY:i(81711),SetLeft:i(74465),SetRight:i(19298),SetTop:i(84349)}},70616:t=>{t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach((function(e){t.style["image-rendering"]=e})),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},61068:(t,e,i)=>{var s,r,n,a=i(86459),o=i(8213),h=[],l=!1;t.exports=(n=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,a.CANVAS)},create:s=function(t,e,i,s,n){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=a.CANVAS),void 0===n&&(n=!1);var c=r(s);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:s},s===a.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),n&&(c.parent=u),u.width=e,u.height=i,l&&s===a.CANVAS&&o.disable(u.getContext("2d",{willReadFrequently:!1})),u},createWebGL:function(t,e,i){return s(t,e,i,a.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:r=function(t){if(void 0===t&&(t=a.CANVAS),t===a.WEBGL)return null;for(var e=0;e<h.length;e++){var i=h[e];if(!i.parent&&i.type===t)return i}return null},free:function(){return h.length-n()},pool:h,remove:function(t){var e=t instanceof HTMLCanvasElement;h.forEach((function(i){(e&&i.canvas===t||!e&&i.parent===t)&&(i.parent=null,i.canvas.width=1,i.canvas.height=1)}))},total:n})},8213:t=>{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i<e.length;i++){var s=e[i]+"mageSmoothingEnabled";if(s in t)return s}return null},isEnabled:function(t){return null!==i?t[i]:null}}},59271:t=>{t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},36505:t=>{t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach((function(i){t.style[i+"user-select"]=e})),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},23514:(t,e,i)=>{t.exports={CanvasInterpolation:i(70616),CanvasPool:i(61068),Smoothing:i(8213),TouchAction:i(59271),UserSelect:i(36505)}},27119:(t,e,i)=>{var s=i(56694),r=i(22946),n=i(5657),a=i(24650),o=i(68033),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=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(t,e,i,s)},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(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=s,this._locked=!1,this.update(r)},setGLTo:function(t,e,i,s){return void 0===s&&(s=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=s,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return a(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,s=this.b,a=this.a;return this._color=r(e,i,s),this._color32=n(e,i,s,a),this._rgba="rgba("+e+","+i+","+s+","+a/255+")",t&&o(e,i,s,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return o(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t)),r=Math.floor(t+Math.random()*(e-t));return this.setTo(i,s,r)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,s=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),s=Math.max(0,Math.min(255,s-Math.round(-t/100*255))),this.setTo(e,i,s)},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(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,a(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,a(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,a(this._h,this._s,t,this)}}});t.exports=h},30245:(t,e,i)=>{var s=i(22946);t.exports=function(t){void 0===t&&(t=1024);var e,i=[],r=255,n=255,a=0,o=0;for(e=0;e<=r;e++)i.push({r:n,g:e,b:o,color:s(n,e,o)});for(a=255,e=r;e>=0;e--)i.push({r:e,g:a,b:o,color:s(e,a,o)});for(n=0,e=0;e<=r;e++,a--)i.push({r:n,g:a,b:e,color:s(n,a,e)});for(a=0,o=255,e=0;e<=r;e++,o--,n++)i.push({r:n,g:a,b:o,color:s(n,a,o)});if(1024===t)return i;var h=[],l=0,u=1024/t;for(e=0;e<t;e++)h.push(i[Math.floor(l)]),l+=u;return h}},86672:t=>{t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},25409:t=>{t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},22946:t=>{t.exports=function(t,e,i){return t<<16|e<<8|i}},5657:t=>{t.exports=function(t,e,i,s){return s<<24|t<<16|e<<8|i}},74777:(t,e,i)=>{var s=i(27119),r=i(59998);t.exports=function(t,e,i){var n=i,a=i,o=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;n=r(l,h,t+1/3),a=r(l,h,t),o=r(l,h,t-1/3)}return(new s).setGLTo(n,a,o,1)}},89263:(t,e,i)=>{var s=i(24650);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],r=0;r<=359;r++)i.push(s(r/359,t,e));return i}},24650:(t,e,i)=>{var s=i(22946);function r(t,e,i,s){var r=(t+6*e)%6,n=Math.min(r,4-r,1);return Math.round(255*(s-s*i*Math.max(0,n)))}t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var a=r(5,t,e,i),o=r(3,t,e,i),h=r(1,t,e,i);return n?n.setTo?n.setTo(a,o,h,n.alpha,!0):(n.r=a,n.g=o,n.b=h,n.color=s(a,o,h),n):{r:a,g:o,b:h,color:s(a,o,h)}}},91487:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,s){return e+e+i+i+s+s}));var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var r=parseInt(i[1],16),n=parseInt(i[2],16),a=parseInt(i[3],16);e.setTo(r,n,a)}return e}},59998:t=>{t.exports=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},74853:(t,e,i)=>{var s=i(27119),r=i(15978);t.exports=function(t){var e=r(t);return new s(e.r,e.g,e.b,e.a)}},15978:t=>{t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},53756:(t,e,i)=>{var s=i(42798),r=function(t,e,i,r,n,a,o,h){void 0===o&&(o=100),void 0===h&&(h=0);var l=h/o;return{r:s(t,r,l),g:s(e,n,l),b:s(i,a,l)}};t.exports={RGBWithRGB:r,ColorWithRGB:function(t,e,i,s,n,a){return void 0===n&&(n=100),void 0===a&&(a=0),r(t.r,t.g,t.b,e,i,s,n,a)},ColorWithColor:function(t,e,i,s){return void 0===i&&(i=100),void 0===s&&(s=0),r(t.r,t.g,t.b,e.r,e.g,e.b,i,s)}}},73904:(t,e,i)=>{var s=i(27119);t.exports=function(t){return new s(t.r,t.g,t.b,t.a)}},26841:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var r=parseInt(i[1],10),n=parseInt(i[2],10),a=parseInt(i[3],10),o=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(r,n,a,255*o)}return e}},68033:t=>{t.exports=function(t,e,i,s){void 0===s&&(s={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var r=Math.min(t,e,i),n=Math.max(t,e,i),a=n-r,o=0,h=0===n?0:a/n,l=n;return n!==r&&(n===t?o=(e-i)/a+(e<i?6:0):n===e?o=(i-t)/a+2:n===i&&(o=(t-e)/a+4),o/=6),s.hasOwnProperty("_h")?(s._h=o,s._s=h,s._v=l):(s.h=o,s.s=h,s.v=l),s}},4880:(t,e,i)=>{var s=i(25409);t.exports=function(t,e,i,r,n){return void 0===r&&(r=255),void 0===n&&(n="#"),"#"===n?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+s(r)+s(t)+s(e)+s(i)}},37243:(t,e,i)=>{var s=i(17489),r=i(27119);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new r(s(t,e),s(t,e),s(t,e))}},93222:(t,e,i)=>{var s=i(91487),r=i(74853),n=i(73904),a=i(26841);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?a(t):s(t);case"number":return r(t);case"object":return n(t)}}},95509:(t,e,i)=>{var s=i(27119);s.ColorSpectrum=i(30245),s.ColorToRGBA=i(86672),s.ComponentToHex=i(25409),s.GetColor=i(22946),s.GetColor32=i(5657),s.HexStringToColor=i(91487),s.HSLToColor=i(74777),s.HSVColorWheel=i(89263),s.HSVToRGB=i(24650),s.HueToComponent=i(59998),s.IntegerToColor=i(74853),s.IntegerToRGB=i(15978),s.Interpolate=i(53756),s.ObjectToColor=i(73904),s.RandomRGB=i(37243),s.RGBStringToColor=i(26841),s.RGBToHSV=i(68033),s.RGBToString=i(4880),s.ValueToColor=i(93222),t.exports=s},24816:(t,e,i)=>{t.exports={Align:i(93545),BaseShader:i(31053),Bounds:i(15252),Canvas:i(23514),Color:i(95509),ColorMatrix:i(65246),Masks:i(93310),RGB:i(39298)}},76756:(t,e,i)=>{var s=i(56694),r=i(61286),n=new s({initialize:function(t,e,i,s,r,n){e||(e=t.sys.make.image({x:i,y:s,key:r,frame:n,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});r.register("bitmapMask",(function(t,e,i,s,r){return new n(this.scene,t,e,i,s,r)})),t.exports=n},63037:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,r=this.geometryMask,n=t.maskCount,a=255;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,n,a),s.stencilOp(s.KEEP,s.KEEP,s.INCR),n++):(s.stencilFunc(s.EQUAL,n+1,a),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),this.level=n,r.renderWebGL(t,r,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),this.invertAlpha?s.stencilFunc(s.NOTEQUAL,n,a):s.stencilFunc(s.EQUAL,n,a)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},93310:(t,e,i)=>{t.exports={BitmapMask:i(76756),GeometryMask:i(63037)}},31053:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["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("\n")),void 0===s&&(s=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=s}});t.exports=s},99584:t=>{t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return i||(i=document.body),i.appendChild(t),t}},85178:(t,e,i)=>{var s=i(99584);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+e.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,s(i,e.parent)}}},21546:(t,e,i)=>{var s=i(36580);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?s.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},74181:t=>{t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},s=document.createElement("div");return s.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(s),i.w=90===e?s.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:s.offsetHeight,document.documentElement.removeChild(s),s=null,90!==Math.abs(window.orientation)?i.h:i.w}},9229:(t,e,i)=>{var s=i(55301);t.exports=function(t,e){var i=window.screen,r=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return r&&"string"==typeof r.type?r.type:"string"==typeof r?r:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?s.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?s.ORIENTATION.LANDSCAPE:void 0:e>t?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE}},2893:t=>{t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},89200:t=>{t.exports=function(t){var e="";try{if(window.DOMParser)e=(new DOMParser).parseFromString(t,"text/xml");else(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},55638:t=>{t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},27385:(t,e,i)=>{var s=i(56694),r=i(72283),n=new s({initialize:function(){this.isRunning=!1,this.callback=r,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var t=this;this.step=function e(i){t.callback(i),t.isRunning&&(t.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){t.isRunning&&(t.timeOutID=window.setTimeout(e,t.delay)),t.callback(window.performance.now())}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.delay=i,this.isRunning=!0,this.timeOutID=e?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=r}});t.exports=n},3590:(t,e,i)=>{var s={AddToDOM:i(99584),DOMContentLoaded:i(21546),GetInnerHeight:i(74181),GetScreenOrientation:i(9229),GetTarget:i(2893),ParseXML:i(89200),RemoveFromDOM:i(55638),RequestAnimationFrame:i(27385)};t.exports=s},78491:(t,e,i)=>{var s=i(56694),r=i(6659),n=i(91963),a=new s({Extends:r,initialize:function(){r.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});n.register("EventEmitter",a,"events"),t.exports=a},95146:(t,e,i)=>{t.exports={EventEmitter:i(78491)}},20170:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.BARREL,t),this.amount=e}});t.exports=a},51182:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===i&&(i=1),void 0===s&&(s=1),void 0===a&&(a=1),void 0===o&&(o=1),void 0===h&&(h=4),r.call(this,n.BLOOM,t),this.steps=h,this.offsetX=i,this.offsetY=s,this.blurStrength=a,this.strength=o,this.glcolor=[1,1,1],null!=e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},51498:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===e&&(e=0),void 0===i&&(i=2),void 0===s&&(s=2),void 0===a&&(a=1),void 0===h&&(h=4),r.call(this,n.BLUR,t),this.quality=e,this.x=i,this.y=s,this.steps=h,this.strength=a,this.glcolor=[1,1,1],null!=o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},12042:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=.5),void 0===i&&(i=1),void 0===s&&(s=.2),void 0===a&&(a=!1),void 0===o&&(o=1),void 0===h&&(h=1),void 0===l&&(l=1),r.call(this,n.BOKEH,t),this.radius=e,this.amount=i,this.contrast=s,this.isTiltShift=a,this.strength=l,this.blurX=o,this.blurY=h}});t.exports=a},69900:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e,i,s,a,o){void 0===e&&(e=8),void 0===a&&(a=1),void 0===o&&(o=.005),r.call(this,n.CIRCLE,t),this.scale=a,this.feather=o,this.thickness=e,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],null!=i&&(this.color=i),null!=s&&(this.backgroundColor=s)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundColor:{get:function(){var t=this.glcolor2;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor2;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(t){this.glcolor2[3]=t}}});t.exports=a},48991:(t,e,i)=>{var s=i(56694),r=i(65246),n=i(47406),a=new s({Extends:r,initialize:function(t){r.call(this),this.type=n.COLOR_MATRIX,this.gameObject=t,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});t.exports=a},47551:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.type=t,this.gameObject=e,this.active=!0},setActive:function(t){return this.active=t,this},destroy:function(){this.gameObject=null,this.active=!1}});t.exports=s},47909:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e,i,s){void 0===e&&(e="__WHITE"),void 0===i&&(i=.005),void 0===s&&(s=.005),r.call(this,n.DISPLACEMENT,t),this.x=i,this.y=s,this.glTexture,this.setTexture(e)},setTexture:function(t){var e=this.gameObject.scene.sys.textures.getFrame(t);return e&&(this.glTexture=e.glTexture),this}});t.exports=a},18919:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===i&&(i=4),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.GLOW,t),this.outerStrength=i,this.innerStrength=s,this.knockout=a,this.glcolor=[1,1,1,1],void 0!==e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},62494:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l,u){void 0===s&&(s=.2),void 0===a&&(a=0),void 0===o&&(o=0),void 0===h&&(h=0),void 0===l&&(l=1),void 0===u&&(u=0),r.call(this,n.GRADIENT,t),this.alpha=s,this.size=u,this.fromX=a,this.fromY=o,this.toX=h,this.toY=l,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],null!=e&&(this.color1=e),null!=i&&(this.color2=i)},color1:{get:function(){var t=this.glcolor1;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor1;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}},color2:{get:function(){var t=this.glcolor2;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor2;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}}});t.exports=a},68897:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.PIXELATE,t),this.amount=e}});t.exports=a},58575:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.1),void 0===a&&(a=1),void 0===h&&(h=6),void 0===l&&(l=1),r.call(this,n.SHADOW,t),this.x=e,this.y=i,this.decay=s,this.power=a,this.glcolor=[0,0,0,1],this.samples=h,this.intensity=l,void 0!==o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},33755:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=3),void 0===a&&(a=!1),r.call(this,n.SHINE,t),this.speed=e,this.lineWidth=i,this.gradient=s,this.reveal=a}});t.exports=a},24949:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=.5),void 0===a&&(a=.5),r.call(this,n.VIGNETTE,t),this.x=e,this.y=i,this.radius=s,this.strength=a}});t.exports=a},66241:(t,e,i)=>{var s=i(56694),r=i(47551),n=i(47406),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.WIPE,t),this.progress=0,this.wipeWidth=e,this.direction=i,this.axis=s,this.reveal=a}});t.exports=a},47406:t=>{t.exports={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}},96910:(t,e,i)=>{var s=i(98611),r=i(47406),n={Barrel:i(20170),Controller:i(47551),Bloom:i(51182),Blur:i(51498),Bokeh:i(12042),Circle:i(69900),ColorMatrix:i(48991),Displacement:i(47909),Glow:i(18919),Gradient:i(62494),Pixelate:i(68897),Shadow:i(58575),Shine:i(33755),Vignette:i(24949),Wipe:i(66241)};n=s(!1,n,r),t.exports=n},88933:(t,e,i)=>{var s=i(95723),r=i(20494);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var n=r(i,"scale",null);"number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=r(n,"x",1),e.scaleY=r(n,"y",1));var a=r(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=r(a,"x",1),e.scrollFactorY=r(a,"y",1)),e.rotation=r(i,"rotation",0);var o=r(i,"angle",null);null!==o&&(e.angle=o),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),u=r(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=r(i,"blendMode",s.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},32291:(t,e,i)=>{var s=i(20494);t.exports=function(t,e){var i=s(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var r=t.anims,n=s(i,"key",void 0);if(n){var a=s(i,"startFrame",void 0),o=s(i,"delay",0),h=s(i,"repeat",0),l=s(i,"repeatDelay",0),u=s(i,"yoyo",!1),c=s(i,"play",!1),d=s(i,"delayedPlay",0),f={key:n,delay:o,repeat:h,repeatDelay:l,yoyo:u,startFrame:a};c?r.play(f):d>0?r.playAfterDelay(f,d):r.load(f)}}return t}},91713:(t,e,i)=>{var s=i(56694),r=i(71207),n=i(91963),a=i(56631),o=i(7599),h=i(17922),l=new s({Extends:r,initialize:function(t){r.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(o.BOOT,this.boot,this),this.events.on(o.START,this.start,this)},boot:function(){this.events.once(o.DESTROY,this.destroy,this)},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.parentContainer&&t.parentContainer.remove(t),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(a.ADDED_TO_SCENE,t,this.scene),this.events.emit(o.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(a.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(o.REMOVED_FROM_SCENE,t,this.scene)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(h(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list;t.length;)t[0].destroy(!0);this.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});n.register("DisplayList",l,"displayList"),t.exports=l},89980:(t,e,i)=>{var s=i(56694),r=i(48129),n=i(81078),a=i(6659),o=i(56631),h=i(7599),l=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,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(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(t,e){return this.data||(this.data=new n(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new n(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new n(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new n(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),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 r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),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)}});l.RENDER_MASK=15,t.exports=l},99325:(t,e,i)=>{var s=i(56694),r=i(91963),n=i(7599),a=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(n.DESTROY,this.destroy,this)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},shutdown:function(){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,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},r.register("GameObjectCreator",a,"make"),t.exports=a},61286:(t,e,i)=>{var s=i(56694),r=i(91963),n=i(7599),a=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(n.DESTROY,this.destroy,this)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){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,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},r.register("GameObjectFactory",a,"add"),t.exports=a},73329:(t,e,i)=>{var s=i(69360),r=new s,n=new s,a=new s,o={camera:r,sprite:n,calc:a};t.exports=function(t,e,i){var s=r,h=n,l=a;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),s.multiply(h,l),o}},92034:(t,e,i)=>{var s=i(56694),r=i(74623),n=i(91963),a=i(7599),o=new s({Extends:r,initialize:function(t){r.call(this),this.checkQueue=!0,this.scene=t,this.systems=t.sys,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(a.PRE_UPDATE,this.update,this),t.on(a.UPDATE,this.sceneUpdate,this),t.once(a.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var i=this._active,s=i.length,r=0;r<s;r++){var n=i[r];n.active&&n.preUpdate.call(n,t,e)}},shutdown:function(){for(var t=this._active.length;t--;)this._active[t].destroy(!0);for(t=this._pending.length;t--;)this._pending[t].destroy(!0);for(t=this._destroy.length;t--;)this._destroy[t].destroy(!0);this._toProcess=0,this._pending=[],this._active=[],this._destroy=[],this.removeAllListeners();var e=this.systems.events;e.off(a.PRE_UPDATE,this.update,this),e.off(a.UPDATE,this.sceneUpdate,this),e.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.systems.events.off(a.START,this.start,this),this.scene=null,this.systems=null}});n.register("UpdateList",o,"updateList"),t.exports=o},8810:t=>{t.exports=function(t,e,i,s,r,n,a,o,h,l,u,c,d,f,p){var g=i.x-e.displayOriginX+r,v=i.y-e.displayOriginY+n,m=g+i.w,x=v+i.h,y=a.getXRound(g,v,o),T=a.getYRound(g,v,o),w=a.getXRound(g,x,o),E=a.getYRound(g,x,o),S=a.getXRound(m,x,o),b=a.getYRound(m,x,o),A=a.getXRound(m,v,o),_=a.getYRound(m,v,o);t.batchQuad(e,y,T,w,E,S,b,A,_,s.u0,s.v0,s.u1,s.v1,h,l,u,c,d,f,p)}},82173:t=>{t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),void 0===s)return s={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};var r,n,a,o,h=t.text,l=h.length,u=t.maxWidth,c=t.wordWrapCharCode,d=Number.MAX_VALUE,f=Number.MAX_VALUE,p=0,g=0,v=t.fontData.chars,m=t.fontData.lineHeight,x=t.letterSpacing,y=t.lineSpacing,T=0,w=0,E=0,S=null,b=t._align,A=0,_=0,C=t.fontSize/t.fontData.size,R=C*t.scaleX,M=C*t.scaleY,P=null,L=0,O=[],F=Number.MAX_VALUE,D=0,k=0,I=0,B=[],N=[],X=null;if(u>0){for(r=0;r<l;r++)if(10!==(E=h.charCodeAt(r))){if(S=v[E]){if(null!==P)var U=S.kerning[L];E===c?null!==X&&(B.push({word:X.word,i:X.i,x:X.x*R,y:X.y*M,w:X.w*R,h:X.h*M,cr:!1}),X=null):(null===X&&(X={word:"",i:r,x:T,y:w,w:0,h:m,cr:!1}),X.word=X.word.concat(h[r]),X.w+=S.xOffset+S.xAdvance+(void 0!==U?U:0)),T+=S.xAdvance+x,P=S,L=E}}else null!==X&&(B.push({word:X.word,i:X.i,x:X.x*R,y:X.y*M,w:X.w*R,h:X.h*M,cr:!0}),X=null),T=0,w+=m+y,P=null;var Y;null!==X&&B.push({word:X.word,i:X.i,x:X.x*R,y:X.y*M,w:X.w*R,h:X.h*M,cr:!1}),T=0,w=0,P=null,L=0;var z=0,G=[];for(r=0;r<B.length;r++){var W=B[r],V=W.x,H=W.x+W.w;if(Y)z=V-(V-(Y.x+Y.w)+Y.w),Y=null;V-z>u||H-z>u?(G.push(W.i-1),W.cr?(G.push(W.i+W.word.length),z=0,Y=null):Y=W):W.cr&&(G.push(W.i+W.word.length),z=0,Y=null)}for(r=G.length-1;r>=0;r--)n=h,a=G[r],o="\n",h=n.substr(0,a)+o+n.substr(a+1);s.wrappedText=h,l=h.length,B=[],X=null}var j=0;for(r=0;r<l;r++)if(10!==(E=h.charCodeAt(r))){if(S=v[E]){if(A=T,_=w,null!==P){var K=S.kerning[L];A+=void 0!==K?K:0}d>A&&(d=A),f>_&&(f=_);var q=A+S.xAdvance,Z=_+m;p<q&&(p=q),g<Z&&(g=Z);var J=S.xOffset+S.xAdvance+(void 0!==K?K:0);E===c?null!==X&&(B.push({word:X.word,i:X.i,x:X.x*R,y:X.y*M,w:X.w*R,h:X.h*M}),X=null):(null===X&&(X={word:"",i:j,x:T,y:w,w:0,h:m}),X.word=X.word.concat(h[r]),X.w+=J),N.push({i:j,idx:r,char:h[r],code:E,x:(S.xOffset+A)*C,y:(S.yOffset+w)*C,w:S.width*C,h:S.height*C,t:w*C,r:q*C,b:m*C,line:k,glyph:S}),T+=S.xAdvance+x+(void 0!==K?K:0),P=S,L=E,I=q*C,j++}}else null!==X&&(B.push({word:X.word,i:X.i,x:X.x*R,y:X.y*M,w:X.w*R,h:X.h*M}),X=null),T=0,w+=m+y,P=null,O[k]=I,I>D&&(D=I),I<F&&(F=I),k++,I=0;if(null!==X&&B.push({word:X.word,i:X.i,x:X.x*R,y:X.y*M,w:X.w*R,h:X.h*M}),O[k]=I,I>D&&(D=I),I<F&&(F=I),b>0)for(var Q=0;Q<N.length;Q++){var $=N[Q];if(1===b){var tt=(D-O[$.line])/2;$.x+=tt,$.r+=tt}else if(2===b){var et=D-O[$.line];$.x+=et,$.r+=et}}var it=s.local,st=s.global,rt=s.lines;return it.x=d*C,it.y=f*C,it.width=p*C,it.height=g*C,st.x=t.x-t._displayOriginX+d*R,st.y=t.y-t._displayOriginY+f*M,st.width=p*R,st.height=g*M,rt.shortest=F,rt.longest=D,rt.lengths=O,e&&(it.x=Math.ceil(it.x),it.y=Math.ceil(it.y),it.width=Math.ceil(it.width),it.height=Math.ceil(it.height),st.x=Math.ceil(st.x),st.y=Math.ceil(st.y),st.width=Math.ceil(st.width),st.height=Math.ceil(st.height),rt.shortest=Math.ceil(F),rt.longest=Math.ceil(D)),i&&(t._displayOriginX=t.originX*it.width,t._displayOriginY=t.originY*it.height,st.x=t.x-t._displayOriginX*t.scaleX,st.y=t.y-t._displayOriginY*t.scaleY,e&&(st.x=Math.ceil(st.x),st.y=Math.ceil(st.y))),s.words=B,s.characters=N,s.lines.height=m,s.scale=C,s.scaleX=t.scaleX,s.scaleY=t.scaleY,s}},68298:(t,e,i)=>{var s=i(31476);t.exports=function(t,e,i,r,n,a,o){var h=t.sys.textures.get(i),l=h.get(r),u=t.sys.cache.xml.get(n);if(l&&u){var c=s(u,l,a,o,h);return t.sys.cache.bitmapFont.add(e,{data:c,texture:i,frame:r,fromAtlas:!0}),!0}return!1}},39860:(t,e,i)=>{var s=i(10850);t.exports=function(t,e){var i=e.width,r=e.height,n=Math.floor(i/2),a=Math.floor(r/2),o=s(e,"chars","");if(""!==o){var h=s(e,"image",""),l=t.sys.textures.getFrame(h),u=l.cutX,c=l.cutY,d=l.source.width,f=l.source.height,p=s(e,"offset.x",0),g=s(e,"offset.y",0),v=s(e,"spacing.x",0),m=s(e,"spacing.y",0),x=s(e,"lineSpacing",0),y=s(e,"charsPerRow",null);null===y&&(y=d/i)>o.length&&(y=o.length);for(var T=p,w=g,E={retroFont:!0,font:h,size:i,lineHeight:r+x,chars:{}},S=0,b=0;b<o.length;b++){var A=o.charCodeAt(b),_=(u+T)/d,C=(c+w)/f,R=(u+T+i)/d,M=(c+w+r)/f;E.chars[A]={x:T,y:w,width:i,height:r,centerX:n,centerY:a,xOffset:0,yOffset:0,xAdvance:i,data:{},kerning:{},u0:_,v0:C,u1:R,v1:M},++S===y?(S=0,T=p,w+=r+m):T+=i+v}return{data:E,frame:null,texture:h}}}},31476:t=>{function e(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,i,s,r,n){void 0===s&&(s=0),void 0===r&&(r=0);var a=i.cutX,o=i.cutY,h=i.source.width,l=i.source.height,u=i.sourceIndex,c={},d=t.getElementsByTagName("info")[0],f=t.getElementsByTagName("common")[0];c.font=d.getAttribute("face"),c.size=e(d,"size"),c.lineHeight=e(f,"lineHeight")+r,c.chars={};var p=t.getElementsByTagName("char"),g=void 0!==i&&i.trimmed;if(g)var v=i.height,m=i.width;for(var x=0;x<p.length;x++){var y=p[x],T=e(y,"id"),w=String.fromCharCode(T),E=e(y,"x"),S=e(y,"y"),b=e(y,"width"),A=e(y,"height");g&&(E<m&&(m=E),S<v&&(v=S)),g&&0!==v&&0!==m&&(E-=i.x,S-=i.y);var _=(a+E)/h,C=(o+S)/l,R=(a+E+b)/h,M=(o+S+A)/l;if(c.chars[T]={x:E,y:S,width:b,height:A,centerX:Math.floor(b/2),centerY:Math.floor(A/2),xOffset:e(y,"xoffset"),yOffset:e(y,"yoffset"),xAdvance:e(y,"xadvance")+s,data:{},kerning:{},u0:_,v0:C,u1:R,v1:M},n&&0!==b&&0!==A){var P=n.add(w,u,E,S,b,A);P&&P.setUVs(b,A,_,C,R,M)}}var L=t.getElementsByTagName("kerning");for(x=0;x<L.length;x++){var O=L[x],F=e(O,"first"),D=e(O,"second"),k=e(O,"amount");c.chars[D].kerning[F]=k}return c}},55873:(t,e,i)=>{var s=i(66863),r=i(98611),n={Parse:i(39860)};n=r(!1,n,s),t.exports=n},66863:t=>{t.exports={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"}},13468:(t,e,i)=>{var s=i(44616),r=i(56694),n=i(88899),a=new r({Extends:s,Mixins:[n],initialize:function(t,e,i,r,n,a,o){s.call(this,t,e,i,r,n,a,o),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(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=a},93438:(t,e,i)=>{var s=i(49584);t.exports=function(t,e,i,r){var n=e._text,a=n.length,o=t.currentContext;if(0!==a&&s(t,o,e,i,r)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.displayCallback,u=e.callbackData,c=e.fontData.chars,d=e.fontData.lineHeight,f=e._letterSpacing,p=0,g=0,v=0,m=null,x=0,y=0,T=0,w=0,E=0,S=0,b=null,A=0,_=e.frame.source.image,C=h.cutX,R=h.cutY,M=0,P=0,L=e._fontSize/e.fontData.size,O=e._align,F=0,D=0;e.getTextBounds(!1);var k=e._bounds.lines;1===O?D=(k.longest-k.lengths[0])/2:2===O&&(D=k.longest-k.lengths[0]),o.translate(-e.displayOriginX,-e.displayOriginY);var I=i.roundPixels;e.cropWidth>0&&e.cropHeight>0&&(o.beginPath(),o.rect(0,0,e.cropWidth,e.cropHeight),o.clip());for(var B=0;B<a;B++)if(P=L,M=0,10!==(v=n.charCodeAt(B))){if(m=c[v]){if(x=C+m.x,y=R+m.y,T=m.width,w=m.height,E=m.xOffset+p-e.scrollX,S=m.yOffset+g-e.scrollY,null!==b){var N=m.kerning[A];E+=void 0!==N?N:0}if(l){u.index=B,u.charCode=v,u.x=E,u.y=S,u.scale=P,u.rotation=M,u.data=m.data;var X=l(u);E=X.x,S=X.y,P=X.scale,M=X.rotation}E*=P,S*=P,E+=D,p+=m.xAdvance+f+(void 0!==N?N:0),b=m,A=v,0!==T&&0!==w&&32!==v&&(I&&(E=Math.round(E),S=Math.round(S)),o.save(),o.translate(E,S),o.rotate(M),o.scale(P,P),o.drawImage(_,x,y,T,w,0,0,T,w),o.restore())}}else F++,1===O?D=(k.longest-k.lengths[F])/2:2===O&&(D=k.longest-k.lengths[F]),p=0,g+=d,b=null;o.restore()}}},67513:(t,e,i)=>{var s=i(13468),r=i(88933),n=i(99325),a=i(20494);n.register("dynamicBitmapText",(function(t,e){void 0===t&&(t={});var i=a(t,"font",""),n=a(t,"text",""),o=a(t,"size",!1),h=new s(this.scene,0,0,i,n,o);return void 0!==e&&(t.add=e),r(this.scene,h,t),h}))},94145:(t,e,i)=>{var s=i(13468);i(61286).register("dynamicBitmapText",(function(t,e,i,r,n){return this.displayList.add(new s(this.scene,t,e,i,r,n))}))},88899:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(16873),n=i(93438),t.exports={renderWebGL:r,renderCanvas:n}},16873:(t,e,i)=>{var s=i(73329),r=i(69360),n=i(75512),a=new r;t.exports=function(t,e,i,r){var o=e.text,h=o.length;if(0!==h){i.addToRenderList(e);var l=t.pipelines.set(e.pipeline,e),u=s(e,i,r);t.pipelines.preBatch(e);var c=u.sprite,d=u.calc,f=a,p=e.cropWidth>0||e.cropHeight>0;p&&(l.flush(),t.pushScissor(d.tx,d.ty,e.cropWidth*d.scaleX,e.cropHeight*d.scaleY));var g,v,m=e.frame.glTexture,x=e.tintFill,y=n.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),T=n.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),w=n.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),E=n.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),S=l.setGameObject(e),b=0,A=0,_=0,C=0,R=e.letterSpacing,M=0,P=0,L=e.scrollX,O=e.scrollY,F=e.fontData,D=F.chars,k=F.lineHeight,I=e.fontSize/F.size,B=0,N=e._align,X=0,U=0,Y=e.getTextBounds(!1);e.maxWidth>0&&(h=(o=Y.wrappedText).length);var z=e._bounds.lines;1===N?U=(z.longest-z.lengths[0])/2:2===N&&(U=z.longest-z.lengths[0]);for(var G=i.roundPixels,W=e.displayCallback,V=e.callbackData,H=0;H<h;H++)if(10!==(_=o.charCodeAt(H))){if(g=D[_]){M=g.width,P=g.height;var j=g.xOffset+b-L,K=g.yOffset+A-O;if(null!==v){var q=g.kerning[C];j+=void 0!==q?q:0}if(b+=g.xAdvance+R,v=g,C=_,0!==M&&0!==P&&32!==_){if(I=e.fontSize/e.fontData.size,B=0,W){V.color=0,V.tint.topLeft=y,V.tint.topRight=T,V.tint.bottomLeft=w,V.tint.bottomRight=E,V.index=H,V.charCode=_,V.x=j,V.y=K,V.scale=I,V.rotation=B,V.data=g.data;var Z=W(V);j=Z.x,K=Z.y,I=Z.scale,B=Z.rotation,Z.color?(y=Z.color,T=Z.color,w=Z.color,E=Z.color):(y=Z.tint.topLeft,T=Z.tint.topRight,w=Z.tint.bottomLeft,E=Z.tint.bottomRight),y=n.getTintAppendFloatAlpha(y,i.alpha*e._alphaTL),T=n.getTintAppendFloatAlpha(T,i.alpha*e._alphaTR),w=n.getTintAppendFloatAlpha(w,i.alpha*e._alphaBL),E=n.getTintAppendFloatAlpha(E,i.alpha*e._alphaBR)}j*=I,K*=I,j-=e.displayOriginX,K-=e.displayOriginY,j+=U,f.applyITRS(j,K,B,I,I),d.multiply(f,c);var J=g.u0,Q=g.v0,$=g.u1,tt=g.v1,et=M,it=P,st=c.e,rt=c.f,nt=it*c.c+c.e,at=it*c.d+c.f,ot=et*c.a+it*c.c+c.e,ht=et*c.b+it*c.d+c.f,lt=et*c.a+c.e,ut=et*c.b+c.f;G&&(st=Math.round(st),rt=Math.round(rt),nt=Math.round(nt),at=Math.round(at),ot=Math.round(ot),ht=Math.round(ht),lt=Math.round(lt),ut=Math.round(ut)),l.shouldFlush(6)&&(l.flush(),S=l.setGameObject(e)),l.batchQuad(e,st,rt,nt,at,ot,ht,lt,ut,J,Q,$,tt,y,T,w,E,x,m,S)}}}else X++,1===N?U=(z.longest-z.lengths[X])/2:2===N&&(U=z.longest-z.lengths[X]),b=0,A+=k,v=null;p&&(l.flush(),t.popScissor()),t.pipelines.postBatch(e)}}},44616:(t,e,i)=>{var s=i(56694),r=i(82897),n=i(64937),a=i(89980),o=i(82173),h=i(68298),l=i(31476),u=i(74118),c=i(84557),d=new s({Extends:a,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Texture,n.Tint,n.Transform,n.Visible,c],initialize:function(t,e,i,s,r,n,h){void 0===r&&(r=""),void 0===h&&(h=0),a.call(this,t,"BitmapText"),this.font=s;var l=this.scene.sys.cache.bitmapFont.get(s);l||console.warn("Invalid BitmapText key: "+s),this.fontData=l.data,this._text="",this._fontSize=n||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=h,this._bounds=o(),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=l.fromAtlas,this.setTexture(l.texture,l.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(r)},setLeftAlign:function(){return this._align=d.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=d.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=d.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this._letterSpacing=t,this._dirty=!0,this},setLineSpacing:function(t){return void 0===t&&(t=0),this.lineSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.5),this.dropShadowX=t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=s,this},setCharacterTint:function(t,e,i,s,n,a,o){void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=!1),void 0===s&&(s=-1),void 0===n&&(n=s,a=s,o=s);var h=this.text.length;-1===e&&(e=h),t<0&&(t=h+t),t=r(t,0,h-1);for(var l=r(t+e,t,h),u=this.charColors,c=t;c<l;c++){var d=u[c];if(-1===s)u[c]=null;else{var f=i?1:0;d?(d.tintEffect=f,d.tintTL=s,d.tintTR=n,d.tintBL=a,d.tintBR=o):u[c]={tintEffect:f,tintTL:s,tintTR:n,tintBL:a,tintBR:o}}}return this},setWordTint:function(t,e,i,s,r,n,a){void 0===e&&(e=1);for(var o=this.getTextBounds().words,h="number"==typeof t,l=0,u=0;u<o.length;u++){var c=o[u];if((h&&u===t||!h&&c.word===t)&&(this.setCharacterTint(c.i,c.word.length,i,s,r,n,a),++l===e))return this}return this},getTextBounds:function(t){var e=this._bounds;return(this._dirty||t||this.scaleX!==e.scaleX||this.scaleY!==e.scaleY)&&(o(this,t,!0,e),this._dirty=!1),e},getCharacterAt:function(t,e,i){for(var s=this.getLocalPoint(t,e,null,i),r=this.getTextBounds().characters,n=new u,a=0;a<r.length;a++){var o=r[a];if(n.setTo(o.x,o.t,o.r-o.x,o.b),n.contains(s.x,s.y))return o}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(t,e,i){if(void 0===e&&(e=this._fontSize),void 0===i&&(i=this._align),t!==this.font){var s=this.scene.sys.cache.bitmapFont.get(t);s&&(this.font=t,this.fontData=s.data,this._fontSize=e,this._align=i,this.fromAtlas=!0===s.fromAtlas,this.setTexture(s.texture,s.frame),o(this,!1,!0,this._bounds))}return this},setMaxWidth:function(t,e){return this._maxWidth=t,this._dirty=!0,void 0!==e&&(this.wordWrapCharCode=e),this},align:{set:function(t){this._align=t,this._dirty=!0},get:function(){return this._align}},text:{set:function(t){this.setText(t)},get:function(){return this._text}},fontSize:{set:function(t){this._fontSize=t,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(t){this._letterSpacing=t,this._dirty=!0},get:function(){return this._letterSpacing}},lineSpacing:{set:function(t){this._lineSpacing=t,this._dirty=!0},get:function(){return this._lineSpacing}},maxWidth:{set:function(t){this._maxWidth=t,this._dirty=!0},get:function(){return this._maxWidth}},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},displayWidth:{get:function(){return this.width}},displayHeight:{get:function(){return this.height}},toJSON:function(){var t=n.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,lineSpacing:this.lineSpacing,align:this.align};return t.data=e,t},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});d.ALIGN_LEFT=0,d.ALIGN_CENTER=1,d.ALIGN_RIGHT=2,d.ParseFromAtlas=h,d.ParseXMLBitmapFont=l,t.exports=d},97545:(t,e,i)=>{var s=i(49584);t.exports=function(t,e,i,r){var n=e._text,a=n.length,o=t.currentContext;if(0!==a&&s(t,o,e,i,r)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.fontData.chars,u=e.fontData.lineHeight,c=e._letterSpacing,d=e._lineSpacing,f=0,p=0,g=0,v=null,m=0,x=0,y=0,T=0,w=0,E=0,S=null,b=0,A=h.source.image,_=h.cutX,C=h.cutY,R=e._fontSize/e.fontData.size,M=e._align,P=0,L=0,O=e.getTextBounds(!1);e.maxWidth>0&&(a=(n=O.wrappedText).length);var F=e._bounds.lines;1===M?L=(F.longest-F.lengths[0])/2:2===M&&(L=F.longest-F.lengths[0]),o.translate(-e.displayOriginX,-e.displayOriginY);for(var D=i.roundPixels,k=0;k<a;k++)if(10!==(g=n.charCodeAt(k))){if(v=l[g]){if(m=_+v.x,x=C+v.y,y=v.width,T=v.height,w=v.xOffset+f,E=v.yOffset+p,null!==S){var I=v.kerning[b];w+=void 0!==I?I:0}w*=R,E*=R,w+=L,f+=v.xAdvance+c+(void 0!==I?I:0),S=v,b=g,0!==y&&0!==T&&32!==g&&(D&&(w=Math.round(w),E=Math.round(E)),o.save(),o.translate(w,E),o.scale(R,R),o.drawImage(A,m,x,y,T,0,0,y,T),o.restore())}}else P++,1===M?L=(F.longest-F.lengths[P])/2:2===M&&(L=F.longest-F.lengths[P]),f=0,p+=u+d,S=null;o.restore()}}},95499:(t,e,i)=>{var s=i(44616),r=i(88933),n=i(99325),a=i(20494),o=i(10850);n.register("bitmapText",(function(t,e){void 0===t&&(t={});var i=o(t,"font",""),n=a(t,"text",""),h=a(t,"size",!1),l=o(t,"align",0),u=new s(this.scene,0,0,i,n,h,l);return void 0!==e&&(t.add=e),r(this.scene,u,t),u}))},21797:(t,e,i)=>{var s=i(44616);i(61286).register("bitmapText",(function(t,e,i,r,n,a){return this.displayList.add(new s(this.scene,t,e,i,r,n,a))}))},84557:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(26372),n=i(97545),t.exports={renderWebGL:r,renderCanvas:n}},26372:(t,e,i)=>{var s=i(8810),r=i(73329),n=i(75512);t.exports=function(t,e,i,a){if(0!==e._text.length){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),h=r(e,i,a).calc;t.pipelines.preBatch(e);var l,u,c,d=i.roundPixels,f=i.alpha,p=e.charColors,g=e.tintFill,v=n.getTintAppendFloatAlpha,m=v(e.tintTopLeft,f*e._alphaTL),x=v(e.tintTopRight,f*e._alphaTR),y=v(e.tintBottomLeft,f*e._alphaBL),T=v(e.tintBottomRight,f*e._alphaBR),w=e.frame.glTexture,E=o.setGameObject(e),S=e.getTextBounds(!1).characters,b=e.dropShadowX,A=e.dropShadowY;if(0!==b||0!==A){var _=e.dropShadowColor,C=e.dropShadowAlpha,R=v(_,f*C*e._alphaTL),M=v(_,f*C*e._alphaTR),P=v(_,f*C*e._alphaBL),L=v(_,f*C*e._alphaBR);for(l=0;l<S.length;l++)c=(u=S[l]).glyph,32!==u.code&&0!==c.width&&0!==c.height&&s(o,e,u,c,b,A,h,d,R,M,P,L,1,w,E)}for(l=0;l<S.length;l++)if(c=(u=S[l]).glyph,32!==u.code&&0!==c.width&&0!==c.height)if(o.shouldFlush(6)&&(o.flush(),E=o.setGameObject(e)),p[u.i]){var O=p[u.i],F=O.tintEffect,D=v(O.tintTL,f*e._alphaTL),k=v(O.tintTR,f*e._alphaTR),I=v(O.tintBL,f*e._alphaBL),B=v(O.tintBR,f*e._alphaBR);s(o,e,u,c,0,0,h,d,D,k,I,B,F,w,E)}else s(o,e,u,c,0,0,h,d,m,x,y,T,g,w,E);t.pipelines.postBatch(e)}}},52816:(t,e,i)=>{var s=i(92246),r=i(41664),n=i(56694),a=i(64937),o=i(82047),h=i(89980),l=i(71207),u=new n({Extends:h,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Mask,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.Size,a.Texture,a.Transform,a.Visible,s],initialize:function(t,e,i,s,r){h.call(this,t,"Blitter"),this.setTexture(s,r),this.setPosition(e,i),this.initPipeline(),this.initPostPipeline(),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,s,n){void 0===s&&(s=!0),void 0===n&&(n=this.children.length),void 0===i?i=this.frame:i instanceof o||(i=this.texture.get(i));var a=new r(this,t,e,i,s);return this.children.addAt(a,n,!1),this.dirty=!0,a},createFromCallback:function(t,e,i,s){for(var r=this.createMultiple(e,i,s),n=0;n<r.length;n++){var a=r[n];t.call(this,a,n)}return r},createMultiple:function(t,e,i){void 0===e&&(e=this.frame.name),void 0===i&&(i=!0),Array.isArray(e)||(e=[e]);var s=[],r=this;return e.forEach((function(e){for(var n=0;n<t;n++)s.push(r.create(0,0,e,i))})),s},childCanRender:function(t){return t.visible&&t.alpha>0},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=[]}});t.exports=u},33177:t=>{t.exports=function(t,e,i,s){var r=e.getRenderList();if(0!==r.length){var n=t.currentContext,a=i.alpha*e.alpha;if(0!==a){i.addToRenderList(e),n.globalCompositeOperation=t.blendModes[e.blendMode],n.imageSmoothingEnabled=!e.frame.source.scaleMode;var o=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;n.save(),s&&s.copyToContext(n);for(var l=i.roundPixels,u=0;u<r.length;u++){var c=r[u],d=c.flipX||c.flipY,f=c.frame,p=f.canvasData,g=f.x,v=f.y,m=1,x=1,y=c.alpha*a;0!==y&&(n.globalAlpha=y,d?(c.flipX&&(m=-1,g-=p.width),c.flipY&&(x=-1,v-=p.height),p.width>0&&p.height>0&&(n.save(),n.translate(c.x+o,c.y+h),n.scale(m,x),n.drawImage(f.source.image,p.x,p.y,p.width,p.height,g,v,p.width,p.height),n.restore())):(l&&(g=Math.round(g),v=Math.round(v)),p.width>0&&p.height>0&&n.drawImage(f.source.image,p.x,p.y,p.width,p.height,g+c.x+o,v+c.y+h,p.width,p.height)))}n.restore()}}}},68452:(t,e,i)=>{var s=i(52816),r=i(88933),n=i(99325),a=i(20494);n.register("blitter",(function(t,e){void 0===t&&(t={});var i=a(t,"key",null),n=a(t,"frame",null),o=new s(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),r(this.scene,o,t),o}))},38906:(t,e,i)=>{var s=i(52816);i(61286).register("blitter",(function(t,e,i,r){return this.displayList.add(new s(this.scene,t,e,i,r))}))},92246:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(89165),n=i(33177),t.exports={renderWebGL:r,renderCanvas:n}},89165:(t,e,i)=>{var s=i(69360),r=i(75512),n=new s;t.exports=function(t,e,i,s){var a=e.getRenderList(),o=i.alpha*e.alpha;if(0!==a.length&&0!==o){i.addToRenderList(e);var h=t.pipelines.set(this.pipeline,e),l=i.scrollX*e.scrollFactorX,u=i.scrollY*e.scrollFactorY,c=n.copyFrom(i.matrix);s&&(c.multiplyWithOffset(s,-l,-u),l=0,u=0);var d=e.x-l,f=e.y-u,p=-1;t.pipelines.preBatch(e);for(var g=0;g<a.length;g++){var v=a[g],m=v.frame,x=v.alpha*o;if(0!==x){var y=m.width,T=m.height,w=d+v.x+m.x,E=f+v.y+m.y;v.flipX&&(y*=-1,w+=m.width),v.flipY&&(T*=-1,E+=m.height);var S=c.setQuad(w,E,w+y,E+T),b=r.getTintAppendFloatAlpha(v.tint,x);if(m.sourceIndex!==p){var A=h.setGameObject(e,m);p=m.sourceIndex}h.batchQuad(e,S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],m.u0,m.v0,m.u1,m.v1,b,b,b,b,false,m.glTexture,A)&&(p=-1)}}t.pipelines.postBatch(e)}}},41664:(t,e,i)=>{var s=i(56694),r=i(82047),n=new s({initialize:function(t,e,i,s,r){this.parent=t,this.x=e,this.y=i,this.frame=s,this.data={},this.tint=16777215,this._visible=r,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof r&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,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(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}});t.exports=n},97123:(t,e,i)=>{var s=i(82897),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},15720:(t,e,i)=>{var s=i(82897),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},69732:(t,e,i)=>{var s=i(95723),r={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},28284:t=>{t.exports={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,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},85293:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,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}}};t.exports=e},14975:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},88677:(t,e,i)=>{var s=i(56694),r=i(96910),n=i(72677),a=new s({initialize:function(t,e){this.gameObject=t,this.isPost=e,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(t){return void 0===t&&(t=0),this.padding=t,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(t){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,void 0!==t&&(this.padding=t),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var t=this.list,e=0;e<t.length;e++)t[e].destroy();this.list=[]}return this.enabled=!1,this.gameObject},remove:function(t){var e;if(this.isPost){var i=this.gameObject.getPostPipeline(String(t.type));for(Array.isArray(i)||(i=[i]),e=0;e<i.length;e++){var s=i[e];if(s.controller===t){this.gameObject.removePostPipeline(s),t.destroy();break}}}else{var r=this.list;for(e=0;e<r.length;e++)r[e]===t&&(n(r,e),t.destroy())}return this.gameObject},disable:function(t){return void 0===t&&(t=!1),this.isPost||this.gameObject.resetPipeline(),this.enabled=!1,t&&this.clear(),this.gameObject},add:function(t,e){if(!this.isPost)return this.enabled||this.enable(),this.list.push(t),t;var i=String(t.type);this.gameObject.setPostPipeline(i,e);var s=this.gameObject.getPostPipeline(i);return s?(Array.isArray(s)&&(s=s.pop()),s.controller=t,t):void 0},addGlow:function(t,e,i,s,n,a){return this.add(new r.Glow(this.gameObject,t,e,i,s),{quality:n,distance:a})},addShadow:function(t,e,i,s,n,a,o){return this.add(new r.Shadow(this.gameObject,t,e,i,s,n,a,o))},addPixelate:function(t){return this.add(new r.Pixelate(this.gameObject,t))},addVignette:function(t,e,i,s){return this.add(new r.Vignette(this.gameObject,t,e,i,s))},addShine:function(t,e,i,s){return this.add(new r.Shine(this.gameObject,t,e,i,s))},addBlur:function(t,e,i,s,n,a){return this.add(new r.Blur(this.gameObject,t,e,i,s,n,a))},addGradient:function(t,e,i,s,n,a,o,h){return this.add(new r.Gradient(this.gameObject,t,e,i,s,n,a,o,h))},addBloom:function(t,e,i,s,n,a){return this.add(new r.Bloom(this.gameObject,t,e,i,s,n,a))},addColorMatrix:function(){return this.add(new r.ColorMatrix(this.gameObject))},addCircle:function(t,e,i,s,n){return this.add(new r.Circle(this.gameObject,t,e,i,s,n))},addBarrel:function(t){return this.add(new r.Barrel(this.gameObject,t))},addDisplacement:function(t,e,i){return this.add(new r.Displacement(this.gameObject,t,e,i))},addWipe:function(t,e,i){return this.add(new r.Wipe(this.gameObject,t,e,i))},addReveal:function(t,e,i){return this.add(new r.Wipe(this.gameObject,t,e,i,!0))},addBokeh:function(t,e,i){return this.add(new r.Bokeh(this.gameObject,t,e,i))},addTiltShift:function(t,e,i,s,n,a){return this.add(new r.Bokeh(this.gameObject,t,e,i,!0,s,n,a))},destroy:function(){this.clear(),this.gameObject=null}});t.exports=a},92972:t=>{t.exports={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,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},80693:(t,e,i)=>{var s=i(74118),r=i(2386),n=i(93736),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t,e){return void 0===t&&(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getTopLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,n,a,o,h,l;if(void 0===t&&(t=new s),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),r=t.x,n=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,n=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,a,h),t.y=Math.min(i,n,o,l),t.width=Math.max(e,r,a,h)-t.x,t.height=Math.max(i,n,o,l)-t.y,t}};t.exports=a},39171:(t,e,i)=>{var s=i(76756),r=i(63037),n={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,r,n){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,r,n)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new r(this.scene,t)}};t.exports=n},28072:t=>{var e={_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,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},54211:(t,e,i)=>{var s=i(75606),r=i(63130),n=i(10850),a=i(55303),o=i(93736),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=n(t,"from",0),t.to=n(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=n(t,"rotationOffset",0);var l=n(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(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=a.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t&&t.data){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var n=this.x,o=this.y;this.setPosition(r.x,r.y);var h=this.x-n,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},58210:(t,e,i)=>{var s=i(28699),r={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(t){this.pipelineData={};var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){var a=n.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?s(e):e)}return this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},resetPipeline:function(t){return void 0===t&&(t=!1),this.pipeline=this.defaultPipeline,t&&(this.pipelineData={}),null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=r},44086:(t,e,i)=>{var s=i(28699),r=i(88677),n=i(72677),a={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(t){this.postPipelines=[],this.postPipelineData={},this.postFX=new r(this,!0),t&&(this.preFX=new r(this,!1))},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){Array.isArray(t)||(t=[t]);for(var a=0;a<t.length;a++){var o=n.getPostPipeline(t[a],this,e);o&&this.postPipelines.push(o)}e&&(this.postPipelineData=i?s(e):e)}return this.hasPostPipeline=this.postPipelines.length>0,this},setPostPipelineData:function(t,e){var i=this.postPipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],r=0;r<i.length;r++){var n=i[r];(e&&n.name===t||!e&&n instanceof t)&&s.push(n)}return 1===s.length?s[0]:s},resetPostPipeline:function(t){void 0===t&&(t=!1);for(var e=this.postPipelines,i=0;i<e.length;i++)e[i].destroy();this.postPipelines=[],this.hasPostPipeline=!1,t&&(this.postPipelineData={})},removePostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=i.length-1;s>=0;s--){var r=i[s];(e&&r.name===t||!e&&r===t)&&(r.destroy(),n(i,s))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};t.exports=a},45900:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},31654:t=>{var e={_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 e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},82081:(t,e,i)=>{var s=i(82047),r={texture:null,frame:null,isCropped:!1,setTexture:function(t,e,i,s){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e,i,s)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=r},21850:(t,e,i)=>{var s=i(82047),r={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,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},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(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}}};t.exports=r},58072:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),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}}};t.exports=e},48129:t=>{t.exports=function(t){var e={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&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},56584:(t,e,i)=>{var s=i(83392),r=i(69360),n=i(64462),a=i(35786),o=i(62138),h=i(93736),l={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(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return o(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(e||(e=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var r=s.scrollX,a=s.scrollY,o=t+r*this.scrollFactorX-r,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):n(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},69360:(t,e,i)=>{var s=i(56694),r=i(83392),n=i(93736),a=new s({initialize:function(t,e,i,s,r,n){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===r&&(r=0),void 0===n&&(n=0),this.matrix=new Float32Array([t,e,i,s,r,n,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(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||n?r.TAU-(n>0?Math.acos(-s/this.scaleY):-Math.acos(s/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 t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3];return s[0]=r*i+a*e,s[1]=n*i+o*e,s[2]=r*-e+a*i,s[3]=n*-e+o*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,r=i[0],n=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=s[0],c=s[1],d=s[2],f=s[3],p=s[4],g=s[5],v=void 0===e?i:e.matrix;return v[0]=u*r+c*a,v[1]=u*n+c*o,v[2]=d*r+f*a,v[3]=d*n+f*o,v[4]=p*r+g*a+h,v[5]=p*n+g*o+l,v},multiplyWithOffset:function(t,e,i){var s=this.matrix,r=t.matrix,n=s[0],a=s[1],o=s[2],h=s[3],l=e*n+i*o+s[4],u=e*a+i*h+s[5],c=r[0],d=r[1],f=r[2],p=r[3],g=r[4],v=r[5];return s[0]=c*n+d*o,s[1]=c*a+d*h,s[2]=f*n+p*o,s[3]=f*a+p*h,s[4]=g*n+v*o+l,s[5]=g*a+v*h+u,this},transform:function(t,e,i,s,r,n){var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],d=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*u,a[2]=i*o+s*l,a[3]=i*h+s*u,a[4]=r*o+n*l+c,a[5]=r*h+n*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3],h=s[4],l=s[5];return i.x=t*r+e*a+h,i.y=t*n+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=e*r-i*s;return t[0]=r/o,t[1]=-i/o,t[2]=-s/o,t[3]=e/o,t[4]=(s*a-r*n)/o,t[5]=-(e*a-i*n)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){return t.setTransform(this),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,r,n){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=s,a[4]=r,a[5]=n,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],r=e[2],n=e[3],a=i*n-s*r;if(t.translateX=e[4],t.translateY=e[5],i||s){var o=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/o):-Math.acos(i/o),t.scaleX=o,t.scaleY=a/o}else if(r||n){var h=Math.sqrt(r*r+n*n);t.rotation=.5*Math.PI-(n>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=a/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,r){var n=this.matrix,a=Math.sin(i),o=Math.cos(i);return n[4]=t,n[5]=e,n[0]=o*s,n[1]=a*s,n[2]=-a*r,n[3]=o*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new n);var s=this.matrix,r=s[0],a=s[1],o=s[2],h=s[3],l=s[4],u=s[5],c=1/(r*h+o*-a);return i.x=h*c*t+-o*c*e+(u*o-l*h)*c,i.y=r*c*e+-a*c*t+(-u*r+l*a)*c,i},setQuad:function(t,e,i,s,r,n){void 0===r&&(r=!1),void 0===n&&(n=this.quad);var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],d=a[5];return r?(n[0]=Math.round(t*o+e*l+c),n[1]=Math.round(t*h+e*u+d),n[2]=Math.round(t*o+s*l+c),n[3]=Math.round(t*h+s*u+d),n[4]=Math.round(i*o+s*l+c),n[5]=Math.round(i*h+s*u+d),n[6]=Math.round(i*o+e*l+c),n[7]=Math.round(i*h+e*u+d)):(n[0]=t*o+e*l+c,n[1]=t*h+e*u+d,n[2]=t*o+s*l+c,n[3]=t*h+s*u+d,n[4]=i*o+s*l+c,n[5]=i*h+s*u+d,n[6]=i*o+e*l+c,n[7]=i*h+e*u+d),n},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=a},59694:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},64937:(t,e,i)=>{t.exports={Alpha:i(97123),AlphaSingle:i(15720),BlendMode:i(69732),ComputedSize:i(28284),Crop:i(85293),Depth:i(14975),Flip:i(92972),FX:i(88677),GetBounds:i(80693),Mask:i(39171),Origin:i(28072),PathFollower:i(54211),Pipeline:i(58210),PostPipeline:i(44086),ScrollFactor:i(45900),Size:i(31654),Texture:i(82081),TextureCrop:i(21850),Tint:i(58072),ToJSON:i(48129),Transform:i(56584),TransformMatrix:i(69360),Visible:i(59694)}},70339:(t,e,i)=>{var s=i(59959),r=i(95723),n=i(56694),a=i(64937),o=i(56631),h=i(89980),l=i(74118),u=i(98524),c=i(58795),d=i(93736),f=new n({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.PostPipeline,a.Transform,a.Visible,u],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(e,i),this.setBlendMode(r.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,r=!1;t.setEmpty();for(var n=0;n<i.length;n++){var a=i[n];a.getBounds&&(a.getBounds(s),r?c(s,t,t):(t.setTo(s.x,s.y,s.width,s.height),r=!0))}}return t},addHandler:function(t){t.once(o.DESTROY,this.onChildDestroyed,this),this.exclusive&&(t.parentContainer&&t.parentContainer.remove(t),t.parentContainer=this,t.removeFromDisplayList(),t.addedToScene())},removeHandler:function(t){t.off(o.DESTROY,this.remove,this),this.exclusive&&(t.parentContainer=null,t.removedFromScene(),t.addToDisplayList())},pointToContainer:function(t,e){void 0===e&&(e=new d),this.parentContainer?this.parentContainer.pointToContainer(t,e):(e.x=t.x,e.y=t.y);var i=this.tempTransformMatrix;return i.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),i.invert(),i.transformPoint(t.x,t.y,e),e},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(t){return s.Add(this.list,t,this.maxSize,this.addHandler,this),this},addAt:function(t,e){return s.AddAt(this.list,t,e,this.maxSize,this.addHandler,this),this},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),s.StableSort(this.list,e),this):this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,r){return s.GetFirst(this.list,t,e,i,r)},getAll:function(t,e,i,r){return s.GetAll(this.list,t,e,i,r)},count:function(t,e,i,r){return s.CountAllMatching(this.list,t,e,i,r)},swap:function(t,e){return s.Swap(this.list,t,e),this},moveTo:function(t,e){return s.MoveTo(this.list,t,e),this},moveAbove:function(t,e){return s.MoveAbove(this.list,t,e),this},moveBelow:function(t,e){return s.MoveBelow(this.list,t,e),this},remove:function(t,e){var i=s.Remove(this.list,t,this.removeHandler,this);if(e&&i){Array.isArray(i)||(i=[i]);for(var r=0;r<i.length;r++)i[r].destroy()}return this},removeAt:function(t,e){var i=s.RemoveAt(this.list,t,this.removeHandler,this);return e&&i&&i.destroy(),this},removeBetween:function(t,e,i){var r=s.RemoveBetween(this.list,t,e,this.removeHandler,this);if(i)for(var n=0;n<r.length;n++)r[n].destroy();return this},removeAll:function(t){var e=this.list;if(t){for(var i=0;i<e.length;i++)e[i]&&e[i].scene&&(e[i].off(o.DESTROY,this.onChildDestroyed,this),e[i].destroy());this.list=[]}else s.RemoveBetween(e,0,e.length,this.removeHandler,this);return this},bringToTop:function(t){return s.BringToTop(this.list,t),this},sendToBack:function(t){return s.SendToBack(this.list,t),this},moveUp:function(t){return s.MoveUp(this.list,t),this},moveDown:function(t){return s.MoveDown(this.list,t),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e,i){return s.Replace(this.list,t,e)&&(this.addHandler(e),this.removeHandler(t),i&&t.destroy()),this},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,r){return s.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,s=[null],r=this.list.slice(),n=r.length;for(i=2;i<arguments.length;i++)s.push(arguments[i]);for(i=0;i<n;i++)s[0]=r[i],t.apply(e,s);return this},iterate:function(t,e){var i,s=[null];for(i=2;i<arguments.length;i++)s.push(arguments[i]);for(i=0;i<this.list.length;i++)s[0]=this.list[i],t.apply(e,s);return this},setScrollFactor:function(t,e,i){return void 0===e&&(e=t),void 0===i&&(i=!1),this.scrollFactorX=t,this.scrollFactorY=e,i&&(s.SetAll(this.list,"scrollFactorX",t),s.SetAll(this.list,"scrollFactorY",e)),this},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?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.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]},onChildDestroyed:function(t){s.Remove(this.list,t),this.exclusive&&(t.parentContainer=null,t.removedFromScene())}});t.exports=f},13916:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var r=e.list;if(0!==r.length){var n=e.localTransform;s?(n.loadIdentity(),n.multiply(s),n.translate(e.x,e.y),n.rotate(e.rotation),n.scale(e.scaleX,e.scaleY)):n.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u<r.length;u++){var c=r[u];if(c.willRender(i)){var d=c.alpha,f=c.scrollFactorX,p=c.scrollFactorY;a||c.blendMode===t.currentBlendMode||t.setBlendMode(c.blendMode),c.setScrollFactor(f*h,p*l),c.setAlpha(d*o),c.renderCanvas(t,c,i,n),c.setAlpha(d),c.setScrollFactor(f,p)}}e.mask&&e.mask.postRenderCanvas(t)}}},44516:(t,e,i)=>{var s=i(88933),r=i(70339),n=i(99325),a=i(20494);n.register("container",(function(t,e){void 0===t&&(t={});var i=a(t,"x",0),n=a(t,"y",0),o=a(t,"children",null),h=new r(this.scene,i,n,o);return void 0!==e&&(t.add=e),s(this.scene,h,t),h}))},23400:(t,e,i)=>{var s=i(70339);i(61286).register("container",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},98524:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(36934),n=i(13916),t.exports={renderWebGL:r,renderCanvas:n}},36934:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var r=e.list,n=r.length;if(0!==n){var a=e.localTransform;s?(a.loadIdentity(),a.multiply(s),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c<n;c++){var d=r[c];if(d.willRender(i)){var f,p,g,v;if(void 0!==d.alphaTopLeft)f=d.alphaTopLeft,p=d.alphaTopRight,g=d.alphaBottomLeft,v=d.alphaBottomRight;else{var m=d.alpha;f=m,p=m,g=m,v=m}var x=d.scrollFactorX,y=d.scrollFactorY;o||d.blendMode===t.currentBlendMode||t.setBlendMode(d.blendMode);var T=d.mask;T&&T.preRenderWebGL(t,d,i);var w=d.type;w!==t.currentType&&(t.newType=!0,t.currentType=w),t.nextTypeMatch=c<n-1&&r[c+1].type===t.currentType,d.setScrollFactor(x*l,y*u),d.setAlpha(f*h,p*h,g*h,v*h),d.renderWebGL(t,d,i,a,e),d.setAlpha(f,p,g,v),d.setScrollFactor(x,y),T&&T.postRenderWebGL(t,i),t.newType=!1}}t.pipelines.postBatch(e)}}},2452:t=>{t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},38943:(t,e,i)=>{var s=i(56694),r=i(64937),n=i(11603),a=i(89980),o=i(42911),h=i(55638),l=i(7599),u=i(51729),c=new s({Extends:a,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Origin,r.ScrollFactor,r.Transform,r.Visible,n],initialize:function(t,e,i,s,r,n){a.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.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(e,i),"string"==typeof s?"#"===s[0]?this.setElement(s.substr(1),r,n):this.createElement(s,r,n):s&&this.setElement(s,r,n),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this),t.sys.events.on(l.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e<t.length;e++)this.node.addEventListener(t[e],this.handler,!1)}return this},removeListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e<t.length;e++)this.node.removeEventListener(t[e],this.handler)}return this},dispatchNativeEvent:function(t){this.emit(t.type,t)},createElement:function(t,e,i){return this.setElement(document.createElement(t),e,i)},setElement:function(t,e,i){var s;if(this.removeElement(),"string"==typeof t?("#"===t[0]&&(t=t.substr(1)),s=document.getElementById(t)):"object"==typeof t&&1===t.nodeType&&(s=t),!s)return this;if(this.node=s,e&&o(e))for(var r in e)s.style[r]=e[r];else"string"==typeof e&&(s.style=e);return s.style.zIndex="0",s.style.display="inline",s.style.position="absolute",s.phaser=this,this.parent&&this.parent.appendChild(s),i&&(s.innerText=i),this.updateSize()},createFromCache:function(t,e){var i=this.cache.get(t);return i&&this.createFromHTML(i,e),this},createFromHTML:function(t,e){void 0===e&&(e="div"),this.removeElement();var i=document.createElement(e);return this.node=i,i.style.zIndex="0",i.style.display="inline",i.style.position="absolute",i.phaser=this,this.parent&&this.parent.appendChild(i),i.innerHTML=t,this.updateSize()},removeElement:function(){return this.node&&(h(this.node),this.node=null),this},updateSize:function(){var t=this.node,e=t.getBoundingClientRect();return this.width=t.clientWidth,this.height=t.clientHeight,this.displayWidth=e.width||0,this.displayHeight=e.height||0,this},getChildByProperty:function(t,e){if(this.node)for(var i=this.node.querySelectorAll("*"),s=0;s<i.length;s++)if(i[s][t]===e)return i[s];return null},getChildByID:function(t){return this.getChildByProperty("id",t)},getChildByName:function(t){return this.getChildByProperty("name",t)},setClassName:function(t){return this.node&&(this.node.className=t,this.updateSize()),this},setText:function(t){return this.node&&(this.node.innerText=t,this.updateSize()),this},setHTML:function(t){return this.node&&(this.node.innerHTML=t,this.updateSize()),this},preRender:function(){var t=this.parentContainer,e=this.node;e&&t&&!t.willRender()&&(e.style.display="none")},willRender:function(){return!0},preDestroy:function(){this.removeElement(),this.scene.sys.events.off(l.SLEEP,this.handleSceneEvent,this),this.scene.sys.events.off(l.WAKE,this.handleSceneEvent,this),this.scene.sys.events.off(l.PRE_RENDER,this.preRender,this)}});t.exports=c},66070:(t,e,i)=>{var s=i(2452),r=i(89980),n=i(69360),a=new n,o=new n,h=new n;t.exports=function(t,e,i,n){if(e.node){var l=e.node.style,u=e.scene.sys.settings;if(!l||!u.visible||r.RENDER_MASK!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender())l.display="none";else{var c=e.parentContainer,d=i.alpha*e.alpha;c&&(d*=c.alpha);var f=a,p=o,g=h,v=0,m=0,x="0%",y="0%";n?(v=e.width*e.scaleX*e.originX,m=e.height*e.scaleY*e.originY,p.applyITRS(e.x-v,e.y-m,e.rotation,e.scaleX,e.scaleY),f.copyFrom(i.matrix),f.multiplyWithOffset(n,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),p.e=e.x-v,p.f=e.y-m,f.multiply(p,g)):(v=e.width*e.originX,m=e.height*e.originY,p.applyITRS(e.x-v,e.y-m,e.rotation,e.scaleX,e.scaleY),f.copyFrom(i.matrix),x=100*e.originX+"%",y=100*e.originY+"%",p.e-=i.scrollX*e.scrollFactorX,p.f-=i.scrollY*e.scrollFactorY,f.multiply(p,g)),e.transformOnly||(l.display="block",l.opacity=d,l.zIndex=e._depth,l.pointerEvents=e.pointerEvents,l.mixBlendMode=s[e._blendMode]),l.transform=g.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",l.transformOrigin=x+" "+y}}}},66788:(t,e,i)=>{var s=i(38943);i(61286).register("dom",(function(t,e,i,r,n){var a=new s(this.scene,t,e,i,r,n);return this.displayList.add(a),a}))},11603:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(66070),n=i(66070),t.exports={renderWebGL:r,renderCanvas:n}},65492:t=>{t.exports="addedtoscene"},98398:t=>{t.exports="destroy"},40239:t=>{t.exports="removedfromscene"},17286:t=>{t.exports="complete"},31496:t=>{t.exports="created"},89587:t=>{t.exports="error"},59792:t=>{t.exports="locked"},96342:t=>{t.exports="loop"},6017:t=>{t.exports="playing"},49614:t=>{t.exports="play"},24418:t=>{t.exports="seeked"},87318:t=>{t.exports="seeking"},50009:t=>{t.exports="stalled"},61922:t=>{t.exports="stop"},79501:t=>{t.exports="textureready"},4052:t=>{t.exports="unlocked"},54857:t=>{t.exports="unsupported"},56631:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(65492),DESTROY:i(98398),REMOVED_FROM_SCENE:i(40239),VIDEO_COMPLETE:i(17286),VIDEO_CREATED:i(31496),VIDEO_ERROR:i(89587),VIDEO_LOCKED:i(59792),VIDEO_LOOP:i(96342),VIDEO_PLAY:i(49614),VIDEO_PLAYING:i(6017),VIDEO_SEEKED:i(24418),VIDEO_SEEKING:i(87318),VIDEO_STALLED:i(50009),VIDEO_STOP:i(61922),VIDEO_TEXTURE:i(79501),VIDEO_UNLOCKED:i(4052),VIDEO_UNSUPPORTED:i(54857)}},39419:(t,e,i)=>{var s=i(56694),r=i(64937),n=i(89980),a=i(79394),o=new s({Extends:n,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.Origin,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,a],initialize:function(t){n.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});t.exports=o},96699:()=>{},41155:(t,e,i)=>{var s=i(39419);i(61286).register("extern",(function(){var t=new s(this.scene);return this.displayList.add(t),t}))},79394:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(81410),n=i(96699),t.exports={renderWebGL:r,renderCanvas:n}},81410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,r){t.pipelines.clear();var n=s(e,i,r).calc;e.render.call(e,t,i,n),t.pipelines.rebind()}},36266:t=>{t.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:(t,e,i)=>{var s=i(51052),r=i(56694),n=i(36266),a=i(64937),o=i(95669),h=i(89980),l=i(72632),u=i(10850),c=i(83392),d=i(60898),f=new r({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.Depth,a.Mask,a.Pipeline,a.PostPipeline,a.Transform,a.Visible,a.ScrollFactor,d],initialize:function(t,e){var i=u(e,"x",0),s=u(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,s),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(e)},setDefaultStyles:function(t){return u(t,"lineStyle",null)&&(this.defaultStrokeWidth=u(t,"lineStyle.width",1),this.defaultStrokeColor=u(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=u(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),u(t,"fillStyle",null)&&(this.defaultFillColor=u(t,"fillStyle.color",16777215),this.defaultFillAlpha=u(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(n.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(n.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,s,r,a,o,h){return void 0===r&&(r=1),void 0===a&&(a=r),void 0===o&&(o=r),void 0===h&&(h=r),this.commandBuffer.push(n.GRADIENT_FILL_STYLE,r,a,o,h,t,e,i,s),this},lineGradientStyle:function(t,e,i,s,r,a){return void 0===a&&(a=1),this.commandBuffer.push(n.GRADIENT_LINE_STYLE,t,a,e,i,s,r),this},beginPath:function(){return this.commandBuffer.push(n.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(n.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(n.FILL_PATH),this},fill:function(){return this.commandBuffer.push(n.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(n.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(n.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,c.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,c.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,s){return this.commandBuffer.push(n.FILL_RECT,t,e,i,s),this},strokeRect:function(t,e,i,s){var r=this._lineWidth/2,n=t-r,a=t+r;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+s),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+s),this.strokePath(),this.beginPath(),this.moveTo(n,e),this.lineTo(a+i,e),this.strokePath(),this.beginPath(),this.moveTo(n,e+s),this.lineTo(a+i,e+s),this.strokePath(),this},fillRoundedRect:function(t,e,i,s,r){void 0===r&&(r=20);var n=r,a=r,o=r,h=r;"number"!=typeof r&&(n=l(r,"tl",20),a=l(r,"tr",20),o=l(r,"bl",20),h=l(r,"br",20));var u=n>=0,d=a>=0,f=o>=0,p=h>=0;return n=Math.abs(n),a=Math.abs(a),o=Math.abs(o),h=Math.abs(h),this.beginPath(),this.moveTo(t+n,e),this.lineTo(t+i-a,e),d?this.arc(t+i-a,e+a,a,-c.TAU,0):this.arc(t+i,e,a,Math.PI,c.TAU,!0),this.lineTo(t+i,e+s-h),p?this.arc(t+i-h,e+s-h,h,0,c.TAU):this.arc(t+i,e+s,h,-c.TAU,Math.PI,!0),this.lineTo(t+o,e+s),f?this.arc(t+o,e+s-o,o,c.TAU,Math.PI):this.arc(t,e+s,o,0,-c.TAU,!0),this.lineTo(t,e+n),u?this.arc(t+n,e+n,n,-Math.PI,-c.TAU):this.arc(t,e,n,c.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(t,e,i,s,r){void 0===r&&(r=20);var n=r,a=r,o=r,h=r,u=Math.min(i,s)/2;"number"!=typeof r&&(n=l(r,"tl",20),a=l(r,"tr",20),o=l(r,"bl",20),h=l(r,"br",20));var d=n>=0,f=a>=0,p=o>=0,g=h>=0;return n=Math.min(Math.abs(n),u),a=Math.min(Math.abs(a),u),o=Math.min(Math.abs(o),u),h=Math.min(Math.abs(h),u),this.beginPath(),this.moveTo(t+n,e),this.lineTo(t+i-a,e),this.moveTo(t+i-a,e),f?this.arc(t+i-a,e+a,a,-c.TAU,0):this.arc(t+i,e,a,Math.PI,c.TAU,!0),this.lineTo(t+i,e+s-h),this.moveTo(t+i,e+s-h),g?this.arc(t+i-h,e+s-h,h,0,c.TAU):this.arc(t+i,e+s,h,-c.TAU,Math.PI,!0),this.lineTo(t+o,e+s),this.moveTo(t+o,e+s),p?this.arc(t+o,e+s-o,o,c.TAU,Math.PI):this.arc(t,e+s,o,0,-c.TAU,!0),this.lineTo(t,e+n),this.moveTo(t,e+n),d?this.arc(t+n,e+n,n,-Math.PI,-c.TAU):this.arc(t,e,n,c.TAU,0,!0),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(n.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,s,r,a){return this.commandBuffer.push(n.FILL_TRIANGLE,t,e,i,s,r,a),this},strokeTriangle:function(t,e,i,s,r,a){return this.commandBuffer.push(n.STROKE_TRIANGLE,t,e,i,s,r,a),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,s){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,s),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(n.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(n.MOVE_TO,t,e),this},strokePoints:function(t,e,i,s){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===s&&(s=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var r=1;r<s;r++)this.lineTo(t[r].x,t[r].y);return e&&this.lineTo(t[0].x,t[0].y),i&&this.closePath(),this.strokePath(),this},fillPoints:function(t,e,i,s){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===s&&(s=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var r=1;r<s;r++)this.lineTo(t[r].x,t[r].y);return e&&this.lineTo(t[0].x,t[0].y),i&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(t,e){void 0===e&&(e=32);var i=t.getPoints(e);return this.strokePoints(i,!0)},strokeEllipse:function(t,e,i,s,r){void 0===r&&(r=32);var n=new o(t,e,i,s).getPoints(r);return this.strokePoints(n,!0)},fillEllipseShape:function(t,e){void 0===e&&(e=32);var i=t.getPoints(e);return this.fillPoints(i,!0)},fillEllipse:function(t,e,i,s,r){void 0===r&&(r=32);var n=new o(t,e,i,s).getPoints(r);return this.fillPoints(n,!0)},arc:function(t,e,i,s,r,a,o){return void 0===a&&(a=!1),void 0===o&&(o=0),this.commandBuffer.push(n.ARC,t,e,i,s,r,a,o),this},slice:function(t,e,i,s,r,a,o){return void 0===a&&(a=!1),void 0===o&&(o=0),this.commandBuffer.push(n.BEGIN_PATH),this.commandBuffer.push(n.MOVE_TO,t,e),this.commandBuffer.push(n.ARC,t,e,i,s,r,a,o),this.commandBuffer.push(n.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(n.SAVE),this},restore:function(){return this.commandBuffer.push(n.RESTORE),this},translateCanvas:function(t,e){return this.commandBuffer.push(n.TRANSLATE,t,e),this},scaleCanvas:function(t,e){return this.commandBuffer.push(n.SCALE,t,e),this},rotateCanvas:function(t){return this.commandBuffer.push(n.ROTATE,t),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var s,r,n=this.scene.sys,a=n.game.renderer;void 0===e&&(e=n.scale.width),void 0===i&&(i=n.scale.height),f.TargetCamera.setScene(this.scene),f.TargetCamera.setViewport(0,0,e,i),f.TargetCamera.scrollX=this.x,f.TargetCamera.scrollY=this.y;var o={willReadFrequently:!0};if("string"==typeof t)if(n.textures.exists(t)){var h=(s=n.textures.get(t)).getSourceImage();h instanceof HTMLCanvasElement&&(r=h.getContext("2d",o))}else r=(s=n.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d",o);else t instanceof HTMLCanvasElement&&(r=t.getContext("2d",o));return r&&(this.renderCanvas(a,this,f.TargetCamera,null,r,!1),s&&s.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new s,t.exports=f},91543:(t,e,i)=>{var s=i(36266),r=i(49584);t.exports=function(t,e,i,n,a,o){var h=e.commandBuffer,l=h.length,u=a||t.currentContext;if(0!==l&&r(t,u,e,i,n)){i.addToRenderList(e);var c=1,d=1,f=0,p=0,g=1,v=0,m=0,x=0;u.beginPath();for(var y=0;y<l;++y){switch(h[y]){case s.ARC:u.arc(h[y+1],h[y+2],h[y+3],h[y+4],h[y+5],h[y+6]),y+=7;break;case s.LINE_STYLE:g=h[y+1],f=h[y+2],c=h[y+3],v=(16711680&f)>>>16,m=(65280&f)>>>8,x=255&f,u.strokeStyle="rgba("+v+","+m+","+x+","+c+")",u.lineWidth=g,y+=3;break;case s.FILL_STYLE:p=h[y+1],d=h[y+2],v=(16711680&p)>>>16,m=(65280&p)>>>8,x=255&p,u.fillStyle="rgba("+v+","+m+","+x+","+d+")",y+=2;break;case s.BEGIN_PATH:u.beginPath();break;case s.CLOSE_PATH:u.closePath();break;case s.FILL_PATH:o||u.fill();break;case s.STROKE_PATH:o||u.stroke();break;case s.FILL_RECT:o?u.rect(h[y+1],h[y+2],h[y+3],h[y+4]):u.fillRect(h[y+1],h[y+2],h[y+3],h[y+4]),y+=4;break;case s.FILL_TRIANGLE:u.beginPath(),u.moveTo(h[y+1],h[y+2]),u.lineTo(h[y+3],h[y+4]),u.lineTo(h[y+5],h[y+6]),u.closePath(),o||u.fill(),y+=6;break;case s.STROKE_TRIANGLE:u.beginPath(),u.moveTo(h[y+1],h[y+2]),u.lineTo(h[y+3],h[y+4]),u.lineTo(h[y+5],h[y+6]),u.closePath(),o||u.stroke(),y+=6;break;case s.LINE_TO:u.lineTo(h[y+1],h[y+2]),y+=2;break;case s.MOVE_TO:u.moveTo(h[y+1],h[y+2]),y+=2;break;case s.LINE_FX_TO:u.lineTo(h[y+1],h[y+2]),y+=5;break;case s.MOVE_FX_TO:u.moveTo(h[y+1],h[y+2]),y+=5;break;case s.SAVE:u.save();break;case s.RESTORE:u.restore();break;case s.TRANSLATE:u.translate(h[y+1],h[y+2]),y+=2;break;case s.SCALE:u.scale(h[y+1],h[y+2]),y+=2;break;case s.ROTATE:u.rotate(h[y+1]),y+=1;break;case s.GRADIENT_FILL_STYLE:y+=5;break;case s.GRADIENT_LINE_STYLE:y+=6}}u.restore()}}},41286:(t,e,i)=>{var s=i(99325),r=i(33182);s.register("graphics",(function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new r(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i}))},13122:(t,e,i)=>{var s=i(33182);i(61286).register("graphics",(function(t){return this.displayList.add(new s(this.scene,t))}))},60898:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(34429),n=i(91543),n=i(91543),t.exports={renderWebGL:r,renderCanvas:n}},34429:(t,e,i)=>{var s=i(36266),r=i(73329),n=i(69360),a=i(75512),o=function(t,e,i){this.x=t,this.y=e,this.width=i},h=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new o(t,e,i)},l=[],u=new n;t.exports=function(t,e,i,n){if(0!==e.commandBuffer.length){i.addToRenderList(e);var c=t.pipelines.set(e.pipeline,e);t.pipelines.preBatch(e);for(var d=r(e,i,n).calc,f=u.loadIdentity(),p=e.commandBuffer,g=i.alpha*e.alpha,v=1,m=c.fillTint,x=c.strokeTint,y=0,T=0,w=0,E=2*Math.PI,S=[],b=0,A=!0,_=null,C=a.getTintAppendFloatAlpha,R=0;R<p.length;R++)switch(p[R]){case s.BEGIN_PATH:S.length=0,_=null,A=!0;break;case s.CLOSE_PATH:A=!1,_&&_.points.length&&_.points.push(_.points[0]);break;case s.FILL_PATH:for(b=0;b<S.length;b++)c.batchFillPath(S[b].points,f,d);break;case s.STROKE_PATH:for(b=0;b<S.length;b++)c.batchStrokePath(S[b].points,v,A,f,d);break;case s.LINE_STYLE:v=p[++R];var M=C(p[++R],p[++R]*g);x.TL=M,x.TR=M,x.BL=M,x.BR=M;break;case s.FILL_STYLE:var P=C(p[++R],p[++R]*g);m.TL=P,m.TR=P,m.BL=P,m.BR=P;break;case s.GRADIENT_FILL_STYLE:var L=p[++R]*g,O=p[++R]*g,F=p[++R]*g,D=p[++R]*g;m.TL=C(p[++R],L),m.TR=C(p[++R],O),m.BL=C(p[++R],F),m.BR=C(p[++R],D);break;case s.GRADIENT_LINE_STYLE:v=p[++R];var k=p[++R]*g;x.TL=C(p[++R],k),x.TR=C(p[++R],k),x.BL=C(p[++R],k),x.BR=C(p[++R],k);break;case s.ARC:var I=0,B=p[++R],N=p[++R],X=p[++R],U=p[++R],Y=p[++R],z=p[++R],G=p[++R];for(Y-=U,z?Y<-E?Y=-E:Y>0&&(Y=Y%E-E):Y>E?Y=E:Y<0&&(Y=E+Y%E),null===_&&(_=new h(B+Math.cos(U)*X,N+Math.sin(U)*X,v),S.push(_),I+=.01);I<1+G;)w=Y*I+U,y=B+Math.cos(w)*X,T=N+Math.sin(w)*X,_.points.push(new o(y,T,v)),I+=.01;w=Y+U,y=B+Math.cos(w)*X,T=N+Math.sin(w)*X,_.points.push(new o(y,T,v));break;case s.FILL_RECT:c.batchFillRect(p[++R],p[++R],p[++R],p[++R],f,d);break;case s.FILL_TRIANGLE:c.batchFillTriangle(p[++R],p[++R],p[++R],p[++R],p[++R],p[++R],f,d);break;case s.STROKE_TRIANGLE:c.batchStrokeTriangle(p[++R],p[++R],p[++R],p[++R],p[++R],p[++R],v,f,d);break;case s.LINE_TO:null!==_?_.points.push(new o(p[++R],p[++R],v)):(_=new h(p[++R],p[++R],v),S.push(_));break;case s.MOVE_TO:_=new h(p[++R],p[++R],v),S.push(_);break;case s.SAVE:l.push(f.copyToArray());break;case s.RESTORE:f.copyFromArray(l.pop());break;case s.TRANSLATE:B=p[++R],N=p[++R],f.translate(B,N);break;case s.SCALE:B=p[++R],N=p[++R],f.scale(B,N);break;case s.ROTATE:f.rotate(p[++R])}t.pipelines.postBatch(e)}}},59192:(t,e,i)=>{var s=i(83979),r=i(56694),n=i(56631),a=i(6659),o=i(71608),h=i(72632),l=i(10850),u=i(19256),c=i(42911),d=i(75757),f=i(58403),p=i(13747),g=new r({Extends:a,initialize:function(t,e,i){a.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?c(e[0])&&(i=e,e=null):c(e)&&(i=e,e=null),this.scene=t,this.children=new f,this.isParent=!0,this.type="Group",this.classType=h(i,"classType",p),this.name=h(i,"name",""),this.active=h(i,"active",!0),this.maxSize=h(i,"maxSize",-1),this.defaultKey=h(i,"defaultKey",null),this.defaultFrame=h(i,"defaultFrame",null),this.runChildUpdate=h(i,"runChildUpdate",!1),this.createCallback=h(i,"createCallback",null),this.removeCallback=h(i,"removeCallback",null),this.createMultipleCallback=h(i,"createMultipleCallback",null),this.internalCreateCallback=h(i,"internalCreateCallback",null),this.internalRemoveCallback=h(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(n.ADDED_TO_SCENE,this.addedToScene,this),this.on(n.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,s,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===s&&(s=this.defaultFrame),void 0===r&&(r=!0),void 0===n&&(n=!0),this.isFull())return null;var a=new this.classType(this.scene,t,e,i,s);return a.addToDisplayList(this.scene.sys.displayList),a.addToUpdateList(),a.visible=r,a.setActive(n),this.add(a),a},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i<t.length;i++){var s=this.createFromConfig(t[i]);e=e.concat(s)}return e},createFromConfig:function(t){if(this.isFull())return[];this.classType=h(t,"classType",this.classType);var e=h(t,"key",void 0),i=h(t,"frame",null),r=h(t,"visible",!0),n=h(t,"active",!0),a=[];if(void 0===e)return a;Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);var o=h(t,"repeat",0),c=h(t,"randomKey",!1),f=h(t,"randomFrame",!1),p=h(t,"yoyo",!1),g=h(t,"quantity",!1),v=h(t,"frameQuantity",1),m=h(t,"max",0),x=d(e,i,{max:m,qty:g||v,random:c,randomB:f,repeat:o,yoyo:p});t.createCallback&&(this.createCallback=t.createCallback),t.removeCallback&&(this.removeCallback=t.removeCallback),t.internalCreateCallback&&(this.internalCreateCallback=t.internalCreateCallback),t.internalRemoveCallback&&(this.internalRemoveCallback=t.internalRemoveCallback);for(var y=0;y<x.length;y++){var T=this.create(0,0,x[y].a,x[y].b,r,n);if(!T)break;a.push(T)}if(u(t,"setXY")){var w=l(t,"setXY.x",0),E=l(t,"setXY.y",0),S=l(t,"setXY.stepX",0),b=l(t,"setXY.stepY",0);s.SetXY(a,w,E,S,b)}if(u(t,"setRotation")){var A=l(t,"setRotation.value",0),_=l(t,"setRotation.step",0);s.SetRotation(a,A,_)}if(u(t,"setScale")){var C=l(t,"setScale.x",1),R=l(t,"setScale.y",C),M=l(t,"setScale.stepX",0),P=l(t,"setScale.stepY",0);s.SetScale(a,C,R,M,P)}if(u(t,"setOrigin")){var L=l(t,"setOrigin.x",.5),O=l(t,"setOrigin.y",L),F=l(t,"setOrigin.stepX",0),D=l(t,"setOrigin.stepY",0);s.SetOrigin(a,L,O,F,D)}if(u(t,"setAlpha")){var k=l(t,"setAlpha.value",1),I=l(t,"setAlpha.step",0);s.SetAlpha(a,k,I)}if(u(t,"setDepth")){var B=l(t,"setDepth.value",0),N=l(t,"setDepth.step",0);s.SetDepth(a,B,N)}if(u(t,"setScrollFactor")){var X=l(t,"setScrollFactor.x",1),U=l(t,"setScrollFactor.y",X),Y=l(t,"setScrollFactor.stepX",0),z=l(t,"setScrollFactor.stepY",0);s.SetScrollFactor(a,X,U,Y,z)}var G=h(t,"hitArea",null),W=h(t,"hitAreaCallback",null);G&&s.SetHitArea(a,G,W);var V=h(t,"gridAlign",!1);return V&&s.GridAlign(a,V),this.createMultipleCallback&&this.createMultipleCallback.call(this,a),a},preUpdate:function(t,e){if(this.runChildUpdate&&0!==this.children.size)for(var i=this.children.entries.slice(),s=0;s<i.length;s++){var r=i[s];r.active&&r.update(t,e)}},add:function(t,e){return void 0===e&&(e=!1),this.isFull()||(this.children.set(t),this.internalCreateCallback&&this.internalCreateCallback.call(this,t),this.createCallback&&this.createCallback.call(this,t),e&&(t.addToDisplayList(this.scene.sys.displayList),t.addToUpdateList()),t.on(n.DESTROY,this.remove,this)),this},addMultiple:function(t,e){if(void 0===e&&(e=!1),Array.isArray(t))for(var i=0;i<t.length;i++)this.add(t[i],e);return this},remove:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=!1),this.children.contains(t)?(this.children.delete(t),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,t),this.removeCallback&&this.removeCallback.call(this,t),t.off(n.DESTROY,this.remove,this),i?t.destroy():e&&(t.removeFromDisplayList(),t.removeFromUpdateList()),this):this},clear:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.children,s=0;s<i.size;s++){var r=i.entries[s];r.off(n.DESTROY,this.remove,this),e?r.destroy():t&&(r.removeFromDisplayList(),r.removeFromUpdateList())}return this.children.clear(),this},contains:function(t){return this.children.contains(t)},getChildren:function(){return this.children.entries},getLength:function(){return this.children.size},getMatching:function(t,e,i,s){return o(this.children.entries,t,e,i,s)},getFirst:function(t,e,i,s,r,n,a){return this.getHandler(!0,1,t,e,i,s,r,n,a)},getFirstNth:function(t,e,i,s,r,n,a,o){return this.getHandler(!0,t,e,i,s,r,n,a,o)},getLast:function(t,e,i,s,r,n,a){return this.getHandler(!1,1,t,e,i,s,r,n,a)},getLastNth:function(t,e,i,s,r,n,a,o){return this.getHandler(!1,t,e,i,s,r,n,a,o)},getHandler:function(t,e,i,s,r,n,a,o,h){var l,u;void 0===i&&(i=!1),void 0===s&&(s=!1);var c=0,d=this.children.entries;if(t)for(u=0;u<d.length;u++)if((l=d[u]).active===i){if(++c===e)break}else l=null;else for(u=d.length-1;u>=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof r&&(l.x=r),"number"==typeof n&&(l.y=n),l):s?this.create(r,n,a,o,h):null},get:function(t,e,i,s,r){return this.getFirst(!1,!0,t,e,i,s,r)},getFirstAlive:function(t,e,i,s,r,n){return this.getFirst(!0,t,e,i,s,r,n)},getFirstDead:function(t,e,i,s,r,n){return this.getFirst(!1,t,e,i,s,r,n)},playAnimation:function(t,e){return s.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i<this.children.size;i++)this.children.entries[i].active===t&&e++;return e},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var t=this.getTotalUsed();return(-1===this.maxSize?999999999999:this.maxSize)-t},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},propertyValueSet:function(t,e,i,r,n){return s.PropertyValueSet(this.children.entries,t,e,i,r,n),this},propertyValueInc:function(t,e,i,r,n){return s.PropertyValueInc(this.children.entries,t,e,i,r,n),this},setX:function(t,e){return s.SetX(this.children.entries,t,e),this},setY:function(t,e){return s.SetY(this.children.entries,t,e),this},setXY:function(t,e,i,r){return s.SetXY(this.children.entries,t,e,i,r),this},incX:function(t,e){return s.IncX(this.children.entries,t,e),this},incY:function(t,e){return s.IncY(this.children.entries,t,e),this},incXY:function(t,e,i,r){return s.IncXY(this.children.entries,t,e,i,r),this},shiftPosition:function(t,e,i){return s.ShiftPosition(this.children.entries,t,e,i),this},angle:function(t,e){return s.Angle(this.children.entries,t,e),this},rotate:function(t,e){return s.Rotate(this.children.entries,t,e),this},rotateAround:function(t,e){return s.RotateAround(this.children.entries,t,e),this},rotateAroundDistance:function(t,e,i){return s.RotateAroundDistance(this.children.entries,t,e,i),this},setAlpha:function(t,e){return s.SetAlpha(this.children.entries,t,e),this},setTint:function(t,e,i,r){return s.SetTint(this.children.entries,t,e,i,r),this},setOrigin:function(t,e,i,r){return s.SetOrigin(this.children.entries,t,e,i,r),this},scaleX:function(t,e){return s.ScaleX(this.children.entries,t,e),this},scaleY:function(t,e){return s.ScaleY(this.children.entries,t,e),this},scaleXY:function(t,e,i,r){return s.ScaleXY(this.children.entries,t,e,i,r),this},setDepth:function(t,e){return s.SetDepth(this.children.entries,t,e),this},setBlendMode:function(t){return s.SetBlendMode(this.children.entries,t),this},setHitArea:function(t,e){return s.SetHitArea(this.children.entries,t,e),this},shuffle:function(){return s.Shuffle(this.children.entries),this},kill:function(t){this.children.contains(t)&&t.setActive(!1)},killAndHide:function(t){this.children.contains(t)&&(t.setActive(!1),t.setVisible(!1))},setVisible:function(t,e,i){return s.SetVisible(this.children.entries,t,e,i),this},toggleVisible:function(){return s.ToggleVisible(this.children.entries),this},destroy:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1),this.scene&&!this.ignoreDestroy&&(this.emit(n.DESTROY,this),this.removeAllListeners(),this.scene.sys.updateList.remove(this),this.clear(e,t),this.scene=void 0,this.children=void 0)}});t.exports=g},61295:(t,e,i)=>{var s=i(99325),r=i(59192);s.register("group",(function(t){return new r(this.scene,null,t)}))},62598:(t,e,i)=>{var s=i(59192);i(61286).register("group",(function(t,e){return this.updateList.add(new s(this.scene,t,e))}))},1539:(t,e,i)=>{var s=i(56694),r=i(64937),n=i(89980),a=i(57322),o=new s({Extends:n,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,a],initialize:function(t,e,i,s,r){n.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});t.exports=o},57786:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},83556:(t,e,i)=>{var s=i(88933),r=i(99325),n=i(20494),a=i(1539);r.register("image",(function(t,e){void 0===t&&(t={});var i=n(t,"key",null),r=n(t,"frame",null),o=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),s(this.scene,o,t),o}))},20927:(t,e,i)=>{var s=i(1539);i(61286).register("image",(function(t,e,i,r){return this.displayList.add(new s(this.scene,t,e,i,r))}))},57322:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(59390),n=i(57786),t.exports={renderWebGL:r,renderCanvas:n}},59390:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),this.pipeline.batchSprite(e,i,s)}},48013:(t,e,i)=>{var s={Events:i(56631),DisplayList:i(91713),GameObjectCreator:i(99325),GameObjectFactory:i(61286),UpdateList:i(92034),Components:i(64937),GetCalcMatrix:i(73329),BuildGameObject:i(88933),BuildGameObjectAnimation:i(32291),GameObject:i(89980),BitmapText:i(44616),Blitter:i(52816),Bob:i(41664),Container:i(70339),DOMElement:i(38943),DynamicBitmapText:i(13468),Extern:i(39419),Graphics:i(33182),Group:i(59192),Image:i(1539),Layer:i(85305),Particles:i(27684),PathFollower:i(29598),RenderTexture:i(15996),RetroFont:i(55873),Rope:i(79968),Sprite:i(13747),Text:i(76555),GetTextSize:i(32979),MeasureText:i(27030),TextStyle:i(74744),TileSprite:i(35856),Zone:i(71030),Video:i(8630),Shape:i(91461),Arc:i(28593),Curve:i(15220),Ellipse:i(28591),Grid:i(39169),IsoBox:i(4415),IsoTriangle:i(65159),Line:i(579),Polygon:i(91249),Rectangle:i(517),Star:i(77843),Triangle:i(21873),Factories:{Blitter:i(38906),Container:i(23400),DOMElement:i(66788),DynamicBitmapText:i(94145),Extern:i(41155),Graphics:i(13122),Group:i(62598),Image:i(20927),Layer:i(17676),Particles:i(81212),PathFollower:i(19626),RenderTexture:i(29599),Rope:i(31982),Sprite:i(66135),StaticBitmapText:i(21797),Text:i(94627),TileSprite:i(20509),Zone:i(34546),Video:i(215),Arc:i(10369),Curve:i(10147),Ellipse:i(99869),Grid:i(9326),IsoBox:i(88154),IsoTriangle:i(67765),Line:i(85665),Polygon:i(88203),Rectangle:i(94355),Star:i(23962),Triangle:i(79296)},Creators:{Blitter:i(68452),Container:i(44516),DynamicBitmapText:i(67513),Graphics:i(41286),Group:i(61295),Image:i(83556),Layer:i(56378),Particles:i(765),RenderTexture:i(85692),Rope:i(96027),Sprite:i(89219),StaticBitmapText:i(95499),Text:i(75397),TileSprite:i(63950),Zone:i(24067),Video:i(65601)}};s.Shader=i(27902),s.Mesh=i(83321),s.NineSlice=i(44139),s.PointLight=i(13171),s.Plane=i(33412),s.Factories.Shader=i(51979),s.Factories.Mesh=i(8767),s.Factories.NineSlice=i(53778),s.Factories.PointLight=i(91201),s.Factories.Plane=i(58322),s.Creators.Shader=i(13908),s.Creators.Mesh=i(41839),s.Creators.NineSlice=i(40964),s.Creators.PointLight=i(162),s.Creators.Plane=i(10912),s.Light=i(14455),s.LightsManager=i(26193),s.LightsPlugin=i(50296),t.exports=s},85305:(t,e,i)=>{var s=i(95723),r=i(56694),n=i(64937),a=i(48129),o=i(81078),h=i(6659),l=i(56631),u=i(71207),c=i(58010),d=i(7599),f=i(17922),p=new r({Extends:u,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.PostPipeline,n.Visible,h,c],initialize:function(t,e){u.call(this,t),h.call(this),this.scene=t,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=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),e&&this.add(e),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new o(this)),this},setData:function(t,e){return this.data||(this.data=new o(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new o(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new o(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new o(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return a(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){var e=t.displayList;e&&e!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(l.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(l.ADDED_TO_SCENE,this,this.scene),t.events.emit(d.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(l.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(d.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(t){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var e=this.list;e.length;)e[0].destroy(t);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=p},834:t=>{t.exports=function(t,e,i){var s=e.list;if(0!==s.length){e.depthSort();var r=-1!==e.blendMode;r||t.setBlendMode(0);var n=e._alpha;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var a=0;a<s.length;a++){var o=s[a];if(o.willRender(i)){var h=o.alpha;r||o.blendMode===t.currentBlendMode||t.setBlendMode(o.blendMode),o.setAlpha(h*n),o.renderCanvas(t,o,i),o.setAlpha(h)}}e.mask&&e.mask.postRenderCanvas(t)}}},56378:(t,e,i)=>{var s=i(88933),r=i(85305),n=i(99325),a=i(20494);n.register("layer",(function(t,e){void 0===t&&(t={});var i=a(t,"children",null),n=new r(this.scene,i);return void 0!==e&&(t.add=e),s(this.scene,n,t),n}))},17676:(t,e,i)=>{var s=i(85305);i(61286).register("layer",(function(t){return this.displayList.add(new s(this.scene,t))}))},58010:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(17576),n=i(834),t.exports={renderWebGL:r,renderCanvas:n}},17576:t=>{t.exports=function(t,e,i){var s=e.list,r=s.length;if(0!==r){e.depthSort(),t.pipelines.preBatch(e);var n=-1!==e.blendMode;n||t.setBlendMode(0);for(var a=e.alpha,o=0;o<r;o++){var h=s[o];if(h.willRender(i)){var l,u,c,d;if(void 0!==h.alphaTopLeft)l=h.alphaTopLeft,u=h.alphaTopRight,c=h.alphaBottomLeft,d=h.alphaBottomRight;else{var f=h.alpha;l=f,u=f,c=f,d=f}n||h.blendMode===t.currentBlendMode||t.setBlendMode(h.blendMode);var p=h.mask;p&&p.preRenderWebGL(t,h,i);var g=h.type;g!==t.currentType&&(t.newType=!0,t.currentType=g),t.nextTypeMatch=o<r-1&&s[o+1].type===t.currentType,h.setAlpha(l*a,u*a,c*a,d*a),h.renderWebGL(t,h,i),h.setAlpha(l,u,c,d),p&&p.postRenderWebGL(t,i),t.newType=!1}}t.pipelines.postBatch(e)}}},14455:(t,e,i)=>{var s=i(26673),r=i(56694),n=i(64937),a=i(39298),o=i(75512),h=new r({Extends:s,Mixins:[n.Origin,n.ScrollFactor,n.Transform,n.Visible],initialize:function(t,e,i,r,n,o,h){s.call(this,t,e,i),this.color=new a(r,n,o),this.intensity=h,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(i)},displayWidth:{get:function(){return this.diameter},set:function(t){this.diameter=t}},displayHeight:{get:function(){return this.diameter},set:function(t){this.diameter=t}},width:{get:function(){return this.diameter},set:function(t){this.diameter=t}},height:{get:function(){return this.diameter},set:function(t){this.diameter=t}},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){var e=o.getFloatsFromUintRGB(t);return this.color.set(e[0],e[1],e[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this}});h.RENDER_MASK=15,t.exports=h},26193:(t,e,i)=>{var s=i(26535),r=i(56694),n=i(53996),a=i(14455),o=i(13171),h=i(39298),l=i(72677),u=i(17922),c=i(75512),d=new r({initialize:function(){this.lights=[],this.ambientColor=new h(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,s,r,n){return this.systems.displayList.add(new o(this.scene,t,e,i,s,r,n))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(t){for(var e=this.lights,i=t.worldView,r=[],a=0;a<e.length;a++){var o=e[a];o.willRender(t)&&s(o,i)&&r.push({light:o,distance:n(o.x,o.y,i.centerX,i.centerY)})}return r.length>this.maxLights&&(u(r,this.sortByDistance),r=r.slice(0,this.maxLights)),this.visibleLights=r.length,r},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){var e=c.getFloatsFromUintRGB(t);return this.ambientColor.set(e[0],e[1],e[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===s&&(s=16777215),void 0===r&&(r=1);var n=c.getFloatsFromUintRGB(s),o=new a(t,e,i,n[0],n[1],n[2],r);return this.lights.push(o),o},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&l(this.lights,e),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=d},50296:(t,e,i)=>{var s=i(56694),r=i(26193),n=i(91963),a=i(7599),o=new s({Extends:r,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(a.BOOT,this.boot,this),r.call(this)},boot:function(){var t=this.systems.events;t.on(a.SHUTDOWN,this.shutdown,this),t.on(a.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});n.register("LightsPlugin",o,"lights"),t.exports=o},83321:(t,e,i)=>{var s=i(56694),r=i(64937),n=i(75606),a=i(18693),o=i(89980),h=i(53267),l=i(67623),u=i(73329),c=i(16650),d=i(23464),f=i(23701),p=i(17922),g=i(70015),v=i(85769),m=new s({Extends:o,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Size,r.Texture,r.Transform,r.Visible,d],initialize:function(t,e,i,s,r,n,a,h,l,u,d,f){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s="__WHITE"),o.call(this,t,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new g,this.modelScale=new g(1,1,1),this.modelRotation=new g,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new c,this.viewPosition=new g,this.viewMatrix=new c,this.projectionMatrix=new c,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var p=t.sys.renderer;this.setPosition(e,i),this.setTexture(s,r),this.setSize(p.width,p.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(p.width,p.height),n&&this.addVertices(n,a,h,l,u,d,f)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(t){return this.viewPosition.addScale(g.LEFT,t),this.dirtyCache[10]=1,this},panY:function(t){return this.viewPosition.y+=g.DOWN.y*t,this.dirtyCache[10]=1,this},panZ:function(t){return this.viewPosition.z+=t,this.dirtyCache[10]=1,this},setPerspective:function(t,e,i,s,r){return void 0===i&&(i=45),void 0===s&&(s=.01),void 0===r&&(r=1e3),this.fov=i,this.projectionMatrix.perspective(n(i),t/e,s,r),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(t,e,i,s){return void 0===t&&(t=this.scene.sys.renderer.getAspectRatio()),void 0===e&&(e=1),void 0===i&&(i=-1e3),void 0===s&&(s=1e3),this.fov=0,this.projectionMatrix.ortho(-t,t,-e,e,i,s),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach((function(t){t.destroy()})),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(t,e,i,s,r,n,a,o,l){var u,c=this.scene.sys.cache.obj.get(t);return c&&(u=h(c,this,e,i,s,r,n,a,o,l)),u&&0!==u.verts.length||console.warn("Mesh.addVerticesFromObj data empty:",t),this},sortByDepth:function(t,e){return t.depth-e.depth},depthSort:function(){return p(this.faces,this.sortByDepth),this},addVertex:function(t,e,i,s,r,n,a){var o=new v(t,e,i,s,r,n,a);return this.vertices.push(o),o},addFace:function(t,e,i){var s=new a(t,e,i);return this.faces.push(s),this.dirtyCache[9]=-1,s},addVertices:function(t,e,i,s,r,n,a){var o=l(t,e,i,s,r,n,a);return o?(this.faces=this.faces.concat(o.faces),this.vertices=this.vertices.concat(o.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(t){return this.faces[t]},hasFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var s=u(this,i).calc,r=this.faces,n=0;n<r.length;n++){if(r[n].contains(t,e,s))return!0}return!1},getFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var s=u(this,i).calc,r=this.faces,n=[],a=0;a<r.length;a++){var o=r[a];o.contains(t,e,s)&&n.push(o)}return p(n,this.sortByDepth)},setDebug:function(t,e){return this.debugGraphic=t,this.debugCallback=t||e?e||this.renderDebug:null,this},isDirty:function(){var t=this.modelPosition,e=this.modelRotation,i=this.modelScale,s=this.dirtyCache,r=t.x,n=t.y,a=t.z,o=e.x,h=e.y,l=e.z,u=i.x,c=i.y,d=i.z,f=this.getFaceCount(),p=s[0],g=s[1],v=s[2],m=s[3],x=s[4],y=s[5],T=s[6],w=s[7],E=s[8],S=s[9];return s[0]=r,s[1]=n,s[2]=a,s[3]=o,s[4]=h,s[5]=l,s[6]=u,s[7]=c,s[8]=d,s[9]=f,p!==r||g!==n||v!==a||m!==o||x!==h||y!==l||T!==u||w!==c||E!==d||S!==f},preUpdate:function(){this.totalRendered=this.totalFrame,this.totalFrame=0;var t=this.dirtyCache;if(this.ignoreDirtyCache||t[10]||this.isDirty()){var e=this.width,i=this.height,s=this.viewMatrix,r=this.viewPosition;t[10]&&(s.identity(),s.translate(r),s.invert(),t[10]=0);var n=this.transformMatrix;n.setWorldMatrix(this.modelRotation,this.modelPosition,this.modelScale,this.viewMatrix,this.projectionMatrix);for(var a=r.z,o=this.faces,h=0;h<o.length;h++)o[h].transformCoordinatesLocal(n,e,i,a);this.depthSort()}},renderDebug:function(t,e){for(var i=t.debugGraphic,s=0;s<e.length;s++){var r=e[s],n=r.vertex1.tx,a=r.vertex1.ty,o=r.vertex2.tx,h=r.vertex2.ty,l=r.vertex3.tx,u=r.vertex3.ty;i.strokeTriangle(n,a,o,h,l,u)}},preDestroy:function(){this.clear(),this.debugCallback=null,this.debugGraphic=null},clearTint:function(){return this.setTint()},setInteractive:function(t){void 0===t&&(t={});var e=function(t,e,i){for(var s=this.faces,r=0;r<s.length;r++){if(s[r].contains(e,i))return!0}return!1}.bind(this);return this.scene.sys.input.enable(this,t,e),this},setTint:function(t){void 0===t&&(t=16777215);for(var e=this.vertices,i=0;i<e.length;i++)e[i].color=t;return this},uvScroll:function(t,e){for(var i=this.faces,s=0;s<i.length;s++)i[s].scrollUV(t,e);return this},uvScale:function(t,e){for(var i=this.faces,s=0;s<i.length;s++)i[s].scaleUV(t,e);return this},tint:{set:function(t){this.setTint(t)}},rotateX:{get:function(){return f(this.modelRotation.x)},set:function(t){this.modelRotation.x=n(t)}},rotateY:{get:function(){return f(this.modelRotation.y)},set:function(t){this.modelRotation.y=n(t)}},rotateZ:{get:function(){return f(this.modelRotation.z)},set:function(t){this.modelRotation.z=n(t)}}});t.exports=m},6317:t=>{t.exports=function(){}},41839:(t,e,i)=>{var s=i(88933),r=i(99325),n=i(20494),a=i(10850),o=i(83321);r.register("mesh",(function(t,e){void 0===t&&(t={});var i=n(t,"key",null),r=n(t,"frame",null),h=a(t,"vertices",[]),l=a(t,"uvs",[]),u=a(t,"indicies",[]),c=a(t,"containsZ",!1),d=a(t,"normals",[]),f=a(t,"colors",16777215),p=a(t,"alphas",1),g=new o(this.scene,0,0,i,r,h,l,u,c,d,f,p);return void 0!==e&&(t.add=e),s(this.scene,g,t),g}))},8767:(t,e,i)=>{var s=i(83321);i(61286).register("mesh",(function(t,e,i,r,n,a,o,h,l,u,c){return this.displayList.add(new s(this.scene,t,e,i,r,n,a,o,h,l,u,c))}))},23464:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(57410),n=i(6317),t.exports={renderWebGL:r,renderCanvas:n}},57410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,r){var n=e.faces,a=n.length;if(0!==a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),h=s(e,i,r).calc;t.pipelines.preBatch(e);for(var l=o.setGameObject(e),u=o.vertexViewF32,c=o.vertexViewU32,d=o.vertexCount*o.currentShader.vertexComponentCount-1,f=e.tintFill,p=[],g=e.debugCallback,v=h.a,m=h.b,x=h.c,y=h.d,T=h.e,w=h.f,E=e.viewPosition.z,S=e.hideCCW,b=i.roundPixels,A=i.alpha*e.alpha,_=0,C=0;C<a;C++){var R=n[C];R.isInView(i,S,E,A,v,m,x,y,T,w,b)&&(o.shouldFlush(3)&&(o.flush(),l=o.setGameObject(e),d=0),d=R.load(u,c,d,l,f),_++,o.vertexCount+=3,o.currentBatch.count=o.vertexCount-o.currentBatch.start,g&&p.push(R))}e.totalFrame+=_,g&&g.call(e,e,p),t.pipelines.postBatch(e)}}},44139:(t,e,i)=>{var s=i(56694),r=i(64937),n=i(89980),a=i(94456),o=i(85769),h=new s({Extends:n,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Texture,r.Transform,r.Visible,a],initialize:function(t,e,i,s,r,a,h,l,u,c,d){n.call(this,t,"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 f=t.textures.getFrame(s,r);this.is3Slice=!c&&!d,f.scale9&&(this.is3Slice=f.is3Slice);for(var p=this.is3Slice?18:54,g=0;g<p;g++)this.vertices.push(new o);this.setPosition(e,i),this.setTexture(s,r),this.setSlices(a,h,l,u,c,d,!1),this.setOrigin(.5,.5),this.initPipeline(),this.initPostPipeline()},setSlices:function(t,e,i,s,r,n,a){void 0===i&&(i=10),void 0===s&&(s=10),void 0===r&&(r=0),void 0===n&&(n=0),void 0===a&&(a=!1);var o=this.frame,h=!1;if(this.is3Slice&&a&&0!==r&&0!==n&&(h=!0),h)console.warn("Cannot change 9 slice to 3 slice");else{if(o.scale9&&!a){var l=o.data.scale9Borders,u=l.x,c=l.y;i=u,s=o.width-l.w-u,r=c,n=o.height-l.h-c,void 0===t&&(t=o.width),void 0===e&&(e=o.height)}else void 0===t&&(t=256),void 0===e&&(e=256);this._width=t,this._height=e,this.leftWidth=i,this.rightWidth=s,this.topHeight=r,this.bottomHeight=n,this.is3Slice&&(e=o.height,this._height=e,this.topHeight=e,this.bottomHeight=0),this.updateVertices(),this.updateUVs()}return this},updateUVs:function(){var t=this.leftWidth,e=this.rightWidth,i=this.topHeight,s=this.bottomHeight,r=this.frame.width,n=this.frame.height;this.updateQuadUVs(0,0,0,t/r,i/n),this.updateQuadUVs(6,t/r,0,1-e/r,i/n),this.updateQuadUVs(12,1-e/r,0,1,i/n),this.is3Slice||(this.updateQuadUVs(18,0,i/n,t/r,1-s/n),this.updateQuadUVs(24,t/r,i/n,1-e/r,1-s/n),this.updateQuadUVs(30,1-e/r,i/n,1,1-s/n),this.updateQuadUVs(36,0,1-s/n,t/r,1),this.updateQuadUVs(42,t/r,1-s/n,1-e/r,1),this.updateQuadUVs(48,1-e/r,1-s/n,1,1))},updateVertices:function(){var t=this.leftWidth,e=this.rightWidth,i=this.topHeight,s=this.bottomHeight,r=this.width,n=this.height;this.updateQuad(0,-.5,.5,t/r-.5,.5-i/n),this.updateQuad(6,t/r-.5,.5,.5-e/r,.5-i/n),this.updateQuad(12,.5-e/r,.5,.5,.5-i/n),this.is3Slice||(this.updateQuad(18,-.5,.5-i/n,t/r-.5,s/n-.5),this.updateQuad(24,t/r-.5,.5-i/n,.5-e/r,s/n-.5),this.updateQuad(30,.5-e/r,.5-i/n,.5,s/n-.5),this.updateQuad(36,-.5,s/n-.5,t/r-.5,-.5),this.updateQuad(42,t/r-.5,s/n-.5,.5-e/r,-.5),this.updateQuad(48,.5-e/r,s/n-.5,.5,-.5))},updateQuad:function(t,e,i,s,r){var n=this.width,a=this.height,o=this.originX,h=this.originY,l=this.vertices;l[t+0].resize(e,i,n,a,o,h),l[t+1].resize(e,r,n,a,o,h),l[t+2].resize(s,i,n,a,o,h),l[t+3].resize(e,r,n,a,o,h),l[t+4].resize(s,r,n,a,o,h),l[t+5].resize(s,i,n,a,o,h)},updateQuadUVs:function(t,e,i,s,r){var n=this.vertices,a=this.frame,o=a.u0,h=a.v0,l=a.u1,u=a.v1;if(0!==o||1!==l){var c=l-o;e=o+e*c,s=o+s*c}if(0!==h||1!==u){var d=u-h;i=h+i*d,r=h+r*d}n[t+0].setUVs(e,i),n[t+1].setUVs(e,r),n[t+2].setUVs(s,i),n[t+3].setUVs(e,r),n[t+4].setUVs(s,r),n[t+5].setUVs(s,i)},clearTint:function(){return this.setTint(16777215),this},setTint:function(t){return void 0===t&&(t=16777215),this.tint=t,this.tintFill=!1,this},setTintFill:function(t){return this.setTint(t),this.tintFill=!0,this},isTinted:{get:function(){return 16777215!==this.tint}},width:{get:function(){return this._width},set:function(t){this._width=Math.max(t,this.leftWidth+this.rightWidth),this.updateVertices()}},height:{get:function(){return this._height},set:function(t){this.is3Slice||(this._height=Math.max(t,this.topHeight+this.bottomHeight),this.updateVertices())}},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,e){this.width=t,this.height=e,this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=this.width,i.hitArea.height=this.height),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},originX:{get:function(){return this._originX},set:function(t){this._originX=t,this.updateVertices()}},originY:{get:function(){return this._originY},set:function(t){this._originY=t,this.updateVertices()}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this._originX=t,this._originY=e,this.updateVertices(),this.updateDisplayOrigin()},setSizeToFrame:function(){if(this.is3Slice){var t=this.frame.height;this._height=t,this.topHeight=t,this.bottomHeight=0}return this.updateUVs(),this},preDestroy:function(){this.vertices=[]}});t.exports=h},40964:(t,e,i)=>{var s=i(88933),r=i(99325),n=i(20494),a=i(10850),o=i(44139);r.register("nineslice",(function(t,e){void 0===t&&(t={});var i=n(t,"key",null),r=n(t,"frame",null),h=a(t,"width",256),l=a(t,"height",256),u=a(t,"leftWidth",10),c=a(t,"rightWidth",10),d=a(t,"topHeight",0),f=a(t,"bottomHeight",0),p=new o(this.scene,0,0,i,r,h,l,u,c,d,f);return void 0!==e&&(t.add=e),s(this.scene,p,t),p}))},53778:(t,e,i)=>{var s=i(44139);i(61286).register("nineslice",(function(t,e,i,r,n,a,o,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,r,n,a,o,h,l,u))}))},94456:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(27420),t.exports={renderWebGL:r,renderCanvas:n}},27420:(t,e,i)=>{var s=i(73329),r=i(75512);t.exports=function(t,e,i,n){var a=e.vertices,o=a.length;if(0!==o){i.addToRenderList(e);var h=t.pipelines.set(e.pipeline,e),l=s(e,i,n,!1).calc;t.pipelines.preBatch(e);var u=h.setGameObject(e),c=h.vertexViewF32,d=h.vertexViewU32,f=h.vertexCount*h.currentShader.vertexComponentCount-1,p=i.roundPixels,g=e.tintFill,v=i.alpha*e.alpha,m=r.getTintAppendFloatAlpha(e.tint,v),x=h.vertexAvailable(),y=-1;x<o&&(y=x);for(var T=0;T<o;T++){var w=a[T];T===y&&(h.flush(),u=h.setGameObject(e),f=0),c[++f]=l.getXRound(w.vx,w.vy,p),c[++f]=l.getYRound(w.vx,w.vy,p),c[++f]=w.u,c[++f]=w.v,c[++f]=u,c[++f]=g,d[++f]=m,h.vertexCount++,h.currentBatch.count=h.vertexCount-h.currentBatch.start}t.pipelines.postBatch(e)}}},19737:(t,e,i)=>{var s=i(56694),r=i(93025),n=i(22946),a=i(21902),o=i(4840),h=i(15978),l=new s({Extends:r,initialize:function(t){r.call(this,t,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return null===this.propertyValue?0:9},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,s=this.defaultUpdate;if(9===this.method){this.start=t[0],this.ease=a("Linear"),this.interpolation=o("linear"),i=this.easedValueEmit,s=this.easeValueUpdate,e=t[0],this.active=!0;for(var r=0;r<t.length;r++){var n=h(t[r]);this.r.push(n.r),this.g.push(n.g),this.b.push(n.b)}}return this.onEmit=i,this.onUpdate=s,this.current=e,this},setEase:function(t){this.easeName=t,this.ease=a(t)},easedValueEmit:function(){return this.current=this.start,this.start},easeValueUpdate:function(t,e,i){var s=this.ease(i),r=this.interpolation(this.r,s),a=this.interpolation(this.g,s),o=this.interpolation(this.b,s),h=n(r,a,o);return this.current=h,h}});t.exports=l},93025:(t,e,i)=>{var s=i(17489),r=i(82897),n=i(56694),a=i(61616),o=i(21902),h=i(72632),l=i(4840),u=i(88462),c=i(1071),d=new n({initialize:function(t,e,i){void 0===i&&(i=!1),this.propertyKey=t,this.propertyValue=e,this.defaultValue=e,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=i,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=h(t,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(t){var e;switch(this.method){case 1:case 3:case 8:e=t;break;case 2:this.propertyValue.indexOf(t)>=0&&(e=t);break;case 4:var i=(this.end-this.start)/this.steps;e=u(t,i),this.counter=e;break;case 5:case 6:case 7:e=r(t,this.start,this.end);break;case 9:e=this.start[0]}return this.current=e,this},getMethod:function(){var t=this.propertyValue;if(null===t)return 0;var e=typeof t;if("number"===e)return 1;if(Array.isArray(t))return 2;if("function"===e)return 3;if("object"===e){if(this.hasBoth(t,"start","end"))return this.has(t,"steps")?4:5;if(this.hasBoth(t,"min","max"))return 6;if(this.has(t,"random"))return 7;if(this.hasEither(t,"onEmit","onUpdate"))return 8;if(this.hasEither(t,"values","interpolation"))return 9}return 0},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,s=this.defaultUpdate;switch(this.method){case 1:i=this.staticValueEmit;break;case 2:i=this.randomStaticValueEmit,e=t[0];break;case 3:this._onEmit=t,i=this.proxyEmit;break;case 4:this.start=t.start,this.end=t.end,this.steps=t.steps,this.counter=this.start,this.yoyo=!!this.has(t,"yoyo")&&t.yoyo,this.direction=0,i=this.steppedEmit,e=this.start;break;case 5:this.start=t.start,this.end=t.end;var r=this.has(t,"ease")?t.ease:"Linear";this.ease=o(r,t.easeParams),i=this.has(t,"random")&&t.random?this.randomRangedValueEmit:this.easedValueEmit,s=this.easeValueUpdate,e=this.start;break;case 6:this.start=t.min,this.end=t.max,i=this.has(t,"int")&&t.int?this.randomRangedIntEmit:this.randomRangedValueEmit,e=this.start;break;case 7:var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),i=this.randomRangedIntEmit,e=this.start;break;case 8:this._onEmit=this.has(t,"onEmit")?t.onEmit:this.defaultEmit,this._onUpdate=this.has(t,"onUpdate")?t.onUpdate:this.defaultUpdate,i=this.proxyEmit,s=this.proxyUpdate;break;case 9:this.start=t.values;var a=this.has(t,"ease")?t.ease:"Linear";this.ease=o(a,t.easeParams),this.interpolation=l(t.interpolation),i=this.easedValueEmit,s=this.easeValueUpdate,e=this.start[0]}return this.onEmit=i,this.onUpdate=s,this.current=e,this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,s){return s},proxyEmit:function(t,e,i){var s=this._onEmit(t,e,i);return this.current=s,s},proxyUpdate:function(t,e,i,s){var r=this._onUpdate(t,e,i,s);return this.current=r,r},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[t],this.current},randomRangedValueEmit:function(t,e){var i=a(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i,i},randomRangedIntEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i,i},steppedEmit:function(){var t,e=this.counter,i=e,s=(this.end-this.start)/this.steps;this.yoyo?(0===this.direction?(i+=s)>=this.end&&(t=i-this.end,i=this.end-t,this.direction=1):(i-=s)<=this.start&&(t=this.start-i,i=this.start+t,this.direction=0),this.counter=i):this.counter=c(i+s,this.start,this.end);return this.current=e,e},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(t,e,i){var s,r=t.data[e],n=this.ease(i);return s=this.interpolation?this.interpolation(this.start,n):(r.max-r.min)*n+r.min,this.current=s,s},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});t.exports=d},87811:(t,e,i)=>{var s=i(56694),r=i(72632),n=i(30891),a=new s({Extends:n,initialize:function(t,e,i,s,a){if("object"==typeof t){var o=t;t=r(o,"x",0),e=r(o,"y",0),i=r(o,"power",0),s=r(o,"epsilon",100),a=r(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=100),void 0===a&&(a=50);n.call(this,t,e,!0),this._gravity=a,this._power=i*a,this._epsilon=s*s},update:function(t,e){var i=this.x-t.x,s=this.y-t.y,r=i*i+s*s;if(0!==r){var n=Math.sqrt(r);r<this._epsilon&&(r=this._epsilon);var a=this._power*e/(r*n)*100;t.velocityX+=i*a,t.velocityY+=s*a}},epsilon:{get:function(){return Math.sqrt(this._epsilon)},set:function(t){this._epsilon=t*t}},power:{get:function(){return this._power/this._gravity},set:function(t){this._power=t*this._gravity}},gravity:{get:function(){return this._gravity},set:function(t){var e=this.power;this._gravity=t,this.power=e}}});t.exports=a},14909:(t,e,i)=>{var s=i(16569),r=i(82897),n=i(56694),a=i(75606),o=i(74118),h=i(2386),l=i(93736),u=new n({initialize:function(t){this.emitter=t,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new l,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=t.scene,this.anims=new s(this),this.bounds=new o},emit:function(t,e,i,s,r,n){return this.emitter.emit(t,e,i,s,r,n)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e},fire:function(t,e){var i=this.emitter,s=i.ops,r=i.getAnim();if(r?this.anims.play(r):(this.frame=i.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(i.getEmitZone(this),void 0===t?this.x+=s.x.onEmit(this,"x"):s.x.steps>0?this.x+=t+s.x.onEmit(this,"x"):this.x+=t,void 0===e?this.y+=s.y.onEmit(this,"y"):s.y.steps>0?this.y+=e+s.y.onEmit(this,"y"):this.y+=e,this.life=s.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=s.delay.onEmit(this,"delay"),this.holdCurrent=s.hold.onEmit(this,"hold"),this.scaleX=s.scaleX.onEmit(this,"scaleX"),this.scaleY=s.scaleY.active?s.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=s.rotate.onEmit(this,"rotate"),this.rotation=a(this.angle),i.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),0===this.delayCurrent&&i.getDeathZone(this))return this.lifeCurrent=0,!1;var n=s.speedX.onEmit(this,"speedX"),o=s.speedY.active?s.speedY.onEmit(this,"speedY"):n;if(i.radial){var h=a(s.angle.onEmit(this,"angle"));this.velocityX=Math.cos(h)*Math.abs(n),this.velocityY=Math.sin(h)*Math.abs(o)}else if(i.moveTo){var l=s.moveToX.onEmit(this,"moveToX"),u=s.moveToY.onEmit(this,"moveToY"),c=this.life/1e3;this.velocityX=(l-this.x)/c,this.velocityY=(u-this.y)/c}else this.velocityX=n,this.velocityY=o;return i.acceleration&&(this.accelerationX=s.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=s.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=s.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=s.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=s.bounce.onEmit(this,"bounce"),this.alpha=s.alpha.onEmit(this,"alpha"),s.color.active?this.tint=s.color.onEmit(this,"tint"):this.tint=s.tint.onEmit(this,"tint"),!0},update:function(t,e,i){if(this.lifeCurrent<=0)return!(this.holdCurrent>0)||(this.holdCurrent-=t,this.holdCurrent<=0);if(this.delayCurrent>0)return this.delayCurrent-=t,!1;this.anims.update(0,t);var s=this.emitter,n=s.ops,o=1-this.lifeCurrent/this.life;if(this.lifeT=o,this.x=n.x.onUpdate(this,"x",o,this.x),this.y=n.y.onUpdate(this,"y",o,this.y),s.moveTo){var h=n.moveToX.onUpdate(this,"moveToX",o,s.moveToX),l=n.moveToY.onUpdate(this,"moveToY",o,s.moveToY),u=this.lifeCurrent/1e3;this.velocityX=(h-this.x)/u,this.velocityY=(l-this.y)/u}return this.computeVelocity(s,t,e,i,o),this.scaleX=n.scaleX.onUpdate(this,"scaleX",o,this.scaleX),n.scaleY.active?this.scaleY=n.scaleY.onUpdate(this,"scaleY",o,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",o,this.angle),this.rotation=a(this.angle),s.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=r(n.alpha.onUpdate(this,"alpha",o,this.alpha),0,1),n.color.active?this.tint=n.color.onUpdate(this,"color",o,this.tint):this.tint=n.tint.onUpdate(this,"tint",o,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(t,e,i,s,n){var a=t.ops,o=this.velocityX,h=this.velocityY,l=a.accelerationX.onUpdate(this,"accelerationX",n,this.accelerationX),u=a.accelerationY.onUpdate(this,"accelerationY",n,this.accelerationY),c=a.maxVelocityX.onUpdate(this,"maxVelocityX",n,this.maxVelocityX),d=a.maxVelocityY.onUpdate(this,"maxVelocityY",n,this.maxVelocityY);this.bounce=a.bounce.onUpdate(this,"bounce",n,this.bounce),o+=t.gravityX*i+l*i,h+=t.gravityY*i+u*i,o=r(o,-c,c),h=r(h,-d,d),this.velocityX=o,this.velocityY=h,this.x+=o*i,this.y+=h*i,t.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var f=0;f<s.length;f++){var p=s[f];p.active&&p.update(this,e,i,n)}},setSizeToFrame:function(){},getBounds:function(t){void 0===t&&(t=this.emitter.getWorldTransformMatrix());var e=Math.abs(t.scaleX)*this.scaleX,i=Math.abs(t.scaleY)*this.scaleY,s=this.x,r=this.y,n=this.rotation,a=this.frame.width*e/2,o=this.frame.height*i/2,u=this.bounds,c=new l(s-a,r-o),d=new l(s+a,r-o),f=new l(s-a,r+o),p=new l(s+a,r+o);return 0!==n&&(h(c,s,r,n),h(d,s,r,n),h(f,s,r,n),h(p,s,r,n)),t.transformPoint(c.x,c.y,c),t.transformPoint(d.x,d.y,d),t.transformPoint(f.x,f.y,f),t.transformPoint(p.x,p.y,p),u.x=Math.min(c.x,d.x,f.x,p.x),u.y=Math.min(c.y,d.y,f.y,p.y),u.width=Math.max(c.x,d.x,f.x,p.x)-u.x,u.height=Math.max(c.y,d.y,f.y,p.y)-u.y,u},destroy:function(){this.anims.destroy(),this.anims=null,this.emitter=null,this.texture=null,this.frame=null,this.scene=null}});t.exports=u},73106:(t,e,i)=>{var s=i(56694),r=i(30891),n=i(74118),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===a&&(a=!0),void 0===o&&(o=!0),void 0===h&&(h=!0),void 0===l&&(l=!0),r.call(this,t,e,!0),this.bounds=new n(t,e,i,s),this.collideLeft=a,this.collideRight=o,this.collideTop=h,this.collideBottom=l},update:function(t){var e=this.bounds,i=-t.bounce,s=t.worldPosition;s.x<e.x&&this.collideLeft?(t.x+=e.x-s.x,t.velocityX*=i):s.x>e.right&&this.collideRight&&(t.x-=s.x-e.right,t.velocityX*=i),s.y<e.y&&this.collideTop?(t.y+=e.y-s.y,t.velocityY*=i):s.y>e.bottom&&this.collideBottom&&(t.y-=s.y-e.bottom,t.velocityY*=i)}});t.exports=a},9216:(t,e,i)=>{var s=i(56694),r=i(64937),n=i(48129),a=i(29538),o=i(69361),h=i(54213),l=i(19737),u=i(93025),c=i(40629),d=i(89980),f=i(72632),p=i(72861),g=i(87811),v=i(53523),m=i(19256),x=i(7782),y=i(71207),T=i(14655),w=i(14909),E=i(68433),S=i(74118),b=i(90205),A=i(66458),_=i(69116),C=i(17922),R=i(69360),M=i(93736),P=i(1071),L=i(73106),O=["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"],F=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],D=new s({Extends:d,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Texture,r.Transform,r.Visible,_],initialize:function(t,e,i,s,r){d.call(this,t,"ParticleEmitter"),this.particleClass=w,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 l("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 M,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 R,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new y(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(e,i),this.setTexture(s),r&&this.setConfig(r)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(t){if(!t)return this;var e=0,i="",s=this.ops;for(e=0;e<F.length;e++)s[i=F[e]].loadConfig(t);for(e=0;e<O.length;e++)m(t,i=O[e])&&(this[i]=f(t,i));if(this.acceleration=0!==this.accelerationX||0!==this.accelerationY,this.moveTo=0!==this.moveToX&&0!==this.moveToY,m(t,"speed")&&(s.speedX.loadConfig(t,"speed"),s.speedY.active=!1),(v(t,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),m(t,"scale")&&(s.scaleX.loadConfig(t,"scale"),s.scaleY.active=!1),m(t,"callbackScope")){var r=f(t,"callbackScope",null);this.emitCallbackScope=r,this.deathCallbackScope=r}if(m(t,"emitZone")&&this.addEmitZone(t.emitZone),m(t,"deathZone")&&this.addDeathZone(t.deathZone),m(t,"bounds")){var n=this.addParticleBounds(t.bounds);n.collideLeft=f(t,"collideLeft",!0),n.collideRight=f(t,"collideRight",!0),n.collideTop=f(t,"collideTop",!0),n.collideBottom=f(t,"collideBottom",!0)}return m(t,"followOffset")&&this.followOffset.setFromObject(f(t,"followOffset",0)),m(t,"texture")&&this.setTexture(t.texture),m(t,"frame")?this.setEmitterFrame(t.frame):m(t,"anim")&&this.setAnim(t.anim),m(t,"reserve")&&this.reserve(t.reserve),m(t,"advance")&&this.fastForward(t.advance),this.resetCounters(this.frequency,this.emitting),this.emitting&&this.emit(c.START,this),this},toJSON:function(){var t=n(this),e=0,i="";for(e=0;e<O.length;e++)t[i=O[e]]=this[i];var s=this.ops;for(e=0;e<F.length;e++)s[i=F[e]]&&(t[i]=s[i].toJSON());return s.speedY.active||(delete t.speedX,t.speed=s.speedX.toJSON()),this.scaleX===this.scaleY&&(delete t.scaleX,delete t.scaleY,t.scale=s.scaleX.toJSON()),t},resetCounters:function(t,e){var i=this.counters;i.fill(0),i[0]=t,e&&(i[5]=1)},startFollow:function(t,e,i,s){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=!1),this.follow=t,this.followOffset.set(e,i),this.trackVisible=s,this},stopFollow:function(){return this.follow=null,this.followOffset.set(0,0),this.trackVisible=!1,this},getFrame:function(){var t,e=this.frames,i=e.length;return 1===i?t=e[0]:this.randomFrame?t=p(e):(t=e[this.currentFrame],this.frameCounter++,this.frameCounter===this.frameQuantity&&(this.frameCounter=0,this.currentFrame++,this.currentFrame===i&&(this.currentFrame=0))),this.texture.get(t)},setEmitterFrame:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomFrame=e,this.frameQuantity=i,this.currentFrame=0;var s=typeof t;if(this.frames.length=0,Array.isArray(t))this.frames=this.frames.concat(t);else if("string"===s||"number"===s)this.frames.push(t);else if("object"===s){var r=t;(t=f(r,"frames",null))&&(this.frames=this.frames.concat(t));var n=f(r,"cycle",!1);this.randomFrame=!n,this.frameQuantity=f(r,"quantity",i)}return 1===this.frames.length&&(this.frameQuantity=1,this.randomFrame=!1),this},getAnim:function(){var t=this.anims,e=t.length;if(0===e)return null;if(1===e)return t[0];if(this.randomAnim)return p(t);var i=t[this.currentAnim];return this.animCounter++,this.animCounter>=this.animQuantity&&(this.animCounter=0,this.currentAnim=P(this.currentAnim+1,0,e)),i},setAnim:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomAnim=e,this.animQuantity=i,this.currentAnim=0;var s=typeof t;if(this.anims.length=0,Array.isArray(t))this.anims=this.anims.concat(t);else if("string"===s)this.anims.push(t);else if("object"===s){var r=t;(t=f(r,"anims",null))&&(this.anims=this.anims.concat(t));var n=f(r,"cycle",!1);this.randomAnim=!n,this.animQuantity=f(r,"quantity",i)}return 1===this.anims.length&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(t){return void 0===t&&(t=!0),this.radial=t,this},addParticleBounds:function(t,e,i,s,r,n,a,o){if("object"==typeof t){var h=t;t=h.x,e=h.y,i=m(h,"w")?h.w:h.width,s=m(h,"h")?h.h:h.height}return this.addParticleProcessor(new L(t,e,i,s,r,n,a,o))},setParticleSpeed:function(t,e){return void 0===e&&(e=t),this.ops.speedX.onChange(t),t===e?this.ops.speedY.active=!1:this.ops.speedY.onChange(e),this.radial=!0,this},setParticleScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.ops.scaleX.onChange(t),this.ops.scaleY.onChange(e),this},setParticleGravity:function(t,e){return this.gravityX=t,this.gravityY=e,this},setParticleAlpha:function(t){return this.ops.alpha.onChange(t),this},setParticleTint:function(t){return this.ops.tint.onChange(t),this},setEmitterAngle:function(t){return this.ops.angle.onChange(t),this},setParticleLifespan:function(t){return this.ops.lifespan.onChange(t),this},setQuantity:function(t){return this.quantity=t,this},setFrequency:function(t,e){return this.frequency=t,this.flowCounter=t>0?t:0,e&&(this.quantity=e),this},addDeathZone:function(t){var e;Array.isArray(t)||(t=[t]);for(var i=[],s=0;s<t.length;s++)if((e=t[s])instanceof o)i.push(e);else if("function"==typeof e.contains)e=new o(e,!0),i.push(e);else{var r=f(e,"type","onEnter"),n=f(e,"source",null);if(n&&"function"==typeof n.contains)e=new o(n,"onEnter"===r),i.push(e)}return this.deathZones=this.deathZones.concat(i),i},removeDeathZone:function(t){return A(this.deathZones,t),this},clearDeathZones:function(){return this.deathZones.length=0,this},addEmitZone:function(t){var e;Array.isArray(t)||(t=[t]);for(var i=[],s=0;s<t.length;s++)if((e=t[s])instanceof E||e instanceof h)i.push(e);else{var r=f(e,"source",null);if(r){var n=f(e,"type","random");if("random"===n&&"function"==typeof r.getRandomPoint)e=new E(r),i.push(e);else if("edge"===n&&"function"==typeof r.getPoints){var a=f(e,"quantity",1),o=f(e,"stepRate",0),l=f(e,"yoyo",!1),u=f(e,"seamless",!0),c=f(e,"total",-1);e=new h(r,a,o,l,u,c),i.push(e)}}}return this.emitZones=this.emitZones.concat(i),i},removeEmitZone:function(t){return A(this.emitZones,t),this.zoneIndex=0,this},clearEmitZones:function(){return this.emitZones.length=0,this.zoneIndex=0,this},getEmitZone:function(t){var e=this.emitZones,i=e.length;if(0!==i){var s=e[this.zoneIndex];s.getPoint(t),s.total>-1&&(this.zoneTotal++,this.zoneTotal===s.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===i&&(this.zoneIndex=0)))}},getDeathZone:function(t){for(var e=this.deathZones,i=0;i<e.length;i++){var s=e[i];if(s.willKill(t))return this.emit(c.DEATH_ZONE,this,t,s),!0}return!1},setEmitZone:function(t){var e;return(e=isFinite(t)?t:this.emitZones.indexOf(t))>=0&&(this.zoneIndex=e),this},addParticleProcessor:function(t){return this.processors.exists(t)||(t.emitter&&t.emitter.removeParticleProcessor(t),this.processors.add(t),t.emitter=this),t},removeParticleProcessor:function(t){return this.processors.exists(t)&&(this.processors.remove(t,!0),t.emitter=null),t},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(t){return this.addParticleProcessor(new g(t))},reserve:function(t){var e=this.dead;if(this.maxParticles>0){var i=this.getParticleCount();i+t>this.maxParticles&&(t=this.maxParticles-(i+t))}for(var s=0;s<t;s++)e.push(new this.particleClass(this));return this},getAliveParticleCount:function(){return this.alive.length},getDeadParticleCount:function(){return this.dead.length},getParticleCount:function(){return this.getAliveParticleCount()+this.getDeadParticleCount()},atLimit:function(){return this.maxParticles>0&&this.getParticleCount()>=this.maxParticles||this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,s=i.length,r=0;r<s;r++)t.call(e,i[r],this);return this},forEachDead:function(t,e){for(var i=this.dead,s=i.length,r=0;r<s;r++)t.call(e,i[r],this);return this},start:function(t,e){return void 0===t&&(t=0),this.emitting||(t>0&&this.fastForward(t),this.emitting=!0,this.resetCounters(this.frequency,!0),void 0!==e&&(this.duration=Math.abs(e)),this.emit(c.START,this)),this},stop:function(t){return void 0===t&&(t=!1),this.emitting&&(this.emitting=!1,t&&this.killAll(),this.emit(c.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(t,e){return void 0===t&&(t=""),void 0===e&&(e=this.true),this.sortProperty=t,this.sortOrderAsc=e,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(t){return t=""!==this.sortProperty?this.depthSortCallback:null,this.sortCallback=t,this},depthSort:function(){return C(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(t,e){var i=this.sortProperty;return this.sortOrderAsc?t[i]-e[i]:e[i]-t[i]},flow:function(t,e,i){return void 0===e&&(e=1),this.emitting=!1,this.frequency=t,this.quantity=e,void 0!==i&&(this.stopAfter=i),this.start()},explode:function(t,e,i){this.frequency=-1,this.resetCounters(-1,!0);var s=this.emitParticle(t,e,i);return this.emit(c.EXPLODE,this,s),s},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},emitParticle:function(t,e,i){if(!this.atLimit()){void 0===t&&(t=this.ops.quantity.onEmit());for(var s=this.dead,r=this.stopAfter,n=this.follow?this.follow.x+this.followOffset.x:e,a=this.follow?this.follow.y+this.followOffset.y:i,o=0;o<t;o++){var h=s.pop();if(h||(h=new this.particleClass(this)),h.fire(n,a)?(this.particleBringToTop?this.alive.push(h):this.alive.unshift(h),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,h,this)):this.dead.push(h),r>0&&(this.stopCounter++,this.stopCounter>=r))break;if(this.atLimit())break}return h}},fastForward:function(t,e){void 0===e&&(e=1e3/60);var i=0;for(this.skipping=!0;i<Math.abs(t);)this.preUpdate(0,e),i+=e;return this.skipping=!1,this},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible),this.getWorldTransformMatrix(this.worldMatrix);var s=this.getProcessors(),r=this.alive,n=this.dead,a=0,o=[],h=r.length;for(a=0;a<h;a++){var l=r[a];l.update(e,i,s)&&o.push({index:a,particle:l})}if((h=o.length)>0){var u=this.deathCallback,d=this.deathCallbackScope;for(a=h-1;a>=0;a--){var f=o[a];r.splice(f.index,1),n.push(f.particle),u&&u.call(d,f.particle),f.particle.setPosition()}}if(this.emitting||this.skipping){if(0===this.frequency)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=e;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=e,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())}else 1===this.completeFlag&&0===r.length&&(this.completeFlag=0,this.emit(c.COMPLETE,this))},overlap:function(t){for(var e=this.getWorldTransformMatrix(),i=this.alive,s=i.length,r=[],n=0;n<s;n++){var a=i[n];b(t,a.getBounds(e))&&r.push(a)}return r},getBounds:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=1e3/60),void 0===s&&(s=new S);var r,n,o=this.getWorldTransformMatrix(),h=this.alive,l=!1;if(s.setTo(0,0,0,0),e>0){var u=0;for(this.skipping=!0;u<Math.abs(e);){for(this.preUpdate(0,i),r=0;r<h.length;r++)n=h[r].getBounds(o),l?T(s,n):(l=!0,a(n,s));u+=i}this.skipping=!1}else for(r=0;r<h.length;r++)n=h[r].getBounds(o),l?T(s,n):(l=!0,a(n,s));return t>0&&x(s,t,t),s},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(t){this.ops.x.onChange(t)}},particleY:{get:function(){return this.ops.y.current},set:function(t){this.ops.y.onChange(t)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(t){this.ops.accelerationX.onChange(t)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(t){this.ops.accelerationY.onChange(t)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(t){this.ops.maxVelocityX.onChange(t)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(t){this.ops.maxVelocityY.onChange(t)}},speed:{get:function(){return this.ops.speedX.current},set:function(t){this.ops.speedX.onChange(t),this.ops.speedY.onChange(t)}},speedX:{get:function(){return this.ops.speedX.current},set:function(t){this.ops.speedX.onChange(t)}},speedY:{get:function(){return this.ops.speedY.current},set:function(t){this.ops.speedY.onChange(t)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(t){this.ops.moveToX.onChange(t)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(t){this.ops.moveToY.onChange(t)}},bounce:{get:function(){return this.ops.bounce.current},set:function(t){this.ops.bounce.onChange(t)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(t){this.ops.scaleX.onChange(t)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(t){this.ops.scaleY.onChange(t)}},particleColor:{get:function(){return this.ops.color.current},set:function(t){this.ops.color.onChange(t)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(t){this.ops.color.setEase(t)}},particleTint:{get:function(){return this.ops.tint.current},set:function(t){this.ops.tint.onChange(t)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(t){this.ops.alpha.onChange(t)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(t){this.ops.lifespan.onChange(t)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(t){this.ops.angle.onChange(t)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(t){this.ops.rotate.onChange(t)}},quantity:{get:function(){return this.ops.quantity.current},set:function(t){this.ops.quantity.onChange(t)}},delay:{get:function(){return this.ops.delay.current},set:function(t){this.ops.delay.onChange(t)}},hold:{get:function(){return this.ops.hold.current},set:function(t){this.ops.hold.onChange(t)}},flowCounter:{get:function(){return this.counters[0]},set:function(t){this.counters[0]=t}},frameCounter:{get:function(){return this.counters[1]},set:function(t){this.counters[1]=t}},animCounter:{get:function(){return this.counters[2]},set:function(t){this.counters[2]=t}},elapsed:{get:function(){return this.counters[3]},set:function(t){this.counters[3]=t}},stopCounter:{get:function(){return this.counters[4]},set:function(t){this.counters[4]=t}},completeFlag:{get:function(){return this.counters[5]},set:function(t){this.counters[5]=t}},zoneIndex:{get:function(){return this.counters[6]},set:function(t){this.counters[6]=t}},zoneTotal:{get:function(){return this.counters[7]},set:function(t){this.counters[7]=t}},currentFrame:{get:function(){return this.counters[8]},set:function(t){this.counters[8]=t}},currentAnim:{get:function(){return this.counters[9]},set:function(t){this.counters[9]=t}},preDestroy:function(){var t;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 e=this.ops;for(t=0;t<F.length;t++){e[F[t]].destroy()}for(t=0;t<this.alive.length;t++)this.alive[t].destroy();for(t=0;t<this.dead.length;t++)this.dead[t].destroy();this.ops=null,this.alive=[],this.dead=[],this.worldMatrix.destroy()}});t.exports=D},10456:(t,e,i)=>{var s=i(90205),r=i(69360),n=new r,a=new r,o=new r,h=new r;t.exports=function(t,e,i,r){var l=n,u=a,c=o,d=h;r?(d.loadIdentity(),d.multiply(r),d.translate(e.x,e.y),d.rotate(e.rotation),d.scale(e.scaleX,e.scaleY)):d.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var f=t.currentContext,p=i.roundPixels,g=i.alpha,v=e.alpha,m=e.alive,x=m.length,y=e.viewBounds;if(e.visible&&0!==x&&(!y||s(y,i.worldView))){e.sortCallback&&e.depthSort(),i.addToRenderList(e);var T=e.scrollFactorX,w=e.scrollFactorY;f.save(),f.globalCompositeOperation=t.blendModes[e.blendMode];for(var E=0;E<x;E++){var S=m[E],b=S.alpha*v*g;if(!(b<=0||0===S.scaleX||0===S.scaleY)){c.applyITRS(S.x,S.y,S.rotation,S.scaleX,S.scaleY),l.copyFrom(i.matrix),l.multiplyWithOffset(d,-i.scrollX*T,-i.scrollY*w),c.e=S.x,c.f=S.y,l.multiply(c,u);var A=S.frame,_=A.canvasData;if(_.width>0&&_.height>0){var C=-A.halfWidth,R=-A.halfHeight;f.globalAlpha=b,f.save(),u.setToContext(f),p&&(C=Math.round(C),R=Math.round(R)),f.imageSmoothingEnabled=!A.source.scaleMode,f.drawImage(A.source.image,_.x,_.y,_.width,_.height,C,R,_.width,_.height),f.restore()}}}f.restore()}}},765:(t,e,i)=>{var s=i(88933),r=i(99325),n=i(20494),a=i(72632),o=i(9216);r.register("particles",(function(t,e){void 0===t&&(t={});var i=n(t,"key",null),r=a(t,"config",null),h=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),s(this.scene,h,t),r&&h.setConfig(r),h}))},81212:(t,e,i)=>{var s=i(61286),r=i(9216);s.register("particles",(function(t,e,i,s){return void 0!==t&&"string"==typeof t&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new r(this.scene,t,e,i,s))}))},69116:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(10275),n=i(10456),t.exports={renderWebGL:r,renderCanvas:n}},10275:(t,e,i)=>{var s=i(90205),r=i(69360),n=i(75512),a=new r,o=new r,h=new r,l=new r;t.exports=function(t,e,i,r){var u=t.pipelines.set(e.pipeline),c=a,d=o,f=h,p=l;r?(p.loadIdentity(),p.multiply(r),p.translate(e.x,e.y),p.rotate(e.rotation),p.scale(e.scaleX,e.scaleY)):p.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var g=n.getTintAppendFloatAlpha,v=i.alpha,m=e.alpha;t.pipelines.preBatch(e);var x=e.alive,y=x.length,T=e.viewBounds;if(0!==y&&(!T||s(T,i.worldView))){e.sortCallback&&e.depthSort(),i.addToRenderList(e),c.copyFrom(i.matrix),c.multiplyWithOffset(p,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),t.setBlendMode(e.blendMode),e.mask&&(e.mask.preRenderWebGL(t,e,i),t.pipelines.set(e.pipeline));for(var w,E,S=e.tintFill,b=0;b<y;b++){var A=x[b],_=A.alpha*m*v;if(!(_<=0||0===A.scaleX||0===A.scaleY)){f.applyITRS(A.x,A.y,A.rotation,A.scaleX,A.scaleY),f.e=A.x,f.f=A.y,c.multiply(f,d);var C=A.frame;C.glTexture!==E&&(E=C.glTexture,w=u.setGameObject(e,C));var R=-C.halfWidth,M=-C.halfHeight,P=d.setQuad(R,M,R+C.width,M+C.height),L=g(A.tint,_);u.shouldFlush(6)&&(u.flush(),w=u.setGameObject(e,C)),u.batchQuad(e,P[0],P[1],P[2],P[3],P[4],P[5],P[6],P[7],C.u0,C.v0,C.u1,C.v1,L,L,L,L,S,E,w)}}e.mask&&e.mask.postRenderWebGL(t,i),t.pipelines.postBatch(e)}}},30891:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=!0),this.emitter,this.x=t,this.y=e,this.active=i},update:function(){},destroy:function(){this.emitter=null}});t.exports=s},76100:t=>{t.exports="complete"},26677:t=>{t.exports="deathzone"},62736:t=>{t.exports="explode"},56490:t=>{t.exports="start"},85715:t=>{t.exports="stop"},40629:(t,e,i)=>{t.exports={COMPLETE:i(76100),DEATH_ZONE:i(26677),EXPLODE:i(62736),START:i(56490),STOP:i(85715)}},27684:(t,e,i)=>{t.exports={EmitterColorOp:i(19737),EmitterOp:i(93025),Events:i(40629),GravityWell:i(87811),Particle:i(14909),ParticleBounds:i(73106),ParticleEmitter:i(9216),ParticleProcessor:i(30891),Zones:i(25962)}},69361:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=t.worldPosition,i=this.source.contains(e.x,e.y);return i&&this.killOnEnter||!i&&!this.killOnEnter}});t.exports=s},54213:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,r,n){void 0===s&&(s=!1),void 0===r&&(r=!0),void 0===n&&(n=-1),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=s,this.counter=-1,this.seamless=r,this._length=0,this._direction=0,this.total=n,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._length<i&&this.counter>this._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=s},68433:(t,e,i)=>{var s=i(56694),r=i(93736),n=new s({initialize:function(t){this.source=t,this._tempVec=new r,this.total=-1},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=n},25962:(t,e,i)=>{t.exports={DeathZone:i(69361),EdgeZone:i(54213),RandomZone:i(68433)}},29598:(t,e,i)=>{var s=i(56694),r=i(64937),n=i(13747),a=new s({Extends:n,Mixins:[r.PathFollower],initialize:function(t,e,i,s,r,a){n.call(this,t,i,s,r,a),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=a},19626:(t,e,i)=>{var s=i(61286),r=i(29598);s.register("follower",(function(t,e,i,s,n){var a=new r(this.scene,t,e,i,s,n);return this.displayList.add(a),this.updateList.add(a),a}))},33412:(t,e,i)=>{var s=i(16569),r=i(56694),n=i(99425),a=i(15978),o=i(83321),h=i(76583),l=new r({Extends:o,initialize:function(t,e,i,r,n,a,h,l){r||(r="__DEFAULT"),o.call(this,t,e,i,r,n),this.type="Plane",this.anims=new s(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(a,h,l),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return.5}},originY:{get:function(){return.5}},setGridSize:function(t,e,i){void 0===t&&(t=8),void 0===e&&(e=8),void 0===i&&(i=!1);var s=!1;return i&&(s=!0),this.gridWidth=t,this.gridHeight=e,this.isTiled=i,this.clear(),n({mesh:this,widthSegments:t,heightSegments:e,isOrtho:!1,tile:i,flipY:s}),this},setSizeToFrame:function(t){void 0===t&&(t=!0);var e=this.frame;if(this.setPerspective(this.width/e.width,this.height/e.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!t)return this;var i,s,r=this.gridWidth,n=this.gridHeight,a=this.vertices,o=e.u0,h=e.u1,l=e.v0,u=e.v1,c=0;if(this.isTiled)for(l=e.v1,u=e.v0,s=0;s<n;s++)for(i=0;i<r;i++)a[c++].setUVs(o,u),a[c++].setUVs(o,l),a[c++].setUVs(h,u),a[c++].setUVs(o,l),a[c++].setUVs(h,l),a[c++].setUVs(h,u);else{var d=r+1,f=n+1,p=h-o,g=u-l,v=[];for(s=0;s<f;s++)for(i=0;i<d;i++){var m=o+p*(i/r),x=l+g*(s/n);v.push(m,x)}for(s=0;s<n;s++)for(i=0;i<r;i++){var y=2*(i+d*s),T=2*(i+d*(s+1)),w=2*(i+1+d*(s+1)),E=2*(i+1+d*s);a[c++].setUVs(v[y],v[y+1]),a[c++].setUVs(v[T],v[T+1]),a[c++].setUVs(v[E],v[E+1]),a[c++].setUVs(v[T],v[T+1]),a[c++].setUVs(v[w],v[w+1]),a[c++].setUVs(v[E],v[E+1])}}return this},setViewHeight:function(t){void 0===t&&(t=this.frame.height);var e=this.fov*(Math.PI/180);this.viewPosition.z=this.height/t/Math.tan(e/2),this.dirtyCache[10]=1},createCheckerboard:function(t,e,i,s,r){void 0===t&&(t=16777215),void 0===e&&(e=255),void 0===i&&(i=255),void 0===s&&(s=255),void 0===r&&(r=128);for(var n=a(t),o=a(e),l=[],u=0;u<16;u++)for(var c=0;c<16;c++)u<8&&c<8||u>7&&c>7?l.push(n.r,n.g,n.b,i):l.push(o.r,o.g,o.b,s);var d=this.scene.sys.textures.addUint8Array(h(),new Uint8Array(l),16,16);return this.removeCheckerboard(),this.setTexture(d),this.setSizeToFrame(),this.setViewHeight(r),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},preUpdate:function(t,e){o.prototype.preUpdate.call(this,t,e),this.anims.update(t,e)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});t.exports=l},10912:(t,e,i)=>{var s=i(88933),r=i(32291),n=i(99325),a=i(20494),o=i(10850),h=i(33412);n.register("plane",(function(t,e){void 0===t&&(t={});var i=a(t,"key",null),n=a(t,"frame",null),l=o(t,"width",8),u=o(t,"height",8),c=o(t,"tile",!1),d=new h(this.scene,0,0,i,n,l,u,c);void 0!==e&&(t.add=e);var f=o(t,"checkerboard",null);if(f){var p=o(f,"color1",16777215),g=o(f,"color2",255),v=o(f,"alpha1",255),m=o(f,"alpha2",255),x=o(f,"height",128);d.createCheckerboard(p,g,v,m,x)}return s(this.scene,d,t),r(d,t),d}))},58322:(t,e,i)=>{var s=i(33412);i(61286).register("plane",(function(t,e,i,r,n,a,o){return this.displayList.add(new s(this.scene,t,e,i,r,n,a,o))}))},13171:(t,e,i)=>{var s=i(56694),r=i(64937),n=i(89980),a=i(74853),o=i(65641),h=i(71606),l=new s({Extends:n,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Transform,r.Visible,h],initialize:function(t,e,i,s,r,h,l){void 0===s&&(s=16777215),void 0===r&&(r=128),void 0===h&&(h=1),void 0===l&&(l=.1),n.call(this,t,"PointLight"),this.initPipeline(o.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(e,i),this.color=a(s),this.intensity=h,this.attenuation=l,this.width=2*r,this.height=2*r,this._radius=r},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.width=2*t,this.height=2*t}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});t.exports=l},162:(t,e,i)=>{var s=i(88933),r=i(99325),n=i(20494),a=i(13171);r.register("pointlight",(function(t,e){void 0===t&&(t={});var i=n(t,"color",16777215),r=n(t,"radius",128),o=n(t,"intensity",1),h=n(t,"attenuation",.1),l=new a(this.scene,0,0,i,r,o,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},91201:(t,e,i)=>{var s=i(61286),r=i(13171);s.register("pointlight",(function(t,e,i,s,n,a){return this.displayList.add(new r(this.scene,t,e,i,s,n,a))}))},71606:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(80590),t.exports={renderWebGL:r,renderCanvas:n}},80590:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,r){i.addToRenderList(e);var n=t.pipelines.set(e.pipeline),a=s(e,i,r).calc,o=e.width,h=e.height,l=-e._radius,u=-e._radius,c=l+o,d=u+h,f=a.getX(0,0),p=a.getY(0,0),g=a.getX(l,u),v=a.getY(l,u),m=a.getX(l,d),x=a.getY(l,d),y=a.getX(c,d),T=a.getY(c,d),w=a.getX(c,u),E=a.getY(c,u);t.pipelines.preBatch(e),n.batchPointLight(e,i,g,v,m,x,y,T,w,E,f,p),t.pipelines.postBatch(e)}},15996:(t,e,i)=>{var s=i(56694),r=i(845),n=i(1539),a=new s({Extends:n,initialize:function(t,e,i,s,a){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=32),void 0===a&&(a=32);var o=new r(t.sys.textures,"",s,a);n.call(this,t,e,i,o),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(t,e){this.width=t,this.height=e,this.texture.setSize(t,e),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},resize:function(t,e){return this.setSize(t,e),this},saveTexture:function(t){var e=this.texture;return e.key=t,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(t,e,i,s,r,n){return this.texture.fill(t,e,i,s,r,n),this},clear:function(){return this.texture.clear(),this},stamp:function(t,e,i,s,r){return this.texture.stamp(t,e,i,s,r),this},erase:function(t,e,i){return this.texture.erase(t,e,i),this},draw:function(t,e,i,s,r){return this.texture.draw(t,e,i,s,r),this},drawFrame:function(t,e,i,s,r,n){return this.texture.drawFrame(t,e,i,s,r,n),this},repeat:function(t,e,i,s,r,n,a,o,h){return this.texture.repeat(t,e,i,s,r,n,a,o,h),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(t,e,i,s,r){return this.texture.batchDraw(t,e,i,s,r),this},batchDrawFrame:function(t,e,i,s,r,n){return this.texture.batchDrawFrame(t,e,i,s,r,n),this},endDraw:function(t){return this.texture.endDraw(t),this},snapshotArea:function(t,e,i,s,r,n,a){return this.texture.snapshotArea(t,e,i,s,r,n,a),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});t.exports=a},85692:(t,e,i)=>{var s=i(88933),r=i(99325),n=i(20494),a=i(15996);r.register("renderTexture",(function(t,e){void 0===t&&(t={});var i=n(t,"x",0),r=n(t,"y",0),o=n(t,"width",32),h=n(t,"height",32),l=new a(this.scene,i,r,o,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},29599:(t,e,i)=>{var s=i(61286),r=i(15996);s.register("renderTexture",(function(t,e,i,s){return this.displayList.add(new r(this.scene,t,e,i,s))}))},79968:(t,e,i)=>{var s=i(16569),r=i(56694),n=i(64937),a=i(89980),o=i(65641),h=i(58912),l=i(93736),u=new r({Extends:a,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Flip,n.Mask,n.Pipeline,n.PostPipeline,n.Size,n.Texture,n.Transform,n.Visible,n.ScrollFactor,h],initialize:function(t,e,i,r,n,h,u,c,d){void 0===r&&(r="__DEFAULT"),void 0===h&&(h=2),void 0===u&&(u=!0),a.call(this,t,"Rope"),this.anims=new s(this),this.points=h,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===r,this.dirty=!1,this.horizontal=u,this._flipX=!1,this._flipY=!1,this._perp=new l,this.debugCallback=null,this.debugGraphic=null,this.setTexture(r,n),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline(o.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(h)&&this.resizeArrays(h.length),this.setPoints(h,c,d),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){var i=this.anims.currentFrame;this.anims.update(t,e),this.anims.currentFrame!==i&&(this.updateUVs(),this.updateVertices())},play:function(t,e,i){return this.anims.play(t,e,i),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(t,e,i))},setVertical:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(t,e,i)):this},setTintFill:function(t){return void 0===t&&(t=!1),this.tintFill=t,this},setAlphas:function(t,e){var i=this.points.length;if(i<1)return this;var s,r=this.alphas;void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]);var n=0;if(void 0!==e)for(s=0;s<i;s++)r[n=2*s]=t,r[n+1]=e;else if(t.length===i)for(s=0;s<i;s++)r[n=2*s]=t[s],r[n+1]=t[s];else{var a=t[0];for(s=0;s<i;s++)n=2*s,t.length>n&&(a=t[n]),r[n]=a,t.length>n+1&&(a=t[n+1]),r[n+1]=a}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,s=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var r=0;if(t.length===e)for(i=0;i<e;i++)s[r=2*i]=t[i],s[r+1]=t[i];else{var n=t[0];for(i=0;i<e;i++)r=2*i,t.length>r&&(n=t[r]),s[r]=n,t.length>r+1&&(n=t[r+1]),s[r+1]=n}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var s,r,n,a=t;if(a<2&&(a=2),t=[],this.horizontal)for(n=-this.frame.halfWidth,r=this.frame.width/(a-1),s=0;s<a;s++)t.push({x:n+s*r,y:0});else for(n=-this.frame.halfHeight,r=this.frame.height/(a-1),s=0;s<a;s++)t.push({x:0,y:n+s*r})}var o=t.length,h=this.points.length;return o<1?(console.warn("Rope: Not enough points given"),this):(1===o&&(t.unshift({x:0,y:0}),o++),h!==o&&this.resizeArrays(o),this.dirty=!0,this.points=t,this.updateUVs(),null!=e&&this.setColors(e),null!=i&&this.setAlphas(i),this)},updateUVs:function(){for(var t=this.uv,e=this.points.length,i=this.frame.u0,s=this.frame.v0,r=this.frame.u1,n=this.frame.v1,a=(r-i)/(e-1),o=(n-s)/(e-1),h=0;h<e;h++){var l,u,c,d,f=4*h;this.horizontal?(this._flipX?(l=r-h*a,c=r-h*a):(l=i+h*a,c=i+h*a),this._flipY?(u=n,d=s):(u=s,d=n)):(this._flipX?(l=i,c=r):(l=r,c=i),this._flipY?(u=n-h*o,d=n-h*o):(u=s+h*o,d=s+h*o)),t[f+0]=l,t[f+1]=u,t[f+2]=c,t[f+3]=d}return this},resizeArrays:function(t){var e=this.colors,i=this.alphas;this.vertices=new Float32Array(4*t),this.uv=new Float32Array(4*t),e=new Uint32Array(2*t),i=new Float32Array(2*t);for(var s=0;s<2*t;s++)e[s]=16777215,i[s]=1;return this.colors=e,this.alphas=i,this.dirty=!0,this},updateVertices:function(){var t=this._perp,e=this.points,i=this.vertices,s=e.length;if(this.dirty=!1,!(s<1)){for(var r,n=e[0],a=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,o=0;o<s;o++){var h=e[o],l=4*o;r=o<s-1?e[o+1]:h,t.x=r.y-n.y,t.y=-(r.x-n.x);var u=t.length();t.x/=u,t.y/=u,t.x*=a,t.y*=a,i[l]=h.x+t.x,i[l+1]=h.y+t.y,i[l+2]=h.x-t.x,i[l+3]=h.y-t.y,n=h}return this}},setDebug:function(t,e){return this.debugGraphic=t,this.debugCallback=t||e?e||this.renderDebugVerts:null,this},renderDebugVerts:function(t,e,i){var s=t.debugGraphic,r=i[0],n=i[1],a=i[2],o=i[3];s.lineBetween(r,n,a,o);for(var h=4;h<e;h+=4){var l=i[h+0],u=i[h+1],c=i[h+2],d=i[h+3];s.lineBetween(r,n,l,u),s.lineBetween(a,o,c,d),s.lineBetween(a,o,l,u),s.lineBetween(l,u,c,d),r=l,n=u,a=c,o=d}},preDestroy:function(){this.anims.destroy(),this.anims=void 0,this.points=null,this.vertices=null,this.uv=null,this.colors=null,this.alphas=null,this.debugCallback=null,this.debugGraphic=null},flipX:{get:function(){return this._flipX},set:function(t){return this._flipX=t,this.updateUVs()}},flipY:{get:function(){return this._flipY},set:function(t){return this._flipY=t,this.updateUVs()}}});t.exports=u},44598:t=>{t.exports=function(){}},96027:(t,e,i)=>{var s=i(88933),r=i(99325),n=i(20494),a=i(10850),o=i(79968);r.register("rope",(function(t,e){void 0===t&&(t={});var i=n(t,"key",null),r=n(t,"frame",null),h=n(t,"horizontal",!0),l=a(t,"points",void 0),u=a(t,"colors",void 0),c=a(t,"alphas",void 0),d=new o(this.scene,0,0,i,r,l,h,u,c);return void 0!==e&&(t.add=e),s(this.scene,d,t),d}))},31982:(t,e,i)=>{var s=i(79968);i(61286).register("rope",(function(t,e,i,r,n,a,o,h){return this.displayList.add(new s(this.scene,t,e,i,r,n,a,o,h))}))},58912:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(49489),n=i(44598),t.exports={renderWebGL:r,renderCanvas:n}},49489:(t,e,i)=>{var s=i(73329),r=i(75512);t.exports=function(t,e,i,n){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline,e),o=s(e,i,n).calc,h=e.vertices,l=e.uv,u=e.colors,c=e.alphas,d=e.alpha,f=r.getTintAppendFloatAlpha,p=i.roundPixels,g=h.length,v=Math.floor(.5*g);a.flush(),t.pipelines.preBatch(e);var m=a.setGameObject(e),x=a.vertexViewF32,y=a.vertexViewU32,T=a.vertexCount*a.currentShader.vertexComponentCount-1,w=0,E=e.tintFill;e.dirty&&e.updateVertices();for(var S=e.debugCallback,b=[],A=0;A<g;A+=2){var _=h[A+0],C=h[A+1],R=_*o.a+C*o.c+o.e,M=_*o.b+C*o.d+o.f;p&&(R=Math.round(R),M=Math.round(M)),x[++T]=R,x[++T]=M,x[++T]=l[A+0],x[++T]=l[A+1],x[++T]=m,x[++T]=E,y[++T]=f(u[w],i.alpha*(c[w]*d)),w++,S&&(b[A+0]=R,b[A+1]=M)}S&&S.call(e,e,g,b),a.vertexCount+=v,a.currentBatch.count=a.vertexCount-a.currentBatch.start,t.pipelines.postBatch(e)}},27902:(t,e,i)=>{var s=i(56694),r=i(64937),n=i(89980),a=i(72632),o=i(98611),h=i(22440),l=i(24252),u=i(69360),c=i(36337),d=i(81044),f=new s({Extends:n,Mixins:[r.ComputedSize,r.Depth,r.GetBounds,r.Mask,r.Origin,r.ScrollFactor,r.Transform,r.Visible,l],initialize:function(t,e,i,s,r,a,o,h){void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=128),void 0===a&&(a=128),n.call(this,t,"Shader"),this.blendMode=-1,this.shader;var l=t.sys.renderer;this.renderer=l,this.gl=l.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=l.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,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=l.width,this._rendererHeight=l.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,s),this.setSize(r,a),this.setOrigin(.5,.5),this.setShader(e,o,h),this.renderer.on(d.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(t){return!!this.renderToTexture||!(n.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){if(void 0===e&&(e=!1),!this.renderToTexture){var i=this.width,s=this.height,r=this.renderer;this.glTexture=r.createTextureFromSource(null,i,s,0),this.glTexture.flipY=e,this.framebuffer=r.createFramebuffer(i,s,this.glTexture,!1),this._rendererWidth=i,this._rendererHeight=s,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture))}return this.shader&&(r.pipelines.clear(),this.load(),this.flush(),r.pipelines.rebind()),this},setShader:function(t,e,i){if(this.renderer.contextLost)return this._deferSetShader={key:t,textures:e,textureData:i},this;if(void 0===e&&(e=[]),"string"==typeof t){var s=this.scene.sys.cache.shader;if(!s.has(t))return console.warn("Shader missing: "+t),this;this.shader=s.get(t)}else this.shader=t;var r=this.gl,n=this.renderer;this.program&&n.deleteProgram(this.program);var a=n.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);r.uniformMatrix4fv(r.getUniformLocation(a.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),r.uniformMatrix4fv(r.getUniformLocation(a.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),r.uniform2f(r.getUniformLocation(a.webGLProgram,"uResolution"),this.width,this.height),this.program=a;var h=new Date,l={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:[h.getFullYear(),h.getMonth(),h.getDate(),60*h.getHours()*60+60*h.getMinutes()+h.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=o(!0,{},this.shader.uniforms,l):this.uniforms=l;for(var u=0;u<4;u++)e[u]&&this.setSampler2D("iChannel"+u,e[u],u,i);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,s){if(this.renderer.contextLost)this._deferProjOrtho={left:t,right:e,bottom:i,top:s};else{var r=1/(t-e),n=1/(i-s),a=this.projectionMatrix;a[0]=-2*r,a[5]=-2*n,a[10]=-.001,a[12]=(t+e)*r,a[13]=(s+i)*n,a[14]=-0;var o=this.program,h=this.gl;this.renderer.setProgram(o),h.uniformMatrix4fv(h.getUniformLocation(o.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i}},initUniforms:function(){var t=this.renderer.glFuncMap,e=this.program;for(var i in this._textureCount=0,this.uniforms){var s=this.uniforms[i],r=s.type,n=t[r];s.uniformLocation=this.renderer.createUniformLocation(e,i),"sampler2D"!==r&&(s.glMatrix=n.matrix,s.glValueLength=n.length,s.glFunc=n.func)}},setSampler2DBuffer:function(t,e,i,s,r,n){void 0===r&&(r=0),void 0===n&&(n={});var a=this.uniforms[t];return a.value=e,n.width=i,n.height=s,a.textureData=n,this._textureCount=r,this.initSampler2D(a),this},setSampler2D:function(t,e,i,s){void 0===i&&(i=0);var r=this.scene.sys.textures;if(r.exists(e)){var n=r.getFrame(e);if(n.glTexture&&n.glTexture.isRenderTexture)return this.setSampler2DBuffer(t,n.glTexture,n.width,n.height,i,s);var a=this.uniforms[t],o=n.source;a.textureKey=e,a.source=o.image,a.value=n.glTexture,o.isGLTexture&&(s||(s={}),s.width=o.width,s.height=o.height),s&&(a.textureData=s),this._textureCount=i,this.initSampler2D(a)}return this},setUniform:function(t,e){return h(this.uniforms,t,e),this},getUniform:function(t){return a(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){if(t.value){var e=this.gl;e.activeTexture(e.TEXTURE0+this._textureCount),e.bindTexture(e.TEXTURE_2D,t.value.webGLTexture);var i=t.textureData;if(i&&!t.value.isRenderTexture){var s=t.value,r=e[a(i,"magFilter","linear").toUpperCase()],n=e[a(i,"minFilter","linear").toUpperCase()],o=e[a(i,"wrapS","repeat").toUpperCase()],h=e[a(i,"wrapT","repeat").toUpperCase()],l=e[a(i,"format","rgba").toUpperCase()];if(i.repeat&&(o=e.REPEAT,h=e.REPEAT),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!i.flipY),i.width){var u=a(i,"width",512),c=a(i,"height",2),d=a(i,"border",0);e.texImage2D(e.TEXTURE_2D,0,l,u,c,d,l,e.UNSIGNED_BYTE,null),s.width=u,s.height=c}else e.texImage2D(e.TEXTURE_2D,0,l,e.RGBA,e.UNSIGNED_BYTE,t.source);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,h),s.magFilter=r,s.minFilter=n,s.wrapS=o,s.wrapT=h,s.format=l,s.flipY=!!i.flipY,s.pixels=t.source}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var t,e,i,s,r,n=this.gl,a=this.uniforms,o=0;for(var h in a)i=(t=a[h]).glFunc,e=t.glValueLength,s=t.uniformLocation,null!==(r=t.value)&&(1===e?t.glMatrix?i.call(n,s.webGLUniformLocation,t.transpose,r):i.call(n,s.webGLUniformLocation,r):2===e?i.call(n,s.webGLUniformLocation,r.x,r.y):3===e?i.call(n,s.webGLUniformLocation,r.x,r.y,r.z):4===e?i.call(n,s.webGLUniformLocation,r.x,r.y,r.z,r.w):"sampler2D"===t.type&&(n.activeTexture(n.TEXTURE0+o),n.bindTexture(n.TEXTURE_2D,r.webGLTexture),n.uniform1i(s.webGLUniformLocation,o),o++))},load:function(t){var e=this.gl,i=this.width,s=this.height,r=this.renderer,n=this.program,a=this.viewMatrix;if(!this.renderToTexture){var o=-this._displayOriginX,h=-this._displayOriginY;a[0]=t[0],a[1]=t[1],a[4]=t[2],a[5]=t[3],a[8]=t[4],a[9]=t[5],a[12]=a[0]*o+a[4]*h,a[13]=a[1]*o+a[5]*h}e.useProgram(n.webGLProgram),e.uniformMatrix4fv(e.getUniformLocation(n.webGLProgram,"uViewMatrix"),!1,a),e.uniformMatrix4fv(e.getUniformLocation(n.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),e.uniform2f(e.getUniformLocation(n.webGLProgram,"uResolution"),this.width,this.height);var l=this.uniforms,u=l.resolution;u.value.x=i,u.value.y=s,l.time.value=r.game.loop.getDuration();var c=this.pointer;if(c){var d=l.mouse,f=c.x/i,p=1-c.y/s;d.value.x=f.toFixed(2),d.value.y=p.toFixed(2)}this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,s=this.gl,r=this.vertexBuffer,n=this.renderer,a=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(n.setFramebuffer(this.framebuffer),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)),s.bindBuffer(s.ARRAY_BUFFER,r.webGLBuffer);var o=s.getAttribLocation(i.webGLProgram,"inPosition");-1!==o&&(s.enableVertexAttribArray(o),s.vertexAttribPointer(o,2,s.FLOAT,!1,a,0));var h=this.vertexViewF32;h[3]=e,h[4]=t,h[5]=e,h[8]=t,h[9]=e,h[10]=t;s.bufferSubData(s.ARRAY_BUFFER,0,this.bytes.subarray(0,6*a)),s.drawArrays(s.TRIANGLES,0,6),this.renderToTexture&&n.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(null!==this._deferSetShader){var t=this._deferSetShader.key,e=this._deferSetShader.textures,i=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(t,e,i)}if(null!==this._deferProjOrtho){var s=this._deferProjOrtho.left,r=this._deferProjOrtho.right,n=this._deferProjOrtho.bottom,a=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(s,r,n,a)}},preDestroy:function(){var t=this.renderer;t.off(d.RESTORE_WEBGL,this.onContextRestored,this),t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(t.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),c(this.uniforms,(function(e){t.deleteUniformLocation(e.uniformLocation),e.uniformLocation=null}))}});t.exports=f},10612:t=>{t.exports=function(){}},13908:(t,e,i)=>{var s=i(88933),r=i(99325),n=i(20494),a=i(27902);r.register("shader",(function(t,e){void 0===t&&(t={});var i=n(t,"key",null),r=n(t,"x",0),o=n(t,"y",0),h=n(t,"width",128),l=n(t,"height",128),u=new a(this.scene,i,r,o,h,l);return void 0!==e&&(t.add=e),s(this.scene,u,t),u}))},51979:(t,e,i)=>{var s=i(27902);i(61286).register("shader",(function(t,e,i,r,n,a,o){return this.displayList.add(new s(this.scene,t,e,i,r,n,a,o))}))},24252:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(19782),n=i(10612),t.exports={renderWebGL:r,renderCanvas:n}},19782:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,r){if(e.shader){if(i.addToRenderList(e),t.pipelines.clear(),e.renderToTexture)e.load(),e.flush();else{var n=s(e,i,r).calc;t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(n.matrix),e.flush()}t.pipelines.rebind()}}},19543:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,r,n,a){for(var o=s.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*r),h=i.pathData,l=i.pathIndexes,u=0;u<l.length;u+=3){var c=2*l[u],d=2*l[u+1],f=2*l[u+2],p=h[c+0]-n,g=h[c+1]-a,v=h[d+0]-n,m=h[d+1]-a,x=h[f+0]-n,y=h[f+1]-a,T=e.getX(p,g),w=e.getY(p,g),E=e.getX(v,m),S=e.getY(v,m),b=e.getX(x,y),A=e.getY(x,y);t.batchTri(i,T,w,E,S,b,A,0,0,1,1,o,o,o,2)}}},15608:t=>{t.exports=function(t,e,i,s){var r=i||e.fillColor,n=s||e.fillAlpha,a=(16711680&r)>>>16,o=(65280&r)>>>8,h=255&r;t.fillStyle="rgba("+a+","+o+","+h+","+n+")"}},17876:t=>{t.exports=function(t,e,i,s){var r=i||e.strokeColor,n=s||e.strokeAlpha,a=(16711680&r)>>>16,o=(65280&r)>>>8,h=255&r;t.strokeStyle="rgba("+a+","+o+","+h+","+n+")",t.lineWidth=e.lineWidth}},91461:(t,e,i)=>{var s=i(56694),r=i(64937),n=i(89980),a=i(88829),o=new s({Extends:n,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Transform,r.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),n.call(this,t,e),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 a,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},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}}});t.exports=o},50262:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,r,n){var a=t.strokeTint,o=s.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i);a.TL=o,a.TR=o,a.BL=o,a.BR=o;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-r,f=h[1]-n;e.closePath||(l-=2);for(var p=2;p<l;p+=2){var g=h[p]-r,v=h[p+1]-n;t.batchLine(d,f,g,v,c,c,u,p-2,!!e.closePath&&p===l-1),d=g,f=v}}},28593:(t,e,i)=>{var s=i(2213),r=i(56694),n=i(75606),a=i(11117),o=i(26673),h=i(83392),l=i(91461),u=new r({Extends:l,Mixins:[s],initialize:function(t,e,i,s,r,n,a,h,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===r&&(r=0),void 0===n&&(n=360),void 0===a&&(a=!1),l.call(this,t,"Arc",new o(0,0,s)),this._startAngle=r,this._endAngle=n,this._anticlockwise=a,this._iterations=.01,this.setPosition(e,i);var c=2*this.geom.radius;this.setSize(c,c),void 0!==h&&this.setFillStyle(h,u),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){this.geom.radius=t;var e=2*t;this.setSize(e,e),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return void 0===t&&(t=.01),this.iterations=t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},updateData:function(){var t=this._iterations,e=t,i=this.geom.radius,s=n(this._startAngle),r=n(this._endAngle),o=i,l=i;r-=s,this._anticlockwise?r<-h.PI2?r=-h.PI2:r>0&&(r=-h.PI2+r%h.PI2):r>h.PI2?r=h.PI2:r<0&&(r=h.PI2+r%h.PI2);for(var u,c=[o+Math.cos(s)*i,l+Math.sin(s)*i];e<1;)u=r*e+s,c.push(o+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=r+s,c.push(o+Math.cos(u)*i,l+Math.sin(u)*i),c.push(o+Math.cos(s)*i,l+Math.sin(s)*i),this.pathIndexes=a(c),this.pathData=c,this}});t.exports=u},23560:(t,e,i)=>{var s=i(75606),r=i(15608),n=i(17876),a=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var h=t.currentContext;if(a(t,h,e,i,o)){var l=e.radius;h.beginPath(),h.arc(l-e.originX*(2*l),l-e.originY*(2*l),l,s(e._startAngle),s(e._endAngle),e.anticlockwise),e.closePath&&h.closePath(),e.isFilled&&(r(h,e),h.fill()),e.isStroked&&(n(h,e),h.stroke()),h.restore()}}},10369:(t,e,i)=>{var s=i(28593),r=i(61286);r.register("arc",(function(t,e,i,r,n,a,o,h){return this.displayList.add(new s(this.scene,t,e,i,r,n,a,o,h))})),r.register("circle",(function(t,e,i,r,n){return this.displayList.add(new s(this.scene,t,e,i,0,360,!1,r,n))}))},2213:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(58356),n=i(23560),t.exports={renderWebGL:r,renderCanvas:n}},58356:(t,e,i)=>{var s=i(73329),r=i(19543),n=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=s(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&r(o,l,e,d,u,c),e.isStroked&&n(o,e,d,u,c),t.pipelines.postBatch(e)}},15220:(t,e,i)=>{var s=i(56694),r=i(87203),n=i(11117),a=i(74118),o=i(91461),h=new s({Extends:o,Mixins:[r],initialize:function(t,e,i,s,r,n){void 0===e&&(e=0),void 0===i&&(i=0),o.call(this,t,"Curve",s),this._smoothness=32,this._curveBounds=new a,this.closePath=!1,this.setPosition(e,i),void 0!==r&&this.setFillStyle(r,n),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],s=this.geom.getPoints(e),r=0;r<s.length;r++)i.push(s[r].x,s[r].y);return i.push(s[0].x,s[0].y),this.pathIndexes=n(i),this.pathData=i,this}});t.exports=h},4024:(t,e,i)=>{var s=i(15608),r=i(17876),n=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,a)){var h=e._displayOriginX+e._curveBounds.x,l=e._displayOriginY+e._curveBounds.y,u=e.pathData,c=u.length-1,d=u[0]-h,f=u[1]-l;o.beginPath(),o.moveTo(d,f),e.closePath||(c-=2);for(var p=2;p<c;p+=2){var g=u[p]-h,v=u[p+1]-l;o.lineTo(g,v)}e.closePath&&o.closePath(),e.isFilled&&(s(o,e),o.fill()),e.isStroked&&(r(o,e),o.stroke()),o.restore()}}},10147:(t,e,i)=>{var s=i(61286),r=i(15220);s.register("curve",(function(t,e,i,s,n){return this.displayList.add(new r(this.scene,t,e,i,s,n))}))},87203:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(82958),n=i(4024),t.exports={renderWebGL:r,renderCanvas:n}},82958:(t,e,i)=>{var s=i(19543),r=i(73329),n=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=r(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX+e._curveBounds.x,c=e._displayOriginY+e._curveBounds.y,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(o,l,e,d,u,c),e.isStroked&&n(o,e,d,u,c),t.pipelines.postBatch(e)}},28591:(t,e,i)=>{var s=i(56694),r=i(11117),n=i(84171),a=i(95669),o=i(91461),h=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,s,r,n,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===r&&(r=128),o.call(this,t,"Ellipse",new a(s/2,r/2,s,r)),this._smoothness=64,this.setPosition(e,i),this.width=s,this.height=r,void 0!==n&&this.setFillStyle(n,h),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setPosition(t/2,e/2),this.geom.setSize(t,e),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i<e.length;i++)t.push(e[i].x,e[i].y);return t.push(e[0].x,e[0].y),this.pathIndexes=r(t),this.pathData=t,this}});t.exports=h},55881:(t,e,i)=>{var s=i(15608),r=i(17876),n=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,f=u[1]-l;o.beginPath(),o.moveTo(d,f),e.closePath||(c-=2);for(var p=2;p<c;p+=2){var g=u[p]-h,v=u[p+1]-l;o.lineTo(g,v)}o.closePath(),e.isFilled&&(s(o,e),o.fill()),e.isStroked&&(r(o,e),o.stroke()),o.restore()}}},99869:(t,e,i)=>{var s=i(28591);i(61286).register("ellipse",(function(t,e,i,r,n,a){return this.displayList.add(new s(this.scene,t,e,i,r,n,a))}))},84171:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(17554),n=i(55881),t.exports={renderWebGL:r,renderCanvas:n}},17554:(t,e,i)=>{var s=i(19543),r=i(73329),n=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=r(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(o,l,e,d,u,c),e.isStroked&&n(o,e,d,u,c),t.pipelines.postBatch(e)}},39169:(t,e,i)=>{var s=i(56694),r=i(91461),n=i(88059),a=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n,a,o,h,l,u,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=128),void 0===a&&(a=32),void 0===o&&(o=32),r.call(this,t,"Grid",null),this.cellWidth=a,this.cellHeight=o,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(s,n),this.setFillStyle(h,l),void 0!==u&&this.setOutlineStyle(u,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=a},95525:(t,e,i)=>{var s=i(15608),r=i(17876),n=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,a)){var h=-e._displayOriginX,l=-e._displayOriginY,u=i.alpha*e.alpha,c=e.width,d=e.height,f=e.cellWidth,p=e.cellHeight,g=Math.ceil(c/f),v=Math.ceil(d/p),m=f,x=p,y=f-(g*f-c),T=p-(v*p-d),w=e.showCells,E=e.showAltCells,S=e.showOutline,b=0,A=0,_=0,C=0,R=0;if(S&&(m--,x--,y===f&&y--,T===p&&T--),w&&e.fillAlpha>0)for(s(o,e),A=0;A<v;A++)for(E&&(_=A%2),b=0;b<g;b++)E&&_?_=0:(_++,C=b<g-1?m:y,R=A<v-1?x:T,o.fillRect(h+b*f,l+A*p,C,R));if(E&&e.altFillAlpha>0)for(s(o,e,e.altFillColor,e.altFillAlpha*u),A=0;A<v;A++)for(E&&(_=A%2),b=0;b<g;b++)!E||_?(_=0,C=b<g-1?m:y,R=A<v-1?x:T,o.fillRect(h+b*f,l+A*p,C,R)):_=1;if(S&&e.outlineFillAlpha>0){for(r(o,e,e.outlineFillColor,e.outlineFillAlpha*u),b=1;b<g;b++){var M=b*f;o.beginPath(),o.moveTo(M+h,l),o.lineTo(M+h,d+l),o.stroke()}for(A=1;A<v;A++){var P=A*p;o.beginPath(),o.moveTo(h,P+l),o.lineTo(h+c,P+l),o.stroke()}}o.restore()}}},9326:(t,e,i)=>{var s=i(61286),r=i(39169);s.register("grid",(function(t,e,i,s,n,a,o,h,l,u){return this.displayList.add(new r(this.scene,t,e,i,s,n,a,o,h,l,u))}))},88059:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(50639),n=i(95525),t.exports={renderWebGL:r,renderCanvas:n}},50639:(t,e,i)=>{var s=i(73329),r=i(75512);t.exports=function(t,e,i,n){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),o=s(e,i,n);a.calcMatrix.copyFrom(o.calc).translate(-e._displayOriginX,-e._displayOriginY);var h,l,u=i.alpha*e.alpha,c=e.width,d=e.height,f=e.cellWidth,p=e.cellHeight,g=Math.ceil(c/f),v=Math.ceil(d/p),m=f,x=p,y=f-(g*f-c),T=p-(v*p-d),w=e.showCells,E=e.showAltCells,S=e.showOutline,b=0,A=0,_=0,C=0,R=0;if(S&&(m--,x--,y===f&&y--,T===p&&T--),t.pipelines.preBatch(e),w&&e.fillAlpha>0)for(h=a.fillTint,l=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A<v;A++)for(E&&(_=A%2),b=0;b<g;b++)E&&_?_=0:(_++,C=b<g-1?m:y,R=A<v-1?x:T,a.batchFillRect(b*f,A*p,C,R));if(E&&e.altFillAlpha>0)for(h=a.fillTint,l=r.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A<v;A++)for(E&&(_=A%2),b=0;b<g;b++)!E||_?(_=0,C=b<g-1?m:y,R=A<v-1?x:T,a.batchFillRect(b*f,A*p,C,R)):_=1;if(S&&e.outlineFillAlpha>0){var M=a.strokeTint,P=r.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*u);for(M.TL=P,M.TR=P,M.BL=P,M.BR=P,b=1;b<g;b++){var L=b*f;a.batchLine(L,0,L,d,1,1,1,0,!1)}for(A=1;A<v;A++){var O=A*p;a.batchLine(0,O,c,O,1,1,1,0,!1)}}t.pipelines.postBatch(e)}},4415:(t,e,i)=>{var s=i(72296),r=i(56694),n=i(91461),a=new r({Extends:n,Mixins:[s],initialize:function(t,e,i,s,r,a,o,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===r&&(r=32),void 0===a&&(a=15658734),void 0===o&&(o=10066329),void 0===h&&(h=13421772),n.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=a,this.fillLeft=o,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,r),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=a},32884:(t,e,i)=>{var s=i(15608),r=i(49584);t.exports=function(t,e,i,n){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,n)&&e.isFilled){var o=e.width,h=e.height,l=o/2,u=o/e.projection;e.showTop&&(s(a,e,e.fillTop),a.beginPath(),a.moveTo(-l,-h),a.lineTo(0,-u-h),a.lineTo(l,-h),a.lineTo(l,-1),a.lineTo(0,u-1),a.lineTo(-l,-1),a.lineTo(-l,-h),a.fill()),e.showLeft&&(s(a,e,e.fillLeft),a.beginPath(),a.moveTo(-l,0),a.lineTo(0,u),a.lineTo(0,u-h),a.lineTo(-l,-h),a.lineTo(-l,0),a.fill()),e.showRight&&(s(a,e,e.fillRight),a.beginPath(),a.moveTo(l,0),a.lineTo(0,u),a.lineTo(0,u-h),a.lineTo(l,-h),a.lineTo(l,0),a.fill()),a.restore()}}},88154:(t,e,i)=>{var s=i(61286),r=i(4415);s.register("isobox",(function(t,e,i,s,n,a,o){return this.displayList.add(new r(this.scene,t,e,i,s,n,a,o))}))},72296:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(33101),n=i(32884),t.exports={renderWebGL:r,renderCanvas:n}},33101:(t,e,i)=>{var s=i(73329),r=i(75512);t.exports=function(t,e,i,n){i.addToRenderList(e);var a,o,h,l,u,c,d,f,p,g=t.pipelines.set(e.pipeline),v=s(e,i,n),m=g.calcMatrix.copyFrom(v.calc),x=e.width,y=e.height,T=x/2,w=x/e.projection,E=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&(a=r.getTintAppendFloatAlpha(e.fillTop,E),o=m.getX(-T,-y),h=m.getY(-T,-y),l=m.getX(0,-w-y),u=m.getY(0,-w-y),c=m.getX(T,-y),d=m.getY(T,-y),f=m.getX(0,w-y),p=m.getY(0,w-y),g.batchQuad(e,o,h,l,u,c,d,f,p,0,0,1,1,a,a,a,a,2)),e.showLeft&&(a=r.getTintAppendFloatAlpha(e.fillLeft,E),o=m.getX(-T,0),h=m.getY(-T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-y),d=m.getY(0,w-y),f=m.getX(-T,-y),p=m.getY(-T,-y),g.batchQuad(e,o,h,l,u,c,d,f,p,0,0,1,1,a,a,a,a,2)),e.showRight&&(a=r.getTintAppendFloatAlpha(e.fillRight,E),o=m.getX(T,0),h=m.getY(T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-y),d=m.getY(0,w-y),f=m.getX(T,-y),p=m.getY(T,-y),g.batchQuad(e,o,h,l,u,c,d,f,p,0,0,1,1,a,a,a,a,2)),t.pipelines.postBatch(e))}},65159:(t,e,i)=>{var s=i(56694),r=i(93387),n=i(91461),a=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,a,o,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===r&&(r=32),void 0===a&&(a=!1),void 0===o&&(o=15658734),void 0===h&&(h=10066329),void 0===l&&(l=13421772),n.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=o,this.fillLeft=h,this.fillRight=l,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=a,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,r),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=a},9923:(t,e,i)=>{var s=i(15608),r=i(49584);t.exports=function(t,e,i,n){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,n)&&e.isFilled){var o=e.width,h=e.height,l=o/2,u=o/e.projection,c=e.isReversed;e.showTop&&c&&(s(a,e,e.fillTop),a.beginPath(),a.moveTo(-l,-h),a.lineTo(0,-u-h),a.lineTo(l,-h),a.lineTo(0,u-h),a.fill()),e.showLeft&&(s(a,e,e.fillLeft),a.beginPath(),c?(a.moveTo(-l,-h),a.lineTo(0,u),a.lineTo(0,u-h)):(a.moveTo(-l,0),a.lineTo(0,u),a.lineTo(0,u-h)),a.fill()),e.showRight&&(s(a,e,e.fillRight),a.beginPath(),c?(a.moveTo(l,-h),a.lineTo(0,u),a.lineTo(0,u-h)):(a.moveTo(l,0),a.lineTo(0,u),a.lineTo(0,u-h)),a.fill()),a.restore()}}},67765:(t,e,i)=>{var s=i(61286),r=i(65159);s.register("isotriangle",(function(t,e,i,s,n,a,o,h){return this.displayList.add(new r(this.scene,t,e,i,s,n,a,o,h))}))},93387:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(54946),n=i(9923),t.exports={renderWebGL:r,renderCanvas:n}},54946:(t,e,i)=>{var s=i(73329),r=i(75512);t.exports=function(t,e,i,n){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),o=s(e,i,n),h=a.calcMatrix.copyFrom(o.calc),l=e.width,u=e.height,c=l/2,d=l/e.projection,f=e.isReversed,p=i.alpha*e.alpha;if(e.isFilled){var g,v,m,x,y,T,w;if(t.pipelines.preBatch(e),e.showTop&&f){g=r.getTintAppendFloatAlpha(e.fillTop,p),v=h.getX(-c,-u),m=h.getY(-c,-u),x=h.getX(0,-d-u),y=h.getY(0,-d-u),T=h.getX(c,-u),w=h.getY(c,-u);var E=h.getX(0,d-u),S=h.getY(0,d-u);a.batchQuad(e,v,m,x,y,T,w,E,S,0,0,1,1,g,g,g,g,2)}e.showLeft&&(g=r.getTintAppendFloatAlpha(e.fillLeft,p),f?(v=h.getX(-c,-u),m=h.getY(-c,-u),x=h.getX(0,d),y=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(v=h.getX(-c,0),m=h.getY(-c,0),x=h.getX(0,d),y=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),a.batchTri(e,v,m,x,y,T,w,0,0,1,1,g,g,g,2)),e.showRight&&(g=r.getTintAppendFloatAlpha(e.fillRight,p),f?(v=h.getX(c,-u),m=h.getY(c,-u),x=h.getX(0,d),y=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(v=h.getX(c,0),m=h.getY(c,0),x=h.getX(0,d),y=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),a.batchTri(e,v,m,x,y,T,w,0,0,1,1,g,g,g,2)),t.pipelines.postBatch(e)}}},579:(t,e,i)=>{var s=i(56694),r=i(91461),n=i(88829),a=i(52660),o=new s({Extends:r,Mixins:[a],initialize:function(t,e,i,s,a,o,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===o&&(o=128),void 0===h&&(h=0),r.call(this,t,"Line",new n(s,a,o,h));var c=Math.max(1,this.geom.right-this.geom.left),d=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(c,d),void 0!==l&&this.setStrokeStyle(1,l,u),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,s){return this.geom.setTo(t,e,i,s),this}});t.exports=o},52044:(t,e,i)=>{var s=i(17876),r=i(49584);t.exports=function(t,e,i,n){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,n)){var o=e._displayOriginX,h=e._displayOriginY;e.isStroked&&(s(a,e),a.beginPath(),a.moveTo(e.geom.x1-o,e.geom.y1-h),a.lineTo(e.geom.x2-o,e.geom.y2-h),a.stroke()),a.restore()}}},85665:(t,e,i)=>{var s=i(61286),r=i(579);s.register("line",(function(t,e,i,s,n,a,o,h){return this.displayList.add(new r(this.scene,t,e,i,s,n,a,o,h))}))},52660:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(46952),n=i(52044),t.exports={renderWebGL:r,renderCanvas:n}},46952:(t,e,i)=>{var s=i(73329),r=i(75512);t.exports=function(t,e,i,n){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),o=s(e,i,n);a.calcMatrix.copyFrom(o.calc);var h=e._displayOriginX,l=e._displayOriginY,u=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isStroked){var c=a.strokeTint,d=r.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*u);c.TL=d,c.TR=d,c.BL=d,c.BR=d,a.batchLine(e.geom.x1-h,e.geom.y1-l,e.geom.x2-h,e.geom.y2-l,e._startWidth/2,e._endWidth/2,1,0,!1,o.sprite,o.camera)}t.pipelines.postBatch(e)}},91249:(t,e,i)=>{var s=i(70573),r=i(56694),n=i(11117),a=i(14045),o=i(8580),h=i(91461),l=i(18974),u=new r({Extends:h,Mixins:[s],initialize:function(t,e,i,s,r,n){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new o(s));var l=a(this.geom);this.setPosition(e,i),this.setSize(l.width,l.height),void 0!==r&&this.setFillStyle(r,n),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e<t;e++)l(this.geom);return this.updateData()},setTo:function(t){this.geom.setTo(t);var e=a(this.geom);return this.setSize(e.width,e.height),this.updateDisplayOrigin(),this.updateData()},updateData:function(){for(var t=[],e=this.geom.points,i=0;i<e.length;i++)t.push(e[i].x,e[i].y);return t.push(e[0].x,e[0].y),this.pathIndexes=n(t),this.pathData=t,this}});t.exports=u},40834:(t,e,i)=>{var s=i(15608),r=i(17876),n=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,f=u[1]-l;o.beginPath(),o.moveTo(d,f),e.closePath||(c-=2);for(var p=2;p<c;p+=2){var g=u[p]-h,v=u[p+1]-l;o.lineTo(g,v)}e.closePath&&o.closePath(),e.isFilled&&(s(o,e),o.fill()),e.isStroked&&(r(o,e),o.stroke()),o.restore()}}},88203:(t,e,i)=>{var s=i(61286),r=i(91249);s.register("polygon",(function(t,e,i,s,n){return this.displayList.add(new r(this.scene,t,e,i,s,n))}))},70573:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(72841),n=i(40834),t.exports={renderWebGL:r,renderCanvas:n}},72841:(t,e,i)=>{var s=i(19543),r=i(73329),n=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=r(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(o,l,e,d,u,c),e.isStroked&&n(o,e,d,u,c),t.pipelines.postBatch(e)}},517:(t,e,i)=>{var s=i(56694),r=i(74118),n=i(91461),a=i(37673),o=new s({Extends:n,Mixins:[a],initialize:function(t,e,i,s,a,o,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===a&&(a=128),n.call(this,t,"Rectangle",new r(0,0,s,a)),this.setPosition(e,i),this.setSize(s,a),void 0!==o&&this.setFillStyle(o,h),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=o},4091:(t,e,i)=>{var s=i(15608),r=i(17876),n=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY;e.isFilled&&(s(o,e),o.fillRect(-h,-l,e.width,e.height)),e.isStroked&&(r(o,e),o.beginPath(),o.rect(-h,-l,e.width,e.height),o.stroke()),o.restore()}}},94355:(t,e,i)=>{var s=i(61286),r=i(517);s.register("rectangle",(function(t,e,i,s,n,a){return this.displayList.add(new r(this.scene,t,e,i,s,n,a))}))},37673:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(43532),n=i(4091),t.exports={renderWebGL:r,renderCanvas:n}},43532:(t,e,i)=>{var s=i(73329),r=i(50262),n=i(75512);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=s(e,i,a);o.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=o.fillTint,f=n.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=f,d.TR=f,d.BL=f,d.BR=f,o.batchFillRect(-l,-u,e.width,e.height)}e.isStroked&&r(o,e,c,l,u),t.pipelines.postBatch(e)}},77843:(t,e,i)=>{var s=i(87956),r=i(56694),n=i(11117),a=i(91461),o=new r({Extends:a,Mixins:[s],initialize:function(t,e,i,s,r,n,o,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=5),void 0===r&&(r=32),void 0===n&&(n=64),a.call(this,t,"Star",null),this._points=s,this._innerRadius=r,this._outerRadius=n,this.setPosition(e,i),this.setSize(2*n,2*n),void 0!==o&&this.setFillStyle(o,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,s=this._outerRadius,r=Math.PI/2*3,a=Math.PI/e,o=s,h=s;t.push(o,h+-s);for(var l=0;l<e;l++)t.push(o+Math.cos(r)*s,h+Math.sin(r)*s),r+=a,t.push(o+Math.cos(r)*i,h+Math.sin(r)*i),r+=a;return t.push(o,h+-s),this.pathIndexes=n(t),this.pathData=t,this}});t.exports=o},11401:(t,e,i)=>{var s=i(15608),r=i(17876),n=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,f=u[1]-l;o.beginPath(),o.moveTo(d,f),e.closePath||(c-=2);for(var p=2;p<c;p+=2){var g=u[p]-h,v=u[p+1]-l;o.lineTo(g,v)}o.closePath(),e.isFilled&&(s(o,e),o.fill()),e.isStroked&&(r(o,e),o.stroke()),o.restore()}}},23962:(t,e,i)=>{var s=i(77843);i(61286).register("star",(function(t,e,i,r,n,a,o){return this.displayList.add(new s(this.scene,t,e,i,r,n,a,o))}))},87956:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(12037),n=i(11401),t.exports={renderWebGL:r,renderCanvas:n}},12037:(t,e,i)=>{var s=i(19543),r=i(73329),n=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=r(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(o,l,e,d,u,c),e.isStroked&&n(o,e,d,u,c),t.pipelines.postBatch(e)}},21873:(t,e,i)=>{var s=i(56694),r=i(91461),n=i(66349),a=i(70498),o=new s({Extends:r,Mixins:[a],initialize:function(t,e,i,s,a,o,h,l,u,c,d){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=128),void 0===o&&(o=64),void 0===h&&(h=0),void 0===l&&(l=128),void 0===u&&(u=128),r.call(this,t,"Triangle",new n(s,a,o,h,l,u));var f=this.geom.right-this.geom.left,p=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(f,p),void 0!==c&&this.setFillStyle(c,d),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,s,r,n){return this.geom.setTo(t,e,i,s,r,n),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=o},60213:(t,e,i)=>{var s=i(15608),r=i(17876),n=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY,u=e.geom.x1-h,c=e.geom.y1-l,d=e.geom.x2-h,f=e.geom.y2-l,p=e.geom.x3-h,g=e.geom.y3-l;o.beginPath(),o.moveTo(u,c),o.lineTo(d,f),o.lineTo(p,g),o.closePath(),e.isFilled&&(s(o,e),o.fill()),e.isStroked&&(r(o,e),o.stroke()),o.restore()}}},79296:(t,e,i)=>{var s=i(61286),r=i(21873);s.register("triangle",(function(t,e,i,s,n,a,o,h,l,u){return this.displayList.add(new r(this.scene,t,e,i,s,n,a,o,h,l,u))}))},70498:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(72291),n=i(60213),t.exports={renderWebGL:r,renderCanvas:n}},72291:(t,e,i)=>{var s=i(73329),r=i(50262),n=i(75512);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=s(e,i,a);o.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=o.fillTint,f=n.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=f,d.TR=f,d.BL=f,d.BR=f;var p=e.geom.x1-l,g=e.geom.y1-u,v=e.geom.x2-l,m=e.geom.y2-u,x=e.geom.x3-l,y=e.geom.y3-u;o.batchFillTriangle(p,g,v,m,x,y,h.sprite,h.camera)}e.isStroked&&r(o,e,c,l,u),t.pipelines.postBatch(e)}},13747:(t,e,i)=>{var s=i(16569),r=i(56694),n=i(64937),a=i(89980),o=i(20791),h=new r({Extends:a,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,o],initialize:function(t,e,i,r,n){a.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(r,n),this.setPosition(e,i),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(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return n.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=h},27573:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},89219:(t,e,i)=>{var s=i(88933),r=i(32291),n=i(99325),a=i(20494),o=i(13747);n.register("sprite",(function(t,e){void 0===t&&(t={});var i=a(t,"key",null),n=a(t,"frame",null),h=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,h,t),r(h,t),h}))},66135:(t,e,i)=>{var s=i(61286),r=i(13747);s.register("sprite",(function(t,e,i,s){return this.displayList.add(new r(this.scene,t,e,i,s))}))},20791:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(21034),n=i(27573),t.exports={renderWebGL:r,renderCanvas:n}},21034:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),e.pipeline.batchSprite(e,i,s)}},32979:t=>{t.exports=function(t,e,i){var s=t.canvas,r=t.context,n=t.style,a=[],o=0,h=i.length;n.maxLines>0&&n.maxLines<i.length&&(h=n.maxLines),n.syncFont(s,r);for(var l=0;l<h;l++){var u=n.strokeThickness;u+=r.measureText(i[l]).width,i[l].length>1&&(u+=t.letterSpacing*(i[l].length-1)),n.wordWrap&&(u-=r.measureText(" ").width),a[l]=Math.ceil(u),o=Math.max(o,a[l])}var c=e.fontSize+n.strokeThickness,d=c*h,f=t.lineSpacing;return h>1&&(d+=f*(h-1)),{width:o,height:d,lines:h,lineWidths:a,lineSpacing:f,lineHeight:c}}},27030:(t,e,i)=>{var s=i(61068);t.exports=function(t){var e=s.create(this),i=e.getContext("2d",{willReadFrequently:!0});t.syncFont(e,i);var r=i.measureText(t.testString);if("actualBoundingBoxAscent"in r){var n=r.actualBoundingBoxAscent,a=r.actualBoundingBoxDescent;return s.remove(e),{ascent:n,descent:a,fontSize:n+a}}var o=Math.ceil(r.width*t.baselineX),h=o,l=2*h;h=h*t.baselineY|0,e.width=o,e.height=l,i.fillStyle="#f00",i.fillRect(0,0,o,l),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,h);var u={ascent:0,descent:0,fontSize:0},c=i.getImageData(0,0,o,l);if(!c)return u.ascent=h,u.descent=h+6,u.fontSize=u.ascent+u.descent,s.remove(e),u;var d,f,p=c.data,g=p.length,v=4*o,m=0,x=!1;for(d=0;d<h;d++){for(f=0;f<v;f+=4)if(255!==p[m+f]){x=!0;break}if(x)break;m+=v}for(u.ascent=h-d,m=g-v,x=!1,d=l;d>h;d--){for(f=0;f<v;f+=4)if(255!==p[m+f]){x=!0;break}if(x)break;m-=v}return u.descent=d-h,u.fontSize=u.ascent+u.descent,s.remove(e),u}},76555:(t,e,i)=>{var s=i(99584),r=i(61068),n=i(56694),a=i(64937),o=i(89980),h=i(32979),l=i(10850),u=i(55638),c=i(80032),d=i(74744),f=i(76583),p=new n({Extends:o,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.PostPipeline,a.ScrollFactor,a.Tint,a.Transform,a.Visible,c],initialize:function(t,e,i,s,n){void 0===e&&(e=0),void 0===i&&(i=0),o.call(this,t,"Text"),this.renderer=t.sys.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=r.create(this),this.context,this.style=new d(this,n),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,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=f(),this.texture=t.sys.textures.addCanvas(this._textureKey,this.canvas),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(s),n&&n.padding&&this.setPadding(n.padding),n&&n.lineSpacing&&this.setLineSpacing(n.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",s(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var s="",r=t.replace(/ +/gi," ").split(this.splitRegExp),n=r.length,a=0;a<n;a++){var o=r[a],h="";if(o=o.replace(/^ *|\s*$/gi,""),e.measureText(o).width<i)s+=o+"\n";else{for(var l=i,u=o.split(" "),c=0;c<u.length;c++){var d=u[c],f=d+" ",p=e.measureText(f).width;if(p>l){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("wordWrapWidth < a single character");var v=d.substr(g.length);u[c]=v,h+=g}var m=u[c].length?c:c+1,x=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");r.splice(a+1,0,x),n=r.length;break}h+=f,l-=p}s+=h.replace(/[ \n]*$/gi,"")+"\n"}}return s=s.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var s="",r=t.split(this.splitRegExp),n=r.length-1,a=e.measureText(" ").width,o=0;o<=n;o++){for(var h=i,l=r[o].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],f=e.measureText(d).width,p=f;c<u&&(p+=a),p>h&&c>0&&(s+="\n",h=i),s+=d,c<u?(s+=" ",h-=p):h-=f}o<n&&(s+="\n")}return s},getWrappedText:function(t){return void 0===t&&(t=this._text),this.style.syncFont(this.canvas,this.context),this.runWordWrap(t).split(this.splitRegExp)},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this._text&&(this._text=t.toString(),this.updateText()),this},appendText:function(t,e){void 0===e&&(e=!0),t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t=t.toString();var i=this._text.concat(e?"\n"+t:t);return i!==this._text&&(this._text=i,this.updateText()),this},setStyle:function(t){return this.style.setStyle(t)},setFont:function(t){return this.style.setFont(t)},setFontFamily:function(t){return this.style.setFontFamily(t)},setFontSize:function(t){return this.style.setFontSize(t)},setFontStyle:function(t){return this.style.setFontStyle(t)},setFixedSize:function(t,e){return this.style.setFixedSize(t,e)},setBackgroundColor:function(t){return this.style.setBackgroundColor(t)},setFill:function(t){return this.style.setFill(t)},setColor:function(t){return this.style.setColor(t)},setStroke:function(t,e){return this.style.setStroke(t,e)},setShadow:function(t,e,i,s,r,n){return this.style.setShadow(t,e,i,s,r,n)},setShadowOffset:function(t,e){return this.style.setShadowOffset(t,e)},setShadowColor:function(t){return this.style.setShadowColor(t)},setShadowBlur:function(t){return this.style.setShadowBlur(t)},setShadowStroke:function(t){return this.style.setShadowStroke(t)},setShadowFill:function(t){return this.style.setShadowFill(t)},setWordWrapWidth:function(t,e){return this.style.setWordWrapWidth(t,e)},setWordWrapCallback:function(t,e){return this.style.setWordWrapCallback(t,e)},setAlign:function(t){return this.style.setAlign(t)},setResolution:function(t){return this.style.setResolution(t)},setLineSpacing:function(t){return this.lineSpacing=t,this.updateText()},setLetterSpacing:function(t){return this.letterSpacing=t,this.updateText()},setPadding:function(t,e,i,s){if("object"==typeof t){var r=t,n=l(r,"x",null);null!==n?(t=n,i=n):(t=l(r,"left",0),i=l(r,"right",t));var a=l(r,"y",null);null!==a?(e=a,s=a):(e=l(r,"top",0),s=l(r,"bottom",e))}else void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=t),void 0===s&&(s=e);return this.padding.left=t,this.padding.top=e,this.padding.right=i,this.padding.bottom=s,this.updateText()},setMaxLines:function(t){return this.style.setMaxLines(t)},setRTL:function(t){void 0===t&&(t=!0);var e=this.style;return e.rtl===t||(e.rtl=t,t?(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",s(this.canvas,this.scene.sys.canvas)):(this.canvas.dir="ltr",this.context.direction="ltr"),"left"===e.align?e.align="right":"right"===e.align&&(e.align="left")),this},updateText:function(){var t=this.canvas,e=this.context,i=this.style,s=i.resolution,r=i.metrics;i.syncFont(t,e);var n=this._text;(i.wordWrapWidth||i.wordWrapCallback)&&(n=this.runWordWrap(this._text));var a,o=n.split(this.splitRegExp),l=h(this,r,o),u=this.padding;0===i.fixedWidth?(this.width=l.width+u.left+u.right,a=l.width):(this.width=i.fixedWidth,(a=this.width-u.left-u.right)<l.width&&(a=l.width)),0===i.fixedHeight?this.height=l.height+u.top+u.bottom:this.height=i.fixedHeight;var c,d,f=this.width,p=this.height;this.updateDisplayOrigin(),f*=s,p*=s,f=Math.max(f,1),p=Math.max(p,1),t.width!==f||t.height!==p?(t.width=f,t.height=p,this.frame.setSize(f,p),i.syncFont(t,e),i.rtl&&(e.direction="rtl")):e.clearRect(0,0,f,p),e.save(),e.scale(s,s),i.backgroundColor&&(e.fillStyle=i.backgroundColor,e.fillRect(0,0,f,p)),i.syncStyle(t,e),e.translate(u.left,u.top);for(var g=0;g<l.lines;g++){if(c=i.strokeThickness/2,d=i.strokeThickness/2+g*l.lineHeight+r.ascent,g>0&&(d+=l.lineSpacing*g),i.rtl)c=f-c-u.left-u.right;else if("right"===i.align)c+=a-l.lineWidths[g];else if("center"===i.align)c+=(a-l.lineWidths[g])/2;else if("justify"===i.align){if(l.lineWidths[g]/l.width>=.85){var v=l.width-l.lineWidths[g],m=e.measureText(" ").width,x=o[g].trim(),y=x.split(" ");v+=(o[g].length-x.length)*m;for(var T=Math.floor(v/m),w=0;T>0;)y[w]+=" ",w=(w+1)%(y.length-1||1),--T;o[g]=y.join(" ")}}if(this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(i.syncShadow(e,i.shadowStroke),e.strokeText(o[g],c,d)),i.color){i.syncShadow(e,i.shadowFill);var E=this.letterSpacing;if(0!==E)for(var S=0,b=o[g].split(""),A=0;A<b.length;A++)e.fillText(b[A],c+S,d),S+=e.measureText(b[A]).width+E;else e.fillText(o[g],c,d)}}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0));var _=this.input;return _&&!_.customHitArea&&(_.hitArea.width=this.width,_.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=a.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){u(this.canvas),r.remove(this.canvas);var t=this.texture;t&&t.destroy()}});t.exports=p},71649:t=>{t.exports=function(t,e,i,s){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},75397:(t,e,i)=>{var s=i(88933),r=i(99325),n=i(20494),a=i(76555);r.register("text",(function(t,e){void 0===t&&(t={});var i=n(t,"text",""),r=n(t,"style",null),o=n(t,"padding",null);null!==o&&(r.padding=o);var h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),s(this.scene,h,t),h.autoRound=n(t,"autoRound",!0),h.resolution=n(t,"resolution",1),h}))},94627:(t,e,i)=>{var s=i(76555);i(61286).register("text",(function(t,e,i,r){return this.displayList.add(new s(this.scene,t,e,i,r))}))},80032:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(76128),n=i(71649),t.exports={renderWebGL:r,renderCanvas:n}},74744:(t,e,i)=>{var s=i(56694),r=i(20494),n=i(10850),a=i(27030),o={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]},h=new s({initialize:function(t,e){this.parent=t,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(e,!1,!0)},setStyle:function(t,e,i){for(var s in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),o){var h=i?o[s][1]:this[s];this[s]="wordWrapCallback"===s||"wordWrapCallbackScope"===s?n(t,o[s][0],h):r(t,o[s][0],h)}var l=n(t,"font",null);null!==l&&this.setFont(l,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=n(t,"fill",null);null!==u&&(this.color=u);var c=n(t,"metrics",!1);return c?this.metrics={ascent:n(c,"ascent",0),descent:n(c,"descent",0),fontSize:n(c,"fontSize",0)}:!e&&this.metrics||(this.metrics=a(this)),e?this.parent.updateText():this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=a(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,s="",r="";if("string"!=typeof t)i=n(t,"fontFamily","Courier"),s=n(t,"fontSize","16px"),r=n(t,"fontStyle","");else{var a=t.split(" "),o=0;r=a.length>2?a[o++]:"",s=a[o++]||"16px",i=a[o++]||"Courier"}return i===this.fontFamily&&s===this.fontSize&&r===this.fontStyle||(this.fontFamily=i,this.fontSize=s,this.fontStyle=r,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,s,r,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===n&&(n=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=s,this.shadowStroke=r,this.shadowFill=n,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in o)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},76128:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,r){if(0!==e.width&&0!==e.height){i.addToRenderList(e);var n=e.frame,a=n.width,o=n.height,h=s.getTintAppendFloatAlpha,l=t.pipelines.set(e.pipeline,e),u=l.setTexture2D(n.glTexture,e);l.batchTexture(e,n.glTexture,a,o,e.x,e.y,a/e.style.resolution,o/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,o,h(e.tintTopLeft,i.alpha*e._alphaTL),h(e.tintTopRight,i.alpha*e._alphaTR),h(e.tintBottomLeft,i.alpha*e._alphaBL),h(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,r,!1,u)}}},35856:(t,e,i)=>{var s=i(61068),r=i(56694),n=i(64937),a=i(89980),o=i(3504),h=i(8213),l=i(9271),u=i(76583),c=i(93736),d=new r({Extends:a,Mixins:[n.Alpha,n.BlendMode,n.ComputedSize,n.Crop,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Tint,n.Transform,n.Visible,l],initialize:function(t,e,i,r,n,h,l){var d=t.sys.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(h),p=f.get(l);p.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),p=(f=t.sys.textures.get("__MISSING")).get()),"DynamicTexture"===f.type&&(console.warn("TileSprite cannot use Dynamic Texture"),p=(f=t.sys.textures.get("__MISSING")).get()),r&&n?(r=Math.floor(r),n=Math.floor(n)):(r=p.width,n=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=s.create(this,r,n),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this._textureKey=u(),this.texture=t.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=o(p.width),this.potHeight=o(p.height),this.fillCanvas=s.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(e,i),this.setSize(r,n),this.setFrame(l),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=o(e.width),this.potHeight=o(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,s=this.potWidth,r=this.potHeight;this.renderer&&this.renderer.gl||(s=t.cutWidth,r=t.cutHeight),e.clearRect(0,0,s,r),i.width=s,i.height=r,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,s,r),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.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;else{var e=this.context;this.scene.sys.game.config.antialias||h.disable(e);var i=this._tileScale.x,s=this._tileScale.y,r=this._tilePosition.x,n=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,s),e.translate(-r,-n),e.fillStyle=this.fillPattern,e.fillRect(r,n,this.width/i,this.height/s),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),s.remove(this.canvas),s.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var t=this.texture;t&&t.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},93305:t=>{t.exports=function(t,e,i,s){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},63950:(t,e,i)=>{var s=i(88933),r=i(99325),n=i(20494),a=i(35856);r.register("tileSprite",(function(t,e){void 0===t&&(t={});var i=n(t,"x",0),r=n(t,"y",0),o=n(t,"width",512),h=n(t,"height",512),l=n(t,"key",""),u=n(t,"frame",""),c=new a(this.scene,i,r,o,h,l,u);return void 0!==e&&(t.add=e),s(this.scene,c,t),c}))},20509:(t,e,i)=>{var s=i(35856);i(61286).register("tileSprite",(function(t,e,i,r,n,a){return this.displayList.add(new s(this.scene,t,e,i,r,n,a))}))},9271:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(74287),n=i(93305),t.exports={renderWebGL:r,renderCanvas:n}},74287:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,r){e.updateCanvas();var n=e.width,a=e.height;if(0!==n&&0!==a){i.addToRenderList(e);var o=s.getTintAppendFloatAlpha,h=t.pipelines.set(e.pipeline,e),l=h.setTexture2D(e.fillPattern,e);h.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,n,a,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*n,e.originY*a,0,0,n,a,o(e.tintTopLeft,i.alpha*e._alphaTL),o(e.tintTopRight,i.alpha*e._alphaTR),o(e.tintBottomLeft,i.alpha*e._alphaBL),o(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,i,r,!1,l)}}},8630:(t,e,i)=>{var s=i(82897),r=i(56694),n=i(64937),a=i(56631),o=i(97081),h=i(89980),l=i(83392),u=i(76038),c=i(76583),d=i(77974),f=new r({Extends:h,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,d],initialize:function(t,e,i,s){h.call(this,t,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=c(),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 r=t.sys.game;this._device=r.device.video,this.setPosition(e,i),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),r.events.on(o.PAUSE,this.globalPause,this),r.events.on(o.RESUME,this.globalResume,this);var n=t.sys.sound;n&&n.on(u.GLOBAL_MUTE,this.globalMute,this),s&&this.load(s)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(t){var e=this.scene.sys.cache.video.get(t);return e?(this.cacheKey=t,this.loadHandler(e.url,e.noAudio,e.crossOrigin)):console.warn("No video in cache for key: "+t),this},changeSource:function(t,e,i,s,r){void 0===e&&(e=!0),void 0===i&&(i=!1),this.cacheKey!==t&&(this.load(t),e&&this.play(i,s,r))},getVideoKey:function(){return this.cacheKey},loadURL:function(t,e,i){void 0===e&&(e=!1);var s=this._device.getVideoURL(t);return s?(this.cacheKey="",this.loadHandler(s.url,e,i)):console.warn("No supported video format found for "+t),this},loadMediaStream:function(t,e,i){return this.loadHandler(null,e,i,t)},loadHandler:function(t,e,i,s){e||(e=!1);var r=this.video;if(r?(this.removeLoadEventHandlers(),this.stop()):((r=document.createElement("video")).controls=!1,r.setAttribute("playsinline","playsinline"),r.setAttribute("preload","auto"),r.setAttribute("disablePictureInPicture","true")),e?(r.muted=!0,r.defaultMuted=!0,r.setAttribute("autoplay","autoplay")):(r.muted=!1,r.defaultMuted=!1,r.removeAttribute("autoplay")),i?r.setAttribute("crossorigin",i):r.removeAttribute("crossorigin"),s)if("srcObject"in r)try{r.srcObject=s}catch(t){if("TypeError"!==t.name)throw t;r.src=URL.createObjectURL(s)}else r.src=URL.createObjectURL(s);else r.src=t;return this.addLoadEventHandlers(),this.retry=0,this.video=r,this._playCalled=!1,r.load(),this},requestVideoFrame:function(t,e){var i=this.video;if(i){var s=e.width,r=e.height,n=this.videoTexture,o=this.videoTextureSource,h=!n||o.source!==i;h?(this._codePaused=i.paused,this._codeMuted=i.muted,n?(o.source=i,o.width=s,o.height=r,n.get().setSize(s,r)):((n=this.scene.sys.textures.create(this._key,i,s,r)).add("__BASE",0,0,0,s,r),this.setTexture(n),this.videoTexture=n,this.videoTextureSource=n.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(a.VIDEO_TEXTURE,this,n)),this.setSizeToFrame(),this.updateDisplayOrigin()):o.update(),this.isStalled=!1,this.metadata=e;var l=e.mediaTime;h&&(this._lastUpdate=l,this.emit(a.VIDEO_CREATED,this,s,r),this.frameReady||(this.frameReady=!0,this.emit(a.VIDEO_PLAY,this))),this._playingMarker?l>=this._markerOut&&(i.loop?(i.currentTime=this._markerIn,this.emit(a.VIDEO_LOOP,this)):(this.stop(!1),this.emit(a.VIDEO_COMPLETE,this))):l<this._lastUpdate&&this.emit(a.VIDEO_LOOP,this),this._lastUpdate=l,this._rfvCallbackId=this.video.requestVideoFrameCallback(this.requestVideoFrame.bind(this))}},play:function(t,e,i){void 0===e&&(e=-1),void 0===i&&(i=l.MAX_SAFE_INTEGER);var s=this.video;return!s||this.isPlaying()?(s||console.warn("Video not loaded"),this):(void 0===t&&(t=s.loop),s.loop=t,this._markerIn=e,this._markerOut=i,this._playingMarker=e>-1&&i>e&&i<l.MAX_SAFE_INTEGER,this._playCalled||(this._rfvCallbackId=s.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this._playCalled=!0,this.createPlayPromise()),this)},addLoadEventHandlers:function(){var t=this.video;t&&(t.addEventListener("error",this._loadCallbackHandler),t.addEventListener("abort",this._loadCallbackHandler))},removeLoadEventHandlers:function(){var t=this.video;t&&(t.removeEventListener("error",this._loadCallbackHandler),t.removeEventListener("abort",this._loadCallbackHandler))},addEventHandlers:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.addEventListener(i,e[i])}},removeEventHandlers:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i])}},createPlayPromise:function(t){void 0===t&&(t=!0);var e=this.video,i=e.play();if(void 0!==i){var s=this.playSuccess.bind(this),r=this.playError.bind(this);if(!t){var n=this;r=function(){n.failedPlayAttempts++}}i.then(s).catch(r)}else e.addEventListener("playing",this._callbacks.legacy),t||this.failedPlayAttempts++},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&i>e&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,s,r,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=this.height),void 0===r&&(r=i),void 0===n&&(n=s);var a=this.video,o=this.snapshotTexture;return o?(o.setSize(r,n),a&&o.context.drawImage(a,t,e,i,s,0,0,r,n)):(o=this.scene.sys.textures.createCanvas(c(),r,n),this.snapshotTexture=o,a&&o.context.drawImage(a,t,e,i,s,0,0,r,n)),o.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(a.VIDEO_UNLOCKED,this));var t=this.scene.sys.sound;t&&t.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(t){var e=t.name;"NotAllowedError"===e?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(a.VIDEO_LOCKED,this)):"NotSupportedError"===e?(this.stop(!1),this.emit(a.VIDEO_UNSUPPORTED,this,t)):(this.stop(!1),this.emit(a.VIDEO_ERROR,this,t))},legacyPlayHandler:function(){var t=this.video;t&&(this.playSuccess(),t.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(a.VIDEO_PLAYING,this)},loadErrorHandler:function(t){this.stop(!1),this.emit(a.VIDEO_ERROR,this,t)},stalledHandler:function(t){this.isStalled=!0,this.emit(a.VIDEO_STALLED,this,t)},completeHandler:function(){this._playCalled=!1,this.emit(a.VIDEO_COMPLETE,this)},preUpdate:function(t,e){this.video&&this._playCalled&&this.touchLocked&&this.playWhenUnlocked&&(this.retry+=e,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var s=i*t;this.setCurrentTime(s)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],s=parseFloat(t.substr(1));"+"===i?t=e.currentTime+s:"-"===i&&(t=e.currentTime-s)}e.currentTime=t}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(a.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(a.VIDEO_SEEKED,this)},getProgress:function(){var t=this.video;if(t){var e=t.duration;if(e!==1/0&&!isNaN(e))return t.currentTime/e}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},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(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&!e.ended&&(t?e.paused||(this.removeEventHandlers(),e.pause()):t||(this._playCalled?e.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(t){return void 0===t&&(t=1),this.video&&(this.video.volume=s(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,t),this.videoTextureSource.setFlipY(e)),this._key=t,this.flipY=e,!!this.videoTexture},stop:function(t){void 0===t&&(t=!0);var e=this.video;return e&&(this.removeEventHandlers(),e.cancelVideoFrameCallback(this._rfvCallbackId),e.pause()),this.retry=0,this._playCalled=!1,t&&this.emit(a.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var t=this.scene.sys.game.events;t.off(o.PAUSE,this.globalPause,this),t.off(o.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(u.GLOBAL_MUTE,this.globalMute,this)}});t.exports=f},56933:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},65601:(t,e,i)=>{var s=i(88933),r=i(99325),n=i(20494),a=i(8630);r.register("video",(function(t,e){void 0===t&&(t={});var i=n(t,"key",null),r=new a(this.scene,0,0,i);return void 0!==e&&(t.add=e),s(this.scene,r,t),r}))},215:(t,e,i)=>{var s=i(8630);i(61286).register("video",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},77974:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(83572),n=i(56933),t.exports={renderWebGL:r,renderCanvas:n}},83572:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),e.pipeline.batchSprite(e,i,s))}},71030:(t,e,i)=>{var s=i(95723),r=i(26673),n=i(65650),a=i(56694),o=i(64937),h=i(89980),l=i(74118),u=i(94287),c=new a({Extends:h,Mixins:[o.Depth,o.GetBounds,o.Origin,o.Transform,o.ScrollFactor,o.Visible],initialize:function(t,e,i,r,n){void 0===r&&(r=1),void 0===n&&(n=r),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=r,this.height=n,this.blendMode=s.NORMAL,this.updateDisplayOrigin()},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,e,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var s=this.input;return i&&s&&!s.customHitArea&&(s.hitArea.width=t,s.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new r(0,0,t),n)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(t,e,i){i.addToRenderList(e)},renderWebGL:function(t,e,i){i.addToRenderList(e)}});t.exports=c},24067:(t,e,i)=>{var s=i(99325),r=i(20494),n=i(71030);s.register("zone",(function(t){var e=r(t,"x",0),i=r(t,"y",0),s=r(t,"width",1),a=r(t,"height",s);return new n(this.scene,e,i,s,a)}))},34546:(t,e,i)=>{var s=i(71030);i(61286).register("zone",(function(t,e,i,r){return this.displayList.add(new s(this.scene,t,e,i,r))}))},95847:t=>{t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},26673:(t,e,i)=>{var s=i(56694),r=i(65650),n=i(94026),a=i(62941),o=i(52394),h=i(30977),l=new s({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=o.CIRCLE,this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=l},37964:t=>{t.exports=function(t){return Math.PI*t.radius*2}},72233:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},61761:(t,e,i)=>{var s=i(26673);t.exports=function(t){return new s(t.x,t.y,t.radius)}},65650:t=>{t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},39187:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)}},58672:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},42997:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},94894:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},48027:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},94026:(t,e,i)=>{var s=i(72233),r=i(91806),n=i(83392),a=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new a);var o=r(e,0,n.PI2);return s(t,o,i)}},62941:(t,e,i)=>{var s=i(37964),r=i(72233),n=i(91806),a=i(83392);t.exports=function(t,e,i,o){void 0===o&&(o=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h<e;h++){var l=n(h/e,0,a.PI2);o.push(r(t,l))}return o}},34585:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},88665:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},30977:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=2*Math.PI*Math.random(),r=Math.random()+Math.random(),n=r>1?2-r:r,a=n*Math.cos(i),o=n*Math.sin(i);return e.x=t.x+a*t.radius,e.y=t.y+o*t.radius,e}},6112:(t,e,i)=>{var s=i(26673);s.Area=i(95847),s.Circumference=i(37964),s.CircumferencePoint=i(72233),s.Clone=i(61761),s.Contains=i(65650),s.ContainsPoint=i(39187),s.ContainsRect=i(58672),s.CopyFrom=i(42997),s.Equals=i(94894),s.GetBounds=i(48027),s.GetPoint=i(94026),s.GetPoints=i(62941),s.Offset=i(34585),s.OffsetPoint=i(88665),s.Random=i(30977),t.exports=s},52394:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},58605:t=>{t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},39507:t=>{t.exports=function(t){var e=t.width/2,i=t.height/2,s=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*s/(10+Math.sqrt(4-3*s)))}},86998:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=t.width/2,n=t.height/2;return i.x=t.x+r*Math.cos(e),i.y=t.y+n*Math.sin(e),i}},81773:(t,e,i)=>{var s=i(95669);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},72313:t=>{t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var s=(e-t.x)/t.width,r=(i-t.y)/t.height;return(s*=s)+(r*=r)<.25}},34368:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)}},71431:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},75459:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},95669:(t,e,i)=>{var s=i(56694),r=i(72313),n=i(95340),a=i(54978),o=i(52394),h=i(72006),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,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(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},98068:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},72897:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},95340:(t,e,i)=>{var s=i(86998),r=i(91806),n=i(83392),a=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new a);var o=r(e,0,n.PI2);return s(t,o,i)}},54978:(t,e,i)=>{var s=i(39507),r=i(86998),n=i(91806),a=i(83392);t.exports=function(t,e,i,o){void 0===o&&(o=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h<e;h++){var l=n(h/e,0,a.PI2);o.push(r(t,l))}return o}},77951:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},36233:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},72006:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random()*Math.PI*2,r=Math.sqrt(Math.random());return e.x=t.x+r*Math.cos(i)*t.width/2,e.y=t.y+r*Math.sin(i)*t.height/2,e}},40652:(t,e,i)=>{var s=i(95669);s.Area=i(58605),s.Circumference=i(39507),s.CircumferencePoint=i(86998),s.Clone=i(81773),s.Contains=i(72313),s.ContainsPoint=i(34368),s.ContainsRect=i(71431),s.CopyFrom=i(75459),s.Equals=i(98068),s.GetBounds=i(72897),s.GetPoint=i(95340),s.GetPoints=i(54978),s.Offset=i(77951),s.OffsetPoint=i(36233),s.Random=i(72006),t.exports=s},84068:(t,e,i)=>{var s=i(52394),r=i(98611),n={Circle:i(6112),Ellipse:i(40652),Intersects:i(7563),Line:i(28482),Mesh:i(14293),Point:i(63472),Polygon:i(44359),Rectangle:i(66658),Triangle:i(87619)};n=r(!1,n,s),t.exports=n},22184:(t,e,i)=>{var s=i(53996);t.exports=function(t,e){return s(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},26535:t=>{t.exports=function(t,e){var i=e.width/2,s=e.height/2,r=Math.abs(t.x-e.x-i),n=Math.abs(t.y-e.y-s),a=i+t.radius,o=s+t.radius;if(r>a||n>o)return!1;if(r<=i||n<=s)return!0;var h=r-i,l=n-s;return h*h+l*l<=t.radius*t.radius}},71145:(t,e,i)=>{var s=i(79967),r=i(22184);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var n,a,o,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0===(o=(a=-2*f)*a-4*(n=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new s(h,-a/(2*n))):o>0&&(i.push(new s(h,(-a+Math.sqrt(o))/(2*n))),i.push(new s(h,(-a-Math.sqrt(o))/(2*n))));else{var g=(l-d)/(u-f),v=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0===(o=(a=2*u*g-2*v*g-2*l)*a-4*(n=g*g+1)*(l*l+u*u+v*v-c*c-2*u*v))?(h=-a/(2*n),i.push(new s(h,v-h*g))):o>0&&(h=(-a+Math.sqrt(o))/(2*n),i.push(new s(h,v-h*g)),h=(-a-Math.sqrt(o))/(2*n),i.push(new s(h,v-h*g)))}}return i}},62508:(t,e,i)=>{var s=i(26111),r=i(26535);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var n=e.getLineA(),a=e.getLineB(),o=e.getLineC(),h=e.getLineD();s(n,t,i),s(a,t,i),s(o,t,i),s(h,t,i)}return i}},26111:(t,e,i)=>{var s=i(79967),r=i(61472);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var n,a,o=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,f=e.radius,p=l-o,g=u-h,v=o-c,m=h-d,x=p*p+g*g,y=2*(p*v+g*m),T=y*y-4*x*(v*v+m*m-f*f);if(0===T){var w=-y/(2*x);n=o+w*p,a=h+w*g,w>=0&&w<=1&&i.push(new s(n,a))}else if(T>0){var E=(-y-Math.sqrt(T))/(2*x);n=o+E*p,a=h+E*g,E>=0&&E<=1&&i.push(new s(n,a));var S=(-y+Math.sqrt(T))/(2*x);n=o+S*p,a=h+S*g,S>=0&&S<=1&&i.push(new s(n,a))}}return i}},96537:(t,e,i)=>{var s=i(70015);t.exports=function(t,e,i,r){void 0===i&&(i=!1);var n,a,o,h=t.x1,l=t.y1,u=t.x2,c=t.y2,d=e.x1,f=e.y1,p=u-h,g=c-l,v=e.x2-d,m=e.y2-f,x=p*m-g*v;if(0===x)return null;if(i){if((a=(d+v*(n=(p*(f-l)+g*(h-d))/(v*g-m*p))-h)/p)<0||n<0||n>1)return null;o=a}else{if(a=((l-f)*p-(h-d)*g)/x,(n=((d-h)*m-(f-l)*v)/x)<0||n>1||a<0||a>1)return null;o=n}return void 0===r&&(r=new s),r.set(h+p*o,l+g*o,o)}},17647:(t,e,i)=>{var s=i(96537),r=i(88829),n=i(70015),a=new r,o=new n;t.exports=function(t,e,i,r){void 0===i&&(i=!1),void 0===r&&(r=new n);var h=!1;r.set(),o.set();for(var l=e[e.length-1],u=0;u<e.length;u++){var c=e[u];a.setTo(l.x,l.y,c.x,c.y),l=c,s(t,a,i,o)&&(!h||o.z<r.z)&&(r.copy(o),h=!0)}return h?r:null}},68439:(t,e,i)=>{var s=i(70015),r=i(51729),n=i(17647),a=new s;t.exports=function(t,e,i,s){void 0===s&&(s=new r),Array.isArray(e)||(e=[e]);var o=!1;s.set(),a.set();for(var h=0;h<e.length;h++)n(t,e[h].points,i,a)&&(!o||a.z<s.z)&&(s.set(a.x,a.y,a.z,h),o=!0);return o?s:null}},9569:(t,e,i)=>{var s=i(79967),r=i(25227),n=i(47910);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e))for(var a=e.getLineA(),o=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new s,new s,new s,new s],c=[r(a,t,u[0]),r(o,t,u[1]),r(h,t,u[2]),r(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},7449:(t,e,i)=>{var s=i(51729),r=i(68439),n=new(i(88829));function a(t,e,i,a,o){var h=Math.cos(t),l=Math.sin(t);n.setTo(e,i,e+h,i+l);var u=r(n,a,!0);u&&o.push(new s(u.x,u.y,t,u.w))}function o(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var s=[],r=[],n=0;n<i.length;n++)for(var h=i[n].points,l=0;l<h.length;l++){var u=Math.atan2(h[l].y-e,h[l].x-t);-1===r.indexOf(u)&&(a(u,t,e,i,s),a(u-1e-5,t,e,i,s),a(u+1e-5,t,e,i,s),r.push(u))}return s.sort(o)}},82931:(t,e,i)=>{var s=i(74118),r=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),r(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},1946:(t,e,i)=>{var s=i(9569),r=i(90205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var n=t.getLineA(),a=t.getLineB(),o=t.getLineC(),h=t.getLineD();s(n,e,i),s(a,e,i),s(o,e,i),s(h,e,i)}return i}},34211:(t,e,i)=>{var s=i(20370),r=i(9569);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var n=e.getLineA(),a=e.getLineB(),o=e.getLineC();r(n,t,i),r(a,t,i),r(o,t,i)}return i}},80511:(t,e,i)=>{var s=i(26111),r=i(48411);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var n=t.getLineA(),a=t.getLineB(),o=t.getLineC();s(n,e,i),s(a,e,i),s(o,e,i)}return i}},31343:(t,e,i)=>{var s=i(79967),r=i(86117),n=i(25227);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var a=t.getLineA(),o=t.getLineB(),h=t.getLineC(),l=[new s,new s,new s],u=[n(a,e,l[0]),n(o,e,l[1]),n(h,e,l[2])],c=0;c<3;c++)u[c]&&i.push(l[c]);return i}},70534:(t,e,i)=>{var s=i(23589),r=i(31343);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var n=e.getLineA(),a=e.getLineB(),o=e.getLineC();r(t,n,i),r(t,a,i),r(t,o,i)}return i}},61472:(t,e,i)=>{var s=i(65650),r=new(i(79967));t.exports=function(t,e,i){if(void 0===i&&(i=r),s(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(s(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var n=t.x2-t.x1,a=t.y2-t.y1,o=e.x-t.x1,h=e.y-t.y1,l=n*n+a*a,u=n,c=a;if(l>0){var d=(o*n+h*a)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*n+c*a>=0&&s(e,i.x,i.y)}},25227:t=>{t.exports=function(t,e,i){var s=t.x1,r=t.y1,n=t.x2,a=t.y2,o=e.x1,h=e.y1,l=e.x2,u=e.y2;if(s===n&&r===a||o===l&&h===u)return!1;var c=(u-h)*(n-s)-(l-o)*(a-r);if(0===c)return!1;var d=((l-o)*(r-h)-(u-h)*(s-o))/c,f=((n-s)*(r-h)-(a-r)*(s-o))/c;return!(d<0||d>1||f<0||f>1)&&(i&&(i.x=s+d*(n-s),i.y=r+d*(a-r)),!0)}},47910:t=>{t.exports=function(t,e){var i=t.x1,s=t.y1,r=t.x2,n=t.y2,a=e.x,o=e.y,h=e.right,l=e.bottom,u=0;if(i>=a&&i<=h&&s>=o&&s<=l||r>=a&&r<=h&&n>=o&&n<=l)return!0;if(i<a&&r>=a){if((u=s+(n-s)*(a-i)/(r-i))>o&&u<=l)return!0}else if(i>h&&r<=h&&(u=s+(n-s)*(h-i)/(r-i))>=o&&u<=l)return!0;if(s<o&&n>=o){if((u=i+(r-i)*(o-s)/(n-s))>=a&&u<=h)return!0}else if(s>l&&n<=l&&(u=i+(r-i)*(l-s)/(n-s))>=a&&u<=h)return!0;return!1}},34426:t=>{t.exports=function(t,e,i){void 0===i&&(i=1);var s=e.x1,r=e.y1,n=e.x2,a=e.y2,o=t.x,h=t.y,l=(n-s)*(n-s)+(a-r)*(a-r);if(0===l)return!1;var u=((o-s)*(n-s)+(h-r)*(a-r))/l;if(u<0)return Math.sqrt((s-o)*(s-o)+(r-h)*(r-h))<=i;if(u>=0&&u<=1){var c=((r-h)*(n-s)-(s-o)*(a-r))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((n-o)*(n-o)+(a-h)*(a-h))<=i}},81414:(t,e,i)=>{var s=i(34426);t.exports=function(t,e){if(!s(t,e))return!1;var i=Math.min(e.x1,e.x2),r=Math.max(e.x1,e.x2),n=Math.min(e.y1,e.y2),a=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=r&&t.y>=n&&t.y<=a}},90205:t=>{t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0)&&!(t.right<e.x||t.bottom<e.y||t.x>e.right||t.y>e.bottom)}},20370:(t,e,i)=>{var s=i(25227),r=i(94287),n=i(86875),a=i(87279);t.exports=function(t,e){if(e.left>t.right||e.right<t.left||e.top>t.bottom||e.bottom<t.top)return!1;var i=e.getLineA(),o=e.getLineB(),h=e.getLineC();if(r(t,i.x1,i.y1)||r(t,i.x2,i.y2))return!0;if(r(t,o.x1,o.y1)||r(t,o.x2,o.y2))return!0;if(r(t,h.x1,h.y1)||r(t,h.x2,h.y2))return!0;var l=t.getLineA(),u=t.getLineB(),c=t.getLineC(),d=t.getLineD();if(s(i,l)||s(i,u)||s(i,c)||s(i,d))return!0;if(s(o,l)||s(o,u)||s(o,c)||s(o,d))return!0;if(s(h,l)||s(h,u)||s(h,c)||s(h,d))return!0;var f=a(t);return n(e,f,!0).length>0}},8786:t=>{t.exports=function(t,e,i,s,r,n){return void 0===n&&(n=0),!(e>t.right+n||i<t.left-n||s>t.bottom+n||r<t.top-n)}},48411:(t,e,i)=>{var s=i(61472),r=i(60689);t.exports=function(t,e){return!(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top)&&(!!r(t,e.x,e.y)||(!!s(t.getLineA(),e)||(!!s(t.getLineB(),e)||!!s(t.getLineC(),e))))}},86117:(t,e,i)=>{var s=i(25227);t.exports=function(t,e){return!(!t.contains(e.x1,e.y1)&&!t.contains(e.x2,e.y2))||(!!s(t.getLineA(),e)||(!!s(t.getLineB(),e)||!!s(t.getLineC(),e)))}},23589:(t,e,i)=>{var s=i(86875),r=i(18680),n=i(25227);t.exports=function(t,e){if(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top)return!1;var i=t.getLineA(),a=t.getLineB(),o=t.getLineC(),h=e.getLineA(),l=e.getLineB(),u=e.getLineC();if(n(i,h)||n(i,l)||n(i,u))return!0;if(n(a,h)||n(a,l)||n(a,u))return!0;if(n(o,h)||n(o,l)||n(o,u))return!0;var c=r(t),d=s(e,c,!0);return d.length>0||(c=r(e),(d=s(t,c,!0)).length>0)}},7563:(t,e,i)=>{t.exports={CircleToCircle:i(22184),CircleToRectangle:i(26535),GetCircleToCircle:i(71145),GetCircleToRectangle:i(62508),GetLineToCircle:i(26111),GetLineToLine:i(96537),GetLineToPoints:i(17647),GetLineToPolygon:i(68439),GetLineToRectangle:i(9569),GetRaysFromPointToPolygon:i(7449),GetRectangleIntersection:i(82931),GetRectangleToRectangle:i(1946),GetRectangleToTriangle:i(34211),GetTriangleToCircle:i(80511),GetTriangleToLine:i(31343),GetTriangleToTriangle:i(70534),LineToCircle:i(61472),LineToLine:i(25227),LineToRectangle:i(47910),PointToLine:i(34426),PointToLineSegment:i(81414),RectangleToRectangle:i(90205),RectangleToTriangle:i(20370),RectangleToValues:i(8786),TriangleToCircle:i(48411),TriangleToLine:i(86117),TriangleToTriangle:i(23589)}},50599:t=>{t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},58813:t=>{t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var s=Math.round(t.x1),r=Math.round(t.y1),n=Math.round(t.x2),a=Math.round(t.y2),o=Math.abs(n-s),h=Math.abs(a-r),l=s<n?1:-1,u=r<a?1:-1,c=o-h;i.push({x:s,y:r});for(var d=1;s!==n||r!==a;){var f=c<<1;f>-h&&(c-=h,s+=l),f<o&&(c+=o,r+=u),d%e==0&&i.push({x:s,y:r}),d++}return i}},88513:t=>{t.exports=function(t,e,i){var s=e-(t.x1+t.x2)/2,r=i-(t.y1+t.y2)/2;return t.x1+=s,t.y1+=r,t.x2+=s,t.y2+=r,t}},26718:(t,e,i)=>{var s=i(88829);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2)}},88930:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},90656:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},30897:(t,e,i)=>{var s=i(16028);t.exports=function(t,e,i){void 0===i&&(i=e);var r=s(t),n=t.x2-t.x1,a=t.y2-t.y1;return e&&(t.x1=t.x1-n/r*e,t.y1=t.y1-a/r*e),i&&(t.x2=t.x2+n/r*i,t.y2=t.y2+a/r*i),t}},30684:(t,e,i)=>{var s=i(92951),r=i(21902),n=i(79967);t.exports=function(t,e,i,a,o){void 0===a&&(a=0),void 0===o&&(o=[]);var h,l,u=[],c=t.x1,d=t.y1,f=t.x2-c,p=t.y2-d,g=r(e,o),v=i-1;for(h=0;h<v;h++)l=g(h/v),u.push(new n(c+f*l,d+p*l));if(l=g(1),u.push(new n(c+f*l,d+p*l)),a>0){var m=u[0],x=[m];for(h=1;h<u.length-1;h++){var y=u[h];s(m,y)>=a&&(x.push(y),m=y)}var T=u[u.length-1];return s(m,T)<a&&x.pop(),x.push(T),x}return u}},20487:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},11222:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=t.x1,n=t.y1,a=t.x2,o=t.y2,h=(a-r)*(a-r)+(o-n)*(o-n);if(0===h)return i;var l=((e.x-r)*(a-r)+(e.y-n)*(o-n))/h;return i.x=r+l*(a-r),i.y=n+l*(o-n),i}},7377:(t,e,i)=>{var s=i(83392),r=i(50599),n=i(79967);t.exports=function(t,e){void 0===e&&(e=new n);var i=r(t)-s.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},66464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},8570:(t,e,i)=>{var s=i(16028),r=i(79967);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=s(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,u=0;u<e;u++){var c=u/e,d=a+(h-a)*c,f=o+(l-o)*c;n.push(new r(d,f))}return n}},65269:t=>{t.exports=function(t,e){var i=t.x1,s=t.y1,r=t.x2,n=t.y2,a=(r-i)*(r-i)+(n-s)*(n-s);if(0===a)return!1;var o=((s-e.y)*(r-i)-(i-e.x)*(n-s))/a;return Math.abs(o)*Math.sqrt(a)}},82996:t=>{t.exports=function(t){return Math.abs(t.y1-t.y2)}},16028:t=>{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},88829:(t,e,i)=>{var s=i(56694),r=i(66464),n=i(8570),a=i(52394),o=i(74077),h=i(93736),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return n(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},setFromObjects:function(t,e){return this.x1=t.x,this.y1=t.y,this.x2=e.x,this.y2=e.y,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},73273:(t,e,i)=>{var s=i(83392),r=i(1071),n=i(50599);t.exports=function(t){var e=n(t)-s.TAU;return r(e,-Math.PI,Math.PI)}},96936:(t,e,i)=>{var s=i(83392),r=i(50599);t.exports=function(t){return Math.cos(r(t)-s.TAU)}},43581:(t,e,i)=>{var s=i(83392),r=i(50599);t.exports=function(t){return Math.sin(r(t)-s.TAU)}},13990:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},1298:t=>{t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},74077:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},30473:(t,e,i)=>{var s=i(50599),r=i(73273);t.exports=function(t,e){return 2*r(e)-Math.PI-s(t)}},25968:(t,e,i)=>{var s=i(1809);t.exports=function(t,e){var i=(t.x1+t.x2)/2,r=(t.y1+t.y2)/2;return s(t,i,r,e)}},24296:(t,e,i)=>{var s=i(1809);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},1809:t=>{t.exports=function(t,e,i,s){var r=Math.cos(s),n=Math.sin(s),a=t.x1-e,o=t.y1-i;return t.x1=a*r-o*n+e,t.y1=a*n+o*r+i,a=t.x2-e,o=t.y2-i,t.x2=a*r-o*n+e,t.y2=a*n+o*r+i,t}},88171:t=>{t.exports=function(t,e,i,s,r){return t.x1=e,t.y1=i,t.x2=e+Math.cos(s)*r,t.y2=i+Math.sin(s)*r,t}},82797:t=>{t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},41067:t=>{t.exports=function(t){return Math.abs(t.x1-t.x2)}},28482:(t,e,i)=>{var s=i(88829);s.Angle=i(50599),s.BresenhamPoints=i(58813),s.CenterOn=i(88513),s.Clone=i(26718),s.CopyFrom=i(88930),s.Equals=i(90656),s.Extend=i(30897),s.GetEasedPoints=i(30684),s.GetMidPoint=i(20487),s.GetNearestPoint=i(11222),s.GetNormal=i(7377),s.GetPoint=i(66464),s.GetPoints=i(8570),s.GetShortestDistance=i(65269),s.Height=i(82996),s.Length=i(16028),s.NormalAngle=i(73273),s.NormalX=i(96936),s.NormalY=i(43581),s.Offset=i(13990),s.PerpSlope=i(1298),s.Random=i(74077),s.ReflectAngle=i(30473),s.Rotate=i(25968),s.RotateAroundPoint=i(24296),s.RotateAroundXY=i(1809),s.SetToAngle=i(88171),s.Slope=i(82797),s.Width=i(41067),t.exports=s},18693:(t,e,i)=>{var s=i(56694),r=i(74118),n=i(93736);function a(t,e,i,s){var r=t-i,n=e-s,a=r*r+n*n;return Math.sqrt(a)}var o=new s({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new r,this._inCenter=new n},getInCenter:function(t){void 0===t&&(t=!0);var e,i,s,r,n,o,h=this.vertex1,l=this.vertex2,u=this.vertex3;t?(e=h.x,i=h.y,s=l.x,r=l.y,n=u.x,o=u.y):(e=h.vx,i=h.vy,s=l.vx,r=l.vy,n=u.vx,o=u.vy);var c=a(n,o,s,r),d=a(e,i,n,o),f=a(s,r,e,i),p=c+d+f;return this._inCenter.set((e*c+s*d+n*f)/p,(i*c+r*d+o*f)/p)},contains:function(t,e,i){var s=this.vertex1,r=this.vertex2,n=this.vertex3,a=s.vx,o=s.vy,h=r.vx,l=r.vy,u=n.vx,c=n.vy;if(i){var d=i.a,f=i.b,p=i.c,g=i.d,v=i.e,m=i.f;a=s.vx*d+s.vy*p+v,o=s.vx*f+s.vy*g+m,h=r.vx*d+r.vy*p+v,l=r.vx*f+r.vy*g+m,u=n.vx*d+n.vy*p+v,c=n.vx*f+n.vy*g+m}var x=u-a,y=c-o,T=h-a,w=l-o,E=t-a,S=e-o,b=x*x+y*y,A=x*T+y*w,_=x*E+y*S,C=T*T+w*w,R=T*E+w*S,M=b*C-A*A,P=0===M?0:1/M,L=(C*_-A*R)*P,O=(b*R-A*_)*P;return L>=0&&O>=0&&L+O<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,s=this.vertex3,r=(i.vx-e.vx)*(s.vy-e.vy)-(i.vy-e.vy)*(s.vx-e.vx);return t<=0?r>=0:r<0},load:function(t,e,i,s,r){return i=this.vertex1.load(t,e,i,s,r),i=this.vertex2.load(t,e,i,s,r),i=this.vertex3.load(t,e,i,s,r)},transformCoordinatesLocal:function(t,e,i,s){return this.vertex1.transformCoordinatesLocal(t,e,i,s),this.vertex2.transformCoordinatesLocal(t,e,i,s),this.vertex3.transformCoordinatesLocal(t,e,i,s),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,s=this.bounds;return s.x=Math.min(t.vx,e.vx,i.vx),s.y=Math.min(t.vy,e.vy,i.vy),s.width=Math.max(t.vx,e.vx,i.vx)-s.x,s.height=Math.max(t.vy,e.vy,i.vy)-s.y,this},isInView:function(t,e,i,s,r,n,a,o,h,l,u){this.update(s,r,n,a,o,h,l,u);var c=this.vertex1,d=this.vertex2,f=this.vertex3;if(c.ta<=0&&d.ta<=0&&f.ta<=0)return!1;if(e&&!this.isCounterClockwise(i))return!1;var p=this.bounds;p.x=Math.min(c.tx,d.tx,f.tx),p.y=Math.min(c.ty,d.ty,f.ty),p.width=Math.max(c.tx,d.tx,f.tx)-p.x,p.height=Math.max(c.ty,d.ty,f.ty)-p.y;var g=t.x+t.width,v=t.y+t.height;return!(p.width<=0||p.height<=0||t.width<=0||t.height<=0)&&!(p.right<t.x||p.bottom<t.y||p.x>g||p.y>v)},scrollUV:function(t,e){return this.vertex1.scrollUV(t,e),this.vertex2.scrollUV(t,e),this.vertex3.scrollUV(t,e),this},scaleUV:function(t,e){return this.vertex1.scaleUV(t,e),this.vertex2.scaleUV(t,e),this.vertex3.scaleUV(t,e),this},setColor:function(t){return this.vertex1.color=t,this.vertex2.color=t,this.vertex3.color=t,this},update:function(t,e,i,s,r,n,a,o){return this.vertex1.update(e,i,s,r,n,a,o,t),this.vertex2.update(e,i,s,r,n,a,o,t),this.vertex3.update(e,i,s,r,n,a,o,t),this},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,s=this.vertex2,r=this.vertex3;return i.x+=t,i.y+=e,s.x+=t,s.y+=e,r.x+=t,r.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=o},99425:(t,e,i)=>{var s=i(18693),r=i(72632),n=i(16650),a=i(70015),o=i(85769),h=new a,l=new a,u=new n;t.exports=function(t){var e,i=r(t,"mesh"),n=r(t,"texture",null),a=r(t,"frame"),c=r(t,"width",1),d=r(t,"height",c),f=r(t,"widthSegments",1),p=r(t,"heightSegments",f),g=r(t,"x",0),v=r(t,"y",0),m=r(t,"z",0),x=r(t,"rotateX",0),y=r(t,"rotateY",0),T=r(t,"rotateZ",0),w=r(t,"zIsUp",!0),E=r(t,"isOrtho",!!i&&i.dirtyCache[11]),S=r(t,"colors",[16777215]),b=r(t,"alphas",[1]),A=r(t,"tile",!1),_=r(t,"flipY",!1),C=r(t,"width",null),R={faces:[],verts:[]};if(h.set(g,v,m),l.set(x,y,T),u.fromRotationXYTranslation(l,h,w),!n&&i)n=i.texture,a||(e=i.frame);else if(i&&"string"==typeof n)n=i.scene.sys.textures.get(n);else if(!n)return R;e||(e=n.get(a)),!C&&E&&n&&i&&(c=e.width/i.height,d=e.height/i.height);var M,P,L=c/2,O=d/2,F=Math.floor(f),D=Math.floor(p),k=F+1,I=D+1,B=c/F,N=d/D,X=[],U=[],Y=0,z=1,G=0,W=1;e&&(Y=e.u0,z=e.u1,_?(G=e.v1,W=e.v0):(G=e.v0,W=e.v1));var V=z-Y,H=W-G;for(P=0;P<I;P++){var j=P*N-O;for(M=0;M<k;M++){var K=M*B-L;U.push(K,-j);var q=Y+V*(M/F),Z=G+H*(P/D);X.push(q,Z)}}Array.isArray(S)||(S=[S]),Array.isArray(b)||(b=[b]);var J=0,Q=0;for(P=0;P<D;P++)for(M=0;M<F;M++){var $=2*(M+k*P),tt=2*(M+k*(P+1)),et=2*(M+1+k*(P+1)),it=2*(M+1+k*P),st=S[Q],rt=b[J],nt=new o(U[$],U[$+1],0,X[$],X[$+1],st,rt).transformMat4(u),at=new o(U[tt],U[tt+1],0,X[tt],X[tt+1],st,rt).transformMat4(u),ot=new o(U[it],U[it+1],0,X[it],X[it+1],st,rt).transformMat4(u),ht=new o(U[tt],U[tt+1],0,X[tt],X[tt+1],st,rt).transformMat4(u),lt=new o(U[et],U[et+1],0,X[et],X[et+1],st,rt).transformMat4(u),ut=new o(U[it],U[it+1],0,X[it],X[it+1],st,rt).transformMat4(u);A&&(nt.setUVs(Y,W),at.setUVs(Y,G),ot.setUVs(z,W),ht.setUVs(Y,G),lt.setUVs(z,G),ut.setUVs(z,W)),++Q===S.length&&(Q=0),++J===b.length&&(J=0),R.verts.push(nt,at,ot,ht,lt,ut),R.faces.push(new s(nt,at,ot),new s(ht,lt,ut))}return i&&(i.faces=i.faces.concat(R.faces),i.vertices=i.vertices.concat(R.verts)),R}},53267:(t,e,i)=>{var s=i(18693),r=i(16650),n=i(70015),a=i(85769),o=new n,h=new n,l=new r;t.exports=function(t,e,i,r,n,u,c,d,f,p){void 0===i&&(i=1),void 0===r&&(r=0),void 0===n&&(n=0),void 0===u&&(u=0),void 0===c&&(c=0),void 0===d&&(d=0),void 0===f&&(f=0),void 0===p&&(p=!0);var g={faces:[],verts:[]},v=t.materials;o.set(r,n,u),h.set(c,d,f),l.fromRotationXYTranslation(h,o,p);for(var m=0;m<t.models.length;m++)for(var x=t.models[m],y=x.vertices,T=x.textureCoords,w=x.faces,E=0;E<w.length;E++){var S=w[E],b=S.vertices[0],A=S.vertices[1],_=S.vertices[2],C=y[b.vertexIndex],R=y[A.vertexIndex],M=y[_.vertexIndex],P=b.textureCoordsIndex,L=A.textureCoordsIndex,O=_.textureCoordsIndex,F=-1===P?{u:0,v:1}:T[P],D=-1===L?{u:0,v:0}:T[L],k=-1===O?{u:1,v:1}:T[O],I=16777215;""!==S.material&&v[S.material]&&(I=v[S.material]);var B=new a(C.x*i,C.y*i,C.z*i,F.u,F.v,I).transformMat4(l),N=new a(R.x*i,R.y*i,R.z*i,D.u,D.v,I).transformMat4(l),X=new a(M.x*i,M.y*i,M.z*i,k.u,k.v,I).transformMat4(l);g.verts.push(B,N,X),g.faces.push(new s(B,N,X))}return e&&(e.faces=e.faces.concat(g.faces),e.vertices=e.vertices.concat(g.verts)),g}},67623:(t,e,i)=>{var s=i(18693),r=i(85769);t.exports=function(t,e,i,n,a,o,h,l){if(void 0===n&&(n=!1),void 0===o&&(o=16777215),void 0===h&&(h=1),void 0===l&&(l=!1),t.length===e.length||n){var u,c,d,f,p,g,v,m,x,y,T,w={faces:[],vertices:[]},E=n?3:2,S=Array.isArray(o),b=Array.isArray(h);if(Array.isArray(i)&&i.length>0)for(u=0;u<i.length;u++){var A=i[u],_=2*i[u],C=i[u]*E;c=t[C],d=t[C+1],f=n?t[C+2]:0,p=e[_],g=e[_+1],l&&(g=1-g),v=S?o[A]:o,m=b?h[A]:h,x=0,y=0,T=0,a&&(x=a[C],y=a[C+1],T=n?a[C+2]:0),w.vertices.push(new r(c,d,f,p,g,v,m,x,y,T))}else{var R=0,M=0;for(u=0;u<t.length;u+=E)c=t[u],d=t[u+1],f=n?t[u+2]:0,p=e[R],g=e[R+1],v=S?o[M]:o,m=b?h[M]:h,x=0,y=0,T=0,a&&(x=a[u],y=a[u+1],T=n?a[u+2]:0),w.vertices.push(new r(c,d,f,p,g,v,m,x,y,T)),R+=2,M++}for(u=0;u<w.vertices.length;u+=3){var P=w.vertices[u],L=w.vertices[u+1],O=w.vertices[u+2];w.faces.push(new s(P,L,O))}return w}console.warn("GenerateVerts: vertices and uvs count not equal")}},27291:t=>{var e=!0,i="untitled",s="",r="";function n(t){var e=t.indexOf("#");return e>-1?t.substring(0,e):t}function a(t){return 0===t.models.length&&t.models.push({faces:[],name:i,textureCoords:[],vertexNormals:[],vertices:[]}),s="",t.models[t.models.length-1]}function o(t,e){var r=t.length>=2?t[1]:i;e.models.push({faces:[],name:r,textureCoords:[],vertexNormals:[],vertices:[]}),s=""}function h(t){2===t.length&&(s=t[1])}function l(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,r=i>=3?parseFloat(t[2]):0,n=i>=4?parseFloat(t[3]):0;a(e).vertices.push({x:s,y:r,z:n})}function u(t,i){var s=t.length,r=s>=2?parseFloat(t[1]):0,n=s>=3?parseFloat(t[2]):0,o=s>=4?parseFloat(t[3]):0;isNaN(r)&&(r=0),isNaN(n)&&(n=0),isNaN(o)&&(o=0),e&&(n=1-n),a(i).textureCoords.push({u:r,v:n,w:o})}function c(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,r=i>=3?parseFloat(t[2]):0,n=i>=4?parseFloat(t[3]):0;a(e).vertexNormals.push({x:s,y:r,z:n})}function d(t,e){var i=t.length-1;if(!(i<3)){for(var n={group:s,material:r,vertices:[]},o=0;o<i;o++){var h=t[o+1].split("/"),l=h.length;if(!(l<1||l>3)){var u=0,c=0,d=0;u=parseInt(h[0],10),l>1&&""!==h[1]&&(c=parseInt(h[1],10)),l>2&&(d=parseInt(h[2],10)),0!==u&&(u<0&&(u=a(e).vertices.length+1+u),c-=1,u-=1,d-=1,n.vertices.push({textureCoordsIndex:c,vertexIndex:u,vertexNormalIndex:d}))}}a(e).faces.push(n)}}function f(t,e){t.length>=2&&e.materialLibraries.push(t[1])}function p(t){t.length>=2&&(r=t[1])}t.exports=function(t,i){void 0===i&&(i=!0),e=i;var a={materials:{},materialLibraries:[],models:[]};s="",r="";for(var g=t.split("\n"),v=0;v<g.length;v++){var m=n(g[v]).replace(/\s\s+/g," ").trim().split(" ");switch(m[0].toLowerCase()){case"o":o(m,a);break;case"g":h(m);break;case"v":l(m,a);break;case"vt":u(m,a);break;case"vn":c(m,a);break;case"f":d(m,a);break;case"mtllib":f(m,a);break;case"usemtl":p(m)}}return a}},76799:(t,e,i)=>{var s=i(22946);t.exports=function(t){for(var e={},i=t.split("\n"),r="",n=0;n<i.length;n++){var a=i[n].trim();if(0!==a.indexOf("#")&&""!==a){var o=a.replace(/\s\s+/g," ").trim().split(" ");switch(o[0].toLowerCase()){case"newmtl":r=o[1];break;case"kd":var h=Math.floor(255*o[1]),l=o.length>=2?Math.floor(255*o[2]):h,u=o.length>=3?Math.floor(255*o[3]):h;e[r]=s(h,l,u)}}}return e}},15313:t=>{t.exports=function(t,e,i,s){var r,n;if(void 0===i&&void 0===s){var a=t.getInCenter();r=a.x,n=a.y}var o=Math.cos(e),h=Math.sin(e),l=t.vertex1,u=t.vertex2,c=t.vertex3,d=l.x-r,f=l.y-n;l.set(d*o-f*h+r,d*h+f*o+n),d=u.x-r,f=u.y-n,u.set(d*o-f*h+r,d*h+f*o+n),d=c.x-r,f=c.y-n,c.set(d*o-f*h+r,d*h+f*o+n)}},85769:(t,e,i)=>{var s=i(56694),r=i(75512),n=i(70015),a=new s({Extends:n,initialize:function(t,e,i,s,r,a,o,h,l,u){void 0===a&&(a=16777215),void 0===o&&(o=1),void 0===h&&(h=0),void 0===l&&(l=0),void 0===u&&(u=0),n.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=h,this.ny=l,this.nz=u,this.u=s,this.v=r,this.color=a,this.alpha=o,this.tx=0,this.ty=0,this.ta=0,this.tu=s,this.tv=r},setUVs:function(t,e){return this.u=t,this.v=e,this.tu=t,this.tv=e,this},scrollUV:function(t,e){return this.tu+=t,this.tv+=e,this},scaleUV:function(t,e){return this.tu=this.u*t,this.tv=this.v*e,this},transformCoordinatesLocal:function(t,e,i,s){var r=this.x,n=this.y,a=this.z,o=t.val,h=r*o[0]+n*o[4]+a*o[8]+o[12],l=r*o[1]+n*o[5]+a*o[9]+o[13],u=r*o[2]+n*o[6]+a*o[10]+o[14],c=r*o[3]+n*o[7]+a*o[11]+o[15];this.vx=h/c*e,this.vy=-l/c*i,this.vz=s<=0?u/c:-u/c},resize:function(t,e,i,s,r,n){return this.x=t,this.y=e,this.vx=this.x*i,this.vy=-this.y*s,this.vz=0,r<.5?this.vx+=i*(.5-r):r>.5&&(this.vx-=i*(r-.5)),n<.5?this.vy+=s*(.5-n):n>.5&&(this.vy-=s*(n-.5)),this},update:function(t,e,i,s,r,n,a,o){var h=this.vx*t+this.vy*i+r,l=this.vx*e+this.vy*s+n;return a&&(h=Math.round(h),l=Math.round(l)),this.tx=h,this.ty=l,this.ta=this.alpha*o,this},load:function(t,e,i,s,n){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.tu,t[++i]=this.tv,t[++i]=s,t[++i]=n,e[++i]=r.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=a},14293:(t,e,i)=>{var s={Face:i(18693),GenerateGridVerts:i(99425),GenerateObjVerts:i(53267),GenerateVerts:i(67623),ParseObj:i(27291),ParseObjMaterial:i(76799),RotateFace:i(15313),Vertex:i(85769)};t.exports=s},77601:t=>{t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},38933:(t,e,i)=>{var s=i(79967);t.exports=function(t){return new s(t.x,t.y)}},47103:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y)}},13625:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},12536:t=>{t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},54205:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){if(void 0===e&&(e=new s),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var r=0;r<i;r++)e.x+=t[r].x,e.y+=t[r].y;e.x/=i,e.y/=i}return e}},50083:t=>{t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},82712:t=>{t.exports=function(t){return t.x*t.x+t.y*t.y}},20052:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,o=0;o<t.length;o++){var h=t[o];h.x>i&&(i=h.x),h.x<r&&(r=h.x),h.y>n&&(n=h.y),h.y<a&&(a=h.y)}return e.x=r,e.y=a,e.width=i-r,e.height=n-a,e}},77154:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i,r){return void 0===i&&(i=0),void 0===r&&(r=new s),r.x=t.x+(e.x-t.x)*i,r.y=t.y+(e.y-t.y)*i,r}},42397:t=>{t.exports=function(t){return t.setTo(t.y,t.x)}},59464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.setTo(-t.x,-t.y)}},79967:(t,e,i)=>{var s=i(56694),r=i(52394),n=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=n},53581:(t,e,i)=>{var s=i(79967),r=i(82712);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=(t.x*e.x+t.y*e.y)/r(e);return 0!==n&&(i.x=n*e.x,i.y=n*e.y),i}},50817:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=t.x*e.x+t.y*e.y;return 0!==r&&(i.x=r*e.x,i.y=r*e.y),i}},40525:(t,e,i)=>{var s=i(50083);t.exports=function(t,e){if(0!==t.x||0!==t.y){var i=s(t);t.x/=i,t.y/=i}return t.x*=e,t.y*=e,t}},63472:(t,e,i)=>{var s=i(79967);s.Ceil=i(77601),s.Clone=i(38933),s.CopyFrom=i(47103),s.Equals=i(13625),s.Floor=i(12536),s.GetCentroid=i(54205),s.GetMagnitude=i(50083),s.GetMagnitudeSq=i(82712),s.GetRectangleFromPoints=i(20052),s.Interpolate=i(77154),s.Invert=i(42397),s.Negative=i(59464),s.Project=i(53581),s.ProjectUnit=i(50817),s.SetMagnitude=i(40525),t.exports=s},19631:(t,e,i)=>{var s=i(8580);t.exports=function(t){return new s(t.points)}},45604:t=>{t.exports=function(t,e,i){for(var s=!1,r=-1,n=t.points.length-1;++r<t.points.length;n=r){var a=t.points[r].x,o=t.points[r].y,h=t.points[n].x,l=t.points[n].y;(o<=i&&i<l||l<=i&&i<o)&&e<(h-a)*(i-o)/(l-o)+a&&(s=!s)}return s}},87289:(t,e,i)=>{var s=i(45604);t.exports=function(t,e){return s(t,e.x,e.y)}},11117:t=>{"use strict";function e(t,e,s){s=s||2;var n,a,o,h,c,d,p,g=e&&e.length,v=g?e[0]*s:t.length,m=i(t,0,v,s,!0),x=[];if(!m||m.next===m.prev)return x;if(g&&(m=function(t,e,s,r){var n,a,o,h=[];for(n=0,a=e.length;n<a;n++)(o=i(t,e[n]*r,n<a-1?e[n+1]*r:t.length,r,!1))===o.next&&(o.steiner=!0),h.push(f(o));for(h.sort(l),n=0;n<h.length;n++)s=u(h[n],s);return s}(t,e,m,s)),t.length>80*s){n=o=t[0],a=h=t[1];for(var y=s;y<v;y+=s)(c=t[y])<n&&(n=c),(d=t[y+1])<a&&(a=d),c>o&&(o=c),d>h&&(h=d);p=0!==(p=Math.max(o-n,h-a))?32767/p:0}return r(m,x,s,n,a,p,0),x}function i(t,e,i,s,r){var n,a;if(r===_(t,e,i,s)>0)for(n=e;n<i;n+=s)a=S(n,t[n],t[n+1],a);else for(n=i-s;n>=e;n-=s)a=S(n,t[n],t[n+1],a);return a&&m(a,a.next)&&(b(a),a=a.next),a}function s(t,e){if(!t)return t;e||(e=t);var i,s=t;do{if(i=!1,s.steiner||!m(s,s.next)&&0!==v(s.prev,s,s.next))s=s.next;else{if(b(s),(s=e=s.prev)===s.next)break;i=!0}}while(i||s!==e);return e}function r(t,e,i,l,u,c,f){if(t){!f&&c&&function(t,e,i,s){var r=t;do{0===r.z&&(r.z=d(r.x,r.y,e,i,s)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,i,s,r,n,a,o,h,l=1;do{for(i=t,t=null,n=null,a=0;i;){for(a++,s=i,o=0,e=0;e<l&&(o++,s=s.nextZ);e++);for(h=l;o>0||h>0&&s;)0!==o&&(0===h||!s||i.z<=s.z)?(r=i,i=i.nextZ,o--):(r=s,s=s.nextZ,h--),n?n.nextZ=r:t=r,r.prevZ=n,n=r;i=s}n.nextZ=null,l*=2}while(a>1)}(r)}(t,l,u,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?a(t,l,u,c):n(t))e.push(p.i/i|0),e.push(t.i/i|0),e.push(g.i/i|0),b(t),t=g.next,v=g.next;else if((t=g)===v){f?1===f?r(t=o(s(t),e,i),e,i,l,u,c,2):2===f&&h(t,e,i,l,u,c):r(s(t),e,i,l,u,c,1);break}}}function n(t){var e=t.prev,i=t,s=t.next;if(v(e,i,s)>=0)return!1;for(var r=e.x,n=i.x,a=s.x,o=e.y,h=i.y,l=s.y,u=r<n?r<a?r:a:n<a?n:a,c=o<h?o<l?o:l:h<l?h:l,d=r>n?r>a?r:a:n>a?n:a,f=o>h?o>l?o:l:h>l?h:l,g=s.next;g!==e;){if(g.x>=u&&g.x<=d&&g.y>=c&&g.y<=f&&p(r,o,n,h,a,l,g.x,g.y)&&v(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function a(t,e,i,s){var r=t.prev,n=t,a=t.next;if(v(r,n,a)>=0)return!1;for(var o=r.x,h=n.x,l=a.x,u=r.y,c=n.y,f=a.y,g=o<h?o<l?o:l:h<l?h:l,m=u<c?u<f?u:f:c<f?c:f,x=o>h?o>l?o:l:h>l?h:l,y=u>c?u>f?u:f:c>f?c:f,T=d(g,m,e,i,s),w=d(x,y,e,i,s),E=t.prevZ,S=t.nextZ;E&&E.z>=T&&S&&S.z<=w;){if(E.x>=g&&E.x<=x&&E.y>=m&&E.y<=y&&E!==r&&E!==a&&p(o,u,h,c,l,f,E.x,E.y)&&v(E.prev,E,E.next)>=0)return!1;if(E=E.prevZ,S.x>=g&&S.x<=x&&S.y>=m&&S.y<=y&&S!==r&&S!==a&&p(o,u,h,c,l,f,S.x,S.y)&&v(S.prev,S,S.next)>=0)return!1;S=S.nextZ}for(;E&&E.z>=T;){if(E.x>=g&&E.x<=x&&E.y>=m&&E.y<=y&&E!==r&&E!==a&&p(o,u,h,c,l,f,E.x,E.y)&&v(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;S&&S.z<=w;){if(S.x>=g&&S.x<=x&&S.y>=m&&S.y<=y&&S!==r&&S!==a&&p(o,u,h,c,l,f,S.x,S.y)&&v(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function o(t,e,i){var r=t;do{var n=r.prev,a=r.next.next;!m(n,a)&&x(n,r,r.next,a)&&w(n,a)&&w(a,n)&&(e.push(n.i/i|0),e.push(r.i/i|0),e.push(a.i/i|0),b(r),b(r.next),r=t=a),r=r.next}while(r!==t);return s(r)}function h(t,e,i,n,a,o){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&g(h,l)){var u=E(h,l);return h=s(h,h.next),u=s(u,u.next),r(h,e,i,n,a,o,0),void r(u,e,i,n,a,o,0)}l=l.next}h=h.next}while(h!==t)}function l(t,e){return t.x-e.x}function u(t,e){var i=function(t,e){var i,s=e,r=t.x,n=t.y,a=-1/0;do{if(n<=s.y&&n>=s.next.y&&s.next.y!==s.y){var o=s.x+(n-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(o<=r&&o>a&&(a=o,i=s.x<s.next.x?s:s.next,o===r))return i}s=s.next}while(s!==e);if(!i)return null;var h,l=i,u=i.x,d=i.y,f=1/0;s=i;do{r>=s.x&&s.x>=u&&r!==s.x&&p(n<d?r:a,n,u,d,n<d?a:r,n,s.x,s.y)&&(h=Math.abs(n-s.y)/(r-s.x),w(s,t)&&(h<f||h===f&&(s.x>i.x||s.x===i.x&&c(i,s)))&&(i=s,f=h)),s=s.next}while(s!==l);return i}(t,e);if(!i)return e;var r=E(i,t);return s(r,r.next),s(i,i.next)}function c(t,e){return v(t.prev,t,e.prev)<0&&v(e.next,t,t.next)<0}function d(t,e,i,s,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*r|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-s)*r|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function f(t){var e=t,i=t;do{(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),e=e.next}while(e!==t);return i}function p(t,e,i,s,r,n,a,o){return(r-a)*(e-o)>=(t-a)*(n-o)&&(t-a)*(s-o)>=(i-a)*(e-o)&&(i-a)*(n-o)>=(r-a)*(s-o)}function g(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var i=t,s=!1,r=(t.x+e.x)/2,n=(t.y+e.y)/2;do{i.y>n!=i.next.y>n&&i.next.y!==i.y&&r<(i.next.x-i.x)*(n-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s}(t,e)&&(v(t.prev,t,e.prev)||v(t,e.prev,e))||m(t,e)&&v(t.prev,t,t.next)>0&&v(e.prev,e,e.next)>0)}function v(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,s){var r=T(v(t,e,i)),n=T(v(t,e,s)),a=T(v(i,s,t)),o=T(v(i,s,e));return r!==n&&a!==o||(!(0!==r||!y(t,i,e))||(!(0!==n||!y(t,s,e))||(!(0!==a||!y(i,t,s))||!(0!==o||!y(i,e,s)))))}function y(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function T(t){return t>0?1:t<0?-1:0}function w(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function E(t,e){var i=new A(t.i,t.x,t.y),s=new A(e.i,e.x,e.y),r=t.next,n=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,s.next=i,i.prev=s,n.next=s,s.prev=n,s}function S(t,e,i,s){var r=new A(t,e,i);return s?(r.next=s.next,r.prev=s,s.next.prev=r,s.next=r):(r.prev=r,r.next=r),r}function b(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _(t,e,i,s){for(var r=0,n=e,a=i-s;n<i;n+=s)r+=(t[a]-t[n])*(t[n+1]+t[a+1]),a=n;return r}e.deviation=function(t,e,i,s){var r=e&&e.length,n=r?e[0]*i:t.length,a=Math.abs(_(t,0,n,i));if(r)for(var o=0,h=e.length;o<h;o++){var l=e[o]*i,u=o<h-1?e[o+1]*i:t.length;a-=Math.abs(_(t,l,u,i))}var c=0;for(o=0;o<s.length;o+=3){var d=s[o]*i,f=s[o+1]*i,p=s[o+2]*i;c+=Math.abs((t[d]-t[p])*(t[f+1]-t[d+1])-(t[d]-t[f])*(t[p+1]-t[d+1]))}return 0===a&&0===c?0:Math.abs((c-a)/a)},e.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},s=0,r=0;r<t.length;r++){for(var n=0;n<t[r].length;n++)for(var a=0;a<e;a++)i.vertices.push(t[r][n][a]);r>0&&(s+=t[r-1].length,i.holes.push(s))}return i},t.exports=e},14045:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i,r=1/0,n=1/0,a=-r,o=-n,h=0;h<t.points.length;h++)i=t.points[h],r=Math.min(r,i.x),n=Math.min(n,i.y),a=Math.max(a,i.x),o=Math.max(o,i.y);return e.x=r,e.y=n,e.width=a-r,e.height=o-n,e}},98286:t=>{t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i<t.points.length;i++)e.push(t.points[i].x),e.push(t.points[i].y);return e}},89294:(t,e,i)=>{var s=i(16028),r=i(88829),n=i(5159);t.exports=function(t,e,i,a){void 0===a&&(a=[]);var o=t.points,h=n(t);!e&&i>0&&(e=h/i);for(var l=0;l<e;l++)for(var u=h*(l/e),c=0,d=0;d<o.length;d++){var f=o[d],p=o[(d+1)%o.length],g=new r(f.x,f.y,p.x,p.y),v=s(g);if(!(u<c||u>c+v)){var m=g.getPoint((u-c)/v);a.push(m);break}c+=v}return a}},5159:(t,e,i)=>{var s=i(16028),r=i(88829);t.exports=function(t){for(var e=t.points,i=0,n=0;n<e.length;n++){var a=e[n],o=e[(n+1)%e.length],h=new r(a.x,a.y,o.x,o.y);i+=s(h)}return i}},8580:(t,e,i)=>{var s=i(56694),r=i(45604),n=i(89294),a=i(52394),o=new s({initialize:function(t){this.type=a.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return r(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=0;i<t.length;i++)e={x:0,y:0},"number"==typeof t[i]||"string"==typeof t[i]?(e.x=parseFloat(t[i]),e.y=parseFloat(t[i+1]),i++):Array.isArray(t[i])?(e.x=t[i][0],e.y=t[i][1]):(e.x=t[i].x,e.y=t[i].y),this.points.push(e);return this.calculateArea(),this},calculateArea:function(){if(this.points.length<3)return this.area=0,this.area;for(var t,e,i=0,s=0;s<this.points.length-1;s++)t=this.points[s],i+=((e=this.points[s+1]).x-t.x)*(t.y+e.y);return t=this.points[0],e=this.points[this.points.length-1],i+=(t.x-e.x)*(e.y+t.y),this.area=.5*-i,this.area},getPoints:function(t,e,i){return n(this,t,e,i)}});t.exports=o},32244:t=>{t.exports=function(t){return t.points.reverse(),t}},95874:t=>{function e(t,e,i){var s=e.x,r=e.y,n=i.x-s,a=i.y-r;if(0!==n||0!==a){var o=((t.x-s)*n+(t.y-r)*a)/(n*n+a*a);o>1?(s=i.x,r=i.y):o>0&&(s+=n*o,r+=a*o)}return(n=t.x-s)*n+(a=t.y-r)*a}function i(t,s,r,n,a){for(var o,h=n,l=s+1;l<r;l++){var u=e(t[l],t[s],t[r]);u>h&&(o=l,h=u)}h>n&&(o-s>1&&i(t,s,o,n,a),a.push(t[o]),r-o>1&&i(t,o,r,n,a))}function s(t,e){var s=t.length-1,r=[t[0]];return i(t,0,s,e,r),r.push(t[s]),r}t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var r=t.points;if(r.length>2){var n=e*e;i||(r=function(t,e){for(var i,s,r,n,a,o=t[0],h=[o],l=1,u=t.length;l<u;l++)i=t[l],r=o,n=void 0,a=void 0,n=(s=i).x-r.x,a=s.y-r.y,n*n+a*a>e&&(h.push(i),o=i);return o!==i&&h.push(i),h}(r,n)),t.setTo(s(r,n))}return t}},18974:t=>{var e=function(t,e){return t[0]=e[0],t[1]=e[1],t};t.exports=function(t){var i,s=[],r=t.points;for(i=0;i<r.length;i++)s.push([r[i].x,r[i].y]);var n=[];for(s.length>0&&n.push(e([0,0],s[0])),i=0;i<s.length-1;i++){var a=s[i],o=s[i+1],h=a[0],l=a[1],u=o[0],c=o[1];n.push([.85*h+.15*u,.85*l+.15*c]),n.push([.15*h+.85*u,.15*l+.85*c])}return s.length>1&&n.push(e([0,0],s[s.length-1])),t.setTo(n)}},23490:t=>{t.exports=function(t,e,i){for(var s=t.points,r=0;r<s.length;r++)s[r].x+=e,s[r].y+=i;return t}},44359:(t,e,i)=>{var s=i(8580);s.Clone=i(19631),s.Contains=i(45604),s.ContainsPoint=i(87289),s.Earcut=i(11117),s.GetAABB=i(14045),s.GetNumberArray=i(98286),s.GetPoints=i(89294),s.Perimeter=i(5159),s.Reverse=i(32244),s.Simplify=i(95874),s.Smooth=i(18974),s.Translate=i(23490),t.exports=s},1653:t=>{t.exports=function(t){return t.width*t.height}},33943:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},58662:t=>{t.exports=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}},79993:t=>{t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},81572:(t,e,i)=>{var s=i(74118);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},94287:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},28687:(t,e,i)=>{var s=i(94287);t.exports=function(t,e){return s(t,e.x,e.y)}},73222:t=>{t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&(e.x>t.x&&e.x<t.right&&e.right>t.x&&e.right<t.right&&e.y>t.y&&e.y<t.bottom&&e.bottom>t.y&&e.bottom<t.bottom)}},29538:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},87279:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},19989:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},92628:(t,e,i)=>{var s=i(6700);t.exports=function(t,e){var i=s(t);return i<s(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},85028:(t,e,i)=>{var s=i(6700);t.exports=function(t,e){var i=s(t);return i>s(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},71356:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},21687:t=>{t.exports=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}},80222:(t,e,i)=>{var s=i(74118),r=i(83392);t.exports=function(t,e){if(void 0===e&&(e=new s),0===t.length)return e;for(var i,n,a,o=Number.MAX_VALUE,h=Number.MAX_VALUE,l=r.MIN_SAFE_INTEGER,u=r.MIN_SAFE_INTEGER,c=0;c<t.length;c++)i=t[c],Array.isArray(i)?(n=i[0],a=i[1]):(n=i.x,a=i.y),o=Math.min(o,n),h=Math.min(h,a),l=Math.max(l,n),u=Math.max(u,a);return e.x=o,e.y=h,e.width=l-o,e.height=u-h,e}},75785:(t,e,i)=>{var s=i(74118);t.exports=function(t,e,i,r,n){return void 0===n&&(n=new s),n.setTo(Math.min(t,i),Math.min(e,r),Math.abs(t-i),Math.abs(e-r))}},6700:t=>{t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},35242:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.centerX,e.y=t.centerY,e}},47698:(t,e,i)=>{var s=i(85876),r=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var n=s(t)*e;return e>.5?(n-=t.width+t.height)<=t.width?(i.x=t.right-n,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(n-t.width)):n<=t.width?(i.x=t.x+n,i.y=t.y):(i.x=t.right,i.y=t.y+(n-t.width)),i}},54932:(t,e,i)=>{var s=i(47698),r=i(85876);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=r(t)/i);for(var a=0;a<e;a++){var o=a/e;n.push(s(t,o))}return n}},31591:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.width,e.y=t.height,e}},7782:(t,e,i)=>{var s=i(79993);t.exports=function(t,e,i){var r=t.centerX,n=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),s(t,r,n)}},66217:(t,e,i)=>{var s=i(74118),r=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),r(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},40053:(t,e,i)=>{var s=i(85876),r=i(79967);t.exports=function(t,e,i,n){if(void 0===n&&(n=[]),!e&&!i)return n;e?i=Math.round(s(t)/e):e=s(t)/i;for(var a=t.x,o=t.y,h=0,l=0;l<i;l++)switch(n.push(new r(a,o)),h){case 0:(a+=e)>=t.right&&(h=1,o+=a-t.right,a=t.right);break;case 1:(o+=e)>=t.bottom&&(h=2,a-=o-t.bottom,o=t.bottom);break;case 2:(a-=e)<=t.left&&(h=3,o-=t.left-a,a=t.left);break;case 3:(o-=e)<=t.top&&(h=0,o=t.top)}return n}},86673:t=>{t.exports=function(t,e){for(var i=t.x,s=t.right,r=t.y,n=t.bottom,a=0;a<e.length;a++)i=Math.min(i,e[a].x),s=Math.max(s,e[a].x),r=Math.min(r,e[a].y),n=Math.max(n,e[a].y);return t.x=i,t.y=r,t.width=s-i,t.height=n-r,t}},14655:t=>{t.exports=function(t,e){var i=Math.min(t.x,e.x),s=Math.max(t.right,e.right);t.x=i,t.width=s-i;var r=Math.min(t.y,e.y),n=Math.max(t.bottom,e.bottom);return t.y=r,t.height=n-r,t}},44755:t=>{t.exports=function(t,e,i){var s=Math.min(t.x,e),r=Math.max(t.right,e);t.x=s,t.width=r-s;var n=Math.min(t.y,i),a=Math.max(t.bottom,i);return t.y=n,t.height=a-n,t}},74466:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},55946:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},97474:t=>{t.exports=function(t,e){return t.x<e.right&&t.right>e.x&&t.y<e.bottom&&t.bottom>e.y}},85876:t=>{t.exports=function(t){return 2*(t.width+t.height)}},20243:(t,e,i)=>{var s=i(79967),r=i(75606);t.exports=function(t,e,i){void 0===i&&(i=new s),e=r(e);var n=Math.sin(e),a=Math.cos(e),o=a>0?t.width/2:t.width/-2,h=n>0?t.height/2:t.height/-2;return Math.abs(o*n)<Math.abs(h*a)?h=o*n/a:o=h*a/n,i.x=o+t.centerX,i.y=h+t.centerY,i}},30001:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},97691:(t,e,i)=>{var s=i(17489),r=i(73222),n=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new n),r(t,e))switch(s(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},74118:(t,e,i)=>{var s=i(56694),r=i(94287),n=i(47698),a=i(54932),o=i(52394),h=i(88829),l=i(30001),u=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},51828:t=>{t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},5691:t=>{t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},58795:(t,e,i)=>{var s=i(74118);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=Math.min(t.x,e.x),n=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-r,o=Math.max(t.bottom,e.bottom)-n;return i.setTo(r,n,a,o)}},66658:(t,e,i)=>{var s=i(74118);s.Area=i(1653),s.Ceil=i(33943),s.CeilAll=i(58662),s.CenterOn=i(79993),s.Clone=i(81572),s.Contains=i(94287),s.ContainsPoint=i(28687),s.ContainsRect=i(73222),s.CopyFrom=i(29538),s.Decompose=i(87279),s.Equals=i(19989),s.FitInside=i(92628),s.FitOutside=i(85028),s.Floor=i(71356),s.FloorAll=i(21687),s.FromPoints=i(80222),s.FromXY=i(75785),s.GetAspectRatio=i(6700),s.GetCenter=i(35242),s.GetPoint=i(47698),s.GetPoints=i(54932),s.GetSize=i(31591),s.Inflate=i(7782),s.Intersection=i(66217),s.MarchingAnts=i(40053),s.MergePoints=i(86673),s.MergeRect=i(14655),s.MergeXY=i(44755),s.Offset=i(74466),s.OffsetPoint=i(55946),s.Overlaps=i(97474),s.Perimeter=i(85876),s.PerimeterPoint=i(20243),s.Random=i(30001),s.RandomOutside=i(97691),s.SameDimensions=i(51828),s.Scale=i(5691),s.Union=i(58795),t.exports=s},19108:t=>{t.exports=function(t){var e=t.x1,i=t.y1,s=t.x2,r=t.y2,n=t.x3,a=t.y3;return Math.abs(((n-e)*(r-i)-(s-e)*(a-i))/2)}},41199:(t,e,i)=>{var s=i(66349);t.exports=function(t,e,i){var r=i*(Math.sqrt(3)/2);return new s(t,e,t+i/2,e+r,t-i/2,e+r)}},88730:(t,e,i)=>{var s=i(11117),r=i(66349);t.exports=function(t,e,i,n,a){void 0===e&&(e=null),void 0===i&&(i=1),void 0===n&&(n=1),void 0===a&&(a=[]);for(var o,h,l,u,c,d,f,p,g,v=s(t,e),m=0;m<v.length;m+=3)o=v[m],h=v[m+1],l=v[m+2],u=t[2*o]*i,c=t[2*o+1]*n,d=t[2*h]*i,f=t[2*h+1]*n,p=t[2*l]*i,g=t[2*l+1]*n,a.push(new r(u,c,d,f,p,g));return a}},3635:(t,e,i)=>{var s=i(66349);t.exports=function(t,e,i,r){return void 0===r&&(r=i),new s(t,e,t,e-r,t+i,e)}},1882:(t,e,i)=>{var s=i(56595),r=i(9640);t.exports=function(t,e,i,n){void 0===n&&(n=s);var a=n(t),o=e-a.x,h=i-a.y;return r(t,o,h)}},56595:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},91835:(t,e,i)=>{var s=i(93736);function r(t,e,i,s){return t*s-e*i}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x3,n=t.y3,a=t.x1-i,o=t.y1-n,h=t.x2-i,l=t.y2-n,u=2*r(a,o,h,l),c=r(o,a*a+o*o,l,h*h+l*l),d=r(a,a*a+o*o,h,h*h+l*l);return e.x=i-c/u,e.y=n+d/u,e}},97073:(t,e,i)=>{var s=i(26673);t.exports=function(t,e){void 0===e&&(e=new s);var i,r,n=t.x1,a=t.y1,o=t.x2,h=t.y2,l=t.x3,u=t.y3,c=o-n,d=h-a,f=l-n,p=u-a,g=c*(n+o)+d*(a+h),v=f*(n+l)+p*(a+u),m=2*(c*(u-h)-d*(l-o));if(Math.abs(m)<1e-6){var x=Math.min(n,o,l),y=Math.min(a,h,u);i=.5*(Math.max(n,o,l)-x),r=.5*(Math.max(a,h,u)-y),e.x=x+i,e.y=y+r,e.radius=Math.sqrt(i*i+r*r)}else e.x=(p*g-d*v)/m,e.y=(c*v-f*g)/m,i=e.x-n,r=e.y-a,e.radius=Math.sqrt(i*i+r*r);return e}},75974:(t,e,i)=>{var s=i(66349);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},60689:t=>{t.exports=function(t,e,i){var s=t.x3-t.x1,r=t.y3-t.y1,n=t.x2-t.x1,a=t.y2-t.y1,o=e-t.x1,h=i-t.y1,l=s*s+r*r,u=s*n+r*a,c=s*o+r*h,d=n*n+a*a,f=n*o+a*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,m=(l*f-u*c)*g;return v>=0&&m>=0&&v+m<1}},86875:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=!1),void 0===s&&(s=[]);for(var r,n,a,o,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,m=p*v-g*g,x=0===m?0:1/m,y=t.x1,T=t.y1,w=0;w<e.length&&(n=(p*(l=d*(a=e[w].x-y)+f*(o=e[w].y-T))-g*(h=u*a+c*o))*x,!((r=(v*h-g*l)*x)>=0&&n>=0&&r+n<1&&(s.push({x:e[w].x,y:e[w].y}),i)));w++);return s}},51532:(t,e,i)=>{var s=i(60689);t.exports=function(t,e){return s(t,e.x,e.y)}},42538:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},18680:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},29977:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},56088:(t,e,i)=>{var s=i(79967),r=i(16028);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.getLineA(),a=t.getLineB(),o=t.getLineC();if(e<=0||e>=1)return i.x=n.x1,i.y=n.y1,i;var h=r(n),l=r(a),u=r(o),c=(h+l+u)*e,d=0;return c<h?(d=c/h,i.x=n.x1+(n.x2-n.x1)*d,i.y=n.y1+(n.y2-n.y1)*d):c>h+l?(d=(c-=h+l)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d):(d=(c-=h)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d),i}},24402:(t,e,i)=>{var s=i(16028),r=i(79967);t.exports=function(t,e,i,n){void 0===n&&(n=[]);var a=t.getLineA(),o=t.getLineB(),h=t.getLineC(),l=s(a),u=s(o),c=s(h),d=l+u+c;!e&&i>0&&(e=d/i);for(var f=0;f<e;f++){var p=d*(f/e),g=0,v=new r;p<l?(g=p/l,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g):p>l+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=o.x1+(o.x2-o.x1)*g,v.y=o.y1+(o.y2-o.y1)*g),n.push(v)}return n}},83648:(t,e,i)=>{var s=i(79967);function r(t,e,i,s){var r=t-i,n=e-s,a=r*r+n*n;return Math.sqrt(a)}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x1,n=t.y1,a=t.x2,o=t.y2,h=t.x3,l=t.y3,u=r(h,l,a,o),c=r(i,n,h,l),d=r(a,o,i,n),f=u+c+d;return e.x=(i*u+a*c+h*d)/f,e.y=(n*u+o*c+l*d)/f,e}},9640:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},95290:(t,e,i)=>{var s=i(16028);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),r=t.getLineC();return s(e)+s(i)+s(r)}},99761:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x2-t.x1,r=t.y2-t.y1,n=t.x3-t.x1,a=t.y3-t.y1,o=Math.random(),h=Math.random();return o+h>=1&&(o=1-o,h=1-h),e.x=t.x1+(i*o+n*h),e.y=t.y1+(r*o+a*h),e}},21934:(t,e,i)=>{var s=i(19211),r=i(83648);t.exports=function(t,e){var i=r(t);return s(t,i.x,i.y,e)}},68454:(t,e,i)=>{var s=i(19211);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},19211:t=>{t.exports=function(t,e,i,s){var r=Math.cos(s),n=Math.sin(s),a=t.x1-e,o=t.y1-i;return t.x1=a*r-o*n+e,t.y1=a*n+o*r+i,a=t.x2-e,o=t.y2-i,t.x2=a*r-o*n+e,t.y2=a*n+o*r+i,a=t.x3-e,o=t.y3-i,t.x3=a*r-o*n+e,t.y3=a*n+o*r+i,t}},66349:(t,e,i)=>{var s=i(56694),r=i(60689),n=i(56088),a=i(24402),o=i(52394),h=i(88829),l=i(99761),u=new s({initialize:function(t,e,i,s,r,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=0),void 0===n&&(n=0),this.type=o.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=r,this.y3=n},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s,r,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=r,this.y3=n,this},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},87619:(t,e,i)=>{var s=i(66349);s.Area=i(19108),s.BuildEquilateral=i(41199),s.BuildFromPolygon=i(88730),s.BuildRight=i(3635),s.CenterOn=i(1882),s.Centroid=i(56595),s.CircumCenter=i(91835),s.CircumCircle=i(97073),s.Clone=i(75974),s.Contains=i(60689),s.ContainsArray=i(86875),s.ContainsPoint=i(51532),s.CopyFrom=i(42538),s.Decompose=i(18680),s.Equals=i(29977),s.GetPoint=i(56088),s.GetPoints=i(24402),s.InCenter=i(83648),s.Perimeter=i(95290),s.Offset=i(9640),s.Random=i(99761),s.Rotate=i(21934),s.RotateAroundPoint=i(68454),s.RotateAroundXY=i(19211),t.exports=s},27395:t=>{t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}}},18104:t=>{t.exports=function(t,e){return function(i,s,r,n){var a=t.getPixelAlpha(s,r,n.texture.key,n.frame.name);return a&&a>=e}}},69898:(t,e,i)=>{var s=i(56694),r=i(72687),n=i(6659),a=i(33963),o=i(97081),h=i(71064),l=i(7905),u=i(40398),c=i(37579),d=i(69360),f=i(64462),p=new s({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new n,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var s=new u(this,i);s.smoothFactor=e.inputSmoothFactor,this.pointers.push(s)}this.mousePointer=e.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 d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(o.BOOT,this.boot,this)},boot:function(){var t=this.game,e=t.events;this.canvas=t.canvas,this.scaleManager=t.scale,this.events.emit(a.MANAGER_BOOT),e.on(o.PRE_RENDER,this.preRender,this),e.once(o.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(a.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(a.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(a.MANAGER_UPDATE);for(var s=0;s<i.length;s++){var r=i[s];if(r.sys.input&&r.sys.input.updatePoll(t,e)&&this.globalTopOnly)return}},setDefaultCursor:function(t){this.defaultCursor=t,this.canvas.style.cursor!==t&&(this.canvas.style.cursor=t)},setCursor:function(t){t.cursor&&(this.canvas.style.cursor=t.cursor)},resetCursor:function(t){t.cursor&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(t){void 0===t&&(t=1);var e=[];this.pointersTotal+t>10&&(t=10-this.pointersTotal);for(var i=0;i<t;i++){var s=this.pointers.length,r=new u(this,s);r.smoothFactor=this.config.inputSmoothFactor,this.pointers.push(r),this.pointersTotal++,e.push(r)}return e},updateInputPlugins:function(t,e){var i=this.game.scene.getScenes(!1,!0);this._tempSkip=!1;for(var s=0;s<i.length;s++){var r=i[s];if(r.sys.input)if(r.sys.input.update(t,e)&&this.globalTopOnly||this._tempSkip)return}},onTouchStart:function(t){for(var e=this.pointers,i=[],s=0;s<t.changedTouches.length;s++)for(var n=t.changedTouches[s],a=1;a<this.pointersTotal;a++){var o=e[a];if(!o.active){o.touchstart(n,t),this.activePointer=o,i.push(o);break}}this.updateInputPlugins(r.TOUCH_START,i)},onTouchMove:function(t){for(var e=this.pointers,i=[],s=0;s<t.changedTouches.length;s++)for(var n=t.changedTouches[s],a=1;a<this.pointersTotal;a++){var o=e[a];if(o.active&&o.identifier===n.identifier){var h=document.elementFromPoint(n.clientX,n.clientY)===this.canvas;!this.isOver&&h?this.setCanvasOver(t):this.isOver&&!h&&this.setCanvasOut(t),this.isOver&&(o.touchmove(n,t),this.activePointer=o,i.push(o));break}}this.updateInputPlugins(r.TOUCH_MOVE,i)},onTouchEnd:function(t){for(var e=this.pointers,i=[],s=0;s<t.changedTouches.length;s++)for(var n=t.changedTouches[s],a=1;a<this.pointersTotal;a++){var o=e[a];if(o.active&&o.identifier===n.identifier){o.touchend(n,t),i.push(o);break}}this.updateInputPlugins(r.TOUCH_END,i)},onTouchCancel:function(t){for(var e=this.pointers,i=[],s=0;s<t.changedTouches.length;s++)for(var n=t.changedTouches[s],a=1;a<this.pointersTotal;a++){var o=e[a];if(o.active&&o.identifier===n.identifier){o.touchcancel(n,t),i.push(o);break}}this.updateInputPlugins(r.TOUCH_CANCEL,i)},onMouseDown:function(t){var e=this.mousePointer;e.down(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(r.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(t){var e=this.mousePointer;e.move(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(r.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(t){var e=this.mousePointer;e.up(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(r.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(t){var e=this.mousePointer;e.wheel(t),this.activePointer=e,this.updateInputPlugins(r.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(t){var e=this.mouse.locked;this.mousePointer.locked=e,this.events.emit(a.POINTERLOCK_CHANGE,t,e)},inputCandidate:function(t,e){var i=t.input;if(!i||!i.enabled||!t.willRender(e))return!1;var s=!0,r=t.parentContainer;if(r)do{if(!r.willRender(e)){s=!1;break}r=r.parentContainer}while(r);return s},hitTest:function(t,e,i,s){void 0===s&&(s=this._tempHitTest);var r=this._tempPoint,n=i.scrollX,a=i.scrollY;s.length=0;var o=t.x,h=t.y;i.getWorldPoint(o,h,r),t.worldX=r.x,t.worldY=r.y;for(var l={x:0,y:0},u=this._tempMatrix,c=this._tempMatrix2,d=0;d<e.length;d++){var p=e[d];if(this.inputCandidate(p,i)){var g=r.x+n*p.scrollFactorX-n,v=r.y+a*p.scrollFactorY-a;p.parentContainer?(p.getWorldTransformMatrix(u,c),u.applyInverse(g,v,l)):f(g,v,p.x,p.y,p.rotation,p.scaleX,p.scaleY,l),this.pointWithinHitArea(p,l.x,l.y)&&s.push(p)}}return s},pointWithinHitArea:function(t,e,i){e+=t.displayOriginX,i+=t.displayOriginY;var s=t.input;return!(!s||!s.hitAreaCallback(s.hitArea,e,i,t))&&(s.localX=e,s.localY=i,!0)},pointWithinInteractiveObject:function(t,e,i){return!!t.hitArea&&(e+=t.gameObject.displayOriginX,i+=t.gameObject.displayOriginY,t.localX=e,t.localY=i,t.hitAreaCallback(t.hitArea,e,i,t))},transformPointer:function(t,e,i,s){var r=t.position,n=t.prevPosition;n.x=r.x,n.y=r.y;var a=this.scaleManager.transformX(e),o=this.scaleManager.transformY(i),h=t.smoothFactor;s&&0!==h?(r.x=a*h+n.x*(1-h),r.y=o*h+n.y*(1-h)):(r.x=a,r.y=o)},destroy:function(){this.events.removeAllListeners(),this.game.events.off(o.PRE_RENDER),this.keyboard&&this.keyboard.destroy(),this.mouse&&this.mouse.destroy(),this.touch&&this.touch.destroy();for(var t=0;t<this.pointers.length;t++)this.pointers[t].destroy();this.pointers=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}});t.exports=p},12499:(t,e,i)=>{var s=i(26673),r=i(65650),n=i(56694),a=i(72687),o=i(27395),h=i(18104),l=i(53996),u=i(95669),c=i(72313),d=i(33963),f=i(6659),p=i(72632),g=i(52394),v=i(63399),m=i(42911),x=i(53523),y=i(91963),T=i(74118),w=i(94287),E=i(7599),S=i(66349),b=i(60689),A=new n({Extends:f,initialize:function(t){f.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new f,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 e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,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,t.sys.events.once(E.BOOT,this.boot,this),t.sys.events.on(E.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(E.DESTROY,this.destroy,this),this.pluginEvents.emit(d.BOOT)},start:function(){var t=this.systems.events;t.on(E.TRANSITION_START,this.transitionIn,this),t.on(E.TRANSITION_OUT,this.transitionOut,this),t.on(E.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(E.PRE_UPDATE,this.preUpdate,this),t.once(E.SHUTDOWN,this.shutdown,this),this.manager.events.on(d.GAME_OUT,this.onGameOut,this),this.manager.events.on(d.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(d.START)},onGameOver:function(t){this.isActive()&&this.emit(d.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(d.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(d.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,s=e.length;if(0!==i||0!==s){for(var r=this._list,n=0;n<i;n++){var a=t[n],o=r.indexOf(a);o>-1&&(r.splice(o,1),this.clear(a,!0))}this._pendingRemoval.length=0,this._list=r.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,s=this.manager,r=s.pointers,n=s.pointersTotal;for(i=0;i<n;i++)r[i].updateMotion();if(0===this._list.length)return!1;var a=this.pollRate;if(-1===a)return!1;if(a>0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var o=!1;for(i=0;i<n;i++){var h=0,l=r[i];this._tempZones=[],this._temp=this.hitTestPointer(l),this.sortGameObjects(this._temp,l),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),h+=this.processOverOutEvents(l),2===this.getDragState(l)&&this.processDragThresholdEvent(l,t),h>0&&(o=!0)}return o},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,s=!1,r=0;r<i;r++){var n=0,o=e[r];switch(this._tempZones=[],this._temp=this.hitTestPointer(o),this.sortGameObjects(this._temp,o),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),t){case a.MOUSE_DOWN:n+=this.processDragDownEvent(o),n+=this.processDownEvents(o),n+=this.processOverOutEvents(o);break;case a.MOUSE_UP:n+=this.processDragUpEvent(o),n+=this.processUpEvents(o),n+=this.processOverOutEvents(o);break;case a.TOUCH_START:n+=this.processDragDownEvent(o),n+=this.processDownEvents(o),n+=this.processOverEvents(o);break;case a.TOUCH_END:case a.TOUCH_CANCEL:n+=this.processDragUpEvent(o),n+=this.processUpEvents(o),n+=this.processOutEvents(o);break;case a.MOUSE_MOVE:case a.TOUCH_MOVE:n+=this.processDragMoveEvent(o),n+=this.processMoveEvents(o),n+=this.processOverOutEvents(o);break;case a.MOUSE_WHEEL:n+=this.processWheelEvent(o)}n>0&&(s=!0)}return this._updatedThisFrame=!0,s},clear:function(t,e){void 0===e&&(e=!1),this.disable(t);var i=t.input;i&&(this.removeDebug(t),this.manager.resetCursor(i),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null),e||this.queueForRemoval(t);var s=this._draggable.indexOf(t);return s>-1&&this._draggable.splice(s,1),t},disable:function(t){var e=t.input;e&&(e.enabled=!1,e.dragState=0);for(var i,s=this._drag,r=this._over,n=this.manager,a=0;a<n.pointersTotal;a++)(i=s[a].indexOf(t))>-1&&s[a].splice(i,1),(i=r[a].indexOf(t))>-1&&r[a].splice(i,1);return this},enable:function(t,e,i,s){return void 0===s&&(s=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&s&&!t.input.dropZone&&(t.input.dropZone=s),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i<e.length;i++){for(var s=e[i],r=this.manager.hitTest(t,this._list,s),n=0;n<r.length;n++){var a=r[n];a.input.dropZone&&this._tempZones.push(a)}if(r.length>0)return t.camera=s,r}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,s=this._eventData,r=this._eventContainer;s.cancelled=!1;for(var n=!1,a=0;a<i.length;a++){var o=i[a];if(o.input&&o.input.enabled){if(e++,o.emit(d.GAMEOBJECT_POINTER_DOWN,t,o.input.localX,o.input.localY,r),s.cancelled||!o.input||!o.input.enabled){n=!0;break}if(this.emit(d.GAMEOBJECT_DOWN,t,o,r),s.cancelled||!o.input){n=!0;break}}}return!n&&this.manager&&(t.downElement===this.manager.game.canvas?this.emit(d.POINTER_DOWN,t,i):this.emit(d.POINTER_DOWN_OUTSIDE,t)),e},getDragState:function(t){return this._dragState[t.id]},setDragState:function(t,e){this._dragState[t.id]=e},processDragThresholdEvent:function(t,e){var i=!1,s=this.dragTimeThreshold,r=this.dragDistanceThreshold;if((r>0&&l(t.x,t.y,t.downX,t.downY)>=r||s>0&&e>=t.downTime+s)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i<e.length;i++){var s=e[i],r=s.input;r.dragState=2,r.dragStartX=s.x,r.dragStartY=s.y,r.dragStartXGlobal=t.worldX,r.dragStartYGlobal=t.worldY,r.dragX=r.dragStartXGlobal-r.dragStartX,r.dragY=r.dragStartYGlobal-r.dragStartY,s.emit(d.GAMEOBJECT_DRAG_START,t,r.dragX,r.dragY),this.emit(d.DRAG_START,t,s)}return this.setDragState(t,4),e.length},processDragDownEvent:function(t){var e=this._temp;if(0===this._draggable.length||0===e.length||!t.primaryDown||0!==this.getDragState(t))return 0;this.setDragState(t,1);for(var i=[],s=0;s<e.length;s++){var r=e[s];r.input.draggable&&0===r.input.dragState&&i.push(r)}return 0===i.length?(this.setDragState(t,0),0):(i.length>1&&(this.sortGameObjects(i,t),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],s=0;s<i.length;s++){var r,n,a=i[s],o=a.input,h=o.target;if(h){var l=e.indexOf(h);0===l?(a.emit(d.GAMEOBJECT_DRAG_OVER,t,h),this.emit(d.DRAG_OVER,t,a,h)):l>0?(a.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,a,h),o.target=e[0],h=o.target,a.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,a,h)):(a.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,a,h),e[0]?(o.target=e[0],h=o.target,a.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,a,h)):o.target=null)}else!h&&e[0]&&(o.target=e[0],h=o.target,a.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,a,h));if(a.parentContainer){var u=t.worldX-o.dragStartXGlobal,c=t.worldY-o.dragStartYGlobal,f=a.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),g=c*Math.cos(f)-u*Math.sin(f);p*=1/a.parentContainer.scaleX,g*=1/a.parentContainer.scaleY,r=p+o.dragStartX,n=g+o.dragStartY}else r=t.worldX-o.dragX,n=t.worldY-o.dragY;a.emit(d.GAMEOBJECT_DRAG,t,r,n),this.emit(d.DRAG,t,a,r,n)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i<e.length;i++){var s=e[i],r=s.input;if(r&&2===r.dragState){r.dragState=0,r.dragX=r.localX-s.displayOriginX,r.dragY=r.localY-s.displayOriginY;var n=!1,a=r.target;a&&(s.emit(d.GAMEOBJECT_DROP,t,a),this.emit(d.DROP,t,s,a),r.target=null,n=!0),s.input&&s.input.enabled&&(s.emit(d.GAMEOBJECT_DRAG_END,t,r.dragX,r.dragY,n),this.emit(d.DRAG_END,t,s,n))}}return this.setDragState(t,0),e.splice(0),0},processMoveEvents:function(t){var e=0,i=this._temp,s=this._eventData,r=this._eventContainer;s.cancelled=!1;for(var n=!1,a=0;a<i.length;a++){var o=i[a];if(o.input&&o.input.enabled){if(e++,o.emit(d.GAMEOBJECT_POINTER_MOVE,t,o.input.localX,o.input.localY,r),s.cancelled||!o.input||!o.input.enabled){n=!0;break}if(this.emit(d.GAMEOBJECT_MOVE,t,o,r),s.cancelled||!o.input||!o.input.enabled){n=!0;break}if(this.topOnly)break}}return n||this.emit(d.POINTER_MOVE,t,i),e},processWheelEvent:function(t){var e=0,i=this._temp,s=this._eventData,r=this._eventContainer;s.cancelled=!1;for(var n=!1,a=t.deltaX,o=t.deltaY,h=t.deltaZ,l=0;l<i.length;l++){var u=i[l];if(u.input&&u.input.enabled){if(e++,u.emit(d.GAMEOBJECT_POINTER_WHEEL,t,a,o,h,r),s.cancelled||!u.input||!u.input.enabled){n=!0;break}if(this.emit(d.GAMEOBJECT_WHEEL,t,u,a,o,h,r),s.cancelled||!u.input||!u.input.enabled){n=!0;break}}}return n||this.emit(d.POINTER_WHEEL,t,i,a,o,h),e},processOverEvents:function(t){var e=this._temp,i=0,s=e.length,r=[];if(s>0){var n=this.manager,a=this._eventData,o=this._eventContainer;a.cancelled=!1;for(var h=!1,l=0;l<s;l++){var u=e[l];if(u.input&&u.input.enabled){if(r.push(u),n.setCursor(u.input),u.emit(d.GAMEOBJECT_POINTER_OVER,t,u.input.localX,u.input.localY,o),i++,a.cancelled||!u.input||!u.input.enabled){h=!0;break}if(this.emit(d.GAMEOBJECT_OVER,t,u,o),a.cancelled||!u.input||!u.input.enabled){h=!0;break}}}h||this.emit(d.POINTER_OVER,t,r)}return this._over[t.id]=r,i},processOutEvents:function(t){var e=this._over[t.id],i=0,s=e.length;if(s>0){var r=this.manager,n=this._eventData,a=this._eventContainer;n.cancelled=!1;var o=!1;this.sortGameObjects(e,t);for(var h=0;h<s;h++){var l=e[h];if((l=e[h]).input&&l.input.enabled){if(r.resetCursor(l.input),l.emit(d.GAMEOBJECT_POINTER_OUT,t,a),i++,n.cancelled||!l.input||!l.input.enabled){o=!0;break}if(this.emit(d.GAMEOBJECT_OUT,t,l,a),n.cancelled||!l.input||!l.input.enabled){o=!0;break}o||this.emit(d.POINTER_OUT,t,e)}}this._over[t.id]=[]}return i},processOverOutEvents:function(t){var e,i,s=this._temp,r=[],n=[],a=[],o=this._over[t.id],h=this._drag[t.id],l=this.manager;for(e=0;e<o.length;e++)i=o[e],-1===s.indexOf(i)&&-1===h.indexOf(i)?r.push(i):a.push(i);for(e=0;e<s.length;e++)i=s[e],-1===o.indexOf(i)&&n.push(i);var u=r.length,c=0,f=this._eventData,p=this._eventContainer;f.cancelled=!1;var g=!1;if(u>0){for(this.sortGameObjects(r,t),e=0;e<u;e++)if((i=r[e]).input&&i.input.enabled){if(l.resetCursor(i.input),i.emit(d.GAMEOBJECT_POINTER_OUT,t,p),c++,f.cancelled||!i.input||!i.input.enabled){g=!0;break}if(this.emit(d.GAMEOBJECT_OUT,t,i,p),f.cancelled||!i.input||!i.input.enabled){g=!0;break}}g||this.emit(d.POINTER_OUT,t,r)}if(u=n.length,f.cancelled=!1,g=!1,u>0){for(this.sortGameObjects(n,t),e=0;e<u;e++)if((i=n[e]).input&&i.input.enabled){if(l.setCursor(i.input),i.emit(d.GAMEOBJECT_POINTER_OVER,t,i.input.localX,i.input.localY,p),c++,f.cancelled||!i.input||!i.input.enabled){g=!0;break}if(this.emit(d.GAMEOBJECT_OVER,t,i,p),f.cancelled||!i.input||!i.input.enabled){g=!0;break}}g||this.emit(d.POINTER_OVER,t,n)}return o=a.concat(n),this._over[t.id]=this.sortGameObjects(o,t),c},processUpEvents:function(t){var e=this._temp,i=this._eventData,s=this._eventContainer;i.cancelled=!1;for(var r=!1,n=0;n<e.length;n++){var a=e[n];if(a.input&&a.input.enabled){if(a.emit(d.GAMEOBJECT_POINTER_UP,t,a.input.localX,a.input.localY,s),i.cancelled||!a.input||!a.input.enabled){r=!0;break}if(this.emit(d.GAMEOBJECT_UP,t,a,s),i.cancelled||!a.input||!a.input.enabled){r=!0;break}}}return!r&&this.manager&&(t.upElement===this.manager.game.canvas?this.emit(d.POINTER_UP,t,e):this.emit(d.POINTER_UP_OUTSIDE,t)),e.length},queueForInsertion:function(t){return-1===this._pendingInsertion.indexOf(t)&&-1===this._list.indexOf(t)&&this._pendingInsertion.push(t),this},queueForRemoval:function(t){return this._pendingRemoval.push(t),this},setDraggable:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var s=t[i];s.input.draggable=e;var r=this._draggable.indexOf(s);e&&-1===r?this._draggable.push(s):!e&&r>-1&&this._draggable.splice(r,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var s=!1,r=!1,n=!1,a=!1,h=!1,l=!0;if(m(e)&&Object.keys(e).length){var u=e;if(!x(t,"faces")){e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c))}s=p(u,"draggable",!1),r=p(u,"dropZone",!1),n=p(u,"cursor",!1),a=p(u,"useHandCursor",!1),e&&i||(this.setHitAreaFromTexture(t),l=!1)}for(var d=0;d<t.length;d++){var f=t[d];if(h&&"Container"===f.type)console.warn("Cannot pixelPerfect test a Container. Use a custom callback.");else{var g=f.input?f.input:o(f,e,i);g.customHitArea=l,g.dropZone=r,g.cursor=a?"pointer":n,f.input=g,s&&this.setDraggable(f),this.queueForInsertion(f)}}return this},setHitAreaCircle:function(t,e,i,n,a){void 0===a&&(a=r);var o=new s(e,i,n);return this.setHitArea(t,o,a)},setHitAreaEllipse:function(t,e,i,s,r,n){void 0===n&&(n=c);var a=new u(e,i,s,r);return this.setHitArea(t,a,n)},setHitAreaFromTexture:function(t,e){void 0===e&&(e=w),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var s=t[i],r=s.frame,n=0,a=0;s.width?(n=s.width,a=s.height):r&&(n=r.realWidth,a=r.realHeight),"Container"!==s.type||0!==n&&0!==a?0!==n&&0!==a&&(s.input=o(s,new T(0,0,n,a),e),this.queueForInsertion(s)):console.warn("Container.setInteractive must specify a Shape or call setSize() first")}return this},setHitAreaRectangle:function(t,e,i,s,r,n){void 0===n&&(n=w);var a=new T(e,i,s,r);return this.setHitArea(t,a,n)},setHitAreaTriangle:function(t,e,i,s,r,n,a,o){void 0===o&&(o=b);var h=new S(e,i,s,r,n,a);return this.setHitArea(t,h,o)},enableDebug:function(t,e){void 0===e&&(e=65280);var i=t.input;if(!i||!i.hitArea)return this;var s=i.hitArea,r=s.type,n=i.hitAreaDebug,a=this.systems.add,o=this.systems.updateList;n&&(o.remove(n),n.destroy(),n=null);var h=0,l=0;switch(r){case g.CIRCLE:n=a.arc(0,0,s.radius),h=s.x-s.radius,l=s.y-s.radius;break;case g.ELLIPSE:n=a.ellipse(0,0,s.width,s.height),h=s.x-s.width/2,l=s.y-s.height/2;break;case g.LINE:n=a.line(0,0,s.x1,s.y1,s.x2,s.y2);break;case g.POLYGON:n=a.polygon(0,0,s.points);break;case g.RECTANGLE:n=a.rectangle(0,0,s.width,s.height),h=s.x,l=s.y;break;case g.TRIANGLE:n=a.triangle(0,0,s.x1,s.y1,s.x2,s.y2,s.x3,s.y3)}return n&&(n.isFilled=!1,n.strokeColor=e,n.preUpdate=function(){n.setVisible(t.visible),n.setStrokeStyle(1/t.scale,n.strokeColor),n.setDisplayOrigin(t.displayOriginX,t.displayOriginY);var e=t.x,i=t.y,s=t.rotation,r=t.scaleX,a=t.scaleY;if(t.parentContainer){var o=t.getWorldTransformMatrix();e=o.tx,i=o.ty,s=o.rotation,r=o.scaleX,a=o.scaleY}n.setRotation(s),n.setScale(r,a),n.setPosition(e+h*r,i+l*a),n.setScrollFactor(t.scrollFactorX,t.scrollFactorY),n.setDepth(t.depth)},o.add(n),i.hitAreaDebug=n),this},removeDebug:function(t){var e=t.input;e&&e.hitAreaDebug&&(e.hitAreaDebug.destroy(),e.hitAreaDebug=null);return this},setPollAlways:function(){return this.setPollRate(0)},setPollOnMove:function(){return this.setPollRate(-1)},setPollRate:function(t){return this.pollRate=t,this._pollTimer=0,this},setGlobalTopOnly:function(t){return this.manager.globalTopOnly=t,this},setTopOnly:function(t){return this.topOnly=t,this},sortGameObjects:function(t,e){if(t.length<2||!e.camera)return t;var i=e.camera.renderList;return t.sort((function(t,e){var s=Math.max(i.indexOf(t),0);return Math.max(i.indexOf(e),0)-s}))},sortDropZones:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortDropZoneHandler.bind(this)))},sortDropZoneHandler:function(t,e){if(t.parentContainer||e.parentContainer){if(t.parentContainer===e.parentContainer)return e.parentContainer.getIndex(e)-t.parentContainer.getIndex(t);if(t.parentContainer===e)return-1;if(e.parentContainer===t)return 1;for(var i=t.getIndexList(),s=e.getIndexList(),r=Math.min(i.length,s.length),n=0;n<r;n++){var a=i[n],o=s[n];if(a!==o)return o-a}return s.length-i.length}return this.displayList.getIndex(e)-this.displayList.getIndex(t)},stopPropagation:function(){return this.manager._tempSkip=!0,this},addPointer:function(t){return this.manager.addPointer(t)},setDefaultCursor:function(t){return this.manager.setDefaultCursor(t),this},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this.pluginEvents.emit(d.SHUTDOWN),this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0,this._dragState.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.manager;e.canvas.style.cursor=e.defaultCursor;var i=this.systems.events;i.off(E.TRANSITION_START,this.transitionIn,this),i.off(E.TRANSITION_OUT,this.transitionOut,this),i.off(E.TRANSITION_COMPLETE,this.transitionComplete,this),i.off(E.PRE_UPDATE,this.preUpdate,this),e.events.off(d.GAME_OUT,this.onGameOut,this),e.events.off(d.GAME_OVER,this.onGameOver,this),i.off(E.SHUTDOWN,this.shutdown,this)},resetPointers:function(){for(var t=this.manager.pointers,e=0;e<t.length;e++)t[e].reset()},destroy:function(){this.shutdown(),this.pluginEvents.emit(d.DESTROY),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off(E.START,this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.mouse=null},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}},isOver:{get:function(){return this.manager.isOver}},mousePointer:{get:function(){return this.manager.mousePointer}},activePointer:{get:function(){return this.manager.activePointer}},pointer1:{get:function(){return this.manager.pointers[1]}},pointer2:{get:function(){return this.manager.pointers[2]}},pointer3:{get:function(){return this.manager.pointers[3]}},pointer4:{get:function(){return this.manager.pointers[4]}},pointer5:{get:function(){return this.manager.pointers[5]}},pointer6:{get:function(){return this.manager.pointers[6]}},pointer7:{get:function(){return this.manager.pointers[7]}},pointer8:{get:function(){return this.manager.pointers[8]}},pointer9:{get:function(){return this.manager.pointers[9]}},pointer10:{get:function(){return this.manager.pointers[10]}}});y.register("InputPlugin",A,"input"),t.exports=A},63399:(t,e,i)=>{var s=i(10850),r={},n={register:function(t,e,i,s,n){r[t]={plugin:e,mapping:i,settingsKey:s,configKey:n}},getPlugin:function(t){return r[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var a in r){var o=r[a].plugin,h=r[a].mapping,l=r[a].settingsKey,u=r[a].configKey;s(i,l,n[u])&&(t[h]=new o(t))}},remove:function(t){r.hasOwnProperty(t)&&delete r[t]}};t.exports=n},40398:(t,e,i)=>{var s=i(90447),r=i(56694),n=i(53996),a=i(88456),o=i(44521),h=i(93736),l=i(36580),u=new r({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,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=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=t.getWorldPoint(this.x,this.y);return this.worldX=e.x,this.worldY=e.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,r=this.midPoint.y;if(t!==i||e!==r){var n=o(this.motionFactor,i,t),h=o(this.motionFactor,r,e);a(n,t,.1)&&(n=t),a(h,e,.1)&&(h=e),this.midPoint.set(n,h);var l=t-n,u=e-h;this.velocity.set(l,u),this.angle=s(n,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),l.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(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?s(this.downX,this.downY,this.x,this.y):s(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,s=this.prevPosition.y,r=this.position.x,n=this.position.y,a=0;a<t;a++){var h=1/t*a;e[a]={x:o(h,i,r),y:o(h,s,n)}}return e},reset:function(){this.event=null,this.downElement=null,this.upElement=null,this.button=0,this.buttons=0,this.position.set(0,0),this.prevPosition.set(0,0),this.midPoint.set(-1,-1),this.velocity.set(0,0),this.angle=0,this.distance=0,this.worldX=0,this.worldY=0,this.downX=0,this.downY=0,this.upX=0,this.upY=0,this.moveTime=0,this.upTime=0,this.downTime=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.deltaX=0,this.deltaY=0,this.deltaZ=0,this.active=0===this.id},destroy:function(){this.camera=null,this.manager=null,this.position=null},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},time:{get:function(){return this.event?this.event.timeStamp:0}}});t.exports=u},72687:t=>{t.exports={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}},14874:t=>{t.exports="boot"},54168:t=>{t.exports="destroy"},526:t=>{t.exports="dragend"},81623:t=>{t.exports="dragenter"},94472:t=>{t.exports="drag"},9304:t=>{t.exports="dragleave"},34265:t=>{t.exports="dragover"},50151:t=>{t.exports="dragstart"},98134:t=>{t.exports="drop"},56773:t=>{t.exports="gameobjectdown"},45824:t=>{t.exports="dragend"},39578:t=>{t.exports="dragenter"},72072:t=>{t.exports="drag"},82569:t=>{t.exports="dragleave"},70833:t=>{t.exports="dragover"},81442:t=>{t.exports="dragstart"},32936:t=>{t.exports="drop"},99658:t=>{t.exports="gameobjectmove"},60515:t=>{t.exports="gameobjectout"},55254:t=>{t.exports="gameobjectover"},34782:t=>{t.exports="pointerdown"},41769:t=>{t.exports="pointermove"},65588:t=>{t.exports="pointerout"},61640:t=>{t.exports="pointerover"},49342:t=>{t.exports="pointerup"},82662:t=>{t.exports="wheel"},13058:t=>{t.exports="gameobjectup"},52426:t=>{t.exports="gameobjectwheel"},78072:t=>{t.exports="gameout"},1545:t=>{t.exports="gameover"},67137:t=>{t.exports="boot"},27678:t=>{t.exports="process"},22257:t=>{t.exports="update"},90379:t=>{t.exports="pointerlockchange"},88909:t=>{t.exports="pointerdown"},36548:t=>{t.exports="pointerdownoutside"},18483:t=>{t.exports="pointermove"},22355:t=>{t.exports="pointerout"},7997:t=>{t.exports="pointerover"},66318:t=>{t.exports="pointerup"},94812:t=>{t.exports="pointerupoutside"},37310:t=>{t.exports="wheel"},24196:t=>{t.exports="preupdate"},27053:t=>{t.exports="shutdown"},29413:t=>{t.exports="start"},25165:t=>{t.exports="update"},33963:(t,e,i)=>{t.exports={BOOT:i(14874),DESTROY:i(54168),DRAG_END:i(526),DRAG_ENTER:i(81623),DRAG:i(94472),DRAG_LEAVE:i(9304),DRAG_OVER:i(34265),DRAG_START:i(50151),DROP:i(98134),GAME_OUT:i(78072),GAME_OVER:i(1545),GAMEOBJECT_DOWN:i(56773),GAMEOBJECT_DRAG_END:i(45824),GAMEOBJECT_DRAG_ENTER:i(39578),GAMEOBJECT_DRAG:i(72072),GAMEOBJECT_DRAG_LEAVE:i(82569),GAMEOBJECT_DRAG_OVER:i(70833),GAMEOBJECT_DRAG_START:i(81442),GAMEOBJECT_DROP:i(32936),GAMEOBJECT_MOVE:i(99658),GAMEOBJECT_OUT:i(60515),GAMEOBJECT_OVER:i(55254),GAMEOBJECT_POINTER_DOWN:i(34782),GAMEOBJECT_POINTER_MOVE:i(41769),GAMEOBJECT_POINTER_OUT:i(65588),GAMEOBJECT_POINTER_OVER:i(61640),GAMEOBJECT_POINTER_UP:i(49342),GAMEOBJECT_POINTER_WHEEL:i(82662),GAMEOBJECT_UP:i(13058),GAMEOBJECT_WHEEL:i(52426),MANAGER_BOOT:i(67137),MANAGER_PROCESS:i(27678),MANAGER_UPDATE:i(22257),POINTER_DOWN:i(88909),POINTER_DOWN_OUTSIDE:i(36548),POINTER_MOVE:i(18483),POINTER_OUT:i(22355),POINTER_OVER:i(7997),POINTER_UP:i(66318),POINTER_UP_OUTSIDE:i(94812),POINTER_WHEEL:i(37310),POINTERLOCK_CHANGE:i(90379),PRE_UPDATE:i(24196),SHUTDOWN:i(27053),START:i(29413),UPDATE:i(25165)}},70848:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}});t.exports=s},21274:(t,e,i)=>{var s=i(56694),r=i(43200),n=new s({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(r.BUTTON_DOWN,e,this,t),this.pad.emit(r.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(r.BUTTON_UP,e,this,t),this.pad.emit(r.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=n},75956:(t,e,i)=>{var s=i(70848),r=i(21274),n=i(56694),a=i(6659),o=i(93736),h=new n({Extends:a,initialize:function(t,e){a.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n<e.buttons.length;n++)i.push(new r(this,n));this.buttons=i;var h=[];for(n=0;n<e.axes.length;n++)h.push(new s(this,n));this.axes=h,this.vibration=e.vibrationActuator;var l={value:0,pressed:!1};this._LCLeft=i[14]?i[14]:l,this._LCRight=i[15]?i[15]:l,this._LCTop=i[12]?i[12]:l,this._LCBottom=i[13]?i[13]:l,this._RCLeft=i[2]?i[2]:l,this._RCRight=i[1]?i[1]:l,this._RCTop=i[3]?i[3]:l,this._RCBottom=i[0]?i[0]:l,this._FBLeftTop=i[4]?i[4]:l,this._FBLeftBottom=i[6]?i[6]:l,this._FBRightTop=i[5]?i[5]:l,this._FBRightBottom=i[7]?i[7]:l;var u={value:0};this._HAxisLeft=h[0]?h[0]:u,this._VAxisLeft=h[1]?h[1]:u,this._HAxisRight=h[2]?h[2]:u,this._VAxisRight=h[3]?h[3]:u,this.leftStick=new o,this.rightStick=new o,this._created=performance.now()},getAxisTotal:function(){return this.axes.length},getAxisValue:function(t){return this.axes[t].getValue()},setAxisThreshold:function(t){for(var e=0;e<this.axes.length;e++)this.axes[e].threshold=t},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(t){return this.buttons[t].value},isButtonDown:function(t){return this.buttons[t].pressed},update:function(t){if(!(t.timestamp<this._created)){var e,i=this.buttons,s=t.buttons,r=i.length;for(e=0;e<r;e++)i[e].update(s[e].value);var n=this.axes,a=t.axes;for(r=n.length,e=0;e<r;e++)n[e].update(a[e]);r>=2&&(this.leftStick.set(n[0].getValue(),n[1].getValue()),r>=4&&this.rightStick.set(n[2].getValue(),n[3].getValue()))}},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t<this.buttons.length;t++)this.buttons[t].destroy();for(t=0;t<this.axes.length;t++)this.axes[t].destroy();this.buttons=[],this.axes=[]},connected:{get:function(){return this.pad.connected}},timestamp:{get:function(){return this.pad.timestamp}},left:{get:function(){return this._LCLeft.pressed}},right:{get:function(){return this._LCRight.pressed}},up:{get:function(){return this._LCTop.pressed}},down:{get:function(){return this._LCBottom.pressed}},A:{get:function(){return this._RCBottom.pressed}},Y:{get:function(){return this._RCTop.pressed}},X:{get:function(){return this._RCLeft.pressed}},B:{get:function(){return this._RCRight.pressed}},L1:{get:function(){return this._FBLeftTop.value}},L2:{get:function(){return this._FBLeftBottom.value}},R1:{get:function(){return this._FBRightTop.value}},R2:{get:function(){return this._FBRightBottom.value}}});t.exports=h},1379:(t,e,i)=>{var s=i(56694),r=i(6659),n=i(43200),a=i(75956),o=i(10850),h=i(63399),l=i(33963),u=new s({Extends:r,initialize:function(t){r.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(l.BOOT,this.boot,this),t.pluginEvents.on(l.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=o(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=o(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(l.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on(l.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(l.UPDATE,this.update);for(var t=0;t<this.gamepads.length;t++)this.gamepads[t].removeAllListeners()},disconnectAll:function(){for(var t=0;t<this.gamepads.length;t++)this.gamepads[t].pad.connected=!1},refreshPads:function(){var t=navigator.getGamepads();if(t)for(var e=this.gamepads,i=0;i<t.length;i++){var s=t[i];if(s){var r=s.id,n=s.index,o=e[n];if(o)o.id!==r?(o.destroy(),e[n]=new a(this,s)):o.update(s);else{var h=new a(this,s);e[n]=h,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=h):this._pad3=h:this._pad2=h:this._pad1=h}}}else this.disconnectAll()},getAll:function(){for(var t=[],e=this.gamepads,i=0;i<e.length;i++)e[i]&&t.push(e[i]);return t},getPad:function(t){for(var e=this.gamepads,i=0;i<e.length;i++)if(e[i]&&e[i].index===t)return e[i]},update:function(){if(this.enabled){this.refreshPads();var t=this.queue.length;if(0!==t)for(var e=this.queue.splice(0,t),i=0;i<t;i++){var s=e[i],r=this.getPad(s.gamepad.index);"gamepadconnected"===s.type?this.emit(n.CONNECTED,r,s):"gamepaddisconnected"===s.type&&this.emit(n.DISCONNECTED,r,s)}}},shutdown:function(){this.stopListeners(),this.removeAllListeners()},destroy:function(){this.shutdown();for(var t=0;t<this.gamepads.length;t++)this.gamepads[t]&&this.gamepads[t].destroy();this.gamepads=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.target=null},total:{get:function(){return this.gamepads.length}},pad1:{get:function(){return this._pad1}},pad2:{get:function(){return this._pad2}},pad3:{get:function(){return this._pad3}},pad4:{get:function(){return this._pad4}}});h.register("GamepadPlugin",u,"gamepad","gamepad","inputGamepad"),t.exports=u},33171:t=>{t.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:t=>{t.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:t=>{t.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:(t,e,i)=>{t.exports={DUALSHOCK_4:i(74982),SNES_USB:i(33171),XBOX_360:i(43247)}},17344:t=>{t.exports="down"},36635:t=>{t.exports="up"},85724:t=>{t.exports="connected"},55832:t=>{t.exports="disconnected"},772:t=>{t.exports="down"},33608:t=>{t.exports="up"},43200:(t,e,i)=>{t.exports={BUTTON_DOWN:i(17344),BUTTON_UP:i(36635),CONNECTED:i(85724),DISCONNECTED:i(55832),GAMEPAD_BUTTON_DOWN:i(772),GAMEPAD_BUTTON_UP:i(33608)}},92636:(t,e,i)=>{t.exports={Axis:i(70848),Button:i(21274),Events:i(43200),Gamepad:i(75956),GamepadPlugin:i(1379),Configs:i(4898)}},20873:(t,e,i)=>{var s=i(72687),r=i(98611),n={CreatePixelPerfectHandler:i(18104),CreateInteractiveObject:i(27395),Events:i(33963),Gamepad:i(92636),InputManager:i(69898),InputPlugin:i(12499),InputPluginCache:i(63399),Keyboard:i(28388),Mouse:i(11343),Pointer:i(40398),Touch:i(77423)};n=r(!1,n,s),t.exports=n},71064:(t,e,i)=>{var s=i(66458),r=i(56694),n=i(97081),a=i(33963),o=i(11873),h=i(72283),l=new r({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(a.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(n.POST_STEP,this.postUpdate,this)},startListeners:function(){var t=this;this.onKeyDown=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(a.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(a.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i<t.length;i++){var s=t[i];"string"==typeof s&&(s=o[s.trim().toUpperCase()]),-1===e.indexOf(s)&&e.push(s)}this.preventDefault=e.length>0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i<t.length;i++){var r=t[i];"string"==typeof r&&(r=o[r.toUpperCase()]),s(e,r)}this.preventDefault=e.length>0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(n.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},89666:(t,e,i)=>{var s=i(56694),r=i(6659),n=i(94030),a=i(97081),o=i(10850),h=i(33963),l=i(63399),u=i(50165),c=i(11873),d=i(95625),f=i(48044),p=i(7599),g=i(84314),v=new s({Extends:r,initialize:function(t){r.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=o(t,"keyboard",!0);var e=o(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(a.BLUR,this.resetKeys,this),this.scene.sys.events.on(p.PAUSE,this.resetKeys,this),this.scene.sys.events.on(p.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),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:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var s={};if("string"==typeof t){t=t.split(",");for(var r=0;r<t.length;r++){var n=t[r].trim();n&&(s[n]=this.addKey(n,e,i))}}else for(var a in t)s[a]=this.addKey(t[a],e,i);return s},addKey:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var s=this.keys;if(t instanceof u){var r=s.indexOf(t);return r>-1?s[r]=t:s[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),s[t]||(s[t]=new u(this,t),e&&this.addCapture(t),s[t].setEmitOnRepeat(i)),s[t]},removeKey:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s,r=this.keys;if(t instanceof u){var n=r.indexOf(t);n>-1&&(s=this.keys[n],this.keys[n]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return r[t]&&(s=r[t],r[t]=void 0),s&&(s.plugin=null,i&&this.removeCapture(s.keyCode),e&&s.destroy()),this},removeAllKeys:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.keys,s=0;s<i.length;s++){var r=i[s];r&&(i[s]=void 0,e&&this.removeCapture(r.keyCode),t&&r.destroy())}return this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(void 0===e&&(e=0),this.enabled&&t.isDown){var i=g(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,s=0;s<e;s++){var r=t[s],a=r.keyCode,o=i[a],h=!1;void 0===r.cancelled&&(r.cancelled=0,r.stopImmediatePropagation=function(){r.cancelled=1},r.stopPropagation=function(){r.cancelled=-1}),-1!==r.cancelled&&(a===this.prevCode&&r.timeStamp===this.prevTime&&r.type===this.prevType||(this.prevCode=a,this.prevTime=r.timeStamp,this.prevType=r.type,"keydown"===r.type?(o&&(h=o.isDown,o.onDown(r)),r.cancelled||o&&h||(f[a]&&this.emit(n.KEY_DOWN+f[a],r),r.cancelled||this.emit(n.ANY_KEY_DOWN,r))):(o&&o.onUp(r),r.cancelled||(f[a]&&this.emit(n.KEY_UP+f[a],r),r.cancelled||this.emit(n.ANY_KEY_UP,r))),1===r.cancelled&&(r.cancelled=0)))}},resetKeys:function(){for(var t=this.keys,e=0;e<t.length;e++)t[e]&&t[e].reset();return this},shutdown:function(){this.removeAllKeys(!0),this.removeAllListeners(),this.sceneInputPlugin.manager.events.off(h.MANAGER_PROCESS,this.update,this),this.game.events.off(a.BLUR,this.resetKeys),this.scene.sys.events.off(p.PAUSE,this.resetKeys,this),this.scene.sys.events.off(p.SLEEP,this.resetKeys,this),this.queue=[]},destroy:function(){this.shutdown();for(var t=this.keys,e=0;e<t.length;e++)t[e]&&t[e].destroy();this.keys=[],this.combos=[],this.queue=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.manager=null},time:{get:function(){return this.sceneInputPlugin.manager.time}}});l.register("KeyboardPlugin",v,"keyboard","keyboard","inputKeyboard"),t.exports=v},60258:t=>{t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},95625:(t,e,i)=>{var s=i(56694),r=i(94030),n=i(72632),a=i(2544),o=i(88754),h=new s({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var s=0;s<e.length;s++){var h=e[s];"string"==typeof h?this.keyCodes.push(h.toUpperCase().charCodeAt(0)):"number"==typeof h?this.keyCodes.push(h):h.hasOwnProperty("keyCode")&&this.keyCodes.push(h.keyCode)}this.current=this.keyCodes[0],this.index=0,this.size=this.keyCodes.length,this.timeLastMatched=0,this.matched=!1,this.timeMatched=0,this.resetOnWrongKey=n(i,"resetOnWrongKey",!0),this.maxKeyDelay=n(i,"maxKeyDelay",0),this.resetOnMatch=n(i,"resetOnMatch",!1),this.deleteOnMatch=n(i,"deleteOnMatch",!1);var l=this;this.onKeyDown=function(t){!l.matched&&l.enabled&&(a(t,l)&&(l.manager.emit(r.COMBO_MATCH,l,t),l.resetOnMatch?o(l):l.deleteOnMatch&&l.destroy()))},this.manager.on(r.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(r.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});t.exports=h},2544:(t,e,i)=>{var s=i(60258);t.exports=function(t,e){if(e.matched)return!0;var i=!1,r=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var n=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=n&&(r=!0,i=s(t,e))}else r=!0,i=s(t,e);return!r&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},88754:t=>{t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},5044:t=>{t.exports="keydown"},40813:t=>{t.exports="keyup"},89319:t=>{t.exports="keycombomatch"},43267:t=>{t.exports="down"},78595:t=>{t.exports="keydown-"},30056:t=>{t.exports="keyup-"},81939:t=>{t.exports="up"},94030:(t,e,i)=>{t.exports={ANY_KEY_DOWN:i(5044),ANY_KEY_UP:i(40813),COMBO_MATCH:i(89319),DOWN:i(43267),KEY_DOWN:i(78595),KEY_UP:i(30056),UP:i(81939)}},28388:(t,e,i)=>{t.exports={Events:i(94030),KeyboardManager:i(71064),KeyboardPlugin:i(89666),Key:i(50165),KeyCodes:i(11873),KeyCombo:i(95625),AdvanceKeyCombo:i(60258),ProcessKeyCombo:i(2544),ResetKeyCombo:i(88754),JustDown:i(42460),JustUp:i(53162),DownDuration:i(64964),UpDuration:i(70331)}},64964:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i<e}},42460:t=>{t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},53162:t=>{t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},50165:(t,e,i)=>{var s=i(56694),r=i(6659),n=i(94030),a=new s({Extends:r,initialize:function(t,e){r.call(this),this.plugin=t,this.keyCode=e,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(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(n.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(n.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(n.UP,this,t))},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}});t.exports=a},11873:t=>{t.exports={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}},48044:(t,e,i)=>{var s=i(11873),r={};for(var n in s)r[s[n]]=n;t.exports=r},70331:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i<e}},7905:(t,e,i)=>{var s=i(56694),r=i(90185),n=i(33963),a=i(72283),o=new s({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=a,this.onMouseDown=a,this.onMouseUp=a,this.onMouseDownWindow=a,this.onMouseUpWindow=a,this.onMouseOver=a,this.onMouseOut=a,this.onMouseWheel=a,this.pointerLockChange=a,this.isTop=!0,t.events.once(n.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},requestPointerLock:function(){if(r.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){r.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,n=window&&window.focus&&i.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseMove(t),e.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){n&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseDown(t),e.preventDefaultDown&&t.target===s&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseUp(t),e.preventDefaultUp&&t.target===s&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onMouseWheel(t),e.preventDefaultWheel&&t.target===s&&t.preventDefault()};var a={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,a),t.addEventListener("mouseout",this.onMouseOut,a),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,a),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,a),window.top.addEventListener("mouseup",this.onMouseUpWindow,a)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,a),window.addEventListener("mouseup",this.onMouseUpWindow,a),this.isTop=!1}r.pointerLock&&(this.pointerLockChange=function(t){var s=e.target;e.locked=document.pointerLockElement===s||document.mozPointerLockElement===s||document.webkitPointerLockElement===s,i.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),r.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}});t.exports=o},11343:(t,e,i)=>{t.exports={MouseManager:i(7905)}},37579:(t,e,i)=>{var s=i(56694),r=i(33963),n=i(72283),a=new s({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=n,this.onTouchStartWindow=n,this.onTouchMove=n,this.onTouchEnd=n,this.onTouchEndWindow=n,this.onTouchCancel=n,this.onTouchCancelWindow=n,this.isTop=!0,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,r=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchStart=function(t){r&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchStartWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchStart(t)},this.onTouchEnd=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchEndWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&(i.onTouchEnd(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchCancel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(t),e.capture&&t.preventDefault())},this.onTouchCancelWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(t)};var n=this.capture,a={passive:!0},o={passive:!1};if(t.addEventListener("touchstart",this.onTouchStart,n?o:a),t.addEventListener("touchmove",this.onTouchMove,n?o:a),t.addEventListener("touchend",this.onTouchEnd,n?o:a),t.addEventListener("touchcancel",this.onTouchCancel,n?o:a),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,o),window.top.addEventListener("touchend",this.onTouchEndWindow,o),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,o)}catch(t){window.addEventListener("touchstart",this.onTouchStartWindow,o),window.addEventListener("touchend",this.onTouchEndWindow,o),window.addEventListener("touchcancel",this.onTouchCancelWindow,o),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),window&&((t=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),t.removeEventListener("touchend",this.onTouchEndWindow),t.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},77423:(t,e,i)=>{t.exports={TouchManager:i(37579)}},98035:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(683),a=i(72632),o=i(30750),h=i(43531),l=i(88490),u=i(33868),c=new s({initialize:function(t,e){if(this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=a(e,"url");void 0===s?s=t.path+i+"."+a(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=u(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile,this.base64=0===s.indexOf("data:")},setLink:function(t){this.linkFile=t,t.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===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")&&(this.base64=!0),this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onBase64Load:function(t){this.xhrLoader=t,this.state=r.FILE_LOADED,this.percentComplete=1,this.loader.emit(n.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(n.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.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=r.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(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(n.FILE_COMPLETE,e,i,t),this.loader.emit(n.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},76846:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},30750:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},67285:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(58403),a=i(6659),o=i(683),h=i(76846),l=i(72632),u=i(10850),c=i(91963),d=i(7599),f=i(33868),p=new s({Extends:a,initialize:function(t){a.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(l(i,"baseURL",e.loaderBaseURL)),this.setPath(l(i,"path",e.loaderPath)),this.setPrefix(l(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=l(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=f(l(i,"responseType",e.loaderResponseType),l(i,"async",e.loaderAsync),l(i,"user",e.loaderUser),l(i,"password",e.loaderPassword),l(i,"timeout",e.loaderTimeout),l(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=l(i,"crossOrigin",e.loaderCrossOrigin),this.imageLoadType=l(i,"imageLoadType",e.loaderImageLoadType),this.localSchemes=l(i,"localScheme",e.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new n,this.inflight=new n,this.queue=new n,this._deleteQueue=new n,this.totalFailed=0,this.totalComplete=0,this.state=r.LOADER_IDLE,this.multiKeyIndex=0,t.sys.events.once(d.BOOT,this.boot,this),t.sys.events.on(d.START,this.pluginStart,this)},boot:function(){this.systems.events.once(d.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(d.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];this.keyExists(i)||(this.list.set(i),this.emit(o.ADD,i.key,i.type,this,i),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(t){var e=t.hasCacheConflict();return e||this.list.iterate((function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1})),!e&&this.isLoading()&&(this.inflight.iterate((function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1})),this.queue.iterate((function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1}))),e},addPack:function(t,e){if("string"==typeof e){var i=u(t,e);i&&(t={packKey:i})}var s=0,r=this.baseURL,n=this.path,a=this.prefix;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var h=t[o],c=l(h,"baseURL",r),d=l(h,"path",n),f=l(h,"prefix",a),p=l(h,"files",null),g=l(h,"defaultType","void");if(Array.isArray(p)){this.setBaseURL(c),this.setPath(d),this.setPrefix(f);for(var v=0;v<p.length;v++){var m=p[v],x=m.hasOwnProperty("type")?m.type:g;this[x]&&(this[x](m),s++)}}}return this.setBaseURL(r),this.setPath(n),this.setPrefix(a),s>0},isLoading:function(){return this.state===r.LOADER_LOADING||this.state===r.LOADER_PROCESSING},isReady:function(){return this.state===r.LOADER_IDLE||this.state===r.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(o.START,this),0===this.list.size?this.loadComplete():(this.state=r.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(d.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(o.PROGRESS,this.progress)},update:function(){this.state===r.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.each((function(t){if((t.state===r.FILE_POPULATED||t.state===r.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.set(t),this.list.delete(t),t.crossOrigin||(t.crossOrigin=this.crossOrigin),t.load()),this.inflight.size===this.maxParallelDownloads)return!1}),this)},nextFile:function(t,e){this.inflight&&(this.inflight.delete(t),this.updateProgress(),e?(this.totalComplete++,this.queue.set(t),this.emit(o.FILE_LOAD,t),t.onProcess()):(this.totalFailed++,this._deleteQueue.set(t),this.emit(o.FILE_LOAD_ERROR,t),this.fileProcessComplete(t)))},fileProcessComplete:function(t){this.scene&&this.systems&&this.systems.game&&!this.systems.game.pendingDestroy&&(t.state===r.FILE_ERRORED?t.multiFile&&t.multiFile.onFileFailed(t):t.state===r.FILE_COMPLETE&&(t.multiFile?t.multiFile.isReadyToProcess()&&(t.multiFile.addToCache(),t.multiFile.pendingDestroy()):(t.addToCache(),t.pendingDestroy())),this.queue.delete(t),0===this.list.size&&0===this.inflight.size&&0===this.queue.size&&this.loadComplete())},loadComplete:function(){this.emit(o.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=r.LOADER_COMPLETE,this.systems.events.off(d.UPDATE,this.update,this),this._deleteQueue.iterateLocal("destroy"),this._deleteQueue.clear(),this.emit(o.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(t){this._deleteQueue.set(t)},saveJSON:function(t,e){return this.save(JSON.stringify(t),e)},save:function(t,e,i){void 0===e&&(e="file.json"),void 0===i&&(i="application/json");var s=new Blob([t],{type:i}),r=URL.createObjectURL(s),n=document.createElement("a");return n.download=e,n.textContent="Download "+e,n.href=r,n.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var t=this.systems.game.config,e=this.systems.settings.loader;this.setBaseURL(l(e,"baseURL",t.loaderBaseURL)),this.setPath(l(e,"path",t.loaderPath)),this.setPrefix(l(e,"prefix",t.loaderPrefix)),this.state=r.LOADER_IDLE},shutdown:function(){this.reset(),this.state=r.LOADER_SHUTDOWN,this.removeAllListeners(),this.systems.events.off(d.UPDATE,this.update,this),this.systems.events.off(d.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=r.LOADER_DESTROYED,this.systems.events.off(d.UPDATE,this.update,this),this.systems.events.off(d.START,this.pluginStart,this),this.list=null,this.inflight=null,this.queue=null,this.scene=null,this.systems=null,this.textureManager=null,this.cacheManager=null,this.sceneManager=null}});c.register("Loader",p,"load"),t.exports=p},43531:(t,e,i)=>{var s=i(98611),r=i(33868);t.exports=function(t,e){var i=void 0===t?r():s({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},45176:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(683),a=new s({initialize:function(t,e,i,s){var n=[];s.forEach((function(t){t&&n.push(t)})),this.loader=t,this.type=e,this.key=i;var a=this.key;t.prefix&&""!==t.prefix&&(this.key=t.prefix+a),this.multiKeyIndex=t.multiKeyIndex++,this.files=n,this.state=r.FILE_PENDING,this.complete=!1,this.pending=n.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var o=0;o<n.length;o++)n[o].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),t.multiFile=this,this.pending++,this.complete=!1,this},onFileComplete:function(t){-1!==this.files.indexOf(t)&&this.pending--},onFileFailed:function(t){-1!==this.files.indexOf(t)&&(this.failed++,console.error('File failed: %s "%s" (via %s "%s")',this.type,this.key,t.type,t.key))},pendingDestroy:function(){if(this.state!==r.FILE_PENDING_DESTROY){var t=this.key,e=this.type;this.loader.emit(n.FILE_COMPLETE,t,e),this.loader.emit(n.FILE_KEY_COMPLETE+e+"-"+t,t,e),this.loader.flagForRemoval(this);for(var i=0;i<this.files.length;i++)this.files[i].pendingDestroy();this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.files=null,this.config=null}});t.exports=a},88490:(t,e,i)=>{var s=i(43531);t.exports=function(t,e){var i=s(e,t.xhrSettings);if(!t.base64){var r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var n in i.headers)r.setRequestHeader(n,i.headers[n]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.ontimeout=t.onError.bind(t,r),r.send(),r}var a=t.url.split(";base64,").pop()||t.url.split(",").pop(),o={responseText:atob(a)};t.onBase64Load(o)}},33868:t=>{t.exports=function(t,e,i,s,r,n){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===r&&(r=0),void 0===n&&(n=!1),{responseType:t,async:e,user:i,password:s,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}}},12117:t=>{t.exports={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}},7398:t=>{t.exports="addfile"},52187:t=>{t.exports="complete"},36627:t=>{t.exports="filecomplete"},81925:t=>{t.exports="filecomplete-"},29774:t=>{t.exports="loaderror"},20943:t=>{t.exports="load"},74693:t=>{t.exports="fileprogress"},71176:t=>{t.exports="postprocess"},88984:t=>{t.exports="progress"},72753:t=>{t.exports="start"},683:(t,e,i)=>{t.exports={ADD:i(7398),COMPLETE:i(52187),FILE_COMPLETE:i(36627),FILE_KEY_COMPLETE:i(81925),FILE_LOAD_ERROR:i(29774),FILE_LOAD:i(20943),FILE_PROGRESS:i(74693),POST_PROCESS:i(71176),PROGRESS:i(88984),START:i(72753)}},46468:(t,e,i)=>{var s=i(56694),r=i(76846),n=i(70806),a=i(683),o=new s({Extends:n,initialize:function(t,e,i,s,r){n.call(this,t,e,i,s,r),this.type="animationJSON"},onProcess:function(){this.loader.once(a.POST_PROCESS,this.onLoadComplete,this),n.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});r.register("animation",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new o(this,t[r]));else this.addFile(new o(this,t,e,s,i));return this})),t.exports=o},31648:(t,e,i)=>{var s=i(56694),r=i(76846),n=i(72632),a=i(42927),o=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,r,u){var c,d;if(o(e)){var f=e;e=n(f,"key"),c=new a(t,{key:e,url:n(f,"textureURL"),extension:n(f,"textureExtension","png"),normalMap:n(f,"normalMap"),xhrSettings:n(f,"textureXhrSettings")}),d=new h(t,{key:e,url:n(f,"atlasURL"),extension:n(f,"atlasExtension","json"),xhrSettings:n(f,"atlasXhrSettings")})}else c=new a(t,e,i,r),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});r.register("aseprite",(function(t,e,i,s,r){var n;if(Array.isArray(t))for(var a=0;a<t.length;a++)n=new u(this,t[a]),this.addFile(n.files);else n=new u(this,t,e,i,s,r),this.addFile(n.files);return this})),t.exports=u},73152:(t,e,i)=>{var s=i(56694),r=i(76846),n=i(72632),a=i(42927),o=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,r,u){var c,d;if(o(e)){var f=e;e=n(f,"key"),c=new a(t,{key:e,url:n(f,"textureURL"),extension:n(f,"textureExtension","png"),normalMap:n(f,"normalMap"),xhrSettings:n(f,"textureXhrSettings")}),d=new h(t,{key:e,url:n(f,"atlasURL"),extension:n(f,"atlasExtension","json"),xhrSettings:n(f,"atlasXhrSettings")})}else c=new a(t,e,i,r),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),this.complete=!0}}});r.register("atlas",(function(t,e,i,s,r){var n;if(Array.isArray(t))for(var a=0;a<t.length;a++)n=new u(this,t[a]),this.addFile(n.files);else n=new u(this,t,e,i,s,r),this.addFile(n.files);return this})),t.exports=u},24616:(t,e,i)=>{var s=i(56694),r=i(76846),n=i(72632),a=i(42927),o=i(42911),h=i(45176),l=i(15297),u=new s({Extends:h,initialize:function(t,e,i,s,r,u){var c,d;if(o(e)){var f=e;e=n(f,"key"),c=new a(t,{key:e,url:n(f,"textureURL"),extension:n(f,"textureExtension","png"),normalMap:n(f,"normalMap"),xhrSettings:n(f,"textureXhrSettings")}),d=new l(t,{key:e,url:n(f,"atlasURL"),extension:n(f,"atlasExtension","xml"),xhrSettings:n(f,"atlasXhrSettings")})}else c=new a(t,e,i,r),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"atlasxml",e,[c,d,c.linkFile]):h.call(this,t,"atlasxml",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),this.complete=!0}}});r.register("atlasXML",(function(t,e,i,s,r){var n;if(Array.isArray(t))for(var a=0;a<t.length;a++)n=new u(this,t[a]),this.addFile(n.files);else n=new u(this,t,e,i,s,r),this.addFile(n.files);return this})),t.exports=u},67448:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(30929),l=i(42911),u=new s({Extends:n,initialize:function(t,e,i,s,r){if(l(e)){var a=e;e=o(a,"key"),s=o(a,"xhrSettings"),r=o(a,"context",r)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:s,config:{context:r}};n.call(this,t,h)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,(function(e){t.data=e,t.onProcessComplete()}),(function(e){console.error("Error decoding audio: "+t.key+" - ",e?e.message:null),t.onProcessError()})),this.config.context=null}});u.create=function(t,e,i,s,r){var n=t.systems.game,a=n.config.audio,c=n.device.audio;l(e)&&(i=o(e,"url",[]),s=o(e,"config",{}));var d=u.getAudioURL(n,i);return d?c.webAudio&&!a.disableWebAudio?new u(t,e,d,r,n.sound.context):new h(t,e,d,s):(console.warn('No audio URLs for "%s" matched this device',e),null)},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var s=o(e[i],"url",e[i]);if(0===s.indexOf("blob:")||0===s.indexOf("data:"))return{url:s,type:""};var r=s.match(/\.([a-zA-Z0-9]+)($|\?)/);if(r=o(e[i],"type",r?r[1]:"").toLowerCase(),t.device.audio[r])return{url:s,type:r}}return null},a.register("audio",(function(t,e,i,s){var r,n=this.systems.game,a=n.config.audio,o=n.device.audio;if(a.noAudio||!o.webAudio&&!o.audioData)return this;if(Array.isArray(t))for(var h=0;h<t.length;h++)(r=u.create(this,t[h]))&&this.addFile(r);else(r=u.create(this,t,e,i,s))&&this.addFile(r);return this})),t.exports=u},66109:(t,e,i)=>{var s=i(67448),r=i(56694),n=i(76846),a=i(72632),o=i(42911),h=i(70806),l=i(45176),u=new r({Extends:l,initialize:function(t,e,i,r,n,u,c){if(o(e)){var d=e;e=a(d,"key"),i=a(d,"jsonURL"),r=a(d,"audioURL"),n=a(d,"audioConfig"),u=a(d,"audioXhrSettings"),c=a(d,"jsonXhrSettings")}var f;if(r){var p=s.create(t,e,r,n,u);p&&(f=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[p,f]),this.config.resourceLoad=!1)}else f=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[f]),this.config.resourceLoad=!0,this.config.audioConfig=n,this.config.audioXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=a(this.config,"audioConfig"),r=a(this.config,"audioXhrSettings"),n=s.create(this.loader,t.key,e,i,r);n&&(this.addToMultiFile(n),this.loader.addFile(n))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});n.register("audioSprite",(function(t,e,i,s,r,n){var a,o=this.systems.game,h=o.config.audio,l=o.device.audio;if(h&&h.noAudio||!l.webAudio&&!l.audioData)return this;if(Array.isArray(t))for(var c=0;c<t.length;c++)(a=new u(this,t[c])).files&&this.addFile(a.files);else(a=new u(this,t,e,i,s,r,n)).files&&this.addFile(a.files);return this}))},40612:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:n,initialize:function(t,e,i,s,r){var a="bin";if(h(e)){var l=e;e=o(l,"key"),i=o(l,"url"),s=o(l,"xhrSettings"),a=o(l,"extension",a),r=o(l,"dataType",r)}var u={type:"binary",cache:t.cacheManager.binary,extension:a,responseType:"arraybuffer",key:e,url:i,xhrSettings:s,config:{dataType:r}};n.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});a.register("binary",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,s,i));return this})),t.exports=l},54565:(t,e,i)=>{var s=i(56694),r=i(76846),n=i(72632),a=i(42927),o=i(42911),h=i(45176),l=i(31476),u=i(15297),c=new s({Extends:h,initialize:function(t,e,i,s,r,l){var c,d;if(o(e)){var f=e;e=n(f,"key"),c=new a(t,{key:e,url:n(f,"textureURL"),extension:n(f,"textureExtension","png"),normalMap:n(f,"normalMap"),xhrSettings:n(f,"textureXhrSettings")}),d=new u(t,{key:e,url:n(f,"fontDataURL"),extension:n(f,"fontDataExtension","xml"),xhrSettings:n(f,"fontDataXhrSettings")})}else c=new a(t,e,i,r),d=new u(t,e,s,l);c.linkFile?h.call(this,t,"bitmapfont",e,[c,d,c.linkFile]):h.call(this,t,"bitmapfont",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache();var i=t.cache.get(t.key),s=l(e.data,t.cache.getFrame(t.key),0,0,i);this.loader.cacheManager.bitmapFont.add(t.key,{data:s,texture:t.key,frame:null}),this.complete=!0}}});r.register("bitmapFont",(function(t,e,i,s,r){var n;if(Array.isArray(t))for(var a=0;a<t.length;a++)n=new c(this,t[a]),this.addFile(n.files);else n=new c(this,t,e,i,s,r),this.addFile(n.files);return this})),t.exports=c},99898:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:n,initialize:function(t,e,i,s){var r="css";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),r=o(a,"extension",r)}var l={type:"script",cache:!1,extension:r,responseType:"text",key:e,url:i,xhrSettings:s};n.call(this,t,l)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("css",(function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,i));return this})),t.exports=l},47375:(t,e,i)=>{var s=i(73152),r=i(40612),n=i(56694),a=i(76846),o=i(72632),h=i(42927),l=i(42911),u=i(70806),c=i(67409),d=i(30657),f=i(80802),p=i(45176),g=i(24904),v=new n({Extends:p,initialize:function(t,e,i,s){if(i.multiAtlasURL){var n=new u(t,{key:e,url:i.multiAtlasURL,xhrSettings:s,config:i});p.call(this,t,"texture",e,[n])}else{var a=i.textureURL.substr(i.textureURL.length-3);i.type||(i.type="ktx"===a.toLowerCase()?"KTX":"PVR");var o=new r(t,{key:e,url:i.textureURL,extension:a,xhrSettings:s,config:i});if(i.atlasURL){var h=new u(t,{key:e,url:i.atlasURL,xhrSettings:s,config:i});p.call(this,t,"texture",e,[o,h])}else p.call(this,t,"texture",e,[o])}this.config=i},onFileComplete:function(t){if(-1!==this.files.indexOf(t)){if(this.pending--,!this.config.multiAtlasURL)return;if("json"===t.type&&t.data.hasOwnProperty("textures")){var e=t.data.textures,i=this.config,s=this.loader,n=s.baseURL,a=s.path,h=s.prefix,l=o(i,"multiBaseURL",this.baseURL),u=o(i,"multiPath",this.path),c=o(i,"prefix",this.prefix),d=o(i,"textureXhrSettings");l&&s.setBaseURL(l),u&&s.setPath(u),c&&s.setPrefix(c);for(var f=0;f<e.length;f++){var p=e[f].image,g="CMA"+this.multiKeyIndex+"_"+p,v=new r(s,g,p,d);if(this.addToMultiFile(v),s.addFile(v),e[f].normalMap){var m=new r(s,g,e[f].normalMap,d);m.type="normalMap",v.setLink(m),this.addToMultiFile(m),s.addFile(m)}}s.setBaseURL(n),s.setPath(a),s.setPrefix(h)}}},addToCache:function(){if(this.isReadyToProcess()){var t=this.config;if(t.multiAtlasURL)this.addMultiToCache();else{var e,i=this.loader.systems.renderer,s=this.loader.textureManager,r=this.files[0],n=this.files[1];if("PVR"===t.type?e=g(r.data):"KTX"===t.type&&(e=c(r.data)),e&&i.supportsCompressedTexture(t.format,e.internalFormat)){e.format=i.getCompressedTextureName(t.format,e.internalFormat);var a=n&&n.data?n.data:null;s.addCompressedTexture(r.key,e,a)}}this.complete=!0}},addMultiToCache:function(){for(var t,e=this.config,i=this.files[0],s=[],r=[],n=[],a=this.loader.systems.renderer,o=this.loader.textureManager,h=1;h<this.files.length;h++){var l=this.files[h];if("normalMap"!==l.type)for(var u=l.key.indexOf("_"),d=l.key.substr(u+1),f=l.data,p=0;p<i.data.textures.length;p++){var v=i.data.textures[p];if(v.image===d){"PVR"===e.type?t=g(f):"KTX"===e.type&&(t=c(f)),t&&a.supportsCompressedTexture(e.format,t.internalFormat)&&(t.format=a.getCompressedTextureName(e.format,t.internalFormat),r.push(t),s.push(v),l.linkFile&&n.push(l.linkFile.data));break}}}0===n.length&&(n=void 0),o.addAtlasJSONArray(this.key,r,s,n),this.complete=!0}});a.register("texture",(function(t,e,i){var r=this.systems.renderer,n=function(t,e,i,n){var a={format:null,type:null,textureURL:void 0,atlasURL:void 0,multiAtlasURL:void 0,multiPath:void 0,multiBaseURL:void 0};if(l(e)){var u=e;e=o(u,"key"),i=o(u,"url"),n=o(u,"xhrSettings")}var c=!1;for(var p in i)if(r.supportsCompressedTexture(p)){var g=i[p];"string"==typeof g?a.textureURL=g:a=d(g,a),a.format=p.toUpperCase(),c=!0;break}if(c)if("IMG"===a.format){var m;m=a.multiAtlasURL?new f(t,e,a.multiAtlasURL,a.multiPath,a.multiBaseURL,n).files:a.atlasURL?new s(t,e,a.textureURL,a.atlasURL,n).files:new h(t,e,a.textureURL,n),t.addFile(m)}else{var x=new v(t,e,a,n);t.addFile(x.files)}else console.warn("No supported compressed texture format or IMG fallback",e)};if(Array.isArray(t))for(var a=0;a<t.length;a++)n(this,t[a]);else n(this,t,e,i);return this})),t.exports=v},46568:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=i(31053),u=new s({Extends:n,initialize:function(t,e,i,s,r){var a="glsl";if(h(e)){var l=e;e=o(l,"key"),i=o(l,"url"),s=o(l,"shaderType","fragment"),r=o(l,"xhrSettings"),a=o(l,"extension",a)}else void 0===s&&(s="fragment");var u={type:"glsl",cache:t.cacheManager.shader,extension:a,responseType:"text",key:e,url:i,config:{shaderType:s},xhrSettings:r};n.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i=this.getShaderName(e.header),s=this.getShaderType(e.header),r=this.getShaderUniforms(e.header),n=e.shader;if(this.cache.has(i)){var a=this.cache.get(i);"fragment"===s?a.fragmentSrc=n:a.vertexSrc=n,a.uniforms||(a.uniforms=r)}else"fragment"===s?this.cache.add(i,new l(i,n,"",r)):this.cache.add(i,new l(i,"",n,r));e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new l(this.key,this.data)):this.cache.add(this.key,new l(this.key,"",this.data))},getShaderName:function(t){for(var e=0;e<t.length;e++){var i=t[e].trim();if("name:"===i.substring(0,5))return i.substring(5).trim()}return this.key},getShaderType:function(t){for(var e=0;e<t.length;e++){var i=t[e].trim();if("type:"===i.substring(0,5))return i.substring(5).trim()}return this.config.shaderType},getShaderUniforms:function(t){for(var e={},i=0;i<t.length;i++){var s=t[i].trim();if("uniform."===s.substring(0,8)){var r=s.indexOf(":");if(r){var n=s.substring(8,r);try{e[n]=JSON.parse(s.substring(r+1))}catch(t){console.warn("Invalid uniform JSON: "+n)}}}}return e},extractBlock:function(t,e){for(var i=-1,s=-1,r=-1,n=!1,a=!1,o=[],h=[],l=e;l<t.length;l++){var u=t[l].trim();if("---"===u)if(-1===i)i=l,n=!0;else{if(!n){a=!1;break}s=l,n=!1,a=!0}else n?o.push(u):a&&(h.push(u),r=l)}return n||-1===s?null:{header:o,shader:h.join("\n"),offset:r}}});a.register("glsl",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new u(this,t[r]));else this.addFile(new u(this,t,e,i,s));return this})),t.exports=u},30929:(t,e,i)=>{var s=i(56694),r=i(683),n=i(98035),a=i(72632),o=i(30750),h=i(42911),l=new s({Extends:n,initialize:function(t,e,i,s){if(h(e)){var r=e;e=a(r,"key"),s=a(r,"config",s)}var o={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:s};n.call(this,t,o),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 t=0;t<this.data.length;t++){var e=this.data[t];e.oncanplaythrough=null,e.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(t){var e=t.target;e.oncanplaythrough=null,e.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var t=this.config&&this.config.instances||1;this.filesTotal=t,this.filesLoaded=0,this.percentComplete=0;for(var e=0;e<t;e++){var i=new Audio;i.dataset||(i.dataset={}),i.dataset.name=this.key+("0"+e).slice(-2),i.dataset.used="false",this.locked?i.dataset.locked="true":(i.dataset.locked="false",i.preload="auto",i.oncanplaythrough=this.onProgress.bind(this),i.onerror=this.onError.bind(this)),this.data.push(i)}for(e=0;e<this.data.length;e++)(i=this.data[e]).src=o(this,this.loader.baseURL),this.locked||i.load();this.locked&&setTimeout(this.onLoad.bind(this))}});t.exports=l},77459:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:n,initialize:function(t,e,i,s){var r="html";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),r=o(a,"extension",r)}var l={type:"text",cache:t.cacheManager.html,extension:r,responseType:"text",key:e,url:i,xhrSettings:s};n.call(this,t,l)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("html",(function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,i));return this})),t.exports=l},9755:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:n,initialize:function(t,e,i,s,r,a){void 0===s&&(s=512),void 0===r&&(r=512);var l="html";if(h(e)){var u=e;e=o(u,"key"),i=o(u,"url"),a=o(u,"xhrSettings"),l=o(u,"extension",l),s=o(u,"width",s),r=o(u,"height",r)}var c={type:"html",cache:t.textureManager,extension:l,responseType:"text",key:e,url:i,xhrSettings:a,config:{width:s,height:r}};n.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[];i.push('<svg width="'+t+'px" height="'+e+'px" viewBox="0 0 '+t+" "+e+'" xmlns="http://www.w3.org/2000/svg">'),i.push('<foreignObject width="100%" height="100%">'),i.push('<body xmlns="http://www.w3.org/1999/xhtml">'),i.push(this.xhrLoader.responseText),i.push("</body>"),i.push("</foreignObject>"),i.push("</svg>");var s=[i.join("\n")],a=this;try{var o=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch(t){return a.state=r.FILE_ERRORED,void a.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){n.revokeObjectURL(a.data),a.onProcessComplete()},this.data.onerror=function(){n.revokeObjectURL(a.data),a.onProcessError()},n.createObjectURL(this.data,o,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});a.register("htmlTexture",(function(t,e,i,s,r){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i,s,r));return this})),t.exports=l},42927:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=i(30750),u=new s({Extends:n,initialize:function t(e,i,s,r,a){var l,u="png";if(h(i)){var c=i;i=o(c,"key"),s=o(c,"url"),l=o(c,"normalMap"),r=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:s,xhrSettings:r,config:a};if(n.call(this,e,d),l){var f=new t(e,this.key,l,r,a);f.type="normalMap",this.setLink(f),e.addFile(f)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){n.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){n.revokeObjectURL(t.data),t.onProcessError()},n.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("spritesheet"===t.type?t.addToCache():"normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new u(this,t[s]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},70806:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(10850),l=i(42911),u=new s({Extends:n,initialize:function(t,e,i,s,a){var u="json";if(l(e)){var c=e;e=o(c,"key"),i=o(c,"url"),s=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"dataKey",a)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:s,config:a};n.call(this,t,d),l(i)&&(this.data=a?h(i,a):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new u(this,t[r]));else this.addFile(new u(this,t,e,s,i));return this})),t.exports=u},80802:(t,e,i)=>{var s=i(56694),r=i(76846),n=i(72632),a=i(42927),o=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,r,a,u){if(o(e)){var c=e;e=n(c,"key"),i=n(c,"url",!1)?n(c,"url"):n(c,"atlasURL"),a=n(c,"xhrSettings"),s=n(c,"path"),r=n(c,"baseURL"),u=n(c,"textureXhrSettings")}var d=new h(t,e,i,a);l.call(this,t,"multiatlas",e,[d]),this.config.path=s,this.config.baseURL=r,this.config.textureXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,s=this.loader,r=s.baseURL,o=s.path,h=s.prefix,l=n(i,"baseURL",this.baseURL),u=n(i,"path",this.path),c=n(i,"prefix",this.prefix),d=n(i,"textureXhrSettings");s.setBaseURL(l),s.setPath(u),s.setPrefix(c);for(var f=0;f<e.length;f++){var p=e[f].image,g="MA"+this.multiKeyIndex+"_"+p,v=new a(s,g,p,d);if(this.addToMultiFile(v),s.addFile(v),e[f].normalMap){var m=new a(s,g,e[f].normalMap,d);m.type="normalMap",v.setLink(m),this.addToMultiFile(m),s.addFile(m)}}s.setBaseURL(r),s.setPath(o),s.setPrefix(h)}},addToCache:function(){if(this.isReadyToProcess()){for(var t=this.files[0],e=[],i=[],s=[],r=1;r<this.files.length;r++){var n=this.files[r];if("normalMap"!==n.type)for(var a=n.key.indexOf("_"),o=n.key.substr(a+1),h=n.data,l=0;l<t.data.textures.length;l++){var u=t.data.textures[l];if(u.image===o){i.push(h),e.push(u),n.linkFile&&s.push(n.linkFile.data);break}}}0===s.length&&(s=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,i,e,s),this.complete=!0}}});r.register("multiatlas",(function(t,e,i,s,r){var n;if(Array.isArray(t))for(var a=0;a<t.length;a++)n=new u(this,t[a]),this.addFile(n.files);else n=new u(this,t,e,i,s,r),this.addFile(n.files);return this})),t.exports=u},39034:(t,e,i)=>{var s=i(56694),r=i(76846),n=i(72632),a=i(42911),o=i(45176),h=i(55188),l=new s({Extends:o,initialize:function(t,e,i,s){var r="js",l=[];if(a(e)){var u=e;e=n(u,"key"),i=n(u,"url"),s=n(u,"xhrSettings"),r=n(u,"extension",r)}Array.isArray(i)||(i=[i]);for(var c=0;c<i.length;c++){var d=new h(t,{key:e+"_"+c.toString(),url:i[c],extension:r,xhrSettings:s});d.onProcess=function(){this.onProcessComplete()},l.push(d)}o.call(this,t,"scripts",e,l)},addToCache:function(){if(this.isReadyToProcess()){for(var t=0;t<this.files.length;t++){var e=this.files[t];e.data=document.createElement("script"),e.data.language="javascript",e.data.type="text/javascript",e.data.defer=!1,e.data.text=e.xhrLoader.responseText,document.head.appendChild(e.data)}this.complete=!0}}});r.register("scripts",(function(t,e,i){var s;if(Array.isArray(t))for(var r=0;r<t.length;r++)s=new l(this,t[r]),this.addFile(s.files);else s=new l(this,t,e,i),this.addFile(s.files);return this})),t.exports=l},85527:(t,e,i)=>{var s=i(56694),r=i(76846),n=i(72632),a=i(42911),o=i(45176),h=i(27291),l=i(76799),u=i(86897),c=new s({Extends:o,initialize:function(t,e,i,s,r,h){var l,c,d=t.cacheManager.obj;if(a(e)){var f=e;e=n(f,"key"),l=new u(t,{key:e,type:"obj",cache:d,url:n(f,"url"),extension:n(f,"extension","obj"),xhrSettings:n(f,"xhrSettings"),config:{flipUV:n(f,"flipUV",r)}}),(s=n(f,"matURL"))&&(c=new u(t,{key:e,type:"mat",cache:d,url:s,extension:n(f,"matExtension","mat"),xhrSettings:n(f,"xhrSettings")}))}else l=new u(t,{key:e,url:i,type:"obj",cache:d,extension:"obj",xhrSettings:h,config:{flipUV:r}}),s&&(c=new u(t,{key:e,url:s,type:"mat",cache:d,extension:"mat",xhrSettings:h}));o.call(this,t,"obj",e,[l,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=h(t.data,t.config.flipUV);e&&(i.materials=l(e.data)),t.cache.add(t.key,i),this.complete=!0}}});r.register("obj",(function(t,e,i,s,r){var n;if(Array.isArray(t))for(var a=0;a<t.length;a++)n=new c(this,t[a]),this.addFile(n.files);else n=new c(this,t,e,i,s,r),this.addFile(n.files);return this})),t.exports=c},3616:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(76846),a=i(70806),o=new s({Extends:a,initialize:function(t,e,i,s,r){a.call(this,t,e,i,s,r),this.type="packfile"},onProcess:function(){if(this.state!==r.FILE_POPULATED&&(this.state=r.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var t={};t[this.config]=this.data,this.data=t}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});n.register("pack",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new o(this,t[r]));else this.addFile(new o(this,t,e,s,i));return this})),t.exports=o},12217:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:n,initialize:function(t,e,i,s,a,l){var u="js";if(h(e)){var c=e;e=o(c,"key"),i=o(c,"url"),l=o(c,"xhrSettings"),u=o(c,"extension",u),s=o(c,"start"),a=o(c,"mapping")}var d={type:"plugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{start:s,mapping:a}};n.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=r.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=o(e,"start",!1),s=o(e,"mapping",null);if(this.state===r.FILE_POPULATED)t.install(this.key,this.data,i,s);else{this.state=r.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 n=t.install(this.key,window[this.key],i,s);(i||s)&&(this.loader.systems[s]=n,this.loader.scene[s]=n)}this.onProcessComplete()}});a.register("plugin",(function(t,e,i,s,r){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i,s,r));return this})),t.exports=l},4474:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:n,initialize:function(t,e,i,s,r){var a="svg";if(h(e)){var l=e;e=o(l,"key"),i=o(l,"url"),s=o(l,"svgConfig",{}),r=o(l,"xhrSettings"),a=o(l,"extension",a)}var u={type:"svg",cache:t.textureManager,extension:a,responseType:"text",key:e,url:i,xhrSettings:r,config:{width:o(s,"width"),height:o(s,"height"),scale:o(s,"scale")}};n.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,s=this.config.height,a=this.config.scale;t:if(i&&s||a){var o=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],h=o.hasAttribute("viewBox"),l=parseFloat(o.getAttribute("width")),u=parseFloat(o.getAttribute("height"));if(!h&&l&&u)o.setAttribute("viewBox","0 0 "+l+" "+u);else if(h&&!l&&!u){var c=o.getAttribute("viewBox").split(/\s+|,/);l=c[2],u=c[3]}if(a){if(!l||!u)break t;i=l*a,s=u*a}o.setAttribute("width",i.toString()+"px"),o.setAttribute("height",s.toString()+"px"),e=[(new XMLSerializer).serializeToString(o)]}try{var d=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var f=this,p=!1;this.data.onload=function(){p||n.revokeObjectURL(f.data),f.onProcessComplete()},this.data.onerror=function(){p?f.onProcessError():(p=!0,n.revokeObjectURL(f.data),f.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},n.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});a.register("svg",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,i,s));return this})),t.exports=l},95171:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:n,initialize:function(t,e,i,s){var r="js";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),r=o(a,"extension",r)}var l={type:"text",extension:r,responseType:"text",key:e,url:i,xhrSettings:s};n.call(this,t,l)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),e=eval;this.loader.sceneManager.add(this.key,e(t)),this.complete=!0}});a.register("sceneFile",(function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,i));return this})),t.exports=l},82458:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:n,initialize:function(t,e,i,s,a,l){var u="js";if(h(e)){var c=e;e=o(c,"key"),i=o(c,"url"),l=o(c,"xhrSettings"),u=o(c,"extension",u),s=o(c,"systemKey"),a=o(c,"sceneKey")}var d={type:"scenePlugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{systemKey:s,sceneKey:a}};n.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=r.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,s=o(e,"systemKey",i),n=o(e,"sceneKey",i);this.state===r.FILE_POPULATED?t.installScenePlugin(s,this.data,n,this.loader.scene,!0):(this.state=r.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),t.installScenePlugin(s,window[this.key],n,this.loader.scene,!0)),this.onProcessComplete()}});a.register("scenePlugin",(function(t,e,i,s,r){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i,s,r));return this})),t.exports=l},55188:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:n,initialize:function(t,e,i,s,r){var a="js";if(h(e)){var l=e;e=o(l,"key"),i=o(l,"url"),s=o(l,"type","script"),r=o(l,"xhrSettings"),a=o(l,"extension",a)}else void 0===s&&(s="script");var u={type:s,cache:!1,extension:a,responseType:"text",key:e,url:i,xhrSettings:r};n.call(this,t,u)},onProcess:function(){this.state=r.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()}});a.register("script",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,i,s));return this})),t.exports=l},33536:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(76846),a=i(42927),o=new s({Extends:a,initialize:function(t,e,i,s,r){a.call(this,t,e,i,r,s),this.type="spritesheet"},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addSpriteSheet(this.key,t.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,t.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});n.register("spritesheet",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new o(this,t[r]));else this.addFile(new o(this,t,e,i,s));return this})),t.exports=o},86897:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:n,initialize:function(t,e,i,s){var r="text",a="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=o(u,"key"),i=o(u,"url"),s=o(u,"xhrSettings"),a=o(u,"extension",a),r=o(u,"type",r),l=o(u,"cache",l)}var c={type:r,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:s};n.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,i));return this})),t.exports=l},58673:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=i(93560),u=new s({Extends:n,initialize:function(t,e,i,s){var r="csv";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),r=o(a,"extension",r)}var u={type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:r,responseType:"text",key:e,url:i,xhrSettings:s};n.call(this,t,u),this.tilemapFormat=l.CSV},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t)}});a.register("tilemapCSV",(function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new u(this,t[s]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},98896:(t,e,i)=>{var s=i(56694),r=i(76846),n=i(70806),a=i(93560),o=new s({Extends:n,initialize:function(t,e,i,s){n.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:a.WELTMEISTER,data:this.data};this.cache.add(this.key,t)}});r.register("tilemapImpact",(function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new o(this,t[s]));else this.addFile(new o(this,t,e,i));return this})),t.exports=o},50563:(t,e,i)=>{var s=i(56694),r=i(76846),n=i(70806),a=i(93560),o=new s({Extends:n,initialize:function(t,e,i,s){n.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:a.TILED_JSON,data:this.data};this.cache.add(this.key,t)}});r.register("tilemapTiledJSON",(function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new o(this,t[s]));else this.addFile(new o(this,t,e,i));return this})),t.exports=o},82857:(t,e,i)=>{var s=i(56694),r=i(76846),n=i(72632),a=i(42927),o=i(42911),h=i(45176),l=i(86897),u=new s({Extends:h,initialize:function(t,e,i,s,r,u){var c,d;if(o(e)){var f=e;e=n(f,"key"),c=new a(t,{key:e,url:n(f,"textureURL"),extension:n(f,"textureExtension","png"),normalMap:n(f,"normalMap"),xhrSettings:n(f,"textureXhrSettings")}),d=new l(t,{key:e,url:n(f,"atlasURL"),extension:n(f,"atlasExtension","txt"),xhrSettings:n(f,"atlasXhrSettings")})}else c=new a(t,e,i,r),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"unityatlas",e,[c,d,c.linkFile]):h.call(this,t,"unityatlas",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),this.complete=!0}}});r.register("unityAtlas",(function(t,e,i,s,r){var n;if(Array.isArray(t))for(var a=0;a<t.length;a++)n=new u(this,t[a]),this.addFile(n.files);else n=new u(this,t,e,i,s,r),this.addFile(n.files);return this})),t.exports=u},22833:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(30750),h=i(72632),l=i(42911),u=new s({Extends:n,initialize:function(t,e,i,s){if(void 0===s&&(s=!1),l(e)){var r=e;e=h(r,"key"),i=h(r,"url",[]),s=h(r,"noAudio",!1)}var a=t.systems.game.device.video.getVideoURL(i);a||console.warn("VideoFile: No supported format for "+e);var o={type:"video",cache:t.cacheManager.video,extension:a.type,key:e,url:a.url,config:{noAudio:s}};n.call(this,t,o)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=o(this,this.loader.baseURL),this.state=r.FILE_LOADED,this.loader.nextFile(this,!0)}});a.register("video",(function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new u(this,t[s]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},15297:(t,e,i)=>{var s=i(56694),r=i(12117),n=i(98035),a=i(76846),o=i(72632),h=i(42911),l=i(89200),u=new s({Extends:n,initialize:function(t,e,i,s){var r="xml";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),r=o(a,"extension",r)}var l={type:"xml",cache:t.cacheManager.xml,extension:r,responseType:"text",key:e,url:i,xhrSettings:s};n.call(this,t,l)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});a.register("xml",(function(t,e,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new u(this,t[s]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},34034:(t,e,i)=>{t.exports={AnimationJSONFile:i(46468),AsepriteFile:i(31648),AtlasJSONFile:i(73152),AtlasXMLFile:i(24616),AudioFile:i(67448),AudioSpriteFile:i(66109),BinaryFile:i(40612),BitmapFontFile:i(54565),CompressedTextureFile:i(47375),CSSFile:i(99898),GLSLFile:i(46568),HTML5AudioFile:i(30929),HTMLFile:i(77459),HTMLTextureFile:i(9755),ImageFile:i(42927),JSONFile:i(70806),MultiAtlasFile:i(80802),MultiScriptFile:i(39034),OBJFile:i(85527),PackFile:i(3616),PluginFile:i(12217),SceneFile:i(95171),ScenePluginFile:i(82458),ScriptFile:i(55188),SpriteSheetFile:i(33536),SVGFile:i(4474),TextFile:i(86897),TilemapCSVFile:i(58673),TilemapImpactFile:i(98896),TilemapJSONFile:i(50563),UnityAtlasFile:i(82857),VideoFile:i(22833),XMLFile:i(15297)}},95695:(t,e,i)=>{var s=i(12117),r=i(98611),n={Events:i(683),FileTypes:i(34034),File:i(98035),FileTypesManager:i(76846),GetURL:i(30750),LoaderPlugin:i(67285),MergeXHRSettings:i(43531),MultiFile:i(45176),XHRLoader:i(88490),XHRSettings:i(33868)};n=r(!1,n,s),t.exports=n},26042:t=>{t.exports=function(t){for(var e=0,i=0;i<t.length;i++)e+=+t[i];return e/t.length}},22824:(t,e,i)=>{var s=i(8034);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},17489:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},14976:t=>{t.exports=function(t,e,i,s,r){var n=.5*(s-e),a=.5*(r-i),o=t*t;return(2*i-2*s+n+a)*(t*o)+(-3*i+3*s-2*n-a)*o+n*t+i}},89129:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},82897:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},75606:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.DEG_TO_RAD}},767:t=>{t.exports=function(t,e){return Math.abs(t-e)}},9849:(t,e,i)=>{var s=i(82897),r=i(56694),n=i(16650),a=i(72283),o=new n,h=new r({initialize:function t(e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=r,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,n=r[0],a=r[4],o=r[8],h=r[1],l=r[5],u=r[9],c=r[2],d=r[6],f=r[10],p=0,g=0,v=0,m=.99999;switch(e){case"XYZ":g=Math.asin(s(o,-1,1)),Math.abs(o)<m?(p=Math.atan2(-u,f),v=Math.atan2(-a,n)):p=Math.atan2(d,l);break;case"YXZ":p=Math.asin(-s(u,-1,1)),Math.abs(u)<m?(g=Math.atan2(o,f),v=Math.atan2(h,l)):g=Math.atan2(-c,n);break;case"ZXY":p=Math.asin(s(d,-1,1)),Math.abs(d)<m?(g=Math.atan2(-c,f),v=Math.atan2(-a,l)):v=Math.atan2(h,n);break;case"ZYX":g=Math.asin(-s(c,-1,1)),Math.abs(c)<m?(p=Math.atan2(d,f),v=Math.atan2(h,n)):v=Math.atan2(-a,l);break;case"YZX":v=Math.asin(s(h,-1,1)),Math.abs(h)<m?(p=Math.atan2(-u,l),g=Math.atan2(-c,n)):g=Math.atan2(o,f);break;case"XZY":v=Math.asin(-s(a,-1,1)),Math.abs(a)<m?(p=Math.atan2(d,l),g=Math.atan2(o,n)):p=Math.atan2(-u,f)}return this._x=p,this._y=g,this._z=v,this._order=e,i&&this.onChangeCallback(this),this}});h.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],h.DefaultOrder="XYZ",t.exports=h},8034:t=>{t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},61616:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},60679:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},91806:(t,e,i)=>{var s=i(82897);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},79366:t=>{t.exports=function(t,e){return t/e/1e3}},43776:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},58442:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},42798:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},61072:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},5341:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=l*n-a*h,c=-l*r+a*o,d=h*r-n*o,f=e*u+i*c+s*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+s*h)*f,t[2]=(a*i-s*n)*f,t[3]=c*f,t[4]=(l*e-s*o)*f,t[5]=(-a*e+s*r)*f,t[6]=d*f,t[7]=(-h*e+i*o)*f,t[8]=(n*e-i*r)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=n*l-a*h,t[1]=s*h-i*l,t[2]=i*a-s*n,t[3]=a*o-r*l,t[4]=e*l-s*o,t[5]=s*r-e*a,t[6]=r*h-n*o,t[7]=i*o-e*h,t[8]=e*n-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*n-a*h)+i*(-l*r+a*o)+s*(h*r-n*o)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],x=c[6],y=c[7],T=c[8];return e[0]=d*i+f*n+p*h,e[1]=d*s+f*a+p*l,e[2]=d*r+f*o+p*u,e[3]=g*i+v*n+m*h,e[4]=g*s+v*a+m*l,e[5]=g*r+v*o+m*u,e[6]=x*i+y*n+T*h,e[7]=x*s+y*a+T*l,e[8]=x*r+y*o+T*u,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*n,e[1]=l*s+h*a,e[2]=l*r+h*o,e[3]=l*n-h*i,e[4]=l*a-h*s,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,r=t.w,n=e+e,a=i+i,o=s+s,h=e*n,l=e*a,u=e*o,c=i*a,d=i*o,f=s*o,p=r*n,g=r*a,v=r*o,m=this.val;return m[0]=1-(c+f),m[3]=l+v,m[6]=u-g,m[1]=l-v,m[4]=1-(h+f),m[7]=d+p,m[2]=u+g,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],r=e[1],n=e[2],a=e[3],o=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],m=e[14],x=e[15],y=s*h-r*o,T=s*l-n*o,w=s*u-a*o,E=r*l-n*h,S=r*u-a*h,b=n*u-a*l,A=c*v-d*g,_=c*m-f*g,C=c*x-p*g,R=d*m-f*v,M=d*x-p*v,P=f*x-p*m,L=y*P-T*M+w*R+E*C-S*_+b*A;return L?(L=1/L,i[0]=(h*P-l*M+u*R)*L,i[1]=(l*C-o*P-u*_)*L,i[2]=(o*M-h*C+u*A)*L,i[3]=(n*M-r*P-a*R)*L,i[4]=(s*P-n*C+a*_)*L,i[5]=(r*C-s*M-a*A)*L,i[6]=(v*b-m*S+x*E)*L,i[7]=(m*w-g*b-x*T)*L,i[8]=(g*S-v*w+x*y)*L,this):null}});t.exports=s},16650:(t,e,i)=>{var s=i(56694),r=i(70015),n=1e-6,a=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new a(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,r,n,a,o,h,l,u,c,d,f,p,g){var v=this.val;return v[0]=t,v[1]=e,v[2]=i,v[3]=s,v[4]=r,v[5]=n,v[6]=a,v[7]=o,v[8]=h,v[9]=l,v[10]=u,v[11]=c,v[12]=d,v[13]=f,v[14]=p,v[15]=g,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=o.fromQuat(i).val,r=e.x,n=e.y,a=e.z;return this.setValues(s[0]*r,s[1]*r,s[2]*r,0,s[4]*n,s[5]*n,s[6]*n,0,s[8]*a,s[9]*a,s[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[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 t=this.val,e=t[1],i=t[2],s=t[3],r=t[6],n=t[7],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=r,t[11]=t[14],t[12]=s,t[13]=n,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],m=e*a-i*n,x=e*o-s*n,y=e*h-r*n,T=i*o-s*a,w=i*h-r*a,E=s*h-r*o,S=l*p-u*f,b=l*g-c*f,A=l*v-d*f,_=u*g-c*p,C=u*v-d*p,R=c*v-d*g,M=m*R-x*C+y*_+T*A-w*b+E*S;return M?(M=1/M,this.setValues((a*R-o*C+h*_)*M,(s*C-i*R-r*_)*M,(p*E-g*w+v*T)*M,(c*w-u*E-d*T)*M,(o*A-n*R-h*b)*M,(e*R-s*A+r*b)*M,(g*y-f*E-v*x)*M,(l*E-c*y+d*x)*M,(n*C-a*A+h*S)*M,(i*A-e*C-r*S)*M,(f*w-p*y+v*m)*M,(u*y-l*w-d*m)*M,(a*b-n*_-o*S)*M,(e*_-i*b+s*S)*M,(p*x-f*T-g*m)*M,(l*T-u*x+c*m)*M)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return this.setValues(a*(c*v-d*g)-u*(o*v-h*g)+p*(o*d-h*c),-(i*(c*v-d*g)-u*(s*v-r*g)+p*(s*d-r*c)),i*(o*v-h*g)-a*(s*v-r*g)+p*(s*h-r*o),-(i*(o*d-h*c)-a*(s*d-r*c)+u*(s*h-r*o)),-(n*(c*v-d*g)-l*(o*v-h*g)+f*(o*d-h*c)),e*(c*v-d*g)-l*(s*v-r*g)+f*(s*d-r*c),-(e*(o*v-h*g)-n*(s*v-r*g)+f*(s*h-r*o)),e*(o*d-h*c)-n*(s*d-r*c)+l*(s*h-r*o),n*(u*v-d*p)-l*(a*v-h*p)+f*(a*d-h*u),-(e*(u*v-d*p)-l*(i*v-r*p)+f*(i*d-r*u)),e*(a*v-h*p)-n*(i*v-r*p)+f*(i*h-r*a),-(e*(a*d-h*u)-n*(i*d-r*u)+l*(i*h-r*a)),-(n*(u*g-c*p)-l*(a*g-o*p)+f*(a*c-o*u)),e*(u*g-c*p)-l*(i*g-s*p)+f*(i*c-s*u),-(e*(a*g-o*p)-n*(i*g-s*p)+f*(i*o-s*a)),e*(a*c-o*u)-n*(i*c-s*u)+l*(i*o-s*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*a-i*n)*(c*v-d*g)-(e*o-s*n)*(u*v-d*p)+(e*h-r*n)*(u*g-c*p)+(i*o-s*a)*(l*v-d*f)-(i*h-r*a)*(l*g-c*f)+(s*h-r*o)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15],x=t.val,y=x[0],T=x[1],w=x[2],E=x[3];return e[0]=y*i+T*a+w*u+E*p,e[1]=y*s+T*o+w*c+E*g,e[2]=y*r+T*h+w*d+E*v,e[3]=y*n+T*l+w*f+E*m,y=x[4],T=x[5],w=x[6],E=x[7],e[4]=y*i+T*a+w*u+E*p,e[5]=y*s+T*o+w*c+E*g,e[6]=y*r+T*h+w*d+E*v,e[7]=y*n+T*l+w*f+E*m,y=x[8],T=x[9],w=x[10],E=x[11],e[8]=y*i+T*a+w*u+E*p,e[9]=y*s+T*o+w*c+E*g,e[10]=y*r+T*h+w*d+E*v,e[11]=y*n+T*l+w*f+E*m,y=x[12],T=x[13],w=x[14],E=x[15],e[12]=y*i+T*a+w*u+E*p,e[13]=y*s+T*o+w*c+E*g,e[14]=y*r+T*h+w*d+E*v,e[15]=y*n+T*l+w*f+E*m,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,r=i[0],n=i[4],a=i[8],o=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],f=i[6],p=i[10],g=i[14],v=i[3],m=i[7],x=i[11],y=i[15],T=s[0],w=s[4],E=s[8],S=s[12],b=s[1],A=s[5],_=s[9],C=s[13],R=s[2],M=s[6],P=s[10],L=s[14],O=s[3],F=s[7],D=s[11],k=s[15];return this.setValues(r*T+n*b+a*R+o*O,h*T+l*b+u*R+c*O,d*T+f*b+p*R+g*O,v*T+m*b+x*R+y*O,r*w+n*A+a*M+o*F,h*w+l*A+u*M+c*F,d*w+f*A+p*M+g*F,v*w+m*A+x*M+y*F,r*E+n*_+a*P+o*D,h*E+l*_+u*P+c*D,d*E+f*_+p*P+g*D,v*E+m*_+x*P+y*D,r*S+n*C+a*L+o*k,h*S+l*C+u*L+c*k,d*S+f*C+p*L+g*k,v*S+m*C+x*L+y*k)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),r=1-i,n=t.x,a=t.y,o=t.z,h=r*n,l=r*a;return this.setValues(h*n+i,h*a-s*o,h*o+s*a,0,h*a+s*o,l*a+i,l*o-s*n,0,h*o-s*a,l*o+s*n,r*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,r=e.y,a=e.z,o=Math.sqrt(s*s+r*r+a*a);if(Math.abs(o)<n)return this;s*=o=1/o,r*=o,a*=o;var h=Math.sin(t),l=Math.cos(t),u=1-l,c=i[0],d=i[1],f=i[2],p=i[3],g=i[4],v=i[5],m=i[6],x=i[7],y=i[8],T=i[9],w=i[10],E=i[11],S=i[12],b=i[13],A=i[14],_=i[15],C=s*s*u+l,R=r*s*u+a*h,M=a*s*u-r*h,P=s*r*u-a*h,L=r*r*u+l,O=a*r*u+s*h,F=s*a*u+r*h,D=r*a*u-s*h,k=a*a*u+l;return this.setValues(c*C+g*R+y*M,d*C+v*R+T*M,f*C+m*R+w*M,p*C+x*R+E*M,c*P+g*L+y*O,d*P+v*L+T*O,f*P+m*L+w*O,p*P+x*L+E*O,c*F+g*D+y*k,d*F+v*D+T*k,f*F+m*D+w*k,p*F+x*D+E*k,S,b,A,_)},rotateX:function(t){var e=this.val,i=Math.sin(t),s=Math.cos(t),r=e[4],n=e[5],a=e[6],o=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=r*s+h*i,e[5]=n*s+l*i,e[6]=a*s+u*i,e[7]=o*s+c*i,e[8]=h*s-r*i,e[9]=l*s-n*i,e[10]=u*s-a*i,e[11]=c*s-o*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),s=Math.cos(t),r=e[0],n=e[1],a=e[2],o=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=r*s-h*i,e[1]=n*s-l*i,e[2]=a*s-u*i,e[3]=o*s-c*i,e[8]=r*i+h*s,e[9]=n*i+l*s,e[10]=a*i+u*s,e[11]=o*i+c*s,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),s=Math.cos(t),r=e[0],n=e[1],a=e[2],o=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=r*s+h*i,e[1]=n*s+l*i,e[2]=a*s+u*i,e[3]=o*s+c*i,e[4]=h*s-r*i,e[5]=l*s-n*i,e[6]=u*s-a*i,e[7]=c*s-o*i,this},fromRotationTranslation:function(t,e){var i=t.x,s=t.y,r=t.z,n=t.w,a=i+i,o=s+s,h=r+r,l=i*a,u=i*o,c=i*h,d=s*o,f=s*h,p=r*h,g=n*a,v=n*o,m=n*h;return this.setValues(1-(d+p),u+m,c-v,0,u-m,1-(l+p),f+g,0,c+v,f-g,1-(l+d),0,e.x,e.y,e.z,1)},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,r=t.w,n=e+e,a=i+i,o=s+s,h=e*n,l=e*a,u=e*o,c=i*a,d=i*o,f=s*o,p=r*n,g=r*a,v=r*o;return this.setValues(1-(c+f),l+v,u-g,0,l-v,1-(h+f),d+p,0,u+g,d-p,1-(h+c),0,0,0,0,1)},frustum:function(t,e,i,s,r,n){var a=1/(e-t),o=1/(s-i),h=1/(r-n);return this.setValues(2*r*a,0,0,0,0,2*r*o,0,0,(e+t)*a,(s+i)*o,(n+r)*h,-1,0,0,n*r*2*h,0)},perspective:function(t,e,i,s){var r=1/Math.tan(t/2),n=1/(i-s);return this.setValues(r/e,0,0,0,0,r,0,0,0,0,(s+i)*n,-1,0,0,2*s*i*n,0)},perspectiveLH:function(t,e,i,s){return this.setValues(2*i/t,0,0,0,0,2*i/e,0,0,0,0,-s/(i-s),1,0,0,i*s/(i-s),0)},ortho:function(t,e,i,s,r,n){var a=t-e,o=i-s,h=r-n;return a=0===a?a:1/a,o=0===o?o:1/o,h=0===h?h:1/h,this.setValues(-2*a,0,0,0,0,-2*o,0,0,0,0,2*h,0,(t+e)*a,(s+i)*o,(n+r)*h,1)},lookAtRH:function(t,e,i){var s=this.val;return c.subVectors(t,e),0===c.getLengthSquared()&&(c.z=1),c.normalize(),l.crossVectors(i,c),0===l.getLengthSquared()&&(1===Math.abs(i.z)?c.x+=1e-4:c.z+=1e-4,c.normalize(),l.crossVectors(i,c)),l.normalize(),u.crossVectors(c,l),s[0]=l.x,s[1]=l.y,s[2]=l.z,s[4]=u.x,s[5]=u.y,s[6]=u.z,s[8]=c.x,s[9]=c.y,s[10]=c.z,this},lookAt:function(t,e,i){var s=t.x,r=t.y,a=t.z,o=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<n&&Math.abs(r-c)<n&&Math.abs(a-d)<n)return this.identity();var f=s-u,p=r-c,g=a-d,v=1/Math.sqrt(f*f+p*p+g*g),m=h*(g*=v)-l*(p*=v),x=l*(f*=v)-o*g,y=o*p-h*f;(v=Math.sqrt(m*m+x*x+y*y))?(m*=v=1/v,x*=v,y*=v):(m=0,x=0,y=0);var T=p*y-g*x,w=g*m-f*y,E=f*x-p*m;return(v=Math.sqrt(T*T+w*w+E*E))?(T*=v=1/v,w*=v,E*=v):(T=0,w=0,E=0),this.setValues(m,T,f,0,x,w,p,0,y,E,g,0,-(m*s+x*r+y*a),-(T*s+w*r+E*a),-(f*s+p*r+g*a),1)},yawPitchRoll:function(t,e,i){this.zero(),o.zero(),h.zero();var s=this.val,r=o.val,n=h.val,a=Math.sin(i),l=Math.cos(i);return s[10]=1,s[15]=1,s[0]=l,s[1]=a,s[4]=-a,s[5]=l,a=Math.sin(e),l=Math.cos(e),r[0]=1,r[15]=1,r[5]=l,r[10]=l,r[9]=-a,r[6]=a,a=Math.sin(t),l=Math.cos(t),n[5]=1,n[15]=1,n[0]=l,n[2]=-a,n[8]=a,n[10]=l,this.multiplyLocal(o),this.multiplyLocal(h),this},setWorldMatrix:function(t,e,i,s,r){return this.yawPitchRoll(t.y,t.x,t.z),o.scaling(i.x,i.y,i.z),h.xyz(e.x,e.y,e.z),this.multiplyLocal(o),this.multiplyLocal(h),s&&this.multiplyLocal(s),r&&this.multiplyLocal(r),this},multiplyToMat4:function(t,e){var i=this.val,s=t.val,r=i[0],n=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=i[6],c=i[7],d=i[8],f=i[9],p=i[10],g=i[11],v=i[12],m=i[13],x=i[14],y=i[15],T=s[0],w=s[1],E=s[2],S=s[3],b=s[4],A=s[5],_=s[6],C=s[7],R=s[8],M=s[9],P=s[10],L=s[11],O=s[12],F=s[13],D=s[14],k=s[15];return e.setValues(T*r+w*h+E*d+S*v,w*n+w*l+E*f+S*m,E*a+w*u+E*p+S*x,S*o+w*c+E*g+S*y,b*r+A*h+_*d+C*v,b*n+A*l+_*f+C*m,b*a+A*u+_*p+C*x,b*o+A*c+_*g+C*y,R*r+M*h+P*d+L*v,R*n+M*l+P*f+L*m,R*a+M*u+P*p+L*x,R*o+M*c+P*g+L*y,O*r+F*h+D*d+k*v,O*n+F*l+D*f+k*m,O*a+F*u+D*p+k*x,O*o+F*c+D*g+k*y)},fromRotationXYTranslation:function(t,e,i){var s=e.x,r=e.y,n=e.z,a=Math.sin(t.x),o=Math.cos(t.x),h=Math.sin(t.y),l=Math.cos(t.y),u=s,c=r,d=n,f=-a,p=0-f*h,g=0-o*h,v=f*l,m=o*l;return i||(u=l*s+h*n,c=p*s+o*r+v*n,d=g*s+a*r+m*n),this.setValues(l,p,g,0,0,o,a,0,h,v,m,0,u,c,d,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],s=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,s))}}),o=new a,h=new a,l=new r,u=new r,c=new r;t.exports=a},69635:t=>{t.exports=function(t,e,i){return Math.min(t+e,i)}},37394:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},17259:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},61820:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==s?(r=(s-t)/(s-i))<0&&(r=0):r=1:r<0&&(r=0),r}},75003:(t,e,i)=>{var s=i(56694),r=i(5341),n=i(72283),a=i(70015),o=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new a(1,0,0),c=new a(0,1,0),d=new a,f=new r,p=new s({initialize:function(t,e,i,s){this.onChangeCallback=n,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=s*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),r+e*(t.z-r),n+e*(t.w-n))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(u).cross(t).length()<o&&d.copy(c).cross(t),d.normalize(),this.setAxisAngle(d,Math.PI)):i>.999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=f.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+r*n+i*o-s*a,i*h+r*a+s*n-e*o,s*h+r*o+e*a-i*n,r*h-e*n-i*a-s*o)},slerp:function(t,e){var i=this.x,s=this.y,r=this.z,n=this.w,a=t.x,h=t.y,l=t.z,u=t.w,c=i*a+s*h+r*l+n*u;c<0&&(c=-c,a=-a,h=-h,l=-l,u=-u);var d=1-e,f=e;if(1-c>o){var p=Math.acos(c),g=Math.sin(p);d=Math.sin((1-e)*p)/g,f=Math.sin(e*p)/g}return this.set(d*i+f*a,d*s+f*h,d*r+f*l,d*n+f*u)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s,n=r?1/r:0;return this.set(-t*n,-e*n,-i*n,s*n)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+r*n,i*a+s*n,s*a-i*n,r*a-e*n)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a-s*n,i*a+r*n,s*a+e*n,r*a-i*n)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*n,i*a-e*n,s*a+r*n,r*a-s*n)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,r=t.z/2,n=Math.cos(i),a=Math.cos(s),o=Math.cos(r),h=Math.sin(i),l=Math.sin(s),u=Math.sin(r);switch(t.order){case"XYZ":this.set(h*a*o+n*l*u,n*l*o-h*a*u,n*a*u+h*l*o,n*a*o-h*l*u,e);break;case"YXZ":this.set(h*a*o+n*l*u,n*l*o-h*a*u,n*a*u-h*l*o,n*a*o+h*l*u,e);break;case"ZXY":this.set(h*a*o-n*l*u,n*l*o+h*a*u,n*a*u+h*l*o,n*a*o-h*l*u,e);break;case"ZYX":this.set(h*a*o-n*l*u,n*l*o+h*a*u,n*a*u-h*l*o,n*a*o+h*l*u,e);break;case"YZX":this.set(h*a*o+n*l*u,n*l*o+h*a*u,n*a*u-h*l*o,n*a*o-h*l*u,e);break;case"XZY":this.set(h*a*o-n*l*u,n*l*o-h*a*u,n*a*u+h*l*o,n*a*o+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],r=i[4],n=i[8],a=i[1],o=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=s+o+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(n-l)*e,(a-r)*e,.25/e)):s>o&&s>c?(e=2*Math.sqrt(1+s-o-c),this.set(.25*e,(r+a)/e,(n+l)/e,(u-h)/e)):o>c?(e=2*Math.sqrt(1+o-s-c),this.set((r+a)/e,.25*e,(h+u)/e,(n-l)/e)):(e=2*Math.sqrt(1+c-s-o),this.set((n+l)/e,(h+u)/e,.25*e,(a-r)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var n=h[r],a=h[n];e=Math.sqrt(i[3*r+r]-i[3*n+n]-i[3*a+a]+1),l[r]=.5*e,e=.5/e,l[n]=(i[3*n+r]+i[3*r+n])*e,l[a]=(i[3*a+r]+i[3*r+a])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*a+n]-i[3*n+a])*e}return this.onChangeCallback(this),this}});t.exports=p},23701:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.RAD_TO_DEG}},16906:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},52417:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,r=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=s*e,t}},17915:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},52257:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},2386:t=>{t.exports=function(t,e,i,s){var r=Math.cos(s),n=Math.sin(s),a=t.x-e,o=t.y-i;return t.x=a*r-o*n+e,t.y=a*n+o*r+i,t}},72395:t=>{t.exports=function(t,e,i,s,r){var n=s+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},41061:t=>{t.exports=function(t,e,i,s,r){return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},93709:(t,e,i)=>{var s=i(70015),r=i(16650),n=i(75003),a=new r,o=new n,h=new s;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},67233:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},64333:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},59533:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var r=[],n=[],a=0;a<t;a++)e+=(i-=e*s)*s,r[a]=i,n[a]=e;return{sin:n,cos:r,length:t}}},5514:t=>{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},87736:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},55805:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,r){void 0===r&&(r=new s);var n=0,a=0;return t>0&&t<=e*i&&(n=t>e-1?t-(a=Math.floor(t/e))*e:t),r.set(n,a)}},64462:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,r,n,a,o,h){void 0===h&&(h=new s);var l=Math.sin(n),u=Math.cos(n),c=u*a,d=l*a,f=-l*o,p=u*o,g=1/(c*p+f*-d);return h.x=p*g*t+-f*g*e+(r*f-i*p)*g,h.y=c*g*e+-d*g*t+(-r*c+i*d)*g,h}},93736:(t,e,i)=>{var s=i(56694),r=i(88456),n=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new n(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},70015:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,r=t.z,n=e.x,a=e.y,o=e.z;return this.x=s*o-r*a,this.y=r*n-i*o,this.z=i*a-s*n,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z;return this.x=i*a-s*n,this.y=s*r-e*a,this.z=e*n-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*s,this.y=r[1]*e+r[4]*i+r[7]*s,this.z=r[2]*e+r[5]*i+r[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=1/(r[3]*e+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*s+r[12])*n,this.y=(r[1]*e+r[5]*i+r[9]*s+r[13])*n,this.z=(r[2]*e+r[6]*i+r[10]*s+r[14])*n,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+s*r[6],this.y=e*r[1]+i*r[4]+s*r[7],this.z=e*r[2]+i*r[5]+s*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12],this.y=r[1]*e+r[5]*i+r[9]*s+r[13],this.z=r[2]*e+r[6]*i+r[10]*s+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=e*r[0]+i*r[4]+s*r[8]+r[12],a=e*r[1]+i*r[5]+s*r[9]+r[13],o=e*r[2]+i*r[6]+s*r[10]+r[14],h=e*r[3]+i*r[7]+s*r[11]+r[15];return this.x=n/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,u=o*s+r*i-n*e,c=-r*e-n*i-a*s;return this.x=h*o+c*-r+l*-a-u*-n,this.y=l*o+c*-n+u*-r-h*-a,this.z=u*o+c*-a+h*-n-l*-r,this},project:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=r[0],a=r[1],o=r[2],h=r[3],l=r[4],u=r[5],c=r[6],d=r[7],f=r[8],p=r[9],g=r[10],v=r[11],m=r[12],x=r[13],y=r[14],T=1/(e*h+i*d+s*v+r[15]);return this.x=(e*n+i*l+s*f+m)*T,this.y=(e*a+i*u+s*p+x)*T,this.z=(e*o+i*c+s*g+y)*T,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,r=t.z,n=t.w,a=this.x-i,o=n-this.y-1-s,h=this.z;return this.x=2*a/r-1,this.y=2*o/n-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},51729:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=s*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this.w=n+e*(t.w-n),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+s*s+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12]*r,this.y=n[1]*e+n[5]*i+n[9]*s+n[13]*r,this.z=n[2]*e+n[6]*i+n[10]*s+n[14]*r,this.w=n[3]*e+n[7]*i+n[11]*s+n[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,u=o*s+r*i-n*e,c=-r*e-n*i-a*s;return this.x=h*o+c*-r+l*-a-u*-n,this.y=l*o+c*-n+u*-r-h*-a,this.z=u*o+c*-a+h*-n-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},9557:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},1071:t=>{t.exports=function(t,e,i){var s=i-e;return e+((t-e)%s+s)%s}},90447:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},94240:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},84066:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},9678:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},76861:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},37570:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},87597:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-Math.PI,Math.PI)}},74493:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-180,180)}},19049:(t,e,i)=>{var s=i(37570);t.exports=function(t){return s(t+Math.PI)}},90612:(t,e,i)=>{var s=i(83392);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e<t?e+=s.PI2:e-=s.PI2),e>t?t+=i:e<t&&(t-=i))),t}},93954:t=>{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},35786:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},62138:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-180,180)}},22153:(t,e,i)=>{t.exports={Between:i(90447),BetweenPoints:i(94240),BetweenPointsY:i(84066),BetweenY:i(9678),CounterClockwise:i(76861),Normalize:i(37570),Random:i(87597),RandomDegrees:i(74493),Reverse:i(19049),RotateTo:i(90612),ShortestBetween:i(93954),Wrap:i(35786),WrapDegrees:i(62138)}},83392:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,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};t.exports=e},53996:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return Math.sqrt(r*r+n*n)}},92951:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},12161:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},38057:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},33297:t=>{t.exports=function(t,e,i,s,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(s-e,r))}},90366:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},35032:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return r*r+n*n}},10130:(t,e,i)=>{t.exports={Between:i(53996),BetweenPoints:i(92951),BetweenPointsSquared:i(12161),Chebyshev:i(38057),Power:i(33297),Snake:i(90366),Squared:i(35032)}},35060:(t,e,i)=>{var s=i(25265),r=i(57428),n=i(73214),a=i(71778),o=i(36468),h=i(88258),l=i(52910),u=i(67799),c=i(74083),d=i(92284),f=i(28035),p=i(8754);t.exports={Power0:l,Power1:u.Out,Power2:a.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:a.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:n.Out,Elastic:o.Out,Back:s.Out,Bounce:r.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":a.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":n.In,"Elastic.easeIn":o.In,"Back.easeIn":s.In,"Bounce.easeIn":r.In,"Quad.easeOut":u.Out,"Cubic.easeOut":a.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":n.Out,"Elastic.easeOut":o.Out,"Back.easeOut":s.Out,"Bounce.easeOut":r.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":a.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":n.InOut,"Elastic.easeInOut":o.InOut,"Back.easeInOut":s.InOut,"Bounce.easeInOut":r.InOut}},25860:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},45264:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},36699:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},25265:(t,e,i)=>{t.exports={In:i(25860),Out:i(36699),InOut:i(45264)}},62191:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},24799:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},60819:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},57428:(t,e,i)=>{t.exports={In:i(62191),Out:i(60819),InOut:i(24799)}},86855:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},7280:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},18058:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},73214:(t,e,i)=>{t.exports={In:i(86855),Out:i(18058),InOut:i(7280)}},91532:t=>{t.exports=function(t){return t*t*t}},63180:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},16518:t=>{t.exports=function(t){return--t*t*t+1}},71778:(t,e,i)=>{t.exports={In:i(91532),Out:i(16518),InOut:i(63180)}},24729:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},50325:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},84074:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},36468:(t,e,i)=>{t.exports={In:i(24729),Out:i(84074),InOut:i(50325)}},95638:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},10357:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},14894:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},88258:(t,e,i)=>{t.exports={In:i(95638),Out:i(14894),InOut:i(10357)}},33063:(t,e,i)=>{t.exports={Back:i(25265),Bounce:i(57428),Circular:i(73214),Cubic:i(71778),Elastic:i(36468),Expo:i(88258),Linear:i(52910),Quadratic:i(67799),Quartic:i(74083),Quintic:i(92284),Sine:i(28035),Stepped:i(8754)}},43927:t=>{t.exports=function(t){return t}},52910:(t,e,i)=>{t.exports=i(43927)},77471:t=>{t.exports=function(t){return t*t}},83863:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},44383:t=>{t.exports=function(t){return t*(2-t)}},67799:(t,e,i)=>{t.exports={In:i(77471),Out:i(44383),InOut:i(83863)}},48311:t=>{t.exports=function(t){return t*t*t*t}},55248:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},23135:t=>{t.exports=function(t){return 1- --t*t*t*t}},74083:(t,e,i)=>{t.exports={In:i(48311),Out:i(23135),InOut:i(55248)}},7313:t=>{t.exports=function(t){return t*t*t*t*t}},98759:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},26670:t=>{t.exports=function(t){return--t*t*t*t*t+1}},92284:(t,e,i)=>{t.exports={In:i(7313),Out:i(26670),InOut:i(98759)}},52929:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},66333:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},37255:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},28035:(t,e,i)=>{t.exports={In:i(52929),Out:i(37255),InOut:i(66333)}},52770:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},8754:(t,e,i)=>{t.exports=i(52770)},17247:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},88456:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)<i}},61824:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},41935:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},54726:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t<e+i}},52778:(t,e,i)=>{t.exports={Ceil:i(17247),Equal:i(88456),Floor:i(61824),GreaterThan:i(41935),LessThan:i(54726)}},5923:(t,e,i)=>{var s=i(83392),r=i(98611),n={Angle:i(22153),Distance:i(10130),Easing:i(33063),Fuzzy:i(52778),Interpolation:i(48528),Pow2:i(73773),Snap:i(23679),RandomDataGenerator:i(81429),Average:i(26042),Bernstein:i(22824),Between:i(17489),CatmullRom:i(14976),CeilTo:i(89129),Clamp:i(82897),DegToRad:i(75606),Difference:i(767),Euler:i(9849),Factorial:i(8034),FloatBetween:i(61616),FloorTo:i(60679),FromPercent:i(91806),GetSpeed:i(79366),IsEven:i(43776),IsEvenStrict:i(58442),Linear:i(42798),LinearXY:i(61072),MaxAdd:i(69635),Median:i(37394),MinSub:i(17259),Percent:i(61820),RadToDeg:i(23701),RandomXY:i(16906),RandomXYZ:i(52417),RandomXYZW:i(17915),Rotate:i(52257),RotateAround:i(2386),RotateAroundDistance:i(72395),RotateTo:i(41061),RoundAwayFromZero:i(67233),RoundTo:i(64333),SinCosTableGenerator:i(59533),SmootherStep:i(87736),SmoothStep:i(5514),ToXY:i(55805),TransformXY:i(64462),Within:i(9557),Wrap:i(1071),Vector2:i(93736),Vector3:i(70015),Vector4:i(51729),Matrix3:i(5341),Matrix4:i(16650),Quaternion:i(75003),RotateVec3:i(93709)};n=r(!1,n,s),t.exports=n},63210:(t,e,i)=>{var s=i(22824);t.exports=function(t,e){for(var i=0,r=t.length-1,n=0;n<=r;n++)i+=Math.pow(1-e,r-n)*Math.pow(e,n)*t[n]*s(r,n);return i}},88332:(t,e,i)=>{var s=i(14976);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return t[0]===t[i]?(e<0&&(n=Math.floor(r=i*(1+e))),s(r-n,t[(n-1+i)%i],t[n],t[(n+1)%i],t[(n+2)%i])):e<0?t[0]-(s(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(r-n,t[n?n-1:0],t[n],t[i<n+1?i:n+1],t[i<n+2?i:n+2])}},34631:t=>{t.exports=function(t,e,i,s,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,r)}},47614:(t,e,i)=>{var s=i(42798);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return e<0?s(t[0],t[1],r):e>1?s(t[i],t[i-1],i-r):s(t[n],t[n+1>i?i:n+1],r-n)}},16252:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},44521:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},45507:(t,e,i)=>{var s=i(87736);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},48528:(t,e,i)=>{t.exports={Bezier:i(63210),CatmullRom:i(88332),CubicBezier:i(34631),Linear:i(47614),QuadraticBezier:i(16252),SmoothStep:i(44521),SmootherStep:i(45507)}},3504:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<<Math.ceil(e)}},28621:t=>{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},2018:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},73773:(t,e,i)=>{t.exports={GetNext:i(3504),IsSize:i(28621),IsValue:i(2018)}},81429:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s<t.length;s++)e=.02519603282416938*(i+=t.charCodeAt(s)),e-=i=e>>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e<t.length&&null!=t[e];e++){var i=t[e];this.s0-=this.hash(i),this.s0+=~~(this.s0<0),this.s1-=this.hash(i),this.s1+=~~(this.s1<0),this.s2-=this.hash(i),this.s2+=~~(this.s2<0)}},integer:function(){return 4294967296*this.rnd()},frac:function(){return this.rnd()+11102230246251565e-32*(2097152*this.rnd()|0)},real:function(){return this.integer()+this.frac()},integerInRange:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},between:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},realInRange:function(t,e){return this.frac()*(e-t)+t},normal:function(){return 1-2*this.frac()},uuid:function(){var t="",e="";for(e=t="";t++<36;e+=~t%5|3*t&4?(15^t?8^this.frac()*(20^t?16:4):4).toString(16):"-");return e},pick:function(t){return t[this.integerInRange(0,t.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(t){return t[~~(Math.pow(this.frac(),2)*(t.length-.5)+.5)]},timestamp:function(t,e){return this.realInRange(t||9466848e5,e||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(t){return"string"==typeof t&&t.match(/^!rnd/)&&(t=t.split(","),this.c=parseFloat(t[1]),this.s0=parseFloat(t[2]),this.s1=parseFloat(t[3]),this.s2=parseFloat(t[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},82127:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},84314:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},88462:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},23679:(t,e,i)=>{t.exports={Ceil:i(82127),Floor:i(84314),To:i(88462)}},85780:(t,e,i)=>{i(75205);var s=i(86459),r=i(98611),n={Actions:i(83979),Animations:i(13517),BlendModes:i(95723),Cache:i(45820),Cameras:i(44143),Core:i(80293),Class:i(56694),Create:i(84106),Curves:i(73962),Data:i(1999),Display:i(24816),DOM:i(3590),Events:i(95146),FX:i(96910),Game:i(15213),GameObjects:i(48013),Geom:i(84068),Input:i(20873),Loader:i(95695),Math:i(5923),Physics:{Arcade:i(39977)},Plugins:i(45615),Renderer:i(42069),Scale:i(86754),ScaleModes:i(27394),Scene:i(87157),Scenes:i(20436),Structs:i(20010),Textures:i(87499),Tilemaps:i(52678),Time:i(97121),Tweens:i(75193),Utils:i(22178)};n.Sound=i(56751),n=r(!1,n,s),t.exports=n,i.g.Phaser=n},62832:(t,e,i)=>{var s=i(56694),r=i(7864),n=i(1539),a=new s({Extends:n,Mixins:[r.Acceleration,r.Angular,r.Bounce,r.Collision,r.Debug,r.Drag,r.Enable,r.Friction,r.Gravity,r.Immovable,r.Mass,r.Pushable,r.Size,r.Velocity],initialize:function(t,e,i,s,r){n.call(this,t,e,i,s,r),this.body=null}});t.exports=a},66150:(t,e,i)=>{var s=i(56694),r=i(75606),n=i(53996),a=i(35032),o=i(99523),h=i(72632),l=i(30657),u=i(2732),c=i(15147),d=i(91963),f=i(7599),p=i(93736),g=i(85233),v=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,t.sys.events.once(f.BOOT,this.boot,this),t.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new g(this.scene,this.config),this.add=new o(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new g(this.scene,this.config),this.add=new o(this.world));var t=this.systems.events;h(this.config,"customUpdate",!1)||t.on(f.UPDATE,this.world.update,this.world),t.on(f.POST_UPDATE,this.world.postUpdate,this.world),t.once(f.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(f.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(f.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return l(h(e,"arcade",{}),h(t,"arcade",{}))},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(t,e,i,s,r){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===r&&(r=i),this.world.collideObjects(t,e,i,s,r,!0)},collide:function(t,e,i,s,r){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===r&&(r=i),this.world.collideObjects(t,e,i,s,r,!1)},collideTiles:function(t,e,i,s,r){return this.world.collideTiles(t,e,i,s,r)},overlapTiles:function(t,e,i,s,r){return this.world.overlapTiles(t,e,i,s,r)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,s,r,n){void 0===s&&(s=60);var a=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(a,s),void 0!==r&&void 0!==n&&t.body.maxVelocity.set(r,n),a},accelerateToObject:function(t,e,i,s,r){return this.accelerateTo(t,e.x,e.y,i,s,r)},closest:function(t,e){e||(e=this.world.bodies.entries);for(var i=Number.MAX_VALUE,s=null,r=t.x,n=t.y,o=e.length,h=0;h<o;h++){var l=e[h],u=l.body||l;if(t!==l&&t!==u&&t!==u.gameObject&&t!==u.center){var c=a(r,n,u.center.x,u.center.y);c<i&&(s=l,i=c)}}return s},furthest:function(t,e){e||(e=this.world.bodies.entries);for(var i=-1,s=null,r=t.x,n=t.y,o=e.length,h=0;h<o;h++){var l=e[h],u=l.body||l;if(t!==l&&t!==u&&t!==u.gameObject&&t!==u.center){var c=a(r,n,u.center.x,u.center.y);c>i&&(s=l,i=c)}}return s},moveTo:function(t,e,i,s,r){void 0===s&&(s=60),void 0===r&&(r=0);var a=Math.atan2(i-t.y,e-t.x);return r>0&&(s=n(t.x,t.y,e,i)/(r/1e3)),t.body.velocity.setToPolar(a,s),a},moveToObject:function(t,e,i,s){return this.moveTo(t,e.x,e.y,i,s)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(r(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,s,r,n){return c(this.world,t,e,i,s,r,n)},overlapCirc:function(t,e,i,s,r){return u(this.world,t,e,i,s,r)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.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(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",v,"arcadePhysics"),t.exports=v},25084:(t,e,i)=>{var s=i(56694),r=i(7864),n=i(13747),a=new s({Extends:n,Mixins:[r.Acceleration,r.Angular,r.Bounce,r.Collision,r.Debug,r.Drag,r.Enable,r.Friction,r.Gravity,r.Immovable,r.Mass,r.Pushable,r.Size,r.Velocity],initialize:function(t,e,i,s,r){n.call(this,t,e,i,s,r),this.body=null}});t.exports=a},97602:(t,e,i)=>{var s=i(56694),r=i(95239),n=i(47401),a=i(27037),o=i(23701),h=i(74118),l=i(94287),u=i(15084),c=i(93736),d=new s({Mixins:[r],initialize:function(t,e){var i=64,s=64,r=void 0!==e;r&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),r||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=r?e:void 0,this.isBody=!0,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new c,this.position=new c(e.x-e.scaleX*e.displayOriginX,e.y-e.scaleY*e.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=s,this.sourceWidth=i,this.sourceHeight=s,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(s/2),this.center=new c(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new c,this.newVelocity=new c,this.deltaMax=new c,this.acceleration=new c,this.allowDrag=!0,this.drag=new c,this.allowGravity=!0,this.gravity=new c,this.bounce=new c,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new c(1e4,1e4),this.maxSpeed=-1,this.friction=new c(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=n.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new c(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=n.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new h,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY;var s=!1;if(this.syncBounds){var r=t.getBounds(this._bounds);this.width=r.width,this.height=r.height,s=!0}else{var n=Math.abs(e.scaleX),a=Math.abs(e.scaleY);this._sx===n&&this._sy===a||(this.width=this.sourceWidth*n,this.height=this.sourceHeight*a,this._sx=n,this._sy=a,s=!0)}s&&(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 t=this.transform;this.position.x=t.x+t.scaleX*(this.offset.x-t.displayOriginX),this.position.y=t.y+t.scaleY*(this.offset.y-t.displayOriginY),this.updateCenter()},resetFlags:function(t){void 0===t&&(t=!1);var e=this.wasTouching,i=this.touching,s=this.blocked;t?u(!0,e):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),u(!0,i),u(!0,s),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){if(t&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var i=this.position;this.prev.x=i.x,this.prev.y=i.y,this.prevFrame.x=i.x,this.prevFrame.y=i.y}t&&this.update(e)},update:function(t){var e=this.prev,i=this.position,s=this.velocity;if(e.set(i.x,i.y),!this.moves)return this._dx=i.x-e.x,void(this._dy=i.y-e.y);if(this.directControl){var r=this.autoFrame;s.set((i.x-r.x)/t,(i.y-r.y)/t),this.world.updateMotion(this,t),this._dx=i.x-r.x,this._dy=i.y-r.y}else this.world.updateMotion(this,t),this.newVelocity.set(s.x*t,s.y*t),i.add(this.newVelocity),this._dx=i.x-e.x,this._dy=i.y-e.y;var n=s.x,o=s.y;if(this.updateCenter(),this.angle=Math.atan2(o,n),this.speed=Math.sqrt(n*n+o*o),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var h=this.blocked;this.world.emit(a.WORLD_BOUNDS,this,h.up,h.down,h.left,h.right)}},postUpdate:function(){var t=this.position,e=t.x-this.prevFrame.x,i=t.y-this.prevFrame.y,s=this.gameObject;if(this.moves){var r=this.deltaMax.x,a=this.deltaMax.y;0!==r&&0!==e&&(e<0&&e<-r?e=-r:e>0&&e>r&&(e=r)),0!==a&&0!==i&&(i<0&&i<-a?i=-a:i>0&&i>a&&(i=a)),s&&(s.x+=e,s.y+=i)}e<0?this.facing=n.FACING_LEFT:e>0&&(this.facing=n.FACING_RIGHT),i<0?this.facing=n.FACING_UP:i>0&&(this.facing=n.FACING_DOWN),this.allowRotation&&s&&(s.angle+=this.deltaZ()),this._tx=e,this._ty=i,this.autoFrame.set(t.x,t.y)},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.velocity,i=this.blocked,s=this.customBoundsRectangle,r=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,a=this.worldBounce?-this.worldBounce.y:-this.bounce.y,o=!1;return t.x<s.x&&r.left?(t.x=s.x,e.x*=n,i.left=!0,o=!0):this.right>s.right&&r.right&&(t.x=s.right-this.width,e.x*=n,i.right=!0,o=!0),t.y<s.y&&r.up?(t.y=s.y,e.y*=a,i.up=!0,o=!0):this.bottom>s.bottom&&r.down&&(t.y=s.bottom-this.height,e.y*=a,i.down=!0,o=!0),o&&(this.blocked.none=!1,this.updateCenter()),o},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setGameObject:function(t,e){return void 0===e&&(e=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=t,t.body&&(t.body=this),this.setSize(),this.world.add(this),this.enable=e,this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(s&&(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight)),this.sourceWidth=t,this.sourceHeight=e,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(),i&&s&&s.getCenter){var r=(s.width-t)/2,n=(s.height-e)/2;this.offset.set(r,n)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,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(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i&&(i.setPosition(t,e),this.rotation=i.angle,this.preRotation=i.angle);var s=this.position;i&&i.getTopLeft?i.getTopLeft(s):s.set(t,e),this.prev.copy(s),this.prevFrame.copy(s),this.autoFrame.copy(s),i&&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(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:l(this,t,e)},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(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,s,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,s,i+this.velocity.x/2,s+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(t){return void 0===t&&(t=!0),this.directControl=t,this},setCollideWorldBounds:function(t,e,i,s){void 0===t&&(t=!0),this.collideWorldBounds=t;var r=void 0!==e,n=void 0!==i;return(r||n)&&(this.worldBounce||(this.worldBounce=new c),r&&(this.worldBounce.x=e),n&&(this.worldBounce.y=i)),void 0!==s&&(this.onWorldBounds=s),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){return this.setVelocity(t,this.velocity.y)},setVelocityY:function(t){return this.setVelocity(this.velocity.x,t)},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxVelocityX:function(t){return this.maxVelocity.x=t,this},setMaxVelocityY:function(t){return this.maxVelocity.y=t,this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setSlideFactor:function(t,e){return this.slideFactor.set(t,e),this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDamping:function(t){return this.useDamping=t,this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},processX:function(t,e,i,s){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e*this.slideFactor.x);var r=this.blocked;i&&(r.left=!0,r.none=!1),s&&(r.right=!0,r.none=!1)},processY:function(t,e,i,s){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e*this.slideFactor.y);var r=this.blocked;i&&(r.up=!0,r.none=!1),s&&(r.down=!0,r.none=!1)},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},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}}});t.exports=d},3909:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,r,n,a){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=s,this.collideCallback=r,this.processCallback=n,this.callbackContext=a},setName:function(t){return this.name=t,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}});t.exports=s},99523:(t,e,i)=>{var s=i(62832),r=i(25084),n=i(97602),a=i(56694),o=i(47401),h=i(10481),l=i(66634),u=i(46346),c=new a({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,s,r){return this.world.addCollider(t,e,i,s,r)},overlap:function(t,e,i,s,r){return this.world.addOverlap(t,e,i,s,r)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,r){var n=new s(this.scene,t,e,i,r);return this.sys.displayList.add(n),this.world.enableBody(n,o.STATIC_BODY),n},image:function(t,e,i,r){var n=new s(this.scene,t,e,i,r);return this.sys.displayList.add(n),this.world.enableBody(n,o.DYNAMIC_BODY),n},staticSprite:function(t,e,i,s){var n=new r(this.scene,t,e,i,s);return this.sys.displayList.add(n),this.sys.updateList.add(n),this.world.enableBody(n,o.STATIC_BODY),n},sprite:function(t,e,i,s){var n=new r(this.scene,t,e,i,s);return this.sys.displayList.add(n),this.sys.updateList.add(n),this.world.enableBody(n,o.DYNAMIC_BODY),n},staticGroup:function(t,e){return this.sys.updateList.add(new u(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},body:function(t,e,i,s){var r=new n(this.world);return r.position.set(t,e),i&&s&&r.setSize(i,s),this.world.add(r,o.DYNAMIC_BODY),r},staticBody:function(t,e,i,s){var r=new l(this.world);return r.position.set(t,e),i&&s&&r.setSize(i,s),this.world.add(r,o.STATIC_BODY),r},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=c},44880:t=>{t.exports=function(t){var e=0;if(Array.isArray(t))for(var i=0;i<t.length;i++)e|=t[i];else e=t;return e}},75671:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,r){var n=0,a=t.deltaAbsX()+e.deltaAbsX()+r;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(n=t.right-e.x)>a&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?n=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dx<e._dx&&(-(n=t.x-e.width-e.x)>a&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?n=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=n,e.overlapX=n,n}},66185:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,r){var n=0,a=t.deltaAbsY()+e.deltaAbsY()+r;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(n=t.bottom-e.y)>a&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?n=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dy<e._dy&&(-(n=t.y-e.bottom)>a&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?n=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=n,e.overlapY=n,n}},10481:(t,e,i)=>{var s=i(25084),r=i(56694),n=i(95239),a=i(47401),o=i(72632),h=i(59192),l=i(42911),u=new r({Extends:h,Mixins:[n],initialize:function(t,e,i,r){if(i||r)if(l(i))r=i,i=null,r.internalCreateCallback=this.createCallbackHandler,r.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(i)&&l(i[0])){var n=this;i.forEach((function(t){t.internalCreateCallback=n.createCallbackHandler,t.internalRemoveCallback=n.removeCallbackHandler,t.classType=o(t,"classType",s)})),r=null}else r={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else r={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=t,r&&(r.classType=o(r,"classType",s)),this.physicsType=a.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this.defaults={setCollideWorldBounds:o(r,"collideWorldBounds",!1),setBoundsRectangle:o(r,"customBoundsRectangle",null),setAccelerationX:o(r,"accelerationX",0),setAccelerationY:o(r,"accelerationY",0),setAllowDrag:o(r,"allowDrag",!0),setAllowGravity:o(r,"allowGravity",!0),setAllowRotation:o(r,"allowRotation",!0),setDamping:o(r,"useDamping",!1),setBounceX:o(r,"bounceX",0),setBounceY:o(r,"bounceY",0),setDragX:o(r,"dragX",0),setDragY:o(r,"dragY",0),setEnable:o(r,"enable",!0),setGravityX:o(r,"gravityX",0),setGravityY:o(r,"gravityY",0),setFrictionX:o(r,"frictionX",0),setFrictionY:o(r,"frictionY",0),setMaxSpeed:o(r,"maxSpeed",-1),setMaxVelocityX:o(r,"maxVelocityX",1e4),setMaxVelocityY:o(r,"maxVelocityY",1e4),setVelocityX:o(r,"velocityX",0),setVelocityY:o(r,"velocityY",0),setAngularVelocity:o(r,"angularVelocity",0),setAngularAcceleration:o(r,"angularAcceleration",0),setAngularDrag:o(r,"angularDrag",0),setMass:o(r,"mass",1),setImmovable:o(r,"immovable",!1)},h.call(this,e,i,r),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,a.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var s=this.getChildren(),r=0;r<s.length;r++)s[r].body.velocity.set(t+r*i,e+r*i);return this},setVelocityX:function(t,e){void 0===e&&(e=0);for(var i=this.getChildren(),s=0;s<i.length;s++)i[s].body.velocity.x=t+s*e;return this},setVelocityY:function(t,e){void 0===e&&(e=0);for(var i=this.getChildren(),s=0;s<i.length;s++)i[s].body.velocity.y=t+s*e;return this}});t.exports=u},22916:t=>{var e,i,s,r,n,a,o,h,l,u,c,d,f,p,g,v,m,x=function(){return u&&g&&i.blocked.right?(e.processX(-m,o,!1,!0),1):l&&v&&i.blocked.left?(e.processX(m,o,!0),1):f&&v&&e.blocked.right?(i.processX(-m,h,!1,!0),2):d&&g&&e.blocked.left?(i.processX(m,h,!0),2):0},y=function(t){if(s&&r)m*=.5,0===t||3===t?(e.processX(m,n),i.processX(-m,a)):(e.processX(-m,n),i.processX(m,a));else if(s&&!r)0===t||3===t?e.processX(m,o,!0):e.processX(-m,o,!1,!0);else if(!s&&r)0===t||3===t?i.processX(-m,h,!1,!0):i.processX(m,h,!0);else{var g=.5*m;0===t?p?(e.processX(m,0,!0),i.processX(0,null,!1,!0)):f?(e.processX(g,0,!0),i.processX(-g,0,!1,!0)):(e.processX(g,i.velocity.x,!0),i.processX(-g,null,!1,!0)):1===t?c?(e.processX(0,null,!1,!0),i.processX(m,0,!0)):u?(e.processX(-g,0,!1,!0),i.processX(g,0,!0)):(e.processX(-g,null,!1,!0),i.processX(g,e.velocity.x,!0)):2===t?p?(e.processX(-m,0,!1,!0),i.processX(0,null,!0)):d?(e.processX(-g,0,!1,!0),i.processX(g,0,!0)):(e.processX(-g,i.velocity.x,!1,!0),i.processX(g,null,!0)):3===t&&(c?(e.processX(0,null,!0),i.processX(-m,0,!1,!0)):l?(e.processX(g,0,!0),i.processX(-g,0,!1,!0)):(e.processX(g,i.velocity.y,!0),i.processX(-g,null,!1,!0)))}return!0};t.exports={BlockCheck:x,Check:function(){var t=e.velocity.x,s=i.velocity.x,r=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),o=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(r+o);return o-=h,n=h+(r-=h)*e.bounce.x,a=h+o*i.bounce.x,l&&v?y(0):d&&g?y(1):u&&g?y(2):!(!f||!v)&&y(3)},Set:function(t,n,a){i=n;var y=(e=t).velocity.x,T=i.velocity.x;return s=e.pushable,l=e._dx<0,u=e._dx>0,c=0===e._dx,g=Math.abs(e.right-i.x)<=Math.abs(i.right-e.x),o=T-y*e.bounce.x,r=i.pushable,d=i._dx<0,f=i._dx>0,p=0===i._dx,v=!g,h=y-T*i.bounce.x,m=Math.abs(a),x()},Run:y,RunImmovableBody1:function(t){1===t?i.velocity.x=0:g?i.processX(m,h,!0):i.processX(-m,h,!1,!0),e.moves&&(i.y+=(e.y-e.prev.y)*e.friction.y,i._dy=i.y-i.prev.y)},RunImmovableBody2:function(t){2===t?e.velocity.x=0:v?e.processX(m,o,!0):e.processX(-m,o,!1,!0),i.moves&&(e.y+=(i.y-i.prev.y)*i.friction.y,e._dy=e.y-e.prev.y)}}},67050:t=>{var e,i,s,r,n,a,o,h,l,u,c,d,f,p,g,v,m,x=function(){return u&&g&&i.blocked.down?(e.processY(-m,o,!1,!0),1):l&&v&&i.blocked.up?(e.processY(m,o,!0),1):f&&v&&e.blocked.down?(i.processY(-m,h,!1,!0),2):d&&g&&e.blocked.up?(i.processY(m,h,!0),2):0},y=function(t){if(s&&r)m*=.5,0===t||3===t?(e.processY(m,n),i.processY(-m,a)):(e.processY(-m,n),i.processY(m,a));else if(s&&!r)0===t||3===t?e.processY(m,o,!0):e.processY(-m,o,!1,!0);else if(!s&&r)0===t||3===t?i.processY(-m,h,!1,!0):i.processY(m,h,!0);else{var g=.5*m;0===t?p?(e.processY(m,0,!0),i.processY(0,null,!1,!0)):f?(e.processY(g,0,!0),i.processY(-g,0,!1,!0)):(e.processY(g,i.velocity.y,!0),i.processY(-g,null,!1,!0)):1===t?c?(e.processY(0,null,!1,!0),i.processY(m,0,!0)):u?(e.processY(-g,0,!1,!0),i.processY(g,0,!0)):(e.processY(-g,null,!1,!0),i.processY(g,e.velocity.y,!0)):2===t?p?(e.processY(-m,0,!1,!0),i.processY(0,null,!0)):d?(e.processY(-g,0,!1,!0),i.processY(g,0,!0)):(e.processY(-g,i.velocity.y,!1,!0),i.processY(g,null,!0)):3===t&&(c?(e.processY(0,null,!0),i.processY(-m,0,!1,!0)):l?(e.processY(g,0,!0),i.processY(-g,0,!1,!0)):(e.processY(g,i.velocity.y,!0),i.processY(-g,null,!1,!0)))}return!0};t.exports={BlockCheck:x,Check:function(){var t=e.velocity.y,s=i.velocity.y,r=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),o=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(r+o);return o-=h,n=h+(r-=h)*e.bounce.y,a=h+o*i.bounce.y,l&&v?y(0):d&&g?y(1):u&&g?y(2):!(!f||!v)&&y(3)},Set:function(t,n,a){i=n;var y=(e=t).velocity.y,T=i.velocity.y;return s=e.pushable,l=e._dy<0,u=e._dy>0,c=0===e._dy,g=Math.abs(e.bottom-i.y)<=Math.abs(i.bottom-e.y),o=T-y*e.bounce.y,r=i.pushable,d=i._dy<0,f=i._dy>0,p=0===i._dy,v=!g,h=y-T*i.bounce.y,m=Math.abs(a),x()},Run:y,RunImmovableBody1:function(t){1===t?i.velocity.y=0:g?i.processY(m,h,!0):i.processY(-m,h,!1,!0),e.moves&&(i.x+=(e.x-e.prev.x)*e.friction.x,i._dx=i.x-i.prev.x)},RunImmovableBody2:function(t){2===t?e.velocity.y=0:v?e.processY(m,o,!0):e.processY(-m,o,!1,!0),i.moves&&(e.x+=(i.x-i.prev.x)*i.friction.x,e._dx=e.x-e.prev.x)}}},61777:(t,e,i)=>{var s=i(75671),r=i(22916);t.exports=function(t,e,i,n,a){void 0===a&&(a=s(t,e,i,n));var o=t.immovable,h=e.immovable;if(i||0===a||o&&h||t.customSeparateX||e.customSeparateX)return 0!==a||t.embedded&&e.embedded;var l=r.Set(t,e,a);return o||h?(o?r.RunImmovableBody1(l):h&&r.RunImmovableBody2(l),!0):l>0||r.Check()}},25299:(t,e,i)=>{var s=i(66185),r=i(67050);t.exports=function(t,e,i,n,a){void 0===a&&(a=s(t,e,i,n));var o=t.immovable,h=e.immovable;if(i||0===a||o&&h||t.customSeparateY||e.customSeparateY)return 0!==a||t.embedded&&e.embedded;var l=r.Set(t,e,a);return o||h?(o?r.RunImmovableBody1(l):h&&r.RunImmovableBody2(l),!0):l>0||r.Check()}},15084:t=>{t.exports=function(t,e){return void 0===e&&(e={}),e.none=t,e.up=!1,e.down=!1,e.left=!1,e.right=!1,t||(e.up=!0,e.down=!0,e.left=!0,e.right=!0),e}},66634:(t,e,i)=>{var s=i(65650),r=i(56694),n=i(95239),a=i(47401),o=i(94287),h=i(15084),l=i(93736),u=new r({Mixins:[n],initialize:function(t,e){var i=64,s=64,r=void 0!==e;r&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),r||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=r?e:void 0,this.isBody=!0,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x-i*e.originX,e.y-s*e.originY),this.width=i,this.height=s,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=l.ZERO,this.allowGravity=!1,this.gravity=l.ZERO,this.bounce=l.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=h(!1),this.touching=h(!0),this.wasTouching=h(!0),this.blocked=h(!0),this.physicsType=a.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.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(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(s&&s.frame&&(t||(t=s.frame.realWidth),e||(e=s.frame.realHeight)),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&s&&s.getCenter){var r=s.displayWidth/2,n=s.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(r-this.halfWidth,n-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(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),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(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?s(this,t,e):o(this,t,e)},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(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,s,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,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}}});t.exports=u},46346:(t,e,i)=>{var s=i(25084),r=i(56694),n=i(95239),a=i(47401),o=i(72632),h=i(59192),l=i(42911),u=new r({Extends:h,Mixins:[n],initialize:function(t,e,i,r){i||r?l(i)?(r=i,i=null,r.internalCreateCallback=this.createCallbackHandler,r.internalRemoveCallback=this.removeCallbackHandler,r.createMultipleCallback=this.createMultipleCallbackHandler,r.classType=o(r,"classType",s)):Array.isArray(i)&&l(i[0])?(r=i,i=null,r.forEach((function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=o(t,"classType",s)}))):r={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:r={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:s},this.world=t,this.physicsType=a.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,h.call(this,e,i,r),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,a.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e<t.length;e++)t[e].body.reset();return this}});t.exports=u},85233:(t,e,i)=>{var s=i(94240),r=i(97602),n=i(82897),a=i(56694),o=i(3909),h=i(47401),l=i(53996),u=i(92951),c=i(6659),d=i(27037),f=i(88456),p=i(41935),g=i(54726),v=i(75671),m=i(66185),x=i(44662),y=i(10850),T=i(83392),w=i(74623),E=i(25163),S=i(74118),b=i(68687),A=i(27354),_=i(61777),C=i(25299),R=i(58403),M=i(66634),P=i(28808),L=i(69360),O=i(93736),F=i(1071),D=new a({Extends:c,initialize:function(t,e){c.call(this),this.scene=t,this.bodies=new R,this.staticBodies=new R,this.pendingDestroy=new R,this.colliders=new w,this.gravity=new O(y(e,"gravity.x",0),y(e,"gravity.y",0)),this.bounds=new S(y(e,"x",0),y(e,"y",0),y(e,"width",t.sys.scale.width),y(e,"height",t.sys.scale.height)),this.checkCollision={up:y(e,"checkCollision.up",!0),down:y(e,"checkCollision.down",!0),left:y(e,"checkCollision.left",!0),right:y(e,"checkCollision.right",!0)},this.fps=y(e,"fps",60),this.fixedStep=y(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=y(e,"timeScale",1),this.OVERLAP_BIAS=y(e,"overlapBias",4),this.TILE_BIAS=y(e,"tileBias",16),this.forceX=y(e,"forceX",!1),this.isPaused=y(e,"isPaused",!1),this._total=0,this.drawDebug=y(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:y(e,"debugShowBody",!0),debugShowStaticBody:y(e,"debugShowStaticBody",!0),debugShowVelocity:y(e,"debugShowVelocity",!0),bodyDebugColor:y(e,"debugBodyColor",16711935),staticBodyDebugColor:y(e,"debugStaticBodyColor",255),velocityDebugColor:y(e,"debugVelocityColor",65280)},this.maxEntries=y(e,"maxEntries",16),this.useTree=y(e,"useTree",!0),this.tree=new b(this.maxEntries),this.staticTree=new b(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new L,this._tempMatrix2=new L,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=h.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var s=t[i];if(s.isParent)for(var r=s.getChildren(),n=0;n<r.length;n++){var a=r[n];a.isParent?this.enable(a,e):this.enableBody(a,e)}else this.enableBody(s,e)}},enableBody:function(t,e){return void 0===e&&(e=h.DYNAMIC_BODY),t.hasTransformComponent&&(t.body||(e===h.DYNAMIC_BODY?t.body=new r(this,t):e===h.STATIC_BODY&&(t.body=new M(this,t))),this.add(t.body)),t},add:function(t){return t.physicsType===h.DYNAMIC_BODY?this.bodies.set(t):t.physicsType===h.STATIC_BODY&&(this.staticBodies.set(t),this.staticTree.insert(t)),t.enable=!0,t},disable:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];if(i.isParent)for(var s=i.getChildren(),r=0;r<s.length;r++){var n=s[r];n.isParent?this.disable(n):this.disableBody(n.body)}else this.disableBody(i.body)}},disableBody:function(t){this.remove(t),t.enable=!1},remove:function(t){t.physicsType===h.DYNAMIC_BODY?(this.tree.remove(t),this.bodies.delete(t)):t.physicsType===h.STATIC_BODY&&(this.staticBodies.delete(t),this.staticTree.remove(t))},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},setBounds:function(t,e,i,s,r,n,a,o){return this.bounds.setTo(t,e,i,s),void 0!==r&&this.setBoundsCollision(r,n,a,o),this},setBoundsCollision:function(t,e,i,s){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===s&&(s=!0),this.checkCollision.left=t,this.checkCollision.right=e,this.checkCollision.up=i,this.checkCollision.down=s,this},pause:function(){return this.isPaused=!0,this.emit(d.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(d.RESUME),this},addCollider:function(t,e,i,s,r){void 0===i&&(i=null),void 0===s&&(s=null),void 0===r&&(r=i);var n=new o(this,!1,t,e,i,s,r);return this.colliders.add(n),n},addOverlap:function(t,e,i,s,r){void 0===i&&(i=null),void 0===s&&(s=null),void 0===r&&(r=i);var n=new o(this,!0,t,e,i,s,r);return this.colliders.add(n),n},removeCollider:function(t){return this.colliders.remove(t),this},setFPS:function(t){return this.fps=t,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this},update:function(t,e){if(!this.isPaused&&0!==this.bodies.size){var i,s,r=this._frameTime,n=this._frameTimeMS*this.timeScale;this._elapsed+=e;var a=this.bodies.entries,o=this._elapsed>=n;for(this.fixedStep||(r=.001*e,o=!0,this._elapsed=0),i=0;i<a.length;i++)(s=a[i]).enable&&s.preUpdate(o,r);if(o){this._elapsed-=n,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(a));var h=this.colliders.update();for(i=0;i<h.length;i++){var l=h[i];l.active&&l.update()}this.emit(d.WORLD_STEP,r)}for(;this._elapsed>=n;)this._elapsed-=n,this.step(r)}},step:function(t){var e,i,s=this.bodies.entries,r=s.length;for(e=0;e<r;e++)(i=s[e]).enable&&i.update(t);this.useTree&&(this.tree.clear(),this.tree.load(s));var n=this.colliders.update();for(e=0;e<n.length;e++){var a=n[e];a.active&&a.update()}this.emit(d.WORLD_STEP,t),this.stepsLastFrame++},singleStep:function(){this.update(0,this._frameTimeMS),this.postUpdate()},postUpdate:function(){var t,e,i=this.bodies.entries,s=i.length,r=this.bodies,n=this.staticBodies;if(this.stepsLastFrame)for(this.stepsLastFrame=0,t=0;t<s;t++)(e=i[t]).enable&&e.postUpdate();if(this.drawDebug){var a=this.debugGraphic;for(a.clear(),t=0;t<s;t++)(e=i[t]).willDrawDebug()&&e.drawDebug(a);for(s=(i=n.entries).length,t=0;t<s;t++)(e=i[t]).willDrawDebug()&&e.drawDebug(a)}var o=this.pendingDestroy;if(o.size>0){var l=this.tree,u=this.staticTree;for(s=(i=o.entries).length,t=0;t<s;t++)(e=i[t]).physicsType===h.DYNAMIC_BODY?(l.remove(e),r.delete(e)):e.physicsType===h.STATIC_BODY&&(u.remove(e),n.delete(e)),e.world=void 0,e.gameObject=void 0;o.clear()}},updateMotion:function(t,e){t.allowRotation&&this.computeAngularVelocity(t,e),this.computeVelocity(t,e)},computeAngularVelocity:function(t,e){var i=t.angularVelocity,s=t.angularAcceleration,r=t.angularDrag,a=t.maxAngular;s?i+=s*e:t.allowDrag&&r&&(p(i-(r*=e),0,.1)?i-=r:g(i+r,0,.1)?i+=r:i=0);var o=(i=n(i,-a,a))-t.angularVelocity;t.angularVelocity+=o,t.rotation+=t.angularVelocity*e},computeVelocity:function(t,e){var i=t.velocity.x,s=t.acceleration.x,r=t.drag.x,a=t.maxVelocity.x,o=t.velocity.y,h=t.acceleration.y,l=t.drag.y,u=t.maxVelocity.y,c=t.speed,d=t.maxSpeed,v=t.allowDrag,m=t.useDamping;t.allowGravity&&(i+=(this.gravity.x+t.gravity.x)*e,o+=(this.gravity.y+t.gravity.y)*e),s?i+=s*e:v&&r&&(m?(i*=r=Math.pow(r,e),c=Math.sqrt(i*i+o*o),f(c,0,.001)&&(i=0)):p(i-(r*=e),0,.01)?i-=r:g(i+r,0,.01)?i+=r:i=0),h?o+=h*e:v&&l&&(m?(o*=l=Math.pow(l,e),c=Math.sqrt(i*i+o*o),f(c,0,.001)&&(o=0)):p(o-(l*=e),0,.01)?o-=l:g(o+l,0,.01)?o+=l:o=0),i=n(i,-a,a),o=n(o,-u,u),t.velocity.set(i,o),d>-1&&t.velocity.length()>d&&(t.velocity.normalize().scale(d),c=d),t.speed=c},separate:function(t,e,i,s,r){var n,a,o=!1,h=!0;if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return o;if(i&&!1===i.call(s,t.gameObject,e.gameObject))return o;if(t.isCircle||e.isCircle){var l=this.separateCircle(t,e,r);l.result?(o=!0,h=!1):(n=l.x,a=l.y,h=!0)}if(h){var u=!1,c=!1,f=this.OVERLAP_BIAS;r?(u=_(t,e,r,f,n),c=C(t,e,r,f,a)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)<Math.abs(this.gravity.x+t.gravity.x)?(u=_(t,e,r,f,n),this.intersects(t,e)&&(c=C(t,e,r,f,a))):(c=C(t,e,r,f,a),this.intersects(t,e)&&(u=_(t,e,r,f,n))),o=u||c}return o&&(r?(t.onOverlap||e.onOverlap)&&this.emit(d.OVERLAP,t.gameObject,e.gameObject,t,e):(t.onCollide||e.onCollide)&&this.emit(d.COLLIDE,t.gameObject,e.gameObject,t,e)),o},separateCircle:function(t,e,i){v(t,e,!1,0),m(t,e,!1,0);var r=t.isCircle,n=e.isCircle,a=t.center,o=e.center,h=t.immovable,c=e.immovable,d=t.velocity,f=e.velocity,p=0,g=!0;if(r!==n){g=!1;var x=a.x,y=a.y,w=t.halfWidth,E=e.position.x,S=e.position.y,b=e.right,A=e.bottom;n&&(x=o.x,y=o.y,w=e.halfWidth,E=t.position.x,S=t.position.y,b=t.right,A=t.bottom),y<S?x<E?p=l(x,y,E,S)-w:x>b&&(p=l(x,y,b,S)-w):y>A&&(x<E?p=l(x,y,E,A)-w:x>b&&(p=l(x,y,b,A)-w)),p*=-1}else p=t.halfWidth+e.halfWidth-u(a,o);t.overlapR=p,e.overlapR=p;var _=s(a,o),C=(p+T.EPSILON)*Math.cos(_),R=(p+T.EPSILON)*Math.sin(_),M={overlap:p,result:!1,x:C,y:R};if(i&&(!g||g&&0!==p))return M.result=!0,M;if(!g&&0===p||h&&c||t.customSeparateX||e.customSeparateX)return M.x=void 0,M.y=void 0,M;var P=!t.pushable&&!e.pushable;if(g){var L=a.x-o.x,O=a.y-o.y,F=Math.sqrt(Math.pow(L,2)+Math.pow(O,2)),D=(o.x-a.x)/F||0,k=(o.y-a.y)/F||0,I=2*(d.x*D+d.y*k-f.x*D-f.y*k)/(t.mass+e.mass);(h||c)&&(I*=2),h||(d.x=d.x-I/t.mass*D,d.y=d.y-I/t.mass*k,d.multiply(t.bounce)),c||(f.x=f.x+I/e.mass*D,f.y=f.y+I/e.mass*k,f.multiply(e.bounce)),h||c||(C*=.5,R*=.5),h||(t.x-=C,t.y-=R,t.updateCenter()),c||(e.x+=C,e.y+=R,e.updateCenter()),M.result=!0}else!h||t.pushable||P?(t.x-=C,t.y-=R,t.updateCenter()):(!c||e.pushable||P)&&(e.x+=C,e.y+=R,e.updateCenter()),M.x=void 0,M.y=void 0;return M},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?u(t.center,e.center)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.left||t.bottom<=e.top||t.left>=e.right||t.top>=e.bottom))},circleBodyIntersects:function(t,e){var i=n(t.center.x,e.left,e.right),s=n(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-s)*(t.center.y-s)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,s,r){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===r&&(r=i),this.collideObjects(t,e,i,s,r,!0)},collide:function(t,e,i,s,r){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===r&&(r=i),this.collideObjects(t,e,i,s,r,!1)},collideObjects:function(t,e,i,s,r,n){var a,o;!t.isParent||void 0!==t.physicsType&&void 0!==e&&t!==e||(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(a=0;a<e.length;a++)this.collideHandler(t,e[a],i,s,r,n);else if(h&&!l)if(e)for(a=0;a<t.length;a++)this.collideHandler(t[a],e,i,s,r,n);else for(a=0;a<t.length;a++){var u=t[a];for(o=a+1;o<t.length;o++)a!==o&&this.collideHandler(u,t[o],i,s,r,n)}else for(a=0;a<t.length;a++)for(o=0;o<e.length;o++)this.collideHandler(t[a],e[o],i,s,r,n);else this.collideHandler(t,e,i,s,r,n);return this._total>0},collideHandler:function(t,e,i,s,r,n){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,s,r,n);if(!t||!e)return!1;if(t.body||t.isBody){if(e.body||e.isBody)return this.collideSpriteVsSprite(t,e,i,s,r,n);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,s,r,n);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,s,r,n)}else if(t.isParent){if(e.body||e.isBody)return this.collideSpriteVsGroup(e,t,i,s,r,n);if(e.isParent)return this.collideGroupVsGroup(t,e,i,s,r,n);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,s,r,n)}else if(t.isTilemap){if(e.body||e.isBody)return this.collideSpriteVsTilemapLayer(e,t,i,s,r,n);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,s,r,n)}},canCollide:function(t,e){return t&&e&&0!=(t.collisionMask&e.collisionCategory)&&0!=(e.collisionMask&t.collisionCategory)},collideSpriteVsSprite:function(t,e,i,s,r,n){var a=t.isBody?t:t.body,o=e.isBody?e:e.body;return!!this.canCollide(a,o)&&(this.separate(a,o,s,r,n)&&(i&&i.call(r,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,s,r,n){var a,o,l,u=t.isBody?t:t.body;if(0!==e.length&&u&&u.enable&&!u.checkCollision.none&&this.canCollide(u,e))if(this.useTree||e.physicsType===h.STATIC_BODY){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===h.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(o=d.length,a=0;a<o;a++)u!==(l=d[a])&&l.enable&&!l.checkCollision.none&&e.contains(l.gameObject)&&this.separate(u,l,s,r,n)&&(i&&i.call(r,u.gameObject,l.gameObject),this._total++)}else{var f=e.getChildren(),p=e.children.entries.indexOf(t);for(o=f.length,a=0;a<o;a++)(l=f[a].body)&&a!==p&&l.enable&&this.separate(u,l,s,r,n)&&(i&&i.call(r,u.gameObject,l.gameObject),this._total++)}},collideGroupVsTilemapLayer:function(t,e,i,s,r,n){if(!this.canCollide(t,e))return!1;var a=t.getChildren();if(0===a.length)return!1;for(var o=!1,h=0;h<a.length;h++)(a[h].body||a[h].isBody)&&this.collideSpriteVsTilemapLayer(a[h],e,i,s,r,n)&&(o=!0);return o},collideTiles:function(t,e,i,s,r){return!(0===e.length||t.body&&!t.body.enable||t.isBody&&!t.enable)&&this.collideSpriteVsTilesHandler(t,e,i,s,r,!1,!1)},overlapTiles:function(t,e,i,s,r){return!(0===e.length||t.body&&!t.body.enable||t.isBody&&!t.enable)&&this.collideSpriteVsTilesHandler(t,e,i,s,r,!0,!1)},collideSpriteVsTilemapLayer:function(t,e,i,s,r,n){var a=t.isBody?t:t.body;if(!a.enable||a.checkCollision.none||!this.canCollide(a,e))return!1;var o=a.x,h=a.y,l=a.width,u=a.height,c=e.layer;if(c.tileWidth>c.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;o-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=n?null:this.tileFilterOptions,p=x(o,h,l,u,f,e.scene.cameras.main,e.layer);return 0!==p.length&&this.collideSpriteVsTilesHandler(t,p,i,s,r,n,!0)},collideSpriteVsTilesHandler:function(t,e,i,s,r,n,a){for(var o,h,l=t.isBody?t:t.body,u={left:0,right:0,top:0,bottom:0},c=!1,f=0;f<e.length;f++){var p=(h=(o=e[f]).tilemapLayer).tileToWorldXY(o.x,o.y);u.left=p.x,u.top=p.y,o.baseHeight!==o.height&&(u.top-=(o.height-o.baseHeight)*h.scaleY),u.right=u.left+o.width*h.scaleX,u.bottom=u.top+o.height*h.scaleY,P(u,l)&&(!s||s.call(r,t,o))&&E(o,t)&&(n||A(f,l,o,u,h,this.TILE_BIAS,a))&&(this._total++,c=!0,i&&i.call(r,t,o),n&&l.onOverlap?this.emit(d.TILE_OVERLAP,t,o,l):l.onCollide&&this.emit(d.TILE_COLLIDE,t,o,l))}return c},collideGroupVsGroup:function(t,e,i,s,r,n){if(0!==t.length&&0!==e.length&&this.canCollide(t,e))for(var a=t.getChildren(),o=0;o<a.length;o++)this.collideSpriteVsGroup(a[o],e,i,s,r,n)},wrap:function(t,e){t.body?this.wrapObject(t,e):t.getChildren?this.wrapArray(t.getChildren(),e):Array.isArray(t)?this.wrapArray(t,e):this.wrapObject(t,e)},wrapArray:function(t,e){for(var i=0;i<t.length;i++)this.wrapObject(t[i],e)},wrapObject:function(t,e){void 0===e&&(e=0),t.x=F(t.x,this.bounds.left-e,this.bounds.right+e),t.y=F(t.y,this.bounds.top-e,this.bounds.bottom+e)},shutdown:function(){this.tree.clear(),this.staticTree.clear(),this.bodies.clear(),this.staticBodies.clear(),this.colliders.destroy(),this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=null,this.debugGraphic&&(this.debugGraphic.destroy(),this.debugGraphic=null)}});t.exports=D},5321:t=>{t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},29257:t=>{t.exports={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}}},62122:t=>{t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i,s){return this.body.setCollideWorldBounds(t,e,i,s),this}}},95239:(t,e,i)=>{var s=i(44880),r={setCollisionCategory:function(t){return(this.body?this.body:this).collisionCategory=t,this},willCollideWith:function(t){return 0!=((this.body?this.body:this).collisionMask&t)},addCollidesWith:function(t){var e=this.body?this.body:this;return e.collisionMask=e.collisionMask|t,this},removeCollidesWith:function(t){var e=this.body?this.body:this;return e.collisionMask=e.collisionMask&~t,this},setCollidesWith:function(t){return(this.body?this.body:this).collisionMask=s(t),this},resetCollisionCategory:function(){var t=this.body?this.body:this;return t.collisionCategory=1,t.collisionMask=1,this}};t.exports=r},99803:t=>{t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,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}}}},87145:t=>{t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),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}}},96174:t=>{var e={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,e,i,s,r){return t&&this.body.reset(e,i),s&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=e},51702:t=>{t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},25578:t=>{t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},72029:t=>{var e={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=e},34566:t=>{t.exports={setMass:function(t){return this.body.mass=t,this}}},2732:(t,e,i)=>{var s=i(15147),r=i(26673),n=i(22184),a=i(26535);t.exports=function(t,e,i,o,h,l){var u=s(t,e-o,i-o,2*o,2*o,h,l);if(0===u.length)return u;for(var c=new r(e,i,o),d=new r,f=[],p=0;p<u.length;p++){var g=u[p];g.isCircle?(d.setTo(g.center.x,g.center.y,g.halfWidth),n(c,d)&&f.push(g)):a(c,g)&&f.push(g)}return f}},15147:t=>{t.exports=function(t,e,i,s,r,n,a){void 0===n&&(n=!0),void 0===a&&(a=!1);var o=[],h=[],l=t.treeMinMax;if(l.minX=e,l.minY=i,l.maxX=e+s,l.maxY=i+r,a&&(h=t.staticTree.search(l)),n&&t.useTree)o=t.tree.search(l);else if(n){var u=t.bodies,c={position:{x:e,y:i},left:e,top:i,right:e+s,bottom:i+r,isCircle:!1},d=t.intersects;u.iterate((function(t){d(t,c)&&o.push(t)}))}return h.concat(o)}},57527:t=>{var e={setPushable:function(t){return void 0===t&&(t=!0),this.body.pushable=t,this}};t.exports=e},77687:t=>{t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},66536:t=>{t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},7864:(t,e,i)=>{t.exports={Acceleration:i(5321),Angular:i(29257),Bounce:i(62122),Collision:i(95239),Debug:i(99803),Drag:i(87145),Enable:i(96174),Friction:i(51702),Gravity:i(25578),Immovable:i(72029),Mass:i(34566),OverlapCirc:i(2732),OverlapRect:i(15147),Pushable:i(57527),Size:i(77687),Velocity:i(66536)}},47401:t=>{t.exports={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}},22346:t=>{t.exports="collide"},95092:t=>{t.exports="overlap"},15775:t=>{t.exports="pause"},74142:t=>{t.exports="resume"},22825:t=>{t.exports="tilecollide"},10851:t=>{t.exports="tileoverlap"},7543:t=>{t.exports="worldbounds"},1487:t=>{t.exports="worldstep"},27037:(t,e,i)=>{t.exports={COLLIDE:i(22346),OVERLAP:i(95092),PAUSE:i(15775),RESUME:i(74142),TILE_COLLIDE:i(22825),TILE_OVERLAP:i(10851),WORLD_BOUNDS:i(7543),WORLD_STEP:i(1487)}},39977:(t,e,i)=>{var s=i(47401),r=i(98611),n={ArcadePhysics:i(66150),Body:i(97602),Collider:i(3909),Components:i(7864),Events:i(27037),Factory:i(99523),GetCollidesWith:i(44880),GetOverlapX:i(75671),GetOverlapY:i(66185),SeparateX:i(61777),SeparateY:i(25299),Group:i(10481),Image:i(62832),Sprite:i(25084),StaticBody:i(66634),StaticGroup:i(46346),Tilemap:i(8413),World:i(85233)};n=r(!1,n,s),t.exports=n},25163:t=>{t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},98209:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,t.updateCenter(),0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},72792:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,t.updateCenter(),0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},27354:(t,e,i)=>{var s=i(14405),r=i(52926),n=i(28808);t.exports=function(t,e,i,a,o,h,l){var u=a.left,c=a.top,d=a.right,f=a.bottom,p=i.faceLeft||i.faceRight,g=i.faceTop||i.faceBottom;if(l||(p=!0,g=!0),!p&&!g)return!1;var v=0,m=0,x=0,y=1;if(e.deltaAbsX()>e.deltaAbsY()?x=-1:e.deltaAbsX()<e.deltaAbsY()&&(y=-1),0!==e.deltaX()&&0!==e.deltaY()&&p&&g&&(x=Math.min(Math.abs(e.position.x-d),Math.abs(e.right-u)),y=Math.min(Math.abs(e.position.y-f),Math.abs(e.bottom-c))),x<y){if(p&&0!==(v=s(e,i,u,d,h,l))&&!n(a,e))return!0;g&&(m=r(e,i,c,f,h,l))}else{if(g&&0!==(m=r(e,i,c,f,h,l))&&!n(a,e))return!0;p&&(v=s(e,i,u,d,h,l))}return 0!==v||0!==m}},14405:(t,e,i)=>{var s=i(98209);t.exports=function(t,e,i,r,n,a){var o=0,h=e.faceLeft,l=e.faceRight,u=e.collideLeft,c=e.collideRight;return a||(h=!0,l=!0,u=!0,c=!0),t.deltaX()<0&&c&&t.checkCollision.left?l&&t.x<r&&(o=t.x-r)<-n&&(o=0):t.deltaX()>0&&u&&t.checkCollision.right&&h&&t.right>i&&(o=t.right-i)>n&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:s(t,o)),o}},52926:(t,e,i)=>{var s=i(72792);t.exports=function(t,e,i,r,n,a){var o=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return a||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y<r&&(o=t.y-r)<-n&&(o=0):t.deltaY()>0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(o=t.bottom-i)>n&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:s(t,o)),o}},28808:t=>{t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},8413:(t,e,i)=>{var s={ProcessTileCallbacks:i(25163),ProcessTileSeparationX:i(98209),ProcessTileSeparationY:i(72792),SeparateTile:i(27354),TileCheckX:i(14405),TileCheckY:i(52926),TileIntersectsBody:i(28808)};t.exports=s},88257:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},18360:t=>{t.exports={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"]}},91963:t=>{var e={},i={},s={register:function(t,i,s,r){void 0===r&&(r=!1),e[t]={plugin:i,mapping:s,custom:r}},registerCustom:function(t,e,s,r){i[t]={plugin:e,mapping:s,data:r}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},49274:(t,e,i)=>{var s=i(56694),r=i(97081),n=i(6659),a=i(76846),o=i(99325),h=i(61286),l=i(72632),u=i(91963),c=i(66458),d=new s({Extends:n,initialize:function(t){n.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(r.BOOT,this.boot,this)},boot:function(){var t,e,i,s,n,a,o,h=this.game.config,u=h.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t<u.length;t++)e=u[t],i=l(e,"key",null),s=l(e,"plugin",null),n=l(e,"start",!1),a=l(e,"mapping",null),o=l(e,"data",null),i&&(s?this.install(i,s,n,a,o):console.warn("Missing `plugin` for key: "+i));for(u=(u=h.installScenePlugins).concat(this._pendingScene),t=0;t<u.length;t++)e=u[t],i=l(e,"key",null),s=l(e,"plugin",null),a=l(e,"mapping",null),i&&(s?this.installScenePlugin(i,s,a):console.warn("Missing `plugin` for key: "+i));this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(r.DESTROY,this.destroy,this)},addToScene:function(t,e,i){var s,r,n,a=this.game,o=t.scene,h=t.settings.map,l=t.settings.isBooted;for(s=0;s<e.length;s++)a[r=e[s]]?(t[r]=a[r],h.hasOwnProperty(r)&&(o[h[r]]=t[r])):"game"===r&&h.hasOwnProperty(r)&&(o[h[r]]=a);for(var c=0;c<i.length;c++)for(n=i[c],s=0;s<n.length;s++)if(r=n[s],u.hasCore(r)){var d=u.getCore(r),f=d.mapping,p=new d.plugin(o,this,f);t[f]=p,d.custom?o[f]=p:h.hasOwnProperty(f)&&(o[h[f]]=p),l&&p.boot()}for(n=this.plugins,s=0;s<n.length;s++){var g=n[s];g.mapping&&(o[g.mapping]=g.plugin)}},getDefaultScenePlugins:function(){var t=this.game.config.defaultPlugins;return t=t.concat(this.scenePlugins)},installScenePlugin:function(t,e,i,s,r){if(void 0===r&&(r=!1),"function"==typeof e){if(u.hasCore(t)||u.register(t,e,i,!0),-1===this.scenePlugins.indexOf(t))this.scenePlugins.push(t);else if(!r&&u.hasCore(t))return void console.warn("Scene Plugin key in use: "+t);if(s){var n=new e(s,this,t);s.sys[t]=n,i&&""!==i&&(s[i]=n),n.boot()}}else console.warn("Invalid Scene Plugin: "+t)},install:function(t,e,i,s,r){if(void 0===i&&(i=!1),void 0===s&&(s=null),void 0===r&&(r=null),"function"!=typeof e)return console.warn("Invalid Plugin: "+t),null;if(u.hasCustom(t))return console.warn("Plugin key in use: "+t),null;if(null!==s&&(i=!0),this.game.isBooted){if(u.registerCustom(t,e,s,r),i)return this.start(t)}else this._pendingGlobal.push({key:t,plugin:e,start:i,mapping:s,data:r});return null},getIndex:function(t){for(var e=this.plugins,i=0;i<e.length;i++){if(e[i].key===t)return i}return-1},getEntry:function(t){var e=this.getIndex(t);if(-1!==e)return this.plugins[e]},isActive:function(t){var e=this.getEntry(t);return e&&e.active},start:function(t,e){void 0===e&&(e=t);var i=this.getEntry(e);return i&&!i.active?(i.active=!0,i.plugin.start()):i||(i=this.createEntry(t,e)),i?i.plugin:null},createEntry:function(t,e){var i=u.getCustom(t);if(i){var s=new i.plugin(this);i={key:e,plugin:s,active:!0,mapping:i.mapping,data:i.data},this.plugins.push(i),s.init(i.data),s.start()}return i},stop:function(t){var e=this.getEntry(t);return e&&e.active&&(e.active=!1,e.plugin.stop()),this},get:function(t,e){void 0===e&&(e=!0);var i=this.getEntry(t);if(i)return i.plugin;var s=this.getClass(t);return s&&e?(i=this.createEntry(t,t))?i.plugin:null:s||null},getClass:function(t){return u.getCustomClass(t)},removeGlobalPlugin:function(t){var e=this.getEntry(t);e&&c(this.plugins,e),u.removeCustom(t)},removeScenePlugin:function(t){c(this.scenePlugins,t),u.remove(t)},registerGameObject:function(t,e,i){return e&&h.register(t,e),i&&o.register(t,i),this},removeGameObject:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),e&&h.remove(t),i&&o.remove(t),this},registerFileType:function(t,e,i){a.register(t,e),i&&i.sys.load&&(i.sys.load[t]=e)},destroy:function(){for(var t=0;t<this.plugins.length;t++)this.plugins[t].plugin.destroy();u.destroyCustomPlugins(),this.game.noReturn&&u.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});t.exports=d},39283:(t,e,i)=>{var s=i(88257),r=i(56694),n=i(7599),a=new r({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(n.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},45615:(t,e,i)=>{t.exports={BasePlugin:i(88257),DefaultPlugins:i(18360),PluginCache:i(91963),PluginManager:i(49274),ScenePlugin:i(39283)}},75205:()=>{HTMLVideoElement&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(t){const e=performance.now(),i=this.getVideoPlaybackQuality(),s=this.mozPresentedFrames||this.mozPaintedFrames||i.totalVideoFrames-i.droppedVideoFrames,r=(n,a)=>{const o=this.getVideoPlaybackQuality(),h=this.mozPresentedFrames||this.mozPaintedFrames||o.totalVideoFrames-o.droppedVideoFrames;if(h>s){const s=this.mozFrameDelay||o.totalFrameDelay-i.totalFrameDelay||0,r=a-n;t(a,{presentationTime:a+1e3*s,expectedDisplayTime:a+r,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+r/1e3,presentedFrames:h,processingDuration:s}),delete this._rvfcpolyfillmap[e]}else this._rvfcpolyfillmap[e]=requestAnimationFrame((t=>r(a,t)))};return this._rvfcpolyfillmap[e]=requestAnimationFrame((t=>r(e,t))),e},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(t){cancelAnimationFrame(this._rvfcpolyfillmap[t]),delete this._rvfcpolyfillmap[t]})},95723:t=>{t.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:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},91135:(t,e,i)=>{var s=i(89787),r=i(61840),n=i(56694),a=i(86459),o=i(6659),h=i(81044),l=i(32834),u=i(40444),c=i(38203),d=i(69360),f=new n({Extends:o,initialize:function(t){o.call(this);var e=t.config;this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=a.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas;var i={alpha:t.config.transparent,desynchronized:t.config.desynchronized,willReadFrequently:!1};this.gameContext=e.context?e.context:this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=l(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new d,this._tempMatrix2=new d,this._tempMatrix3=new d,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(c.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(u.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.emit(h.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,s=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&(t.clearRect(0,0,i,s),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,s))),t.save(),this.drawCount=0,this.emit(h.PRE_RENDER)},render:function(t,e,i){var r=e.length;this.emit(h.RENDER,t,i);var n=i.x,a=i.y,o=i.width,l=i.height,u=i.renderToTexture?i.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(n,a,o,l),u.clip()),i.emit(s.PRE_RENDER,i),this.currentContext=u;var c=i.mask;c&&c.preRenderCanvas(this,null,i._maskCamera),i.transparent||(u.fillStyle=i.backgroundColor.rgba,u.fillRect(n,a,o,l)),u.globalAlpha=i.alpha,u.globalCompositeOperation="source-over",this.drawCount+=r,i.renderToTexture&&i.emit(s.PRE_RENDER,i),i.matrix.copyToContext(u);for(var d=0;d<r;d++){var f=e[d];f.mask&&f.mask.preRenderCanvas(this,f,i),f.renderCanvas(this,f,i),f.mask&&f.mask.postRenderCanvas(this,f,i)}u.setTransform(1,0,0,1,0,0),u.globalCompositeOperation="source-over",u.globalAlpha=1,i.flashEffect.postRenderCanvas(u),i.fadeEffect.postRenderCanvas(u),i.dirty=!1,c&&c.postRenderCanvas(this),u.restore(),i.renderToTexture&&(i.emit(s.POST_RENDER,i),i.renderToGame&&t.sys.context.drawImage(i.canvas,n,a)),i.emit(s.POST_RENDER,i)},postRender:function(){this.gameContext.restore(),this.emit(h.POST_RENDER);var t=this.snapshotState;t.callback&&(r(this.gameCanvas,t),t.callback=null)},snapshotCanvas:function(t,e,i,s,n,a,o,h,l){void 0===i&&(i=!1),this.snapshotArea(s,n,a,o,e,h,l);var u=this.snapshotState;return u.getPixel=i,r(t,u),u.callback=null,this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,t,e,i)},snapshotArea:function(t,e,i,s,r,n,a){var o=this.snapshotState;return o.callback=r,o.type=n,o.encoder=a,o.getPixel=!1,o.x=t,o.y=e,o.width=Math.min(i,this.gameCanvas.width),o.height=Math.min(s,this.gameCanvas.height),this},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i),this.snapshotState.getPixel=!0,this},batchSprite:function(t,e,i,s){var r=i.alpha*t.alpha;if(0!==r){var n=this.currentContext,a=this._tempMatrix1,o=this._tempMatrix2,h=e.canvasData,l=h.x,u=h.y,c=e.cutWidth,d=e.cutHeight,f=e.customPivot,p=e.source.resolution,g=t.displayOriginX,v=t.displayOriginY,m=-g+e.x,x=-v+e.y;if(t.isCropped){var y=t._crop;y.flipX===t.flipX&&y.flipY===t.flipY||e.updateCropUVs(y,t.flipX,t.flipY),c=y.cw,d=y.ch,l=y.cx,u=y.cy,m=-g+y.x,x=-v+y.y,t.flipX&&(m>=0?m=-(m+c):m<0&&(m=Math.abs(m)-c)),t.flipY&&(x>=0?x=-(x+d):x<0&&(x=Math.abs(x)-d))}var T=1,w=1;t.flipX&&(f||(m+=-e.realWidth+2*g),T=-1),t.flipY&&(f||(x+=-e.realHeight+2*v),w=-1);var E=t.x,S=t.y;o.applyITRS(E,S,t.rotation,t.scaleX*T,t.scaleY*w),a.copyFrom(i.matrix),s?(a.multiplyWithOffset(s,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),o.e=E,o.f=S):(o.e-=i.scrollX*t.scrollFactorX,o.f-=i.scrollY*t.scrollFactorY),a.multiply(o),i.roundPixels&&(a.e=Math.round(a.e),a.f=Math.round(a.f)),n.save(),a.setToContext(n),n.globalCompositeOperation=this.blendModes[t.blendMode],n.globalAlpha=r,n.imageSmoothingEnabled=!e.source.scaleMode,t.mask&&t.mask.preRenderCanvas(this,t,i),c>0&&d>0&&(i.roundPixels?n.drawImage(e.source.image,l,u,c,d,Math.round(m),Math.round(x),Math.round(c/p),Math.round(d/p)):n.drawImage(e.source.image,l,u,c,d,m,x,c/p,d/p)),t.mask&&t.mask.postRenderCanvas(this,t,i),n.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=f},6046:(t,e,i)=>{t.exports={CanvasRenderer:i(91135),GetBlendModes:i(32834),SetTransform:i(49584)}},32834:(t,e,i)=>{var s=i(95723),r=i(98581);t.exports=function(){var t=[],e=r.supportNewBlendModes,i="source-over";return t[s.NORMAL]=i,t[s.ADD]="lighter",t[s.MULTIPLY]=e?"multiply":i,t[s.SCREEN]=e?"screen":i,t[s.OVERLAY]=e?"overlay":i,t[s.DARKEN]=e?"darken":i,t[s.LIGHTEN]=e?"lighten":i,t[s.COLOR_DODGE]=e?"color-dodge":i,t[s.COLOR_BURN]=e?"color-burn":i,t[s.HARD_LIGHT]=e?"hard-light":i,t[s.SOFT_LIGHT]=e?"soft-light":i,t[s.DIFFERENCE]=e?"difference":i,t[s.EXCLUSION]=e?"exclusion":i,t[s.HUE]=e?"hue":i,t[s.SATURATION]=e?"saturation":i,t[s.COLOR]=e?"color":i,t[s.LUMINOSITY]=e?"luminosity":i,t[s.ERASE]="destination-out",t[s.SOURCE_IN]="source-in",t[s.SOURCE_OUT]="source-out",t[s.SOURCE_ATOP]="source-atop",t[s.DESTINATION_OVER]="destination-over",t[s.DESTINATION_IN]="destination-in",t[s.DESTINATION_OUT]="destination-out",t[s.DESTINATION_ATOP]="destination-atop",t[s.LIGHTER]="lighter",t[s.COPY]="copy",t[s.XOR]="xor",t}},49584:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,r,n){var a=r.alpha*i.alpha;if(a<=0)return!1;var o=s(i,r,n).calc;return e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=a,e.save(),o.setToContext(e),e.imageSmoothingEnabled=i.frame?!i.frame.source.scaleMode:t.antialias,!0}},68128:t=>{t.exports="losewebgl"},70936:t=>{t.exports="postrender"},99298:t=>{t.exports="prerender"},7743:t=>{t.exports="render"},99519:t=>{t.exports="resize"},82002:t=>{t.exports="restorewebgl"},81044:(t,e,i)=>{t.exports={LOSE_WEBGL:i(68128),POST_RENDER:i(70936),PRE_RENDER:i(99298),RENDER:i(7743),RESIZE:i(99519),RESTORE_WEBGL:i(82002)}},42069:(t,e,i)=>{t.exports={Events:i(81044),Snapshot:i(95528)},t.exports.Canvas=i(6046),t.exports.WebGL=i(55478)},61840:(t,e,i)=>{var s=i(61068),r=i(27119),n=i(72632);t.exports=function(t,e){var i=n(e,"callback"),a=n(e,"type","image/png"),o=n(e,"encoder",.92),h=Math.abs(Math.round(n(e,"x",0))),l=Math.abs(Math.round(n(e,"y",0))),u=Math.floor(n(e,"width",t.width)),c=Math.floor(n(e,"height",t.height));if(n(e,"getPixel",!1)){var d=t.getContext("2d",{willReadFrequently:!1}).getImageData(h,l,1,1).data;i.call(null,new r(d[0],d[1],d[2],d[3]))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=s.createWebGL(this,u,c),p=f.getContext("2d",{willReadFrequently:!0});u>0&&c>0&&p.drawImage(t,h,l,u,c,0,0,u,c);var g=new Image;g.onerror=function(){i.call(null),s.remove(f)},g.onload=function(){i.call(null,g),s.remove(f)},g.src=f.toDataURL(a,o)}else{var v=new Image;v.onerror=function(){i.call(null)},v.onload=function(){i.call(null,v)},v.src=t.toDataURL(a,o)}}},1217:(t,e,i)=>{var s=i(61068),r=i(27119),n=i(72632);t.exports=function(t,e){var i=t,a=n(e,"callback"),o=n(e,"type","image/png"),h=n(e,"encoder",.92),l=Math.abs(Math.round(n(e,"x",0))),u=Math.abs(Math.round(n(e,"y",0))),c=n(e,"getPixel",!1),d=n(e,"isFramebuffer",!1),f=d?n(e,"bufferWidth",1):i.drawingBufferWidth,p=d?n(e,"bufferHeight",1):i.drawingBufferHeight;if(c){var g=new Uint8Array(4),v=d?u:p-u;i.readPixels(l,v,1,1,i.RGBA,i.UNSIGNED_BYTE,g),a.call(null,new r(g[0],g[1],g[2],g[3]))}else{var m=Math.floor(n(e,"width",f)),x=Math.floor(n(e,"height",p)),y=m*x*4,T=new Uint8Array(y);i.readPixels(l,p-u-x,m,x,i.RGBA,i.UNSIGNED_BYTE,T);for(var w=s.createWebGL(this,m,x),E=w.getContext("2d",{willReadFrequently:!0}),S=E.getImageData(0,0,m,x),b=S.data,A=0;A<x;A++)for(var _=0;_<m;_++){var C=4*((x-A-1)*m+_),R=d?y-4*(A*m+(m-_)):4*(A*m+_);b[R+0]=T[C+0],b[R+1]=T[C+1],b[R+2]=T[C+2],b[R+3]=T[C+3]}E.putImageData(S,0,0);var M=new Image;M.onerror=function(){a.call(null),s.remove(w)},M.onload=function(){a.call(null,M),s.remove(w)},M.src=w.toDataURL(o,h)}}},95528:(t,e,i)=>{t.exports={Canvas:i(61840),WebGL:i(1217)}},35217:(t,e,i)=>{var s=i(56694),r=i(65641),n=i(33885),a=i(77290),o=i(72632),h=i(37410),l=i(82127),u=i(5583),c=i(58136),d=i(47406),f=i(81828),p=i(66901),g=i(71264),v=i(77310),m=i(10919),x=i(21213),y=i(51212),T=i(60848),w=i(36337),E=i(66458),S=new s({initialize:function(t){this.game=t.game,this.renderer=t,this.classes=new n([[r.UTILITY_PIPELINE,T],[r.MULTI_PIPELINE,v],[r.BITMAPMASK_PIPELINE,u],[r.SINGLE_PIPELINE,y],[r.ROPE_PIPELINE,x],[r.LIGHT_PIPELINE,p],[r.POINTLIGHT_PIPELINE,m],[r.MOBILE_PIPELINE,g]]),this.postPipelineClasses=new n,this.pipelines=new n,this.postPipelineInstances=[],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(t,e,i){var s=this.renderer,n=this.renderTargets;this.frameInc=Math.floor(o(t,"frameInc",32));var l,u,p=s.width,g=s.height,v=this.game.config.disablePreFX;if(this.game.config.disablePostFX||this.postPipelineClasses.setAll([[String(d.BARREL),c.Barrel],[String(d.BLOOM),c.Bloom],[String(d.BLUR),c.Blur],[String(d.BOKEH),c.Bokeh],[String(d.CIRCLE),c.Circle],[String(d.COLOR_MATRIX),c.ColorMatrix],[String(d.DISPLACEMENT),c.Displacement],[String(d.GLOW),c.Glow],[String(d.GRADIENT),c.Gradient],[String(d.PIXELATE),c.Pixelate],[String(d.SHADOW),c.Shadow],[String(d.SHINE),c.Shine],[String(d.VIGNETTE),c.Vignette],[String(d.WIPE),c.Wipe]]),!v){this.classes.set(r.FX_PIPELINE,f);for(var m=Math.min(p,g),x=Math.ceil(m/this.frameInc),y=1;y<x;y++){var T=y*this.frameInc;n.push(new h(s,T,T)),n.push(new h(s,T,T)),n.push(new h(s,T,T)),this.maxDimension=T}n.push(new h(s,p,g,1,0,!0,!0)),n.push(new h(s,p,g,1,0,!0,!0)),n.push(new h(s,p,g,1,0,!0,!0))}var w=this,E=this.game;if(this.classes.each((function(t,e){l=w.add(t,new e({game:E})),t===r.UTILITY_PIPELINE&&(w.UTILITY_PIPELINE=l,w.fullFrame1=l.fullFrame1,w.fullFrame2=l.fullFrame2,w.halfFrame1=l.halfFrame1,w.halfFrame2=l.halfFrame2)})),this.MULTI_PIPELINE=this.get(r.MULTI_PIPELINE),this.BITMAPMASK_PIPELINE=this.get(r.BITMAPMASK_PIPELINE),this.MOBILE_PIPELINE=this.get(r.MOBILE_PIPELINE),v||(this.FX_PIPELINE=this.get(r.FX_PIPELINE)),t)for(u in t){var S=t[u];(l=new S(E)).name=u,l.isPostFX?this.postPipelineClasses.set(u,S):this.has(u)||(this.classes.set(u,S),this.add(u,l))}this.default=this.get(e),i&&!a.os.desktop&&(this.default=this.MOBILE_PIPELINE)},setDefaultPipeline:function(t){var e=this.get(t);return e&&(this.default=e),e},add:function(t,e){if(!e.isPostFX){var i=this.pipelines,s=this.renderer;return i.has(t)?console.warn("Pipeline exists: "+t):(e.name=t,e.manager=this,i.set(t,e)),e.hasBooted||e.boot(),0===s.width||0===s.height||e.isPreFX||e.resize(s.width,s.height),e}console.warn(t+" is a Post Pipeline. Use `addPostPipeline` instead")},addPostPipeline:function(t,e){this.postPipelineClasses.has(t)||this.postPipelineClasses.set(t,e)},flush:function(){this.current&&this.current.flush()},has:function(t){var e=this.pipelines;return"string"==typeof t?e.has(t):!!e.contains(t)},get:function(t){var e=this.pipelines;return"string"==typeof t?e.get(t):e.contains(t)?t:void 0},getPostPipeline:function(t,e,i){var s,r=this.postPipelineClasses,n="",a=typeof t;if("string"===a||"number"===a?(s=r.get(t),n=t):"function"===a?(r.contains(t)&&(s=t),n=t.name):"object"===a&&(s=r.get(t.name),n=t.name),s){var o=new s(this.game,i);return o.name=n,e&&(o.gameObject=e),this.postPipelineInstances.push(o),o}},removePostPipeline:function(t){E(this.postPipelineInstances,t)},remove:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!0),this.pipelines.delete(t),e&&this.classes.delete(t),i&&this.postPipelineClasses.delete(t)},set:function(t,e,i){if(!t.isPostFX)return this.isCurrent(t,i)||(this.flush(),this.current&&this.current.unbind(),this.current=t,t.bind(i)),t.updateProjectionMatrix(),t.onBind(e),t},preBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=e.length-1;i>=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i<e.length;i++){var s=e[i];s.active&&s.postBatch(t)}}},preBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=e.length-1;i>=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i<e.length;i++){var s=e[i];s.active&&s.postBatch(t)}}},isCurrent:function(t,e){var i=this.renderer,s=this.current;return s&&!e&&(e=s.currentShader),!(s!==t||e.program!==i.currentProgram)},copyFrame:function(t,e,i,s,r){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyFrame(t,e,i,s,r),this},copyToGame:function(t){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyToGame(t),this},drawFrame:function(t,e,i,s){return this.setUtility(this.UTILITY_PIPELINE.colorMatrixShader).drawFrame(t,e,i,s),this},blendFrames:function(t,e,i,s,r){return this.setUtility(this.UTILITY_PIPELINE.linearShader).blendFrames(t,e,i,s,r),this},blendFramesAdditive:function(t,e,i,s,r){return this.setUtility(this.UTILITY_PIPELINE.addShader).blendFramesAdditive(t,e,i,s,r),this},clearFrame:function(t,e){return this.UTILITY_PIPELINE.clearFrame(t,e),this},blitFrame:function(t,e,i,s,r,n){return this.setUtility(this.UTILITY_PIPELINE.copyShader).blitFrame(t,e,i,s,r,n),this},copyFrameRect:function(t,e,i,s,r,n,a,o){return this.UTILITY_PIPELINE.copyFrameRect(t,e,i,s,r,n,a,o),this},forceZero:function(){return this.current&&this.current.forceZero},setMulti:function(){return this.set(this.MULTI_PIPELINE)},setUtility:function(t){return this.UTILITY_PIPELINE.bind(t)},setFX:function(){return this.set(this.FX_PIPELINE)},restoreContext:function(){this.rebind(),this.pipelines.each((function(t,e){e.restoreContext()})),w(this.postPipelineInstances,(function(t){t.restoreContext()}))},rebind:function(t){void 0===t&&this.previous&&(t=this.previous);var e=this.renderer,i=e.gl;i.disable(i.DEPTH_TEST),i.disable(i.CULL_FACE),e.hasActiveStencilMask()?i.clear(i.DEPTH_BUFFER_BIT):(i.disable(i.STENCIL_TEST),i.clear(i.DEPTH_BUFFER_BIT|i.STENCIL_BUFFER_BIT)),i.viewport(0,0,e.width,e.height),e.currentProgram=null,e.setBlendMode(0,!0);var s=e.vaoExtension;s&&s.bindVertexArrayOES(null);var r=this.pipelines.entries;for(var n in r)r[n].glReset=!0;t&&(this.current=t,t.rebind())},clear:function(){var t=this.renderer;this.flush(),this.current?(this.current.unbind(),this.previous=this.current,this.current=null):this.previous=null,t.currentProgram=null,t.setBlendMode(0,!0);var e=t.vaoExtension;e&&e.bindVertexArrayOES(null)},getRenderTarget:function(t){var e=this.renderTargets;if(t>this.maxDimension)return this.targetIndex=e.length-3,e[this.targetIndex];var i=3*(l(t,this.frameInc,0,!0)-1);return this.targetIndex=i,e[i]},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}});t.exports=S},37410:(t,e,i)=>{var s=i(56694),r=i(81044),n=new s({initialize:function(t,e,i,s,r,n,a,o,h){void 0===s&&(s=1),void 0===r&&(r=0),void 0===n&&(n=!0),void 0===a&&(a=!1),void 0===o&&(o=!0),void 0===h&&(h=!0),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=s,this.minFilter=r,this.autoClear=n,this.autoResize=!0,this.hasDepthBuffer=o,this.forceClamp=h,this.resize(e,i),a?this.setAutoResize(!0):this.autoResize=!1},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(r.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(r.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){if((t=Math.round(t*this.scale))<=0&&(t=1),(e=Math.round(e*this.scale))<=0&&(e=1),this.autoResize&&(t!==this.width||e!==this.height)){var i=this.renderer;i.deleteFramebuffer(this.framebuffer),i.deleteTexture(this.texture),this.texture=i.createTextureFromSource(null,t,e,this.minFilter,this.forceClamp),this.framebuffer=i.createFramebuffer(t,e,this.texture,this.hasDepthBuffer),this.width=t,this.height=e}return this},willResize:function(t,e){return(t=Math.round(t*this.scale))<=0&&(t=1),(e=Math.round(e*this.scale))<=0&&(e=1),t!==this.width||e!==this.height},bind:function(t,e,i){void 0===t&&(t=!1);var s=this.renderer;if(t&&s.flush(),e&&i&&this.resize(e,i),s.pushFramebuffer(this.framebuffer,!1,!1),t&&this.adjustViewport(),this.autoClear){var r=this.renderer.gl;r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT)}s.clearStencilMask()},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){void 0===t&&(t=!1);var e=this.renderer;return t&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.off(r.RESIZE,this.resize,this),t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=n},75512:t=>{t.exports={getTintFromFloats:function(t,e,i,s){return((255&(255*s|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},checkShaderMax:function(t,e){var i=Math.min(16,t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));return e&&-1!==e?Math.min(i,e):i},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",s=0;s<e;s++)s>0&&(i+="\n\telse "),s<e-1&&(i+="if (outTexId < "+s+".5)"),i+="\n\t{",i+="\n\t\ttexture = texture2D(uMainSampler["+s+"], outTexCoord);",i+="\n\t}";return(t=t.replace(/%count%/gi,e.toString())).replace(/%forloop%/gi,i)},setGlowQuality:function(t,e,i,s){return void 0===i&&(i=e.config.glowFXQuality),void 0===s&&(s=e.config.glowFXDistance),t=(t=t.replace(/__SIZE__/gi,(1/i/s).toFixed(7))).replace(/__DIST__/gi,s.toFixed(0)+".0")}}},44775:(t,e,i)=>{var s=i(56694),r=i(28699),n=i(6659),a=i(18970),o=i(72632),h=i(16650),l=i(81044),u=i(37410),c=i(75512),d=i(71305),f=new s({Extends:n,initialize:function(t){n.call(this);var e=t.game,i=e.renderer,s=i.gl;this.name=o(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=s,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=o(t,"topology",s.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=o(t,"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=t,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[]},boot:function(){var t,e=this.gl,i=this.config,s=this.renderer;this.isPostFX||(this.projectionMatrix=(new h).identity());var r=this.renderTargets,n=o(i,"renderTarget",!1);"boolean"==typeof n&&n&&(n=1);var c=s.width,d=s.height;if("number"==typeof n)for(t=0;t<n;t++)r.push(new u(s,c,d,1,0,!0));else if(Array.isArray(n))for(t=0;t<n.length;t++){var f=o(n[t],"scale",1),p=o(n[t],"minFilter",0),g=o(n[t],"autoClear",1),v=o(n[t],"autoResize",!1),m=o(n[t],"width",null),x=o(n[t],"height",m);m?r.push(new u(s,m,x,1,p,g,v)):r.push(new u(s,c,d,f,p,g,v))}r.length&&(this.currentRenderTarget=r[0]),this.setShadersFromConfig(i);var y=this.shaders,T=0;for(t=0;t<y.length;t++)y[t].vertexSize>T&&(T=y[t].vertexSize);var w=o(i,"batchSize",s.config.batchSize);this.vertexCapacity=6*w;var E=new ArrayBuffer(this.vertexCapacity*T);this.vertexData=E,this.bytes=new Uint8Array(E),this.vertexViewF32=new Float32Array(E),this.vertexViewU32=new Uint32Array(E);var S=o(i,"vertices",null);for(S?(this.vertexViewF32.set(S),this.vertexBuffer=s.createVertexBuffer(E,e.STATIC_DRAW)):this.vertexBuffer=s.createVertexBuffer(E.byteLength,e.DYNAMIC_DRAW),this.setVertexBuffer(),t=y.length-1;t>=0;t--)y[t].rebind();this.hasBooted=!0,s.on(l.RESIZE,this.resize,this),s.on(l.PRE_RENDER,this.onPreRender,this),s.on(l.RENDER,this.onRender,this),s.on(l.POST_RENDER,this.onPostRender,this),this.emit(a.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e,i){var s=this.renderer;t===this.currentShader&&s.currentProgram===this.currentShader.program||(this.flush(),this.setVertexBuffer(i)&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t);return this},getShaderByName:function(t){for(var e=this.shaders,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},setShadersFromConfig:function(t){var e,i=this.shaders,s=this.renderer;for(e=0;e<i.length;e++)i[e].destroy();var n="vertShader",a="fragShader",h="attributes",l=o(t,n,null),u=c.parseFragmentShaderMaxTextures(o(t,a,null),s.maxTextures),f=o(t,h,null),p=o(t,"shaders",[]),g=p.length;if(0===g)l&&u&&(this.shaders=[new d(this,"default",l,u,r(f))]);else{var v=[];for(e=0;e<g;e++){var m,x,y,T,w=p[e];if("string"==typeof w?(m="default",x=l,y=c.parseFragmentShaderMaxTextures(w,s.maxTextures),T=f):(m=o(w,"name","default"),x=o(w,n,l),y=c.parseFragmentShaderMaxTextures(o(w,a,u),s.maxTextures),T=o(w,h,f)),"default"===m){var E=y.split("\n")[0].trim();E.indexOf("#define SHADER_NAME")>-1&&(m=E.substring(20))}x&&y&&v.push(new d(this,m,x,y,r(T)))}this.shaders=v}return 0===this.shaders.length?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(t){return this.currentBatch={start:this.vertexCount,count:0,texture:[t],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=t,this.batch.push(this.currentBatch),0},addTextureToBatch:function(t){var e=this.currentBatch;e&&(e.texture.push(t),e.unit++,e.maxUnit++)},pushBatch:function(t){if(!this.currentBatch||this.forceZero&&t!==this.currentTexture)return this.createBatch(t);if(t===this.currentTexture)return this.currentUnit;var e=this.currentBatch,i=e.texture.indexOf(t);return-1===i?e.texture.length===this.renderer.maxTextures?this.createBatch(t):(e.unit++,e.maxUnit++,e.texture.push(t),this.currentUnit=e.unit,this.currentTexture=t,e.unit):(this.currentUnit=i,this.currentTexture=t,i)},setGameObject:function(t,e){return void 0===e&&(e=t.frame),this.pushBatch(e.source.glTexture)},shouldFlush:function(t){return void 0===t&&(t=0),this.vertexCount+t>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,s=0;s<i.length;s++)i[s].resize(t,e);return this.setProjectionMatrix(t,e),this.emit(a.RESIZE,t,e,this),this.onResize(t,e),this},setProjectionMatrix:function(t,e){var i=this.projectionMatrix;if(!i)return this;this.projectionWidth=t,this.projectionHeight=e,i.ortho(0,t,e,0,-1e3,1e3);for(var s=this.shaders,r="uProjectionMatrix",n=0;n<s.length;n++){var a=s[n];a.hasUniform(r)&&(a.resetUniform(r),a.setMatrix4fv(r,!1,i.val,a))}return this},flipProjectionMatrix:function(t){void 0===t&&(t=!0);var e=this.projectionMatrix;if(!e)return this;var i=this.projectionWidth,s=this.projectionHeight;t?e.ortho(0,i,0,s,-1e3,1e3):e.ortho(0,i,s,0,-1e3,1e3),this.setMatrix4fv("uProjectionMatrix",!1,e.val)},updateProjectionMatrix:function(){if(this.projectionMatrix){var t=this.renderer.projectionWidth,e=this.renderer.projectionHeight;this.projectionWidth===t&&this.projectionHeight===e||this.setProjectionMatrix(t,e)}},bind:function(t){if(void 0===t&&(t=this.currentShader),this.glReset)return this.rebind(t);var e=!1,i=this.gl;return i.getParameter(i.ARRAY_BUFFER_BINDING)!==this.vertexBuffer&&(i.bindBuffer(i.ARRAY_BUFFER,this.vertexBuffer.webGLBuffer),this.activeBuffer=this.vertexBuffer,e=!0),t.bind(e),this.currentShader=t,this.activeTextures.length=0,this.emit(a.BIND,this,t),this.onActive(t),this},rebind:function(t){this.activeBuffer=null,this.setVertexBuffer();for(var e=this.shaders,i=e.length-1;i>=0;i--){var s=e[i].rebind();t&&s!==t||(this.currentShader=s)}return this.activeTextures.length=0,this.emit(a.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var t=this.shaders,e=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,e&&this.setVertexBuffer();for(var i=0;i<t.length;i++){var s=t[i];s.syncUniforms(),e&&s.rebind()}},setVertexBuffer:function(t){if(void 0===t&&(t=this.vertexBuffer),t!==this.activeBuffer){var e=this.gl;return this.gl.bindBuffer(e.ARRAY_BUFFER,t.webGLBuffer),this.activeBuffer=t,!0}return!1},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){if(void 0===t&&(t=!1),this.vertexCount>0){this.emit(a.BEFORE_FLUSH,this,t),this.onBeforeFlush(t);var e=this.gl,i=this.vertexCount,s=this.currentShader.vertexSize,r=this.topology;if(this.active){var n,o,h;this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*s));var l=this.batch,u=this.activeTextures;if(this.forceZero)for(u[0]||e.activeTexture(e.TEXTURE0),n=0;n<l.length;n++)h=(o=l[n]).texture[0],u[0]!==h&&(e.bindTexture(e.TEXTURE_2D,h.webGLTexture),u[0]=h),e.drawArrays(r,o.start,o.count);else for(n=0;n<l.length;n++){o=l[n];for(var c=0;c<=o.maxUnit;c++)h=o.texture[c],u[c]!==h&&(e.activeTexture(e.TEXTURE0+c),e.bindTexture(e.TEXTURE_2D,h.webGLTexture),u[c]=h);e.drawArrays(r,o.start,o.count)}}this.vertexCount=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.emit(a.AFTER_FLUSH,this,t),this.onAfterFlush(t)}return this},onActive:function(){},onBind:function(){},onRebind:function(){},onBatch:function(){},onPreBatch:function(){},onPostBatch:function(){},onPreRender:function(){},onRender:function(){},onPostRender:function(){},onBeforeFlush:function(){},onAfterFlush:function(){},batchVert:function(t,e,i,s,r,n,a){var o=this.vertexViewF32,h=this.vertexViewU32,l=this.vertexCount*this.currentShader.vertexComponentCount-1;o[++l]=t,o[++l]=e,o[++l]=i,o[++l]=s,o[++l]=r,o[++l]=n,h[++l]=a,this.vertexCount++,this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchQuad:function(t,e,i,s,r,n,a,o,h,l,u,c,d,f,p,g,v,m,x,y){void 0===y&&(y=this.currentUnit);var T=!1;this.shouldFlush(6)&&(this.flush(),T=!0),this.currentBatch||(y=this.setTexture2D(x));var w=this.vertexViewF32,E=this.vertexViewU32,S=this.vertexCount*this.currentShader.vertexComponentCount-1;return w[++S]=e,w[++S]=i,w[++S]=l,w[++S]=u,w[++S]=y,w[++S]=m,E[++S]=f,w[++S]=s,w[++S]=r,w[++S]=l,w[++S]=d,w[++S]=y,w[++S]=m,E[++S]=g,w[++S]=n,w[++S]=a,w[++S]=c,w[++S]=d,w[++S]=y,w[++S]=m,E[++S]=v,w[++S]=e,w[++S]=i,w[++S]=l,w[++S]=u,w[++S]=y,w[++S]=m,E[++S]=f,w[++S]=n,w[++S]=a,w[++S]=c,w[++S]=d,w[++S]=y,w[++S]=m,E[++S]=v,w[++S]=o,w[++S]=h,w[++S]=c,w[++S]=u,w[++S]=y,w[++S]=m,E[++S]=p,this.vertexCount+=6,this.currentBatch.count=this.vertexCount-this.currentBatch.start,this.onBatch(t),T},batchTri:function(t,e,i,s,r,n,a,o,h,l,u,c,d,f,p,g,v){void 0===v&&(v=this.currentUnit);var m=!1;this.shouldFlush(3)&&(this.flush(),m=!0),this.currentBatch||(v=this.setTexture2D(g));var x=this.vertexViewF32,y=this.vertexViewU32,T=this.vertexCount*this.currentShader.vertexComponentCount-1;return x[++T]=e,x[++T]=i,x[++T]=o,x[++T]=h,x[++T]=v,x[++T]=p,y[++T]=c,x[++T]=s,x[++T]=r,x[++T]=o,x[++T]=u,x[++T]=v,x[++T]=p,y[++T]=d,x[++T]=n,x[++T]=a,x[++T]=l,x[++T]=u,x[++T]=v,x[++T]=p,y[++T]=f,this.vertexCount+=3,this.currentBatch.count=this.vertexCount-this.currentBatch.start,this.onBatch(t),m},drawFillRect:function(t,e,i,s,r,n,a,o){void 0===a&&(a=this.renderer.whiteTexture),void 0===o&&(o=!0),t=Math.floor(t),e=Math.floor(e);var h=Math.floor(t+i),l=Math.floor(e+s),u=this.setTexture2D(a),d=c.getTintAppendFloatAlphaAndSwap(r,n),f=0,p=1;o&&(f=1,p=0),this.batchQuad(null,t,e,t,l,h,l,h,e,0,f,1,p,d,d,d,d,0,a,u)},setTexture2D:function(t){return void 0===t&&(t=this.renderer.whiteTexture),this.pushBatch(t)},bindTexture:function(t,e){void 0===e&&(e=0);var i=this.gl;return i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,t.webGLTexture),this},bindRenderTarget:function(t,e){return this.bindTexture(t.texture,e)},setTime:function(t,e){return this.set1f(t,this.game.loop.getDuration(),e),this},setBoolean:function(t,e,i){return void 0===i&&(i=this.currentShader),i.setBoolean(t,e),this},set1f:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1f(t,e),this},set2f:function(t,e,i,s){return void 0===s&&(s=this.currentShader),s.set2f(t,e,i),this},set3f:function(t,e,i,s,r){return void 0===r&&(r=this.currentShader),r.set3f(t,e,i,s),this},set4f:function(t,e,i,s,r,n){return void 0===n&&(n=this.currentShader),n.set4f(t,e,i,s,r),this},set1fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1fv(t,e),this},set2fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set2fv(t,e),this},set3fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set3fv(t,e),this},set4fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set4fv(t,e),this},set1iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1iv(t,e),this},set2iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set2iv(t,e),this},set3iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set3iv(t,e),this},set4iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set4iv(t,e),this},set1i:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1i(t,e),this},set2i:function(t,e,i,s){return void 0===s&&(s=this.currentShader),s.set2i(t,e,i),this},set3i:function(t,e,i,s,r){return void 0===r&&(r=this.currentShader),r.set3i(t,e,i,s),this},set4i:function(t,e,i,s,r,n){return void 0===n&&(n=this.currentShader),n.set4i(t,e,i,s,r),this},setMatrix2fv:function(t,e,i,s){return void 0===s&&(s=this.currentShader),s.setMatrix2fv(t,e,i),this},setMatrix3fv:function(t,e,i,s){return void 0===s&&(s=this.currentShader),s.setMatrix3fv(t,e,i),this},setMatrix4fv:function(t,e,i,s){return void 0===s&&(s=this.currentShader),s.setMatrix4fv(t,e,i),this},destroy:function(){var t;this.emit(a.DESTROY,this);var e=this.shaders;for(t=0;t<e.length;t++)e[t].destroy();var i=this.renderTargets;for(t=0;t<i.length;t++)i[t].destroy();var s=this.renderer;return s.deleteBuffer(this.vertexBuffer),s.off(l.RESIZE,this.resize,this),s.off(l.PRE_RENDER,this.onPreRender,this),s.off(l.RENDER,this.onRender,this),s.off(l.POST_RENDER,this.onPostRender,this),this.removeAllListeners(),this.game=null,this.renderer=null,this.manager=null,this.gl=null,this.view=null,this.shaders=null,this.renderTargets=null,this.bytes=null,this.vertexViewF32=null,this.vertexViewU32=null,this.vertexData=null,this.vertexBuffer=null,this.currentShader=null,this.currentRenderTarget=null,this.activeTextures=null,this}});t.exports=f},11857:(t,e,i)=>{var s=i(36337),r=i(66458),n=i(89787),a=i(56694),o=i(86459),h=i(6659),l=i(81044),u=i(28621),c=i(16650),d=i(72283),f=i(35217),p=i(37410),g=i(40444),v=i(38203),m=i(75512),x=i(1217),y=i(2367),T=i(92503),w=i(33374),E=i(14854),S=i(7018),b=i(62347),A=!1,_=new a({Extends:h,initialize:function(t){h.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!0,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=t.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.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glAttribLocationWrappers=[],this.glUniformLocationWrappers=[],this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=d,this.contextRestoredHandler=d,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.normalTexture=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(t){var e,i=this.game,r=this.canvas,n=t.backgroundColor;if(!(e=i.config.context?i.config.context:r.getContext("webgl",t.contextCreation)||r.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var a=this,h=function(){var t=e.getSupportedExtensions();a.supportedExtensions=t;var i="ANGLE_instanced_arrays";a.instancedArraysExtension=t.indexOf(i)>-1?e.getExtension(i):null;var s="OES_vertex_array_object";a.vaoExtension=t.indexOf(s)>-1?e.getExtension(s):null};h(),this.contextLostHandler=function(t){a.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),a.emit(l.LOSE_WEBGL,a),t.preventDefault()},r.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.contextRestoredHandler=function(t){if(e.isContextLost())console&&console.log("WebGL Context restored, but context is still lost");else{a.currentProgram=null,a.currentFramebuffer=null,a.setBlendMode(o.BlendModes.NORMAL),e.disable(e.BLEND),e.disable(e.DEPTH_TEST),e.enable(e.CULL_FACE);var i=function(t){t.createResource()};s(a.glTextureWrappers,i),s(a.glBufferWrappers,i),s(a.glFramebufferWrappers,i),s(a.glProgramWrappers,i),s(a.glAttribLocationWrappers,i),s(a.glUniformLocationWrappers,i),a.createTemporaryTextures(),a.pipelines.restoreContext(),a.resize(a.game.scale.baseSize.width,a.game.scale.baseSize.height),h(),a.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),a.emit(l.RESTORE_WEBGL,a),t.preventDefault()}},r.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var u=0;u<=27;u++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats=[e.BYTE,e.SHORT,e.UNSIGNED_BYTE,e.UNSIGNED_SHORT,e.FLOAT],this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}},t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(n.redGL,n.greenGL,n.blueGL,n.alphaGL);return-1!==["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"].indexOf(t.mipmapFilter)&&(this.mipmapFilter=e[t.mipmapFilter]),this.maxTextures=m.checkShaderMax(e,t.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new f(this),this.setBlendMode(o.BlendModes.NORMAL),this.projectionMatrix=(new c).identity(),i.textures.once(v.READY,this.boot,this),this},boot:function(){var t=this.game,e=this.pipelines,i=t.scale.baseSize,s=i.width,r=i.height;this.width=s,this.height=r,this.isBooted=!0,this.renderTarget=new p(this,s,r,1,0,!0,!0),this.maskTarget=new p(this,s,r,1,0,!0,!0),this.maskSource=new p(this,s,r,1,0,!0,!0);var n=t.config;e.boot(n.pipeline,n.defaultPipeline,n.autoMobilePipeline),this.blankTexture=t.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=t.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=t.textures.getFrame("__WHITE").glTexture;var a=this.gl;a.bindFramebuffer(a.FRAMEBUFFER,null),a.enable(a.SCISSOR_TEST),t.scale.on(g.RESIZE,this.onResize,this),this.resize(s,r)},createTemporaryTextures:function(){for(var t=this.gl,e=0;e<this.maxTextures;e++){var i=t.createTexture();t.activeTexture(t.TEXTURE0+e),t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),this.textureIndexes.push(e)}},captureFrame:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1)},captureNextFrame:function(){A},getFps:function(){A},log:function(){},startCapture:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=!1),void 0===i&&(i=!1)},stopCapture:function(){A},onCapture:function(t){},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},beginCapture:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.renderTarget.bind(!0,t,e),this.setProjectionMatrix(t,e)},endCapture:function(){return this.renderTarget.unbind(!0),this.resetProjectionMatrix(),this.renderTarget},resize:function(t,e){var i=this.gl;return this.width=t,this.height=e,this.setProjectionMatrix(t,e),i.viewport(0,0,t,e),this.drawingBufferHeight=i.drawingBufferHeight,i.scissor(0,i.drawingBufferHeight-e,t,e),this.defaultScissor[2]=t,this.defaultScissor[3]=e,this.emit(l.RESIZE,t,e),this},getCompressedTextures:function(){var t="WEBGL_compressed_texture_",e="WEBKIT_"+t,i=function(i,s){var r=i.getExtension(t+s)||i.getExtension(e+s);if(r){var n={};for(var a in r)n[r[a]]=a;return n}},s=this.gl;return{ETC:i(s,"etc"),ETC1:i(s,"etc1"),ATC:i(s,"atc"),ASTC:i(s,"astc"),BPTC:i(s,"bptc"),RGTC:i(s,"rgtc"),PVRTC:i(s,"pvrtc"),S3TC:i(s,"s3tc"),S3TCSRGB:i(s,"s3tc_srgb"),IMG:!0}},getCompressedTextureName:function(t,e){var i=this.compression[t.toUpperCase()];if(e in i)return i[e]},supportsCompressedTexture:function(t,e){var i=this.compression[t.toUpperCase()];return!!i&&(!e||e in i)},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(t,e){return t===this.projectionWidth&&e===this.projectionHeight||(this.projectionWidth=t,this.projectionHeight=e,this.projectionMatrix.ortho(0,t,e,0,-1e3,1e3)),this},resetProjectionMatrix:function(){return this.setProjectionMatrix(this.width,this.height)},hasExtension:function(t){return!!this.supportedExtensions&&this.supportedExtensions.indexOf(t)},getExtension:function(t){return this.hasExtension(t)?(t in this.extensions||(this.extensions[t]=this.gl.getExtension(t)),this.extensions[t]):null},flush:function(){this.pipelines.flush()},pushScissor:function(t,e,i,s,r){void 0===r&&(r=this.drawingBufferHeight);var n=[t,e,i,s];return this.scissorStack.push(n),this.setScissor(t,e,i,s,r),this.currentScissor=n,n},setScissor:function(t,e,i,s,r){void 0===r&&(r=this.drawingBufferHeight);var n=this.gl,a=this.currentScissor,o=i>0&&s>0;if(a&&o){var h=a[0],l=a[1],u=a[2],c=a[3];o=h!==t||l!==e||u!==i||c!==s}o&&(this.flush(),n.scissor(t,r-e-s,i,s))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e=this.currentScissor;if(e){var i=e[0],s=e[1],r=e[2],n=e[3];r>0&&n>0&&t.scissor(i,this.drawingBufferHeight-s-n,r,n)}},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,s=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(s.equation),s.func.length>2?i.blendFuncSeparate(s.func[0],s.func[1],s.func[2],s.func[3]):i.blendFunc(s.func[0],s.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},pushFramebuffer:function(t,e,i,s,r){return t===this.currentFramebuffer?this:(this.fboStack.push(t),this.setFramebuffer(t,e,i,s,r))},setFramebuffer:function(t,e,i,s,r){if(void 0===e&&(e=!1),void 0===i&&(i=!0),void 0===s&&(s=null),void 0===r&&(r=!1),t===this.currentFramebuffer)return this;var n=this.gl,a=this.width,o=this.height;return t&&t.renderTexture&&i?(a=t.renderTexture.width,o=t.renderTexture.height):this.flush(),t?n.bindFramebuffer(n.FRAMEBUFFER,t.webGLFramebuffer):n.bindFramebuffer(n.FRAMEBUFFER,null),i&&n.viewport(0,0,a,o),s&&n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,s.webGLTexture,0),r&&(n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT)),e&&(t?(this.drawingBufferHeight=o,this.pushScissor(0,0,a,o)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t,this},popFramebuffer:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!0);var i=this.fboStack;i.pop();var s=i[i.length-1];return s||(s=null),this.setFramebuffer(s,t,e),s},restoreFramebuffer:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!0);var i=this.fboStack,s=i[i.length-1];s||(s=null),this.currentFramebuffer=null,this.setFramebuffer(s,t,e)},setProgram:function(t){return t!==this.currentProgram&&(this.flush(),this.gl.useProgram(t.webGLProgram),this.currentProgram=t,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(t,e,i,s,r){void 0===r&&(r=!1);var n=this.gl,a=n.NEAREST,h=n.NEAREST,l=n.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var c=u(e,i);return c&&!r&&(l=n.REPEAT),s===o.ScaleModes.LINEAR&&this.config.antialias&&(a=c&&this.mipmapFilter?this.mipmapFilter:n.LINEAR,h=n.LINEAR),t&&t.compressed&&(a=n.LINEAR,h=n.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,h,l,l,n.RGBA,t):this.createTexture2D(0,a,h,l,l,n.RGBA,null,e,i)},createTexture2D:function(t,e,i,s,r,n,a,o,h,l,u,c){"number"!=typeof o&&(o=a?a.width:1),"number"!=typeof h&&(h=a?a.height:1);var d=new w(this.gl,t,e,i,s,r,n,a,o,h,l,u,c);return this.glTextureWrappers.push(d),d},createFramebuffer:function(t,e,i,s){this.currentFramebuffer=null;var r=new E(this.gl,t,e,i,s);return this.glFramebufferWrappers.push(r),r},beginBitmapMask:function(t,e){this.gl&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==t&&(this.currentMask.mask=t,this.currentMask.camera=e))},drawBitmapMask:function(t,e,i){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),t.renderWebGL(this,t,e),this.maskSource.unbind(!0),this.maskTarget.unbind();var s=this.gl,r=this.getCurrentStencilMask();r?(s.enable(s.STENCIL_TEST),r.mask.applyStencil(this,r.camera,!0)):this.currentMask.mask=null,this.pipelines.set(i),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,this.maskTarget.texture.webGLTexture),s.activeTexture(s.TEXTURE1),s.bindTexture(s.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(t,e){var i=new T(this.gl,t,e);return this.glProgramWrappers.push(i),i},createVertexBuffer:function(t,e){var i=this.gl,s=new y(i,t,i.ARRAY_BUFFER,e);return this.glBufferWrappers.push(s),s},createAttribLocation:function(t,e){var i=new S(this.gl,t,e);return this.glAttribLocationWrappers.push(i),i},createUniformLocation:function(t,e){var i=new b(this.gl,t,e);return this.glUniformLocationWrappers.push(i),i},createIndexBuffer:function(t,e){var i=this.gl,s=new y(i,t,i.ELEMENT_ARRAY_BUFFER,e);return this.glBufferWrappers.push(s),s},deleteTexture:function(t){if(t)return r(this.glTextureWrappers,t),t.destroy(),this},deleteFramebuffer:function(t){return t?(r(this.fboStack,t),r(this.glFramebufferWrappers,t),t.destroy(),this):this},deleteProgram:function(t){return t&&(r(this.glProgramWrappers,t),t.destroy()),this},deleteAttribLocation:function(t){return t&&(r(this.glAttribLocationWrappers,t),t.destroy()),this},deleteUniformLocation:function(t){return t&&(r(this.glUniformLocationWrappers,t),t.destroy()),this},deleteBuffer:function(t){return t?(r(this.glBufferWrappers,t),t.destroy(),this):this},preRenderCamera:function(t){var e=t.x,i=t.y,s=t.width,r=t.height,a=t.backgroundColor;(t.emit(n.PRE_RENDER,t),this.pipelines.preBatchCamera(t),this.pushScissor(e,i,s,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0)&&this.pipelines.setMulti().drawFillRect(e,i,s,r,m.getTintFromFloats(a.blueGL,a.greenGL,a.redGL,1),a.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=t.flashEffect,i=t.fadeEffect;if(e.isRunning||i.isRunning||i.isComplete){var s=this.pipelines.setMulti();e.postRenderWebGL(s,m.getTintFromFloats),i.postRenderWebGL(s,m.getTintFromFloats)}t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(n.POST_RENDER,t)},preRender:function(){if(!this.contextLost){var t=this.gl;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var e=this.config.backgroundColor;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(l.PRE_RENDER)}},render:function(t,e,i){if(!this.contextLost){var s=e.length;if(this.emit(l.RENDER,t,i),this.preRenderCamera(i),0===s)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(i);this.currentType="";for(var r=this.currentMask,n=0;n<s;n++){this.finalType=n===s-1;var a=e[n],h=a.mask;(r=this.currentMask).mask&&r.mask!==h&&r.mask.postRenderWebGL(this,r.camera),h&&r.mask!==h&&h.preRenderWebGL(this,a,i),a.blendMode!==this.currentBlendMode&&this.setBlendMode(a.blendMode);var u=a.type;u!==this.currentType&&(this.newType=!0,this.currentType=u),this.finalType?this.nextTypeMatch=!1:this.nextTypeMatch=e[n+1].type===this.currentType,a.renderWebGL(this,a,i),this.newType=!1}(r=this.currentMask).mask&&r.mask.postRenderWebGL(this,r.camera),this.setBlendMode(o.BlendModes.NORMAL),this.postRenderCamera(i)}},postRender:function(){if(!this.contextLost){this.flush(),this.emit(l.POST_RENDER);var t=this.snapshotState;t.callback&&(x(this.gl,t),t.callback=null)}},clearStencilMask:function(){this.gl.disable(this.gl.STENCIL_TEST)},restoreStencilMask:function(){var t=this.gl,e=this.getCurrentStencilMask();if(e){var i=e.mask;t.enable(t.STENCIL_TEST),i.invertAlpha?t.stencilFunc(t.NOTEQUAL,i.level,255):t.stencilFunc(t.EQUAL,i.level,255)}},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,t,e,i)},snapshotArea:function(t,e,i,s,r,n,a){var o=this.snapshotState;return o.callback=r,o.type=n,o.encoder=a,o.getPixel=!1,o.x=t,o.y=e,o.width=i,o.height=s,this},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(t,e,i,s,r,n,a,o,h,l,u){void 0===r&&(r=!1),void 0===n&&(n=0),void 0===a&&(a=0),void 0===o&&(o=e),void 0===h&&(h=i),"pixel"===l&&(r=!0,l="image/png");var c=this.currentFramebuffer;this.snapshotArea(n,a,o,h,s,l,u);var d=this.snapshotState;return d.getPixel=r,d.isFramebuffer=!0,d.bufferWidth=e,d.bufferHeight=i,d.width=Math.min(d.width,e),d.height=Math.min(d.height,i),this.setFramebuffer(t),x(this.gl,d),this.setFramebuffer(c),d.callback=null,d.isFramebuffer=!1,this},canvasToTexture:function(t,e,i,s){return void 0===i&&(i=!1),void 0===s&&(s=!1),e?this.updateCanvasTexture(t,e,s):this.createCanvasTexture(t,i,s)},createCanvasTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s=this.gl,r=s.NEAREST,n=s.NEAREST,a=t.width,o=t.height,h=s.CLAMP_TO_EDGE,l=u(a,o);return!e&&l&&(h=s.REPEAT),this.config.antialias&&(r=l&&this.mipmapFilter?this.mipmapFilter:s.LINEAR,n=s.LINEAR),this.createTexture2D(0,r,n,h,h,s.RGBA,t,a,o,!0,!1,i)},updateCanvasTexture:function(t,e,i){void 0===i&&(i=!1);var s=t.width,r=t.height;return e.update(t,s,r,i),e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s=this.gl,r=s.NEAREST,n=s.NEAREST,a=t.videoWidth,o=t.videoHeight,h=s.CLAMP_TO_EDGE,l=u(a,o);return!e&&l&&(h=s.REPEAT),this.config.antialias&&(r=l&&this.mipmapFilter?this.mipmapFilter:s.LINEAR,n=s.LINEAR),this.createTexture2D(0,r,n,h,h,s.RGBA,t,a,o,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var s=t.videoWidth,r=t.videoHeight;return e.update(t,s,r,i),e},createUint8ArrayTexture:function(t,e,i){var s=this.gl,r=s.NEAREST,n=s.NEAREST,a=s.CLAMP_TO_EDGE;return u(e,i)&&(a=s.REPEAT),this.createTexture2D(0,r,n,a,a,s.RGBA,t,e,i)},setTextureFilter:function(t,e){var i=this.gl,s=0===e?i.LINEAR:i.NEAREST;i.activeTexture(i.TEXTURE0);var r=i.getParameter(i.TEXTURE_BINDING_2D);return i.bindTexture(i.TEXTURE_2D,t.webGLTexture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,s),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,s),t.minFilter=s,t.magFilter=s,r&&i.bindTexture(i.TEXTURE_2D,r),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);var t=function(t){t.destroy()};s(this.glAttribLocationWrappers,t),s(this.glBufferWrappers,t),s(this.glFramebufferWrappers,t),s(this.glProgramWrappers,t),s(this.glTextureWrappers,t),s(this.glUniformLocationWrappers,t),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}});t.exports=_},71305:(t,e,i)=>{var s=i(56694),r=i(36337),n=i(72632),a=i(71402),o=new s({initialize:function(t,e,i,s,r){this.pipeline=t,this.name=e,this.renderer=t.renderer,this.gl=this.renderer.gl,this.fragSrc=s,this.vertSrc=i,this.program=this.renderer.createProgram(i,s),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(r),this.createUniforms()},createAttributes:function(t){var e=0,i=0,s=[];this.vertexComponentCount=0;for(var r=0;r<t.length;r++){var o=t[r],h=o.name,l=n(o,"size",1),u=n(o,"type",a.FLOAT),c=u.enum,d=u.size,f=!!o.normalized;s.push({name:h,size:l,type:c,normalized:f,offset:i,enabled:!1,location:-1}),4===d?e+=l:e++,i+=l*d}this.vertexSize=i,this.vertexComponentCount=e,this.attributes=s},bind:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),e&&this.pipeline.flush(),this.renderer.setProgram(this.program),t&&this.setAttribPointers(),this},rebind:function(){return this.renderer.setProgram(this.program),this.setAttribPointers(!0),this},setAttribPointers:function(t){void 0===t&&(t=!1);for(var e=this.gl,i=this.renderer,s=this.vertexSize,r=this.attributes,n=this.program,a=0;a<r.length;a++){var o=r[a],h=o.size,l=o.type,u=o.offset,c=o.enabled,d=o.location,f=!!o.normalized;if(t){-1!==d&&i.deleteAttribLocation(d);var p=this.renderer.createAttribLocation(n,o.name);p.webGLAttribLocation>=0?(e.enableVertexAttribArray(p.webGLAttribLocation),e.vertexAttribPointer(p.webGLAttribLocation,h,l,f,s,u),o.enabled=!0,o.location=p):-1!==p.webGLAttribLocation&&e.disableVertexAttribArray(p.webGLAttribLocation)}else c?e.vertexAttribPointer(d.webGLAttribLocation,h,l,f,s,u):!c&&-1!==d&&d.webGLAttribLocation>-1&&(e.disableVertexAttribArray(d.webGLAttribLocation),o.location=-1)}return this},createUniforms:function(){var t,e,i,s=this.gl,r=this.program,n=this.uniforms,a=s.getProgramParameter(r.webGLProgram,s.ACTIVE_UNIFORMS);for(t=0;t<a;t++){var o=s.getActiveUniform(r.webGLProgram,t);if(o){e=o.name,null!==(i=this.renderer.createUniformLocation(r,e))&&(n[e]={name:e,location:i,setter:null,value1:null,value2:null,value3:null,value4:null});var h=e.indexOf("[");h>0&&(e=e.substr(0,h),n.hasOwnProperty(e)||null!==(i=this.renderer.createUniformLocation(r,e))&&(n[e]={name:e,location:i,setter:null,value1:null,value2:null,value3:null,value4:null}))}}return this},syncUniforms:function(){var t=this.gl;for(var e in this.renderer.setProgram(this.program),this.uniforms){var i=this.uniforms[e];i.setter&&i.setter.call(t,i.location.webGLUniformLocation,i.value1,i.value2,i.value3,i.value4)}},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){var e=this.uniforms[t];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this},setUniform1:function(t,e,i,s){var r=this.uniforms[e];return r?((s||r.value1!==i)&&(r.setter||(r.setter=t),r.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,r.location.webGLUniformLocation,i),this.pipeline.currentShader=this),this):this},setUniform2:function(t,e,i,s,r){var n=this.uniforms[e];return n?((r||n.value1!==i||n.value2!==s)&&(n.setter||(n.setter=t),n.value1=i,n.value2=s,this.renderer.setProgram(this.program),t.call(this.gl,n.location.webGLUniformLocation,i,s),this.pipeline.currentShader=this),this):this},setUniform3:function(t,e,i,s,r,n){var a=this.uniforms[e];return a?((n||a.value1!==i||a.value2!==s||a.value3!==r)&&(a.setter||(a.setter=t),a.value1=i,a.value2=s,a.value3=r,this.renderer.setProgram(this.program),t.call(this.gl,a.location.webGLUniformLocation,i,s,r),this.pipeline.currentShader=this),this):this},setUniform4:function(t,e,i,s,r,n,a){var o=this.uniforms[e];return o?((a||o.value1!==i||o.value2!==s||o.value3!==r||o.value4!==n)&&(o.setter||(o.setter=t),o.value1=i,o.value2=s,o.value3=r,o.value4=n,this.renderer.setProgram(this.program),t.call(this.gl,o.location.webGLUniformLocation,i,s,r,n),this.pipeline.currentShader=this),this):this},setBoolean:function(t,e){return this.setUniform1(this.gl.uniform1i,t,Number(e))},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,s){return this.setUniform3(this.gl.uniform3f,t,e,i,s)},set4f:function(t,e,i,s,r){return this.setUniform4(this.gl.uniform4f,t,e,i,s,r)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e,!0)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e,!0)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e,!0)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e,!0)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e,!0)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e,!0)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e,!0)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e,!0)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,s){return this.setUniform3(this.gl.uniform3i,t,e,i,s)},set4i:function(t,e,i,s,r){return this.setUniform4(this.gl.uniform4i,t,e,i,s,r)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i,!0)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i,!0)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i,!0)},createProgram:function(t,e){return void 0===t&&(t=this.vertSrc),void 0===e&&(e=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=t,this.fragSrc=e,this.program=this.renderer.createProgram(t,e),this.createUniforms(),this.rebind()},destroy:function(){var t=this.renderer;r(this.uniforms,(function(e){t.deleteUniformLocation(e.location)})),this.uniforms=null,r(this.attributes,(function(e){t.deleteAttribLocation(e.location)})),this.attributes=null,t.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});t.exports=o},71402:t=>{t.exports={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}}},55478:(t,e,i)=>{var s=i(71402),r=i(98611),n={PipelineManager:i(35217),Pipelines:i(62253),RenderTarget:i(37410),Utils:i(75512),WebGLPipeline:i(44775),WebGLRenderer:i(11857),WebGLShader:i(71305),Wrappers:i(38586)};n=r(!1,n,s),t.exports=n},5583:(t,e,i)=>{var s=i(56694),r=i(72632),n=i(91679),a=i(89053),o=i(71402),h=i(44775),l=new s({Extends:h,initialize:function(t){t.fragShader=r(t,"fragShader",n),t.vertShader=r(t,"vertShader",a),t.batchSize=r(t,"batchSize",1),t.vertices=r(t,"vertices",[-1,1,-1,-7,7,1]),t.attributes=r(t,"attributes",[{name:"inPosition",size:2,type:o.FLOAT}]),h.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(t,e){h.prototype.resize.call(this,t,e),this.set2f("uResolution",t,e)},beginMask:function(t,e,i){this.renderer.beginBitmapMask(t,i)},endMask:function(t,e,i){var s=this.gl,r=this.renderer,n=t.bitmapMask;n&&s&&(r.drawBitmapMask(n,e,this),i&&this.set2f("uResolution",i.width,i.height),this.set1i("uInvertMaskAlpha",t.invertAlpha),s.drawArrays(this.topology,0,3),i&&this.set2f("uResolution",this.width,this.height),s.bindTexture(s.TEXTURE_2D,null))}});t.exports=l},81828:(t,e,i)=>{var s=i(56694),r=i(58136),n=i(47406),a=i(72632),o=i(87228),h=i(92462),l=i(75512),u=new s({Extends:o,initialize:function(t){t.shaders=[l.setGlowQuality(h.FXGlowFrag,t.game),h.FXShadowFrag,h.FXPixelateFrag,h.FXVignetteFrag,h.FXShineFrag,h.FXBlurLowFrag,h.FXBlurMedFrag,h.FXBlurHighFrag,h.FXGradientFrag,h.FXBloomFrag,h.ColorMatrixFrag,h.FXCircleFrag,h.FXBarrelFrag,h.FXDisplacementFrag,h.FXWipeFrag,h.FXBokehFrag],o.call(this,t);var e=this.game;this.glow=new r.Glow(e),this.shadow=new r.Shadow(e),this.pixelate=new r.Pixelate(e),this.vignette=new r.Vignette(e),this.shine=new r.Shine(e),this.gradient=new r.Gradient(e),this.circle=new r.Circle(e),this.barrel=new r.Barrel(e),this.wipe=new r.Wipe(e),this.bokeh=new r.Bokeh(e);var i=[];i[n.GLOW]=this.onGlow,i[n.SHADOW]=this.onShadow,i[n.PIXELATE]=this.onPixelate,i[n.VIGNETTE]=this.onVignette,i[n.SHINE]=this.onShine,i[n.BLUR]=this.onBlur,i[n.GRADIENT]=this.onGradient,i[n.BLOOM]=this.onBloom,i[n.COLOR_MATRIX]=this.onColorMatrix,i[n.CIRCLE]=this.onCircle,i[n.BARREL]=this.onBarrel,i[n.DISPLACEMENT]=this.onDisplacement,i[n.WIPE]=this.onWipe,i[n.BOKEH]=this.onBokeh,this.fxHandlers=i,this.source,this.target,this.swap},onDraw:function(t,e,i){this.source=t,this.target=e,this.swap=i;var s=t.width,r=t.height,n=this.tempSprite,a=this.fxHandlers;if(n&&n.preFX)for(var o=n.preFX.list,h=0;h<o.length;h++){var l=o[h];l.active&&a[l.type].call(this,l,s,r)}this.drawToGame(this.source)},runDraw:function(){var t=this.source,e=this.target;this.copy(t,e),this.source=e,this.target=t},onGlow:function(t,e,i){var s=this.shaders[n.GLOW];this.setShader(s),this.glow.onPreRender(t,s,e,i),this.runDraw()},onShadow:function(t){var e=this.shaders[n.SHADOW];this.setShader(e),this.shadow.onPreRender(t,e),this.runDraw()},onPixelate:function(t,e,i){var s=this.shaders[n.PIXELATE];this.setShader(s),this.pixelate.onPreRender(t,s,e,i),this.runDraw()},onVignette:function(t){var e=this.shaders[n.VIGNETTE];this.setShader(e),this.vignette.onPreRender(t,e),this.runDraw()},onShine:function(t,e,i){var s=this.shaders[n.SHINE];this.setShader(s),this.shine.onPreRender(t,s,e,i),this.runDraw()},onBlur:function(t,e,i){var s=a(t,"quality"),r=this.shaders[n.BLUR+s];this.setShader(r),this.set1i("uMainSampler",0),this.set2f("resolution",e,i),this.set1f("strength",a(t,"strength")),this.set3fv("color",a(t,"glcolor"));for(var o=a(t,"x"),h=a(t,"y"),l=a(t,"steps"),u=0;u<l;u++)this.set2f("offset",o,0),this.runDraw(),this.set2f("offset",0,h),this.runDraw()},onGradient:function(t){var e=this.shaders[n.GRADIENT];this.setShader(e),this.gradient.onPreRender(t,e),this.runDraw()},onBloom:function(t,e,i){var s=this.shaders[n.BLOOM];this.copySprite(this.source,this.swap),this.setShader(s),this.set1i("uMainSampler",0),this.set1f("strength",a(t,"blurStrength")),this.set3fv("color",a(t,"glcolor"));for(var r=2/e*a(t,"offsetX"),o=2/i*a(t,"offsetY"),h=a(t,"steps"),l=0;l<h;l++)this.set2f("offset",r,0),this.runDraw(),this.set2f("offset",0,o),this.runDraw();this.blendFrames(this.swap,this.source,this.target,a(t,"strength")),this.copySprite(this.target,this.source)},onColorMatrix:function(t){this.setShader(this.colorMatrixShader),this.set1fv("uColorMatrix",t.getData()),this.set1f("uAlpha",t.alpha),this.runDraw()},onCircle:function(t,e,i){var s=this.shaders[n.CIRCLE];this.setShader(s),this.circle.onPreRender(t,s,e,i),this.runDraw()},onBarrel:function(t){var e=this.shaders[n.BARREL];this.setShader(e),this.barrel.onPreRender(t,e),this.runDraw()},onDisplacement:function(t){this.setShader(this.shaders[n.DISPLACEMENT]),this.set1i("uDisplacementSampler",1),this.set2f("amount",t.x,t.y),this.bindTexture(t.glTexture,1),this.runDraw()},onWipe:function(t){var e=this.shaders[n.WIPE];this.setShader(e),this.wipe.onPreRender(t,e),this.runDraw()},onBokeh:function(t,e,i){var s=this.shaders[n.BOKEH];this.setShader(s),this.bokeh.onPreRender(t,s,e,i),this.runDraw()},destroy:function(){return this.glow.destroy(),this.shadow.destroy(),this.pixelate.destroy(),this.vignette.destroy(),this.shine.destroy(),this.gradient.destroy(),this.circle.destroy(),this.barrel.destroy(),this.wipe.destroy(),this.bokeh.destroy(),this.fxHandlers=null,this.source=null,this.target=null,this.swap=null,o.prototype.destroy.call(this),this}});t.exports=u},66901:(t,e,i)=>{var s=i(56694),r=i(72632),n=i(65045),a=i(77310),o=i(69360),h=i(93736),l=i(44775),u=new s({Extends:a,initialize:function(t){var e=r(t,"fragShader",n);t.fragShader=e.replace("%LIGHT_COUNT%",t.game.renderer.config.maxLights),a.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new h,this._tempMatrix=new o,this._tempMatrix2=new o},boot:function(){l.prototype.boot.call(this)},onRender:function(t,e){var i=t.sys.lights;if(this.lightsActive=!1,i&&i.active){var s,r=i.getLights(e),n=r.length;this.lightsActive=!0;var a=this.renderer.height,o=e.matrix,h=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",e.x,e.y,e.rotation,e.zoom),this.set3f("uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),this.set1i("uLightCount",n),s=0;s<n;s++){var l=r[s].light,u=l.color,c="uLights["+s+"].";o.transformPoint(l.x,l.y,h),this.set2f(c+"position",h.x-e.scrollX*l.scrollFactorX*e.zoom,a-(h.y-e.scrollY*l.scrollFactorY*e.zoom)),this.set3f(c+"color",u.r,u.g,u.b),this.set1f(c+"intensity",l.intensity),this.set1f(c+"radius",l.radius)}this.currentNormalMapRotation=null}},setNormalMapRotation:function(t){if(t!==this.currentNormalMapRotation||0===this.vertexCount){this.vertexCount>0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,s=Math.cos(i),r=Math.sin(i);e[1]=r,e[3]=-r,e[0]=e[4]=s}else e[0]=e[4]=1,e[1]=e[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},setTexture2D:function(t,e){var i=this.renderer;void 0===t&&(t=i.whiteTexture);var s=this.getNormalMap(e);this.isNewNormalMap(t,s)&&(this.flush(),this.createBatch(t),this.addTextureToBatch(s),this.currentNormalMap=s);var r=0;e&&e.parentContainer?r=e.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2).rotationNormalized:e&&(r=e.rotation);return this.setNormalMapRotation(r),0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=e.glTexture,s=this.getNormalMap(t);if(this.isNewNormalMap(i,s)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(s),this.currentNormalMap=s),t.parentContainer){var r=t.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(r.rotationNormalized)}else this.setNormalMapRotation(t.rotation);return 0},isNewNormalMap:function(t,e){return this.currentTexture!==t||this.currentNormalMap!==e},getNormalMap:function(t){var e;return t?(t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=Array.isArray(t.tileset)?t.tileset[0].image.dataSource[0]:t.tileset.image.dataSource[0]),e?e.glTexture:this.renderer.normalMap):this.renderer.normalMap},batchSprite:function(t,e,i){this.lightsActive&&a.prototype.batchSprite.call(this,t,e,i)},batchTexture:function(t,e,i,s,r,n,o,h,l,u,c,d,f,p,g,v,m,x,y,T,w,E,S,b,A,_,C,R,M,P,L,O){this.lightsActive&&a.prototype.batchTexture.call(this,t,e,i,s,r,n,o,h,l,u,c,d,f,p,g,v,m,x,y,T,w,E,S,b,A,_,C,R,M,P,L,O)},batchTextureFrame:function(t,e,i,s,r,n,o){this.lightsActive&&a.prototype.batchTextureFrame.call(this,t,e,i,s,r,n,o)}});t.exports=u},71264:(t,e,i)=>{var s=i(56694),r=i(72632),n=i(77310),a=i(85060),o=i(18166),h=i(71402),l=i(44775),u=new s({Extends:n,initialize:function(t){t.fragShader=r(t,"fragShader",a),t.vertShader=r(t,"vertShader",o),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),t.forceZero=!0,n.call(this,t)},boot:function(){l.prototype.boot.call(this);var t=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",t.width,t.height),this.set1i("uRoundPixels",t.config.roundPixels)}});t.exports=u},77310:(t,e,i)=>{var s=i(56694),r=i(11117),n=i(72632),a=i(53787),o=i(15968),h=i(69360),l=i(75512),u=i(71402),c=i(44775),d=new s({Extends:c,initialize:function(t){var e=t.game.renderer,i=n(t,"fragShader",a);t.fragShader=l.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=n(t,"vertShader",o),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),c.call(this,t),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,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(){c.prototype.boot.call(this);var t=this.renderer;this.set1iv("uMainSampler",t.textureIndexes),this.set2f("uResolution",t.width,t.height),this.set1i("uRoundPixels",t.config.roundPixels)},batchSprite:function(t,e,i){this.manager.set(this,t);var s=this._tempMatrix1,r=this._tempMatrix2,n=this._tempMatrix3,a=t.frame,o=a.glTexture,h=a.u0,u=a.v0,c=a.u1,d=a.v1,f=a.x,p=a.y,g=a.cutWidth,v=a.cutHeight,m=a.customPivot,x=t.displayOriginX,y=t.displayOriginY,T=-x+f,w=-y+p;if(t.isCropped){var E=t._crop;E.flipX===t.flipX&&E.flipY===t.flipY||a.updateCropUVs(E,t.flipX,t.flipY),h=E.u0,u=E.v0,c=E.u1,d=E.v1,g=E.width,v=E.height,T=-x+(f=E.x),w=-y+(p=E.y)}var S=1,b=1;t.flipX&&(m||(T+=-a.realWidth+2*x),S=-1),(t.flipY||a.source.isGLTexture&&!o.flipY)&&(m||(w+=-a.realHeight+2*y),b=-1);var A=t.x,_=t.y;r.applyITRS(A,_,t.rotation,t.scaleX*S,t.scaleY*b),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),r.e=A,r.f=_):(r.e-=e.scrollX*t.scrollFactorX,r.f-=e.scrollY*t.scrollFactorY),s.multiply(r,n);var C=n.setQuad(T,w,T+g,w+v),R=l.getTintAppendFloatAlpha,M=e.alpha,P=R(t.tintTopLeft,M*t._alphaTL),L=R(t.tintTopRight,M*t._alphaTR),O=R(t.tintBottomLeft,M*t._alphaBL),F=R(t.tintBottomRight,M*t._alphaBR);this.shouldFlush(6)&&this.flush();var D=this.setGameObject(t,a);this.manager.preBatch(t),this.currentShader.set1i("uRoundPixels",e.roundPixels),this.batchQuad(t,C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],h,u,c,d,P,L,O,F,t.tintFill,o,D),this.manager.postBatch(t)},batchTexture:function(t,e,i,s,r,n,a,o,h,l,u,c,d,f,p,g,v,m,x,y,T,w,E,S,b,A,_,C,R,M,P,L,O){void 0===O&&(O=!1),this.manager.set(this,t);var F=this._tempMatrix1,D=this._tempMatrix2,k=this._tempMatrix3,I=m/i+_,B=x/s+C,N=(m+y)/i+_,X=(x+T)/s+C,U=a,Y=o,z=-g,G=-v;if(t.isCropped){var W=t._crop,V=W.width,H=W.height;U=V,Y=H,a=V,o=H;var j=m=W.x,K=x=W.y;c&&(j=y-W.x-V),d&&(K=T-W.y-H),I=j/i+_,B=K/s+C,N=(j+V)/i+_,X=(K+H)/s+C,z=-g+m,G=-v+x}c&&(U*=-1,z+=a),(d^=!P&&e.isRenderTexture?1:0)&&(Y*=-1,G+=o),D.applyITRS(r,n,u,h,l),F.copyFrom(R.matrix),M?(F.multiplyWithOffset(M,-R.scrollX*f,-R.scrollY*p),D.e=r,D.f=n):(D.e-=R.scrollX*f,D.f-=R.scrollY*p),F.multiply(D,k);var q=k.setQuad(z,G,z+U,G+Y);null==L&&(L=this.setTexture2D(e)),t&&!O&&this.manager.preBatch(t),this.currentShader.set1i("uRoundPixels",R.roundPixels),this.batchQuad(t,q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7],I,B,N,X,w,E,S,b,A,e,L),t&&!O&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,s,r,n,a){this.manager.set(this);var o=this._tempMatrix1.copyFrom(n),h=this._tempMatrix2;a?o.multiply(a,h):h=o;var u=h.setQuad(e,i,e+t.width,i+t.height),c=this.setTexture2D(t.source.glTexture);s=l.getTintAppendFloatAlpha(s,r),this.batchQuad(null,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],t.u0,t.v0,t.u1,t.v1,s,s,s,s,0,t.glTexture,c)},batchFillRect:function(t,e,i,s,r,n){this.renderer.pipelines.set(this);var a=this.calcMatrix;n&&n.multiply(r,a);var o=a.setQuad(t,e,t+i,e+s),h=this.fillTint;this.batchQuad(null,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],0,0,1,1,h.TL,h.TR,h.BL,h.BR,2)},batchFillTriangle:function(t,e,i,s,r,n,a,o){this.renderer.pipelines.set(this);var h=this.calcMatrix;o&&o.multiply(a,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,s),d=h.getY(i,s),f=h.getX(r,n),p=h.getY(r,n),g=this.fillTint;this.currentShader.set1i("uRoundPixels",!1),this.batchTri(null,l,u,c,d,f,p,0,0,1,1,g.TL,g.TR,g.BL,2)},batchStrokeTriangle:function(t,e,i,s,r,n,a,o,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=a,l[1].x=i,l[1].y=s,l[1].width=a,l[2].x=r,l[2].y=n,l[2].width=a,l[3].x=t,l[3].y=e,l[3].width=a,this.batchStrokePath(l,a,!1,o,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var s=this.calcMatrix;i&&i.multiply(e,s);for(var n,a,o=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=0;d<o;++d)a=t[d],h.push(a.x,a.y);o=(n=r(h)).length,this.currentShader.set1i("uRoundPixels",!1);for(var f=0;f<o;f+=3){var p=2*n[f+0],g=2*n[f+1],v=2*n[f+2],m=h[p+0],x=h[p+1],y=h[g+0],T=h[g+1],w=h[v+0],E=h[v+1],S=s.getX(m,x),b=s.getY(m,x),A=s.getX(y,T),_=s.getY(y,T),C=s.getX(w,E),R=s.getY(w,E);this.batchTri(null,S,b,A,_,C,R,0,0,1,1,l,u,c,2)}h.length=0},batchStrokePath:function(t,e,i,s,r){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var n=t.length-1,a=0;a<n;a++){var o=t[a],h=t[a+1];this.batchLine(o.x,o.y,h.x,h.y,o.width/2,h.width/2,e,a,!i&&a===n-1,s,r)}},batchLine:function(t,e,i,s,r,n,a,o,h,l,u){this.renderer.pipelines.set(this);var c=this.calcMatrix;u&&u.multiply(l,c);var d=i-t,f=s-e,p=Math.sqrt(d*d+f*f);if(0!==p){var g=r*(s-e)/p,v=r*(t-i)/p,m=n*(s-e)/p,x=n*(t-i)/p,y=i-m,T=s-x,w=t-g,E=e-v,S=i+m,b=s+x,A=t+g,_=e+v,C=c.getX(y,T),R=c.getY(y,T),M=c.getX(w,E),P=c.getY(w,E),L=c.getX(S,b),O=c.getY(S,b),F=c.getX(A,_),D=c.getY(A,_),k=this.strokeTint,I=k.TL,B=k.TR,N=k.BL,X=k.BR;if(this.currentShader.set1i("uRoundPixels",!1),this.batchQuad(null,F,D,M,P,C,R,L,O,0,0,1,1,I,B,N,X,2),!(a<=2)){var U=this.prevQuad,Y=this.firstQuad;o>0&&U[4]?this.batchQuad(null,F,D,M,P,U[0],U[1],U[2],U[3],0,0,1,1,I,B,N,X,2):(Y[0]=F,Y[1]=D,Y[2]=M,Y[3]=P,Y[4]=1),h&&Y[4]?this.batchQuad(null,C,R,L,O,Y[0],Y[1],Y[2],Y[3],0,0,1,1,I,B,N,X,2):(U[0]=C,U[1]=R,U[2]=L,U[3]=O,U[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,c.prototype.destroy.call(this),this}});t.exports=d},10919:(t,e,i)=>{var s=i(56694),r=i(72632),n=i(83327),a=i(54677),o=i(44775),h=new s({Extends:o,initialize:function(t){t.vertShader=r(t,"vertShader",a),t.fragShader=r(t,"fragShader",n),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),o.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,s,r,n,a,o,h,l,u,c){var d=t.color,f=t.intensity,p=t.radius,g=t.attenuation,v=d.r*f,m=d.g*f,x=d.b*f,y=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,s,u,c,p,g,v,m,x,y),this.batchLightVert(r,n,u,c,p,g,v,m,x,y),this.batchLightVert(a,o,u,c,p,g,v,m,x,y),this.batchLightVert(i,s,u,c,p,g,v,m,x,y),this.batchLightVert(a,o,u,c,p,g,v,m,x,y),this.batchLightVert(h,l,u,c,p,g,v,m,x,y),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(t,e,i,s,r,n,a,o,h,l){var u=this.vertexViewF32,c=this.vertexCount*this.currentShader.vertexComponentCount-1;u[++c]=t,u[++c]=e,u[++c]=i,u[++c]=s,u[++c]=r,u[++c]=n,u[++c]=a,u[++c]=o,u[++c]=h,u[++c]=l,this.vertexCount++}});t.exports=h},80486:(t,e,i)=>{var s=i(56694),r=i(65246),n=i(72632),a=i(12569),o=i(99365),h=i(44775),l=new s({Extends:h,initialize:function(t){t.renderTarget=n(t,"renderTarget",1),t.fragShader=n(t,"fragShader",a),t.vertShader=n(t,"vertShader",o),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.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],h.call(this,t),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new r,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2;var e=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",e.width,e.height),this.set1i("uRoundPixels",e.config.roundPixels);for(var i=this.renderTargets,s=0;s<i.length;s++)i[s].autoResize=!0},postBatch:function(t){return this.hasBooted?this.onDraw(this.currentRenderTarget):this.bootFX(),this.onPostBatch(t),this},onDraw:function(t){this.bindAndDraw(t)},getController:function(t){return void 0!==t?t:this.controller?this.controller:this},copySprite:function(t,e,i){void 0===i&&(i=!1);var s=this.gl;s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,t.texture.webGLTexture);var r=s.getParameter(s.FRAMEBUFFER_BINDING);s.bindFramebuffer(s.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e.texture.webGLTexture,0),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT),s.bufferData(s.ARRAY_BUFFER,this.vertexData,s.STATIC_DRAW),s.drawArrays(s.TRIANGLES,0,6),i&&(s.bindTexture(s.TEXTURE_2D,null),s.bindFramebuffer(s.FRAMEBUFFER,r))},copyFrame:function(t,e,i,s,r){this.manager.copyFrame(t,e,i,s,r)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,s,r){this.manager.blendFrames(t,e,i,s,r)},blendFramesAdditive:function(t,e,i,s,r){this.manager.blendFramesAdditive(t,e,i,s,r)},clearFrame:function(t,e){this.manager.clearFrame(t,e)},blitFrame:function(t,e,i,s,r,n){this.manager.blitFrame(t,e,i,s,r,n)},copyFrameRect:function(t,e,i,s,r,n,a,o){this.manager.copyFrameRect(t,e,i,s,r,n,a,o)},bindAndDraw:function(t,e,i,s,r){void 0===i&&(i=!0),void 0===s&&(s=!0);var n=this.gl,a=this.renderer;this.bind(r),this.set1i("uMainSampler",0),e?(n.viewport(0,0,e.width,e.height),n.bindFramebuffer(n.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e.texture.webGLTexture,0),i&&(s?n.clearColor(0,0,0,0):n.clearColor(0,0,0,1),n.clear(n.COLOR_BUFFER_BIT))):(a.popFramebuffer(!1,!1),a.currentFramebuffer||n.viewport(0,0,a.width,a.height)),a.restoreStencilMask(),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,t.texture.webGLTexture),n.bufferData(n.ARRAY_BUFFER,this.vertexData,n.STATIC_DRAW),n.drawArrays(n.TRIANGLES,0,6),e&&(n.bindTexture(n.TEXTURE_2D,null),n.bindFramebuffer(n.FRAMEBUFFER,a.currentFramebuffer.webGLFramebuffer))},destroy:function(){return this.controller&&this.controller.destroy(),this.gameObject=null,this.controller=null,this.colorMatrix=null,this.fullFrame1=null,this.fullFrame2=null,this.halfFrame1=null,this.halfFrame2=null,this.manager.removePostPipeline(this),h.prototype.destroy.call(this),this}});t.exports=l},87228:(t,e,i)=>{var s=i(95723),r=i(79993),n=i(56694),a=i(37486),o=i(72632),h=i(77310),l=i(12569),u=i(74118),c=i(37410),d=i(85060),f=i(18166),p=i(44775),g=new n({Extends:h,initialize:function(t){var e=o(t,"fragShader",l),i=o(t,"vertShader",f),s=o(t,"drawShader",l),r=[{name:"DrawSprite",fragShader:d,vertShader:f},{name:"CopySprite",fragShader:e,vertShader:i},{name:"DrawGame",fragShader:s,vertShader:f},{name:"ColorMatrix",fragShader:a}],n=o(t,"shaders",[]);t.shaders=r.concat(n),t.vertShader||(t.vertShader=i),t.batchSize=1,h.call(this,t),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(){p.prototype.boot.call(this);var t=this.shaders,e=this.renderer;this.drawSpriteShader=t[0],this.copyShader=t[1],this.gameShader=t[2],this.colorMatrixShader=t[3],this.fsTarget=new c(e,e.width,e.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var i=new ArrayBuffer(168);this.quadVertexData=i,this.quadVertexViewF32=new Float32Array(i),this.quadVertexBuffer=e.createVertexBuffer(i,this.gl.STATIC_DRAW),this.onResize(e.width,e.height),this.currentShader=this.copyShader,this.set2f("uResolution",e.width,e.height),this.set1i("uRoundPixels",e.config.roundPixels)},onResize:function(t,e){var i=this.quadVertexViewF32;i[1]=e,i[22]=e,i[14]=t,i[28]=t,i[35]=t,i[36]=e},batchQuad:function(t,e,i,s,n,a,o,h,l,u,c,d,f,p,g,v,m,x,y){var T=Math.min(e,s,a,h),w=Math.min(i,n,o,l),E=Math.max(e,s,a,h)-T,S=Math.max(i,n,o,l)-w,b=this.spriteBounds.setTo(T,w,E,S),A=t?t.preFX.padding:0,_=E+2*A,C=S+2*A,R=Math.abs(Math.max(_,C)),M=this.manager.getRenderTarget(R),P=this.targetBounds.setTo(0,0,M.width,M.height);r(P,b.centerX,b.centerY),this.tempSprite=t;var L=this.gl,O=this.renderer;O.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",O.width,O.height),this.set1i("uRoundPixels",O.config.roundPixels),this.flipProjectionMatrix(!0),t&&(this.onDrawSprite(t,M),t.preFX.onFX(this));var F=this.fsTarget;return this.flush(),L.viewport(0,0,O.width,O.height),L.bindFramebuffer(L.FRAMEBUFFER,F.framebuffer.webGLFramebuffer),L.framebufferTexture2D(L.FRAMEBUFFER,L.COLOR_ATTACHMENT0,L.TEXTURE_2D,F.texture.webGLTexture,0),L.clearColor(0,0,0,0),L.clear(L.COLOR_BUFFER_BIT),this.setTexture2D(y),this.batchVert(e,i,u,c,0,x,p),this.batchVert(s,n,u,f,0,x,v),this.batchVert(a,o,d,f,0,x,m),this.batchVert(e,i,u,c,0,x,p),this.batchVert(a,o,d,f,0,x,m),this.batchVert(h,l,d,c,0,x,g),this.flush(),this.flipProjectionMatrix(!1),L.activeTexture(L.TEXTURE0),L.bindTexture(L.TEXTURE_2D,M.texture.webGLTexture),L.copyTexSubImage2D(L.TEXTURE_2D,0,0,0,P.x,P.y,P.width,P.height),L.bindFramebuffer(L.FRAMEBUFFER,null),L.bindTexture(L.TEXTURE_2D,null),this.onBatch(t),this.currentShader=this.copyShader,this.onDraw(M,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(t,e,i,r,n,a,o){void 0===i&&(i=!0),void 0===r&&(r=!0),void 0===n&&(n=!1),void 0===o&&(o=this.copyShader);var h=this.gl,l=this.tempSprite;a&&(o=this.colorMatrixShader),this.currentShader=o;var u=this.setVertexBuffer(this.quadVertexBuffer);o.bind(u,!1);var c=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",c.width,c.height),this.set1i("uRoundPixels",c.config.roundPixels),l.preFX.onFXCopy(this),this.onCopySprite(t,e,l),a&&(this.set1fv("uColorMatrix",a.getData()),this.set1f("uAlpha",a.alpha)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,t.texture.webGLTexture),t.height>e.height)h.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var d=e.height-t.height;h.viewport(0,d,t.width,t.height),this.resetUVs()}if(h.bindFramebuffer(h.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,e.texture.webGLTexture,0),i&&(h.clearColor(0,0,0,Number(!r)),h.clear(h.COLOR_BUFFER_BIT)),n){var f=this.renderer.currentBlendMode;this.renderer.setBlendMode(s.ERASE)}h.bufferData(h.ARRAY_BUFFER,this.quadVertexData,h.STATIC_DRAW),h.drawArrays(h.TRIANGLES,0,6),n&&this.renderer.setBlendMode(f),h.bindFramebuffer(h.FRAMEBUFFER,null)},copy:function(t,e){var i=this.gl;this.set1i("uMainSampler",0),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t.texture.webGLTexture),i.viewport(0,0,t.width,t.height),this.setUVs(0,0,0,1,1,1,1,0),i.bindFramebuffer(i.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,e.texture.webGLTexture,0),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.bufferData(i.ARRAY_BUFFER,this.quadVertexData,i.STATIC_DRAW),i.drawArrays(i.TRIANGLES,0,6),i.bindFramebuffer(i.FRAMEBUFFER,null)},blendFrames:function(t,e,i,s,r){this.manager.blendFrames(t,e,i,s,r)},blendFramesAdditive:function(t,e,i,s,r){this.manager.blendFramesAdditive(t,e,i,s,r)},drawToGame:function(t){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(t)},copyToGame:function(t){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(t)},bindAndDraw:function(t){var e=this.gl,i=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(t.texture);var s=this._tempMatrix1.loadIdentity(),r=this.targetBounds.x,n=this.targetBounds.y,a=r+t.width,o=n+t.height,h=s.getX(r,n),l=s.getX(r,o),u=s.getX(a,o),c=s.getX(a,n),d=s.getY(r,n),f=s.getY(r,o),p=s.getY(a,o),g=s.getY(a,n),v=16777215;this.batchVert(h,d,0,0,0,0,v),this.batchVert(l,f,0,1,0,0,v),this.batchVert(u,p,1,1,0,0,v),this.batchVert(h,d,0,0,0,0,v),this.batchVert(u,p,1,1,0,0,v),this.batchVert(c,g,1,0,0,0,v),i.restoreFramebuffer(!1,!0),i.currentFramebuffer||e.viewport(0,0,i.width,i.height),i.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(t){this.drawToGame(t)},setUVs:function(t,e,i,s,r,n,a,o){var h=this.quadVertexViewF32;h[2]=t,h[3]=e,h[9]=i,h[10]=s,h[16]=r,h[17]=n,h[23]=t,h[24]=e,h[30]=r,h[31]=n,h[37]=a,h[38]=o},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.renderer.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,h.prototype.destroy.call(this),this}});t.exports=g},21213:(t,e,i)=>{var s=i(56694),r=i(72632),n=i(77310),a=new s({Extends:n,initialize:function(t){t.topology=5,t.batchSize=r(t,"batchSize",256),n.call(this,t)}});t.exports=a},51212:(t,e,i)=>{var s=i(56694),r=i(72632),n=i(77310),a=i(85060),o=i(18166),h=i(44775),l=new s({Extends:n,initialize:function(t){t.fragShader=r(t,"fragShader",a),t.vertShader=r(t,"vertShader",o),t.forceZero=!0,n.call(this,t)},boot:function(){h.prototype.boot.call(this);var t=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",t.width,t.height),this.set1i("uRoundPixels",t.config.roundPixels)}});t.exports=l},60848:(t,e,i)=>{var s=i(2529),r=i(95723),n=i(56694),a=i(65246),o=i(37486),h=i(79060),l=i(72632),u=i(98921),c=i(99365),d=i(44775),f=new n({Extends:d,initialize:function(t){t.renderTarget=l(t,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),t.vertShader=l(t,"vertShader",c),t.shaders=l(t,"shaders",[{name:"Copy",fragShader:h},{name:"AddBlend",fragShader:s},{name:"LinearBlend",fragShader:u},{name:"ColorMatrix",fragShader:o}]),t.attributes=l(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.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],t.batchSize=1,d.call(this,t),this.colorMatrix=new a,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,s,r){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===r&&(r=!0);var n=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,t.texture.webGLTexture),e?(n.viewport(0,0,e.width,e.height),n.bindFramebuffer(n.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e.texture.webGLTexture,0)):n.viewport(0,0,t.width,t.height),s&&(r?n.clearColor(0,0,0,0):n.clearColor(0,0,0,1),n.clear(n.COLOR_BUFFER_BIT)),n.bufferData(n.ARRAY_BUFFER,this.vertexData,n.STATIC_DRAW),n.drawArrays(n.TRIANGLES,0,6),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindTexture(n.TEXTURE_2D,null)},blitFrame:function(t,e,i,s,n,a,o){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===n&&(n=!0),void 0===a&&(a=!1),void 0===o&&(o=!1);var h=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,t.texture.webGLTexture),t.height>e.height)h.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var l=e.height-t.height;h.viewport(0,l,t.width,t.height)}if(h.bindFramebuffer(h.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,e.texture.webGLTexture,0),s&&(n?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),a){var u=this.renderer.currentBlendMode;this.renderer.setBlendMode(r.ERASE)}o&&this.flipY(),h.bufferData(h.ARRAY_BUFFER,this.vertexData,h.STATIC_DRAW),h.drawArrays(h.TRIANGLES,0,6),a&&this.renderer.setBlendMode(u),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,s,r,n,a,o){void 0===a&&(a=!0),void 0===o&&(o=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer.webGLFramebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture.webGLTexture,0),a&&(o?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture.webGLTexture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,s,r,n),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture.webGLTexture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6)},drawFrame:function(t,e,i,s){void 0===i&&(i=!0),void 0===s&&(s=this.colorMatrix);var r=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",s.getData()),this.set1f("uAlpha",s.alpha),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture.webGLTexture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture.webGLTexture,0)):r.viewport(0,0,t.width,t.height),i?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blendFrames:function(t,e,i,s,r,n){void 0===s&&(s=1),void 0===r&&(r=!0),void 0===n&&(n=this.linearShader);var a=this.gl;this.setShader(n),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",s),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,t.texture.webGLTexture),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,e.texture.webGLTexture),i?(a.bindFramebuffer(a.FRAMEBUFFER,i.framebuffer.webGLFramebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,i.texture.webGLTexture,0),a.viewport(0,0,i.width,i.height)):a.viewport(0,0,t.width,t.height),r?a.clearColor(0,0,0,0):a.clearColor(0,0,0,1),a.clear(a.COLOR_BUFFER_BIT),a.bufferData(a.ARRAY_BUFFER,this.vertexData,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6),a.bindFramebuffer(a.FRAMEBUFFER,null),a.bindTexture(a.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,s,r){this.blendFrames(t,e,i,s,r,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl;i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer.webGLFramebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT);var s=this.renderer.currentFramebuffer;i.bindFramebuffer(i.FRAMEBUFFER,s.webGLFramebuffer)},setUVs:function(t,e,i,s,r,n,a,o){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=s,h[10]=r,h[11]=n,h[14]=t,h[15]=e,h[18]=r,h[19]=n,h[22]=a,h[23]=o},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},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)}});t.exports=f},65641:t=>{t.exports={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"}},68726:t=>{t.exports="pipelineafterflush"},67186:t=>{t.exports="pipelinebeforeflush"},22709:t=>{t.exports="pipelinebind"},74469:t=>{t.exports="pipelineboot"},93953:t=>{t.exports="pipelinedestroy"},51687:t=>{t.exports="pipelinerebind"},25034:t=>{t.exports="pipelineresize"},18970:(t,e,i)=>{t.exports={AFTER_FLUSH:i(68726),BEFORE_FLUSH:i(67186),BIND:i(22709),BOOT:i(74469),DESTROY:i(93953),REBIND:i(51687),RESIZE:i(25034)}},32469:(t,e,i)=>{var s=i(56694),r=i(87751),n=i(80486),a=new s({Extends:n,initialize:function(t){n.call(this,{game:t,fragShader:r}),this.amount=1},onPreRender:function(t,e){t=this.getController(t),this.set1f("amount",t.amount,e)}});t.exports=a},2134:(t,e,i)=>{var s=i(56694),r=i(88222),n=i(80486),a=new s({Extends:n,initialize:function(t){n.call(this,{game:t,fragShader:r}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(t){t=this.getController(t),this.set1f("strength",t.blurStrength),this.set3fv("color",t.glcolor)},onDraw:function(t){var e=this.getController(),i=this.fullFrame1,s=this.fullFrame2;this.copyFrame(t,s);for(var r=2/t.width*e.offsetX,n=2/t.height*e.offsetY,a=0;a<e.steps;a++)this.set2f("offset",r,0),this.copySprite(t,i),this.set2f("offset",0,n),this.copySprite(i,t);this.blendFrames(s,t,i,e.strength),this.copyToGame(i)}});t.exports=a},63377:(t,e,i)=>{var s=i(56694),r=i(35491),n=i(75568),a=i(44481),o=i(80486),h=new s({Extends:o,initialize:function(t){o.call(this,{game:t,shaders:[{name:"Gaussian5",fragShader:r},{name:"Gaussian9",fragShader:n},{name:"Gaussian13",fragShader:a}]}),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(t){var e=this.getController(),i=this.gl,s=this.fullFrame1,r=i.getParameter(i.FRAMEBUFFER_BINDING);this.bind(this.shaders[e.quality]),i.activeTexture(i.TEXTURE0),i.viewport(0,0,t.width,t.height),this.set1i("uMainSampler",0),this.set2f("resolution",t.width,t.height),this.set1f("strength",e.strength),this.set3fv("color",e.glcolor);for(var n=0;n<e.steps;n++)this.set2f("offset",e.x,0),this.copySprite(t,s),this.set2f("offset",0,e.y),this.copySprite(s,t);i.bindFramebuffer(i.FRAMEBUFFER,r),i.bindTexture(i.TEXTURE_2D,null),this.copyToGame(t)}});t.exports=h},49745:(t,e,i)=>{var s=i(56694),r=i(69960),n=i(80486),a=new s({Extends:n,initialize:function(t){n.call(this,{game:t,fragShader:r}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(t,e,i,s){t=this.getController(t),this.set1f("radius",t.radius,e),this.set1f("amount",t.amount,e),this.set1f("contrast",t.contrast,e),this.set1f("strength",t.strength,e),this.set2f("blur",t.blurX,t.blurY,e),this.setBoolean("isTiltShift",t.isTiltShift,e),i&&s&&this.set2f("resolution",i,s,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=a},4323:(t,e,i)=>{var s=i(56694),r=i(33754),n=i(80486),a=new s({Extends:n,initialize:function(t){n.call(this,{game:t,fragShader:r}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(t,e,i,s){t=this.getController(t),this.set1f("scale",t.scale,e),this.set1f("feather",t.feather,e),this.set1f("thickness",t.thickness,e),this.set3fv("color",t.glcolor,e),this.set4fv("backgroundColor",t.glcolor2,e),i&&s&&this.set2f("resolution",i,s,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=a},92066:(t,e,i)=>{var s=i(56694),r=i(80486),n=new s({Extends:r,initialize:function(t){r.call(this,{game:t})},onDraw:function(t){var e=this.fullFrame1;this.controller?this.manager.drawFrame(t,e,!0,this.controller):this.drawFrame(t,e),this.copyToGame(e)}});t.exports=n},89581:(t,e,i)=>{var s=i(56694),r=i(35668),n=i(80486),a=new s({Extends:n,initialize:function(t){n.call(this,{game:t,fragShader:r}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(t){var e=this.game.textures.getFrame(t);e&&(this.glTexture=e.glTexture)},onDraw:function(t){var e=this.getController(),i=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(t,i),this.copyToGame(i)}});t.exports=a},55084:(t,e,i)=>{var s=i(56694),r=i(72632),n=i(69675),a=i(80486),o=i(75512),h=new s({Extends:a,initialize:function(t,e){var i=r(e,"quality",.1),s=r(e,"distance",10);a.call(this,{game:t,fragShader:o.setGlowQuality(n,t,i,s)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(t,e,i,s){t=this.getController(t),this.set1f("outerStrength",t.outerStrength,e),this.set1f("innerStrength",t.innerStrength,e),this.set4fv("glowColor",t.glcolor,e),this.setBoolean("knockout",t.knockout,e),i&&s&&this.set2f("resolution",i,s,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=h},41653:(t,e,i)=>{var s=i(56694),r=i(90993),n=i(80486),a=new s({Extends:n,initialize:function(t){n.call(this,{game:t,fragShader:r}),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(t,e){t=this.getController(t),this.set1f("alpha",t.alpha,e),this.set1i("size",t.size,e),this.set3fv("color1",t.glcolor1,e),this.set3fv("color2",t.glcolor2,e),this.set2f("positionFrom",t.fromX,t.fromY,e),this.set2f("positionTo",t.toX,t.toY,e)}});t.exports=a},73416:(t,e,i)=>{var s=i(56694),r=i(37945),n=i(80486),a=new s({Extends:n,initialize:function(t){n.call(this,{game:t,fragShader:r}),this.amount=1},onPreRender:function(t,e,i,s){t=this.getController(t),this.set1f("amount",t.amount,e),i&&s&&this.set2f("resolution",i,s,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=a},58049:(t,e,i)=>{var s=i(56694),r=i(85718),n=i(80486),a=new s({Extends:n,initialize:function(t){n.call(this,{game:t,fragShader:r}),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(t,e){var i=(t=this.getController(t)).samples;this.set1i("samples",i,e),this.set1f("intensity",t.intensity,e),this.set1f("decay",t.decay,e),this.set1f("power",t.power/i,e),this.set2f("lightPosition",t.x,t.y,e),this.set4fv("color",t.glcolor,e)}});t.exports=a},18026:(t,e,i)=>{var s=i(56694),r=i(13740),n=i(80486),a=new s({Extends:n,initialize:function(t){n.call(this,{game:t,fragShader:r}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(t,e,i,s){t=this.getController(t),this.setTime("time",e),this.set1f("speed",t.speed,e),this.set1f("lineWidth",t.lineWidth,e),this.set1f("gradient",t.gradient,e),this.setBoolean("reveal",t.reveal,e),i&&s&&this.set2f("resolution",i,s,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=a},72381:(t,e,i)=>{var s=i(56694),r=i(80617),n=i(80486),a=new s({Extends:n,initialize:function(t){n.call(this,{game:t,fragShader:r}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(t,e){t=this.getController(t),this.set1f("radius",t.radius,e),this.set1f("strength",t.strength,e),this.set2f("position",t.x,t.y,e)}});t.exports=a},80542:(t,e,i)=>{var s=i(56694),r=i(62879),n=i(80486),a=new s({Extends:n,initialize:function(t){n.call(this,{game:t,fragShader:r}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(t,e){var i=(t=this.getController(t)).progress,s=t.wipeWidth,r=t.direction,n=t.axis;this.set4f("config",i,s,r,n,e),this.setBoolean("reveal",t.reveal,e)}});t.exports=a},58136:(t,e,i)=>{var s={Barrel:i(32469),Bloom:i(2134),Blur:i(63377),Bokeh:i(49745),Circle:i(4323),ColorMatrix:i(92066),Displacement:i(89581),Glow:i(55084),Gradient:i(41653),Pixelate:i(73416),Shadow:i(58049),Shine:i(18026),Vignette:i(72381),Wipe:i(80542)};t.exports=s},62253:(t,e,i)=>{var s=i(65641),r=i(98611),n={FX:i(58136),BitmapMaskPipeline:i(5583),Events:i(18970),FXPipeline:i(81828),LightPipeline:i(66901),MobilePipeline:i(71264),MultiPipeline:i(77310),PointLightPipeline:i(10919),PostFXPipeline:i(80486),PreFXPipeline:i(87228),RopePipeline:i(21213),SinglePipeline:i(51212),UtilityPipeline:i(60848)};n=r(!1,n,s),t.exports=n},2529:t=>{t.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("\n")},91679:t=>{t.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("\n")},89053:t=>{t.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("\n")},37486:t=>{t.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("\n")},79060:t=>{t.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("\n")},87751:t=>{t.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("\n")},88222:t=>{t.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("\n")},44481:t=>{t.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("\n")},35491:t=>{t.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("\n")},75568:t=>{t.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("\n")},69960:t=>{t.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("\n")},33754:t=>{t.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("\n")},35668:t=>{t.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("\n")},69675:t=>{t.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("\n")},90993:t=>{t.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("\n")},37945:t=>{t.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("\n")},85718:t=>{t.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("\n")},13740:t=>{t.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 ()","{","\tvec2 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("\n")},80617:t=>{t.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);"," \tcol = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join("\n")},62879:t=>{t.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("\n")},65045:t=>{t.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("\n")},98921:t=>{t.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("\n")},25005:t=>{t.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("\n")},94914:t=>{t.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("\n")},11263:t=>{t.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("\n")},51852:t=>{t.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("\n")},53787:t=>{t.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("\n")},15968:t=>{t.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("\n")},83327:t=>{t.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("\n")},54677:t=>{t.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("\n")},12569:t=>{t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join("\n")},99365:t=>{t.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("\n")},85060:t=>{t.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("\n")},18166:t=>{t.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("\n")},92462:(t,e,i)=>{t.exports={AddBlendFrag:i(2529),BitmapMaskFrag:i(91679),BitmapMaskVert:i(89053),ColorMatrixFrag:i(37486),CopyFrag:i(79060),FXBarrelFrag:i(87751),FXBloomFrag:i(88222),FXBlurHighFrag:i(44481),FXBlurLowFrag:i(35491),FXBlurMedFrag:i(75568),FXBokehFrag:i(69960),FXCircleFrag:i(33754),FXDisplacementFrag:i(35668),FXGlowFrag:i(69675),FXGradientFrag:i(90993),FXPixelateFrag:i(37945),FXShadowFrag:i(85718),FXShineFrag:i(13740),FXVignetteFrag:i(80617),FXWipeFrag:i(62879),LightFrag:i(65045),LinearBlendFrag:i(98921),MeshFrag:i(25005),MeshVert:i(94914),MobileFrag:i(11263),MobileVert:i(51852),MultiFrag:i(53787),MultiVert:i(15968),PointLightFrag:i(83327),PointLightVert:i(54677),PostFXFrag:i(12569),QuadVert:i(99365),SingleFrag:i(85060),SingleVert:i(18166)}},7018:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i){this.webGLAttribLocation=-1,this.gl=t,this.program=e,this.name=i,this.createResource()},createResource:function(){if(null!==this.program.webGLProgram){var t=this.gl;t.isContextLost()||(this.webGLAttribLocation=t.getAttribLocation(this.program.webGLProgram,this.name))}else this.webGLAttribLocation=-1},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});t.exports=s},2367:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){this.webGLBuffer=null,this.gl=t,this.initialDataOrSize=e,this.bufferType=i,this.bufferUsage=s,this.createResource()},createResource:function(){if(null!==this.initialDataOrSize){var t=this.gl;if(!t.isContextLost()){var e=this.bufferType,i=t.createBuffer();this.webGLBuffer=i,t.bindBuffer(e,this.webGLBuffer),t.bufferData(e,this.initialDataOrSize,this.bufferUsage),t.bindBuffer(e,null)}}},destroy:function(){var t=this.gl;t.isContextLost()||t.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});t.exports=s},14854:(t,e,i)=>{var s=i(56694),r={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},n=new s({initialize:function(t,e,i,s,r){this.webGLFramebuffer=null,this.gl=t,this.width=e,this.height=i,this.renderTexture=s,this.addDepthStencilBuffer=!!r,this.createResource()},createResource:function(){var t=this.gl;if(!t.isContextLost()){var e,i=this.renderTexture,s=t.createFramebuffer();if(this.webGLFramebuffer=s,t.bindFramebuffer(t.FRAMEBUFFER,s),i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i.webGLTexture,0),(e=t.checkFramebufferStatus(t.FRAMEBUFFER))!==t.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(r[e]||e));if(this.addDepthStencilBuffer){var n=t.createRenderbuffer();t.bindRenderbuffer(t.RENDERBUFFER,n),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,n)}t.bindFramebuffer(t.FRAMEBUFFER,null)}},destroy:function(){if(null!==this.webGLFramebuffer){var t=this.gl;if(!t.isContextLost()){t.bindFramebuffer(t.FRAMEBUFFER,this.webGLFramebuffer);var e=t.getFramebufferAttachmentParameter(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);null!==e&&(t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,null,0),t.deleteTexture(e));var i=t.getFramebufferAttachmentParameter(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);null!==i&&t.deleteRenderbuffer(i),t.bindFramebuffer(t.FRAMEBUFFER,null),t.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});t.exports=n},92503:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i){this.webGLProgram=null,this.gl=t,this.vertexSource=e,this.fragmentSource=i,this.createResource()},createResource:function(){var t=this.gl;if(!t.isContextLost()){var e=t.createProgram(),i=t.createShader(t.VERTEX_SHADER),s=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(i,this.vertexSource),t.shaderSource(s,this.fragmentSource),t.compileShader(i),t.compileShader(s);var r="Shader failed:\n";if(!t.getShaderParameter(i,t.COMPILE_STATUS))throw new Error("Vertex "+r+t.getShaderInfoLog(i));if(!t.getShaderParameter(s,t.COMPILE_STATUS))throw new Error("Fragment "+r+t.getShaderInfoLog(s));if(t.attachShader(e,i),t.attachShader(e,s),t.linkProgram(e),!t.getProgramParameter(e,t.LINK_STATUS))throw new Error("Link "+r+t.getProgramInfoLog(e));t.useProgram(e),this.webGLProgram=e}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});t.exports=s},33374:(t,e,i)=>{var s=i(56694),r=i(28621),n=new s({initialize:function(t,e,i,s,r,n,a,o,h,l,u,c,d){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=t,this.mipLevel=e,this.minFilter=i,this.magFilter=s,this.wrapT=r,this.wrapS=n,this.format=a,this.pixels=o,this.width=h,this.height=l,this.pma=null==u||u,this.forceSize=!!c,this.flipY=!!d,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var t=this.gl;if(!t.isContextLost())if(this.pixels instanceof n)this.webGLTexture=this.pixels.webGLTexture;else{var e=t.createTexture();t.activeTexture(t.TEXTURE0);var i=t.getParameter(t.TEXTURE_BINDING_2D);t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,this.minFilter),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,this.magFilter),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,this.wrapS),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,this.wrapT),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),this.flipY&&t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0);var s=this.pixels,a=this.mipLevel,o=this.width,h=this.height,l=this.format,u=!1;if(null==s)t.texImage2D(t.TEXTURE_2D,a,l,o,h,0,l,t.UNSIGNED_BYTE,null),u=r(o,h);else if(s.compressed){o=s.width,h=s.height,u=s.generateMipmap;for(var c=0;c<s.mipmaps.length;c++)t.compressedTexImage2D(t.TEXTURE_2D,c,s.internalFormat,s.mipmaps[c].width,s.mipmaps[c].height,0,s.mipmaps[c].data)}else s instanceof Uint8Array?t.texImage2D(t.TEXTURE_2D,a,l,o,h,0,l,t.UNSIGNED_BYTE,s):(this.forceSize||(o=s.width,h=s.height),t.texImage2D(t.TEXTURE_2D,a,l,l,t.UNSIGNED_BYTE,s),u=r(o,h));u&&t.generateMipmap(t.TEXTURE_2D),e.__SPECTOR_Metadata=this.__SPECTOR_Metadata,i&&t.bindTexture(t.TEXTURE_2D,i),this.webGLTexture=e}},update:function(t,e,i,s){if(0!==e&&0!==i){this.pixels=t,this.width=e,this.height=i,this.flipY=s;var r=this.gl;if(!r.isContextLost()){r.activeTexture(r.TEXTURE0);var n=r.getParameter(r.TEXTURE_BINDING_2D);r.bindTexture(r.TEXTURE_2D,this.webGLTexture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,s),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),n&&r.bindTexture(r.TEXTURE_2D,n)}}},spectorMetadata:{get:function(){return this.__SPECTOR_Metadata},set:function(t){this.__SPECTOR_Metadata=t,this.gl.isContextLost()||(this.webGLTexture.__SPECTOR_Metadata=t)}},destroy:function(){null!==this.webGLTexture&&(this.gl.isContextLost()||this.pixels instanceof n||this.gl.deleteTexture(this.webGLTexture),this.pixels=null,this.webGLTexture=null,this.gl=null)}});t.exports=n},62347:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i){this.webGLUniformLocation=null,this.gl=t,this.program=e,this.name=i,this.createResource()},createResource:function(){if(null!==this.program.webGLProgram){var t=this.gl;t.isContextLost()||(this.webGLUniformLocation=t.getUniformLocation(this.program.webGLProgram,this.name))}else this.webGLUniformLocation=null},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});t.exports=s},38586:(t,e,i)=>{var s={WebGLAttribLocationWrapper:i(7018),WebGLBufferWrapper:i(2367),WebGLProgramWrapper:i(92503),WebGLTextureWrapper:i(33374),WebGLFramebufferWrapper:i(14854),WebGLUniformLocationWrapper:i(62347)};t.exports=s},756:(t,e,i)=>{var s=i(55301),r=i(56694),n=i(6659),a=i(40444),o=i(97081),h=i(74181),l=i(2893),u=i(9229),c=i(72283),d=i(74118),f=i(90881),p=i(84314),g=i(93736),v=i(47751),m=new r({Extends:n,initialize:function(t){n.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=s.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new g(1,1),this.autoRound=!1,this.autoCenter=s.CENTER.NO_CENTER,this.orientation=s.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:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(o.BOOT,this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==s.SCALE_MODE.RESIZE&&this.scaleMode!==s.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===s.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()),t.events.on(o.PRE_STEP,this.step,this),t.events.once(o.READY,this.refresh,this),t.events.once(o.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,r=t.scaleMode,n=t.zoom,a=t.autoRound;if("string"==typeof e)if("%"!==e.substr(-1))e=parseInt(e,10);else{var o=this.parentSize.width;0===o&&(o=window.innerWidth);var h=parseInt(e,10)/100;e=Math.floor(o*h)}if("string"==typeof i)if("%"!==i.substr(-1))i=parseInt(i,10);else{var l=this.parentSize.height;0===l&&(l=window.innerHeight);var c=parseInt(i,10)/100;i=Math.floor(l*c)}this.scaleMode=r,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),n===s.ZOOM.MAX_ZOOM&&(n=this.getMaxZoom()),this.zoom=n,1!==n&&(this._resetZoom=!0),this.baseSize.setSize(e,i),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*n,t.minHeight*n),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*n,t.maxHeight*n),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==s.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=e.width,s=e.height;if(t.width!==i||t.height!==s)return t.setSize(i,s),!0;if(this.canvas){var r=this.canvasBounds,n=this.canvas.getBoundingClientRect();if(n.x!==r.x||n.y!==r.y)return!0}return!1},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t,e),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,r)},resize:function(t,e){var i=this.zoom,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var r=this.width,n=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t,e),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i,e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var a=this.canvas.style,o=t*i,h=e*i;return s&&(o=Math.floor(o),h=Math.floor(h)),o===t&&h===e||(a.width=o+"px",a.height=h+"px"),this.refresh(r,n)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var s=this.canvas.style,r=i.style;r.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",r.marginLeft=s.marginLeft,r.marginTop=s.marginTop}return this.emit(a.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(a.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,r=this.gameSize.width,n=this.gameSize.height,a=this.zoom,o=this.autoRound;if(this.scaleMode===s.SCALE_MODE.NONE)this.displaySize.setSize(r*a,n*a),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1);else if(this.scaleMode===s.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,o&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e;else if(this.scaleMode===s.SCALE_MODE.EXPAND){this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px";var h=this.parentSize.width/this.gameSize.width,l=this.parentSize.height/this.gameSize.height;h<l?this.baseSize.setSize(this.gameSize.width,this.parentSize.height/h):this.baseSize.setSize(this.displaySize.width/l,this.gameSize.height),t=this.baseSize.width,e=this.baseSize.height,o&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e}else this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px";this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==s.CENTER.NO_CENTER){var e=this.canvas,i=e.style,r=e.getBoundingClientRect(),n=r.width,a=r.height,o=Math.floor((this.parentSize.width-n)/2),h=Math.floor((this.parentSize.height-a)/2);t===s.CENTER.CENTER_HORIZONTALLY?h=0:t===s.CENTER.CENTER_VERTICALLY&&(o=0),i.marginLeft=o+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t)}}else this.emit(a.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(a.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(a.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(a.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(a.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.domlisteners;if(e.orientationChange=function(){t.updateBounds(),t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.updateBounds(),t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach((function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(t,e){t instanceof v||(e=t,t=void 0),void 0===e&&(e=new d);var i,s,r=this.baseSize,n=this.parentSize,a=this.canvasBounds,o=this.displayScale,h=a.x>=0?0:-a.x*o.x,l=a.y>=0?0:-a.y*o.y;return i=n.width>=a.width?r.width:r.width-(a.width-n.width)*o.x,s=n.height>=a.height?r.height:r.height-(a.height-n.height)*o.y,e.setTo(h,l,i,s),t&&(e.width/=t.zoomX,e.height/=t.zoomY,e.centerX=t.centerX+t.scrollX,e.centerY=t.centerY+t.scrollY),e},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.domlisteners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach((function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.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===s.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===s.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=m},35098:t=>{t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},53539:t=>{t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},12637:t=>{t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},10217:t=>{t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},55301:(t,e,i)=>{var s={CENTER:i(35098),ORIENTATION:i(53539),SCALE_MODE:i(12637),ZOOM:i(10217)};t.exports=s},82085:t=>{t.exports="enterfullscreen"},11826:t=>{t.exports="fullscreenfailed"},56691:t=>{t.exports="fullscreenunsupported"},34739:t=>{t.exports="leavefullscreen"},26681:t=>{t.exports="orientationchange"},11428:t=>{t.exports="resize"},40444:(t,e,i)=>{t.exports={ENTER_FULLSCREEN:i(82085),FULLSCREEN_FAILED:i(11826),FULLSCREEN_UNSUPPORTED:i(56691),LEAVE_FULLSCREEN:i(34739),ORIENTATION_CHANGE:i(26681),RESIZE:i(11428)}},86754:(t,e,i)=>{var s=i(98611),r=i(55301),n={Center:i(35098),Events:i(40444),Orientation:i(53539),ScaleManager:i(756),ScaleModes:i(12637),Zoom:i(10217)};n=s(!1,n,r.CENTER),n=s(!1,n,r.ORIENTATION),n=s(!1,n,r.SCALE_MODE),n=s(!1,n,r.ZOOM),t.exports=n},47736:(t,e,i)=>{var s=i(72632),r=i(40587);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=s(t.settings,"physics",!1);if(e||i){var n=[];if(e&&n.push(r(e+"Physics")),i)for(var a in i)a=r(a.concat("Physics")),-1===n.indexOf(a)&&n.push(a);return n}}},91088:(t,e,i)=>{var s=i(72632);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=s(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},90415:t=>{t.exports={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"}},87157:(t,e,i)=>{var s=i(56694),r=i(63946),n=new s({initialize:function(t){this.sys=new r(this,t),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(){}});t.exports=n},13553:(t,e,i)=>{var s=i(56694),r=i(92980),n=i(7599),a=i(97081),o=i(10850),h=i(683),l=i(72283),u=i(87157),c=i(63946),d=new s({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)this._pending.push({key:"default",scene:e[i],autoStart:0===i,data:{}})}t.events.once(a.READY,this.bootQueue,this)},bootQueue:function(){if(!this.isBooted){var t,e,i,s;for(this.systemScene=this.createSceneFromInstance("__SYSTEM",new u),this.game.events.emit(a.SYSTEM_READY,this.systemScene,this),t=0;t<this._pending.length;t++){var r;i=(e=this._pending[t]).key,(s=e.scene)instanceof u?r=this.createSceneFromInstance(i,s):"object"==typeof s?r=this.createSceneFromObject(i,s):"function"==typeof s&&(r=this.createSceneFromFunction(i,s)),i=r.sys.settings.key,this.keys[i]=r,this.scenes.push(r),this._data[i]&&(r.sys.settings.data=this._data[i].data,this._data[i].autoStart&&(e.autoStart=!0)),(e.autoStart||r.sys.settings.active)&&this._start.push(i)}for(this._pending.length=0,this._data={},this.isBooted=!0,t=0;t<this._start.length;t++)e=this._start[t],this.start(e);this._start.length=0}},processQueue:function(){var t=this._pending.length,e=this._queue.length;if(0!==t||0!==e){var i,s;if(t){for(i=0;i<t;i++)s=this._pending[i],this.add(s.key,s.scene,s.autoStart,s.data);for(i=0;i<this._start.length;i++)s=this._start[i],this.start(s);this._start.length=0,this._pending.length=0}for(i=0;i<this._queue.length;i++)this[(s=this._queue[i]).op](s.keyA,s.keyB);this._queue.length=0}},add:function(t,e,i,s){return void 0===i&&(i=!1),void 0===s&&(s={}),this.isProcessing||!this.isBooted?(this._pending.push({key:t,scene:e,autoStart:i,data:s}),this.isBooted||(this._data[t]={data:s}),null):(t=this.getKey(t,e),e instanceof u?r=this.createSceneFromInstance(t,e):"object"==typeof e?(e.key=t,r=this.createSceneFromObject(t,e)):"function"==typeof e&&(r=this.createSceneFromFunction(t,e)),r.sys.settings.data=s,t=r.sys.settings.key,this.keys[t]=r,this.scenes.push(r),(i||r.sys.settings.active)&&(this._pending.length?this._start.push(t):this.start(t)),r);var r},remove:function(t){if(this.isProcessing)this._queue.push({op:"remove",keyA:t,keyB:null});else{var e=this.getScene(t);if(!e||e.sys.isTransitioning())return this;var i=this.scenes.indexOf(e),s=e.sys.settings.key;i>-1&&(delete this.keys[s],this.scenes.splice(i,1),this._start.indexOf(s)>-1&&(i=this._start.indexOf(s),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,s=i.settings;i.sceneUpdate=l,t.init&&(t.init.call(t,s.data),s.status=r.INIT,s.isTransition&&i.events.emit(n.TRANSITION_INIT,s.transitionFrom,s.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),s.status=r.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start()):this.create(t)},loadComplete:function(t){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(t.scene)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var s=this.scenes[i].sys;s.settings.status>r.START&&s.settings.status<=r.RUNNING&&s.step(t,e),s.scenePlugin&&s.scenePlugin._target&&s.scenePlugin.step(t,e)}},render:function(t){for(var e=0;e<this.scenes.length;e++){var i=this.scenes[e].sys;i.settings.visible&&i.settings.status>=r.LOADING&&i.settings.status<r.SLEEPING&&i.render(t)}this.isProcessing=!1},create:function(t){var e=t.sys,i=e.settings;t.create&&(i.status=r.CREATING,t.create.call(t,i.data),i.status===r.DESTROYED)||(i.isTransition&&e.events.emit(n.TRANSITION_START,i.transitionFrom,i.transitionDuration),t.update&&(e.sceneUpdate=t.update),i.status=r.RUNNING,e.events.emit(n.CREATE,t))},createSceneFromFunction:function(t,e){var i=new e;if(i instanceof u){var s=i.sys.settings.key;if(""!==s&&(t=s),this.keys.hasOwnProperty(t))throw new Error("Cannot add a Scene with duplicate key: "+t);return this.createSceneFromInstance(t,i)}return i.sys=new c(i),i.sys.settings.key=t,i.sys.init(this.game),i},createSceneFromInstance:function(t,e){return""===e.sys.settings.key&&(e.sys.settings.key=t),e.sys.init(this.game),e},createSceneFromObject:function(t,e){var i=new u(e),s=i.sys.settings.key;""!==s?t=s:i.sys.settings.key=t,i.sys.init(this.game);for(var r=["init","preload","create","update","render"],n=0;n<r.length;n++){var a=o(e,r[n],null);a&&(i[r[n]]=a)}if(e.hasOwnProperty("extend"))for(var h in e.extend)if(e.extend.hasOwnProperty(h)){var l=e.extend[h];"data"===h&&i.hasOwnProperty("data")&&"object"==typeof l?i.data.merge(l):"sys"!==h&&(i[h]=l)}return i},getKey:function(t,e){if(t||(t="default"),"function"==typeof e)return t;if(e instanceof u?t=e.sys.settings.key:"object"==typeof e&&e.hasOwnProperty("key")&&(t=e.key),this.keys.hasOwnProperty(t))throw new Error("Cannot add a Scene with duplicate key: "+t);return t},getScenes:function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);for(var i=[],s=this.scenes,r=0;r<s.length;r++){var n=s[r];n&&(!t||t&&n.sys.isActive())&&i.push(n)}return e?i.reverse():i},getScene:function(t){if("string"==typeof t){if(this.keys[t])return this.keys[t]}else for(var e=0;e<this.scenes.length;e++)if(t===this.scenes[e])return t;return null},isActive:function(t){var e=this.getScene(t);return e?e.sys.isActive():null},isPaused:function(t){var e=this.getScene(t);return e?e.sys.isPaused():null},isVisible:function(t){var e=this.getScene(t);return e?e.sys.isVisible():null},isSleeping:function(t){var e=this.getScene(t);return e?e.sys.isSleeping():null},pause:function(t,e){var i=this.getScene(t);return i&&i.sys.pause(e),this},resume:function(t,e){var i=this.getScene(t);return i&&i.sys.resume(e),this},sleep:function(t,e){var i=this.getScene(t);return i&&!i.sys.isTransitioning()&&i.sys.sleep(e),this},wake:function(t,e){var i=this.getScene(t);return i&&i.sys.wake(e),this},run:function(t,e){var i=this.getScene(t);if(!i){for(var s=0;s<this._pending.length;s++)if(this._pending[s].key===t){this.queueOp("start",t,e);break}return this}i.sys.isSleeping()?i.sys.wake(e):i.sys.isPaused()?i.sys.resume(e):this.start(t,e)},start:function(t,e){if(!this.isBooted)return this._data[t]={autoStart:!0,data:e},this;var i=this.getScene(t);if(!i)return console.warn("Scene not found for key: "+t),this;var s,n=i.sys,a=n.settings.status;if(a>=r.START&&a<=r.CREATING)return this;if(a>=r.RUNNING&&a<=r.SLEEPING)n.shutdown(),n.sceneUpdate=l,n.start(e);else if(n.sceneUpdate=l,n.start(e),n.load&&(s=n.load),s&&n.settings.hasOwnProperty("pack")&&(s.reset(),s.addPack({payload:n.settings.pack})))return n.settings.status=r.LOADING,s.once(h.COMPLETE,this.payloadComplete,this),s.start(),this;return this.bootScene(i),this},stop:function(t,e){var i=this.getScene(t);if(i&&!i.sys.isTransitioning()&&i.sys.settings.status!==r.SHUTDOWN){var s=i.sys.load;s&&(s.off(h.COMPLETE,this.loadComplete,this),s.off(h.COMPLETE,this.payloadComplete,this)),i.sys.shutdown(e)}return this},switch:function(t,e){var i=this.getScene(t),s=this.getScene(e);return i&&s&&i!==s&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){var e=this.getScene(t);return this.scenes.indexOf(e)},bringToTop:function(t){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e<this.scenes.length){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.push(i)}}return this},sendToBack:function(t){if(this.isProcessing)this._queue.push({op:"sendToBack",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e>0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,s=this.getScene(t),r=this.getAt(i);this.scenes[e]=r,this.scenes[i]=s}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e<this.scenes.length-1){var i=e+1,s=this.getScene(t),r=this.getAt(i);this.scenes[e]=r,this.scenes[i]=s}}return this},moveAbove:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveAbove",keyA:t,keyB:e});else{var i=this.getIndex(t),s=this.getIndex(e);if(-1!==i&&-1!==s&&s<i){var r=this.getAt(s);this.scenes.splice(s,1),this.scenes.splice(i+(s>i),0,r)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),s=this.getIndex(e);if(-1!==i&&-1!==s&&s>i){var r=this.getAt(s);this.scenes.splice(s,1),0===i?this.scenes.unshift(r):this.scenes.splice(i-(s<i),0,r)}}return this},queueOp:function(t,e,i){return this._queue.push({op:t,keyA:e,keyB:i}),this},swapPosition:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"swapPosition",keyA:t,keyB:e});else{var i=this.getIndex(t),s=this.getIndex(e);if(i!==s&&-1!==i&&-1!==s){var r=this.getAt(i);this.scenes[i]=this.scenes[s],this.scenes[s]=r}}return this},dump:function(){for(var t=[],e=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],i=0;i<this.scenes.length;i++){var s=this.scenes[i].sys,n=!s.settings.visible||s.settings.status!==r.RUNNING&&s.settings.status!==r.PAUSED?"[-] ":"[*] ";n+=s.settings.key+" ("+e[s.settings.status]+")",t.push(n)}console.log(t.join("\n"))},destroy:function(){for(var t=0;t<this.scenes.length;t++){this.scenes[t].sys.destroy()}this.systemScene.sys.destroy(),this.update=l,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null,this.systemScene=null}});t.exports=d},64051:(t,e,i)=>{var s=i(82897),r=i(56694),n=i(7599),a=i(72632),o=i(91963),h=new r({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.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,t.sys.events.once(n.BOOT,this.boot,this),t.sys.events.on(n.START,this.pluginStart,this)},boot:function(){this.systems.events.once(n.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(n.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=a(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var s=a(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=s,this._willSleep=a(t,"sleep",!1),this._willRemove=a(t,"remove",!1);var r=a(t,"onUpdate",null);r&&(this._onUpdate=r,this._onUpdateScope=a(t,"onUpdateScope",this.scene));var o=a(t,"allowInput",!1);this.settings.transitionAllowInput=o;var h=i.sys.settings;h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=s,h.transitionAllowInput=o,a(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):a(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(a(t,"data")):this.manager.start(e,a(t,"data"));var l=a(t,"onStart",null),u=a(t,"onStartScope",this.scene);return l&&l.call(u,this.scene,i,s),this.systems.events.emit(n.TRANSITION_OUT,i,s),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=s(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;t.events.emit(n.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.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(t,e,i,s){return this.manager.add(t,e,i,s)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var s=this.manager.getScene(e);return s&&s.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getStatus:function(t){var e=this.manager.getScene(t);if(e)return e.sys.getStatus()},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(n.SHUTDOWN,this.shutdown,this),t.off(n.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});o.register("ScenePlugin",h,"scenePlugin"),t.exports=h},36765:(t,e,i)=>{var s=i(92980),r=i(10850),n=i(30657),a=i(90415),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:s.PENDING,key:r(t,"key",""),active:r(t,"active",!1),visible:r(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:r(t,"pack",!1),cameras:r(t,"cameras",null),map:r(t,"map",n(a,r(t,"mapAdd",{}))),physics:r(t,"physics",{}),loader:r(t,"loader",{}),plugins:r(t,"plugins",!1),input:r(t,"input",{})}}};t.exports=o},63946:(t,e,i)=>{var s=i(56694),r=i(92980),n=i(18360),a=i(7599),o=i(47736),h=i(91088),l=i(72283),u=i(36765),c=new s({initialize:function(t,e){this.scene=t,this.game,this.renderer,this.config=e,this.settings=u.create(e),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=l},init:function(t){this.settings.status=r.INIT,this.sceneUpdate=l,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,n.Global,[n.CoreScene,h(this),o(this)]),this.events.emit(a.BOOT,this),this.settings.isBooted=!0},step:function(t,e){var i=this.events;i.emit(a.PRE_UPDATE,t,e),i.emit(a.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),i.emit(a.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.events.emit(a.PRE_RENDER,t),this.cameras.render(t,e),this.events.emit(a.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){var e=this.settings,i=this.getStatus();return i!==r.CREATING&&i!==r.RUNNING?console.warn("Cannot pause non-running Scene",e.key):this.settings.active&&(e.status=r.PAUSED,e.active=!1,this.events.emit(a.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=r.RUNNING,i.active=!0,e.emit(a.RESUME,this,t)),this},sleep:function(t){var e=this.settings,i=this.getStatus();return i!==r.CREATING&&i!==r.RUNNING?console.warn("Cannot sleep non-running Scene",e.key):(e.status=r.SLEEPING,e.active=!1,e.visible=!1,this.events.emit(a.SLEEP,this,t)),this},wake:function(t){var e=this.events,i=this.settings;return i.status=r.RUNNING,i.active=!0,i.visible=!0,e.emit(a.WAKE,this,t),i.isTransition&&e.emit(a.TRANSITION_WAKE,i.transitionFrom,i.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var t=this.settings.status;return t>r.PENDING&&t<=r.RUNNING},isSleeping:function(){return this.settings.status===r.SLEEPING},isActive:function(){return this.settings.status===r.RUNNING},isPaused:function(){return this.settings.status===r.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){var e=this.events,i=this.settings;t&&(i.data=t),i.status=r.START,i.active=!0,i.visible=!0,e.emit(a.START,this),e.emit(a.READY,this,t)},shutdown:function(t){var e=this.events,i=this.settings;e.off(a.TRANSITION_INIT),e.off(a.TRANSITION_START),e.off(a.TRANSITION_COMPLETE),e.off(a.TRANSITION_OUT),i.status=r.SHUTDOWN,i.active=!1,i.visible=!1,e.emit(a.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=r.DESTROYED,e.active=!1,e.visible=!1,t.emit(a.DESTROY,this),t.removeAllListeners();for(var i=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],s=0;s<i.length;s++)this[i[s]]=null}});t.exports=c},92980:t=>{t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},31803:t=>{t.exports="addedtoscene"},94817:t=>{t.exports="boot"},28977:t=>{t.exports="create"},91959:t=>{t.exports="destroy"},363:t=>{t.exports="pause"},15643:t=>{t.exports="postupdate"},17058:t=>{t.exports="prerender"},77125:t=>{t.exports="preupdate"},76018:t=>{t.exports="ready"},28620:t=>{t.exports="removedfromscene"},41538:t=>{t.exports="render"},34268:t=>{t.exports="resume"},2342:t=>{t.exports="shutdown"},96541:t=>{t.exports="sleep"},74244:t=>{t.exports="start"},17046:t=>{t.exports="transitioncomplete"},13637:t=>{t.exports="transitioninit"},14733:t=>{t.exports="transitionout"},33899:t=>{t.exports="transitionstart"},52418:t=>{t.exports="transitionwake"},31735:t=>{t.exports="update"},8470:t=>{t.exports="wake"},7599:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(31803),BOOT:i(94817),CREATE:i(28977),DESTROY:i(91959),PAUSE:i(363),POST_UPDATE:i(15643),PRE_RENDER:i(17058),PRE_UPDATE:i(77125),READY:i(76018),REMOVED_FROM_SCENE:i(28620),RENDER:i(41538),RESUME:i(34268),SHUTDOWN:i(2342),SLEEP:i(96541),START:i(74244),TRANSITION_COMPLETE:i(17046),TRANSITION_INIT:i(13637),TRANSITION_OUT:i(14733),TRANSITION_START:i(33899),TRANSITION_WAKE:i(52418),UPDATE:i(31735),WAKE:i(8470)}},20436:(t,e,i)=>{var s=i(92980),r=i(98611),n={Events:i(7599),GetPhysicsPlugins:i(47736),GetScenePlugins:i(91088),SceneManager:i(13553),ScenePlugin:i(64051),Settings:i(36765),Systems:i(63946)};n=r(!1,n,s),t.exports=n},25798:(t,e,i)=>{var s=i(56694),r=i(6659),n=i(76038),a=i(98611),o=i(72283),h=new s({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,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=a(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=a(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=a(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=a(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(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:o,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.stop(),this.emit(n.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},12486:(t,e,i)=>{var s=i(56694),r=i(32742),n=i(6659),a=i(76038),o=i(97081),h=i(71608),l=i(51463),u=i(72283),c=i(93736),d=new s({Extends:n,initialize:function(t){n.call(this),this.game=t,this.jsonCache=t.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 c,t.events.on(o.BLUR,this.onGameBlur,this),t.events.on(o.FOCUS,this.onGameFocus,this),t.events.on(o.PRE_STEP,this.update,this),t.events.once(o.DESTROY,this.destroy,this)},add:u,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var s in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(s)){var n=r(e),a=i.spritemap[s];n.loop=!!a.hasOwnProperty("loop")&&a.loop,i.addMarker({name:s,start:a.start,duration:a.end-a.start,config:n})}return i},get:function(t){return l(this.sounds,"key",t)},getAll:function(t){return t?h(this.sounds,"key",t):h(this.sounds)},getAllPlaying:function(){return h(this.sounds,"isPlaying",!0)},play:function(t,e){var i=this.add(t);return i.once(a.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var s=this.addAudioSprite(t);return s.once(a.COMPLETE,s.destroy,s),s.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeAll:function(){this.sounds.forEach((function(t){t.destroy()})),this.sounds.length=0},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var s=this.sounds[i];s.key===t&&(s.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound((function(t){t.pause()})),this.emit(a.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(t){t.resume()})),this.emit(a.RESUME_ALL,this)},setListenerPosition:u,stopAll:function(){this.forEachActiveSound((function(t){t.stop()})),this.emit(a.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach((function(t){t.stop()&&e++})),e},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(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(a.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach((function(i){i.update(t,e)}))},destroy:function(){this.game.events.off(o.BLUR,this.onGameBlur,this),this.game.events.off(o.FOCUS,this.onGameFocus,this),this.game.events.off(o.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach((function(s,r){s&&!s.pendingRemove&&t.call(e||i,s,r,i.sounds)}))},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(a.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(a.GLOBAL_DETUNE,this,t)}}});t.exports=d},84191:(t,e,i)=>{var s=i(27622),r=i(17546),n=i(55491),a={create:function(t){var e=t.config.audio,i=t.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new r(t):i.webAudio&&!e.disableWebAudio?new n(t):new s(t)}};t.exports=a},77578:t=>{t.exports="complete"},19679:t=>{t.exports="decodedall"},56951:t=>{t.exports="decoded"},16436:t=>{t.exports="destroy"},55154:t=>{t.exports="detune"},57818:t=>{t.exports="detune"},57890:t=>{t.exports="mute"},83022:t=>{t.exports="rate"},99170:t=>{t.exports="volume"},64289:t=>{t.exports="looped"},67214:t=>{t.exports="loop"},53128:t=>{t.exports="mute"},73078:t=>{t.exports="pan"},76763:t=>{t.exports="pauseall"},88426:t=>{t.exports="pause"},13765:t=>{t.exports="play"},80291:t=>{t.exports="rate"},11124:t=>{t.exports="resumeall"},55382:t=>{t.exports="resume"},71157:t=>{t.exports="seek"},31776:t=>{t.exports="stopall"},39450:t=>{t.exports="stop"},21939:t=>{t.exports="unlocked"},33019:t=>{t.exports="volume"},76038:(t,e,i)=>{t.exports={COMPLETE:i(77578),DECODED:i(56951),DECODED_ALL:i(19679),DESTROY:i(16436),DETUNE:i(55154),GLOBAL_DETUNE:i(57818),GLOBAL_MUTE:i(57890),GLOBAL_RATE:i(83022),GLOBAL_VOLUME:i(99170),LOOP:i(67214),LOOPED:i(64289),MUTE:i(53128),PAN:i(73078),PAUSE_ALL:i(76763),PAUSE:i(88426),PLAY:i(13765),RATE:i(80291),RESUME_ALL:i(11124),RESUME:i(55382),SEEK:i(71157),STOP_ALL:i(31776),STOP:i(39450),UNLOCKED:i(21939),VOLUME:i(33019)}},34350:(t,e,i)=>{var s=i(25798),r=i(56694),n=i(76038),a=i(82897),o=new r({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('No cached audio asset with key "'+e);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,s.call(this,t,e,i)},play:function(t,e){return!this.manager.isLocked(this,"play",[t,e])&&(!!s.prototype.play.call(this,t,e)&&(!!this.pickAndPlayAudioTag()&&(this.emit(n.PLAY,this),!0)))},pause:function(){return!this.manager.isLocked(this,"pause")&&(!(this.startTime>0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(n.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(n.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(n.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t<this.tags.length;t++){var e=this.tags[t];if("false"===e.dataset.used)return e.dataset.used="true",this.audio=e,!0}if(!this.manager.override)return!1;var i=[];this.manager.forEachActiveSound((function(t){t.key===this.key&&t.audio&&i.push(t)}),this),i.sort((function(t,e){return t.loop===e.loop?e.seek/e.duration-t.seek/t.duration:t.loop?1:-1}));var s=i[0];return this.audio=s.audio,s.reset(),s.audio=null,s.startTime=0,s.previousTime=0,!0},playCatchPromise:function(){var t=this.audio.play();t&&t.catch((function(t){console.warn(t)}))},stopAndReleaseAudioTag:function(){this.startTime=0,this.previousTime=0,this.audio&&(this.audio.pause(),this.audio.dataset.used="false",this.audio=null)},reset:function(){s.prototype.stop.call(this)},onBlur:function(){this.isPlaying=!1,this.isPaused=!0,this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.currentConfig.delay=Math.max(0,(this.startTime-window.performance.now())/1e3),this.stopAndReleaseAudioTag()},onFocus:function(){this.isPlaying=!0,this.isPaused=!1,this.pickAndPlayAudioTag()},update:function(t){if(this.isPlaying)if(this.startTime>0)this.startTime<t-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,t-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());else{var e=this.currentMarker?this.currentMarker.start:0,i=e+this.duration,s=this.audio.currentTime;if(this.currentConfig.loop)s>=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,s-i),s=this.audio.currentTime):s<e&&(this.audio.currentTime+=e,s=this.audio.currentTime),s<this.previousTime&&this.emit(n.LOOPED,this);else if(s>=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(n.COMPLETE,this);this.previousTime=s}},destroy:function(){s.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=a(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){s.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(n.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(n.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,n.RATE,t)||(this.calculateRate(),this.emit(n.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,n.DETUNE,t)||(this.calculateRate(),this.emit(n.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(n.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(n.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(n.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=o},27622:(t,e,i)=>{var s=i(12486),r=i(56694),n=i(76038),a=i(34350),o=new r({Extends:s,initialize:function(t){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,s.call(this,t)},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each((function(e,i){for(var s=0;s<i.length;s++)if("true"===i[s].dataset.locked)return t.locked=!0,!1;return!0})),this.locked){var e=!1,i=function(){e=!0},s=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",s);var r=[];if(t.game.cache.audio.entries.each((function(t,e){for(var i=0;i<e.length;i++){var s=e[i];"true"===s.dataset.locked&&r.push(s)}return!0})),0!==r.length){var n=r[r.length-1];n.oncanplaythrough=function(){n.oncanplaythrough=null,r.forEach((function(t){t.dataset.locked="false"})),t.unlocked=!0},r.forEach((function(t){t.load()}))}}};this.once(n.UNLOCKED,(function(){for(this.forEachActiveSound((function(t){null===t.currentMarker&&0===t.duration&&(t.duration=t.tags[0].duration),t.totalDuration=t.tags[0].duration}));this.lockedActionsQueue.length;){var t=this.lockedActionsQueue.shift();t.sound[t.prop].apply?t.sound[t.prop].apply(t.sound,t.value||[]):t.sound[t.prop]=t.value}}),this),document.body.addEventListener("touchmove",i,!1),document.body.addEventListener("touchend",s,!1)}},onBlur:function(){this.forEachActiveSound((function(t){t.isPlaying&&(this.onBlurPausedSounds.push(t),t.onBlur())}))},onFocus:function(){this.onBlurPausedSounds.forEach((function(t){t.onFocus()})),this.onBlurPausedSounds.length=0},destroy:function(){s.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(t,e,i){return"true"===t.tags[0].dataset.locked&&(this.lockedActionsQueue.push({sound:t,prop:e,value:i}),!0)},setMute:function(t){return this.mute=t,this},mute:{get:function(){return this._mute},set:function(t){this._mute=t,this.forEachActiveSound((function(t){t.updateMute()})),this.emit(n.GLOBAL_MUTE,this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this._volume},set:function(t){this._volume=t,this.forEachActiveSound((function(t){t.updateVolume()})),this.emit(n.GLOBAL_VOLUME,this,t)}}});t.exports=o},56751:(t,e,i)=>{t.exports={SoundManagerCreator:i(84191),Events:i(76038),BaseSound:i(25798),BaseSoundManager:i(12486),WebAudioSound:i(96008),WebAudioSoundManager:i(55491),HTML5AudioSound:i(34350),HTML5AudioSoundManager:i(27622),NoAudioSound:i(38662),NoAudioSoundManager:i(17546)}},38662:(t,e,i)=>{var s=i(25798),r=i(56694),n=i(6659),a=i(98611),o=i(72283),h=function(){return!1},l=function(){return null},u=function(){return this},c=new r({Extends:n,initialize:function(t,e,i){void 0===i&&(i={}),n.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=a({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},i),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:h,updateMarker:h,removeMarker:l,play:h,pause:h,resume:h,stop:h,setMute:u,setVolume:u,setRate:u,setDetune:u,setSeek:u,setLoop:u,setPan:u,applyConfig:l,resetConfig:l,update:o,calculateRate:l,destroy:function(){s.prototype.destroy.call(this)}});t.exports=c},17546:(t,e,i)=>{var s=i(12486),r=i(56694),n=i(6659),a=i(38662),o=i(72283),h=new r({Extends:n,initialize:function(t){n.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},get:function(t){return s.prototype.get.call(this,t)},getAll:function(t){return s.prototype.getAll.call(this,t)},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return s.prototype.remove.call(this,t)},removeAll:function(){return s.prototype.removeAll.call(this)},removeByKey:function(t){return s.prototype.removeByKey.call(this,t)},stopByKey:function(t){return s.prototype.stopByKey.call(this,t)},onBlur:o,onFocus:o,onGameBlur:o,onGameFocus:o,pauseAll:o,resumeAll:o,stopAll:o,update:o,setRate:o,setDetune:o,setMute:o,setVolume:o,unlock:o,forEachActiveSound:function(t,e){s.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){s.prototype.destroy.call(this)}});t.exports=h},96008:(t,e,i)=>{var s=i(25798),r=i(56694),n=i(76038),a=i(72632),o=new r({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.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),t.context.createPanner&&(this.spatialNode=t.context.createPanner(),this.volumeNode.connect(this.spatialNode)),t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),t.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(t.destination)):t.context.createPanner?this.spatialNode.connect(t.destination):this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(n.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime<this.startTime)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit(n.PAUSE,this),!0))},resume:function(){return!(this.manager.context.currentTime<this.startTime)&&(!!s.prototype.resume.call(this)&&(this.createAndStartBufferSource(),this.emit(n.RESUME,this),!0))},stop:function(){return!!s.prototype.stop.call(this)&&(this.stopAndRemoveBufferSource(),this.emit(n.STOP,this),!0)},createAndStartBufferSource:function(){var t=this.currentConfig.seek,e=this.currentConfig.delay,i=this.manager.context.currentTime+e,s=(this.currentMarker?this.currentMarker.start:0)+t,r=this.duration-t;this.playTime=i-t,this.startTime=i,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,i),Math.max(0,s),Math.max(0,r)),this.resetConfig()},createAndStartLoopBufferSource:function(){var t=this.getLoopTime(),e=this.currentMarker?this.currentMarker.start:0,i=this.duration;this.loopTime=t,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,t),Math.max(0,e),Math.max(0,i))},createBufferSource:function(){var t=this,e=this.manager.context.createBufferSource();return e.buffer=this.audioBuffer,e.connect(this.muteNode),e.onended=function(e){e.target===t.source&&(t.currentConfig.loop?t.hasLooped=!0:t.hasEnded=!0)},e},stopAndRemoveBufferSource:function(){this.source&&(this.source.stop(),this.source.disconnect(),this.source=null),this.playTime=0,this.startTime=0,this.stopAndRemoveLoopBufferSource()},stopAndRemoveLoopBufferSource:function(){this.loopSource&&(this.loopSource.stop(),this.loopSource.disconnect(),this.loopSource=null),this.loopTime=0},applyConfig:function(){this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:1});var t=this.currentConfig.source;if(t&&this.manager.context.createPanner){var e=this.spatialNode;e.panningModel=a(t,"panningModel","equalpower"),e.distanceModel=a(t,"distanceModel","inverse"),e.orientationX.value=a(t,"orientationX",0),e.orientationY.value=a(t,"orientationY",0),e.orientationZ.value=a(t,"orientationZ",-1),e.refDistance=a(t,"refDistance",1),e.maxDistance=a(t,"maxDistance",1e4),e.rolloffFactor=a(t,"rolloffFactor",1),e.coneInnerAngle=a(t,"coneInnerAngle",360),e.coneOuterAngle=a(t,"coneOuterAngle",0),e.coneOuterGain=a(t,"coneOuterGain",0),this.spatialSource=a(t,"follow",null),this.spatialSource||(e.positionX.value=a(t,"x",0),e.positionY.value=a(t,"y",0),e.positionZ.value=a(t,"z",0))}s.prototype.applyConfig.call(this)},x:{get:function(){return this.spatialNode?this.spatialNode.positionX:0},set:function(t){this.spatialNode&&(this.spatialNode.positionX.value=t)}},y:{get:function(){return this.spatialNode?this.spatialNode.positionY:0},set:function(t){this.spatialNode&&(this.spatialNode.positionY.value=t)}},update:function(){if(this.isPlaying&&this.spatialSource){var t=a(this.spatialSource,"x",null),e=a(this.spatialSource,"y",null);t&&t!==this._spatialx&&(this._spatialx=this.spatialNode.positionX.value=t),e&&e!==this._spatialy&&(this._spatialy=this.spatialNode.positionY.value=e)}this.hasEnded?(this.hasEnded=!1,s.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(n.COMPLETE,this)):this.hasLooped&&(this.hasLooped=!1,this.source=this.loopSource,this.loopSource=null,this.playTime=this.startTime=this.loopTime,this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:this.totalRate}),this.createAndStartLoopBufferSource(),this.emit(n.LOOPED,this))},destroy:function(){this.pendingRemove||(s.prototype.destroy.call(this),this.audioBuffer=null,this.stopAndRemoveBufferSource(),this.muteNode.disconnect(),this.muteNode=null,this.volumeNode.disconnect(),this.volumeNode=null,this.pannerNode&&(this.pannerNode.disconnect(),this.pannerNode=null),this.spatialNode&&(this.spatialNode.disconnect(),this.spatialNode=null,this.spatialSource=null),this.rateUpdates.length=0,this.rateUpdates=null)},calculateRate:function(){s.prototype.calculateRate.call(this);var t=this.manager.context.currentTime;this.source&&"number"==typeof this.totalRate&&this.source.playbackRate.setValueAtTime(this.totalRate,t),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,t)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartLoopBufferSource()))},getCurrentTime:function(){for(var t=0,e=0;e<this.rateUpdates.length;e++){t+=((e<this.rateUpdates.length-1?this.rateUpdates[e+1].time:this.manager.context.currentTime-this.playTime)-this.rateUpdates[e].time)*this.rateUpdates[e].rate}return t},getLoopTime:function(){for(var t=0,e=0;e<this.rateUpdates.length-1;e++)t+=(this.rateUpdates[e+1].time-this.rateUpdates[e].time)*this.rateUpdates[e].rate;var i=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+i.time+(this.duration-t)/i.rate},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.calculateRate(),this.emit(n.RATE,this,t)}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.calculateRate(),this.emit(n.DETUNE,this,t)}},setDetune:function(t){return this.detune=t,this},mute:{get:function(){return 0===this.muteNode.gain.value},set:function(t){this.currentConfig.mute=t,this.muteNode.gain.setValueAtTime(t?0:1,0),this.emit(n.MUTE,this,t)}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(t){this.currentConfig.volume=t,this.volumeNode.gain.setValueAtTime(t,0),this.emit(n.VOLUME,this,t)}},setVolume:function(t){return this.volume=t,this},seek:{get:function(){return this.isPlaying?this.manager.context.currentTime<this.startTime?this.startTime-this.playTime:this.getCurrentTime():this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.context.currentTime<this.startTime||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.currentConfig.seek=t,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),this.emit(n.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.isPlaying&&(this.stopAndRemoveLoopBufferSource(),t&&this.createAndStartLoopBufferSource()),this.emit(n.LOOP,this,t)}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.pannerNode?this.pannerNode.pan.value:0},set:function(t){this.currentConfig.pan=t,this.pannerNode&&this.pannerNode.pan.setValueAtTime(t,this.manager.context.currentTime),this.emit(n.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=o},55491:(t,e,i)=>{var s=i(82329),r=i(12486),n=i(56694),a=i(76038),o=i(97081),h=i(96008),l=i(72632),u=new n({Extends:r,initialize:function(t){this.context=this.createAudioContext(t),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="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),r.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(o.BOOT,this.unlock,this)},createAudioContext:function(t){var e=t.config.audio;return e.context?(e.context.resume(),e.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new h(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var r=this.game.cache.audio,n=i.length,o=0;o<i.length;o++){var h=i[o],l=h.key,u=h.data;"string"==typeof u&&(u=s(u));var c=function(t,e){r.add(t,e),this.emit(a.DECODED,t),0===--n&&this.emit(a.DECODED_ALL)}.bind(this,l),d=function(t,e){console.error("Error decoding audio: "+t+" - ",e?e.message:""),0===--n&&this.emit(a.DECODED_ALL)}.bind(this,l);this.context.decodeAudioData(u,c,d)}},setListenerPosition:function(t,e){return void 0===t&&(t=this.game.scale.width/2),void 0===e&&(e=this.game.scale.height/2),this.listenerPosition.set(t,e),this},unlock:function(){var t=this,e=document.body,i=function i(){if(t.context&&e){var s=e.removeEventListener.bind(e);t.context.resume().then((function(){s("touchstart",i),s("touchend",i),s("click",i),s("keydown",i),t.unlocked=!0}),(function(){s("touchstart",i),s("touchend",i),s("click",i),s("keydown",i)}))}};e&&(e.addEventListener("touchstart",i,!1),e.addEventListener("touchend",i,!1),e.addEventListener("click",i,!1),e.addEventListener("keydown",i,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){var t=this.context;!t||this.locked||"suspended"!==t.state&&"interrupted"!==t.state||t.resume()},update:function(t,e){var i=this.context.listener;if(i&&void 0!==i.positionX){var s=l(this.listenerPosition,"x",null),n=l(this.listenerPosition,"y",null);s&&s!==this._spatialx&&(this._spatialx=i.positionX.value=s),n&&n!==this._spatialy&&(this._spatialy=i.positionY.value=n)}r.prototype.update.call(this,t,e),this.gameLostFocus||this.onFocus()},destroy:function(){if(this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio.context)this.context.suspend();else{var t=this;this.context.close().then((function(){t.context=null}))}r.prototype.destroy.call(this)},setMute:function(t){return this.mute=t,this},mute:{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit(a.GLOBAL_MUTE,this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit(a.GLOBAL_VOLUME,this,t)}}});t.exports=u},71207:(t,e,i)=>{var s=i(59959),r=i(56694),n=i(72283),a=i(17922),o=new r({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=n,this.removeCallback=n,this._sortKey=""},add:function(t,e){return e?s.Add(this.list,t):s.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?s.AddAt(this.list,t,e):s.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),a(this.list,e),this):this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,r){return s.GetFirst(this.list,t,e,i,r)},getAll:function(t,e,i,r){return s.GetAll(this.list,t,e,i,r)},count:function(t,e){return s.CountAllMatching(this.list,t,e)},swap:function(t,e){s.Swap(this.list,t,e)},moveTo:function(t,e){return s.MoveTo(this.list,t,e)},moveAbove:function(t,e){return s.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return s.MoveBelow(this.list,t,e)},remove:function(t,e){return e?s.Remove(this.list,t):s.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?s.RemoveAt(this.list,t):s.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?s.RemoveBetween(this.list,t,e):s.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return s.BringToTop(this.list,t)},sendToBack:function(t){return s.SendToBack(this.list,t)},moveUp:function(t){return s.MoveUp(this.list,t),t},moveDown:function(t){return s.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e){return s.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,r){return s.SetAll(this.list,t,e,i,r),this},each:function(t,e){for(var i=[null],s=2;s<arguments.length;s++)i.push(arguments[s]);for(s=0;s<this.list.length;s++)i[0]=this.list[s],t.apply(e,i)},shutdown:function(){this.removeAll(),this.list=[]},destroy:function(){this.removeAll(),this.parent=null,this.addCallback=null,this.removeCallback=null},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?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.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}}});t.exports=o},33885:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){this.entries={},this.size=0,this.setAll(t)},setAll:function(t){if(Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e][0],t[e][1]);return this},set:function(t,e){return this.has(t)||this.size++,this.entries[t]=e,this},get:function(t){if(this.has(t))return this.entries[t]},getArray:function(){var t=[],e=this.entries;for(var i in e)t.push(e[i]);return t},has:function(t){return this.entries.hasOwnProperty(t)},delete:function(t){return this.has(t)&&(delete this.entries[t],this.size--),this},clear:function(){return Object.keys(this.entries).forEach((function(t){delete this.entries[t]}),this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var t=[],e=this.entries;for(var i in e)t.push(e[i]);return t},dump:function(){var t=this.entries;for(var e in console.group("Map"),t)console.log(e,t[e]);console.groupEnd()},each:function(t){var e=this.entries;for(var i in e)if(!1===t(i,e[i]))break;return this},contains:function(t){var e=this.entries;for(var i in e)if(e[i]===t)return!0;return!1},merge:function(t,e){void 0===e&&(e=!1);var i=this.entries,s=t.entries;for(var r in s)i.hasOwnProperty(r)&&e?i[r]=s[r]:this.set(r,s[r]);return this}});t.exports=s},74623:(t,e,i)=>{var s=i(56694),r=i(6659),n=i(36716),a=new s({Extends:r,initialize:function(){r.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(t){return this._active.indexOf(t)>-1},isPending:function(t){return this._toProcess>0&&this._pending.indexOf(t)>-1},isDestroying:function(t){return this._destroy.indexOf(t)>-1},add:function(t){return this.checkQueue&&this.isActive(t)&&!this.isDestroying(t)||this.isPending(t)||(this._pending.push(t),this._toProcess++),t},remove:function(t){if(this.isPending(t)){var e=this._pending,i=e.indexOf(t);-1!==i&&e.splice(i,1)}else this.isActive(t)&&(this._destroy.push(t),this._toProcess++);return t},removeAll:function(){for(var t=this._active,e=this._destroy,i=t.length;i--;)e.push(t[i]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,s=this._active;for(t=0;t<i.length;t++){e=i[t];var r=s.indexOf(e);-1!==r&&(s.splice(r,1),this.emit(n.PROCESS_QUEUE_REMOVE,e))}for(i.length=0,i=this._pending,t=0;t<i.length;t++)e=i[t],(!this.checkQueue||this.checkQueue&&-1===s.indexOf(e))&&(s.push(e),this.emit(n.PROCESS_QUEUE_ADD,e));return i.length=0,this._toProcess=0,s},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});t.exports=a},68687:(t,e,i)=>{var s=i(53466);function r(t){if(!(this instanceof r))return new r(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function n(t,e,i){if(!i)return e.indexOf(t);for(var s=0;s<e.length;s++)if(i(t,e[s]))return s;return-1}function a(t,e){o(t,0,t.children.length,e,t)}function o(t,e,i,s,r){r||(r=g(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var n,a=e;a<i;a++)n=t.children[a],h(r,t.leaf?s(n):n);return r}function h(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function f(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,r,n){for(var a,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=r||(a=e+Math.ceil((i-e)/r/2)*r,s(t,a,e,i,n),o.push(e,a,a,i))}r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],s=this.toBBox;if(!p(t,e))return i;for(var r,n,a,o,h=[];e;){for(r=0,n=e.children.length;r<n;r++)a=e.children[r],p(t,o=e.leaf?s(a):a)&&(e.leaf?i.push(a):f(t,o)?this._all(a,i):h.push(a));e=h.pop()}return i},collides:function(t){var e=this.data,i=this.toBBox;if(!p(t,e))return!1;for(var s,r,n,a,o=[];e;){for(s=0,r=e.children.length;s<r;s++)if(n=e.children[s],p(t,a=e.leaf?i(n):n)){if(e.leaf||f(t,a))return!0;o.push(n)}e=o.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}var s=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===s.height)this._splitRoot(this.data,s);else{if(this.data.height<s.height){var r=this.data;this.data=s,s=r}this._insert(s,this.data.height-s.height-1,!0)}else this.data=s;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=g([]),this},remove:function(t,e){if(!t)return this;for(var i,s,r,a,o=this.data,h=this.toBBox(t),l=[],u=[];o||l.length;){if(o||(o=l.pop(),s=l[l.length-1],i=u.pop(),a=!0),o.leaf&&-1!==(r=n(t,o.children,e)))return o.children.splice(r,1),l.push(o),this._condense(l),this;a||o.leaf||!f(o,h)?s?(i++,o=s.children[i],a=!1):o=null:(l.push(o),u.push(i),i=0,s=o,o=o.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},_build:function(t,e,i,s){var r,n=i-e+1,o=this._maxEntries;if(n<=o)return a(r=g(t.slice(e,i+1)),this.toBBox),r;s||(s=Math.ceil(Math.log(n)/Math.log(o)),o=Math.ceil(n/Math.pow(o,s-1))),(r=g([])).leaf=!1,r.height=s;var h,l,u,c,d=Math.ceil(n/o),f=d*Math.ceil(Math.sqrt(o));for(v(t,e,i,f,this.compareMinX),h=e;h<=i;h+=f)for(v(t,h,u=Math.min(h+f-1,i),d,this.compareMinY),l=h;l<=u;l+=d)c=Math.min(l+d-1,u),r.children.push(this._build(t,l,c,s-1));return a(r,this.toBBox),r},_chooseSubtree:function(t,e,i,s){for(var r,n,a,o,h,l,u,d,f,p;s.push(e),!e.leaf&&s.length-1!==i;){for(u=d=1/0,r=0,n=e.children.length;r<n;r++)h=c(a=e.children[r]),f=t,p=a,(l=(Math.max(p.maxX,f.maxX)-Math.min(p.minX,f.minX))*(Math.max(p.maxY,f.maxY)-Math.min(p.minY,f.minY))-h)<d?(d=l,u=h<u?h:u,o=a):l===d&&h<u&&(u=h,o=a);e=o||e.children[0]}return e},_insert:function(t,e,i){var s=this.toBBox,r=i?t:s(t),n=[],a=this._chooseSubtree(r,this.data,e,n);for(a.children.push(t),h(a,r);e>=0&&n[e].children.length>this._maxEntries;)this._split(n,e),e--;this._adjustParentBBoxes(r,n,e)},_split:function(t,e){var i=t[e],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);var n=this._chooseSplitIndex(i,r,s),o=g(i.children.splice(n,i.children.length-n));o.height=i.height,o.leaf=i.leaf,a(i,this.toBBox),a(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var s,r,n,a,h,l,u,d,f,p,g,v,m,x;for(l=u=1/0,s=e;s<=i-e;s++)r=o(t,0,s,this.toBBox),n=o(t,s,i,this.toBBox),f=r,p=n,g=void 0,v=void 0,m=void 0,x=void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),m=Math.min(f.maxX,p.maxX),x=Math.min(f.maxY,p.maxY),a=Math.max(0,m-g)*Math.max(0,x-v),h=c(r)+c(n),a<l?(l=a,d=s,u=h<u?h:u):a===l&&h<u&&(u=h,d=s);return d},_chooseSplitAxis:function(t,e,i){var s=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,i,s)<this._allDistMargin(t,e,i,r)&&t.children.sort(s)},_allDistMargin:function(t,e,i,s){t.children.sort(s);var r,n,a=this.toBBox,l=o(t,0,e,a),u=o(t,i-e,i,a),c=d(l)+d(u);for(r=e;r<i-e;r++)n=t.children[r],h(l,t.leaf?a(n):n),c+=d(l);for(r=i-e-1;r>=e;r--)n=t.children[r],h(u,t.leaf?a(n):n),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var s=i;s>=0;s--)h(e[s],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=r},58403:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e])},set:function(t){return-1===this.entries.indexOf(t)&&this.entries.push(t),this},get:function(t,e){for(var i=0;i<this.entries.length;i++){var s=this.entries[i];if(s[t]===e)return s}},getArray:function(){return this.entries.slice(0)},delete:function(t){var e=this.entries.indexOf(t);return e>-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t<this.entries.length;t++){var e=this.entries[t];console.log(e)}console.groupEnd()},each:function(t,e){var i,s=this.entries.slice(),r=s.length;if(e)for(i=0;i<r&&!1!==t.call(e,s[i],i);i++);else for(i=0;i<r&&!1!==t(s[i],i);i++);return this},iterate:function(t,e){var i,s=this.entries.length;if(e)for(i=0;i<s&&!1!==t.call(e,this.entries[i],i);i++);else for(i=0;i<s&&!1!==t(this.entries[i],i);i++);return this},iterateLocal:function(t){var e,i=[];for(e=1;e<arguments.length;e++)i.push(arguments[e]);var s=this.entries.length;for(e=0;e<s;e++){var r=this.entries[e];r[t].apply(r,i)}return this},clear:function(){return this.entries.length=0,this},contains:function(t){return this.entries.indexOf(t)>-1},union:function(t){var e=new s;return t.entries.forEach((function(t){e.set(t)})),this.entries.forEach((function(t){e.set(t)})),e},intersect:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)&&e.set(i)})),e},difference:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)||e.set(i)})),e},size:{get:function(){return this.entries.length},set:function(t){return t<this.entries.length?this.entries.length=t:this.entries.length}}});t.exports=s},90881:(t,e,i)=>{var s=i(82897),r=i(56694),n=i(84314),a=i(93736),o=new r({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=null),this._width=t,this._height=e,this._parent=s,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new a},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=s(t,0,this.maxWidth),this.minHeight=s(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=s(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=s(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case o.NONE:this._width=this.getNewWidth(n(t,this.snapTo.x)),this._height=this.getNewHeight(n(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case o.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(n(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case o.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(n(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case o.FIT:this.constrain(t,e,!0);break;case o.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(n(t,this.snapTo.x)),this._height=this.getNewHeight(n(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var s=this.snapTo,r=0===e?1:t/e;return i&&this.aspectRatio>r||!i&&this.aspectRatio<r?(e=(t=n(t,s.x))/this.aspectRatio,s.y>0&&(t=(e=n(e,s.y))*this.aspectRatio)):(i&&this.aspectRatio<r||!i&&this.aspectRatio>r)&&(t=(e=n(e,s.y))*this.aspectRatio,s.x>0&&(e=(t=n(t,s.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});o.NONE=0,o.WIDTH_CONTROLS_HEIGHT=1,o.HEIGHT_CONTROLS_WIDTH=2,o.FIT=3,o.ENVELOP=4,t.exports=o},94160:t=>{t.exports="add"},95393:t=>{t.exports="remove"},36716:(t,e,i)=>{t.exports={PROCESS_QUEUE_ADD:i(94160),PROCESS_QUEUE_REMOVE:i(95393)}},20010:(t,e,i)=>{t.exports={Events:i(36716),List:i(71207),Map:i(33885),ProcessQueue:i(74623),RTree:i(68687),Set:i(58403),Size:i(90881)}},17487:(t,e,i)=>{var s=i(56694),r=i(82897),n=i(27119),a=i(86459),o=i(28621),h=i(31673),l=new s({Extends:h,initialize:function(t,e,i,s,r){h.call(this,t,e,i,s,r),this.add("__BASE",0,0,0,s,r),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=s,this.height=r,this.imageData=this.context.getImageData(0,0,s,r),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===a.WEBGL&&this.refresh(),this},draw:function(t,e,i,s){return void 0===s&&(s=!0),this.context.drawImage(i,t,e),s&&this.update(),this},drawFrame:function(t,e,i,s,r){void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=!0);var n=this.manager.getFrame(t,e);if(n){var a=n.canvasData,o=n.cutWidth,h=n.cutHeight,l=n.source.resolution;this.context.drawImage(n.source.image,a.x,a.y,o,h,i,s,o/l,h/l),r&&this.update()}return this},setPixel:function(t,e,i,s,r,n){if(void 0===n&&(n=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),this.getIndex(t,e)>-1){var a=this.context.getImageData(t,e,1,1);a.data[0]=i,a.data[1]=s,a.data[2]=r,a.data[3]=n,this.context.putImageData(a,t,e)}return this},putData:function(t,e,i,s,r,n,a){return void 0===s&&(s=0),void 0===r&&(r=0),void 0===n&&(n=t.width),void 0===a&&(a=t.height),this.context.putImageData(t,e,i,s,r,n,a),this},getData:function(t,e,i,s){return t=r(Math.floor(t),0,this.width-1),e=r(Math.floor(e),0,this.height-1),i=r(i,1,this.width-t),s=r(s,1,this.height-e),this.context.getImageData(t,e,i,s)},getPixel:function(t,e,i){i||(i=new n);var s=this.getIndex(t,e);if(s>-1){var r=this.data,a=r[s+0],o=r[s+1],h=r[s+2],l=r[s+3];i.setTo(a,o,h,l)}return i},getPixels:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var a=r(t,0,this.width),o=r(t+i,0,this.width),h=r(e,0,this.height),l=r(e+s,0,this.height),u=new n,c=[],d=h;d<l;d++){for(var f=[],p=a;p<o;p++)u=this.getPixel(p,d,u),f.push({x:p,y:d,color:u.color,alpha:u.alphaGL});c.push(f)}return c},getIndex:function(t,e){return t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e)),t<this.width&&e<this.height?4*(t+e*this.width):-1},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(t,e,i,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=this.height),void 0===r&&(r=!0),this.context.clearRect(t,e,i,s),r&&this.update(),this},setSize:function(t,e){return void 0===e&&(e=t),t===this.width&&e===this.height||(this.canvas.width=t,this.canvas.height=e,this._source.width=t,this._source.height=e,this._source.isPowerOf2=o(t,e),this.frames.__BASE.setSize(t,e,0,0),this.width=t,this.height=e,this.refresh()),this},destroy:function(){h.prototype.destroy.call(this),this._source=null,this.canvas=null,this.context=null,this.imageData=null,this.data=null,this.pixels=null,this.buffer=null}});t.exports=l},845:(t,e,i)=>{var s=i(95723),r=i(51052),n=i(61068),a=i(56694),o=i(86459),h=i(82047),l=i(72632),u=i(65641),c=i(37410),d=i(31673),f=i(75512),p=new a({Extends:d,initialize:function(t,e,i,s){void 0===i&&(i=256),void 0===s&&(s=256),this.type="DynamicTexture";var a=t.game.renderer,h=a&&a.type===o.CANVAS,l=h?n.create2D(this,i,s):[this];d.call(this,t,e,l,i,s),this.add("__BASE",0,0,0,i,s),this.renderer=a,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=h?l:null,this.context=h?l.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new r(0,0,i,s).setScene(t.game.scene.systemScene,!1),this.renderTarget=h?null:new c(a,i,s,1,0,!1,!0,!0,!1),this.pipeline=h?null:a.pipelines.get(u.SINGLE_PIPELINE),this.setSize(i,s)},setSize:function(t,e){void 0===e&&(e=t);var i=this.get(),s=i.source;if(t!==this.width||e!==this.height){this.canvas&&(this.canvas.width=t,this.canvas.height=e);var r=this.renderTarget;r&&(r.willResize(t,e)&&r.resize(t,e),r.texture!==s.glTexture&&this.renderer.deleteTexture(s.glTexture),this.setFromRenderTarget()),this.camera.setSize(t,e),s.width=t,s.height=e,i.setSize(t,e),this.width=t,this.height=e}else{var n=this.getSourceImage();i.cutX+t>n.width&&(t=n.width-i.cutX),i.cutY+e>n.height&&(e=n.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)}return this},setFromRenderTarget:function(){var t=this.get().source,e=this.renderTarget;return t.isRenderTexture=!0,t.isGLTexture=!0,t.glTexture=e.texture,t.glTexture.flipY=!0,this},setIsSpriteTexture:function(t){return this.isSpriteTexture=t,this},fill:function(t,e,i,s,r,n){var a=this.camera,o=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=this.width),void 0===n&&(n=this.height);var h=t>>16&255,l=t>>8&255,u=255&t,c=this.renderTarget;if(a.preRender(),c){c.bind(!0);var d=this.pipeline.manager.set(this.pipeline),p=o.width/c.width,g=o.height/c.height,v=c.height-(s+n);d.drawFillRect(i*p,v*g,r*p,n*g,f.getTintFromFloats(u/255,l/255,h/255,1),e),c.unbind(!0)}else{var m=this.context;o.setContext(m),m.globalCompositeOperation="source-over",m.fillStyle="rgba("+h+","+l+","+u+","+e+")",m.fillRect(i,s,r,n),o.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.context,e=this.renderTarget;e?e.clear():t&&(t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.width,this.height),t.restore()),this.dirty=!1}return this},stamp:function(t,e,i,s,r){void 0===i&&(i=0),void 0===s&&(s=0);var n=l(r,"alpha",1),a=l(r,"tint",16777215),o=l(r,"angle",0),h=l(r,"rotation",0),u=l(r,"scale",1),c=l(r,"scaleX",u),d=l(r,"scaleY",u),f=l(r,"originX",.5),p=l(r,"originY",.5),g=l(r,"blendMode",0),v=l(r,"erase",!1),m=l(r,"skipBatch",!1),x=this.manager.resetStamp(n,a);return x.setAngle(0),0!==o?x.setAngle(o):0!==h&&x.setRotation(h),x.setScale(c,d),x.setTexture(t,e),x.setOrigin(f,p),x.setBlendMode(g),v&&(this._eraseMode=!0),m?this.batchGameObject(x,i,s):this.draw(x,i,s),v&&(this._eraseMode=!1),this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i),this._eraseMode=!1,this},draw:function(t,e,i,s,r){return this.beginDraw(),this.batchDraw(t,e,i,s,r),this.endDraw(),this},drawFrame:function(t,e,i,s,r,n){return this.beginDraw(),this.batchDrawFrame(t,e,i,s,r,n),this.endDraw(),this},repeat:function(t,e,i,s,r,n,a,o,l){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=this.width),void 0===n&&(n=this.height),void 0===a&&(a=1),void 0===o&&(o=16777215),void 0===l&&(l=!1),!(e=t instanceof h?t:this.manager.getFrame(t,e)))return this;var u=this.manager.resetStamp(a,o);u.setFrame(e),u.setOrigin(0);var c=e.width,d=e.height;r=Math.floor(r),n=Math.floor(n);var f=Math.ceil(r/c),p=Math.ceil(n/d),g=f*c-r,v=p*d-n;g>0&&(g=c-g),v>0&&(v=d-v),i<0&&(f+=Math.ceil(Math.abs(i)/c)),s<0&&(p+=Math.ceil(Math.abs(s)/d));var m=i,x=s,y=!1,T=this.manager.stampCrop.setTo(0,0,c,d);l||this.beginDraw();for(var w=0;w<p;w++)if(x+d<0)x+=d;else{for(var E=0;E<f;E++)y=!1,m+c<0||(m<0&&(y=!0,T.width=c+m,T.x=c-T.width),x<0&&(y=!0,T.height=d+x,T.y=d-T.height),g>0&&E===f-1&&(y=!0,T.width=g),v>0&&w===p-1&&(y=!0,T.height=v),y&&u.setCrop(T),this.batchGameObject(u,m,x),u.isCropped=!1,T.setTo(0,0,c,d)),m+=c;m=i,x+=d}return l||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var t=this.camera,e=this.renderer,i=this.renderTarget;t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(t,e,i,s,r){return Array.isArray(t)||(t=[t]),this.batchList(t,e,i,s,r),this},batchDrawFrame:function(t,e,i,s,r,n){void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=1),void 0===n&&(n=16777215);var a=this.manager.getFrame(t,e);return a&&(this.renderTarget?this.pipeline.batchTextureFrame(a,i,s,n,r,this.camera.matrix,null):this.batchTextureFrame(a,i,s,r,n)),this},endDraw:function(t){if(void 0===t&&(t=this._eraseMode),this.isDrawing){var e=this.renderer,i=this.renderTarget;if(i){var s=e.endCapture();e.pipelines.setUtility().blitFrame(s,i,1,!1,!1,t,this.isSpriteTexture),e.resetScissor(),e.resetViewport()}else e.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(t,e,i,s,r){var n=t.length;if(0!==n)for(var a=0;a<n;a++){var o=t[a];o&&o!==this&&(o.renderWebGL||o.renderCanvas?this.batchGameObject(o,e,i):o.isParent||o.list?this.batchGroup(o.getChildren(),e,i):"string"==typeof o?this.batchTextureFrameKey(o,null,e,i,s,r):o instanceof h?this.batchTextureFrame(o,e,i,s,r):Array.isArray(o)&&this.batchList(o,e,i,s,r))}},batchGroup:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);for(var s=0;s<t.length;s++){var r=t[s];r.willRender(this.camera)&&this.batchGameObject(r,r.x+e,r.y+i)}},batchGameObject:function(t,e,i){void 0===e&&(e=t.x),void 0===i&&(i=t.y);var r=t.x,n=t.y,a=this.camera,o=this.renderer,h=this._eraseMode,l=t.mask;if(t.setPosition(e,i),this.canvas){if(h){var u=t.blendMode;t.blendMode=s.ERASE}l&&l.preRenderCanvas(o,t,a),t.renderCanvas(o,t,a,null),l&&l.postRenderCanvas(o,t,a),h&&(t.blendMode=u)}else o&&(l&&l.preRenderWebGL(o,t,a),h||o.setBlendMode(t.blendMode),t.renderWebGL(o,t,a),l&&l.postRenderWebGL(o,a,this.renderTarget));t.setPosition(r,n)},batchTextureFrameKey:function(t,e,i,s,r,n){var a=this.manager.getFrame(t,e);a&&this.batchTextureFrame(a,i,s,r,n)},batchTextureFrame:function(t,e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===r&&(r=16777215);var n=this.camera.matrix;if(this.renderTarget)this.pipeline.batchTextureFrame(t,e,i,r,s,n,null);else{var a=this.context,o=t.canvasData,h=t.source.image;a.save(),a.globalCompositeOperation=this._eraseMode?"destination-out":"source-over",a.globalAlpha=s,n.setToContext(a),o.width>0&&o.height>0&&a.drawImage(h,o.x,o.y,o.width,o.height,e,i,o.width,o.height),a.restore()}},snapshotArea:function(t,e,i,s,r,n,a){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,r,!1,t,e,i,s,n,a):this.renderer.snapshotCanvas(this.canvas,r,!1,t,e,i,s,n,a),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(t,e,i,s){var r=this.manager.resetStamp();r.setTexture(this),r.setOrigin(0),r.renderWebGL(t,r,i,s)},renderCanvas:function(){},destroy:function(){var t=this.manager.stamp;t&&t.texture===this&&this.manager.resetStamp(),d.prototype.destroy.call(this),n.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});t.exports=p},82047:(t,e,i)=>{var s=i(56694),r=i(82897),n=i(98611),a=new s({initialize:function(t,e,i,s,r,n,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,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(n,a,s,r)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var r=this.data,n=r.cut;n.x=i,n.y=s,n.w=t,n.h=e,n.r=i+t,n.b=s+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e);var a=r.drawImage;return a.x=i,a.y=s,a.width=t,a.height=e,this.updateUVs()},setTrim:function(t,e,i,s,r,n){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=s,o.w=r,o.h=n,o.r=i+r,o.b=s+n,this.x=i,this.y=s,this.width=r,this.height=n,this.halfWidth=.5*r,this.halfHeight=.5*n,this.centerX=Math.floor(r/2),this.centerY=Math.floor(n/2),this.updateUVs()},setScale9:function(t,e,i,s){var r=this.data;return r.scale9=!0,r.is3Slice=0===e&&s===this.height,r.scale9Borders.x=t,r.scale9Borders.y=e,r.scale9Borders.w=i,r.scale9Borders.h=s,this},setCropUVs:function(t,e,i,s,n,a,o){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=r(e,0,d)),g=l+(i=r(i,0,f)),v=s=r(s,0,d-e),m=n=r(n,0,f-i),x=this.data;if(x.trim){var y=x.spriteSourceSize,T=e+(s=r(s,0,u-e)),w=i+(n=r(n,0,c-i));if(!(y.r<e||y.b<i||y.x>T||y.y>w)){var E=Math.max(y.x,e),S=Math.max(y.y,i),b=Math.min(y.r,T)-E,A=Math.min(y.b,w)-S;v=b,m=A,p=a?h+(u-(E-y.x)-b):h+(E-y.x),g=o?l+(c-(S-y.y)-A):l+(S-y.y),e=E,i=S,s=b,n=A}else p=0,g=0,v=0,m=0}else a&&(p=h+(u-e-s)),o&&(g=l+(c-i-n));var _=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/_),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+v)/_),t.v1=Math.min(1,(g+m)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=v,t.ch=m,t.width=s,t.height=n,t.flipX=a,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,r,n){var a=this.data.drawImage;return a.width=t,a.height=e,this.u0=i,this.v0=s,this.u1=r,this.v1=n,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,r=this.data.drawImage;r.width=i,r.height=s;var n=this.source.width,a=this.source.height;return this.u0=t/n,this.v0=e/a,this.u1=(t+i)/n,this.v1=(e+s)/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new a(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=n(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null,this.customData=null,this.data=null},glTexture:{get:function(){return this.source.glTexture}},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}}});t.exports=a},31673:(t,e,i)=>{var s=i(56694),r=i(82047),n=i(32547),a='Texture "%s" has no frame "%s"',o=new s({initialize:function(t,e,i,s,r){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var a=0;a<i.length;a++)this.source.push(new n(this,i[a],s,r))},add:function(t,e,i,s,n,a){if(this.has(t))return null;var o=new r(this,t,e,i,s,n,a);return this.frames[t]=o,"__BASE"===this.firstFrame&&(this.firstFrame=t),this.frameTotal++,o},remove:function(t){return!!this.has(t)&&(this.get(t).destroy(),delete this.frames[t],!0)},has:function(t){return this.frames.hasOwnProperty(t)},get:function(t){t||(t=this.firstFrame);var e=this.frames[t];return e||(console.warn(a,this.key,t),e=this.frames[this.firstFrame]),e},getTextureSourceIndex:function(t){for(var e=0;e<this.source.length;e++)if(this.source[e]===t)return e;return-1},getFramesFromTextureSource:function(t,e){void 0===e&&(e=!1);var i=[];for(var s in this.frames)if("__BASE"!==s||e){var r=this.frames[s];r.sourceIndex===t&&i.push(r)}return i},getFrameNames:function(t){void 0===t&&(t=!1);var e=Object.keys(this.frames);if(!t){var i=e.indexOf("__BASE");-1!==i&&e.splice(i,1)}return e},getSourceImage:function(t){null!=t&&1!==this.frameTotal||(t="__BASE");var e=this.frames[t];return e?e.source.image:(console.warn(a,this.key,t),this.frames.__BASE.source.image)},getDataSourceImage:function(t){null!=t&&1!==this.frameTotal||(t="__BASE");var e,i=this.frames[t];return i?e=i.sourceIndex:(console.warn(a,this.key,t),e=this.frames.__BASE.sourceIndex),this.dataSource[e].image},setDataSource:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=this.source[e];this.dataSource.push(new n(this,t[e],i.width,i.height))}},setFilter:function(t){var e;for(e=0;e<this.source.length;e++)this.source[e].setFilter(t);for(e=0;e<this.dataSource.length;e++)this.dataSource[e].setFilter(t)},destroy:function(){var t,e=this.source,i=this.dataSource;for(t=0;t<e.length;t++)e[t]&&e[t].destroy();for(t=0;t<i.length;t++)i[t]&&i[t].destroy();for(var s in this.frames){var r=this.frames[s];r&&r.destroy()}this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key),this.manager=null}});t.exports=o},6237:(t,e,i)=>{var s=i(61068),r=i(17487),n=i(56694),a=i(27119),o=i(86459),h=i(845),l=i(6659),u=i(38203),c=i(82047),d=i(97081),f=i(52780),p=i(10850),g=i(1539),v=i(42911),m=i(69150),x=i(74118),y=i(31673),T=new n({Extends:l,initialize:function(t){l.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=s.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new x,this.silentWarnings=!1,t.events.once(d.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.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(d.DESTROY,this.destroy,this),this.game.events.once(d.SYSTEM_READY,(function(t){this.stamp=new g(t).setOrigin(0)}),this)},updatePending:function(){this._pending--,0===this._pending&&(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)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return this.silentWarnings||console.warn("No texture found matching key: "+t),this;t=this.get(t)}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 i=this,s=new Image;s.onerror=function(){i.emit(u.ERROR,t)},s.onload=function(){var e=i.create(t,s);m.Image(e,0),i.emit(u.ADD,t,e),i.emit(u.ADD_KEY+t,e),i.emit(u.LOAD,t,e)},s.src=e}return this},getBase64:function(t,e,i,r){void 0===i&&(i="image/png"),void 0===r&&(r=.92);var n="",a=this.getFrame(t,e);if(a&&(a.source.isRenderTexture||a.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(a){var o=a.canvasData,h=s.create2D(this,o.width,o.height),l=h.getContext("2d",{willReadFrequently:!0});o.width>0&&o.height>0&&l.drawImage(a.source.image,o.x,o.y,o.width,o.height,0,0,o.width,o.height),n=h.toDataURL(i,r),s.remove(h)}return n},addImage:function(t,e,i){var s=null;return this.checkKey(t)&&(s=this.create(t,e),m.Image(s,0),i&&s.setDataSource(i),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)),s},addGLTexture:function(t,e){var i=null;if(this.checkKey(t)){var s=e.width,r=e.height;(i=this.create(t,e,s,r)).add("__BASE",0,0,0,s,r),this.emit(u.ADD,t,i),this.emit(u.ADD_KEY+t,i)}return i},addCompressedTexture:function(t,e,i){var s=null;if(this.checkKey(t)){if((s=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),i)if(Array.isArray(i))for(var r=0;r<i.length;r++)m.JSONHash(s,r,i[r]);else m.JSONHash(s,0,i);this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)}return s},addRenderTexture:function(t,e){var i=null;return this.checkKey(t)&&((i=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),this.emit(u.ADD,t,i),this.emit(u.ADD_KEY+t,i)),i},generate:function(t,e){if(this.checkKey(t)){var i=s.create(this,1,1);return e.canvas=i,f(e),this.addCanvas(t,i)}return null},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var r=s.create(this,e,i,o.CANVAS,!0);return this.addCanvas(t,r)}return null},addCanvas:function(t,e,i){void 0===i&&(i=!1);var s=null;return i?s=new r(this,t,e,e.width,e.height):this.checkKey(t)&&(s=new r(this,t,e,e.width,e.height),this.list[t]=s,this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)),s},addDynamicTexture:function(t,e,i){var s=null;return"string"!=typeof t||this.exists(t)?t=(s=t).key:s=new h(this,t,e,i),this.checkKey(t)?(this.list[t]=s,this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)):s=null,s},addAtlas:function(t,e,i,s){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,s):this.addAtlasJSONHash(t,e,i,s)},addAtlasJSONArray:function(t,e,i,s){var r=null;if(e instanceof y?(t=e.key,r=e):this.checkKey(t)&&(r=this.create(t,e)),r){if(Array.isArray(i))for(var n=1===i.length,a=0;a<r.source.length;a++){var o=n?i[0]:i[a];m.JSONArray(r,a,o)}else m.JSONArray(r,0,i);s&&r.setDataSource(s),this.emit(u.ADD,t,r),this.emit(u.ADD_KEY+t,r)}return r},addAtlasJSONHash:function(t,e,i,s){var r=null;if(e instanceof y?(t=e.key,r=e):this.checkKey(t)&&(r=this.create(t,e)),r){if(Array.isArray(i))for(var n=0;n<i.length;n++)m.JSONHash(r,n,i[n]);else m.JSONHash(r,0,i);s&&r.setDataSource(s),this.emit(u.ADD,t,r),this.emit(u.ADD_KEY+t,r)}return r},addAtlasXML:function(t,e,i,s){var r=null;return e instanceof y?(t=e.key,r=e):this.checkKey(t)&&(r=this.create(t,e)),r&&(m.AtlasXML(r,0,i),s&&r.setDataSource(s),this.emit(u.ADD,t,r),this.emit(u.ADD_KEY+t,r)),r},addUnityAtlas:function(t,e,i,s){var r=null;return e instanceof y?(t=e.key,r=e):this.checkKey(t)&&(r=this.create(t,e)),r&&(m.UnityYAML(r,0,i),s&&r.setDataSource(s),this.emit(u.ADD,t,r),this.emit(u.ADD_KEY+t,r)),r},addSpriteSheet:function(t,e,i,s){var r=null;if(e instanceof y?(t=e.key,r=e):this.checkKey(t)&&(r=this.create(t,e)),r){var n=r.source[0].width,a=r.source[0].height;m.SpriteSheet(r,0,0,0,n,a,i),s&&r.setDataSource(s),this.emit(u.ADD,t,r),this.emit(u.ADD_KEY+t,r)}return r},addSpriteSheetFromAtlas:function(t,e){if(!this.checkKey(t))return null;var i=p(e,"atlas",null),s=p(e,"frame",null);if(i&&s){var r=this.get(i).get(s);if(r){var n=this.create(t,r.source.image);return r.trimmed?m.SpriteSheetFromAtlas(n,r,e):m.SpriteSheet(n,0,r.cutX,r.cutY,r.cutWidth,r.cutHeight,e),this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n),n}}},addUint8Array:function(t,e,i,s){if(!this.checkKey(t)||e.length/4!=i*s)return null;var r=this.create(t,e,i,s);return r.add("__BASE",0,0,0,i,s),this.emit(u.ADD,t,r),this.emit(u.ADD_KEY+t,r),r},create:function(t,e,i,s){var r=null;return this.checkKey(t)&&(r=new y(this,t,e,i,s),this.list[t]=r),r},exists:function(t){return this.list.hasOwnProperty(t)},get:function(t){return void 0===t&&(t="__DEFAULT"),this.list[t]?this.list[t]:t instanceof y?t:t instanceof c?t.texture:this.list.__MISSING},cloneFrame:function(t,e){if(this.list[t])return this.list[t].get(e).clone()},getFrame:function(t,e){if(this.list[t])return this.list[t].get(e)},parseFrame:function(t){if(t)return"string"==typeof t?this.getFrame(t):Array.isArray(t)&&2===t.length?this.getFrame(t[0],t[1]):v(t)?this.getFrame(t.key,t.frame):t instanceof y?t.get():t instanceof c?t:void 0},getTextureKeys:function(){var t=[];for(var e in this.list)"__DEFAULT"!==e&&"__MISSING"!==e&&"__WHITE"!==e&&"__NORMAL"!==e&&t.push(e);return t},getPixel:function(t,e,i,s){var r=this.getFrame(i,s);if(r){t-=r.x,e-=r.y;var n=r.data.cut;if(t+=n.x,e+=n.y,t>=n.x&&t<n.r&&e>=n.y&&e<n.b){var o=this._tempContext;o.clearRect(0,0,1,1),o.drawImage(r.source.image,t,e,1,1,0,0,1,1);var h=o.getImageData(0,0,1,1);return new a(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},getPixelAlpha:function(t,e,i,s){var r=this.getFrame(i,s);if(r){t-=r.x,e-=r.y;var n=r.data.cut;if(t+=n.x,e+=n.y,t>=n.x&&t<n.r&&e>=n.y&&e<n.b){var a=this._tempContext;return a.clearRect(0,0,1,1),a.drawImage(r.source.image,t,e,1,1,0,0,1,1),a.getImageData(0,0,1,1).data[3]}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},renameTexture:function(t,e){var i=this.get(t);return!(!i||t===e)&&(i.key=e,this.list[e]=i,delete this.list[t],!0)},each:function(t,e){for(var i=[null],s=1;s<arguments.length;s++)i.push(arguments[s]);for(var r in this.list)i[0]=this.list[r],t.apply(e,i)},resetStamp:function(t,e){void 0===t&&(t=1),void 0===e&&(e=16777215);var i=this.stamp;return i.setCrop(),i.setPosition(0),i.setAngle(0),i.setScale(1),i.setAlpha(t),i.setTint(e),i.setTexture("__WHITE"),i},destroy:function(){for(var t in this.list)this.list[t].destroy();this.list={},this.stamp.destroy(),this.game=null,this.stamp=null,s.remove(this._tempCanvas)}});t.exports=T},32547:(t,e,i)=>{var s=i(61068),r=i(56694),n=i(28621),a=i(27394),o=i(33374),h=new r({initialize:function(t,e,i,s,r){void 0===r&&(r=!1);var h=t.manager.game;this.renderer=h.renderer,this.texture=t,this.source=e,this.image=e.compressed?null:e,this.compressionAlgorithm=e.compressed?e.format:null,this.resolution=1,this.width=i||e.naturalWidth||e.videoWidth||e.width||0,this.height=s||e.naturalHeight||e.videoHeight||e.height||0,this.scaleMode=a.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type||"DynamicTexture"===e.type,this.isGLTexture=e instanceof o,this.isPowerOf2=n(this.width,this.height),this.glTexture=null,this.flipY=r,this.init(h)},init:function(t){var e=this.renderer;if(e){var i=this.source;if(e.gl){var s=this.image,r=this.flipY,n=this.width,a=this.height,o=this.scaleMode;this.isCanvas?this.glTexture=e.createCanvasTexture(s,!1,r):this.isVideo?this.glTexture=e.createVideoTexture(s,!1,r):this.isRenderTexture?this.glTexture=e.createTextureFromSource(null,n,a,o):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=e.createTextureFromSource(i):i instanceof Uint8Array?this.glTexture=e.createUint8ArrayTexture(i,n,a,o):this.glTexture=e.createTextureFromSource(s,n,a,o)}else this.isRenderTexture&&(this.image=i.canvas)}t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return void 0===t&&(t=!0),this.flipY=t,this},update:function(){var t=this.renderer,e=this.image,i=this.flipY,s=t.gl;s&&this.isCanvas?t.updateCanvasTexture(e,this.glTexture,i):s&&this.isVideo&&t.updateVideoTexture(e,this.glTexture,i)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&s.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=h},65154:t=>{t.exports={LINEAR:0,NEAREST:1}},49644:t=>{t.exports="addtexture"},29569:t=>{t.exports="addtexture-"},60079:t=>{t.exports="onerror"},72665:t=>{t.exports="onload"},93006:t=>{t.exports="ready"},69018:t=>{t.exports="removetexture"},85549:t=>{t.exports="removetexture-"},38203:(t,e,i)=>{t.exports={ADD:i(49644),ADD_KEY:i(29569),ERROR:i(60079),LOAD:i(72665),READY:i(93006),REMOVE:i(69018),REMOVE_KEY:i(85549)}},87499:(t,e,i)=>{var s=i(98611),r=i(65154),n={CanvasTexture:i(17487),DynamicTexture:i(845),Events:i(38203),FilterMode:r,Frame:i(82047),Parsers:i(69150),Texture:i(31673),TextureManager:i(6237),TextureSource:i(32547)};n=s(!1,n,r),t.exports=n},35082:t=>{t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var r,n=i.getElementsByTagName("SubTexture"),a=0;a<n.length;a++){var o=n[a].attributes,h=o.name.value,l=parseInt(o.x.value,10),u=parseInt(o.y.value,10),c=parseInt(o.width.value,10),d=parseInt(o.height.value,10);if(r=t.add(h,e,l,u,c,d),o.frameX){var f=Math.abs(parseInt(o.frameX.value,10)),p=Math.abs(parseInt(o.frameY.value,10)),g=parseInt(o.frameWidth.value,10),v=parseInt(o.frameHeight.value,10);r.setTrim(c,d,f,p,g,v)}}return t}console.warn("Invalid Texture Atlas XML given")}},83332:t=>{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},21560:t=>{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},64423:(t,e,i)=>{var s=i(32742);t.exports=function(t,e,i){if(i.frames||i.textures){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height);for(var n,a=Array.isArray(i.textures)?i.textures[e].frames:i.frames,o=0;o<a.length;o++){var h=a[o];if(n=t.add(h.filename,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h)){h.trimmed&&n.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(n.rotated=!0,n.updateUVsInverted());var l=h.anchor||h.pivot;l&&(n.customPivot=!0,n.pivotX=l.x,n.pivotY=l.y),h.scale9Borders&&n.setScale9(h.scale9Borders.x,h.scale9Borders.y,h.scale9Borders.w,h.scale9Borders.h),n.customData=s(h)}else console.warn("Invalid atlas json, frame already exists: "+h.filename)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Array")}},17264:(t,e,i)=>{var s=i(32742);t.exports=function(t,e,i){if(i.frames){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height);var n,a=i.frames;for(var o in a)if(a.hasOwnProperty(o)){var h=a[o];if(n=t.add(o,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h)){h.trimmed&&n.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(n.rotated=!0,n.updateUVsInverted());var l=h.anchor||h.pivot;l&&(n.customPivot=!0,n.pivotX=l.x,n.pivotY=l.y),h.scale9Borders&&n.setScale9(h.scale9Borders.x,h.scale9Borders.y,h.scale9Borders.w,h.scale9Borders.h),n.customData=s(h)}else console.warn("Invalid atlas json, frame already exists: "+o)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},67409:t=>{t.exports=function(t){var e,i=[171,75,84,88,32,49,49,187,13,10,26,10],s=new Uint8Array(t,0,12);for(e=0;e<s.length;e++)if(s[e]!==i[e])return void console.warn("KTXParser - Invalid file format");var r=Uint32Array.BYTES_PER_ELEMENT,n=new DataView(t,12,13*r),a=67305985===n.getUint32(0,!0);if(0===n.getUint32(1*r,a)){var o=n.getUint32(4*r,a),h=n.getUint32(6*r,a),l=n.getUint32(7*r,a),u=Math.max(1,n.getUint32(11*r,a)),c=n.getUint32(12*r,a),d=new Array(u),f=64+c,p=h,g=l;for(e=0;e<u;e++){var v=new Int32Array(t,f,1)[0];f+=4,d[e]={data:new Uint8Array(t,f,v),width:p,height:g},p=Math.max(1,p>>1),g=Math.max(1,g>>1),f+=v}return{mipmaps:d,width:h,height:l,internalFormat:o,compressed:!0,generateMipmap:!1}}console.warn("KTXParser - Only compressed formats supported")}},24904:t=>{function e(t,e,i,s,r,n,a){return void 0===a&&(a=16),Math.floor((t+i)/r)*Math.floor((e+s)/n)*a}function i(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function s(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function r(t,i){return e(t,i,3,3,4,4,8)}function n(t,i){return e(t,i,3,3,4,4)}var a={0:{sizeFunc:i,glFormat:35841},1:{sizeFunc:i,glFormat:35843},2:{sizeFunc:s,glFormat:35840},3:{sizeFunc:s,glFormat:35842},6:{sizeFunc:r,glFormat:36196},7:{sizeFunc:r,glFormat:33776},8:{sizeFunc:n,glFormat:33777},9:{sizeFunc:n,glFormat:33778},11:{sizeFunc:n,glFormat:33779},22:{sizeFunc:r,glFormat:37492},23:{sizeFunc:n,glFormat:37496},24:{sizeFunc:r,glFormat:37494},25:{sizeFunc:r,glFormat:37488},26:{sizeFunc:n,glFormat:37490},27:{sizeFunc:n,glFormat:37808},28:{sizeFunc:function(t,i){return e(t,i,4,3,5,4)},glFormat:37809},29:{sizeFunc:function(t,i){return e(t,i,4,4,5,5)},glFormat:37810},30:{sizeFunc:function(t,i){return e(t,i,5,4,6,5)},glFormat:37811},31:{sizeFunc:function(t,i){return e(t,i,5,5,6,6)},glFormat:37812},32:{sizeFunc:function(t,i){return e(t,i,7,4,8,5)},glFormat:37813},33:{sizeFunc:function(t,i){return e(t,i,7,5,8,6)},glFormat:37814},34:{sizeFunc:function(t,i){return e(t,i,7,7,8,8)},glFormat:37815},35:{sizeFunc:function(t,i){return e(t,i,9,4,10,5)},glFormat:37816},36:{sizeFunc:function(t,i){return e(t,i,9,5,10,6)},glFormat:37817},37:{sizeFunc:function(t,i){return e(t,i,9,7,10,8)},glFormat:37818},38:{sizeFunc:function(t,i){return e(t,i,9,9,10,10)},glFormat:37819},39:{sizeFunc:function(t,i){return e(t,i,11,9,12,10)},glFormat:37820},40:{sizeFunc:function(t,i){return e(t,i,11,11,12,12)},glFormat:37821}};t.exports=function(t){for(var e=new Uint32Array(t,0,13),i=e[2],s=a[i].glFormat,r=a[i].sizeFunc,n=e[11],o=e[7],h=e[6],l=52+e[12],u=new Uint8Array(t,l),c=new Array(n),d=0,f=o,p=h,g=0;g<n;g++){var v=r(f,p);c[g]={data:new Uint8Array(u.buffer,u.byteOffset+d,v),width:f,height:p},f=Math.max(1,f>>1),p=Math.max(1,p>>1),d+=v}return{mipmaps:c,width:o,height:h,internalFormat:s,compressed:!0,generateMipmap:!1}}},6143:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,r,n,a,o){var h=s(o,"frameWidth",null),l=s(o,"frameHeight",h);if(null===h)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=t.source[e];t.add("__BASE",e,0,0,u.width,u.height);var c=s(o,"startFrame",0),d=s(o,"endFrame",-1),f=s(o,"margin",0),p=s(o,"spacing",0),g=Math.floor((n-f+p)/(h+p))*Math.floor((a-f+p)/(l+p));0===g&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",t.key),(c>g||c<-g)&&(c=0),c<0&&(c=g+c),(-1===d||d>g||d<c)&&(d=g);for(var v=f,m=f,x=0,y=0,T=0,w=0;w<g;w++){x=0,y=0;var E=v+h,S=m+l;E>n&&(x=E-n),S>a&&(y=S-a),w>=c&&w<=d&&(t.add(T,e,i+v,r+m,h-x,l-y),T++),(v+=h+p)+h>n&&(v=f,m+=l+p)}return t}},20030:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i){var r=s(i,"frameWidth",null),n=s(i,"frameHeight",r);if(!r)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var a=t.source[0];t.add("__BASE",0,0,0,a.width,a.height);var o,h=s(i,"startFrame",0),l=s(i,"endFrame",-1),u=s(i,"margin",0),c=s(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,g=e.cutHeight,v=e.realWidth,m=e.realHeight,x=Math.floor((v-u+c)/(r+c)),y=Math.floor((m-u+c)/(n+c)),T=x*y,w=e.x,E=r-w,S=r-(v-p-w),b=e.y,A=n-b,_=n-(m-g-b);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,R=u,M=0,P=0;P<y;P++){for(var L=0===P,O=P===y-1,F=0;F<x;F++){var D=0===F,k=F===x-1;if(o=t.add(M,0,d+C,f+R,r,n),D||L||k||O){var I=D?w:0,B=L?b:0,N=0,X=0;D&&(N+=r-E),k&&(N+=r-S),L&&(X+=n-A),O&&(X+=n-_);var U=r-N,Y=n-X;o.cutWidth=U,o.cutHeight=Y,o.setTrim(r,n,I,B,U,Y)}C+=c,C+=D?E:k?S:r,M++}C=u,R+=c,R+=L?A:O?_:n}return t}},89187:t=>{var e=0,i=function(t,i,s,r){var n=e-r.y-r.height;t.add(s,i,r.x,n,r.width,r.height)};t.exports=function(t,s,r){var n=t.source[s];t.add("__BASE",s,0,0,n.width,n.height),e=n.height;for(var a=r.split("\n"),o=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},c=0;c<a.length;c++){var d=a[c].match(o);if(d){var f="- "===d[1],p=d[2],g=d[3];if(f&&(l!==h&&(i(t,s,l,u),h=l),u={x:0,y:0,width:0,height:0}),"name"!==p)switch(p){case"x":case"y":case"width":case"height":u[p]=parseInt(g,10)}else l=g}}return l!==h&&i(t,s,l,u),t}},69150:(t,e,i)=>{t.exports={AtlasXML:i(35082),Canvas:i(83332),Image:i(21560),JSONArray:i(64423),JSONHash:i(17264),KTXParser:i(67409),PVRParser:i(24904),SpriteSheet:i(6143),SpriteSheetFromAtlas:i(20030),UnityYAML:i(89187)}},93560:t=>{t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},97042:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,r,n,a){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===r&&(r=0),void 0===n&&(n=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|s,this.imageMargin=0|r,this.imageSpacing=0|n,this.properties=a||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},addImage:function(t,e){return this.images.push({gid:t,image:e}),this.total++,this}});t.exports=s},46422:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.gids=[],void 0!==t)for(var e=0;e<t.length;++e)for(var i=t[e],s=0;s<i.total;++s)this.gids[i.firstgid+s]=i;this._gids=this.gids},enabled:{get:function(){return!!this.gids},set:function(t){this.gids=t?this._gids:void 0}},getTypeIncludingTile:function(t){if(void 0!==t.type&&""!==t.type)return t.type;if(this.gids&&void 0!==t.gid){var e=this.gids[t.gid];if(e){var i=e.getTileData(t.gid);if(i)return i.type}}},setTextureAndFrame:function(t,e,i,s){if(null===e&&this.gids&&void 0!==s.gid){var r=this.gids[s.gid];r&&(null===e&&void 0!==r.image&&(e=r.image.key),null===i&&(i=s.gid-r.firstgid),t.scene.textures.getFrame(e,i)||(e=null,i=null))}t.setTexture(e,i)},setPropertiesFromTiledObject:function(t,e){if(void 0!==this.gids&&void 0!==e.gid){var i=this.gids[e.gid];void 0!==i&&this.setFromJSON(t,i.getTileProperties(e.gid))}this.setFromJSON(t,e.properties)},setFromJSON:function(t,e){if(e)if(Array.isArray(e))for(var i=0;i<e.length;i++){var s=e[i];void 0!==t[s.name]?t[s.name]=s.value:t.setData(s.name,s.value)}else for(var r in e)void 0!==t[r]?t[r]=e[r]:t.setData(r,e[r])}});t.exports=s},15043:(t,e,i)=>{var s=i(93560),r=i(16586),n=i(90715),a=i(89797);t.exports=function(t,e,i,o,h,l,u,c){void 0===i&&(i=32),void 0===o&&(o=32),void 0===h&&(h=10),void 0===l&&(l=10),void 0===c&&(c=!1);var d=null;if(Array.isArray(u))d=n(void 0!==e?e:"map",s.ARRAY_2D,u,i,o,c);else if(void 0!==e){var f=t.cache.tilemap.get(e);f?d=n(e,f.format,f.data,i,o,c):console.warn("No map data found for key "+e)}return null===d&&(d=new r({tileWidth:i,tileHeight:o,width:h,height:l})),new a(t,d)}},29633:(t,e,i)=>{var s=i(56694),r=i(64937),n=i(12920),a=i(28699),o=i(66658),h=new s({Mixins:[r.AlphaSingle,r.Flip,r.Visible],initialize:function(t,e,i,s,r,n,a,o){this.layer=t,this.index=e,this.x=i,this.y=s,this.width=r,this.height=n,this.right,this.bottom,this.baseWidth=void 0!==a?a:r,this.baseHeight=void 0!==o?o:n,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(t,e){return!(t<this.pixelX||e<this.pixelY||t>this.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=a(t.properties),this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.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(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).x:this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new o),e.x=this.getLeft(t),e.y=this.getTop(t),e.width=this.getRight(t)-e.x,e.height=this.getBottom(t)-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},intersects:function(t,e,i,s){return!(i<=this.pixelX||s<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!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,t)&&(this.tilemapLayer&&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(t,e,i,s,r){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===s&&(s=t),void 0===r&&(r=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=s,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=s,r)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,s){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==s&&(this.baseHeight=s),this.updatePixelXY(),this},updatePixelXY:function(){var t=this.layer.orientation;if(t===n.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(t===n.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(t===n.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(t===n.HEXAGONAL){var e,i,s=this.layer.staggerAxis,r=this.layer.staggerIndex,a=this.layer.hexSideLength;"y"===s?(i=(this.baseHeight-a)/2+a,this.pixelX="odd"===r?this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*i):"x"===s&&(e=(this.baseWidth-a)/2+a,this.pixelX=this.x*e,this.pixelY="odd"===r?this.y*this.baseHeight+this.x%2*(this.baseHeight/2):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||void 0!==this.collisionCallback}},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 t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=h},89797:(t,e,i)=>{var s=i(14556),r=i(56694),n=i(75606),a=i(93560),o=i(72632),h=i(94990),l=i(46422),u=i(12920),c=i(52257),d=i(72677),f=i(13747),p=i(29633),g=i(5047),v=i(87177),m=i(47975),x=new r({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tiles=e.tiles,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;var i=this.orientation;this._convert={WorldToTileXY:g.GetWorldToTileXYFunction(i),WorldToTileX:g.GetWorldToTileXFunction(i),WorldToTileY:g.GetWorldToTileYFunction(i),TileToWorldXY:g.GetTileToWorldXYFunction(i),TileToWorldX:g.GetTileToWorldXFunction(i),TileToWorldY:g.GetTileToWorldYFunction(i),GetTileCorners:g.GetTileCornersFunction(i)}},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),e.indexOf(t)>-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,r,n,o,h,l){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn('Texture key "%s" not found',e),null;var u=this.scene.sys.textures.get(e),c=this.getTilesetIndex(t);if(null===c&&this.format===a.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',t,this.tilesets),null;var d=this.tilesets[c];return d?(d.setTileSize(i,r),d.setSpacing(n,o),d.setImage(u),d):(void 0===i&&(i=this.tileWidth),void 0===r&&(r=this.tileHeight),void 0===n&&(n=0),void 0===o&&(o=0),void 0===h&&(h=0),void 0===l&&(l={x:0,y:0}),(d=new m(t,h,i,r,n,o,void 0,void 0,l)).setImage(u),this.tilesets.push(d),this.tiles=s(this),d)},copy:function(t,e,i,s,r,n,a,o){return null!==(o=this.getLayer(o))?(g.Copy(t,e,i,s,r,n,a,o),this):null},createBlankLayer:function(t,e,i,s,r,n,a,o){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=this.width),void 0===n&&(n=this.height),void 0===a&&(a=this.tileWidth),void 0===o&&(o=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var l,u=new h({name:t,tileWidth:a,tileHeight:o,width:r,height:n,orientation:this.orientation}),c=0;c<n;c++){l=[];for(var d=0;d<r;d++)l.push(new p(u,-1,d,c,a,o,this.tileWidth,this.tileHeight));u.data.push(l)}this.layers.push(u),this.currentLayerIndex=this.layers.length-1;var f=new v(this.scene,this,this.currentLayerIndex,e,i,s);return f.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(f),f},createLayer:function(t,e,i,s){var r=this.getLayerIndex(t);if(null===r)return console.warn("Invalid Tilemap Layer ID: "+t),"string"==typeof t&&console.warn("Valid tilelayer names: %o",this.getTileLayerNames()),null;var n=this.layers[r];if(n.tilemapLayer)return console.warn("Tilemap Layer ID already exists:"+t),null;this.currentLayerIndex=r,void 0===i&&(i=n.x),void 0===s&&(s=n.y);var a=new v(this.scene,this,r,e,i,s);return a.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(a),a},createFromObjects:function(t,e,i){void 0===i&&(i=!0);var s=[],r=this.getObjectLayer(t);if(!r)return console.warn("createFromObjects: Invalid objectLayerName given: "+t),s;var a=new l(i?this.tilesets:void 0);Array.isArray(e)||(e=[e]);for(var h=r.objects,d=0;d<e.length;d++){var p,g=e[d],v=o(g,"id",null),m=o(g,"gid",null),x=o(g,"name",null),y=o(g,"type",null);a.enabled=!o(g,"ignoreTileset",null);for(var T=[],w=0;w<h.length;w++)p=h[w],(null===v&&null===m&&null===x&&null===y||null!==v&&p.id===v||null!==m&&p.gid===m||null!==x&&p.name===x||null!==y&&a.getTypeIncludingTile(p)===y)&&T.push(p);for(var E=o(g,"classType",f),S=o(g,"scene",this.scene),b=o(g,"container",null),A=o(g,"key",null),_=o(g,"frame",null),C=0;C<T.length;C++){p=T[C];var R=new E(S);if(R.setName(p.name),R.setPosition(p.x,p.y),a.setTextureAndFrame(R,A,_,p),p.width&&(R.displayWidth=p.width),p.height&&(R.displayHeight=p.height),this.orientation===u.ISOMETRIC){var M=this.tileWidth/this.tileHeight,P={x:R.x-R.y,y:(R.x+R.y)/M};R.x=P.x,R.y=P.y}var L={x:R.originX*p.width,y:(R.originY-(p.gid?1:0))*p.height};if(p.rotation){var O=n(p.rotation);c(L,O),R.rotation=O}R.x+=L.x,R.y+=L.y,void 0===p.flippedHorizontal&&void 0===p.flippedVertical||R.setFlip(p.flippedHorizontal,p.flippedVertical),p.visible||(R.visible=!1),a.setPropertiesFromTiledObject(R,p),b?b.add(R):S.add.existing(R),s.push(R)}}return s},createFromTiles:function(t,e,i,s,r,n){return null===(n=this.getLayer(n))?null:g.CreateFromTiles(t,e,i,s,r,n)},fill:function(t,e,i,s,r,n,a){return void 0===n&&(n=!0),null===(a=this.getLayer(a))?null:(g.Fill(t,e,i,s,r,n,a),this)},filterObjects:function(t,e,i){if("string"==typeof t){var s=t;if(!(t=this.getObjectLayer(t)))return console.warn("No object layer found with the name: "+s),null}return t.objects.filter(e,i)},filterTiles:function(t,e,i,s,r,n,a,o){return null===(o=this.getLayer(o))?null:g.FilterTiles(t,e,i,s,r,n,a,o)},findByIndex:function(t,e,i,s){return null===(s=this.getLayer(s))?null:g.FindByIndex(t,e,i,s)},findObject:function(t,e,i){if("string"==typeof t){var s=t;if(!(t=this.getObjectLayer(t)))return console.warn("No object layer found with the name: "+s),null}return t.objects.find(e,i)||null},findTile:function(t,e,i,s,r,n,a,o){return null===(o=this.getLayer(o))?null:g.FindTile(t,e,i,s,r,n,a,o)},forEachTile:function(t,e,i,s,r,n,a,o){return null===(o=this.getLayer(o))?null:(g.ForEachTile(t,e,i,s,r,n,a,o),this)},getImageIndex:function(t){return this.getIndex(this.images,t)},getImageLayerNames:function(){return this.images&&Array.isArray(this.images)?this.images.map((function(t){return t.name})):[]},getIndex:function(t,e){for(var i=0;i<t.length;i++)if(t[i].name===e)return i;return null},getLayer:function(t){var e=this.getLayerIndex(t);return null!==e?this.layers[e]:null},getObjectLayer:function(t){var e=this.getIndex(this.objects,t);return null!==e?this.objects[e]:null},getObjectLayerNames:function(){return this.objects&&Array.isArray(this.objects)?this.objects.map((function(t){return t.name})):[]},getLayerIndex:function(t){return void 0===t?this.currentLayerIndex:"string"==typeof t?this.getLayerIndexByName(t):"number"==typeof t&&t<this.layers.length?t:t instanceof v&&t.tilemap===this?t.layerIndex:null},getLayerIndexByName:function(t){return this.getIndex(this.layers,t)},getTileAt:function(t,e,i,s){return null===(s=this.getLayer(s))?null:g.GetTileAt(t,e,i,s)},getTileAtWorldXY:function(t,e,i,s,r){return null===(r=this.getLayer(r))?null:g.GetTileAtWorldXY(t,e,i,s,r)},getTileLayerNames:function(){return this.layers&&Array.isArray(this.layers)?this.layers.map((function(t){return t.name})):[]},getTilesWithin:function(t,e,i,s,r,n){return null===(n=this.getLayer(n))?null:g.GetTilesWithin(t,e,i,s,r,n)},getTilesWithinShape:function(t,e,i,s){return null===(s=this.getLayer(s))?null:g.GetTilesWithinShape(t,e,i,s)},getTilesWithinWorldXY:function(t,e,i,s,r,n,a){return null===(a=this.getLayer(a))?null:g.GetTilesWithinWorldXY(t,e,i,s,r,n,a)},getTileset:function(t){var e=this.getIndex(this.tilesets,t);return null!==e?this.tilesets[e]:null},getTilesetIndex:function(t){return this.getIndex(this.tilesets,t)},hasTileAt:function(t,e,i){return null===(i=this.getLayer(i))?null:g.HasTileAt(t,e,i)},hasTileAtWorldXY:function(t,e,i,s){return null===(s=this.getLayer(s))?null:g.HasTileAtWorldXY(t,e,i,s)},layer:{get:function(){return this.layers[this.currentLayerIndex]},set:function(t){this.setLayer(t)}},putTileAt:function(t,e,i,s,r){return void 0===s&&(s=!0),null===(r=this.getLayer(r))?null:g.PutTileAt(t,e,i,s,r)},putTileAtWorldXY:function(t,e,i,s,r,n){return void 0===s&&(s=!0),null===(n=this.getLayer(n))?null:g.PutTileAtWorldXY(t,e,i,s,r,n)},putTilesAt:function(t,e,i,s,r){return void 0===s&&(s=!0),null===(r=this.getLayer(r))?null:(g.PutTilesAt(t,e,i,s,r),this)},randomize:function(t,e,i,s,r,n){return null===(n=this.getLayer(n))?null:(g.Randomize(t,e,i,s,r,n),this)},calculateFacesAt:function(t,e,i){return null===(i=this.getLayer(i))?null:(g.CalculateFacesAt(t,e,i),this)},calculateFacesWithin:function(t,e,i,s,r){return null===(r=this.getLayer(r))?null:(g.CalculateFacesWithin(t,e,i,s,r),this)},removeLayer:function(t){var e=this.getLayerIndex(t);if(null!==e){d(this.layers,e);for(var i=e;i<this.layers.length;i++)this.layers[i].tilemapLayer&&this.layers[i].tilemapLayer.layerIndex--;return this.currentLayerIndex===e&&(this.currentLayerIndex=0),this}return null},destroyLayer:function(t){var e=this.getLayerIndex(t);return null!==e?((t=this.layers[e]).tilemapLayer.destroy(),d(this.layers,e),this.currentLayerIndex===e&&(this.currentLayerIndex=0),this):null},removeAllLayers:function(){for(var t=this.layers,e=0;e<t.length;e++)t[e].tilemapLayer&&t[e].tilemapLayer.destroy(!1);return t.length=0,this.currentLayerIndex=0,this},removeTile:function(t,e,i){void 0===e&&(e=-1),void 0===i&&(i=!0);var s=[];Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var n=t[r];s.push(this.removeTileAt(n.x,n.y,!0,i,n.tilemapLayer)),e>-1&&this.putTileAt(e,n.x,n.y,i,n.tilemapLayer)}return s},removeTileAt:function(t,e,i,s,r){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(r=this.getLayer(r))?null:g.RemoveTileAt(t,e,i,s,r)},removeTileAtWorldXY:function(t,e,i,s,r,n){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(n=this.getLayer(n))?null:g.RemoveTileAtWorldXY(t,e,i,s,r,n)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===u.ORTHOGONAL&&g.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,s=0;s<i.length;s++)g.RenderDebug(t,e,i[s]);return this},replaceByIndex:function(t,e,i,s,r,n,a){return null===(a=this.getLayer(a))?null:(g.ReplaceByIndex(t,e,i,s,r,n,a),this)},setCollision:function(t,e,i,s,r){return void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===r&&(r=!0),null===(s=this.getLayer(s))?null:(g.SetCollision(t,e,i,s,r),this)},setCollisionBetween:function(t,e,i,s,r){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(r=this.getLayer(r))?null:(g.SetCollisionBetween(t,e,i,s,r),this)},setCollisionByProperty:function(t,e,i,s){return void 0===e&&(e=!0),void 0===i&&(i=!0),null===(s=this.getLayer(s))?null:(g.SetCollisionByProperty(t,e,i,s),this)},setCollisionByExclusion:function(t,e,i,s){return void 0===e&&(e=!0),void 0===i&&(i=!0),null===(s=this.getLayer(s))?null:(g.SetCollisionByExclusion(t,e,i,s),this)},setCollisionFromCollisionGroup:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),null===(i=this.getLayer(i))?null:(g.SetCollisionFromCollisionGroup(t,e,i),this)},setTileIndexCallback:function(t,e,i,s){return null===(s=this.getLayer(s))?null:(g.SetTileIndexCallback(t,e,i,s),this)},setTileLocationCallback:function(t,e,i,s,r,n,a){return null===(a=this.getLayer(a))?null:(g.SetTileLocationCallback(t,e,i,s,r,n,a),this)},setLayer:function(t){var e=this.getLayerIndex(t);return null!==e&&(this.currentLayerIndex=e),this},setBaseTileSize:function(t,e){this.tileWidth=t,this.tileHeight=e,this.widthInPixels=this.width*t,this.heightInPixels=this.height*e;for(var i=0;i<this.layers.length;i++){this.layers[i].baseTileWidth=t,this.layers[i].baseTileHeight=e;for(var s=this.layers[i].data,r=this.layers[i].width,n=this.layers[i].height,a=0;a<n;a++)for(var o=0;o<r;o++){var h=s[a][o];null!==h&&h.setSize(void 0,void 0,t,e)}}return this},setLayerTileSize:function(t,e,i){if(null===(i=this.getLayer(i)))return this;i.tileWidth=t,i.tileHeight=e;for(var s=i.data,r=i.width,n=i.height,a=0;a<n;a++)for(var o=0;o<r;o++){var h=s[a][o];null!==h&&h.setSize(t,e)}return this},shuffle:function(t,e,i,s,r){return null===(r=this.getLayer(r))?null:(g.Shuffle(t,e,i,s,r),this)},swapByIndex:function(t,e,i,s,r,n,a){return null===(a=this.getLayer(a))?null:(g.SwapByIndex(t,e,i,s,r,n,a),this)},tileToWorldX:function(t,e,i){return null===(i=this.getLayer(i))?null:this._convert.TileToWorldX(t,e,i)},tileToWorldY:function(t,e,i){return null===(i=this.getLayer(i))?null:this._convert.TileToWorldY(t,e,i)},tileToWorldXY:function(t,e,i,s,r){return null===(r=this.getLayer(r))?null:this._convert.TileToWorldXY(t,e,i,s,r)},getTileCorners:function(t,e,i,s){return null===(s=this.getLayer(s))?null:this._convert.GetTileCorners(t,e,i,s)},weightedRandomize:function(t,e,i,s,r,n){return null===(n=this.getLayer(n))?null:(g.WeightedRandomize(e,i,s,r,t,n),this)},worldToTileX:function(t,e,i,s){return null===(s=this.getLayer(s))?null:this._convert.WorldToTileX(t,e,i,s)},worldToTileY:function(t,e,i,s){return null===(s=this.getLayer(s))?null:this._convert.WorldToTileY(t,e,i,s)},worldToTileXY:function(t,e,i,s,r,n){return null===(n=this.getLayer(n))?null:this._convert.WorldToTileXY(t,e,i,s,r,n)},destroy:function(){this.removeAllLayers(),this.tiles.length=0,this.tilesets.length=0,this.objects.length=0,this.scene=null}});t.exports=x},4843:(t,e,i)=>{var s=i(99325),r=i(15043);s.register("tilemap",(function(t){var e=void 0!==t?t:{};return r(this.scene,e.key,e.tileWidth,e.tileHeight,e.width,e.height,e.data,e.insertNull)}))},37940:(t,e,i)=>{var s=i(61286),r=i(15043);s.register("tilemap",(function(t,e,i,s,n,a,o){return null===t&&(t=void 0),null===e&&(e=void 0),null===i&&(i=void 0),null===s&&(s=void 0),null===n&&(n=void 0),r(this.scene,t,e,i,s,n,a,o)}))},87177:(t,e,i)=>{var s=i(56694),r=i(95239),n=i(64937),a=i(89980),o=i(5047),h=i(96193),l=i(93736),u=new s({Extends:a,Mixins:[n.Alpha,n.BlendMode,n.ComputedSize,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.PostPipeline,n.Transform,n.Visible,n.ScrollFactor,r,h],initialize:function(t,e,i,s,r,n){a.call(this,t,"TilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],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=o.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new l,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(s),this.setAlpha(this.layer.alpha),this.setPosition(r,n),this.setOrigin(0,0),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(t){var e=[],i=[],s=this.tilemap;Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var n=t[r];if("string"==typeof n&&(n=s.getTileset(n)),n){i.push(n);for(var a=n.firstgid,o=0;o<n.total;o++)e[a+o]=n}}this.gidMap=e,this.tileset=i},setRenderOrder:function(t){return"string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return o.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,s){return o.CalculateFacesWithin(t,e,i,s,this.layer),this},createFromTiles:function(t,e,i,s,r){return o.CreateFromTiles(t,e,i,s,r,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,s,r,n,a){return o.Copy(t,e,i,s,r,n,a,this.layer),this},fill:function(t,e,i,s,r,n){return o.Fill(t,e,i,s,r,n,this.layer),this},filterTiles:function(t,e,i,s,r,n,a){return o.FilterTiles(t,e,i,s,r,n,a,this.layer)},findByIndex:function(t,e,i){return o.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,s,r,n,a){return o.FindTile(t,e,i,s,r,n,a,this.layer)},forEachTile:function(t,e,i,s,r,n,a){return o.ForEachTile(t,e,i,s,r,n,a,this.layer),this},setTint:function(t,e,i,s,r,n){void 0===t&&(t=16777215);return this.forEachTile((function(e){e.tint=t,e.tintFill=!1}),this,e,i,s,r,n)},setTintFill:function(t,e,i,s,r,n){void 0===t&&(t=16777215);return this.forEachTile((function(e){e.tint=t,e.tintFill=!0}),this,e,i,s,r,n)},getTileAt:function(t,e,i){return o.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,s){return o.GetTileAtWorldXY(t,e,i,s,this.layer)},getIsoTileAtWorldXY:function(t,e,i,s,r){void 0===i&&(i=!0);var n=this.tempVec;return o.IsometricWorldToTileXY(t,e,!0,n,r,this.layer,i),this.getTileAt(n.x,n.y,s)},getTilesWithin:function(t,e,i,s,r){return o.GetTilesWithin(t,e,i,s,r,this.layer)},getTilesWithinShape:function(t,e,i){return o.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,s,r,n){return o.GetTilesWithinWorldXY(t,e,i,s,r,n,this.layer)},hasTileAt:function(t,e){return o.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return o.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,s){return o.PutTileAt(t,e,i,s,this.layer)},putTileAtWorldXY:function(t,e,i,s,r){return o.PutTileAtWorldXY(t,e,i,s,r,this.layer)},putTilesAt:function(t,e,i,s){return o.PutTilesAt(t,e,i,s,this.layer),this},randomize:function(t,e,i,s,r){return o.Randomize(t,e,i,s,r,this.layer),this},removeTileAt:function(t,e,i,s){return o.RemoveTileAt(t,e,i,s,this.layer)},removeTileAtWorldXY:function(t,e,i,s,r){return o.RemoveTileAtWorldXY(t,e,i,s,r,this.layer)},renderDebug:function(t,e){return o.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,s,r,n){return o.ReplaceByIndex(t,e,i,s,r,n,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,s){return o.SetCollision(t,e,i,this.layer,s),this},setCollisionBetween:function(t,e,i,s){return o.SetCollisionBetween(t,e,i,s,this.layer),this},setCollisionByProperty:function(t,e,i){return o.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return o.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return o.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return o.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,s,r,n){return o.SetTileLocationCallback(t,e,i,s,r,n,this.layer),this},shuffle:function(t,e,i,s){return o.Shuffle(t,e,i,s,this.layer),this},swapByIndex:function(t,e,i,s,r,n){return o.SwapByIndex(t,e,i,s,r,n,this.layer),this},tileToWorldX:function(t,e){return this.tilemap.tileToWorldX(t,e,this)},tileToWorldY:function(t,e){return this.tilemap.tileToWorldY(t,e,this)},tileToWorldXY:function(t,e,i,s){return this.tilemap.tileToWorldXY(t,e,i,s,this)},getTileCorners:function(t,e,i){return this.tilemap.getTileCorners(t,e,i,this)},weightedRandomize:function(t,e,i,s,r){return o.WeightedRandomize(e,i,s,r,t,this.layer),this},worldToTileX:function(t,e,i){return this.tilemap.worldToTileX(t,e,i,this)},worldToTileY:function(t,e,i){return this.tilemap.worldToTileY(t,e,i,this)},worldToTileXY:function(t,e,i,s,r){return this.tilemap.worldToTileXY(t,e,i,s,r,this)},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],a.prototype.destroy.call(this))}});t.exports=u},17394:(t,e,i)=>{var s=i(69360),r=new s,n=new s,a=new s;t.exports=function(t,e,i,s){var o=e.cull(i),h=o.length,l=i.alpha*e.alpha;if(!(0===h||l<=0)){var u=r,c=n,d=a;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(i.matrix);var f=t.currentContext,p=e.gidMap;f.save(),s?(u.multiplyWithOffset(s,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d),d.copyToContext(f)):(c.e-=i.scrollX*e.scrollFactorX,c.f-=i.scrollY*e.scrollFactorY,c.copyToContext(f)),(!t.antialias||e.scaleX>1||e.scaleY>1)&&(f.imageSmoothingEnabled=!1);for(var g=0;g<h;g++){var v=o[g],m=p[v.index];if(m){var x=m.image.getSourceImage(),y=m.getTileTextureCoordinates(v.index),T=m.tileWidth,w=m.tileHeight;if(null!==y&&0!==T&&0!==w){var E=.5*T,S=.5*w;y.x+=m.tileOffset.x,y.y+=m.tileOffset.y,f.save(),f.translate(v.pixelX+E,v.pixelY+S),0!==v.rotation&&f.rotate(v.rotation),(v.flipX||v.flipY)&&f.scale(v.flipX?-1:1,v.flipY?-1:1),f.globalAlpha=l*v.alpha,f.drawImage(x,y.x,y.y,T,w,-E,-S,T,w),f.restore()}}}f.restore()}}},96193:(t,e,i)=>{var s=i(72283),r=s,n=s;r=i(51395),n=i(17394),t.exports={renderWebGL:r,renderCanvas:n}},51395:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i){var r=e.cull(i),n=r.length,a=i.alpha*e.alpha;if(!(0===n||a<=0)){var o=e.gidMap,h=t.pipelines.set(e.pipeline,e),l=s.getTintAppendFloatAlpha,u=e.scrollFactorX,c=e.scrollFactorY,d=e.x,f=e.y,p=e.scaleX,g=e.scaleY;t.pipelines.preBatch(e);for(var v=0;v<n;v++){var m=r[v],x=o[m.index];if(x){var y=x.getTileTextureCoordinates(m.index);if(null!==y){var T=x.glTexture,w=h.setTexture2D(T,e),E=x.tileWidth,S=x.tileHeight,b=y.x,A=y.y,_=.5*x.tileWidth,C=.5*x.tileHeight,R=x.tileOffset.x,M=x.tileOffset.y,P=l(m.tint,a*m.alpha);h.batchTexture(e,T,T.width,T.height,d+m.pixelX*p+(_*p-R),f+m.pixelY*g+(C*g-M),m.width,m.height,p,g,m.rotation,m.flipX,m.flipY,u,c,_,C,b,A,E,S,P,P,P,P,m.tintFill,0,0,i,null,!0,w,!0)}}}t.pipelines.postBatch(e)}}},47975:(t,e,i)=>{var s=i(56694),r=i(93736),n=new s({initialize:function(t,e,i,s,n,a,o,h,l){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===n&&(n=0),void 0===a&&(a=0),void 0===o&&(o={}),void 0===h&&(h={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=s,this.tileMargin=n,this.tileSpacing=a,this.tileProperties=o,this.tileData=h,this.tileOffset=new r,void 0!==l&&this.tileOffset.set(l.x,l.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},getTileTextureCoordinates:function(t){return this.containsTileIndex(t)?this.texCoordinates[t-this.firstgid]:null},setImage:function(t){return this.image=t,this.glTexture=t.get().source.glTexture,this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setTileSize:function(t,e){return void 0!==t&&(this.tileWidth=t),void 0!==e&&(this.tileHeight=e),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(t,e){return void 0!==t&&(this.tileMargin=t),void 0!==e&&(this.tileSpacing=e),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(t,e){var i=(e-2*this.tileMargin+this.tileSpacing)/(this.tileHeight+this.tileSpacing),s=(t-2*this.tileMargin+this.tileSpacing)/(this.tileWidth+this.tileSpacing);i%1==0&&s%1==0||console.warn("Image tile area not tile size multiple in: "+this.name),i=Math.floor(i),s=Math.floor(s),this.rows=i,this.columns=s,this.total=i*s,this.texCoordinates.length=0;for(var r=this.tileMargin,n=this.tileMargin,a=0;a<this.rows;a++){for(var o=0;o<this.columns;o++)this.texCoordinates.push({x:r,y:n}),r+=this.tileWidth+this.tileSpacing;r=this.tileMargin,n+=this.tileHeight+this.tileSpacing}return this}});t.exports=n},92839:(t,e,i)=>{var s=i(15494);t.exports=function(t,e,i){var r=s(t,e,!0,i),n=s(t,e-1,!0,i),a=s(t,e+1,!0,i),o=s(t-1,e,!0,i),h=s(t+1,e,!0,i),l=r&&r.collides;return l&&(r.faceTop=!0,r.faceBottom=!0,r.faceLeft=!0,r.faceRight=!0),n&&n.collides&&(l&&(r.faceTop=!1),n.faceBottom=!l),a&&a.collides&&(l&&(r.faceBottom=!1),a.faceTop=!l),o&&o.collides&&(l&&(r.faceLeft=!1),o.faceRight=!l),h&&h.collides&&(l&&(r.faceRight=!1),h.faceLeft=!l),r&&!r.collides&&r.resetFaces(),r}},60386:(t,e,i)=>{var s=i(15494),r=i(50811);t.exports=function(t,e,i,n,a){for(var o=null,h=null,l=null,u=null,c=r(t,e,i,n,null,a),d=0;d<c.length;d++){var f=c[d];f&&(f.collides?(o=s(f.x,f.y-1,!0,a),h=s(f.x,f.y+1,!0,a),l=s(f.x-1,f.y,!0,a),u=s(f.x+1,f.y,!0,a),f.faceTop=!o||!o.collides,f.faceBottom=!h||!h.collides,f.faceLeft=!l||!l.collides,f.faceRight=!u||!u.collides):f.resetFaces())}}},13125:(t,e,i)=>{var s=new(i(93736));t.exports=function(t,e,i,r){var n=i.tilemapLayer,a=n.cullPaddingX,o=n.cullPaddingY,h=n.tilemap.tileToWorldXY(t,e,s,r,n);return h.x>r.worldView.x+n.scaleX*i.tileWidth*(-a-.5)&&h.x<r.worldView.right+n.scaleX*i.tileWidth*(a-.5)&&h.y>r.worldView.y+n.scaleY*i.tileHeight*(-o-1)&&h.y<r.worldView.bottom+n.scaleY*i.tileHeight*(o-.5)}},17347:(t,e,i)=>{var s=i(60386),r=i(50811),n=i(62839),a=i(29633);t.exports=function(t,e,i,o,h,l,u,c){void 0===u&&(u=!0);var d=r(t,e,i,o,null,c),f=[];d.forEach((function(t){var e=new a(t.layer,t.index,t.x,t.y,t.width,t.height,t.baseWidth,t.baseHeight);e.copy(t),f.push(e)}));for(var p=h-t,g=l-e,v=0;v<f.length;v++){var m=f[v],x=m.x+p,y=m.y+g;n(x,y,c)&&c.data[y][x]&&(m.x=x,m.y=y,m.updatePixelXY(),c.data[y][x]=m)}u&&s(h-1,l-1,i+2,o+2,c),d.length=0,f.length=0}},93604:(t,e,i)=>{var s=i(50811),r=i(51202);t.exports=function(t,e,i,n,a,o){i||(i={}),Array.isArray(t)||(t=[t]);var h=o.tilemapLayer;n||(n=h.scene),a||(a=n.cameras.main);var l,u=s(0,0,o.width,o.height,null,o),c=[];for(l=0;l<u.length;l++){var d=u[l];if(-1!==t.indexOf(d.index)){var f=h.tileToWorldXY(d.x,d.y,void 0,a,o);i.x=f.x,i.y=f.y,c.push(n.make.sprite(i))}}if("number"==typeof e)for(l=0;l<t.length;l++)r(t[l],e,0,0,o.width,o.height,o);else if(Array.isArray(e))for(l=0;l<t.length;l++)r(t[l],e[l],0,0,o.width,o.height,o);return c}},71586:(t,e,i)=>{var s=i(74118),r=i(82127),n=i(84314),a=new s;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,s=t.tilemapLayer,o=Math.floor(i.tileWidth*s.scaleX),h=Math.floor(i.tileHeight*s.scaleY),l=n(e.worldView.x-s.x,o,0,!0)-s.cullPaddingX,u=r(e.worldView.right-s.x,o,0,!0)+s.cullPaddingX,c=n(e.worldView.y-s.y,h,0,!0)-s.cullPaddingY,d=r(e.worldView.bottom-s.y,h,0,!0)+s.cullPaddingY;return a.setTo(l,c,u-l,d-c)}},381:(t,e,i)=>{var s=i(71586),r=i(6987);t.exports=function(t,e,i,n){void 0===i&&(i=[]),void 0===n&&(n=0),i.length=0;var a=t.tilemapLayer,o=s(t,e);return(a.skipCull||1!==a.scrollFactorX||1!==a.scrollFactorY)&&(o.left=0,o.right=t.width,o.top=0,o.bottom=t.height),r(t,o,n,i),i}},97734:(t,e,i)=>{var s=i(50811),r=i(60386),n=i(68234);t.exports=function(t,e,i,a,o,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=s(e,i,a,o,null,l),d=0;d<c.length;d++)c[d].index=t,n(c[d],u);h&&r(e-1,i-1,a+2,o+2,l)}},63555:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,r,n,a,o,h){return s(i,r,n,a,o,h).filter(t,e)}},37982:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=!1);var r,n,a,o=0;if(i){for(n=s.height-1;n>=0;n--)for(r=s.width-1;r>=0;r--)if((a=s.data[n][r])&&a.index===t){if(o===e)return a;o+=1}}else for(n=0;n<s.height;n++)for(r=0;r<s.width;r++)if((a=s.data[n][r])&&a.index===t){if(o===e)return a;o+=1}return null}},48297:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,r,n,a,o,h){return s(i,r,n,a,o,h).find(t,e)||null}},80916:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,r,n,a,o,h){s(i,r,n,a,o,h).forEach(t,e)}},31493:(t,e,i)=>{var s=i(12920),r=i(381),n=i(37524),a=i(20887),o=i(72283),h=i(19242);t.exports=function(t){return t===s.ORTHOGONAL?r:t===s.HEXAGONAL?n:t===s.STAGGERED?h:t===s.ISOMETRIC?a:o}},15494:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i,r){if(void 0===i&&(i=!1),s(t,e,r)){var n=r.data[e][t]||null;return n?-1===n.index?i?n:null:n:null}return null}},24640:(t,e,i)=>{var s=i(15494),r=new(i(93736));t.exports=function(t,e,i,n,a){return a.tilemapLayer.worldToTileXY(t,e,!0,r,n),s(r.x,r.y,i,a)}},48495:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,r){var n=r.baseTileWidth,a=r.baseTileHeight,o=r.tilemapLayer,h=0,l=0;o&&(i||(i=o.scene.cameras.main),h=o.x+i.scrollX*(1-o.scrollFactorX),l=o.y+i.scrollY*(1-o.scrollFactorY),n*=o.scaleX,a*=o.scaleY);var u=h+t*n,c=l+e*a;return[new s(u,c),new s(u+n,c),new s(u+n,c+a),new s(u,c+a)]}},7160:(t,e,i)=>{var s=i(12920),r=i(63634),n=i(72283),a=i(48495);t.exports=function(t){return t===s.ORTHOGONAL?a:t===s.ISOMETRIC?n:t===s.HEXAGONAL?r:(s.STAGGERED,n)}},16884:(t,e,i)=>{var s=i(12920),r=i(72283),n=i(44150);t.exports=function(t){return t===s.ORTHOGONAL?n:r}},68182:(t,e,i)=>{var s=i(12920),r=i(21715),n=i(21808),a=i(72283),o=i(33388),h=i(46836);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?n:t===s.HEXAGONAL?r:t===s.STAGGERED?o:a}},3752:(t,e,i)=>{var s=i(12920),r=i(72283),n=i(84132),a=i(42477);t.exports=function(t){return t===s.ORTHOGONAL?a:t===s.STAGGERED?n:r}},50811:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,r,n,a){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=a.width),void 0===r&&(r=a.height),n||(n={});var o=s(n,"isNotEmpty",!1),h=s(n,"isColliding",!1),l=s(n,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(r+=e,e=0),t+i>a.width&&(i=Math.max(a.width-t,0)),e+r>a.height&&(r=Math.max(a.height-e,0));for(var u=[],c=e;c<e+r;c++)for(var d=t;d<t+i;d++){var f=a.data[c][d];if(null!==f){if(o&&-1===f.index)continue;if(h&&!f.collides)continue;if(l&&!f.hasInterestingFace)continue;u.push(f)}}return u}},31674:(t,e,i)=>{var s=i(84068),r=i(50811),n=i(7563),a=i(72283),o=i(93736),h=function(t,e){return n.RectangleToTriangle(e,t)},l=new o,u=new o,c=new o;t.exports=function(t,e,i,o){if(void 0===t)return[];var d=a;t instanceof s.Circle?d=n.CircleToRectangle:t instanceof s.Rectangle?d=n.RectangleToRectangle:t instanceof s.Triangle?d=h:t instanceof s.Line&&(d=n.LineToRectangle),o.tilemapLayer.worldToTileXY(t.left,t.top,!0,u,i);var f=u.x,p=u.y;o.tilemapLayer.worldToTileXY(t.right,t.bottom,!1,c,i);var g=Math.ceil(c.x),v=Math.ceil(c.y),m=Math.max(g-f,1),x=Math.max(v-p,1),y=r(f,p,m,x,e,o),T=o.tileWidth,w=o.tileHeight;o.tilemapLayer&&(T*=o.tilemapLayer.scaleX,w*=o.tilemapLayer.scaleY);for(var E=[],S=new s.Rectangle(0,0,T,w),b=0;b<y.length;b++){var A=y[b];o.tilemapLayer.tileToWorldXY(A.x,A.y,l,i),S.x=l.x,S.y=l.y,d(t,S)&&E.push(A)}return E}},44662:(t,e,i)=>{var s=i(50811),r=i(93736),n=new r,a=new r;t.exports=function(t,e,i,r,o,h,l){var u=l.tilemapLayer.tilemap._convert.WorldToTileXY;u(t,e,!0,n,h,l);var c=n.x,d=n.y;u(t+i,e+r,!1,a,h,l);var f=Math.ceil(a.x),p=Math.ceil(a.y);return s(c,d,f-c,p-d,o,l)}},29296:(t,e,i)=>{var s=i(12920),r=i(10618),n=i(806);t.exports=function(t){return t===s.ORTHOGONAL?n:r}},32688:(t,e,i)=>{var s=i(12920),r=i(11516),n=i(18750),a=i(72283),o=i(90562),h=i(45676);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?n:t===s.HEXAGONAL?r:t===s.STAGGERED?o:a}},74326:(t,e,i)=>{var s=i(12920),r=i(10618),n=i(3689),a=i(70520);t.exports=function(t){return t===s.ORTHOGONAL?a:t===s.STAGGERED?n:r}},46598:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i){if(s(t,e,i)){var r=i.data[e][t];return null!==r&&r.index>-1}return!1}},28654:(t,e,i)=>{var s=i(46598),r=new(i(93736));t.exports=function(t,e,i,n){n.tilemapLayer.worldToTileXY(t,e,!0,r,i);var a=r.x,o=r.y;return s(a,o,n)}},6358:(t,e,i)=>{var s=i(82127),r=i(84314);t.exports=function(t,e){var i,n,a,o,h=t.tilemapLayer.tilemap,l=t.tilemapLayer,u=Math.floor(h.tileWidth*l.scaleX),c=Math.floor(h.tileHeight*l.scaleY),d=t.hexSideLength;if("y"===t.staggerAxis){var f=(c-d)/2+d;i=r(e.worldView.x-l.x,u,0,!0)-l.cullPaddingX,n=s(e.worldView.right-l.x,u,0,!0)+l.cullPaddingX,a=r(e.worldView.y-l.y,f,0,!0)-l.cullPaddingY,o=s(e.worldView.bottom-l.y,f,0,!0)+l.cullPaddingY}else{var p=(u-d)/2+d;i=r(e.worldView.x-l.x,p,0,!0)-l.cullPaddingX,n=s(e.worldView.right-l.x,p,0,!0)+l.cullPaddingX,a=r(e.worldView.y-l.y,c,0,!0)-l.cullPaddingY,o=s(e.worldView.bottom-l.y,c,0,!0)+l.cullPaddingY}return{left:i,right:n,top:a,bottom:o}}},37524:(t,e,i)=>{var s=i(6358),r=i(6987);t.exports=function(t,e,i,n){void 0===i&&(i=[]),void 0===n&&(n=0),i.length=0;var a=t.tilemapLayer,o=s(t,e);return a.skipCull&&1===a.scrollFactorX&&1===a.scrollFactorY&&(o.left=0,o.right=t.width,o.top=0,o.bottom=t.height),r(t,o,n,i),i}},63634:(t,e,i)=>{var s=i(21715),r=i(93736),n=new r;t.exports=function(t,e,i,a){var o=a.baseTileWidth,h=a.baseTileHeight,l=a.tilemapLayer;l&&(o*=l.scaleX,h*=l.scaleY);var u,c,d=s(t,e,n,i,a),f=[],p=.5773502691896257;"y"===a.staggerAxis?(u=p*o,c=h/2):(u=o/2,c=p*h);for(var g=0;g<6;g++){var v=2*Math.PI*(.5-g)/6;f.push(new r(d.x+u*Math.cos(v),d.y+c*Math.sin(v)))}return f}},21715:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,r,n){i||(i=new s);var a=n.baseTileWidth,o=n.baseTileHeight,h=n.tilemapLayer,l=0,u=0;h&&(r||(r=h.scene.cameras.main),l=h.x+r.scrollX*(1-h.scrollFactorX),u=h.y+r.scrollY*(1-h.scrollFactorY),a*=h.scaleX,o*=h.scaleY);var c,d,f=a/2,p=o/2;return"y"===n.staggerAxis?(c=l+a*t+a,d=u+1.5*e*p+p,e%2==0&&("odd"===this.staggerIndex?c-=f:c+=f)):"x"===this.staggerAxis&&"odd"===this.staggerIndex&&(c=l+1.5*t*f+f,d=u+o*t+o,t%2==0&&("odd"===this.staggerIndex?d-=p:d+=p)),i.set(c,d)}},11516:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,r,n,a){r||(r=new s);var o=a.baseTileWidth,h=a.baseTileHeight,l=a.tilemapLayer;l&&(n||(n=l.scene.cameras.main),t-=l.x+n.scrollX*(1-l.scrollFactorX),e-=l.y+n.scrollY*(1-l.scrollFactorY),o*=l.scaleX,h*=l.scaleY);var u,c,d,f,p,g=.5773502691896257,v=-.3333333333333333,m=.6666666666666666,x=o/2,y=h/2;"y"===a.staggerAxis?(d=g*(u=(t-x)/(g*o))+v*(c=(e-y)/y),f=0*u+m*c):(d=v*(u=(t-x)/x)+g*(c=(e-y)/(g*h)),f=m*u+0*c),p=-d-f;var T,w=Math.round(d),E=Math.round(f),S=Math.round(p),b=Math.abs(w-d),A=Math.abs(E-f),_=Math.abs(S-p);b>A&&b>_?w=-E-S:A>_&&(E=-w-S);var C=E;return T="odd"===a.staggerIndex?C%2==0?E/2+w:E/2+w-.5:C%2==0?E/2+w:E/2+w+.5,r.set(T,C)}},62839:t=>{t.exports=function(t,e,i){return t>=0&&t<i.width&&e>=0&&e<i.height}},20887:(t,e,i)=>{var s=i(13125);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var n,a,o,h=t.tilemapLayer,l=t.data,u=t.width,c=t.height,d=h.skipCull,f=u,p=c;if(0===r)for(a=0;a<p;a++)for(n=0;n<f;n++)(o=l[a][n])&&-1!==o.index&&o.visible&&0!==o.alpha&&(d||s(n,a,t,e))&&i.push(o);else if(1===r)for(a=0;a<p;a++)for(n=f;n>=0;n--)(o=l[a][n])&&-1!==o.index&&o.visible&&0!==o.alpha&&(d||s(n,a,t,e))&&i.push(o);else if(2===r)for(a=p;a>=0;a--)for(n=0;n<f;n++)(o=l[a][n])&&-1!==o.index&&o.visible&&0!==o.alpha&&(d||s(n,a,t,e))&&i.push(o);else if(3===r)for(a=p;a>=0;a--)for(n=f;n>=0;n--)(o=l[a][n])&&-1!==o.index&&o.visible&&0!==o.alpha&&(d||s(n,a,t,e))&&i.push(o);return h.tilesDrawn=i.length,h.tilesTotal=u*c,i}},21808:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,r,n){i||(i=new s);var a=n.baseTileWidth,o=n.baseTileHeight,h=n.tilemapLayer,l=0,u=0;h&&(r||(r=h.scene.cameras.main),l=h.x+r.scrollX*(1-h.scrollFactorX),a*=h.scaleX,u=h.y+r.scrollY*(1-h.scrollFactorY),o*=h.scaleY);var c=l+a/2*(t-e),d=u+(t+e)*(o/2);return i.set(c,d)}},18750:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,r,n,a,o){r||(r=new s);var h=a.baseTileWidth,l=a.baseTileHeight,u=a.tilemapLayer;u&&(n||(n=u.scene.cameras.main),e-=u.y+n.scrollY*(1-u.scrollFactorY),l*=u.scaleY,t-=u.x+n.scrollX*(1-u.scrollFactorX),h*=u.scaleX);var c=h/2,d=l/2;o||(e-=l);var f=.5*((t-=c)/c+e/d),p=.5*(-t/c+e/d);return i&&(f=Math.floor(f),p=Math.floor(p)),r.set(f,p)}},29003:(t,e,i)=>{var s=i(29633),r=i(62839),n=i(92839),a=i(68234);t.exports=function(t,e,i,o,h){if(void 0===o&&(o=!0),!r(e,i,h))return null;var l,u=h.data[i][e],c=u&&u.collides;t instanceof s?(null===h.data[i][e]&&(h.data[i][e]=new s(h,t.index,e,i,h.tileWidth,h.tileHeight)),h.data[i][e].copy(t)):(l=t,null===h.data[i][e]?h.data[i][e]=new s(h,l,e,i,h.tileWidth,h.tileHeight):h.data[i][e].index=l);var d=h.data[i][e],f=-1!==h.collideIndexes.indexOf(d.index);if(-1===(l=t instanceof s?t.index:t))d.width=h.tileWidth,d.height=h.tileHeight;else{var p=h.tilemapLayer.tilemap,g=p.tiles[l][2],v=p.tilesets[g];d.width=v.tileWidth,d.height=v.tileHeight}return a(d,f),o&&c!==d.collides&&n(e,i,h),d}},48565:(t,e,i)=>{var s=i(29003),r=new(i(93736));t.exports=function(t,e,i,n,a,o){return o.tilemapLayer.worldToTileXY(e,i,!0,r,a,o),s(t,r.x,r.y,n,o)}},56547:(t,e,i)=>{var s=i(60386),r=i(29003);t.exports=function(t,e,i,n,a){if(void 0===n&&(n=!0),!Array.isArray(t))return null;Array.isArray(t[0])||(t=[t]);for(var o=t.length,h=t[0].length,l=0;l<o;l++)for(var u=0;u<h;u++){var c=t[l][u];r(c,e+u,i+l,!1,a)}n&&s(e-1,i-1,h+2,o+2,a)}},91180:(t,e,i)=>{var s=i(50811),r=i(72861);t.exports=function(t,e,i,n,a,o){var h,l=s(t,e,i,n,{},o);if(!a)for(a=[],h=0;h<l.length;h++)-1===a.indexOf(l[h].index)&&a.push(l[h].index);for(h=0;h<l.length;h++)l[h].index=r(a)}},929:(t,e,i)=>{var s=i(29633),r=i(62839),n=i(92839);t.exports=function(t,e,i,a,o){if(void 0===i&&(i=!0),void 0===a&&(a=!0),!r(t,e,o))return null;var h=o.data[e][t];return h?(o.data[e][t]=i?null:new s(o,-1,t,e,o.tileWidth,o.tileHeight),a&&h&&h.collides&&n(t,e,o),h):null}},17384:(t,e,i)=>{var s=i(929),r=new(i(93736));t.exports=function(t,e,i,n,a,o){return o.tilemapLayer.worldToTileXY(t,e,!0,r,a,o),s(r.x,r.y,i,n,o)}},93763:(t,e,i)=>{var s=i(50811),r=i(95509),n=new r(105,210,231,150),a=new r(243,134,48,200),o=new r(40,39,37,150);t.exports=function(t,e,i){void 0===e&&(e={});var r=void 0!==e.tileColor?e.tileColor:n,h=void 0!==e.collidingTileColor?e.collidingTileColor:a,l=void 0!==e.faceColor?e.faceColor:o,u=s(0,0,i.width,i.height,null,i);t.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),t.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var c=0;c<u.length;c++){var d=u[c],f=d.width,p=d.height,g=d.pixelX,v=d.pixelY,m=d.collides?h:r;null!==m&&(t.fillStyle(m.color,m.alpha/255),t.fillRect(g,v,f,p)),g+=1,v+=1,f-=2,p-=2,null!==l&&(t.lineStyle(1,l.color,l.alpha/255),d.faceTop&&t.lineBetween(g,v,g+f,v),d.faceRight&&t.lineBetween(g+f,v,g+f,v+p),d.faceBottom&&t.lineBetween(g,v+p,g+f,v+p),d.faceLeft&&t.lineBetween(g,v,g,v+p))}}},51202:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,r,n,a,o){for(var h=s(i,r,n,a,null,o),l=0;l<h.length;l++)h[l]&&h[l].index===t&&(h[l].index=e)}},6987:t=>{t.exports=function(t,e,i,s){var r,n,a,o=t.data,h=t.width,l=t.height,u=t.tilemapLayer,c=Math.max(0,e.left),d=Math.min(h,e.right),f=Math.max(0,e.top),p=Math.min(l,e.bottom);if(0===i)for(n=f;n<p;n++)for(r=c;o[n]&&r<d;r++)(a=o[n][r])&&-1!==a.index&&a.visible&&0!==a.alpha&&s.push(a);else if(1===i)for(n=f;n<p;n++)for(r=d;o[n]&&r>=c;r--)(a=o[n][r])&&-1!==a.index&&a.visible&&0!==a.alpha&&s.push(a);else if(2===i)for(n=p;n>=f;n--)for(r=c;o[n]&&r<d;r++)(a=o[n][r])&&-1!==a.index&&a.visible&&0!==a.alpha&&s.push(a);else if(3===i)for(n=p;n>=f;n--)for(r=d;o[n]&&r>=c;r--)(a=o[n][r])&&-1!==a.index&&a.visible&&0!==a.alpha&&s.push(a);return u.tilesDrawn=s.length,u.tilesTotal=h*l,s}},51710:(t,e,i)=>{var s=i(68234),r=i(60386),n=i(91181);t.exports=function(t,e,i,a,o){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===o&&(o=!0),Array.isArray(t)||(t=[t]);for(var h=0;h<t.length;h++)n(t[h],e,a);if(o)for(var l=0;l<a.height;l++)for(var u=0;u<a.width;u++){var c=a.data[l][u];c&&-1!==t.indexOf(c.index)&&s(c,e)}i&&r(0,0,a.width,a.height,a)}},15216:(t,e,i)=>{var s=i(68234),r=i(60386),n=i(91181);t.exports=function(t,e,i,a,o,h){if(void 0===i&&(i=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),!(t>e)){for(var l=t;l<=e;l++)n(l,i,o);if(h)for(var u=0;u<o.height;u++)for(var c=0;c<o.width;c++){var d=o.data[u][c];d&&d.index>=t&&d.index<=e&&s(d,i)}a&&r(0,0,o.width,o.height,o)}}},33158:(t,e,i)=>{var s=i(68234),r=i(60386),n=i(91181);t.exports=function(t,e,i,a){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var o=0;o<a.height;o++)for(var h=0;h<a.width;h++){var l=a.data[o][h];l&&-1===t.indexOf(l.index)&&(s(l,e),n(l.index,e,a))}i&&r(0,0,a.width,a.height,a)}},4180:(t,e,i)=>{var s=i(68234),r=i(60386),n=i(19256);t.exports=function(t,e,i,a){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var o=0;o<a.height;o++)for(var h=0;h<a.width;h++){var l=a.data[o][h];if(l)for(var u in t)if(n(l.properties,u)){var c=t[u];Array.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++)l.properties[u]===c[d]&&s(l,e)}}i&&r(0,0,a.width,a.height,a)}},18625:(t,e,i)=>{var s=i(68234),r=i(60386);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var n=0;n<i.height;n++)for(var a=0;a<i.width;a++){var o=i.data[n][a];if(o){var h=o.getCollisionGroup();h&&h.objects&&h.objects.length>0&&s(o,t)}}e&&r(0,0,i.width,i.height,i)}},91181:t=>{t.exports=function(t,e,i){var s=i.collideIndexes.indexOf(t);e&&-1===s?i.collideIndexes.push(t):e||-1===s||i.collideIndexes.splice(s,1)}},68234:t=>{t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},11628:t=>{t.exports=function(t,e,i,s){if("number"==typeof t)s.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var r=0,n=t.length;r<n;r++)s.callbacks[t[r]]=null!==e?{callback:e,callbackContext:i}:void 0}},72732:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,r,n,a,o){for(var h=s(t,e,i,r,null,o),l=0;l<h.length;l++)h[l].setCollisionCallback(n,a)}},34397:(t,e,i)=>{var s=i(50811),r=i(18592);t.exports=function(t,e,i,n,a){var o=s(t,e,i,n,null,a),h=o.map((function(t){return t.index}));r(h);for(var l=0;l<o.length;l++)o[l].index=h[l]}},53945:(t,e,i)=>{var s=i(82127),r=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,n=t.tilemapLayer,a=Math.floor(i.tileWidth*n.scaleX),o=Math.floor(i.tileHeight*n.scaleY);return{left:r(e.worldView.x-n.x,a,0,!0)-n.cullPaddingX,right:s(e.worldView.right-n.x,a,0,!0)+n.cullPaddingX,top:r(e.worldView.y-n.y,o/2,0,!0)-n.cullPaddingY,bottom:s(e.worldView.bottom-n.y,o/2,0,!0)+n.cullPaddingY}}},19242:(t,e,i)=>{var s=i(53945),r=i(6987);t.exports=function(t,e,i,n){void 0===i&&(i=[]),void 0===n&&(n=0),i.length=0;var a=t.tilemapLayer,o=s(t,e);return a.skipCull&&1===a.scrollFactorX&&1===a.scrollFactorY&&(o.left=0,o.right=t.width,o.top=0,o.bottom=t.height),r(t,o,n,i),i}},33388:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,r,n){i||(i=new s);var a=n.baseTileWidth,o=n.baseTileHeight,h=n.tilemapLayer,l=0,u=0;h&&(r||(r=h.scene.cameras.main),l=h.x+r.scrollX*(1-h.scrollFactorX),a*=h.scaleX,u=h.y+r.scrollY*(1-h.scrollFactorY),o*=h.scaleY);var c=l+t*a+e%2*(a/2),d=u+e*(o/2);return i.set(c,d)}},84132:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,r=i.tilemapLayer,n=0;return r&&(void 0===e&&(e=r.scene.cameras.main),n=r.y+e.scrollY*(1-r.scrollFactorY),s*=r.scaleY),n+t*(s/2)+s}},90562:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,r,n,a){r||(r=new s);var o=a.baseTileWidth,h=a.baseTileHeight,l=a.tilemapLayer;l&&(n||(n=l.scene.cameras.main),e-=l.y+n.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+n.scrollX*(1-l.scrollFactorX),o*=l.scaleX);var u=i?Math.floor(e/(h/2)):e/(h/2),c=i?Math.floor((t+u%2*.5*o)/o):(t+u%2*.5*o)/o;return r.set(c,u)}},3689:t=>{t.exports=function(t,e,i,s){var r=s.baseTileHeight,n=s.tilemapLayer;return n&&(i||(i=n.scene.cameras.main),t-=n.y+i.scrollY*(1-n.scrollFactorY),r*=n.scaleY),e?Math.floor(t/(r/2)):t/(r/2)}},55217:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,r,n,a,o){for(var h=s(i,r,n,a,null,o),l=0;l<h.length;l++)h[l]&&(h[l].index===t?h[l].index=e:h[l].index===e&&(h[l].index=t))}},44150:t=>{t.exports=function(t,e,i){var s=i.baseTileWidth,r=i.tilemapLayer,n=0;return r&&(e||(e=r.scene.cameras.main),n=r.x+e.scrollX*(1-r.scrollFactorX),s*=r.scaleX),n+t*s}},46836:(t,e,i)=>{var s=i(44150),r=i(42477),n=i(93736);t.exports=function(t,e,i,a,o){return i||(i=new n(0,0)),i.x=s(t,a,o),i.y=r(e,a,o),i}},42477:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,r=i.tilemapLayer,n=0;return r&&(e||(e=r.scene.cameras.main),n=r.y+e.scrollY*(1-r.scrollFactorY),s*=r.scaleY),n+t*s}},39677:(t,e,i)=>{var s=i(50811),r=i(5923);t.exports=function(t,e,i,n,a,o){if(a){var h,l=s(t,e,i,n,null,o),u=0;for(h=0;h<a.length;h++)u+=a[h].weight;if(!(u<=0))for(h=0;h<l.length;h++){for(var c=r.RND.frac()*u,d=0,f=-1,p=0;p<a.length;p++)if(c<=(d+=a[p].weight)){var g=a[p].index;f=Array.isArray(g)?g[Math.floor(r.RND.frac()*g.length)]:g;break}l[h].index=f}}}},806:(t,e,i)=>{var s=i(45676),r=new(i(93736));t.exports=function(t,e,i,n){return s(t,0,e,r,i,n),r.x}},45676:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,r,n,a){void 0===i&&(i=!0),r||(r=new s);var o=a.baseTileWidth,h=a.baseTileHeight,l=a.tilemapLayer;l&&(n||(n=l.scene.cameras.main),t-=l.x+n.scrollX*(1-l.scrollFactorX),e-=l.y+n.scrollY*(1-l.scrollFactorY),o*=l.scaleX,h*=l.scaleY);var u=t/o,c=e/h;return i&&(u=Math.floor(u),c=Math.floor(c)),r.set(u,c)}},70520:(t,e,i)=>{var s=i(45676),r=new(i(93736));t.exports=function(t,e,i,n){return s(0,t,e,r,i,n),r.y}},5047:(t,e,i)=>{t.exports={CalculateFacesAt:i(92839),CalculateFacesWithin:i(60386),CheckIsoBounds:i(13125),Copy:i(17347),CreateFromTiles:i(93604),CullBounds:i(71586),CullTiles:i(381),Fill:i(97734),FilterTiles:i(63555),FindByIndex:i(37982),FindTile:i(48297),ForEachTile:i(80916),GetCullTilesFunction:i(31493),GetTileAt:i(15494),GetTileAtWorldXY:i(24640),GetTileCorners:i(48495),GetTileCornersFunction:i(7160),GetTilesWithin:i(50811),GetTilesWithinShape:i(31674),GetTilesWithinWorldXY:i(44662),GetTileToWorldXFunction:i(16884),GetTileToWorldXYFunction:i(68182),GetTileToWorldYFunction:i(3752),GetWorldToTileXFunction:i(29296),GetWorldToTileXYFunction:i(32688),GetWorldToTileYFunction:i(74326),HasTileAt:i(46598),HasTileAtWorldXY:i(28654),HexagonalCullBounds:i(6358),HexagonalCullTiles:i(37524),HexagonalGetTileCorners:i(63634),HexagonalTileToWorldXY:i(21715),HexagonalWorldToTileXY:i(11516),IsInLayerBounds:i(62839),IsometricCullTiles:i(20887),IsometricTileToWorldXY:i(21808),IsometricWorldToTileXY:i(18750),PutTileAt:i(29003),PutTileAtWorldXY:i(48565),PutTilesAt:i(56547),Randomize:i(91180),RemoveTileAt:i(929),RemoveTileAtWorldXY:i(17384),RenderDebug:i(93763),ReplaceByIndex:i(51202),RunCull:i(6987),SetCollision:i(51710),SetCollisionBetween:i(15216),SetCollisionByExclusion:i(33158),SetCollisionByProperty:i(4180),SetCollisionFromCollisionGroup:i(18625),SetLayerCollisionIndex:i(91181),SetTileCollision:i(68234),SetTileIndexCallback:i(11628),SetTileLocationCallback:i(72732),Shuffle:i(34397),StaggeredCullBounds:i(53945),StaggeredCullTiles:i(19242),StaggeredTileToWorldXY:i(33388),StaggeredTileToWorldY:i(84132),StaggeredWorldToTileXY:i(90562),StaggeredWorldToTileY:i(3689),SwapByIndex:i(55217),TileToWorldX:i(44150),TileToWorldXY:i(46836),TileToWorldY:i(42477),WeightedRandomize:i(39677),WorldToTileX:i(806),WorldToTileXY:i(45676),WorldToTileY:i(70520)}},12920:t=>{t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},84758:(t,e,i)=>{var s={ORIENTATION:i(12920)};t.exports=s},52678:(t,e,i)=>{var s=i(98611),r=i(84758),n={Components:i(5047),Parsers:i(34124),Formats:i(93560),ImageCollection:i(97042),ParseToTilemap:i(15043),Tile:i(29633),Tilemap:i(89797),TilemapCreator:i(4843),TilemapFactory:i(37940),Tileset:i(47975),TilemapLayer:i(87177),Orientation:i(12920),LayerData:i(94990),MapData:i(16586),ObjectLayer:i(15256)};n=s(!1,n,r.ORIENTATION),t.exports=n},94990:(t,e,i)=>{var s=i(56694),r=i(12920),n=i(72632),a=new s({initialize:function(t){void 0===t&&(t={}),this.name=n(t,"name","layer"),this.id=n(t,"id",0),this.x=n(t,"x",0),this.y=n(t,"y",0),this.width=n(t,"width",0),this.height=n(t,"height",0),this.tileWidth=n(t,"tileWidth",0),this.tileHeight=n(t,"tileHeight",0),this.baseTileWidth=n(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=n(t,"baseTileHeight",this.tileHeight),this.orientation=n(t,"orientation",r.ORTHOGONAL),this.widthInPixels=n(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=n(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=n(t,"alpha",1),this.visible=n(t,"visible",!0),this.properties=n(t,"properties",[]),this.indexes=n(t,"indexes",[]),this.collideIndexes=n(t,"collideIndexes",[]),this.callbacks=n(t,"callbacks",[]),this.bodies=n(t,"bodies",[]),this.data=n(t,"data",[]),this.tilemapLayer=n(t,"tilemapLayer",null),this.hexSideLength=n(t,"hexSideLength",0),this.staggerAxis=n(t,"staggerAxis","y"),this.staggerIndex=n(t,"staggerIndex","odd")}});t.exports=a},16586:(t,e,i)=>{var s=i(56694),r=i(12920),n=i(72632),a=new s({initialize:function(t){void 0===t&&(t={}),this.name=n(t,"name","map"),this.width=n(t,"width",0),this.height=n(t,"height",0),this.infinite=n(t,"infinite",!1),this.tileWidth=n(t,"tileWidth",0),this.tileHeight=n(t,"tileHeight",0),this.widthInPixels=n(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=n(t,"heightInPixels",this.height*this.tileHeight),this.format=n(t,"format",null),this.orientation=n(t,"orientation",r.ORTHOGONAL),this.renderOrder=n(t,"renderOrder","right-down"),this.version=n(t,"version","1"),this.properties=n(t,"properties",{}),this.layers=n(t,"layers",[]),this.images=n(t,"images",[]),this.objects=n(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=n(t,"collision",{}),this.tilesets=n(t,"tilesets",[]),this.imageCollections=n(t,"imageCollections",[]),this.tiles=n(t,"tiles",[]),this.hexSideLength=n(t,"hexSideLength",0),this.staggerAxis=n(t,"staggerAxis","y"),this.staggerIndex=n(t,"staggerIndex","odd")}});t.exports=a},15256:(t,e,i)=>{var s=i(56694),r=i(72632),n=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","object layer"),this.id=r(t,"id",0),this.opacity=r(t,"opacity",1),this.properties=r(t,"properties",{}),this.propertyTypes=r(t,"propertytypes",{}),this.type=r(t,"type","objectgroup"),this.visible=r(t,"visible",!0),this.objects=r(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});t.exports=n},21394:(t,e,i)=>{var s=i(12920);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?s.ISOMETRIC:"staggered"===t?s.STAGGERED:"hexagonal"===t?s.HEXAGONAL:s.ORTHOGONAL}},90715:(t,e,i)=>{var s=i(93560),r=i(84346),n=i(96097),a=i(2378),o=i(44909);t.exports=function(t,e,i,h,l,u){var c;switch(e){case s.ARRAY_2D:c=r(t,i,h,l,u);break;case s.CSV:c=n(t,i,h,l,u);break;case s.TILED_JSON:c=a(t,i,u);break;case s.WELTMEISTER:c=o(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},84346:(t,e,i)=>{var s=i(93560),r=i(94990),n=i(16586),a=i(29633);t.exports=function(t,e,i,o,h){for(var l=new r({tileWidth:i,tileHeight:o}),u=new n({name:t,tileWidth:i,tileHeight:o,format:s.ARRAY_2D,layers:[l]}),c=[],d=e.length,f=0,p=0;p<e.length;p++){c[p]=[];for(var g=e[p],v=0;v<g.length;v++){var m=parseInt(g[v],10);isNaN(m)||-1===m?c[p][v]=h?null:new a(l,-1,v,p,i,o):c[p][v]=new a(l,m,v,p,i,o)}0===f&&(f=g.length)}return u.width=l.width=f,u.height=l.height=d,u.widthInPixels=l.widthInPixels=f*i,u.heightInPixels=l.heightInPixels=d*o,l.data=c,u}},96097:(t,e,i)=>{var s=i(93560),r=i(84346);t.exports=function(t,e,i,n,a){var o=e.trim().split("\n").map((function(t){return t.split(",")})),h=r(t,o,i,n,a);return h.format=s.CSV,h}},30951:(t,e,i)=>{var s=i(94990),r=i(29633);t.exports=function(t,e){for(var i=[],n=0;n<t.layer.length;n++){for(var a=t.layer[n],o=new s({name:a.name,width:a.width,height:a.height,tileWidth:a.tilesize,tileHeight:a.tilesize,visible:1===a.visible}),h=[],l=[],u=0;u<a.data.length;u++){for(var c=0;c<a.data[u].length;c++){var d,f=a.data[u][c]-1;d=f>-1?new r(o,f,c,u,a.tilesize,a.tilesize):e?null:new r(o,-1,c,u,a.tilesize,a.tilesize),h.push(d)}l.push(h),h=[]}o.data=l,i.push(o)}return i}},47488:(t,e,i)=>{var s=i(47975);t.exports=function(t){for(var e=[],i=[],r=0;r<t.layer.length;r++){var n=t.layer[r],a=n.tilesetName;""!==a&&-1===i.indexOf(a)&&(i.push(a),e.push(new s(a,0,n.tilesize,n.tilesize,0,0)))}return e}},44909:(t,e,i)=>{var s=i(93560),r=i(16586),n=i(30951),a=i(47488);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var o=0,h=0,l=0;l<e.layer.length;l++)e.layer[l].width>o&&(o=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new r({width:o,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:s.WELTMEISTER});return u.layers=n(e,i),u.tilesets=a(e),u}},24507:(t,e,i)=>{t.exports={ParseTileLayers:i(30951),ParseTilesets:i(47488),ParseWeltmeister:i(44909)}},34124:(t,e,i)=>{t.exports={FromOrientationString:i(21394),Parse:i(90715),Parse2DArray:i(84346),ParseCSV:i(96097),Impact:i(24507),Tiled:i(50044)}},48646:(t,e,i)=>{var s=i(98611);t.exports=function(t){for(var e,i,r,n,a,o=0;o<t.layers.length;o++){e=t.layers[o],n=null;for(var h=0;h<e.data.length;h++){a=e.data[h];for(var l=0;l<a.length;l++)null===(i=a[l])||i.index<0||(r=t.tiles[i.index][2],n=t.tilesets[r],i.width=n.tileWidth,i.height=n.tileHeight,n.tileProperties&&n.tileProperties[i.index-n.firstgid]&&(i.properties=s(i.properties,n.tileProperties[i.index-n.firstgid])))}}}},43908:t=>{t.exports=function(t){for(var e=window.atob(t),i=e.length,s=new Array(i/4),r=0;r<i;r+=4)s[r/4]=(e.charCodeAt(r)|e.charCodeAt(r+1)<<8|e.charCodeAt(r+2)<<16|e.charCodeAt(r+3)<<24)>>>0;return s}},14556:(t,e,i)=>{var s=i(47975);t.exports=function(t){var e,i,r=[];for(e=0;e<t.imageCollections.length;e++)for(var n=t.imageCollections[e],a=n.images,o=0;o<a.length;o++){var h=a[o];(i=new s(h.image,h.gid,n.imageWidth,n.imageHeight,0,0)).updateTileData(n.imageWidth,n.imageHeight),t.tilesets.push(i)}for(e=0;e<t.tilesets.length;e++)for(var l=(i=t.tilesets[e]).tileMargin,u=i.tileMargin,c=0,d=0,f=0,p=i.firstgid;p<i.firstgid+i.total&&(r[p]=[l,u,e],l+=i.tileWidth+i.tileSpacing,++c!==i.total)&&(++d!==i.columns||(l=i.tileMargin,u+=i.tileHeight+i.tileSpacing,d=0,++f!==i.rows));p++);return r}},92044:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var r=e.x+s(e,"startx",0)*t.tilewidth+s(e,"offsetx",0),n=e.y+s(e,"starty",0)*t.tileheight+s(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+r,y:i.y+n}}},8847:t=>{var e=2147483648,i=1073741824,s=536870912;t.exports=function(t){var r=Boolean(t&e),n=Boolean(t&i),a=Boolean(t&s);t&=536870911;var o=0,h=!1;return r&&n&&a?(o=Math.PI/2,h=!0):r&&n&&!a?(o=Math.PI,h=!1):r&&!n&&a?(o=Math.PI/2,h=!1):!r||n||a?!r&&n&&a?(o=3*Math.PI/2,h=!1):r||!n||a?r||n||!a?r||n||a||(o=0,h=!1):(o=3*Math.PI/2,h=!0):(o=Math.PI,h=!0):(o=0,h=!0),{gid:t,flippedHorizontal:r,flippedVertical:n,flippedAntiDiagonal:a,rotation:o,flipped:h}}},78339:(t,e,i)=>{var s=i(72632),r=i(92044);t.exports=function(t){for(var e=[],i=[],n=r(t);n.i<n.layers.length||i.length>0;)if(n.i>=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var a=n.layers[n.i];if(n.i++,"imagelayer"===a.type){var o=s(a,"offsetx",0)+s(a,"startx",0),h=s(a,"offsety",0)+s(a,"starty",0);e.push({name:n.name+a.name,image:a.image,x:n.x+o+a.x,y:n.y+h+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:s(a,"properties",{})})}else if("group"===a.type){var l=r(t,a,n);i.push(n),n=l}}return e}},2378:(t,e,i)=>{var s=i(48646),r=i(14556),n=i(12920),a=i(28699),o=i(93560),h=i(21394),l=i(16586),u=i(78339),c=i(61136),d=i(95925),f=i(93392);t.exports=function(t,e,i){var p=a(e),g=new l({width:p.width,height:p.height,name:t,tileWidth:p.tilewidth,tileHeight:p.tileheight,orientation:h(p.orientation),format:o.TILED_JSON,version:p.version,properties:p.properties,renderOrder:p.renderorder,infinite:p.infinite});g.orientation===n.HEXAGONAL&&(g.hexSideLength=p.hexsidelength,g.staggerAxis=p.staggeraxis,g.staggerIndex=p.staggerindex),g.layers=d(p,i),g.images=u(p);var v=f(p);return g.tilesets=v.tilesets,g.imageCollections=v.imageCollections,g.objects=c(p),g.tiles=r(g),s(g),g}},4281:(t,e,i)=>{var s=i(28820),r=i(8847),n=function(t){return{x:t.x,y:t.y}},a=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var o=s(t,a);if(o.x+=e,o.y+=i,t.gid){var h=r(t.gid);o.gid=h.gid,o.flippedHorizontal=h.flippedHorizontal,o.flippedVertical=h.flippedVertical,o.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?o.polyline=t.polyline.map(n):t.polygon?o.polygon=t.polygon.map(n):t.ellipse?o.ellipse=t.ellipse:t.text?o.text=t.text:t.point?o.point=!0:o.rectangle=!0;return o}},61136:(t,e,i)=>{var s=i(72632),r=i(4281),n=i(15256),a=i(92044);t.exports=function(t){for(var e=[],i=[],o=a(t);o.i<o.layers.length||i.length>0;)if(o.i>=o.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}o=i.pop()}else{var h=o.layers[o.i];if(o.i++,h.opacity*=o.opacity,h.visible=o.visible&&h.visible,"objectgroup"===h.type){h.name=o.name+h.name;for(var l=o.x+s(h,"startx",0)+s(h,"offsetx",0),u=o.y+s(h,"starty",0)+s(h,"offsety",0),c=[],d=0;d<h.objects.length;d++){var f=r(h.objects[d],l,u);c.push(f)}var p=new n(h);p.objects=c,e.push(p)}else if("group"===h.type){var g=a(t,h,o);i.push(o),o=g}}return e}},95925:(t,e,i)=>{var s=i(43908),r=i(12920),n=i(92044),a=i(21394),o=i(72632),h=i(94990),l=i(8847),u=i(29633);t.exports=function(t,e){for(var i=o(t,"infinite",!1),c=[],d=[],f=n(t);f.i<f.layers.length||d.length>0;)if(f.i>=f.layers.length){if(d.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}f=d.pop()}else{var p=f.layers[f.i];if(f.i++,"tilelayer"===p.type)if(p.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+p.name+"'");else{if(p.encoding&&"base64"===p.encoding){if(p.chunks)for(var g=0;g<p.chunks.length;g++)p.chunks[g].data=s(p.chunks[g].data);p.data&&(p.data=s(p.data)),delete p.encoding}var v,m,x,y,T=[],w=0;if(i){var E=o(p,"startx",0)+p.x,S=o(p,"starty",0)+p.y;(v=new h({name:f.name+p.name,id:p.id,x:f.x+o(p,"offsetx",0)+E*t.tilewidth,y:f.y+o(p,"offsety",0)+S*t.tileheight,width:p.width,height:p.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:f.opacity*p.opacity,visible:f.visible&&p.visible,properties:o(p,"properties",[]),orientation:a(t.orientation)})).orientation===r.HEXAGONAL&&(v.hexSideLength=t.hexsidelength,v.staggerAxis=t.staggeraxis,v.staggerIndex=t.staggerindex);for(var b=0;b<p.height;b++){T[b]=[null];for(var A=0;A<p.width;A++)T[b][A]=null}for(b=0,I=p.chunks.length;b<I;b++)for(var _=p.chunks[b],C=_.x-E,R=_.y-S,M=0,P=0,L=_.data.length;P<L;P++){var O=w+C,F=M+R;(m=l(_.data[P])).gid>0?((x=new u(v,m.gid,O,F,t.tilewidth,t.tileheight)).rotation=m.rotation,x.flipX=m.flipped,T[F][O]=x):(y=e?null:new u(v,-1,O,F,t.tilewidth,t.tileheight),T[F][O]=y),++w===_.width&&(M++,w=0)}}else{(v=new h({name:f.name+p.name,id:p.id,x:f.x+o(p,"offsetx",0)+p.x,y:f.y+o(p,"offsety",0)+p.y,width:p.width,height:p.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:f.opacity*p.opacity,visible:f.visible&&p.visible,properties:o(p,"properties",[]),orientation:a(t.orientation)})).orientation===r.HEXAGONAL&&(v.hexSideLength=t.hexsidelength,v.staggerAxis=t.staggeraxis,v.staggerIndex=t.staggerindex);for(var D=[],k=0,I=p.data.length;k<I;k++)(m=l(p.data[k])).gid>0?((x=new u(v,m.gid,w,T.length,t.tilewidth,t.tileheight)).rotation=m.rotation,x.flipX=m.flipped,D.push(x)):(y=e?null:new u(v,-1,w,T.length,t.tilewidth,t.tileheight),D.push(y)),++w===p.width&&(T.push(D),w=0,D=[])}v.data=T,c.push(v)}else if("group"===p.type){var B=n(t,p,f);d.push(f),f=B}}return c}},93392:(t,e,i)=>{var s=i(47975),r=i(97042),n=i(4281),a=i(39642);t.exports=function(t){for(var e,i=[],o=[],h=null,l=0;l<t.tilesets.length;l++){var u=t.tilesets[l];if(u.source)console.warn("External tilesets unsupported. Use Embed Tileset and re-export");else if(u.image){var c=new s(u.name,u.firstgid,u.tilewidth,u.tileheight,u.margin,u.spacing,void 0,void 0,u.tileoffset);if(t.version>1){var d=void 0,f=void 0;if(Array.isArray(u.tiles)){d=d||{},f=f||{};for(var p=0;p<u.tiles.length;p++){var g=u.tiles[p];if(g.properties){var v={};g.properties.forEach((function(t){v[t.name]=t.value})),f[g.id]=v}if(g.objectgroup&&((d[g.id]||(d[g.id]={})).objectgroup=g.objectgroup,g.objectgroup.objects)){var m=g.objectgroup.objects.map((function(t){return n(t)}));d[g.id].objectgroup.objects=m}g.animation&&((d[g.id]||(d[g.id]={})).animation=g.animation),g.type&&((d[g.id]||(d[g.id]={})).type=g.type)}}Array.isArray(u.wangsets)&&(d=d||{},f=f||{},a(u.wangsets,d)),d&&(c.tileData=d,c.tileProperties=f)}else if(u.tileproperties&&(c.tileProperties=u.tileproperties),u.tiles)for(e in c.tileData=u.tiles,c.tileData){var x=c.tileData[e].objectgroup;if(x&&x.objects){var y=x.objects.map((function(t){return n(t)}));c.tileData[e].objectgroup.objects=y}}c.updateTileData(u.imagewidth,u.imageheight),i.push(c)}else{var T=new r(u.name,u.firstgid,u.tilewidth,u.tileheight,u.margin,u.spacing,u.properties),w=0;for(p=0;p<u.tiles.length;p++){var E=(g=u.tiles[p]).image,S=parseInt(g.id,10),b=u.firstgid+S;T.addImage(b,E),w=Math.max(S,w)}T.maxId=w,o.push(T)}h&&(h.lastgid=u.firstgid-1),h=u}return{tilesets:i,imageCollections:o}}},39642:t=>{t.exports=function(t,e){for(var i=0;i<t.length;i++){var s=t[i],r=i;if(s.name&&""!==s.name&&(r=s.name),Array.isArray(s.wangtiles)&&s.wangtiles.length>0){var n,a,o,h={},l={};if(Array.isArray(s.edgecolors))for(n=0;n<s.edgecolors.length;n++)o=1+n,""!==(a=s.edgecolors[n]).name&&(h[o]=a.name);if(Array.isArray(s.cornercolors))for(n=0;n<s.cornercolors.length;n++)o=1+n,""!==(a=s.cornercolors[n]).name&&(l[o]=a.name);if(Array.isArray(s.colors))for(n=0;n<s.colors.length;n++)o=1+n,""!==(a=s.colors[n]).name&&(h[o]=l[o]=a.name);for(var u=[h,l,h,l,h,l,h,l],c=0;c<s.wangtiles.length;c++){var d=s.wangtiles[c],f=e[d.tileid]||(e[d.tileid]={});f=f.wangid||(f.wangid={});for(var p=[],g=0;g<Math.min(u.length,d.wangid.length);g++)if(0!==(a=d.wangid[g])){var v=u[g][a];void 0===v?p.push(a):p.push(v)}else p.push(void 0);f[r]=p}}}}},50044:(t,e,i)=>{t.exports={AssignTileProperties:i(48646),Base64Decode:i(43908),BuildTilesetIndex:i(14556),CreateGroupLayer:i(92044),ParseGID:i(8847),ParseImageLayers:i(78339),ParseJSONTiled:i(2378),ParseObject:i(4281),ParseObjectLayers:i(61136),ParseTileLayers:i(95925),ParseTilesets:i(93392)}},73779:(t,e,i)=>{var s=i(56694),r=i(91963),n=i(7599),a=i(57911),o=i(66458),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(n.BOOT,this.boot,this),t.sys.events.on(n.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(n.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var t=this.systems.events;t.on(n.PRE_UPDATE,this.preUpdate,this),t.on(n.UPDATE,this.update,this),t.once(n.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;return t instanceof a?(e=t,this.removeEvent(e),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?999999999999:e.repeat):e=new a(t),this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,s){return this.addEvent({delay:t,callback:e,args:i,callbackScope:s})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];o(this._pendingRemoval,i),o(this._pendingInsertion,i),o(this._active,i)}return this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,s;for(i=0;i<t;i++){s=this._pendingRemoval[i];var r=this._active.indexOf(s);r>-1&&this._active.splice(r,1),s.destroy()}for(i=0;i<e;i++)s=this._pendingInsertion[i],this._active.push(s);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){if(this.now=t,!this.paused){e*=this.timeScale;for(var i=0;i<this._active.length;i++){var s=this._active[i];if(!s.paused&&(s.elapsed+=e*s.timeScale,s.elapsed>=s.delay)){var r=s.elapsed-s.delay;if(s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),s.repeatCount>0){if(s.repeatCount--,r>=s.delay)for(;r>=s.delay&&s.repeatCount>0;)s.callback&&s.callback.apply(s.callbackScope,s.args),r-=s.delay,s.repeatCount--;s.elapsed=r,s.hasDispatched=!1}else s.hasDispatched&&this._pendingRemoval.push(s)}}}},shutdown:function(){var t;for(t=0;t<this._pendingInsertion.length;t++)this._pendingInsertion[t].destroy();for(t=0;t<this._active.length;t++)this._active[t].destroy();for(t=0;t<this._pendingRemoval.length;t++)this._pendingRemoval[t].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var e=this.systems.events;e.off(n.PRE_UPDATE,this.preUpdate,this),e.off(n.UPDATE,this.update,this),e.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(n.START,this.start,this),this.scene=null,this.systems=null}});r.register("Clock",h,"time"),t.exports=h},20517:(t,e,i)=>{var s=i(56694),r=i(6659),n=i(61286),a=i(72632),o=i(7599),h=i(52944),l=new s({Extends:r,initialize:function(t,e){r.call(this),this.scene=t,this.systems=t.sys,this.elapsed=0,this.paused=!0,this.complete=!1,this.totalComplete=0,this.events=[];var i=this.systems.events;i.on(o.PRE_UPDATE,this.preUpdate,this),i.on(o.UPDATE,this.update,this),i.once(o.SHUTDOWN,this.destroy,this),e&&this.add(e)},preUpdate:function(t,e){this.paused||(this.elapsed+=e)},update:function(){if(!this.paused&&!this.complete){var t,e,i=this.events,s=!1,r=this.systems;for(t=0;t<i.length;t++){var n=i[t];if(!n.complete&&n.time<=this.elapsed){if(n.complete=!0,this.totalComplete++,e=n.target?n.target:this,n.if&&!n.if.call(e,n))continue;if(n.once&&(s=!0),n.set&&n.target)for(var a in n.set)n.target[a]=n.set[a];n.tween&&r.tweens.add(n.tween),n.sound&&("string"==typeof n.sound?r.sound.play(n.sound):r.sound.play(n.sound.key,n.sound.config)),n.event&&this.emit(n.event,e),n.run&&n.run.call(e),n.stop&&this.stop()}}if(s)for(t=0;t<i.length;t++)i[t].complete&&i[t].once&&(i.splice(t,1),t--);this.totalComplete>=i.length&&(this.complete=!0),this.complete&&this.emit(h.COMPLETE,this)}},play:function(t){return void 0===t&&(t=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,t&&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 t=0;t<this.events.length;t++)this.events[t].complete=!1;return this.play(!1)},add:function(t){Array.isArray(t)||(t=[t]);var e=this.events,i=0;e.length>0&&(i=e[e.length-1].time);for(var s=0;s<t.length;s++){var r=t[s],n=a(r,"at",0),o=a(r,"in",null);null!==o&&(n=this.elapsed+o);var h=a(r,"from",null);null!==h&&(n=i+h),e.push({complete:!1,time:n,if:a(r,"if",null),run:a(r,"run",null),event:a(r,"event",null),target:a(r,"target",null),set:a(r,"set",null),tween:a(r,"tween",null),sound:a(r,"sound",null),once:a(r,"once",!1),stop:a(r,"stop",!1)}),i=n}return this.complete=!1,this},clear:function(){return this.events=[],this.elapsed=0,this.paused=!0,this},isPlaying:function(){return!this.paused&&!this.complete},getProgress:function(){return Math.min(this.totalComplete,this.events.length)/this.events.length},destroy:function(){var t=this.systems.events;t.off(o.PRE_UPDATE,this.preUpdate,this),t.off(o.UPDATE,this.update,this),t.off(o.SHUTDOWN,this.destroy,this),this.scene=null,this.systems=null,this.events=[]}});n.register("timeline",(function(t){return new l(this.scene,t)})),t.exports=l},57911:(t,e,i)=>{var s=i(56694),r=i(72632),n=new s({initialize:function(t){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(t)},reset:function(t){if(this.delay=r(t,"delay",0),this.repeat=r(t,"repeat",0),this.loop=r(t,"loop",!1),this.callback=r(t,"callback",void 0),this.callbackScope=r(t,"callbackScope",this),this.args=r(t,"args",[]),this.timeScale=r(t,"timeScale",1),this.startAt=r(t,"startAt",0),this.paused=r(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,0===this.delay&&(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 t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=n},12144:t=>{t.exports="complete"},52944:(t,e,i)=>{t.exports={COMPLETE:i(12144)}},97121:(t,e,i)=>{t.exports={Clock:i(73779),Events:i(52944),Timeline:i(20517),TimerEvent:i(57911)}},64532:(t,e,i)=>{var s=i(66458),r=i(56694),n=i(5454),a=i(68710),o=i(91963),h=i(7599),l=i(91944),u=i(39366),c=i(68061),d=i(45641),f=i(56034),p=new r({initialize:function(t){this.scene=t,this.events=t.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(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.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(h.UPDATE,this.update,this),this.events.once(h.SHUTDOWN,this.shutdown,this)},create:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i<t.length;i++){var s=t[i];s instanceof u||s instanceof d?e.push(s):Array.isArray(s.tweens)?e.push(f(this,s)):e.push(c(this,s))}return 1===e.length?e[0]:e},add:function(t){var e=t,i=this.tweens;return e instanceof u||e instanceof d||(e=Array.isArray(e.tweens)?f(this,e):c(this,e)),i.push(e.reset()),e},addMultiple:function(t){for(var e,i=[],s=this.tweens,r=0;r<t.length;r++)(e=t[r])instanceof u||e instanceof d||(e=Array.isArray(e.tweens)?f(this,e):c(this,e)),s.push(e.reset()),i.push(e);return i},chain:function(t){var e=f(this,t);return this.tweens.push(e.init()),e},getChainedTweens:function(t){return t.getChainedTweens()},has:function(t){return this.tweens.indexOf(t)>-1},existing:function(t){return this.has(t)||this.tweens.push(t.reset()),this},addCounter:function(t){var e=a(this,t);return this.tweens.push(e.reset()),e},stagger:function(t,e){return l(t,e)},setLagSmooth:function(t,e){return void 0===t&&(t=1/1e-8),void 0===e&&(e=0),this.maxLag=t,this.lagSkip=Math.min(e,this.maxLag),this},setFps:function(t){return void 0===t&&(t=240),this.gap=1e3/t,this.nextTime=1e3*this.time+this.gap,this},getDelta:function(t){var e=Date.now()-this.prevTime;e>this.maxLag&&(this.startTime+=e-this.lagSkip),this.prevTime+=e;var i=this.prevTime-this.startTime,s=i-this.nextTime,r=i-1e3*this.time;return s>0||t?(i/=1e3,this.time=i,this.nextTime+=s+(s>=this.gap?4:this.gap-s)):r=0,r},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(t){void 0===t&&(t=!1);var e=this.getDelta(t);if(!(e<=0)){var i,s;this.processing=!0;var r=[],n=this.tweens;for(i=0;i<n.length;i++)(s=n[i]).update(e)&&r.push(s);var a=r.length;if(a&&n.length>0){for(i=0;i<a;i++){s=r[i];var o=n.indexOf(s);o>-1&&(s.isPendingRemove()||s.isDestroyed())&&(n.splice(o,1),s.destroy())}r.length=0}this.processing=!1}},remove:function(t){return this.processing?t.setPendingRemoveState():(s(this.tweens,t),t.setRemovedState()),this},reset:function(t){return this.existing(t),t.seek(),t.setActiveState(),this},makeActive:function(t){return this.existing(t),t.setActiveState(),this},each:function(t,e){var i,s=[null];for(i=1;i<arguments.length;i++)s.push(arguments[i]);return this.tweens.forEach((function(i){s[0]=i,t.apply(e,s)})),this},getTweens:function(){return this.tweens.slice()},getTweensOf:function(t){for(var e=[],i=this.tweens,s=(t=Array.isArray(t)?n(t):[t]).length,r=0;r<i.length;r++)for(var a=i[r],o=0;o<s;o++)!a.isDestroyed()&&a.hasTarget(t[o])&&e.push(a);return e},getGlobalTimeScale:function(){return this.timeScale},setGlobalTimeScale:function(t){return this.timeScale=t,this},isTweening:function(t){for(var e,i=this.tweens,s=0;s<i.length;s++)if((e=i[s]).isPlaying()&&e.hasTarget(t))return!0;return!1},killAll:function(){for(var t=this.processing?this.getTweens():this.tweens,e=0;e<t.length;e++)t[e].destroy();return this.processing||(t.length=0),this},killTweensOf:function(t){for(var e=this.getTweensOf(t),i=0;i<e.length;i++)e[i].destroy();return this},pauseAll:function(){return this.paused=!0,this},resumeAll:function(){return this.paused=!1,this},shutdown:function(){this.killAll(),this.tweens=[],this.events.off(h.UPDATE,this.update,this),this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.events=null}});o.register("TweenManager",p,"tweens"),t.exports=p},63130:t=>{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},21902:(t,e,i)=>{var s=i(35060),r=i(40587);t.exports=function(t,e){var i=s.Power0;if("string"==typeof t)if(s.hasOwnProperty(t))i=s[t];else{var n="";if(t.indexOf(".")){var a=(n=t.substring(t.indexOf(".")+1)).toLowerCase();"in"===a?n="easeIn":"out"===a?n="easeOut":"inout"===a&&(n="easeInOut")}t=r(t.substring(0,t.indexOf(".")+1)+n),s.hasOwnProperty(t)&&(i=s[t])}else"function"==typeof t&&(i=t);if(!e)return i;var o=e.slice(0);return o.unshift(0),function(t){return o[0]=t,i.apply(this,o)}}},4840:(t,e,i)=>{var s=i(63210),r=i(88332),n={bezier:s,catmull:r,catmullrom:r,linear:i(47614)};t.exports=function(t){if(null===t)return null;var e=n.linear;return"string"==typeof t?n.hasOwnProperty(t)&&(e=n[t]):"function"==typeof t&&(e=t),e}},28348:t=>{t.exports=function(t,e,i){var s;t.hasOwnProperty(e)?s="function"===typeof t[e]?function(i,s,r,n,a,o){return t[e](i,s,r,n,a,o)}:function(){return t[e]}:s="function"==typeof i?i:function(){return i};return s}},92407:(t,e,i)=>{var s=i(53709);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substring(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===s.indexOf(e)&&"_"!==e.substring(0,1)&&i.push({key:e,value:t[e]});return i}},65868:(t,e,i)=>{var s=i(10850);t.exports=function(t){var e=s(t,"targets",null);return null===e||("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e])),e}},9744:(t,e,i)=>{var s=i(17489),r=i(61616);function n(t){return!!t.getActive&&"function"==typeof t.getActive}function a(t){return!!t.getStart&&"function"==typeof t.getStart}function o(t){return!!t.getEnd&&"function"==typeof t.getEnd}var h=function(t,e){var i,l,u=function(t,e,i){return i},c=function(t,e,i){return i},d=null,f=typeof e;if("number"===f)u=function(){return e};else if(Array.isArray(e))c=function(){return e[0]},u=function(){return e[e.length-1]};else if("string"===f){var p=e.toLowerCase(),g="random"===p.substring(0,6),v="int"===p.substring(0,3);if(g||v){var m=p.indexOf("("),x=p.indexOf(")"),y=p.indexOf(",");if(!(m&&x&&y))throw new Error("invalid random() format");var T=parseFloat(p.substring(m+1,y)),w=parseFloat(p.substring(y+1,x));u=g?function(){return r(T,w)}:function(){return s(T,w)}}else{p=p[0];var E=parseFloat(e.substr(2));switch(p){case"+":u=function(t,e,i){return i+E};break;case"-":u=function(t,e,i){return i-E};break;case"*":u=function(t,e,i){return i*E};break;case"/":u=function(t,e,i){return i/E};break;default:u=function(){return parseFloat(e)}}}}else if("function"===f)u=e;else if("object"===f)if(a(l=e)||o(l)||n(l))n(e)&&(d=e.getActive),o(e)&&(u=e.getEnd),a(e)&&(c=e.getStart);else if(e.hasOwnProperty("value"))i=h(t,e.value);else{var S=e.hasOwnProperty("to"),b=e.hasOwnProperty("from"),A=e.hasOwnProperty("start");if(S&&(b||A)){if(i=h(t,e.to),A){var _=h(t,e.start);i.getActive=_.getEnd}if(b){var C=h(t,e.from);i.getStart=C.getEnd}}}return i||(i={getActive:d,getEnd:u,getStart:c}),i};t.exports=h},68710:(t,e,i)=>{var s=i(502),r=i(99730),n=i(20494),a=i(63130),o=i(21902),h=i(28348),l=i(10850),u=i(9744),c=i(72066),d=i(39366);t.exports=function(t,e,i){if(e instanceof d)return e.parent=t,e;i=void 0===i?r:c(r,i);var f=l(e,"from",0),p=l(e,"to",1),g=[{value:f}],v=l(e,"delay",i.delay),m=l(e,"easeParams",i.easeParams),x=l(e,"ease",i.ease),y=u("value",p),T=new d(t,g),w=T.add(0,"value",y.getEnd,y.getStart,y.getActive,o(l(e,"ease",x),l(e,"easeParams",m)),h(e,"delay",v),l(e,"duration",i.duration),a(e,"yoyo",i.yoyo),l(e,"hold",i.hold),l(e,"repeat",i.repeat),l(e,"repeatDelay",i.repeatDelay),!1,!1);w.start=f,w.current=f,T.completeDelay=n(e,"completeDelay",0),T.loop=Math.round(n(e,"loop",0)),T.loopDelay=Math.round(n(e,"loopDelay",0)),T.paused=a(e,"paused",!1),T.persist=a(e,"persist",!1),T.callbackScope=l(e,"callbackScope",T);for(var E=s.TYPES,S=0;S<E.length;S++){var b=E[S],A=l(e,b,!1);if(A){var _=l(e,b+"Params",[]);T.setCallback(b,A,_)}}return T}},91944:(t,e,i)=>{var s=i(21902),r=i(10850),n=i(83392);t.exports=function(t,e){var i;void 0===e&&(e={});var a=r(e,"start",0),o=r(e,"ease",null),h=r(e,"grid",null),l=r(e,"from",0),u="first"===l,c="center"===l,d="last"===l,f="number"==typeof l,p=Array.isArray(t),g=p?parseFloat(t[0]):parseFloat(t),v=p?parseFloat(t[1]):0,m=Math.max(g,v);if(p&&(a+=g),h){var x=h[0],y=h[1],T=0,w=0,E=0,S=0,b=[];d?(T=x-1,w=y-1):f?(T=l%x,w=Math.floor(l/x)):c&&(T=(x-1)/2,w=(y-1)/2);for(var A=n.MIN_SAFE_INTEGER,_=0;_<y;_++){b[_]=[];for(var C=0;C<x;C++){E=T-C,S=w-_;var R=Math.sqrt(E*E+S*S);R>A&&(A=R),b[_][C]=R}}}var M=o?s(o):null;return i=h?function(t,e,i,s){var r,n=0,o=s%x,h=Math.floor(s/x);if(o>=0&&o<x&&h>=0&&h<y&&(n=b[h][o]),p){var l=v-g;r=M?n/A*l*M(n/A):n/A*l}else r=M?n*g*M(n/A):n*g;return r+a}:function(t,e,i,s,r){var n,o,h;(r--,u?n=s:c?n=Math.abs(r/2-s):d?n=r-s:f&&(n=Math.abs(l-s)),p)?(h=c?(v-g)/r*(2*n):(v-g)/r*n,o=M?h*M(n/r):h):o=M?r*m*M(n/r):n*g;return o+a},i}},68061:(t,e,i)=>{var s=i(502),r=i(99730),n=i(20494),a=i(63130),o=i(21902),h=i(4840),l=i(28348),u=i(92407),c=i(65868),d=i(10850),f=i(9744),p=i(72066),g=i(39366);t.exports=function(t,e,i){if(e instanceof g)return e.parent=t,e;i=void 0===i?r:p(r,i);var v=c(e);!v&&i.targets&&(v=i.targets);for(var m=u(e),x=d(e,"delay",i.delay),y=d(e,"duration",i.duration),T=d(e,"easeParams",i.easeParams),w=d(e,"ease",i.ease),E=d(e,"hold",i.hold),S=d(e,"repeat",i.repeat),b=d(e,"repeatDelay",i.repeatDelay),A=a(e,"yoyo",i.yoyo),_=a(e,"flipX",i.flipX),C=a(e,"flipY",i.flipY),R=d(e,"interpolation",i.interpolation),M=function(t,e,i,s){if("texture"===i){var r=s,n=void 0;Array.isArray(s)?(r=s[0],n=s[1]):s.hasOwnProperty("value")?(r=s.value,Array.isArray(s.value)?(r=s.value[0],n=s.value[1]):"string"==typeof s.value&&(r=s.value)):"string"==typeof s&&(r=s),t.addFrame(e,r,n,l(s,"delay",x),d(s,"duration",y),d(s,"hold",E),d(s,"repeat",S),d(s,"repeatDelay",b),a(s,"flipX",_),a(s,"flipY",C))}else{var u=f(i,s),c=h(d(s,"interpolation",R));t.add(e,i,u.getEnd,u.getStart,u.getActive,o(d(s,"ease",w),d(s,"easeParams",T)),l(s,"delay",x),d(s,"duration",y),a(s,"yoyo",A),d(s,"hold",E),d(s,"repeat",S),d(s,"repeatDelay",b),a(s,"flipX",_),a(s,"flipY",C),c,c?s:null)}},P=new g(t,v),L=0;L<m.length;L++)for(var O=m[L].key,F=m[L].value,D=0;D<v.length;D++)"scale"!==O||v[D].hasOwnProperty("scale")?M(P,D,O,F):(M(P,D,"scaleX",F),M(P,D,"scaleY",F));P.completeDelay=n(e,"completeDelay",0),P.loop=Math.round(n(e,"loop",0)),P.loopDelay=Math.round(n(e,"loopDelay",0)),P.paused=a(e,"paused",!1),P.persist=a(e,"persist",!1),P.callbackScope=d(e,"callbackScope",P);for(var k=s.TYPES,I=0;I<k.length;I++){var B=k[I],N=d(e,B,!1);if(N){var X=d(e,B+"Params",[]);P.setCallback(B,N,X)}}return P}},56034:(t,e,i)=>{var s=i(502),r=i(20494),n=i(63130),a=i(65868),o=i(10850),h=i(68061),l=i(45641);t.exports=function(t,e){if(e instanceof l)return e.parent=t,e;var i,u=new l(t);u.startDelay=o(e,"delay",0),u.completeDelay=r(e,"completeDelay",0),u.loop=Math.round(r(e,"loop",o(e,"repeat",0))),u.loopDelay=Math.round(r(e,"loopDelay",o(e,"repeatDelay",0))),u.paused=n(e,"paused",!1),u.persist=n(e,"persist",!1),u.callbackScope=o(e,"callbackScope",u);var c=s.TYPES;for(i=0;i<c.length;i++){var d=c[i],f=o(e,d,!1);if(f){var p=o(e,d+"Params",[]);u.setCallback(d,f,p)}}var g=o(e,"tweens",null);if(Array.isArray(g)){var v=[],m=a(e),x=void 0;for(m&&(x={targets:m}),i=0;i<g.length;i++)v.push(h(u,g[i],x));u.add(v)}return u}},79619:(t,e,i)=>{t.exports={GetBoolean:i(63130),GetEaseFunction:i(21902),GetInterpolationFunction:i(4840),GetNewValue:i(28348),GetProps:i(92407),GetTargets:i(65868),GetValueOp:i(9744),NumberTweenBuilder:i(68710),StaggerBuilder:i(91944),TweenBuilder:i(68061)}},5570:t=>{t.exports="active"},6383:t=>{t.exports="complete"},72582:t=>{t.exports="loop"},90281:t=>{t.exports="pause"},80803:t=>{t.exports="repeat"},13640:t=>{t.exports="resume"},10472:t=>{t.exports="start"},5379:t=>{t.exports="stop"},43449:t=>{t.exports="update"},61541:t=>{t.exports="yoyo"},54272:(t,e,i)=>{t.exports={TWEEN_ACTIVE:i(5570),TWEEN_COMPLETE:i(6383),TWEEN_LOOP:i(72582),TWEEN_PAUSE:i(90281),TWEEN_RESUME:i(13640),TWEEN_REPEAT:i(80803),TWEEN_START:i(10472),TWEEN_STOP:i(5379),TWEEN_UPDATE:i(43449),TWEEN_YOYO:i(61541)}},75193:(t,e,i)=>{var s={States:i(55303),Builders:i(79619),Events:i(54272),TweenManager:i(64532),Tween:i(39366),TweenData:i(15718),TweenFrameData:i(96490),BaseTween:i(502),TweenChain:i(45641)};t.exports=s},502:(t,e,i)=>{var s=i(56694),r=i(6659),n=i(54272),a=i(55303),o=new s({Extends:r,initialize:function(t){r.call(this),this.parent=t,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=a.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(t){return this.timeScale=t,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(n.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(n.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(n.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(n.TWEEN_COMPLETE,"onComplete")},complete:function(t){return void 0===t&&(t=0),t?(this.setCompleteDelayState(),this.countdown=t):this.onCompleteHandler(),this},completeAfterLoop:function(t){return void 0===t&&(t=0),this.loopCounter>t&&(this.loopCounter=t),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return!this.parent||this.isRemoved()||this.isPendingRemove()||this.isDestroyed()||(this.dispatchEvent(n.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(t){this.countdown-=t,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(n.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(t){return this.countdown-=t,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(n.TWEEN_START,"onStart"),t=0),t},updateCompleteDelay:function(t){this.countdown-=t,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(t,e,i){return void 0===i&&(i=[]),this.callbacks.hasOwnProperty(t)&&(this.callbacks[t]={func:e,params:i}),this},setPendingState:function(){this.state=a.PENDING},setActiveState:function(){this.state=a.ACTIVE},setLoopDelayState:function(){this.state=a.LOOP_DELAY},setCompleteDelayState:function(){this.state=a.COMPLETE_DELAY},setStartDelayState:function(){this.state=a.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=a.PENDING_REMOVE},setRemovedState:function(){this.state=a.REMOVED},setFinishedState:function(){this.state=a.FINISHED},setDestroyedState:function(){this.state=a.DESTROYED},isPending:function(){return this.state===a.PENDING},isActive:function(){return this.state===a.ACTIVE},isLoopDelayed:function(){return this.state===a.LOOP_DELAY},isCompleteDelayed:function(){return this.state===a.COMPLETE_DELAY},isStartDelayed:function(){return this.state===a.START_DELAY},isPendingRemove:function(){return this.state===a.PENDING_REMOVE},isRemoved:function(){return this.state===a.REMOVED},isFinished:function(){return this.state===a.FINISHED},isDestroyed:function(){return this.state===a.DESTROYED},destroy:function(){this.data&&this.data.forEach((function(t){t.destroy()})),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});o.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],t.exports=o},65521:(t,e,i)=>{var s=i(56694),r=i(54272),n=i(55303),a=new s({initialize:function(t,e,i,s,r,n,a,o,h,l){this.tween=t,this.targetIndex=e,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=i,this.yoyo=r,this.hold=n,this.repeat=a,this.repeatDelay=o,this.repeatCounter=0,this.flipX=h,this.flipY=l,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(t){void 0===t&&(t=this.current),this.tween.targets[this.targetIndex][this.key]=t},setCreatedState:function(){this.state=n.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=n.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=n.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=n.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=n.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=n.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=n.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=n.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===n.CREATED},isDelayed:function(){return this.state===n.DELAY},isPendingRender:function(){return this.state===n.PENDING_RENDER},isPlayingForward:function(){return this.state===n.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===n.PLAYING_BACKWARD},isHolding:function(){return this.state===n.HOLD_DELAY},isRepeating:function(){return this.state===n.REPEAT_DELAY},isComplete:function(){return this.state===n.COMPLETE},setStateFromEnd:function(t){this.yoyo?this.onRepeat(t,!0,!0):this.repeatCounter>0?this.onRepeat(t,!0,!1):this.setCompleteState()},setStateFromStart:function(t){this.repeatCounter>0?this.onRepeat(t,!1):this.setCompleteState()},reset:function(){var t=this.tween,e=t.totalTargets,i=this.targetIndex,s=t.targets[i],r=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(s,r,0,i,e,t),this.repeatCounter=-1===this.repeat?n.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,-1===this.repeat?(this.totalDuration+=o*n.MAX,t.isInfinite=!0):this.repeat>0&&(this.totalDuration+=o*this.repeat),this.totalDuration>t.duration&&(t.duration=this.totalDuration),this.delay<t.startDelay&&(t.startDelay=this.delay),this.delay>0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(t,e,i){var s=this.tween,n=s.totalTargets,a=this.targetIndex,o=s.targets[a],h=this.key,l="texture"!==h;if(this.elapsed=t,this.progress=t/this.duration,this.flipX&&o.toggleFlipX(),this.flipY&&o.toggleFlipY(),l&&(e||i)&&(this.start=this.getStartValue(o,h,this.start,a,n,s)),i)return this.setPlayingBackwardState(),void this.dispatchEvent(r.TWEEN_YOYO,"onYoyo");this.repeatCounter--,l&&(this.end=this.getEndValue(o,h,this.start,a,n,s)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-t,l&&(this.current=this.start,o[h]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});t.exports=a},99730:t=>{t.exports={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}},53709:t=>{t.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:(t,e,i)=>{var s=i(502),r=i(56694),n=i(54272),a=i(99325),o=i(61286),h=i(83392),l=i(55303),u=i(15718),c=i(96490),d=new r({Extends:s,initialize:function(t,e){s.call(this,t),this.targets=e,this.totalTargets=e.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(t,e,i,s,r,n,a,o,h,l,c,d,f,p,g,v){var m=new u(this,t,e,i,s,r,n,a,o,h,l,c,d,f,p,g,v);return this.totalData=this.data.push(m),m},addFrame:function(t,e,i,s,r,n,a,o,h,l){var u=new c(this,t,e,i,s,r,n,a,o,h,l);return this.totalData=this.data.push(u),u},getValue:function(t){void 0===t&&(t=0);var e=null;return this.data&&(e=this.data[t].current),e},hasTarget:function(t){return this.targets&&-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){if(void 0===i&&(i=!1),"texture"!==t)for(var s=0;s<this.totalData;s++){var r=this.data[s];r.key===t&&(r.isPlayingForward()||r.isPlayingBackward())&&(r.end=e,i&&(r.start=r.current))}return this},restart:function(){switch(this.state){case l.REMOVED:case l.FINISHED:this.seek(),this.parent.makeActive(this);break;case l.PENDING:case l.PENDING_REMOVE:this.parent.reset(this);break;case l.DESTROYED:console.warn("Cannot restart destroyed Tween",this);break;default:this.seek()}return this.paused=!1,this.hasStarted=!1,this},nextState:function(){if(this.loopCounter>0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(n.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,s.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(t,e,i){if(void 0===t&&(t=0),void 0===e&&(e=16.6),void 0===i&&(i=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;i||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(n.TWEEN_ACTIVE,"onActive");var s=this.paused;if(this.paused=!1,t>0){for(var r=Math.floor(t/e),a=t-r*e,o=0;o<r;o++)this.update(e);a>0&&this.update(a)}return this.paused=s,this.isSeeking=!1,this},initTweenData:function(t){void 0===t&&(t=!1),this.duration=0,this.startDelay=h.MAX_SAFE_INTEGER;for(var e=this.data,i=0;i<this.totalData;i++)e[i].reset(t);this.duration=Math.max(this.duration,.01);var s=this.duration,r=this.completeDelay,n=this.loopCounter,a=this.loopDelay;this.totalDuration=n>0?s+r+(s+a)*n:s+r},reset:function(t){return void 0===t&&(t=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,-1===this.loop&&(this.isInfinite=!0,this.loopCounter=l.MAX),t||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(n.TWEEN_ACTIVE,"onActive")),this},update:function(t){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(t*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(t),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(t),!1;this.hasStarted||(this.startDelay-=t,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(n.TWEEN_START,"onStart"),t=0));var e=!1;if(this.isActive())for(var i=this.data,s=0;s<this.totalData;s++)i[s].update(t)&&(e=!0);this.elapsed+=t,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=t,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),e||this.nextState();var r=this.isPendingRemove();return r&&this.persist&&(this.setFinishedState(),r=!1),r},forward:function(t){return this.update(t),this},rewind:function(t){return this.update(-t),this},dispatchEvent:function(t,e){if(!this.isSeeking){this.emit(t,this,this.targets);var i=this.callbacks[e];i&&i.func.apply(this.callbackScope,[this,this.targets].concat(i.params))}},destroy:function(){s.prototype.destroy.call(this),this.targets=null}});o.register("tween",(function(t){return this.scene.sys.tweens.add(t)})),a.register("tween",(function(t){return this.scene.sys.tweens.create(t)})),t.exports=d},45641:(t,e,i)=>{var s=i(66458),r=i(502),n=i(56694),a=i(54272),o=i(99325),h=i(61286),l=i(55303),u=new n({Extends:r,initialize:function(t){r.call(this,t),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?l.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(a.TWEEN_ACTIVE,"onActive"),this},add:function(t){var e=this.parent.create(t);Array.isArray(e)||(e=[e]);for(var i=this.data,s=0;s<e.length;s++){var r=e[s];r.parent=this,i.push(r.reset())}return this.totalData=i.length,this},remove:function(t){return s(this.data,t),t.setRemovedState(),t===this.currentTween&&this.nextTween(),this.totalData=this.data.length,this},hasTarget:function(t){for(var e=this.data,i=0;i<this.totalData;i++)if(e[i].hasTarget(t))return!0;return!1},restart:function(){return this.isDestroyed()?(console.warn("Cannot restart destroyed TweenChain",this),this):(this.isRemoved()&&this.parent.makeActive(this),this.resetTweens(),this.paused=!1,this.init())},reset:function(t){return t.seek(),t.setActiveState(),this},makeActive:function(t){return t.reset(),t.setActiveState(),this},nextState:function(){if(this.loopCounter>0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(a.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}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 t=this.data,e=this.totalData,i=0;i<e;i++)t[i].reset(!1);this.currentIndex=0,this.currentTween=t[0]},update:function(t){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.isFinished()||this.paused)return!1;t*=this.parent.timeScale,this.isLoopDelayed()?this.updateLoopCountdown(t):this.isCompleteDelayed()?this.updateCompleteDelay(t):this.isStartDelayed()&&(t=this.updateStartCountdown(t));var e=!1;return this.isActive()&&this.currentTween&&(this.currentTween.update(t)&&this.nextTween()&&this.nextState(),(e=this.isPendingRemove())&&this.persist&&(this.setFinishedState(),e=!1)),e},nextTween:function(){return this.currentIndex++,this.currentIndex===this.totalData||(this.setCurrentTween(this.currentIndex),!1)},setCurrentTween:function(t){this.currentIndex=t,this.currentTween=this.data[t],this.currentTween.setActiveState(),this.currentTween.dispatchEvent(a.TWEEN_ACTIVE,"onActive")},dispatchEvent:function(t,e){this.emit(t,this);var i=this.callbacks[e];i&&i.func.apply(this.callbackScope,[this].concat(i.params))},destroy:function(){r.prototype.destroy.call(this),this.currentTween=null}});h.register("tweenchain",(function(t){return this.scene.sys.tweens.chain(t)})),o.register("tweenchain",(function(t){return this.scene.sys.tweens.create(t)})),t.exports=u},15718:(t,e,i)=>{var s=i(65521),r=i(82897),n=i(56694),a=i(54272),o=new n({Extends:s,initialize:function(t,e,i,r,n,a,o,h,l,u,c,d,f,p,g,v,m){s.call(this,t,e,h,l,u,c,d,f,p,g),this.key=i,this.getActiveValue=a,this.getEndValue=r,this.getStartValue=n,this.ease=o,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=v,this.interpolationData=m},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex],i=this.key;t&&(e[i]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(e[i]=this.getActiveValue(e,i,0))},update:function(t){var e=this.tween,i=e.totalTargets,s=this.targetIndex,n=e.targets[s],o=this.key;if(!n)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(a.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(n,o,n[o],s,i,e),this.end=this.getEndValue(n,o,this.start,s,i,e),this.current=this.start,n[o]=this.start,this.setPlayingForwardState(),!0;var h=this.isPlayingForward(),l=this.isPlayingBackward();if(h||l){var u=this.elapsed,c=this.duration,d=0,f=!1;(u+=t)>=c?(d=u-c,u=c,f=!0):u<0&&(u=0);var p=r(u/c,0,1);if(this.elapsed=u,this.progress=p,this.previous=this.current,f)h?(this.current=this.end,n[o]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(d)):(this.current=this.start,n[o]=this.start,this.setStateFromStart(d));else{h||(p=1-p);var g=this.ease(p);this.interpolation?this.current=this.interpolation(this.interpolationData,g):this.current=this.start+(this.end-this.start)*g,n[o]=this.current}this.dispatchEvent(a.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],r=this.key,n=this.current,a=this.previous;i.emit(t,i,r,s,n,a);var o=i.callbacks[e];o&&o.func.apply(i.callbackScope,[i,s,r,n,a].concat(o.params))}},destroy:function(){s.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});t.exports=o},96490:(t,e,i)=>{var s=i(65521),r=i(82897),n=i(56694),a=i(54272),o=new n({Extends:s,initialize:function(t,e,i,r,n,a,o,h,l,u,c){s.call(this,t,e,n,a,!1,o,h,l,u,c),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=r,this.yoyo=0!==h},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=e.texture.key,this.startFrame=e.frame.name),t&&e.setTexture(this.startTexture,this.startFrame)},update:function(t){var e=this.tween,i=this.targetIndex,s=e.targets[i];if(!s)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(a.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&s.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var n=this.isPlayingForward(),o=this.isPlayingBackward();if(n||o){var h=this.elapsed,l=this.duration,u=0,c=!1;(h+=t)>=l?(u=h-l,h=l,c=!0):h<0&&(h=0);var d=r(h/l,0,1);this.elapsed=h,this.progress=d,c&&(n?(s.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(u)):(s.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(u))),this.dispatchEvent(a.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],r=this.key;i.emit(t,i,r,s);var n=i.callbacks[e];n&&n.func.apply(i.callbackScope,[i,s,r].concat(n.params))}},destroy:function(){s.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});t.exports=o},55303:t=>{t.exports={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}},56694:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,r,a){for(var o in s)if(s.hasOwnProperty(o)){var h=e(s,o,r);if(!1!==h){if(i((a||t).prototype,o)){if(n.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,h)}else t.prototype[o]=s[o]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)s(t,e[i].prototype||e[i])}}function n(t){var e,i;if(t||(t={}),t.initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");e=t.initialize,delete t.initialize}else if(t.Extends){var n=t.Extends;e=function(){n.apply(this,arguments)}}else e=function(){};t.Extends?(e.prototype=Object.create(t.Extends.prototype),e.prototype.constructor=e,i=t.Extends,delete t.Extends):e.prototype.constructor=e;var a=null;return t.Mixins&&(a=t.Mixins,delete t.Mixins),r(e,a),s(e,t,!0,i),e}n.extend=s,n.mixin=r,n.ignoreFinals=!1,t.exports=n},72283:t=>{t.exports=function(){}},10618:t=>{t.exports=function(){return null}},78991:t=>{t.exports=function(t,e,i,s,r){if(void 0===r&&(r=t),i>0){var n=i-t.length;if(n<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>n&&(e.splice(n),a=n);for(var o=0;o<a;o++){var h=e[o];t.push(h),s&&s.call(r,h)}return e}},48522:t=>{t.exports=function(t,e,i,s,r,n){if(void 0===i&&(i=0),void 0===n&&(n=t),s>0){var a=s-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;s>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(n,l)}return e}},58742:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i<t.length&&(t.splice(i,1),t.push(e)),e}},30164:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=0;if(s(t,r,n))for(var o=r;o<n;o++){t[o][e]===i&&a++}return a}},36337:t=>{t.exports=function(t,e,i){var s,r=[null];for(s=3;s<arguments.length;s++)r.push(arguments[s]);for(s=0;s<t.length;s++)r[0]=t[s],e.apply(i,r);return t}},46208:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n)){var a,o=[null];for(a=5;a<arguments.length;a++)o.push(arguments[a]);for(a=r;a<n;a++)o[0]=t[a],e.apply(i,o)}return t}},2406:t=>{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,r,n=1;if(i){if(t<e[0][i])return e[0];for(;e[n][i]<t;)n++}else for(;e[n]<t;)n++;return n>e.length&&(n=e.length),i?(s=e[n-1][i],(r=e[n][i])-t<=t-s?e[n]:e[n-1]):(s=e[n-1],(r=e[n])-t<=t-s?r:s)}},5454:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s<t.length;s++)Array.isArray(t[s])?e(t[s],i):i.push(t[s]);return i};t.exports=e},71608:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=[];if(s(t,r,n))for(var o=r;o<n;o++){var h=t[o];(!e||e&&void 0===i&&h.hasOwnProperty(e)||e&&void 0!==i&&h[e]===i)&&a.push(h)}return a}},51463:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a<n;a++){var o=t[a];if(!e||e&&void 0===i&&o.hasOwnProperty(e)||e&&void 0!==i&&o[e]===i)return o}return null}},72861:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},24218:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s>r||(t.splice(s,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},58258:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s<r||(t.splice(s,1),0===r?t.unshift(e):t.splice(r,0,e)),t}},51172:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],r=t.indexOf(s);t[i]=s,t[r]=e}return t}},68396:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},27555:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i<t.length-1){var s=t[i+1],r=t.indexOf(s);t[i]=s,t[r]=e}return t}},13401:t=>{t.exports=function(t,e,i,s){var r,n=[],a=!1;if((i||s)&&(a=!0,i||(i=""),s||(s="")),e<t)for(r=t;r>=e;r--)a?n.push(i+r.toString()+s):n.push(r);else for(r=t;r<=e;r++)a?n.push(i+r.toString()+s):n.push(r);return n}},89955:(t,e,i)=>{var s=i(67233);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],n=Math.max(s((e-t)/(i||1)),0),a=0;a<n;a++)r.push(t),t+=i;return r}},53466:t=>{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return t<e?-1:t>e?1:0}var s=function(t,r,n,a,o){for(void 0===n&&(n=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>n;){if(a-n>600){var h=a-n+1,l=r-n+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(n,Math.floor(r-l*c/h+d)),p=Math.min(a,Math.floor(r+(h-l)*c/h+d));s(t,r,f,p,o)}var g=t[r],v=n,m=a;for(e(t,n,r),o(t[a],g)>0&&e(t,n,a);v<m;){for(e(t,v,m),v++,m--;o(t[v],g)<0;)v++;for(;o(t[m],g)>0;)m--}0===o(t[n],g)?e(t,n,m):e(t,++m,a),m<=r&&(n=m+1),r<=m&&(a=m-1)}};t.exports=s},75757:(t,e,i)=>{var s=i(10850),r=i(18592),n=function(t,e,i){for(var s=[],r=0;r<t.length;r++)for(var n=0;n<e.length;n++)for(var a=0;a<i;a++)s.push({a:t[r],b:e[n]});return s};t.exports=function(t,e,i){var a=s(i,"max",0),o=s(i,"qty",1),h=s(i,"random",!1),l=s(i,"randomB",!1),u=s(i,"repeat",0),c=s(i,"yoyo",!1),d=[];if(l&&r(e),-1===u)if(0===a)u=0;else{var f=t.length*e.length*o;c&&(f*=2),u=Math.ceil(a/f)}for(var p=0;p<=u;p++){var g=n(t,e,o);h&&r(g),d=d.concat(g),c&&(g.reverse(),d=d.concat(g))}return a&&d.splice(a),d}},66458:(t,e,i)=>{var s=i(72677);t.exports=function(t,e,i,r){var n;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(n=t.indexOf(e))?(s(t,n),i&&i.call(r,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(n=t.indexOf(h))&&(s(t,n),o.push(h),i&&i.call(r,h)),a--}return o}},8324:(t,e,i)=>{var s=i(72677);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var n=s(t,e);return i&&i.call(r,n),n}},47427:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,r,n){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===n&&(n=t),s(t,e,i)){var a=i-e,o=t.splice(e,a);if(r)for(var h=0;h<o.length;h++){var l=o[h];r.call(n,l)}return o}return[]}},50147:(t,e,i)=>{var s=i(72677);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return s(t,r)}},80402:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),r=t.indexOf(i);return-1!==s&&-1===r&&(t[s]=i,!0)}},77640:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s<e;s++)i=t.shift(),t.push(i);return i}},38487:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s<e;s++)i=t.pop(),t.unshift(i);return i}},45838:t=>{t.exports=function(t,e,i,s){var r=t.length;if(e<0||e>r||e>=i||i>r){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},27847:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},6034:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a<n;a++){var o=t[a];o.hasOwnProperty(e)&&(o[e]=i)}return t}},18592:t=>{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},28834:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},72677:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],r=e;r<i;r++)t[r]=t[r+1];return t.length=i,s}}},17922:(t,e,i)=>{var s=i(77290);function r(t,e){return String(t).localeCompare(e)}function n(t,e,i,s){var r,n,a,o,h,l=t.length,u=0,c=2*i;for(r=0;r<l;r+=c)for(a=(n=r+i)+i,n>l&&(n=l),a>l&&(a=l),o=r,h=n;;)if(o<n&&h<a)e(t[o],t[h])<=0?s[u++]=t[o++]:s[u++]=t[h++];else if(o<n)s[u++]=t[o++];else{if(!(h<a))break;s[u++]=t[h++]}}t.exports=function(t,e){if(void 0===e&&(e=r),!t||t.length<2)return t;if(s.features.stableSort)return t.sort(e);var i=function(t,e){var i=t.length;if(i<=1)return t;for(var s=new Array(i),r=1;r<i;r*=2){n(t,e,r,s);var a=t;t=s,s=a}return t}(t,e);return i!==t&&n(i,null,t.length,t),t}},96928:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[r]=e,t}},59959:(t,e,i)=>{t.exports={Matrix:i(13515),Add:i(78991),AddAt:i(48522),BringToTop:i(58742),CountAllMatching:i(30164),Each:i(36337),EachInRange:i(46208),FindClosestInSorted:i(2406),Flatten:i(5454),GetAll:i(71608),GetFirst:i(51463),GetRandom:i(72861),MoveDown:i(51172),MoveTo:i(68396),MoveUp:i(27555),MoveAbove:i(24218),MoveBelow:i(58258),NumberArray:i(13401),NumberArrayStep:i(89955),QuickSelect:i(53466),Range:i(75757),Remove:i(66458),RemoveAt:i(8324),RemoveBetween:i(47427),RemoveRandomElement:i(50147),Replace:i(80402),RotateLeft:i(77640),RotateRight:i(38487),SafeRange:i(45838),SendToBack:i(27847),SetAll:i(6034),Shuffle:i(18592),SortByDigits:i(28834),SpliceOne:i(72677),StableSort:i(17922),Swap:i(96928)}},97494:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i<t.length;i++)if(t[i].length!==e)return!1;return!0}},68428:(t,e,i)=>{var s=i(76400),r=i(97494);t.exports=function(t){var e="";if(!r(t))return e;for(var i=0;i<t.length;i++){for(var n=0;n<t[i].length;n++){var a=t[i][n].toString();e+="undefined"!==a?s(a,2):"?",n<t[i].length-1&&(e+=" |")}if(i<t.length-1){e+="\n";for(var o=0;o<t[i].length;o++)e+="---",o<t[i].length-1&&(e+="+");e+="\n"}}return e}},59521:t=>{t.exports=function(t){return t.reverse()}},51995:t=>{t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},89011:(t,e,i)=>{var s=i(63515);t.exports=function(t){return s(t,180)}},42549:(t,e,i)=>{var s=i(63515);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i<e;i++)t=s(t,90);return t}},63515:(t,e,i)=>{var s=i(97494),r=i(78581);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i<t.length;i++)t[i].reverse();t.reverse()}return t}},14305:(t,e,i)=>{var s=i(63515);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i<e;i++)t=s(t,-90);return t}},27365:(t,e,i)=>{var s=i(77640),r=i(38487);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):r(t,i)),0!==e)for(var n=0;n<t.length;n++){var a=t[n];e<0?s(a,Math.abs(e)):r(a,e)}return t}},78581:t=>{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),r=0;r<i;r++){s[r]=new Array(e);for(var n=e-1;n>-1;n--)s[r][n]=t[n][r]}return s}},13515:(t,e,i)=>{t.exports={CheckMatrix:i(97494),MatrixToString:i(68428),ReverseColumns:i(59521),ReverseRows:i(51995),Rotate180:i(89011),RotateLeft:i(42549),RotateMatrix:i(63515),RotateRight:i(14305),Translate:i(27365),TransposeMatrix:i(78581)}},40581:t=>{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,i){for(var s=new Uint8Array(t),r=s.length,n=i?"data:"+i+";base64,":"",a=0;a<r;a+=3)n+=e[s[a]>>2],n+=e[(3&s[a])<<4|s[a+1]>>4],n+=e[(15&s[a+1])<<2|s[a+2]>>6],n+=e[63&s[a+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n}},82329:t=>{for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),s=0;s<64;s++)i[e.charCodeAt(s)]=s;t.exports=function(t){var e,s,r,n,a=(t=t.substr(t.indexOf(",")+1)).length,o=.75*a,h=0;"="===t[a-1]&&(o--,"="===t[a-2]&&o--);for(var l=new ArrayBuffer(o),u=new Uint8Array(l),c=0;c<a;c+=4)e=i[t.charCodeAt(c)],s=i[t.charCodeAt(c+1)],r=i[t.charCodeAt(c+2)],n=i[t.charCodeAt(c+3)],u[h++]=e<<2|s>>4,u[h++]=(15&s)<<4|r>>2,u[h++]=(3&r)<<6|63&n;return l}},78417:(t,e,i)=>{t.exports={ArrayBufferToBase64:i(40581),Base64ToArrayBuffer:i(82329)}},22178:(t,e,i)=>{t.exports={Array:i(59959),Base64:i(78417),Objects:i(64615),String:i(50379),NOOP:i(72283),NULL:i(10618)}},32742:t=>{t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},28699:t=>{var e=function(t){var i,s,r;if("object"!=typeof t||null===t)return t;for(r in i=Array.isArray(t)?[]:{},t)s=t[r],i[r]=e(s);return i};t.exports=e},98611:(t,e,i)=>{var s=i(42911),r=function(){var t,e,i,n,a,o,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l<u;l++)if(null!=(t=arguments[l]))for(e in t)i=h[e],h!==(n=t[e])&&(c&&n&&(s(n)||(a=Array.isArray(n)))?(a?(a=!1,o=i&&Array.isArray(i)?i:[]):o=i&&s(i)?i:{},h[e]=r(c,o,n)):void 0!==n&&(h[e]=n));return h};t.exports=r},20494:(t,e,i)=>{var s=i(5923),r=i(10850);t.exports=function(t,e,i){var n=r(t,e,null);if(null===n)return i;if(Array.isArray(n))return s.RND.pick(n);if("object"==typeof n){if(n.hasOwnProperty("randInt"))return s.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return s.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if("function"==typeof n)return n(e);return n}},72632:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},94324:(t,e,i)=>{var s=i(10850),r=i(82897);t.exports=function(t,e,i,n,a){void 0===a&&(a=i);var o=s(t,e,a);return r(o,i,n)}},10850:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),n=t,a=s,o=i,h=i,l=!0,u=!0,c=0;c<r.length;c++)n&&n.hasOwnProperty(r[c])?(o=n[r[c]],n=n[r[c]]):l=!1,a&&a.hasOwnProperty(r[c])?(h=a[r[c]],a=a[r[c]]):u=!1;return l?o:u?h:i}return i}},87701:t=>{t.exports=function(t,e){for(var i=0;i<e.length;i++)if(!t.hasOwnProperty(e[i]))return!1;return!0}},53523:t=>{t.exports=function(t,e){for(var i=0;i<e.length;i++)if(t.hasOwnProperty(e[i]))return!0;return!1}},19256:t=>{t.exports=function(t,e){return t.hasOwnProperty(e)}},42911:t=>{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},30657:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var r in e)i.hasOwnProperty(r)||(i[r]=e[r]);return i}},72066:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var r in e)i.hasOwnProperty(r)&&(i[r]=e[r]);return i}},28820:(t,e,i)=>{var s=i(19256);t.exports=function(t,e){for(var i={},r=0;r<e.length;r++){var n=e[r];s(t,n)&&(i[n]=t[n])}return i}},22440:t=>{t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var s=e.split("."),r=t,n=t,a=0;a<s.length;a++){if(!r.hasOwnProperty(s[a]))return!1;n=r,r=r[s[a]]}return n[s[s.length-1]]=i,!0}return!1}},64615:(t,e,i)=>{t.exports={Clone:i(32742),DeepCopy:i(28699),Extend:i(98611),GetAdvancedValue:i(20494),GetFastValue:i(72632),GetMinMaxValue:i(94324),GetValue:i(10850),HasAll:i(87701),HasAny:i(53523),HasValue:i(19256),IsPlainObject:i(42911),Merge:i(30657),MergeRight:i(72066),Pick:i(28820),SetValue:i(22440)}},69429:t=>{t.exports=function(t,e){return t.replace(/%([0-9]+)/g,(function(t,i){return e[Number(i)-1]}))}},76400:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var r=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var n=Math.ceil((r=e-t.length)/2);t=new Array(r-n+1).join(i)+t+new Array(n+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},76872:t=>{t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e-1)+t.slice(e)}},8051:t=>{t.exports=function(t){return t.split("").reverse().join("")}},76583:t=>{t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}},40587:t=>{t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},50379:(t,e,i)=>{t.exports={Format:i(69429),Pad:i(76400),RemoveAt:i(76872),Reverse:i(8051),UppercaseFirst:i(40587),UUID:i(76583)}}},e={};function i(s){var r=e[s];if(void 0!==r)return r.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i(85780)})())); |