From aa3fdf0ea3c126f0c376e36324d93b3237bf561e Mon Sep 17 00:00:00 2001 From: Scott Westover Date: Fri, 7 Jun 2024 08:29:55 -0400 Subject: [PATCH] added connect four demo Signed-off-by: Scott Westover --- .../assets/images/connect-four.png | Bin 0 -> 678 bytes .../connect-four/assets/js/index-c9b6dde7.js | 6009 +++++++++++++++++ games/connect-four/index.html | 28 + 3 files changed, 6037 insertions(+) create mode 100644 games/connect-four/assets/images/connect-four.png create mode 100644 games/connect-four/assets/js/index-c9b6dde7.js create mode 100644 games/connect-four/index.html diff --git a/games/connect-four/assets/images/connect-four.png b/games/connect-four/assets/images/connect-four.png new file mode 100644 index 0000000000000000000000000000000000000000..8f5e6645e7e37bf8a98b8a3969acb353b03939b9 GIT binary patch literal 678 zcmV;X0$KfuP)Px%UP(kjRCr$PnXyg-F${)tqOc%!V?#U#15d&O@+2L24#dV*i3N&^T-7HlP2%K| z_D)2(Kab88f3qZp<6nCG;ihc-tYE3=cP83r^1Kxc zDtf!ohE0MJ7`bpz*w9^$DRd?y$HYMGw1pW}j_vmbN8=l}`vDF_nc zLl6uAQdzYFB*ll)K+^tx8k|zV090&uOAa#hUAj#+2UP6$r%nK#6D$R+23QfaRp3-d zB$vWaqeOBgpp6pS3foqgETj@?km?gkq=DZjw1$Yklj`Y$oGx)s7lgXR))bBHrB~e+ zZ`CKvu{?K}sY!{dixD3J{>@#KT;0`Js7R(}jqCe!GtNDq<#Ln@YRS)s`^_$S-R+C} zJ$xkf-fo_XczhpT*bCaC4;H?h1%QhFaj(gM@7&u6GzW%i04SUj9fOWAQXtd<0Pzrb zZGezs_^lAA+V2-S{^Ipu3P8Y9XFcVHkQ3Aa=pi1VKuY)!Q~~HIJ_bPzfL1xr<)mK| zQ~_w6_c`@I1po=_`!KK`7yu1B!Bsl|tSFWHp){ClY>Z_v0OkNo0jmLX6{0!oj}^f) z0b2#|a3Y-swiQ122J9@L;Vc04K=M35J3}fQfB;%FK^NN)k#d3G7gXZ_oVlKE z6GBKljHk{46he!du*i!M3ITqfx=C8})flbjtGyfzEos+wJ^l|N7BF80Ak}UF0000< MMNUMnLSTXb07hURTL1t6 literal 0 HcmV?d00001 diff --git a/games/connect-four/assets/js/index-c9b6dde7.js b/games/connect-four/assets/js/index-c9b6dde7.js new file mode 100644 index 0000000..3359fa1 --- /dev/null +++ b/games/connect-four/assets/js/index-c9b6dde7.js @@ -0,0 +1,6009 @@ +var wt=(st,b,p)=>{if(!b.has(st))throw TypeError("Cannot "+p)};var rt=(st,b,p)=>(wt(st,b,"read from private field"),p?p.call(st):b.get(st)),xt=(st,b,p)=>{if(b.has(st))throw TypeError("Cannot add the same private member more than once");b instanceof WeakSet?b.add(st):b.set(st,p)},vt=(st,b,p,E)=>(wt(st,b,"write to private field"),E?E.call(st,p):b.set(st,p),p);var gt=(st,b,p)=>(wt(st,b,"access private method"),p);const oe=function(){const b=document.createElement("link").relList;if(b&&b.supports&&b.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))E(t);new MutationObserver(t=>{for(const n of t)if(n.type==="childList")for(const d of n.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&E(d)}).observe(document,{childList:!0,subtree:!0});function p(t){const n={};return t.integrity&&(n.integrity=t.integrity),t.referrerpolicy&&(n.referrerPolicy=t.referrerpolicy),t.crossorigin==="use-credentials"?n.credentials="include":t.crossorigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function E(t){if(t.ep)return;t.ep=!0;const n=p(t);fetch(t.href,n)}};oe();var $t=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Lt={exports:{}};(function(st,b){(function(E,t){st.exports=t()})($t,function(){return function(p){var E={};function t(n){if(E[n])return E[n].exports;var d=E[n]={i:n,l:!1,exports:{}};return p[n].call(d.exports,d,d.exports,t),d.l=!0,d.exports}return t.m=p,t.c=E,t.d=function(n,d,a){t.o(n,d)||Object.defineProperty(n,d,{enumerable:!0,get:a})},t.r=function(n){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,d){if(d&1&&(n=t(n)),d&8||d&4&&typeof n=="object"&&n&&n.__esModule)return n;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:n}),d&2&&typeof n!="string")for(var o in n)t.d(a,o,function(r){return n[r]}.bind(null,o));return a},t.n=function(n){var d=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(d,"a",d),d},t.o=function(n,d){return Object.prototype.hasOwnProperty.call(n,d)},t.p="",t(t.s=1528)}([function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function t(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}function n(e,i,l){var s=l?e[i]:Object.getOwnPropertyDescriptor(e,i);return!l&&s.value&&typeof s.value=="object"&&(s=s.value),s&&t(s)?(typeof s.enumerable=="undefined"&&(s.enumerable=!0),typeof s.configurable=="undefined"&&(s.configurable=!0),s):!1}function d(e,i){var l=Object.getOwnPropertyDescriptor(e,i);return l?(l.value&&typeof l.value=="object"&&(l=l.value),l.configurable===!1):!1}function a(e,i,l,s){for(var h in i)if(!!i.hasOwnProperty(h)){var f=n(i,h,l);if(f!==!1){var v=s||e;if(d(v.prototype,h)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+h+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(e.prototype,h,f)}else e.prototype[h]=i[h]}}function o(e,i){if(!!i){Array.isArray(i)||(i=[i]);for(var l=0;l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(){};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=typeof n;return!n||o==="number"||o==="string"?a:n.hasOwnProperty(d)&&n[d]!==void 0?n[d]:a};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(124),a=new n({initialize:function(r,e){this.x=0,this.y=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0):(e===void 0&&(e=r),this.x=r||0,this.y=e||0)},clone:function(){return new a(this.x,this.y)},copy:function(o){return this.x=o.x||0,this.y=o.y||0,this},setFromObject:function(o){return this.x=o.x||0,this.y=o.y||0,this},set:function(o,r){return r===void 0&&(r=o),this.x=o,this.y=r,this},setTo:function(o,r){return this.set(o,r)},setToPolar:function(o,r){return r==null&&(r=1),this.x=Math.cos(o)*r,this.y=Math.sin(o)*r,this},equals:function(o){return this.x===o.x&&this.y===o.y},fuzzyEquals:function(o,r){return d(this.x,o.x,r)&&d(this.y,o.y,r)},angle:function(){var o=Math.atan2(this.y,this.x);return o<0&&(o+=2*Math.PI),o},setAngle:function(o){return this.setToPolar(o,this.length())},add:function(o){return this.x+=o.x,this.y+=o.y,this},subtract:function(o){return this.x-=o.x,this.y-=o.y,this},multiply:function(o){return this.x*=o.x,this.y*=o.y,this},scale:function(o){return isFinite(o)?(this.x*=o,this.y*=o):(this.x=0,this.y=0),this},divide:function(o){return this.x/=o.x,this.y/=o.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(o){var r=o.x-this.x,e=o.y-this.y;return Math.sqrt(r*r+e*e)},distanceSq:function(o){var r=o.x-this.x,e=o.y-this.y;return r*r+e*e},length:function(){var o=this.x,r=this.y;return Math.sqrt(o*o+r*r)},setLength:function(o){return this.normalize().scale(o)},lengthSq:function(){var o=this.x,r=this.y;return o*o+r*r},normalize:function(){var o=this.x,r=this.y,e=o*o+r*r;return e>0&&(e=1/Math.sqrt(e),this.x=o*e,this.y=r*e),this},normalizeRightHand:function(){var o=this.x;return this.x=this.y*-1,this.y=o,this},normalizeLeftHand:function(){var o=this.x;return this.x=this.y,this.y=o*-1,this},dot:function(o){return this.x*o.x+this.y*o.y},cross:function(o){return this.x*o.y-this.y*o.x},lerp:function(o,r){r===void 0&&(r=0);var e=this.x,i=this.y;return this.x=e+r*(o.x-e),this.y=i+r*(o.y-i),this},transformMat3:function(o){var r=this.x,e=this.y,i=o.val;return this.x=i[0]*r+i[3]*e+i[6],this.y=i[1]*r+i[4]*e+i[7],this},transformMat4:function(o){var r=this.x,e=this.y,i=o.val;return this.x=i[0]*r+i[4]*e+i[12],this.y=i[1]*r+i[5]*e+i[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(o){var r=this.length();return r&&r>o&&this.scale(o/r),this},reflect:function(o){return o=o.clone().normalize(),this.subtract(o.scale(2*this.dot(o)))},mirror:function(o){return this.reflect(o).negate()},rotate:function(o){var r=Math.cos(o),e=Math.sin(o);return this.set(r*this.x-e*this.y,e*this.x+r*this.y)}});a.ZERO=new a,a.RIGHT=new a(1,0),a.LEFT=new a(-1,0),a.UP=new a(0,-1),a.DOWN=new a(0,1),a.ONE=new a(1,1),p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(56),a=new n({initialize:function(r,e){r===void 0&&(r=0),e===void 0&&(e=r),this.type=d.POINT,this.x=r,this.y=e},setTo:function(o,r){return o===void 0&&(o=0),r===void 0&&(r=o),this.x=o,this.y=r,this}});p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(24),a=t(20),o=new n({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(a.DESTROY,this.destroy,this)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},existing:function(r){return(r.renderCanvas||r.renderWebGL)&&this.displayList.add(r),r.preUpdate&&this.updateList.add(r),r},shutdown:function(){this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(r,e){o.prototype.hasOwnProperty(r)||(o.prototype[r]=e)},o.remove=function(r){o.prototype.hasOwnProperty(r)&&delete o.prototype[r]},d.register("GameObjectFactory",o,"add"),p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){if(!n||typeof n=="number")return a;if(n.hasOwnProperty(d))return n[d];if(d.indexOf(".")!==-1){for(var o=d.split("."),r=n,e=a,i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){if(typeof n!="object"||n.nodeType||n===n.window)return!1;try{if(n.constructor&&!{}.hasOwnProperty.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={},n={install:function(d){for(var a in t)d[a]=t[a]},register:function(d,a){t[d]=a},destroy:function(){t={}}};p.exports=n},function(p,E,t){var n=Object.prototype.hasOwnProperty,d="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(d=!1));function o(l,s,h){this.fn=l,this.context=s,this.once=h||!1}function r(l,s,h,f,v){if(typeof h!="function")throw new TypeError("The listener must be a function");var u=new o(h,f||l,v),c=d?d+s:s;return l._events[c]?l._events[c].fn?l._events[c]=[l._events[c],u]:l._events[c].push(u):(l._events[c]=u,l._eventsCount++),l}function e(l,s){--l._eventsCount===0?l._events=new a:delete l._events[s]}function i(){this._events=new a,this._eventsCount=0}i.prototype.eventNames=function(){var s=[],h,f;if(this._eventsCount===0)return s;for(f in h=this._events)n.call(h,f)&&s.push(d?f.slice(1):f);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(h)):s},i.prototype.listeners=function(s){var h=d?d+s:s,f=this._events[h];if(!f)return[];if(f.fn)return[f.fn];for(var v=0,u=f.length,c=new Array(u);v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(57),a=t(171),o=t(306),r=t(56),e=t(47),i=t(174),l=new n({initialize:function(h,f,v,u){h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),u===void 0&&(u=0),this.type=r.RECTANGLE,this.x=h,this.y=f,this.width=v,this.height=u},contains:function(s,h){return d(this,s,h)},getPoint:function(s,h){return a(this,s,h)},getPoints:function(s,h,f){return o(this,s,h,f)},getRandomPoint:function(s){return i(this,s)},setTo:function(s,h,f,v){return this.x=s,this.y=h,this.width=f,this.height=v,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(s,h){return h===void 0&&(h=s),this.x=s,this.y=h,this},setSize:function(s,h){return h===void 0&&(h=s),this.width=s,this.height=h,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(s){return s===void 0&&(s=new e),s.setTo(this.x,this.y,this.right,this.y),s},getLineB:function(s){return s===void 0&&(s=new e),s.setTo(this.right,this.y,this.right,this.bottom),s},getLineC:function(s){return s===void 0&&(s=new e),s.setTo(this.right,this.bottom,this.x,this.bottom),s},getLineD:function(s){return s===void 0&&(s=new e),s.setTo(this.x,this.bottom,this.x,this.y),s},left:{get:function(){return this.x},set:function(s){s>=this.right?this.width=0:this.width=this.right-s,this.x=s}},right:{get:function(){return this.x+this.width},set:function(s){s<=this.x?this.width=0:this.width=s-this.x}},top:{get:function(){return this.y},set:function(s){s>=this.bottom?this.height=0:this.height=this.bottom-s,this.y=s}},bottom:{get:function(){return this.y+this.height},set:function(s){s<=this.y?this.height=0:this.height=s-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(s){this.x=s-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(s){this.y=s-this.height/2}}});p.exports=l},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Alpha:t(607),AlphaSingle:t(303),BlendMode:t(304),ComputedSize:t(608),Crop:t(609),Depth:t(305),Flip:t(610),GetBounds:t(611),Mask:t(309),Origin:t(632),PathFollower:t(633),Pipeline:t(167),ScrollFactor:t(312),Size:t(634),Texture:t(635),TextureCrop:t(636),Tint:t(637),ToJSON:t(176),Transform:t(313),TransformMatrix:t(25),Visible:t(314)}},function(p,E){/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @author Matthew Groves <@doormat> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function t(n){for(var d="",a=0;a0&&(d+=` +else `),a>>0},getTintAppendFloatAlpha:function(n,d){var a=(d*255|0)&255;return(a<<24|n)>>>0},getTintAppendFloatAlphaAndSwap:function(n,d){var a=(n>>16|0)&255,o=(n>>8|0)&255,r=(n|0)&255,e=(d*255|0)&255;return(e<<24|r<<16|o<<8|a)>>>0},getFloatsFromUintRGB:function(n){var d=(n>>16|0)&255,a=(n>>8|0)&255,o=(n|0)&255;return[d/255,a/255,o/255]},checkShaderMax:function(n,d){(!d||d===-1)&&(d=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS));for(var a=n.createShader(n.FRAGMENT_SHADER),o=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(` +`);;){var r=o.replace(/%forloop%/gi,t(d));if(n.shaderSource(a,r),n.compileShader(a),!n.getShaderParameter(a,n.COMPILE_STATUS))d=d/2|0;else break}return d},parseFragmentShaderMaxTextures:function(n,d){if(!n)return"";for(var a="",o=0;o0&&(a+=` + else `),o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(193),d=t(6),a=function(o,r,e){var i=d(o,r,null);if(i===null)return e;if(Array.isArray(i))return n.RND.pick(i);if(typeof i=="object"){if(i.hasOwnProperty("randInt"))return n.RND.integerInRange(i.randInt[0],i.randInt[1]);if(i.hasOwnProperty("randFloat"))return n.RND.realInRange(i.randFloat[0],i.randFloat[1])}else if(typeof i=="function")return i(r);return i};p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={PI2:Math.PI*2,TAU:Math.PI*.5,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(176),a=t(101),o=t(9),r=t(75),e=t(20),i=new n({Extends:o,initialize:function(s,h){o.call(this),this.scene=s,this.displayList=null,this.type=h,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(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this),s.sys.queueDepthSort()},setActive:function(l){return this.active=l,this},setName:function(l){return this.name=l,this},setState:function(l){return this.state=l,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(l,s){return this.data||(this.data=new a(this)),this.data.set(l,s),this},incData:function(l,s){return this.data||(this.data=new a(this)),this.data.inc(l,s),this},toggleData:function(l){return this.data||(this.data=new a(this)),this.data.toggle(l),this},getData:function(l){return this.data||(this.data=new a(this)),this.data.get(l)},setInteractive:function(l,s,h){return this.scene.sys.input.enable(this,l,s,h),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return d(this)},willRender:function(l){return!(i.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&l.id)},getIndexList:function(){for(var l=this,s=this.parentContainer,h=[];s&&(h.unshift(s.getIndex(l)),l=s,s.parentContainer);)s=s.parentContainer;return this.displayList?h.unshift(this.displayList.getIndex(l)):h.unshift(this.scene.sys.displayList.getIndex(l)),h},addToDisplayList:function(l){return l===void 0&&(l=this.scene.sys.displayList),this.displayList&&this.displayList!==l&&this.removeFromDisplayList(),l.exists(this)||(this.displayList=l,l.add(this,!0),l.queueDepthSort(),this.emit(r.ADDED_TO_SCENE,this,this.scene),l.events.emit(e.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var l=this.displayList||this.scene.sys.displayList;return l.exists(this)&&(l.remove(this,!0),l.queueDepthSort(),this.displayList=null,this.emit(r.REMOVED_FROM_SCENE,this,this.scene),l.events.emit(e.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(l){!this.scene||this.ignoreDestroy||(l===void 0&&(l=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(r.DESTROY,this,l),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.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});i.RENDER_MASK=15,p.exports=i},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(24),a=t(20),o=new n({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(a.DESTROY,this.destroy,this)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(r,e){o.prototype.hasOwnProperty(r)||(o.prototype[r]=e)},o.remove=function(r){o.prototype.hasOwnProperty(r)&&delete o.prototype[r]},d.register("GameObjectCreator",o,"make"),p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(7),d=function(){var a,o,r,e,i,l,s=arguments[0]||{},h=1,f=arguments.length,v=!1;for(typeof s=="boolean"&&(v=s,s=arguments[1]||{},h=2),f===h&&(s=this,--h);h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return Math.max(d,Math.min(a,n))};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(25),d=new n,a=new n,o=new n,r={camera:d,sprite:a,calc:o},e=function(i,l,s){var h=d,f=a,v=o;return f.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),h.copyFrom(l.matrix),s?(h.multiplyWithOffset(s,-l.scrollX*i.scrollFactorX,-l.scrollY*i.scrollFactorY),f.e=i.x,f.f=i.y):(f.e-=l.scrollX*i.scrollFactorX,f.f-=l.scrollY*i.scrollFactorY),h.multiply(f,v),r};p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADDED_TO_SCENE:t(656),BOOT:t(657),CREATE:t(658),DESTROY:t(659),PAUSE:t(660),POST_UPDATE:t(661),PRE_RENDER:t(662),PRE_UPDATE:t(663),READY:t(664),REMOVED_FROM_SCENE:t(665),RENDER:t(666),RESUME:t(667),SHUTDOWN:t(668),SLEEP:t(669),START:t(670),TRANSITION_COMPLETE:t(671),TRANSITION_INIT:t(672),TRANSITION_OUT:t(673),TRANSITION_START:t(674),TRANSITION_WAKE:t(675),UPDATE:t(676),WAKE:t(677)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={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};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BLUR:t(612),BOOT:t(613),CONTEXT_LOST:t(614),CONTEXT_RESTORED:t(615),DESTROY:t(616),FOCUS:t(617),HIDDEN:t(618),PAUSE:t(619),POST_RENDER:t(620),POST_STEP:t(621),PRE_RENDER:t(622),PRE_STEP:t(623),READY:t(624),RESUME:t(625),STEP:t(626),VISIBLE:t(627)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(95),o=t(2),r=t(155),e=t(240),i=t(517),l=t(156),s=new n({initialize:function(f,v){this.loader=f,this.cache=o(v,"cache",!1),this.type=o(v,"type",!1),this.key=o(v,"key",!1);var u=this.key;if(f.prefix&&f.prefix!==""&&(this.key=f.prefix+u),!this.type||!this.key)throw new Error("Invalid Loader."+this.type+" key");var c=o(v,"url");c===void 0?c=f.path+u+"."+o(v,"extension",""):typeof c=="string"&&!c.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)&&(c=f.path+c),this.url=c,this.src="",this.xhrSettings=l(o(v,"responseType",void 0)),o(v,"xhrSettings",!1)&&(this.xhrSettings=e(this.xhrSettings,o(v,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?d.FILE_POPULATED:d.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(v,"config",{}),this.multiFile,this.linkFile},setLink:function(h){this.linkFile=h,h.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===d.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=d.FILE_LOADING,this.src=r(this,this.loader.baseURL),this.src.indexOf("data:")===0?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=i(this,this.loader.xhr))},onLoad:function(h,f){var v=h.responseURL&&(h.responseURL.indexOf("file://")===0||h.responseURL.indexOf("capacitor://")===0),u=v&&f.target.status===0,c=!(f.target&&f.target.status!==200)||u;h.readyState===4&&h.status>=400&&h.status<=599&&(c=!1),this.state=d.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,c)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(h){h.lengthComputable&&(this.bytesLoaded=h.loaded,this.bytesTotal=h.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(a.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=d.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=d.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=d.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.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(h){h===void 0&&(h=this.data);var f=this.key,v=this.type;this.loader.emit(a.FILE_COMPLETE,f,v,h),this.loader.emit(a.FILE_KEY_COMPLETE+v+"-"+f,f,v,h),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});s.createObjectURL=function(h,f,v){if(typeof URL=="function")h.src=URL.createObjectURL(f);else{var u=new FileReader;u.onload=function(){h.removeAttribute("crossOrigin"),h.src="data:"+(f.type||v)+";base64,"+u.result.split(",")[1]},u.onerror=h.onerror,u.readAsDataURL(f)}},s.revokeObjectURL=function(h){typeof URL=="function"&&URL.revokeObjectURL(h.src)},p.exports=s},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={},n={},d={};d.register=function(a,o,r,e){e===void 0&&(e=!1),t[a]={plugin:o,mapping:r,custom:e}},d.registerCustom=function(a,o,r,e){n[a]={plugin:o,mapping:r,data:e}},d.hasCore=function(a){return t.hasOwnProperty(a)},d.hasCustom=function(a){return n.hasOwnProperty(a)},d.getCore=function(a){return t[a]},d.getCustom=function(a){return n[a]},d.getCustomClass=function(a){return n.hasOwnProperty(a)?n[a].plugin:null},d.remove=function(a){t.hasOwnProperty(a)&&delete t[a]},d.removeCustom=function(a){n.hasOwnProperty(a)&&delete n[a]},d.destroyCorePlugins=function(){for(var a in t)t.hasOwnProperty(a)&&delete t[a]},d.destroyCustomPlugins=function(){for(var a in n)n.hasOwnProperty(a)&&delete n[a]},p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(14),a=t(3),o=new n({initialize:function(e,i,l,s,h,f){e===void 0&&(e=1),i===void 0&&(i=0),l===void 0&&(l=0),s===void 0&&(s=1),h===void 0&&(h=0),f===void 0&&(f=0),this.matrix=new Float32Array([e,i,l,s,h,f,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(r){this.matrix[0]=r}},b:{get:function(){return this.matrix[1]},set:function(r){this.matrix[1]=r}},c:{get:function(){return this.matrix[2]},set:function(r){this.matrix[2]=r}},d:{get:function(){return this.matrix[3]},set:function(r){this.matrix[3]=r}},e:{get:function(){return this.matrix[4]},set:function(r){this.matrix[4]=r}},f:{get:function(){return this.matrix[5]},set:function(r){this.matrix[5]=r}},tx:{get:function(){return this.matrix[4]},set:function(r){this.matrix[4]=r}},ty:{get:function(){return this.matrix[5]},set:function(r){this.matrix[5]=r}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var r=this.matrix,e=r[0],i=r[1],l=r[2],s=r[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):l||s?d.TAU-(s>0?Math.acos(-l/this.scaleY):-Math.acos(l/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 r=this.matrix;return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,this},translate:function(r,e){var i=this.matrix;return i[4]=i[0]*r+i[2]*e+i[4],i[5]=i[1]*r+i[3]*e+i[5],this},scale:function(r,e){var i=this.matrix;return i[0]*=r,i[1]*=r,i[2]*=e,i[3]*=e,this},rotate:function(r){var e=Math.sin(r),i=Math.cos(r),l=this.matrix,s=l[0],h=l[1],f=l[2],v=l[3];return l[0]=s*i+f*e,l[1]=h*i+v*e,l[2]=s*-e+f*i,l[3]=h*-e+v*i,this},multiply:function(r,e){var i=this.matrix,l=r.matrix,s=i[0],h=i[1],f=i[2],v=i[3],u=i[4],c=i[5],x=l[0],g=l[1],m=l[2],y=l[3],T=l[4],S=l[5],C=e===void 0?this:e;return C.a=x*s+g*f,C.b=x*h+g*v,C.c=m*s+y*f,C.d=m*h+y*v,C.e=T*s+S*f+u,C.f=T*h+S*v+c,C},multiplyWithOffset:function(r,e,i){var l=this.matrix,s=r.matrix,h=l[0],f=l[1],v=l[2],u=l[3],c=l[4],x=l[5],g=e*h+i*v+c,m=e*f+i*u+x,y=s[0],T=s[1],S=s[2],C=s[3],P=s[4],A=s[5];return l[0]=y*h+T*v,l[1]=y*f+T*u,l[2]=S*h+C*v,l[3]=S*f+C*u,l[4]=P*h+A*v+g,l[5]=P*f+A*u+m,this},transform:function(r,e,i,l,s,h){var f=this.matrix,v=f[0],u=f[1],c=f[2],x=f[3],g=f[4],m=f[5];return f[0]=r*v+e*c,f[1]=r*u+e*x,f[2]=i*v+l*c,f[3]=i*u+l*x,f[4]=s*v+h*c+g,f[5]=s*u+h*x+m,this},transformPoint:function(r,e,i){i===void 0&&(i={x:0,y:0});var l=this.matrix,s=l[0],h=l[1],f=l[2],v=l[3],u=l[4],c=l[5];return i.x=r*s+e*f+u,i.y=r*h+e*v+c,i},invert:function(){var r=this.matrix,e=r[0],i=r[1],l=r[2],s=r[3],h=r[4],f=r[5],v=e*s-i*l;return r[0]=s/v,r[1]=-i/v,r[2]=-l/v,r[3]=e/v,r[4]=(l*f-s*h)/v,r[5]=-(e*f-i*h)/v,this},copyFrom:function(r){var e=this.matrix;return e[0]=r.a,e[1]=r.b,e[2]=r.c,e[3]=r.d,e[4]=r.e,e[5]=r.f,this},copyFromArray:function(r){var e=this.matrix;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],this},copyToContext:function(r){var e=this.matrix;return r.transform(e[0],e[1],e[2],e[3],e[4],e[5]),r},setToContext:function(r){var e=this.matrix;return r.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),r},copyToArray:function(r){var e=this.matrix;return r===void 0?r=[e[0],e[1],e[2],e[3],e[4],e[5]]:(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5]),r},setTransform:function(r,e,i,l,s,h){var f=this.matrix;return f[0]=r,f[1]=e,f[2]=i,f[3]=l,f[4]=s,f[5]=h,this},decomposeMatrix:function(){var r=this.decomposedMatrix,e=this.matrix,i=e[0],l=e[1],s=e[2],h=e[3],f=i*h-l*s;if(r.translateX=e[4],r.translateY=e[5],i||l){var v=Math.sqrt(i*i+l*l);r.rotation=l>0?Math.acos(i/v):-Math.acos(i/v),r.scaleX=v,r.scaleY=f/v}else if(s||h){var u=Math.sqrt(s*s+h*h);r.rotation=Math.PI*.5-(h>0?Math.acos(-s/u):-Math.acos(s/u)),r.scaleX=f/u,r.scaleY=u}else r.rotation=0,r.scaleX=0,r.scaleY=0;return r},applyITRS:function(r,e,i,l,s){var h=this.matrix,f=Math.sin(i),v=Math.cos(i);return h[4]=r,h[5]=e,h[0]=v*l,h[1]=f*l,h[2]=-f*s,h[3]=v*s,this},applyInverse:function(r,e,i){i===void 0&&(i=new a);var l=this.matrix,s=l[0],h=l[1],f=l[2],v=l[3],u=l[4],c=l[5],x=1/(s*v+f*-h);return i.x=v*x*r+-f*x*e+(c*f-u*v)*x,i.y=s*x*e+-h*x*r+(-c*s+u*h)*x,i},getX:function(r,e){return r*this.a+e*this.c+this.e},getY:function(r,e){return r*this.b+e*this.d+this.f},getXRound:function(r,e,i){var l=this.getX(r,e);return i&&(l=Math.round(l)),l},getYRound:function(r,e,i){var l=this.getY(r,e);return i&&(l=Math.round(l)),l},getCSSMatrix:function(){var r=this.matrix;return"matrix("+r[0]+","+r[1]+","+r[2]+","+r[3]+","+r[4]+","+r[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(2),d=function(a,o,r,e,i,l){a===void 0&&(a=0),o===void 0&&(o=0),r===void 0&&(r=l.width),e===void 0&&(e=l.height),i||(i={});var s=n(i,"isNotEmpty",!1),h=n(i,"isColliding",!1),f=n(i,"hasInterestingFace",!1);a<0&&(r+=a,a=0),o<0&&(e+=o,o=0),a+r>l.width&&(r=Math.max(l.width-a,0)),o+e>l.height&&(e=Math.max(l.height-o,0));for(var v=[],u=o;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r,e){o===void 0&&(o=0),r===void 0&&(r=0),e===void 0&&(e=1);var i,l=0,s=n.length;if(e===1)for(i=r;i=0;i--)n[i][d]=a+l*o,l++;return n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(35),d=t(13),a=function(o,r,e){r.x=d(e,"x",0),r.y=d(e,"y",0),r.depth=d(e,"depth",0),r.flipX=d(e,"flipX",!1),r.flipY=d(e,"flipY",!1);var i=d(e,"scale",null);typeof i=="number"?r.setScale(i):i!==null&&(r.scaleX=d(i,"x",1),r.scaleY=d(i,"y",1));var l=d(e,"scrollFactor",null);typeof l=="number"?r.setScrollFactor(l):l!==null&&(r.scrollFactorX=d(l,"x",1),r.scrollFactorY=d(l,"y",1)),r.rotation=d(e,"rotation",0);var s=d(e,"angle",null);s!==null&&(r.angle=s),r.alpha=d(e,"alpha",1);var h=d(e,"origin",null);if(typeof h=="number")r.setOrigin(h);else if(h!==null){var f=d(h,"x",.5),v=d(h,"y",.5);r.setOrigin(f,v)}r.blendMode=d(e,"blendMode",n.NORMAL),r.visible=d(e,"visible",!0);var u=d(e,"add",!0);return u&&o.sys.displayList.add(r),r.preUpdate&&o.sys.updateList.add(r),r};p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=function(a,o,r,e,i){var l=e.alpha*r.alpha;if(l<=0)return!1;var s=n(r,e,i).calc;return o.globalCompositeOperation=a.blendModes[r.blendMode],o.globalAlpha=l,o.save(),s.setToContext(o),o.imageSmoothingEnabled=!(!a.antialias||r.frame&&r.frame.source.scaleMode),!0};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(33),d=t(192),a=[],o=!1,r=function(){var e=function(x,g,m,y,T){g===void 0&&(g=1),m===void 0&&(m=1),y===void 0&&(y=n.CANVAS),T===void 0&&(T=!1);var S,C=s(y);return C===null?(C={parent:x,canvas:document.createElement("canvas"),type:y},y===n.CANVAS&&a.push(C),S=C.canvas):(C.parent=x,S=C.canvas),T&&(C.parent=S),S.width=g,S.height=m,o&&y===n.CANVAS&&d.disable(S.getContext("2d")),S},i=function(x,g,m){return e(x,g,m,n.CANVAS)},l=function(x,g,m){return e(x,g,m,n.WEBGL)},s=function(x){if(x===void 0&&(x=n.CANVAS),x===n.WEBGL)return null;for(var g=0;g0;a--){var o=Math.floor(t.random()*(a+1)),r=d[a];d[a]=d[o],d[o]=r}return d},t.choose=function(d){return d[Math.floor(t.random()*d.length)]},t.isElement=function(d){return typeof HTMLElement!="undefined"?d instanceof HTMLElement:!!(d&&d.nodeType&&d.nodeName)},t.isArray=function(d){return Object.prototype.toString.call(d)==="[object Array]"},t.isFunction=function(d){return typeof d=="function"},t.isPlainObject=function(d){return typeof d=="object"&&d.constructor===Object},t.isString=function(d){return Object.prototype.toString.call(d)==="[object String]"},t.clamp=function(d,a,o){return do?o:d},t.sign=function(d){return d<0?-1:1},t.now=function(){if(typeof window!="undefined"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-t._nowStartTime},t.random=function(d,a){return d=typeof d!="undefined"?d:0,a=typeof a!="undefined"?a:1,d+n()*(a-d)};var n=function(){return t._seed=(t._seed*9301+49297)%233280,t._seed/233280};t.colorToNumber=function(d){return d=d.replace("#",""),d.length==3&&(d=d.charAt(0)+d.charAt(0)+d.charAt(1)+d.charAt(1)+d.charAt(2)+d.charAt(2)),parseInt(d,16)},t.logLevel=1,t.log=function(){console&&t.logLevel>0&&t.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},t.info=function(){console&&t.logLevel>0&&t.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},t.warn=function(){console&&t.logLevel>0&&t.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},t.nextId=function(){return t._nextId++},t.indexOf=function(d,a){if(d.indexOf)return d.indexOf(a);for(var o=0;o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n={VERSION:"3.55.2",BlendModes:t(35),ScaleModes:t(168),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};p.exports=n},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(11),a=t(15),o=t(47),r=new n({Extends:a,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.GetBounds,d.Mask,d.Origin,d.Pipeline,d.ScrollFactor,d.Transform,d.Visible],initialize:function(i,l,s){l===void 0&&(l="Shape"),a.call(this,i,l),this.geom=s,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 o,this.width=0,this.height=0,this.initPipeline()},setFillStyle:function(e,i){return i===void 0&&(i=1),e===void 0?this.isFilled=!1:(this.fillColor=e,this.fillAlpha=i,this.isFilled=!0),this},setStrokeStyle:function(e,i,l){return l===void 0&&(l=1),e===void 0?this.isStroked=!1:(this.lineWidth=e,this.strokeColor=i,this.strokeAlpha=l,this.isStroked=!0),this},setClosePath:function(e){return this.closePath=e,this},setSize:function(e,i){return this.width=e,this.height=i,this},setDisplaySize:function(e,i){return this.displayWidth=e,this.displayHeight=i,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(e){this.scaleX=e/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(e){this.scaleY=e/this.height}}});p.exports=r},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(14),d=function(a){return a*n.DEG_TO_RAD};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={DESTROY:t(743),FADE_IN_COMPLETE:t(744),FADE_IN_START:t(745),FADE_OUT_COMPLETE:t(746),FADE_OUT_START:t(747),FLASH_COMPLETE:t(748),FLASH_START:t(749),FOLLOW_UPDATE:t(750),PAN_COMPLETE:t(751),PAN_START:t(752),POST_RENDER:t(753),PRE_RENDER:t(754),ROTATE_COMPLETE:t(755),ROTATE_START:t(756),SHAKE_COMPLETE:t(757),SHAKE_START:t(758),ZOOM_COMPLETE:t(759),ZOOM_START:t(760)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(103),a=t(328),o=t(188),r=t(329),e=new n({initialize:function(l,s,h,f){l===void 0&&(l=0),s===void 0&&(s=0),h===void 0&&(h=0),f===void 0&&(f=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(l,s,h,f)},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(i,l,s,h,f){return h===void 0&&(h=255),f===void 0&&(f=!0),this._locked=!0,this.red=i,this.green=l,this.blue=s,this.alpha=h,this._locked=!1,this.update(f)},setGLTo:function(i,l,s,h){return h===void 0&&(h=1),this._locked=!0,this.redGL=i,this.greenGL=l,this.blueGL=s,this.alphaGL=h,this._locked=!1,this.update(!0)},setFromRGB:function(i){return this._locked=!0,this.red=i.r,this.green=i.g,this.blue=i.b,i.hasOwnProperty("a")&&(this.alpha=i.a),this._locked=!1,this.update(!0)},setFromHSV:function(i,l,s){return o(i,l,s,this)},update:function(i){if(i===void 0&&(i=!1),this._locked)return this;var l=this.r,s=this.g,h=this.b,f=this.a;return this._color=d(l,s,h),this._color32=a(l,s,h,f),this._rgba="rgba("+l+","+s+","+h+","+f/255+")",i&&r(l,s,h,this),this},updateHSV:function(){var i=this.r,l=this.g,s=this.b;return r(i,l,s,this),this},clone:function(){return new e(this.r,this.g,this.b,this.a)},gray:function(i){return this.setTo(i,i,i)},random:function(i,l){i===void 0&&(i=0),l===void 0&&(l=255);var s=Math.floor(i+Math.random()*(l-i)),h=Math.floor(i+Math.random()*(l-i)),f=Math.floor(i+Math.random()*(l-i));return this.setTo(s,h,f)},randomGray:function(i,l){i===void 0&&(i=0),l===void 0&&(l=255);var s=Math.floor(i+Math.random()*(l-i));return this.setTo(s,s,s)},saturate:function(i){return this.s+=i/100,this},desaturate:function(i){return this.s-=i/100,this},lighten:function(i){return this.v+=i/100,this},darken:function(i){return this.v-=i/100,this},brighten:function(i){var l=this.r,s=this.g,h=this.b;return l=Math.max(0,Math.min(255,l-Math.round(255*-(i/100)))),s=Math.max(0,Math.min(255,s-Math.round(255*-(i/100)))),h=Math.max(0,Math.min(255,h-Math.round(255*-(i/100)))),this.setTo(l,s,h)},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(i){this.gl[0]=Math.min(Math.abs(i),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(i){this.gl[1]=Math.min(Math.abs(i),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(i){this.gl[2]=Math.min(Math.abs(i),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(i){this.gl[3]=Math.min(Math.abs(i),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(i){i=Math.floor(Math.abs(i)),this.r=Math.min(i,255),this.gl[0]=i/255,this.update(!0)}},green:{get:function(){return this.g},set:function(i){i=Math.floor(Math.abs(i)),this.g=Math.min(i,255),this.gl[1]=i/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(i){i=Math.floor(Math.abs(i)),this.b=Math.min(i,255),this.gl[2]=i/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(i){i=Math.floor(Math.abs(i)),this.a=Math.min(i,255),this.gl[3]=i/255,this.update()}},h:{get:function(){return this._h},set:function(i){this._h=i,o(i,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(i){this._s=i,o(this._h,i,this._v,this)}},v:{get:function(){return this._v},set:function(i){this._v=i,o(this._h,this._s,i,this)}}});p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o,r,e){this.x=0,this.y=0,this.z=0,typeof o=="object"?(this.x=o.x||0,this.y=o.y||0,this.z=o.z||0):(this.x=o||0,this.y=r||0,this.z=e||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(a){return this.x=Math.min(this.x,a.x),this.y=Math.min(this.y,a.y),this.z=Math.min(this.z,a.z),this},max:function(a){return this.x=Math.max(this.x,a.x),this.y=Math.max(this.y,a.y),this.z=Math.max(this.z,a.z),this},clone:function(){return new d(this.x,this.y,this.z)},addVectors:function(a,o){return this.x=a.x+o.x,this.y=a.y+o.y,this.z=a.z+o.z,this},crossVectors:function(a,o){var r=a.x,e=a.y,i=a.z,l=o.x,s=o.y,h=o.z;return this.x=e*h-i*s,this.y=i*l-r*h,this.z=r*s-e*l,this},equals:function(a){return this.x===a.x&&this.y===a.y&&this.z===a.z},copy:function(a){return this.x=a.x,this.y=a.y,this.z=a.z||0,this},set:function(a,o,r){return typeof a=="object"?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0):(this.x=a||0,this.y=o||0,this.z=r||0),this},setFromMatrixPosition:function(a){return this.fromArray(a.val,12)},setFromMatrixColumn:function(a,o){return this.fromArray(a.val,o*4)},fromArray:function(a,o){return o===void 0&&(o=0),this.x=a[o],this.y=a[o+1],this.z=a[o+2],this},add:function(a){return this.x+=a.x,this.y+=a.y,this.z+=a.z||0,this},addScalar:function(a){return this.x+=a,this.y+=a,this.z+=a,this},addScale:function(a,o){return this.x+=a.x*o,this.y+=a.y*o,this.z+=a.z*o||0,this},subtract:function(a){return this.x-=a.x,this.y-=a.y,this.z-=a.z||0,this},multiply:function(a){return this.x*=a.x,this.y*=a.y,this.z*=a.z||1,this},scale:function(a){return isFinite(a)?(this.x*=a,this.y*=a,this.z*=a):(this.x=0,this.y=0,this.z=0),this},divide:function(a){return this.x/=a.x,this.y/=a.y,this.z/=a.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(a){var o=a.x-this.x,r=a.y-this.y,e=a.z-this.z||0;return Math.sqrt(o*o+r*r+e*e)},distanceSq:function(a){var o=a.x-this.x,r=a.y-this.y,e=a.z-this.z||0;return o*o+r*r+e*e},length:function(){var a=this.x,o=this.y,r=this.z;return Math.sqrt(a*a+o*o+r*r)},lengthSq:function(){var a=this.x,o=this.y,r=this.z;return a*a+o*o+r*r},normalize:function(){var a=this.x,o=this.y,r=this.z,e=a*a+o*o+r*r;return e>0&&(e=1/Math.sqrt(e),this.x=a*e,this.y=o*e,this.z=r*e),this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},cross:function(a){var o=this.x,r=this.y,e=this.z,i=a.x,l=a.y,s=a.z;return this.x=r*s-e*l,this.y=e*i-o*s,this.z=o*l-r*i,this},lerp:function(a,o){o===void 0&&(o=0);var r=this.x,e=this.y,i=this.z;return this.x=r+o*(a.x-r),this.y=e+o*(a.y-e),this.z=i+o*(a.z-i),this},applyMatrix3:function(a){var o=this.x,r=this.y,e=this.z,i=a.val;return this.x=i[0]*o+i[3]*r+i[6]*e,this.y=i[1]*o+i[4]*r+i[7]*e,this.z=i[2]*o+i[5]*r+i[8]*e,this},applyMatrix4:function(a){var o=this.x,r=this.y,e=this.z,i=a.val,l=1/(i[3]*o+i[7]*r+i[11]*e+i[15]);return this.x=(i[0]*o+i[4]*r+i[8]*e+i[12])*l,this.y=(i[1]*o+i[5]*r+i[9]*e+i[13])*l,this.z=(i[2]*o+i[6]*r+i[10]*e+i[14])*l,this},transformMat3:function(a){var o=this.x,r=this.y,e=this.z,i=a.val;return this.x=o*i[0]+r*i[3]+e*i[6],this.y=o*i[1]+r*i[4]+e*i[7],this.z=o*i[2]+r*i[5]+e*i[8],this},transformMat4:function(a){var o=this.x,r=this.y,e=this.z,i=a.val;return this.x=i[0]*o+i[4]*r+i[8]*e+i[12],this.y=i[1]*o+i[5]*r+i[9]*e+i[13],this.z=i[2]*o+i[6]*r+i[10]*e+i[14],this},transformCoordinates:function(a){var o=this.x,r=this.y,e=this.z,i=a.val,l=o*i[0]+r*i[4]+e*i[8]+i[12],s=o*i[1]+r*i[5]+e*i[9]+i[13],h=o*i[2]+r*i[6]+e*i[10]+i[14],f=o*i[3]+r*i[7]+e*i[11]+i[15];return this.x=l/f,this.y=s/f,this.z=h/f,this},transformQuat:function(a){var o=this.x,r=this.y,e=this.z,i=a.x,l=a.y,s=a.z,h=a.w,f=h*o+l*e-s*r,v=h*r+s*o-i*e,u=h*e+i*r-l*o,c=-i*o-l*r-s*e;return this.x=f*h+c*-i+v*-s-u*-l,this.y=v*h+c*-l+u*-i-f*-s,this.z=u*h+c*-s+f*-l-v*-i,this},project:function(a){var o=this.x,r=this.y,e=this.z,i=a.val,l=i[0],s=i[1],h=i[2],f=i[3],v=i[4],u=i[5],c=i[6],x=i[7],g=i[8],m=i[9],y=i[10],T=i[11],S=i[12],C=i[13],P=i[14],A=i[15],M=1/(o*f+r*x+e*T+A);return this.x=(o*l+r*v+e*g+S)*M,this.y=(o*s+r*u+e*m+C)*M,this.z=(o*h+r*c+e*y+P)*M,this},projectViewMatrix:function(a,o){return this.applyMatrix4(a).applyMatrix4(o)},unprojectViewMatrix:function(a,o){return this.applyMatrix4(a).applyMatrix4(o)},unproject:function(a,o){var r=a.x,e=a.y,i=a.z,l=a.w,s=this.x-r,h=l-this.y-1-e,f=this.z;return this.x=2*s/i-1,this.y=2*h/l-1,this.z=2*f-1,this.project(o)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});d.ZERO=new d,d.RIGHT=new d(1,0,0),d.LEFT=new d(-1,0,0),d.UP=new d(0,-1,0),d.DOWN=new d(0,1,0),d.FORWARD=new d(0,0,1),d.BACK=new d(0,0,-1),d.ONE=new d(1,1,1),p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(p,E,t){var n={};p.exports=n;var d=t(64),a=t(83),o=t(165),r=t(32),e=t(84),i=t(271);(function(){n._inertiaScale=4,n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,n.create=function(s){var h={id:r.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},previousPositionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!s.hasOwnProperty("position")&&s.hasOwnProperty("vertices")?s.position=d.centre(s.vertices):s.hasOwnProperty("vertices")||(h.vertices=d.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var f=r.extend(h,s);return l(f,s),f.setOnCollideWith=function(v,u){return u?this.onCollideWith[v.id]=u:delete this.onCollideWith[v.id],this},f},n.nextGroup=function(s){return s?n._nextNonCollidingGroupId--:n._nextCollidingGroupId++},n.nextCategory=function(){return n._nextCategory=n._nextCategory<<1,n._nextCategory};var l=function(s,h){h=h||{},n.set(s,{bounds:s.bounds||e.create(s.vertices),positionPrev:s.positionPrev||a.clone(s.position),anglePrev:s.anglePrev||s.angle,vertices:s.vertices,parts:s.parts||[s],isStatic:s.isStatic,isSleeping:s.isSleeping,parent:s.parent||s});var f=s.bounds;if(d.rotate(s.vertices,s.angle,s.position),i.rotate(s.axes,s.angle),e.update(f,s.vertices,s.velocity),n.set(s,{axes:h.axes||s.axes,area:h.area||s.area,mass:h.mass||s.mass,inertia:h.inertia||s.inertia}),s.parts.length===1){var v=s.centerOfMass,u=s.centerOffset,c=f.max.x-f.min.x,x=f.max.y-f.min.y;v.x=-(f.min.x-s.position.x)/c,v.y=-(f.min.y-s.position.y)/x,u.x=c*v.x,u.y=x*v.y}};n.set=function(s,h,f){var v;typeof h=="string"&&(v=h,h={},h[v]=f);for(v in h)if(!!Object.prototype.hasOwnProperty.call(h,v))switch(f=h[v],v){case"isStatic":n.setStatic(s,f);break;case"isSleeping":o.set(s,f);break;case"mass":n.setMass(s,f);break;case"density":n.setDensity(s,f);break;case"inertia":n.setInertia(s,f);break;case"vertices":n.setVertices(s,f);break;case"position":n.setPosition(s,f);break;case"angle":n.setAngle(s,f);break;case"velocity":n.setVelocity(s,f);break;case"angularVelocity":n.setAngularVelocity(s,f);break;case"parts":n.setParts(s,f);break;case"centre":n.setCentre(s,f);break;default:s[v]=f}},n.setStatic=function(s,h){for(var f=0;f0&&a.rotateAbout(u.position,f,s.position,u.position)}},n.setVelocity=function(s,h){s.positionPrev.x=s.position.x-h.x,s.positionPrev.y=s.position.y-h.y,s.velocity.x=h.x,s.velocity.y=h.y,s.speed=a.magnitude(s.velocity)},n.setAngularVelocity=function(s,h){s.anglePrev=s.angle-h,s.angularVelocity=h,s.angularSpeed=Math.abs(s.angularVelocity)},n.translate=function(s,h){n.setPosition(s,a.add(s.position,h))},n.rotate=function(s,h,f){if(!f)n.setAngle(s,s.angle+h);else{var v=Math.cos(h),u=Math.sin(h),c=s.position.x-f.x,x=s.position.y-f.y;n.setPosition(s,{x:f.x+(c*v-x*u),y:f.y+(c*u+x*v)}),n.setAngle(s,s.angle+h)}},n.scale=function(s,h,f,v){var u=0,c=0;v=v||s.position;for(var x=0;x0&&(u+=g.area,c+=g.inertia),g.position.x=v.x+(g.position.x-v.x)*h,g.position.y=v.y+(g.position.y-v.y)*f,e.update(g.bounds,g.vertices,s.velocity)}s.parts.length>1&&(s.area=u,s.isStatic||(n.setMass(s,s.density*u),n.setInertia(s,c))),s.circleRadius&&(h===f?s.circleRadius*=h:s.circleRadius=null)},n.update=function(s,h,f,v){var u=Math.pow(h*f*s.timeScale,2),c=1-s.frictionAir*f*s.timeScale,x=s.position.x-s.positionPrev.x,g=s.position.y-s.positionPrev.y;s.velocity.x=x*c*v+s.force.x/s.mass*u,s.velocity.y=g*c*v+s.force.y/s.mass*u,s.positionPrev.x=s.position.x,s.positionPrev.y=s.position.y,s.position.x+=s.velocity.x,s.position.y+=s.velocity.y,s.angularVelocity=(s.angle-s.anglePrev)*c*v+s.torque/s.inertia*u,s.anglePrev=s.angle,s.angle+=s.angularVelocity,s.speed=a.magnitude(s.velocity),s.angularSpeed=Math.abs(s.angularVelocity);for(var m=0;m0&&(y.position.x+=s.velocity.x,y.position.y+=s.velocity.y),s.angularVelocity!==0&&(d.rotate(y.vertices,s.angularVelocity,s.position),i.rotate(y.axes,s.angularVelocity),m>0&&a.rotateAbout(y.position,s.angularVelocity,s.position,y.position)),e.update(y.bounds,y.vertices,s.velocity)}},n.applyForce=function(s,h,f){s.force.x+=f.x,s.force.y+=f.y;var v={x:h.x-s.position.x,y:h.y-s.position.y};s.torque+=v.x*f.y-v.y*f.x},n._totalProperties=function(s){for(var h={mass:0,area:0,inertia:0,centre:{x:0,y:0}},f=s.parts.length===1?0:1;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.y+n.height-n.height*n.originY};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.x-n.width*n.originX};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.x+n.width-n.width*n.originX};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.y-n.height*n.originY};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r,e){o===void 0&&(o=0),r===void 0&&(r=0),e===void 0&&(e=1);var i,l=0,s=n.length;if(e===1)for(i=r;i=0;i--)n[i][d]+=a+l*o,l++;return n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(307),a=t(172),o=t(56),r=t(173),e=t(3),i=new n({initialize:function(s,h,f,v){s===void 0&&(s=0),h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),this.type=o.LINE,this.x1=s,this.y1=h,this.x2=f,this.y2=v},getPoint:function(l,s){return d(this,l,s)},getPoints:function(l,s,h){return a(this,l,s,h)},getRandomPoint:function(l){return r(this,l)},setTo:function(l,s,h,f){return l===void 0&&(l=0),s===void 0&&(s=0),h===void 0&&(h=0),f===void 0&&(f=0),this.x1=l,this.y1=s,this.x2=h,this.y2=f,this},getPointA:function(l){return l===void 0&&(l=new e),l.set(this.x1,this.y1),l},getPointB:function(l){return l===void 0&&(l=new e),l.set(this.x2,this.y2),l},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(l){this.x1<=this.x2?this.x1=l:this.x2=l}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(l){this.x1>this.x2?this.x1=l:this.x2=l}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(l){this.y1<=this.y2?this.y1=l:this.y2=l}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(l){this.y1>this.y2?this.y1=l:this.y2=l}}});p.exports=i},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=a||d.fillColor,e=o||d.fillAlpha,i=(r&16711680)>>>16,l=(r&65280)>>>8,s=r&255;n.fillStyle="rgba("+i+","+l+","+s+","+e+")"};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o,r,e,i){var l=[];i.forEach(function(h){h&&l.push(h)}),this.loader=o,this.type=r,this.key=e,this.multiKeyIndex=o.multiKeyIndex++,this.files=l,this.complete=!1,this.pending=l.length,this.failed=0,this.config={},this.baseURL=o.baseURL,this.path=o.path,this.prefix=o.prefix;for(var s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=n-a,e=d-o;return Math.sqrt(r*r+e*e)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BOOT:t(922),DESTROY:t(923),DRAG_END:t(924),DRAG_ENTER:t(925),DRAG:t(926),DRAG_LEAVE:t(927),DRAG_OVER:t(928),DRAG_START:t(929),DROP:t(930),GAME_OUT:t(931),GAME_OVER:t(932),GAMEOBJECT_DOWN:t(933),GAMEOBJECT_DRAG_END:t(934),GAMEOBJECT_DRAG_ENTER:t(935),GAMEOBJECT_DRAG:t(936),GAMEOBJECT_DRAG_LEAVE:t(937),GAMEOBJECT_DRAG_OVER:t(938),GAMEOBJECT_DRAG_START:t(939),GAMEOBJECT_DROP:t(940),GAMEOBJECT_MOVE:t(941),GAMEOBJECT_OUT:t(942),GAMEOBJECT_OVER:t(943),GAMEOBJECT_POINTER_DOWN:t(944),GAMEOBJECT_POINTER_MOVE:t(945),GAMEOBJECT_POINTER_OUT:t(946),GAMEOBJECT_POINTER_OVER:t(947),GAMEOBJECT_POINTER_UP:t(948),GAMEOBJECT_POINTER_WHEEL:t(949),GAMEOBJECT_UP:t(950),GAMEOBJECT_WHEEL:t(951),MANAGER_BOOT:t(952),MANAGER_PROCESS:t(953),MANAGER_UPDATE:t(954),POINTER_DOWN:t(955),POINTER_DOWN_OUTSIDE:t(956),POINTER_MOVE:t(957),POINTER_OUT:t(958),POINTER_OVER:t(959),POINTER_UP:t(960),POINTER_UP_OUTSIDE:t(961),POINTER_WHEEL:t(962),POINTERLOCK_CHANGE:t(963),PRE_UPDATE:t(964),SHUTDOWN:t(965),START:t(966),UPDATE:t(967)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.y=d+n.height*n.originY,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.x=d+n.width*n.originX,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.x=d-n.width+n.width*n.originX,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.y=d-n.height+n.height*n.originY,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return n.width<=0||n.height<=0?!1:n.x<=d&&n.x+n.width>=d&&n.y<=a&&n.y+n.height>=a};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(175),a=t(9),o=t(374),r=t(2),e=t(69),i=t(91),l=t(141),s=t(12),h=t(375),f=new n({Extends:a,initialize:function(u){a.call(this);var c=u.game,x=c.renderer,g=x.gl;this.name=r(u,"name","WebGLPipeline"),this.game=c,this.renderer=x,this.manager,this.gl=g,this.view=c.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.topology=r(u,"topology",g.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.currentUnit=0,this.forceZero=r(u,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=u,this.glReset=!1},boot:function(){var v,u=this.gl,c=this.config,x=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var g=this.renderTargets,m=r(c,"renderTarget",!1);typeof m=="boolean"&&m&&(m=1);var y=x.width,T=x.height;if(typeof m=="number")for(v=0;vM&&(M=A[v].vertexSize);var L=r(c,"batchSize",x.config.batchSize);this.vertexCapacity=L*6;var F=new ArrayBuffer(this.vertexCapacity*M);this.vertexData=F,this.bytes=new Uint8Array(F),this.vertexViewF32=new Float32Array(F),this.vertexViewU32=new Uint32Array(F);var B=r(c,"vertices",null);for(B?(this.vertexViewF32.set(B),this.vertexBuffer=x.createVertexBuffer(F,u.STATIC_DRAW)):this.vertexBuffer=x.createVertexBuffer(F.byteLength,u.DYNAMIC_DRAW),this.setVertexBuffer(),v=A.length-1;v>=0;v--)A[v].rebind();this.hasBooted=!0,x.on(i.RESIZE,this.resize,this),x.on(i.PRE_RENDER,this.onPreRender,this),x.on(i.RENDER,this.onRender,this),x.on(i.POST_RENDER,this.onPostRender,this),this.emit(o.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(v,u){var c=this.renderer;if(v!==this.currentShader||c.currentProgram!==this.currentShader.program){this.flush(),c.resetTextures();var x=this.setVertexBuffer();x&&!u&&(u=!0),v.bind(u,!1),this.currentShader=v}return this},getShaderByName:function(v){for(var u=this.shaders,c=0;cthis.vertexCapacity},resize:function(v,u){(v!==this.width||u!==this.height)&&this.flush(),this.width=v,this.height=u;for(var c=this.renderTargets,x=0;x=0;c--){var x=u[c].rebind();(!v||x===v)&&(this.currentShader=x)}return this.emit(o.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(){var v=this.gl,u=this.vertexBuffer;return v.getParameter(v.ARRAY_BUFFER_BINDING)!==u?(v.bindBuffer(v.ARRAY_BUFFER,u),!0):!1},preBatch:function(v){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(v),this},postBatch:function(v){return this.onDraw(this.currentRenderTarget),this.onPostBatch(v),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(v){if(v===void 0&&(v=!1),this.vertexCount>0){this.emit(o.BEFORE_FLUSH,this,v),this.onBeforeFlush(v);var u=this.gl,c=this.vertexCount,x=this.currentShader.vertexSize;this.active&&(this.setVertexBuffer(),c===this.vertexCapacity?u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.DYNAMIC_DRAW):u.bufferSubData(u.ARRAY_BUFFER,0,this.bytes.subarray(0,c*x)),u.drawArrays(this.topology,0,c)),this.vertexCount=0,this.emit(o.AFTER_FLUSH,this,v),this.onAfterFlush(v)}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(v,u,c,x,g,m,y){var T=this.vertexViewF32,S=this.vertexViewU32,C=this.vertexCount*this.currentShader.vertexComponentCount-1;T[++C]=v,T[++C]=u,T[++C]=c,T[++C]=x,T[++C]=g,T[++C]=m,S[++C]=y,this.vertexCount++},batchQuad:function(v,u,c,x,g,m,y,T,S,C,P,A,M,L,F,B,N,X,V,W){W===void 0&&(W=this.currentUnit);var O=!1;return this.shouldFlush(6)&&(this.flush(),O=!0,W=this.setTexture2D(V)),this.batchVert(u,c,C,P,W,X,L),this.batchVert(x,g,C,M,W,X,B),this.batchVert(m,y,A,M,W,X,N),this.batchVert(u,c,C,P,W,X,L),this.batchVert(m,y,A,M,W,X,N),this.batchVert(T,S,A,P,W,X,F),this.onBatch(v),O},batchTri:function(v,u,c,x,g,m,y,T,S,C,P,A,M,L,F,B,N){N===void 0&&(N=this.currentUnit);var X=!1;return this.shouldFlush(3)&&(this.flush(),X=!0,N=this.setTexture2D(B)),this.batchVert(u,c,T,S,N,F,A),this.batchVert(x,g,T,P,N,F,M),this.batchVert(m,y,C,P,N,F,L),this.onBatch(v),X},drawFillRect:function(v,u,c,x,g,m,y,T){y===void 0&&(y=this.renderer.whiteTexture.glTexture),T===void 0&&(T=!0),v=Math.floor(v),u=Math.floor(u);var S=Math.floor(v+c),C=Math.floor(u+x),P=this.setTexture2D(y),A=s.getTintAppendFloatAlphaAndSwap(g,m),M=0,L=0,F=1,B=1;T&&(L=1,B=0),this.batchQuad(null,v,u,v,C,S,C,S,u,M,L,F,B,A,A,A,A,0,y,P)},setTexture2D:function(v){return v===void 0&&(v=this.renderer.whiteTexture.glTexture),this.currentUnit=this.renderer.setTexture2D(v),this.currentUnit},bindTexture:function(v,u){u===void 0&&(u=0);var c=this.gl;return c.activeTexture(c.TEXTURE0+u),c.bindTexture(c.TEXTURE_2D,v),this},bindRenderTarget:function(v,u){return this.bindTexture(v.texture,u)},setTime:function(v){return this.set1f(v,this.game.loop.getDuration()),this},set1f:function(v,u,c){return c===void 0&&(c=this.currentShader),c.set1f(v,u),this},set2f:function(v,u,c,x){return x===void 0&&(x=this.currentShader),x.set2f(v,u,c),this},set3f:function(v,u,c,x,g){return g===void 0&&(g=this.currentShader),g.set3f(v,u,c,x),this},set4f:function(v,u,c,x,g,m){return m===void 0&&(m=this.currentShader),m.set4f(v,u,c,x,g),this},set1fv:function(v,u,c){return c===void 0&&(c=this.currentShader),c.set1fv(v,u),this},set2fv:function(v,u,c){return c===void 0&&(c=this.currentShader),c.set2fv(v,u),this},set3fv:function(v,u,c){return c===void 0&&(c=this.currentShader),c.set3fv(v,u),this},set4fv:function(v,u,c){return c===void 0&&(c=this.currentShader),c.set4fv(v,u),this},set1iv:function(v,u,c){return c===void 0&&(c=this.currentShader),c.set1iv(v,u),this},set2iv:function(v,u,c){return c===void 0&&(c=this.currentShader),c.set2iv(v,u),this},set3iv:function(v,u,c){return c===void 0&&(c=this.currentShader),c.set3iv(v,u),this},set4iv:function(v,u,c){return c===void 0&&(c=this.currentShader),c.set4iv(v,u),this},set1i:function(v,u,c){return c===void 0&&(c=this.currentShader),c.set1i(v,u),this},set2i:function(v,u,c,x){return x===void 0&&(x=this.currentShader),x.set2i(v,u,c),this},set3i:function(v,u,c,x,g){return g===void 0&&(g=this.currentShader),g.set3i(v,u,c,x),this},set4i:function(v,u,c,x,g,m){return m===void 0&&(m=this.currentShader),m.set4i(v,u,c,x,g),this},setMatrix2fv:function(v,u,c,x){return x===void 0&&(x=this.currentShader),x.setMatrix2fv(v,u,c),this},setMatrix3fv:function(v,u,c,x){return x===void 0&&(x=this.currentShader),x.setMatrix3fv(v,u,c),this},setMatrix4fv:function(v,u,c,x){return x===void 0&&(x=this.currentShader),x.setMatrix4fv(v,u,c),this},destroy:function(){this.emit(o.DESTROY,this);var v,u=this.shaders;for(v=0;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function n(R,I,D){D=D||2;var G=I&&I.length,U=G?I[0]*D:R.length,Y=d(R,0,U,D,!0),z=[];if(!Y||Y.next===Y.prev)return z;var H,w,K,Z,J,j,Q;if(G&&(Y=s(R,I,Y,D)),R.length>80*D){H=K=R[0],w=Z=R[1];for(var k=D;kK&&(K=J),j>Z&&(Z=j);Q=Math.max(K-H,Z-w),Q=Q!==0?1/Q:0}return o(Y,z,D,H,w,Q),z}function d(R,I,D,G,U){var Y,z;if(U===O(R,I,D,G)>0)for(Y=I;Y=I;Y-=G)z=X(Y,R[Y],R[Y+1],z);return z&&C(z,z.next)&&(V(z),z=z.next),z}function a(R,I){if(!R)return R;I||(I=R);var D=R,G;do if(G=!1,!D.steiner&&(C(D,D.next)||S(D.prev,D,D.next)===0)){if(V(D),D=I=D.prev,D===D.next)break;G=!0}else D=D.next;while(G||D!==I);return I}function o(R,I,D,G,U,Y,z){if(!!R){!z&&Y&&c(R,G,U,Y);for(var H=R,w,K;R.prev!==R.next;){if(w=R.prev,K=R.next,Y?e(R,G,U,Y):r(R)){I.push(w.i/D),I.push(R.i/D),I.push(K.i/D),V(R),R=K.next,H=K.next;continue}if(R=K,R===H){z?z===1?(R=i(a(R),I,D),o(R,I,D,G,U,Y,2)):z===2&&l(R,I,D,G,U,Y):o(a(R),I,D,G,U,Y,1);break}}}}function r(R){var I=R.prev,D=R,G=R.next;if(S(I,D,G)>=0)return!1;for(var U=R.next.next;U!==R.prev;){if(y(I.x,I.y,D.x,D.y,G.x,G.y,U.x,U.y)&&S(U.prev,U,U.next)>=0)return!1;U=U.next}return!0}function e(R,I,D,G){var U=R.prev,Y=R,z=R.next;if(S(U,Y,z)>=0)return!1;for(var H=U.xY.x?U.x>z.x?U.x:z.x:Y.x>z.x?Y.x:z.x,Z=U.y>Y.y?U.y>z.y?U.y:z.y:Y.y>z.y?Y.y:z.y,J=g(H,w,I,D,G),j=g(K,Z,I,D,G),Q=R.prevZ,k=R.nextZ;Q&&Q.z>=J&&k&&k.z<=j;){if(Q!==R.prev&&Q!==R.next&&y(U.x,U.y,Y.x,Y.y,z.x,z.y,Q.x,Q.y)&&S(Q.prev,Q,Q.next)>=0||(Q=Q.prevZ,k!==R.prev&&k!==R.next&&y(U.x,U.y,Y.x,Y.y,z.x,z.y,k.x,k.y)&&S(k.prev,k,k.next)>=0))return!1;k=k.nextZ}for(;Q&&Q.z>=J;){if(Q!==R.prev&&Q!==R.next&&y(U.x,U.y,Y.x,Y.y,z.x,z.y,Q.x,Q.y)&&S(Q.prev,Q,Q.next)>=0)return!1;Q=Q.prevZ}for(;k&&k.z<=j;){if(k!==R.prev&&k!==R.next&&y(U.x,U.y,Y.x,Y.y,z.x,z.y,k.x,k.y)&&S(k.prev,k,k.next)>=0)return!1;k=k.nextZ}return!0}function i(R,I,D){var G=R;do{var U=G.prev,Y=G.next.next;!C(U,Y)&&P(U,G,G.next,Y)&&F(U,Y)&&F(Y,U)&&(I.push(U.i/D),I.push(G.i/D),I.push(Y.i/D),V(G),V(G.next),G=R=Y),G=G.next}while(G!==R);return a(G)}function l(R,I,D,G,U,Y){var z=R;do{for(var H=z.next.next;H!==z.prev;){if(z.i!==H.i&&T(z,H)){var w=N(z,H);z=a(z,z.next),w=a(w,w.next),o(z,I,D,G,U,Y),o(w,I,D,G,U,Y);return}H=H.next}z=z.next}while(z!==R)}function s(R,I,D,G){var U=[],Y,z,H,w,K;for(Y=0,z=I.length;Y=D.next.y&&D.next.y!==D.y){var H=D.x+(U-D.y)*(D.next.x-D.x)/(D.next.y-D.y);if(H<=G&&H>Y){if(Y=H,H===G){if(U===D.y)return D;if(U===D.next.y)return D.next}z=D.x=D.x&&D.x>=K&&G!==D.x&&y(Uz.x||D.x===z.x&&u(z,D)))&&(z=D,J=j)),D=D.next;while(D!==w);return z}function u(R,I){return S(R.prev,R,I.prev)<0&&S(I.next,R,R.next)<0}function c(R,I,D,G){var U=R;do U.z===null&&(U.z=g(U.x,U.y,I,D,G)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==R);U.prevZ.nextZ=null,U.prevZ=null,x(U)}function x(R){var I,D,G,U,Y,z,H,w,K=1;do{for(D=R,R=null,Y=null,z=0;D;){for(z++,G=D,H=0,I=0;I0||w>0&&G;)H!==0&&(w===0||!G||D.z<=G.z)?(U=D,D=D.nextZ,H--):(U=G,G=G.nextZ,w--),Y?Y.nextZ=U:R=U,U.prevZ=Y,Y=U;D=G}Y.nextZ=null,K*=2}while(z>1);return R}function g(R,I,D,G,U){return R=32767*(R-D)*U,I=32767*(I-G)*U,R=(R|R<<8)&16711935,R=(R|R<<4)&252645135,R=(R|R<<2)&858993459,R=(R|R<<1)&1431655765,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,R|I<<1}function m(R){var I=R,D=R;do(I.x=0&&(R-z)*(G-H)-(D-z)*(I-H)>=0&&(D-z)*(Y-H)-(U-z)*(G-H)>=0}function T(R,I){return R.next.i!==I.i&&R.prev.i!==I.i&&!L(R,I)&&(F(R,I)&&F(I,R)&&B(R,I)&&(S(R.prev,R,I.prev)||S(R,I.prev,I))||C(R,I)&&S(R.prev,R,R.next)>0&&S(I.prev,I,I.next)>0)}function S(R,I,D){return(I.y-R.y)*(D.x-I.x)-(I.x-R.x)*(D.y-I.y)}function C(R,I){return R.x===I.x&&R.y===I.y}function P(R,I,D,G){var U=M(S(R,I,D)),Y=M(S(R,I,G)),z=M(S(D,G,R)),H=M(S(D,G,I));return!!(U!==Y&&z!==H||U===0&&A(R,D,I)||Y===0&&A(R,G,I)||z===0&&A(D,R,G)||H===0&&A(D,I,G))}function A(R,I,D){return I.x<=Math.max(R.x,D.x)&&I.x>=Math.min(R.x,D.x)&&I.y<=Math.max(R.y,D.y)&&I.y>=Math.min(R.y,D.y)}function M(R){return R>0?1:R<0?-1:0}function L(R,I){var D=R;do{if(D.i!==R.i&&D.next.i!==R.i&&D.i!==I.i&&D.next.i!==I.i&&P(D,D.next,R,I))return!0;D=D.next}while(D!==R);return!1}function F(R,I){return S(R.prev,R,R.next)<0?S(R,I,R.next)>=0&&S(R,R.prev,I)>=0:S(R,I,R.prev)<0||S(R,R.next,I)<0}function B(R,I){var D=R,G=!1,U=(R.x+I.x)/2,Y=(R.y+I.y)/2;do D.y>Y!=D.next.y>Y&&D.next.y!==D.y&&U<(D.next.x-D.x)*(Y-D.y)/(D.next.y-D.y)+D.x&&(G=!G),D=D.next;while(D!==R);return G}function N(R,I){var D=new W(R.i,R.x,R.y),G=new W(I.i,I.x,I.y),U=R.next,Y=I.prev;return R.next=I,I.prev=R,D.next=U,U.prev=D,G.next=D,D.prev=G,Y.next=G,G.prev=Y,G}function X(R,I,D,G){var U=new W(R,I,D);return G?(U.next=G.next,U.prev=G,G.next.prev=U,G.next=U):(U.prev=U,U.next=U),U}function V(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function W(R,I,D){this.i=R,this.x=I,this.y=D,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}n.deviation=function(R,I,D,G){var U=I&&I.length,Y=U?I[0]*D:R.length,z=Math.abs(O(R,0,Y,D));if(U)for(var H=0,w=I.length;H0&&(G+=R[U-1].length,D.holes.push(G))}return D},p.exports=n},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=a||d.strokeColor,e=o||d.strokeAlpha,i=(r&16711680)>>>16,l=(r&65280)>>>8,s=r&255;n.strokeStyle="rgba("+i+","+l+","+s+","+e+")",n.lineWidth=d.lineWidth};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(6),i=t(7),l=new n({Extends:a,initialize:function(h,f,v,u,c){var x="json";if(i(f)){var g=f;f=r(g,"key"),v=r(g,"url"),u=r(g,"xhrSettings"),x=r(g,"extension",x),c=r(g,"dataKey",c)}var m={type:"json",cache:h.cacheManager.json,extension:x,responseType:"text",key:f,url:v,xhrSettings:u,config:c};a.call(this,h,m),i(v)&&(c?this.data=e(v,c):this.data=v,this.state=d.FILE_POPULATED)},onProcess:function(){if(this.state!==d.FILE_POPULATED){this.state=d.FILE_PROCESSING;try{var s=JSON.parse(this.xhrLoader.responseText)}catch(f){throw console.warn("Invalid JSON: "+this.key),this.onProcessError(),f}var h=this.config;typeof h=="string"?this.data=e(s,h,s):this.data=s}this.onProcessComplete()}});o.register("json",function(s,h,f,v){if(Array.isArray(s))for(var u=0;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(158),d=t(26),a=function(o,r,e,i,l){for(var s=null,h=null,f=null,v=null,u=d(o,r,e,i,null,l),c=0;c0)return!1}return!0},n.scale=function(o,r,e,i){if(r===1&&e===1)return o;i=i||n.centre(o);for(var l,s,h=0;h=0?h-1:o.length-1],v=o[h],u=o[(h+1)%o.length],c=r[h0&&(r|=2),r===3)return!1;return r!==0?!0:null},n.hull=function(o){var r=[],e=[],i,l;for(o=o.slice(0),o.sort(function(s,h){var f=s.x-h.x;return f!==0?f:s.y-h.y}),l=0;l=2&&d.cross3(e[e.length-2],e[e.length-1],i)<=0;)e.pop();e.push(i)}for(l=o.length-1;l>=0;l-=1){for(i=o[l];r.length>=2&&d.cross3(r[r.length-2],r[r.length-1],i)<=0;)r.pop();r.push(i)}return r.pop(),e.pop(),r.concat(e)}})()},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(66),a=t(300),o=t(301),r=t(56),e=t(170),i=new n({initialize:function(s,h,f){s===void 0&&(s=0),h===void 0&&(h=0),f===void 0&&(f=0),this.type=r.CIRCLE,this.x=s,this.y=h,this._radius=f,this._diameter=f*2},contains:function(l,s){return d(this,l,s)},getPoint:function(l,s){return a(this,l,s)},getPoints:function(l,s,h){return o(this,l,s,h)},getRandomPoint:function(l){return e(this,l)},setTo:function(l,s,h){return this.x=l,this.y=s,this._radius=h,this._diameter=h*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(l,s){return s===void 0&&(s=l),this.x=l,this.y=s,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(l){this._radius=l,this._diameter=l*2}},diameter:{get:function(){return this._diameter},set:function(l){this._diameter=l,this._radius=l*.5}},left:{get:function(){return this.x-this._radius},set:function(l){this.x=l+this._radius}},right:{get:function(){return this.x+this._radius},set:function(l){this.x=l-this._radius}},top:{get:function(){return this.y-this._radius},set:function(l){this.y=l+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(l){this.y=l-this._radius}}});p.exports=i},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){if(n.radius>0&&d>=n.left&&d<=n.right&&a>=n.top&&a<=n.bottom){var o=(n.x-d)*(n.x-d),r=(n.y-a)*(n.y-a);return o+r<=n.radius*n.radius}else return!1};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return Math.sqrt((n.x2-n.x1)*(n.x2-n.x1)+(n.y2-n.y1)*(n.y2-n.y1))};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=a-d;return d+((n-d)%o+o)%o};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(39),a=1e-6,o=new n({initialize:function(f){this.val=new Float32Array(16),f?this.copy(f):this.identity()},clone:function(){return new o(this)},set:function(h){return this.copy(h)},setValues:function(h,f,v,u,c,x,g,m,y,T,S,C,P,A,M,L){var F=this.val;return F[0]=h,F[1]=f,F[2]=v,F[3]=u,F[4]=c,F[5]=x,F[6]=g,F[7]=m,F[8]=y,F[9]=T,F[10]=S,F[11]=C,F[12]=P,F[13]=A,F[14]=M,F[15]=L,this},copy:function(h){var f=h.val;return this.setValues(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15])},fromArray:function(h){return this.setValues(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[8],h[9],h[10],h[11],h[12],h[13],h[14],h[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(h,f,v){var u=r.fromQuat(v),c=u.val,x=f.x,g=f.y,m=f.z;return this.setValues(c[0]*x,c[1]*x,c[2]*x,0,c[4]*g,c[5]*g,c[6]*g,0,c[8]*m,c[9]*m,c[10]*m,0,h.x,h.y,h.z,1)},xyz:function(h,f,v){this.identity();var u=this.val;return u[12]=h,u[13]=f,u[14]=v,this},scaling:function(h,f,v){this.zero();var u=this.val;return u[0]=h,u[5]=f,u[10]=v,u[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 h=this.val,f=h[1],v=h[2],u=h[3],c=h[6],x=h[7],g=h[11];return h[1]=h[4],h[2]=h[8],h[3]=h[12],h[4]=f,h[6]=h[9],h[7]=h[13],h[8]=v,h[9]=c,h[11]=h[14],h[12]=u,h[13]=x,h[14]=g,this},getInverse:function(h){return this.copy(h),this.invert()},invert:function(){var h=this.val,f=h[0],v=h[1],u=h[2],c=h[3],x=h[4],g=h[5],m=h[6],y=h[7],T=h[8],S=h[9],C=h[10],P=h[11],A=h[12],M=h[13],L=h[14],F=h[15],B=f*g-v*x,N=f*m-u*x,X=f*y-c*x,V=v*m-u*g,W=v*y-c*g,O=u*y-c*m,R=T*M-S*A,I=T*L-C*A,D=T*F-P*A,G=S*L-C*M,U=S*F-P*M,Y=C*F-P*L,z=B*Y-N*U+X*G+V*D-W*I+O*R;return z?(z=1/z,this.setValues((g*Y-m*U+y*G)*z,(u*U-v*Y-c*G)*z,(M*O-L*W+F*V)*z,(C*W-S*O-P*V)*z,(m*D-x*Y-y*I)*z,(f*Y-u*D+c*I)*z,(L*X-A*O-F*N)*z,(T*O-C*X+P*N)*z,(x*U-g*D+y*R)*z,(v*D-f*U-c*R)*z,(A*W-M*X+F*B)*z,(S*X-T*W-P*B)*z,(g*I-x*G-m*R)*z,(f*G-v*I+u*R)*z,(M*N-A*V-L*B)*z,(T*V-S*N+C*B)*z)):this},adjoint:function(){var h=this.val,f=h[0],v=h[1],u=h[2],c=h[3],x=h[4],g=h[5],m=h[6],y=h[7],T=h[8],S=h[9],C=h[10],P=h[11],A=h[12],M=h[13],L=h[14],F=h[15];return this.setValues(g*(C*F-P*L)-S*(m*F-y*L)+M*(m*P-y*C),-(v*(C*F-P*L)-S*(u*F-c*L)+M*(u*P-c*C)),v*(m*F-y*L)-g*(u*F-c*L)+M*(u*y-c*m),-(v*(m*P-y*C)-g*(u*P-c*C)+S*(u*y-c*m)),-(x*(C*F-P*L)-T*(m*F-y*L)+A*(m*P-y*C)),f*(C*F-P*L)-T*(u*F-c*L)+A*(u*P-c*C),-(f*(m*F-y*L)-x*(u*F-c*L)+A*(u*y-c*m)),f*(m*P-y*C)-x*(u*P-c*C)+T*(u*y-c*m),x*(S*F-P*M)-T*(g*F-y*M)+A*(g*P-y*S),-(f*(S*F-P*M)-T*(v*F-c*M)+A*(v*P-c*S)),f*(g*F-y*M)-x*(v*F-c*M)+A*(v*y-c*g),-(f*(g*P-y*S)-x*(v*P-c*S)+T*(v*y-c*g)),-(x*(S*L-C*M)-T*(g*L-m*M)+A*(g*C-m*S)),f*(S*L-C*M)-T*(v*L-u*M)+A*(v*C-u*S),-(f*(g*L-m*M)-x*(v*L-u*M)+A*(v*m-u*g)),f*(g*C-m*S)-x*(v*C-u*S)+T*(v*m-u*g))},determinant:function(){var h=this.val,f=h[0],v=h[1],u=h[2],c=h[3],x=h[4],g=h[5],m=h[6],y=h[7],T=h[8],S=h[9],C=h[10],P=h[11],A=h[12],M=h[13],L=h[14],F=h[15],B=f*g-v*x,N=f*m-u*x,X=f*y-c*x,V=v*m-u*g,W=v*y-c*g,O=u*y-c*m,R=T*M-S*A,I=T*L-C*A,D=T*F-P*A,G=S*L-C*M,U=S*F-P*M,Y=C*F-P*L;return B*Y-N*U+X*G+V*D-W*I+O*R},multiply:function(h){var f=this.val,v=f[0],u=f[1],c=f[2],x=f[3],g=f[4],m=f[5],y=f[6],T=f[7],S=f[8],C=f[9],P=f[10],A=f[11],M=f[12],L=f[13],F=f[14],B=f[15],N=h.val,X=N[0],V=N[1],W=N[2],O=N[3];return f[0]=X*v+V*g+W*S+O*M,f[1]=X*u+V*m+W*C+O*L,f[2]=X*c+V*y+W*P+O*F,f[3]=X*x+V*T+W*A+O*B,X=N[4],V=N[5],W=N[6],O=N[7],f[4]=X*v+V*g+W*S+O*M,f[5]=X*u+V*m+W*C+O*L,f[6]=X*c+V*y+W*P+O*F,f[7]=X*x+V*T+W*A+O*B,X=N[8],V=N[9],W=N[10],O=N[11],f[8]=X*v+V*g+W*S+O*M,f[9]=X*u+V*m+W*C+O*L,f[10]=X*c+V*y+W*P+O*F,f[11]=X*x+V*T+W*A+O*B,X=N[12],V=N[13],W=N[14],O=N[15],f[12]=X*v+V*g+W*S+O*M,f[13]=X*u+V*m+W*C+O*L,f[14]=X*c+V*y+W*P+O*F,f[15]=X*x+V*T+W*A+O*B,this},multiplyLocal:function(h){var f=this.val,v=h.val;return this.setValues(f[0]*v[0]+f[1]*v[4]+f[2]*v[8]+f[3]*v[12],f[0]*v[1]+f[1]*v[5]+f[2]*v[9]+f[3]*v[13],f[0]*v[2]+f[1]*v[6]+f[2]*v[10]+f[3]*v[14],f[0]*v[3]+f[1]*v[7]+f[2]*v[11]+f[3]*v[15],f[4]*v[0]+f[5]*v[4]+f[6]*v[8]+f[7]*v[12],f[4]*v[1]+f[5]*v[5]+f[6]*v[9]+f[7]*v[13],f[4]*v[2]+f[5]*v[6]+f[6]*v[10]+f[7]*v[14],f[4]*v[3]+f[5]*v[7]+f[6]*v[11]+f[7]*v[15],f[8]*v[0]+f[9]*v[4]+f[10]*v[8]+f[11]*v[12],f[8]*v[1]+f[9]*v[5]+f[10]*v[9]+f[11]*v[13],f[8]*v[2]+f[9]*v[6]+f[10]*v[10]+f[11]*v[14],f[8]*v[3]+f[9]*v[7]+f[10]*v[11]+f[11]*v[15],f[12]*v[0]+f[13]*v[4]+f[14]*v[8]+f[15]*v[12],f[12]*v[1]+f[13]*v[5]+f[14]*v[9]+f[15]*v[13],f[12]*v[2]+f[13]*v[6]+f[14]*v[10]+f[15]*v[14],f[12]*v[3]+f[13]*v[7]+f[14]*v[11]+f[15]*v[15])},premultiply:function(h){return this.multiplyMatrices(h,this)},multiplyMatrices:function(h,f){var v=h.val,u=f.val,c=v[0],x=v[4],g=v[8],m=v[12],y=v[1],T=v[5],S=v[9],C=v[13],P=v[2],A=v[6],M=v[10],L=v[14],F=v[3],B=v[7],N=v[11],X=v[15],V=u[0],W=u[4],O=u[8],R=u[12],I=u[1],D=u[5],G=u[9],U=u[13],Y=u[2],z=u[6],H=u[10],w=u[14],K=u[3],Z=u[7],J=u[11],j=u[15];return this.setValues(c*V+x*I+g*Y+m*K,y*V+T*I+S*Y+C*K,P*V+A*I+M*Y+L*K,F*V+B*I+N*Y+X*K,c*W+x*D+g*z+m*Z,y*W+T*D+S*z+C*Z,P*W+A*D+M*z+L*Z,F*W+B*D+N*z+X*Z,c*O+x*G+g*H+m*J,y*O+T*G+S*H+C*J,P*O+A*G+M*H+L*J,F*O+B*G+N*H+X*J,c*R+x*U+g*w+m*j,y*R+T*U+S*w+C*j,P*R+A*U+M*w+L*j,F*R+B*U+N*w+X*j)},translate:function(h){return this.translateXYZ(h.x,h.y,h.z)},translateXYZ:function(h,f,v){var u=this.val;return u[12]=u[0]*h+u[4]*f+u[8]*v+u[12],u[13]=u[1]*h+u[5]*f+u[9]*v+u[13],u[14]=u[2]*h+u[6]*f+u[10]*v+u[14],u[15]=u[3]*h+u[7]*f+u[11]*v+u[15],this},scale:function(h){return this.scaleXYZ(h.x,h.y,h.z)},scaleXYZ:function(h,f,v){var u=this.val;return u[0]=u[0]*h,u[1]=u[1]*h,u[2]=u[2]*h,u[3]=u[3]*h,u[4]=u[4]*f,u[5]=u[5]*f,u[6]=u[6]*f,u[7]=u[7]*f,u[8]=u[8]*v,u[9]=u[9]*v,u[10]=u[10]*v,u[11]=u[11]*v,this},makeRotationAxis:function(h,f){var v=Math.cos(f),u=Math.sin(f),c=1-v,x=h.x,g=h.y,m=h.z,y=c*x,T=c*g;return this.setValues(y*x+v,y*g-u*m,y*m+u*g,0,y*g+u*m,T*g+v,T*m-u*x,0,y*m-u*g,T*m+u*x,c*m*m+v,0,0,0,0,1)},rotate:function(h,f){var v=this.val,u=f.x,c=f.y,x=f.z,g=Math.sqrt(u*u+c*c+x*x);if(Math.abs(g) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={COMPLETE:t(987),DECODED:t(988),DECODED_ALL:t(989),DESTROY:t(990),DETUNE:t(991),GLOBAL_DETUNE:t(992),GLOBAL_MUTE:t(993),GLOBAL_RATE:t(994),GLOBAL_VOLUME:t(995),LOOP:t(996),LOOPED:t(997),MUTE:t(998),PAN:t(999),PAUSE_ALL:t(1e3),PAUSE:t(1001),PLAY:t(1002),RATE:t(1003),RESUME_ALL:t(1004),RESUME:t(1005),SEEK:t(1006),STOP_ALL:t(1007),STOP:t(1008),UNLOCKED:t(1009),VOLUME:t(1010)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=new n({Extends:a,initialize:function l(s,h,f,v,u){var c="png",x;if(e(h)){var g=h;h=r(g,"key"),f=r(g,"url"),x=r(g,"normalMap"),v=r(g,"xhrSettings"),c=r(g,"extension",c),u=r(g,"frameConfig")}Array.isArray(f)&&(x=f[1],f=f[0]);var m={type:"image",cache:s.textureManager,extension:c,responseType:"blob",key:h,url:f,xhrSettings:v,config:u};if(a.call(this,s,m),x){var y=new l(s,this.key,x,v,u);y.type="normalMap",this.setLink(y),s.addFile(y)}},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var l=this;this.data.onload=function(){a.revokeObjectURL(l.data),l.onProcessComplete()},this.data.onerror=function(){a.revokeObjectURL(l.data),l.onProcessError()},a.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var l,s=this.linkFile;s&&s.state===d.FILE_COMPLETE?(this.type==="image"?l=this.cache.addImage(this.key,this.data,s.data):l=this.cache.addImage(s.key,s.data,this.data),this.pendingDestroy(l),s.pendingDestroy(l)):s||(l=this.cache.addImage(this.key,this.data),this.pendingDestroy(l))}});o.register("image",function(l,s,h){if(Array.isArray(l))for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){d?n.setCollision(!0,!0,!0,!0,!1):n.resetCollision(!1)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(164),d=t(0),a=t(11),o=t(15),r=t(1065),e=new d({Extends:o,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.ScrollFactor,a.Size,a.TextureCrop,a.Tint,a.Transform,a.Visible,r],initialize:function(l,s,h,f,v){o.call(this,l,"Sprite"),this._crop=this.resetCropObject(),this.anims=new n(this),this.setTexture(f,v),this.setPosition(s,h),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(i,l){this.anims.update(i,l)},play:function(i,l){return this.anims.play(i,l)},playReverse:function(i,l){return this.anims.playReverse(i,l)},playAfterDelay:function(i,l){return this.anims.playAfterDelay(i,l)},playAfterRepeat:function(i,l){return this.anims.playAfterRepeat(i,l)},chain:function(i){return this.anims.chain(i)},stop:function(){return this.anims.stop()},stopAfterDelay:function(i){return this.anims.stopAfterDelay(i)},stopAfterRepeat:function(i){return this.anims.stopAfterRepeat(i)},stopOnFrame:function(i){return this.anims.stopOnFrame(i)},toJSON:function(){return a.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});p.exports=e},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){if(!(d>=n.length)){for(var a=n.length-1,o=n[d],r=d;r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADDED_TO_SCENE:t(643),DESTROY:t(644),REMOVED_FROM_SCENE:t(645),VIDEO_COMPLETE:t(646),VIDEO_CREATED:t(647),VIDEO_ERROR:t(648),VIDEO_LOOP:t(649),VIDEO_PLAY:t(650),VIDEO_SEEKED:t(651),VIDEO_SEEKING:t(652),VIDEO_STOP:t(653),VIDEO_TIMEOUT:t(654),VIDEO_UNLOCKED:t(655)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){return a===void 0&&(a=0),d===0?n:(n-=a,n=d*Math.floor(n/d),o?(a+n)/d:a+n)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d={};for(var a in n)Array.isArray(n[a])?d[a]=n[a].slice(0):d[a]=n[a];return d};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=n.length;if(d<0||d>r||d>=a||a>r||d+a>r){if(o)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};p.exports=t},function(p,E){/** + * @author Richard Davey + * @author Angry Bytes (and contributors) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function t(o,r){return String(o).localeCompare(r)}function n(o,r){var e=o.length;if(e<=1)return o;for(var i=new Array(e),l=1;ll&&(v=l),u>l&&(u=l),c=f,x=v;;)if(c + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(134),d=t(205),a=function(o,r){var e=n.Power0;if(typeof o=="string")if(n.hasOwnProperty(o))e=n[o];else{var i="";o.indexOf(".")&&(i=o.substr(o.indexOf(".")+1),i.toLowerCase()==="in"?i="easeIn":i.toLowerCase()==="out"?i="easeOut":i.toLowerCase()==="inout"&&(i="easeInOut")),o=d(o.substr(0,o.indexOf(".")+1)+i),n.hasOwnProperty(o)&&(e=n[o])}else typeof o=="function"?e=o:Array.isArray(o)&&o.length;if(!r)return e;var l=r.slice(0);return l.unshift(0),function(s){return l[0]=s,e.apply(this,l)}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(12),d=function(a,o,r,e,i){var l=a.strokeTint,s=n.getTintAppendFloatAlpha(o.strokeColor,o.strokeAlpha*r);l.TL=s,l.TR=s,l.BL=s,l.BR=s;var h=o.pathData,f=h.length-1,v=o.lineWidth,u=v/2,c=h[0]-e,x=h[1]-i;o.closePath||(f-=2);for(var g=2;g + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(115),a=t(476),o=t(477),r=t(56),e=t(47),i=t(181),l=new n({initialize:function(h,f,v,u,c,x){h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),u===void 0&&(u=0),c===void 0&&(c=0),x===void 0&&(x=0),this.type=r.TRIANGLE,this.x1=h,this.y1=f,this.x2=v,this.y2=u,this.x3=c,this.y3=x},contains:function(s,h){return d(this,s,h)},getPoint:function(s,h){return a(this,s,h)},getPoints:function(s,h,f){return o(this,s,h,f)},getRandomPoint:function(s){return i(this,s)},setTo:function(s,h,f,v,u,c){return s===void 0&&(s=0),h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),u===void 0&&(u=0),c===void 0&&(c=0),this.x1=s,this.y1=h,this.x2=f,this.y2=v,this.x3=u,this.y3=c,this},getLineA:function(s){return s===void 0&&(s=new e),s.setTo(this.x1,this.y1,this.x2,this.y2),s},getLineB:function(s){return s===void 0&&(s=new e),s.setTo(this.x2,this.y2,this.x3,this.y3),s},getLineC:function(s){return s===void 0&&(s=new e),s.setTo(this.x3,this.y3,this.x1,this.y1),s},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(s){var h=0;this.x1<=this.x2&&this.x1<=this.x3?h=this.x1-s:this.x2<=this.x1&&this.x2<=this.x3?h=this.x2-s:h=this.x3-s,this.x1-=h,this.x2-=h,this.x3-=h}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(s){var h=0;this.x1>=this.x2&&this.x1>=this.x3?h=this.x1-s:this.x2>=this.x1&&this.x2>=this.x3?h=this.x2-s:h=this.x3-s,this.x1-=h,this.x2-=h,this.x3-=h}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(s){var h=0;this.y1<=this.y2&&this.y1<=this.y3?h=this.y1-s:this.y2<=this.y1&&this.y2<=this.y3?h=this.y2-s:h=this.y3-s,this.y1-=h,this.y2-=h,this.y3-=h}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(s){var h=0;this.y1>=this.y2&&this.y1>=this.y3?h=this.y1-s:this.y2>=this.y1&&this.y2>=this.y3?h=this.y2-s:h=this.y3-s,this.y1-=h,this.y2-=h,this.y3-=h}}});p.exports=l},function(p,E){var t={};p.exports=t,function(){t.create=function(n,d){return{x:n||0,y:d||0}},t.clone=function(n){return{x:n.x,y:n.y}},t.magnitude=function(n){return Math.sqrt(n.x*n.x+n.y*n.y)},t.magnitudeSquared=function(n){return n.x*n.x+n.y*n.y},t.rotate=function(n,d,a){var o=Math.cos(d),r=Math.sin(d);a||(a={});var e=n.x*o-n.y*r;return a.y=n.x*r+n.y*o,a.x=e,a},t.rotateAbout=function(n,d,a,o){var r=Math.cos(d),e=Math.sin(d);o||(o={});var i=a.x+((n.x-a.x)*r-(n.y-a.y)*e);return o.y=a.y+((n.x-a.x)*e+(n.y-a.y)*r),o.x=i,o},t.normalise=function(n){var d=t.magnitude(n);return d===0?{x:0,y:0}:{x:n.x/d,y:n.y/d}},t.dot=function(n,d){return n.x*d.x+n.y*d.y},t.cross=function(n,d){return n.x*d.y-n.y*d.x},t.cross3=function(n,d,a){return(d.x-n.x)*(a.y-n.y)-(d.y-n.y)*(a.x-n.x)},t.add=function(n,d,a){return a||(a={}),a.x=n.x+d.x,a.y=n.y+d.y,a},t.sub=function(n,d,a){return a||(a={}),a.x=n.x-d.x,a.y=n.y-d.y,a},t.mult=function(n,d){return{x:n.x*d,y:n.y*d}},t.div=function(n,d){return{x:n.x/d,y:n.y/d}},t.perp=function(n,d){return d=d===!0?-1:1,{x:d*-n.y,y:d*n.x}},t.neg=function(n){return{x:-n.x,y:-n.y}},t.angle=function(n,d){return Math.atan2(d.y-n.y,d.x-n.x)},t._temp=[t.create(),t.create(),t.create(),t.create(),t.create(),t.create()]}()},function(p,E){var t={};p.exports=t,function(){t.create=function(n){var d={min:{x:0,y:0},max:{x:0,y:0}};return n&&t.update(d,n),d},t.update=function(n,d,a){n.min.x=1/0,n.max.x=-1/0,n.min.y=1/0,n.max.y=-1/0;for(var o=0;on.max.x&&(n.max.x=r.x),r.xn.max.y&&(n.max.y=r.y),r.y0?n.max.x+=a.x:n.min.x+=a.x,a.y>0?n.max.y+=a.y:n.min.y+=a.y)},t.contains=function(n,d){return d.x>=n.min.x&&d.x<=n.max.x&&d.y>=n.min.y&&d.y<=n.max.y},t.overlaps=function(n,d){return n.min.x<=d.max.x&&n.max.x>=d.min.x&&n.max.y>=d.min.y&&n.min.y<=d.max.y},t.translate=function(n,d){n.min.x+=d.x,n.max.x+=d.x,n.min.y+=d.y,n.max.y+=d.y},t.shift=function(n,d){var a=n.max.x-n.min.x,o=n.max.y-n.min.y;n.min.x=d.x,n.max.x=d.x+a,n.min.y=d.y,n.max.y=d.y+o}}()},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(29),d=t(0),a=t(11),o=t(502),r=new d({Mixins:[a.Alpha,a.Flip,a.Visible],initialize:function(i,l,s,h,f,v,u,c){this.layer=i,this.index=l,this.x=s,this.y=h,this.width=f,this.height=v,this.right,this.bottom,this.baseWidth=u!==void 0?u:f,this.baseHeight=c!==void 0?c:v,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.physics={}},containsPoint:function(e,i){return!(ethis.right||i>this.bottom)},copy:function(e){return this.index=e.index,this.alpha=e.alpha,this.properties=e.properties,this.visible=e.visible,this.setFlip(e.flipX,e.flipY),this.tint=e.tint,this.rotation=e.rotation,this.collideUp=e.collideUp,this.collideDown=e.collideDown,this.collideLeft=e.collideLeft,this.collideRight=e.collideRight,this.collisionCallback=e.collisionCallback,this.collisionCallbackContext=e.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(e){var i=this.tilemapLayer;return i?i.tileToWorldX(this.x,e):this.x*this.baseWidth},getRight:function(e){var i=this.tilemapLayer;return i?this.getLeft(e)+this.width*i.scaleX:this.getLeft(e)+this.width},getTop:function(e){var i=this.tilemapLayer;return i?i.tileToWorldY(this.y,e)-(this.height-this.baseHeight)*i.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(e){var i=this.tilemapLayer;return i?this.getTop(e)+this.height*i.scaleY:this.getTop(e)+this.height},getBounds:function(e,i){return i===void 0&&(i=new o),i.x=this.getLeft(),i.y=this.getTop(),i.width=this.getRight()-i.x,i.height=this.getBottom()-i.y,i},getCenterX:function(e){return(this.getLeft(e)+this.getRight(e))/2},getCenterY:function(e){return(this.getTop(e)+this.getBottom(e))/2},intersects:function(e,i,l,s){return!(l<=this.pixelX||s<=this.pixelY||e>=this.right||i>=this.bottom)},isInteresting:function(e,i){return e&&i?this.canCollide||this.hasInterestingFace:e?this.collides:i?this.hasInterestingFace:!1},resetCollision:function(e){if(e===void 0&&(e=!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,e){var i=this.tilemapLayer;i&&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(e,i,l,s,h){if(i===void 0&&(i=e),l===void 0&&(l=e),s===void 0&&(s=e),h===void 0&&(h=!0),this.collideLeft=e,this.collideRight=i,this.collideUp=l,this.collideDown=s,this.faceLeft=e,this.faceRight=i,this.faceTop=l,this.faceBottom=s,h){var f=this.tilemapLayer;f&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(e,i){return e===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=e,this.collisionCallbackContext=i),this},setSize:function(e,i,l,s){return e!==void 0&&(this.width=e),i!==void 0&&(this.height=i),l!==void 0&&(this.baseWidth=l),s!==void 0&&(this.baseHeight=s),this.updatePixelXY(),this},updatePixelXY:function(){var e=this.layer.orientation;if(e===n.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(e===n.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(e===n.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(e===n.HEXAGONAL){var i=this.layer.hexSideLength,l=(this.baseHeight-i)/2+i;this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*l}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var e=this.layer.tilemapLayer;if(e){var i=e.gidMap[this.index];if(i)return i}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var e=this.tilemapLayer;return e?e.tilemap:null}}});p.exports=r},function(p,E,t){var n={};p.exports=n;var d=t(64),a=t(32),o=t(41),r=t(84),e=t(83),i=t(1393);(function(){n.rectangle=function(l,s,h,f,v){v=v||{};var u={label:"Rectangle Body",position:{x:l,y:s},vertices:d.fromPath("L 0 0 L "+h+" 0 L "+h+" "+f+" L 0 "+f)};if(v.chamfer){var c=v.chamfer;u.vertices=d.chamfer(u.vertices,c.radius,c.quality,c.qualityMin,c.qualityMax),delete v.chamfer}return o.create(a.extend({},u,v))},n.trapezoid=function(l,s,h,f,v,u){u=u||{},v*=.5;var c=(1-v*2)*h,x=h*v,g=x+c,m=g+x,y;v<.5?y="L 0 0 L "+x+" "+-f+" L "+g+" "+-f+" L "+m+" 0":y="L 0 0 L "+g+" "+-f+" L "+m+" 0";var T={label:"Trapezoid Body",position:{x:l,y:s},vertices:d.fromPath(y)};if(u.chamfer){var S=u.chamfer;T.vertices=d.chamfer(T.vertices,S.radius,S.quality,S.qualityMin,S.qualityMax),delete u.chamfer}return o.create(a.extend({},T,u))},n.circle=function(l,s,h,f,v){f=f||{};var u={label:"Circle Body",circleRadius:h};v=v||25;var c=Math.ceil(Math.max(10,Math.min(v,h)));return c%2===1&&(c+=1),n.polygon(l,s,c,h,a.extend({},u,f))},n.polygon=function(l,s,h,f,v){if(v=v||{},h<3)return n.circle(l,s,f,v);for(var u=2*Math.PI/h,c="",x=u*.5,g=0;g0&&d.area(M)1?(x=o.create(a.extend({parts:g.slice(0)},f)),o.setPosition(x,{x:l,y:s}),x):g[0]},n.flagCoincidentParts=function(l,s){s===void 0&&(s=5);for(var h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.x-n.width*n.originX+n.width*.5};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.width*n.originX;return n.x=d+a-n.width*.5,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.y-n.height*n.originY+n.height*.5};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.height*n.originY;return n.y=d+a-n.height*.5,n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={POST_RENDER:t(628),PRE_RENDER:t(629),RENDER:t(630),RESIZE:t(631)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={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"};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(74),d=function(a,o,r,e){e===void 0&&(e=a);var i;if(!Array.isArray(o))return i=a.indexOf(o),i!==-1?(n(a,i),r&&r.call(e,o),o):null;for(var l=o.length-1,s=[];l>=0;){var h=o[l];i=a.indexOf(h),i!==-1&&(n(a,i),s.push(h),r&&r.call(e,h)),l--}return s};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(199),a=t(10),o=t(3),r=new n({initialize:function(i){this.type=i,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(e,i){return i===void 0&&(i=32),e.strokePoints(this.getPoints(i))},getBounds:function(e,i){e||(e=new a),i===void 0&&(i=16);var l=this.getLength();i>l&&(i=l/2);var s=Math.max(1,Math.round(l/i));return d(this.getSpacedPoints(s),e)},getDistancePoints:function(e){var i=this.getLength(),l=Math.max(1,i/e);return this.getSpacedPoints(l)},getEndPoint:function(e){return e===void 0&&(e=new o),this.getPointAt(1,e)},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(e===void 0&&(e=this.arcLengthDivisions),this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var i=[],l,s=this.getPoint(0,this._tmpVec2A),h=0;i.push(0);for(var f=1;f<=e;f++)l=this.getPoint(f/e,this._tmpVec2B),h+=l.distance(s),i.push(h),s.copy(l);return this.cacheArcLengths=i,i},getPointAt:function(e,i){var l=this.getUtoTmapping(e);return this.getPoint(l,i)},getPoints:function(e,i,l){l===void 0&&(l=[]),e||(i?e=this.getLength()/i:e=this.defaultDivisions);for(var s=0;s<=e;s++)l.push(this.getPoint(s/e));return l},getRandomPoint:function(e){return e===void 0&&(e=new o),this.getPoint(Math.random(),e)},getSpacedPoints:function(e,i,l){l===void 0&&(l=[]),e||(i?e=this.getLength()/i:e=this.defaultDivisions);for(var s=0;s<=e;s++){var h=this.getUtoTmapping(s/e,null,e);l.push(this.getPoint(h))}return l},getStartPoint:function(e){return e===void 0&&(e=new o),this.getPointAt(0,e)},getTangent:function(e,i){i===void 0&&(i=new o);var l=1e-4,s=e-l,h=e+l;return s<0&&(s=0),h>1&&(h=1),this.getPoint(s,this._tmpVec2A),this.getPoint(h,i),i.subtract(this._tmpVec2A).normalize()},getTangentAt:function(e,i){var l=this.getUtoTmapping(e);return this.getTangent(l,i)},getTFromDistance:function(e,i){return e<=0?0:this.getUtoTmapping(0,e,i)},getUtoTmapping:function(e,i,l){var s=this.getLengths(l),h=0,f=s.length,v;i?v=Math.min(i,s[f-1]):v=e*s[f-1];for(var u=0,c=f-1,x;u<=c;)if(h=Math.floor(u+(c-u)/2),x=s[h]-v,x<0)u=h+1;else if(x>0)c=h-1;else{c=h;break}if(h=c,s[h]===v)return h/(f-1);var g=s[h],m=s[h+1],y=m-g,T=(v-g)/y;return(h+T)/(f-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADD:t(968),COMPLETE:t(969),FILE_COMPLETE:t(970),FILE_KEY_COMPLETE:t(971),FILE_LOAD_ERROR:t(972),FILE_LOAD:t(973),FILE_PROGRESS:t(974),POST_PROCESS:t(975),PROGRESS:t(976),START:t(977)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o,r){r===void 0&&(r=new n);var e=a.x1,i=a.y1,l=a.x2,s=a.y2,h=o.x1,f=o.y1,v=o.x2,u=o.y2,c=(v-h)*(i-f)-(u-f)*(e-h),x=(l-e)*(i-f)-(s-i)*(e-h),g=(u-f)*(l-e)-(v-h)*(s-i);if(g===0)return!1;var m=c/g,y=x/g;return m>=0&&m<=1&&y>=0&&y<=1?(r.x=e+m*(l-e),r.y=i+m*(s-i),!0):!1};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return Math.atan2(n.y2-n.y1,n.x2-n.x1)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(18),d=function(a,o,r){return a=n(a,0,1),(r-o)*a+o};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return n&&n.hasOwnProperty(d)?n[d]:a};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(315),a=new n({initialize:function(r,e){this.parent=r,this.events=e,e||(this.events=r.events?r.events:r),this.list={},this.values={},this._frozen=!1,!r.hasOwnProperty("sys")&&this.events&&this.events.once(d.DESTROY,this.destroy,this)},get:function(o){var r=this.list;if(Array.isArray(o)){for(var e=[],i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o){if(this.entries={},this.size=0,Array.isArray(o))for(var r=0;r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return n<<16|d<<8|a};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ENTER_FULLSCREEN:t(800),FULLSCREEN_FAILED:t(801),FULLSCREEN_UNSUPPORTED:t(802),LEAVE_FULLSCREEN:t(803),ORIENTATION_CHANGE:t(804),RESIZE:t(805)}},function(p,E,t){(function(n){/** +* @author Richard Davey +* @copyright 2020 Photon Storm Ltd. +* @license {@link https://opensource.org/licenses/MIT|MIT License} +*/var d={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};function a(){if(typeof importScripts=="function")return d;var o=navigator.userAgent;/Windows/.test(o)?d.windows=!0:/Mac OS/.test(o)&&!/like Mac OS/.test(o)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(d.iOS=!0,d.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),d.iOSVersion=parseInt(RegExp.$1,10)):d.macOS=!0:/Android/.test(o)?d.android=!0:/Linux/.test(o)?d.linux=!0:/iP[ao]d|iPhone/i.test(o)?(d.iOS=!0,navigator.appVersion.match(/OS (\d+)/),d.iOSVersion=parseInt(RegExp.$1,10),d.iPhone=o.toLowerCase().indexOf("iphone")!==-1,d.iPad=o.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(o)||/\bKF[A-Z][A-Z]+/.test(o)||/Silk.*Mobile Safari/.test(o)?d.kindle=!0:/CrOS/.test(o)&&(d.chromeOS=!0),(/Windows Phone/i.test(o)||/IEMobile/i.test(o))&&(d.android=!1,d.iOS=!1,d.macOS=!1,d.windows=!0,d.windowsPhone=!0);var r=/Silk/.test(o);return(d.windows||d.macOS||d.linux&&!r||d.chromeOS)&&(d.desktop=!0),(d.windowsPhone||/Windows NT/i.test(o)&&/Touch/i.test(o))&&(d.desktop=!1),navigator.standalone&&(d.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(d.cordova=!0),window.ejecta!==void 0&&(d.ejecta=!0)),typeof n!="undefined"&&n.versions&&n.versions.node&&(d.node=!0),d.node&&typeof n.versions=="object"&&(d.nodeWebkit=!!n.versions["node-webkit"],d.electron=!!n.versions.electron),/Crosswalk/.test(o)&&(d.crosswalk=!0),d.pixelRatio=window.devicePixelRatio||1,d}p.exports=a()}).call(this,t(807))},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADD:t(861),ERROR:t(862),LOAD:t(863),READY:t(864),REMOVE:t(865)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(59),a=t(2),o=t(878),r=t(879),e=t(25),i=t(12),l=t(107),s=t(58),h=new n({Extends:s,initialize:function(v){var u=v.game.renderer,c=a(v,"fragShader",o);v.fragShader=i.parseFragmentShaderMaxTextures(c,u.maxTextures),v.vertShader=a(v,"vertShader",r),v.attributes=a(v,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:l.UNSIGNED_BYTE,normalized:!0}]),s.call(this,v),this._tempMatrix1=new e,this._tempMatrix2=new e,this._tempMatrix3=new e,this.calcMatrix=new e,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){s.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(f,v,u){this.manager.set(this,f);var c=this._tempMatrix1,x=this._tempMatrix2,g=this._tempMatrix3,m=f.frame,y=m.glTexture,T=m.u0,S=m.v0,C=m.u1,P=m.v1,A=m.x,M=m.y,L=m.cutWidth,F=m.cutHeight,B=m.customPivot,N=f.displayOriginX,X=f.displayOriginY,V=-N+A,W=-X+M;if(f.isCropped){var O=f._crop;(O.flipX!==f.flipX||O.flipY!==f.flipY)&&m.updateCropUVs(O,f.flipX,f.flipY),T=O.u0,S=O.v0,C=O.u1,P=O.v1,L=O.width,F=O.height,A=O.x,M=O.y,V=-N+A,W=-X+M}var R=1,I=1;f.flipX&&(B||(V+=-m.realWidth+N*2),R=-1),(f.flipY||m.source.isGLTexture&&!y.flipY)&&(B||(W+=-m.realHeight+X*2),I=-1),x.applyITRS(f.x,f.y,f.rotation,f.scaleX*R,f.scaleY*I),c.copyFrom(v.matrix),u?(c.multiplyWithOffset(u,-v.scrollX*f.scrollFactorX,-v.scrollY*f.scrollFactorY),x.e=f.x,x.f=f.y):(x.e-=v.scrollX*f.scrollFactorX,x.f-=v.scrollY*f.scrollFactorY),c.multiply(x,g);var D=V+L,G=W+F,U=v.roundPixels,Y=g.getXRound(V,W,U),z=g.getYRound(V,W,U),H=g.getXRound(V,G,U),w=g.getYRound(V,G,U),K=g.getXRound(D,G,U),Z=g.getYRound(D,G,U),J=g.getXRound(D,W,U),j=g.getYRound(D,W,U),Q=i.getTintAppendFloatAlpha,k=v.alpha,it=Q(f.tintTopLeft,k*f._alphaTL),tt=Q(f.tintTopRight,k*f._alphaTR),q=Q(f.tintBottomLeft,k*f._alphaBL),$=Q(f.tintBottomRight,k*f._alphaBR);this.shouldFlush(6)&&this.flush();var nt=this.setGameObject(f,m);this.manager.preBatch(f),this.batchQuad(f,Y,z,H,w,K,Z,J,j,T,S,C,P,it,tt,q,$,f.tintFill,y,nt),this.manager.postBatch(f)},batchTexture:function(f,v,u,c,x,g,m,y,T,S,C,P,A,M,L,F,B,N,X,V,W,O,R,I,D,G,U,Y,z,H,w,K){this.manager.set(this,f);var Z=this._tempMatrix1,J=this._tempMatrix2,j=this._tempMatrix3,Q=N/u+U,k=X/c+Y,it=(N+V)/u+U,tt=(X+W)/c+Y,q=m,$=y,nt=-F,_=-B;if(f.isCropped){var et=f._crop,dt=et.width,ct=et.height;q=dt,$=ct,m=dt,y=ct,N=et.x,X=et.y;var ht=N,at=X;P&&(ht=V-et.x-dt),A&&(at=W-et.y-ct),Q=ht/u+U,k=at/c+Y,it=(ht+dt)/u+U,tt=(at+ct)/c+Y,nt=-F+N,_=-B+X}A=A^(!w&&v.isRenderTexture?1:0),P&&(q*=-1,nt+=m),A&&($*=-1,_+=y);var ut=nt+q,ft=_+$;J.applyITRS(x,g,C,T,S),Z.copyFrom(z.matrix),H?(Z.multiplyWithOffset(H,-z.scrollX*M,-z.scrollY*L),J.e=x,J.f=g):(J.e-=z.scrollX*M,J.f-=z.scrollY*L),Z.multiply(J,j);var lt=z.roundPixels,pt=j.getXRound(nt,_,lt),yt=j.getYRound(nt,_,lt),Tt=j.getXRound(nt,ft,lt),St=j.getYRound(nt,ft,lt),Et=j.getXRound(ut,ft,lt),Ct=j.getYRound(ut,ft,lt),At=j.getXRound(ut,_,lt),ae=j.getYRound(ut,_,lt);K===void 0&&(K=this.renderer.setTexture2D(v)),f&&this.manager.preBatch(f),this.batchQuad(f,pt,yt,Tt,St,Et,Ct,At,ae,Q,k,it,tt,O,R,I,D,G,v,K),f&&this.manager.postBatch(f)},batchTextureFrame:function(f,v,u,c,x,g,m){this.manager.set(this);var y=this._tempMatrix1.copyFrom(g),T=this._tempMatrix2,S=v+f.width,C=u+f.height;m?y.multiply(m,T):T=y;var P=T.getX(v,u),A=T.getY(v,u),M=T.getX(v,C),L=T.getY(v,C),F=T.getX(S,C),B=T.getY(S,C),N=T.getX(S,u),X=T.getY(S,u),V=this.renderer.setTextureSource(f.source);c=i.getTintAppendFloatAlpha(c,x),this.batchQuad(null,P,A,M,L,F,B,N,X,f.u0,f.v0,f.u1,f.v1,c,c,c,c,0,f.glTexture,V)},batchFillRect:function(f,v,u,c,x,g){this.renderer.pipelines.set(this);var m=this.calcMatrix;g&&g.multiply(x,m);var y=f+u,T=v+c,S=m.getX(f,v),C=m.getY(f,v),P=m.getX(f,T),A=m.getY(f,T),M=m.getX(y,T),L=m.getY(y,T),F=m.getX(y,v),B=m.getY(y,v),N=this.fillTint;this.batchQuad(null,S,C,P,A,M,L,F,B,0,0,1,1,N.TL,N.TR,N.BL,N.BR,2)},batchFillTriangle:function(f,v,u,c,x,g,m,y){this.renderer.pipelines.set(this);var T=this.calcMatrix;y&&y.multiply(m,T);var S=T.getX(f,v),C=T.getY(f,v),P=T.getX(u,c),A=T.getY(u,c),M=T.getX(x,g),L=T.getY(x,g),F=this.fillTint;this.batchTri(null,S,C,P,A,M,L,0,0,1,1,F.TL,F.TR,F.BL,2)},batchStrokeTriangle:function(f,v,u,c,x,g,m,y,T){var S=this.tempTriangle;S[0].x=f,S[0].y=v,S[0].width=m,S[1].x=u,S[1].y=c,S[1].width=m,S[2].x=x,S[2].y=g,S[2].width=m,S[3].x=f,S[3].y=v,S[3].width=m,this.batchStrokePath(S,m,!1,y,T)},batchFillPath:function(f,v,u){this.renderer.pipelines.set(this);var c=this.calcMatrix;u&&u.multiply(v,c);for(var x=f.length,g=this.polygonCache,m,y,T=this.fillTint.TL,S=this.fillTint.TR,C=this.fillTint.BL,P=0;P0&&$[4]?this.batchQuad(null,J,j,H,w,$[0],$[1],$[2],$[3],0,0,1,1,k,it,tt,q,2):(nt[0]=J,nt[1]=j,nt[2]=H,nt[3]=w,nt[4]=1),T&&nt[4]?this.batchQuad(null,Y,z,K,Z,nt[0],nt[1],nt[2],nt[3],0,0,1,1,k,it,tt,q,2):($[0]=Y,$[1]=z,$[2]=K,$[3]=Z,$[4]=1)}}});p.exports=h},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(18),a=t(17),o=new n({initialize:function(e,i,l,s,h,f,v){this.texture=e,this.name=i,this.source=e.source[l],this.sourceIndex=l,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(f,v,s,h)},setSize:function(r,e,i,l){i===void 0&&(i=0),l===void 0&&(l=0),this.cutX=i,this.cutY=l,this.cutWidth=r,this.cutHeight=e,this.width=r,this.height=e,this.halfWidth=Math.floor(r*.5),this.halfHeight=Math.floor(e*.5),this.centerX=Math.floor(r/2),this.centerY=Math.floor(e/2);var s=this.data,h=s.cut;h.x=i,h.y=l,h.w=r,h.h=e,h.r=i+r,h.b=l+e,s.sourceSize.w=r,s.sourceSize.h=e,s.spriteSourceSize.w=r,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(r*r+e*e);var f=s.drawImage;return f.x=i,f.y=l,f.width=r,f.height=e,this.updateUVs()},setTrim:function(r,e,i,l,s,h){var f=this.data,v=f.spriteSourceSize;return f.trim=!0,f.sourceSize.w=r,f.sourceSize.h=e,v.x=i,v.y=l,v.w=s,v.h=h,v.r=i+s,v.b=l+h,this.x=i,this.y=l,this.width=s,this.height=h,this.halfWidth=s*.5,this.halfHeight=h*.5,this.centerX=Math.floor(s/2),this.centerY=Math.floor(h/2),this.updateUVs()},setCropUVs:function(r,e,i,l,s,h,f){var v=this.cutX,u=this.cutY,c=this.cutWidth,x=this.cutHeight,g=this.realWidth,m=this.realHeight;e=d(e,0,g),i=d(i,0,m),l=d(l,0,g-e),s=d(s,0,m-i);var y=v+e,T=u+i,S=l,C=s,P=this.data;if(P.trim){var A=P.spriteSourceSize;l=d(l,0,c-e),s=d(s,0,x-i);var M=e+l,L=i+s,F=!(A.rM||A.y>L);if(F){var B=Math.max(A.x,e),N=Math.max(A.y,i),X=Math.min(A.r,M)-B,V=Math.min(A.b,L)-N;S=X,C=V,h?y=v+(c-(B-A.x)-X):y=v+(B-A.x),f?T=u+(x-(N-A.y)-V):T=u+(N-A.y),e=B,i=N,l=X,s=V}else y=0,T=0,S=0,C=0}else h&&(y=v+(c-e-l)),f&&(T=u+(x-i-s));var W=this.source.width,O=this.source.height;return r.u0=Math.max(0,y/W),r.v0=Math.max(0,T/O),r.u1=Math.min(1,(y+S)/W),r.v1=Math.min(1,(T+C)/O),r.x=e,r.y=i,r.cx=y,r.cy=T,r.cw=S,r.ch=C,r.width=l,r.height=s,r.flipX=h,r.flipY=f,r},updateCropUVs:function(r,e,i){return this.setCropUVs(r,r.x,r.y,r.width,r.height,e,i)},setUVs:function(r,e,i,l,s,h){var f=this.data.drawImage;return f.width=r,f.height=e,this.u0=i,this.v0=l,this.u1=s,this.v1=h,this},updateUVs:function(){var r=this.cutX,e=this.cutY,i=this.cutWidth,l=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=l;var h=this.source.width,f=this.source.height;return this.u0=r/h,this.v0=e/f,this.u1=(r+i)/h,this.v1=(e+l)/f,this},updateUVsInverted:function(){var r=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/r,this.v0=this.cutY/e,this.u1=this.cutX/r,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var r=new o(this.texture,this.name,this.sourceIndex);return r.cutX=this.cutX,r.cutY=this.cutY,r.cutWidth=this.cutWidth,r.cutHeight=this.cutHeight,r.x=this.x,r.y=this.y,r.width=this.width,r.height=this.height,r.halfWidth=this.halfWidth,r.halfHeight=this.halfHeight,r.centerX=this.centerX,r.centerY=this.centerY,r.rotated=this.rotated,r.data=a(!0,r.data,this.data),r.updateUVs(),r},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(208),d=t(0),a=t(1),o=t(79),r=new d({initialize:function(i){this.parent=i,this.list=[],this.position=0,this.addCallback=a,this.removeCallback=a,this._sortKey=""},add:function(e,i){return i?n.Add(this.list,e):n.Add(this.list,e,0,this.addCallback,this)},addAt:function(e,i,l){return l?n.AddAt(this.list,e,i):n.AddAt(this.list,e,i,0,this.addCallback,this)},getAt:function(e){return this.list[e]},getIndex:function(e){return this.list.indexOf(e)},sort:function(e,i){return e?(i===void 0&&(i=function(l,s){return l[e]-s[e]}),o(this.list,i),this):this},getByName:function(e){return n.GetFirst(this.list,"name",e)},getRandom:function(e,i){return n.GetRandom(this.list,e,i)},getFirst:function(e,i,l,s){return n.GetFirst(this.list,e,i,l,s)},getAll:function(e,i,l,s){return n.GetAll(this.list,e,i,l,s)},count:function(e,i){return n.CountAllMatching(this.list,e,i)},swap:function(e,i){n.Swap(this.list,e,i)},moveTo:function(e,i){return n.MoveTo(this.list,e,i)},moveAbove:function(e,i){return n.MoveAbove(this.list,e,i)},moveBelow:function(e,i){return n.MoveBelow(this.list,e,i)},remove:function(e,i){return i?n.Remove(this.list,e):n.Remove(this.list,e,this.removeCallback,this)},removeAt:function(e,i){return i?n.RemoveAt(this.list,e):n.RemoveAt(this.list,e,this.removeCallback,this)},removeBetween:function(e,i,l){return l?n.RemoveBetween(this.list,e,i):n.RemoveBetween(this.list,e,i,this.removeCallback,this)},removeAll:function(e){for(var i=this.list.length;i--;)this.remove(this.list[i],e);return this},bringToTop:function(e){return n.BringToTop(this.list,e)},sendToBack:function(e){return n.SendToBack(this.list,e)},moveUp:function(e){return n.MoveUp(this.list,e),e},moveDown:function(e){return n.MoveDown(this.list,e),e},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(e,i){return n.Replace(this.list,e,i)},exists:function(e){return this.list.indexOf(e)>-1},setAll:function(e,i,l,s){return n.SetAll(this.list,e,i,l,s),this},each:function(e,i){for(var l=[null],s=2;s0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(112),a=t(445),o=t(446),r=t(56),e=t(180),i=new n({initialize:function(s,h,f,v){s===void 0&&(s=0),h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=0),this.type=r.ELLIPSE,this.x=s,this.y=h,this.width=f,this.height=v},contains:function(l,s){return d(this,l,s)},getPoint:function(l,s){return a(this,l,s)},getPoints:function(l,s,h){return o(this,l,s,h)},getRandomPoint:function(l){return e(this,l)},setTo:function(l,s,h,f){return this.x=l,this.y=s,this.width=h,this.height=f,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(l,s){return s===void 0&&(s=l),this.x=l,this.y=s,this},setSize:function(l,s){return s===void 0&&(s=l),this.width=l,this.height=s,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(l){this.x=l+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(l){this.x=l-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(l){this.y=l+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(l){this.y=l-this.height/2}}});p.exports=i},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){if(n.width<=0||n.height<=0)return!1;var o=(d-n.x)/n.width,r=(a-n.y)/n.height;return o*=o,r*=r,o+r<.25};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(275),d=t(0),a=t(75),o=t(9),r=t(207),e=t(2),i=t(6),l=t(7),s=t(437),h=t(149),f=t(73),v=new d({Extends:o,initialize:function(c,x,g){o.call(this),g?x&&!Array.isArray(x)&&(x=[x]):Array.isArray(x)?l(x[0])&&(g=x,x=null):l(x)&&(g=x,x=null),this.scene=c,this.children=new h,this.isParent=!0,this.type="Group",this.classType=e(g,"classType",f),this.name=e(g,"name",""),this.active=e(g,"active",!0),this.maxSize=e(g,"maxSize",-1),this.defaultKey=e(g,"defaultKey",null),this.defaultFrame=e(g,"defaultFrame",null),this.runChildUpdate=e(g,"runChildUpdate",!1),this.createCallback=e(g,"createCallback",null),this.removeCallback=e(g,"removeCallback",null),this.createMultipleCallback=e(g,"createMultipleCallback",null),this.internalCreateCallback=e(g,"internalCreateCallback",null),this.internalRemoveCallback=e(g,"internalRemoveCallback",null),x&&this.addMultiple(x),g&&this.createMultiple(g),this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(u,c,x,g,m,y){if(u===void 0&&(u=0),c===void 0&&(c=0),x===void 0&&(x=this.defaultKey),g===void 0&&(g=this.defaultFrame),m===void 0&&(m=!0),y===void 0&&(y=!0),this.isFull())return null;var T=new this.classType(this.scene,u,c,x,g);return T.addToDisplayList(this.scene.sys.displayList),T.addToUpdateList(),T.visible=m,T.setActive(y),this.add(T),T},createMultiple:function(u){if(this.isFull())return[];Array.isArray(u)||(u=[u]);var c=[];if(u[0].key)for(var x=0;x=0;A--)if(P=L[A],P.active===x){if(M++,M===c)break}else P=null;return P?(typeof m=="number"&&(P.x=m),typeof y=="number"&&(P.y=y),P):g?this.create(m,y,T,S,C):null},get:function(u,c,x,g,m){return this.getFirst(!1,!0,u,c,x,g,m)},getFirstAlive:function(u,c,x,g,m,y){return this.getFirst(!0,u,c,x,g,m,y)},getFirstDead:function(u,c,x,g,m,y){return this.getFirst(!1,u,c,x,g,m,y)},playAnimation:function(u,c){return n.PlayAnimation(this.children.entries,u,c),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(u){u===void 0&&(u=!0);for(var c=0,x=0;x + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(12),d=function(a,o,r,e,i,l){for(var s=n.getTintAppendFloatAlpha(r.fillColor,r.fillAlpha*e),h=r.pathData,f=r.pathIndexes,v=0;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=n.x3-n.x1,r=n.y3-n.y1,e=n.x2-n.x1,i=n.y2-n.y1,l=d-n.x1,s=a-n.y1,h=o*o+r*r,f=o*e+r*i,v=o*l+r*s,u=e*e+i*i,c=e*l+i*s,x=h*u-f*f,g=x===0?0:1/x,m=(u*v-f*c)*g,y=(h*c-f*v)*g;return m>=0&&y>=0&&m+y<1};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(10),a=t(3);function o(e,i,l,s){var h=e-l,f=i-s,v=h*h+f*f;return Math.sqrt(v)}var r=new n({initialize:function(i,l,s){this.vertex1=i,this.vertex2=l,this.vertex3=s,this.bounds=new d,this._inCenter=new a},getInCenter:function(e){e===void 0&&(e=!0);var i=this.vertex1,l=this.vertex2,s=this.vertex3,h,f,v,u,c,x;e?(h=i.x,f=i.y,v=l.x,u=l.y,c=s.x,x=s.y):(h=i.vx,f=i.vy,v=l.vx,u=l.vy,c=s.vx,x=s.vy);var g=o(c,x,v,u),m=o(h,f,c,x),y=o(v,u,h,f),T=g+m+y;return this._inCenter.set((h*g+v*m+c*y)/T,(f*g+u*m+x*y)/T)},contains:function(e,i,l){var s=this.vertex1,h=this.vertex2,f=this.vertex3,v=s.vx,u=s.vy,c=h.vx,x=h.vy,g=f.vx,m=f.vy;if(l){var y=l.a,T=l.b,S=l.c,C=l.d,P=l.e,A=l.f;v=s.vx*y+s.vy*S+P,u=s.vx*T+s.vy*C+A,c=h.vx*y+h.vy*S+P,x=h.vx*T+h.vy*C+A,g=f.vx*y+f.vy*S+P,m=f.vx*T+f.vy*C+A}var M=g-v,L=m-u,F=c-v,B=x-u,N=e-v,X=i-u,V=M*M+L*L,W=M*F+L*B,O=M*N+L*X,R=F*F+B*B,I=F*N+B*X,D=V*R-W*W,G=D===0?0:1/D,U=(R*O-W*I)*G,Y=(V*I-W*O)*G;return U>=0&&Y>=0&&U+Y<1},isCounterClockwise:function(e){var i=this.vertex1,l=this.vertex2,s=this.vertex3,h=(l.vx-i.vx)*(s.vy-i.vy)-(l.vy-i.vy)*(s.vx-i.vx);return e<=0?h>=0:h<0},load:function(e,i,l,s,h){return l=this.vertex1.load(e,i,l,s,h),l=this.vertex2.load(e,i,l,s,h),l=this.vertex3.load(e,i,l,s,h),l},transformCoordinatesLocal:function(e,i,l,s){return this.vertex1.transformCoordinatesLocal(e,i,l,s),this.vertex2.transformCoordinatesLocal(e,i,l,s),this.vertex3.transformCoordinatesLocal(e,i,l,s),this},updateBounds:function(){var e=this.vertex1,i=this.vertex2,l=this.vertex3,s=this.bounds;return s.x=Math.min(e.vx,i.vx,l.vx),s.y=Math.min(e.vy,i.vy,l.vy),s.width=Math.max(e.vx,i.vx,l.vx)-s.x,s.height=Math.max(e.vy,i.vy,l.vy)-s.y,this},isInView:function(e,i,l,s,h,f,v,u,c,x,g){var m=this.vertex1.update(h,f,v,u,c,x,g,s),y=this.vertex2.update(h,f,v,u,c,x,g,s),T=this.vertex3.update(h,f,v,u,c,x,g,s);if(m.ta<=0&&y.ta<=0&&T.ta<=0||i&&!this.isCounterClockwise(l))return!1;var S=this.bounds;S.x=Math.min(m.tx,y.tx,T.tx),S.y=Math.min(m.ty,y.ty,T.ty),S.width=Math.max(m.tx,y.tx,T.tx)-S.x,S.height=Math.max(m.ty,y.ty,T.ty)-S.y;var C=e.x+e.width,P=e.y+e.height;return S.width<=0||S.height<=0||e.width<=0||e.height<=0?!1:!(S.rightC||S.y>P)},translate:function(e,i){i===void 0&&(i=0);var l=this.vertex1,s=this.vertex2,h=this.vertex3;return l.x+=e,l.y+=i,s.x+=e,s.y+=i,h.x+=e,h.y+=i,this},x:{get:function(){return this.getInCenter().x},set:function(e){var i=this.getInCenter();this.translate(e-i.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(e){var i=this.getInCenter();this.translate(0,e-i.y)}},alpha:{get:function(){var e=this.vertex1,i=this.vertex2,l=this.vertex3;return(e.alpha+i.alpha+l.alpha)/3},set:function(e){this.vertex1.alpha=e,this.vertex2.alpha=e,this.vertex3.alpha=e}},depth:{get:function(){var e=this.vertex1,i=this.vertex2,l=this.vertex3;return(e.vz+i.vz+l.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(12),a=t(39),o=new n({Extends:a,initialize:function(e,i,l,s,h,f,v,u,c,x){f===void 0&&(f=16777215),v===void 0&&(v=1),u===void 0&&(u=0),c===void 0&&(c=0),x===void 0&&(x=0),a.call(this,e,i,l),this.vx=0,this.vy=0,this.vz=0,this.nx=u,this.ny=c,this.nz=x,this.u=s,this.v=h,this.color=f,this.alpha=v,this.tx=0,this.ty=0,this.ta=0},setUVs:function(r,e){return this.u=r,this.v=e,this},transformCoordinatesLocal:function(r,e,i,l){var s=this.x,h=this.y,f=this.z,v=r.val,u=s*v[0]+h*v[4]+f*v[8]+v[12],c=s*v[1]+h*v[5]+f*v[9]+v[13],x=s*v[2]+h*v[6]+f*v[10]+v[14],g=s*v[3]+h*v[7]+f*v[11]+v[15];this.vx=u/g*e,this.vy=-(c/g)*i,l<=0?this.vz=x/g:this.vz=-(x/g)},update:function(r,e,i,l,s,h,f,v){var u=this.vx*r+this.vy*i+s,c=this.vx*e+this.vy*l+h;return f&&(u=Math.round(u),c=Math.round(c)),this.tx=u,this.ty=c,this.ta=this.alpha*v,this},load:function(r,e,i,l,s){return r[++i]=this.tx,r[++i]=this.ty,r[++i]=this.u,r[++i]=this.v,r[++i]=l,r[++i]=s,e[++i]=d.getTintAppendFloatAlpha(this.color,this.ta),i}});p.exports=o},function(p,E,t){var n={};p.exports=n;var d=t(166),a=t(32),o=t(84),r=t(41);(function(){n.create=function(e){return a.extend({id:a.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{}},e)},n.setModified=function(e,i,l,s){if(d.trigger(e,"compositeModified",e),e.isModified=i,l&&e.parent&&n.setModified(e.parent,i,l,s),s)for(var h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return n>=0&&n=0&&d + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(29),a=t(2),o=new n({initialize:function(e){e===void 0&&(e={}),this.name=a(e,"name","layer"),this.x=a(e,"x",0),this.y=a(e,"y",0),this.width=a(e,"width",0),this.height=a(e,"height",0),this.tileWidth=a(e,"tileWidth",0),this.tileHeight=a(e,"tileHeight",0),this.baseTileWidth=a(e,"baseTileWidth",this.tileWidth),this.baseTileHeight=a(e,"baseTileHeight",this.tileHeight),this.orientation=a(e,"orientation",d.ORTHOGONAL),this.widthInPixels=a(e,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=a(e,"heightInPixels",this.height*this.baseTileHeight),this.alpha=a(e,"alpha",1),this.visible=a(e,"visible",!0),this.properties=a(e,"properties",[]),this.indexes=a(e,"indexes",[]),this.collideIndexes=a(e,"collideIndexes",[]),this.callbacks=a(e,"callbacks",[]),this.bodies=a(e,"bodies",[]),this.data=a(e,"data",[]),this.tilemapLayer=a(e,"tilemapLayer",null),this.hexSideLength=a(e,"hexSideLength",0)}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(29),a=t(2),o=new n({initialize:function(e){e===void 0&&(e={}),this.name=a(e,"name","map"),this.width=a(e,"width",0),this.height=a(e,"height",0),this.infinite=a(e,"infinite",!1),this.tileWidth=a(e,"tileWidth",0),this.tileHeight=a(e,"tileHeight",0),this.widthInPixels=a(e,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=a(e,"heightInPixels",this.height*this.tileHeight),this.format=a(e,"format",null),this.orientation=a(e,"orientation",d.ORTHOGONAL),this.renderOrder=a(e,"renderOrder","right-down"),this.version=a(e,"version","1"),this.properties=a(e,"properties",{}),this.layers=a(e,"layers",[]),this.images=a(e,"images",[]),this.objects=a(e,"objects",{}),this.collision=a(e,"collision",{}),this.tilesets=a(e,"tilesets",[]),this.imageCollections=a(e,"imageCollections",[]),this.tiles=a(e,"tiles",[]),this.hexSideLength=a(e,"hexSideLength",0)}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o,r,e,i,l,s,h,f){(e===void 0||e<=0)&&(e=32),(i===void 0||i<=0)&&(i=32),l===void 0&&(l=0),s===void 0&&(s=0),h===void 0&&(h={}),f===void 0&&(f={}),this.name=o,this.firstgid=r,this.tileWidth=e,this.tileHeight=i,this.tileMargin=l,this.tileSpacing=s,this.tileProperties=h,this.tileData=f,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(a){return this.containsTileIndex(a)?this.tileProperties[a-this.firstgid]:null},getTileData:function(a){return this.containsTileIndex(a)?this.tileData[a-this.firstgid]:null},getTileCollisionGroup:function(a){var o=this.getTileData(a);return o&&o.objectgroup?o.objectgroup:null},containsTileIndex:function(a){return a>=this.firstgid&&a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return a===void 0&&(a=1e-4),Math.abs(n-d) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(11),a=t(15),o=t(1068),r=new n({Extends:a,Mixins:[d.Alpha,d.BlendMode,d.Depth,d.Flip,d.GetBounds,d.Mask,d.Origin,d.Pipeline,d.ScrollFactor,d.Size,d.TextureCrop,d.Tint,d.Transform,d.Visible,o],initialize:function(i,l,s,h,f){a.call(this,i,"Image"),this._crop=this.resetCropObject(),this.setTexture(h,f),this.setPosition(l,s),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});p.exports=r},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.hasOwnProperty(d)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(77),d=function(a,o){var r=n(a);for(var e in o)r.hasOwnProperty(e)||(r[e]=o[e]);return r};p.exports=d},function(p,E,t){var n={};p.exports=n;var d=t(64),a=t(83),o=t(165),r=t(84),e=t(271),i=t(32);(function(){n._warming=.4,n._torqueDampen=1,n._minLength=1e-6,n.create=function(l){var s=l;s.bodyA&&!s.pointA&&(s.pointA={x:0,y:0}),s.bodyB&&!s.pointB&&(s.pointB={x:0,y:0});var h=s.bodyA?a.add(s.bodyA.position,s.pointA):s.pointA,f=s.bodyB?a.add(s.bodyB.position,s.pointB):s.pointB,v=a.magnitude(a.sub(h,f));s.length=typeof s.length!="undefined"?s.length:v,s.id=s.id||i.nextId(),s.label=s.label||"Constraint",s.type="constraint",s.stiffness=s.stiffness||(s.length>0?1:.7),s.damping=s.damping||0,s.angularStiffness=s.angularStiffness||0,s.angleA=s.bodyA?s.bodyA.angle:s.angleA,s.angleB=s.bodyB?s.bodyB.angle:s.angleB,s.plugin={};var u={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return s.length===0&&s.stiffness>.1?(u.type="pin",u.anchors=!1):s.stiffness<.9&&(u.type="spring"),s.render=i.extend(u,s.render),s},n.preSolveAll=function(l){for(var s=0;s0&&(u.position.x+=f.x,u.position.y+=f.y),f.angle!==0&&(d.rotate(u.vertices,f.angle,h.position),e.rotate(u.axes,f.angle),v>0&&a.rotateAbout(u.position,f.angle,h.position,u.position)),r.update(u.bounds,u.vertices,h.velocity)}f.angle*=n._warming,f.x*=n._warming,f.y*=n._warming}}},n.pointAWorld=function(l){return{x:(l.bodyA?l.bodyA.position.x:0)+l.pointA.x,y:(l.bodyA?l.bodyA.position.y:0)+l.pointA.y}},n.pointBWorld=function(l){return{x:(l.bodyB?l.bodyB.position.x:0)+l.pointB.x,y:(l.bodyB?l.bodyB.position.y:0)+l.pointB.y}}})()},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(35),d=t(65),a=t(66),o=t(0),r=t(11),e=t(15),i=t(10),l=t(57),s=new o({Extends:e,Mixins:[r.Depth,r.GetBounds,r.Origin,r.Transform,r.ScrollFactor,r.Visible],initialize:function(f,v,u,c,x){c===void 0&&(c=1),x===void 0&&(x=c),e.call(this,f,"Zone"),this.setPosition(v,u),this.width=c,this.height=x,this.blendMode=n.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(h){this.scaleX=h/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(h){this.scaleY=h/this.height}},setSize:function(h,f,v){v===void 0&&(v=!0),this.width=h,this.height=f,this.updateDisplayOrigin();var u=this.input;return v&&u&&!u.customHitArea&&(u.hitArea.width=h,u.hitArea.height=f),this},setDisplaySize:function(h,f){return this.displayWidth=h,this.displayHeight=f,this},setCircleDropZone:function(h){return this.setDropZone(new d(0,0,h),a)},setRectangleDropZone:function(h,f){return this.setDropZone(new i(0,0,h,f),l)},setDropZone:function(h,f){return h===void 0?this.setRectangleDropZone(this.width,this.height):this.input||this.setInteractive(h,f,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(h,f,v){v.addToRenderList(f)},renderWebGL:function(h,f,v){v.addToRenderList(f)}});p.exports=s},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return 2*(n.width+n.height)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){for(var d=n.length-1;d>0;d--){var a=Math.floor(Math.random()*(d+1)),o=n[d];n[d]=n[a],n[a]=o}return n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADD_ANIMATION:t(724),ANIMATION_COMPLETE:t(725),ANIMATION_COMPLETE_KEY:t(726),ANIMATION_REPEAT:t(727),ANIMATION_RESTART:t(728),ANIMATION_START:t(729),ANIMATION_STOP:t(730),ANIMATION_UPDATE:t(731),PAUSE_ALL:t(732),REMOVE_ANIMATION:t(733),RESUME_ALL:t(734)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(11),a=t(36),o=t(9),r=t(37),e=t(10),i=t(25),l=t(187),s=t(3),h=new n({Extends:o,Mixins:[d.Alpha,d.Visible],initialize:function(v,u,c,x){v===void 0&&(v=0),u===void 0&&(u=0),c===void 0&&(c=0),x===void 0&&(x=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new e,this.dirty=!0,this._x=v,this._y=u,this._width=c,this._height=x,this._bounds=new e,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new i,this.transparent=!0,this.backgroundColor=l("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new s(c/2,x/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[]},addToRenderList:function(f){this.renderList.push(f)},setOrigin:function(f,v){return f===void 0&&(f=.5),v===void 0&&(v=f),this.originX=f,this.originY=v,this},getScroll:function(f,v,u){u===void 0&&(u=new s);var c=this.width*.5,x=this.height*.5;return u.x=f-c,u.y=v-x,this.useBounds&&(u.x=this.clampX(u.x),u.y=this.clampY(u.y)),u},centerOnX:function(f){var v=this.width*.5;return this.midPoint.x=f,this.scrollX=f-v,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(f){var v=this.height*.5;return this.midPoint.y=f,this.scrollY=f-v,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(f,v){return this.centerOnX(f),this.centerOnY(v),this},centerToBounds:function(){if(this.useBounds){var f=this._bounds,v=this.width*.5,u=this.height*.5;this.midPoint.set(f.centerX,f.centerY),this.scrollX=f.centerX-v,this.scrollY=f.centerY-u}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(f){if(this.disableCull)return f;var v=this.matrix.matrix,u=v[0],c=v[1],x=v[2],g=v[3],m=u*g-c*x;if(!m)return f;var y=v[4],T=v[5],S=this.scrollX,C=this.scrollY,P=this.width,A=this.height,M=this.y,L=M+A,F=this.x,B=F+P,N=this.culledObjects,X=f.length;m=1/m,N.length=0;for(var V=0;VF&&GM&&Ux&&(f=x),f},clampY:function(f){var v=this._bounds,u=this.displayHeight,c=v.y+(u-this.height)/2,x=Math.max(c,c+v.height-u);return fx&&(f=x),f},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(f){return f===void 0&&(f=0),this.rotation=a(f),this},setBackgroundColor:function(f){return f===void 0&&(f="rgba(0,0,0,0)"),this.backgroundColor=l(f),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(f,v,u,c,x){return x===void 0&&(x=!1),this._bounds.setTo(f,v,u,c),this.dirty=!0,this.useBounds=!0,x?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(f){f===void 0&&(f=new e);var v=this._bounds;return f.setTo(v.x,v.y,v.width,v.height),f},setName:function(f){return f===void 0&&(f=""),this.name=f,this},setPosition:function(f,v){return v===void 0&&(v=f),this.x=f,this.y=v,this},setRotation:function(f){return f===void 0&&(f=0),this.rotation=f,this},setRoundPixels:function(f){return this.roundPixels=f,this},setScene:function(f){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=f;var v=f.sys;return this.sceneManager=v.game.scene,this.scaleManager=v.scale,this.cameraManager=v.cameras,this.updateSystem(),this},setScroll:function(f,v){return v===void 0&&(v=f),this.scrollX=f,this.scrollY=v,this},setSize:function(f,v){return v===void 0&&(v=f),this.width=f,this.height=v,this},setViewport:function(f,v,u,c){return this.x=f,this.y=v,this.width=u,this.height=c,this},setZoom:function(f,v){return f===void 0&&(f=1),v===void 0&&(v=f),f===0&&(f=.001),v===0&&(v=.001),this.zoomX=f,this.zoomY=v,this},setMask:function(f,v){return v===void 0&&(v=!0),this.mask=f,this._maskCamera=v?this.cameraManager.default:this,this},clearMask:function(f){return f===void 0&&(f=!1),f&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var f={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&&(f.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),f},update:function(){},updateSystem:function(){if(!!this.scaleManager){var f=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,v=this.sceneManager;f&&!this._customViewport?v.customViewports++:!f&&this._customViewport&&v.customViewports--,this.dirty=!0,this._customViewport=f}},destroy:function(){this.emit(r.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(f){this._x=f,this.updateSystem()}},y:{get:function(){return this._y},set:function(f){this._y=f,this.updateSystem()}},width:{get:function(){return this._width},set:function(f){this._width=f,this.updateSystem()}},height:{get:function(){return this._height},set:function(f){this._height=f,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(f){this._scrollX=f,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(f){this._scrollY=f,this.dirty=!0}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(f){this._zoomX=f,this._zoomY=f,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(f){this._zoomX=f,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(f){this._zoomY=f,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(f){this._rotation=f,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});p.exports=h},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(334),d=t(335),a=t(336),o=t(337),r=t(338),e=t(339),i=t(340),l=t(341),s=t(342),h=t(343),f=t(344),v=t(345);p.exports={Power0:i,Power1:l.Out,Power2:o.Out,Power3:s.Out,Power4:h.Out,Linear:i,Quad:l.Out,Cubic:o.Out,Quart:s.Out,Quint:h.Out,Sine:f.Out,Expo:e.Out,Circ:a.Out,Elastic:r.Out,Back:n.Out,Bounce:d.Out,Stepped:v,"Quad.easeIn":l.In,"Cubic.easeIn":o.In,"Quart.easeIn":s.In,"Quint.easeIn":h.In,"Sine.easeIn":f.In,"Expo.easeIn":e.In,"Circ.easeIn":a.In,"Elastic.easeIn":r.In,"Back.easeIn":n.In,"Bounce.easeIn":d.In,"Quad.easeOut":l.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":s.Out,"Quint.easeOut":h.Out,"Sine.easeOut":f.Out,"Expo.easeOut":e.Out,"Circ.easeOut":a.Out,"Elastic.easeOut":r.Out,"Back.easeOut":n.Out,"Bounce.easeOut":d.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":s.InOut,"Quint.easeInOut":h.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":a.InOut,"Elastic.easeInOut":r.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":d.InOut}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return(d-n)*a+n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(105),d={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};function a(){var o=navigator.userAgent;return/Edge\/\d+/.test(o)?d.edge=!0:/Chrome\/(\d+)/.test(o)&&!n.windowsPhone?(d.chrome=!0,d.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(o)?(d.firefox=!0,d.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(o)&&n.iOS?d.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(o)?(d.ie=!0,d.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(o)?d.opera=!0:/Safari/.test(o)&&!n.windowsPhone?d.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(o)&&(d.ie=!0,d.trident=!0,d.tridentVersion=parseInt(RegExp.$1,10),d.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(o)&&(d.silk=!0),d}p.exports=a()},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return Math.random()*(d-n)+n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n>0&&(n&n-1)===0&&d>0&&(d&d-1)===0};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){return a===void 0&&(a=0),d===0?n:(n-=a,n=d*Math.ceil(n/d),o?(a+n)/d:a+n)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o,r,e,i){this.x=0,this.y=0,this.z=0,this.w=0,typeof o=="object"?(this.x=o.x||0,this.y=o.y||0,this.z=o.z||0,this.w=o.w||0):(this.x=o||0,this.y=r||0,this.z=e||0,this.w=i||0)},clone:function(){return new d(this.x,this.y,this.z,this.w)},copy:function(a){return this.x=a.x,this.y=a.y,this.z=a.z||0,this.w=a.w||0,this},equals:function(a){return this.x===a.x&&this.y===a.y&&this.z===a.z&&this.w===a.w},set:function(a,o,r,e){return typeof a=="object"?(this.x=a.x||0,this.y=a.y||0,this.z=a.z||0,this.w=a.w||0):(this.x=a||0,this.y=o||0,this.z=r||0,this.w=e||0),this},add:function(a){return this.x+=a.x,this.y+=a.y,this.z+=a.z||0,this.w+=a.w||0,this},subtract:function(a){return this.x-=a.x,this.y-=a.y,this.z-=a.z||0,this.w-=a.w||0,this},scale:function(a){return this.x*=a,this.y*=a,this.z*=a,this.w*=a,this},length:function(){var a=this.x,o=this.y,r=this.z,e=this.w;return Math.sqrt(a*a+o*o+r*r+e*e)},lengthSq:function(){var a=this.x,o=this.y,r=this.z,e=this.w;return a*a+o*o+r*r+e*e},normalize:function(){var a=this.x,o=this.y,r=this.z,e=this.w,i=a*a+o*o+r*r+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=a*i,this.y=o*i,this.z=r*i,this.w=e*i),this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lerp:function(a,o){o===void 0&&(o=0);var r=this.x,e=this.y,i=this.z,l=this.w;return this.x=r+o*(a.x-r),this.y=e+o*(a.y-e),this.z=i+o*(a.z-i),this.w=l+o*(a.w-l),this},multiply:function(a){return this.x*=a.x,this.y*=a.y,this.z*=a.z||1,this.w*=a.w||1,this},divide:function(a){return this.x/=a.x,this.y/=a.y,this.z/=a.z||1,this.w/=a.w||1,this},distance:function(a){var o=a.x-this.x,r=a.y-this.y,e=a.z-this.z||0,i=a.w-this.w||0;return Math.sqrt(o*o+r*r+e*e+i*i)},distanceSq:function(a){var o=a.x-this.x,r=a.y-this.y,e=a.z-this.z||0,i=a.w-this.w||0;return o*o+r*r+e*e+i*i},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(a){var o=this.x,r=this.y,e=this.z,i=this.w,l=a.val;return this.x=l[0]*o+l[4]*r+l[8]*e+l[12]*i,this.y=l[1]*o+l[5]*r+l[9]*e+l[13]*i,this.z=l[2]*o+l[6]*r+l[10]*e+l[14]*i,this.w=l[3]*o+l[7]*r+l[11]*e+l[15]*i,this},transformQuat:function(a){var o=this.x,r=this.y,e=this.z,i=a.x,l=a.y,s=a.z,h=a.w,f=h*o+l*e-s*r,v=h*r+s*o-i*e,u=h*e+i*r-l*o,c=-i*o-l*r-s*e;return this.x=f*h+c*-i+v*-s-u*-l,this.y=v*h+c*-l+u*-i-f*-s,this.z=u*h+c*-s+f*-l-v*-i,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});d.prototype.sub=d.prototype.subtract,d.prototype.mul=d.prototype.multiply,d.prototype.div=d.prototype.divide,d.prototype.dist=d.prototype.distance,d.prototype.distSq=d.prototype.distanceSq,d.prototype.len=d.prototype.length,d.prototype.lenSq=d.prototype.lengthSq,p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(91),a=new n({initialize:function(r,e,i,l,s,h,f){l===void 0&&(l=1),s===void 0&&(s=0),h===void 0&&(h=!0),f===void 0&&(f=!1),this.renderer=r,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=l,this.minFilter=s,this.autoClear=h,this.autoResize=!1,this.resize(e,i),f&&this.setAutoResize(!0)},setAutoResize:function(o){return o&&!this.autoResize?(this.renderer.on(d.RESIZE,this.resize,this),this.autoResize=!0):!o&&this.autoResize&&(this.renderer.off(d.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(o,r){var e=o*this.scale,i=r*this.scale;if(e!==this.width||i!==this.height){var l=this.renderer;l.deleteFramebuffer(this.framebuffer),l.deleteTexture(this.texture),o*=this.scale,r*=this.scale,o=Math.round(o),r=Math.round(r),o<=0&&(o=1),r<=0&&(r=1),this.texture=l.createTextureFromSource(null,o,r,this.minFilter),this.framebuffer=l.createFramebuffer(o,r,this.texture,!1),this.width=o,this.height=r}return this},bind:function(o,r,e){if(o===void 0&&(o=!1),o&&this.renderer.flush(),r&&e&&this.resize(r,e),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),o&&this.adjustViewport(),this.autoClear){var i=this.renderer.gl;i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT)}},adjustViewport:function(){var o=this.renderer.gl;o.viewport(0,0,this.width,this.height),o.disable(o.SCISSOR_TEST)},clear:function(){var o=this.renderer,r=o.gl;o.pushFramebuffer(this.framebuffer),r.disable(r.SCISSOR_TEST),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),o.popFramebuffer(),o.resetScissor()},unbind:function(o){o===void 0&&(o=!1);var r=this.renderer;return o&&r.flush(),r.popFramebuffer()},destroy:function(){var o=this.renderer;o.deleteFramebuffer(this.framebuffer),o.deleteTexture(this.texture),o.off(d.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a;if(d)typeof d=="string"?a=document.getElementById(d):typeof d=="object"&&d.nodeType===1&&(a=d);else if(n.parentElement||d===null)return n;return a||(a=document.body),a.appendChild(n),n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(77),a=t(9),o=t(70),r=t(22),e=t(1),i=t(207),l=t(428),s=new n({Extends:a,initialize:function(f){a.call(this),this.game=f,this.jsonCache=f.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,f.events.on(r.BLUR,this.onGameBlur,this),f.events.on(r.FOCUS,this.onGameFocus,this),f.events.on(r.PRE_STEP,this.update,this),f.events.once(r.DESTROY,this.destroy,this)},add:e,addAudioSprite:function(h,f){f===void 0&&(f={});var v=this.add(h,f);v.spritemap=this.jsonCache.get(h).spritemap;for(var u in v.spritemap)if(!!v.spritemap.hasOwnProperty(u)){var c=d(f),x=v.spritemap[u];c.loop=x.hasOwnProperty("loop")?x.loop:!1,v.addMarker({name:u,start:x.start,duration:x.end-x.start,config:c})}return v},get:function(h){return l(this.sounds,"key",h)},getAll:function(h){return i(this.sounds,"key",h)},play:function(h,f){var v=this.add(h);return v.once(o.COMPLETE,v.destroy,v),f?f.name?(v.addMarker(f),v.play(f.name)):v.play(f):v.play()},playAudioSprite:function(h,f,v){var u=this.addAudioSprite(h);return u.once(o.COMPLETE,u.destroy,u),u.play(f,v)},remove:function(h){var f=this.sounds.indexOf(h);return f!==-1?(h.destroy(),this.sounds.splice(f,1),!0):!1},removeAll:function(){this.sounds.forEach(function(h){h.destroy()}),this.sounds.length=0},removeByKey:function(h){for(var f=0,v=this.sounds.length-1;v>=0;v--){var u=this.sounds[v];u.key===h&&(u.destroy(),this.sounds.splice(v,1),f++)}return f},pauseAll:function(){this.forEachActiveSound(function(h){h.pause()}),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(h){h.resume()}),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(h){h.stop()}),this.emit(o.STOP_ALL,this)},stopByKey:function(h){var f=0;return this.getAll(h).forEach(function(v){v.stop()&&f++}),f},unlock:e,onBlur:e,onFocus:e,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(h,f){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var v=this.sounds.length-1;v>=0;v--)this.sounds[v].pendingRemove&&this.sounds.splice(v,1);this.sounds.forEach(function(u){u.update(h,f)})},destroy:function(){this.game.events.off(r.BLUR,this.onGameBlur,this),this.game.events.off(r.FOCUS,this.onGameFocus,this),this.game.events.off(r.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(h,f){var v=this;this.sounds.forEach(function(u,c){u&&!u.pendingRemove&&h.call(f||v,u,c,v.sounds)})},setRate:function(h){return this.rate=h,this},rate:{get:function(){return this._rate},set:function(h){this._rate=h,this.forEachActiveSound(function(f){f.calculateRate()}),this.emit(o.GLOBAL_RATE,this,h)}},setDetune:function(h){return this.detune=h,this},detune:{get:function(){return this._detune},set:function(h){this._detune=h,this.forEachActiveSound(function(f){f.calculateRate()}),this.emit(o.GLOBAL_DETUNE,this,h)}}});p.exports=s},function(p,E,t){/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(9),a=t(70),o=t(17),r=t(1),e=new n({Extends:d,initialize:function(l,s,h){d.call(this),this.manager=l,this.key=s,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=o(this.config,h),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(i){return!i||!i.name||typeof i.name!="string"?!1:this.markers[i.name]?(console.error("addMarker "+i.name+" already exists in Sound"),!1):(i=o(!0,{name:"",start:0,duration:this.totalDuration-(i.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},i),this.markers[i.name]=i,!0)},updateMarker:function(i){return!i||!i.name||typeof i.name!="string"?!1:this.markers[i.name]?(this.markers[i.name]=o(!0,this.markers[i.name],i),!0):(console.warn("Audio Marker: "+i.name+" missing in Sound: "+this.key),!1)},removeMarker:function(i){var l=this.markers[i];return l?(this.markers[i]=null,l):null},play:function(i,l){if(i===void 0&&(i=""),typeof i=="object"&&(l=i,i=""),typeof i!="string")return!1;if(!i)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[i])return console.warn("Marker: "+i+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[i],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=o(this.currentConfig,l),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return this.isPaused||!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!this.isPaused||this.isPlaying?!1:(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!this.isPaused&&!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:r,calculateRate:function(){var i=1.0005777895065548,l=this.currentConfig.detune+this.manager.detune,s=Math.pow(i,l);this.totalRate=this.currentConfig.rate*this.manager.rate*s},destroy:function(){this.pendingRemove||(this.emit(a.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(209),d=t(435),a=function(o,r){if(r===void 0&&(r=90),!n(o))return null;if(typeof r!="string"&&(r=(r%360+360)%360),r===90||r===-270||r==="rotateLeft")o=d(o),o.reverse();else if(r===-90||r===270||r==="rotateRight")o.reverse(),o=d(o);else if(Math.abs(r)===180||r==="rotate180"){for(var e=0;e + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(18),a=t(11),o=t(15),r=t(1043),e=t(1044),i=t(212),l=t(10),s=t(1045),h=new n({Extends:o,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Mask,a.Origin,a.Pipeline,a.ScrollFactor,a.Texture,a.Tint,a.Transform,a.Visible,s],initialize:function(v,u,c,x,g,m,y){g===void 0&&(g=""),y===void 0&&(y=0),o.call(this,v,"BitmapText"),this.font=x;var T=this.scene.sys.cache.bitmapFont.get(x);T||console.warn("Invalid BitmapText key: "+x),this.fontData=T.data,this._text="",this._fontSize=m||this.fontData.size,this._letterSpacing=0,this._align=y,this._bounds=r(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=T.fromAtlas,this.setTexture(T.texture,T.frame),this.setPosition(u,c),this.setOrigin(0,0),this.initPipeline(),this.setText(g)},setLeftAlign:function(){return this._align=h.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=h.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=h.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(f){return this._fontSize=f,this._dirty=!0,this},setLetterSpacing:function(f){return f===void 0&&(f=0),this._letterSpacing=f,this._dirty=!0,this},setText:function(f){return!f&&f!==0&&(f=""),Array.isArray(f)&&(f=f.join(` +`)),f!==this.text&&(this._text=f.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(f,v,u,c){return f===void 0&&(f=0),v===void 0&&(v=0),u===void 0&&(u=0),c===void 0&&(c=.5),this.dropShadowX=f,this.dropShadowY=v,this.dropShadowColor=u,this.dropShadowAlpha=c,this},setCharacterTint:function(f,v,u,c,x,g,m){f===void 0&&(f=0),v===void 0&&(v=1),u===void 0&&(u=!1),c===void 0&&(c=-1),x===void 0&&(x=c,g=c,m=c);var y=this.text.length;v===-1&&(v=y),f<0&&(f=y+f),f=d(f,0,y-1);for(var T=d(f+v,f,y),S=this.charColors,C=f;C + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o){if(this.entries=[],Array.isArray(o))for(var r=0;r-1&&this.entries.splice(o,1),this},dump:function(){console.group("Set");for(var a=0;a-1},union:function(a){var o=new d;return a.entries.forEach(function(r){o.set(r)}),this.entries.forEach(function(r){o.set(r)}),o},intersect:function(a){var o=new d;return this.entries.forEach(function(r){a.contains(r)&&o.set(r)}),o},difference:function(a){var o=new d;return this.entries.forEach(function(r){a.contains(r)||o.set(r)}),o},size:{get:function(){return this.entries.length},set:function(a){return a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(11),a=t(15),o=t(189),r=t(92),e=t(1182),i=new n({Extends:a,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.GetBounds,d.Mask,d.Pipeline,d.ScrollFactor,d.Transform,d.Visible,e],initialize:function(s,h,f,v,u,c,x){v===void 0&&(v=16777215),u===void 0&&(u=128),c===void 0&&(c=1),x===void 0&&(x=.1),a.call(this,s,"PointLight"),this.initPipeline(r.POINTLIGHT_PIPELINE),this.setPosition(h,f),this.color=o(v),this.intensity=c,this.attenuation=x,this.width=u*2,this.height=u*2,this._radius=u},radius:{get:function(){return this._radius},set:function(l){this._radius=l,this.width=l*2,this.height=l*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});p.exports=i},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=d.width/2,o=d.height/2,r=Math.abs(n.x-d.x-a),e=Math.abs(n.y-d.y-o),i=a+n.radius,l=o+n.radius;if(r>i||e>l)return!1;if(r<=a||e<=o)return!0;var s=r-a,h=e-o,f=s*s,v=h*h,u=n.radius*n.radius;return f+v<=u};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.width<=0||n.height<=0||d.width<=0||d.height<=0?!1:!(n.rightd.right||n.y>d.bottom)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(6),d={},a={};a.register=function(o,r,e,i,l){d[o]={plugin:r,mapping:e,settingsKey:i,configKey:l}},a.getPlugin=function(o){return d[o]},a.install=function(o){var r=o.scene.sys,e=r.settings.input,i=r.game.config;for(var l in d){var s=d[l].plugin,h=d[l].mapping,f=d[l].settingsKey,v=d[l].configKey;n(e,f,i[v])&&(o[h]=new s(o))}},a.remove=function(o){d.hasOwnProperty(o)&&delete d[o]},p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ANY_KEY_DOWN:t(1323),ANY_KEY_UP:t(1324),COMBO_MATCH:t(1325),DOWN:t(1326),KEY_DOWN:t(1327),KEY_UP:t(1328),UP:t(1329)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.url?n.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?n.url:d+n.url:!1};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r,e){return n===void 0&&(n=""),d===void 0&&(d=!0),a===void 0&&(a=""),o===void 0&&(o=""),r===void 0&&(r=0),e===void 0&&(e=!1),{responseType:n,async:d,user:a,password:o,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:e}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(243),a=t(73),o=new n({Extends:a,Mixins:[d.Acceleration,d.Angular,d.Bounce,d.Debug,d.Drag,d.Enable,d.Friction,d.Gravity,d.Immovable,d.Mass,d.Pushable,d.Size,d.Velocity],initialize:function(e,i,l,s,h){a.call(this,e,i,l,s,h),this.body=null}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(119),d=function(a,o,r,e){if(r===void 0&&(r=!1),n(a,o,e)){var i=e.data[o][a]||null;return i?i.index===-1?r?i:null:i:null}else return null};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=n.data,e=n.width,i=n.height,l=n.tilemapLayer,s=Math.max(0,d.left),h=Math.min(e,d.right),f=Math.max(0,d.top),v=Math.min(i,d.bottom),u,c,x;if(a===0)for(c=f;c=s;u--)x=r[c][u],!(!x||x.index===-1||!x.visible||x.alpha===0)&&o.push(x);else if(a===2)for(c=v;c>=f;c--)for(u=s;r[c]&&u=f;c--)for(u=h;r[c]&&u>=s;u--)x=r[c][u],!(!x||x.index===-1||!x.visible||x.alpha===0)&&o.push(x);return l.tilesDrawn=o.length,l.tilesTotal=e*i,o};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=a.collideIndexes.indexOf(n);d&&o===-1?a.collideIndexes.push(n):!d&&o!==-1&&a.collideIndexes.splice(o,1)};p.exports=t},function(p,E,t){/** + * @author Seth Berrier + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(2),d=function(a,o,r){if(!o)return{i:0,layers:a.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=o.x+n(o,"startx",0)*a.tilewidth+n(o,"offsetx",0),i=o.y+n(o,"starty",0)*a.tileheight+n(o,"offsety",0);return{i:0,layers:o.layers,name:r.name+o.name+"/",opacity:r.opacity*o.opacity,visible:r.visible&&o.visible,x:r.x+e,y:r.y+i}};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o;if(n.hasOwnProperty(d)){var r=typeof n[d];r==="function"?o=function(e,i,l,s,h,f){return n[d](e,i,l,s,h,f)}:o=function(){return n[d]}}else typeof a=="function"?o=a:o=function(){return a};return o};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(265),d=t(13),a=t(99),o=t(80),r=t(162),e=t(583),i=t(263),l=t(6),s=t(264),h=t(266),f=t(268),v=function(u,c,x){x===void 0&&(x=n);for(var g=x.targets?x.targets:i(c),m=e(c),y=r(c,"delay",x.delay),T=r(c,"duration",x.duration),S=l(c,"easeParams",x.easeParams),C=o(l(c,"ease",x.ease),S),P=r(c,"hold",x.hold),A=r(c,"repeat",x.repeat),M=r(c,"repeatDelay",x.repeatDelay),L=a(c,"yoyo",x.yoyo),F=a(c,"flipX",x.flipX),B=a(c,"flipY",x.flipY),N=[],X=0;X + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(102),a=t(2),o=t(132),r=t(185),e=new n({initialize:function(l){this.parent=l,this.animationManager=l.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.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!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(i){var l=this.parent;if(i===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,l;Array.isArray(i)||(i=[i]);for(var s=0;sh.getTotalFrames()&&(c=0);var x=h.frames[c];c===0&&!this.forward&&(x=h.getLastFrame()),this.currentFrame=x}return this.parent},pause:function(i){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),i!==void 0&&this.setCurrentFrame(i),this.parent},resume:function(i){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),i!==void 0&&this.setCurrentFrame(i),this.parent},playAfterDelay:function(i,l){if(!this.isPlaying)this.delayCounter=l,this.play(i,!0);else{var s=this.nextAnim,h=this.nextAnimsQueue;s&&h.unshift(s),this.nextAnim=i,this._pendingStop=1,this._pendingStopValue=l}return this.parent},playAfterRepeat:function(i,l){if(l===void 0&&(l=1),!this.isPlaying)this.play(i);else{var s=this.nextAnim,h=this.nextAnimsQueue;s&&h.unshift(s),this.repeatCounter!==-1&&l>this.repeatCounter&&(l=this.repeatCounter),this.nextAnim=i,this._pendingStop=2,this._pendingStopValue=l}return this.parent},play:function(i,l){l===void 0&&(l=!1);var s=this.currentAnim,h=this.parent,f=typeof i=="string"?i:i.key;if(l&&this.isPlaying&&s.key===f)return h;if(s&&this.isPlaying){var v=this.animationManager.getMix(s.key,i);if(v>0)return this.playAfterDelay(i,v)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(i)},playReverse:function(i,l){l===void 0&&(l=!1);var s=typeof i=="string"?i:i.key;return l&&this.isPlaying&&this.currentAnim.key===s?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(i))},startAnimation:function(i){this.load(i);var l=this.currentAnim,s=this.parent;return l&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,l.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,this.delayCounter===0&&this.handleStart()),s},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(i,l){var s=this.currentAnim,h=this.currentFrame,f=this.parent,v=h.textureFrame;f.emit(i,s,h,f,v),l&&f.emit(l+s.key,s,h,f,v)},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var i=this.currentFrame;if(!i)return 0;var l=i.progress;return this.inReverse&&(l*=-1),l},setProgress:function(i){return this.forward||(i=1-i),this.setCurrentFrame(this.currentAnim.getFrameByProgress(i)),this.parent},setRepeat:function(i){return this.repeatCounter=i===-1?Number.MAX_VALUE:i,this.parent},globalRemove:function(i,l){l===void 0&&(l=this.currentAnim),this.isPlaying&&l.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(i,l){i===void 0&&(i=!1),l===void 0&&(l=!1);var s=this.currentAnim,h=this.parent;return s?(l&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),s.getFirstTick(this),this.emitEvents(o.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!i,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(s.frames[0]),this.parent):h},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var i=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(i)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleStop(),this.nextAnim){var i=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(i)}return this.parent},stopAfterDelay:function(i){return this._pendingStop=1,this._pendingStopValue=i,this.parent},stopAfterRepeat:function(i){return i===void 0&&(i=1),this.repeatCounter!==-1&&i>this.repeatCounter&&(i=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=i,this.parent},stopOnFrame:function(i){return this._pendingStop=3,this._pendingStopValue=i,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(i,l){var s=this.currentAnim;if(!(!this.isPlaying||!s||s.paused)){if(this.accumulator+=l*this.timeScale,this._pendingStop===1&&(this._pendingStopValue-=l,this._pendingStopValue<=0))return this.stop();if(!this.hasStarted)this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart());else if(this.accumulator>=this.nextTick&&(this.forward?s.nextFrame(this):s.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var h=0;do this.forward?s.nextFrame(this):s.previousFrame(this),h++;while(this.isPlaying&&this.accumulator>this.nextTick&&h<60)}}},setCurrentFrame:function(i){var l=this.parent;return this.currentFrame=i,l.texture=i.frame.texture,l.frame=i.frame,l.isCropped&&l.frame.updateCropUVs(l._crop,l.flipX,l.flipY),i.setAlpha&&(l.alpha=i.alpha),l.setSizeToFrame(),l._originComponent&&(i.frame.customPivot?l.setOrigin(i.frame.pivotX,i.frame.pivotY):l.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(o.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===i&&this.stop()),l},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(i){return this.anims?this.anims.get(i):null},exists:function(i){return this.anims?this.anims.has(i):!1},create:function(i){var l=i.key,s=!1;return l&&(s=this.get(l),s||(s=new r(this,l,i),this.anims||(this.anims=new d),this.anims.set(l,s))),s},generateFrameNames:function(i,l){return this.animationManager.generateFrameNames(i,l)},generateFrameNumbers:function(i,l){return this.animationManager.generateFrameNumbers(i,l)},remove:function(i){var l=this.get(i);return l&&(this.currentAnim===l&&this.stop(),this.anims.delete(i)),l},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}}});p.exports=e},function(p,E,t){var n={};p.exports=n;var d=t(166);(function(){n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(a,o){for(var r=o*o*o,e=0;e0&&i.motion=i.sleepThreshold&&n.set(i,!0)):i.sleepCounter>0&&(i.sleepCounter-=1)}},n.afterCollisions=function(a,o){for(var r=o*o*o,e=0;en._motionWakeThreshold*r&&n.set(f,!1)}}}},n.set=function(a,o){var r=a.isSleeping;o?(a.isSleeping=!0,a.sleepCounter=a.sleepThreshold,a.positionImpulse.x=0,a.positionImpulse.y=0,a.positionPrev.x=a.position.x,a.positionPrev.y=a.position.y,a.anglePrev=a.angle,a.speed=0,a.angularSpeed=0,a.motion=0,r||d.trigger(a,"sleepStart")):(a.isSleeping=!1,a.sleepCounter=0,r&&d.trigger(a,"sleepEnd"))}})()},function(p,E,t){var n={};p.exports=n;var d=t(32);(function(){n.on=function(a,o,r){for(var e=o.split(" "),i,l=0;l0){r||(r={}),e=o.split(" ");for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(175),d=t(92),a=t(74),o={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(r){r===void 0&&(r=d.MULTI_PIPELINE);var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){var l=i.get(r);if(l)return this.defaultPipeline=l,this.pipeline=l,!0}return!1},setPipeline:function(r,e,i){var l=this.scene.sys.renderer;if(!l)return this;var s=l.pipelines;if(s){var h=s.get(r);h&&(this.pipeline=h),e&&(this.pipelineData=i?n(e):e)}return this},setPostPipeline:function(r,e,i){var l=this.scene.sys.renderer;if(!l)return this;var s=l.pipelines;if(s){Array.isArray(r)||(r=[r]);for(var h=0;h0,this},setPipelineData:function(r,e){var i=this.pipelineData;return e===void 0?delete i[r]:i[r]=e,this},getPostPipeline:function(r){for(var e=this.postPipelines,i=[],l=0;l=0;i--){var l=e[i];(typeof r=="string"&&l.name===r||typeof r!="string"&&l instanceof r)&&(l.destroy(),a(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={DEFAULT:0,LINEAR:0,NEAREST:1};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o,r){return r===void 0&&(r=new n),r.x=a.x+a.radius*Math.cos(o),r.y=a.y+a.radius*Math.sin(o),r};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o){o===void 0&&(o=new n);var r=2*Math.PI*Math.random(),e=Math.random()+Math.random(),i=e>1?2-e:e,l=i*Math.cos(r),s=i*Math.sin(r);return o.x=a.x+l*a.radius,o.y=a.y+s*a.radius,o};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(130),d=t(4),a=function(o,r,e){if(e===void 0&&(e=new d),r<=0||r>=1)return e.x=o.x,e.y=o.y,e;var i=n(o)*r;return r>.5?(i-=o.width+o.height,i<=o.width?(e.x=o.right-i,e.y=o.bottom):(e.x=o.x,e.y=o.bottom-(i-o.width))):i<=o.width?(e.x=o.x+i,e.y=o.y):(e.x=o.right,e.y=o.y+(i-o.width)),e};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(67),d=t(4),a=function(o,r,e,i){i===void 0&&(i=[]),!r&&e>0&&(r=n(o)/e);for(var l=o.x1,s=o.y1,h=o.x2,f=o.y2,v=0;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o){o===void 0&&(o=new n);var r=Math.random();return o.x=a.x1+r*(a.x2-a.x1),o.y=a.y1+r*(a.y2-a.y1),o};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o){return o===void 0&&(o=new n),o.x=a.x+Math.random()*a.width,o.y=a.y+Math.random()*a.height,o};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d,a,o;if(typeof n!="object"||n===null)return n;d=Array.isArray(n)?[]:{};for(o in n)a=n[o],d[o]=t(a);return d};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d={name:n.name,type:n.type,x:n.x,y:n.y,depth:n.depth,scale:{x:n.scaleX,y:n.scaleY},origin:{x:n.originX,y:n.originY},flipX:n.flipX,flipY:n.flipY,rotation:n.rotation,alpha:n.alpha,visible:n.visible,blendMode:n.blendMode,textureKey:"",frameKey:"",data:{}};return n.texture&&(d.textureKey=n.texture.key,d.frameKey=n.frame.name),d};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(3),d=function(a,o,r,e,i,l,s,h){h===void 0&&(h=new n);var f=Math.sin(i),v=Math.cos(i),u=v*l,c=f*l,x=-f*s,g=v*s,m=1/(u*g+x*-c);return h.x=g*m*a+-x*m*o+(e*x-r*g)*m,h.y=u*m*o+-c*m*a+(-e*u+r*c)*m,h};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){d===void 0&&(d=1);for(var a=null,o=0;o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){d===void 0&&(d=1);for(var a=null,o=0;o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o){o===void 0&&(o=new n);var r=Math.random()*Math.PI*2,e=Math.sqrt(Math.random());return o.x=a.x+e*Math.cos(r)*a.width/2,o.y=a.y+e*Math.sin(r)*a.height/2,o};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o){o===void 0&&(o=new n);var r=a.x2-a.x1,e=a.y2-a.y1,i=a.x3-a.x1,l=a.y3-a.y1,s=Math.random(),h=Math.random();return s+h>=1&&(s=1-s,h=1-h),o.x=a.x1+(r*s+i*h),o.y=a.y1+(e*s+l*h),o};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r){var e=o+Math.atan2(n.y-a,n.x-d);return n.x=d+r*Math.cos(e),n.y=a+r*Math.sin(e),n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return n=Math.max(0,Math.min(1,(n-d)/(a-d))),n*n*n*(n*(n*6-15)+10)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return n<=d?0:n>=a?1:(n=(n-d)/(a-d),n*n*(3-2*n))};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(18),d=t(0),a=t(132),o=t(318),r=t(319),e=t(6),i=t(320),l=new d({initialize:function(h,f,v){this.manager=h,this.key=f,this.type="frame",this.frames=this.getFrames(h.textureManager,e(v,"frames",[]),e(v,"defaultTextureKey",null),e(v,"sortFrames",!0)),this.frameRate=e(v,"frameRate",null),this.duration=e(v,"duration",null),this.msPerFrame,this.skipMissedFrames=e(v,"skipMissedFrames",!0),this.delay=e(v,"delay",0),this.repeat=e(v,"repeat",0),this.repeatDelay=e(v,"repeatDelay",0),this.yoyo=e(v,"yoyo",!1),this.showOnStart=e(v,"showOnStart",!1),this.hideOnComplete=e(v,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(a.PAUSE_ALL,this.pause,this),this.manager.on(a.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(s,h,f,v){f===null&&v===null?(s.frameRate=24,s.duration=24/h*1e3):f&&v===null?(s.duration=f,s.frameRate=h/(f/1e3)):(s.frameRate=v,s.duration=h/v*1e3),s.msPerFrame=1e3/s.frameRate},addFrame:function(s){return this.addFrameAt(this.frames.length,s)},addFrameAt:function(s,h){var f=this.getFrames(this.manager.textureManager,h);if(f.length>0){if(s===0)this.frames=f.concat(this.frames);else if(s===this.frames.length)this.frames=this.frames.concat(f);else{var v=this.frames.slice(0,s),u=this.frames.slice(s);this.frames=v.concat(f,u)}this.updateFrameSequence()}return this},checkFrame:function(s){return s>=0&&s0){x.isLast=!0,x.nextFrame=u[0],u[0].prevFrame=x;var L=1/(u.length-1);for(m=0;m0?s.inReverse&&s.forward?s.forward=!1:this.repeatAnimation(s):s.complete():this.updateAndGetNextTick(s,h.nextFrame)},handleYoyoFrame:function(s,h){if(h||(h=!1),s.inReverse===!h&&s.repeatCounter>0){(s.repeatDelay===0||s.pendingRepeat)&&(s.forward=h),this.repeatAnimation(s);return}if(s.inReverse!==h&&s.repeatCounter===0){s.complete();return}s.forward=h;var f=h?s.currentFrame.nextFrame:s.currentFrame.prevFrame;this.updateAndGetNextTick(s,f)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(s){var h=s.currentFrame;h.isFirst?s.yoyo?this.handleYoyoFrame(s,!0):s.repeatCounter>0?s.inReverse&&!s.forward?this.repeatAnimation(s):(s.forward=!0,this.repeatAnimation(s)):s.complete():this.updateAndGetNextTick(s,h.prevFrame)},updateAndGetNextTick:function(s,h){s.setCurrentFrame(h),this.getNextTick(s)},removeFrame:function(s){var h=this.frames.indexOf(s);return h!==-1&&this.removeFrameAt(h),this},removeFrameAt:function(s){return this.frames.splice(s,1),this.updateFrameSequence(),this},repeatAnimation:function(s){if(s._pendingStop===2){if(s._pendingStopValue===0)return s.stop();s._pendingStopValue--}s.repeatDelay>0&&!s.pendingRepeat?(s.pendingRepeat=!0,s.accumulator-=s.nextTick,s.nextTick+=s.repeatDelay):(s.repeatCounter--,s.forward?s.setCurrentFrame(s.currentFrame.nextFrame):s.setCurrentFrame(s.currentFrame.prevFrame),s.isPlaying&&(this.getNextTick(s),s.handleRepeat()))},toJSON:function(){var s={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,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(h){s.frames.push(h.toJSON())}),s},updateFrameSequence:function(){for(var s=this.frames.length,h=1/(s-1),f,v=0;v1?(f.isLast=!0,f.prevFrame=this.frames[s-2],f.nextFrame=this.frames[0]):s>1&&(f.prevFrame=this.frames[v-1],f.nextFrame=this.frames[v+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(a.PAUSE_ALL,this.pause,this),this.manager.off(a.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){d===void 0&&(d=0),a===void 0&&(a=" "),o===void 0&&(o=3),n=n.toString();var r=0;if(d+1>=n.length)switch(o){case 1:n=new Array(d+1-n.length).join(a)+n;break;case 3:var e=Math.ceil((r=d-n.length)/2),i=r-e;n=new Array(i+1).join(a)+n+new Array(e+1).join(a);break;default:n=n+new Array(d+1-n.length).join(a);break}return n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(327),d=t(189),a=t(331),o=t(332),r=function(e){var i=typeof e;switch(i){case"string":return e.substr(0,3).toLowerCase()==="rgb"?o(e):n(e);case"number":return d(e);case"object":return a(e)}};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(103);function d(o,r,e,i){var l=(o+r*6)%6,s=Math.min(l,4-l,1);return Math.round(255*(i-i*e*Math.max(0,s)))}var a=function(o,r,e,i){r===void 0&&(r=1),e===void 0&&(e=1);var l=d(5,o,r,e),s=d(3,o,r,e),h=d(1,o,r,e);return i?i.setTo?i.setTo(l,s,h,i.alpha,!1):(i.r=l,i.g=s,i.b=h,i.color=n(l,s,h),i):{r:l,g:s,b:h,color:n(l,s,h)}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(38),d=t(330),a=function(o){var r=d(o);return new n(r.r,r.g,r.b,r.a)};p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return n.x=d-n.width/2,n.y=a-n.height/2,n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(105),d=t(136),a=t(31),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};function r(){var i=new ArrayBuffer(4),l=new Uint8Array(i),s=new Uint32Array(i);return l[0]=161,l[1]=178,l[2]=195,l[3]=212,s[0]===3569595041?!0:s[0]===2712847316?!1:null}function e(){if(typeof importScripts=="function")return o;o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch{o.localStorage=!1}o.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,o.fileSystem=!!window.requestFileSystem;var i=!1,l=function(){if(window.WebGLRenderingContext)try{var s=a.createWebGL(this),h=s.getContext("webgl")||s.getContext("experimental-webgl"),f=a.create2D(this),v=f.getContext("2d"),u=v.createImageData(1,1);return i=u.data instanceof Uint8ClampedArray,a.remove(s),a.remove(f),!!h}catch{return!1}return!1};return o.webGL=l(),o.worker=!!window.Worker,o.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,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,d.firefox&&d.firefoxVersion<21&&(o.getUserMedia=!1),!n.iOS&&(d.ie||d.firefox||d.chrome)&&(o.canvasBitBltShift=!0),(d.safari||d.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint32Array!="undefined"&&(o.littleEndian=r()),o.support32bit=typeof ArrayBuffer!="undefined"&&typeof Uint8ClampedArray!="undefined"&&typeof Int32Array!="undefined"&&o.littleEndian!==null&&i,o}p.exports=e()},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t="",n=function(){var d=function(e){for(var i=["i","webkitI","msI","mozI","oI"],l=0;l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(14),d=t(17),a={Angle:t(812),Distance:t(821),Easing:t(826),Fuzzy:t(827),Interpolation:t(830),Pow2:t(835),Snap:t(837),RandomDataGenerator:t(839),Average:t(840),Bernstein:t(356),Between:t(195),CatmullRom:t(194),CeilTo:t(841),Clamp:t(18),DegToRad:t(36),Difference:t(842),Euler:t(843),Factorial:t(357),FloatBetween:t(137),FloorTo:t(844),FromPercent:t(98),GetSpeed:t(845),IsEven:t(846),IsEvenStrict:t(847),Linear:t(135),MaxAdd:t(848),Median:t(849),MinSub:t(850),Percent:t(851),RadToDeg:t(196),RandomXY:t(852),RandomXYZ:t(853),RandomXYZW:t(854),Rotate:t(362),RotateAround:t(308),RotateAroundDistance:t(182),RotateTo:t(855),RoundAwayFromZero:t(363),RoundTo:t(856),SinCosTableGenerator:t(857),SmootherStep:t(183),SmoothStep:t(184),ToXY:t(858),TransformXY:t(177),Within:t(859),Wrap:t(68),Vector2:t(3),Vector3:t(39),Vector4:t(140),Matrix3:t(364),Matrix4:t(69),Quaternion:t(365),RotateVec3:t(860)};a=d(!1,a,n),p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r){var e=(o-d)*.5,i=(r-a)*.5,l=n*n,s=n*l;return(2*a-2*o+e+i)*s+(-3*a+3*o-2*e-i)*l+e*n+a};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return Math.floor(Math.random()*(d-n+1)+n)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(14),d=function(a){return a*n.RAD_TO_DEG};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};p.exports=n},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(){this._matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.alpha=1,this._dirty=!0,this._data},set:function(a){return this._matrix=a,this._dirty=!0,this},reset:function(){var a=this._matrix;return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=0,a[6]=1,a[7]=0,a[8]=0,a[9]=0,a[10]=0,a[11]=0,a[12]=1,a[13]=0,a[14]=0,a[15]=0,a[16]=0,a[17]=0,a[18]=1,a[19]=0,this._dirty=!0,this},getData:function(){if(this._dirty){var a=new Float32Array(this._matrix);a[4]/=255,a[9]/=255,a[14]/=255,a[19]/=255,this._data=a,this._dirty=!1}return this._data},brightness:function(a,o){a===void 0&&(a=0),o===void 0&&(o=!1);var r=a;return this.multiply([r,0,0,0,0,0,r,0,0,0,0,0,r,0,0,0,0,0,1,0],o)},saturate:function(a,o){a===void 0&&(a=0),o===void 0&&(o=!1);var r=a*2/3+1,e=(r-1)*-.5;return this.multiply([r,e,e,0,0,e,r,e,0,0,e,e,r,0,0,0,0,0,1,0],o)},desaturate:function(a){return a===void 0&&(a=!1),this.saturate(-1,a)},hue:function(a,o){a===void 0&&(a=0),o===void 0&&(o=!1),a=a/180*Math.PI;var r=Math.cos(a),e=Math.sin(a),i=.213,l=.715,s=.072;return this.multiply([i+r*(1-i)+e*-i,l+r*-l+e*-l,s+r*-s+e*(1-s),0,0,i+r*-i+e*.143,l+r*(1-l)+e*.14,s+r*-s+e*-.283,0,0,i+r*-i+e*-(1-i),l+r*-l+e*l,s+r*(1-s)+e*s,0,0,0,0,0,1,0],o)},grayscale:function(a,o){return a===void 0&&(a=1),o===void 0&&(o=!1),this.saturate(-a,o)},blackWhite:function(a){return a===void 0&&(a=!1),this.multiply([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],a)},contrast:function(a,o){a===void 0&&(a=0),o===void 0&&(o=!1);var r=a+1,e=-.5*(r-1);return this.multiply([r,0,0,0,e,0,r,0,0,e,0,0,r,0,e,0,0,0,1,0],o)},negative:function(a){return a===void 0&&(a=!1),this.multiply([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],a)},desaturateLuminance:function(a){return a===void 0&&(a=!1),this.multiply([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],a)},sepia:function(a){return a===void 0&&(a=!1),this.multiply([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],a)},night:function(a,o){return a===void 0&&(a=.1),o===void 0&&(o=!1),this.multiply([a*-2,-a,0,0,0,-a,0,a,0,0,0,a,a*2,0,0,0,0,0,1,0],o)},lsd:function(a){return a===void 0&&(a=!1),this.multiply([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],a)},brown:function(a){return a===void 0&&(a=!1),this.multiply([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],a)},vintagePinhole:function(a){return a===void 0&&(a=!1),this.multiply([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],a)},kodachrome:function(a){return a===void 0&&(a=!1),this.multiply([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],a)},technicolor:function(a){return a===void 0&&(a=!1),this.multiply([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],a)},polaroid:function(a){return a===void 0&&(a=!1),this.multiply([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],a)},shiftToBGR:function(a){return a===void 0&&(a=!1),this.multiply([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],a)},multiply:function(a,o){o||this.reset();for(var r=this._matrix,e=[],i=0;i<20;i++)e[i]=r[i];return r[0]=e[0]*a[0]+e[1]*a[5]+e[2]*a[10]+e[3]*a[15],r[1]=e[0]*a[1]+e[1]*a[6]+e[2]*a[11]+e[3]*a[16],r[2]=e[0]*a[2]+e[1]*a[7]+e[2]*a[12]+e[3]*a[17],r[3]=e[0]*a[3]+e[1]*a[8]+e[2]*a[13]+e[3]*a[18],r[4]=e[0]*a[4]+e[1]*a[9]+e[2]*a[14]+e[3]*a[19]+e[4],r[5]=e[5]*a[0]+e[6]*a[5]+e[7]*a[10]+e[8]*a[15],r[6]=e[5]*a[1]+e[6]*a[6]+e[7]*a[11]+e[8]*a[16],r[7]=e[5]*a[2]+e[6]*a[7]+e[7]*a[12]+e[8]*a[17],r[8]=e[5]*a[3]+e[6]*a[8]+e[7]*a[13]+e[8]*a[18],r[9]=e[5]*a[4]+e[6]*a[9]+e[7]*a[14]+e[8]*a[19]+e[9],r[10]=e[10]*a[0]+e[11]*a[5]+e[12]*a[10]+e[13]*a[15],r[11]=e[10]*a[1]+e[11]*a[6]+e[12]*a[11]+e[13]*a[16],r[12]=e[10]*a[2]+e[11]*a[7]+e[12]*a[12]+e[13]*a[17],r[13]=e[10]*a[3]+e[11]*a[8]+e[12]*a[13]+e[13]*a[18],r[14]=e[10]*a[4]+e[11]*a[9]+e[12]*a[14]+e[13]*a[19]+e[14],r[15]=e[15]*a[0]+e[16]*a[5]+e[17]*a[10]+e[18]*a[15],r[16]=e[15]*a[1]+e[16]*a[6]+e[17]*a[11]+e[18]*a[16],r[17]=e[15]*a[2]+e[16]*a[7]+e[17]*a[12]+e[18]*a[17],r[18]=e[15]*a[3]+e[16]*a[8]+e[17]*a[13]+e[18]*a[18],r[19]=e[15]*a[4]+e[16]*a[9]+e[17]*a[14]+e[18]*a[19]+e[19],this._dirty=!0,this}});p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10),d=t(14),a=function(o,r){if(r===void 0&&(r=new n),o.length===0)return r;for(var e=Number.MAX_VALUE,i=Number.MAX_VALUE,l=d.MIN_SAFE_INTEGER,s=d.MIN_SAFE_INTEGER,h,f,v,u=0;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(1),a=new n({initialize:function(r,e,i){this._rgb=[0,0,0],this.onChangeCallback=d,this.dirty=!1,this.set(r,e,i)},set:function(o,r,e){return o===void 0&&(o=0),r===void 0&&(r=0),e===void 0&&(e=0),this._rgb=[o,r,e],this.onChange(),this},equals:function(o,r,e){var i=this._rgb;return i.r===o&&i.g===r&&i.b===e},onChange:function(){this.dirty=!0;var o=this._rgb;this.onChangeCallback.call(this,o[0],o[1],o[2])},r:{get:function(){return this._rgb[0]},set:function(o){this._rgb[0]=o,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(o){this._rgb[1]=o,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(o){this._rgb[2]=o,this.onChange()}},destroy:function(){this.onChangeCallback=null}});p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n={CENTER:t(403),ORIENTATION:t(404),SCALE_MODE:t(405),ZOOM:t(406)};p.exports=n},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){n.parentNode&&n.parentNode.removeChild(n)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(144),a=t(197),o=t(20),r=t(419),e=t(420),i=t(33),l=t(1),s=t(421),h=new n({initialize:function(v,u){this.scene=v,this.game,this.renderer,this.config=u,this.settings=s.create(u),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(f){this.settings.status=d.INIT,this.sceneUpdate=l,this.game=f,this.renderer=f.renderer,this.canvas=f.canvas,this.context=f.context;var v=f.plugins;this.plugins=v,v.addToScene(this,a.Global,[a.CoreScene,e(this),r(this)]),this.events.emit(o.BOOT,this),this.settings.isBooted=!0},step:function(f,v){var u=this.events;u.emit(o.PRE_UPDATE,f,v),u.emit(o.UPDATE,f,v),this.sceneUpdate.call(this.scene,f,v),u.emit(o.POST_UPDATE,f,v)},render:function(f){var v=this.displayList;v.depthSort(),this.events.emit(o.PRE_RENDER,f),this.cameras.render(f,v),this.events.emit(o.RENDER,f)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(f){var v=this.events,u=this.settings;return this.settings.active&&(u.status=d.PAUSED,u.active=!1,v.emit(o.PAUSE,this,f)),this},resume:function(f){var v=this.events,u=this.settings;return this.settings.active||(u.status=d.RUNNING,u.active=!0,v.emit(o.RESUME,this,f)),this},sleep:function(f){var v=this.events,u=this.settings;return u.status=d.SLEEPING,u.active=!1,u.visible=!1,v.emit(o.SLEEP,this,f),this},wake:function(f){var v=this.events,u=this.settings;return u.status=d.RUNNING,u.active=!0,u.visible=!0,v.emit(o.WAKE,this,f),u.isTransition&&v.emit(o.TRANSITION_WAKE,u.transitionFrom,u.transitionDuration),this},getData:function(){return this.settings.data},isSleeping:function(){return this.settings.status===d.SLEEPING},isActive:function(){return this.settings.status===d.RUNNING},isPaused:function(){return this.settings.status===d.PAUSED},isTransitioning:function(){return this.settings.isTransition||this.scenePlugin._target!==null},isTransitionOut:function(){return this.scenePlugin._target!==null&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(f){return this.settings.visible=f,this},setActive:function(f,v){return f?this.resume(v):this.pause(v)},start:function(f){var v=this.events,u=this.settings;f&&(u.data=f),u.status=d.START,u.active=!0,u.visible=!0,v.emit(o.START,this),v.emit(o.READY,this,f)},shutdown:function(f){var v=this.events,u=this.settings;v.off(o.TRANSITION_INIT),v.off(o.TRANSITION_START),v.off(o.TRANSITION_COMPLETE),v.off(o.TRANSITION_OUT),u.status=d.SHUTDOWN,u.active=!1,u.visible=!1,this.renderer===i.WEBGL&&this.renderer.resetTextures(!0),v.emit(o.SHUTDOWN,this,f)},destroy:function(){var f=this.events,v=this.settings;v.status=d.DESTROYED,v.active=!1,v.visible=!1,f.emit(o.DESTROY,this),f.removeAllListeners();for(var u=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],c=0;c + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n&&n[0].toUpperCase()+n.slice(1)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(33),d=t(0),a=t(109),o=t(424),r="Texture.frame missing: ",e=new d({initialize:function(l,s,h,f,v){Array.isArray(h)||(h=[h]),this.manager=l,this.key=s,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var u=0;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(78),d=function(a,o,r,e,i){e===void 0&&(e=0),i===void 0&&(i=a.length);var l=[];if(n(a,e,i))for(var s=e;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Matrix:t(1013),Add:t(1021),AddAt:t(1022),BringToTop:t(1023),CountAllMatching:t(1024),Each:t(1025),EachInRange:t(1026),FindClosestInSorted:t(318),GetAll:t(207),GetFirst:t(428),GetRandom:t(210),MoveDown:t(1027),MoveTo:t(1028),MoveUp:t(1029),MoveAbove:t(1030),MoveBelow:t(1031),NumberArray:t(322),NumberArrayStep:t(1032),QuickSelect:t(436),Range:t(437),Remove:t(93),RemoveAt:t(1033),RemoveBetween:t(1034),RemoveRandomElement:t(1035),Replace:t(1036),RotateLeft:t(178),RotateRight:t(179),SafeRange:t(78),SendToBack:t(1037),SetAll:t(1038),Shuffle:t(131),SortByDigits:t(320),SpliceOne:t(74),StableSort:t(79),Swap:t(1039)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){if(!Array.isArray(n)||n.length<2||!Array.isArray(n[0]))return!1;for(var d=n[0].length,a=1;a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){d===void 0&&(d=0),a===void 0&&(a=n.length);var o=d+Math.floor(Math.random()*a);return n[o]===void 0?null:n[o]};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(9),a=t(438),o=new n({Extends:d,initialize:function(){d.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},add:function(r){return this._pending.push(r),this._toProcess++,r},remove:function(r){return this._destroy.push(r),this._toProcess++,r},removeAll:function(){for(var r=this._active,e=this._destroy,i=r.length;i--;)e.push(r[i]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var r=this._destroy,e=this._active,i,l;for(i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function t(d,a){return parseInt(d.getAttribute(a),10)}var n=function(d,a,o,r,e){o===void 0&&(o=0),r===void 0&&(r=0);var i=a.cutX,l=a.cutY,s=a.source.width,h=a.source.height,f=a.sourceIndex,v={},u=d.getElementsByTagName("info")[0],c=d.getElementsByTagName("common")[0];v.font=u.getAttribute("face"),v.size=t(u,"size"),v.lineHeight=t(c,"lineHeight")+r,v.chars={};var x=d.getElementsByTagName("char"),g=a!==void 0&&a.trimmed;if(g)var m=a.height,y=a.width;for(var T=0;T + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1049),d=t(440),a=t(0),o=t(11),r=t(109),e=t(15),i=t(110),l=new a({Extends:e,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(h,f,v,u,c){e.call(this,h,"Blitter"),this.setTexture(u,c),this.setPosition(f,v),this.initPipeline(),this.children=new i,this.renderList=[],this.dirty=!1},create:function(s,h,f,v,u){v===void 0&&(v=!0),u===void 0&&(u=this.children.length),f===void 0?f=this.frame:f instanceof r||(f=this.texture.get(f));var c=new d(this,s,h,f,v);return this.children.addAt(c,u,!1),this.dirty=!0,c},createFromCallback:function(s,h,f,v){for(var u=this.createMultiple(h,f,v),c=0;c0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});p.exports=l},function(p,E,t){/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(208),d=t(35),a=t(0),o=t(11),r=t(75),e=t(15),i=t(10),l=t(1052),s=t(441),h=t(3),f=new a({Extends:e,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,l],initialize:function(u,c,x,g){e.call(this,u,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=u.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(c,x),this.clearAlpha(),this.setBlendMode(d.SKIP_CHECK),g&&this.add(g)},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this.width*.5}},displayOriginY:{get:function(){return this.height*.5}},setExclusive:function(v){return v===void 0&&(v=!0),this.exclusive=v,this},getBounds:function(v){if(v===void 0&&(v=new i),v.setTo(this.x,this.y,0,0),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix(),c=u.transformPoint(this.x,this.y);v.setTo(c.x,c.y,0,0)}if(this.list.length>0){var x=this.list,g=new i,m=!1;v.setEmpty();for(var y=0;y-1},setAll:function(v,u,c,x){return n.SetAll(this.list,v,u,c,x),this},each:function(v,u){var c=[null],x,g=this.list.slice(),m=g.length;for(x=2;x0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});p.exports=f},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(148),d=t(0),a=t(1057),o=new d({Extends:n,Mixins:[a],initialize:function(e,i,l,s,h,f,v){n.call(this,e,i,l,s,h,f,v),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(r,e){return this.cropWidth=r,this.cropHeight=e,this},setDisplayCallback:function(r){return this.displayCallback=r,this},setScrollX:function(r){return this.scrollX=r,this},setScrollY:function(r){return this.scrollY=r,this}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(133),d=t(0),a=t(217),o=t(303),r=t(304),e=t(305),i=t(309),l=t(167),s=t(312),h=t(313),f=t(314),v=t(111),u=t(15),c=t(2),x=t(6),g=t(14),m=t(1063),y=new d({Extends:u,Mixins:[o,r,e,i,l,h,f,s,m],initialize:function(S,C){var P=x(C,"x",0),A=x(C,"y",0);u.call(this,S,"Graphics"),this.setPosition(P,A),this.initPipeline(),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.setDefaultStyles(C)},setDefaultStyles:function(T){return x(T,"lineStyle",null)&&(this.defaultStrokeWidth=x(T,"lineStyle.width",1),this.defaultStrokeColor=x(T,"lineStyle.color",16777215),this.defaultStrokeAlpha=x(T,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),x(T,"fillStyle",null)&&(this.defaultFillColor=x(T,"fillStyle.color",16777215),this.defaultFillAlpha=x(T,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(T,S,C){return C===void 0&&(C=1),this.commandBuffer.push(a.LINE_STYLE,T,S,C),this._lineWidth=T,this},fillStyle:function(T,S){return S===void 0&&(S=1),this.commandBuffer.push(a.FILL_STYLE,T,S),this},fillGradientStyle:function(T,S,C,P,A,M,L,F){return A===void 0&&(A=1),M===void 0&&(M=A),L===void 0&&(L=A),F===void 0&&(F=A),this.commandBuffer.push(a.GRADIENT_FILL_STYLE,A,M,L,F,T,S,C,P),this},lineGradientStyle:function(T,S,C,P,A,M){return M===void 0&&(M=1),this.commandBuffer.push(a.GRADIENT_LINE_STYLE,T,M,S,C,P,A),this},beginPath:function(){return this.commandBuffer.push(a.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(a.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(a.FILL_PATH),this},fill:function(){return this.commandBuffer.push(a.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(a.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(a.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,S,C){return this.beginPath(),this.arc(T,S,C,0,g.PI2),this.fillPath(),this},strokeCircle:function(T,S,C){return this.beginPath(),this.arc(T,S,C,0,g.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,S,C,P){return this.commandBuffer.push(a.FILL_RECT,T,S,C,P),this},strokeRect:function(T,S,C,P){var A=this._lineWidth/2,M=T-A,L=T+A;return this.beginPath(),this.moveTo(T,S),this.lineTo(T,S+P),this.strokePath(),this.beginPath(),this.moveTo(T+C,S),this.lineTo(T+C,S+P),this.strokePath(),this.beginPath(),this.moveTo(M,S),this.lineTo(L+C,S),this.strokePath(),this.beginPath(),this.moveTo(M,S+P),this.lineTo(L+C,S+P),this.strokePath(),this},fillRoundedRect:function(T,S,C,P,A){A===void 0&&(A=20);var M=A,L=A,F=A,B=A;return typeof A!="number"&&(M=c(A,"tl",20),L=c(A,"tr",20),F=c(A,"bl",20),B=c(A,"br",20)),this.beginPath(),this.moveTo(T+M,S),this.lineTo(T+C-L,S),this.arc(T+C-L,S+L,L,-g.TAU,0),this.lineTo(T+C,S+P-B),this.arc(T+C-B,S+P-B,B,0,g.TAU),this.lineTo(T+F,S+P),this.arc(T+F,S+P-F,F,g.TAU,Math.PI),this.lineTo(T,S+M),this.arc(T+M,S+M,M,-Math.PI,-g.TAU),this.fillPath(),this},strokeRoundedRect:function(T,S,C,P,A){A===void 0&&(A=20);var M=A,L=A,F=A,B=A;return typeof A!="number"&&(M=c(A,"tl",20),L=c(A,"tr",20),F=c(A,"bl",20),B=c(A,"br",20)),this.beginPath(),this.moveTo(T+M,S),this.lineTo(T+C-L,S),this.moveTo(T+C-L,S),this.arc(T+C-L,S+L,L,-g.TAU,0),this.lineTo(T+C,S+P-B),this.moveTo(T+C,S+P-B),this.arc(T+C-B,S+P-B,B,0,g.TAU),this.lineTo(T+F,S+P),this.moveTo(T+F,S+P),this.arc(T+F,S+P-F,F,g.TAU,Math.PI),this.lineTo(T,S+M),this.moveTo(T,S+M),this.arc(T+M,S+M,M,-Math.PI,-g.TAU),this.strokePath(),this},fillPointShape:function(T,S){return this.fillPoint(T.x,T.y,S)},fillPoint:function(T,S,C){return!C||C<1?C=1:(T-=C/2,S-=C/2),this.commandBuffer.push(a.FILL_RECT,T,S,C,C),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,S,C,P,A,M){return this.commandBuffer.push(a.FILL_TRIANGLE,T,S,C,P,A,M),this},strokeTriangle:function(T,S,C,P,A,M){return this.commandBuffer.push(a.STROKE_TRIANGLE,T,S,C,P,A,M),this},strokeLineShape:function(T){return this.lineBetween(T.x1,T.y1,T.x2,T.y2)},lineBetween:function(T,S,C,P){return this.beginPath(),this.moveTo(T,S),this.lineTo(C,P),this.strokePath(),this},lineTo:function(T,S){return this.commandBuffer.push(a.LINE_TO,T,S),this},moveTo:function(T,S){return this.commandBuffer.push(a.MOVE_TO,T,S),this},strokePoints:function(T,S,C,P){S===void 0&&(S=!1),C===void 0&&(C=!1),P===void 0&&(P=T.length),this.beginPath(),this.moveTo(T[0].x,T[0].y);for(var A=1;A-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(T,S,C){var P=this.scene.sys,A=P.game.renderer;S===void 0&&(S=P.scale.width),C===void 0&&(C=P.scale.height),y.TargetCamera.setScene(this.scene),y.TargetCamera.setViewport(0,0,S,C),y.TargetCamera.scrollX=this.x,y.TargetCamera.scrollY=this.y;var M,L;if(typeof T=="string")if(P.textures.exists(T)){M=P.textures.get(T);var F=M.getSourceImage();F instanceof HTMLCanvasElement&&(L=F.getContext("2d"))}else M=P.textures.createCanvas(T,S,C),L=M.getSourceImage().getContext("2d");else T instanceof HTMLCanvasElement&&(L=T.getContext("2d"));return L&&(this.renderCanvas(A,this,y.TargetCamera,null,L,!1),M&&M.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});y.TargetCamera=new n,p.exports=y},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o,r){r===void 0&&(r=new n);var e=a.width/2,i=a.height/2;return r.x=a.x+e*Math.cos(o),r.y=a.y+i*Math.sin(o),r};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(35),d=t(0),a=t(11),o=t(176),r=t(101),e=t(9),i=t(75),l=t(110),s=t(1071),h=t(20),f=t(79),v=new d({Extends:l,Mixins:[a.AlphaSingle,a.BlendMode,a.Depth,a.Mask,a.Pipeline,a.Visible,e,s],initialize:function(c,x){l.call(this,c),e.call(this),this.scene=c,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=c.sys,this.events=c.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPipeline(),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),x&&this.add(x),c.sys.queueDepthSort()},setActive:function(u){return this.active=u,this},setName:function(u){return this.name=u,this},setState:function(u){return this.state=u,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(u,c){return this.data||(this.data=new r(this)),this.data.set(u,c),this},incData:function(u,c){return this.data||(this.data=new r(this)),this.data.inc(u,c),this},toggleData:function(u){return this.data||(this.data=new r(this)),this.data.toggle(u),this},getData:function(u){return this.data||(this.data=new r(this)),this.data.get(u)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return o(this)},willRender:function(u){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&u.id)},getIndexList:function(){for(var u=this,c=this.parentContainer,x=[];c&&(x.unshift(c.getIndex(u)),u=c,c.parentContainer);)c=c.parentContainer;return x.unshift(this.displayList.getIndex(u)),x},addChildCallback:function(u){u.displayList&&u.displayList!==this&&u.removeFromDisplayList(),u.displayList||(this.queueDepthSort(),u.displayList=this,u.emit(i.ADDED_TO_SCENE,u,this.scene),this.events.emit(h.ADDED_TO_SCENE,u,this.scene))},removeChildCallback:function(u){this.queueDepthSort(),u.displayList=null,u.emit(i.REMOVED_FROM_SCENE,u,this.scene),this.events.emit(h.REMOVED_FROM_SCENE,u,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(u,c){return u._depth-c._depth},getChildren:function(){return this.list},destroy:function(){if(!(!this.scene||this.ignoreDestroy)){this.emit(i.DESTROY,this);for(var u=this.list.length;u--;)this.list[u].destroy();this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),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}}});p.exports=v},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(11),a=t(15),o=t(450),r=t(110),e=t(452),i=t(1075),l=new n({Extends:a,Mixins:[d.Depth,d.Mask,d.Pipeline,d.Transform,d.Visible,i],initialize:function(h,f,v,u){if(a.call(this,h,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],v!==null&&(typeof v=="object"||Array.isArray(v))&&(u=v,v=null),this.setTexture(f,v),this.initPipeline(),this.emitters=new r(this),this.wells=new r(this),u){Array.isArray(u)||(u=[u]);for(var c=0;c0?h.defaultFrame=f[0]:h.defaultFrame=this.defaultFrame,this},addEmitter:function(s){return this.emitters.add(s)},createEmitter:function(s){return this.addEmitter(new e(this,s))},removeEmitter:function(s){return this.emitters.remove(s,!0)},addGravityWell:function(s){return this.wells.add(s)},createGravityWell:function(s){return this.addGravityWell(new o(s))},emitParticle:function(s,h,f){for(var v=this.emitters.list,u=0;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(35),d=t(133),a=t(31),o=t(0),r=t(11),e=t(33),i=t(109),l=t(15),s=t(1),h=t(92),f=t(1079),v=t(141),u=t(12),c=t(222),x=new o({Extends:l,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,f],initialize:function(m,y,T,S,C,P,A){y===void 0&&(y=0),T===void 0&&(T=0),S===void 0&&(S=32),C===void 0&&(C=32),l.call(this,m,"RenderTexture"),this.renderer=m.sys.renderer,this.textureManager=m.sys.textures,this.globalTint=16777215,this.globalAlpha=1,this.canvas=null,this.dirty=!1,this._crop=this.resetCropObject(),this.texture=null,this.frame=null,this._saved=!1,P===void 0?(this.canvas=a.create2D(this,S,C),this.texture=m.sys.textures.addCanvas(c(),this.canvas),this.frame=this.texture.get()):(this.texture=m.sys.textures.get(P),this.frame=this.texture.get(A),this.canvas=this.frame.source.image,this._saved=!0,this.dirty=!0,this.width=this.frame.cutWidth,this.height=this.frame.cutHeight),this.context=this.canvas.getContext("2d"),this._eraseMode=!1,this.camera=new d(0,0,S,C),this.renderTarget=null;var M=this.renderer;M?M.type===e.WEBGL?(this.drawGameObject=this.batchGameObjectWebGL,this.renderTarget=new v(M,S,C,1,0,!1)):M.type===e.CANVAS&&(this.drawGameObject=this.batchGameObjectCanvas):this.drawGameObject=s,this.camera.setScene(m),this.setPosition(y,T),P===void 0&&this.setSize(S,C),this.setOrigin(0,0),this.initPipeline(h.SINGLE_PIPELINE)},setSize:function(g,m){return this.resize(g,m)},resize:function(g,m){m===void 0&&(m=g);var y=this.frame;if(g!==this.width||m!==this.height){if(y.name==="__BASE"){this.canvas.width=g,this.canvas.height=m,this.texture.width=g,this.texture.height=m;var T=this.renderTarget;T&&(T.resize(g,m),y.glTexture=T.texture,y.source.isRenderTexture=!0,y.source.isGLTexture=!0,y.source.glTexture=T.texture),this.camera.setSize(g,m),y.source.width=g,y.source.height=m,y.setSize(g,m),this.width=g,this.height=m}}else{var S=this.texture.getSourceImage();y.cutX+g>S.width&&(g=S.width-y.cutX),y.cutY+m>S.height&&(m=S.height-y.cutY),y.setSize(g,m,y.cutX,y.cutY)}this.updateDisplayOrigin();var C=this.input;return C&&!C.customHitArea&&(C.hitArea.width=g,C.hitArea.height=m),this},setGlobalTint:function(g){return this.globalTint=g,this},setGlobalAlpha:function(g){return this.globalAlpha=g,this},saveTexture:function(g){return this.textureManager.renameTexture(this.texture.key,g),this._saved=!0,this.texture},fill:function(g,m,y,T,S,C){var P=this.frame,A=this.camera,M=this.renderer;m===void 0&&(m=1),y===void 0&&(y=0),T===void 0&&(T=0),S===void 0&&(S=P.cutWidth),C===void 0&&(C=P.cutHeight);var L=(g>>16&255)/255,F=(g>>8&255)/255,B=(g&255)/255,N=this.renderTarget;if(A.preRender(),N){N.bind(!0);var X=this.pipeline;X.manager.set(X);var V=N.width,W=N.height,O=M.width,R=M.height,I=O/V,D=R/W;X.drawFillRect(y*I,T*D,S*I,C*D,u.getTintFromFloats(B,F,L,1),m),N.unbind(!0)}else{var G=this.context;M.setContext(G),G.fillStyle="rgba("+L+","+F+","+B+","+m+")",G.fillRect(y+P.cutX,T+P.cutY,S,C),M.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var g=this.renderTarget;if(g)g.clear();else{var m=this.context;m.save(),m.setTransform(1,0,0,1,0,0),m.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),m.restore()}this.dirty=!1}return this},erase:function(g,m,y){return this._eraseMode=!0,this.draw(g,m,y,1,16777215),this._eraseMode=!1,this},draw:function(g,m,y,T,S){return this.beginDraw(),this.batchDraw(g,m,y,T,S),this.endDraw(),this},drawFrame:function(g,m,y,T,S,C){return this.beginDraw(),this.batchDrawFrame(g,m,y,T,S,C),this.endDraw(),this},beginDraw:function(){var g=this.camera,m=this.renderer,y=this.renderTarget;return g.preRender(),y?m.beginCapture(y.width,y.height):m.setContext(this.context),this},batchDraw:function(g,m,y,T,S){return T===void 0&&(T=this.globalAlpha),S===void 0?S=(this.globalTint>>16)+(this.globalTint&65280)+((this.globalTint&255)<<16):S=(S>>16)+(S&65280)+((S&255)<<16),Array.isArray(g)||(g=[g]),this.batchList(g,m,y,T,S),this},batchDrawFrame:function(g,m,y,T,S,C){y===void 0&&(y=0),T===void 0&&(T=0),S===void 0&&(S=this.globalAlpha),C===void 0?C=(this.globalTint>>16)+(this.globalTint&65280)+((this.globalTint&255)<<16):C=(C>>16)+(C&65280)+((C&255)<<16);var P=this.textureManager.getFrame(g,m);return P&&(this.renderTarget?this.pipeline.batchTextureFrame(P,y,T,C,S,this.camera.matrix,null):this.batchTextureFrame(P,y+this.frame.cutX,T+this.frame.cutY,S,C)),this},endDraw:function(g){g===void 0&&(g=this._eraseMode);var m=this.renderer,y=this.renderTarget;if(y){var T=m.endCapture(),S=m.pipelines.setUtility();S.blitFrame(T,y,1,!1,!1,g),m.resetScissor(),m.resetViewport()}else m.setContext();return this.dirty=!0,this},batchList:function(g,m,y,T,S){for(var C=0;C + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var d=Math.random()*16|0,a=n==="x"?d:d&3|8;return a.toString(16)})};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(164),d=t(0),a=t(11),o=t(15),r=t(92),e=t(1085),i=t(3),l=new d({Extends:o,Mixins:[a.AlphaSingle,a.BlendMode,a.Depth,a.Flip,a.Mask,a.Pipeline,a.Size,a.Texture,a.Transform,a.Visible,a.ScrollFactor,e],initialize:function(h,f,v,u,c,x,g,m,y){u===void 0&&(u="__DEFAULT"),x===void 0&&(x=2),g===void 0&&(g=!0),o.call(this,h,"Rope"),this.anims=new n(this),this.points=x,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=u==="__DEFAULT",this.dirty=!1,this.horizontal=g,this._flipX=!1,this._flipY=!1,this._perp=new i,this.debugCallback=null,this.debugGraphic=null,this.setTexture(u,c),this.setPosition(f,v),this.setSizeToFrame(),this.initPipeline(r.ROPE_PIPELINE),Array.isArray(x)&&this.resizeArrays(x.length),this.setPoints(x,m,y),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(s,h){var f=this.anims.currentFrame;this.anims.update(s,h),this.anims.currentFrame!==f&&(this.updateUVs(),this.updateVertices())},play:function(s,h,f){return this.anims.play(s,h,f),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(s,h,f){return s===void 0&&(s=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(s,h,f))},setVertical:function(s,h,f){return s===void 0&&(s=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(s,h,f)):this},setTintFill:function(s){return s===void 0&&(s=!1),this.tintFill=s,this},setAlphas:function(s,h){var f=this.points.length;if(f<1)return this;var v=this.alphas;s===void 0?s=[1]:!Array.isArray(s)&&h===void 0&&(s=[s]);var u,c=0;if(h!==void 0)for(u=0;uc&&(x=s[c]),v[c]=x,s.length>c+1&&(x=s[c+1]),v[c+1]=x}return this},setColors:function(s){var h=this.points.length;if(h<1)return this;var f=this.colors;s===void 0?s=[16777215]:Array.isArray(s)||(s=[s]);var v,u=0;if(s.length===h)for(v=0;vu&&(c=s[u]),f[u]=c,s.length>u+1&&(c=s[u+1]),f[u+1]=c}return this},setPoints:function(s,h,f){if(s===void 0&&(s=2),typeof s=="number"){var v=s;v<2&&(v=2),s=[];var u,c,x;if(this.horizontal)for(x=-this.frame.halfWidth,c=this.frame.width/(v-1),u=0;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(142),d=t(31),a=t(0),o=t(11),r=t(22),e=t(15),i=t(458),l=t(6),s=t(202),h=t(1088),f=t(459),v=new a({Extends:e,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,h],initialize:function(c,x,g,m,y){x===void 0&&(x=0),g===void 0&&(g=0),e.call(this,c,"Text"),this.renderer=c.sys.renderer,this.setPosition(x,g),this.setOrigin(0,0),this.initPipeline(),this.canvas=d.create(this),this.context=this.canvas.getContext("2d"),this.style=new f(this,y),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.dirty=!1,this.style.resolution===0&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=c.sys.textures.addCanvas(null,this.canvas,!0),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(m),y&&y.padding&&this.setPadding(y.padding),y&&y.lineSpacing&&this.setLineSpacing(y.lineSpacing),c.sys.game.events.on(r.CONTEXT_RESTORED,function(){this.dirty=!0},this)},initRTL:function(){!this.style.rtl||(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",n(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(u){var c=this.style;if(c.wordWrapCallback){var x=c.wordWrapCallback.call(c.wordWrapCallbackScope,u,this);return Array.isArray(x)&&(x=x.join(` +`)),x}else return c.wordWrapWidth?c.wordWrapUseAdvanced?this.advancedWordWrap(u,this.context,this.style.wordWrapWidth):this.basicWordWrap(u,this.context,this.style.wordWrapWidth):u},advancedWordWrap:function(u,c,x){for(var g="",m=u.replace(/ +/gi," ").split(this.splitRegExp),y=m.length,T=0;TA){if(L===0){for(var X=B;X.length&&(X=X.slice(0,-1),N=c.measureText(X).width,!(N<=A)););if(!X.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var V=F.substr(X.length);M[L]=V,C+=X}var W=M[L].length?L:L+1,O=M.slice(W).join(" ").replace(/[ \n]*$/gi,"");m[T+1]=O+" "+(m[T+1]||""),y=m.length;break}else C+=B,A-=N}g+=C.replace(/[ \n]*$/gi,"")+` +`}return g=g.replace(/[\s|\n]*$/gi,""),g},basicWordWrap:function(u,c,x){for(var g="",m=u.split(this.splitRegExp),y=m.length-1,T=c.measureText(" ").width,S=0;S<=y;S++){for(var C=x,P=m[S].split(" "),A=P.length-1,M=0;M<=A;M++){var L=P[M],F=c.measureText(L).width,B=F;MC&&M>0&&(g+=` +`,C=x),g+=L,M0&&(F+=S.lineSpacing*B),x.rtl)L=A-L;else if(x.align==="right")L+=P-S.lineWidths[B];else if(x.align==="center")L+=(P-S.lineWidths[B])/2;else if(x.align==="justify"){var N=.85;if(S.lineWidths[B]/S.width>=N){var X=S.width-S.lineWidths[B],V=c.measureText(" ").width,W=T[B].trim(),O=W.split(" ");X+=(T[B].length-W.length)*V;for(var R=Math.floor(X/V),I=0;R>0;)O[I]+=" ",I=(I+1)%(O.length-1||1),--R;T[B]=O.join(" ")}}this.autoRound&&(L=Math.round(L),F=Math.round(F)),x.strokeThickness&&(this.style.syncShadow(c,x.shadowStroke),c.strokeText(T[B],L,F)),x.color&&(this.style.syncShadow(c,x.shadowFill),c.fillText(T[B],L,F))}c.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(u,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var D=this.input;return D&&!D.customHitArea&&(D.hitArea.width=this.width,D.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(u){this.setText(u)}},toJSON:function(){var u=o.ToJSON(this),c={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 u.data=c,u},preDestroy:function(){this.style.rtl&&s(this.canvas),d.remove(this.canvas),this.texture.destroy()}});p.exports=v},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(31),d=t(0),a=t(11),o=t(22),r=t(15),e=t(361),i=t(192),l=t(1091),s=t(3),h=8,f=new d({Extends:r,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.ScrollFactor,a.Tint,a.Transform,a.Visible,l],initialize:function(u,c,x,g,m,y,T){var S=u.sys.renderer;r.call(this,u,"TileSprite");var C=u.sys.textures.get(y),P=C.get(T);!g||!m?(g=P.width,m=P.height):(g=Math.floor(g),m=Math.floor(m)),this._tilePosition=new s,this._tileScale=new s(1,1),this.dirty=!1,this.renderer=S,this.canvas=n.create(this,g,m),this.context=this.canvas.getContext("2d"),this.displayTexture=C,this.displayFrame=P,this._crop=this.resetCropObject(),this.texture=u.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=e(P.width),this.potHeight=e(P.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(c,x),this.setSize(g,m),this.setFrame(T),this.setOriginFromFrame(),this.initPipeline(),u.sys.game.events.on(o.CONTEXT_RESTORED,function(A){if(!!A){var M=A.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=A.createTexture2D(0,M.LINEAR,M.LINEAR,M.REPEAT,M.REPEAT,M.RGBA,this.fillCanvas,this.potWidth,this.potHeight)}},this)},setTexture:function(v,u){return this.displayTexture=this.scene.sys.textures.get(v),this.setFrame(u)},setFrame:function(v){var u=this.displayTexture.get(v);return this.potWidth=e(u.width),this.potHeight=e(u.height),this.canvas.width=0,!u.cutWidth||!u.cutHeight?this.renderFlags&=~h:this.renderFlags|=h,this.displayFrame=u,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(v,u){return v!==void 0&&(this.tilePositionX=v),u!==void 0&&(this.tilePositionY=u),this},setTileScale:function(v,u){return v===void 0&&(v=this.tileScaleX),u===void 0&&(u=v),this.tileScaleX=v,this.tileScaleY=u,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var v=this.displayFrame;if(v.source.isRenderTexture||v.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var u=this.fillContext,c=this.fillCanvas,x=this.potWidth,g=this.potHeight;(!this.renderer||!this.renderer.gl)&&(x=v.cutWidth,g=v.cutHeight),u.clearRect(0,0,x,g),c.width=x,c.height=g,u.drawImage(v.source.image,v.cutX,v.cutY,v.cutWidth,v.cutHeight,0,0,x,g),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(c,this.fillPattern):this.fillPattern=u.createPattern(c,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var v=this.canvas;if((v.width!==this.width||v.height!==this.height)&&(v.width=this.width,v.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var u=this.context;this.scene.sys.game.config.antialias||i.disable(u);var c=this._tileScale.x,x=this._tileScale.y,g=this._tilePosition.x,m=this._tilePosition.y;u.clearRect(0,0,this.width,this.height),u.save(),u.scale(c,x),u.translate(-g,-m),u.fillStyle=this.fillPattern,u.fillRect(g,m,this.width/c,this.height/x),u.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(v){this._tilePosition.x=v,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(v){this._tilePosition.y=v,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(v){this._tileScale.x=v,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(v){this._tileScale.y=v,this.dirty=!0}}});p.exports=f},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(18),a=t(11),o=t(75),r=t(22),e=t(51),i=t(15),l=t(70),s=t(222),h=t(1094),f=t(14),v=new n({Extends:i,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Flip,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.ScrollFactor,a.Size,a.TextureCrop,a.Tint,a.Transform,a.Visible,h],initialize:function(c,x,g,m){i.call(this,c,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=s(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=f.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(x,g),this.initPipeline(),m&&this.changeSource(m,!1);var y=c.sys.game.events;y.on(r.PAUSE,this.globalPause,this),y.on(r.RESUME,this.globalResume,this);var T=c.sys.sound;T&&T.on(l.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},play:function(u,c,x){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var g=this.video;if(!g)return console.warn("Video not loaded"),this;u===void 0&&(u=g.loop);var m=this.scene.sys.sound;m&&m.mute&&this.setMute(!0),isNaN(c)||(this._markerIn=c),!isNaN(x)&&x>c&&(this._markerOut=x),g.loop=u;var y=this._callbacks,T=g.play();return T!==void 0?T.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(g.addEventListener("playing",y.play,!0),g.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),g.addEventListener("ended",y.end,!0),g.addEventListener("timeupdate",y.time,!0),g.addEventListener("seeking",y.seeking,!0),g.addEventListener("seeked",y.seeked,!0),this},changeSource:function(u,c,x,g,m){c===void 0&&(c=!0);var y=this.video;y&&this.stop();var T=this.scene.sys.cache.video.get(u);return T?(this.video=T,this._cacheKey=u,this._codePaused=T.paused,this._codeMuted=T.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,T,T.videoWidth,T.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,T.videoWidth,T.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,T.videoWidth,T.videoHeight)):this.updateTexture(),T.currentTime=0,this._lastUpdate=0,c&&this.play(x,g,m)):this.video=null,this},addMarker:function(u,c,x){return!isNaN(c)&&c>=0&&!isNaN(x)&&(this.markers[u]=[c,x]),this},playMarker:function(u,c){var x=this.markers[u];return x&&this.play(c,x[0],x[1]),this},removeMarker:function(u){return delete this.markers[u],this},snapshot:function(u,c){return u===void 0&&(u=this.width),c===void 0&&(c=this.height),this.snapshotArea(0,0,this.width,this.height,u,c)},snapshotArea:function(u,c,x,g,m,y){u===void 0&&(u=0),c===void 0&&(c=0),x===void 0&&(x=this.width),g===void 0&&(g=this.height),m===void 0&&(m=x),y===void 0&&(y=g);var T=this.video,S=this.snapshotTexture;return S?(S.setSize(m,y),T&&S.context.drawImage(T,u,c,x,g,0,0,m,y)):(S=this.scene.sys.textures.createCanvas(s(),m,y),this.snapshotTexture=S,T&&S.context.drawImage(T,u,c,x,g,0,0,m,y)),S.update()},saveSnapshotTexture:function(u){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,u):this.snapshotTexture=this.scene.sys.textures.createCanvas(u,this.width,this.height),this.snapshotTexture},loadURL:function(u,c,x){x===void 0&&(x=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var g=document.createElement("video");return g.controls=!1,x&&(g.muted=!0,g.defaultMuted=!0,g.setAttribute("autoplay","autoplay")),g.setAttribute("playsinline","playsinline"),g.setAttribute("preload","auto"),g.addEventListener("error",this._callbacks.error,!0),g.src=u,g.load(),this.video=g,this},loadMediaStream:function(u,c,x){x===void 0&&(x=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var g=document.createElement("video");g.controls=!1,x&&(g.muted=!0,g.defaultMuted=!0,g.setAttribute("autoplay","autoplay")),g.setAttribute("playsinline","playsinline"),g.setAttribute("preload","auto"),g.addEventListener("error",this._callbacks.error,!0);try{g.srcObject=u}catch{g.src=window.URL.createObjectURL(u)}return g.load(),this.video=g,this},playPromiseSuccessHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(u){this.scene.sys.input.once(e.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,u)},playHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(u){this.stop(),this.emit(o.VIDEO_ERROR,this,u)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(u.loop?(u.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=c,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var u=this.video,c=u.videoWidth,x=u.videoHeight;if(!this.videoTexture)this.videoTexture=this.scene.sys.textures.create(this._key,u,c,x),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,c,x),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,c,x);else{var g=this.videoTextureSource;g.source!==u&&(g.source=u,g.width=c,g.height=x),g.update()}},getVideoKey:function(){return this._cacheKey},seekTo:function(u){var c=this.video;if(c){var x=c.duration;if(x!==1/0&&!isNaN(x)){var g=x*u;this.setCurrentTime(g)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(u){var c=this.video;if(c){if(typeof u=="string"){var x=u[0],g=parseFloat(u.substr(1));x==="+"?u=c.currentTime+g:x==="-"&&(u=c.currentTime-g)}c.currentTime=u,this._lastUpdate=u}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this);var u=this.video;u&&this.updateTexture()},getProgress:function(){var u=this.video;if(u){var c=u.currentTime,x=u.duration;if(x!==1/0&&!isNaN(x))return c/x}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(u){u===void 0&&(u=!0),this._codeMuted=u;var c=this.video;return c&&(c.muted=this._systemMuted?!0:u),this},isMuted:function(){return this._codeMuted},globalMute:function(u,c){this._systemMuted=c;var x=this.video;x&&(x.muted=this._codeMuted?!0:c)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(u){u===void 0&&(u=!0);var c=this.video;return this._codePaused=u,c&&(u?c.paused||c.pause():u||c.paused&&!this._systemPaused&&c.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(u){return u===void 0&&(u=1),this.video&&(this.video.volume=d(u,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(u){return this.video&&(this.video.playbackRate=u),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(u){return u===void 0&&(u=!0),this.video&&(this.video.loop=u),this},isPlaying:function(){return this.video?!(this.video.paused||this.video.ended):!1},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(u,c){return c===void 0&&(c=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,u),this._key=u,this.flipY=c,this.videoTextureSource&&this.videoTextureSource.setFlipY(c),this.videoTexture},stop:function(){var u=this.video;if(u){var c=this._callbacks;for(var x in c)u.removeEventListener(x,c[x],!0);u.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var u=this.video;if(!!u){for(u.parentNode&&u.parentNode.removeChild(u);u.hasChildNodes();)u.removeChild(u.firstChild);u.removeAttribute("autoplay"),u.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var u=this.scene.sys.game.events;u.off(r.PAUSE,this.globalPause,this),u.off(r.RESUME,this.globalResume,this);var c=this.scene.sys.sound;c&&c.off(l.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});p.exports=v},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(228),a=t(470),o=t(56),r=new n({initialize:function(i){this.type=o.POLYGON,this.area=0,this.points=[],i&&this.setTo(i)},contains:function(e,i){return d(this,e,i)},setTo:function(e){if(this.area=0,this.points=[],typeof e=="string"&&(e=e.split(" ")),!Array.isArray(e))return this;for(var i,l=Number.MAX_VALUE,s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){for(var o=!1,r=-1,e=n.points.length-1;++r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(11),a=t(15),o=t(2),r=t(17),e=t(478),i=t(1176),l=t(25),s=new n({Extends:a,Mixins:[d.ComputedSize,d.Depth,d.GetBounds,d.Mask,d.Origin,d.ScrollFactor,d.Transform,d.Visible,i],initialize:function(f,v,u,c,x,g,m,y){u===void 0&&(u=0),c===void 0&&(c=0),x===void 0&&(x=128),g===void 0&&(g=128),a.call(this,f,"Shader"),this.blendMode=-1,this.shader;var T=f.sys.renderer;this.renderer=T,this.gl=T.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=T.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=T.width,this._rendererHeight=T.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(u,c),this.setSize(x,g),this.setOrigin(.5,.5),this.setShader(v,m,y)},willRender:function(h){return this.renderToTexture?!0:!(a.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&h.id)},setRenderToTexture:function(h,f){if(f===void 0&&(f=!1),!this.renderToTexture){var v=this.width,u=this.height,c=this.renderer;this.glTexture=c.createTextureFromSource(null,v,u,0),this.glTexture.flipY=f,this.framebuffer=c.createFramebuffer(v,u,this.glTexture,!1),this._rendererWidth=v,this._rendererHeight=u,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),h&&(this.texture=this.scene.sys.textures.addGLTexture(h,this.glTexture,v,u))}return this.shader&&(c.pipelines.clear(),this.load(),this.flush(),c.pipelines.rebind()),this},setShader:function(h,f,v){if(f===void 0&&(f=[]),typeof h=="string"){var u=this.scene.sys.cache.shader;if(!u.has(h))return console.warn("Shader missing: "+h),this;this.shader=u.get(h)}else this.shader=h;var c=this.gl,x=this.renderer;this.program&&c.deleteProgram(this.program);var g=x.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);c.uniformMatrix4fv(c.getUniformLocation(g,"uViewMatrix"),!1,this.viewMatrix),c.uniformMatrix4fv(c.getUniformLocation(g,"uProjectionMatrix"),!1,this.projectionMatrix),c.uniform2f(c.getUniformLocation(g,"uResolution"),this.width,this.height),this.program=g;var m=new Date,y={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[m.getFullYear(),m.getMonth(),m.getDate(),m.getHours()*60*60+m.getMinutes()*60+m.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=r(!0,{},this.shader.uniforms,y):this.uniforms=y;for(var T=0;T<4;T++)f[T]&&this.setSampler2D("iChannel"+T,f[T],T,v);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(h){return this.pointer=h,this},projOrtho:function(h,f,v,u){var c=-1e3,x=1e3,g=1/(h-f),m=1/(v-u),y=1/(c-x),T=this.projectionMatrix;T[0]=-2*g,T[5]=-2*m,T[10]=2*y,T[12]=(h+f)*g,T[13]=(u+v)*m,T[14]=(x+c)*y;var S=this.program,C=this.gl,P=this.renderer;P.setProgram(S),C.uniformMatrix4fv(C.getUniformLocation(S,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=f,this._rendererHeight=v},initUniforms:function(){var h=this.gl,f=this.renderer.glFuncMap,v=this.program;this._textureCount=0;for(var u in this.uniforms){var c=this.uniforms[u],x=c.type,g=f[x];c.uniformLocation=h.getUniformLocation(v,u),x!=="sampler2D"&&(c.glMatrix=g.matrix,c.glValueLength=g.length,c.glFunc=g.func)}},setSampler2DBuffer:function(h,f,v,u,c,x){c===void 0&&(c=0),x===void 0&&(x={});var g=this.uniforms[h];return g.value=f,x.width=v,x.height=u,g.textureData=x,this._textureCount=c,this.initSampler2D(g),this},setSampler2D:function(h,f,v,u){v===void 0&&(v=0);var c=this.scene.sys.textures;if(c.exists(f)){var x=c.getFrame(f);if(x.glTexture&&x.glTexture.isRenderTexture)return this.setSampler2DBuffer(h,x.glTexture,x.width,x.height,v,u);var g=this.uniforms[h],m=x.source;g.textureKey=f,g.source=m.image,g.value=x.glTexture,m.isGLTexture&&(u||(u={}),u.width=m.width,u.height=m.height),u&&(g.textureData=u),this._textureCount=v,this.initSampler2D(g)}return this},setUniform:function(h,f){return e(this.uniforms,h,f),this},getUniform:function(h){return o(this.uniforms,h,null)},setChannel0:function(h,f){return this.setSampler2D("iChannel0",h,0,f)},setChannel1:function(h,f){return this.setSampler2D("iChannel1",h,1,f)},setChannel2:function(h,f){return this.setSampler2D("iChannel2",h,2,f)},setChannel3:function(h,f){return this.setSampler2D("iChannel3",h,3,f)},initSampler2D:function(h){if(!!h.value){var f=this.gl;f.activeTexture(f.TEXTURE0+this._textureCount),f.bindTexture(f.TEXTURE_2D,h.value);var v=h.textureData;if(v&&!h.value.isRenderTexture){var u=f[o(v,"magFilter","linear").toUpperCase()],c=f[o(v,"minFilter","linear").toUpperCase()],x=f[o(v,"wrapS","repeat").toUpperCase()],g=f[o(v,"wrapT","repeat").toUpperCase()],m=f[o(v,"format","rgba").toUpperCase()];if(v.repeat&&(x=f.REPEAT,g=f.REPEAT),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!!v.flipY),v.width){var y=o(v,"width",512),T=o(v,"height",2),S=o(v,"border",0);f.texImage2D(f.TEXTURE_2D,0,m,y,T,S,m,f.UNSIGNED_BYTE,null)}else f.texImage2D(f.TEXTURE_2D,0,m,f.RGBA,f.UNSIGNED_BYTE,h.source);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,u),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,c),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,x),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,g)}this.renderer.setProgram(this.program),f.uniform1i(h.uniformLocation,this._textureCount),this._textureCount++}},syncUniforms:function(){var h=this.gl,f=this.uniforms,v,u,c,x,g,m=0;for(var y in f)v=f[y],c=v.glFunc,u=v.glValueLength,x=v.uniformLocation,g=v.value,g!==null&&(u===1?v.glMatrix?c.call(h,x,v.transpose,g):c.call(h,x,g):u===2?c.call(h,x,g.x,g.y):u===3?c.call(h,x,g.x,g.y,g.z):u===4?c.call(h,x,g.x,g.y,g.z,g.w):v.type==="sampler2D"&&(h.activeTexture(h.TEXTURE0+m),h.bindTexture(h.TEXTURE_2D,g),h.uniform1i(x,m),m++))},load:function(h){var f=this.gl,v=this.width,u=this.height,c=this.renderer,x=this.program,g=this.viewMatrix;if(!this.renderToTexture){var m=-this._displayOriginX,y=-this._displayOriginY;g[0]=h[0],g[1]=h[1],g[4]=h[2],g[5]=h[3],g[8]=h[4],g[9]=h[5],g[12]=g[0]*m+g[4]*y,g[13]=g[1]*m+g[5]*y}f.useProgram(x),f.uniformMatrix4fv(f.getUniformLocation(x,"uViewMatrix"),!1,g),f.uniform2f(f.getUniformLocation(x,"uResolution"),this.width,this.height);var T=this.uniforms,S=T.resolution;S.value.x=v,S.value.y=u,T.time.value=c.game.loop.getDuration();var C=this.pointer;if(C){var P=T.mouse,A=C.x/v,M=1-C.y/u;P.value.x=A.toFixed(2),P.value.y=M.toFixed(2)}this.syncUniforms()},flush:function(){var h=this.width,f=this.height,v=this.program,u=this.gl,c=this.vertexBuffer,x=this.renderer,g=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(x.setFramebuffer(this.framebuffer),u.clearColor(0,0,0,0),u.clear(u.COLOR_BUFFER_BIT)),u.bindBuffer(u.ARRAY_BUFFER,c);var m=u.getAttribLocation(v,"inPosition");m!==-1&&(u.enableVertexAttribArray(m),u.vertexAttribPointer(m,2,u.FLOAT,!1,g,0));var y=this.vertexViewF32;y[3]=f,y[4]=h,y[5]=f,y[8]=h,y[9]=f,y[10]=h;var T=6;u.bufferSubData(u.ARRAY_BUFFER,0,this.bytes.subarray(0,T*g)),u.drawArrays(u.TRIANGLES,0,T),this.renderToTexture&&x.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var h=this.gl;h.deleteProgram(this.program),h.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});p.exports=s},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(11),a=t(36),o=t(116),r=t(15),e=t(479),i=t(480),l=t(19),s=t(69),h=t(1179),f=t(79),v=t(39),u=t(117),c=new n({Extends:r,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Mask,d.Pipeline,d.Size,d.Texture,d.Transform,d.Visible,d.ScrollFactor,h],initialize:function(g,m,y,T,S,C,P,A,M,L,F,B){m===void 0&&(m=0),y===void 0&&(y=0),T===void 0&&(T="__WHITE"),r.call(this,g,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new v,this.modelScale=new v(1,1,1),this.modelRotation=new v,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new s,this.viewPosition=new v,this.viewMatrix=new s,this.projectionMatrix=new s,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1;var N=g.sys.renderer;this.setPosition(m,y),this.setTexture(T,S),this.setSize(N.width,N.height),this.initPipeline(),this.setPerspective(N.width,N.height),C&&this.addVertices(C,P,A,M,L,F,B)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(x){return this.viewPosition.addScale(v.LEFT,x),this.dirtyCache[10]=1,this},panY:function(x){return this.viewPosition.y+=v.DOWN.y*x,this.dirtyCache[10]=1,this},panZ:function(x){return this.viewPosition.z+=x,this.dirtyCache[10]=1,this},setPerspective:function(x,g,m,y,T){return m===void 0&&(m=45),y===void 0&&(y=.01),T===void 0&&(T=1e3),this.projectionMatrix.perspective(a(m),x/g,y,T),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(x,g,m,y){return x===void 0&&(x=this.scene.sys.renderer.getAspectRatio()),g===void 0&&(g=1),m===void 0&&(m=-1e3),y===void 0&&(y=1e3),this.projectionMatrix.ortho(-x,x,-g,g,m,y),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(x){x.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(x,g,m,y,T,S,C,P,A){var M=this.scene.sys.cache.obj.get(x);return M&&i(M,this,g,m,y,T,S,C,P,A),this},sortByDepth:function(x,g){return x.depth-g.depth},depthSort:function(){return f(this.faces,this.sortByDepth),this},addVertex:function(x,g,m,y,T,S,C){var P=new u(x,g,m,y,T,S,C);return this.vertices.push(P),P},addFace:function(x,g,m){var y=new o(x,g,m);return this.faces.push(y),this.dirtyCache[9]=-1,y},addVertices:function(x,g,m,y,T,S,C){var P=e(x,g,m,y,T,S,C);return P&&(this.faces=this.faces.concat(P.faces),this.vertices=this.vertices.concat(P.vertices)),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(x){return this.faces[x]},getFaceAt:function(x,g,m){m===void 0&&(m=this.scene.sys.cameras.main);for(var y=l(this,m).calc,T=this.faces,S=[],C=0;C + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(50),d=function(a,o){return n(a.x,a.y,o.x,o.y)<=a.radius+o.radius};p.exports=d},function(p,E,t){/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=t(233),a=function(o,r,e){if(e===void 0&&(e=[]),d(o,r)){var i=o.x1,l=o.y1,s=o.x2,h=o.y2,f=r.x,v=r.y,u=r.radius,c=s-i,x=h-l,g=i-f,m=l-v,y=c*c+x*x,T=2*(c*g+x*m),S=g*g+m*m-u*u,C=T*T-4*y*S,P,A;if(C===0){var M=-T/(2*y);P=i+M*c,A=l+M*x,M>=0&&M<=1&&e.push(new n(P,A))}else if(C>0){var L=(-T-Math.sqrt(C))/(2*y);P=i+L*c,A=l+L*x,L>=0&&L<=1&&e.push(new n(P,A));var F=(-T+Math.sqrt(C))/(2*y);P=i+F*c,A=l+F*x,F>=0&&F<=1&&e.push(new n(P,A))}}return e};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(66),d=t(4),a=new d,o=function(r,e,i){if(i===void 0&&(i=a),n(e,r.x1,r.y1))return i.x=r.x1,i.y=r.y1,!0;if(n(e,r.x2,r.y2))return i.x=r.x2,i.y=r.y2,!0;var l=r.x2-r.x1,s=r.y2-r.y1,h=e.x-r.x1,f=e.y-r.y1,v=l*l+s*s,u=l,c=s;if(v>0){var x=(h*l+f*s)/v;u*=x,c*=x}i.x=r.x1+u,i.y=r.y1+c;var g=u*u+c*c;return g<=v&&u*l+c*s>=0&&n(e,i.x,i.y)};p.exports=o},function(p,E,t){/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=t(96),a=t(488),o=function(r,e,i){if(i===void 0&&(i=[]),a(r,e))for(var l=e.getLineA(),s=e.getLineB(),h=e.getLineC(),f=e.getLineD(),v=[new n,new n,new n,new n],u=[d(l,r,v[0]),d(s,r,v[1]),d(h,r,v[2]),d(f,r,v[3])],c=0;c<4;c++)u[c]&&i.push(v[c]);return i};p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){a===void 0&&(a=!1),o===void 0&&(o=[]);for(var r=n.x3-n.x1,e=n.y3-n.y1,i=n.x2-n.x1,l=n.y2-n.y1,s=r*r+e*e,h=r*i+e*l,f=i*i+l*l,v=s*f-h*h,u=v===0?0:1/v,c,x,g,m,y,T,S=n.x1,C=n.y1,P=0;P=0&&x>=0&&c+x<1&&(o.push({x:d[P].x,y:d[P].y}),a)));P++);return o};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=Math.cos(o),e=Math.sin(o),i=n.x1-d,l=n.y1-a;return n.x1=i*r-l*e+d,n.y1=i*e+l*r+a,i=n.x2-d,l=n.y2-a,n.x2=i*r-l*e+d,n.y2=i*e+l*r+a,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.height===0?NaN:n.width/n.height};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=Math.cos(o),e=Math.sin(o),i=n.x1-d,l=n.y1-a;return n.x1=i*r-l*e+d,n.y1=i*e+l*r+a,i=n.x2-d,l=n.y2-a,n.x2=i*r-l*e+d,n.y2=i*e+l*r+a,i=n.x3-d,l=n.y3-a,n.x3=i*r-l*e+d,n.y3=i*e+l*r+a,n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BUTTON_DOWN:t(1310),BUTTON_UP:t(1311),CONNECTED:t(1312),DISCONNECTED:t(1313),GAMEPAD_BUTTON_DOWN:t(1314),GAMEPAD_BUTTON_UP:t(1315)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(17),d=t(156),a=function(o,r){var e=o===void 0?d():n({},o);if(r)for(var i in r)r[i]!==void 0&&(e[i]=r[i]);return e};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=t(408),l=new n({Extends:a,initialize:function(h,f,v,u){var c="xml";if(e(f)){var x=f;f=r(x,"key"),v=r(x,"url"),u=r(x,"xhrSettings"),c=r(x,"extension",c)}var g={type:"xml",cache:h.cacheManager.xml,extension:c,responseType:"text",key:f,url:v,xhrSettings:u};a.call(this,h,g)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=i(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",function(s,h,f){if(Array.isArray(s))for(var v=0;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=new n({Extends:a,initialize:function(s,h,f,v){var u="text",c="txt",x=s.cacheManager.text;if(e(h)){var g=h;h=r(g,"key"),f=r(g,"url"),v=r(g,"xhrSettings"),c=r(g,"extension",c),u=r(g,"type",u),x=r(g,"cache",x)}var m={type:u,cache:x,extension:c,responseType:"text",key:h,url:f,xhrSettings:v};a.call(this,s,m)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",function(l,s,h){if(Array.isArray(l))for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Acceleration:t(1368),Angular:t(1369),Bounce:t(1370),Debug:t(1371),Drag:t(1372),Enable:t(1373),Friction:t(1374),Gravity:t(1375),Immovable:t(1376),Mass:t(1377),OverlapCirc:t(523),OverlapRect:t(244),Pushable:t(1378),Size:t(1379),Velocity:t(1380)}},function(p,E){var t=function(n,d,a,o,r,e,i){e===void 0&&(e=!0),i===void 0&&(i=!1);var l=[],s=[],h=n.treeMinMax;if(h.minX=d,h.minY=a,h.maxX=d+o,h.maxY=a+r,i&&(s=n.staticTree.search(h)),e&&n.useTree)l=n.tree.search(h);else if(e){var f=n.bodies,v={position:{x:d,y:a},left:d,top:a,right:d+o,bottom:a+r,isCircle:!1},u=n.intersects;f.iterate(function(c){u(c,v)&&l.push(c)})}return s.concat(l)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={COLLIDE:t(1381),OVERLAP:t(1382),PAUSE:t(1383),RESUME:t(1384),TILE_COLLIDE:t(1385),TILE_OVERLAP:t(1386),WORLD_BOUNDS:t(1387),WORLD_STEP:t(1388)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(62),d=function(a,o,r,e){var i=0,l=a.deltaAbsX()+o.deltaAbsX()+e;return a._dx===0&&o._dx===0?(a.embedded=!0,o.embedded=!0):a._dx>o._dx?(i=a.right-o.x,i>l&&!r||a.checkCollision.right===!1||o.checkCollision.left===!1?i=0:(a.touching.none=!1,a.touching.right=!0,o.touching.none=!1,o.touching.left=!0,o.physicsType===n.STATIC_BODY&&!r&&(a.blocked.none=!1,a.blocked.right=!0),a.physicsType===n.STATIC_BODY&&!r&&(o.blocked.none=!1,o.blocked.left=!0))):a._dxl&&!r||a.checkCollision.left===!1||o.checkCollision.right===!1?i=0:(a.touching.none=!1,a.touching.left=!0,o.touching.none=!1,o.touching.right=!0,o.physicsType===n.STATIC_BODY&&!r&&(a.blocked.none=!1,a.blocked.left=!0),a.physicsType===n.STATIC_BODY&&!r&&(o.blocked.none=!1,o.blocked.right=!0))),a.overlapX=i,o.overlapX=i,i};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(62),d=function(a,o,r,e){var i=0,l=a.deltaAbsY()+o.deltaAbsY()+e;return a._dy===0&&o._dy===0?(a.embedded=!0,o.embedded=!0):a._dy>o._dy?(i=a.bottom-o.y,i>l&&!r||a.checkCollision.down===!1||o.checkCollision.up===!1?i=0:(a.touching.none=!1,a.touching.down=!0,o.touching.none=!1,o.touching.up=!0,o.physicsType===n.STATIC_BODY&&!r&&(a.blocked.none=!1,a.blocked.down=!0),a.physicsType===n.STATIC_BODY&&!r&&(o.blocked.none=!1,o.blocked.up=!0))):a._dyl&&!r||a.checkCollision.up===!1||o.checkCollision.down===!1?i=0:(a.touching.none=!1,a.touching.up=!0,o.touching.none=!1,o.touching.down=!0,o.physicsType===n.STATIC_BODY&&!r&&(a.blocked.none=!1,a.blocked.up=!0),a.physicsType===n.STATIC_BODY&&!r&&(o.blocked.none=!1,o.blocked.down=!0))),a.overlapY=i,o.overlapY=i,i};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return!(d.right<=n.left||d.bottom<=n.top||d.position.x>=n.right||d.position.y>=n.bottom)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Bounce:t(1495),Collision:t(1496),Force:t(1497),Friction:t(1498),Gravity:t(1499),Mass:t(1500),Sensor:t(1501),SetBody:t(1502),Sleep:t(1503),Static:t(1520),Transform:t(1521),Velocity:t(1522)}},function(p,E){var t={};p.exports=t,function(){t.create=function(n,d){var a=n.bodyA,o=n.bodyB,r={id:t.id(a,o),bodyA:a,bodyB:o,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:a.isSensor||o.isSensor,timeCreated:d,timeUpdated:d,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return t.update(r,n,d),r},t.update=function(n,d,a){if(n.collision=d,d.collided){var o=d.supports,r=n.activeContacts,e=d.parentA,i=d.parentB;n.inverseMass=e.inverseMass+i.inverseMass,n.friction=Math.min(e.friction,i.friction),n.frictionStatic=Math.max(e.frictionStatic,i.frictionStatic),n.restitution=Math.max(e.restitution,i.restitution),n.slop=Math.max(e.slop,i.slop);for(var l=0;l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CalculateFacesAt:t(252),CalculateFacesWithin:t(63),CheckIsoBounds:t(541),Copy:t(1420),CreateFromTiles:t(1421),CullBounds:t(543),CullTiles:t(544),Fill:t(1422),FilterTiles:t(1423),FindByIndex:t(1424),FindTile:t(1425),ForEachTile:t(1426),GetCullTilesFunction:t(1427),GetTileAt:t(158),GetTileAtWorldXY:t(1428),GetTilesWithin:t(26),GetTilesWithinShape:t(1429),GetTilesWithinWorldXY:t(529),GetTileToWorldXFunction:t(1430),GetTileToWorldXYFunction:t(1431),GetTileToWorldYFunction:t(1432),GetWorldToTileXFunction:t(1433),GetWorldToTileXYFunction:t(1434),GetWorldToTileYFunction:t(1435),HasTileAt:t(562),HasTileAtWorldXY:t(1436),HexagonalCullBounds:t(546),HexagonalCullTiles:t(545),HexagonalTileToWorldXY:t(550),HexagonalTileToWorldY:t(554),HexagonalWorldToTileXY:t(556),HexagonalWorldToTileY:t(560),IsInLayerBounds:t(119),IsometricCullTiles:t(547),IsometricTileToWorldXY:t(551),IsometricWorldToTileXY:t(557),PutTileAt:t(257),PutTileAtWorldXY:t(1437),PutTilesAt:t(1438),Randomize:t(1439),RemoveTileAt:t(563),RemoveTileAtWorldXY:t(1440),RenderDebug:t(1441),ReplaceByIndex:t(542),RunCull:t(159),SetCollision:t(1442),SetCollisionBetween:t(1443),SetCollisionByExclusion:t(1444),SetCollisionByProperty:t(1445),SetCollisionFromCollisionGroup:t(1446),SetLayerCollisionIndex:t(160),SetTileCollision:t(72),SetTileIndexCallback:t(1447),SetTileLocationCallback:t(1448),Shuffle:t(1449),StaggeredCullBounds:t(549),StaggeredCullTiles:t(548),StaggeredTileToWorldXY:t(552),StaggeredTileToWorldY:t(555),StaggeredWorldToTileXY:t(558),StaggeredWorldToTileY:t(561),SwapByIndex:t(1450),TileToWorldX:t(253),TileToWorldXY:t(553),TileToWorldY:t(254),WeightedRandomize:t(1451),WorldToTileX:t(255),WorldToTileXY:t(559),WorldToTileY:t(256)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(158),d=function(a,o,r){var e=n(a,o,!0,r),i=n(a,o-1,!0,r),l=n(a,o+1,!0,r),s=n(a-1,o,!0,r),h=n(a+1,o,!0,r),f=e&&e.collides;return f&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),i&&i.collides&&(f&&(e.faceTop=!1),i.faceBottom=!f),l&&l.collides&&(f&&(e.faceBottom=!1),l.faceTop=!f),s&&s.collides&&(f&&(e.faceLeft=!1),s.faceRight=!f),h&&h.collides&&(f&&(e.faceRight=!1),h.faceLeft=!f),e&&!e.collides&&e.resetFaces(),e};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=a.baseTileWidth,r=a.tilemapLayer,e=0;return r&&(d||(d=r.scene.cameras.main),e=r.x+d.scrollX*(1-r.scrollFactorX),o*=r.scaleX),e+n*o};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=a.baseTileHeight,r=a.tilemapLayer,e=0;return r&&(d||(d=r.scene.cameras.main),e=r.y+d.scrollY*(1-r.scrollFactorY),o*=r.scaleY),e+n*o};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){d===void 0&&(d=!0);var r=o.baseTileWidth,e=o.tilemapLayer;return e&&(a||(a=e.scene.cameras.main),n=n-(e.x+a.scrollX*(1-e.scrollFactorX)),r*=e.scaleX),d?Math.floor(n/r):n/r};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){d===void 0&&(d=!0);var r=o.baseTileHeight,e=o.tilemapLayer;return e&&(a||(a=e.scene.cameras.main),n=n-(e.y+a.scrollY*(1-e.scrollFactorY)),r*=e.scaleY),d?Math.floor(n/r):n/r};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(85),d=t(119),a=t(252),o=t(72),r=function(e,i,l,s,h){if(s===void 0&&(s=!0),!d(i,l,h))return null;var f=h.data[l][i],v=f&&f.collides;if(e instanceof n)h.data[l][i]===null&&(h.data[l][i]=new n(h,e.index,i,l,h.tileWidth,h.tileHeight)),h.data[l][i].copy(e);else{var u=e;h.data[l][i]===null?h.data[l][i]=new n(h,u,i,l,h.tileWidth,h.tileHeight):h.data[l][i].index=u}var c=h.data[l][i],x=h.collideIndexes.indexOf(c.index)!==-1;return o(c,x),s&&v!==c.collides&&a(i,l,h),c};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(29),d=function(a){return a=a.toLowerCase(),a==="isometric"?n.ISOMETRIC:a==="staggered"?n.STAGGERED:a==="hexagonal"?n.HEXAGONAL:n.ORTHOGONAL};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(40),d=t(120),a=t(121),o=t(85),r=function(e,i,l,s,h){for(var f=new d({tileWidth:l,tileHeight:s}),v=new a({name:e,tileWidth:l,tileHeight:s,format:n.ARRAY_2D,layers:[f]}),u=[],c=i.length,x=0,g=0;g + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(571),d=t(261),a=function(e){return{x:e.x,y:e.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"],r=function(e,i,l){i===void 0&&(i=0),l===void 0&&(l=0);var s=n(e,o);if(s.x+=i,s.y+=l,e.gid){var h=d(e.gid);s.gid=h.gid,s.flippedHorizontal=h.flippedHorizontal,s.flippedVertical=h.flippedVertical,s.flippedAntiDiagonal=h.flippedAntiDiagonal}else e.polyline?s.polyline=e.polyline.map(a):e.polygon?s.polygon=e.polygon.map(a):e.ellipse?s.ellipse=e.ellipse:e.text?s.text=e.text:e.point?s.point=!0:s.rectangle=!0;return s};p.exports=r},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=2147483648,n=1073741824,d=536870912,a=function(o){var r=Boolean(o&t),e=Boolean(o&n),i=Boolean(o&d);o=o&~(t|n|d);var l=0,s=!1;return r&&e&&i?(l=Math.PI/2,s=!0):r&&e&&!i?(l=Math.PI,s=!1):r&&!e&&i?(l=Math.PI/2,s=!1):r&&!e&&!i?(l=0,s=!0):!r&&e&&i?(l=3*Math.PI/2,s=!1):!r&&e&&!i?(l=Math.PI,s=!0):!r&&!e&&i?(l=3*Math.PI/2,s=!0):!r&&!e&&!i&&(l=0,s=!1),{gid:o,flippedHorizontal:r,flippedVertical:e,flippedAntiDiagonal:i,rotation:l,flipped:s}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(40),d=t(121),a=t(564),o=t(580),r=function(e,i,l,s,h,f,v,u){l===void 0&&(l=32),s===void 0&&(s=32),h===void 0&&(h=10),f===void 0&&(f=10),u===void 0&&(u=!1);var c=null;if(Array.isArray(v)){var x=i!==void 0?i:"map";c=a(x,n.ARRAY_2D,v,l,s,u)}else if(i!==void 0){var g=e.cache.tilemap.get(i);g?c=a(i,g.format,g.data,l,s,u):console.warn("No map data found for key "+i)}return c===null&&(c=new d({tileWidth:l,tileHeight:s,width:h,height:f})),new o(e,c)};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(6),d=function(a){var o=n(a,"targets",null);return o===null||(typeof o=="function"&&(o=o.call()),Array.isArray(o)||(o=[o])),o};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function t(r){return!!r.getActive&&typeof r.getActive=="function"}function n(r){return!!r.getStart&&typeof r.getStart=="function"}function d(r){return!!r.getEnd&&typeof r.getEnd=="function"}function a(r){return n(r)||d(r)||t(r)}var o=function(r,e){var i,l=function(T,S,C){return C},s=function(T,S,C){return C},h=null,f=typeof e;if(f==="number")l=function(){return e};else if(f==="string"){var v=e[0],u=parseFloat(e.substr(2));switch(v){case"+":l=function(T,S,C){return C+u};break;case"-":l=function(T,S,C){return C-u};break;case"*":l=function(T,S,C){return C*u};break;case"/":l=function(T,S,C){return C/u};break;default:l=function(){return parseFloat(e)}}}else if(f==="function")l=e;else if(f==="object")if(a(e))t(e)&&(h=e.getActive),d(e)&&(l=e.getEnd),n(e)&&(s=e.getStart);else if(e.hasOwnProperty("value"))i=o(r,e.value);else{var c=e.hasOwnProperty("to"),x=e.hasOwnProperty("from"),g=e.hasOwnProperty("start");if(c&&(x||g)){if(i=o(r,e.to),g){var m=o(r,e.start);i.getActive=m.getEnd}if(x){var y=o(r,e.from);i.getStart=y.getEnd}}}return i||(i={getActive:h,getEnd:l,getStart:s}),i};p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(9),a=t(267),o=t(16),r=t(5),e=t(100),i=t(14),l=new n({Extends:d,initialize:function(h,f,v){d.call(this),this.parent=h,this.parentIsTimeline=h.hasOwnProperty("isTimeline"),this.data=f,this.totalData=f.length,this.targets=v,this.totalTargets=v.length,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.startDelay=0,this.hasStarted=!1,this.isSeeking=!1,this.completeDelay=0,this.countdown=0,this.offset=0,this.calculatedOffset=0,this.state=e.PENDING_ADD,this._pausedState=e.INIT,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onActive:null,onComplete:null,onLoop:null,onRepeat:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope},getValue:function(s){return s===void 0&&(s=0),this.data[s].current},setTimeScale:function(s){return this.timeScale=s,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===e.ACTIVE},isPaused:function(){return this.state===e.PAUSED},hasTarget:function(s){return this.targets.indexOf(s)!==-1},updateTo:function(s,h,f){f===void 0&&(f=!1);for(var v=0;v0&&(u.totalDuration+=u.t2*u.repeat),u.totalDuration>s&&(s=u.totalDuration),u.delay0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=h},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=e.PENDING_ADD,this._pausedState=e.INIT,!1;for(var s=this.data,h=this.totalTargets,f=0;f0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=e.LOOP_DELAY):(this.state=e.ACTIVE,this.dispatchTweenEvent(a.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=e.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=e.PENDING_REMOVE,this.dispatchTweenEvent(a.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===e.PAUSED?this:(this.paused=!0,this._pausedState=this.state,this.state=e.PAUSED,this)},play:function(s){s===void 0&&(s=!1);var h=this.state;return h===e.INIT&&!this.parentIsTimeline?(this.resetTweenData(!1),this.state=e.ACTIVE,this):h===e.ACTIVE||h===e.PENDING_ADD&&this._pausedState===e.PENDING_ADD?this:!this.parentIsTimeline&&(h===e.PENDING_REMOVE||h===e.REMOVED)?(this.seek(0),this.parent.makeActive(this),this):(this.parentIsTimeline?(this.resetTweenData(s),this.calculatedOffset===0?this.state=e.ACTIVE:(this.countdown=this.calculatedOffset,this.state=e.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(s),this.state=e.ACTIVE,this.makeActive()),this)},resetTweenData:function(s){for(var h=this.data,f=this.totalData,v=this.totalTargets,u=0;u0&&(c.elapsed=c.delay,c.state=e.DELAY),c.getActiveValue&&(x[g]=c.getActiveValue(c.target,c.key,c.start))}},resume:function(){return this.state===e.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(s,h){h===void 0&&(h=16.6),this.state===e.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var f=this.data,v=this.totalTargets,u=0;u0&&(c.elapsed=c.delay,c.state=e.DELAY)}this.calcDuration();var T=!1;this.state===e.PAUSED&&(T=!0,this.state=e.ACTIVE),this.isSeeking=!0;do this.update(0,h);while(this.totalProgress0?(h.repeatCounter--,h.elapsed=f,h.progress=f/h.duration,h.flipX&&h.target.toggleFlipX(),h.flipY&&h.target.toggleFlipY(),h.start=h.getStartValue(h.target,h.key,h.start,h.index,s.totalTargets,s),h.end=h.getEndValue(h.target,h.key,h.start,h.index,s.totalTargets,s),h.repeatDelay>0?(h.elapsed=h.repeatDelay-f,h.current=h.start,h.target[h.key]=h.current,e.REPEAT_DELAY):(this.dispatchTweenDataEvent(a.TWEEN_REPEAT,s.callbacks.onRepeat,h),e.PLAYING_FORWARD)):e.COMPLETE},setStateFromStart:function(s,h,f){return h.repeatCounter>0?(h.repeatCounter--,h.elapsed=f,h.progress=f/h.duration,h.flipX&&h.target.toggleFlipX(),h.flipY&&h.target.toggleFlipY(),h.end=h.getEndValue(h.target,h.key,h.start,h.index,s.totalTargets,s),h.repeatDelay>0?(h.elapsed=h.repeatDelay-f,h.current=h.start,h.target[h.key]=h.current,e.REPEAT_DELAY):(this.dispatchTweenDataEvent(a.TWEEN_REPEAT,s.callbacks.onRepeat,h),e.PLAYING_FORWARD)):e.COMPLETE},updateTweenData:function(s,h,f){var v=h.target;switch(h.state){case e.PLAYING_FORWARD:case e.PLAYING_BACKWARD:if(!v){h.state=e.COMPLETE;break}var u=h.elapsed,c=h.duration,x=0;u+=f,u>c&&(x=u-c,u=c);var g=h.state===e.PLAYING_FORWARD,m=u/c;if(h.elapsed=u,h.progress=m,h.previous=h.current,m===1)g?(h.current=h.end,v[h.key]=h.end,h.hold>0?(h.elapsed=h.hold-x,h.state=e.HOLD_DELAY):h.state=this.setStateFromEnd(s,h,x)):(h.current=h.start,v[h.key]=h.start,h.state=this.setStateFromStart(s,h,x));else{var y=g?h.ease(m):h.ease(1-m);h.current=h.start+(h.end-h.start)*y,v[h.key]=h.current}this.dispatchTweenDataEvent(a.TWEEN_UPDATE,s.callbacks.onUpdate,h);break;case e.DELAY:h.elapsed-=f,h.elapsed<=0&&(h.elapsed=Math.abs(h.elapsed),h.state=e.PENDING_RENDER);break;case e.REPEAT_DELAY:h.elapsed-=f,h.elapsed<=0&&(h.elapsed=Math.abs(h.elapsed),h.state=e.PLAYING_FORWARD,this.dispatchTweenDataEvent(a.TWEEN_REPEAT,s.callbacks.onRepeat,h));break;case e.HOLD_DELAY:h.elapsed-=f,h.elapsed<=0&&(h.state=this.setStateFromEnd(s,h,Math.abs(h.elapsed)));break;case e.PENDING_RENDER:v?(h.start=h.getStartValue(v,h.key,v[h.key],h.index,s.totalTargets,s),h.end=h.getEndValue(v,h.key,h.start,h.index,s.totalTargets,s),h.current=h.start,v[h.key]=h.start,h.state=e.PLAYING_FORWARD):h.state=e.COMPLETE;break}return h.state!==e.COMPLETE}});l.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onStop","onUpdate","onYoyo"],r.register("tween",function(s){return this.scene.sys.tweens.add(s)}),o.register("tween",function(s){return this.scene.sys.tweens.create(s)}),p.exports=l},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={TIMELINE_COMPLETE:t(1466),TIMELINE_LOOP:t(1467),TIMELINE_PAUSE:t(1468),TIMELINE_RESUME:t(1469),TIMELINE_START:t(1470),TIMELINE_UPDATE:t(1471),TWEEN_ACTIVE:t(1472),TWEEN_COMPLETE:t(1473),TWEEN_LOOP:t(1474),TWEEN_REPEAT:t(1475),TWEEN_START:t(1476),TWEEN_STOP:t(1477),TWEEN_UPDATE:t(1478),TWEEN_YOYO:t(1479)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r,e,i,l,s,h,f,v,u,c,x){return{target:n,index:d,key:a,getActiveValue:e,getEndValue:o,getStartValue:r,ease:i,duration:0,totalDuration:0,delay:0,yoyo:h,hold:0,repeat:0,repeatDelay:0,flipX:c,flipY:x,progress:0,elapsed:0,repeatCounter:0,start:0,previous:0,current:0,end:0,t1:0,t2:0,gen:{delay:l,duration:s,hold:f,repeat:v,repeatDelay:u},state:0}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(68),d=function(a){return n(a,-Math.PI,Math.PI)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(68),d=function(a){return n(a,-180,180)};p.exports=d},function(p,E,t){var n={};p.exports=n;var d=t(83),a=t(32);(function(){n.fromVertices=function(o){for(var r={},e=0;e + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AFTER_ADD:t(1504),AFTER_REMOVE:t(1505),AFTER_UPDATE:t(1506),BEFORE_ADD:t(1507),BEFORE_REMOVE:t(1508),BEFORE_UPDATE:t(1509),COLLISION_ACTIVE:t(1510),COLLISION_END:t(1511),COLLISION_START:t(1512),DRAG_END:t(1513),DRAG:t(1514),DRAG_START:t(1515),PAUSE:t(1516),RESUME:t(1517),SLEEP_END:t(1518),SLEEP_START:t(1519)}},function(p,E,t){var n={};p.exports=n;var d=t(274),a=t(250),o=t(84);(function(){n.collisions=function(r,e){for(var i=[],l=e.pairs.table,s=e.metrics,h=0;h1?1:0;u1?1:0;x0:(r.mask&e.category)!==0&&(e.mask&r.category)!==0}})()},function(p,E,t){var n={};p.exports=n;var d=t(64),a=t(83);(function(){n.collides=function(o,r,e){var i,l,s,h,f=!1;if(e){var v=o.parent,u=r.parent,c=v.speed*v.speed+v.angularSpeed*v.angularSpeed+u.speed*u.speed+u.angularSpeed*u.angularSpeed;f=e&&e.collided&&c<.2,h=e}else h={collided:!1,bodyA:o,bodyB:r};if(e&&f){var x=h.axisBody,g=x===o?r:o,m=[x.axes[e.axisNumber]];if(s=n._overlapAxes(x.vertices,g.vertices,m),h.reused=!0,s.overlap<=0)return h.collided=!1,h}else{if(i=n._overlapAxes(o.vertices,r.vertices,o.axes),i.overlap<=0||(l=n._overlapAxes(r.vertices,o.vertices,r.axes),l.overlap<=0))return h.collided=!1,h;i.overlapl?l=h:h=0?u.index-1:s.length-1;v=s[g],l.x=v.x-h.x,l.y=v.y-h.y,i=-a.dot(e,l),c=v;var m=(u.index+1)%s.length;return v=s[m],l.x=v.x-h.x,l.y=v.y-h.y,f=-a.dot(e,l),f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AlignTo:t(601),Angle:t(602),Call:t(603),GetFirst:t(604),GetLast:t(605),GridAlign:t(606),IncAlpha:t(678),IncX:t(679),IncXY:t(680),IncY:t(681),PlaceOnCircle:t(682),PlaceOnEllipse:t(683),PlaceOnLine:t(684),PlaceOnRectangle:t(685),PlaceOnTriangle:t(686),PlayAnimation:t(687),PropertyValueInc:t(46),PropertyValueSet:t(27),RandomCircle:t(688),RandomEllipse:t(689),RandomLine:t(690),RandomRectangle:t(691),RandomTriangle:t(692),Rotate:t(693),RotateAround:t(694),RotateAroundDistance:t(695),ScaleX:t(696),ScaleXY:t(697),ScaleY:t(698),SetAlpha:t(699),SetBlendMode:t(700),SetDepth:t(701),SetHitArea:t(702),SetOrigin:t(703),SetRotation:t(704),SetScale:t(705),SetScaleX:t(706),SetScaleY:t(707),SetScrollFactor:t(708),SetScrollFactorX:t(709),SetScrollFactorY:t(710),SetTint:t(711),SetVisible:t(712),SetX:t(713),SetXY:t(714),SetY:t(715),ShiftPosition:t(716),Shuffle:t(717),SmootherStep:t(718),SmoothStep:t(719),Spread:t(720),ToggleVisible:t(721),WrapInRectangle:t(722)}},function(p,E,t){/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(123),d=[];d[n.BOTTOM_CENTER]=t(277),d[n.BOTTOM_LEFT]=t(278),d[n.BOTTOM_RIGHT]=t(279),d[n.LEFT_BOTTOM]=t(280),d[n.LEFT_CENTER]=t(281),d[n.LEFT_TOP]=t(282),d[n.RIGHT_BOTTOM]=t(283),d[n.RIGHT_CENTER]=t(284),d[n.RIGHT_TOP]=t(285),d[n.TOP_CENTER]=t(286),d[n.TOP_LEFT]=t(287),d[n.TOP_RIGHT]=t(288);var a=function(o,r,e,i,l){return d[e](o,r,i,l)};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(42),d=t(87),a=t(88),o=t(52),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),a(e,d(i)+l),o(e,n(i)+s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(42),d=t(43),a=t(53),o=t(52),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),a(e,d(i)-l),o(e,n(i)+s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(42),d=t(44),a=t(54),o=t(52),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),a(e,d(i)+l),o(e,n(i)+s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(42),d=t(43),a=t(55),o=t(54),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),o(e,d(i)-l),a(e,n(i)+s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(89),d=t(43),a=t(90),o=t(54),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),o(e,d(i)-l),a(e,n(i)+s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(43),d=t(45),a=t(54),o=t(52),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),a(e,n(i)-l),o(e,d(i)-s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(42),d=t(44),a=t(55),o=t(53),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),o(e,d(i)+l),a(e,n(i)+s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(89),d=t(44),a=t(90),o=t(53),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),o(e,d(i)+l),a(e,n(i)+s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(44),d=t(45),a=t(53),o=t(52),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),a(e,n(i)+l),o(e,d(i)-s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(87),d=t(45),a=t(55),o=t(88),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),o(e,n(i)+l),a(e,d(i)-s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(43),d=t(45),a=t(55),o=t(53),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),o(e,n(i)-l),a(e,d(i)-s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(44),d=t(45),a=t(55),o=t(54),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),o(e,n(i)+l),a(e,d(i)-s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(123),d=[];d[n.BOTTOM_CENTER]=t(290),d[n.BOTTOM_LEFT]=t(291),d[n.BOTTOM_RIGHT]=t(292),d[n.CENTER]=t(293),d[n.LEFT_CENTER]=t(295),d[n.RIGHT_CENTER]=t(296),d[n.TOP_CENTER]=t(297),d[n.TOP_LEFT]=t(298),d[n.TOP_RIGHT]=t(299),d[n.LEFT_BOTTOM]=d[n.BOTTOM_LEFT],d[n.LEFT_TOP]=d[n.TOP_LEFT],d[n.RIGHT_BOTTOM]=d[n.BOTTOM_RIGHT],d[n.RIGHT_TOP]=d[n.TOP_RIGHT];var a=function(o,r,e,i,l){return d[e](o,r,i,l)};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(42),d=t(87),a=t(55),o=t(88),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),o(e,d(i)+l),a(e,n(i)+s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(42),d=t(43),a=t(55),o=t(53),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),o(e,d(i)-l),a(e,n(i)+s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(42),d=t(44),a=t(55),o=t(54),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),o(e,d(i)+l),a(e,n(i)+s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(294),d=t(87),a=t(89),o=function(r,e,i,l){return i===void 0&&(i=0),l===void 0&&(l=0),n(r,d(e)+i,a(e)+l),r};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(88),d=t(90),a=function(o,r,e){return n(o,r),d(o,e)};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(89),d=t(43),a=t(90),o=t(53),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),o(e,d(i)-l),a(e,n(i)+s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(89),d=t(44),a=t(90),o=t(54),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),o(e,d(i)+l),a(e,n(i)+s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(87),d=t(45),a=t(88),o=t(52),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),a(e,n(i)+l),o(e,d(i)-s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(43),d=t(45),a=t(53),o=t(52),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),a(e,n(i)-l),o(e,d(i)-s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(44),d=t(45),a=t(54),o=t(52),r=function(e,i,l,s){return l===void 0&&(l=0),s===void 0&&(s=0),a(e,n(i)+l),o(e,d(i)-s),e};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(169),d=t(98),a=t(14),o=t(4),r=function(e,i,l){l===void 0&&(l=new o);var s=d(i,0,a.PI2);return n(e,s,l)};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(302),d=t(169),a=t(98),o=t(14),r=function(e,i,l,s){s===void 0&&(s=[]),!i&&l>0&&(i=n(e)/l);for(var h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return 2*(Math.PI*n.radius)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(18),d=2,a={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(o){return o===void 0&&(o=1),this.alpha=o,this},alpha:{get:function(){return this._alpha},set:function(o){var r=n(o,0,1);this._alpha=r,r===0?this.renderFlags&=~d:this.renderFlags|=d}}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(35),d={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(a){typeof a=="string"&&(a=n[a]),a|=0,a>=-1&&(this._blendMode=a)}},setBlendMode:function(a){return this.blendMode=a,this}};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={_depth:0,depth:{get:function(){return this._depth},set:function(n){this.displayList&&this.displayList.queueDepthSort(),this._depth=n}},setDepth:function(n){return n===void 0&&(n=0),this.depth=n,this}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(171),d=t(130),a=function(o,r,e,i){i===void 0&&(i=[]),!r&&e>0&&(r=d(o)/e);for(var l=0;l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o,r){return r===void 0&&(r=new n),r.x=a.x1+(a.x2-a.x1)*o,r.y=a.y1+(a.y2-a.y1)*o,r};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=Math.cos(o),e=Math.sin(o),i=n.x-d,l=n.y-a;return n.x=i*r-l*e+d,n.y=i*e+l*r+a,n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(310),d=t(311),a={mask:null,setMask:function(o){return this.mask=o,this},clearMask:function(o){return o===void 0&&(o=!1),o&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(o){return o===void 0&&(this.texture||this.shader)&&(o=this),new n(this.scene,o)},createGeometryMask:function(o){return o===void 0&&this.type==="Graphics"&&(o=this),new d(this.scene,o)}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(22),a=t(91),o=new n({initialize:function(e,i){var l=e.sys.renderer;this.renderer=l,this.bitmapMask=i,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,this.createMask(),e.sys.game.events.on(d.CONTEXT_RESTORED,this.createMask,this),l&&l.on(a.RESIZE,this.createMask,this)},createMask:function(){var r=this.renderer;if(!(!r||!r.gl)){this.mainTexture&&this.clearMask();var e=r.width,i=r.height,l=(e&e-1)===0&&(i&i-1)===0,s=r.gl,h=l?s.REPEAT:s.CLAMP_TO_EDGE,f=s.LINEAR;this.mainTexture=r.createTexture2D(0,f,f,h,h,s.RGBA,null,e,i),this.maskTexture=r.createTexture2D(0,f,f,h,h,s.RGBA,null,e,i),this.mainFramebuffer=r.createFramebuffer(e,i,this.mainTexture,!0),this.maskFramebuffer=r.createFramebuffer(e,i,this.maskTexture,!0)}},clearMask:function(){var r=this.renderer;!r||!r.gl||!this.mainTexture||(r.deleteTexture(this.mainTexture),r.deleteTexture(this.maskTexture),r.deleteFramebuffer(this.mainFramebuffer),r.deleteFramebuffer(this.maskFramebuffer),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null)},setBitmap:function(r){this.bitmapMask=r},preRenderWebGL:function(r,e,i){r.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(r,e){r.pipelines.BITMAPMASK_PIPELINE.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.clearMask(),this.renderer&&this.renderer.off(a.RESIZE,this.createMask,this),this.bitmapMask=null,this.prevFramebuffer=null,this.renderer=null}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o,r){this.geometryMask=r,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(a){return this.geometryMask=a,this},setInvertAlpha:function(a){return a===void 0&&(a=!0),this.invertAlpha=a,this},preRenderWebGL:function(a,o,r){var e=a.gl;a.flush(),a.maskStack.length===0&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),a.maskCount=0),a.currentCameraMask.mask!==this&&(a.currentMask.mask=this),a.maskStack.push({mask:this,camera:r}),this.applyStencil(a,r,!0),a.maskCount++},applyStencil:function(a,o,r){var e=a.gl,i=this.geometryMask,l=a.maskCount;e.colorMask(!1,!1,!1,!1),r?(e.stencilFunc(e.EQUAL,l,255),e.stencilOp(e.KEEP,e.KEEP,e.INCR)):(e.stencilFunc(e.EQUAL,l+1,255),e.stencilOp(e.KEEP,e.KEEP,e.DECR)),i.renderWebGL(a,i,o),a.flush(),e.colorMask(!0,!0,!0,!0),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),r?this.invertAlpha?e.stencilFunc(e.NOTEQUAL,l+1,255):e.stencilFunc(e.EQUAL,l+1,255):this.invertAlpha?e.stencilFunc(e.NOTEQUAL,l,255):e.stencilFunc(e.EQUAL,l,255)},postRenderWebGL:function(a){var o=a.gl;a.maskStack.pop(),a.maskCount--,a.flush();var r=a.currentMask;if(a.maskStack.length===0)r.mask=null,o.disable(o.STENCIL_TEST);else{var e=a.maskStack[a.maskStack.length-1];e.mask.applyStencil(a,e.camera,!1),a.currentCameraMask.mask!==e.mask?(r.mask=e.mask,r.camera=e.camera):r.mask=null}},preRenderCanvas:function(a,o,r){var e=this.geometryMask;a.currentContext.save(),e.renderCanvas(a,e,r,null,null,!0),a.currentContext.clip()},postRenderCanvas:function(a){a.currentContext.restore()},destroy:function(){this.geometryMask=null}});p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(n,d){return d===void 0&&(d=n),this.scrollFactorX=n,this.scrollFactorY=d,this}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(14),d=t(25),a=t(177),o=t(269),r=t(270),e=t(3),i=4,l={_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(s){this._scaleX=s,this._scaleY=s,s===0?this.renderFlags&=~i:this.renderFlags|=i}},scaleX:{get:function(){return this._scaleX},set:function(s){this._scaleX=s,s===0?this.renderFlags&=~i:this.renderFlags|=i}},scaleY:{get:function(){return this._scaleY},set:function(s){this._scaleY=s,s===0?this.renderFlags&=~i:this.renderFlags|=i}},angle:{get:function(){return r(this._rotation*n.RAD_TO_DEG)},set:function(s){this.rotation=r(s)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(s){this._rotation=o(s)}},setPosition:function(s,h,f,v){return s===void 0&&(s=0),h===void 0&&(h=s),f===void 0&&(f=0),v===void 0&&(v=0),this.x=s,this.y=h,this.z=f,this.w=v,this},copyPosition:function(s){return s.x!==void 0&&(this.x=s.x),s.y!==void 0&&(this.y=s.y),s.z!==void 0&&(this.z=s.z),s.w!==void 0&&(this.w=s.w),this},setRandomPosition:function(s,h,f,v){return s===void 0&&(s=0),h===void 0&&(h=0),f===void 0&&(f=this.scene.sys.scale.width),v===void 0&&(v=this.scene.sys.scale.height),this.x=s+Math.random()*f,this.y=h+Math.random()*v,this},setRotation:function(s){return s===void 0&&(s=0),this.rotation=s,this},setAngle:function(s){return s===void 0&&(s=0),this.angle=s,this},setScale:function(s,h){return s===void 0&&(s=1),h===void 0&&(h=s),this.scaleX=s,this.scaleY=h,this},setX:function(s){return s===void 0&&(s=0),this.x=s,this},setY:function(s){return s===void 0&&(s=0),this.y=s,this},setZ:function(s){return s===void 0&&(s=0),this.z=s,this},setW:function(s){return s===void 0&&(s=0),this.w=s,this},getLocalTransformMatrix:function(s){return s===void 0&&(s=new d),s.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(s,h){s===void 0&&(s=new d),h===void 0&&(h=new d);var f=this.parentContainer;if(!f)return this.getLocalTransformMatrix(s);for(s.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);f;)h.applyITRS(f.x,f.y,f._rotation,f._scaleX,f._scaleY),h.multiply(s,s),f=f.parentContainer;return s},getLocalPoint:function(s,h,f,v){f||(f=new e),v||(v=this.scene.sys.cameras.main);var u=v.scrollX,c=v.scrollY,x=s+u*this.scrollFactorX-u,g=h+c*this.scrollFactorY-c;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(x,g,f):a(x,g,this.x,this.y,this.rotation,this.scaleX,this.scaleY,f),this._originComponent&&(f.x+=this._displayOriginX,f.y+=this._displayOriginY),f},getParentRotation:function(){for(var s=0,h=this.parentContainer;h;)s+=h.rotation,h=h.parentContainer;return s}};p.exports=l},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=1,n={_visible:!0,visible:{get:function(){return this._visible},set:function(d){d?(this._visible=!0,this.renderFlags|=t):(this._visible=!1,this.renderFlags&=~t)}},setVisible:function(d){return this.visible=d,this}};p.exports=n},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CHANGE_DATA:t(638),CHANGE_DATA_KEY:t(639),DESTROY:t(640),REMOVE_DATA:t(641),SET_DATA:t(642)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(130),d=t(4),a=function(o,r,e,i){if(i===void 0&&(i=[]),!r&&!e)return i;r?e=Math.round(n(o)/r):r=n(o)/e;for(var l=o.x,s=o.y,h=0,f=0;f=o.right&&(h=1,s+=l-o.right,l=o.right);break;case 1:s+=r,s>=o.bottom&&(h=2,l-=s-o.bottom,s=o.bottom);break;case 2:l-=r,l<=o.left&&(h=3,s-=o.left-l,l=o.left);break;case 3:s-=r,s<=o.top&&(h=0,s=o.top);break}return i};p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){d===void 0&&(d=1),a===void 0&&(a=[]);var o=Math.round(n.x1),r=Math.round(n.y1),e=Math.round(n.x2),i=Math.round(n.y2),l=Math.abs(e-o),s=Math.abs(i-r),h=o-s&&(v-=s,o+=h),c + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){if(d.length){if(d.length===1)return d[0]}else return NaN;var o=1,r,e;if(a){if(nd.length&&(o=d.length),a?(r=d[o-1][a],e=d[o][a],e-n<=n-r?d[o]:d[o-1]):(r=d[o-1],e=d[o],e-n<=n-r?e:r)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o,r,e,i,l){l===void 0&&(l=!1),this.textureKey=o,this.textureFrame=r,this.index=e,this.frame=i,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=l},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d=/\D/g;return n.sort(function(a,o){return parseInt(a.replace(d,""),10)-parseInt(o.replace(d,""),10)}),n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(185),d=t(0),a=t(102),o=t(9),r=t(132),e=t(22),i=t(2),l=t(6),s=t(186),h=t(322),f=new d({Extends:o,initialize:function(u){o.call(this),this.game=u,this.textureManager=null,this.globalTimeScale=1,this.anims=new a,this.mixes=new a,this.paused=!1,this.name="AnimationManager",u.events.once(e.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(e.DESTROY,this.destroy,this)},addMix:function(v,u,c){var x=this.anims,g=this.mixes,m=typeof v=="string"?v:v.key,y=typeof u=="string"?u:u.key;if(x.has(m)&&x.has(y)){var T=g.get(m);T||(T={}),T[y]=c,g.set(m,T)}return this},removeMix:function(v,u){var c=this.mixes,x=typeof v=="string"?v:v.key,g=c.get(x);if(g)if(u){var m=typeof u=="string"?u:u.key;g.hasOwnProperty(m)&&delete g[m]}else u||c.delete(x);return this},getMix:function(v,u){var c=this.mixes,x=typeof v=="string"?v:v.key,g=typeof u=="string"?u:u.key,m=c.get(x);return m&&m.hasOwnProperty(g)?m[g]:0},add:function(v,u){return this.anims.has(v)?(console.warn("Animation key exists: "+v),this):(u.key=v,this.anims.set(v,u),this.emit(r.ADD_ANIMATION,v,u),this)},exists:function(v){return this.anims.has(v)},createFromAseprite:function(v,u){var c=[],x=this.game.cache.json.get(v);if(!x)return c;var g=this,m=l(x,"meta",null),y=l(x,"frames",null);if(m&&y){var T=l(m,"frameTags",[]);T.forEach(function(S){var C=[],P=i(S,"name",null),A=i(S,"from",0),M=i(S,"to",0),L=i(S,"direction","forward");if(!!P&&(!u||u&&u.indexOf(P)>-1)){for(var F=[],B=Number.MAX_SAFE_INTEGER,N=A;N<=M;N++){var X=N.toString(),V=y[X];if(V){var W=i(V,"duration",Number.MAX_SAFE_INTEGER);W + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=[],e,i=!1;if((a||o)&&(i=!0,a||(a=""),o||(o="")),d=d;e--)i?r.push(a+e.toString()+o):r.push(e);else for(e=n;e<=d;e++)i?r.push(a+e.toString()+o):r.push(e);return r};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(102),a=t(9),o=t(324),r=new n({initialize:function(){this.entries=new d,this.events=new a},add:function(e,i){return this.entries.set(e,i),this.events.emit(o.ADD,this,e,i),this},has:function(e){return this.entries.has(e)},exists:function(e){return this.entries.has(e)},get:function(e){return this.entries.get(e)},remove:function(e){var i=this.get(e);return i&&(this.entries.delete(e),this.events.emit(o.REMOVE,this,e,i.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ADD:t(736),REMOVE:t(737)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(323),d=t(0),a=t(22),o=new d({initialize:function(e){this.game=e,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.video=new n,this.text=new n,this.html=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once(a.DESTROY,this.destroy,this)},addCustom:function(r){return this.custom.hasOwnProperty(r)||(this.custom[r]=new n),this.custom[r]},destroy:function(){for(var r=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(133),d=t(190),a=t(18),o=t(0),r=t(11),e=t(333),i=t(37),l=t(135),s=t(10),h=t(3),f=new o({Extends:n,Mixins:[r.Flip,r.Tint,r.Pipeline],initialize:function(u,c,x,g){n.call(this,u,c,x,g),this.postPipelines=[],this.pipelineData={},this.inputEnabled=!0,this.fadeEffect=new e.Fade(this),this.flashEffect=new e.Flash(this),this.shakeEffect=new e.Shake(this),this.panEffect=new e.Pan(this),this.rotateToEffect=new e.RotateTo(this),this.zoomEffect=new e.Zoom(this),this.lerp=new h(1,1),this.followOffset=new h,this.deadzone=null,this._follow=null},setDeadzone:function(v,u){if(v===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=v,this.deadzone.height=u):this.deadzone=new s(0,0,v,u),this._follow){var c=this.width/2,x=this.height/2,g=this._follow.x-this.followOffset.x,m=this._follow.y-this.followOffset.y;this.midPoint.set(g,m),this.scrollX=g-c,this.scrollY=m-x}d(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(v,u,c,x,g,m){return this.fadeEffect.start(!1,v,u,c,x,!0,g,m)},fadeOut:function(v,u,c,x,g,m){return this.fadeEffect.start(!0,v,u,c,x,!0,g,m)},fadeFrom:function(v,u,c,x,g,m,y){return this.fadeEffect.start(!1,v,u,c,x,g,m,y)},fade:function(v,u,c,x,g,m,y){return this.fadeEffect.start(!0,v,u,c,x,g,m,y)},flash:function(v,u,c,x,g,m,y){return this.flashEffect.start(v,u,c,x,g,m,y)},shake:function(v,u,c,x,g){return this.shakeEffect.start(v,u,c,x,g)},pan:function(v,u,c,x,g,m,y){return this.panEffect.start(v,u,c,x,g,m,y)},rotateTo:function(v,u,c,x,g,m,y){return this.rotateToEffect.start(v,u,c,x,g,m,y)},zoomTo:function(v,u,c,x,g,m){return this.zoomEffect.start(v,u,c,x,g,m)},preRender:function(){this.renderList.length=0;var v=this.width,u=this.height,c=v*.5,x=u*.5,g=this.zoom,m=this.matrix,y=v*this.originX,T=u*this.originY,S=this._follow,C=this.deadzone,P=this.scrollX,A=this.scrollY;C&&d(C,this.midPoint.x,this.midPoint.y);var M=!1;if(S&&!this.panEffect.isRunning){var L=S.x-this.followOffset.x,F=S.y-this.followOffset.y;C?(LC.right&&(P=l(P,P+(L-C.right),this.lerp.x)),FC.bottom&&(A=l(A,A+(F-C.bottom),this.lerp.y))):(P=l(P,L-y,this.lerp.x),A=l(A,F-T,this.lerp.y)),M=!0}this.useBounds&&(P=this.clampX(P),A=this.clampY(A)),this.roundPixels&&(y=Math.round(y),T=Math.round(T),P=Math.round(P),A=Math.round(A)),this.scrollX=P,this.scrollY=A;var B=P+c,N=A+x;this.midPoint.set(B,N);var X=v/g,V=u/g,W=B-X/2,O=N-V/2;this.roundPixels&&(W=Math.round(W),O=Math.round(O)),this.worldView.setTo(W,O,X,V),m.applyITRS(this.x+y,this.y+T,this.rotation,g,g),m.translate(-y,-T),this.shakeEffect.preRender(),M&&this.emit(i.FOLLOW_UPDATE,this,S)},setLerp:function(v,u){return v===void 0&&(v=1),u===void 0&&(u=v),this.lerp.set(v,u),this},setFollowOffset:function(v,u){return v===void 0&&(v=0),u===void 0&&(u=0),this.followOffset.set(v,u),this},startFollow:function(v,u,c,x,g,m){u===void 0&&(u=!1),c===void 0&&(c=1),x===void 0&&(x=c),g===void 0&&(g=0),m===void 0&&(m=g),this._follow=v,this.roundPixels=u,c=a(c,0,1),x=a(x,0,1),this.lerp.set(c,x),this.followOffset.set(g,m);var y=this.width/2,T=this.height/2,S=v.x-g,C=v.y-m;return this.midPoint.set(S,C),this.scrollX=S-y,this.scrollY=C-T,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(v,u){this.visible&&(this.rotateToEffect.update(v,u),this.panEffect.update(v,u),this.zoomEffect.update(v,u),this.shakeEffect.update(v,u),this.flashEffect.update(v,u),this.fadeEffect.update(v,u))},destroy:function(){this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});p.exports=f},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(38),d=function(a){var o=new n;a=a.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(s,h,f,v){return h+h+f+f+v+v});var r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);if(r){var e=parseInt(r[1],16),i=parseInt(r[2],16),l=parseInt(r[3],16);o.setTo(e,i,l)}return o};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){return o<<24|n<<16|d<<8|a};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){o===void 0&&(o={h:0,s:0,v:0}),n/=255,d/=255,a/=255;var r=Math.min(n,d,a),e=Math.max(n,d,a),i=e-r,l=0,s=e===0?0:i/e,h=e;return e!==r&&(e===n?l=(d-a)/i+(d + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n>16777215?{a:n>>>24,r:n>>16&255,g:n>>8&255,b:n&255}:{a:255,r:n>>16&255,g:n>>8&255,b:n&255}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(38),d=function(a){return new n(a.r,a.g,a.b,a.a)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(38),d=function(a){var o=new n,r=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(a.toLowerCase());if(r){var e=parseInt(r[1],10),i=parseInt(r[2],10),l=parseInt(r[3],10),s=r[4]!==void 0?parseFloat(r[4]):1;o.setTo(e,i,l,s*255)}return o};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Fade:t(761),Flash:t(762),Pan:t(763),Shake:t(796),RotateTo:t(797),Zoom:t(798)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(764),Out:t(765),InOut:t(766)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(767),Out:t(768),InOut:t(769)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(770),Out:t(771),InOut:t(772)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(773),Out:t(774),InOut:t(775)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(776),Out:t(777),InOut:t(778)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(779),Out:t(780),InOut:t(781)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports=t(782)},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(783),Out:t(784),InOut:t(785)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(786),Out:t(787),InOut:t(788)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(789),Out:t(790),InOut:t(791)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={In:t(792),Out:t(793),InOut:t(794)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports=t(795)},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(33),a=t(347),o=t(2),r=t(6),e=t(7),i=t(193),l=t(1),s=t(197),h=t(187),f=new n({initialize:function(u){u===void 0&&(u={});var c=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],x="#ffffff";this.width=r(u,"width",1024),this.height=r(u,"height",768),this.zoom=r(u,"zoom",1),this.parent=r(u,"parent",void 0),this.scaleMode=r(u,"scaleMode",0),this.expandParent=r(u,"expandParent",!0),this.autoRound=r(u,"autoRound",!1),this.autoCenter=r(u,"autoCenter",0),this.resizeInterval=r(u,"resizeInterval",500),this.fullscreenTarget=r(u,"fullscreenTarget",null),this.minWidth=r(u,"minWidth",0),this.maxWidth=r(u,"maxWidth",0),this.minHeight=r(u,"minHeight",0),this.maxHeight=r(u,"maxHeight",0);var g=r(u,"scale",null);g&&(this.width=r(g,"width",this.width),this.height=r(g,"height",this.height),this.zoom=r(g,"zoom",this.zoom),this.parent=r(g,"parent",this.parent),this.scaleMode=r(g,"mode",this.scaleMode),this.expandParent=r(g,"expandParent",this.expandParent),this.autoRound=r(g,"autoRound",this.autoRound),this.autoCenter=r(g,"autoCenter",this.autoCenter),this.resizeInterval=r(g,"resizeInterval",this.resizeInterval),this.fullscreenTarget=r(g,"fullscreenTarget",this.fullscreenTarget),this.minWidth=r(g,"min.width",this.minWidth),this.maxWidth=r(g,"max.width",this.maxWidth),this.minHeight=r(g,"min.height",this.minHeight),this.maxHeight=r(g,"max.height",this.maxHeight)),this.renderType=r(u,"type",d.AUTO),this.canvas=r(u,"canvas",null),this.context=r(u,"context",null),this.canvasStyle=r(u,"canvasStyle",null),this.customEnvironment=r(u,"customEnvironment",!1),this.sceneConfig=r(u,"scene",null),this.seed=r(u,"seed",[(Date.now()*Math.random()).toString()]),i.RND=new i.RandomDataGenerator(this.seed),this.gameTitle=r(u,"title",""),this.gameURL=r(u,"url","https://phaser.io"),this.gameVersion=r(u,"version",""),this.autoFocus=r(u,"autoFocus",!0),this.domCreateContainer=r(u,"dom.createContainer",!1),this.domBehindCanvas=r(u,"dom.behindCanvas",!1),this.domPointerEvents=r(u,"dom.pointerEvents","none"),this.inputKeyboard=r(u,"input.keyboard",!0),this.inputKeyboardEventTarget=r(u,"input.keyboard.target",window),this.inputKeyboardCapture=r(u,"input.keyboard.capture",[]),this.inputMouse=r(u,"input.mouse",!0),this.inputMouseEventTarget=r(u,"input.mouse.target",null),this.inputMousePreventDefaultDown=r(u,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=r(u,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=r(u,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=r(u,"input.mouse.preventDefaultWheel",!0),this.inputTouch=r(u,"input.touch",a.input.touch),this.inputTouchEventTarget=r(u,"input.touch.target",null),this.inputTouchCapture=r(u,"input.touch.capture",!0),this.inputActivePointers=r(u,"input.activePointers",1),this.inputSmoothFactor=r(u,"input.smoothFactor",0),this.inputWindowEvents=r(u,"input.windowEvents",!0),this.inputGamepad=r(u,"input.gamepad",!1),this.inputGamepadEventTarget=r(u,"input.gamepad.target",window),this.disableContextMenu=r(u,"disableContextMenu",!1),this.audio=r(u,"audio",{}),this.hideBanner=r(u,"banner",null)===!1,this.hidePhaser=r(u,"banner.hidePhaser",!1),this.bannerTextColor=r(u,"banner.text",x),this.bannerBackgroundColor=r(u,"banner.background",c),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=r(u,"fps",null);var m=r(u,"render",u);this.pipeline=r(m,"pipeline",null),this.antialias=r(m,"antialias",!0),this.antialiasGL=r(m,"antialiasGL",!0),this.mipmapFilter=r(m,"mipmapFilter","LINEAR"),this.desynchronized=r(m,"desynchronized",!1),this.roundPixels=r(m,"roundPixels",!1),this.pixelArt=r(m,"pixelArt",this.zoom!==1),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=r(m,"transparent",!1),this.clearBeforeRender=r(m,"clearBeforeRender",!0),this.preserveDrawingBuffer=r(m,"preserveDrawingBuffer",!1),this.premultipliedAlpha=r(m,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=r(m,"failIfMajorPerformanceCaveat",!1),this.powerPreference=r(m,"powerPreference","default"),this.batchSize=r(m,"batchSize",4096),this.maxTextures=r(m,"maxTextures",-1),this.maxLights=r(m,"maxLights",10);var y=r(u,"backgroundColor",0);this.backgroundColor=h(y),this.transparent&&(this.backgroundColor=h(0),this.backgroundColor.alpha=0),this.preBoot=r(u,"callbacks.preBoot",l),this.postBoot=r(u,"callbacks.postBoot",l),this.physics=r(u,"physics",{}),this.defaultPhysicsSystem=r(this.physics,"default",!1),this.loaderBaseURL=r(u,"loader.baseURL",""),this.loaderPath=r(u,"loader.path","");var T=a.os.android?6:32;this.loaderMaxParallelDownloads=r(u,"loader.maxParallelDownloads",T),this.loaderCrossOrigin=r(u,"loader.crossOrigin",void 0),this.loaderResponseType=r(u,"loader.responseType",""),this.loaderAsync=r(u,"loader.async",!0),this.loaderUser=r(u,"loader.user",""),this.loaderPassword=r(u,"loader.password",""),this.loaderTimeout=r(u,"loader.timeout",0),this.loaderWithCredentials=r(u,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var S=r(u,"plugins",null),C=s.DefaultScene;S&&(Array.isArray(S)?this.defaultPlugins=S:e(S)&&(this.installGlobalPlugins=o(S,"global",[]),this.installScenePlugins=o(S,"scene",[]),Array.isArray(S.default)?C=S.default:Array.isArray(S.defaultMerge)&&(C=C.concat(S.defaultMerge)))),this.defaultPlugins=C;var P="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=r(u,"images.default",P+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=r(u,"images.missing",P+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=r(u,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=d.WEBGL:window.FORCE_CANVAS&&(this.renderType=d.CANVAS))}});p.exports=f},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={os:t(105),browser:t(136),features:t(191),input:t(808),audio:t(809),video:t(810),fullscreen:t(811),canvasFeatures:t(348)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(31),d={supportInverseAlpha:!1,supportNewBlendModes:!1};function a(){var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",i="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",l=new Image;return l.onload=function(){var s=new Image;s.onload=function(){var h=n.create(s,6,1),f=h.getContext("2d");if(f.globalCompositeOperation="multiply",f.drawImage(l,0,0),f.drawImage(s,2,0),!f.getImageData(2,0,1,1))return!1;var v=f.getImageData(2,0,1,1).data;n.remove(s),d.supportNewBlendModes=v[0]===255&&v[1]===0&&v[2]===0},s.src=e+"/wCKxvRF"+i},l.src=e+"AP804Oa6"+i,!1}function o(){var e=n.create(this,2,1),i=e.getContext("2d");i.fillStyle="rgba(10, 20, 30, 0.5)",i.fillRect(0,0,1,1);var l=i.getImageData(0,0,1,1);if(l===null)return!1;i.putImageData(l,1,0);var s=i.getImageData(1,0,1,1);return s.data[0]===l.data[0]&&s.data[1]===l.data[1]&&s.data[2]===l.data[2]&&s.data[3]===l.data[3]}function r(){return typeof importScripts!="function"&&document!==void 0&&(d.supportNewBlendModes=a(),d.supportInverseAlpha=o()),d}p.exports=r()},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){return Math.atan2(o-d,a-n)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return Math.atan2(d.y-n.y,d.x-n.x)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n=n%(2*Math.PI),n>=0?n:n+2*Math.PI};p.exports=t},function(p,E){/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.x-d.x,o=n.y-d.y;return Math.sqrt(a*a+o*o)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=n-a,e=d-o;return r*r+e*e};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return a===void 0&&(a=1e-4),n>d-a};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return a===void 0&&(a=1e-4),n + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(357),d=function(a,o){return n(a)/n(o)/n(a-o)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){if(n===0)return 1;for(var d=n;--n;)d*=n;return d};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function t(r,e){var i=1-r;return i*i*i*e}function n(r,e){var i=1-r;return 3*i*i*r*e}function d(r,e){return 3*(1-r)*r*r*e}function a(r,e){return r*r*r*e}var o=function(r,e,i,l,s){return t(r,e)+n(r,i)+d(r,l)+a(r,s)};p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function t(o,r){var e=1-o;return e*e*r}function n(o,r){return 2*(1-o)*o*r}function d(o,r){return o*o*r}var a=function(o,r,e,i){return t(o,r)+n(o,e)+d(o,i)};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(184),d=function(a,o,r){return o+(r-o)*n(a,0,1)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d=Math.log(n)/.6931471805599453;return 1< + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.x,o=n.y;return n.x=a*Math.cos(d)-o*Math.sin(d),n.y=a*Math.sin(d)+o*Math.cos(d),n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n>0?Math.ceil(n):Math.floor(n)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o){this.val=new Float32Array(9),o?this.copy(o):this.identity()},clone:function(){return new d(this)},set:function(a){return this.copy(a)},copy:function(a){var o=this.val,r=a.val;return o[0]=r[0],o[1]=r[1],o[2]=r[2],o[3]=r[3],o[4]=r[4],o[5]=r[5],o[6]=r[6],o[7]=r[7],o[8]=r[8],this},fromMat4:function(a){var o=a.val,r=this.val;return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[4],r[4]=o[5],r[5]=o[6],r[6]=o[8],r[7]=o[9],r[8]=o[10],this},fromArray:function(a){var o=this.val;return o[0]=a[0],o[1]=a[1],o[2]=a[2],o[3]=a[3],o[4]=a[4],o[5]=a[5],o[6]=a[6],o[7]=a[7],o[8]=a[8],this},identity:function(){var a=this.val;return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=1,a[5]=0,a[6]=0,a[7]=0,a[8]=1,this},transpose:function(){var a=this.val,o=a[1],r=a[2],e=a[5];return a[1]=a[3],a[2]=a[6],a[3]=o,a[5]=a[7],a[6]=r,a[7]=e,this},invert:function(){var a=this.val,o=a[0],r=a[1],e=a[2],i=a[3],l=a[4],s=a[5],h=a[6],f=a[7],v=a[8],u=v*l-s*f,c=-v*i+s*h,x=f*i-l*h,g=o*u+r*c+e*x;return g?(g=1/g,a[0]=u*g,a[1]=(-v*r+e*f)*g,a[2]=(s*r-e*l)*g,a[3]=c*g,a[4]=(v*o-e*h)*g,a[5]=(-s*o+e*i)*g,a[6]=x*g,a[7]=(-f*o+r*h)*g,a[8]=(l*o-r*i)*g,this):null},adjoint:function(){var a=this.val,o=a[0],r=a[1],e=a[2],i=a[3],l=a[4],s=a[5],h=a[6],f=a[7],v=a[8];return a[0]=l*v-s*f,a[1]=e*f-r*v,a[2]=r*s-e*l,a[3]=s*h-i*v,a[4]=o*v-e*h,a[5]=e*i-o*s,a[6]=i*f-l*h,a[7]=r*h-o*f,a[8]=o*l-r*i,this},determinant:function(){var a=this.val,o=a[0],r=a[1],e=a[2],i=a[3],l=a[4],s=a[5],h=a[6],f=a[7],v=a[8];return o*(v*l-s*f)+r*(-v*i+s*h)+e*(f*i-l*h)},multiply:function(a){var o=this.val,r=o[0],e=o[1],i=o[2],l=o[3],s=o[4],h=o[5],f=o[6],v=o[7],u=o[8],c=a.val,x=c[0],g=c[1],m=c[2],y=c[3],T=c[4],S=c[5],C=c[6],P=c[7],A=c[8];return o[0]=x*r+g*l+m*f,o[1]=x*e+g*s+m*v,o[2]=x*i+g*h+m*u,o[3]=y*r+T*l+S*f,o[4]=y*e+T*s+S*v,o[5]=y*i+T*h+S*u,o[6]=C*r+P*l+A*f,o[7]=C*e+P*s+A*v,o[8]=C*i+P*h+A*u,this},translate:function(a){var o=this.val,r=a.x,e=a.y;return o[6]=r*o[0]+e*o[3]+o[6],o[7]=r*o[1]+e*o[4]+o[7],o[8]=r*o[2]+e*o[5]+o[8],this},rotate:function(a){var o=this.val,r=o[0],e=o[1],i=o[2],l=o[3],s=o[4],h=o[5],f=Math.sin(a),v=Math.cos(a);return o[0]=v*r+f*l,o[1]=v*e+f*s,o[2]=v*i+f*h,o[3]=v*l-f*r,o[4]=v*s-f*e,o[5]=v*h-f*i,this},scale:function(a){var o=this.val,r=a.x,e=a.y;return o[0]=r*o[0],o[1]=r*o[1],o[2]=r*o[2],o[3]=e*o[3],o[4]=e*o[4],o[5]=e*o[5],this},fromQuat:function(a){var o=a.x,r=a.y,e=a.z,i=a.w,l=o+o,s=r+r,h=e+e,f=o*l,v=o*s,u=o*h,c=r*s,x=r*h,g=e*h,m=i*l,y=i*s,T=i*h,S=this.val;return S[0]=1-(c+g),S[3]=v+T,S[6]=u-y,S[1]=v-T,S[4]=1-(f+g),S[7]=x+m,S[2]=u+y,S[5]=x-m,S[8]=1-(f+c),this},normalFromMat4:function(a){var o=a.val,r=this.val,e=o[0],i=o[1],l=o[2],s=o[3],h=o[4],f=o[5],v=o[6],u=o[7],c=o[8],x=o[9],g=o[10],m=o[11],y=o[12],T=o[13],S=o[14],C=o[15],P=e*f-i*h,A=e*v-l*h,M=e*u-s*h,L=i*v-l*f,F=i*u-s*f,B=l*u-s*v,N=c*T-x*y,X=c*S-g*y,V=c*C-m*y,W=x*S-g*T,O=x*C-m*T,R=g*C-m*S,I=P*R-A*O+M*W+L*V-F*X+B*N;return I?(I=1/I,r[0]=(f*R-v*O+u*W)*I,r[1]=(v*V-h*R-u*X)*I,r[2]=(h*O-f*V+u*N)*I,r[3]=(l*O-i*R-s*W)*I,r[4]=(e*R-l*V+s*X)*I,r[5]=(i*V-e*O-s*N)*I,r[6]=(T*B-S*F+C*L)*I,r[7]=(S*M-y*B-C*A)*I,r[8]=(y*F-T*M+C*P)*I,this):null}});p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(364),a=t(1),o=t(39),r=1e-6,e=new Int8Array([1,2,0]),i=new Float32Array([0,0,0]),l=new o(1,0,0),s=new o(0,1,0),h=new o,f=new d,v=new n({initialize:function(c,x,g,m){this.onChangeCallback=a,this.set(c,x,g,m)},x:{get:function(){return this._x},set:function(u){this._x=u,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(u){this._y=u,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(u){this._z=u,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(u){this._w=u,this.onChangeCallback(this)}},copy:function(u){return this.set(u)},set:function(u,c,x,g,m){return m===void 0&&(m=!0),typeof u=="object"?(this._x=u.x||0,this._y=u.y||0,this._z=u.z||0,this._w=u.w||0):(this._x=u||0,this._y=c||0,this._z=x||0,this._w=g||0),m&&this.onChangeCallback(this),this},add:function(u){return this._x+=u.x,this._y+=u.y,this._z+=u.z,this._w+=u.w,this.onChangeCallback(this),this},subtract:function(u){return this._x-=u.x,this._y-=u.y,this._z-=u.z,this._w-=u.w,this.onChangeCallback(this),this},scale:function(u){return this._x*=u,this._y*=u,this._z*=u,this._w*=u,this.onChangeCallback(this),this},length:function(){var u=this.x,c=this.y,x=this.z,g=this.w;return Math.sqrt(u*u+c*c+x*x+g*g)},lengthSq:function(){var u=this.x,c=this.y,x=this.z,g=this.w;return u*u+c*c+x*x+g*g},normalize:function(){var u=this.x,c=this.y,x=this.z,g=this.w,m=u*u+c*c+x*x+g*g;return m>0&&(m=1/Math.sqrt(m),this._x=u*m,this._y=c*m,this._z=x*m,this._w=g*m),this.onChangeCallback(this),this},dot:function(u){return this.x*u.x+this.y*u.y+this.z*u.z+this.w*u.w},lerp:function(u,c){c===void 0&&(c=0);var x=this.x,g=this.y,m=this.z,y=this.w;return this.set(x+c*(u.x-x),g+c*(u.y-g),m+c*(u.z-m),y+c*(u.w-y))},rotationTo:function(u,c){var x=u.x*c.x+u.y*c.y+u.z*c.z;return x<-.999999?(h.copy(l).cross(u).length().999999?this.set(0,0,0,1):(h.copy(u).cross(c),this._x=h.x,this._y=h.y,this._z=h.z,this._w=1+x,this.normalize())},setAxes:function(u,c,x){var g=f.val;return g[0]=c.x,g[3]=c.y,g[6]=c.z,g[1]=x.x,g[4]=x.y,g[7]=x.z,g[2]=-u.x,g[5]=-u.y,g[8]=-u.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(u,c){c=c*.5;var x=Math.sin(c);return this.set(x*u.x,x*u.y,x*u.z,Math.cos(c))},multiply:function(u){var c=this.x,x=this.y,g=this.z,m=this.w,y=u.x,T=u.y,S=u.z,C=u.w;return this.set(c*C+m*y+x*S-g*T,x*C+m*T+g*y-c*S,g*C+m*S+c*T-x*y,m*C-c*y-x*T-g*S)},slerp:function(u,c){var x=this.x,g=this.y,m=this.z,y=this.w,T=u.x,S=u.y,C=u.z,P=u.w,A=x*T+g*S+m*C+y*P;A<0&&(A=-A,T=-T,S=-S,C=-C,P=-P);var M=1-c,L=c;if(1-A>r){var F=Math.acos(A),B=Math.sin(F);M=Math.sin((1-c)*F)/B,L=Math.sin(c*F)/B}return this.set(M*x+L*T,M*g+L*S,M*m+L*C,M*y+L*P)},invert:function(){var u=this.x,c=this.y,x=this.z,g=this.w,m=u*u+c*c+x*x+g*g,y=m?1/m:0;return this.set(-u*y,-c*y,-x*y,g*y)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(u){u*=.5;var c=this.x,x=this.y,g=this.z,m=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(c*T+m*y,x*T+g*y,g*T-x*y,m*T-c*y)},rotateY:function(u){u*=.5;var c=this.x,x=this.y,g=this.z,m=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(c*T-g*y,x*T+m*y,g*T+c*y,m*T-x*y)},rotateZ:function(u){u*=.5;var c=this.x,x=this.y,g=this.z,m=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(c*T+x*y,x*T-c*y,g*T+m*y,m*T-g*y)},calculateW:function(){var u=this.x,c=this.y,x=this.z;return this.w=-Math.sqrt(1-u*u-c*c-x*x),this},setFromEuler:function(u,c){var x=u.x/2,g=u.y/2,m=u.z/2,y=Math.cos(x),T=Math.cos(g),S=Math.cos(m),C=Math.sin(x),P=Math.sin(g),A=Math.sin(m);switch(u.order){case"XYZ":{this.set(C*T*S+y*P*A,y*P*S-C*T*A,y*T*A+C*P*S,y*T*S-C*P*A,c);break}case"YXZ":{this.set(C*T*S+y*P*A,y*P*S-C*T*A,y*T*A-C*P*S,y*T*S+C*P*A,c);break}case"ZXY":{this.set(C*T*S-y*P*A,y*P*S+C*T*A,y*T*A+C*P*S,y*T*S-C*P*A,c);break}case"ZYX":{this.set(C*T*S-y*P*A,y*P*S+C*T*A,y*T*A-C*P*S,y*T*S+C*P*A,c);break}case"YZX":{this.set(C*T*S+y*P*A,y*P*S+C*T*A,y*T*A-C*P*S,y*T*S-C*P*A,c);break}case"XZY":{this.set(C*T*S-y*P*A,y*P*S-C*T*A,y*T*A+C*P*S,y*T*S+C*P*A,c);break}}return this},setFromRotationMatrix:function(u){var c=u.val,x=c[0],g=c[4],m=c[8],y=c[1],T=c[5],S=c[9],C=c[2],P=c[6],A=c[10],M=x+T+A,L;return M>0?(L=.5/Math.sqrt(M+1),this.set((P-S)*L,(m-C)*L,(y-g)*L,.25/L)):x>T&&x>A?(L=2*Math.sqrt(1+x-T-A),this.set(.25*L,(g+y)/L,(m+C)/L,(P-S)/L)):T>A?(L=2*Math.sqrt(1+T-x-A),this.set((g+y)/L,.25*L,(S+P)/L,(m-C)/L)):(L=2*Math.sqrt(1+A-x-T),this.set((m+C)/L,(S+P)/L,.25*L,(y-g)/L)),this},fromMat3:function(u){var c=u.val,x=c[0]+c[4]+c[8],g;if(x>0)g=Math.sqrt(x+1),this.w=.5*g,g=.5/g,this._x=(c[7]-c[5])*g,this._y=(c[2]-c[6])*g,this._z=(c[3]-c[1])*g;else{var m=0;c[4]>c[0]&&(m=1),c[8]>c[m*3+m]&&(m=2);var y=e[m],T=e[y];g=Math.sqrt(c[m*3+m]-c[y*3+y]-c[T*3+T]+1),i[m]=.5*g,g=.5/g,i[y]=(c[y*3+m]+c[m*3+y])*g,i[T]=(c[T*3+m]+c[m*3+T])*g,this._x=i[0],this._y=i[1],this._z=i[2],this._w=(c[T*3+y]-c[y*3+T])*g}return this.onChangeCallback(this),this}});p.exports=v},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(367),d=t(31),a=t(33),o=t(191),r=function(e){var i=e.config;if((i.customEnvironment||i.canvas)&&i.renderType===a.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!i.customEnvironment&&!i.canvas&&i.renderType!==a.HEADLESS)if(i.renderType===a.CANVAS||i.renderType!==a.CANVAS&&!o.webGL)if(o.canvas)i.renderType=a.CANVAS;else throw new Error("Cannot create Canvas or WebGL context, aborting.");else i.renderType=a.WEBGL;i.antialias||d.disableSmoothing();var l=e.scale.baseSize,s=l.width,h=l.height;if(i.canvas?(e.canvas=i.canvas,e.canvas.width=s,e.canvas.height=h):e.canvas=d.create(e,s,h,i.renderType),i.canvasStyle&&(e.canvas.style=i.canvasStyle),i.antialias||n.setCrisp(e.canvas),i.renderType!==a.HEADLESS){var f,v;f=t(368),v=t(371),i.renderType===a.WEBGL?e.renderer=new v(e):(e.renderer=new f(e),e.context=e.renderer.gameContext)}};p.exports=r},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setCrisp:function(n){var d=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return d.forEach(function(a){n.style["image-rendering"]=a}),n.style.msInterpolationMode="nearest-neighbor",n},setBicubic:function(n){return n.style["image-rendering"]="auto",n.style.msInterpolationMode="bicubic",n}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(37),d=t(369),a=t(0),o=t(33),r=t(9),e=t(91),i=t(370),l=t(104),s=t(106),h=t(25),f=new a({Extends:r,initialize:function(u){r.call(this);var c=u.config;this.config={clearBeforeRender:c.clearBeforeRender,backgroundColor:c.backgroundColor,antialias:c.antialias,roundPixels:c.roundPixels},this.game=u,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=u.canvas;var x={alpha:u.config.transparent,desynchronized:u.config.desynchronized};this.gameContext=c.context?c.context:this.gameCanvas.getContext("2d",x),this.currentContext=this.gameContext,this.antialias=u.config.antialias,this.blendModes=i(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(s.READY,this.boot,this)},boot:function(){var v=this.game,u=v.scale.baseSize;this.width=u.width,this.height=u.height,this.isBooted=!0,v.scale.on(l.RESIZE,this.onResize,this),this.resize(u.width,u.height)},onResize:function(v,u){(u.width!==this.width||u.height!==this.height)&&this.resize(u.width,u.height)},resize:function(v,u){this.width=v,this.height=u,this.emit(e.RESIZE,v,u)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(v){return this.currentContext.globalCompositeOperation=v,this},setContext:function(v){return this.currentContext=v||this.gameContext,this},setAlpha:function(v){return this.currentContext.globalAlpha=v,this},preRender:function(){var v=this.gameContext,u=this.config,c=this.width,x=this.height;v.globalAlpha=1,v.globalCompositeOperation="source-over",v.setTransform(1,0,0,1,0,0),u.clearBeforeRender&&(v.clearRect(0,0,c,x),u.transparent||(v.fillStyle=u.backgroundColor.rgba,v.fillRect(0,0,c,x))),v.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(v,u,c){var x=u.length;this.emit(e.RENDER,v,c);var g=c.x,m=c.y,y=c.width,T=c.height,S=c.renderToTexture?c.context:v.sys.context;S.save(),this.game.scene.customViewports&&(S.beginPath(),S.rect(g,m,y,T),S.clip()),this.currentContext=S;var C=c.mask;C&&C.preRenderCanvas(this,null,c._maskCamera),c.transparent||(S.fillStyle=c.backgroundColor.rgba,S.fillRect(g,m,y,T)),S.globalAlpha=c.alpha,S.globalCompositeOperation="source-over",this.drawCount+=x,c.renderToTexture&&c.emit(n.PRE_RENDER,c),c.matrix.copyToContext(S);for(var P=0;P=0?X=-(X+A):X<0&&(X=Math.abs(X)-A)),v.flipY&&(V>=0?V=-(V+M):V<0&&(V=Math.abs(V)-M))}var O=1,R=1;v.flipX&&(L||(X+=-u.realWidth+B*2),O=-1),v.flipY&&(L||(V+=-u.realHeight+N*2),R=-1),T.applyITRS(v.x,v.y,v.rotation,v.scaleX*O,v.scaleY*R),y.copyFrom(c.matrix),x?(y.multiplyWithOffset(x,-c.scrollX*v.scrollFactorX,-c.scrollY*v.scrollFactorY),T.e=v.x,T.f=v.y):(T.e-=c.scrollX*v.scrollFactorX,T.f-=c.scrollY*v.scrollFactorY),y.multiply(T),m.save(),y.setToContext(m),m.globalCompositeOperation=this.blendModes[v.blendMode],m.globalAlpha=g,m.imageSmoothingEnabled=!(!this.antialias||u.source.scaleMode),v.mask&&v.mask.preRenderCanvas(this,v,c),m.drawImage(u.source.image,C,P,A,M,X,V,A/F,M/F),v.mask&&v.mask.postRenderCanvas(this,v,c),m.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});p.exports=f},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(31),d=t(38),a=t(2),o=function(r,e){var i=a(e,"callback"),l=a(e,"type","image/png"),s=a(e,"encoder",.92),h=Math.abs(Math.round(a(e,"x",0))),f=Math.abs(Math.round(a(e,"y",0))),v=a(e,"width",r.width),u=a(e,"height",r.height),c=a(e,"getPixel",!1);if(c){var x=r.getContext("2d"),g=x.getImageData(h,f,1,1),m=g.data;i.call(null,new d(m[0],m[1],m[2],m[3]/255))}else if(h!==0||f!==0||v!==r.width||u!==r.height){var y=n.createWebGL(this,v,u),T=y.getContext("2d");T.drawImage(r,h,f,v,u,0,0,v,u);var S=new Image;S.onerror=function(){i.call(null),n.remove(y)},S.onload=function(){i.call(null,S),n.remove(y)},S.src=y.toDataURL(l,s)}else{var C=new Image;C.onerror=function(){i.call(null)},C.onload=function(){i.call(null,C)},C.src=r.toDataURL(l,s)}};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(35),d=t(348),a=function(){var o=[],r=d.supportNewBlendModes,e="source-over";return o[n.NORMAL]=e,o[n.ADD]="lighter",o[n.MULTIPLY]=r?"multiply":e,o[n.SCREEN]=r?"screen":e,o[n.OVERLAY]=r?"overlay":e,o[n.DARKEN]=r?"darken":e,o[n.LIGHTEN]=r?"lighten":e,o[n.COLOR_DODGE]=r?"color-dodge":e,o[n.COLOR_BURN]=r?"color-burn":e,o[n.HARD_LIGHT]=r?"hard-light":e,o[n.SOFT_LIGHT]=r?"soft-light":e,o[n.DIFFERENCE]=r?"difference":e,o[n.EXCLUSION]=r?"exclusion":e,o[n.HUE]=r?"hue":e,o[n.SATURATION]=r?"saturation":e,o[n.COLOR]=r?"color":e,o[n.LUMINOSITY]=r?"luminosity":e,o[n.ERASE]="destination-out",o[n.SOURCE_IN]="source-in",o[n.SOURCE_OUT]="source-out",o[n.SOURCE_ATOP]="source-atop",o[n.DESTINATION_OVER]="destination-over",o[n.DESTINATION_IN]="destination-in",o[n.DESTINATION_OUT]="destination-out",o[n.DESTINATION_ATOP]="destination-atop",o[n.LIGHTER]="lighter",o[n.COPY]="copy",o[n.XOR]="xor",o};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(93),d=t(37),a=t(0),o=t(33),r=t(9),e=t(91),i=t(22),l=t(138),s=t(69),h=t(1),f=t(372),v=t(141),u=t(104),c=t(106),x=t(12),g=t(383),m=new a({Extends:r,initialize:function(T){r.call(this);var S=T.config,C={alpha:S.transparent,desynchronized:S.desynchronized,depth:!1,antialias:S.antialiasGL,premultipliedAlpha:S.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:S.failIfMajorPerformanceCaveat,powerPreference:S.powerPreference,preserveDrawingBuffer:S.preserveDrawingBuffer};this.config={clearBeforeRender:S.clearBeforeRender,antialias:S.antialias,backgroundColor:S.backgroundColor,contextCreation:C,roundPixels:S.roundPixels,maxTextures:S.maxTextures,maxTextureSize:S.maxTextureSize,batchSize:S.batchSize,maxLights:S.maxLights,mipmapFilter:S.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.currentActiveTexture=0,this.startActiveTexture=0,this.maxTextures=0,this.textureIndexes,this.tempTextures,this.textureZero,this.normalTexture,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=h,this.contextRestoredHandler=h,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.textureFlush=0,this.isTextureClean=!1,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.init(this.config)},init:function(y){var T,S=this.game,C=this.canvas,P=y.backgroundColor;if(S.config.context?T=S.config.context:T=C.getContext("webgl",y.contextCreation)||C.getContext("experimental-webgl",y.contextCreation),!T||T.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=T;var A=this;this.contextLostHandler=function(I){A.contextLost=!0,A.game.events.emit(i.CONTEXT_LOST,A),I.preventDefault()},this.contextRestoredHandler=function(){A.contextLost=!1,A.init(A.config),A.game.events.emit(i.CONTEXT_RESTORED,A)},C.addEventListener("webglcontextlost",this.contextLostHandler,!1),C.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),S.context=T;for(var M=0;M<=27;M++)this.blendModes.push({func:[T.ONE,T.ONE_MINUS_SRC_ALPHA],equation:T.FUNC_ADD});this.blendModes[1].func=[T.ONE,T.DST_ALPHA],this.blendModes[2].func=[T.DST_COLOR,T.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[T.ONE,T.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[T.ZERO,T.ONE_MINUS_SRC_ALPHA],equation:T.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=T.BYTE,this.glFormats[1]=T.SHORT,this.glFormats[2]=T.UNSIGNED_BYTE,this.glFormats[3]=T.UNSIGNED_SHORT,this.glFormats[4]=T.FLOAT,this.glFuncMap={mat2:{func:T.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:T.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:T.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:T.uniform1f,length:1},"1fv":{func:T.uniform1fv,length:1},"1i":{func:T.uniform1i,length:1},"1iv":{func:T.uniform1iv,length:1},"2f":{func:T.uniform2f,length:2},"2fv":{func:T.uniform2fv,length:1},"2i":{func:T.uniform2i,length:2},"2iv":{func:T.uniform2iv,length:1},"3f":{func:T.uniform3f,length:3},"3fv":{func:T.uniform3fv,length:1},"3i":{func:T.uniform3i,length:3},"3iv":{func:T.uniform3iv,length:1},"4f":{func:T.uniform4f,length:4},"4fv":{func:T.uniform4fv,length:1},"4i":{func:T.uniform4i,length:4},"4iv":{func:T.uniform4iv,length:1}};var L=T.getSupportedExtensions();(!y.maxTextures||y.maxTextures===-1)&&(y.maxTextures=T.getParameter(T.MAX_TEXTURE_IMAGE_UNITS)),y.maxTextureSize||(y.maxTextureSize=T.getParameter(T.MAX_TEXTURE_SIZE));var F="WEBGL_compressed_texture_",B="WEBKIT_"+F;this.compression.ETC1=T.getExtension(F+"etc1")||T.getExtension(B+"etc1"),this.compression.PVRTC=T.getExtension(F+"pvrtc")||T.getExtension(B+"pvrtc"),this.compression.S3TC=T.getExtension(F+"s3tc")||T.getExtension(B+"s3tc"),this.supportedExtensions=L;var N="ANGLE_instanced_arrays";this.instancedArraysExtension=L.indexOf(N)>-1?T.getExtension(N):null;var X="OES_vertex_array_object";this.vaoExtension=L.indexOf(X)>-1?T.getExtension(X):null,T.disable(T.DEPTH_TEST),T.disable(T.CULL_FACE),T.enable(T.BLEND),T.clearColor(P.redGL,P.greenGL,P.blueGL,P.alphaGL),this.mipmapFilter=T[y.mipmapFilter],this.maxTextures=x.checkShaderMax(T,y.maxTextures),this.textureIndexes=[];var V=this.tempTextures;if(Array.isArray(V))for(var W=0;M0&&C>0;if(M&&L){var F=M[0],B=M[1],N=M[2],X=M[3];L=F!==y||B!==T||N!==S||X!==C}L&&(this.flush(),A.scissor(y,P-T-C,S,C))},resetScissor:function(){var y=this.gl;y.enable(y.SCISSOR_TEST);var T=this.currentScissor;if(T){var S=T[0],C=T[1],P=T[2],A=T[3];P>0&&A>0&&y.scissor(S,this.drawingBufferHeight-C-A,P,A)}},popScissor:function(){var y=this.scissorStack;y.pop();var T=y[y.length-1];T&&this.setScissor(T[0],T[1],T[2],T[3]),this.currentScissor=T},hasActiveStencilMask:function(){var y=this.currentMask.mask,T=this.currentCameraMask.mask;return y&&y.isStencil||T&&T.isStencil},resetViewport:function(){var y=this.gl;y.viewport(0,0,this.width,this.height),this.drawingBufferHeight=y.drawingBufferHeight},setBlendMode:function(y,T){T===void 0&&(T=!1);var S=this.gl,C=this.blendModes[y];return T||y!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==y?(this.flush(),S.enable(S.BLEND),S.blendEquation(C.equation),C.func.length>2?S.blendFuncSeparate(C.func[0],C.func[1],C.func[2],C.func[3]):S.blendFunc(C.func[0],C.func[1]),this.currentBlendMode=y,!0):!1},addBlendMode:function(y,T){var S=this.blendModes.push({func:y,equation:T});return S-1},updateBlendMode:function(y,T,S){return this.blendModes[y]&&(this.blendModes[y].func=T,S&&(this.blendModes[y].equation=S)),this},removeBlendMode:function(y){return y>17&&this.blendModes[y]&&this.blendModes.splice(y,1),this},setBlankTexture:function(){this.setTexture2D(this.blankTexture.glTexture)},setTextureSource:function(y){if(this.pipelines.forceZero())return this.setTextureZero(y.glTexture,!0),0;var T=this.gl,S=this.currentActiveTexture;return y.glIndexCounter0){var M=this.pipelines.setMulti();M.drawFillRect(T,S,C,P,x.getTintFromFloats(A.blueGL,A.greenGL,A.redGL,1),A.alphaGL)}},getCurrentStencilMask:function(){var y=null,T=this.maskStack,S=this.currentCameraMask;return T.length>0?y=T[T.length-1]:S.mask&&S.mask.isStencil&&(y=S),y},postRenderCamera:function(y){var T=y.flashEffect,S=y.fadeEffect;if(T.isRunning||S.isRunning||S.isComplete){var C=this.pipelines.setMulti();T.postRenderWebGL(C,x.getTintFromFloats),S.postRenderWebGL(C,x.getTintFromFloats)}y.dirty=!1,this.popScissor(),y.mask&&(this.currentCameraMask.mask=null,y.mask.postRenderWebGL(this,y._maskCamera)),this.pipelines.postBatchCamera(y),y.emit(d.POST_RENDER,y)},preRender:function(){if(!this.contextLost){var y=this.gl;if(y.bindFramebuffer(y.FRAMEBUFFER,null),this.config.clearBeforeRender){var T=this.config.backgroundColor;y.clearColor(T.redGL,T.greenGL,T.blueGL,T.alphaGL),y.clear(y.COLOR_BUFFER_BIT|y.DEPTH_BUFFER_BIT|y.STENCIL_BUFFER_BIT)}y.enable(y.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&y.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.textureFlush=0,this.emit(e.PRE_RENDER)}},render:function(y,T,S){if(!this.contextLost){var C=T.length;if(this.emit(e.RENDER,y,S),this.preRenderCamera(S),C===0){this.setBlendMode(o.BlendModes.NORMAL),this.postRenderCamera(S);return}this.currentType="";for(var P=this.currentMask,A=0;A0&&(this.startActiveTexture++,this.currentActiveTexture=1)}},snapshot:function(y,T,S){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,y,T,S)},snapshotArea:function(y,T,S,C,P,A,M){var L=this.snapshotState;return L.callback=P,L.type=A,L.encoder=M,L.getPixel=!1,L.x=y,L.y=T,L.width=Math.min(S,this.gl.drawingBufferWidth),L.height=Math.min(C,this.gl.drawingBufferHeight),this},snapshotPixel:function(y,T,S){return this.snapshotArea(y,T,1,1,S),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(y,T,S,C,P,A,M,L,F,B,N){P===void 0&&(P=!1),A===void 0&&(A=0),M===void 0&&(M=0),L===void 0&&(L=T),F===void 0&&(F=S);var X=this.currentFramebuffer;this.snapshotArea(A,M,L,F,C,B,N);var V=this.snapshotState;return V.getPixel=P,V.isFramebuffer=!0,V.bufferWidth=T,V.bufferHeight=S,this.setFramebuffer(y),g(this.canvas,V),this.setFramebuffer(X),V.callback=null,V.isFramebuffer=!1,this},canvasToTexture:function(y,T,S,C){return S===void 0&&(S=!1),C===void 0&&(C=!1),T?this.updateCanvasTexture(y,T,C):this.createCanvasTexture(y,S,C)},createCanvasTexture:function(y,T,S){T===void 0&&(T=!1),S===void 0&&(S=!1);var C=this.gl,P=C.NEAREST,A=C.NEAREST,M=y.width,L=y.height,F=C.CLAMP_TO_EDGE,B=l(M,L);return!T&&B&&(F=C.REPEAT),this.config.antialias&&(P=B?this.mipmapFilter:C.LINEAR,A=C.LINEAR),this.createTexture2D(0,P,A,F,F,C.RGBA,y,M,L,!0,!1,S)},updateCanvasTexture:function(y,T,S){S===void 0&&(S=!1);var C=this.gl,P=y.width,A=y.height;if(P>0&&A>0){C.activeTexture(C.TEXTURE0);var M=C.getParameter(C.TEXTURE_BINDING_2D);C.bindTexture(C.TEXTURE_2D,T),C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,S),C.pixelStorei(C.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),C.texImage2D(C.TEXTURE_2D,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,y),T.width=P,T.height=A,M&&C.bindTexture(C.TEXTURE_2D,M)}return T},createVideoTexture:function(y,T,S){T===void 0&&(T=!1),S===void 0&&(S=!1);var C=this.gl,P=C.NEAREST,A=C.NEAREST,M=y.videoWidth,L=y.videoHeight,F=C.CLAMP_TO_EDGE,B=l(M,L);return!T&&B&&(F=C.REPEAT),this.config.antialias&&(P=B?this.mipmapFilter:C.LINEAR,A=C.LINEAR),this.createTexture2D(0,P,A,F,F,C.RGBA,y,M,L,!0,!0,S)},updateVideoTexture:function(y,T,S){S===void 0&&(S=!1);var C=this.gl,P=y.videoWidth,A=y.videoHeight;if(P>0&&A>0){C.activeTexture(C.TEXTURE0);var M=C.getParameter(C.TEXTURE_BINDING_2D);C.bindTexture(C.TEXTURE_2D,T),C.pixelStorei(C.UNPACK_FLIP_Y_WEBGL,S),C.texImage2D(C.TEXTURE_2D,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,y),T.width=P,T.height=A,M&&C.bindTexture(C.TEXTURE_2D,M)}return T},setTextureFilter:function(y,T){var S=this.gl,C=[S.LINEAR,S.NEAREST][T];S.activeTexture(S.TEXTURE0);var P=S.getParameter(S.TEXTURE_BINDING_2D);return S.bindTexture(S.TEXTURE_2D,y),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,C),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,C),P&&S.bindTexture(S.TEXTURE_2D,P),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);for(var y=this.gl,T=this.tempTextures,S=0;S + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(92),a=t(102),o=t(373),r=t(376),e=t(377),i=t(108),l=t(378),s=t(379),h=t(380),f=t(381),v=new n({initialize:function(c){this.game=c.game,this.renderer=c,this.classes=new a([[d.UTILITY_PIPELINE,f],[d.MULTI_PIPELINE,i],[d.BITMAPMASK_PIPELINE,o],[d.SINGLE_PIPELINE,h],[d.ROPE_PIPELINE,s],[d.LIGHT_PIPELINE,e],[d.POINTLIGHT_PIPELINE,l],[d.GRAPHICS_PIPELINE,r]]),this.postPipelineClasses=new a,this.pipelines=new a,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(u){var c,x,g=this,m=this.game;if(this.classes.each(function(T,S){c=g.add(T,new S({game:m})),T===d.UTILITY_PIPELINE&&(g.UTILITY_PIPELINE=c,g.fullFrame1=c.fullFrame1,g.fullFrame2=c.fullFrame2,g.halfFrame1=c.halfFrame1,g.halfFrame2=c.halfFrame2)}),this.MULTI_PIPELINE=this.get(d.MULTI_PIPELINE),this.BITMAPMASK_PIPELINE=this.get(d.BITMAPMASK_PIPELINE),u)for(x in u){var y=u[x];c=new y(m),c.isPostFX?this.postPipelineClasses.set(x,y):this.has(x)||(this.classes.set(x,y),this.add(x,c))}},add:function(u,c){if(c.isPostFX){console.warn(u+" is a Post Pipeline. Use `addPostPipeline` instead");return}var x=this.pipelines,g=this.renderer;return x.has(u)?console.warn("Pipeline exists: "+u):(c.name=u,c.manager=this,x.set(u,c)),c.hasBooted||c.boot(),g.width!==0&&g.height!==0&&c.resize(g.width,g.height),c},addPostPipeline:function(u,c){this.postPipelineClasses.has(u)||this.postPipelineClasses.set(u,c)},flush:function(){this.current&&this.current.flush()},has:function(u){var c=this.pipelines;return typeof u=="string"?c.has(u):!!c.contains(u)},get:function(u){var c=this.pipelines;if(typeof u=="string")return c.get(u);if(c.contains(u))return u},getPostPipeline:function(u,c){var x=this.postPipelineClasses,g;if(typeof u=="string"?g=x.get(u):typeof u=="function"?x.contains(u)&&(g=u):typeof u=="object"&&(g=x.get(u.name)),g){var m=new g(this.game);return c&&(m.gameObject=c),m}},remove:function(u,c,x){c===void 0&&(c=!0),x===void 0&&(x=!0),this.pipelines.delete(u),c&&this.classes.delete(u),x&&this.postPipelineClasses.delete(u)},set:function(u,c,x){if(!u.isPostFX)return this.isCurrent(u,x)||(this.flush(),this.current&&this.current.unbind(),this.current=u,u.bind(x)),u.updateProjectionMatrix(),u.onBind(c),u},preBatch:function(u){if(u.hasPostPipeline){this.flush();for(var c=u.postPipelines,x=c.length-1;x>=0;x--){var g=c[x];g.active&&g.preBatch(u)}}},postBatch:function(u){if(u.hasPostPipeline){this.flush();for(var c=u.postPipelines,x=0;x=0;x--){var g=c[x];g.active&&g.preBatch(u)}}},postBatchCamera:function(u){if(u.hasPostPipeline){this.flush();for(var c=u.postPipelines,x=0;x + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(2),a=t(866),o=t(867),r=t(107),e=t(58),i=new n({Extends:e,initialize:function(s){s.fragShader=d(s,"fragShader",a),s.vertShader=d(s,"vertShader",o),s.batchSize=d(s,"batchSize",1),s.vertices=d(s,"vertices",[-1,1,-1,-7,7,1]),s.attributes=d(s,"attributes",[{name:"inPosition",size:2,type:r.FLOAT}]),e.call(this,s)},boot:function(){e.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(l,s){e.prototype.resize.call(this,l,s),this.set2f("uResolution",l,s)},beginMask:function(l,s,h){var f=this.gl;if(l.bitmapMask&&f){var v=this.renderer;v.flush(),v.pushFramebuffer(l.mainFramebuffer),f.disable(f.STENCIL_TEST),f.clearColor(0,0,0,0),f.clear(f.COLOR_BUFFER_BIT),v.currentCameraMask.mask!==l&&(v.currentMask.mask=l,v.currentMask.camera=h)}},endMask:function(l,s){var h=this.gl,f=this.renderer,v=l.bitmapMask;if(v&&h){f.flush(),f.pushFramebuffer(l.maskFramebuffer),h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),f.setBlendMode(0,!0),v.renderWebGL(f,v,s),f.flush(),f.popFramebuffer(),f.popFramebuffer();var u=f.getCurrentStencilMask();u?(h.enable(h.STENCIL_TEST),u.mask.applyStencil(f,u.camera,!0)):f.currentMask.mask=null,f.pipelines.set(this),h.activeTexture(h.TEXTURE1),h.bindTexture(h.TEXTURE_2D,l.maskTexture),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,l.mainTexture),this.set1i("uInvertMaskAlpha",l.invertAlpha),h.drawArrays(this.topology,0,3),f.resetTextures()}}});p.exports=i},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AFTER_FLUSH:t(868),BEFORE_FLUSH:t(869),BIND:t(870),BOOT:t(871),DESTROY:t(872),REBIND:t(873),RESIZE:t(874)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(2),a=t(107),o=new n({initialize:function(e,i,l,s,h){this.pipeline=e,this.name=i,this.renderer=e.renderer,this.gl=this.renderer.gl,this.program=this.renderer.createProgram(l,s),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(h),this.createUniforms()},createAttributes:function(r){var e=0,i=0,l=[];this.vertexComponentCount=0;for(var s=0;s=0?(e.enableVertexAttribArray(y),e.vertexAttribPointer(y,v,u,m,i,c),f.enabled=!0,f.location=y):y!==-1&&e.disableVertexAttribArray(y)}else x?e.vertexAttribPointer(g,v,u,m,i,c):!x&&g>-1&&(e.disableVertexAttribArray(g),f.location=-1)}return this},createUniforms:function(){var r=this.gl,e=this.program,i=this.uniforms,l,s,h,f=r.getProgramParameter(e,r.ACTIVE_UNIFORMS);for(l=0;l0&&(s=s.substr(0,u),i.hasOwnProperty(s)||(h=r.getUniformLocation(e,s),h!==null&&(i[s]={name:s,location:h,value1:null,value2:null,value3:null,value4:null})))}}return this},hasUniform:function(r){return this.uniforms.hasOwnProperty(r)},resetUniform:function(r){var e=this.uniforms[r];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this},setUniform1:function(r,e,i,l){var s=this.uniforms[e];return s?((l||s.value1!==i)&&(s.value1=i,this.renderer.setProgram(this.program),r.call(this.gl,s.location,i),this.pipeline.currentShader=this),this):this},setUniform2:function(r,e,i,l,s){var h=this.uniforms[e];return h?((s||h.value1!==i||h.value2!==l)&&(h.value1=i,h.value2=l,this.renderer.setProgram(this.program),r.call(this.gl,h.location,i,l),this.pipeline.currentShader=this),this):this},setUniform3:function(r,e,i,l,s,h){var f=this.uniforms[e];return f?((h||f.value1!==i||f.value2!==l||f.value3!==s)&&(f.value1=i,f.value2=l,f.value3=s,this.renderer.setProgram(this.program),r.call(this.gl,f.location,i,l,s),this.pipeline.currentShader=this),this):this},setUniform4:function(r,e,i,l,s,h,f){var v=this.uniforms[e];return v?((f||v.value1!==i||v.value2!==l||v.value3!==s||v.value4!==h)&&(v.value1=i,v.value2=l,v.value3=s,v.value4=h,this.renderer.setProgram(this.program),r.call(this.gl,v.location,i,l,s,h),this.pipeline.currentShader=this),this):this},set1f:function(r,e){return this.setUniform1(this.gl.uniform1f,r,e)},set2f:function(r,e,i){return this.setUniform2(this.gl.uniform2f,r,e,i)},set3f:function(r,e,i,l){return this.setUniform3(this.gl.uniform3f,r,e,i,l)},set4f:function(r,e,i,l,s){return this.setUniform4(this.gl.uniform4f,r,e,i,l,s)},set1fv:function(r,e){return this.setUniform1(this.gl.uniform1fv,r,e,!0)},set2fv:function(r,e){return this.setUniform1(this.gl.uniform2fv,r,e,!0)},set3fv:function(r,e){return this.setUniform1(this.gl.uniform3fv,r,e,!0)},set4fv:function(r,e){return this.setUniform1(this.gl.uniform4fv,r,e,!0)},set1iv:function(r,e){return this.setUniform1(this.gl.uniform1iv,r,e,!0)},set2iv:function(r,e){return this.setUniform1(this.gl.uniform2iv,r,e,!0)},set3iv:function(r,e){return this.setUniform1(this.gl.uniform3iv,r,e,!0)},set4iv:function(r,e){return this.setUniform1(this.gl.uniform4iv,r,e,!0)},set1i:function(r,e){return this.setUniform1(this.gl.uniform1i,r,e)},set2i:function(r,e,i){return this.setUniform2(this.gl.uniform2i,r,e,i)},set3i:function(r,e,i,l){return this.setUniform3(this.gl.uniform3i,r,e,i,l)},set4i:function(r,e,i,l,s){return this.setUniform4(this.gl.uniform4i,r,e,i,l,s)},setMatrix2fv:function(r,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,r,e,i,!0)},setMatrix3fv:function(r,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,r,e,i,!0)},setMatrix4fv:function(r,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,r,e,i,!0)},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(59),a=t(2),o=t(875),r=t(876),e=t(25),i=t(107),l=t(58),s=new n({Extends:l,initialize:function(f){f.fragShader=a(f,"fragShader",o),f.vertShader=a(f,"vertShader",r),f.attributes=a(f,"attributes",[{name:"inPosition",size:2},{name:"inColor",size:4,type:i.UNSIGNED_BYTE,normalized:!0}]),l.call(this,f),this.calcMatrix=new e,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},batchFillRect:function(h,f,v,u,c,x){this.renderer.pipelines.set(this);var g=this.calcMatrix;x&&x.multiply(c,g);var m=h+v,y=f+u,T=g.getX(h,f),S=g.getY(h,f),C=g.getX(h,y),P=g.getY(h,y),A=g.getX(m,y),M=g.getY(m,y),L=g.getX(m,f),F=g.getY(m,f),B=this.fillTint;this.batchQuad(T,S,C,P,A,M,L,F,B.TL,B.TR,B.BL,B.BR)},batchFillTriangle:function(h,f,v,u,c,x,g,m){this.renderer.pipelines.set(this);var y=this.calcMatrix;m&&m.multiply(g,y);var T=y.getX(h,f),S=y.getY(h,f),C=y.getX(v,u),P=y.getY(v,u),A=y.getX(c,x),M=y.getY(c,x),L=this.fillTint;this.batchTri(T,S,C,P,A,M,L.TL,L.TR,L.BL)},batchStrokeTriangle:function(h,f,v,u,c,x,g,m,y){var T=this.tempTriangle;T[0].x=h,T[0].y=f,T[0].width=g,T[1].x=v,T[1].y=u,T[1].width=g,T[2].x=c,T[2].y=x,T[2].width=g,T[3].x=h,T[3].y=f,T[3].width=g,this.batchStrokePath(T,g,!1,m,y)},batchFillPath:function(h,f,v){this.renderer.pipelines.set(this);var u=this.calcMatrix;v&&v.multiply(f,u);for(var c=h.length,x=this.polygonCache,g,m,y=this.fillTint.TL,T=this.fillTint.TR,S=this.fillTint.BL,C=0;C0&&q[4]?this.batchQuad(Z,J,z,H,q[0],q[1],q[2],q[3],Q,k,it,tt):($[0]=Z,$[1]=J,$[2]=z,$[3]=H,$[4]=1),y&&$[4]?this.batchQuad(U,Y,w,K,$[0],$[1],$[2],$[3],Q,k,it,tt):(q[0]=U,q[1]=Y,q[2]=w,q[3]=K,q[4]=1)}},batchVert:function(h,f,v){var u=this.vertexViewF32,c=this.vertexViewU32,x=this.vertexCount*this.currentShader.vertexComponentCount-1;u[++x]=h,u[++x]=f,c[++x]=v,this.vertexCount++},batchQuad:function(h,f,v,u,c,x,g,m,y,T,S,C){var P=!1;return this.shouldFlush(6)&&(this.flush(),P=!0),this.batchVert(h,f,y),this.batchVert(v,u,S),this.batchVert(c,x,C),this.batchVert(h,f,y),this.batchVert(c,x,C),this.batchVert(g,m,T),P},batchTri:function(h,f,v,u,c,x,g,m,y){var T=!1;return this.shouldFlush(3)&&(this.flush(),T=!0),this.batchVert(h,f,g),this.batchVert(v,u,m),this.batchVert(c,x,y),T},destroy:function(){return l.prototype.destroy.call(this),this.polygonCache=null,this}});p.exports=s},function(p,E,t){/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(2),a=t(877),o=t(108),r=t(3),e=t(58),i=10,l=new r,s=new n({Extends:o,initialize:function(f){i=f.game.renderer.config.maxLights;for(var v=d(f,"fragShader",a),u=[],c=1;c<=i;c++)u.push({name:"lights"+c,fragShader:v.replace("%LIGHT_COUNT%",c.toString())});f.shaders=u,o.call(this,f),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.lightsActive=!0},boot:function(){e.prototype.boot.call(this);var h=this.gl,f=h.createTexture();h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,f),h.texImage2D(h.TEXTURE_2D,0,h.RGBA,1,1,0,h.RGBA,h.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:f};for(var v=0;v0&&this.flush();var f=this.inverseRotationMatrix;if(h){var v=-h,u=Math.cos(v),c=Math.sin(v);f[1]=c,f[3]=-c,f[0]=f[4]=u}else f[0]=f[4]=1,f[1]=f[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,f),this.currentNormalMapRotation=h}},setTexture2D:function(h,f){var v=this.renderer;h===void 0&&(h=v.tempTextures[0]);var u=this.getNormalMap(f);v.isNewNormalMap(h,u)&&(this.flush(),v.setTextureZero(h),v.setNormalMap(u));var c=f?f.rotation:0;return this.setNormalMapRotation(c),this.currentUnit=0,0},setGameObject:function(h,f){f===void 0&&(f=h.frame);var v=this.renderer,u=f.glTexture,c=this.getNormalMap(h);return v.isNewNormalMap()&&(this.flush(),v.setTextureZero(u),v.setNormalMap(c)),this.setNormalMapRotation(h.rotation),this.currentUnit=0,0},getNormalMap:function(h){var f;return h?h.displayTexture?f=h.displayTexture.dataSource[h.displayFrame.sourceIndex]:h.texture?f=h.texture.dataSource[h.frame.sourceIndex]:h.tileset&&(Array.isArray(h.tileset)?f=h.tileset[0].image.dataSource[0]:f=h.tileset.image.dataSource[0]):f=this.defaultNormalMap,f||(f=this.defaultNormalMap),f.glTexture},batchSprite:function(h,f,v){this.lightsActive&&o.prototype.batchSprite.call(this,h,f,v)},batchTexture:function(h,f,v,u,c,x,g,m,y,T,S,C,P,A,M,L,F,B,N,X,V,W,O,R,I,D,G,U,Y,z,H,w){this.lightsActive&&o.prototype.batchTexture.call(this,h,f,v,u,c,x,g,m,y,T,S,C,P,A,M,L,F,B,N,X,V,W,O,R,I,D,G,U,Y,z,H,w)},batchTextureFrame:function(h,f,v,u,c,x,g){this.lightsActive&&o.prototype.batchTextureFrame.call(this,h,f,v,u,c,x,g)}});s.LIGHT_COUNT=i,p.exports=s},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(2),a=t(880),o=t(881),r=t(58),e=new n({Extends:r,initialize:function(l){l.vertShader=d(l,"vertShader",o),l.fragShader=d(l,"fragShader",a),l.attributes=d(l,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),r.call(this,l)},onRender:function(i,l){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",l.zoom)},batchPointLight:function(i,l,s,h,f,v,u,c,x,g,m,y){var T=i.color,S=i.intensity,C=i.radius,P=i.attenuation,A=T.r*S,M=T.g*S,L=T.b*S,F=l.alpha*i.alpha;this.shouldFlush(6)&&this.flush(),this.batchLightVert(s,h,m,y,C,P,A,M,L,F),this.batchLightVert(f,v,m,y,C,P,A,M,L,F),this.batchLightVert(u,c,m,y,C,P,A,M,L,F),this.batchLightVert(s,h,m,y,C,P,A,M,L,F),this.batchLightVert(u,c,m,y,C,P,A,M,L,F),this.batchLightVert(x,g,m,y,C,P,A,M,L,F)},batchLightVert:function(i,l,s,h,f,v,u,c,x,g){var m=this.vertexViewF32,y=this.vertexCount*this.currentShader.vertexComponentCount-1;m[++y]=i,m[++y]=l,m[++y]=s,m[++y]=h,m[++y]=f,m[++y]=v,m[++y]=u,m[++y]=c,m[++y]=x,m[++y]=g,this.vertexCount++}});p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(2),a=t(108),o=new n({Extends:a,initialize:function(e){e.topology=5,e.batchSize=d(e,"batchSize",256),a.call(this,e)}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(2),a=t(108),o=t(882),r=t(883),e=t(58),i=new n({Extends:a,initialize:function(s){s.fragShader=d(s,"fragShader",o),s.vertShader=d(s,"vertShader",r),s.forceZero=!0,a.call(this,s)},boot:function(){e.prototype.boot.call(this),this.set1i("uMainSampler",0)}});p.exports=i},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(884),d=t(35),a=t(0),o=t(198),r=t(885),e=t(886),i=t(2),l=t(887),s=t(382),h=t(58),f=new a({Extends:h,initialize:function(u){u.renderTarget=i(u,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),u.vertShader=i(u,"vertShader",s),u.shaders=i(u,"shaders",[{name:"Copy",fragShader:e},{name:"AddBlend",fragShader:n},{name:"LinearBlend",fragShader:l},{name:"ColorMatrix",fragShader:r}]),u.attributes=i(u,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),u.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],u.batchSize=1,h.call(this,u),this.colorMatrix=new o,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){h.prototype.boot.call(this);var v=this.shaders,u=this.renderTargets;this.copyShader=v[0],this.addShader=v[1],this.linearShader=v[2],this.colorMatrixShader=v[3],this.fullFrame1=u[0],this.fullFrame2=u[1],this.halfFrame1=u[2],this.halfFrame2=u[3]},copyFrame:function(v,u,c,x,g){c===void 0&&(c=1),x===void 0&&(x=!0),g===void 0&&(g=!0);var m=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",c),m.activeTexture(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,v.texture),u?(m.viewport(0,0,u.width,u.height),m.bindFramebuffer(m.FRAMEBUFFER,u.framebuffer),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,u.texture,0)):m.viewport(0,0,v.width,v.height),x&&(g?m.clearColor(0,0,0,0):m.clearColor(0,0,0,1),m.clear(m.COLOR_BUFFER_BIT)),m.bufferData(m.ARRAY_BUFFER,this.vertexData,m.STATIC_DRAW),m.drawArrays(m.TRIANGLES,0,6),m.bindFramebuffer(m.FRAMEBUFFER,null),m.bindTexture(m.TEXTURE_2D,null)},blitFrame:function(v,u,c,x,g,m){c===void 0&&(c=1),x===void 0&&(x=!0),g===void 0&&(g=!0),m===void 0&&(m=!1);var y=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",c),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,v.texture),v.height>u.height)y.viewport(0,0,v.width,v.height),this.setTargetUVs(v,u);else{var T=u.height-v.height;y.viewport(0,T,v.width,v.height)}if(y.bindFramebuffer(y.FRAMEBUFFER,u.framebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,u.texture,0),x&&(g?y.clearColor(0,0,0,0):y.clearColor(0,0,0,1),y.clear(y.COLOR_BUFFER_BIT)),m){var S=this.renderer.currentBlendMode;this.renderer.setBlendMode(d.ERASE)}y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),m&&this.renderer.setBlendMode(S),y.bindFramebuffer(y.FRAMEBUFFER,null),y.bindTexture(y.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(v,u,c,x,g,m,y,T){y===void 0&&(y=!0),T===void 0&&(T=!0);var S=this.gl;S.bindFramebuffer(S.FRAMEBUFFER,v.framebuffer),S.framebufferTexture2D(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,S.TEXTURE_2D,v.texture,0),y&&(T?S.clearColor(0,0,0,0):S.clearColor(0,0,0,1),S.clear(S.COLOR_BUFFER_BIT)),S.activeTexture(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,u.texture),S.copyTexSubImage2D(S.TEXTURE_2D,0,0,0,c,x,g,m),S.bindFramebuffer(S.FRAMEBUFFER,null),S.bindTexture(S.TEXTURE_2D,null)},copyToGame:function(v){var u=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,v.texture),u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.STATIC_DRAW),u.drawArrays(u.TRIANGLES,0,6),this.renderer.resetTextures()},drawFrame:function(v,u,c,x){c===void 0&&(c=!0),x===void 0&&(x=this.colorMatrix);var g=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",x.getData()),this.set1f("uAlpha",x.alpha),g.activeTexture(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,v.texture),u?(g.viewport(0,0,u.width,u.height),g.bindFramebuffer(g.FRAMEBUFFER,u.framebuffer),g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.TEXTURE_2D,u.texture,0)):g.viewport(0,0,v.width,v.height),c?g.clearColor(0,0,0,0):g.clearColor(0,0,0,1),g.clear(g.COLOR_BUFFER_BIT),g.bufferData(g.ARRAY_BUFFER,this.vertexData,g.STATIC_DRAW),g.drawArrays(g.TRIANGLES,0,6),g.bindFramebuffer(g.FRAMEBUFFER,null),g.bindTexture(g.TEXTURE_2D,null)},blendFrames:function(v,u,c,x,g,m){x===void 0&&(x=1),g===void 0&&(g=!0),m===void 0&&(m=this.linearShader);var y=this.gl;this.setShader(m),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",x),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,v.texture),y.activeTexture(y.TEXTURE1),y.bindTexture(y.TEXTURE_2D,u.texture),c?(y.bindFramebuffer(y.FRAMEBUFFER,c.framebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,c.texture,0),y.viewport(0,0,c.width,c.height)):y.viewport(0,0,v.width,v.height),g?y.clearColor(0,0,0,0):y.clearColor(0,0,0,1),y.clear(y.COLOR_BUFFER_BIT),y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null),y.bindTexture(y.TEXTURE_2D,null)},blendFramesAdditive:function(v,u,c,x,g){this.blendFrames(v,u,c,x,g,this.addShader)},clearFrame:function(v,u){u===void 0&&(u=!0);var c=this.gl;c.viewport(0,0,v.width,v.height),c.bindFramebuffer(c.FRAMEBUFFER,v.framebuffer),u?c.clearColor(0,0,0,0):c.clearColor(0,0,0,1),c.clear(c.COLOR_BUFFER_BIT);var x=this.renderer.currentFramebuffer;c.bindFramebuffer(c.FRAMEBUFFER,x)},setUVs:function(v,u,c,x,g,m,y,T){var S=this.vertexViewF32;S[2]=v,S[3]=u,S[6]=c,S[7]=x,S[10]=g,S[11]=m,S[14]=v,S[15]=u,S[18]=g,S[19]=m,S[22]=y,S[23]=T},setTargetUVs:function(v,u){var c=u.height/v.height;c>.5?c=.5-(c-.5):c=.5+(.5-c),this.setUVs(0,c,0,1+c,1,1+c,1,c)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});p.exports=f},function(p,E){p.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;",""," gl_Position = vec4(inPosition, 0, 1);","}",""].join(` +`)},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(31),d=t(38),a=t(2),o=function(r,e){var i=r.getContext("experimental-webgl"),l=a(e,"callback"),s=a(e,"type","image/png"),h=a(e,"encoder",.92),f=a(e,"x",0),v=a(e,"y",0),u=a(e,"getPixel",!1),c=a(e,"isFramebuffer",!1),x=c?a(e,"bufferWidth",1):i.drawingBufferWidth,g=c?a(e,"bufferHeight",1):i.drawingBufferHeight;if(u){var m=new Uint8Array(4),y=c?v:g-v;i.readPixels(f,y,1,1,i.RGBA,i.UNSIGNED_BYTE,m),l.call(null,new d(m[0],m[1],m[2],m[3]/255))}else{var T=a(e,"width",x),S=a(e,"height",g),C=T*S*4,P=new Uint8Array(C);i.readPixels(f,g-v-S,T,S,i.RGBA,i.UNSIGNED_BYTE,P);for(var A=n.createWebGL(this,T,S),M=A.getContext("2d"),L=M.getImageData(0,0,T,S),F=L.data,B=0;B + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(33),d=function(a){var o=a.config;if(!o.hideBanner){var r="WebGL";o.renderType===n.CANVAS?r="Canvas":o.renderType===n.HEADLESS&&(r="Headless");var e=o.audio,i=a.device.audio,l;if(i.webAudio&&!e.disableWebAudio?l="Web Audio":e.noAudio||!i.webAudio&&!i.audioData?l="No Audio":l="HTML5 Audio",a.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var s="",h=[s];if(Array.isArray(o.bannerBackgroundColor)){var f;o.bannerBackgroundColor.forEach(function(u){s=s.concat("%c "),h.push("background: "+u),f=u}),h[h.length-1]="color: "+o.bannerTextColor+"; background: "+f}else s=s.concat("%c "),h.push("color: "+o.bannerTextColor+"; background: "+o.bannerBackgroundColor);h.push("background: transparent"),o.gameTitle&&(s=s.concat(o.gameTitle),o.gameVersion&&(s=s.concat(" v"+o.gameVersion)),o.hidePhaser||(s=s.concat(" / ")));var v="";o.hidePhaser||(s=s.concat("Phaser v"+n.VERSION+v+" ("+r+" | "+l+")")),s=s.concat(" %c "+o.gameURL),h[0]=s,console.log.apply(console,h)}}};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(6),a=t(1),o=t(386),r=new n({initialize:function(i,l){this.game=i,this.raf=new o,this.started=!1,this.running=!1,this.minFps=d(l,"min",5),this.targetFps=d(l,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=a,this.forceSetTimeOut=d(l,"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=d(l,"deltaHistory",10),this.panicMax=d(l,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=d(l,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var e=window.performance.now();this.time=e,this.lastTime=e,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0;for(var i=0;i0||!this.inFocus)&&(this._coolDown--,f=Math.min(f,this._target)),f>this._min&&(f=s[l],f=Math.min(f,this._min)),s[l]=f,this.deltaIndex++,this.deltaIndex>h&&(this.deltaIndex=0),v=0;for(var u=0;uthis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0),this.framesThisSecond++;var c=v/this._target;this.callback(e,v,c),this.lastTime=e,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(e){this.running||(e&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},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.callback=a,this.raf=null,this.game=null}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(1),a=new n({initialize:function(){this.isRunning=!1,this.callback=d,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var r=this;this.step=function e(){var i=window.performance.now();r.lastTime=r.tick,r.tick=i,r.callback(i),r.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),l=Math.min(Math.max(r.target*2+r.tick-i,0),r.target);r.lastTime=r.tick,r.tick=i,r.callback(i),r.timeOutID=window.setTimeout(e,l)}},start:function(o,r,e){this.isRunning||(this.callback=o,this.isSetTimeOut=r,this.target=e,this.isRunning=!0,this.timeOutID=r?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=d}});p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(22),d=function(a){var o,r=a.events;if(document.hidden!==void 0)o="visibilitychange";else{var e=["webkit","moz","ms"];e.forEach(function(l){document[l+"Hidden"]!==void 0&&(document.hidden=function(){return document[l+"Hidden"]},o=l+"visibilitychange")})}var i=function(l){document.hidden||l.type==="pause"?r.emit(n.HIDDEN):r.emit(n.VISIBLE)};o&&document.addEventListener(o,i,!1),window.onblur=function(){r.emit(n.BLUR)},window.onfocus=function(){r.emit(n.FOCUS)},window.focus&&a.config.autoFocus&&window.focus()};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(389),d=t(31),a=t(6),o=function(r){var e=a(r,"data",[]),i=a(r,"canvas",null),l=a(r,"palette",n),s=a(r,"pixelWidth",1),h=a(r,"pixelHeight",s),f=a(r,"resizeCanvas",!0),v=a(r,"clearCanvas",!0),u=a(r,"preRender",null),c=a(r,"postRender",null),x=Math.floor(Math.abs(e[0].length*s)),g=Math.floor(Math.abs(e.length*h));i||(i=d.create2D(this,x,g),f=!1,v=!1),f&&(i.width=x,i.height=g);var m=i.getContext("2d");v&&m.clearRect(0,0,x,g),u&&u(i,m);for(var y=0;y + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(358),a=t(94),o=t(3),r=new n({Extends:a,initialize:function(i,l,s,h){a.call(this,"CubicBezierCurve"),Array.isArray(i)&&(h=new o(i[6],i[7]),s=new o(i[4],i[5]),l=new o(i[2],i[3]),i=new o(i[0],i[1])),this.p0=i,this.p1=l,this.p2=s,this.p3=h},getStartPoint:function(e){return e===void 0&&(e=new o),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,i){i===void 0&&(i=new o);var l=this.p0,s=this.p1,h=this.p2,f=this.p3;return i.set(d(e,l.x,s.x,h.x,f.x),d(e,l.y,s.y,h.y,f.y))},draw:function(e,i){i===void 0&&(i=32);var l=this.getPoints(i);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var s=1;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(94),a=t(36),o=t(6),r=t(196),e=t(3),i=new n({Extends:d,initialize:function(s,h,f,v,u,c,x,g){if(typeof s=="object"){var m=s;s=o(m,"x",0),h=o(m,"y",0),f=o(m,"xRadius",0),v=o(m,"yRadius",f),u=o(m,"startAngle",0),c=o(m,"endAngle",360),x=o(m,"clockwise",!1),g=o(m,"rotation",0)}else v===void 0&&(v=f),u===void 0&&(u=0),c===void 0&&(c=360),x===void 0&&(x=!1),g===void 0&&(g=0);d.call(this,"EllipseCurve"),this.p0=new e(s,h),this._xRadius=f,this._yRadius=v,this._startAngle=a(u),this._endAngle=a(c),this._clockwise=x,this._rotation=a(g)},getStartPoint:function(l){return l===void 0&&(l=new e),this.getPoint(0,l)},getResolution:function(l){return l*2},getPoint:function(l,s){s===void 0&&(s=new e);for(var h=Math.PI*2,f=this._endAngle-this._startAngle,v=Math.abs(f)h;)f-=h;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(94),a=t(199),o=t(10),r=t(3),e=new n({Extends:d,initialize:function(l,s){d.call(this,"LineCurve"),Array.isArray(l)&&(s=new r(l[2],l[3]),l=new r(l[0],l[1])),this.p0=l,this.p1=s,this.arcLengthDivisions=1},getBounds:function(i){return i===void 0&&(i=new o),a([this.p0,this.p1],i)},getStartPoint:function(i){return i===void 0&&(i=new r),i.copy(this.p0)},getResolution:function(i){return i===void 0&&(i=1),i},getPoint:function(i,l){return l===void 0&&(l=new r),i===1?l.copy(this.p1):(l.copy(this.p1).subtract(this.p0).scale(i).add(this.p0),l)},getPointAt:function(i,l){return this.getPoint(i,l)},getTangent:function(i,l){return l===void 0&&(l=new r),l.copy(this.p1).subtract(this.p0).normalize(),l},getUtoTmapping:function(i,l,s){var h;if(l){var f=this.getLengths(s),v=f[f.length-1],u=Math.min(l,v);h=u/v}else h=i;return h},draw:function(i){return i.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),i},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});e.fromJSON=function(i){var l=i.points,s=new r(l[0],l[1]),h=new r(l[2],l[3]);return new e(s,h)},p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(3),a=new n({initialize:function(r,e){this.active=!1,this.p0=new d(r,e)},getPoint:function(o,r){return r===void 0&&(r=new d),r.copy(this.p0)},getPointAt:function(o,r){return this.getPoint(o,r)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(94),a=t(359),o=t(3),r=new n({Extends:d,initialize:function(i,l,s){d.call(this,"QuadraticBezier"),Array.isArray(i)&&(s=new o(i[4],i[5]),l=new o(i[2],i[3]),i=new o(i[0],i[1])),this.p0=i,this.p1=l,this.p2=s},getStartPoint:function(e){return e===void 0&&(e=new o),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,i){i===void 0&&(i=new o);var l=this.p0,s=this.p1,h=this.p2;return i.set(a(e,l.x,s.x,h.x),a(e,l.y,s.y,h.y))},draw:function(e,i){i===void 0&&(i=32);var l=this.getPoints(i);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var s=1;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(194),d=t(0),a=t(94),o=t(3),r=new d({Extends:a,initialize:function(i){i===void 0&&(i=[]),a.call(this,"SplineCurve"),this.points=[],this.addPoints(i)},addPoints:function(e){for(var i=0;il.length-2?l.length-1:h+1],x=l[h>l.length-3?l.length-1:h+2];return i.set(n(f,v.x,u.x,c.x,x.x),n(f,v.y,u.y,c.y,x.y))},toJSON:function(){for(var e=[],i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o,r,e,i){(!r||r==="")&&(r=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join(` +`)),(!e||e==="")&&(e=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join(` +`)),i===void 0&&(i=null),this.key=o,this.fragmentSrc=r,this.vertexSrc=e,this.uniforms=i}});p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(38);n.ColorSpectrum=t(909),n.ColorToRGBA=t(910),n.ComponentToHex=t(398),n.GetColor=t(103),n.GetColor32=t(328),n.HexStringToColor=t(327),n.HSLToColor=t(911),n.HSVColorWheel=t(912),n.HSVToRGB=t(188),n.HueToComponent=t(399),n.IntegerToColor=t(189),n.IntegerToRGB=t(330),n.Interpolate=t(913),n.ObjectToColor=t(331),n.RandomRGB=t(914),n.RGBStringToColor=t(332),n.RGBToHSV=t(329),n.RGBToString=t(915),n.ValueToColor=t(187),p.exports=n},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d=n.toString(16);return d.length===1?"0"+d:d};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return a<0&&(a+=1),a>1&&(a-=1),a<.16666666666666666?n+(d-n)*6*a:a<.5?d:a<.6666666666666666?n+(d-n)*(.6666666666666666-a)*6:n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(105),d=function(a){if(document.readyState==="complete"||document.readyState==="interactive"){a();return}var o=function(){document.removeEventListener("deviceready",o,!0),document.removeEventListener("DOMContentLoaded",o,!0),window.removeEventListener("load",o,!0),a()};document.body?n.cordova?document.addEventListener("deviceready",o,!1):(document.addEventListener("DOMContentLoaded",o,!0),window.addEventListener("load",o,!0)):window.setTimeout(o,20)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){if(!n)return window.innerHeight;var d=Math.abs(window.orientation),a={w:0,h:0},o=document.createElement("div");return o.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(o),a.w=d===90?o.offsetHeight:window.innerWidth,a.h=d===90?window.innerWidth:o.offsetHeight,document.documentElement.removeChild(o),o=null,Math.abs(window.orientation)!==90?a.h:a.w};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(201),d=function(a,o){var r=window.screen,e=r?r.orientation||r.mozOrientation||r.msOrientation:!1;if(e&&typeof e.type=="string")return e.type;if(typeof e=="string")return e;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return n.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return n.ORIENTATION.LANDSCAPE}else return o>a?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d;return n!==""&&(typeof n=="string"?d=document.getElementById(n):n&&n.nodeType===1&&(d=n)),d||(d=document.body),d};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d="";try{if(window.DOMParser){var a=new DOMParser;d=a.parseFromString(n,"text/xml")}else d=new ActiveXObject("Microsoft.XMLDOM"),d.loadXML(n)}catch{d=null}return!d||!d.documentElement||d.getElementsByTagName("parsererror").length?null:d};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(203),a=t(9),o=t(51),r=t(22),e=t(410),i=t(411),l=t(412),s=t(413),h=t(25),f=t(177),v=new n({initialize:function(c,x){this.game=c,this.scaleManager,this.canvas,this.config=x,this.enabled=!0,this.events=new a,this.isOver=!0,this.defaultCursor="",this.keyboard=x.inputKeyboard?new e(this):null,this.mouse=x.inputMouse?new i(this):null,this.touch=x.inputTouch?new s(this):null,this.pointers=[],this.pointersTotal=x.inputActivePointers,x.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var g=0;g<=this.pointersTotal;g++){var m=new l(this,g);m.smoothFactor=x.inputSmoothFactor,this.pointers.push(m)}this.mousePointer=x.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 h,this._tempMatrix2=new h,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],c.events.once(r.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(r.PRE_RENDER,this.preRender,this),this.game.events.once(r.DESTROY,this.destroy,this)},setCanvasOver:function(u){this.isOver=!0,this.events.emit(o.GAME_OVER,u)},setCanvasOut:function(u){this.isOver=!1,this.events.emit(o.GAME_OUT,u)},preRender:function(){var u=this.game.loop.now,c=this.game.loop.delta,x=this.game.scene.getScenes(!0,!0);this.time=u,this.events.emit(o.MANAGER_UPDATE);for(var g=0;g10&&(u=10-this.pointersTotal);for(var x=0;x + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(93),d=t(0),a=t(22),o=t(51),r=t(143),e=t(1),i=new d({initialize:function(s){this.manager=s,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=e,this.onKeyUp=e,s.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var l=this.manager.config;this.enabled=l.inputKeyboard,this.target=l.inputKeyboardEventTarget,this.addCapture(l.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(a.POST_STEP,this.postUpdate,this)},startListeners:function(){var l=this;this.onKeyDown=function(h){if(!(h.defaultPrevented||!l.enabled||!l.manager)){l.queue.push(h),l.manager.events.emit(o.MANAGER_PROCESS);var f=h.altKey||h.ctrlKey||h.shiftKey||h.metaKey;l.preventDefault&&!f&&l.captures.indexOf(h.keyCode)>-1&&h.preventDefault()}},this.onKeyUp=function(h){if(!(h.defaultPrevented||!l.enabled||!l.manager)){l.queue.push(h),l.manager.events.emit(o.MANAGER_PROCESS);var f=h.altKey||h.ctrlKey||h.shiftKey||h.metaKey;l.preventDefault&&!f&&l.captures.indexOf(h.keyCode)>-1&&h.preventDefault()}};var s=this.target;s&&(s.addEventListener("keydown",this.onKeyDown,!1),s.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var l=this.target;l.removeEventListener("keydown",this.onKeyDown,!1),l.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(l){typeof l=="string"&&(l=l.split(",")),Array.isArray(l)||(l=[l]);for(var s=this.captures,h=0;h0},removeCapture:function(l){typeof l=="string"&&(l=l.split(",")),Array.isArray(l)||(l=[l]);for(var s=this.captures,h=0;h0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(a.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});p.exports=i},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(191),a=t(51),o=t(1),r=new n({initialize:function(i){this.manager=i,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,this.isTop=!0,i.events.once(a.MANAGER_BOOT,this.boot,this)},boot:function(){var e=this.manager.config;this.enabled=e.inputMouse,this.target=e.inputMouseEventTarget,this.passive=e.inputMousePassive,this.preventDefaultDown=e.inputMousePreventDefaultDown,this.preventDefaultUp=e.inputMousePreventDefaultUp,this.preventDefaultMove=e.inputMousePreventDefaultMove,this.preventDefaultWheel=e.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,e.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(e){return e.preventDefault(),!1}),this},requestPointerLock:function(){if(d.pointerLock){var e=this.target;e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock()}},releasePointerLock:function(){d.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var e=this.target;if(!!e){var i=this,l=this.manager,s=l.canvas,h=window&&window.focus&&l.game.config.autoFocus;this.onMouseMove=function(v){!v.defaultPrevented&&i.enabled&&l&&l.enabled&&(l.onMouseMove(v),i.preventDefaultMove&&v.preventDefault())},this.onMouseDown=function(v){h&&window.focus(),!v.defaultPrevented&&i.enabled&&l&&l.enabled&&(l.onMouseDown(v),i.preventDefaultDown&&v.target===s&&v.preventDefault())},this.onMouseDownWindow=function(v){!v.defaultPrevented&&i.enabled&&l&&l.enabled&&v.target!==s&&l.onMouseDown(v)},this.onMouseUp=function(v){!v.defaultPrevented&&i.enabled&&l&&l.enabled&&(l.onMouseUp(v),i.preventDefaultUp&&v.target===s&&v.preventDefault())},this.onMouseUpWindow=function(v){!v.defaultPrevented&&i.enabled&&l&&l.enabled&&v.target!==s&&l.onMouseUp(v)},this.onMouseOver=function(v){!v.defaultPrevented&&i.enabled&&l&&l.enabled&&l.setCanvasOver(v)},this.onMouseOut=function(v){!v.defaultPrevented&&i.enabled&&l&&l.enabled&&l.setCanvasOut(v)},this.onMouseWheel=function(v){!v.defaultPrevented&&i.enabled&&l&&l.enabled&&l.onMouseWheel(v),i.preventDefaultWheel&&v.target===s&&v.preventDefault()};var f={passive:!0};if(e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mouseover",this.onMouseOver,f),e.addEventListener("mouseout",this.onMouseOut,f),this.preventDefaultWheel?e.addEventListener("wheel",this.onMouseWheel,{passive:!1}):e.addEventListener("wheel",this.onMouseWheel,f),window&&l.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,f),window.top.addEventListener("mouseup",this.onMouseUpWindow,f)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,f),window.addEventListener("mouseup",this.onMouseUpWindow,f),this.isTop=!1}d.pointerLock&&(this.pointerLockChange=function(v){var u=i.target;i.locked=document.pointerLockElement===u||document.mozPointerLockElement===u||document.webkitPointerLockElement===u,l.onPointerLockChange(v)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var e=this.target;e.removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("mousedown",this.onMouseDown),e.removeEventListener("mouseup",this.onMouseUp),e.removeEventListener("mouseover",this.onMouseOver),e.removeEventListener("mouseout",this.onMouseOut),window&&(e=this.isTop?window.top:window,e.removeEventListener("mousedown",this.onMouseDownWindow),e.removeEventListener("mouseup",this.onMouseUpWindow)),d.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(349),d=t(0),a=t(50),o=t(124),r=t(360),e=t(3),i=t(105),l=new d({initialize:function(h,f){this.manager=h,this.id=f,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new e,this.prevPosition=new e,this.midPoint=new e(-1,-1),this.velocity=new e,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=f===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(s){var h=s.getWorldPoint(this.x,this.y);return this.worldX=h.x,this.worldY=h.y,this},positionToCamera:function(s,h){return s.getWorldPoint(this.x,this.y,h)},updateMotion:function(){var s=this.position.x,h=this.position.y,f=this.midPoint.x,v=this.midPoint.y;if(!(s===f&&h===v)){var u=r(this.motionFactor,f,s),c=r(this.motionFactor,v,h);o(u,s,.1)&&(u=s),o(c,h,.1)&&(c=h),this.midPoint.set(u,c);var x=s-u,g=h-c;this.velocity.set(x,g),this.angle=n(u,c,s,h),this.distance=Math.sqrt(x*x+g*g)}},up:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.button=s.button,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),s.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=s.timeStamp,this.wasTouch=!1)},down:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.button=s.button,this.downElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),s.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),i.macOS&&s.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=s.timeStamp),this.wasTouch=!1},move:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.manager.transformPointer(this,s.pageX,s.pageY,!0),this.locked&&(this.movementX=s.movementX||s.mozMovementX||s.webkitMovementX||0,this.movementY=s.movementY||s.mozMovementY||s.webkitMovementY||0),this.moveTime=s.timeStamp,this.wasTouch=!1},wheel:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.deltaX=s.deltaX,this.deltaY=s.deltaY,this.deltaZ=s.deltaZ,this.wasTouch=!1},touchstart:function(s,h){s.pointerId&&(this.pointerId=s.pointerId),this.identifier=s.identifier,this.target=s.target,this.active=!0,this.buttons=1,this.event=h,this.downElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=h.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(s,h){this.event=h,this.manager.transformPointer(this,s.pageX,s.pageY,!0),this.moveTime=h.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(s,h){this.buttons=0,this.event=h,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=h.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(s,h){this.buttons=0,this.event=h,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=h.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return this.buttons===0},leftButtonDown:function(){return!!(this.buttons&1)},rightButtonDown:function(){return!!(this.buttons&2)},middleButtonDown:function(){return!!(this.buttons&4)},backButtonDown:function(){return!!(this.buttons&8)},forwardButtonDown:function(){return!!(this.buttons&16)},leftButtonReleased:function(){return this.button===0&&!this.isDown},rightButtonReleased:function(){return this.button===2&&!this.isDown},middleButtonReleased:function(){return this.button===1&&!this.isDown},backButtonReleased:function(){return this.button===3&&!this.isDown},forwardButtonReleased:function(){return this.button===4&&!this.isDown},getDistance:function(){return this.isDown?a(this.downX,this.downY,this.x,this.y):a(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?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(s,h){s===void 0&&(s=10),h===void 0&&(h=[]);for(var f=this.prevPosition.x,v=this.prevPosition.y,u=this.position.x,c=this.position.y,x=0;x + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(51),a=t(1),o=new n({initialize:function(e){this.manager=e,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=a,this.onTouchStartWindow=a,this.onTouchMove=a,this.onTouchEnd=a,this.onTouchEndWindow=a,this.onTouchCancel=a,this.onTouchCancelWindow=a,this.onTouchOver=a,this.onTouchOut=a,e.events.once(d.MANAGER_BOOT,this.boot,this)},boot:function(){var r=this.manager.config;this.enabled=r.inputTouch,this.target=r.inputTouchEventTarget,this.capture=r.inputTouchCapture,this.target||(this.target=this.manager.game.canvas),r.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(r){return r.preventDefault(),!1}),this},startListeners:function(){var r=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onTouchStart=function(f){i&&window.focus(),!f.defaultPrevented&&r.enabled&&r.manager&&r.manager.enabled&&(r.manager.onTouchStart(f),r.capture&&f.cancelable&&f.target===e&&f.preventDefault())},this.onTouchStartWindow=function(f){!f.defaultPrevented&&r.enabled&&r.manager&&r.manager.enabled&&f.target!==e&&r.manager.onTouchStart(f)},this.onTouchMove=function(f){!f.defaultPrevented&&r.enabled&&r.manager&&r.manager.enabled&&(r.manager.onTouchMove(f),r.capture&&f.cancelable&&f.preventDefault())},this.onTouchEnd=function(f){!f.defaultPrevented&&r.enabled&&r.manager&&r.manager.enabled&&(r.manager.onTouchEnd(f),r.capture&&f.cancelable&&f.target===e&&f.preventDefault())},this.onTouchEndWindow=function(f){!f.defaultPrevented&&r.enabled&&r.manager&&r.manager.enabled&&f.target!==e&&r.manager.onTouchEnd(f)},this.onTouchCancel=function(f){!f.defaultPrevented&&r.enabled&&r.manager&&r.manager.enabled&&(r.manager.onTouchCancel(f),r.capture&&f.preventDefault())},this.onTouchCancelWindow=function(f){!f.defaultPrevented&&r.enabled&&r.manager&&r.manager.enabled&&r.manager.onTouchCancel(f)},this.onTouchOver=function(f){!f.defaultPrevented&&r.enabled&&r.manager&&r.manager.enabled&&r.manager.setCanvasOver(f)},this.onTouchOut=function(f){!f.defaultPrevented&&r.enabled&&r.manager&&r.manager.enabled&&r.manager.setCanvasOut(f)};var l=this.target;if(!!l){var s={passive:!0},h={passive:!1};l.addEventListener("touchstart",this.onTouchStart,this.capture?h:s),l.addEventListener("touchmove",this.onTouchMove,this.capture?h:s),l.addEventListener("touchend",this.onTouchEnd,this.capture?h:s),l.addEventListener("touchcancel",this.onTouchCancel,this.capture?h:s),l.addEventListener("touchover",this.onTouchOver,this.capture?h:s),l.addEventListener("touchout",this.onTouchOut,this.capture?h:s),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("touchstart",this.onTouchStartWindow,h),window.addEventListener("touchend",this.onTouchEndWindow,h),window.addEventListener("touchcancel",this.onTouchCancelWindow,h)),this.enabled=!0}},stopListeners:function(){var r=this.target;r.removeEventListener("touchstart",this.onTouchStart),r.removeEventListener("touchmove",this.onTouchMove),r.removeEventListener("touchend",this.onTouchEnd),r.removeEventListener("touchcancel",this.onTouchCancel),r.removeEventListener("touchover",this.onTouchOver),r.removeEventListener("touchout",this.onTouchOut),window&&(window.removeEventListener("touchstart",this.onTouchStartWindow),window.removeEventListener("touchend",this.onTouchEndWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(22),a=t(9),o=t(8),r=t(16),e=t(5),i=t(2),l=t(24),s=t(93),h=new n({Extends:a,initialize:function(v){a.call(this),this.game=v,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],v.isBooted?this.boot():v.events.once(d.BOOT,this.boot,this)},boot:function(){var f,v,u,c,x,g,m,y=this.game.config,T=y.installGlobalPlugins;for(T=T.concat(this._pendingGlobal),f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(201),d=t(0),a=t(9),o=t(104),r=t(22),e=t(401),i=t(407),l=t(402),s=t(1),h=t(10),f=t(416),v=t(76),u=t(3),c=new d({Extends:a,initialize:function(g){a.call(this),this.game=g,this.canvas,this.canvasBounds=new h,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=n.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new u(1,1),this.autoRound=!1,this.autoCenter=n.CENTER.NO_CENTER,this.orientation=n.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.listeners={orientationChange:s,windowResize:s,fullScreenChange:s,fullScreenError:s}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(r.BOOT,this.boot,this)},boot:function(){var x=this.game;this.canvas=x.canvas,this.fullscreen=x.device.fullscreen,this.scaleMode!==n.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===n.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),x.events.on(r.PRE_STEP,this.step,this),x.events.once(r.READY,this.refresh,this),x.events.once(r.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(x){this.getParent(x),this.getParentBounds();var g=x.width,m=x.height,y=x.scaleMode,T=x.zoom,S=x.autoRound;if(typeof g=="string"){var C=this.parentSize.width;C===0&&(C=window.innerWidth);var P=parseInt(g,10)/100;g=Math.floor(C*P)}if(typeof m=="string"){var A=this.parentSize.height;A===0&&(A=window.innerHeight);var M=parseInt(m,10)/100;m=Math.floor(A*M)}this.scaleMode=y,this.autoRound=S,this.autoCenter=x.autoCenter,this.resizeInterval=x.resizeInterval,S&&(g=Math.floor(g),m=Math.floor(m)),this.gameSize.setSize(g,m),T===n.ZOOM.MAX_ZOOM&&(T=this.getMaxZoom()),this.zoom=T,T!==1&&(this._resetZoom=!0),this.baseSize.setSize(g,m),S&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),x.minWidth>0&&this.displaySize.setMin(x.minWidth*T,x.minHeight*T),x.maxWidth>0&&this.displaySize.setMax(x.maxWidth*T,x.maxHeight*T),this.displaySize.setSize(g,m),this.orientation=l(g,m)},getParent:function(x){var g=x.parent;if(g!==null){if(this.parent=i(g),this.parentIsWindow=this.parent===document.body,x.expandParent&&x.scaleMode!==n.SCALE_MODE.NONE){var m=this.parent.getBoundingClientRect();(this.parentIsWindow||m.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",m=this.parent.getBoundingClientRect(),!this.parentIsWindow&&m.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}x.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=i(x.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var x=this.parentSize,g=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(g.height=e(!0));var m=g.width,y=g.height;return x.width!==m||x.height!==y?(x.setSize(m,y),!0):!1},lockOrientation:function(x){var g=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return g?g.call(screen,x):!1},setParentSize:function(x,g){return this.parentSize.setSize(x,g),this.refresh()},setGameSize:function(x,g){var m=this.autoRound;m&&(x=Math.floor(x),g=Math.floor(g));var y=this.width,T=this.height;return this.gameSize.resize(x,g),this.baseSize.resize(x,g),m&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(x/g),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(y,T)},resize:function(x,g){var m=this.zoom,y=this.autoRound;y&&(x=Math.floor(x),g=Math.floor(g));var T=this.width,S=this.height;this.gameSize.resize(x,g),this.baseSize.resize(x,g),y&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(x*m,g*m),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var C=this.canvas.style,P=x*m,A=g*m;return y&&(P=Math.floor(P),A=Math.floor(A)),(P!==x||A!==g)&&(C.width=P+"px",C.height=A+"px"),this.refresh(T,S)},setZoom:function(x){return this.zoom=x,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(x,g){x===void 0&&(x=this.width),g===void 0&&(g=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var m=this.game.domContainer;if(m){this.baseSize.setCSS(m);var y=this.canvas.style,T=m.style;T.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",T.marginLeft=y.marginLeft,T.marginTop=y.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,x,g),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var x=l(this.width,this.height);x!==this.orientation&&(this.orientation=x,this.emit(o.ORIENTATION_CHANGE,x))}},updateScale:function(){var x=this.canvas.style,g=this.gameSize.width,m=this.gameSize.height,y,T,S=this.zoom,C=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(g*S,m*S),y=this.displaySize.width,T=this.displaySize.height,C&&(y=Math.floor(y),T=Math.floor(T)),this._resetZoom&&(x.width=y+"px",x.height=T+"px",this._resetZoom=!1)):this.scaleMode===n.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),y=this.displaySize.width,T=this.displaySize.height,C&&(y=Math.floor(y),T=Math.floor(T)),this.canvas.width=y,this.canvas.height=T):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),y=this.displaySize.width,T=this.displaySize.height,C&&(y=Math.floor(y),T=Math.floor(T)),x.width=y+"px",x.height=T+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var x=v(this.parentSize.width,this.gameSize.width,0,!0),g=v(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(x,g),1)},updateCenter:function(){var x=this.autoCenter;if(x!==n.CENTER.NO_CENTER){var g=this.canvas,m=g.style,y=g.getBoundingClientRect(),T=y.width,S=y.height,C=Math.floor((this.parentSize.width-T)/2),P=Math.floor((this.parentSize.height-S)/2);x===n.CENTER.CENTER_HORIZONTALLY?P=0:x===n.CENTER.CENTER_VERTICALLY&&(C=0),m.marginLeft=C+"px",m.marginTop=P+"px"}},updateBounds:function(){var x=this.canvasBounds,g=this.canvas.getBoundingClientRect();x.x=g.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),x.y=g.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),x.width=g.width,x.height=g.height},transformX:function(x){return(x-this.canvasBounds.left)*this.displayScale.x},transformY:function(x){return(x-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(x){x===void 0&&(x={navigationUI:"hide"});var g=this.fullscreen;if(!g.available){this.emit(o.FULLSCREEN_UNSUPPORTED);return}if(!g.active){var m=this.getFullscreenTarget();g.keyboard?m[g.request](Element.ALLOW_KEYBOARD_INPUT):m[g.request](x)}},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(x){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,x)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var x=document.createElement("div");x.style.margin="0",x.style.padding="0",x.style.width="100%",x.style.height="100%",this.fullscreenTarget=x,this._createdFullscreenTarget=!0}if(this._createdFullscreenTarget){var g=this.canvas.parentNode;g.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas)}return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var x=this.fullscreenTarget;if(x&&x.parentNode){var g=x.parentNode;g.insertBefore(this.canvas,x),g.removeChild(x)}}},stopFullscreen:function(){var x=this.fullscreen;if(!x.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;x.active&&document[x.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(x){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(x)},startListeners:function(){var x=this,g=this.listeners;if(g.orientationChange=function(){x.updateBounds(),x._checkOrientation=!0,x.dirty=!0},g.windowResize=function(){x.updateBounds(),x.dirty=!0},window.addEventListener("orientationchange",g.orientationChange,!1),window.addEventListener("resize",g.windowResize,!1),this.fullscreen.available){g.fullScreenChange=function(y){return x.onFullScreenChange(y)},g.fullScreenError=function(y){return x.onFullScreenError(y)};var m=["webkit","moz",""];m.forEach(function(y){document.addEventListener(y+"fullscreenchange",g.fullScreenChange,!1),document.addEventListener(y+"fullscreenerror",g.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",g.fullScreenChange,!1),document.addEventListener("MSFullscreenError",g.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(x,g){!this.parent||(this._lastCheck+=g,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var x=this.listeners;window.removeEventListener("orientationchange",x.orientationChange,!1),window.removeEventListener("resize",x.windowResize,!1);var g=["webkit","moz",""];g.forEach(function(m){document.removeEventListener(m+"fullscreenchange",x.fullScreenChange,!1),document.removeEventListener(m+"fullscreenerror",x.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",x.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",x.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});p.exports=c},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(18),d=t(0),a=t(76),o=t(3),r=new d({initialize:function(i,l,s,h){i===void 0&&(i=0),l===void 0&&(l=i),s===void 0&&(s=0),h===void 0&&(h=null),this._width=i,this._height=l,this._parent=h,this.aspectMode=s,this.aspectRatio=l===0?1:i/l,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(e){return e===void 0&&(e=0),this.aspectMode=e,this.setSize(this._width,this._height)},setSnap:function(e,i){return e===void 0&&(e=0),i===void 0&&(i=e),this.snapTo.set(e,i),this.setSize(this._width,this._height)},setParent:function(e){return this._parent=e,this.setSize(this._width,this._height)},setMin:function(e,i){return e===void 0&&(e=0),i===void 0&&(i=e),this.minWidth=n(e,0,this.maxWidth),this.minHeight=n(i,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(e,i){return e===void 0&&(e=Number.MAX_VALUE),i===void 0&&(i=e),this.maxWidth=n(e,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(i,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(e,i){switch(e===void 0&&(e=0),i===void 0&&(i=e),this.aspectMode){case r.NONE:this._width=this.getNewWidth(a(e,this.snapTo.x)),this._height=this.getNewHeight(a(i,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case r.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(a(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case r.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(a(i,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case r.FIT:this.constrain(e,i,!0);break;case r.ENVELOP:this.constrain(e,i,!1);break}return this},setAspectRatio:function(e){return this.aspectRatio=e,this.setSize(this._width,this._height)},resize:function(e,i){return this._width=this.getNewWidth(a(e,this.snapTo.x)),this._height=this.getNewHeight(a(i,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(e,i){return i===void 0&&(i=!0),e=n(e,this.minWidth,this.maxWidth),i&&this._parent&&e>this._parent.width&&(e=Math.max(this.minWidth,this._parent.width)),e},getNewHeight:function(e,i){return i===void 0&&(i=!0),e=n(e,this.minHeight,this.maxHeight),i&&this._parent&&e>this._parent.height&&(e=Math.max(this.minHeight,this._parent.height)),e},constrain:function(e,i,l){e===void 0&&(e=0),i===void 0&&(i=e),l===void 0&&(l=!0),e=this.getNewWidth(e),i=this.getNewHeight(i);var s=this.snapTo,h=i===0?1:e/i;return l&&this.aspectRatio>h||!l&&this.aspectRatio0&&(i=a(i,s.y),e=i*this.aspectRatio)):(l&&this.aspectRatioh)&&(i=a(i,s.y),e=i*this.aspectRatio,s.x>0&&(e=a(e,s.x),i=e*(1/this.aspectRatio))),this._width=e,this._height=i,this},fitTo:function(e,i){return this.constrain(e,i,!0)},envelop:function(e,i){return this.constrain(e,i,!1)},setWidth:function(e){return this.setSize(e,this._height)},setHeight:function(e){return this.setSize(this._width,e)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(e){e&&e.style&&(e.style.width=this._width+"px",e.style.height=this._height+"px")},copy:function(e){return e.setAspectMode(this.aspectMode),e.aspectRatio=this.aspectRatio,e.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(e){this.setSize(e,this._height)}},height:{get:function(){return this._height},set:function(e){this.setSize(this._width,e)}}});r.NONE=0,r.WIDTH_CONTROLS_HEIGHT=1,r.HEIGHT_CONTROLS_WIDTH=2,r.FIT=3,r.ENVELOP=4,p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(144),a=t(20),o=t(22),r=t(6),e=t(95),i=t(1),l=t(418),s=t(204),h=new n({initialize:function(v,u){if(this.game=v,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,u){Array.isArray(u)||(u=[u]);for(var c=0;c-1&&(delete this.keys[c],this.scenes.splice(u,1),this._start.indexOf(c)>-1&&(u=this._start.indexOf(c),this._start.splice(u,1)),v.sys.destroy())}return this},bootScene:function(f){var v=f.sys,u=v.settings;v.sceneUpdate=i,f.init&&(f.init.call(f,u.data),u.status=d.INIT,u.isTransition&&v.events.emit(a.TRANSITION_INIT,u.transitionFrom,u.transitionDuration));var c;v.load&&(c=v.load,c.reset()),c&&f.preload?(f.preload.call(f),c.list.size===0?this.create(f):(u.status=d.LOADING,c.once(e.COMPLETE,this.loadComplete,this),c.start())):this.create(f)},loadComplete:function(f){this.create(f.scene)},payloadComplete:function(f){this.bootScene(f.scene)},update:function(f,v){this.processQueue(),this.isProcessing=!0;for(var u=this.scenes.length-1;u>=0;u--){var c=this.scenes[u].sys;c.settings.status>d.START&&c.settings.status<=d.RUNNING&&c.step(f,v)}},render:function(f){for(var v=0;v=d.LOADING&&u.settings.status0){var u=this.getScene(f);this.scenes.splice(v,1),this.scenes.unshift(u)}}return this},moveDown:function(f){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:f,keyB:null});else{var v=this.getIndex(f);if(v>0){var u=v-1,c=this.getScene(f),x=this.getAt(u);this.scenes[v]=x,this.scenes[u]=c}}return this},moveUp:function(f){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:f,keyB:null});else{var v=this.getIndex(f);if(v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(204),a=new n({initialize:function(r){this.sys=new d(this,r),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(2),d=t(205),a=function(o){var r=o.game.config.defaultPhysicsSystem,e=n(o.settings,"physics",!1);if(!(!r&&!e)){var i=[];if(r&&i.push(d(r+"Physics")),e)for(var l in e)l=d(l.concat("Physics")),i.indexOf(l)===-1&&i.push(l);return i}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(2),d=function(a){var o=a.plugins.getDefaultScenePlugins(),r=n(a.settings,"plugins",!1);return Array.isArray(r)?r:o||[]};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(144),d=t(6),a=t(127),o=t(978),r={create:function(e){return typeof e=="string"?e={key:e}:e===void 0&&(e={}),{status:n.PENDING,key:d(e,"key",""),active:d(e,"active",!1),visible:d(e,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:d(e,"pack",!1),cameras:d(e,"cameras",null),map:d(e,"map",a(o,d(e,"mapAdd",{}))),physics:d(e,"physics",{}),loader:d(e,"loader",{}),plugins:d(e,"plugins",!1),input:d(e,"input",{})}}};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(31),d=t(423),a=t(0),o=t(38),r=t(33),e=t(9),i=t(106),l=t(22),s=t(388),h=t(6),f=t(425),v=t(206),u=new a({Extends:e,initialize:function(x){e.call(this),this.game=x,this.name="TextureManager",this.list={},this._tempCanvas=n.create2D(this,1,1),this._tempContext=this._tempCanvas.getContext("2d"),this._pending=0,x.events.once(l.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(i.LOAD,this.updatePending,this),this.on(i.ERROR,this.updatePending,this);var c=this.game.config;this.addBase64("__DEFAULT",c.defaultImage),this.addBase64("__MISSING",c.missingImage),this.addBase64("__WHITE",c.whiteImage),this.game.events.once(l.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(i.LOAD),this.off(i.ERROR),this.emit(i.READY))},checkKey:function(c){return this.exists(c)?(console.error("Texture key already in use: "+c),!1):!0},remove:function(c){if(typeof c=="string")if(this.exists(c))c=this.get(c);else return console.warn("No texture found matching key: "+c),this;return this.list.hasOwnProperty(c.key)&&(c.destroy(),this.emit(i.REMOVE,c.key)),this},removeKey:function(c){return this.list.hasOwnProperty(c)&&delete this.list[c],this},addBase64:function(c,x){if(this.checkKey(c)){var g=this,m=new Image;m.onerror=function(){g.emit(i.ERROR,c)},m.onload=function(){var y=g.create(c,m);f.Image(y,0),g.emit(i.ADD,c,y),g.emit(i.LOAD,c,y)},m.src=x}return this},getBase64:function(c,x,g,m){g===void 0&&(g="image/png"),m===void 0&&(m=.92);var y="",T=this.getFrame(c,x);if(T&&(T.source.isRenderTexture||T.source.isGLTexture))console.warn("Cannot getBase64 from WebGL Texture");else if(T){var S=T.canvasData,C=n.create2D(this,S.width,S.height),P=C.getContext("2d");P.drawImage(T.source.image,S.x,S.y,S.width,S.height,0,0,S.width,S.height),y=C.toDataURL(g,m),n.remove(C)}return y},addImage:function(c,x,g){var m=null;return this.checkKey(c)&&(m=this.create(c,x),f.Image(m,0),g&&m.setDataSource(g),this.emit(i.ADD,c,m)),m},addGLTexture:function(c,x,g,m){var y=null;return this.checkKey(c)&&(g===void 0&&(g=x.width),m===void 0&&(m=x.height),y=this.create(c,x,g,m),y.add("__BASE",0,0,0,g,m),this.emit(i.ADD,c,y)),y},addRenderTexture:function(c,x){var g=null;return this.checkKey(c)&&(g=this.create(c,x),g.add("__BASE",0,0,0,x.width,x.height),this.emit(i.ADD,c,g)),g},generate:function(c,x){if(this.checkKey(c)){var g=n.create(this,1,1);return x.canvas=g,s(x),this.addCanvas(c,g)}else return null},createCanvas:function(c,x,g){if(x===void 0&&(x=256),g===void 0&&(g=256),this.checkKey(c)){var m=n.create(this,x,g,r.CANVAS,!0);return this.addCanvas(c,m)}return null},addCanvas:function(c,x,g){g===void 0&&(g=!1);var m=null;return g?m=new d(this,c,x,x.width,x.height):this.checkKey(c)&&(m=new d(this,c,x,x.width,x.height),this.list[c]=m,this.emit(i.ADD,c,m)),m},addAtlas:function(c,x,g,m){return Array.isArray(g.textures)||Array.isArray(g.frames)?this.addAtlasJSONArray(c,x,g,m):this.addAtlasJSONHash(c,x,g,m)},addAtlasJSONArray:function(c,x,g,m){var y=null;if(this.checkKey(c)){if(y=this.create(c,x),Array.isArray(g))for(var T=g.length===1,S=0;S=T.x&&c=T.y&&x=T.x&&c=T.y&&x + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(18),a=t(38),o=t(33),r=t(138),e=t(206),i=new n({Extends:e,initialize:function(s,h,f,v,u){e.call(this,s,h,f,v,u),this.add("__BASE",0,0,0,v,u),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d"),this.width=v,this.height=u,this.imageData=this.context.getImageData(0,0,v,u),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===o.WEBGL&&this.refresh(),this},draw:function(l,s,h){return this.context.drawImage(h,l,s),this.update()},drawFrame:function(l,s,h,f){h===void 0&&(h=0),f===void 0&&(f=0);var v=this.manager.getFrame(l,s);if(v){var u=v.canvasData,c=v.cutWidth,x=v.cutHeight,g=v.source.resolution;return this.context.drawImage(v.source.image,u.x,u.y,c,x,h,f,c/g,x/g),this.update()}else return this},setPixel:function(l,s,h,f,v,u){u===void 0&&(u=255),l=Math.abs(Math.floor(l)),s=Math.abs(Math.floor(s));var c=this.getIndex(l,s);if(c>-1){var x=this.context.getImageData(l,s,1,1);x.data[0]=h,x.data[1]=f,x.data[2]=v,x.data[3]=u,this.context.putImageData(x,l,s)}return this},putData:function(l,s,h,f,v,u,c){return f===void 0&&(f=0),v===void 0&&(v=0),u===void 0&&(u=l.width),c===void 0&&(c=l.height),this.context.putImageData(l,s,h,f,v,u,c),this},getData:function(l,s,h,f){l=d(Math.floor(l),0,this.width-1),s=d(Math.floor(s),0,this.height-1),h=d(h,1,this.width-l),f=d(f,1,this.height-s);var v=this.context.getImageData(l,s,h,f);return v},getPixel:function(l,s,h){h||(h=new a);var f=this.getIndex(l,s);if(f>-1){var v=this.data,u=v[f+0],c=v[f+1],x=v[f+2],g=v[f+3];h.setTo(u,c,x,g)}return h},getPixels:function(l,s,h,f){l===void 0&&(l=0),s===void 0&&(s=0),h===void 0&&(h=this.width),f===void 0&&(f=h),l=Math.abs(Math.round(l)),s=Math.abs(Math.round(s));for(var v=d(l,0,this.width),u=d(l+h,0,this.width),c=d(s,0,this.height),x=d(s+f,0,this.height),g=new a,m=[],y=c;y + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(31),d=t(0),a=t(138),o=t(168),r=new d({initialize:function(i,l,s,h,f){f===void 0&&(f=!1);var v=i.manager.game;this.renderer=v.renderer,this.texture=i,this.source=l,this.image=l,this.compressionAlgorithm=null,this.resolution=1,this.width=s||l.naturalWidth||l.videoWidth||l.width||0,this.height=h||l.naturalHeight||l.videoHeight||l.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=l instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&l instanceof HTMLVideoElement,this.isRenderTexture=l.type==="RenderTexture",this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&l instanceof WebGLTexture,this.isPowerOf2=a(this.width,this.height),this.glTexture=null,this.glIndex=0,this.glIndexCounter=-1,this.flipY=f,this.init(v)},init:function(e){var i=this.renderer;i&&(i.gl?this.isCanvas?this.glTexture=i.createCanvasTexture(this.image,!1,this.flipY):this.isVideo?this.glTexture=i.createVideoTexture(this.image,!1,this.flipY):this.isRenderTexture?(this.image=this.source.canvas,this.glTexture=i.createTextureFromSource(null,this.width,this.height,this.scaleMode)):this.isGLTexture?this.glTexture=this.source:this.glTexture=i.createTextureFromSource(this.image,this.width,this.height,this.scaleMode):this.isRenderTexture&&(this.image=this.source.canvas)),e.config.antialias||this.setFilter(1)},setFilter:function(e){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,e),this.scaleMode=e},setFlipY:function(e){return e===void 0&&(e=!0),this.flipY=e,this},update:function(){var e=this.renderer.gl;e&&this.isCanvas?this.glTexture=this.renderer.updateCanvasTexture(this.image,this.glTexture,this.flipY):e&&this.isVideo&&(this.glTexture=this.renderer.updateVideoTexture(this.image,this.glTexture,this.flipY))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture,!0),this.isCanvas&&n.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AtlasXML:t(979),Canvas:t(980),Image:t(981),JSONArray:t(982),JSONHash:t(983),SpriteSheet:t(984),SpriteSheetFromAtlas:t(985),UnityYAML:t(986)}},function(p,E,t){/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(427),d=t(430),a=t(432),o={create:function(r){var e=r.config.audio,i=r.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new d(r):i.webAudio&&!e.disableWebAudio?new a(r):new n(r)}};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(145),d=t(0),a=t(70),o=t(429),r=new d({Extends:n,initialize:function(i){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,n.call(this,i)},add:function(e,i){var l=new o(this,e,i);return this.sounds.push(l),l},unlock:function(){this.locked=!1;var e=this;if(this.game.cache.audio.entries.each(function(h,f){for(var v=0;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(78),d=function(a,o,r,e,i){if(e===void 0&&(e=0),i===void 0&&(i=a.length),n(a,e,i))for(var l=e;l + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(146),d=t(0),a=t(70),o=t(18),r=new d({Extends:n,initialize:function(i,l,s){if(s===void 0&&(s={}),this.tags=i.game.cache.audio.get(l),!this.tags)throw new Error('There is no audio asset with key "'+l+'" in the audio cache');this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,n.call(this,i,l,s)},play:function(e,i){return this.manager.isLocked(this,"play",[e,i])||!n.prototype.play.call(this,e,i)||!this.pickAndPlayAudioTag()?!1:(this.emit(a.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!n.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(a.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!n.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(a.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!n.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(a.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var e=this.currentConfig.seek,i=this.currentConfig.delay,l=(this.currentMarker?this.currentMarker.start:0)+e;return this.previousTime=l,this.audio.currentTime=l,this.applyConfig(),i===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+i*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var e=0;e0){this.startTime=l-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-l),s=this.audio.currentTime):s=l){this.reset(),this.stopAndReleaseAudioTag(),this.emit(a.COMPLETE,this);return}this.previousTime=s}},destroy:function(){n.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=o(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(e){this.currentConfig.mute=e,!this.manager.isLocked(this,"mute",e)&&(this.updateMute(),this.emit(a.MUTE,this,e))}},setMute:function(e){return this.mute=e,this},volume:{get:function(){return this.currentConfig.volume},set:function(e){this.currentConfig.volume=e,!this.manager.isLocked(this,"volume",e)&&(this.updateVolume(),this.emit(a.VOLUME,this,e))}},setVolume:function(e){return this.volume=e,this},rate:{get:function(){return this.currentConfig.rate},set:function(e){this.currentConfig.rate=e,!this.manager.isLocked(this,a.RATE,e)&&(this.calculateRate(),this.emit(a.RATE,this,e))}},setRate:function(e){return this.rate=e,this},detune:{get:function(){return this.currentConfig.detune},set:function(e){this.currentConfig.detune=e,!this.manager.isLocked(this,a.DETUNE,e)&&(this.calculateRate(),this.emit(a.DETUNE,this,e))}},setDetune:function(e){return this.detune=e,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(e){this.manager.isLocked(this,"seek",e)||this.startTime>0||(this.isPlaying||this.isPaused)&&(e=Math.min(Math.max(0,e),this.duration),this.isPlaying?(this.previousTime=e,this.audio.currentTime=e):this.isPaused&&(this.currentConfig.seek=e),this.emit(a.SEEK,this,e))}},setSeek:function(e){return this.seek=e,this},loop:{get:function(){return this.currentConfig.loop},set:function(e){this.currentConfig.loop=e,!this.manager.isLocked(this,"loop",e)&&(this.audio&&(this.audio.loop=e),this.emit(a.LOOP,this,e))}},setLoop:function(e){return this.loop=e,this},pan:{get:function(){return this.currentConfig.pan},set:function(e){this.currentConfig.pan=e,this.emit(a.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(145),d=t(0),a=t(9),o=t(431),r=t(1),e=new d({Extends:a,initialize:function(l){a.call(this),this.game=l,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(i,l){var s=new o(this,i,l);return this.sounds.push(s),s},addAudioSprite:function(i,l){var s=this.add(i,l);return s.spritemap={},s},play:function(i,l){return!1},playAudioSprite:function(i,l,s){return!1},remove:function(i){return n.prototype.remove.call(this,i)},removeByKey:function(i){return n.prototype.removeByKey.call(this,i)},pauseAll:r,resumeAll:r,stopAll:r,update:r,setRate:r,setDetune:r,setMute:r,setVolume:r,forEachActiveSound:function(i,l){n.prototype.forEachActiveSound.call(this,i,l)},destroy:function(){n.prototype.destroy.call(this)}});p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(146),d=t(0),a=t(9),o=t(17),r=function(){return!1},e=function(){return null},i=function(){return this},l=new d({Extends:a,initialize:function(h,f,v){v===void 0&&(v={}),a.call(this),this.manager=h,this.key=f,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},v),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:r,updateMarker:r,removeMarker:e,play:r,pause:r,resume:r,stop:r,destroy:function(){n.prototype.destroy.call(this)},setMute:i,setVolume:i,setRate:i,setDetune:i,setSeek:i,setLoop:i,setPan:i});p.exports=l},function(p,E,t){/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(433),d=t(145),a=t(0),o=t(70),r=t(22),e=t(434),i=new a({Extends:d,initialize:function(s){this.context=this.createAudioContext(s),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked=this.context.state==="suspended"&&("ontouchstart"in window||"onclick"in window),d.call(this,s),this.locked&&s.isBooted?this.unlock():s.events.once(r.BOOT,this.unlock,this)},createAudioContext:function(l){var s=l.config.audio;if(s.context)return s.context.resume(),s.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(l){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=l,this.masterMuteNode=l.createGain(),this.masterVolumeNode=l.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(l.destination),this.destination=this.masterMuteNode,this},add:function(l,s){var h=new e(this,l,s);return this.sounds.push(h),h},decodeAudio:function(l,s){var h;Array.isArray(l)?h=l:h=[{key:l,data:s}];for(var f=this.game.cache.audio,v=h.length,u=0;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),d=0;d>4,u[i++]=(s&15)<<4|h>>2,u[i++]=(h&3)<<6|f&63;return v};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(146),d=t(0),a=t(70),o=new d({Extends:n,initialize:function(e,i,l){if(l===void 0&&(l={}),this.audioBuffer=e.game.cache.audio.get(i),!this.audioBuffer)throw new Error('Audio key "'+i+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=e.context.createGain(),this.volumeNode=e.context.createGain(),this.pannerNode=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),e.context.createStereoPanner?(this.pannerNode=e.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(e.destination)):this.volumeNode.connect(e.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,e,i,l)},play:function(r,e){return n.prototype.play.call(this,r,e)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(a.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){for(var d=n.length,a=n[0].length,o=new Array(a),r=0;r-1;e--)o[r][e]=n[e][r]}return o};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function t(a,o,r){var e=a[o];a[o]=a[r],a[r]=e}function n(a,o){return ao?1:0}var d=function(a,o,r,e,i){for(r===void 0&&(r=0),e===void 0&&(e=a.length-1),i===void 0&&(i=n);e>r;){if(e-r>600){var l=e-r+1,s=o-r+1,h=Math.log(l),f=.5*Math.exp(2*h/3),v=.5*Math.sqrt(h*f*(l-f)/l)*(s-l/2<0?-1:1),u=Math.max(r,Math.floor(o-s*f/l+v)),c=Math.min(e,Math.floor(o+(l-s)*f/l+v));d(a,o,u,c,i)}var x=a[o],g=r,m=e;for(t(a,r,o),i(a[e],x)>0&&t(a,r,e);g0;)m--}i(a[r],x)===0?t(a,r,m):(m++,t(a,m,e)),m<=o&&(r=m+1),o<=m&&(e=m-1)}};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(6),d=t(131),a=function(r,e,i){for(var l=[],s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={PROCESS_QUEUE_ADD:t(1041),PROCESS_QUEUE_REMOVE:t(1042)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(13),d=function(a,o){var r=n(o,"anims",null);if(r===null)return a;if(typeof r=="string")a.anims.play(r);else if(typeof r=="object"){var e=a.anims,i=n(r,"key",void 0);if(i){var l=n(r,"startFrame",void 0),s=n(r,"delay",0),h=n(r,"repeat",0),f=n(r,"repeatDelay",0),v=n(r,"yoyo",!1),u=n(r,"play",!1),c=n(r,"delayedPlay",0),x={key:i,delay:s,repeat:h,repeatDelay:f,yoyo:v,startFrame:l};u?e.play(x):c>0?e.playAfterDelay(x,c):e.load(x)}}return a};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(109),a=new n({initialize:function(r,e,i,l,s){this.parent=r,this.x=e,this.y=i,this.frame=l,this.data={},this.tint=16777215,this._visible=s,this._alpha=1,this.flipX=!1,this.flipY=!1},setFrame:function(o){return o===void 0?this.frame=this.parent.frame:o instanceof d&&o.texture===this.parent.texture?this.frame=o:this.frame=this.parent.texture.get(o),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(o,r,e){return this.x=o,this.y=r,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,e&&this.setFrame(e),this},setPosition:function(o,r){return this.x=o,this.y=r,this},setFlipX:function(o){return this.flipX=o,this},setFlipY:function(o){return this.flipY=o,this},setFlip:function(o,r){return this.flipX=o,this.flipY=r,this},setVisible:function(o){return this.visible=o,this},setAlpha:function(o){return this.alpha=o,this},setTint:function(o){return this.tint=o,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(o){this.parent.dirty|=this._visible!==o,this._visible=o}},alpha:{get:function(){return this._alpha},set:function(o){this.parent.dirty|=this._alpha>0!=o>0,this._alpha=o}}});p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10),d=function(a,o,r){r===void 0&&(r=new n);var e=Math.min(a.x,o.x),i=Math.min(a.y,o.y),l=Math.max(a.right,o.right)-e,s=Math.max(a.bottom,o.bottom)-i;return r.setTo(e,i,l,s)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(11),a=t(1055),o=t(15),r=t(7),e=t(202),i=t(20),l=t(140),s=new n({Extends:o,Mixins:[d.AlphaSingle,d.BlendMode,d.Depth,d.Origin,d.ScrollFactor,d.Transform,d.Visible,a],initialize:function(f,v,u,c,x,g){o.call(this,f,"DOMElement"),this.parent=f.sys.game.domContainer,this.cache=f.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new l,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(v,u),typeof c=="string"?c[0]==="#"?this.setElement(c.substr(1),x,g):this.createElement(c,x,g):c&&this.setElement(c,x,g),f.sys.events.on(i.SLEEP,this.handleSceneEvent,this),f.sys.events.on(i.WAKE,this.handleSceneEvent,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},handleSceneEvent:function(h){var f=this.node,v=f.style;f&&(v.display=h.settings.visible?"block":"none")},setSkew:function(h,f){return h===void 0&&(h=0),f===void 0&&(f=h),this.skewX=h,this.skewY=f,this},setPerspective:function(h){return this.parent.style.perspective=h+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(h){this.parent.style.perspective=h+"px"}},addListener:function(h){if(this.node){h=h.split(" ");for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1056),d=t(15),a=t(25),o=new a,r=new a,e=new a,i=function(l,s,h,f){if(!!s.node){var v=s.node.style,u=s.scene.sys.settings;if(!v||!u.visible||d.RENDER_MASK!==s.renderFlags||s.cameraFilter!==0&&s.cameraFilter&h.id||s.parentContainer&&!s.parentContainer.willRender()){v.display="none";return}var c=s.parentContainer,x=h.alpha*s.alpha;c&&(x*=c.alpha);var g=o,m=r,y=e,T=0,S=0,C="0%",P="0%";f?(T=s.width*s.scaleX*s.originX,S=s.height*s.scaleY*s.originY,m.applyITRS(s.x-T,s.y-S,s.rotation,s.scaleX,s.scaleY),g.copyFrom(h.matrix),g.multiplyWithOffset(f,-h.scrollX*s.scrollFactorX,-h.scrollY*s.scrollFactorY),m.e=s.x-T,m.f=s.y-S,g.multiply(m,y)):(T=s.width*s.originX,S=s.height*s.originY,m.applyITRS(s.x-T,s.y-S,s.rotation,s.scaleX,s.scaleY),g.copyFrom(h.matrix),C=100*s.originX+"%",P=100*s.originY+"%",m.e-=h.scrollX*s.scrollFactorX,m.f-=h.scrollY*s.scrollFactorY,g.multiply(m,y)),s.transformOnly||(v.display="block",v.opacity=x,v.zIndex=s._depth,v.pointerEvents=s.pointerEvents,v.mixBlendMode=n[s._blendMode]),v.transform=y.getCSSMatrix()+" skew("+s.skewX+"rad, "+s.skewY+"rad) rotate3d("+s.rotate3d.x+","+s.rotate3d.y+","+s.rotate3d.z+","+s.rotate3d.w+s.rotate3dAngle+")",v.transformOrigin=C+" "+P}};p.exports=i},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(11),a=t(15),o=t(1060),r=new n({Extends:a,Mixins:[d.Alpha,d.BlendMode,d.Depth,d.Flip,d.Origin,d.ScrollFactor,d.Size,d.Texture,d.Tint,d.Transform,d.Visible,o],initialize:function(i){a.call(this,i,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(218),d=t(98),a=t(14),o=t(4),r=function(e,i,l){l===void 0&&(l=new o);var s=d(i,0,a.PI2);return n(e,s,l)};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(447),d=t(218),a=t(98),o=t(14),r=function(e,i,l,s){s===void 0&&(s=[]),!i&&l>0&&(i=n(e)/l);for(var h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d=n.width/2,a=n.height/2,o=Math.pow(d-a,2)/Math.pow(d+a,2);return Math.PI*(d+a)*(1+3*o/(10+Math.sqrt(4-3*o)))};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(217),d=t(30),a=function(o,r,e,i,l,s){var h=r.commandBuffer,f=h.length,v=l||o.currentContext;if(!(f===0||!d(o,v,r,e,i))){e.addToRenderList(r);var u=1,c=1,x=0,g=0,m=1,y=0,T=0,S=0;v.beginPath();for(var C=0;C>>16,T=(x&65280)>>>8,S=x&255,v.strokeStyle="rgba("+y+","+T+","+S+","+u+")",v.lineWidth=m,C+=3;break;case n.FILL_STYLE:g=h[C+1],c=h[C+2],y=(g&16711680)>>>16,T=(g&65280)>>>8,S=g&255,v.fillStyle="rgba("+y+","+T+","+S+","+c+")",C+=2;break;case n.BEGIN_PATH:v.beginPath();break;case n.CLOSE_PATH:v.closePath();break;case n.FILL_PATH:s||v.fill();break;case n.STROKE_PATH:s||v.stroke();break;case n.FILL_RECT:s?v.rect(h[C+1],h[C+2],h[C+3],h[C+4]):v.fillRect(h[C+1],h[C+2],h[C+3],h[C+4]),C+=4;break;case n.FILL_TRIANGLE:v.beginPath(),v.moveTo(h[C+1],h[C+2]),v.lineTo(h[C+3],h[C+4]),v.lineTo(h[C+5],h[C+6]),v.closePath(),s||v.fill(),C+=6;break;case n.STROKE_TRIANGLE:v.beginPath(),v.moveTo(h[C+1],h[C+2]),v.lineTo(h[C+3],h[C+4]),v.lineTo(h[C+5],h[C+6]),v.closePath(),s||v.stroke(),C+=6;break;case n.LINE_TO:v.lineTo(h[C+1],h[C+2]),C+=2;break;case n.MOVE_TO:v.moveTo(h[C+1],h[C+2]),C+=2;break;case n.LINE_FX_TO:v.lineTo(h[C+1],h[C+2]),C+=5;break;case n.MOVE_FX_TO:v.moveTo(h[C+1],h[C+2]),C+=5;break;case n.SAVE:v.save();break;case n.RESTORE:v.restore();break;case n.TRANSLATE:v.translate(h[C+1],h[C+2]),C+=2;break;case n.SCALE:v.scale(h[C+1],h[C+2]),C+=2;break;case n.ROTATE:v.rotate(h[C+1]),C+=1;break;case n.GRADIENT_FILL_STYLE:C+=5;break;case n.GRADIENT_LINE_STYLE:C+=6;break}}v.restore()}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(137),a=t(80),o=t(2),r=t(68),e=new n({initialize:function(l,s,h,f){f===void 0&&(f=!1),this.propertyKey=s,this.propertyValue=h,this.defaultValue=h,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=f,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(l)},loadConfig:function(i,l){i===void 0&&(i={}),l&&(this.propertyKey=l),this.propertyValue=o(i,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(i){return this.propertyValue=i,this.setMethods()},setMethods:function(){var i=this.propertyValue,l=typeof i;if(this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,l==="number")this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(i))this.onEmit=this.randomStaticValueEmit;else if(l==="function")this.emitOnly?this.onEmit=i:this.onUpdate=i;else if(l==="object"&&this.hasBoth(i,"start","end")){this.start=i.start,this.end=i.end;var s=this.has(i,"random");if(s&&(this.onEmit=this.randomRangedValueEmit),this.has(i,"steps"))this.steps=i.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var h=this.has(i,"ease")?i.ease:"Linear";this.ease=a(h,i.easeParams),s||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else if(l==="object"&&this.hasBoth(i,"min","max"))this.start=i.min,this.end=i.max,this.onEmit=this.randomRangedValueEmit;else if(l==="object"&&this.has(i,"random")){var f=i.random;Array.isArray(f)&&(this.start=f[0],this.end=f[1]),this.onEmit=this.randomRangedValueEmit}else l==="object"&&this.hasEither(i,"onEmit","onUpdate")&&(this.has(i,"onEmit")&&(this.onEmit=i.onEmit),this.has(i,"onUpdate")&&(this.onUpdate=i.onUpdate));return this},has:function(i,l){return i.hasOwnProperty(l)},hasBoth:function(i,l,s){return i.hasOwnProperty(l)&&i.hasOwnProperty(s)},hasEither:function(i,l,s){return i.hasOwnProperty(l)||i.hasOwnProperty(s)},defaultEmit:function(i,l,s){return s},defaultUpdate:function(i,l,s,h){return h},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var i=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[i]},randomRangedValueEmit:function(i,l){var s=d(this.start,this.end);return i&&i.data[l]&&(i.data[l].min=s),s},steppedEmit:function(){var i=this.counter,l=this.counter+(this.end-this.start)/this.steps;return this.counter=r(l,this.start,this.end),i},easedValueEmit:function(i,l){if(i&&i.data[l]){var s=i.data[l];s.min=this.start,s.max=this.end}return this.start},easeValueUpdate:function(i,l,s){var h=i.data[l];return(h.max-h.min)*this.ease(s)+h.min}});p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(2),a=new n({initialize:function(r,e,i,l,s){if(typeof r=="object"){var h=r;r=d(h,"x",0),e=d(h,"y",0),i=d(h,"power",0),l=d(h,"epsilon",100),s=d(h,"gravity",50)}else r===void 0&&(r=0),e===void 0&&(e=0),i===void 0&&(i=0),l===void 0&&(l=100),s===void 0&&(s=50);this.x=r,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=l},update:function(o,r){var e=this.x-o.x,i=this.y-o.y,l=e*e+i*i;if(l!==0){var s=Math.sqrt(l);l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(36),a=t(50),o=new n({initialize:function(e){this.emitter=e,this.frame=null,this.x=0,this.y=0,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.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},resetPosition:function(){this.x=0,this.y=0},fire:function(r,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),r===void 0?this.x+=i.x.onEmit(this,"x"):this.x+=r,e===void 0?this.y+=i.y.onEmit(this,"y"):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var l=i.speedX.onEmit(this,"speedX"),s=i.speedY?i.speedY.onEmit(this,"speedY"):l;if(i.radial){var h=d(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(h)*Math.abs(l),this.velocityY=Math.sin(h)*Math.abs(s)}else if(i.moveTo){var f=i.moveToX.onEmit(this,"moveToX"),v=i.moveToY?i.moveToY.onEmit(this,"moveToY"):f,u=Math.atan2(v-this.y,f-this.x),c=a(this.x,this.y,f,v)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=l,this.velocityY=s;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=d(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(r,e,i,l){var s=this.velocityX,h=this.velocityY,f=this.accelerationX,v=this.accelerationY,u=this.maxVelocityX,c=this.maxVelocityY;s+=r.gravityX*i,h+=r.gravityY*i,f&&(s+=f*i),v&&(h+=v*i),s>u?s=u:s<-u&&(s=-u),h>c?h=c:h<-c&&(h=-c),this.velocityX=s,this.velocityY=h;for(var x=0;xe.right&&r.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&r.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(r,e,i){if(this.delayCurrent>0)return this.delayCurrent-=r,!1;var l=this.emitter,s=1-this.lifeCurrent/this.life;return this.lifeT=s,this.computeVelocity(l,r,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,l.bounds&&this.checkBounds(l),l.deathZone&&l.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=l.scaleX.onUpdate(this,"scaleX",s,this.scaleX),l.scaleY?this.scaleY=l.scaleY.onUpdate(this,"scaleY",s,this.scaleY):this.scaleY=this.scaleX,this.angle=l.rotate.onUpdate(this,"rotate",s,this.angle),this.rotation=d(this.angle),this.alpha=l.alpha.onUpdate(this,"alpha",s,this.alpha),this.tint=l.tint.onUpdate(this,"tint",s,this.tint),this.lifeCurrent-=r,this.lifeCurrent<=0)}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(35),d=t(0),a=t(11),o=t(453),r=t(454),e=t(449),i=t(2),l=t(210),s=t(455),h=t(126),f=t(451),v=t(456),u=t(10),c=t(79),x=t(3),g=t(68),m=new d({Mixins:[a.BlendMode,a.Mask,a.ScrollFactor,a.Visible],initialize:function(T,S){this.manager=T,this.texture=T.texture,this.frames=[T.defaultFrame],this.defaultFrame=T.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new e(S,"x",0,!0),this.y=new e(S,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new e(S,"accelerationX",0,!0),this.accelerationY=new e(S,"accelerationY",0,!0),this.maxVelocityX=new e(S,"maxVelocityX",1e4,!0),this.maxVelocityY=new e(S,"maxVelocityY",1e4,!0),this.speedX=new e(S,"speedX",0,!0),this.speedY=new e(S,"speedY",0,!0),this.moveTo=!1,this.moveToX=new e(S,"moveToX",0,!0),this.moveToY=new e(S,"moveToY",0,!0),this.bounce=new e(S,"bounce",0,!0),this.scaleX=new e(S,"scaleX",1),this.scaleY=new e(S,"scaleY",1),this.tint=new e(S,"tint",16777215),this.alpha=new e(S,"alpha",1),this.lifespan=new e(S,"lifespan",1e3,!0),this.angle=new e(S,"angle",{min:0,max:360},!0),this.rotate=new e(S,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new e(S,"quantity",1,!0),this.delay=new e(S,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new x,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,S&&this.fromJSON(S)},fromJSON:function(y){if(!y)return this;var T=0,S="";for(T=0;T0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(y,T){return y===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof y=="function"&&(this.emitCallback=y,T&&(this.emitCallbackScope=T)),this},onParticleDeath:function(y,T){return y===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof y=="function"&&(this.deathCallback=y,T&&(this.deathCallbackScope=T)),this},killAll:function(){for(var y=this.dead,T=this.alive;T.length>0;)y.push(T.pop());return this},forEachAlive:function(y,T){for(var S=this.alive,C=S.length,P=0;P0){var N=this.deathCallback,X=this.deathCallbackScope;for(M=F-1;M>=0;M--){var V=L[M];P.splice(V.index,1),A.push(V.particle),N&&N.call(X,V.particle),V.particle.resetPosition()}}!this.on||(this.frequency===0?this.emitParticle():this.frequency>0&&(this._counter-=T,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(y,T){return y.y-T.y}});p.exports=m},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o,r){this.source=o,this.killOnEnter=r},willKill:function(a){var o=this.source.contains(a.x,a.y);return o&&this.killOnEnter||!o&&!this.killOnEnter}});p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o,r,e,i,l){i===void 0&&(i=!1),l===void 0&&(l=!0),this.source=o,this.points=[],this.quantity=r,this.stepRate=e,this.yoyo=i,this.counter=-1,this.seamless=l,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var a=this.points[0],o=this.points[this.points.length-1];a.x===o.x&&a.y===o.y&&this.points.pop()}var r=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(a){return this.source=a,this.updateSource()},getPoint:function(a){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var o=this.points[this.counter];o&&(a.x=o.x,a.y=o.y)}});p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){for(var a=0;a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(3),a=new n({initialize:function(r){this.source=r,this._tempVec=new d},getPoint:function(o){var r=this._tempVec;this.source.getRandomPoint(r),o.x=r.x,o.y=r.y}});p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(11),a=t(73),o=new n({Extends:a,Mixins:[d.PathFollower],initialize:function(e,i,l,s,h,f){a.call(this,e,l,s,h,f),this.path=i},preUpdate:function(r,e){this.anims.update(r,e),this.pathUpdate(r)}});p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=n.canvas,r=n.context,e=n.style,i=[],l=0,s=a.length;e.maxLines>0&&e.maxLines1&&(u+=c*(s-1)),{width:l,height:u,lines:s,lineWidths:i,lineSpacing:c,lineHeight:v}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(13),a=t(6),o=t(460),r={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\xC3\u2030qgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},e=new n({initialize:function(l,s){this.parent=l,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(s,!1,!0);var h=a(s,"metrics",!1);h?this.metrics={ascent:a(h,"ascent",0),descent:a(h,"descent",0),fontSize:a(h,"fontSize",0)}:this.metrics=o(this)},setStyle:function(i,l,s){l===void 0&&(l=!0),s===void 0&&(s=!1),i&&i.hasOwnProperty("fontSize")&&typeof i.fontSize=="number"&&(i.fontSize=i.fontSize.toString()+"px");for(var h in r){var f=s?r[h][1]:this[h];h==="wordWrapCallback"||h==="wordWrapCallbackScope"?this[h]=a(i,r[h][0],f):this[h]=d(i,r[h][0],f)}var v=a(i,"font",null);v!==null&&this.setFont(v,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=a(i,"fill",null);return u!==null&&(this.color=u),l?this.update(!0):this.parent},syncFont:function(i,l){l.font=this._font},syncStyle:function(i,l){l.textBaseline="alphabetic",l.fillStyle=this.color,l.strokeStyle=this.stroke,l.lineWidth=this.strokeThickness,l.lineCap="round",l.lineJoin="round"},syncShadow:function(i,l){l?(i.shadowOffsetX=this.shadowOffsetX,i.shadowOffsetY=this.shadowOffsetY,i.shadowColor=this.shadowColor,i.shadowBlur=this.shadowBlur):(i.shadowOffsetX=0,i.shadowOffsetY=0,i.shadowColor=0,i.shadowBlur=0)},update:function(i){return i&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(i,l){l===void 0&&(l=!0);var s=i,h="",f="";if(typeof i!="string")s=a(i,"fontFamily","Courier"),h=a(i,"fontSize","16px"),f=a(i,"fontStyle","");else{var v=i.split(" "),u=0;f=v.length>2?v[u++]:"",h=v[u++]||"16px",s=v[u++]||"Courier"}return(s!==this.fontFamily||h!==this.fontSize||f!==this.fontStyle)&&(this.fontFamily=s,this.fontSize=h,this.fontStyle=f,l&&this.update(!0)),this.parent},setFontFamily:function(i){return this.fontFamily!==i&&(this.fontFamily=i,this.update(!0)),this.parent},setFontStyle:function(i){return this.fontStyle!==i&&(this.fontStyle=i,this.update(!0)),this.parent},setFontSize:function(i){return typeof i=="number"&&(i=i.toString()+"px"),this.fontSize!==i&&(this.fontSize=i,this.update(!0)),this.parent},setTestString:function(i){return this.testString=i,this.update(!0)},setFixedSize:function(i,l){return this.fixedWidth=i,this.fixedHeight=l,i&&(this.parent.width=i),l&&(this.parent.height=l),this.update(!1)},setBackgroundColor:function(i){return this.backgroundColor=i,this.update(!1)},setFill:function(i){return this.color=i,this.update(!1)},setColor:function(i){return this.color=i,this.update(!1)},setResolution:function(i){return this.resolution=i,this.update(!1)},setStroke:function(i,l){return l===void 0&&(l=this.strokeThickness),i===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==i||this.strokeThickness!==l)&&(this.stroke=i,this.strokeThickness=l,this.update(!0)),this.parent},setShadow:function(i,l,s,h,f,v){return i===void 0&&(i=0),l===void 0&&(l=0),s===void 0&&(s="#000"),h===void 0&&(h=0),f===void 0&&(f=!1),v===void 0&&(v=!0),this.shadowOffsetX=i,this.shadowOffsetY=l,this.shadowColor=s,this.shadowBlur=h,this.shadowStroke=f,this.shadowFill=v,this.update(!1)},setShadowOffset:function(i,l){return i===void 0&&(i=0),l===void 0&&(l=i),this.shadowOffsetX=i,this.shadowOffsetY=l,this.update(!1)},setShadowColor:function(i){return i===void 0&&(i="#000"),this.shadowColor=i,this.update(!1)},setShadowBlur:function(i){return i===void 0&&(i=0),this.shadowBlur=i,this.update(!1)},setShadowStroke:function(i){return this.shadowStroke=i,this.update(!1)},setShadowFill:function(i){return this.shadowFill=i,this.update(!1)},setWordWrapWidth:function(i,l){return l===void 0&&(l=!1),this.wordWrapWidth=i,this.wordWrapUseAdvanced=l,this.update(!1)},setWordWrapCallback:function(i,l){return l===void 0&&(l=null),this.wordWrapCallback=i,this.wordWrapCallbackScope=l,this.update(!1)},setAlign:function(i){return i===void 0&&(i="left"),this.align=i,this.update(!1)},setMaxLines:function(i){return i===void 0&&(i=0),this.maxLines=i,this.update(!1)},getTextMetrics:function(){var i=this.metrics;return{ascent:i.ascent,descent:i.descent,fontSize:i.fontSize}},toJSON:function(){var i={};for(var l in r)i[l]=this[l];return i.metrics=this.getTextMetrics(),i},destroy:function(){this.parent=void 0}});p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(31),d=function(a){var o=n.create(this),r=o.getContext("2d");a.syncFont(o,r);var e=r.measureText(a.testString);if("actualBoundingBoxAscent"in e){var i=e.actualBoundingBoxAscent,l=e.actualBoundingBoxDescent;return n.remove(o),{ascent:i,descent:l,fontSize:i+l}}var s=Math.ceil(e.width*a.baselineX),h=s,f=2*h;h=h*a.baselineY|0,o.width=s,o.height=f,r.fillStyle="#f00",r.fillRect(0,0,s,f),r.font=a._font,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(a.testString,0,h);var v={ascent:0,descent:0,fontSize:0},u=r.getImageData(0,0,s,f);if(!u)return v.ascent=h,v.descent=h+6,v.fontSize=v.ascent+v.descent,n.remove(o),v;var c=u.data,x=c.length,g=s*4,m,y,T=0,S=!1;for(m=0;mh;m--){for(y=0;y + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1097),d=t(0),a=t(36),o=t(59),r=t(65),e=t(14),i=t(34),l=new d({Extends:i,Mixins:[n],initialize:function(h,f,v,u,c,x,g,m,y){f===void 0&&(f=0),v===void 0&&(v=0),u===void 0&&(u=128),c===void 0&&(c=0),x===void 0&&(x=360),g===void 0&&(g=!1),i.call(this,h,"Arc",new r(0,0,u)),this._startAngle=c,this._endAngle=x,this._anticlockwise=g,this._iterations=.01,this.setPosition(f,v);var T=this.geom.radius*2;this.setSize(T,T),m!==void 0&&this.setFillStyle(m,y),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(s){this._iterations=s,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(s){this.geom.radius=s;var h=s*2;this.setSize(h,h),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(s){this._startAngle=s,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(s){this._endAngle=s,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(s){this._anticlockwise=s,this.updateData()}},setRadius:function(s){return this.radius=s,this},setIterations:function(s){return s===void 0&&(s=.01),this.iterations=s,this},setStartAngle:function(s,h){return this._startAngle=s,h!==void 0&&(this._anticlockwise=h),this.updateData()},setEndAngle:function(s,h){return this._endAngle=s,h!==void 0&&(this._anticlockwise=h),this.updateData()},updateData:function(){var s=this._iterations,h=s,f=this.geom.radius,v=a(this._startAngle),u=a(this._endAngle),c=this._anticlockwise,x=f,g=f;u-=v,c?u<-e.PI2?u=-e.PI2:u>0&&(u=-e.PI2+u%e.PI2):u>e.PI2?u=e.PI2:u<0&&(u=e.PI2+u%e.PI2);for(var m=[x+Math.cos(v)*f,g+Math.sin(v)*f],y;h<1;)y=u*h+v,m.push(x+Math.cos(y)*f,g+Math.sin(y)*f),h+=s;return y=u+v,m.push(x+Math.cos(y)*f,g+Math.sin(y)*f),m.push(x+Math.cos(v)*f,g+Math.sin(v)*f),this.pathIndexes=o(m),this.pathData=m,this}});p.exports=l},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(1100),a=t(59),o=t(10),r=t(34),e=new n({Extends:r,Mixins:[d],initialize:function(l,s,h,f,v,u){s===void 0&&(s=0),h===void 0&&(h=0),r.call(this,l,"Curve",f),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(s,h),v!==void 0&&this.setFillStyle(v,u),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(i){this._smoothness=i,this.updateData()}},setSmoothness:function(i){return this._smoothness=i,this.updateData()},updateData:function(){var i=this._curveBounds,l=this._smoothness;this.geom.getBounds(i,l),this.setSize(i.width,i.height),this.updateDisplayOrigin();for(var s=[],h=this.geom.getPoints(l),f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(59),a=t(1103),o=t(111),r=t(34),e=new n({Extends:r,Mixins:[a],initialize:function(l,s,h,f,v,u,c){s===void 0&&(s=0),h===void 0&&(h=0),f===void 0&&(f=128),v===void 0&&(v=128),r.call(this,l,"Ellipse",new o(f/2,v/2,f,v)),this._smoothness=64,this.setPosition(s,h),this.width=f,this.height=v,u!==void 0&&this.setFillStyle(u,c),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(i){this._smoothness=i,this.updateData()}},setSize:function(i,l){return this.width=i,this.height=l,this.geom.setPosition(i/2,l/2),this.geom.setSize(i,l),this.updateData()},setSmoothness:function(i){return this._smoothness=i,this.updateData()},updateData:function(){for(var i=[],l=this.geom.getPoints(this._smoothness),s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(34),a=t(1106),o=new n({Extends:d,Mixins:[a],initialize:function(e,i,l,s,h,f,v,u,c,x,g){i===void 0&&(i=0),l===void 0&&(l=0),s===void 0&&(s=128),h===void 0&&(h=128),f===void 0&&(f=32),v===void 0&&(v=32),d.call(this,e,"Grid",null),this.cellWidth=f,this.cellHeight=v,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(i,l),this.setSize(s,h),this.setFillStyle(u,c),x!==void 0&&this.setOutlineStyle(x,g),this.updateDisplayOrigin()},setFillStyle:function(r,e){return e===void 0&&(e=1),r===void 0?this.showCells=!1:(this.fillColor=r,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(r,e){return e===void 0&&(e=1),r===void 0?this.showAltCells=!1:(this.altFillColor=r,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(r,e){return e===void 0&&(e=1),r===void 0?this.showOutline=!1:(this.outlineFillColor=r,this.outlineFillAlpha=e,this.showOutline=!0),this}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1109),d=t(0),a=t(34),o=new d({Extends:a,Mixins:[n],initialize:function(e,i,l,s,h,f,v,u){i===void 0&&(i=0),l===void 0&&(l=0),s===void 0&&(s=48),h===void 0&&(h=32),f===void 0&&(f=15658734),v===void 0&&(v=10066329),u===void 0&&(u=13421772),a.call(this,e,"IsoBox",null),this.projection=4,this.fillTop=f,this.fillLeft=v,this.fillRight=u,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(i,l),this.setSize(s,h),this.updateDisplayOrigin()},setProjection:function(r){return this.projection=r,this},setFaces:function(r,e,i){return r===void 0&&(r=!0),e===void 0&&(e=!0),i===void 0&&(i=!0),this.showTop=r,this.showLeft=e,this.showRight=i,this},setFillStyle:function(r,e,i){return this.fillTop=r,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(1112),a=t(34),o=new n({Extends:a,Mixins:[d],initialize:function(e,i,l,s,h,f,v,u,c){i===void 0&&(i=0),l===void 0&&(l=0),s===void 0&&(s=48),h===void 0&&(h=32),f===void 0&&(f=!1),v===void 0&&(v=15658734),u===void 0&&(u=10066329),c===void 0&&(c=13421772),a.call(this,e,"IsoTriangle",null),this.projection=4,this.fillTop=v,this.fillLeft=u,this.fillRight=c,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=f,this.isFilled=!0,this.setPosition(i,l),this.setSize(s,h),this.updateDisplayOrigin()},setProjection:function(r){return this.projection=r,this},setReversed:function(r){return this.isReversed=r,this},setFaces:function(r,e,i){return r===void 0&&(r=!0),e===void 0&&(e=!0),i===void 0&&(i=!0),this.showTop=r,this.showLeft=e,this.showRight=i,this},setFillStyle:function(r,e,i){return this.fillTop=r,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(34),a=t(47),o=t(1115),r=new n({Extends:d,Mixins:[o],initialize:function(i,l,s,h,f,v,u,c,x){l===void 0&&(l=0),s===void 0&&(s=0),h===void 0&&(h=0),f===void 0&&(f=0),v===void 0&&(v=128),u===void 0&&(u=0),d.call(this,i,"Line",new a(h,f,v,u));var g=Math.max(1,this.geom.right-this.geom.left),m=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(l,s),this.setSize(g,m),c!==void 0&&this.setStrokeStyle(1,c,x),this.updateDisplayOrigin()},setLineWidth:function(e,i){return i===void 0&&(i=e),this._startWidth=e,this._endWidth=i,this.lineWidth=e,this},setTo:function(e,i,l,s){return this.geom.setTo(e,i,l,s),this}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1118),d=t(0),a=t(59),o=t(469),r=t(227),e=t(34),i=t(472),l=new d({Extends:e,Mixins:[n],initialize:function(h,f,v,u,c,x){f===void 0&&(f=0),v===void 0&&(v=0),e.call(this,h,"Polygon",new r(u));var g=o(this.geom);this.setPosition(f,v),this.setSize(g.width,g.height),c!==void 0&&this.setFillStyle(c,x),this.updateDisplayOrigin(),this.updateData()},smooth:function(s){s===void 0&&(s=1);for(var h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10),d=function(a,o){o===void 0&&(o=new n);for(var r=1/0,e=1/0,i=-r,l=-e,s,h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(67),d=t(47),a=t(471),o=function(r,e,i,l){l===void 0&&(l=[]);var s=r.points,h=a(r);!e&&i>0&&(e=h/i);for(var f=0;fu+y){u+=y;continue}var T=m.getPoint((v-u)/y);l.push(T);break}return l};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(67),d=t(47),a=function(o){for(var r=o.points,e=0,i=0;i + * @author Igor Ognichenko + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(d,a){return d[0]=a[0],d[1]=a[1],d},n=function(d){var a,o=[],r=d.points;for(a=0;a0&&e.push(t([0,0],o[0])),a=0;a1&&e.push(t([0,0],o[o.length-1])),d.setTo(e)};p.exports=n},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(10),a=t(34),o=t(1121),r=new n({Extends:a,Mixins:[o],initialize:function(i,l,s,h,f,v,u){l===void 0&&(l=0),s===void 0&&(s=0),h===void 0&&(h=128),f===void 0&&(f=128),a.call(this,i,"Rectangle",new d(0,0,h,f)),this.setPosition(l,s),this.setSize(h,f),v!==void 0&&this.setFillStyle(v,u),this.updateDisplayOrigin(),this.updateData()},setSize:function(e,i){return this.width=e,this.height=i,this.geom.setSize(e,i),this.updateData(),this},updateData:function(){var e=[],i=this.geom,l=this._tempLine;return i.getLineA(l),e.push(l.x1,l.y1,l.x2,l.y2),i.getLineB(l),e.push(l.x2,l.y2),i.getLineC(l),e.push(l.x2,l.y2),i.getLineD(l),e.push(l.x2,l.y2),this.pathData=e,this}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1124),d=t(0),a=t(59),o=t(34),r=new d({Extends:o,Mixins:[n],initialize:function(i,l,s,h,f,v,u,c){l===void 0&&(l=0),s===void 0&&(s=0),h===void 0&&(h=5),f===void 0&&(f=32),v===void 0&&(v=64),o.call(this,i,"Star",null),this._points=h,this._innerRadius=f,this._outerRadius=v,this.setPosition(l,s),this.setSize(v*2,v*2),u!==void 0&&this.setFillStyle(u,c),this.updateDisplayOrigin(),this.updateData()},setPoints:function(e){return this._points=e,this.updateData()},setInnerRadius:function(e){return this._innerRadius=e,this.updateData()},setOuterRadius:function(e){return this._outerRadius=e,this.updateData()},points:{get:function(){return this._points},set:function(e){this._points=e,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(e){this._innerRadius=e,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(e){this._outerRadius=e,this.updateData()}},updateData:function(){var e=[],i=this._points,l=this._innerRadius,s=this._outerRadius,h=Math.PI/2*3,f=Math.PI/i,v=s,u=s;e.push(v,u+-s);for(var c=0;c + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(34),a=t(82),o=t(1127),r=new n({Extends:d,Mixins:[o],initialize:function(i,l,s,h,f,v,u,c,x,g,m){l===void 0&&(l=0),s===void 0&&(s=0),h===void 0&&(h=0),f===void 0&&(f=128),v===void 0&&(v=64),u===void 0&&(u=0),c===void 0&&(c=128),x===void 0&&(x=128),d.call(this,i,"Triangle",new a(h,f,v,u,c,x));var y=this.geom.right-this.geom.left,T=this.geom.bottom-this.geom.top;this.setPosition(l,s),this.setSize(y,T),g!==void 0&&this.setFillStyle(g,m),this.updateDisplayOrigin(),this.updateData()},setTo:function(e,i,l,s,h,f){return this.geom.setTo(e,i,l,s,h,f),this.updateData()},updateData:function(){var e=[],i=this.geom,l=this._tempLine;return i.getLineA(l),e.push(l.x1,l.y1,l.x2,l.y2),i.getLineB(l),e.push(l.x2,l.y2),i.getLineC(l),e.push(l.x2,l.y2),this.pathData=e,this}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=t(67),a=function(o,r,e){e===void 0&&(e=new n);var i=o.getLineA(),l=o.getLineB(),s=o.getLineC();if(r<=0||r>=1)return e.x=i.x1,e.y=i.y1,e;var h=d(i),f=d(l),v=d(s),u=h+f+v,c=u*r,x=0;return ch+f?(c-=h+f,x=c/v,e.x=s.x1+(s.x2-s.x1)*x,e.y=s.y1+(s.y2-s.y1)*x):(c-=h,x=c/f,e.x=l.x1+(l.x2-l.x1)*x,e.y=l.y1+(l.y2-l.y1)*x),e};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(67),d=t(4),a=function(o,r,e,i){i===void 0&&(i=[]);var l=o.getLineA(),s=o.getLineB(),h=o.getLineC(),f=n(l),v=n(s),u=n(h),c=f+v+u;!r&&e>0&&(r=c/e);for(var x=0;xf+v?(g-=f+v,m=g/u,y.x=h.x1+(h.x2-h.x1)*m,y.y=h.y1+(h.y2-h.y1)*m):(g-=f,m=g/v,y.x=s.x1+(s.x2-s.x1)*m,y.y=s.y1+(s.y2-s.y1)*m),i.push(y)}return i};p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){if(!n||typeof n=="number")return!1;if(n.hasOwnProperty(d))return n[d]=a,!0;if(d.indexOf(".")!==-1){for(var o=d.split("."),r=n,e=n,i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(116),d=t(117),a=function(o,r,e,i,l,s,h){if(i===void 0&&(i=!1),s===void 0&&(s=16777215),h===void 0&&(h=1),o.length!==r.length){console.warn("GenerateVerts: vertices and uvs count not equal");return}var f={faces:[],vertices:[]},v,u,c,x,g,m,y,T,S,C,P,A=i?3:2,M=Array.isArray(s),L=Array.isArray(h);if(Array.isArray(e)&&e.length>0)for(v=0;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(116),d=t(69),a=t(39),o=t(117),r=new a,e=new a,i=new d,l=function(s,h,f,v,u,c,x,g,m,y){f===void 0&&(f=1),v===void 0&&(v=0),u===void 0&&(u=0),c===void 0&&(c=0),x===void 0&&(x=0),g===void 0&&(g=0),m===void 0&&(m=0),y===void 0&&(y=!0);var T={faces:[],verts:[]},S=s.materials;r.set(v,u,c),e.set(x,g,m),i.fromRotationXYTranslation(e,r,y);for(var C=0;C + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(65),d=t(0),a=t(11),o=t(200),r=t(12),e=new d({Extends:n,Mixins:[a.ScrollFactor,a.Visible],initialize:function(l,s,h,f,v,u,c){n.call(this,l,s,h),this.color=new o(f,v,u),this.intensity=c,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1)},willRender:function(i){return!(e.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&i.id)},setColor:function(i){var l=r.getFloatsFromUintRGB(i);return this.color.set(l[0],l[1],l[2]),this},setIntensity:function(i){return this.intensity=i,this},setRadius:function(i){return this.radius=i,this}});e.RENDER_MASK=15,p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(151),d=t(0),a=t(50),o=t(481),r=t(150),e=t(200),i=t(74),l=t(79),s=t(12),h=new d({initialize:function(){this.lights=[],this.ambientColor=new e(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(f,v,u,c,x,g){return this.systems.displayList.add(new r(this.scene,f,v,u,c,x,g))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(f){for(var v=this.lights,u=f.worldView,c=[],x=0;xthis.maxLights&&(l(c,this.sortByDistance),c=c.slice(0,this.maxLights)),this.visibleLights=c.length,c},sortByDistance:function(f,v){return f.distance>=v.distance},setAmbientColor:function(f){var v=s.getFloatsFromUintRGB(f);return this.ambientColor.set(v[0],v[1],v[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(f,v,u,c,x){f===void 0&&(f=0),v===void 0&&(v=0),u===void 0&&(u=128),c===void 0&&(c=16777215),x===void 0&&(x=1);var g=s.getFloatsFromUintRGB(c),m=new o(f,v,u,g[0],g[1],g[2],x);return this.lights.push(m),m},removeLight:function(f){var v=this.lights.indexOf(f);return v>=0&&i(this.lights,v),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});p.exports=h},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(56),d=t(17),a={Circle:t(1191),Ellipse:t(1201),Intersects:t(484),Line:t(1221),Mesh:t(1243),Point:t(1246),Polygon:t(1260),Rectangle:t(502),Triangle:t(1293)};a=d(!1,a,n),p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CircleToCircle:t(231),CircleToRectangle:t(151),GetCircleToCircle:t(1211),GetCircleToRectangle:t(1212),GetLineToCircle:t(232),GetLineToLine:t(485),GetLineToPoints:t(486),GetLineToPolygon:t(487),GetLineToRectangle:t(234),GetRaysFromPointToPolygon:t(1213),GetRectangleIntersection:t(1214),GetRectangleToRectangle:t(1215),GetRectangleToTriangle:t(1216),GetTriangleToCircle:t(1217),GetTriangleToLine:t(492),GetTriangleToTriangle:t(1218),LineToCircle:t(233),LineToLine:t(96),LineToRectangle:t(488),PointToLine:t(496),PointToLineSegment:t(1219),RectangleToRectangle:t(152),RectangleToTriangle:t(489),RectangleToValues:t(1220),TriangleToCircle:t(491),TriangleToLine:t(493),TriangleToTriangle:t(494)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(39),d=function(a,o,r){var e=a.x1,i=a.y1,l=a.x2,s=a.y2,h=o.x1,f=o.y1,v=o.x2,u=o.y2,c=l-e,x=s-i,g=v-h,m=u-f,y=m*c-g*x;if(c===0||y===0)return!1;var T=(c*(f-i)+x*(e-h))/(g*x-m*c),S=(h+g*T-e)/c;return S<0||T<0||T>1?null:(r===void 0&&(r=new n),r.set(e+c*S,i+x*S,S))};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(39),d=t(485),a=t(47),o=new a,r=new n,e=function(i,l,s){s===void 0&&(s=new n);var h=!1;s.set(),r.set();for(var f=l[0],v=1;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.x1,o=n.y1,r=n.x2,e=n.y2,i=d.x,l=d.y,s=d.right,h=d.bottom,f=0;if(a>=i&&a<=s&&o>=l&&o<=h||r>=i&&r<=s&&e>=l&&e<=h)return!0;if(a=i){if(f=o+(e-o)*(i-a)/(r-a),f>l&&f<=h)return!0}else if(a>s&&r<=s&&(f=o+(e-o)*(s-a)/(r-a),f>=l&&f<=h))return!0;if(o=l){if(f=a+(r-a)*(l-o)/(e-o),f>=i&&f<=s)return!0}else if(o>h&&e<=h&&(f=a+(r-a)*(h-o)/(e-o),f>=i&&f<=s))return!0;return!1};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(96),d=t(57),a=t(235),o=t(490),r=function(e,i){if(i.left>e.right||i.righte.bottom||i.bottom0};p.exports=r},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d===void 0&&(d=[]),d.push({x:n.x,y:n.y}),d.push({x:n.right,y:n.y}),d.push({x:n.right,y:n.bottom}),d.push({x:n.x,y:n.bottom}),d};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(233),d=t(115),a=function(o,r){return o.left>r.right||o.rightr.bottom||o.bottom + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(96),d=function(a,o){return!!(a.contains(o.x1,o.y1)||a.contains(o.x2,o.y2)||n(a.getLineA(),o)||n(a.getLineB(),o)||n(a.getLineC(),o))};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(235),d=t(495),a=t(96),o=function(r,e){if(r.left>e.right||r.righte.bottom||r.bottom0||(u=d(e),c=n(r,u,!0),c.length>0)};p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d===void 0&&(d=[]),d.push({x:n.x1,y:n.y1}),d.push({x:n.x2,y:n.y2}),d.push({x:n.x3,y:n.y3}),d};p.exports=t},function(p,E){/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){a===void 0&&(a=1);var o=d.x1,r=d.y1,e=d.x2,i=d.y2,l=n.x,s=n.y,h=(e-o)*(e-o)+(i-r)*(i-r);if(h===0)return!1;var f=((l-o)*(e-o)+(s-r)*(i-r))/h;if(f<0)return Math.sqrt((o-l)*(o-l)+(r-s)*(r-s))<=a;if(f>=0&&f<=1){var v=((r-s)*(e-o)-(o-l)*(i-r))/h;return Math.abs(v)*Math.sqrt(h)<=a}else return Math.sqrt((e-l)*(e-l)+(i-s)*(i-s))<=a};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(14),d=t(68),a=t(97),o=function(r){var e=a(r)-n.TAU;return d(e,-Math.PI,Math.PI)};p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=!0,n="untitled",d="",a="";function o(x){var g=x.indexOf("#");return g>-1?x.substring(0,g):x}function r(x){return x.models.length===0&&x.models.push({faces:[],name:n,textureCoords:[],vertexNormals:[],vertices:[]}),d="",x.models[x.models.length-1]}function e(x,g){var m=x.length>=2?x[1]:n;g.models.push({faces:[],name:m,textureCoords:[],vertexNormals:[],vertices:[]}),d=""}function i(x){x.length===2&&(d=x[1])}function l(x,g){var m=x.length,y=m>=2?parseFloat(x[1]):0,T=m>=3?parseFloat(x[2]):0,S=m>=4?parseFloat(x[3]):0;r(g).vertices.push({x:y,y:T,z:S})}function s(x,g){var m=x.length,y=m>=2?parseFloat(x[1]):0,T=m>=3?parseFloat(x[2]):0,S=m>=4?parseFloat(x[3]):0;isNaN(y)&&(y=0),isNaN(T)&&(T=0),isNaN(S)&&(S=0),t&&(T=1-T),r(g).textureCoords.push({u:y,v:T,w:S})}function h(x,g){var m=x.length,y=m>=2?parseFloat(x[1]):0,T=m>=3?parseFloat(x[2]):0,S=m>=4?parseFloat(x[3]):0;r(g).vertexNormals.push({x:y,y:T,z:S})}function f(x,g){var m=x.length-1;if(!(m<3)){for(var y={group:d,material:a,vertices:[]},T=0;T3)){var A=0,M=0,L=0;A=parseInt(C[0],10),P>1&&C[1]!==""&&(M=parseInt(C[1],10)),P>2&&(L=parseInt(C[2],10)),A!==0&&(A<0&&(A=r(g).vertices.length+1+A),M-=1,A-=1,L-=1,y.vertices.push({textureCoordsIndex:M,vertexIndex:A,vertexNormalIndex:L}))}}r(g).faces.push(y)}}function v(x,g){x.length>=2&&g.materialLibraries.push(x[1])}function u(x){x.length>=2&&(a=x[1])}var c=function(x,g){g===void 0&&(g=!0),t=g;var m={materials:{},materialLibraries:[],models:[]};d="",a="";for(var y=x.split(` +`),T=0;T + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(103),d=function(a){for(var o={},r=a.split(` +`),e="",i=0;i=2?Math.floor(s[2]*255):h,v=s.length>=3?Math.floor(s[3]*255):h;o[e]=n(h,f,v);break}}}}return o};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return Math.sqrt(n.x*n.x+n.y*n.y)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.x*n.x+n.y*n.y};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10);n.Area=t(1267),n.Ceil=t(1268),n.CeilAll=t(1269),n.CenterOn=t(190),n.Clone=t(1270),n.Contains=t(57),n.ContainsPoint=t(1271),n.ContainsRect=t(503),n.CopyFrom=t(1272),n.Decompose=t(490),n.Equals=t(1273),n.FitInside=t(1274),n.FitOutside=t(1275),n.Floor=t(1276),n.FloorAll=t(1277),n.FromPoints=t(199),n.FromXY=t(1278),n.GetAspectRatio=t(237),n.GetCenter=t(1279),n.GetPoint=t(171),n.GetPoints=t(306),n.GetSize=t(1280),n.Inflate=t(1281),n.Intersection=t(1282),n.MarchingAnts=t(316),n.MergePoints=t(1283),n.MergeRect=t(1284),n.MergeXY=t(1285),n.Offset=t(1286),n.OffsetPoint=t(1287),n.Overlaps=t(1288),n.Perimeter=t(130),n.PerimeterPoint=t(1289),n.Random=t(174),n.RandomOutside=t(1290),n.SameDimensions=t(1291),n.Scale=t(1292),n.Union=t(441),p.exports=n},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d.width*d.height>n.width*n.height?!1:d.x>n.x&&d.xn.x&&d.rightn.y&&d.yn.y&&d.bottom + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o){return o===void 0&&(o=new n),o.x=(a.x1+a.x2+a.x3)/3,o.y=(a.y1+a.y2+a.y3)/3,o};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return n.x1+=d,n.y1+=a,n.x2+=d,n.y2+=a,n.x3+=d,n.y3+=a,n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4);function d(o,r,e,i){var l=o-e,s=r-i,h=l*l+s*s;return Math.sqrt(h)}var a=function(o,r){r===void 0&&(r=new n);var e=o.x1,i=o.y1,l=o.x2,s=o.y2,h=o.x3,f=o.y3,v=d(h,f,l,s),u=d(e,i,h,f),c=d(l,s,e,i),x=v+u+c;return r.x=(e*v+l*u+h*c)/x,r.y=(i*v+s*u+f*c)/x,r};p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return function(a,o,r,e){var i=n.getPixelAlpha(o,r,e.texture.key,e.frame.name);return i&&i>=d}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return{gameObject:n,enabled:!0,alwaysEnabled:!1,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:d,hitAreaCallback:a,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o,r){this.pad=o,this.events=o.events,this.index=r,this.value=0,this.threshold=.1},update:function(a){this.value=a},getValue:function(){return Math.abs(this.value) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(239),a=new n({initialize:function(r,e){this.pad=r,this.events=r.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(o){this.value=o;var r=this.pad,e=this.index;o>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(d.BUTTON_DOWN,r,this,o),this.pad.emit(d.GAMEPAD_BUTTON_DOWN,e,o,this)):this.pressed&&(this.pressed=!1,this.events.emit(d.BUTTON_UP,r,this,o),this.pad.emit(d.GAMEPAD_BUTTON_UP,e,o,this))},destroy:function(){this.pad=null,this.events=null}});p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(509),d=t(510),a=t(0),o=t(9),r=t(3),e=new a({Extends:o,initialize:function(l,s){o.call(this),this.manager=l,this.pad=s,this.id=s.id,this.index=s.index;for(var h=[],f=0;f=2&&(this.leftStick.set(v[0].getValue(),v[1].getValue()),f>=4&&this.rightStick.set(v[2].getValue(),v[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var i;for(i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(9),a=t(154),o=new n({Extends:d,initialize:function(e,i){d.call(this),this.plugin=e,this.keyCode=i,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(r){return this.emitOnRepeat=r,this},onDown:function(r){this.originalEvent=r,this.enabled&&(this.altKey=r.altKey,this.ctrlKey=r.ctrlKey,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.location=r.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(a.DOWN,this,r):(this.isDown=!0,this.isUp=!1,this.timeDown=r.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(a.DOWN,this,r)))},onUp:function(r){this.originalEvent=r,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=r.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(a.UP,this,r))},reset:function(){return this.preventDefault=!0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(154),a=t(2),o=t(514),r=t(516),e=new n({initialize:function(l,s,h){if(h===void 0&&(h={}),s.length<2)return!1;this.manager=l,this.enabled=!0,this.keyCodes=[];for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(515),d=function(a,o){if(o.matched)return!0;var r=!1,e=!1;if(a.keyCode===o.current)if(o.index>0&&o.maxKeyDelay>0){var i=o.timeLastMatched+o.maxKeyDelay;a.timeStamp<=i&&(e=!0,r=n(a,o))}else e=!0,r=n(a,o);return!e&&o.resetOnWrongKey&&(o.index=0,o.current=o.keyCodes[0]),r&&(o.timeLastMatched=a.timeStamp,o.matched=!0,o.timeMatched=a.timeStamp),r};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d.timeLastMatched=n.timeStamp,d.index++,d.index===d.size?!0:(d.current=d.keyCodes[d.index],!1)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.current=n.keyCodes[0],n.index=0,n.timeLastMatched=0,n.matched=!1,n.timeMatched=0,n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(240),d=function(a,o){var r=n(o,a.xhrSettings),e=new XMLHttpRequest;if(e.open("GET",a.src,r.async,r.user,r.password),e.responseType=a.xhrSettings.responseType,e.timeout=r.timeout,r.headers)for(var i in r.headers)e.setRequestHeader(i,r.headers[i]);return r.header&&r.headerValue&&e.setRequestHeader(r.header,r.headerValue),r.requestedWith&&e.setRequestHeader("X-Requested-With",r.requestedWith),r.overrideMimeType&&e.overrideMimeType(r.overrideMimeType),r.withCredentials&&(e.withCredentials=!0),e.onload=a.onLoad.bind(a,e),e.onerror=a.onError.bind(a,e),e.onprogress=a.onProgress.bind(a),e.send(),e};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(519),i=t(7),l=new n({Extends:a,initialize:function(h,f,v,u,c){if(i(f)){var x=f;f=r(x,"key"),u=r(x,"xhrSettings"),c=r(x,"context",c)}var g={type:"audio",cache:h.cacheManager.audio,extension:v.type,responseType:"arraybuffer",key:f,url:v.url,xhrSettings:u,config:{context:c}};a.call(this,h,g)},onProcess:function(){this.state=d.FILE_PROCESSING;var s=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(h){s.data=h,s.onProcessComplete()},function(h){console.error("Error decoding audio: "+s.key+" - ",h?h.message:null),s.onProcessError()}),this.config.context=null}});l.create=function(s,h,f,v,u){var c=s.systems.game,x=c.config.audio,g=c.device.audio;i(h)&&(f=r(h,"url",[]),v=r(h,"config",{}));var m=l.getAudioURL(c,f);return m?g.webAudio&&!x.disableWebAudio?new l(s,h,m,u,c.sound.context):new e(s,h,m,v):null},l.getAudioURL=function(s,h){Array.isArray(h)||(h=[h]);for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(95),a=t(23),o=t(2),r=t(155),e=t(7),i=new n({Extends:a,initialize:function(s,h,f,v){if(e(h)){var u=h;h=o(u,"key"),v=o(u,"config",v)}var c={type:"audio",cache:s.cacheManager.audio,extension:f.type,key:h,url:f.url,config:v};a.call(this,s,c),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 l=0;l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=new n({Extends:a,initialize:function(s,h,f,v){var u="js";if(e(h)){var c=h;h=r(c,"key"),f=r(c,"url"),v=r(c,"xhrSettings"),u=r(c,"extension",u)}var x={type:"script",cache:!1,extension:u,responseType:"text",key:h,url:f,xhrSettings:v};a.call(this,s,x)},onProcess:function(){this.state=d.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()}});o.register("script",function(l,s,h){if(Array.isArray(l))for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(522),d=t(157),a=t(0),o=t(62),r=t(524),e=t(525),i=new a({initialize:function(s){this.world=s,this.scene=s.scene,this.sys=s.scene.sys},collider:function(l,s,h,f,v){return this.world.addCollider(l,s,h,f,v)},overlap:function(l,s,h,f,v){return this.world.addOverlap(l,s,h,f,v)},existing:function(l,s){var h=s?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(l,h),l},staticImage:function(l,s,h,f){var v=new n(this.scene,l,s,h,f);return this.sys.displayList.add(v),this.world.enableBody(v,o.STATIC_BODY),v},image:function(l,s,h,f){var v=new n(this.scene,l,s,h,f);return this.sys.displayList.add(v),this.world.enableBody(v,o.DYNAMIC_BODY),v},staticSprite:function(l,s,h,f){var v=new d(this.scene,l,s,h,f);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,o.STATIC_BODY),v},sprite:function(l,s,h,f){var v=new d(this.scene,l,s,h,f);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,o.DYNAMIC_BODY),v},staticGroup:function(l,s){return this.sys.updateList.add(new e(this.world,this.world.scene,l,s))},group:function(l,s){return this.sys.updateList.add(new r(this.world,this.world.scene,l,s))},destroy:function(){this.world=null,this.scene=null,this.sys=null}});p.exports=i},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(243),a=t(125),o=new n({Extends:a,Mixins:[d.Acceleration,d.Angular,d.Bounce,d.Debug,d.Drag,d.Enable,d.Friction,d.Gravity,d.Immovable,d.Mass,d.Pushable,d.Size,d.Velocity],initialize:function(e,i,l,s,h){a.call(this,e,i,l,s,h),this.body=null}});p.exports=o},function(p,E,t){var n=t(244),d=t(65),a=t(231),o=t(151),r=function(e,i,l,s,h,f){var v=n(e,i-s,l-s,2*s,2*s,h,f);if(v.length===0)return v;for(var u=new d(i,l,s),c=new d,x=[],g=0;g + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(157),d=t(0),a=t(62),o=t(2),r=t(113),e=t(7),i=new d({Extends:r,initialize:function(s,h,f,v){if(!f&&!v)v={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(e(f))v=f,f=null,v.internalCreateCallback=this.createCallbackHandler,v.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(f)&&e(f[0])){v=f[0];var u=this;f.forEach(function(c){c.internalCreateCallback=u.createCallbackHandler,c.internalRemoveCallback=u.removeCallbackHandler}),f=null}else v={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=s,v.classType=o(v,"classType",n),this.physicsType=a.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(v,"collideWorldBounds",!1),setBoundsRectangle:o(v,"customBoundsRectangle",null),setAccelerationX:o(v,"accelerationX",0),setAccelerationY:o(v,"accelerationY",0),setAllowDrag:o(v,"allowDrag",!0),setAllowGravity:o(v,"allowGravity",!0),setAllowRotation:o(v,"allowRotation",!0),setBounceX:o(v,"bounceX",0),setBounceY:o(v,"bounceY",0),setDragX:o(v,"dragX",0),setDragY:o(v,"dragY",0),setEnable:o(v,"enable",!0),setGravityX:o(v,"gravityX",0),setGravityY:o(v,"gravityY",0),setFrictionX:o(v,"frictionX",0),setFrictionY:o(v,"frictionY",0),setMaxVelocityX:o(v,"maxVelocityX",1e4),setMaxVelocityY:o(v,"maxVelocityY",1e4),setVelocityX:o(v,"velocityX",0),setVelocityY:o(v,"velocityY",0),setAngularVelocity:o(v,"angularVelocity",0),setAngularAcceleration:o(v,"angularAcceleration",0),setAngularDrag:o(v,"angularDrag",0),setMass:o(v,"mass",1),setImmovable:o(v,"immovable",!1)},r.call(this,h,f,v),this.type="PhysicsGroup"},createCallbackHandler:function(l){l.body||this.world.enableBody(l,a.DYNAMIC_BODY);var s=l.body;for(var h in this.defaults)s[h](this.defaults[h])},removeCallbackHandler:function(l){l.body&&this.world.disableBody(l)},setVelocity:function(l,s,h){h===void 0&&(h=0);for(var f=this.getChildren(),v=0;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(157),d=t(0),a=t(62),o=t(2),r=t(113),e=t(7),i=new d({Extends:r,initialize:function(s,h,f,v){!f&&!v?v={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:n}:e(f)?(v=f,f=null,v.internalCreateCallback=this.createCallbackHandler,v.internalRemoveCallback=this.removeCallbackHandler,v.createMultipleCallback=this.createMultipleCallbackHandler,v.classType=o(v,"classType",n)):Array.isArray(f)&&e(f[0])?(v=f,f=null,v.forEach(function(u){u.internalCreateCallback=this.createCallbackHandler,u.internalRemoveCallback=this.removeCallbackHandler,u.createMultipleCallback=this.createMultipleCallbackHandler,u.classType=o(u,"classType",n)})):v={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=s,this.physicsType=a.STATIC_BODY,r.call(this,h,f,v),this.type="StaticPhysicsGroup"},createCallbackHandler:function(l){l.body||this.world.enableBody(l,a.STATIC_BODY)},removeCallbackHandler:function(l){l.body&&this.world.disableBody(l)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var l=this.children.entries,s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(350),d=t(527),a=t(18),o=t(0),r=t(528),e=t(62),i=t(50),l=t(9),s=t(245),h=t(124),f=t(354),v=t(355),u=t(246),c=t(247),x=t(529),g=t(6),m=t(14),y=t(211),T=t(530),S=t(10),C=t(531),P=t(532),A=t(537),M=t(538),L=t(149),F=t(539),B=t(248),N=t(25),X=t(3),V=t(68),W=new o({Extends:l,initialize:function(R,I){l.call(this),this.scene=R,this.bodies=new L,this.staticBodies=new L,this.pendingDestroy=new L,this.colliders=new y,this.gravity=new X(g(I,"gravity.x",0),g(I,"gravity.y",0)),this.bounds=new S(g(I,"x",0),g(I,"y",0),g(I,"width",R.sys.scale.width),g(I,"height",R.sys.scale.height)),this.checkCollision={up:g(I,"checkCollision.up",!0),down:g(I,"checkCollision.down",!0),left:g(I,"checkCollision.left",!0),right:g(I,"checkCollision.right",!0)},this.fps=g(I,"fps",60),this.fixedStep=g(I,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=g(I,"timeScale",1),this.OVERLAP_BIAS=g(I,"overlapBias",4),this.TILE_BIAS=g(I,"tileBias",16),this.forceX=g(I,"forceX",!1),this.isPaused=g(I,"isPaused",!1),this._total=0,this.drawDebug=g(I,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:g(I,"debugShowBody",!0),debugShowStaticBody:g(I,"debugShowStaticBody",!0),debugShowVelocity:g(I,"debugShowVelocity",!0),bodyDebugColor:g(I,"debugBodyColor",16711935),staticBodyDebugColor:g(I,"debugStaticBodyColor",255),velocityDebugColor:g(I,"debugVelocityColor",65280)},this.maxEntries=g(I,"maxEntries",16),this.useTree=g(I,"useTree",!0),this.tree=new C(this.maxEntries),this.staticTree=new C(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new N,this._tempMatrix2=new N,this.drawDebug&&this.createDebugGraphic()},enable:function(O,R){R===void 0&&(R=e.DYNAMIC_BODY),Array.isArray(O)||(O=[O]);for(var I=0;I=G;for(this.fixedStep||(D=R*.001,z=!0,this._elapsed=0),I=0;I=G;)this._elapsed-=G,this.step(D)}},step:function(O){var R,I,D=this.bodies.entries,G=D.length;for(R=0;R0){var H=this.tree,w=this.staticTree;for(I=z.entries,D=I.length,O=0;O-1&&K>Z&&(O.velocity.normalize().scale(Z),K=Z),O.speed=K},separate:function(O,R,I,D,G,U){if(!U&&!O.enable||!R.enable||O.checkCollision.none||R.checkCollision.none||!this.intersects(O,R)||I&&I.call(D,O.gameObject,R.gameObject)===!1)return!1;if(O.isCircle&&R.isCircle)return this.separateCircle(O,R,G);if(O.isCircle!==R.isCircle){var Y=O.isCircle?R:O,z=O.isCircle?O:R,H={x:Y.x,y:Y.y,right:Y.right,bottom:Y.bottom},w=z.center;if((w.yH.bottom)&&(w.xH.right))return this.separateCircle(O,R,G)}var K=!1,Z=!1;G?(K=A(O,R,G,this.OVERLAP_BIAS),Z=M(O,R,G,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+O.gravity.y)U.right&&(G=i(Y.x,Y.y,U.right,U.y)-Y.radius):Y.y>U.bottom&&(Y.xU.right&&(G=i(Y.x,Y.y,U.right,U.bottom)-Y.radius)),G*=-1}else G=O.halfWidth+R.halfWidth-i(O.center.x,O.center.y,R.center.x,R.center.y);if(O.overlapR=G,R.overlapR=G,I||G===0||O.immovable&&R.immovable||O.customSeparateX||R.customSeparateX)return G!==0&&(O.onOverlap||R.onOverlap)&&this.emit(s.OVERLAP,O.gameObject,R.gameObject,O,R),G!==0;var z=O.center.x-R.center.x,H=O.center.y-R.center.y,w=Math.sqrt(Math.pow(z,2)+Math.pow(H,2)),K=(R.center.x-O.center.x)/w||0,Z=(R.center.y-O.center.y)/w||0,J=2*(O.velocity.x*K+O.velocity.y*Z-R.velocity.x*K-R.velocity.y*Z)/(O.mass+R.mass);(O.immovable||R.immovable)&&(J*=2),O.immovable||(O.velocity.x=O.velocity.x-J/O.mass*K,O.velocity.y=O.velocity.y-J/O.mass*Z),R.immovable||(R.velocity.x=R.velocity.x+J/R.mass*K,R.velocity.y=R.velocity.y+J/R.mass*Z),!O.immovable&&!R.immovable&&(G/=2);var j=n(O.center,R.center),Q=(G+m.EPSILON)*Math.cos(j),k=(G+m.EPSILON)*Math.sin(j);return O.immovable||(O.x-=Q,O.y-=k,O.updateCenter()),R.immovable||(R.x+=Q,R.y+=k,R.updateCenter()),O.velocity.x*=O.bounce.x,O.velocity.y*=O.bounce.y,R.velocity.x*=R.bounce.x,R.velocity.y*=R.bounce.y,(O.onCollide||R.onCollide)&&this.emit(s.COLLIDE,O.gameObject,R.gameObject,O,R),!0},intersects:function(O,R){return O===R?!1:!O.isCircle&&!R.isCircle?!(O.right<=R.position.x||O.bottom<=R.position.y||O.position.x>=R.right||O.position.y>=R.bottom):O.isCircle?R.isCircle?i(O.center.x,O.center.y,R.center.x,R.center.y)<=O.halfWidth+R.halfWidth:this.circleBodyIntersects(O,R):this.circleBodyIntersects(R,O)},circleBodyIntersects:function(O,R){var I=a(O.center.x,R.left,R.right),D=a(O.center.y,R.top,R.bottom),G=(O.center.x-I)*(O.center.x-I),U=(O.center.y-D)*(O.center.y-D);return G+U<=O.halfWidth*O.halfWidth},overlap:function(O,R,I,D,G){return I===void 0&&(I=null),D===void 0&&(D=null),G===void 0&&(G=I),this.collideObjects(O,R,I,D,G,!0)},collide:function(O,R,I,D,G){return I===void 0&&(I=null),D===void 0&&(D=null),G===void 0&&(G=I),this.collideObjects(O,R,I,D,G,!1)},collideObjects:function(O,R,I,D,G,U){var Y,z;O.isParent&&O.physicsType===void 0&&(O=O.children.entries),R&&R.isParent&&R.physicsType===void 0&&(R=R.children.entries);var H=Array.isArray(O),w=Array.isArray(R);if(this._total=0,!H&&!w)this.collideHandler(O,R,I,D,G,U);else if(!H&&w)for(Y=0;Y0},collideHandler:function(O,R,I,D,G,U){if(R===void 0&&O.isParent)return this.collideGroupVsGroup(O,O,I,D,G,U);if(!O||!R)return!1;if(O.body){if(R.body)return this.collideSpriteVsSprite(O,R,I,D,G,U);if(R.isParent)return this.collideSpriteVsGroup(O,R,I,D,G,U);if(R.isTilemap)return this.collideSpriteVsTilemapLayer(O,R,I,D,G,U)}else if(O.isParent){if(R.body)return this.collideSpriteVsGroup(R,O,I,D,G,U);if(R.isParent)return this.collideGroupVsGroup(O,R,I,D,G,U);if(R.isTilemap)return this.collideGroupVsTilemapLayer(O,R,I,D,G,U)}else if(O.isTilemap){if(R.body)return this.collideSpriteVsTilemapLayer(R,O,I,D,G,U);if(R.isParent)return this.collideGroupVsTilemapLayer(R,O,I,D,G,U)}},collideSpriteVsSprite:function(O,R,I,D,G,U){return!O.body||!R.body?!1:(this.separate(O.body,R.body,D,G,U)&&(I&&I.call(G,O,R),this._total++),!0)},collideSpriteVsGroup:function(O,R,I,D,G,U){var Y=O.body;if(!(R.length===0||!Y||!Y.enable||Y.checkCollision.none)){var z,H,w;if(this.useTree||R.physicsType===e.STATIC_BODY){var K=this.treeMinMax;K.minX=Y.left,K.minY=Y.top,K.maxX=Y.right,K.maxY=Y.bottom;var Z=R.physicsType===e.DYNAMIC_BODY?this.tree.search(K):this.staticTree.search(K);for(H=Z.length,z=0;zZ.baseTileWidth){var J=(Z.tileWidth-Z.baseTileWidth)*R.scaleX;z-=J,w+=J}if(Z.tileHeight>Z.baseTileHeight){var j=(Z.tileHeight-Z.baseTileHeight)*R.scaleY;K+=j}var Q=x(z,H,w,K,null,R.scene.cameras.main,R.layer);return Q.length===0?!1:this.collideSpriteVsTilesHandler(O,Q,I,D,G,U,!0)},collideSpriteVsTilesHandler:function(O,R,I,D,G,U,Y){for(var z=O.body,H,w={left:0,right:0,top:0,bottom:0},K,Z=!1,J=0;J + * @author Benjamin D. Richards + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(62),a=t(245),o=t(196),r=t(10),e=t(57),i=t(3),l=new n({initialize:function(h,f){var v=f.displayWidth?f.displayWidth:64,u=f.displayHeight?f.displayHeight:64;this.world=h,this.gameObject=f,this.transform={x:f.x,y:f.y,rotation:f.angle,scaleX:f.scaleX,scaleY:f.scaleY,displayOriginX:f.displayOriginX,displayOriginY:f.displayOriginY},this.debugShowBody=h.defaults.debugShowBody,this.debugShowVelocity=h.defaults.debugShowVelocity,this.debugBodyColor=h.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(f.x-f.scaleX*f.displayOriginX,f.y-f.scaleY*f.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=f.angle,this.preRotation=f.angle,this.width=v,this.height=u,this.sourceWidth=v,this.sourceHeight=u,f.frame&&(this.sourceWidth=f.frame.realWidth,this.sourceHeight=f.frame.realHeight),this.halfWidth=Math.abs(v/2),this.halfHeight=Math.abs(u/2),this.center=new i(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new i,this.newVelocity=new i,this.deltaMax=new i,this.acceleration=new i,this.allowDrag=!0,this.drag=new i,this.allowGravity=!0,this.gravity=new i,this.bounce=new i,this.worldBounce=null,this.customBoundsRectangle=h.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new i(1e4,1e4),this.maxSpeed=-1,this.friction=new i(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=d.FACING_NONE,this.immovable=!1,this.pushable=!0,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={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=d.DYNAMIC_BODY,this._sx=f.scaleX,this._sy=f.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new r},updateBounds:function(){var s=this.gameObject,h=this.transform;if(s.parentContainer){var f=s.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);h.x=f.tx,h.y=f.ty,h.rotation=o(f.rotation),h.scaleX=f.scaleX,h.scaleY=f.scaleY,h.displayOriginX=s.displayOriginX,h.displayOriginY=s.displayOriginY}else h.x=s.x,h.y=s.y,h.rotation=s.angle,h.scaleX=s.scaleX,h.scaleY=s.scaleY,h.displayOriginX=s.displayOriginX,h.displayOriginY=s.displayOriginY;var v=!1;if(this.syncBounds){var u=s.getBounds(this._bounds);this.width=u.width,this.height=u.height,v=!0}else{var c=Math.abs(h.scaleX),x=Math.abs(h.scaleY);(this._sx!==c||this._sy!==x)&&(this.width=this.sourceWidth*c,this.height=this.sourceHeight*x,this._sx=c,this._sy=x,v=!0)}v&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var s=this.transform;this.position.x=s.x+s.scaleX*(this.offset.x-s.displayOriginX),this.position.y=s.y+s.scaleY*(this.offset.y-s.displayOriginY),this.updateCenter()},resetFlags:function(s){s===void 0&&(s=!1);var h=this.wasTouching,f=this.touching,v=this.blocked;s?(h.none=!0,h.up=!1,h.down=!1,h.left=!1,h.right=!1):(h.none=f.none,h.up=f.up,h.down=f.down,h.left=f.left,h.right=f.right),f.none=!0,f.up=!1,f.down=!1,f.left=!1,f.right=!1,v.none=!0,v.up=!1,v.down=!1,v.left=!1,v.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(s,h){s&&this.resetFlags(),this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),s&&this.update(h)},update:function(s){if(this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves){this.world.updateMotion(this,s);var h=this.velocity.x,f=this.velocity.y;this.newVelocity.set(h*s,f*s),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(f,h),this.speed=Math.sqrt(h*h+f*f),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(a.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var s=this.position.x-this.prevFrame.x,h=this.position.y-this.prevFrame.y;if(this.moves){var f=this.deltaMax.x,v=this.deltaMax.y;f!==0&&s!==0&&(s<0&&s<-f?s=-f:s>0&&s>f&&(s=f)),v!==0&&h!==0&&(h<0&&h<-v?h=-v:h>0&&h>v&&(h=v)),this.gameObject.x+=s,this.gameObject.y+=h}s<0?this.facing=d.FACING_LEFT:s>0&&(this.facing=d.FACING_RIGHT),h<0?this.facing=d.FACING_UP:h>0&&(this.facing=d.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ()),this._tx=s,this._ty=h},setBoundsRectangle:function(s){return this.customBoundsRectangle=s||this.world.bounds,this},checkWorldBounds:function(){var s=this.position,h=this.customBoundsRectangle,f=this.world.checkCollision,v=this.worldBounce?-this.worldBounce.x:-this.bounce.x,u=this.worldBounce?-this.worldBounce.y:-this.bounce.y,c=!1;return s.xh.right&&f.right&&(s.x=h.right-this.width,this.velocity.x*=v,this.blocked.right=!0,c=!0),s.yh.bottom&&f.down&&(s.y=h.bottom-this.height,this.velocity.y*=u,this.blocked.down=!0,c=!0),c&&(this.blocked.none=!1,this.updateCenter()),c},setOffset:function(s,h){return h===void 0&&(h=s),this.offset.set(s,h),this},setSize:function(s,h,f){f===void 0&&(f=!0);var v=this.gameObject;if(!s&&v.frame&&(s=v.frame.realWidth),!h&&v.frame&&(h=v.frame.realHeight),this.sourceWidth=s,this.sourceHeight=h,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),f&&v.getCenter){var u=(v.width-s)/2,c=(v.height-h)/2;this.offset.set(u,c)}return this.isCircle=!1,this.radius=0,this},setCircle:function(s,h,f){return h===void 0&&(h=this.offset.x),f===void 0&&(f=this.offset.y),s>0?(this.isCircle=!0,this.radius=s,this.sourceWidth=s*2,this.sourceHeight=s*2,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(h,f),this.updateCenter()):this.isCircle=!1,this},reset:function(s,h){this.stop();var f=this.gameObject;f.setPosition(s,h),f.getTopLeft?f.getTopLeft(this.position):this.position.set(s,h),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=f.angle,this.preRotation=f.angle,this.updateBounds(),this.updateCenter(),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(s){return s.x=this.x,s.y=this.y,s.right=this.right,s.bottom=this.bottom,s},hitTest:function(s,h){if(!this.isCircle)return e(this,s,h);if(this.radius>0&&s>=this.left&&s<=this.right&&h>=this.top&&h<=this.bottom){var f=(this.center.x-s)*(this.center.x-s),v=(this.center.y-h)*(this.center.y-h);return f+v<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(s){var h=this.position,f=h.x+this.halfWidth,v=h.y+this.halfHeight;this.debugShowBody&&(s.lineStyle(s.defaultStrokeWidth,this.debugBodyColor),this.isCircle?s.strokeCircle(f,v,this.width/2):(this.checkCollision.up&&s.lineBetween(h.x,h.y,h.x+this.width,h.y),this.checkCollision.right&&s.lineBetween(h.x+this.width,h.y,h.x+this.width,h.y+this.height),this.checkCollision.down&&s.lineBetween(h.x,h.y+this.height,h.x+this.width,h.y+this.height),this.checkCollision.left&&s.lineBetween(h.x,h.y,h.x,h.y+this.height))),this.debugShowVelocity&&(s.lineStyle(s.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),s.lineBetween(f,v,f+this.velocity.x/2,v+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(s,h,f,v){s===void 0&&(s=!0),this.collideWorldBounds=s;var u=h!==void 0,c=f!==void 0;return(u||c)&&(this.worldBounce||(this.worldBounce=new i),u&&(this.worldBounce.x=h),c&&(this.worldBounce.y=f)),v!==void 0&&(this.onWorldBounds=v),this},setVelocity:function(s,h){return this.velocity.set(s,h),s=this.velocity.x,h=this.velocity.y,this.speed=Math.sqrt(s*s+h*h),this},setVelocityX:function(s){this.velocity.x=s;var h=s,f=this.velocity.y;return this.speed=Math.sqrt(h*h+f*f),this},setVelocityY:function(s){this.velocity.y=s;var h=this.velocity.x,f=s;return this.speed=Math.sqrt(h*h+f*f),this},setMaxVelocity:function(s,h){return this.maxVelocity.set(s,h),this},setMaxVelocityX:function(s){return this.maxVelocity.x=s,this},setMaxVelocityY:function(s){return this.maxVelocity.y=s,this},setMaxSpeed:function(s){return this.maxSpeed=s,this},setBounce:function(s,h){return this.bounce.set(s,h),this},setBounceX:function(s){return this.bounce.x=s,this},setBounceY:function(s){return this.bounce.y=s,this},setAcceleration:function(s,h){return this.acceleration.set(s,h),this},setAccelerationX:function(s){return this.acceleration.x=s,this},setAccelerationY:function(s){return this.acceleration.y=s,this},setAllowDrag:function(s){return s===void 0&&(s=!0),this.allowDrag=s,this},setAllowGravity:function(s){return s===void 0&&(s=!0),this.allowGravity=s,this},setAllowRotation:function(s){return s===void 0&&(s=!0),this.allowRotation=s,this},setDrag:function(s,h){return this.drag.set(s,h),this},setDamping:function(s){return this.useDamping=s,this},setDragX:function(s){return this.drag.x=s,this},setDragY:function(s){return this.drag.y=s,this},setGravity:function(s,h){return this.gravity.set(s,h),this},setGravityX:function(s){return this.gravity.x=s,this},setGravityY:function(s){return this.gravity.y=s,this},setFriction:function(s,h){return this.friction.set(s,h),this},setFrictionX:function(s){return this.friction.x=s,this},setFrictionY:function(s){return this.friction.y=s,this},setAngularVelocity:function(s){return this.angularVelocity=s,this},setAngularAcceleration:function(s){return this.angularAcceleration=s,this},setAngularDrag:function(s){return this.angularDrag=s,this},setMass:function(s){return this.mass=s,this},setImmovable:function(s){return s===void 0&&(s=!0),this.immovable=s,this},setEnable:function(s){return s===void 0&&(s=!0),this.enable=s,this},processX:function(s,h,f,v){this.x+=s,this.updateCenter(),h!==null&&(this.velocity.x=h);var u=this.blocked;f&&(u.left=!0),v&&(u.right=!0)},processY:function(s,h,f,v){this.y+=s,this.updateCenter(),h!==null&&(this.velocity.y=h);var u=this.blocked;f&&(u.up=!0),v&&(u.down=!0)},x:{get:function(){return this.position.x},set:function(s){this.position.x=s}},y:{get:function(){return this.position.y},set:function(s){this.position.y=s}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});p.exports=l},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o,r,e,i,l,s,h){this.world=o,this.name="",this.active=!0,this.overlapOnly=r,this.object1=e,this.object2=i,this.collideCallback=l,this.processCallback=s,this.callbackContext=h},setName:function(a){return this.name=a,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=t(3),a=new d,o=new d,r=function(e,i,l,s,h,f,v){var u=v.tilemapLayer.tilemap._convert.WorldToTileXY;u(e,i,!0,a,f,v);var c=a.x,x=a.y;u(e+l,i+s,!1,o,f,v);var g=Math.ceil(o.x),m=Math.ceil(o.y);return n(c,x,g-c,m-x,h,v)};p.exports=r},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.collisionCallback?!n.collisionCallback.call(n.collisionCallbackContext,d,n):n.layer.callbacks[n.index]?!n.layer.callbacks[n.index].callback.call(n.layer.callbacks[n.index].callbackContext,d,n):!0};p.exports=t},function(p,E,t){/** + * @author Vladimir Agafonkin + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(436);function d(m){if(!(this instanceof d))return new d(m);this._maxEntries=Math.max(4,m||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}d.prototype={all:function(){return this._all(this.data,[])},search:function(m){var y=this.data,T=[],S=this.toBBox;if(!c(m,y))return T;for(var C=[],P,A,M,L;y;){for(P=0,A=y.children.length;P=0&&P[y].children.length>this._maxEntries;)this._split(P,y),y--;this._adjustParentBBoxes(C,P,y)},_split:function(m,y){var T=m[y],S=T.children.length,C=this._minEntries;this._chooseSplitAxis(T,C,S);var P=this._chooseSplitIndex(T,C,S),A=x(T.children.splice(P,T.children.length-P));A.height=T.height,A.leaf=T.leaf,o(T,this.toBBox),o(A,this.toBBox),y?m[y-1].children.push(A):this._splitRoot(T,A)},_splitRoot:function(m,y){this.data=x([m,y]),this.data.height=m.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(m,y,T){var S,C,P,A,M,L,F,B;for(L=F=1/0,S=y;S<=T-y;S++)C=r(m,0,S,this.toBBox),P=r(m,S,T,this.toBBox),A=v(C,P),M=s(C)+s(P),A=y;L--)F=m.children[L],e(A,m.leaf?C(F):F),M+=h(A);return M},_adjustParentBBoxes:function(m,y,T){for(var S=T;S>=0;S--)e(y[S],m)},_condense:function(m){for(var y=m.length-1,T;y>=0;y--)m[y].children.length===0?y>0?(T=m[y-1].children,T.splice(T.indexOf(m[y]),1)):this.clear():o(m[y],this.toBBox)},compareMinX:function(m,y){return m.left-y.left},compareMinY:function(m,y){return m.top-y.top},toBBox:function(m){return{minX:m.left,minY:m.top,maxX:m.right,maxY:m.bottom}}};function a(m,y,T){if(!T)return y.indexOf(m);for(var S=0;S=m.minX&&y.maxY>=m.minY}function x(m){return{children:m,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(m,y,T,S,C){for(var P=[y,T],A;P.length;)T=P.pop(),y=P.pop(),!(T-y<=S)&&(A=y+Math.ceil((T-y)/S/2)*S,n(m,A,y,T,C),P.push(y,A,A,T))}p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(533),d=t(535),a=t(248),o=function(r,e,i,l,s,h,f){var v=l.left,u=l.top,c=l.right,x=l.bottom,g=i.faceLeft||i.faceRight,m=i.faceTop||i.faceBottom;if(f||(g=!0,m=!0),!g&&!m)return!1;var y=0,T=0,S=0,C=1;if(e.deltaAbsX()>e.deltaAbsY()?S=-1:e.deltaAbsX() + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(534),d=function(a,o,r,e,i,l){var s=0,h=o.faceLeft,f=o.faceRight,v=o.collideLeft,u=o.collideRight;return l||(h=!0,f=!0,v=!0,u=!0),a.deltaX()<0&&u&&a.checkCollision.left?f&&a.x0&&v&&a.checkCollision.right&&h&&a.right>r&&(s=a.right-r,s>i&&(s=0)),s!==0&&(a.customSeparateX?a.overlapX=s:n(a,s)),s};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){d<0?(n.blocked.none=!1,n.blocked.left=!0):d>0&&(n.blocked.none=!1,n.blocked.right=!0),n.position.x-=d,n.bounce.x===0?n.velocity.x=0:n.velocity.x=-n.velocity.x*n.bounce.x};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(536),d=function(a,o,r,e,i,l){var s=0,h=o.faceTop,f=o.faceBottom,v=o.collideUp,u=o.collideDown;return l||(h=!0,f=!0,v=!0,u=!0),a.deltaY()<0&&u&&a.checkCollision.up?f&&a.y0&&v&&a.checkCollision.down&&h&&a.bottom>r&&(s=a.bottom-r,s>i&&(s=0)),s!==0&&(a.customSeparateY?a.overlapY=s:n(a,s)),s};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){d<0?(n.blocked.none=!1,n.blocked.up=!0):d>0&&(n.blocked.none=!1,n.blocked.down=!0),n.position.y-=d,n.bounce.y===0?n.velocity.y=0:n.velocity.y=-n.velocity.y*n.bounce.y};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(246),d=t(1389),a=function(o,r,e,i){var l=n(o,r,e,i),s=o.immovable,h=r.immovable;if(e||l===0||s&&h||o.customSeparateX||r.customSeparateX)return l!==0||o.embedded&&r.embedded;var f=d.Set(o,r,l);return!s&&!h?f>0?!0:d.Check():(s?d.RunImmovableBody1(f):h&&d.RunImmovableBody2(f),!0)};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(247),d=t(1390),a=function(o,r,e,i){var l=n(o,r,e,i),s=o.immovable,h=r.immovable;if(e||l===0||s&&h||o.customSeparateY||r.customSeparateY)return l!==0||o.embedded&&r.embedded;var f=d.Set(o,r,l);return!s&&!h?f>0?!0:d.Check():(s?d.RunImmovableBody1(f):h&&d.RunImmovableBody2(f),!0)};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(66),d=t(0),a=t(62),o=t(57),r=t(3),e=new d({initialize:function(l,s){var h=s.displayWidth?s.displayWidth:64,f=s.displayHeight?s.displayHeight:64;this.world=l,this.gameObject=s,this.debugShowBody=l.defaults.debugShowStaticBody,this.debugBodyColor=l.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new r,this.position=new r(s.x-h*s.originX,s.y-f*s.originY),this.width=h,this.height=f,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new r(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=r.ZERO,this.allowGravity=!1,this.gravity=r.ZERO,this.bounce=r.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={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=a.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(i,l){return i&&i!==this.gameObject&&(this.gameObject.body=null,i.body=this,this.gameObject=i),l&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var i=this.gameObject;return i.getTopLeft(this.position),this.width=i.displayWidth,this.height=i.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(i,l){return l===void 0&&(l=i),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(i,l),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(i,l,s){s===void 0&&(s=!0);var h=this.gameObject;if(!i&&h.frame&&(i=h.frame.realWidth),!l&&h.frame&&(l=h.frame.realHeight),this.world.staticTree.remove(this),this.width=i,this.height=l,this.halfWidth=Math.floor(i/2),this.halfHeight=Math.floor(l/2),s&&h.getCenter){var f=h.displayWidth/2,v=h.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(f-this.halfWidth,v-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(i,l,s){return l===void 0&&(l=this.offset.x),s===void 0&&(s=this.offset.y),i>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=i,this.width=i*2,this.height=i*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(l,s),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(i,l){var s=this.gameObject;i===void 0&&(i=s.x),l===void 0&&(l=s.y),this.world.staticTree.remove(this),s.setPosition(i,l),s.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(i){return i.x=this.x,i.y=this.y,i.right=this.right,i.bottom=this.bottom,i},hitTest:function(i,l){return this.isCircle?n(this,i,l):o(this,i,l)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(i){var l=this.position,s=l.x+this.halfWidth,h=l.y+this.halfHeight;this.debugShowBody&&(i.lineStyle(i.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?i.strokeCircle(s,h,this.width/2):i.strokeRect(l.x,l.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(i){return i<=0&&(i=.1),this.mass=i,this},x:{get:function(){return this.position.x},set:function(i){this.world.staticTree.remove(this),this.position.x=i,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(i){this.world.staticTree.remove(this),this.position.y=i,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});p.exports=e},function(p,E,t){/** +* @author Richard Davey +* @copyright 2020 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/var n=t(0),d=new n({initialize:function(o){this.pluginManager=o,this.game=o.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(3),d=new n,a=function(o,r,e,i){var l=e.tilemapLayer,s=l.cullPaddingX,h=l.cullPaddingY,f=l.tilemap.tileToWorldXY(o,r,d,i,l);return f.x>i.worldView.x+l.scaleX*e.tileWidth*(-s-.5)&&f.xi.worldView.y+l.scaleY*e.tileHeight*(-h-1)&&f.y + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=function(a,o,r,e,i,l,s){for(var h=n(r,e,i,l,null,s),f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10),d=t(139),a=t(76),o=new n,r=function(e,i){var l=e.tilemapLayer.tilemap,s=e.tilemapLayer,h=Math.floor(l.tileWidth*s.scaleX),f=Math.floor(l.tileHeight*s.scaleY),v=a(i.worldView.x-s.x,h,0,!0)-s.cullPaddingX,u=d(i.worldView.right-s.x,h,0,!0)+s.cullPaddingX,c=a(i.worldView.y-s.y,f,0,!0)-s.cullPaddingY,x=d(i.worldView.bottom-s.y,f,0,!0)+s.cullPaddingY;return o.setTo(v,c,u-v,x-c)};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(543),d=t(159),a=function(o,r,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var l=o.tilemapLayer,s=n(o,r);return(l.skipCull||l.scrollFactorX!==1||l.scrollFactorY!==1)&&(s.left=0,s.right=o.width,s.top=0,s.bottom=o.height),d(o,s,i,e),e};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(546),d=t(159),a=function(o,r,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var l=o.tilemapLayer;if(!l.skipCull&&l.scrollFactorX===1&&l.scrollFactorY===1){var s=n(o,r);d(o,s,i,e)}return e};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(139),d=t(76),a=function(o,r){var e=o.tilemapLayer.tilemap,i=o.tilemapLayer,l=Math.floor(e.tileWidth*i.scaleX),s=Math.floor(e.tileHeight*i.scaleY),h=o.hexSideLength,f=(s-h)/2+h,v=d(r.worldView.x-i.x,l,0,!0)-i.cullPaddingX,u=n(r.worldView.right-i.x,l,0,!0)+i.cullPaddingX,c=d(r.worldView.y-i.y,f,0,!0)-i.cullPaddingY,x=n(r.worldView.bottom-i.y,f,0,!0)+i.cullPaddingY;return{left:v,right:u,top:c,bottom:x}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(541),d=function(a,o,r,e){r===void 0&&(r=[]),e===void 0&&(e=0),r.length=0;var i=a.tilemapLayer,l=a.data,s=a.width,h=a.height,f=0,v=s,u=0,c=h;if(!i.skipCull){var x,g,m;if(e===0){for(g=u;g=f;x--)if(n(x,g,a,o)){if(m=l[g][x],!m||m.index===-1||!m.visible||m.alpha===0)continue;r.push(m)}}else if(e===2){for(g=c;g>=u;g--)for(x=f;l[g]&&x=u;g--)for(x=v;l[g]&&x>=f;x--)if(n(x,g,a,o)){if(m=l[g][x],!m||m.index===-1||!m.visible||m.alpha===0)continue;r.push(m)}}}return i.tilesDrawn=r.length,i.tilesTotal=s*h,r};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(549),d=t(159),a=function(o,r,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var l=o.tilemapLayer;if(!l.skipCull&&l.scrollFactorX===1&&l.scrollFactorY===1){var s=n(o,r);d(o,s,i,e)}return e};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(139),d=t(76),a=function(o,r){var e=o.tilemapLayer.tilemap,i=o.tilemapLayer,l=Math.floor(e.tileWidth*i.scaleX),s=Math.floor(e.tileHeight*i.scaleY),h=d(r.worldView.x-i.x,l,0,!0)-i.cullPaddingX,f=n(r.worldView.right-i.x,l,0,!0)+i.cullPaddingX,v=d(r.worldView.y-i.y,s/2,0,!0)-i.cullPaddingY,u=n(r.worldView.bottom-i.y,s/2,0,!0)+i.cullPaddingY;return{left:h,right:f,top:v,bottom:u}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(3),d=function(a,o,r,e,i){r||(r=new n);var l=i.baseTileWidth,s=i.baseTileHeight,h=i.tilemapLayer,f=0,v=0;h&&(e||(e=h.scene.cameras.main),f=h.x+e.scrollX*(1-h.scrollFactorX),l*=h.scaleX,v=h.y+e.scrollY*(1-h.scrollFactorY),s*=h.scaleY);var u=i.hexSideLength,c=(s-u)/2+u,x=f+a*l+o%2*(l/2),g=v+o*c;return r.set(x,g)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(3),d=function(a,o,r,e,i){r||(r=new n);var l=i.baseTileWidth,s=i.baseTileHeight,h=i.tilemapLayer,f=0,v=0;h&&(e||(e=h.scene.cameras.main),f=h.x+e.scrollX*(1-h.scrollFactorX),l*=h.scaleX,v=h.y+e.scrollY*(1-h.scrollFactorY),s*=h.scaleY);var u=f+(a-o)*(l/2),c=v+(a+o)*(s/2);return r.set(u,c)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(3),d=function(a,o,r,e,i){r||(r=new n);var l=i.baseTileWidth,s=i.baseTileHeight,h=i.tilemapLayer,f=0,v=0;h&&(e||(e=h.scene.cameras.main),f=h.x+e.scrollX*(1-h.scrollFactorX),l*=h.scaleX,v=h.y+e.scrollY*(1-h.scrollFactorY),s*=h.scaleY);var u=f+a*l+o%2*(l/2),c=v+o*(s/2);return r.set(u,c)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(253),d=t(254),a=t(3),o=function(r,e,i,l,s){return i||(i=new a(0,0)),i.x=n(r,l,s),i.y=d(e,l,s),i};p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=a.baseTileHeight,r=a.tilemapLayer,e=0;r&&(d===void 0&&(d=r.scene.cameras.main),e=r.y+d.scrollY*(1-r.scrollFactorY),o*=r.scaleY);var i=r.tilemap.hexSideLength,l=(o-i)/2+i;return e+n*l};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=a.baseTileHeight,r=a.tilemapLayer,e=0;return r&&(d===void 0&&(d=r.scene.cameras.main),e=r.y+d.scrollY*(1-r.scrollFactorY),o*=r.scaleY),e+n*(o/2)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(3),d=function(a,o,r,e,i,l){e||(e=new n);var s=l.baseTileWidth,h=l.baseTileHeight,f=l.tilemapLayer;f&&(i||(i=f.scene.cameras.main),o=o-(f.y+i.scrollY*(1-f.scrollFactorY)),h*=f.scaleY,a=a-(f.x+i.scrollX*(1-f.scrollFactorX)),s*=f.scaleX);var v=l.hexSideLength,u=(h-v)/2+v,c=r?Math.floor(o/u):o/u,x=r?Math.floor((a-c%2*.5*s)/s):(a-c%2*.5*s)/s;return e.set(x,c)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(3),d=function(a,o,r,e,i,l){e||(e=new n);var s=l.baseTileWidth,h=l.baseTileHeight,f=l.tilemapLayer;f&&(i||(i=f.scene.cameras.main),o=o-(f.y+i.scrollY*(1-f.scrollFactorY)),h*=f.scaleY,a=a-(f.x+i.scrollX*(1-f.scrollFactorX)),s*=f.scaleX);var v=r?Math.floor((a/(s/2)+o/(h/2))/2):(a/(s/2)+o/(h/2))/2,u=r?Math.floor((o/(h/2)-a/(s/2))/2):(o/(h/2)-a/(s/2))/2;return e.set(v,u)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(3),d=function(a,o,r,e,i,l){e||(e=new n);var s=l.baseTileWidth,h=l.baseTileHeight,f=l.tilemapLayer;f&&(i||(i=f.scene.cameras.main),o=o-(f.y+i.scrollY*(1-f.scrollFactorY)),h*=f.scaleY,a=a-(f.x+i.scrollX*(1-f.scrollFactorX)),s*=f.scaleX);var v=r?Math.floor(o/(h/2)):o/(h/2),u=r?Math.floor((a+v%2*.5*s)/s):(a+v%2*.5*s)/s;return e.set(u,v)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(255),d=t(256),a=t(3),o=function(r,e,i,l,s,h){return i===void 0&&(i=!0),l||(l=new a(0,0)),l.x=n(r,i,s,h),l.y=d(e,i,s,h),l};p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=o.baseTileHeight,e=o.tilemapLayer;e&&(a||(a=e.scene.cameras.main),n=n-(e.y+a.scrollY*(1-e.scrollFactorY)),r*=e.scaleY);var i=o.hexSideLength,l=(r-i)/2+i;return d?Math.floor(n/l):n/l};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=o.baseTileHeight,e=o.tilemapLayer;return e&&(a||(a=e.scene.cameras.main),n=n-(e.y+a.scrollY*(1-e.scrollFactorY)),r*=e.scaleY),d?Math.floor(n/(r/2)):n/(r/2)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(119),d=function(a,o,r){if(n(a,o,r)){var e=r.data[o][a];return e!==null&&e.index>-1}else return!1};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(85),d=t(119),a=t(252),o=function(r,e,i,l,s){if(i===void 0&&(i=!0),l===void 0&&(l=!0),!d(r,e,s))return null;var h=s.data[e][r];if(h)s.data[e][r]=i?null:new n(s,-1,r,e,s.tileWidth,s.tileHeight);else return null;return l&&h&&h.collides&&a(r,e,s),h};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(40),d=t(259),a=t(565),o=t(566),r=t(577),e=function(i,l,s,h,f,v){var u;switch(l){case n.ARRAY_2D:u=d(i,s,h,f,v);break;case n.CSV:u=a(i,s,h,f,v);break;case n.TILED_JSON:u=o(i,s,v);break;case n.WELTMEISTER:u=r(i,s,v);break;default:console.warn("Unrecognized tilemap data format: "+l),u=null}return u};p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(40),d=t(259),a=function(o,r,e,i,l){var s=r.trim().split(` +`).map(function(f){return f.split(",")}),h=d(o,s,e,i,l);return h.format=n.CSV,h};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(567),d=t(568),a=t(29),o=t(40),r=t(258),e=t(121),i=t(569),l=t(570),s=t(573),h=t(575),f=function(v,u,c){var x=new e({width:u.width,height:u.height,name:v,tileWidth:u.tilewidth,tileHeight:u.tileheight,orientation:r(u.orientation),format:o.TILED_JSON,version:u.version,properties:u.properties,renderOrder:u.renderorder,infinite:u.infinite});x.orientation===a.HEXAGONAL&&(x.hexSideLength=u.hexsidelength),x.layers=s(u,c),x.images=i(u);var g=h(u);return x.tilesets=g.tilesets,x.imageCollections=g.imageCollections,x.objects=l(u),x.tiles=d(x),n(x),x};p.exports=f},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(17),d=function(a){for(var o,r,e,i,l,s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(122),d=function(a){var o,r,e=[];for(o=0;o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(2),d=t(161),a=function(o){for(var r=[],e=[],i=d(o);i.i0;){if(i.i>=i.layers.length){if(e.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=e.pop();continue}var l=i.layers[i.i];if(i.i++,l.type!=="imagelayer"){if(l.type==="group"){var s=d(o,l,i);e.push(i),i=s}continue}var h=n(l,"offsetx",0)+n(l,"startx",0),f=n(l,"offsety",0)+n(l,"starty",0);r.push({name:i.name+l.name,image:l.image,x:i.x+h+l.x,y:i.y+f+l.y,alpha:i.opacity*l.opacity,visible:i.visible&&l.visible,properties:n(l,"properties",{})})}return r};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(2),d=t(260),a=t(572),o=t(161),r=function(e){for(var i=[],l=[],s=o(e);s.i0;){if(s.i>=s.layers.length){if(l.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=l.pop();continue}var h=s.layers[s.i];if(s.i++,h.opacity*=s.opacity,h.visible=s.visible&&h.visible,h.type!=="objectgroup"){if(h.type==="group"){var f=o(e,h,s);l.push(s),s=f}continue}h.name=s.name+h.name;for(var v=s.x+n(h,"startx",0)+n(h,"offsetx",0),u=s.y+n(h,"starty",0)+n(h,"offsety",0),c=[],x=0;x + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(126),d=function(a,o){for(var r={},e=0;e + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(2),a=new n({initialize:function(r){r===void 0&&(r={}),this.name=d(r,"name","object layer"),this.opacity=d(r,"opacity",1),this.properties=d(r,"properties",{}),this.propertyTypes=d(r,"propertytypes",{}),this.type=d(r,"type","objectgroup"),this.visible=d(r,"visible",!0),this.objects=d(r,"objects",[])}});p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(574),d=t(29),a=t(161),o=t(258),r=t(2),e=t(120),i=t(261),l=t(85),s=function(h,f){for(var v=r(h,"infinite",!1),u=[],c=[],x=a(h);x.i0;){if(x.i>=x.layers.length){if(c.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}x=c.pop();continue}var g=x.layers[x.i];if(x.i++,g.type!=="tilelayer"){if(g.type==="group"){var m=a(h,g,x);c.push(x),x=m}continue}if(g.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+g.name+"'");continue}else if(g.encoding&&g.encoding==="base64"){if(g.chunks)for(var y=0;y0?(C=new l(T,S.gid,D,G,h.tilewidth,h.tileheight),C.rotation=S.rotation,C.flipX=S.flipped,A[G][D]=C):(P=f?null:new l(T,-1,D,G,h.tilewidth,h.tileheight),A[G][D]=P),M++,M===X.width&&(O++,M=0)}}else{T=new e({name:x.name+g.name,x:x.x+r(g,"offsetx",0)+g.x,y:x.y+r(g,"offsety",0)+g.y,width:g.width,height:g.height,tileWidth:h.tilewidth,tileHeight:h.tileheight,alpha:x.opacity*g.opacity,visible:x.visible&&g.visible,properties:r(g,"properties",[]),orientation:o(h.orientation)}),T.orientation===d.HEXAGONAL&&(T.hexSideLength=h.hexsidelength);for(var U=[],Y=0,z=g.data.length;Y0?(C=new l(T,S.gid,M,A.length,h.tilewidth,h.tileheight),C.rotation=S.rotation,C.flipX=S.flipped,U.push(C)):(P=f?null:new l(T,-1,M,A.length,h.tilewidth,h.tileheight),U.push(P)),M++,M===g.width&&(A.push(U),M=0,U=[])}T.data=A,u.push(T)}return u};p.exports=s},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){for(var d=window.atob(n),a=d.length,o=new Array(a/4),r=0;r>>0;return o};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(122),d=t(576),a=t(260),o=t(1453),r=function(e){for(var i=[],l=[],s=null,h,f=0;f1){var c=void 0,x=void 0;if(Array.isArray(v.tiles)){c=c||{},x=x||{};for(var g=0;g + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o,r,e,i,l,s,h){(e===void 0||e<=0)&&(e=32),(i===void 0||i<=0)&&(i=32),l===void 0&&(l=0),s===void 0&&(s=0),this.name=o,this.firstgid=r|0,this.imageWidth=e|0,this.imageHeight=i|0,this.imageMargin=l|0,this.imageSpacing=s|0,this.properties=h||{},this.images=[],this.total=0},containsImageIndex:function(a){return a>=this.firstgid&&a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(40),d=t(121),a=t(578),o=t(579),r=function(e,i,l){if(i.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var s=0,h=0,f=0;fs&&(s=i.layer[f].width),i.layer[f].height>h&&(h=i.layer[f].height);var v=new d({width:s,height:h,name:e,tileWidth:i.layer[0].tilesize,tileHeight:i.layer[0].tilesize,format:n.WELTMEISTER});return v.layers=a(i,l),v.tilesets=o(i),v};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(120),d=t(85),a=function(o,r){for(var e=[],i=0;i-1?x=new d(s,c,u,v,l.tilesize,l.tilesize):x=r?null:new d(s,-1,u,v,l.tilesize,l.tilesize),h.push(x)}f.push(h),h=[]}s.data=f,e.push(s)}return e};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(122),d=function(a){for(var o=[],r=[],e=0;e + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(36),a=t(40),o=t(2),r=t(120),e=t(29),i=t(362),l=t(74),s=t(73),h=t(85),f=t(251),v=t(581),u=t(122),c=new n({initialize:function(g,m){this.scene=g,this.tileWidth=m.tileWidth,this.tileHeight=m.tileHeight,this.width=m.width,this.height=m.height,this.orientation=m.orientation,this.renderOrder=m.renderOrder,this.format=m.format,this.version=m.version,this.properties=m.properties,this.widthInPixels=m.widthInPixels,this.heightInPixels=m.heightInPixels,this.imageCollections=m.imageCollections,this.images=m.images,this.layers=m.layers,this.tilesets=m.tilesets,this.objects=m.objects,this.currentLayerIndex=0,this.hexSideLength=m.hexSideLength;var y=this.orientation;this._convert={WorldToTileXY:f.GetWorldToTileXYFunction(y),WorldToTileX:f.GetWorldToTileXFunction(y),WorldToTileY:f.GetWorldToTileYFunction(y),TileToWorldXY:f.GetTileToWorldXYFunction(y),TileToWorldX:f.GetTileToWorldXFunction(y),TileToWorldY:f.GetTileToWorldYFunction(y)}},createBlankDynamicLayer:function(x,g,m,y,T,S,C,P){return console.warn("createBlankDynamicLayer is deprecated. Use createBlankLayer"),this.createBlankLayer(x,g,m,y,T,S,C,P)},createDynamicLayer:function(x,g,m,y){return console.warn("createDynamicLayer is deprecated. Use createLayer"),this.createLayer(x,g,m,y)},createStaticLayer:function(x,g,m,y){return console.warn("createStaticLayer is deprecated. Use createLayer"),this.createLayer(x,g,m,y)},setRenderOrder:function(x){var g=["right-down","left-down","right-up","left-up"];return typeof x=="number"&&(x=g[x]),g.indexOf(x)>-1&&(this.renderOrder=x),this},addTilesetImage:function(x,g,m,y,T,S,C){if(x===void 0)return null;if(g==null&&(g=x),!this.scene.sys.textures.exists(g))return console.warn("Invalid Tileset Image: "+g),null;var P=this.scene.sys.textures.get(g),A=this.getTilesetIndex(x);if(A===null&&this.format===a.TILED_JSON)return console.warn("No data found for Tileset: "+x),null;var M=this.tilesets[A];return M?(M.setTileSize(m,y),M.setSpacing(T,S),M.setImage(P),M):(m===void 0&&(m=this.tileWidth),y===void 0&&(y=this.tileHeight),T===void 0&&(T=0),S===void 0&&(S=0),C===void 0&&(C=0),M=new u(x,C,m,y,T,S),M.setImage(P),this.tilesets.push(M),M)},copy:function(x,g,m,y,T,S,C,P){return P=this.getLayer(P),P!==null?(f.Copy(x,g,m,y,T,S,C,P),this):null},createBlankLayer:function(x,g,m,y,T,S,C,P){m===void 0&&(m=0),y===void 0&&(y=0),T===void 0&&(T=this.width),S===void 0&&(S=this.height),C===void 0&&(C=this.tileWidth),P===void 0&&(P=this.tileHeight);var A=this.getLayerIndex(x);if(A!==null)return console.warn("Invalid Tilemap Layer ID: "+x),null;for(var M=new r({name:x,tileWidth:C,tileHeight:P,width:T,height:S,orientation:this.orientation}),L,F=0;F-1&&this.putTileAt(g,S.x,S.y,m,S.tilemapLayer)}return y},removeTileAt:function(x,g,m,y,T){return m===void 0&&(m=!0),y===void 0&&(y=!0),T=this.getLayer(T),T===null?null:f.RemoveTileAt(x,g,m,y,T)},removeTileAtWorldXY:function(x,g,m,y,T,S){return m===void 0&&(m=!0),y===void 0&&(y=!0),S=this.getLayer(S),S===null?null:f.RemoveTileAtWorldXY(x,g,m,y,T,S)},renderDebug:function(x,g,m){return m=this.getLayer(m),m===null?null:(this.orientation===e.ORTHOGONAL&&f.RenderDebug(x,g,m),this)},renderDebugFull:function(x,g){for(var m=this.layers,y=0;y + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(11),a=t(15),o=t(251),r=t(1456),e=new n({Extends:a,Mixins:[d.Alpha,d.BlendMode,d.ComputedSize,d.Depth,d.Flip,d.GetBounds,d.Origin,d.Pipeline,d.Transform,d.Visible,d.ScrollFactor,r],initialize:function(l,s,h,f,v,u){a.call(this,l,"TilemapLayer"),this.isTilemap=!0,this.tilemap=s,this.layerIndex=h,this.layer=s.layers[h],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=o.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.setTilesets(f),this.setAlpha(this.layer.alpha),this.setPosition(v,u),this.setOrigin(),this.setSize(s.tileWidth*this.layer.width,s.tileHeight*this.layer.height),this.initPipeline()},setTilesets:function(i){var l=[],s=[],h=this.tilemap;Array.isArray(i)||(i=[i]);for(var f=0;f=0&&i<4&&(this._renderOrder=i),this},calculateFacesAt:function(i,l){return o.CalculateFacesAt(i,l,this.layer),this},calculateFacesWithin:function(i,l,s,h){return o.CalculateFacesWithin(i,l,s,h,this.layer),this},createFromTiles:function(i,l,s,h,f){return o.CreateFromTiles(i,l,s,h,f,this.layer)},cull:function(i){return this.cullCallback(this.layer,i,this.culledTiles,this._renderOrder)},copy:function(i,l,s,h,f,v,u){return o.Copy(i,l,s,h,f,v,u,this.layer),this},fill:function(i,l,s,h,f,v){return o.Fill(i,l,s,h,f,v,this.layer),this},filterTiles:function(i,l,s,h,f,v,u){return o.FilterTiles(i,l,s,h,f,v,u,this.layer)},findByIndex:function(i,l,s){return o.FindByIndex(i,l,s,this.layer)},findTile:function(i,l,s,h,f,v,u){return o.FindTile(i,l,s,h,f,v,u,this.layer)},forEachTile:function(i,l,s,h,f,v,u){return o.ForEachTile(i,l,s,h,f,v,u,this.layer),this},getTileAt:function(i,l,s){return o.GetTileAt(i,l,s,this.layer)},getTileAtWorldXY:function(i,l,s,h){return o.GetTileAtWorldXY(i,l,s,h,this.layer)},getTilesWithin:function(i,l,s,h,f){return o.GetTilesWithin(i,l,s,h,f,this.layer)},getTilesWithinShape:function(i,l,s){return o.GetTilesWithinShape(i,l,s,this.layer)},getTilesWithinWorldXY:function(i,l,s,h,f,v){return o.GetTilesWithinWorldXY(i,l,s,h,f,v,this.layer)},hasTileAt:function(i,l){return o.HasTileAt(i,l,this.layer)},hasTileAtWorldXY:function(i,l,s){return o.HasTileAtWorldXY(i,l,s,this.layer)},putTileAt:function(i,l,s,h){return o.PutTileAt(i,l,s,h,this.layer)},putTileAtWorldXY:function(i,l,s,h,f){return o.PutTileAtWorldXY(i,l,s,h,f,this.layer)},putTilesAt:function(i,l,s,h){return o.PutTilesAt(i,l,s,h,this.layer),this},randomize:function(i,l,s,h,f){return o.Randomize(i,l,s,h,f,this.layer),this},removeTileAt:function(i,l,s,h){return o.RemoveTileAt(i,l,s,h,this.layer)},removeTileAtWorldXY:function(i,l,s,h,f){return o.RemoveTileAtWorldXY(i,l,s,h,f,this.layer)},renderDebug:function(i,l){return o.RenderDebug(i,l,this.layer),this},replaceByIndex:function(i,l,s,h,f,v){return o.ReplaceByIndex(i,l,s,h,f,v,this.layer),this},setSkipCull:function(i){return i===void 0&&(i=!0),this.skipCull=i,this},setCullPadding:function(i,l){return i===void 0&&(i=1),l===void 0&&(l=1),this.cullPaddingX=i,this.cullPaddingY=l,this},setCollision:function(i,l,s,h){return o.SetCollision(i,l,s,this.layer,h),this},setCollisionBetween:function(i,l,s,h){return o.SetCollisionBetween(i,l,s,h,this.layer),this},setCollisionByProperty:function(i,l,s){return o.SetCollisionByProperty(i,l,s,this.layer),this},setCollisionByExclusion:function(i,l,s){return o.SetCollisionByExclusion(i,l,s,this.layer),this},setCollisionFromCollisionGroup:function(i,l){return o.SetCollisionFromCollisionGroup(i,l,this.layer),this},setTileIndexCallback:function(i,l,s){return o.SetTileIndexCallback(i,l,s,this.layer),this},setTileLocationCallback:function(i,l,s,h,f,v){return o.SetTileLocationCallback(i,l,s,h,f,v,this.layer),this},shuffle:function(i,l,s,h){return o.Shuffle(i,l,s,h,this.layer),this},swapByIndex:function(i,l,s,h,f,v){return o.SwapByIndex(i,l,s,h,f,v,this.layer),this},tileToWorldX:function(i,l){return this.tilemap.tileToWorldX(i,l,this)},tileToWorldY:function(i,l){return this.tilemap.tileToWorldY(i,l,this)},tileToWorldXY:function(i,l,s,h){return this.tilemap.tileToWorldXY(i,l,s,h,this)},weightedRandomize:function(i,l,s,h,f){return o.WeightedRandomize(l,s,h,f,i,this.layer),this},worldToTileX:function(i,l,s){return this.tilemap.worldToTileX(i,l,s,this)},worldToTileY:function(i,l,s){return this.tilemap.worldToTileY(i,l,s,this)},worldToTileXY:function(i,l,s,h,f){return this.tilemap.worldToTileXY(i,l,s,h,f,this)},destroy:function(i){i===void 0&&(i=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),i&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],a.prototype.destroy.call(this))}});p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(2),a=new n({initialize:function(r){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(r)},reset:function(o){return this.delay=d(o,"delay",0),this.repeat=d(o,"repeat",0),this.loop=d(o,"loop",!1),this.callback=d(o,"callback",void 0),this.callbackScope=d(o,"callbackScope",this.callback),this.args=d(o,"args",[]),this.timeScale=d(o,"timeScale",1),this.startAt=d(o,"startAt",0),this.paused=d(o,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=this.repeat===-1||this.loop?999999999999:this.repeat,this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var o=this.delay+this.delay*this.repeat,r=this.elapsed+this.delay*(this.repeat-this.repeatCount);return r/o}else return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return this.elapsed*.001},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return this.getRemaining()*.001},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return this.getOverallRemaining()*.001},remove:function(o){o===void 0&&(o=!1),this.elapsed=this.delay,this.hasDispatched=!o,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1465),d=function(a){var o,r=[];if(a.hasOwnProperty("props"))for(o in a.props)o.substr(0,1)!=="_"&&r.push({key:o,value:a.props[o]});else for(o in a)n.indexOf(o)===-1&&o.substr(0,1)!=="_"&&r.push({key:o,value:a[o]});return r};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(6),d=function(a){var o=n(a,"tweens",null);return o===null?[]:(typeof o=="function"&&(o=o.call()),Array.isArray(o)||(o=[o]),o)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(265),d=t(13),a=t(99),o=t(80),r=t(162),e=t(6),i=t(264),l=t(266),s=t(268),h=function(f,v,u){u===void 0&&(u=n);var c=e(v,"from",0),x=e(v,"to",1),g=[{value:c}],m=r(v,"delay",u.delay),y=r(v,"duration",u.duration),T=e(v,"easeParams",u.easeParams),S=o(e(v,"ease",u.ease),T),C=r(v,"hold",u.hold),P=r(v,"repeat",u.repeat),A=r(v,"repeatDelay",u.repeatDelay),M=a(v,"yoyo",u.yoyo),L=[],F=i("value",x),B=s(g[0],0,"value",F.getEnd,F.getStart,F.getActive,S,m,y,M,C,P,A,!1,!1);B.start=c,B.current=c,B.to=x,L.push(B);var N=new l(f,L,g);N.offset=d(v,"offset",null),N.completeDelay=d(v,"completeDelay",0),N.loop=Math.round(d(v,"loop",0)),N.loopDelay=Math.round(d(v,"loopDelay",0)),N.paused=a(v,"paused",!1),N.useFrames=a(v,"useFrames",!1);for(var X=e(v,"callbackScope",N),V=[N,null],W=l.TYPES,O=0;O + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(80),d=t(6),a=t(14),o=function(r,e){e===void 0&&(e={});var i,l=d(e,"start",0),s=d(e,"ease",null),h=d(e,"grid",null),f=d(e,"from",0),v=f==="first",u=f==="center",c=f==="last",x=typeof f=="number",g=Array.isArray(r),m=parseFloat(g?r[0]:r),y=g?parseFloat(r[1]):0,T=Math.max(m,y);if(g&&(l+=m),h){var S=h[0],C=h[1],P=0,A=0,M=0,L=0,F=[];c?(P=S-1,A=C-1):x?(P=f%S,A=Math.floor(f/S)):u&&(P=(S-1)/2,A=(C-1)/2);for(var B=a.MIN_SAFE_INTEGER,N=0;NB&&(B=V),F[N][X]=V}}}var W=s?n(s):null;return h?i=function(O,R,I,D){var G=0,U=D%S,Y=Math.floor(D/S);U>=0&&U=0&&Y + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(77),d=t(265),a=t(13),o=t(99),r=t(80),e=t(162),i=t(263),l=t(584),s=t(6),h=t(588),f=t(163),v=function(u,c){var x=new h(u);x.completeDelay=a(c,"completeDelay",0),x.loop=Math.round(a(c,"loop",0)),x.loopDelay=Math.round(a(c,"loopDelay",0)),x.paused=o(c,"paused",!1),x.useFrames=o(c,"useFrames",!1);var g=s(c,"callbackScope",x),m=[x],y=s(c,"onStart",!1);if(y){var T=s(c,"onStartScope",g),S=s(c,"onStartParams",[]);x.setCallback("onStart",y,m.concat(S),T)}var C=s(c,"onUpdate",!1);if(C){var P=s(c,"onUpdateScope",g),A=s(c,"onUpdateParams",[]);x.setCallback("onUpdate",C,m.concat(A),P)}var M=s(c,"onLoop",!1);if(M){var L=s(c,"onLoopScope",g),F=s(c,"onLoopParams",[]);x.setCallback("onLoop",M,m.concat(F),L)}var B=s(c,"onYoyo",!1);if(B){var N=s(c,"onYoyoScope",g),X=s(c,"onYoyoParams",[]);x.setCallback("onYoyo",B,m.concat(null,X),N)}var V=s(c,"onComplete",!1);if(V){var W=s(c,"onCompleteScope",g),O=s(c,"onCompleteParams",[]);x.setCallback("onComplete",V,m.concat(O),W)}var R=l(c);if(R.length===0)return x.paused=!0,x;var I=n(d);I.targets=i(c);var D=a(c,"totalDuration",0);D>0?I.duration=Math.floor(D/R.length):I.duration=e(c,"duration",I.duration),I.delay=e(c,"delay",I.delay),I.easeParams=s(c,"easeParams",I.easeParams),I.ease=r(s(c,"ease",I.ease),I.easeParams),I.hold=e(c,"hold",I.hold),I.repeat=e(c,"repeat",I.repeat),I.repeatDelay=e(c,"repeatDelay",I.repeatDelay),I.yoyo=o(c,"yoyo",I.yoyo),I.flipX=o(c,"flipX",I.flipX),I.flipY=o(c,"flipY",I.flipY);for(var G=0;G + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(9),a=t(267),o=t(163),r=t(100),e=new n({Extends:d,initialize:function(l){d.call(this),this.manager=l,this.isTimeline=!0,this.data=[],this.totalData=0,this.useFrames=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=r.PENDING_ADD,this._pausedState=r.PENDING_ADD,this.paused=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0,this.callbacks={onComplete:null,onLoop:null,onStart:null,onUpdate:null,onYoyo:null},this.callbackScope},dispatchTimelineEvent:function(i,l){this.emit(i,this),l&&l.func.apply(l.scope,l.params)},setTimeScale:function(i){return this.timeScale=i,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return this.state===r.ACTIVE},add:function(i){return this.queue(o(this,i))},queue:function(i){return this.isPlaying()||(i.parent=this,i.parentIsTimeline=!0,this.data.push(i),this.totalData=this.data.length),this},hasOffset:function(i){return i.offset!==null},isOffsetAbsolute:function(i){return typeof i=="number"},isOffsetRelative:function(i){var l=typeof i;if(l==="string"){var s=i[0];if(s==="-"||s==="+")return!0}return!1},getRelativeOffset:function(i,l){var s=i[0],h=parseFloat(i.substr(2)),f=l;switch(s){case"+":f+=h;break;case"-":f-=h;break}return Math.max(0,f)},calcDuration:function(){for(var i=0,l=0,s=0,h=0;h0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,this.paused?(this.state=r.PAUSED,!1):!0},resetTweens:function(i){for(var l=0;l0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=r.LOOP_DELAY):(this.state=r.ACTIVE,this.dispatchTimelineEvent(a.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=r.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=r.PENDING_REMOVE,this.dispatchTimelineEvent(a.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(i,l){if(this.state!==r.PAUSED){switch(this.useFrames&&(l=1*this.manager.timeScale),l*=this.timeScale,this.elapsed+=l,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=l,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case r.ACTIVE:for(var s=this.totalData,h=0;h + * @author Richard Davey + * @copyright 2018 CodeAndWeb GmbH + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(86),d=t(41),a=t(32),o=t(2),r=t(64),e={parseBody:function(i,l,s,h){h===void 0&&(h={});for(var f=o(s,"fixtures",[]),v=[],u=0;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(86),d=t(41),a={parseBody:function(o,r,e,i){i===void 0&&(i={});var l,s=e.vertices;if(s.length===1)i.vertices=s[0],l=d.create(i),n.flagCoincidentParts(l.parts);else{for(var h=[],f=0;fS&&(S=A),r.translate(P,{x:M*.5,y:A*.5}),x=P.bounds.max.x+f,d.addBody(c,P),m=P,y+=1}else x+=f}g+=S+v,x=i}return c},n.chain=function(i,l,s,h,f,v){for(var u=i.bodies,c=1;c0)for(c=0;c0&&(m=v[c-1+(u-1)*l],d.addConstraint(i,a.create(o.extend({bodyA:m,bodyB:g},f)))),h&&cS)){m=S-m;var P=m,A=s-1-m;if(!(gA)){T===1&&r.translate(y,{x:(g+(s%2===1?1:-1))*C,y:0});var M=y?g*C:0;return u(i+M+g*f,x,g,m,y,T)}}})},n.newtonsCradle=function(i,l,s,h,f){for(var v=d.create({label:"Newtons Cradle"}),u=0;u1;if(!u||A!=u.x||M!=u.y){u&&F?(g=u.x,m=u.y):(g=0,m=0);var B={x:g+A,y:m+M};(F||!u)&&(u=B),x.push(B),T=g+A,S=m+M}},P=function(A){var M=A.pathSegTypeAsLetter.toUpperCase();if(M!=="Z"){switch(M){case"M":case"L":case"T":case"C":case"S":case"Q":T=A.x,S=A.y;break;case"H":T=A.x;break;case"V":S=A.y;break}C(T,S,A.pathSegType)}};for(n._svgPathToAbsolute(a),i=a.getTotalLength(),h=[],r=0;r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(86),d=t(41),a=t(0),o=t(249),r=t(9),e=t(2),i=t(126),l=t(64),s=new a({Extends:r,Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.Static],initialize:function(f,v,u){r.call(this),this.tile=v,this.world=f,v.physics.matterBody&&v.physics.matterBody.destroy(),v.physics.matterBody=this;var c=e(u,"body",null),x=e(u,"addToWorld",!0);if(c)this.setBody(c,x);else{var g=v.getCollisionGroup(),m=e(g,"objects",[]);m.length>0?this.setFromTileCollision(u):this.setFromTileRectangle(u)}},setFromTileRectangle:function(h){h===void 0&&(h={}),i(h,"isStatic")||(h.isStatic=!0),i(h,"addToWorld")||(h.addToWorld=!0);var f=this.tile.getBounds(),v=f.x+f.width/2,u=f.y+f.height/2,c=n.rectangle(v,u,f.width,f.height,h);return this.setBody(c,h.addToWorld),this},setFromTileCollision:function(h){h===void 0&&(h={}),i(h,"isStatic")||(h.isStatic=!0),i(h,"addToWorld")||(h.addToWorld=!0);for(var f=this.tile.tilemapLayer.scaleX,v=this.tile.tilemapLayer.scaleY,u=this.tile.getLeft(),c=this.tile.getTop(),x=this.tile.getCollisionGroup(),g=e(x,"objects",[]),m=[],y=0;y1&&(h.parts=m,this.setBody(d.create(h),h.addToWorld)),this},setBody:function(h,f){return f===void 0&&(f=!0),this.body&&this.removeBody(),this.body=h,this.body.gameObject=this,f&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});p.exports=s},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1399);n.Body=t(41),n.Composite=t(118),n.World=t(596),n.Detector=t(273),n.Grid=t(597),n.Pairs=t(598),n.Pair=t(250),n.Query=t(1400),n.Resolver=t(599),n.SAT=t(274),n.Constraint=t(128),n.Common=t(32),n.Engine=t(1401),n.Events=t(166),n.Sleeping=t(165),n.Plugin=t(595),n.Bodies=t(86),n.Composites=t(591),n.Axes=t(271),n.Bounds=t(84),n.Svg=t(592),n.Vector=t(83),n.Vertices=t(64),n.World.add=n.Composite.add,n.World.remove=n.Composite.remove,n.World.addComposite=n.Composite.addComposite,n.World.addBody=n.Composite.addBody,n.World.addConstraint=n.Composite.addConstraint,n.World.clear=n.Composite.clear,p.exports=n},function(p,E,t){var n={};p.exports=n;var d=t(32);(function(){n._registry={},n.register=function(a){if(n.isPlugin(a)||d.warn("Plugin.register:",n.toString(a),"does not implement all required fields."),a.name in n._registry){var o=n._registry[a.name],r=n.versionParse(a.version).number,e=n.versionParse(o.version).number;r>e?(d.warn("Plugin.register:",n.toString(o),"was upgraded to",n.toString(a)),n._registry[a.name]=a):r-1},n.isFor=function(a,o){var r=a.for&&n.dependencyParse(a.for);return!a.for||o.name===r.name&&n.versionSatisfies(o.version,r.range)},n.use=function(a,o){if(a.uses=(a.uses||[]).concat(o||[]),a.uses.length===0){d.warn("Plugin.use:",n.toString(a),"does not specify any dependencies to install.");return}for(var r=n.dependencies(a),e=d.topologicalSort(r),i=[],l=0;l0&&!s.silent&&d.info(i.join(" "))},n.dependencies=function(a,o){var r=n.dependencyParse(a),e=r.name;if(o=o||{},!(e in o)){a=n.resolve(a)||a,o[e]=d.map(a.uses||[],function(l){n.isPlugin(l)&&n.register(l);var s=n.dependencyParse(l),h=n.resolve(l);return h&&!n.versionSatisfies(h.version,s.range)?(d.warn("Plugin.dependencies:",n.toString(h),"does not satisfy",n.toString(s),"used by",n.toString(r)+"."),h._warned=!0,a._warned=!0):h||(d.warn("Plugin.dependencies:",n.toString(l),"used by",n.toString(r),"could not be resolved."),a._warned=!0),s.name});for(var i=0;i=e[2];if(r.operator==="^")return e[0]>0?l[0]===e[0]&&i.number>=r.number:e[1]>0?l[1]===e[1]&&l[2]>=e[2]:l[2]===e[2]}return a===o||a==="*"}})()},function(p,E,t){var n={};p.exports=n;var d=t(118);t(128);var a=t(32);(function(){n.create=function(o){var r=d.create(),e={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return a.extend(r,e,o)}})()},function(p,E,t){var n={};p.exports=n;var d=t(250),a=t(273),o=t(32);(function(){n.create=function(r){var e={controller:n,detector:a.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return o.extend(e,r)},n.update=function(r,e,i,l){var s,h,f,v=i.world,u=r.buckets,c,x,g=!1,m=i.metrics;for(m.broadphaseTests=0,s=0;sv.bounds.max.x||y.bounds.max.yv.bounds.max.y)){var T=n._getRegion(r,y);if(!y.region||T.id!==y.region.id||l){m.broadphaseTests+=1,(!y.region||l)&&(y.region=T);var S=n._regionUnion(T,y.region);for(h=S.startCol;h<=S.endCol;h++)for(f=S.startRow;f<=S.endRow;f++){x=n._getBucketId(h,f),c=u[x];var C=h>=T.startCol&&h<=T.endCol&&f>=T.startRow&&f<=T.endRow,P=h>=y.region.startCol&&h<=y.region.endCol&&f>=y.region.startRow&&f<=y.region.endRow;!C&&P&&P&&c&&n._bucketRemoveBody(r,c,y),(y.region===T||C&&!P||l)&&(c||(c=n._createBucket(u,x)),n._bucketAddBody(r,c,y))}y.region=T,g=!0}}}g&&(r.pairsList=n._createActivePairsList(r))},n.clear=function(r){r.buckets={},r.pairs={},r.pairsList=[]},n._regionUnion=function(r,e){var i=Math.min(r.startCol,e.startCol),l=Math.max(r.endCol,e.endCol),s=Math.min(r.startRow,e.startRow),h=Math.max(r.endRow,e.endRow);return n._createRegion(i,l,s,h)},n._getRegion=function(r,e){var i=e.bounds,l=Math.floor(i.min.x/r.bucketWidth),s=Math.floor(i.max.x/r.bucketWidth),h=Math.floor(i.min.y/r.bucketHeight),f=Math.floor(i.max.y/r.bucketHeight);return n._createRegion(l,s,h,f)},n._createRegion=function(r,e,i,l){return{id:r+","+e+","+i+","+l,startCol:r,endCol:e,startRow:i,endRow:l}},n._getBucketId=function(r,e){return"C"+r+"R"+e},n._createBucket=function(r,e){var i=r[e]=[];return i},n._bucketAddBody=function(r,e,i){for(var l=0;l0?l.push(i):delete r.pairs[e[s]];return l}})()},function(p,E,t){var n={};p.exports=n;var d=t(250),a=t(32);(function(){n._pairMaxIdleLife=1e3,n.create=function(o){return a.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},o)},n.update=function(o,r,e){var i=o.list,l=o.table,s=o.collisionStart,h=o.collisionEnd,f=o.collisionActive,v,u,c,x;for(s.length=0,h.length=0,f.length=0,x=0;xn._pairMaxIdleLife&&l.push(v)}for(v=0;vg.friction*g.frictionStatic*U*l&&(z=I,Y=o.clamp(g.friction*D*l,-z,z));var H=a.cross(B,S),w=a.cross(N,S),K=A/(y.inverseMass+T.inverseMass+y.inverseInertia*H*H+T.inverseInertia*w*w);if(G*=K,Y*=K,O<0&&O*O>n._restingThresh*l)L.normalImpulse=0;else{var Z=L.normalImpulse;L.normalImpulse=Math.min(L.normalImpulse+G,0),G=L.normalImpulse-Z}if(R*R>n._restingThreshTangent*l)L.tangentImpulse=0;else{var J=L.tangentImpulse;L.tangentImpulse=o.clamp(L.tangentImpulse+Y,-z,z),Y=L.tangentImpulse-J}s.x=S.x*G+C.x*Y,s.y=S.y*G+C.y*Y,y.isStatic||y.isSleeping||(y.positionPrev.x+=s.x*y.inverseMass,y.positionPrev.y+=s.y*y.inverseMass,y.anglePrev+=a.cross(B,s)*y.inverseInertia),T.isStatic||T.isSleeping||(T.positionPrev.x-=s.x*T.inverseMass,T.positionPrev.y-=s.y*T.inverseMass,T.anglePrev-=a.cross(N,s)*T.inverseInertia)}}}}})()},function(p,E){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch{typeof window=="object"&&(t=window)}p.exports=t},function(p,E,t){/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(276),d=function(a,o,r,e){for(var i=a[0],l=1;l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(46),d=function(a,o,r,e,i){return n(a,"angle",o,r,e,i)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){for(var o=0;o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){a===void 0&&(a=0);for(var o=a;o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){a===void 0&&(a=0);for(var o=a;o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(289),d=t(123),a=t(2),o=t(1),r=t(129),e=new r({sys:{queueDepthSort:o,events:{once:o}}},0,0,1,1),i=function(l,s){s===void 0&&(s={});var h=s.hasOwnProperty("width"),f=s.hasOwnProperty("height"),v=a(s,"width",-1),u=a(s,"height",-1),c=a(s,"cellWidth",1),x=a(s,"cellHeight",c),g=a(s,"position",d.TOP_LEFT),m=a(s,"x",0),y=a(s,"y",0),T=0,S=0,C=v*c,P=u*x;e.setPosition(m,y),e.setSize(c,x);for(var A=0;A + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(18),d=2,a={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(o,r,e,i){return o===void 0&&(o=1),r===void 0?this.alpha=o:(this._alphaTL=n(o,0,1),this._alphaTR=n(r,0,1),this._alphaBL=n(e,0,1),this._alphaBR=n(i,0,1)),this},alpha:{get:function(){return this._alpha},set:function(o){var r=n(o,0,1);this._alpha=r,this._alphaTL=r,this._alphaTR=r,this._alphaBL=r,this._alphaBR=r,r===0?this.renderFlags&=~d:this.renderFlags|=d}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(o){var r=n(o,0,1);this._alphaTL=r,r!==0&&(this.renderFlags|=d)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(o){var r=n(o,0,1);this._alphaTR=r,r!==0&&(this.renderFlags|=d)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(o){var r=n(o,0,1);this._alphaBL=r,r!==0&&(this.renderFlags|=d)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(o){var r=n(o,0,1);this._alphaBR=r,r!==0&&(this.renderFlags|=d)}}};p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(n){this.scaleX=n/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(n){this.scaleY=n/this.height}},setSize:function(n,d){return this.width=n,this.height=d,this},setDisplaySize:function(n,d){return this.displayWidth=n,this.displayHeight=d,this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={texture:null,frame:null,isCropped:!1,setCrop:function(n,d,a,o){if(n===void 0)this.isCropped=!1;else if(this.frame){if(typeof n=="number")this.frame.setCropUVs(this._crop,n,d,a,o,this.flipX,this.flipY);else{var r=n;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(n){return this.flipX=n,this},setFlipY:function(n){return this.flipY=n,this},setFlip:function(n,d){return this.flipX=n,this.flipY=d,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10),d=t(308),a=t(3),o={prepareBoundsOutput:function(r,e){if(e===void 0&&(e=!1),this.rotation!==0&&d(r,this.x,this.y,this.rotation),e&&this.parentContainer){var i=this.parentContainer.getBoundsTransformMatrix();i.transformPoint(r.x,r.y,r)}return r},getCenter:function(r){return r===void 0&&(r=new a),r.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,r.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,r},getTopLeft:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX,r.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(r,e)},getTopCenter:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,r.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(r,e)},getTopRight:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX+this.displayWidth,r.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(r,e)},getLeftCenter:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX,r.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(r,e)},getRightCenter:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX+this.displayWidth,r.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(r,e)},getBottomLeft:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX,r.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(r,e)},getBottomCenter:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,r.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(r,e)},getBottomRight:function(r,e){return r||(r=new a),r.x=this.x-this.displayWidth*this.originX+this.displayWidth,r.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(r,e)},getBounds:function(r){r===void 0&&(r=new n);var e,i,l,s,h,f,v,u;if(this.parentContainer){var c=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(r),c.transformPoint(r.x,r.y,r),e=r.x,i=r.y,this.getTopRight(r),c.transformPoint(r.x,r.y,r),l=r.x,s=r.y,this.getBottomLeft(r),c.transformPoint(r.x,r.y,r),h=r.x,f=r.y,this.getBottomRight(r),c.transformPoint(r.x,r.y,r),v=r.x,u=r.y}else this.getTopLeft(r),e=r.x,i=r.y,this.getTopRight(r),l=r.x,s=r.y,this.getBottomLeft(r),h=r.x,f=r.y,this.getBottomRight(r),v=r.x,u=r.y;return r.x=Math.min(e,l,h,v),r.y=Math.min(i,s,f,u),r.width=Math.max(e,l,h,v)-r.x,r.height=Math.max(i,s,f,u)-r.y,r}};p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="blur"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="boot"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="contextlost"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="contextrestored"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="focus"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="hidden"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postrender"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="poststep"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prerender"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prestep"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="ready"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="step"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="visible"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postrender"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prerender"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="render"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resize"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(n){this._displayOriginX=n,this.originX=n/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(n){this._displayOriginY=n,this.originY=n/this.height}},setOrigin:function(n,d){return n===void 0&&(n=.5),d===void 0&&(d=n),this.originX=n,this.originY=d,this.updateDisplayOrigin()},setOriginFromFrame:function(){return!this.frame||!this.frame.customPivot?this.setOrigin():(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin())},setDisplayOrigin:function(n,d){return n===void 0&&(n=0),d===void 0&&(d=n),this.displayOriginX=n,this.displayOriginY=d,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(36),d=t(99),a=t(6),o=t(100),r=t(3),e={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:o.PLAYING_FORWARD,setPath:function(i,l){l===void 0&&(l=this.pathConfig);var s=this.pathTween;return s&&s.isPlaying()&&s.stop(),this.path=i,l&&this.startFollow(l),this},setRotateToPath:function(i,l){return l===void 0&&(l=0),this.rotateToPath=i,this.pathRotationOffset=l,this},isFollowing:function(){var i=this.pathTween;return i&&i.isPlaying()},startFollow:function(i,l){i===void 0&&(i={}),l===void 0&&(l=0);var s=this.pathTween;s&&s.isPlaying()&&s.stop(),typeof i=="number"&&(i={duration:i}),i.from=a(i,"from",0),i.to=a(i,"to",1);var h=d(i,"positionOnPath",!1);this.rotateToPath=d(i,"rotateToPath",!1),this.pathRotationOffset=a(i,"rotationOffset",0);var f=a(i,"startAt",l);if(f&&(i.onStart=function(u){var c=u.data[0];c.progress=f,c.elapsed=c.duration*f;var x=c.ease(c.progress);c.current=c.start+(c.end-c.start)*x,c.target[c.key]=c.current}),this.pathOffset||(this.pathOffset=new r(this.x,this.y)),this.pathVector||(this.pathVector=new r),this.pathDelta||(this.pathDelta=new r),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(i),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=o.PLAYING_FORWARD,this.rotateToPath){var v=this.path.getPoint(.1);this.rotation=Math.atan2(v.y-this.y,v.x-this.x)+n(this.pathRotationOffset)}return this.pathConfig=i,this},pauseFollow:function(){var i=this.pathTween;return i&&i.isPlaying()&&i.pause(),this},resumeFollow:function(){var i=this.pathTween;return i&&i.isPaused()&&i.resume(),this},stopFollow:function(){var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this},pathUpdate:function(){var i=this.pathTween;if(i){var l=i.data[0],s=this.pathDelta,h=this.pathVector;if(s.copy(h).negate(),l.state===o.COMPLETE){this.path.getPoint(1,h),s.add(h),h.add(this.pathOffset),this.setPosition(h.x,h.y);return}else if(l.state!==o.PLAYING_FORWARD&&l.state!==o.PLAYING_BACKWARD)return;this.path.getPoint(i.getValue(),h),s.add(h),h.add(this.pathOffset);var f=this.x,v=this.y;this.setPosition(h.x,h.y);var u=this.x-f,c=this.y-v;if(u===0&&c===0)return;if(l.state!==this._prevDirection){this._prevDirection=l.state;return}this.rotateToPath&&(this.rotation=Math.atan2(c,u)+n(this.pathRotationOffset))}}};p.exports=e},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(n){this.scaleX=n/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(n){this.scaleY=n/this.frame.realHeight}},setSizeToFrame:function(n){return n===void 0&&(n=this.frame),this.width=n.realWidth,this.height=n.realHeight,this},setSize:function(n,d){return this.width=n,this.height=d,this},setDisplaySize:function(n,d){return this.displayWidth=n,this.displayHeight=d,this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=8,n={texture:null,frame:null,isCropped:!1,setTexture:function(d,a){return this.texture=this.scene.sys.textures.get(d),this.setFrame(a)},setFrame:function(d,a,o){return a===void 0&&(a=!0),o===void 0&&(o=!0),this.frame=this.texture.get(d),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~t:this.renderFlags|=t,this._sizeComponent&&a&&this.setSizeToFrame(),this._originComponent&&o&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};p.exports=n},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=8,n={texture:null,frame:null,isCropped:!1,setCrop:function(d,a,o,r){if(d===void 0)this.isCropped=!1;else if(this.frame){if(typeof d=="number")this.frame.setCropUVs(this._crop,d,a,o,r,this.flipX,this.flipY);else{var e=d;this.frame.setCropUVs(this._crop,e.x,e.y,e.width,e.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(d,a){return this.texture=this.scene.sys.textures.get(d),this.setFrame(a)},setFrame:function(d,a,o){return a===void 0&&(a=!0),o===void 0&&(o=!0),this.frame=this.texture.get(d),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~t:this.renderFlags|=t,this._sizeComponent&&a&&this.setSizeToFrame(),this._originComponent&&o&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};p.exports=n},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(n,d,a,o){return n===void 0&&(n=16777215),d===void 0&&(d=n,a=n,o=n),this.tintTopLeft=n,this.tintTopRight=d,this.tintBottomLeft=a,this.tintBottomRight=o,this.tintFill=!1,this},setTintFill:function(n,d,a,o){return this.setTint(n,d,a,o),this.tintFill=!0,this},tint:{set:function(n){this.setTint(n,n,n,n)}},isTinted:{get:function(){var n=16777215;return this.tintFill||this.tintTopLeft!==n||this.tintTopRight!==n||this.tintBottomLeft!==n||this.tintBottomRight!==n}}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="changedata"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="changedata-"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removedata"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="setdata"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addedtoscene"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removedfromscene"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="created"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="error"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loop"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="play"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="seeked"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="seeking"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stop"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="timeout"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="unlocked"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addedtoscene"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="boot"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="create"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postupdate"},function(p,E){/** + * @author samme + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prerender"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="preupdate"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="ready"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removedfromscene"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="render"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="shutdown"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="sleep"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitioncomplete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitioninit"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitionout"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitionstart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="transitionwake"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="wake"},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(46),d=function(a,o,r,e,i){return n(a,"alpha",o,r,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(46),d=function(a,o,r,e,i){return n(a,"x",o,r,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(46),d=function(a,o,r,e,i,l,s){return r==null&&(r=o),n(a,"x",o,e,l,s),n(a,"y",r,i,l,s)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(46),d=function(a,o,r,e,i){return n(a,"y",o,r,e,i)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){a===void 0&&(a=0),o===void 0&&(o=6.28);for(var r=a,e=(o-a)/n.length,i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){a===void 0&&(a=0),o===void 0&&(o=6.28);for(var r=a,e=(o-a)/n.length,i=d.width/2,l=d.height/2,s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(172),d=function(a,o){for(var r=n(o,a.length),e=0;e + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(316),d=t(178),a=t(179),o=function(r,e,i){i===void 0&&(i=0);var l=n(e,!1,r.length);i>0?d(l,i):i<0&&a(l,Math.abs(i));for(var s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(317),d=function(a,o,r){var e=n({x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2},r),i=n({x1:o.x2,y1:o.y2,x2:o.x3,y2:o.y3},r),l=n({x1:o.x3,y1:o.y3,x2:o.x1,y2:o.y1},r);e.pop(),i.pop(),l.pop(),e=e.concat(i,l);for(var s=e.length/a.length,h=0,f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){for(var o=0;o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(170),d=function(a,o){for(var r=0;r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(180),d=function(a,o){for(var r=0;r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(173),d=function(a,o){for(var r=0;r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(174),d=function(a,o){for(var r=0;r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(181),d=function(a,o){for(var r=0;r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(46),d=function(a,o,r,e,i){return n(a,"rotation",o,r,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(182),d=t(50),a=function(o,r,e){for(var i=r.x,l=r.y,s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(182),d=function(a,o,r,e){var i=o.x,l=o.y;if(e===0)return a;for(var s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(46),d=function(a,o,r,e,i){return n(a,"scaleX",o,r,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(46),d=function(a,o,r,e,i,l,s){return r==null&&(r=o),n(a,"scaleX",o,e,l,s),n(a,"scaleY",r,i,l,s)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(46),d=function(a,o,r,e,i){return n(a,"scaleY",o,r,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i){return n(a,"alpha",o,r,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e){return n(a,"blendMode",o,0,r,e)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i){return n(a,"depth",o,r,e,i)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){for(var o=0;o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i,l,s){return r==null&&(r=o),n(a,"originX",o,e,l,s),n(a,"originY",r,i,l,s),a.forEach(function(h){h.updateDisplayOrigin()}),a};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i){return n(a,"rotation",o,r,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i,l,s){return r==null&&(r=o),n(a,"scaleX",o,e,l,s),n(a,"scaleY",r,i,l,s)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i){return n(a,"scaleX",o,r,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i){return n(a,"scaleY",o,r,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i,l,s){return r==null&&(r=o),n(a,"scrollFactorX",o,e,l,s),n(a,"scrollFactorY",r,i,l,s)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i){return n(a,"scrollFactorX",o,r,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i){return n(a,"scrollFactorY",o,r,e,i)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r){for(var e=0;e + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e){return n(a,"visible",o,0,r,e)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i){return n(a,"x",o,r,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i,l,s){return r==null&&(r=o),n(a,"x",o,e,l,s),n(a,"y",r,i,l,s)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(27),d=function(a,o,r,e,i){return n(a,"y",o,r,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(3),d=function(a,o,r,e,i){e===void 0&&(e=0),i===void 0&&(i=new n);var l,s;if(a.length>1){var h,f,v,u;if(e===0){var c=a.length-1;for(l=a[c].x,s=a[c].y,h=c-1;h>=0;h--)u=a[h],f=u.x,v=u.y,u.x=l,u.y=s,l=f,s=v;a[c].x=o,a[c].y=r}else{for(l=a[0].x,s=a[0].y,h=1;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(131),d=function(a){return n(a)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(183),d=function(a,o,r,e,i){i===void 0&&(i=!1);var l=Math.abs(e-r)/a.length,s;if(i)for(s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(184),d=function(a,o,r,e,i){i===void 0&&(i=!1);var l=Math.abs(e-r)/a.length,s;if(i)for(s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r){r===void 0&&(r=!1);var e=Math.abs(o-a)/n.length,i;if(r)for(i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){for(var d=0;d + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(68),d=function(a,o,r){r===void 0&&(r=0);for(var e=0;e + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Animation:t(185),AnimationFrame:t(319),AnimationManager:t(321),AnimationState:t(164),Events:t(132)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="add"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationcomplete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationcomplete-"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationrepeat"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationrestart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationstart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationstop"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="animationupdate"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pauseall"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="remove"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resumeall"},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BaseCache:t(323),CacheManager:t(325),Events:t(324)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="add"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="remove"},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Controls:t(739),Scene2D:t(742)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={FixedKeyControl:t(740),SmoothedKeyControl:t(741)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(6),a=new n({initialize:function(r){this.camera=d(r,"camera",null),this.left=d(r,"left",null),this.right=d(r,"right",null),this.up=d(r,"up",null),this.down=d(r,"down",null),this.zoomIn=d(r,"zoomIn",null),this.zoomOut=d(r,"zoomOut",null),this.zoomSpeed=d(r,"zoomSpeed",.01),this.minZoom=d(r,"minZoom",.001),this.maxZoom=d(r,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=d(r,"speed",null);typeof e=="number"?(this.speedX=e,this.speedY=e):(this.speedX=d(r,"speed.x",0),this.speedY=d(r,"speed.y",0)),this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(o){return this.camera=o,this},update:function(o){if(!!this.active){o===void 0&&(o=1);var r=this.camera;this.up&&this.up.isDown?r.scrollY-=this.speedY*o|0:this.down&&this.down.isDown&&(r.scrollY+=this.speedY*o|0),this.left&&this.left.isDown?r.scrollX-=this.speedX*o|0:this.right&&this.right.isDown&&(r.scrollX+=this.speedX*o|0),this.zoomIn&&this.zoomIn.isDown?(r.zoom-=this.zoomSpeed,r.zoomthis.maxZoom&&(r.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(6),a=new n({initialize:function(r){this.camera=d(r,"camera",null),this.left=d(r,"left",null),this.right=d(r,"right",null),this.up=d(r,"up",null),this.down=d(r,"down",null),this.zoomIn=d(r,"zoomIn",null),this.zoomOut=d(r,"zoomOut",null),this.zoomSpeed=d(r,"zoomSpeed",.01),this.minZoom=d(r,"minZoom",.001),this.maxZoom=d(r,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=d(r,"acceleration",null);typeof e=="number"?(this.accelX=e,this.accelY=e):(this.accelX=d(r,"acceleration.x",0),this.accelY=d(r,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=d(r,"drag",null);typeof i=="number"?(this.dragX=i,this.dragY=i):(this.dragX=d(r,"drag.x",0),this.dragY=d(r,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var l=d(r,"maxSpeed",null);typeof l=="number"?(this.maxSpeedX=l,this.maxSpeedY=l):(this.maxSpeedX=d(r,"maxSpeed.x",0),this.maxSpeedY=d(r,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(o){return this.camera=o,this},update:function(o){if(!!this.active){o===void 0&&(o=1);var r=this.camera;this._speedX>0?(this._speedX-=this.dragX*o,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*o,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*o,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*o,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,this._speedX!==0&&(r.scrollX-=this._speedX*o|0),this._speedY!==0&&(r.scrollY-=this._speedY*o|0),this._zoom!==0&&(r.zoom+=this._zoom,r.zoomthis.maxZoom&&(r.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Camera:t(326),BaseCamera:t(133),CameraManager:t(799),Effects:t(333),Events:t(37)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="cameradestroy"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerafadeincomplete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerafadeinstart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerafadeoutcomplete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerafadeoutstart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="cameraflashcomplete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="cameraflashstart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="followupdate"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerapancomplete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerapanstart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postrender"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="prerender"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerarotatecomplete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerarotatestart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerashakecomplete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerashakestart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerazoomcomplete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="camerazoomstart"},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(18),d=t(0),a=t(37),o=new d({initialize:function(e){this.camera=e,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(r,e,i,l,s,h,f,v){if(r===void 0&&(r=!0),e===void 0&&(e=1e3),i===void 0&&(i=0),l===void 0&&(l=0),s===void 0&&(s=0),h===void 0&&(h=!1),f===void 0&&(f=null),v===void 0&&(v=this.camera.scene),!h&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=r,this.progress=0,this.red=i,this.green=l,this.blue=s,this.alpha=r?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=f,this._onUpdateScope=v;var u=r?a.FADE_OUT_START:a.FADE_IN_START;return this.camera.emit(u,this.camera,this,e,i,l,s),this.camera},update:function(r,e){!this.isRunning||(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(18),d=t(0),a=t(37),o=new d({initialize:function(e){this.camera=e,this.isRunning=!1,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(r,e,i,l,s,h,f){return r===void 0&&(r=250),e===void 0&&(e=255),i===void 0&&(i=255),l===void 0&&(l=255),s===void 0&&(s=!1),h===void 0&&(h=null),f===void 0&&(f=this.camera.scene),!s&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=r,this.progress=0,this.red=e,this.green=i,this.blue=l,this.alpha=1,this._elapsed=0,this._onUpdate=h,this._onUpdateScope=f,this.camera.emit(a.FLASH_START,this.camera,this,r,e,i,l),this.camera)},update:function(r,e){!this.isRunning||(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(18),d=t(0),a=t(134),o=t(37),r=t(3),e=new d({initialize:function(l){this.camera=l,this.isRunning=!1,this.duration=0,this.source=new r,this.current=new r,this.destination=new r,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(i,l,s,h,f,v,u){s===void 0&&(s=1e3),h===void 0&&(h=a.Linear),f===void 0&&(f=!1),v===void 0&&(v=null),u===void 0&&(u=this.camera.scene);var c=this.camera;return!f&&this.isRunning||(this.isRunning=!0,this.duration=s,this.progress=0,this.source.set(c.scrollX,c.scrollY),this.destination.set(i,l),c.getScroll(i,l,this.current),typeof h=="string"&&a.hasOwnProperty(h)?this.ease=a[h]:typeof h=="function"&&(this.ease=h),this._elapsed=0,this._onUpdate=v,this._onUpdateScope=u,this.camera.emit(o.PAN_START,this.camera,this,s,i,l)),c},update:function(i,l){if(!!this.isRunning){this._elapsed+=l;var s=n(this._elapsed/this.duration,0,1);this.progress=s;var h=this.camera;if(this._elapsed + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d===void 0&&(d=1.70158),n*n*((d+1)*n-d)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d===void 0&&(d=1.70158),--n*n*((d+1)*n+d)+1};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){d===void 0&&(d=1.70158);var a=d*1.525;return(n*=2)<1?.5*(n*n*((a+1)*n-a)):.5*((n-=2)*n*((a+1)*n+a)+2)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n=1-n,n<.36363636363636365?1-7.5625*n*n:n<.7272727272727273?1-(7.5625*(n-=.5454545454545454)*n+.75):n<.9090909090909091?1-(7.5625*(n-=.8181818181818182)*n+.9375):1-(7.5625*(n-=.9545454545454546)*n+.984375)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n<.36363636363636365?7.5625*n*n:n<.7272727272727273?7.5625*(n-=.5454545454545454)*n+.75:n<.9090909090909091?7.5625*(n-=.8181818181818182)*n+.9375:7.5625*(n-=.9545454545454546)*n+.984375};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d=!1;return n<.5?(n=1-n*2,d=!0):n=n*2-1,n<.36363636363636365?n=7.5625*n*n:n<.7272727272727273?n=7.5625*(n-=.5454545454545454)*n+.75:n<.9090909090909091?n=7.5625*(n-=.8181818181818182)*n+.9375:n=7.5625*(n-=.9545454545454546)*n+.984375,d?(1-n)*.5:n*.5+.5};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return 1-Math.sqrt(1-n*n)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return Math.sqrt(1- --n*n)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n*n*n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return--n*n*n+1};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){if(d===void 0&&(d=.1),a===void 0&&(a=.1),n===0)return 0;if(n===1)return 1;var o=a/4;return d<1?d=1:o=a*Math.asin(1/d)/(2*Math.PI),-(d*Math.pow(2,10*(n-=1))*Math.sin((n-o)*(2*Math.PI)/a))};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){if(d===void 0&&(d=.1),a===void 0&&(a=.1),n===0)return 0;if(n===1)return 1;var o=a/4;return d<1?d=1:o=a*Math.asin(1/d)/(2*Math.PI),d*Math.pow(2,-10*n)*Math.sin((n-o)*(2*Math.PI)/a)+1};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){if(d===void 0&&(d=.1),a===void 0&&(a=.1),n===0)return 0;if(n===1)return 1;var o=a/4;return d<1?d=1:o=a*Math.asin(1/d)/(2*Math.PI),(n*=2)<1?-.5*(d*Math.pow(2,10*(n-=1))*Math.sin((n-o)*(2*Math.PI)/a)):d*Math.pow(2,-10*(n-=1))*Math.sin((n-o)*(2*Math.PI)/a)*.5+1};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return Math.pow(2,10*(n-1))-.001};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return 1-Math.pow(2,-10*n)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return(n*=2)<1?.5*Math.pow(2,10*(n-1)):.5*(2-Math.pow(2,-10*(n-1)))};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n*n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n*(2-n)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n*n*n*n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return 1- --n*n*n*n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n*n*n*n*n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return--n*n*n*n*n+1};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n===0?0:n===1?1:1-Math.cos(n*Math.PI/2)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n===0?0:n===1?1:Math.sin(n*Math.PI/2)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n===0?0:n===1?1:.5*(1-Math.cos(Math.PI*n))};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d===void 0&&(d=1),n<=0?0:n>=1?1:((d*n|0)+1)*(1/d)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(18),d=t(0),a=t(37),o=t(3),r=new d({initialize:function(i){this.camera=i,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(e,i,l,s,h){return e===void 0&&(e=100),i===void 0&&(i=.05),l===void 0&&(l=!1),s===void 0&&(s=null),h===void 0&&(h=this.camera.scene),!l&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=e,this.progress=0,typeof i=="number"?this.intensity.set(i):this.intensity.set(i.x,i.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=h,this.camera.emit(a.SHAKE_START,this.camera,this,e,i),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(e,i){if(!!this.isRunning)if(this._elapsed+=i,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */var n=t(18),d=t(0),a=t(37),o=t(134),r=new d({initialize:function(i){this.camera=i,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(e,i,l,s,h,f,v){l===void 0&&(l=1e3),s===void 0&&(s=o.Linear),h===void 0&&(h=!1),f===void 0&&(f=null),v===void 0&&(v=this.camera.scene),i===void 0&&(i=!1),this.shortestPath=i;var u=e;e<0?(u=-1*e,this.clockwise=!1):this.clockwise=!0;var c=360*Math.PI/180;u=u-Math.floor(u/c)*c;var x=this.camera;if(!h&&this.isRunning)return x;if(this.isRunning=!0,this.duration=l,this.progress=0,this.source=x.rotation,this.destination=u,typeof s=="string"&&o.hasOwnProperty(s)?this.ease=o[s]:typeof s=="function"&&(this.ease=s),this._elapsed=0,this._onUpdate=f,this._onUpdateScope=v,this.shortestPath){var g=0,m=0;this.destination>this.source?g=Math.abs(this.destination-this.source):g=Math.abs(this.destination+c)-this.source,this.source>this.destination?m=Math.abs(this.source-this.destination):m=Math.abs(this.source+c)-this.destination,gm&&(this.clockwise=!1)}return this.camera.emit(a.ROTATE_START,this.camera,this,l,u),x},update:function(e,i){if(!!this.isRunning){this._elapsed+=i;var l=n(this._elapsed/this.duration,0,1);this.progress=l;var s=this.camera;if(this._elapsed=c?f=Math.abs(u-c):f=Math.abs(u+v)-c;var x=0;this.clockwise?x=s.rotation+f*h:x=s.rotation-f*h,s.rotation=x,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,l,x)}else s.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,l,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(a.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(18),d=t(0),a=t(134),o=t(37),r=new d({initialize:function(i){this.camera=i,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(e,i,l,s,h,f){i===void 0&&(i=1e3),l===void 0&&(l=a.Linear),s===void 0&&(s=!1),h===void 0&&(h=null),f===void 0&&(f=this.camera.scene);var v=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source=v.zoom,this.destination=e,typeof l=="string"&&a.hasOwnProperty(l)?this.ease=a[l]:typeof l=="function"&&(this.ease=l),this._elapsed=0,this._onUpdate=h,this._onUpdateScope=f,this.camera.emit(o.ZOOM_START,this.camera,this,i,e)),v},update:function(e,i){!this.isRunning||(this._elapsed+=i,this.progress=n(this._elapsed/this.duration,0,1),this._elapsed + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(326),d=t(0),a=t(2),o=t(24),r=t(57),e=t(104),i=t(20),l=new d({initialize:function(h){this.scene=h,this.systems=h.sys,this.roundPixels=h.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,h.sys.events.once(i.BOOT,this.boot,this),h.sys.events.on(i.START,this.start,this)},boot:function(){var s=this.systems;s.settings.cameras?this.fromJSON(s.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new n(0,0,s.scale.width,s.scale.height).setScene(this.scene),s.game.scale.on(e.RESIZE,this.onResize,this),this.systems.events.once(i.DESTROY,this.destroy,this)},start:function(){if(!this.main){var s=this.systems;s.settings.cameras?this.fromJSON(s.settings.cameras):this.add(),this.main=this.cameras[0]}var h=this.systems.events;h.on(i.UPDATE,this.update,this),h.once(i.SHUTDOWN,this.shutdown,this)},add:function(s,h,f,v,u,c){s===void 0&&(s=0),h===void 0&&(h=0),f===void 0&&(f=this.scene.sys.scale.width),v===void 0&&(v=this.scene.sys.scale.height),u===void 0&&(u=!1),c===void 0&&(c="");var x=new n(s,h,f,v);return x.setName(c),x.setScene(this.scene),x.setRoundPixels(this.roundPixels),x.id=this.getNextID(),this.cameras.push(x),u&&(this.main=x),x},addExisting:function(s,h){h===void 0&&(h=!1);var f=this.cameras.indexOf(s);return f===-1?(s.id=this.getNextID(),s.setRoundPixels(this.roundPixels),this.cameras.push(s),h&&(this.main=s),s):null},getNextID:function(){for(var s=this.cameras,h=1,f=0;f<32;f++){for(var v=!1,u=0;u0){c.preRender();var x=this.getVisibleChildren(h.getChildren(),c);s.render(f,x,c)}}},getVisibleChildren:function(s,h){for(var f=[],v=0;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="enterfullscreen"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="fullscreenfailed"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="fullscreenunsupported"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="leavefullscreen"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="orientationchange"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resize"},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Config:t(346),CreateRenderer:t(366),DebugHeader:t(384),Events:t(22),TimeStep:t(385),VisibilityHandler:t(387)}},function(p,E){var t=p.exports={},n,d;function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?n=setTimeout:n=a}catch{n=a}try{typeof clearTimeout=="function"?d=clearTimeout:d=o}catch{d=o}})();function r(x){if(n===setTimeout)return setTimeout(x,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(x,0);try{return n(x,0)}catch{try{return n.call(null,x,0)}catch{return n.call(this,x,0)}}}function e(x){if(d===clearTimeout)return clearTimeout(x);if((d===o||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(x);try{return d(x)}catch{try{return d.call(null,x)}catch{return d.call(this,x)}}}var i=[],l=!1,s,h=-1;function f(){!l||!s||(l=!1,s.length?i=s.concat(i):h=-1,i.length&&v())}function v(){if(!l){var x=r(f);l=!0;for(var g=i.length;g;){for(s=i,i=[];++h1)for(var m=1;m + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(136),d={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function a(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(d.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(d.mspointer=!0),navigator.getGamepads&&(d.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?d.wheelEvent="wheel":"onmousewheel"in window?d.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(d.wheelEvent="DOMMouseScroll")),d}p.exports=a()},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(136),d={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function a(){if(typeof importScripts=="function")return d;d.audioData=!!window.Audio,d.webAudio=!!(window.AudioContext||window.webkitAudioContext);var o=document.createElement("audio"),r=!!o.canPlayType;try{if(r&&(o.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(d.ogg=!0),(o.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||o.canPlayType("audio/opus;").replace(/^no$/,""))&&(d.opus=!0),o.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(d.mp3=!0),o.canPlayType("audio/wav").replace(/^no$/,"")&&(d.wav=!0),(o.canPlayType("audio/x-m4a;")||o.canPlayType("audio/aac;").replace(/^no$/,""))&&(d.m4a=!0),o.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(d.webm=!0),o.canPlayType('audio/mp4;codecs="ec-3"')!=="")){if(n.edge)d.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var e=parseInt(RegExp.$1,10),i=parseInt(RegExp.$2,10);(e===10&&i>=11||e>10)&&(d.dolby=!0)}}}catch{}return d}p.exports=a()},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};function n(){if(typeof importScripts=="function")return t;var d=document.createElement("video"),a=!!d.canPlayType;try{a&&(d.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(t.ogg=!0),d.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(t.h264=!0,t.mp4=!0),d.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(t.webm=!0),d.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(t.vp9=!0),d.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(t.hls=!0))}catch{}return t}p.exports=n()},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={available:!1,cancel:"",keyboard:!1,request:""};function n(){if(typeof importScripts=="function")return t;var d,a="Fullscreen",o="FullScreen",r=["request"+a,"request"+o,"webkitRequest"+a,"webkitRequest"+o,"msRequest"+a,"msRequest"+o,"mozRequest"+o,"mozRequest"+a];for(d=0;d + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Between:t(349),BetweenPoints:t(350),BetweenPointsY:t(813),BetweenY:t(814),CounterClockwise:t(815),Normalize:t(351),Random:t(816),RandomDegrees:t(817),Reverse:t(818),RotateTo:t(819),ShortestBetween:t(820),Wrap:t(269),WrapDegrees:t(270)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return Math.atan2(d.x-n.x,d.y-n.y)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){return Math.atan2(a-n,o-d)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(14),d=function(a){return a>Math.PI&&(a-=n.PI2),Math.abs(((a+n.TAU)%n.PI2-n.PI2)%n.PI2)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(137),d=function(){return n(-Math.PI,Math.PI)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(137),d=function(){return n(-180,180)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(351),d=function(a){return n(a+Math.PI)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(14),d=function(a,o,r){return r===void 0&&(r=.05),a===o||(Math.abs(o-a)<=r||Math.abs(o-a)>=n.PI2-r?a=o:(Math.abs(o-a)>Math.PI&&(oa?a+=r:o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=d-n;if(a===0)return 0;var o=Math.floor((a- -180)/360);return a-o*360};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Between:t(50),BetweenPoints:t(352),BetweenPointsSquared:t(822),Chebyshev:t(823),Power:t(824),Snake:t(825),Squared:t(353)}},function(p,E){/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.x-d.x,o=n.y-d.y;return a*a+o*o};p.exports=t},function(p,E){/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){return Math.max(Math.abs(n-a),Math.abs(d-o))};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r){return r===void 0&&(r=2),Math.sqrt(Math.pow(a-n,r)+Math.pow(o-d,r))};p.exports=t},function(p,E){/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){return Math.abs(n-a)+Math.abs(d-o)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Back:t(334),Bounce:t(335),Circular:t(336),Cubic:t(337),Elastic:t(338),Expo:t(339),Linear:t(340),Quadratic:t(341),Quartic:t(342),Quintic:t(343),Sine:t(344),Stepped:t(345)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Ceil:t(828),Equal:t(124),Floor:t(829),GreaterThan:t(354),LessThan:t(355)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d===void 0&&(d=1e-4),Math.ceil(n-d)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d===void 0&&(d=1e-4),Math.floor(n+d)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Bezier:t(831),CatmullRom:t(832),CubicBezier:t(358),Linear:t(833),QuadraticBezier:t(359),SmoothStep:t(360),SmootherStep:t(834)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(356),d=function(a,o){for(var r=0,e=a.length-1,i=0;i<=e;i++)r+=Math.pow(1-o,e-i)*Math.pow(o,i)*a[i]*n(e,i);return r};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(194),d=function(a,o){var r=a.length-1,e=r*o,i=Math.floor(e);return a[0]===a[r]?(o<0&&(i=Math.floor(e=r*(1+o))),n(e-i,a[(i-1+r)%r],a[i],a[(i+1)%r],a[(i+2)%r])):o<0?a[0]-(n(-e,a[0],a[0],a[1],a[1])-a[0]):o>1?a[r]-(n(e-r,a[r],a[r],a[r-1],a[r-1])-a[r]):n(e-i,a[i?i-1:0],a[i],a[r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(135),d=function(a,o){var r=a.length-1,e=r*o,i=Math.floor(e);return o<0?n(a[0],a[1],e):o>1?n(a[r],a[r-1],r-e):n(a[i],a[i+1>r?r:i+1],e-i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(183),d=function(a,o,r){return o+(r-o)*n(a,0,1)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={GetNext:t(361),IsSize:t(138),IsValue:t(836)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n>0&&(n&n-1)===0};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Ceil:t(139),Floor:t(76),To:t(838)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){return a===void 0&&(a=0),d===0?n:(n-=a,n=d*Math.round(n/d),o?(a+n)/d:a+n)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=new n({initialize:function(o){o===void 0&&(o=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],o&&this.init(o)},rnd:function(){var a=2091639*this.s0+this.c*23283064365386963e-26;return this.c=a|0,this.s0=this.s1,this.s1=this.s2,this.s2=a-this.c,this.s2},hash:function(a){var o,r=this.n;a=a.toString();for(var e=0;e>>0,o-=r,o*=r,r=o>>>0,o-=r,r+=o*4294967296;return this.n=r,(r>>>0)*23283064365386963e-26},init:function(a){typeof a=="string"?this.state(a):this.sow(a)},sow:function(a){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!a)for(var o=0;o0;r--){var e=Math.floor(this.frac()*(r+1)),i=a[e];a[e]=a[r],a[r]=i}return a}});p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){for(var d=0,a=0;a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){d===void 0&&(d=0),a===void 0&&(a=10);var o=Math.pow(a,-d);return Math.ceil(n*o)/o};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return Math.abs(n-d)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(18),d=t(0),a=t(69),o=t(1),r=new a,e=new d({initialize:function i(l,s,h,f){l===void 0&&(l=0),s===void 0&&(s=0),h===void 0&&(h=0),f===void 0&&(f=i.DefaultOrder),this._x=l,this._y=s,this._z=h,this._order=f,this.onChangeCallback=o},x:{get:function(){return this._x},set:function(i){this._x=i,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(i){this._y=i,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(i){this._z=i,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(i){this._order=i,this.onChangeCallback(this)}},set:function(i,l,s,h){return h===void 0&&(h=this._order),this._x=i,this._y=l,this._z=s,this._order=h,this.onChangeCallback(this),this},copy:function(i){return this.set(i.x,i.y,i.z,i.order)},setFromQuaternion:function(i,l,s){return l===void 0&&(l=this._order),s===void 0&&(s=!1),r.fromQuat(i),this.setFromRotationMatrix(r,l,s)},setFromRotationMatrix:function(i,l,s){l===void 0&&(l=this._order),s===void 0&&(s=!1);var h=i.val,f=h[0],v=h[4],u=h[8],c=h[1],x=h[5],g=h[9],m=h[2],y=h[6],T=h[10],S=0,C=0,P=0,A=.99999;switch(l){case"XYZ":{C=Math.asin(n(u,-1,1)),Math.abs(u) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){d===void 0&&(d=0),a===void 0&&(a=10);var o=Math.pow(a,-d);return Math.floor(n*o)/o};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n/d/1e3};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n==parseFloat(n)?!(n%2):void 0};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n===parseFloat(n)?!(n%2):void 0};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return Math.min(n+d,a)};p.exports=t},function(p,E){/** + * @author Vladislav Forsh + * @copyright 2021 RoboWhale + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d=n.length;if(d===0)return 0;n.sort(function(o,r){return o-r});var a=Math.floor(d/2);return d%2===0?(n[a]+n[a-1])/2:n[a]};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return Math.max(n-d,a)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){a===void 0&&(a=d+1);var r=(n-d)/(a-d);return r>1?o!==void 0?(r=(o-n)/(o-a),r<0&&(r=0)):r=1:r<0&&(r=0),r};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){d===void 0&&(d=1);var a=Math.random()*2*Math.PI;return n.x=Math.cos(a)*d,n.y=Math.sin(a)*d,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){d===void 0&&(d=1);var a=Math.random()*2*Math.PI,o=Math.random()*2-1,r=Math.sqrt(1-o*o)*d;return n.x=Math.cos(a)*r,n.y=Math.sin(a)*r,n.z=o*d,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d===void 0&&(d=1),n.x=(Math.random()*2-1)*d,n.y=(Math.random()*2-1)*d,n.z=(Math.random()*2-1)*d,n.w=(Math.random()*2-1)*d,n};p.exports=t},function(p,E){/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r){return n.x=d+r*Math.cos(o),n.y=a+r*Math.sin(o),n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){d===void 0&&(d=0),a===void 0&&(a=10);var o=Math.pow(a,-d);return Math.round(n*o)/o};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){d===void 0&&(d=1),a===void 0&&(a=1),o===void 0&&(o=1),o*=Math.PI/n;for(var r=[],e=[],i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(3),d=function(a,o,r,e){e===void 0&&(e=new n);var i=0,l=0,s=o*r;return a>0&&a<=s&&(a>o-1?(l=Math.floor(a/o),i=a-l*o):i=a),e.set(i,l)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return Math.abs(n-d)<=a};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(39),d=t(69),a=t(365),o=new d,r=new a,e=new n,i=function(l,s,h){return r.setAxisAngle(s,h),o.fromRotationTranslation(r,e.set(0,0,0)),l.transformMat4(o)};p.exports=i},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addtexture"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="onerror"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="onload"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="ready"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="removetexture"},function(p,E){p.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join(` +`)},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelineafterflush"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelinebeforeflush"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelinebind"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelineboot"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelinedestroy"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelinerebind"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pipelineresize"},function(p,E){p.exports=["#define SHADER_NAME PHASER_GRAPHICS_FS","","precision mediump float;","","varying vec4 outColor;","","void main ()","{"," gl_FragColor = vec4(outColor.bgr * outColor.a, outColor.a);","}",""].join(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_GRAPHICS_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec4 inColor;","","varying vec4 outColor;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outColor = inColor;","}",""].join(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.bgr * outTint.a, outTint.a);"," 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)"," {"," 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(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_MULTI_FS","","precision mediump float;","","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);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_MULTI_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","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);",""," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);",""," float distToSurf = length(center - gl_FragCoord.xy);",""," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);",""," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);",""," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;",""," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);",""," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","precision mediump float;","","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);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","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);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = frame1 + frame2 * uStrength;","}",""].join(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);",""," if (uAlpha == 0.0)"," {"," gl_FragColor = c;",""," return;"," }",""," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }",""," vec4 result;",""," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];",""," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);",""," rgb *= result.a;",""," gl_FragColor = vec4(rgb, result.a);","}",""].join(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join(` +`)},function(p,E){p.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join(` +`)},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={GenerateTexture:t(388),Palettes:t(889)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ARNE16:t(389),C64:t(890),CGA:t(891),JMP:t(892),MSX:t(893)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Path:t(895),MoveTo:t(393),CubicBezier:t(390),Curve:t(94),Ellipse:t(391),Line:t(392),QuadraticBezier:t(394),Spline:t(395)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(390),a=t(391),o=t(5),r=t(392),e=t(393),i=t(394),l=t(10),s=t(395),h=t(3),f=t(14),v=new n({initialize:function(c,x){c===void 0&&(c=0),x===void 0&&(x=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new h,this._tmpVec2A=new h,this._tmpVec2B=new h,typeof c=="object"?this.fromJSON(c):this.startPoint.set(c,x)},add:function(u){return this.curves.push(u),this},circleTo:function(u,c,x){return c===void 0&&(c=!1),this.ellipseTo(u,u,0,360,c,x)},closePath:function(){var u=this.curves[0].getPoint(0),c=this.curves[this.curves.length-1].getPoint(1);return u.equals(c)||this.curves.push(new r(c,u)),this},cubicBezierTo:function(u,c,x,g,m,y){var T=this.getEndPoint(),S,C,P;return u instanceof h?(S=u,C=c,P=x):(S=new h(x,g),C=new h(m,y),P=new h(u,c)),this.add(new d(T,S,C,P))},quadraticBezierTo:function(u,c,x,g){var m=this.getEndPoint(),y,T;return u instanceof h?(y=u,T=c):(y=new h(x,g),T=new h(u,c)),this.add(new i(m,y,T))},draw:function(u,c){for(var x=0;x0?this.curves[this.curves.length-1].getPoint(1,u):u.copy(this.startPoint),u},getLength:function(){var u=this.getCurveLengths();return u[u.length-1]},getPoint:function(u,c){c===void 0&&(c=new h);for(var x=u*this.getLength(),g=this.getCurveLengths(),m=0;m=x){var y=g[m]-x,T=this.curves[m],S=T.getLength(),C=S===0?0:1-y/S;return T.getPointAt(C,c)}m++}return null},getPoints:function(u){u===void 0&&(u=12);for(var c=[],x,g=0;g1&&!c[c.length-1].equals(c[0])&&c.push(c[0]),c},getRandomPoint:function(u){return u===void 0&&(u=new h),this.getPoint(Math.random(),u)},getSpacedPoints:function(u){u===void 0&&(u=40);for(var c=[],x=0;x<=u;x++)c.push(this.getPoint(x/u));return this.autoClose&&c.push(c[0]),c},getStartPoint:function(u){return u===void 0&&(u=new h),u.copy(this.startPoint)},getTangent:function(u,c){c===void 0&&(c=new h);for(var x=u*this.getLength(),g=this.getCurveLengths(),m=0;m=x){var y=g[m]-x,T=this.curves[m],S=T.getLength(),C=S===0?0:1-y/S;return T.getTangentAt(C,c)}m++}return null},lineTo:function(u,c){u instanceof h?this._tmpVec2B.copy(u):this._tmpVec2B.set(u,c);var x=this.getEndPoint(this._tmpVec2A);return this.add(new r([x.x,x.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(u){return u.unshift(this.getEndPoint()),this.add(new s(u))},moveTo:function(u,c){return u instanceof h?this.add(new e(u.x,u.y)):this.add(new e(u,c))},toJSON:function(){for(var u=[],c=0;c + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={DataManager:t(101),DataManagerPlugin:t(897),Events:t(315)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(101),a=t(24),o=t(20),r=new n({Extends:d,initialize:function(i){d.call(this,i,i.sys.events),this.scene=i,this.systems=i.sys,i.sys.events.once(o.BOOT,this.boot,this),i.sys.events.on(o.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){d.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});a.register("DataManagerPlugin",r,"data"),p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Align:t(899),BaseShader:t(396),Bounds:t(902),Canvas:t(906),Color:t(397),ColorMatrix:t(198),Masks:t(916),RGB:t(200)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(123),d=t(17),a={In:t(900),To:t(901)};a=d(!1,a,n),p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BottomCenter:t(290),BottomLeft:t(291),BottomRight:t(292),Center:t(293),LeftCenter:t(295),QuickSet:t(289),RightCenter:t(296),TopCenter:t(297),TopLeft:t(298),TopRight:t(299)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BottomCenter:t(277),BottomLeft:t(278),BottomRight:t(279),LeftBottom:t(280),LeftCenter:t(281),LeftTop:t(282),QuickSet:t(276),RightBottom:t(283),RightCenter:t(284),RightTop:t(285),TopCenter:t(286),TopLeft:t(287),TopRight:t(288)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CenterOn:t(294),GetBottom:t(42),GetBounds:t(903),GetCenterX:t(87),GetCenterY:t(89),GetLeft:t(43),GetOffsetX:t(904),GetOffsetY:t(905),GetRight:t(44),GetTop:t(45),SetBottom:t(55),SetCenterX:t(88),SetCenterY:t(90),SetLeft:t(53),SetRight:t(54),SetTop:t(52)}},function(p,E,t){/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(42),d=t(43),a=t(44),o=t(45),r=function(e,i){i===void 0&&(i={});var l=d(e),s=o(e);return i.x=l,i.y=s,i.width=a(e)-l,i.height=n(e)-s,i};p.exports=r},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.width*n.originX};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.height*n.originY};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CanvasInterpolation:t(367),CanvasPool:t(31),Smoothing:t(192),TouchAction:t(907),UserSelect:t(908)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d===void 0&&(d="none"),n.style.msTouchAction=d,n.style["ms-touch-action"]=d,n.style["touch-action"]=d,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){d===void 0&&(d="none");var a=["-webkit-","-khtml-","-moz-","-ms-",""];return a.forEach(function(o){n.style[o+"user-select"]=d}),n.style["-webkit-touch-callout"]=d,n.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(103),d=function(a){a===void 0&&(a=1024);var o=[],r=255,e,i=255,l=0,s=0;for(e=0;e<=r;e++)o.push({r:i,g:e,b:s,color:n(i,e,s)});for(l=255,e=r;e>=0;e--)o.push({r:e,g:l,b:s,color:n(e,l,s)});for(i=0,e=0;e<=r;e++,l--)o.push({r:i,g:l,b:e,color:n(i,l,e)});for(l=0,s=255,e=0;e<=r;e++,s--,i++)o.push({r:i,g:l,b:s,color:n(i,l,s)});if(a===1024)return o;var h=[],f=0,v=1024/a;for(e=0;e + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d={r:n>>16&255,g:n>>8&255,b:n&255,a:255};return n>16777215&&(d.a=n>>>24),d};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(38),d=t(399),a=function(o,r,e){var i=e,l=e,s=e;if(r!==0){var h=e<.5?e*(1+r):e+r-e*r,f=2*e-h;i=d(f,h,o+1/3),l=d(f,h,o),s=d(f,h,o-1/3)}var v=new n;return v.setGLTo(i,l,s,1)};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(188),d=function(a,o){a===void 0&&(a=1),o===void 0&&(o=1);for(var r=[],e=0;e<=359;e++)r.push(n(e/359,a,o));return r};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(135),d=function(r,e,i,l,s,h,f,v){f===void 0&&(f=100),v===void 0&&(v=0);var u=v/f;return{r:n(r,l,u),g:n(e,s,u),b:n(i,h,u)}},a=function(r,e,i,l){return i===void 0&&(i=100),l===void 0&&(l=0),d(r.r,r.g,r.b,e.r,e.g,e.b,i,l)},o=function(r,e,i,l,s,h){return s===void 0&&(s=100),h===void 0&&(h=0),d(r.r,r.g,r.b,e,i,l,s,h)};p.exports={RGBWithRGB:d,ColorWithRGB:o,ColorWithColor:a}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(195),d=t(38),a=function(o,r){return o===void 0&&(o=0),r===void 0&&(r=255),new d(n(o,r),n(o,r),n(o,r))};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(398),d=function(a,o,r,e,i){return e===void 0&&(e=255),i===void 0&&(i="#"),i==="#"?"#"+((1<<24)+(a<<16)+(o<<8)+r).toString(16).slice(1,7):"0x"+n(e)+n(a)+n(o)+n(r)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BitmapMask:t(310),GeometryMask:t(311)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n={AddToDOM:t(142),DOMContentLoaded:t(400),GetInnerHeight:t(401),GetScreenOrientation:t(402),GetTarget:t(407),ParseXML:t(408),RemoveFromDOM:t(202),RequestAnimationFrame:t(386)};p.exports=n},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={EventEmitter:t(919)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(9),a=t(24),o=new n({Extends:d,initialize:function(){d.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});a.register("EventEmitter",o,"events"),p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(142),d=t(321),a=t(325),o=t(31),r=t(0),e=t(346),i=t(921),l=t(366),s=t(101),h=t(384),f=t(347),v=t(400),u=t(9),c=t(22),x=t(409),g=t(24),m=t(414),y=t(415),T=t(417),S=t(106),C=t(422),P=t(385),A=t(387),M=t(426),L=new r({initialize:function(B){this.config=new e(B),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new u,this.anims=new d(this),this.textures=new C(this),this.cache=new a(this),this.registry=new s(this),this.input=new x(this,this.config),this.scene=new T(this,this.config.sceneConfig),this.device=f,this.scale=new y(this,this.config),this.sound=null,this.sound=M.create(this),this.loop=new P(this,this.config.fps),this.plugins=new m(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,v(this.boot.bind(this))},boot:function(){if(!g.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),l(this),i(this),h(this),n(this.canvas,this.config.parent),this.textures.once(S.READY,this.texturesReady,this),this.events.emit(c.BOOT)},texturesReady:function(){this.events.emit(c.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 F=this.events;F.on(c.HIDDEN,this.onHidden,this),F.on(c.VISIBLE,this.onVisible,this),F.on(c.BLUR,this.onBlur,this),F.on(c.FOCUS,this.onFocus,this)},step:function(F,B){if(this.pendingDestroy)return this.runDestroy();var N=this.events;N.emit(c.PRE_STEP,F,B),N.emit(c.STEP,F,B),this.scene.update(F,B),N.emit(c.POST_STEP,F,B);var X=this.renderer;X.preRender(),N.emit(c.PRE_RENDER,X,F,B),this.scene.render(X),X.postRender(),N.emit(c.POST_RENDER,X,F,B)},headlessStep:function(F,B){if(this.pendingDestroy)return this.runDestroy();var N=this.events;N.emit(c.PRE_STEP,F,B),N.emit(c.STEP,F,B),this.scene.update(F,B),N.emit(c.POST_STEP,F,B),N.emit(c.PRE_RENDER),N.emit(c.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(c.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(c.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(F,B){B===void 0&&(B=!1),this.pendingDestroy=!0,this.removeCanvas=F,this.noReturn=B},runDestroy:function(){this.scene.destroy(),this.events.emit(c.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});p.exports=L},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(142),d=function(a){var o=a.config;if(!(!o.parent||!o.domCreateContainer)){var r=document.createElement("div");r.style.cssText=["display: block;","width: "+a.scale.width+"px;","height: "+a.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+o.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),a.domContainer=r,n(r,o.parent)}};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="boot"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragend"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragenter"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drag"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragleave"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragover"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragstart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drop"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameout"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameover"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectdown"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragend"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragenter"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drag"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragleave"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragover"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragstart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drop"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectmove"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectout"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectover"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerdown"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointermove"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerout"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerover"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerup"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="wheel"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectup"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="gameobjectwheel"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="boot"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="process"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerdown"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerdownoutside"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointermove"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerout"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerover"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerup"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerupoutside"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="wheel"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pointerlockchange"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="preupdate"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="shutdown"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="addfile"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="filecomplete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="filecomplete-"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loaderror"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="load"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="fileprogress"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="postprocess"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="progress"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};p.exports=n},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){if(!a.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var o=n.source[d];n.add("__BASE",d,0,0,o.width,o.height);for(var r=a.getElementsByTagName("SubTexture"),e,i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.source[d];return n.add("__BASE",d,0,0,a.width,a.height),n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.source[d];return n.add("__BASE",d,0,0,a.width,a.height),n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(77),d=function(a,o,r){if(!r.frames&&!r.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=a.source[o];a.add("__BASE",o,0,0,e.width,e.height);for(var i=Array.isArray(r.textures)?r.textures[o].frames:r.frames,l,s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(77),d=function(a,o,r){if(!r.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=a.source[o];a.add("__BASE",o,0,0,e.width,e.height);var i=r.frames,l;for(var s in i)if(!!i.hasOwnProperty(s)){var h=i[s];l=a.add(s,o,h.frame.x,h.frame.y,h.frame.w,h.frame.h),h.trimmed&&l.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(l.rotated=!0,l.updateUVsInverted());var f=h.anchor||h.pivot;f&&(l.customPivot=!0,l.pivotX=f.x,l.pivotY=f.y),l.customData=n(h)}for(var v in r)v!=="frames"&&(Array.isArray(r[v])?a.customData[v]=r[v].slice(0):a.customData[v]=r[v]);return a};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(2),d=function(a,o,r,e,i,l,s){var h=n(s,"frameWidth",null),f=n(s,"frameHeight",h);if(h===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var v=a.source[o];a.add("__BASE",o,0,0,v.width,v.height);var u=n(s,"startFrame",0),c=n(s,"endFrame",-1),x=n(s,"margin",0),g=n(s,"spacing",0),m=Math.floor((i-x+g)/(h+g)),y=Math.floor((l-x+g)/(f+g)),T=m*y;T===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",a.key),(u>T||u<-T)&&(u=0),u<0&&(u=T+u),c!==-1&&(T=u+(c+1));for(var S=x,C=x,P=0,A=0,M=0;Mi&&(P=L-i),F>l&&(A=F-l),a.add(M,o,r+S,e+C,h-P,f-A),S+=h+g,S+h>i&&(S=x,C+=f+g)}return a};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(2),d=function(a,o,r){var e=n(r,"frameWidth",null),i=n(r,"frameHeight",e);if(!e)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var l=a.source[0];a.add("__BASE",0,0,0,l.width,l.height),n(r,"startFrame",0),n(r,"endFrame",-1);for(var s=n(r,"margin",0),h=n(r,"spacing",0),f=o.cutX,v=o.cutY,u=o.cutWidth,c=o.cutHeight,x=o.realWidth,g=o.realHeight,m=Math.floor((x-s+h)/(e+h)),y=Math.floor((g-s+h)/(i+h)),T=o.x,S=e-T,C=e-(x-u-T),P=o.y,A=i-P,M=i-(g-c-P),L,F=s,B=s,N=0,X=o.sourceIndex,V=0;V + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=0,n=function(a,o,r,e){var i=t-e.y-e.height;a.add(r,o,e.x,i,e.width,e.height)},d=function(a,o,r){var e=a.source[o];a.add("__BASE",o,0,0,e.width,e.height),t=e.height;for(var i=r.split(` +`),l=/^[ ]*(- )*(\w+)+[: ]+(.*)/,s="",h="",f={x:0,y:0,width:0,height:0},v=0;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="decoded"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="decodedall"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="destroy"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="detune"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="detune"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="mute"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="rate"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="volume"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loop"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="looped"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="mute"},function(p,E){/** + * @author pi-kei + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pan"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pauseall"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="play"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="rate"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resumeall"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="seek"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stopall"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stop"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="unlocked"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="volume"},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n={Events:t(75),DisplayList:t(1012),GameObjectCreator:t(16),GameObjectFactory:t(5),UpdateList:t(1040),Components:t(11),GetCalcMatrix:t(19),BuildGameObject:t(28),BuildGameObjectAnimation:t(439),GameObject:t(15),BitmapText:t(148),Blitter:t(213),Bob:t(440),Container:t(214),DOMElement:t(442),DynamicBitmapText:t(215),Extern:t(444),Graphics:t(216),Group:t(113),Image:t(125),Layer:t(219),Particles:t(1074),PathFollower:t(457),RenderTexture:t(221),RetroFont:t(1082),Rope:t(223),Sprite:t(73),Text:t(224),GetTextSize:t(458),MeasureText:t(460),TextStyle:t(459),TileSprite:t(225),Zone:t(129),Video:t(226),Shape:t(34),Arc:t(461),Curve:t(462),Ellipse:t(463),Grid:t(464),IsoBox:t(465),IsoTriangle:t(466),Line:t(467),Polygon:t(468),Rectangle:t(473),Star:t(474),Triangle:t(475),Factories:{Blitter:t(1130),Container:t(1131),DOMElement:t(1132),DynamicBitmapText:t(1133),Extern:t(1134),Graphics:t(1135),Group:t(1136),Image:t(1137),Layer:t(1138),Particles:t(1139),PathFollower:t(1140),RenderTexture:t(1141),Rope:t(1142),Sprite:t(1143),StaticBitmapText:t(1144),Text:t(1145),TileSprite:t(1146),Zone:t(1147),Video:t(1148),Arc:t(1149),Curve:t(1150),Ellipse:t(1151),Grid:t(1152),IsoBox:t(1153),IsoTriangle:t(1154),Line:t(1155),Polygon:t(1156),Rectangle:t(1157),Star:t(1158),Triangle:t(1159)},Creators:{Blitter:t(1160),Container:t(1161),DynamicBitmapText:t(1162),Graphics:t(1163),Group:t(1164),Image:t(1165),Layer:t(1166),Particles:t(1167),RenderTexture:t(1168),Rope:t(1169),Sprite:t(1170),StaticBitmapText:t(1171),Text:t(1172),TileSprite:t(1173),Zone:t(1174),Video:t(1175)}};n.Shader=t(229),n.Mesh=t(230),n.PointLight=t(150),n.Factories.Shader=t(1184),n.Factories.Mesh=t(1185),n.Factories.PointLight=t(1186),n.Creators.Shader=t(1187),n.Creators.Mesh=t(1188),n.Creators.PointLight=t(1189),n.Light=t(481),n.LightsManager=t(482),n.LightsPlugin=t(1190),p.exports=n},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(110),a=t(24),o=t(75),r=t(20),e=t(79),i=new n({Extends:d,initialize:function(s){d.call(this,s),this.sortChildrenFlag=!1,this.scene=s,this.systems=s.sys,this.events=s.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.events.once(r.DESTROY,this.destroy,this)},addChildCallback:function(l){l.displayList&&l.displayList!==this&&l.removeFromDisplayList(),l.displayList||(this.queueDepthSort(),l.displayList=this,l.emit(o.ADDED_TO_SCENE,l,this.scene),this.events.emit(r.ADDED_TO_SCENE,l,this.scene))},removeChildCallback:function(l){this.queueDepthSort(),l.displayList=null,l.emit(o.REMOVED_FROM_SCENE,l,this.scene),this.events.emit(r.REMOVED_FROM_SCENE,l,this.scene)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(e(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(l,s){return l._depth-s._depth},getChildren:function(){return this.list},shutdown:function(){for(var l=this.list,s=l.length;s--;)l[s].destroy(!0);l.length=0,this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});a.register("DisplayList",i,"displayList"),p.exports=i},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CheckMatrix:t(209),MatrixToString:t(1014),ReverseColumns:t(1015),ReverseRows:t(1016),Rotate180:t(1017),RotateLeft:t(1018),RotateMatrix:t(147),RotateRight:t(1019),Translate:t(1020),TransposeMatrix:t(435)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(186),d=t(209),a=function(o){var r="";if(!d(o))return r;for(var e=0;e + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.reverse()};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){for(var d=0;d + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(147),d=function(a){return n(a,180)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(147),d=function(a){return n(a,90)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(147),d=function(a){return n(a,-90)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(178),d=t(179),a=function(o,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),e!==0&&(e<0?n(o,Math.abs(e)):d(o,e)),r!==0)for(var i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r){if(r===void 0&&(r=n),a>0){var e=a-n.length;if(e<=0)return null}if(!Array.isArray(d))return n.indexOf(d)===-1?(n.push(d),o&&o.call(r,d),d):null;for(var i=d.length-1;i>=0;)n.indexOf(d[i])!==-1&&d.splice(i,1),i--;if(i=d.length,i===0)return null;a>0&&i>e&&(d.splice(e),i=e);for(var l=0;l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r,e){if(a===void 0&&(a=0),e===void 0&&(e=n),o>0){var i=o-n.length;if(i<=0)return null}if(!Array.isArray(d))return n.indexOf(d)===-1?(n.splice(a,0,d),r&&r.call(e,d),d):null;for(var l=d.length-1;l>=0;)n.indexOf(d[l])!==-1&&d.pop(),l--;if(l=d.length,l===0)return null;o>0&&l>i&&(d.splice(i),l=i);for(var s=l-1;s>=0;s--){var h=d[s];n.splice(a,0,h),r&&r.call(e,h)}return d};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.indexOf(d);return a!==-1&&a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(78),d=function(a,o,r,e,i){e===void 0&&(e=0),i===void 0&&(i=a.length);var l=0;if(n(a,e,i))for(var s=e;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o,r=[null];for(o=3;o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(78),d=function(a,o,r,e,i){if(e===void 0&&(e=0),i===void 0&&(i=a.length),n(a,e,i)){var l,s=[null];for(l=5;l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.indexOf(d);if(a>0){var o=n[a-1],r=n.indexOf(o);n[a]=o,n[r]=d}return n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=n.indexOf(d);if(o===-1||a<0||a>=n.length)throw new Error("Supplied index out of bounds");return o!==a&&(n.splice(o,1),n.splice(a,0,d)),d};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.indexOf(d);if(a!==-1&&a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){if(d===a)return n;var o=n.indexOf(d),r=n.indexOf(a);if(o<0||r<0)throw new Error("Supplied items must be elements of the same array");return o>r||(n.splice(o,1),r===n.length-1?n.push(d):n.splice(r,0,d)),n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){if(d===a)return n;var o=n.indexOf(d),r=n.indexOf(a);if(o<0||r<0)throw new Error("Supplied items must be elements of the same array");return o + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(363),d=function(a,o,r){a===void 0&&(a=0),o===void 0&&(o=null),r===void 0&&(r=1),o===null&&(o=a,a=0);for(var e=[],i=Math.max(n((o-a)/(r||1)),0),l=0;l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(74),d=function(a,o,r,e){if(e===void 0&&(e=a),o<0||o>a.length-1)throw new Error("Index out of bounds");var i=n(a,o);return r&&r.call(e,i),i};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(78),d=function(a,o,r,e,i){if(o===void 0&&(o=0),r===void 0&&(r=a.length),i===void 0&&(i=a),n(a,o,r)){var l=r-o,s=a.splice(o,l);if(e)for(var h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(74),d=function(a,o,r){o===void 0&&(o=0),r===void 0&&(r=a.length);var e=o+Math.floor(Math.random()*r);return n(a,e)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=n.indexOf(d),r=n.indexOf(a);return o!==-1&&r===-1?(n[o]=a,!0):!1};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.indexOf(d);return a!==-1&&a>0&&(n.splice(a,1),n.unshift(d)),d};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(78),d=function(a,o,r,e,i){if(e===void 0&&(e=0),i===void 0&&(i=a.length),n(a,e,i))for(var l=e;l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){if(d===a)return n;var o=n.indexOf(d),r=n.indexOf(a);if(o<0||r<0)throw new Error("Supplied items must be elements of the same array");return n[o]=a,n[r]=d,n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(211),a=t(24),o=t(20),r=new n({Extends:d,initialize:function(i){d.call(this),this.checkQueue=!0,this.scene=i,this.systems=i.sys,i.sys.events.once(o.BOOT,this.boot,this),i.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(o.PRE_UPDATE,this.update,this),e.on(o.UPDATE,this.sceneUpdate,this),e.once(o.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,i){for(var l=this._active,s=l.length,h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="add"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="remove"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){if(a===void 0&&(a=!1),o===void 0)return o={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},o;var r=n.text,e=r.length,i=n.maxWidth,l=n.wordWrapCharCode,s=Number.MAX_VALUE,h=Number.MAX_VALUE,f=0,v=0,u=n.fontData.chars,c=n.fontData.lineHeight,x=n.letterSpacing,g=0,m=0,y=0,T=null,S=n._align,C=0,P=0,A=n.fontSize/n.fontData.size,M=A*n.scaleX,L=A*n.scaleY,F=null,B=0,N=[],X=Number.MAX_VALUE,V=0,W=0,O=0,R,I=[],D=[],G=null;if(i>0){for(R=0;Ri||Q>i?(H.push(w.i-1),w.cr?(H.push(w.i+w.word.length),z=0,Y=null):Y=w):w.cr&&(H.push(w.i+w.word.length),z=0,Y=null)}var k=function(ft,lt,pt){return ft.substr(0,lt)+pt+ft.substr(lt+1)};for(R=H.length-1;R>=0;R--)r=k(r,H[R],` +`);o.wrappedText=r,e=r.length,I=[],G=null}var it=0;for(R=0;RV&&(V=O),OC&&(s=C),h>P&&(h=P);var q=C+T.xAdvance,$=P+c;fV&&(V=O),O0)for(var _=0;_ + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(212),d=function(a,o,r,e,i,l,s){var h=a.sys.textures.get(r),f=h.get(e),v=a.sys.cache.xml.get(i);if(f&&v){var u=n(v,f,l,s,h);return a.sys.cache.bitmapFont.add(o,{data:u,texture:r,frame:e,fromAtlas:!0}),!0}else return!1};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1046),d=t(1048),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1047),d=t(19),a=t(12),o=function(r,e,i,l){var s=e._text,h=s.length;if(h!==0){i.addToRenderList(e);var f=r.pipelines.set(e.pipeline,e),v=d(e,i,l).calc,u=i.roundPixels,c=i.alpha,x=e.charColors,g=e.tintFill,m=a.getTintAppendFloatAlpha,y=m(e.tintTopLeft,c*e._alphaTL),T=m(e.tintTopRight,c*e._alphaTR),S=m(e.tintBottomLeft,c*e._alphaBL),C=m(e.tintBottomRight,c*e._alphaBR),P=e.frame.glTexture,A=f.setGameObject(e),M=e.getTextBounds(!1),L,F,B,N=M.characters,X=e.dropShadowX,V=e.dropShadowY,W=X!==0||V!==0;if(r.pipelines.preBatch(e),W){var O=e.dropShadowColor,R=e.dropShadowAlpha,I=m(O,c*R*e._alphaTL),D=m(O,c*R*e._alphaTR),G=m(O,c*R*e._alphaBL),U=m(O,c*R*e._alphaBR);for(L=0;L + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r,e,i,l,s,h,f,v,u,c,x){var g=a.x-d.displayOriginX+r,m=a.y-d.displayOriginY+e,y=g+a.w,T=m+a.h,S=i.getXRound(g,m,l),C=i.getYRound(g,m,l),P=i.getXRound(g,T,l),A=i.getYRound(g,T,l),M=i.getXRound(y,T,l),L=i.getYRound(y,T,l),F=i.getXRound(y,m,l),B=i.getYRound(y,m,l);n.batchQuad(d,S,C,P,A,M,L,F,B,o.u0,o.v0,o.u1,o.v1,s,h,f,v,u,c,x)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(30),d=function(a,o,r,e){var i=o._text,l=i.length,s=a.currentContext;if(!(l===0||!n(a,s,o,r,e))){r.addToRenderList(o);var h=o.fromAtlas?o.frame:o.texture.frames.__BASE,f=o.fontData.chars,v=o.fontData.lineHeight,u=o._letterSpacing,c=0,x=0,g=0,m=null,y=0,T=0,S=0,C=0,P=0,A=0,M=null,L=0,F=h.source.image,B=h.cutX,N=h.cutY,X=o._fontSize/o.fontData.size,V=o._align,W=0,O=0,R=o.getTextBounds(!1);o.maxWidth>0&&(i=R.wrappedText,l=i.length);var I=o._bounds.lines;V===1?O=(I.longest-I.lengths[0])/2:V===2&&(O=I.longest-I.lengths[0]),s.translate(-o.displayOriginX,-o.displayOriginY);for(var D=r.roundPixels,G=0;G + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1050),d=t(1051),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(25),d=t(12),a=new n,o=function(r,e,i,l){var s=e.getRenderList();if(s.length!==0){var h=i.alpha*e.alpha;if(h!==0){i.addToRenderList(e);var f=r.pipelines.set(this.pipeline,e),v=i.scrollX*e.scrollFactorX,u=i.scrollY*e.scrollFactorY,c=a.copyFrom(i.matrix);l&&(c.multiplyWithOffset(l,-v,-u),v=0,u=0);var x=e.x-v,g=e.y-u,m=-1,y=!1,T=i.roundPixels;r.pipelines.preBatch(e);for(var S=0;S + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r=d.getRenderList();if(r.length!==0){var e=n.currentContext,i=a.alpha*d.alpha;if(i!==0){a.addToRenderList(d),e.globalCompositeOperation=n.blendModes[d.blendMode],e.imageSmoothingEnabled=!(!n.antialias||d.frame.source.scaleMode);var l=d.x-a.scrollX*d.scrollFactorX,s=d.y-a.scrollY*d.scrollFactorY;e.save(),o&&o.copyToContext(e);for(var h=a.roundPixels,f=0;f + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1053),d=t(1054),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E){/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){a.addToRenderList(d);var r=d.list,e=r.length;if(e!==0){var i=d.localTransform;o?(i.loadIdentity(),i.multiply(o),i.translate(d.x,d.y),i.rotate(d.rotation),i.scale(d.scaleX,d.scaleY)):i.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY),n.pipelines.preBatch(d);var l=d.blendMode!==-1;l||n.setBlendMode(0);for(var s=d.alpha,h=d.scrollFactorX,f=d.scrollFactorY,v=0;v + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){a.addToRenderList(d);var r=d.list;if(r.length!==0){var e=d.localTransform;o?(e.loadIdentity(),e.multiply(o),e.translate(d.x,d.y),e.rotate(d.rotation),e.scale(d.scaleX,d.scaleY)):e.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY);var i=d.blendMode!==-1;i||n.setBlendMode(0);var l=d._alpha,s=d.scrollFactorX,h=d.scrollFactorY;d.mask&&d.mask.preRenderCanvas(n,null,a);for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(443),d=t(443),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1058),d=t(1059),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=t(25),a=t(12),o=new d,r=function(e,i,l,s){var h=i.text,f=h.length;if(f!==0){l.addToRenderList(i);var v=e.pipelines.set(i.pipeline,i),u=n(i,l,s),c=u.sprite,x=u.calc,g=o,m=i.cropWidth>0||i.cropHeight>0;m&&(v.flush(),e.pushScissor(x.tx,x.ty,i.cropWidth*x.scaleX,i.cropHeight*x.scaleY));var y=i.frame,T=y.glTexture,S=i.tintFill,C=a.getTintAppendFloatAlpha(i.tintTopLeft,l.alpha*i._alphaTL),P=a.getTintAppendFloatAlpha(i.tintTopRight,l.alpha*i._alphaTR),A=a.getTintAppendFloatAlpha(i.tintBottomLeft,l.alpha*i._alphaBL),M=a.getTintAppendFloatAlpha(i.tintBottomRight,l.alpha*i._alphaBR),L=v.setGameObject(i),F=0,B=0,N=0,X=0,V=i.letterSpacing,W,O=0,R=0,I,D=i.scrollX,G=i.scrollY,U=i.fontData,Y=U.chars,z=U.lineHeight,H=i.fontSize/U.size,w=0,K=i._align,Z=0,J=0,j=i.getTextBounds(!1);i.maxWidth>0&&(h=j.wrappedText,f=h.length);var Q=i._bounds.lines;K===1?J=(Q.longest-Q.lengths[0])/2:K===2&&(J=Q.longest-Q.lengths[0]);var k=l.roundPixels,it=i.displayCallback,tt=i.callbackData;e.pipelines.preBatch(i);for(var q=0;q + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(30),d=function(a,o,r,e){var i=o._text,l=i.length,s=a.currentContext;if(!(l===0||!n(a,s,o,r,e))){r.addToRenderList(o);var h=o.fromAtlas?o.frame:o.texture.frames.__BASE,f=o.displayCallback,v=o.callbackData,u=o.fontData.chars,c=o.fontData.lineHeight,x=o._letterSpacing,g=0,m=0,y=0,T=null,S=0,C=0,P=0,A=0,M=0,L=0,F=null,B=0,N=o.frame.source.image,X=h.cutX,V=h.cutY,W=0,O=0,R=o._fontSize/o.fontData.size,I=o._align,D=0,G=0;o.getTextBounds(!1);var U=o._bounds.lines;I===1?G=(U.longest-U.lengths[0])/2:I===2&&(G=U.longest-U.lengths[0]),s.translate(-o.displayOriginX,-o.displayOriginY);var Y=r.roundPixels;o.cropWidth>0&&o.cropHeight>0&&(s.beginPath(),s.rect(0,0,o.cropWidth,o.cropHeight),s.clip());for(var z=0;z + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1061),d=t(1062),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=function(a,o,r,e){a.pipelines.clear();var i=n(o,r,e).calc;o.render.call(o,a,r,i),a.pipelines.rebind()};p.exports=d},function(p,E){},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1064),d=t(448),d=t(448),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(217),d=t(19),a=t(25),o=t(12),r=function(h,f,v){this.x=h,this.y=f,this.width=v},e=function(h,f,v){this.points=[],this.pointsLength=1,this.points[0]=new r(h,f,v)},i=[],l=new a,s=function(h,f,v,u){if(f.commandBuffer.length!==0){v.addToRenderList(f);var c=h.pipelines.set(f.pipeline,f);h.pipelines.preBatch(f);for(var x=d(f,v,u).calc,g=l.loadIdentity(),m=f.commandBuffer,y=v.alpha*f.alpha,T=1,S=c.fillTint,C=c.strokeTint,P=0,A=0,M=0,L=.01,F=Math.PI*2,B,N=[],X=0,V=!0,W=null,O=o.getTintAppendFloatAlpha,R=0;R0&&(q=-F+q%F):q>F?q=F:q<0&&(q=F+q%F),W===null&&(W=new e(Q+Math.cos(tt)*it,k+Math.sin(tt)*it,T),N.push(W),j+=L);j<1+nt;)M=q*j+tt,P=Q+Math.cos(M)*it,A=k+Math.sin(M)*it,W.points.push(new r(P,A,T)),j+=L;M=q+tt,P=Q+Math.cos(M)*it,A=k+Math.sin(M)*it,W.points.push(new r(P,A,T));break}case n.FILL_RECT:{c.batchFillRect(m[++R],m[++R],m[++R],m[++R],g,x);break}case n.FILL_TRIANGLE:{c.batchFillTriangle(m[++R],m[++R],m[++R],m[++R],m[++R],m[++R],g,x);break}case n.STROKE_TRIANGLE:{c.batchStrokeTriangle(m[++R],m[++R],m[++R],m[++R],m[++R],m[++R],T,g,x);break}case n.LINE_TO:{W!==null?W.points.push(new r(m[++R],m[++R],T)):(W=new e(m[++R],m[++R],T),N.push(W));break}case n.MOVE_TO:{W=new e(m[++R],m[++R],T),N.push(W);break}case n.SAVE:{i.push(g.copyToArray());break}case n.RESTORE:{g.copyFromArray(i.pop());break}case n.TRANSLATE:{Q=m[++R],k=m[++R],g.translate(Q,k);break}case n.SCALE:{Q=m[++R],k=m[++R],g.scale(Q,k);break}case n.ROTATE:{g.rotate(m[++R]);break}}h.pipelines.postBatch(f)}};p.exports=s},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1066),d=t(1067),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){a.addToRenderList(d),d.pipeline.batchSprite(d,a,o)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){a.addToRenderList(d),n.batchSprite(d,d.frame,a,o)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1069),d=t(1070),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){a.addToRenderList(d),this.pipeline.batchSprite(d,a,o)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){a.addToRenderList(d),n.batchSprite(d,d.frame,a,o)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1072),d=t(1073),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=d.list,r=o.length;if(r!==0){d.depthSort(),n.pipelines.preBatch(d);var e=d.blendMode!==-1;e||n.setBlendMode(0);for(var i=d.alpha,l=0;l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=d.list;if(o.length!==0){d.depthSort();var r=d.blendMode!==-1;r||n.setBlendMode(0);var e=d._alpha;d.mask&&d.mask.preRenderCanvas(n,null,a);for(var i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={EmitterOp:t(449),GravityWell:t(450),Particle:t(451),ParticleEmitter:t(452),ParticleEmitterManager:t(220),Zones:t(1078)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1076),d=t(1077),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(25),d=t(12),a=new n,o=new n,r=new n,e=new n,i=function(l,s,h,f){var v=s.emitters.list,u=v.length;if(u!==0){var c=l.pipelines.set(s.pipeline),x=a,g=o,m=r,y=e;f?(y.loadIdentity(),y.multiply(f),y.translate(s.x,s.y),y.rotate(s.rotation),y.scale(s.scaleX,s.scaleY)):y.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY);var T=h.roundPixels,S=s.defaultFrame.glTexture,C=d.getTintAppendFloatAlpha,P=c.setGameObject(s,s.defaultFrame);l.pipelines.preBatch(s);for(var A=0;A + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(25),d=new n,a=new n,o=new n,r=new n,e=function(i,l,s,h){var f=l.emitters.list,v=f.length;if(v!==0){var u=d.copyFrom(s.matrix),c=a,x=o,g=r;h?(g.loadIdentity(),g.multiply(h),g.translate(l.x,l.y),g.rotate(l.rotation),g.scale(l.scaleX,l.scaleY)):g.applyITRS(l.x,l.y,l.rotation,l.scaleX,l.scaleY);for(var m=i.currentContext,y=s.roundPixels,T=0;T + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={DeathZone:t(453),EdgeZone:t(454),RandomZone:t(456)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1080),d=t(1081),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(12),d=function(a,o,r,e){r.addToRenderList(o);var i=r.alpha,l=o.renderTarget,s=l.width,h=l.height,f=n.getTintAppendFloatAlpha,v=a.pipelines.set(o.pipeline),u=v.setTexture2D(l.texture);a.pipelines.preBatch(o),v.batchTexture(o,l.texture,s,h,o.x,o.y,s,h,o.scaleX,o.scaleY,o.rotation,o.flipX,!o.flipY,o.scrollFactorX,o.scrollFactorY,o.displayOriginX,o.displayOriginY,0,0,s,h,f(o.tintTopLeft,i*o._alphaTL),f(o.tintTopRight,i*o._alphaTR),f(o.tintBottomLeft,i*o._alphaBL),f(o.tintBottomRight,i*o._alphaBR),o.tintFill,0,0,r,e,!0,u),a.resetTextures(),a.pipelines.postBatch(o)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){a.addToRenderList(d),n.batchSprite(d,d.frame,a,o)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1083),d=t(17),a={Parse:t(1084)};a=d(!1,a,n),p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ`,TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:`ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' `,TEXT_SET7:`AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39`,TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:`ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(6),d=function(a,o){var r=o.width,e=o.height,i=Math.floor(r/2),l=Math.floor(e/2),s=n(o,"chars","");if(s!==""){var h=n(o,"image",""),f=a.sys.textures.getFrame(h),v=f.cutX,u=f.cutY,c=f.source.width,x=f.source.height,g=n(o,"offset.x",0),m=n(o,"offset.y",0),y=n(o,"spacing.x",0),T=n(o,"spacing.y",0),S=n(o,"lineSpacing",0),C=n(o,"charsPerRow",null);C===null&&(C=c/r,C>s.length&&(C=s.length));for(var P=g,A=m,M={retroFont:!0,font:h,size:r,lineHeight:e+S,chars:{}},L=0,F=0;F + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1086),d=t(1087),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=t(12),a=function(o,r,e,i){e.addToRenderList(r);var l=o.pipelines.set(r.pipeline,r),s=n(r,e,i).calc,h=r.vertices,f=r.uv,v=r.colors,u=r.alphas,c=r.alpha,x=d.getTintAppendFloatAlpha,g=e.roundPixels,m=h.length,y=Math.floor(m*.5);l.flush(),o.pipelines.preBatch(r);var T=l.setGameObject(r),S=l.vertexViewF32,C=l.vertexViewU32,P=l.vertexCount*l.currentShader.vertexComponentCount-1,A=0,M=r.tintFill;r.dirty&&r.updateVertices();for(var L=r.debugCallback,F=[],B=0;B + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(){};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1089),d=t(1090),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(12),d=function(a,o,r,e){if(!(o.width===0||o.height===0)){r.addToRenderList(o);var i=o.frame,l=i.width,s=i.height,h=n.getTintAppendFloatAlpha,f=a.pipelines.set(o.pipeline,o),v=f.setTexture2D(i.glTexture,o);a.pipelines.preBatch(o),f.batchTexture(o,i.glTexture,l,s,o.x,o.y,l/o.style.resolution,s/o.style.resolution,o.scaleX,o.scaleY,o.rotation,o.flipX,o.flipY,o.scrollFactorX,o.scrollFactorY,o.displayOriginX,o.displayOriginY,0,0,l,s,h(o.tintTopLeft,r.alpha*o._alphaTL),h(o.tintTopRight,r.alpha*o._alphaTR),h(o.tintBottomLeft,r.alpha*o._alphaBL),h(o.tintBottomRight,r.alpha*o._alphaBR),o.tintFill,0,0,r,e,!1,v),a.pipelines.postBatch(o)}};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){d.width===0||d.height===0||(a.addToRenderList(d),n.batchSprite(d,d.frame,a,o))};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1092),d=t(1093),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(12),d=function(a,o,r,e){o.updateCanvas();var i=o.width,l=o.height;if(!(i===0||l===0)){r.addToRenderList(o),a.pipelines.preBatch(o);var s=n.getTintAppendFloatAlpha,h=a.pipelines.set(o.pipeline,o),f=h.setTexture2D(o.fillPattern,o);h.batchTexture(o,o.fillPattern,o.displayFrame.width*o.tileScaleX,o.displayFrame.height*o.tileScaleY,o.x,o.y,i,l,o.scaleX,o.scaleY,o.rotation,o.flipX,o.flipY,o.scrollFactorX,o.scrollFactorY,o.originX*i,o.originY*l,0,0,i,l,s(o.tintTopLeft,r.alpha*o._alphaTL),s(o.tintTopRight,r.alpha*o._alphaTR),s(o.tintBottomLeft,r.alpha*o._alphaBL),s(o.tintBottomRight,r.alpha*o._alphaBR),o.tintFill,o.tilePositionX%o.displayFrame.width/o.displayFrame.width,o.tilePositionY%o.displayFrame.height/o.displayFrame.height,r,e,!1,f),a.pipelines.postBatch(o)}};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){d.updateCanvas(),a.addToRenderList(d),n.batchSprite(d,d.frame,a,o)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1095),d=t(1096),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){d.videoTexture&&(a.addToRenderList(d),d.pipeline.batchSprite(d,a,o))};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){d.videoTexture&&(a.addToRenderList(d),n.batchSprite(d,d.frame,a,o))};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1098),d=t(1099),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=t(114),a=t(81),o=function(r,e,i,l){i.addToRenderList(e);var s=r.pipelines.set(e.pipeline),h=n(e,i,l),f=s.calcMatrix.copyFrom(h.calc),v=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&d(s,f,e,c,v,u),e.isStroked&&a(s,e,c,v,u),r.pipelines.postBatch(e)};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(36),d=t(48),a=t(60),o=t(30),r=function(e,i,l,s){l.addToRenderList(i);var h=e.currentContext;if(o(e,h,i,l,s)){var f=i.radius;h.beginPath(),h.arc(f-i.originX*(f*2),f-i.originY*(f*2),f,n(i._startAngle),n(i._endAngle),i.anticlockwise),i.closePath&&h.closePath(),i.isFilled&&(d(h,i),h.fill()),i.isStroked&&(a(h,i),h.stroke()),h.restore()}};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1101),d=t(1102),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(114),d=t(19),a=t(81),o=function(r,e,i,l){i.addToRenderList(e);var s=r.pipelines.set(e.pipeline),h=d(e,i,l),f=s.calcMatrix.copyFrom(h.calc),v=e._displayOriginX+e._curveBounds.x,u=e._displayOriginY+e._curveBounds.y,c=i.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&n(s,f,e,c,v,u),e.isStroked&&a(s,e,c,v,u),r.pipelines.postBatch(e)};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(48),d=t(60),a=t(30),o=function(r,e,i,l){i.addToRenderList(e);var s=r.currentContext;if(a(r,s,e,i,l)){var h=e._displayOriginX+e._curveBounds.x,f=e._displayOriginY+e._curveBounds.y,v=e.pathData,u=v.length-1,c=v[0]-h,x=v[1]-f;s.beginPath(),s.moveTo(c,x),e.closePath||(u-=2);for(var g=2;g + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1104),d=t(1105),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(114),d=t(19),a=t(81),o=function(r,e,i,l){i.addToRenderList(e);var s=r.pipelines.set(e.pipeline),h=d(e,i,l),f=s.calcMatrix.copyFrom(h.calc),v=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&n(s,f,e,c,v,u),e.isStroked&&a(s,e,c,v,u),r.pipelines.postBatch(e)};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(48),d=t(60),a=t(30),o=function(r,e,i,l){i.addToRenderList(e);var s=r.currentContext;if(a(r,s,e,i,l)){var h=e._displayOriginX,f=e._displayOriginY,v=e.pathData,u=v.length-1,c=v[0]-h,x=v[1]-f;s.beginPath(),s.moveTo(c,x),e.closePath||(u-=2);for(var g=2;g + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1107),d=t(1108),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=t(12),a=function(o,r,e,i){e.addToRenderList(r);var l=o.pipelines.set(r.pipeline),s=n(r,e,i),h=l.calcMatrix.copyFrom(s.calc);h.translate(-r._displayOriginX,-r._displayOriginY);var f=e.alpha*r.alpha,v=r.width,u=r.height,c=r.cellWidth,x=r.cellHeight,g=Math.ceil(v/c),m=Math.ceil(u/x),y=c,T=x,S=c-(g*c-v),C=x-(m*x-u),P,A,M=r.showCells,L=r.showAltCells,F=r.showOutline,B=0,N=0,X=0,V=0,W=0;if(F&&(y--,T--,S===c&&S--,C===x&&C--),o.pipelines.preBatch(r),M&&r.fillAlpha>0)for(P=l.fillTint,A=d.getTintAppendFloatAlpha(r.fillColor,r.fillAlpha*f),P.TL=A,P.TR=A,P.BL=A,P.BR=A,N=0;N0)for(P=l.fillTint,A=d.getTintAppendFloatAlpha(r.altFillColor,r.altFillAlpha*f),P.TL=A,P.TR=A,P.BL=A,P.BR=A,N=0;N0){var O=l.strokeTint,R=d.getTintAppendFloatAlpha(r.outlineFillColor,r.outlineFillAlpha*f);for(O.TL=R,O.TR=R,O.BL=R,O.BR=R,B=1;B + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(48),d=t(60),a=t(30),o=function(r,e,i,l){i.addToRenderList(e);var s=r.currentContext;if(a(r,s,e,i,l)){var h=-e._displayOriginX,f=-e._displayOriginY,v=i.alpha*e.alpha,u=e.width,c=e.height,x=e.cellWidth,g=e.cellHeight,m=Math.ceil(u/x),y=Math.ceil(c/g),T=x,S=g,C=x-(m*x-u),P=g-(y*g-c),A=e.showCells,M=e.showAltCells,L=e.showOutline,F=0,B=0,N=0,X=0,V=0;if(L&&(T--,S--,C===x&&C--,P===g&&P--),A&&e.fillAlpha>0)for(n(s,e),B=0;B0)for(n(s,e,e.altFillColor,e.altFillAlpha*v),B=0;B0){for(d(s,e,e.outlineFillColor,e.outlineFillAlpha*v),F=1;F + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1110),d=t(1111),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=t(12),a=function(o,r,e,i){e.addToRenderList(r);var l=o.pipelines.set(r.pipeline),s=n(r,e,i),h=l.calcMatrix.copyFrom(s.calc),f=r.width,v=r.height,u=f/2,c=f/r.projection,x=e.alpha*r.alpha;if(!!r.isFilled){var g,m,y,T,S,C,P,A,M;o.pipelines.preBatch(r),r.showTop&&(g=d.getTintAppendFloatAlpha(r.fillTop,x),m=h.getX(-u,-v),y=h.getY(-u,-v),T=h.getX(0,-c-v),S=h.getY(0,-c-v),C=h.getX(u,-v),P=h.getY(u,-v),A=h.getX(0,c-v),M=h.getY(0,c-v),l.batchQuad(r,m,y,T,S,C,P,A,M,0,0,1,1,g,g,g,g,2)),r.showLeft&&(g=d.getTintAppendFloatAlpha(r.fillLeft,x),m=h.getX(-u,0),y=h.getY(-u,0),T=h.getX(0,c),S=h.getY(0,c),C=h.getX(0,c-v),P=h.getY(0,c-v),A=h.getX(-u,-v),M=h.getY(-u,-v),l.batchQuad(r,m,y,T,S,C,P,A,M,0,0,1,1,g,g,g,g,2)),r.showRight&&(g=d.getTintAppendFloatAlpha(r.fillRight,x),m=h.getX(u,0),y=h.getY(u,0),T=h.getX(0,c),S=h.getY(0,c),C=h.getX(0,c-v),P=h.getY(0,c-v),A=h.getX(u,-v),M=h.getY(u,-v),l.batchQuad(r,m,y,T,S,C,P,A,M,0,0,1,1,g,g,g,g,2)),o.pipelines.postBatch(r)}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(48),d=t(30),a=function(o,r,e,i){e.addToRenderList(r);var l=o.currentContext;if(d(o,l,r,e,i)&&r.isFilled){var s=r.width,h=r.height,f=s/2,v=s/r.projection;r.showTop&&(n(l,r,r.fillTop),l.beginPath(),l.moveTo(-f,-h),l.lineTo(0,-v-h),l.lineTo(f,-h),l.lineTo(f,-1),l.lineTo(0,v-1),l.lineTo(-f,-1),l.lineTo(-f,-h),l.fill()),r.showLeft&&(n(l,r,r.fillLeft),l.beginPath(),l.moveTo(-f,0),l.lineTo(0,v),l.lineTo(0,v-h),l.lineTo(-f,-h),l.lineTo(-f,0),l.fill()),r.showRight&&(n(l,r,r.fillRight),l.beginPath(),l.moveTo(f,0),l.lineTo(0,v),l.lineTo(0,v-h),l.lineTo(f,-h),l.lineTo(f,0),l.fill()),l.restore()}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1113),d=t(1114),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=t(12),a=function(o,r,e,i){e.addToRenderList(r);var l=o.pipelines.set(r.pipeline),s=n(r,e,i),h=l.calcMatrix.copyFrom(s.calc),f=r.width,v=r.height,u=f/2,c=f/r.projection,x=r.isReversed,g=e.alpha*r.alpha;if(!!r.isFilled){o.pipelines.preBatch(r);var m,y,T,S,C,P,A;if(r.showTop&&x){m=d.getTintAppendFloatAlpha(r.fillTop,g),y=h.getX(-u,-v),T=h.getY(-u,-v),S=h.getX(0,-c-v),C=h.getY(0,-c-v),P=h.getX(u,-v),A=h.getY(u,-v);var M=h.getX(0,c-v),L=h.getY(0,c-v);l.batchQuad(r,y,T,S,C,P,A,M,L,0,0,1,1,m,m,m,m,2)}r.showLeft&&(m=d.getTintAppendFloatAlpha(r.fillLeft,g),x?(y=h.getX(-u,-v),T=h.getY(-u,-v),S=h.getX(0,c),C=h.getY(0,c),P=h.getX(0,c-v),A=h.getY(0,c-v)):(y=h.getX(-u,0),T=h.getY(-u,0),S=h.getX(0,c),C=h.getY(0,c),P=h.getX(0,c-v),A=h.getY(0,c-v)),l.batchTri(r,y,T,S,C,P,A,0,0,1,1,m,m,m,2)),r.showRight&&(m=d.getTintAppendFloatAlpha(r.fillRight,g),x?(y=h.getX(u,-v),T=h.getY(u,-v),S=h.getX(0,c),C=h.getY(0,c),P=h.getX(0,c-v),A=h.getY(0,c-v)):(y=h.getX(u,0),T=h.getY(u,0),S=h.getX(0,c),C=h.getY(0,c),P=h.getX(0,c-v),A=h.getY(0,c-v)),l.batchTri(r,y,T,S,C,P,A,0,0,1,1,m,m,m,2)),o.pipelines.postBatch(r)}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(48),d=t(30),a=function(o,r,e,i){e.addToRenderList(r);var l=o.currentContext;if(d(o,l,r,e,i)&&r.isFilled){var s=r.width,h=r.height,f=s/2,v=s/r.projection,u=r.isReversed;r.showTop&&u&&(n(l,r,r.fillTop),l.beginPath(),l.moveTo(-f,-h),l.lineTo(0,-v-h),l.lineTo(f,-h),l.lineTo(0,v-h),l.fill()),r.showLeft&&(n(l,r,r.fillLeft),l.beginPath(),u?(l.moveTo(-f,-h),l.lineTo(0,v),l.lineTo(0,v-h)):(l.moveTo(-f,0),l.lineTo(0,v),l.lineTo(0,v-h)),l.fill()),r.showRight&&(n(l,r,r.fillRight),l.beginPath(),u?(l.moveTo(f,-h),l.lineTo(0,v),l.lineTo(0,v-h)):(l.moveTo(f,0),l.lineTo(0,v),l.lineTo(0,v-h)),l.fill()),l.restore()}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1116),d=t(1117),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=t(12),a=function(o,r,e,i){e.addToRenderList(r);var l=o.pipelines.set(r.pipeline),s=n(r,e,i);l.calcMatrix.copyFrom(s.calc);var h=r._displayOriginX,f=r._displayOriginY,v=e.alpha*r.alpha;if(o.pipelines.preBatch(r),r.isStroked){var u=l.strokeTint,c=d.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*v);u.TL=c,u.TR=c,u.BL=c,u.BR=c;var x=r._startWidth,g=r._endWidth;l.batchLine(r.geom.x1-h,r.geom.y1-f,r.geom.x2-h,r.geom.y2-f,x,g,1,0,!1,s.sprite,s.camera)}o.pipelines.postBatch(r)};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(60),d=t(30),a=function(o,r,e,i){e.addToRenderList(r);var l=o.currentContext;if(d(o,l,r,e,i)){var s=r._displayOriginX,h=r._displayOriginY;r.isStroked&&(n(l,r),l.beginPath(),l.moveTo(r.geom.x1-s,r.geom.y1-h),l.lineTo(r.geom.x2-s,r.geom.y2-h),l.stroke()),l.restore()}};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1119),d=t(1120),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(114),d=t(19),a=t(81),o=function(r,e,i,l){i.addToRenderList(e);var s=r.pipelines.set(e.pipeline),h=d(e,i,l),f=s.calcMatrix.copyFrom(h.calc),v=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&n(s,f,e,c,v,u),e.isStroked&&a(s,e,c,v,u),r.pipelines.postBatch(e)};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(48),d=t(60),a=t(30),o=function(r,e,i,l){i.addToRenderList(e);var s=r.currentContext;if(a(r,s,e,i,l)){var h=e._displayOriginX,f=e._displayOriginY,v=e.pathData,u=v.length-1,c=v[0]-h,x=v[1]-f;s.beginPath(),s.moveTo(c,x),e.closePath||(u-=2);for(var g=2;g + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1122),d=t(1123),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=t(81),a=t(12),o=function(r,e,i,l){i.addToRenderList(e);var s=r.pipelines.set(e.pipeline),h=n(e,i,l);s.calcMatrix.copyFrom(h.calc);var f=e._displayOriginX,v=e._displayOriginY,u=i.alpha*e.alpha;if(r.pipelines.preBatch(e),e.isFilled){var c=s.fillTint,x=a.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u);c.TL=x,c.TR=x,c.BL=x,c.BR=x,s.batchFillRect(-f,-v,e.width,e.height)}e.isStroked&&d(s,e,u,f,v),r.pipelines.postBatch(e)};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(48),d=t(60),a=t(30),o=function(r,e,i,l){i.addToRenderList(e);var s=r.currentContext;if(a(r,s,e,i,l)){var h=e._displayOriginX,f=e._displayOriginY;e.isFilled&&(n(s,e),s.fillRect(-h,-f,e.width,e.height)),e.isStroked&&(d(s,e),s.beginPath(),s.rect(-h,-f,e.width,e.height),s.stroke()),s.restore()}};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1125),d=t(1126),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(114),d=t(19),a=t(81),o=function(r,e,i,l){i.addToRenderList(e);var s=r.pipelines.set(e.pipeline),h=d(e,i,l),f=s.calcMatrix.copyFrom(h.calc),v=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&n(s,f,e,c,v,u),e.isStroked&&a(s,e,c,v,u),r.pipelines.postBatch(e)};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(48),d=t(60),a=t(30),o=function(r,e,i,l){i.addToRenderList(e);var s=r.currentContext;if(a(r,s,e,i,l)){var h=e._displayOriginX,f=e._displayOriginY,v=e.pathData,u=v.length-1,c=v[0]-h,x=v[1]-f;s.beginPath(),s.moveTo(c,x),e.closePath||(u-=2);for(var g=2;g + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1128),d=t(1129),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=t(81),a=t(12),o=function(r,e,i,l){i.addToRenderList(e);var s=r.pipelines.set(e.pipeline),h=n(e,i,l);s.calcMatrix.copyFrom(h.calc);var f=e._displayOriginX,v=e._displayOriginY,u=i.alpha*e.alpha;if(r.pipelines.preBatch(e),e.isFilled){var c=s.fillTint,x=a.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u);c.TL=x,c.TR=x,c.BL=x,c.BR=x;var g=e.geom.x1-f,m=e.geom.y1-v,y=e.geom.x2-f,T=e.geom.y2-v,S=e.geom.x3-f,C=e.geom.y3-v;s.batchFillTriangle(g,m,y,T,S,C,h.sprite,h.camera)}e.isStroked&&d(s,e,u,f,v),r.pipelines.postBatch(e)};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(48),d=t(60),a=t(30),o=function(r,e,i,l){i.addToRenderList(e);var s=r.currentContext;if(a(r,s,e,i,l)){var h=e._displayOriginX,f=e._displayOriginY,v=e.geom.x1-h,u=e.geom.y1-f,c=e.geom.x2-h,x=e.geom.y2-f,g=e.geom.x3-h,m=e.geom.y3-f;s.beginPath(),s.moveTo(v,u),s.lineTo(c,x),s.lineTo(g,m),s.closePath(),e.isFilled&&(n(s,e),s.fill()),e.isStroked&&(d(s,e),s.stroke()),s.restore()}};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(213),d=t(5);d.register("blitter",function(a,o,r,e){return this.displayList.add(new n(this.scene,a,o,r,e))})},function(p,E,t){/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(214),d=t(5);d.register("container",function(a,o,r){return this.displayList.add(new n(this.scene,a,o,r))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(442),d=t(5);d.register("dom",function(a,o,r,e,i){var l=new n(this.scene,a,o,r,e,i);return this.displayList.add(l),l})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(215),d=t(5);d.register("dynamicBitmapText",function(a,o,r,e,i){return this.displayList.add(new n(this.scene,a,o,r,e,i))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(444),d=t(5);d.register("extern",function(){var a=new n(this.scene);return this.displayList.add(a),a})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(216),d=t(5);d.register("graphics",function(a){return this.displayList.add(new n(this.scene,a))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(113),d=t(5);d.register("group",function(a,o){return this.updateList.add(new n(this.scene,a,o))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(125),d=t(5);d.register("image",function(a,o,r,e){return this.displayList.add(new n(this.scene,a,o,r,e))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(219),d=t(5);d.register("layer",function(a){return this.displayList.add(new n(this.scene,a))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(220);n.register("particles",function(a,o,r){return this.displayList.add(new d(this.scene,a,o,r))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(457);n.register("follower",function(a,o,r,e,i){var l=new d(this.scene,a,o,r,e,i);return this.displayList.add(l),this.updateList.add(l),l})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(221);n.register("renderTexture",function(a,o,r,e,i,l){return this.displayList.add(new d(this.scene,a,o,r,e,i,l))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(223),d=t(5);d.register("rope",function(a,o,r,e,i,l,s,h){return this.displayList.add(new n(this.scene,a,o,r,e,i,l,s,h))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(73);n.register("sprite",function(a,o,r,e){var i=new d(this.scene,a,o,r,e);return this.displayList.add(i),i})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(148),d=t(5);d.register("bitmapText",function(a,o,r,e,i,l){return this.displayList.add(new n(this.scene,a,o,r,e,i,l))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(224),d=t(5);d.register("text",function(a,o,r,e){return this.displayList.add(new n(this.scene,a,o,r,e))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(225),d=t(5);d.register("tileSprite",function(a,o,r,e,i,l){return this.displayList.add(new n(this.scene,a,o,r,e,i,l))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(129),d=t(5);d.register("zone",function(a,o,r,e){return this.displayList.add(new n(this.scene,a,o,r,e))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(226),d=t(5);d.register("video",function(a,o,r){return this.displayList.add(new n(this.scene,a,o,r))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(461),d=t(5);d.register("arc",function(a,o,r,e,i,l,s,h){return this.displayList.add(new n(this.scene,a,o,r,e,i,l,s,h))}),d.register("circle",function(a,o,r,e,i){return this.displayList.add(new n(this.scene,a,o,r,0,360,!1,e,i))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(462);n.register("curve",function(a,o,r,e,i){return this.displayList.add(new d(this.scene,a,o,r,e,i))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(463),d=t(5);d.register("ellipse",function(a,o,r,e,i,l){return this.displayList.add(new n(this.scene,a,o,r,e,i,l))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(464);n.register("grid",function(a,o,r,e,i,l,s,h,f,v){return this.displayList.add(new d(this.scene,a,o,r,e,i,l,s,h,f,v))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(465);n.register("isobox",function(a,o,r,e,i,l,s){return this.displayList.add(new d(this.scene,a,o,r,e,i,l,s))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(466);n.register("isotriangle",function(a,o,r,e,i,l,s,h){return this.displayList.add(new d(this.scene,a,o,r,e,i,l,s,h))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(467);n.register("line",function(a,o,r,e,i,l,s,h){return this.displayList.add(new d(this.scene,a,o,r,e,i,l,s,h))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(468);n.register("polygon",function(a,o,r,e,i){return this.displayList.add(new d(this.scene,a,o,r,e,i))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(473);n.register("rectangle",function(a,o,r,e,i,l){return this.displayList.add(new d(this.scene,a,o,r,e,i,l))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(474),d=t(5);d.register("star",function(a,o,r,e,i,l,s){return this.displayList.add(new n(this.scene,a,o,r,e,i,l,s))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(475);n.register("triangle",function(a,o,r,e,i,l,s,h,f,v){return this.displayList.add(new d(this.scene,a,o,r,e,i,l,s,h,f,v))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(213),d=t(28),a=t(16),o=t(13);a.register("blitter",function(r,e){r===void 0&&(r={});var i=o(r,"key",null),l=o(r,"frame",null),s=new n(this.scene,0,0,i,l);return e!==void 0&&(r.add=e),d(this.scene,s,r),s})},function(p,E,t){/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(28),d=t(214),a=t(16),o=t(13);a.register("container",function(r,e){r===void 0&&(r={});var i=o(r,"x",0),l=o(r,"y",0),s=o(r,"children",null),h=new d(this.scene,i,l,s);return e!==void 0&&(r.add=e),n(this.scene,h,r),h})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(215),d=t(28),a=t(16),o=t(13);a.register("dynamicBitmapText",function(r,e){r===void 0&&(r={});var i=o(r,"font",""),l=o(r,"text",""),s=o(r,"size",!1),h=new n(this.scene,0,0,i,l,s);return e!==void 0&&(r.add=e),d(this.scene,h,r),h})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(16),d=t(216);n.register("graphics",function(a,o){a===void 0&&(a={}),o!==void 0&&(a.add=o);var r=new d(this.scene,a);return a.add&&this.scene.sys.displayList.add(r),r})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(16),d=t(113);n.register("group",function(a){return new d(this.scene,null,a)})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(28),d=t(16),a=t(13),o=t(125);d.register("image",function(r,e){r===void 0&&(r={});var i=a(r,"key",null),l=a(r,"frame",null),s=new o(this.scene,0,0,i,l);return e!==void 0&&(r.add=e),n(this.scene,s,r),s})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(28),d=t(219),a=t(16),o=t(13);a.register("layer",function(r,e){r===void 0&&(r={});var i=o(r,"children",null),l=new d(this.scene,i);return e!==void 0&&(r.add=e),n(this.scene,l,r),l})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(16),d=t(13),a=t(2),o=t(220);n.register("particles",function(r,e){r===void 0&&(r={});var i=d(r,"key",null),l=d(r,"frame",null),s=a(r,"emitters",null),h=new o(this.scene,i,l,s);e!==void 0&&(r.add=e);var f=a(r,"add",!1);return f?this.displayList.add(h):this.updateList.add(h),h})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(28),d=t(16),a=t(13),o=t(221);d.register("renderTexture",function(r,e){r===void 0&&(r={});var i=a(r,"x",0),l=a(r,"y",0),s=a(r,"width",32),h=a(r,"height",32),f=a(r,"key",void 0),v=a(r,"frame",void 0),u=new o(this.scene,i,l,s,h,f,v);return e!==void 0&&(r.add=e),n(this.scene,u,r),u})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(28),d=t(16),a=t(13),o=t(6),r=t(223);d.register("rope",function(e,i){e===void 0&&(e={});var l=a(e,"key",null),s=a(e,"frame",null),h=a(e,"horizontal",!0),f=o(e,"points",void 0),v=o(e,"colors",void 0),u=o(e,"alphas",void 0),c=new r(this.scene,0,0,l,s,f,h,v,u);return i!==void 0&&(e.add=i),n(this.scene,c,e),e.add||this.updateList.add(c),c})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(28),d=t(439),a=t(16),o=t(13),r=t(73);a.register("sprite",function(e,i){e===void 0&&(e={});var l=o(e,"key",null),s=o(e,"frame",null),h=new r(this.scene,0,0,l,s);return i!==void 0&&(e.add=i),n(this.scene,h,e),d(h,e),h})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(148),d=t(28),a=t(16),o=t(13),r=t(6);a.register("bitmapText",function(e,i){e===void 0&&(e={});var l=r(e,"font",""),s=o(e,"text",""),h=o(e,"size",!1),f=r(e,"align",0),v=new n(this.scene,0,0,l,s,h,f);return i!==void 0&&(e.add=i),d(this.scene,v,e),v})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(28),d=t(16),a=t(13),o=t(224);d.register("text",function(r,e){r===void 0&&(r={});var i=a(r,"text",""),l=a(r,"style",null),s=a(r,"padding",null);s!==null&&(l.padding=s);var h=new o(this.scene,0,0,i,l);return e!==void 0&&(r.add=e),n(this.scene,h,r),h.autoRound=a(r,"autoRound",!0),h.resolution=a(r,"resolution",1),h})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(28),d=t(16),a=t(13),o=t(225);d.register("tileSprite",function(r,e){r===void 0&&(r={});var i=a(r,"x",0),l=a(r,"y",0),s=a(r,"width",512),h=a(r,"height",512),f=a(r,"key",""),v=a(r,"frame",""),u=new o(this.scene,i,l,s,h,f,v);return e!==void 0&&(r.add=e),n(this.scene,u,r),u})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(16),d=t(13),a=t(129);n.register("zone",function(o){var r=d(o,"x",0),e=d(o,"y",0),i=d(o,"width",1),l=d(o,"height",i);return new a(this.scene,r,e,i,l)})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(28),d=t(16),a=t(13),o=t(226);d.register("video",function(r,e){r===void 0&&(r={});var i=a(r,"key",null),l=new o(this.scene,0,0,i);return e!==void 0&&(r.add=e),n(this.scene,l,r),r.add||this.updateList.add(l),l})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1177),d=t(1178),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=function(a,o,r,e){if(!!o.shader){if(r.addToRenderList(o),a.pipelines.clear(),o.renderToTexture)o.load(),o.flush();else{var i=n(o,r,e).calc;(a.width!==o._rendererWidth||a.height!==o._rendererHeight)&&o.projOrtho(0,a.width,a.height,0),o.load(i.matrix),o.flush()}a.pipelines.rebind()}};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(){};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1180),d=t(1181),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=function(a,o,r,e){var i=o.faces,l=i.length;if(l!==0){r.addToRenderList(o);var s=a.pipelines.set(o.pipeline,o),h=n(o,r,e).calc,f=s.setGameObject(o),v=s.vertexViewF32,u=s.vertexViewU32,c=s.vertexCount*s.currentShader.vertexComponentCount-1,x=o.tintFill,g=[],m=o.debugCallback,y=h.a,T=h.b,S=h.c,C=h.d,P=h.e,A=h.f,M=o.viewPosition.z,L=o.hideCCW,F=r.roundPixels,B=r.alpha*o.alpha,N=0;a.pipelines.preBatch(o);for(var X=0;X + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(){};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1183),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(19),d=function(a,o,r,e){r.addToRenderList(o);var i=a.pipelines.set(o.pipeline),l=n(o,r,e).calc,s=o.width,h=o.height,f=-o._radius,v=-o._radius,u=f+s,c=v+h,x=l.getX(0,0),g=l.getY(0,0),m=l.getX(f,v),y=l.getY(f,v),T=l.getX(f,c),S=l.getY(f,c),C=l.getX(u,c),P=l.getY(u,c),A=l.getX(u,v),M=l.getY(u,v);a.pipelines.preBatch(o),i.batchPointLight(o,r,m,y,T,S,C,P,A,M,x,g),a.pipelines.postBatch(o)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(229),d=t(5);d.register("shader",function(a,o,r,e,i,l,s){return this.displayList.add(new n(this.scene,a,o,r,e,i,l,s))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(230),d=t(5);d.register("mesh",function(a,o,r,e,i,l,s,h,f,v,u){return this.displayList.add(new n(this.scene,a,o,r,e,i,l,s,h,f,v,u))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(150);n.register("pointlight",function(a,o,r,e,i,l){return this.displayList.add(new d(this.scene,a,o,r,e,i,l))})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(28),d=t(16),a=t(13),o=t(229);d.register("shader",function(r,e){r===void 0&&(r={});var i=a(r,"key",null),l=a(r,"x",0),s=a(r,"y",0),h=a(r,"width",128),f=a(r,"height",128),v=new o(this.scene,i,l,s,h,f);return e!==void 0&&(r.add=e),n(this.scene,v,r),v})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(28),d=t(16),a=t(13),o=t(6),r=t(230);d.register("mesh",function(e,i){e===void 0&&(e={});var l=a(e,"key",null),s=a(e,"frame",null),h=o(e,"vertices",[]),f=o(e,"uvs",[]),v=o(e,"indicies",[]),u=o(e,"containsZ",!1),c=o(e,"normals",[]),x=o(e,"colors",16777215),g=o(e,"alphas",1),m=new r(this.scene,0,0,l,s,h,f,v,u,c,x,g);return i!==void 0&&(e.add=i),n(this.scene,m,e),m})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(28),d=t(16),a=t(13),o=t(150);d.register("pointlight",function(r,e){r===void 0&&(r={});var i=a(r,"color",16777215),l=a(r,"radius",128),s=a(r,"intensity",1),h=a(r,"attenuation",.1),f=new o(this.scene,0,0,i,l,s,h);return e!==void 0&&(r.add=e),n(this.scene,f,r),f})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(482),a=t(24),o=t(20),r=new n({Extends:d,initialize:function(i){this.scene=i,this.systems=i.sys,i.sys.settings.isBooted||i.sys.events.once(o.BOOT,this.boot,this),d.call(this)},boot:function(){var e=this.systems.events;e.on(o.SHUTDOWN,this.shutdown,this),e.on(o.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});a.register("LightsPlugin",r,"lights"),p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(65);n.Area=t(1192),n.Circumference=t(302),n.CircumferencePoint=t(169),n.Clone=t(1193),n.Contains=t(66),n.ContainsPoint=t(1194),n.ContainsRect=t(1195),n.CopyFrom=t(1196),n.Equals=t(1197),n.GetBounds=t(1198),n.GetPoint=t(300),n.GetPoints=t(301),n.Offset=t(1199),n.OffsetPoint=t(1200),n.Random=t(170),p.exports=n},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.radius>0?Math.PI*n.radius*n.radius:0};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(65),d=function(a){return new n(a.x,a.y,a.radius)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(66),d=function(a,o){return n(a,o.x,o.y)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(66),d=function(a,o){return n(a,o.x,o.y)&&n(a,o.right,o.y)&&n(a,o.x,o.bottom)&&n(a,o.right,o.bottom)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d.setTo(n.x,n.y,n.radius)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.x===d.x&&n.y===d.y&&n.radius===d.radius};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10),d=function(a,o){return o===void 0&&(o=new n),o.x=a.left,o.y=a.top,o.width=a.diameter,o.height=a.diameter,o};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return n.x+=d,n.y+=a,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.x+=d.x,n.y+=d.y,n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(111);n.Area=t(1202),n.Circumference=t(447),n.CircumferencePoint=t(218),n.Clone=t(1203),n.Contains=t(112),n.ContainsPoint=t(1204),n.ContainsRect=t(1205),n.CopyFrom=t(1206),n.Equals=t(1207),n.GetBounds=t(1208),n.GetPoint=t(445),n.GetPoints=t(446),n.Offset=t(1209),n.OffsetPoint=t(1210),n.Random=t(180),p.exports=n},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.isEmpty()?0:n.getMajorRadius()*n.getMinorRadius()*Math.PI};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(111),d=function(a){return new n(a.x,a.y,a.width,a.height)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(112),d=function(a,o){return n(a,o.x,o.y)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(112),d=function(a,o){return n(a,o.x,o.y)&&n(a,o.right,o.y)&&n(a,o.x,o.bottom)&&n(a,o.right,o.bottom)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d.setTo(n.x,n.y,n.width,n.height)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.x===d.x&&n.y===d.y&&n.width===d.width&&n.height===d.height};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10),d=function(a,o){return o===void 0&&(o=new n),o.x=a.left,o.y=a.top,o.width=a.width,o.height=a.height,o};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return n.x+=d,n.y+=a,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.x+=d.x,n.y+=d.y,n};p.exports=t},function(p,E,t){/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=t(231),a=function(o,r,e){if(e===void 0&&(e=[]),d(o,r)){var i=o.x,l=o.y,s=o.radius,h=r.x,f=r.y,v=r.radius,u,c,x,g,m;if(l===f)m=(v*v-s*s-h*h+i*i)/(2*(i-h)),u=1,c=-2*f,x=h*h+m*m-2*h*m+f*f-v*v,g=c*c-4*u*x,g===0?e.push(new n(m,-c/(2*u))):g>0&&(e.push(new n(m,(-c+Math.sqrt(g))/(2*u))),e.push(new n(m,(-c-Math.sqrt(g))/(2*u))));else{var y=(i-h)/(l-f),T=(v*v-s*s-h*h+i*i-f*f+l*l)/(2*(l-f));u=y*y+1,c=2*l*y-2*T*y-2*i,x=i*i+l*l+T*T-s*s-2*l*T,g=c*c-4*u*x,g===0?(m=-c/(2*u),e.push(new n(m,T-m*y))):g>0&&(m=(-c+Math.sqrt(g))/(2*u),e.push(new n(m,T-m*y)),m=(-c-Math.sqrt(g))/(2*u),e.push(new n(m,T-m*y)))}}return e};p.exports=a},function(p,E,t){/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(232),d=t(151),a=function(o,r,e){if(e===void 0&&(e=[]),d(o,r)){var i=r.getLineA(),l=r.getLineB(),s=r.getLineC(),h=r.getLineD();n(i,o,e),n(l,o,e),n(s,o,e),n(h,o,e)}return e};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(140),d=t(487),a=t(47),o=new a;function r(l,s,h,f,v){var u=Math.cos(l),c=Math.sin(l);o.setTo(s,h,s+u,h+c);var x=d(o,f);x&&v.push(new n(x.x,x.y,l,x.w))}function e(l,s){return l.z-s.z}var i=function(l,s,h){Array.isArray(h)||(h=[h]);for(var f=[],v=[],u=0;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10),d=t(152),a=function(o,r,e){return e===void 0&&(e=new n),d(o,r)&&(e.x=Math.max(o.x,r.x),e.y=Math.max(o.y,r.y),e.width=Math.min(o.right,r.right)-e.x,e.height=Math.min(o.bottom,r.bottom)-e.y),e};p.exports=a},function(p,E,t){/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(234),d=t(152),a=function(o,r,e){if(e===void 0&&(e=[]),d(o,r)){var i=o.getLineA(),l=o.getLineB(),s=o.getLineC(),h=o.getLineD();n(i,r,e),n(l,r,e),n(s,r,e),n(h,r,e)}return e};p.exports=a},function(p,E,t){/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(489),d=t(234),a=function(o,r,e){if(e===void 0&&(e=[]),n(o,r)){var i=r.getLineA(),l=r.getLineB(),s=r.getLineC();d(i,o,e),d(l,o,e),d(s,o,e)}return e};p.exports=a},function(p,E,t){/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(232),d=t(491),a=function(o,r,e){if(e===void 0&&(e=[]),d(o,r)){var i=o.getLineA(),l=o.getLineB(),s=o.getLineC();n(i,r,e),n(l,r,e),n(s,r,e)}return e};p.exports=a},function(p,E,t){/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(494),d=t(492),a=function(o,r,e){if(e===void 0&&(e=[]),n(o,r)){var i=r.getLineA(),l=r.getLineB(),s=r.getLineC();d(o,i,e),d(o,l,e),d(o,s,e)}return e};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(496),d=function(a,o){if(!n(a,o))return!1;var r=Math.min(o.x1,o.x2),e=Math.max(o.x1,o.x2),i=Math.min(o.y1,o.y2),l=Math.max(o.y1,o.y2);return a.x>=r&&a.x<=e&&a.y>=i&&a.y<=l};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r,e){return e===void 0&&(e=0),!(d>n.right+e||an.bottom+e||r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(47);n.Angle=t(97),n.BresenhamPoints=t(317),n.CenterOn=t(1222),n.Clone=t(1223),n.CopyFrom=t(1224),n.Equals=t(1225),n.Extend=t(1226),n.GetEasedPoints=t(1227),n.GetMidPoint=t(1228),n.GetNearestPoint=t(1229),n.GetNormal=t(1230),n.GetPoint=t(307),n.GetPoints=t(172),n.GetShortestDistance=t(1231),n.Height=t(1232),n.Length=t(67),n.NormalAngle=t(497),n.NormalX=t(1233),n.NormalY=t(1234),n.Offset=t(1235),n.PerpSlope=t(1236),n.Random=t(173),n.ReflectAngle=t(1237),n.Rotate=t(1238),n.RotateAroundPoint=t(1239),n.RotateAroundXY=t(236),n.SetToAngle=t(1240),n.Slope=t(1241),n.Width=t(1242),p.exports=n},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=d-(n.x1+n.x2)/2,r=a-(n.y1+n.y2)/2;return n.x1+=o,n.y1+=r,n.x2+=o,n.y2+=r,n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(47),d=function(a){return new n(a.x1,a.y1,a.x2,a.y2)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d.setTo(n.x1,n.y1,n.x2,n.y2)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.x1===d.x1&&n.y1===d.y1&&n.x2===d.x2&&n.y2===d.y2};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(67),d=function(a,o,r){r===void 0&&(r=o);var e=n(a),i=a.x2-a.x1,l=a.y2-a.y1;return o&&(a.x1=a.x1-i/e*o,a.y1=a.y1-l/e*o),r&&(a.x2=a.x2+i/e*r,a.y2=a.y2+l/e*r),a};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(352),d=t(80),a=t(4),o=function(r,e,i,l,s){l===void 0&&(l=0),s===void 0&&(s=[]);var h=[],f=r.x1,v=r.y1,u=r.x2-f,c=r.y2-v,x=d(e,s),g,m,y=i-1;for(g=0;g0){var T=h[0],S=[T];for(g=1;g=l&&(S.push(C),T=C)}var P=h[h.length-1];return n(T,P) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o){return o===void 0&&(o=new n),o.x=(a.x1+a.x2)/2,o.y=(a.y1+a.y2)/2,o};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o,r){r===void 0&&(r=new n);var e=a.x1,i=a.y1,l=a.x2,s=a.y2,h=(l-e)*(l-e)+(s-i)*(s-i);if(h===0)return r;var f=((o.x-e)*(l-e)+(o.y-i)*(s-i))/h;return r.x=e+f*(l-e),r.y=i+f*(s-i),r};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(14),d=t(97),a=t(4),o=function(r,e){e===void 0&&(e=new a);var i=d(r)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e};p.exports=o},function(p,E){/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=n.x1,o=n.y1,r=n.x2,e=n.y2,i=(r-a)*(r-a)+(e-o)*(e-o);if(i===0)return!1;var l=((o-d.y)*(r-a)-(a-d.x)*(e-o))/i;return Math.abs(l)*Math.sqrt(i)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return Math.abs(n.y1-n.y2)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(14),d=t(97),a=function(o){return Math.cos(d(o)-n.TAU)};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(14),d=t(97),a=function(o){return Math.sin(d(o)-n.TAU)};p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return n.x1+=d,n.y1+=a,n.x2+=d,n.y2+=a,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return-((n.x2-n.x1)/(n.y2-n.y1))};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(97),d=t(497),a=function(o,r){return 2*d(r)-Math.PI-n(o)};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(236),d=function(a,o){var r=(a.x1+a.x2)/2,e=(a.y1+a.y2)/2;return n(a,r,e,o)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(236),d=function(a,o,r){return n(a,o.x,o.y,r)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o,r){return n.x1=d,n.y1=a,n.x2=d+Math.cos(o)*r,n.y2=a+Math.sin(o)*r,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return(n.y2-n.y1)/(n.x2-n.x1)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return Math.abs(n.x1-n.x2)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n={Face:t(116),GenerateGridVerts:t(1244),GenerateObjVerts:t(480),GenerateVerts:t(479),ParseObj:t(498),ParseObjMaterial:t(499),RotateFace:t(1245),Vertex:t(117)};p.exports=n},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(116),d=t(2),a=t(69),o=t(39),r=t(117),e=new o,i=new o,l=new a,s=function(h){var f=d(h,"mesh"),v=d(h,"texture",null),u=d(h,"frame"),c=d(h,"width",1),x=d(h,"height",c),g=d(h,"widthSegments",1),m=d(h,"heightSegments",g),y=d(h,"x",0),T=d(h,"y",0),S=d(h,"z",0),C=d(h,"rotateX",0),P=d(h,"rotateY",0),A=d(h,"rotateZ",0),M=d(h,"zIsUp",!0),L=d(h,"isOrtho",f?f.dirtyCache[11]:!1),F=d(h,"colors",[16777215]),B=d(h,"alphas",[1]),N=d(h,"tile",!1),X=d(h,"flipY",!1),V=d(h,"width",null),W={faces:[],verts:[]};if(e.set(y,T,S),i.set(C,P,A),l.fromRotationXYTranslation(i,e,M),!v&&f)v=f.texture;else if(f&&typeof v=="string")v=f.scene.sys.textures.get(v);else return W;var O=v.get(u);!V&&L&&v&&f&&(c=O.width/f.height,x=O.height/f.height);var R=c/2,I=x/2,D=Math.floor(g),G=Math.floor(m),U=D+1,Y=G+1,z=c/D,H=x/G,w=[],K=[],Z,J,j=0,Q=1,k=0,it=1;O&&(j=O.u0,Q=O.u1,X?(k=O.v1,it=O.v0):(k=O.v0,it=O.v1));var tt=Q-j,q=it-k;for(J=0;J + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){var r,e;if(a===void 0&&o===void 0){var i=n.getInCenter();r=i.x,e=i.y}var l=Math.cos(d),s=Math.sin(d),h=n.vertex1,f=n.vertex2,v=n.vertex3,u=h.x-r,c=h.y-e;h.set(u*l-c*s+r,u*s+c*l+e),u=f.x-r,c=f.y-e,f.set(u*l-c*s+r,u*s+c*l+e),u=v.x-r,c=v.y-e,v.set(u*l-c*s+r,u*s+c*l+e)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4);n.Ceil=t(1247),n.Clone=t(1248),n.CopyFrom=t(1249),n.Equals=t(1250),n.Floor=t(1251),n.GetCentroid=t(1252),n.GetMagnitude=t(500),n.GetMagnitudeSq=t(501),n.GetRectangleFromPoints=t(1253),n.Interpolate=t(1254),n.Invert=t(1255),n.Negative=t(1256),n.Project=t(1257),n.ProjectUnit=t(1258),n.SetMagnitude=t(1259),p.exports=n},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.setTo(Math.ceil(n.x),Math.ceil(n.y))};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a){return new n(a.x,a.y)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d.setTo(n.x,n.y)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.x===d.x&&n.y===d.y};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.setTo(Math.floor(n.x),Math.floor(n.y))};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o){if(o===void 0&&(o=new n),!Array.isArray(a))throw new Error("GetCentroid points argument must be an array");var r=a.length;if(r<1)throw new Error("GetCentroid points array must not be empty");if(r===1)o.x=a[0].x,o.y=a[0].y;else{for(var e=0;e + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10),d=function(a,o){o===void 0&&(o=new n);for(var r=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY,s=0;sr&&(r=h.x),h.xi&&(i=h.y),h.y + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o,r,e){return r===void 0&&(r=0),e===void 0&&(e=new n),e.x=a.x+(o.x-a.x)*r,e.y=a.y+(o.y-a.y)*r,e};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.setTo(n.y,n.x)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o){return o===void 0&&(o=new n),o.setTo(-a.x,-a.y)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=t(501),a=function(o,r,e){e===void 0&&(e=new n);var i=o.x*r.x+o.y*r.y,l=i/d(r);return l!==0&&(e.x=l*r.x,e.y=l*r.y),e};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o,r){r===void 0&&(r=new n);var e=a.x*o.x+a.y*o.y;return e!==0&&(r.x=e*o.x,r.y=e*o.y),r};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(500),d=function(a,o){if(a.x!==0||a.y!==0){var r=n(a);a.x/=r,a.y/=r}return a.x*=o,a.y*=o,a};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(227);n.Clone=t(1261),n.Contains=t(228),n.ContainsPoint=t(1262),n.Earcut=t(59),n.GetAABB=t(469),n.GetNumberArray=t(1263),n.GetPoints=t(470),n.Perimeter=t(471),n.Reverse=t(1264),n.Simplify=t(1265),n.Smooth=t(472),n.Translate=t(1266),p.exports=n},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(227),d=function(a){return new n(a.points)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(228),d=function(a,o){return n(a,o.x,o.y)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){d===void 0&&(d=[]);for(var a=0;a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.points.reverse(),n};p.exports=t},function(p,E){function t(e,i){var l=e.x-i.x,s=e.y-i.y;return l*l+s*s}function n(e,i,l){var s=i.x,h=i.y,f=l.x-s,v=l.y-h;if(f!==0||v!==0){var u=((e.x-s)*f+(e.y-h)*v)/(f*f+v*v);u>1?(s=l.x,h=l.y):u>0&&(s+=f*u,h+=v*u)}return f=e.x-s,v=e.y-h,f*f+v*v}function d(e,i){for(var l=e[0],s=[l],h,f=1,v=e.length;fi&&(s.push(h),l=h);return l!==h&&s.push(h),s}function a(e,i,l,s,h){for(var f=s,v,u=i+1;uf&&(v=u,f=c)}f>s&&(v-i>1&&a(e,i,v,s,h),h.push(e[v]),l-v>1&&a(e,v,l,s,h))}function o(e,i){var l=e.length-1,s=[e[0]];return a(e,0,l,i,s),s.push(e[l]),s}var r=function(e,i,l){i===void 0&&(i=1),l===void 0&&(l=!1);var s=e.points;if(s.length>2){var h=i*i;l||(s=d(s,h)),e.setTo(o(s,h))}return e};p.exports=r},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){for(var o=n.points,r=0;r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.width*n.height};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.x=Math.ceil(n.x),n.y=Math.ceil(n.y),n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.x=Math.ceil(n.x),n.y=Math.ceil(n.y),n.width=Math.ceil(n.width),n.height=Math.ceil(n.height),n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10),d=function(a){return new n(a.x,a.y,a.width,a.height)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(57),d=function(a,o){return n(a,o.x,o.y)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d.setTo(n.x,n.y,n.width,n.height)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.x===d.x&&n.y===d.y&&n.width===d.width&&n.height===d.height};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(237),d=function(a,o){var r=n(a);return r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(237),d=function(a,o){var r=n(a);return r>n(o)?a.setSize(o.height*r,o.height):a.setSize(o.width,o.width/r),a.setPosition(o.centerX-a.width/2,o.centerY-a.height/2)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.x=Math.floor(n.x),n.y=Math.floor(n.y),n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.x=Math.floor(n.x),n.y=Math.floor(n.y),n.width=Math.floor(n.width),n.height=Math.floor(n.height),n};p.exports=t},function(p,E,t){/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10),d=function(a,o,r,e,i){return i===void 0&&(i=new n),i.setTo(Math.min(a,r),Math.min(o,e),Math.abs(a-r),Math.abs(o-e))};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o){return o===void 0&&(o=new n),o.x=a.centerX,o.y=a.centerY,o};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=function(a,o){return o===void 0&&(o=new n),o.x=a.width,o.y=a.height,o};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(190),d=function(a,o,r){var e=a.centerX,i=a.centerY;return a.setSize(a.width+o*2,a.height+r*2),n(a,e,i)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(10),d=t(152),a=function(o,r,e){return e===void 0&&(e=new n),d(o,r)?(e.x=Math.max(o.x,r.x),e.y=Math.max(o.y,r.y),e.width=Math.min(o.right,r.right)-e.x,e.height=Math.min(o.bottom,r.bottom)-e.y):e.setEmpty(),e};p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){for(var a=n.x,o=n.right,r=n.y,e=n.bottom,i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){var a=Math.min(n.x,d.x),o=Math.max(n.right,d.right);n.x=a,n.width=o-a;var r=Math.min(n.y,d.y),e=Math.max(n.bottom,d.bottom);return n.y=r,n.height=e-r,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){var o=Math.min(n.x,d),r=Math.max(n.right,d);n.x=o,n.width=r-o;var e=Math.min(n.y,a),i=Math.max(n.bottom,a);return n.y=e,n.height=i-e,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return n.x+=d,n.y+=a,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.x+=d.x,n.y+=d.y,n};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.xd.x&&n.yd.y};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(4),d=t(36),a=function(o,r,e){e===void 0&&(e=new n),r=d(r);var i=Math.sin(r),l=Math.cos(r),s=l>0?o.width/2:o.width/-2,h=i>0?o.height/2:o.height/-2;return Math.abs(s*i) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(195),d=t(503),a=t(4),o=function(r,e,i){if(i===void 0&&(i=new a),d(r,e))switch(n(0,3)){case 0:i.x=r.x+Math.random()*(e.right-r.x),i.y=r.y+Math.random()*(e.top-r.y);break;case 1:i.x=e.x+Math.random()*(r.right-e.x),i.y=e.bottom+Math.random()*(r.bottom-e.bottom);break;case 2:i.x=r.x+Math.random()*(e.x-r.x),i.y=e.y+Math.random()*(r.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(r.right-e.right),i.y=r.y+Math.random()*(e.bottom-r.y);break}return i};p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.width===d.width&&n.height===d.height};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a){return a===void 0&&(a=d),n.width*=d,n.height*=a,n};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(82);n.Area=t(1294),n.BuildEquilateral=t(1295),n.BuildFromPolygon=t(1296),n.BuildRight=t(1297),n.CenterOn=t(1298),n.Centroid=t(504),n.CircumCenter=t(1299),n.CircumCircle=t(1300),n.Clone=t(1301),n.Contains=t(115),n.ContainsArray=t(235),n.ContainsPoint=t(1302),n.CopyFrom=t(1303),n.Decompose=t(495),n.Equals=t(1304),n.GetPoint=t(476),n.GetPoints=t(477),n.InCenter=t(506),n.Perimeter=t(1305),n.Offset=t(505),n.Random=t(181),n.Rotate=t(1306),n.RotateAroundPoint=t(1307),n.RotateAroundXY=t(238),p.exports=n},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){var d=n.x1,a=n.y1,o=n.x2,r=n.y2,e=n.x3,i=n.y3;return Math.abs(((e-d)*(r-a)-(o-d)*(i-a))/2)};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(82),d=function(a,o,r){var e=r*(Math.sqrt(3)/2),i=a,l=o,s=a+r/2,h=o+e,f=a-r/2,v=o+e;return new n(i,l,s,h,f,v)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(59),d=t(82),a=function(o,r,e,i,l){r===void 0&&(r=null),e===void 0&&(e=1),i===void 0&&(i=1),l===void 0&&(l=[]);for(var s=n(o,r),h,f,v,u,c,x,g,m,y,T=0;T + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(82),d=function(a,o,r,e){e===void 0&&(e=r);var i=a,l=o,s=a,h=o-e,f=a+r,v=o;return new n(i,l,s,h,f,v)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(504),d=t(505),a=function(o,r,e,i){i===void 0&&(i=n);var l=i(o),s=r-l.x,h=e-l.y;return d(o,s,h)};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(3);function d(o,r,e,i){return o*i-r*e}var a=function(o,r){r===void 0&&(r=new n);var e=o.x3,i=o.y3,l=o.x1-e,s=o.y1-i,h=o.x2-e,f=o.y2-i,v=2*d(l,s,h,f),u=d(s,l*l+s*s,f,h*h+f*f),c=d(l,l*l+s*s,h,h*h+f*f);return r.x=e-u/v,r.y=i+c/v,r};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(65),d=function(a,o){o===void 0&&(o=new n);var r=a.x1,e=a.y1,i=a.x2,l=a.y2,s=a.x3,h=a.y3,f=i-r,v=l-e,u=s-r,c=h-e,x=f*(r+i)+v*(e+l),g=u*(r+s)+c*(e+h),m=2*(f*(h-l)-v*(s-i)),y,T;if(Math.abs(m)<1e-6){var S=Math.min(r,i,s),C=Math.min(e,l,h);y=(Math.max(r,i,s)-S)*.5,T=(Math.max(e,l,h)-C)*.5,o.x=S+y,o.y=C+T,o.radius=Math.sqrt(y*y+T*T)}else o.x=(c*x-v*g)/m,o.y=(f*g-u*x)/m,y=o.x-r,T=o.y-e,o.radius=Math.sqrt(y*y+T*T);return o};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(82),d=function(a){return new n(a.x1,a.y1,a.x2,a.y2,a.x3,a.y3)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(115),d=function(a,o){return n(a,o.x,o.y)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d.setTo(n.x1,n.y1,n.x2,n.y2,n.x3,n.y3)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.x1===d.x1&&n.y1===d.y1&&n.x2===d.x2&&n.y2===d.y2&&n.x3===d.x3&&n.y3===d.y3};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(67),d=function(a){var o=a.getLineA(),r=a.getLineB(),e=a.getLineC();return n(o)+n(r)+n(e)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(238),d=t(506),a=function(o,r){var e=d(o);return n(o,e.x,e.y,r)};p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(238),d=function(a,o,r){return n(a,o.x,o.y,r)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(203),d=t(17),a={CreatePixelPerfectHandler:t(507),CreateInteractiveObject:t(508),Events:t(51),Gamepad:t(1309),InputManager:t(409),InputPlugin:t(1321),InputPluginCache:t(153),Keyboard:t(1322),Mouse:t(1336),Pointer:t(412),Touch:t(1337)};a=d(!1,a,n),p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Axis:t(509),Button:t(510),Events:t(239),Gamepad:t(511),GamepadPlugin:t(1316),Configs:t(1317)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="down"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="up"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="connected"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="disconnected"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="down"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="up"},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(9),a=t(239),o=t(511),r=t(6),e=t(153),i=t(51),l=new n({Extends:d,initialize:function(h){d.call(this),this.scene=h.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=h,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,h.pluginEvents.once(i.BOOT,this.boot,this),h.pluginEvents.on(i.START,this.start,this)},boot:function(){var s=this.scene.sys.game,h=this.settings.input,f=s.config;this.enabled=r(h,"gamepad",f.inputGamepad)&&s.device.input.gamepads,this.target=r(h,"gamepad.target",f.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(i.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(i.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var s=this,h=this.target,f=function(v){v.defaultPrevented||!s.isActive()||(s.refreshPads(),s.queue.push(v))};this.onGamepadHandler=f,h.addEventListener("gamepadconnected",f,!1),h.addEventListener("gamepaddisconnected",f,!1),this.sceneInputPlugin.pluginEvents.on(i.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(i.UPDATE,this.update);for(var s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={DUALSHOCK_4:t(1318),SNES_USB:t(1319),XBOX_360:t(1320)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(65),d=t(66),a=t(0),o=t(203),r=t(508),e=t(507),i=t(50),l=t(111),s=t(112),h=t(51),f=t(9),v=t(2),u=t(56),c=t(153),x=t(7),g=t(24),m=t(10),y=t(57),T=t(20),S=t(82),C=t(115),P=new a({Extends:f,initialize:function(M){f.call(this),this.scene=M,this.systems=M.sys,this.settings=M.sys.settings,this.manager=M.sys.game.input,this.pluginEvents=new f,this.enabled=!0,this.displayList,this.cameras,c.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var L={cancelled:!1};this._eventContainer={stopPropagation:function(){L.cancelled=!0}},this._eventData=L,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,M.sys.events.once(T.BOOT,this.boot,this),M.sys.events.on(T.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(T.DESTROY,this.destroy,this),this.pluginEvents.emit(h.BOOT)},start:function(){var A=this.systems.events;A.on(T.TRANSITION_START,this.transitionIn,this),A.on(T.TRANSITION_OUT,this.transitionOut,this),A.on(T.TRANSITION_COMPLETE,this.transitionComplete,this),A.on(T.PRE_UPDATE,this.preUpdate,this),A.once(T.SHUTDOWN,this.shutdown,this),this.manager.events.on(h.GAME_OUT,this.onGameOut,this),this.manager.events.on(h.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(h.START)},onGameOver:function(A){this.isActive()&&this.emit(h.GAME_OVER,A.timeStamp,A)},onGameOut:function(A){this.isActive()&&this.emit(h.GAME_OUT,A.timeStamp,A)},preUpdate:function(){this.pluginEvents.emit(h.PRE_UPDATE);var A=this._pendingRemoval,M=this._pendingInsertion,L=A.length,F=M.length;if(!(L===0&&F===0)){for(var B=this._list,N=0;N-1&&(B.splice(V,1),this.clear(X,!0))}A.length=0,this._pendingRemoval.length=0,this._list=B.concat(M.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(A,M){if(!this.isActive())return!1;if(this.pluginEvents.emit(h.UPDATE,A,M),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var L,F=this.manager,B=F.pointers,N=F.pointersTotal;for(L=0;L0)if(this._pollTimer-=M,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var V=!1;for(L=0;L0&&(V=!0)}return V},update:function(A,M){if(!this.isActive())return!1;for(var L=M.length,F=!1,B=0;B0&&(F=!0)}return this._updatedThisFrame=!0,F},clear:function(A,M){M===void 0&&(M=!1);var L=A.input;if(!!L){M||this.queueForRemoval(A),L.gameObject=void 0,L.target=void 0,L.hitArea=void 0,L.hitAreaCallback=void 0,L.callbackContext=void 0,A.input=null;var F=this._draggable.indexOf(A);return F>-1&&this._draggable.splice(F,1),F=this._drag[0].indexOf(A),F>-1&&this._drag[0].splice(F,1),F=this._over[0].indexOf(A),F>-1&&(this._over[0].splice(F,1),this.manager.resetCursor(L)),A}},disable:function(A){A.input.enabled=!1},enable:function(A,M,L,F){return F===void 0&&(F=!1),A.input?A.input.enabled=!0:this.setHitArea(A,M,L),A.input&&F&&!A.input.dropZone&&(A.input.dropZone=F),this},hitTestPointer:function(A){for(var M=this.cameras.getCamerasBelowPointer(A),L=0;L0)return A.camera=F,B}return A.camera=M[0],[]},processDownEvents:function(A){var M=0,L=this._temp,F=this._eventData,B=this._eventContainer;F.cancelled=!1;for(var N=!1,X=0;X0&&i(A.x,A.y,A.downX,A.downY)>=B||F>0&&M>=A.downTime+F)&&(L=!0),L)return this.setDragState(A,3),this.processDragStartList(A)},processDragStartList:function(A){if(this.getDragState(A)!==3)return 0;for(var M=this._drag[A.id],L=0;L1&&(this.sortGameObjects(L,A),this.topOnly&&L.splice(1)),this._drag[A.id]=L,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(A,3),this.processDragStartList(A)):(this.setDragState(A,2),0))},processDragMoveEvent:function(A){if(this.getDragState(A)===2&&this.processDragThresholdEvent(A,this.manager.game.loop.now),this.getDragState(A)!==4)return 0;for(var M=this._tempZones,L=this._drag[A.id],F=0;F0?(B.emit(h.GAMEOBJECT_DRAG_LEAVE,A,X),this.emit(h.DRAG_LEAVE,A,B,X),N.target=M[0],X=N.target,B.emit(h.GAMEOBJECT_DRAG_ENTER,A,X),this.emit(h.DRAG_ENTER,A,B,X)):(B.emit(h.GAMEOBJECT_DRAG_LEAVE,A,X),this.emit(h.DRAG_LEAVE,A,B,X),M[0]?(N.target=M[0],X=N.target,B.emit(h.GAMEOBJECT_DRAG_ENTER,A,X),this.emit(h.DRAG_ENTER,A,B,X)):N.target=null)}else!X&&M[0]&&(N.target=M[0],X=N.target,B.emit(h.GAMEOBJECT_DRAG_ENTER,A,X),this.emit(h.DRAG_ENTER,A,B,X));var W,O;if(!B.parentContainer)W=A.worldX-N.dragX,O=A.worldY-N.dragY;else{var R=A.worldX-N.dragStartXGlobal,I=A.worldY-N.dragStartYGlobal,D=B.getParentRotation(),G=R*Math.cos(D)+I*Math.sin(D),U=I*Math.cos(D)-R*Math.sin(D);G*=1/B.parentContainer.scaleX,U*=1/B.parentContainer.scaleY,W=G+N.dragStartX,O=U+N.dragStartY}B.emit(h.GAMEOBJECT_DRAG,A,W,O),this.emit(h.DRAG,A,B,W,O)}return L.length},processDragUpEvent:function(A){for(var M=this._drag[A.id],L=0;L0){var N=this.manager,X=this._eventData,V=this._eventContainer;X.cancelled=!1;for(var W=!1,O=0;O0){var B=this.manager,N=this._eventData,X=this._eventContainer;N.cancelled=!1;var V=!1;this.sortGameObjects(M,A);for(var W=0;W0){for(this.sortGameObjects(B,A),L=0;L0){for(this.sortGameObjects(N,A),L=0;L-1&&this._draggable.splice(B,1)}return this},makePixelPerfect:function(A){A===void 0&&(A=1);var M=this.systems.textures;return e(M,A)},setHitArea:function(A,M,L){if(M===void 0)return this.setHitAreaFromTexture(A);Array.isArray(A)||(A=[A]);var F=!1,B=!1,N=!1,X=!1,V=!1,W=!0;if(x(M)){var O=M;M=v(O,"hitArea",null),L=v(O,"hitAreaCallback",null),F=v(O,"draggable",!1),B=v(O,"dropZone",!1),N=v(O,"cursor",!1),X=v(O,"useHandCursor",!1),V=v(O,"pixelPerfect",!1);var R=v(O,"alphaTolerance",1);V&&(M={},L=this.makePixelPerfect(R)),(!M||!L)&&(this.setHitAreaFromTexture(A),W=!1)}else typeof M=="function"&&!L&&(L=M,M={});for(var I=0;I + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Events:t(154),KeyboardManager:t(410),KeyboardPlugin:t(1330),Key:t(512),KeyCodes:t(143),KeyCombo:t(513),AdvanceKeyCombo:t(515),ProcessKeyCombo:t(514),ResetKeyCombo:t(516),JustDown:t(1332),JustUp:t(1333),DownDuration:t(1334),UpDuration:t(1335)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keydown"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keyup"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keycombomatch"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="down"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keydown-"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="keyup-"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="up"},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(9),a=t(154),o=t(22),r=t(6),e=t(51),i=t(153),l=t(512),s=t(143),h=t(513),f=t(1331),v=t(20),u=t(76),c=new n({Extends:d,initialize:function(g){d.call(this),this.game=g.systems.game,this.scene=g.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=g,this.manager=g.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,g.pluginEvents.once(e.BOOT,this.boot,this),g.pluginEvents.on(e.START,this.start,this)},boot:function(){var x=this.settings.input;this.enabled=r(x,"keyboard",!0);var g=r(x,"keyboard.capture",null);g&&this.addCaptures(g),this.sceneInputPlugin.pluginEvents.once(e.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(e.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(e.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this),this.scene.sys.events.on(v.PAUSE,this.resetKeys,this),this.scene.sys.events.on(v.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(x){return this.manager.addCapture(x),this},removeCapture:function(x){return this.manager.removeCapture(x),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:s.UP,down:s.DOWN,left:s.LEFT,right:s.RIGHT,space:s.SPACE,shift:s.SHIFT})},addKeys:function(x,g,m){g===void 0&&(g=!0),m===void 0&&(m=!1);var y={};if(typeof x=="string"){x=x.split(",");for(var T=0;T-1?y[T]=x:y[x.keyCode]=x,g&&this.addCapture(x.keyCode),x.setEmitOnRepeat(m),x}return typeof x=="string"&&(x=s[x.toUpperCase()]),y[x]||(y[x]=new l(this,x),g&&this.addCapture(x),y[x].setEmitOnRepeat(m)),y[x]},removeKey:function(x,g){g===void 0&&(g=!1);var m=this.keys,y;if(x instanceof l){var T=m.indexOf(x);T>-1&&(y=this.keys[T],this.keys[T]=void 0)}else typeof x=="string"&&(x=s[x.toUpperCase()]);return m[x]&&(y=m[x],m[x]=void 0),y&&(y.plugin=null,g&&y.destroy()),this},removeAllKeys:function(x){for(var g=this.keys,m=0;mx._tick)return x._tick=m,!0}return!1},update:function(){var x=this.manager.queue,g=x.length;if(!(!this.isActive()||g===0))for(var m=this.keys,y=0;y + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(143),d={};for(var a in n)d[n[a]]=a;p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n._justDown?(n._justDown=!1,!0):!1};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n._justUp?(n._justUp=!1,!0):!1};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){d===void 0&&(d=50);var a=n.plugin.game.loop.time-n.timeDown;return n.isDown&&a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){d===void 0&&(d=50);var a=n.plugin.game.loop.time-n.timeUp;return n.isUp&&a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={MouseManager:t(411)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={TouchManager:t(413)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(21),d=t(17),a={Events:t(95),FileTypes:t(1339),File:t(23),FileTypesManager:t(8),GetURL:t(155),LoaderPlugin:t(1365),MergeXHRSettings:t(240),MultiFile:t(49),XHRLoader:t(517),XHRSettings:t(156)};a=d(!1,a,n),p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AnimationJSONFile:t(1340),AsepriteFile:t(1341),AtlasJSONFile:t(1342),AtlasXMLFile:t(1343),AudioFile:t(518),AudioSpriteFile:t(1344),BinaryFile:t(1345),BitmapFontFile:t(1346),CSSFile:t(1347),GLSLFile:t(1348),HTML5AudioFile:t(519),HTMLFile:t(1349),HTMLTextureFile:t(1350),ImageFile:t(71),JSONFile:t(61),MultiAtlasFile:t(1351),MultiScriptFile:t(1352),OBJFile:t(1353),PackFile:t(1354),PluginFile:t(1355),SceneFile:t(1356),ScenePluginFile:t(1357),ScriptFile:t(520),SpriteSheetFile:t(1358),SVGFile:t(1359),TextFile:t(242),TilemapCSVFile:t(1360),TilemapImpactFile:t(1361),TilemapJSONFile:t(1362),UnityAtlasFile:t(1363),VideoFile:t(1364),XMLFile:t(241)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(8),a=t(61),o=t(95),r=new n({Extends:a,initialize:function(i,l,s,h,f){a.call(this,i,l,s,h,f),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),a.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});d.register("animation",function(e,i,l,s){if(Array.isArray(e))for(var h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(8),a=t(2),o=t(71),r=t(7),e=t(61),i=t(49),l=new n({Extends:i,initialize:function(h,f,v,u,c,x){var g,m;if(r(f)){var y=f;f=a(y,"key"),g=new o(h,{key:f,url:a(y,"textureURL"),extension:a(y,"textureExtension","png"),normalMap:a(y,"normalMap"),xhrSettings:a(y,"textureXhrSettings")}),m=new e(h,{key:f,url:a(y,"atlasURL"),extension:a(y,"atlasExtension","json"),xhrSettings:a(y,"atlasXhrSettings")})}else g=new o(h,f,v,c),m=new e(h,f,u,x);g.linkFile?i.call(this,h,"atlasjson",f,[g,m,g.linkFile]):i.call(this,h,"atlasjson",f,[g,m])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],h=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(s.key,s.data,h.data,f),h.addToCache(),this.complete=!0}}});d.register("aseprite",function(s,h,f,v,u){var c;if(Array.isArray(s))for(var x=0;x + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(8),a=t(2),o=t(71),r=t(7),e=t(61),i=t(49),l=new n({Extends:i,initialize:function(h,f,v,u,c,x){var g,m;if(r(f)){var y=f;f=a(y,"key"),g=new o(h,{key:f,url:a(y,"textureURL"),extension:a(y,"textureExtension","png"),normalMap:a(y,"normalMap"),xhrSettings:a(y,"textureXhrSettings")}),m=new e(h,{key:f,url:a(y,"atlasURL"),extension:a(y,"atlasExtension","json"),xhrSettings:a(y,"atlasXhrSettings")})}else g=new o(h,f,v,c),m=new e(h,f,u,x);g.linkFile?i.call(this,h,"atlasjson",f,[g,m,g.linkFile]):i.call(this,h,"atlasjson",f,[g,m])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],h=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(s.key,s.data,h.data,f),h.pendingDestroy(),this.complete=!0}}});d.register("atlas",function(s,h,f,v,u){var c;if(Array.isArray(s))for(var x=0;x + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(8),a=t(2),o=t(71),r=t(7),e=t(49),i=t(241),l=new n({Extends:e,initialize:function(h,f,v,u,c,x){var g,m;if(r(f)){var y=f;f=a(y,"key"),g=new o(h,{key:f,url:a(y,"textureURL"),extension:a(y,"textureExtension","png"),normalMap:a(y,"normalMap"),xhrSettings:a(y,"textureXhrSettings")}),m=new i(h,{key:f,url:a(y,"atlasURL"),extension:a(y,"atlasExtension","xml"),xhrSettings:a(y,"atlasXhrSettings")})}else g=new o(h,f,v,c),m=new i(h,f,u,x);g.linkFile?e.call(this,h,"atlasxml",f,[g,m,g.linkFile]):e.call(this,h,"atlasxml",f,[g,m])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],h=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(s.key,s.data,h.data,f),h.pendingDestroy(),this.complete=!0}}});d.register("atlasXML",function(s,h,f,v,u){var c;if(Array.isArray(s))for(var x=0;x + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(518),d=t(0),a=t(8),o=t(2),r=t(7),e=t(61),i=t(49),l=new d({Extends:i,initialize:function(h,f,v,u,c,x,g){if(r(f)){var m=f;f=o(m,"key"),v=o(m,"jsonURL"),u=o(m,"audioURL"),c=o(m,"audioConfig"),x=o(m,"audioXhrSettings"),g=o(m,"jsonXhrSettings")}var y;if(!u)y=new e(h,f,v,g),i.call(this,h,"audiosprite",f,[y]),this.config.resourceLoad=!0,this.config.audioConfig=c,this.config.audioXhrSettings=x;else{var T=n.create(h,f,u,c,x);T&&(y=new e(h,f,v,g),i.call(this,h,"audiosprite",f,[T,y]),this.config.resourceLoad=!1)}},onFileComplete:function(s){var h=this.files.indexOf(s);if(h!==-1&&(this.pending--,this.config.resourceLoad&&s.type==="json"&&s.data.hasOwnProperty("resources"))){var f=s.data.resources,v=o(this.config,"audioConfig"),u=o(this.config,"audioXhrSettings"),c=n.create(this.loader,s.key,f,v,u);c&&(this.addToMultiFile(c),this.loader.addFile(c))}},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],h=this.files[1];s.addToCache(),h.addToCache(),this.complete=!0}}});a.register("audioSprite",function(s,h,f,v,u,c){var x=this.systems.game,g=x.config.audio,m=x.device.audio;if(g&&g.noAudio||!m.webAudio&&!m.audioData)return this;var y;if(Array.isArray(s))for(var T=0;T + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=new n({Extends:a,initialize:function(s,h,f,v,u){var c="bin";if(e(h)){var x=h;h=r(x,"key"),f=r(x,"url"),v=r(x,"xhrSettings"),c=r(x,"extension",c),u=r(x,"dataType",u)}var g={type:"binary",cache:s.cacheManager.binary,extension:c,responseType:"arraybuffer",key:h,url:f,xhrSettings:v,config:{dataType:u}};a.call(this,s,g)},onProcess:function(){this.state=d.FILE_PROCESSING;var l=this.config.dataType;this.data=l?new l(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});o.register("binary",function(l,s,h,f){if(Array.isArray(l))for(var v=0;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(8),a=t(2),o=t(71),r=t(7),e=t(49),i=t(212),l=t(241),s=new n({Extends:e,initialize:function(f,v,u,c,x,g){var m,y;if(r(v)){var T=v;v=a(T,"key"),m=new o(f,{key:v,url:a(T,"textureURL"),extension:a(T,"textureExtension","png"),normalMap:a(T,"normalMap"),xhrSettings:a(T,"textureXhrSettings")}),y=new l(f,{key:v,url:a(T,"fontDataURL"),extension:a(T,"fontDataExtension","xml"),xhrSettings:a(T,"fontDataXhrSettings")})}else m=new o(f,v,u,x),y=new l(f,v,c,g);m.linkFile?e.call(this,f,"bitmapfont",v,[m,y,m.linkFile]):e.call(this,f,"bitmapfont",v,[m,y])},addToCache:function(){if(this.isReadyToProcess()){var h=this.files[0],f=this.files[1];h.addToCache(),f.pendingDestroy();var v=h.cache.get(h.key),u=i(f.data,h.cache.getFrame(h.key),0,0,v);this.loader.cacheManager.bitmapFont.add(h.key,{data:u,texture:h.key,frame:null}),this.complete=!0}}});d.register("bitmapFont",function(h,f,v,u,c){var x;if(Array.isArray(h))for(var g=0;g + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=new n({Extends:a,initialize:function(s,h,f,v){var u="css";if(e(h)){var c=h;h=r(c,"key"),f=r(c,"url"),v=r(c,"xhrSettings"),u=r(c,"extension",u)}var x={type:"script",cache:!1,extension:u,responseType:"text",key:h,url:f,xhrSettings:v};a.call(this,s,x)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("css",function(l,s,h){if(Array.isArray(l))for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=t(396),l=new n({Extends:a,initialize:function(h,f,v,u,c){var x="glsl";if(e(f)){var g=f;f=r(g,"key"),v=r(g,"url"),u=r(g,"shaderType","fragment"),c=r(g,"xhrSettings"),x=r(g,"extension",x)}else u===void 0&&(u="fragment");var m={type:"glsl",cache:h.cacheManager.shader,extension:x,responseType:"text",key:f,url:v,config:{shaderType:u},xhrSettings:c};a.call(this,h,m)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var s=this.data.split(` +`),h=this.extractBlock(s,0);if(h)for(;h;){var f=this.getShaderName(h.header),v=this.getShaderType(h.header),u=this.getShaderUniforms(h.header),c=h.shader;if(this.cache.has(f)){var x=this.cache.get(f);v==="fragment"?x.fragmentSrc=c:x.vertexSrc=c,x.uniforms||(x.uniforms=u)}else v==="fragment"?this.cache.add(f,new i(f,c,"",u)):this.cache.add(f,new i(f,"",c,u));h=this.extractBlock(s,h.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new i(this.key,this.data)):this.cache.add(this.key,new i(this.key,"",this.data));this.pendingDestroy()},getShaderName:function(s){for(var h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=new n({Extends:a,initialize:function(s,h,f,v){var u="html";if(e(h)){var c=h;h=r(c,"key"),f=r(c,"url"),v=r(c,"xhrSettings"),u=r(c,"extension",u)}var x={type:"text",cache:s.cacheManager.html,extension:u,responseType:"text",key:h,url:f,xhrSettings:v};a.call(this,s,x)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("html",function(l,s,h){if(Array.isArray(l))for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=new n({Extends:a,initialize:function(s,h,f,v,u,c){v===void 0&&(v=512),u===void 0&&(u=512);var x="html";if(e(h)){var g=h;h=r(g,"key"),f=r(g,"url"),c=r(g,"xhrSettings"),x=r(g,"extension",x),v=r(g,"width",v),u=r(g,"height",u)}var m={type:"html",cache:s.textureManager,extension:x,responseType:"text",key:h,url:f,xhrSettings:c,config:{width:v,height:u}};a.call(this,s,m)},onProcess:function(){this.state=d.FILE_PROCESSING;var l=this.config.width,s=this.config.height,h=[];h.push(''),h.push(''),h.push(''),h.push(this.xhrLoader.responseText),h.push(""),h.push(""),h.push("");var f=[h.join(` +`)],v=this;try{var u=new window.Blob(f,{type:"image/svg+xml;charset=utf-8"})}catch{v.state=d.FILE_ERRORED,v.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){a.revokeObjectURL(v.data),v.onProcessComplete()},this.data.onerror=function(){a.revokeObjectURL(v.data),v.onProcessError()},a.createObjectURL(this.data,u,"image/svg+xml")},addToCache:function(){var l=this.cache.addImage(this.key,this.data);this.pendingDestroy(l)}});o.register("htmlTexture",function(l,s,h,f,v){if(Array.isArray(l))for(var u=0;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(8),a=t(2),o=t(71),r=t(7),e=t(61),i=t(49),l=new n({Extends:i,initialize:function(h,f,v,u,c,x,g){if(r(f)){var m=f;f=a(m,"key"),a(m,"url",!1)?v=a(m,"url"):v=a(m,"atlasURL"),x=a(m,"xhrSettings"),u=a(m,"path"),c=a(m,"baseURL"),g=a(m,"textureXhrSettings")}var y=new e(h,f,v,x);i.call(this,h,"multiatlas",f,[y]),this.config.path=u,this.config.baseURL=c,this.config.textureXhrSettings=g},onFileComplete:function(s){var h=this.files.indexOf(s);if(h!==-1&&(this.pending--,s.type==="json"&&s.data.hasOwnProperty("textures"))){var f=s.data.textures,v=this.config,u=this.loader,c=u.baseURL,x=u.path,g=u.prefix,m=a(v,"baseURL",this.baseURL),y=a(v,"path",this.path),T=a(v,"prefix",this.prefix),S=a(v,"textureXhrSettings");u.setBaseURL(m),u.setPath(y),u.setPrefix(T);for(var C=0;C + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(8),a=t(2),o=t(7),r=t(49),e=t(520),i=new n({Extends:r,initialize:function(s,h,f,v){var u="js",c=[];if(o(h)){var x=h;h=a(x,"key"),f=a(x,"url"),v=a(x,"xhrSettings"),u=a(x,"extension",u)}Array.isArray(f)||(f=[f]);for(var g=0;g + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(8),a=t(2),o=t(7),r=t(49),e=t(498),i=t(499),l=t(242),s=new n({Extends:r,initialize:function(f,v,u,c,x,g){var m,y,T=f.cacheManager.obj;if(o(v)){var S=v;v=a(S,"key"),m=new l(f,{key:v,type:"obj",cache:T,url:a(S,"url"),extension:a(S,"extension","obj"),xhrSettings:a(S,"xhrSettings"),config:{flipUV:a(S,"flipUV",x)}}),c=a(S,"matURL"),c&&(y=new l(f,{key:v,type:"mat",cache:T,url:c,extension:a(S,"matExtension","mat"),xhrSettings:a(S,"xhrSettings")}))}else m=new l(f,{key:v,url:u,type:"obj",cache:T,extension:"obj",xhrSettings:g,config:{flipUV:x}}),c&&(y=new l(f,{key:v,url:c,type:"mat",cache:T,extension:"mat",xhrSettings:g}));r.call(this,f,"obj",v,[m,y])},addToCache:function(){if(this.isReadyToProcess()){var h=this.files[0],f=this.files[1],v=e(h.data,h.config.flipUV);f&&(v.materials=i(f.data)),h.cache.add(h.key,v),this.complete=!0}}});d.register("obj",function(h,f,v,u,c){var x;if(Array.isArray(h))for(var g=0;g + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(8),o=t(61),r=new n({Extends:o,initialize:function(i,l,s,h,f){o.call(this,i,l,s,h,f),this.type="packfile"},onProcess:function(){this.state!==d.FILE_POPULATED&&(this.state=d.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.loader.addPack(this.data,this.config),this.onProcessComplete()}});a.register("pack",function(e,i,l,s){if(Array.isArray(e))for(var h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=new n({Extends:a,initialize:function(s,h,f,v,u,c){var x="js";if(e(h)){var g=h;h=r(g,"key"),f=r(g,"url"),c=r(g,"xhrSettings"),x=r(g,"extension",x),v=r(g,"start"),u=r(g,"mapping")}var m={type:"plugin",cache:!1,extension:x,responseType:"text",key:h,url:f,xhrSettings:c,config:{start:v,mapping:u}};a.call(this,s,m),typeof f=="function"&&(this.data=f,this.state=d.FILE_POPULATED)},onProcess:function(){var l=this.loader.systems.plugins,s=this.config,h=r(s,"start",!1),f=r(s,"mapping",null);if(this.state===d.FILE_POPULATED)l.install(this.key,this.data,h,f);else{this.state=d.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 v=l.install(this.key,window[this.key],h,f);(h||f)&&(this.loader.systems[f]=v,this.loader.scene[f]=v)}this.onProcessComplete()}});o.register("plugin",function(l,s,h,f,v){if(Array.isArray(l))for(var u=0;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=new n({Extends:a,initialize:function(s,h,f,v){var u="js";if(e(h)){var c=h;h=r(c,"key"),f=r(c,"url"),v=r(c,"xhrSettings"),u=r(c,"extension",u)}var x={type:"text",extension:u,responseType:"text",key:h,url:f,xhrSettings:v};a.call(this,s,x)},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var l=this.data.concat(`(function(){ +return new `+this.key+`(); +}).call(this);`),s=eval;this.loader.sceneManager.add(this.key,s(l)),this.complete=!0}});o.register("sceneFile",function(l,s,h){if(Array.isArray(l))for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=new n({Extends:a,initialize:function(s,h,f,v,u,c){var x="js";if(e(h)){var g=h;h=r(g,"key"),f=r(g,"url"),c=r(g,"xhrSettings"),x=r(g,"extension",x),v=r(g,"systemKey"),u=r(g,"sceneKey")}var m={type:"scenePlugin",cache:!1,extension:x,responseType:"text",key:h,url:f,xhrSettings:c,config:{systemKey:v,sceneKey:u}};a.call(this,s,m),typeof f=="function"&&(this.data=f,this.state=d.FILE_POPULATED)},onProcess:function(){var l=this.loader.systems.plugins,s=this.config,h=this.key,f=r(s,"systemKey",h),v=r(s,"sceneKey",h);this.state===d.FILE_POPULATED?l.installScenePlugin(f,this.data,v,this.loader.scene,!0):(this.state=d.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),l.installScenePlugin(f,window[this.key],v,this.loader.scene,!0)),this.onProcessComplete()}});o.register("scenePlugin",function(l,s,h,f,v){if(Array.isArray(l))for(var u=0;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(8),a=t(71),o=new n({Extends:a,initialize:function(e,i,l,s,h){a.call(this,e,i,l,h,s),this.type="spritesheet"},addToCache:function(){var r=this.cache.addSpriteSheet(this.key,this.data,this.config);this.pendingDestroy(r)}});d.register("spritesheet",function(r,e,i,l){if(Array.isArray(r))for(var s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=new n({Extends:a,initialize:function(s,h,f,v,u){var c="svg";if(e(h)){var x=h;h=r(x,"key"),f=r(x,"url"),v=r(x,"svgConfig",{}),u=r(x,"xhrSettings"),c=r(x,"extension",c)}var g={type:"svg",cache:s.textureManager,extension:c,responseType:"text",key:h,url:f,xhrSettings:u,config:{width:r(v,"width"),height:r(v,"height"),scale:r(v,"scale")}};a.call(this,s,g)},onProcess:function(){this.state=d.FILE_PROCESSING;var l=this.xhrLoader.responseText,s=[l],h=this.config.width,f=this.config.height,v=this.config.scale;t:if(h&&f||v){var u=null,c=new DOMParser;u=c.parseFromString(l,"text/xml");var x=u.getElementsByTagName("svg")[0],g=x.hasAttribute("viewBox"),m=parseFloat(x.getAttribute("width")),y=parseFloat(x.getAttribute("height"));if(!g&&m&&y)x.setAttribute("viewBox","0 0 "+m+" "+y);else if(g&&!m&&!y){var T=x.getAttribute("viewBox").split(/\s+|,/);m=T[2],y=T[3]}if(v)if(m&&y)h=m*v,f=y*v;else break t;x.setAttribute("width",h.toString()+"px"),x.setAttribute("height",f.toString()+"px"),s=[new XMLSerializer().serializeToString(x)]}try{var S=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var C=this,P=!1;this.data.onload=function(){P||a.revokeObjectURL(C.data),C.onProcessComplete()},this.data.onerror=function(){P?C.onProcessError():(P=!0,a.revokeObjectURL(C.data),C.data.src="data:image/svg+xml,"+encodeURIComponent(s.join("")))},a.createObjectURL(this.data,S,"image/svg+xml")},addToCache:function(){var l=this.cache.addImage(this.key,this.data);this.pendingDestroy(l)}});o.register("svg",function(l,s,h,f){if(Array.isArray(l))for(var v=0;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(2),e=t(7),i=t(40),l=new n({Extends:a,initialize:function(h,f,v,u){var c="csv";if(e(f)){var x=f;f=r(x,"key"),v=r(x,"url"),u=r(x,"xhrSettings"),c=r(x,"extension",c)}var g={type:"tilemapCSV",cache:h.cacheManager.tilemap,extension:c,responseType:"text",key:f,url:v,xhrSettings:u};a.call(this,h,g),this.tilemapFormat=i.CSV},onProcess:function(){this.state=d.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var s={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,s),this.pendingDestroy(s)}});o.register("tilemapCSV",function(s,h,f){if(Array.isArray(s))for(var v=0;v + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(8),a=t(61),o=t(40),r=new n({Extends:a,initialize:function(i,l,s,h){a.call(this,i,l,s,h),this.type="tilemapJSON",this.cache=i.cacheManager.tilemap},addToCache:function(){var e={format:o.WELTMEISTER,data:this.data};this.cache.add(this.key,e),this.pendingDestroy(e)}});d.register("tilemapImpact",function(e,i,l){if(Array.isArray(e))for(var s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(8),a=t(61),o=t(40),r=new n({Extends:a,initialize:function(i,l,s,h){a.call(this,i,l,s,h),this.type="tilemapJSON",this.cache=i.cacheManager.tilemap},addToCache:function(){var e={format:o.TILED_JSON,data:this.data};this.cache.add(this.key,e),this.pendingDestroy(e)}});d.register("tilemapTiledJSON",function(e,i,l){if(Array.isArray(e))for(var s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(8),a=t(2),o=t(71),r=t(7),e=t(49),i=t(242),l=new n({Extends:e,initialize:function(h,f,v,u,c,x){var g,m;if(r(f)){var y=f;f=a(y,"key"),g=new o(h,{key:f,url:a(y,"textureURL"),extension:a(y,"textureExtension","png"),normalMap:a(y,"normalMap"),xhrSettings:a(y,"textureXhrSettings")}),m=new i(h,{key:f,url:a(y,"atlasURL"),extension:a(y,"atlasExtension","txt"),xhrSettings:a(y,"atlasXhrSettings")})}else g=new o(h,f,v,c),m=new i(h,f,u,x);g.linkFile?e.call(this,h,"unityatlas",f,[g,m,g.linkFile]):e.call(this,h,"unityatlas",f,[g,m])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],h=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(s.key,s.data,h.data,f),h.pendingDestroy(),this.complete=!0}}});d.register("unityAtlas",function(s,h,f,v,u){var c;if(Array.isArray(s))for(var x=0;x + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(23),o=t(8),r=t(155),e=t(2),i=t(7),l=new n({Extends:a,initialize:function(h,f,v,u,c,x,g){u===void 0&&(u="loadeddata"),c===void 0&&(c=!1),x===void 0&&(x=!1),u!=="loadeddata"&&u!=="canplay"&&u!=="canplaythrough"&&(u="loadeddata");var m={type:"video",cache:h.cacheManager.video,extension:v.type,responseType:"blob",key:f,url:v.url,xhrSettings:g,config:{loadEvent:u,asBlob:c,noAudio:x}};this.onLoadCallback=this.onVideoLoadHandler.bind(this),this.onErrorCallback=this.onVideoErrorHandler.bind(this),a.call(this,h,m)},onProcess:function(){if(this.state=d.FILE_PROCESSING,!this.config.asBlob){this.onProcessComplete();return}var s=this.createVideoElement();this.data=s;var h=this;this.data.onloadeddata=function(){h.onProcessComplete()},this.data.onerror=function(){a.revokeObjectURL(h.data),h.onProcessError()},a.createObjectURL(s,this.xhrLoader.response,""),s.load()},createVideoElement:function(){var s=document.createElement("video");return s.controls=!1,s.crossOrigin=this.loader.crossOrigin,this.config.noAudio&&(s.muted=!0,s.defaultMuted=!0,s.setAttribute("autoplay","autoplay")),s.setAttribute("playsinline","playsinline"),s.setAttribute("preload","auto"),s},onVideoLoadHandler:function(s){var h=s.target;h.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),h.removeEventListener("error",this.onErrorCallback,!0),this.data=h,this.resetXHR(),this.loader.nextFile(this,!0)},onVideoErrorHandler:function(s){var h=s.target;h&&(h.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),h.removeEventListener("error",this.onErrorCallback,!0)),this.resetXHR(),this.loader.nextFile(this,!1)},load:function(){var s=this.config.loadEvent;if(this.config.asBlob)a.prototype.load.call(this);else{this.percentComplete=0;var h=this.createVideoElement();h.addEventListener(s,this.onLoadCallback,!0),h.addEventListener("error",this.onErrorCallback,!0),h.src=r(this,this.loader.baseURL),h.load()}}});l.create=function(s,h,f,v,u,c,x){var g=s.systems.game;i(h)&&(f=e(h,"url",[]),v=e(h,"loadEvent","loadeddata"),u=e(h,"asBlob",!1),c=e(h,"noAudio",!1),x=e(h,"xhrSettings"),h=e(h,"key"));var m=l.getVideoURL(g,f);if(m)return new l(s,h,m,v,u,c,x)},l.getVideoURL=function(s,h){Array.isArray(h)||(h=[h]);for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(21),a=t(149),o=t(9),r=t(95),e=t(8),i=t(2),l=t(24),s=t(20),h=t(156),f=new n({Extends:o,initialize:function(u){o.call(this);var c=u.sys.game.config,x=u.sys.settings.loader;this.scene=u,this.systems=u.sys,this.cacheManager=u.sys.cache,this.textureManager=u.sys.textures,this.sceneManager=u.sys.game.scene,e.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(i(x,"baseURL",c.loaderBaseURL)),this.setPath(i(x,"path",c.loaderPath)),this.setPrefix(i(x,"prefix",c.loaderPrefix)),this.maxParallelDownloads=i(x,"maxParallelDownloads",c.loaderMaxParallelDownloads),this.xhr=h(i(x,"responseType",c.loaderResponseType),i(x,"async",c.loaderAsync),i(x,"user",c.loaderUser),i(x,"password",c.loaderPassword),i(x,"timeout",c.loaderTimeout),i(x,"withCredentials",c.loaderWithCredentials)),this.crossOrigin=i(x,"crossOrigin",c.loaderCrossOrigin),this.totalToLoad=0,this.progress=0,this.list=new a,this.inflight=new a,this.queue=new a,this._deleteQueue=new a,this.totalFailed=0,this.totalComplete=0,this.state=d.LOADER_IDLE,this.multiKeyIndex=0,u.sys.events.once(s.BOOT,this.boot,this),u.sys.events.on(s.START,this.pluginStart,this)},boot:function(){this.systems.events.once(s.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(s.SHUTDOWN,this.shutdown,this)},setBaseURL:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.baseURL=v,this},setPath:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.path=v,this},setPrefix:function(v){return v===void 0&&(v=""),this.prefix=v,this},setCORS:function(v){return this.crossOrigin=v,this},addFile:function(v){Array.isArray(v)||(v=[v]);for(var u=0;u0},isLoading:function(){return this.state===d.LOADER_LOADING||this.state===d.LOADER_PROCESSING},isReady:function(){return this.state===d.LOADER_IDLE||this.state===d.LOADER_COMPLETE},start:function(){!this.isReady()||(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(r.START,this),this.list.size===0?this.loadComplete():(this.state=d.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(s.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(r.PROGRESS,this.progress)},update:function(){this.state===d.LOADER_LOADING&&this.list.size>0&&this.inflight.size + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(62),d=t(17),a={ArcadePhysics:t(1367),Body:t(527),Collider:t(528),Components:t(243),Events:t(245),Factory:t(521),GetOverlapX:t(246),GetOverlapY:t(247),SeparateX:t(537),SeparateY:t(538),Group:t(524),Image:t(522),Sprite:t(157),StaticBody:t(539),StaticGroup:t(525),Tilemap:t(1391),World:t(526)};a=d(!1,a,n),p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(36),a=t(50),o=t(353),r=t(521),e=t(2),i=t(127),l=t(523),s=t(244),h=t(24),f=t(20),v=t(3),u=t(526),c=new n({initialize:function(g){this.scene=g,this.systems=g.sys,this.config=this.getConfig(),this.world,this.add,g.sys.events.once(f.BOOT,this.boot,this),g.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new u(this.scene,this.config),this.add=new r(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new u(this.scene,this.config),this.add=new r(this.world));var x=this.systems.events;e(this.config,"customUpdate",!1)||x.on(f.UPDATE,this.world.update,this.world),x.on(f.POST_UPDATE,this.world.postUpdate,this.world),x.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 x=this.systems.game.config.physics,g=this.systems.settings.physics,m=i(e(g,"arcade",{}),e(x,"arcade",{}));return m},overlap:function(x,g,m,y,T){return m===void 0&&(m=null),y===void 0&&(y=null),T===void 0&&(T=m),this.world.collideObjects(x,g,m,y,T,!0)},collide:function(x,g,m,y,T){return m===void 0&&(m=null),y===void 0&&(y=null),T===void 0&&(T=m),this.world.collideObjects(x,g,m,y,T,!1)},collideTiles:function(x,g,m,y,T){return this.world.collideTiles(x,g,m,y,T)},overlapTiles:function(x,g,m,y,T){return this.world.overlapTiles(x,g,m,y,T)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(x,g,m,y,T,S){y===void 0&&(y=60);var C=Math.atan2(m-x.y,g-x.x);return x.body.acceleration.setToPolar(C,y),T!==void 0&&S!==void 0&&x.body.maxVelocity.set(T,S),C},accelerateToObject:function(x,g,m,y,T){return this.accelerateTo(x,g.x,g.y,m,y,T)},closest:function(x,g){g||(g=this.world.bodies.entries);for(var m=Number.MAX_VALUE,y=null,T=x.x,S=x.y,C=g.length,P=0;Pm&&(y=A,m=L)}}return y},moveTo:function(x,g,m,y,T){y===void 0&&(y=60),T===void 0&&(T=0);var S=Math.atan2(m-x.y,g-x.x);return T>0&&(y=a(x.x,x.y,g,m)/(T/1e3)),x.body.velocity.setToPolar(S,y),S},moveToObject:function(x,g,m,y){return this.moveTo(x,g.x,g.y,m,y)},velocityFromAngle:function(x,g,m){return g===void 0&&(g=60),m===void 0&&(m=new v),m.setToPolar(d(x),g)},velocityFromRotation:function(x,g,m){return g===void 0&&(g=60),m===void 0&&(m=new v),m.setToPolar(x,g)},overlapRect:function(x,g,m,y,T,S){return s(this.world,x,g,m,y,T,S)},overlapCirc:function(x,g,m,y,T){return l(this.world,x,g,m,y,T)},shutdown:function(){if(!!this.world){var x=this.systems.events;x.off(f.UPDATE,this.world.update,this.world),x.off(f.POST_UPDATE,this.world.postUpdate,this.world),x.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});h.register("ArcadePhysics",c,"arcadePhysics"),p.exports=c},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setAcceleration:function(n,d){return this.body.acceleration.set(n,d),this},setAccelerationX:function(n){return this.body.acceleration.x=n,this},setAccelerationY:function(n){return this.body.acceleration.y=n,this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setAngularVelocity:function(n){return this.body.angularVelocity=n,this},setAngularAcceleration:function(n){return this.body.angularAcceleration=n,this},setAngularDrag:function(n){return this.body.angularDrag=n,this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setBounce:function(n,d){return this.body.bounce.set(n,d),this},setBounceX:function(n){return this.body.bounce.x=n,this},setBounceY:function(n){return this.body.bounce.y=n,this},setCollideWorldBounds:function(n,d,a){return this.body.setCollideWorldBounds(n,d,a),this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setDebug:function(n,d,a){return this.debugShowBody=n,this.debugShowVelocity=d,this.debugBodyColor=a,this},setDebugBodyColor:function(n){return this.body.debugBodyColor=n,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(n){this.body.debugShowBody=n}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(n){this.body.debugShowVelocity=n}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(n){this.body.debugBodyColor=n}}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setDrag:function(n,d){return this.body.drag.set(n,d),this},setDragX:function(n){return this.body.drag.x=n,this},setDragY:function(n){return this.body.drag.y=n,this},setDamping:function(n){return this.body.useDamping=n,this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={enableBody:function(n,d,a,o,r){return n&&this.body.reset(d,a),o&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(n,d){return n===void 0&&(n=!1),d===void 0&&(d=!1),this.body.stop(),this.body.enable=!1,n&&(this.body.gameObject.active=!1),d&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setFriction:function(n,d){return this.body.friction.set(n,d),this},setFrictionX:function(n){return this.body.friction.x=n,this},setFrictionY:function(n){return this.body.friction.y=n,this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setGravity:function(n,d){return this.body.gravity.set(n,d),this},setGravityX:function(n){return this.body.gravity.x=n,this},setGravityY:function(n){return this.body.gravity.y=n,this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setImmovable:function(n){return n===void 0&&(n=!0),this.body.immovable=n,this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setMass:function(n){return this.body.mass=n,this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setPushable:function(n){return n===void 0&&(n=!0),this.body.pushable=n,this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setOffset:function(n,d){return this.body.setOffset(n,d),this},setSize:function(n,d,a){return this.body.setSize(n,d,a),this},setBodySize:function(n,d,a){return this.body.setSize(n,d,a),this},setCircle:function(n,d,a){return this.body.setCircle(n,d,a),this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setVelocity:function(n,d){return this.body.setVelocity(n,d),this},setVelocityX:function(n){return this.body.setVelocityX(n),this},setVelocityY:function(n){return this.body.setVelocityY(n),this},setMaxVelocity:function(n,d){return this.body.maxVelocity.set(n,d),this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="collide"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="overlap"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="tilecollide"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="tileoverlap"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="worldbounds"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="worldstep"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t,n,d,a,o,r,e,i,l,s,h,f,v,u,c,x,g,m=function(A,M,L){t=A,n=M;var F=t.velocity.x,B=n.velocity.x;return d=t.pushable,l=t._dx<0,s=t._dx>0,h=t._dx===0,c=Math.abs(t.right-n.x)<=Math.abs(n.right-t.x),e=B-F*t.bounce.x,a=n.pushable,f=n._dx<0,v=n._dx>0,u=n._dx===0,x=!c,i=F-B*n.bounce.x,g=Math.abs(L),y()},y=function(){return s&&c&&n.blocked.right?(t.processX(-g,e,!1,!0),1):l&&x&&n.blocked.left?(t.processX(g,e,!0),1):v&&x&&t.blocked.right?(n.processX(-g,i,!1,!0),2):f&&c&&t.blocked.left?(n.processX(g,i,!0),2):0},T=function(){var A=t.velocity.x,M=n.velocity.x,L=Math.sqrt(M*M*n.mass/t.mass)*(M>0?1:-1),F=Math.sqrt(A*A*t.mass/n.mass)*(A>0?1:-1),B=(L+F)*.5;return L-=B,F-=B,o=B+L*t.bounce.x,r=B+F*n.bounce.x,l&&x?S(0):f&&c?S(1):s&&c?S(2):v&&x?S(3):!1},S=function(A){if(d&&a)g*=.5,A===0||A===3?(t.processX(g,o),n.processX(-g,r)):(t.processX(-g,o),n.processX(g,r));else if(d&&!a)A===0||A===3?t.processX(g,e,!0):t.processX(-g,e,!1,!0);else if(!d&&a)A===0||A===3?n.processX(-g,i,!1,!0):n.processX(g,i,!0);else{var M=g*.5;A===0?u?(t.processX(g,0,!0),n.processX(0,null,!1,!0)):v?(t.processX(M,0,!0),n.processX(-M,0,!1,!0)):(t.processX(M,n.velocity.x,!0),n.processX(-M,null,!1,!0)):A===1?h?(t.processX(0,null,!1,!0),n.processX(g,0,!0)):s?(t.processX(-M,0,!1,!0),n.processX(M,0,!0)):(t.processX(-M,null,!1,!0),n.processX(M,t.velocity.x,!0)):A===2?u?(t.processX(-g,0,!1,!0),n.processX(0,null,!0)):f?(t.processX(-M,0,!1,!0),n.processX(M,0,!0)):(t.processX(-M,n.velocity.x,!1,!0),n.processX(M,null,!0)):A===3&&(h?(t.processX(0,null,!0),n.processX(-g,0,!1,!0)):l?(t.processX(M,0,!0),n.processX(-M,0,!1,!0)):(t.processX(M,n.velocity.y,!0),n.processX(-M,null,!1,!0)))}return!0},C=function(A){A===1?n.velocity.x=0:c?n.processX(g,i,!0):n.processX(-g,i,!1,!0),t.moves&&(n.y+=(t.y-t.prev.y)*t.friction.y,n._dy=n.y-n.prev.y)},P=function(A){A===2?t.velocity.x=0:x?t.processX(g,e,!0):t.processX(-g,e,!1,!0),n.moves&&(t.y+=(n.y-n.prev.y)*n.friction.y,t._dy=t.y-t.prev.y)};p.exports={BlockCheck:y,Check:T,Set:m,Run:S,RunImmovableBody1:C,RunImmovableBody2:P}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t,n,d,a,o,r,e,i,l,s,h,f,v,u,c,x,g,m=function(A,M,L){t=A,n=M;var F=t.velocity.y,B=n.velocity.y;return d=t.pushable,l=t._dy<0,s=t._dy>0,h=t._dy===0,c=Math.abs(t.bottom-n.y)<=Math.abs(n.bottom-t.y),e=B-F*t.bounce.y,a=n.pushable,f=n._dy<0,v=n._dy>0,u=n._dy===0,x=!c,i=F-B*n.bounce.y,g=Math.abs(L),y()},y=function(){return s&&c&&n.blocked.down?(t.processY(-g,e,!1,!0),1):l&&x&&n.blocked.up?(t.processY(g,e,!0),1):v&&x&&t.blocked.down?(n.processY(-g,i,!1,!0),2):f&&c&&t.blocked.up?(n.processY(g,i,!0),2):0},T=function(){var A=t.velocity.y,M=n.velocity.y,L=Math.sqrt(M*M*n.mass/t.mass)*(M>0?1:-1),F=Math.sqrt(A*A*t.mass/n.mass)*(A>0?1:-1),B=(L+F)*.5;return L-=B,F-=B,o=B+L*t.bounce.y,r=B+F*n.bounce.y,l&&x?S(0):f&&c?S(1):s&&c?S(2):v&&x?S(3):!1},S=function(A){if(d&&a)g*=.5,A===0||A===3?(t.processY(g,o),n.processY(-g,r)):(t.processY(-g,o),n.processY(g,r));else if(d&&!a)A===0||A===3?t.processY(g,e,!0):t.processY(-g,e,!1,!0);else if(!d&&a)A===0||A===3?n.processY(-g,i,!1,!0):n.processY(g,i,!0);else{var M=g*.5;A===0?u?(t.processY(g,0,!0),n.processY(0,null,!1,!0)):v?(t.processY(M,0,!0),n.processY(-M,0,!1,!0)):(t.processY(M,n.velocity.y,!0),n.processY(-M,null,!1,!0)):A===1?h?(t.processY(0,null,!1,!0),n.processY(g,0,!0)):s?(t.processY(-M,0,!1,!0),n.processY(M,0,!0)):(t.processY(-M,null,!1,!0),n.processY(M,t.velocity.y,!0)):A===2?u?(t.processY(-g,0,!1,!0),n.processY(0,null,!0)):f?(t.processY(-M,0,!1,!0),n.processY(M,0,!0)):(t.processY(-M,n.velocity.y,!1,!0),n.processY(M,null,!0)):A===3&&(h?(t.processY(0,null,!0),n.processY(-g,0,!1,!0)):l?(t.processY(M,0,!0),n.processY(-M,0,!1,!0)):(t.processY(M,n.velocity.y,!0),n.processY(-M,null,!1,!0)))}return!0},C=function(A){A===1?n.velocity.y=0:c?n.processY(g,i,!0):n.processY(-g,i,!1,!0),t.moves&&(n.x+=(t.x-t.prev.x)*t.friction.x,n._dx=n.x-n.prev.x)},P=function(A){A===2?t.velocity.y=0:x?t.processY(g,e,!0):t.processY(-g,e,!1,!0),n.moves&&(t.x+=(n.x-n.prev.x)*n.friction.x,t._dx=t.x-t.prev.x)};p.exports={BlockCheck:y,Check:T,Set:m,Run:S,RunImmovableBody1:C,RunImmovableBody2:P}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n={ProcessTileCallbacks:t(530),ProcessTileSeparationX:t(534),ProcessTileSeparationY:t(536),SeparateTile:t(532),TileCheckX:t(533),TileCheckY:t(535),TileIntersectsBody:t(248)};p.exports=n},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(3),a=new n({initialize:function(){this.boundsCenter=new d,this.centerDiff=new d},parseBody:function(o){if(o=o.hasOwnProperty("body")?o.body:o,!o.hasOwnProperty("bounds")||!o.hasOwnProperty("centerOfMass"))return!1;var r=this.boundsCenter,e=this.centerDiff,i=o.bounds.max.x-o.bounds.min.x,l=o.bounds.max.y-o.bounds.min.y,s=i*o.centerOfMass.x,h=l*o.centerOfMass.y;return r.set(i/2,l/2),e.set(s-r.x,h-r.y),!0},getTopLeft:function(o,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(o)){var i=this.boundsCenter,l=this.centerDiff;return new d(r+i.x+l.x,e+i.y+l.y)}return!1},getTopCenter:function(o,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(o)){var i=this.boundsCenter,l=this.centerDiff;return new d(r+l.x,e+i.y+l.y)}return!1},getTopRight:function(o,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(o)){var i=this.boundsCenter,l=this.centerDiff;return new d(r-(i.x-l.x),e+i.y+l.y)}return!1},getLeftCenter:function(o,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(o)){var i=this.boundsCenter,l=this.centerDiff;return new d(r+i.x+l.x,e+l.y)}return!1},getCenter:function(o,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(o)){var i=this.centerDiff;return new d(r+i.x,e+i.y)}return!1},getRightCenter:function(o,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(o)){var i=this.boundsCenter,l=this.centerDiff;return new d(r-(i.x-l.x),e+l.y)}return!1},getBottomLeft:function(o,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(o)){var i=this.boundsCenter,l=this.centerDiff;return new d(r+i.x+l.x,e-(i.y-l.y))}return!1},getBottomCenter:function(o,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(o)){var i=this.boundsCenter,l=this.centerDiff;return new d(r+l.x,e-(i.y-l.y))}return!1},getBottomRight:function(o,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(o)){var i=this.boundsCenter,l=this.centerDiff;return new d(r-(i.x-l.x),e-(i.y-l.y))}return!1}});p.exports=a},function(p,E){/** + * @author Stefan Hedman (http://steffe.se) + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={decomp:A,quickDecomp:B,isSimple:L,removeCollinearPoints:N,removeDuplicatePoints:X,makeCCW:c};function t(O,R,I){I=I||0;var D=[0,0],G,U,Y,z,H,w,K;return G=O[1][1]-O[0][1],U=O[0][0]-O[1][0],Y=G*O[0][0]+U*O[0][1],z=R[1][1]-R[0][1],H=R[0][0]-R[1][0],w=z*R[0][0]+H*R[0][1],K=G*H-z*U,V(K,0,I)||(D[0]=(H*Y-U*w)/K,D[1]=(G*w-z*Y)/K),D}function n(O,R,I,D){var G=R[0]-O[0],U=R[1]-O[1],Y=D[0]-I[0],z=D[1]-I[1];if(Y*U-z*G===0)return!1;var H=(G*(I[1]-O[1])+U*(O[0]-I[0]))/(Y*U-z*G),w=(Y*(O[1]-I[1])+z*(I[0]-O[0]))/(z*G-Y*U);return H>=0&&H<=1&&w>=0&&w<=1}function d(O,R,I){return(R[0]-O[0])*(I[1]-O[1])-(I[0]-O[0])*(R[1]-O[1])}function a(O,R,I){return d(O,R,I)>0}function o(O,R,I){return d(O,R,I)>=0}function r(O,R,I){return d(O,R,I)<0}function e(O,R,I){return d(O,R,I)<=0}var i=[],l=[];function s(O,R,I,D){if(D){var G=i,U=l;G[0]=R[0]-O[0],G[1]=R[1]-O[1],U[0]=I[0]-R[0],U[1]=I[1]-R[1];var Y=G[0]*U[0]+G[1]*U[1],z=Math.sqrt(G[0]*G[0]+G[1]*G[1]),H=Math.sqrt(U[0]*U[0]+U[1]*U[1]),w=Math.acos(Y/(z*H));return wI[R][0])&&(R=D);return a(f(O,R-1),f(O,R),f(O,R+1))?!1:(x(O),!0)}function x(O){for(var R=[],I=O.length,D=0;D!==I;D++)R.push(O.pop());for(var D=0;D!==I;D++)O[D]=R[D]}function g(O,R){return r(f(O,R-1),f(O,R),f(O,R+1))}var m=[],y=[];function T(O,R,I){var D,G,U=m,Y=y;if(o(f(O,R+1),f(O,R),f(O,I))&&e(f(O,R-1),f(O,R),f(O,I)))return!1;G=h(f(O,R),f(O,I));for(var z=0;z!==O.length;++z)if(!((z+1)%O.length===R||z===R)&&o(f(O,R),f(O,I),f(O,z+1))&&e(f(O,R),f(O,I),f(O,z))&&(U[0]=f(O,R),U[1]=f(O,I),Y[0]=f(O,z),Y[1]=f(O,z+1),D=t(U,Y),h(f(O,R),D)0?M(O,R):[O]}function M(O,R){if(R.length===0)return[O];if(R instanceof Array&&R.length&&R[0]instanceof Array&&R[0].length===2&&R[0][0]instanceof Array){for(var I=[O],D=0;DU)return console.warn("quickDecomp: max level ("+U+") reached."),R;for(var _=0;_Q&&(Q+=O.length),j=Number.MAX_VALUE,Q3&&D>=0;--D)s(f(O,D-1),f(O,D),f(O,D+1),R)&&(O.splice(D%O.length,1),I++);return I}function X(O,R){for(var I=O.length-1;I>=1;--I)for(var D=O[I],G=I-1;G>=0;--G)if(W(D,O[G],R)){O.splice(I,1);continue}}function V(O,R,I){return I=I||0,Math.abs(O-R)<=I}function W(O,R,I){return V(O[0],R[0],I)&&V(O[1],R[1],I)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(86),d=t(0),a=t(591),o=t(128),r=t(592),e=t(1395),i=t(1396),l=t(1397),s=t(593),h=t(589),f=t(590),v=t(1398),u=t(64),c=new d({initialize:function(g){this.world=g,this.scene=g.scene,this.sys=g.scene.sys},rectangle:function(x,g,m,y,T){var S=n.rectangle(x,g,m,y,T);return this.world.add(S),S},trapezoid:function(x,g,m,y,T,S){var C=n.trapezoid(x,g,m,y,T,S);return this.world.add(C),C},circle:function(x,g,m,y,T){var S=n.circle(x,g,m,y,T);return this.world.add(S),S},polygon:function(x,g,m,y,T){var S=n.polygon(x,g,m,y,T);return this.world.add(S),S},fromVertices:function(x,g,m,y,T,S,C){typeof m=="string"&&(m=u.fromPath(m));var P=n.fromVertices(x,g,m,y,T,S,C);return this.world.add(P),P},fromPhysicsEditor:function(x,g,m,y,T){T===void 0&&(T=!0);var S=h.parseBody(x,g,m,y);return T&&!this.world.has(S)&&this.world.add(S),S},fromSVG:function(x,g,m,y,T,S){y===void 0&&(y=1),T===void 0&&(T={}),S===void 0&&(S=!0);for(var C=m.getElementsByTagName("path"),P=[],A=0;A + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(249),d=t(2),a=t(3);function o(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var r=function(e,i,l,s){l===void 0&&(l={}),s===void 0&&(s=!0);var h=i.x,f=i.y;i.body={temp:!0,position:{x:h,y:f}};var v=[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity];if(v.forEach(function(c){for(var x in c)o(c[x])?Object.defineProperty(i,x,{get:c[x].get,set:c[x].set}):Object.defineProperty(i,x,{value:c[x]})}),i.world=e,i._tempVec2=new a(h,f),l.hasOwnProperty("type")&&l.type==="body")i.setExistingBody(l,s);else{var u=d(l,"shape",null);u||(u="rectangle"),l.addToWorld=s,i.setBody(u,l)}return i};p.exports=r},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(249),a=t(15),o=t(2),r=t(125),e=t(167),i=t(3),l=new n({Extends:r,Mixins:[d.Bounce,d.Collision,d.Force,d.Friction,d.Gravity,d.Mass,d.Sensor,d.SetBody,d.Sleep,d.Static,d.Transform,d.Velocity,e],initialize:function(h,f,v,u,c,x){a.call(this,h.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(u,c),this.setSizeToFrame(),this.setOrigin(),this.world=h,this._tempVec2=new i(f,v);var g=o(x,"shape",null);g?this.setBody(g,x):this.setRectangle(this.width,this.height,x),this.setPosition(f,v),this.initPipeline()}});p.exports=l},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(164),d=t(0),a=t(249),o=t(15),r=t(2),e=t(167),i=t(73),l=t(3),s=new d({Extends:i,Mixins:[a.Bounce,a.Collision,a.Force,a.Friction,a.Gravity,a.Mass,a.Sensor,a.SetBody,a.Sleep,a.Static,a.Transform,a.Velocity,e],initialize:function(f,v,u,c,x,g){o.call(this,f.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new n(this),this.setTexture(c,x),this.setSizeToFrame(),this.setOrigin(),this.world=f,this._tempVec2=new l(v,u);var m=r(g,"shape",null);m?this.setBody(m,g):this.setRectangle(this.width,this.height,g),this.setPosition(v,u),this.initPipeline()}});p.exports=s},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(84),d=t(0),a=t(118),o=t(128),r=t(273),e=t(272),i=t(51),l=t(127),s=t(165),h=t(3),f=t(64),v=new d({initialize:function(c,x,g){g===void 0&&(g={});var m={label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}};this.scene=c,this.world=x,this.camera=null,this.pointer=null,this.active=!0,this.position=new h,this.body=null,this.part=null,this.constraint=o.create(l(g,m)),this.world.on(e.BEFORE_UPDATE,this.update,this),c.sys.input.on(i.POINTER_DOWN,this.onDown,this),c.sys.input.on(i.POINTER_UP,this.onUp,this)},onDown:function(u){this.pointer||(this.pointer=u,this.camera=u.camera)},onUp:function(u){u===this.pointer&&(this.pointer=null)},getBody:function(u){var c=this.position,x=this.constraint;this.camera.getWorldPoint(u.x,u.y,c);for(var g=a.allBodies(this.world.localWorld),m=0;m1?1:0,y=m;y0&&l.trigger(u,"collisionStart",{pairs:L.collisionStart}),o.preSolvePosition(L.list),S=0;S0&&l.trigger(u,"collisionActive",{pairs:L.collisionActive}),L.collisionEnd.length>0&&l.trigger(u,"collisionEnd",{pairs:L.collisionEnd}),e.update(u.metrics,u),n._bodiesClearForces(P),l.trigger(u,"afterUpdate",C),u},n.merge=function(u,c){if(f.extend(u,c),c.world){u.world=c.world,n.clear(u);for(var x=s.allBodies(u.world),g=0;g + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(86),d=t(41),a=t(0),o=t(32),r=t(118),e=t(1401),i=t(9),l=t(272),s=t(2),h=t(6),f=t(41),v=t(166),u=t(593),c=t(596),x=t(83),g=new a({Extends:i,initialize:function(y,T){i.call(this),this.scene=y,this.engine=e.create(T),this.localWorld=this.engine.world;var S=h(T,"gravity",null);S?this.setGravity(S.x,S.y,S.scale):S===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=h(T,"enabled",!0),this.correction=h(T,"correction",1),this.getDelta=h(T,"getDelta",this.update60Hz);var C=s(T,"runner",{}),P=s(C,"fps",!1),A=s(C,"fps",60),M=s(C,"delta",1e3/A),L=s(C,"deltaMin",1e3/A),F=s(C,"deltaMax",1e3/(A*.5));P||(A=1e3/M),this.runner={fps:A,correction:s(C,"correction",1),deltaSampleSize:s(C,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:s(C,"isFixed",!1),delta:M,deltaMin:L,deltaMax:F},this.autoUpdate=h(T,"autoUpdate",!0);var B=h(T,"debug",!1);if(this.drawDebug=typeof B=="object"?!0:B,this.debugGraphic,this.debugConfig={showAxes:s(B,"showAxes",!1),showAngleIndicator:s(B,"showAngleIndicator",!1),angleColor:s(B,"angleColor",15208787),showBroadphase:s(B,"showBroadphase",!1),broadphaseColor:s(B,"broadphaseColor",16757760),showBounds:s(B,"showBounds",!1),boundsColor:s(B,"boundsColor",16777215),showVelocity:s(B,"showVelocity",!1),velocityColor:s(B,"velocityColor",44783),showCollisions:s(B,"showCollisions",!1),collisionColor:s(B,"collisionColor",16094476),showSeparations:s(B,"showSeparations",!1),separationColor:s(B,"separationColor",16753920),showBody:s(B,"showBody",!0),showStaticBody:s(B,"showStaticBody",!0),showInternalEdges:s(B,"showInternalEdges",!1),renderFill:s(B,"renderFill",!1),renderLine:s(B,"renderLine",!0),fillColor:s(B,"fillColor",1075465),fillOpacity:s(B,"fillOpacity",1),lineColor:s(B,"lineColor",2678297),lineOpacity:s(B,"lineOpacity",1),lineThickness:s(B,"lineThickness",1),staticFillColor:s(B,"staticFillColor",857979),staticLineColor:s(B,"staticLineColor",1255396),showSleeping:s(B,"showSleeping",!1),staticBodySleepOpacity:s(B,"staticBodySleepOpacity",.7),sleepFillColor:s(B,"sleepFillColor",4605510),sleepLineColor:s(B,"sleepLineColor",10066585),showSensors:s(B,"showSensors",!0),sensorFillColor:s(B,"sensorFillColor",857979),sensorLineColor:s(B,"sensorLineColor",1255396),showPositions:s(B,"showPositions",!0),positionSize:s(B,"positionSize",4),positionColor:s(B,"positionColor",14697178),showJoint:s(B,"showJoint",!0),jointColor:s(B,"jointColor",14737474),jointLineOpacity:s(B,"jointLineOpacity",1),jointLineThickness:s(B,"jointLineThickness",2),pinSize:s(B,"pinSize",4),pinColor:s(B,"pinColor",4382944),springColor:s(B,"springColor",14697184),anchorColor:s(B,"anchorColor",15724527),anchorSize:s(B,"anchorSize",4),showConvexHulls:s(B,"showConvexHulls",!1),hullColor:s(B,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),s(T,"setBounds",!1)){var N=T.setBounds;if(typeof N=="boolean")this.setBounds();else{var X=s(N,"x",0),V=s(N,"y",0),W=s(N,"width",y.sys.scale.width),O=s(N,"height",y.sys.scale.height),R=s(N,"thickness",64),I=s(N,"left",!0),D=s(N,"right",!0),G=s(N,"top",!0),U=s(N,"bottom",!0);this.setBounds(X,V,W,O,R,I,D,G,U)}}},setCompositeRenderStyle:function(m){var y=m.bodies,T=m.constraints,S=m.composites,C,P,A;for(C=0;C0&&(P=C[0].bodyA,A=C[0].bodyB),m.emit(l.COLLISION_START,S,P,A)}),v.on(y,"collisionActive",function(S){var C=S.pairs,P,A;C.length>0&&(P=C[0].bodyA,A=C[0].bodyB),m.emit(l.COLLISION_ACTIVE,S,P,A)}),v.on(y,"collisionEnd",function(S){var C=S.pairs,P,A;C.length>0&&(P=C[0].bodyA,A=C[0].bodyB),m.emit(l.COLLISION_END,S,P,A)})},setBounds:function(m,y,T,S,C,P,A,M,L){return m===void 0&&(m=0),y===void 0&&(y=0),T===void 0&&(T=this.scene.sys.scale.width),S===void 0&&(S=this.scene.sys.scale.height),C===void 0&&(C=64),P===void 0&&(P=!0),A===void 0&&(A=!0),M===void 0&&(M=!0),L===void 0&&(L=!0),this.updateWall(P,"left",m-C,y-C,C,S+C*2),this.updateWall(A,"right",m+T,y-C,C,S+C*2),this.updateWall(M,"top",m,y-C,T,C),this.updateWall(L,"bottom",m,y+S,T,C),this},updateWall:function(m,y,T,S,C,P){var A=this.walls[y];m?(A&&c.remove(this.localWorld,A),T+=C/2,S+=P/2,this.walls[y]=this.create(T,S,C,P,{isStatic:!0,friction:0,frictionStatic:0})):(A&&c.remove(this.localWorld,A),this.walls[y]=null)},createDebugGraphic:function(){var m=this.scene.sys.add.graphics({x:0,y:0});return m.setDepth(Number.MAX_VALUE),this.debugGraphic=m,this.drawDebug=!0,m},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(m,y,T){return m===void 0&&(m=0),y===void 0&&(y=1),this.localWorld.gravity.x=m,this.localWorld.gravity.y=y,T!==void 0&&(this.localWorld.gravity.scale=T),this},create:function(m,y,T,S,C){var P=n.rectangle(m,y,T,S,C);return c.add(this.localWorld,P),P},add:function(m){return c.add(this.localWorld,m),this},remove:function(m,y){Array.isArray(m)||(m=[m]);for(var T=0;TS.deltaMax?S.deltaMax:y,P=y/S.delta,S.delta=y),S.timeScalePrev!==0&&(P*=C.timeScale/S.timeScalePrev),C.timeScale===0&&(P=0),S.timeScalePrev=C.timeScale,S.correction=P,S.frameCounter+=1,m-S.counterTimestamp>=1e3&&(S.fps=S.frameCounter*((m-S.counterTimestamp)/1e3),S.counterTimestamp=m,S.frameCounter=0),e.update(T,y,P)}},step:function(m,y){e.update(this.engine,m,y)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(m){var y=m.hasOwnProperty("body")?m.body:m;return r.get(this.localWorld,y.id,y.type)!==null},getAllBodies:function(){return r.allBodies(this.localWorld)},getAllConstraints:function(){return r.allConstraints(this.localWorld)},getAllComposites:function(){return r.allComposites(this.localWorld)},postUpdate:function(){if(!!this.drawDebug){var m=this.debugConfig,y=this.engine,T=this.debugGraphic,S=r.allBodies(this.localWorld);this.debugGraphic.clear(),m.showBroadphase&&y.broadphase.controller&&this.renderGrid(y.broadphase,T,m.broadphaseColor,.5),m.showBounds&&this.renderBodyBounds(S,T,m.boundsColor,.5),(m.showBody||m.showStaticBody)&&this.renderBodies(S),m.showJoint&&this.renderJoints(),(m.showAxes||m.showAngleIndicator)&&this.renderBodyAxes(S,T,m.showAxes,m.angleColor,.5),m.showVelocity&&this.renderBodyVelocity(S,T,m.velocityColor,1,2),m.showSeparations&&this.renderSeparations(y.pairs.list,T,m.separationColor),m.showCollisions&&this.renderCollisions(y.pairs.list,T,m.collisionColor)}},renderGrid:function(m,y,T,S){y.lineStyle(1,T,S);for(var C=o.keys(m.buckets),P=0;P0){var B=F[0].vertex.x,N=F[0].vertex.y;F.length===2&&(B=(F[0].vertex.x+F[1].vertex.x)/2,N=(F[0].vertex.y+F[1].vertex.y)/2),L.bodyB===L.supports[0].body||L.bodyA.isStatic?y.lineBetween(B-L.normal.x*8,N-L.normal.y*8,B,N):y.lineBetween(B+L.normal.x*8,N+L.normal.y*8,B,N)}}return this},renderBodyBounds:function(m,y,T,S){y.lineStyle(1,T,S);for(var C=0;C1?1:0;L1?1:0;F1?1:0;F1&&this.renderConvexHull(O,y,V,D)}}},renderBody:function(m,y,T,S,C,P,A,M){S===void 0&&(S=null),C===void 0&&(C=null),P===void 0&&(P=1),A===void 0&&(A=null),M===void 0&&(M=null);for(var L=this.debugConfig,F=L.sensorFillColor,B=L.sensorLineColor,N=m.parts,X=N.length,V=X>1?1:0;V1){var A=m.vertices;y.lineStyle(S,T),y.beginPath(),y.moveTo(A[0].x,A[0].y);for(var M=1;M0&&(y.fillStyle(A),y.fillCircle(N.x,N.y,M),y.fillCircle(X.x,X.y,M)),this},resetCollisionIDs:function(){return d._nextCollidingGroupId=1,d._nextNonCollidingGroupId=-1,d._nextCategory=1,this},shutdown:function(){v.off(this.engine),this.removeAllListeners(),c.clear(this.localWorld,!1),e.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});p.exports=g},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BasePlugin:t(540),DefaultPlugins:t(197),PluginCache:t(24),PluginManager:t(414),ScenePlugin:t(1404)}},function(p,E,t){/** +* @author Richard Davey +* @copyright 2020 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/var n=t(540),d=t(0),a=t(20),o=new d({Extends:n,initialize:function(e,i,l){n.call(this,i),this.scene=e,this.systems=e.sys,this.pluginKey=l,e.sys.events.once(a.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Canvas:t(1406),Events:t(91),Snapshot:t(1407),WebGL:t(1408)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={CanvasRenderer:t(368),GetBlendModes:t(370),SetTransform:t(30)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Canvas:t(369),WebGL:t(383)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(107),d=t(17),a={PipelineManager:t(372),Pipelines:t(1409),RenderTarget:t(141),Utils:t(12),WebGLPipeline:t(58),WebGLRenderer:t(371),WebGLShader:t(375)};a=d(!1,a,n),p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(92),d=t(17),a={BitmapMaskPipeline:t(373),Events:t(374),GraphicsPipeline:t(376),LightPipeline:t(377),MultiPipeline:t(108),PointLightPipeline:t(378),PostFXPipeline:t(1410),RopePipeline:t(379),SinglePipeline:t(380),UtilityPipeline:t(381)};a=d(!1,a,n),p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(198),a=t(2),o=t(1411),r=t(382),e=t(58),i=new n({Extends:e,initialize:function(s){s.renderTarget=a(s,"renderTarget",1),s.fragShader=a(s,"fragShader",o),s.vertShader=a(s,"vertShader",r),s.attributes=a(s,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),s.batchSize=1,s.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],e.call(this,s),this.isPostFX=!0,this.gameObject,this.colorMatrix=new d,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){e.prototype.boot.call(this);var l=this.manager.UTILITY_PIPELINE;this.fullFrame1=l.fullFrame1,this.fullFrame2=l.fullFrame2,this.halfFrame1=l.halfFrame1,this.halfFrame2=l.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(l){this.bindAndDraw(l)},copyFrame:function(l,s,h,f,v){this.manager.copyFrame(l,s,h,f,v)},copyToGame:function(l){this.manager.copyToGame(l)},drawFrame:function(l,s,h){this.manager.drawFrame(l,s,h,this.colorMatrix)},blendFrames:function(l,s,h,f,v){this.manager.blendFrames(l,s,h,f,v)},blendFramesAdditive:function(l,s,h,f,v){this.manager.blendFramesAdditive(l,s,h,f,v)},clearFrame:function(l,s){this.manager.clearFrame(l,s)},blitFrame:function(l,s,h,f,v,u){this.manager.blitFrame(l,s,h,f,v,u)},copyFrameRect:function(l,s,h,f,v,u,c,x){this.manager.copyFrameRect(l,s,h,f,v,u,c,x)},bindAndDraw:function(l,s,h,f,v){h===void 0&&(h=!0),f===void 0&&(f=!0);var u=this.gl,c=this.renderer;this.bind(v),this.set1i("uMainSampler",0),s?(u.viewport(0,0,s.width,s.height),u.bindFramebuffer(u.FRAMEBUFFER,s.framebuffer),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,s.texture,0),h&&(f?u.clearColor(0,0,0,0):u.clearColor(0,0,0,1),u.clear(u.COLOR_BUFFER_BIT))):(c.popFramebuffer(!1,!1,!1),c.currentFramebuffer||u.viewport(0,0,c.width,c.height)),u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,l.texture),u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.STATIC_DRAW),u.drawArrays(u.TRIANGLES,0,6),s?(u.bindTexture(u.TEXTURE_2D,null),u.bindFramebuffer(u.FRAMEBUFFER,null)):c.resetTextures()}});p.exports=i},function(p,E){p.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join(` +`)},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(17),d=t(201),a={Center:t(403),Events:t(104),Orientation:t(404),ScaleManager:t(415),ScaleModes:t(405),Zoom:t(406)};a=n(!1,a,d.CENTER),a=n(!1,a,d.ORIENTATION),a=n(!1,a,d.SCALE_MODE),a=n(!1,a,d.ZOOM),p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(144),d=t(17),a={Events:t(20),GetPhysicsPlugins:t(419),GetScenePlugins:t(420),SceneManager:t(417),ScenePlugin:t(1414),Settings:t(421),Systems:t(204)};a=d(!1,a,n),p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(18),d=t(0),a=t(20),o=t(2),r=t(24),e=new d({initialize:function(l){this.scene=l,this.systems=l.sys,this.settings=l.sys.settings,this.key=l.sys.settings.key,this.manager=l.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,l.sys.events.once(a.BOOT,this.boot,this),l.sys.events.on(a.START,this.pluginStart,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(a.SHUTDOWN,this.shutdown,this)},start:function(i,l){return i===void 0&&(i=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",i,l),this},restart:function(i){var l=this.key;return this.manager.queueOp("stop",l),this.manager.queueOp("start",l,i),this},transition:function(i){i===void 0&&(i={});var l=o(i,"target",!1),s=this.manager.getScene(l);if(!l||!this.checkValidTransition(s))return!1;var h=o(i,"duration",1e3);this._elapsed=0,this._target=s,this._duration=h,this._willSleep=o(i,"sleep",!1),this._willRemove=o(i,"remove",!1);var f=o(i,"onUpdate",null);f&&(this._onUpdate=f,this._onUpdateScope=o(i,"onUpdateScope",this.scene));var v=o(i,"allowInput",!1);this.settings.transitionAllowInput=v;var u=s.sys.settings;return u.isTransition=!0,u.transitionFrom=this.scene,u.transitionDuration=h,u.transitionAllowInput=v,o(i,"moveAbove",!1)?this.manager.moveAbove(this.key,l):o(i,"moveBelow",!1)&&this.manager.moveBelow(this.key,l),s.sys.isSleeping()?s.sys.wake(o(i,"data")):this.manager.start(l,o(i,"data")),this.systems.events.emit(a.TRANSITION_OUT,s,h),this.systems.events.on(a.UPDATE,this.step,this),!0},checkValidTransition:function(i){return!(!i||i.sys.isActive()||i.sys.isTransitioning()||i===this.scene||this.systems.isTransitioning())},step:function(i,l){this._elapsed+=l,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var i=this._target.sys,l=this._target.sys.settings;this.systems.events.off(a.UPDATE,this.step,this),i.events.emit(a.TRANSITION_COMPLETE,this.scene),l.isTransition=!1,l.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(i,l,s,h){return this.manager.add(i,l,s,h)},launch:function(i,l){return i&&i!==this.key&&this.manager.queueOp("start",i,l),this},run:function(i,l){return i&&i!==this.key&&this.manager.queueOp("run",i,l),this},pause:function(i,l){return i===void 0&&(i=this.key),this.manager.queueOp("pause",i,l),this},resume:function(i,l){return i===void 0&&(i=this.key),this.manager.queueOp("resume",i,l),this},sleep:function(i,l){return i===void 0&&(i=this.key),this.manager.queueOp("sleep",i,l),this},wake:function(i,l){return i===void 0&&(i=this.key),this.manager.queueOp("wake",i,l),this},switch:function(i){return i!==this.key&&this.manager.queueOp("switch",this.key,i),this},stop:function(i,l){return i===void 0&&(i=this.key),this.manager.queueOp("stop",i,l),this},setActive:function(i,l,s){l===void 0&&(l=this.key);var h=this.manager.getScene(l);return h&&h.sys.setActive(i,s),this},setVisible:function(i,l){l===void 0&&(l=this.key);var s=this.manager.getScene(l);return s&&s.sys.setVisible(i),this},isSleeping:function(i){return i===void 0&&(i=this.key),this.manager.isSleeping(i)},isActive:function(i){return i===void 0&&(i=this.key),this.manager.isActive(i)},isPaused:function(i){return i===void 0&&(i=this.key),this.manager.isPaused(i)},isVisible:function(i){return i===void 0&&(i=this.key),this.manager.isVisible(i)},swapPosition:function(i,l){return l===void 0&&(l=this.key),i!==l&&this.manager.swapPosition(i,l),this},moveAbove:function(i,l){return l===void 0&&(l=this.key),i!==l&&this.manager.moveAbove(i,l),this},moveBelow:function(i,l){return l===void 0&&(l=this.key),i!==l&&this.manager.moveBelow(i,l),this},remove:function(i){return i===void 0&&(i=this.key),this.manager.remove(i),this},moveUp:function(i){return i===void 0&&(i=this.key),this.manager.moveUp(i),this},moveDown:function(i){return i===void 0&&(i=this.key),this.manager.moveDown(i),this},bringToTop:function(i){return i===void 0&&(i=this.key),this.manager.bringToTop(i),this},sendToBack:function(i){return i===void 0&&(i=this.key),this.manager.sendToBack(i),this},get:function(i){return this.manager.getScene(i)},getIndex:function(i){return i===void 0&&(i=this.key),this.manager.getIndex(i)},shutdown:function(){var i=this.systems.events;i.off(a.SHUTDOWN,this.shutdown,this),i.off(a.POST_UPDATE,this.step,this),i.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",e,"scenePlugin"),p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Events:t(438),List:t(110),Map:t(102),ProcessQueue:t(211),RTree:t(531),Set:t(149),Size:t(416)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(17),d=t(1417),a={CanvasTexture:t(423),Events:t(106),FilterMode:d,Frame:t(109),Parsers:t(425),Texture:t(206),TextureManager:t(422),TextureSource:t(424)};a=n(!1,a,d),p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={LINEAR:0,NEAREST:1};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(17),d=t(1419),a={Components:t(251),Parsers:t(1452),Formats:t(40),ImageCollection:t(576),ParseToTilemap:t(262),Tile:t(85),Tilemap:t(580),TilemapCreator:t(1459),TilemapFactory:t(1460),Tileset:t(122),TilemapLayer:t(581),Orientation:t(29),LayerData:t(120),MapData:t(121),ObjectLayer:t(572)};a=n(!1,a,d.ORIENTATION),p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n={ORIENTATION:t(29)};p.exports=n},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=t(63),a=function(o,r,e,i,l,s,h,f){h===void 0&&(h=!0),o<0&&(o=0),r<0&&(r=0);for(var v=n(o,r,e,i,null,f),u=l-o,c=s-r,x=0;x=0&&g=0&&m + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=t(542),a=function(o,r,e,i,l,s){e||(e={}),Array.isArray(o)||(o=[o]);var h=s.tilemapLayer;i||(i=h.scene),l||(l=i.cameras.main);var f=n(0,0,s.width,s.height,null,s),v=[],u;for(u=0;u + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=t(63),a=t(72),o=function(r,e,i,l,s,h,f){for(var v=f.collideIndexes.indexOf(r)!==-1,u=n(e,i,l,s,null,f),c=0;c + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=function(a,o,r,e,i,l,s,h){var f=n(r,e,i,l,s,h);return f.filter(a,o)};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){d===void 0&&(d=0),a===void 0&&(a=!1);var r=0,e,i,l;if(a){for(i=o.height-1;i>=0;i--)for(e=o.width-1;e>=0;e--)if(l=o.data[i][e],l&&l.index===n){if(r===d)return l;r+=1}}else for(i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=function(a,o,r,e,i,l,s,h){var f=n(r,e,i,l,s,h);return f.find(a,o)||null};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=function(a,o,r,e,i,l,s,h){var f=n(r,e,i,l,s,h);f.forEach(a,o)};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(29),d=t(544),a=t(545),o=t(547),r=t(1),e=t(548),i=function(l){return l===n.ORTHOGONAL?d:l===n.HEXAGONAL?a:l===n.STAGGERED?e:l===n.ISOMETRIC?o:r};p.exports=i},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(158),d=t(3),a=new d,o=function(r,e,i,l,s){return s.tilemapLayer.worldToTileXY(r,e,!0,a,l),n(a.x,a.y,i,s)};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(483),d=t(26),a=t(484),o=t(1),r=t(3),e=function(f,v){return a.RectangleToTriangle(v,f)},i=new r,l=new r,s=new r,h=function(f,v,u,c){if(f===void 0)return[];var x=o;f instanceof n.Circle?x=a.CircleToRectangle:f instanceof n.Rectangle?x=a.RectangleToRectangle:f instanceof n.Triangle?x=e:f instanceof n.Line&&(x=a.LineToRectangle),c.tilemapLayer.worldToTileXY(f.left,f.top,!0,l,u);var g=l.x,m=l.y;c.tilemapLayer.worldToTileXY(f.right,f.bottom,!0,s,u);var y=Math.ceil(s.x),T=Math.ceil(s.y),S=Math.max(y-g,1),C=Math.max(T-m,1),P=d(g,m,S,C,v,c),A=c.tileWidth,M=c.tileHeight;c.tilemapLayer&&(A*=c.tilemapLayer.scaleX,M*=c.tilemapLayer.scaleY);for(var L=[],F=new n.Rectangle(0,0,A,M),B=0;B + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(29),d=t(1),a=t(253),o=function(r){return r===n.ORTHOGONAL?a:d};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(29),d=t(550),a=t(551),o=t(1),r=t(552),e=t(553),i=function(l){return l===n.ORTHOGONAL?e:l===n.ISOMETRIC?a:l===n.HEXAGONAL?d:l===n.STAGGERED?r:o};p.exports=i},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(29),d=t(554),a=t(1),o=t(555),r=t(254),e=function(i){return i===n.ORTHOGONAL?r:i===n.HEXAGONAL?d:i===n.STAGGERED?o:a};p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(29),d=t(1),a=t(255),o=function(r){return r===n.ORTHOGONAL?a:d};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(29),d=t(556),a=t(557),o=t(1),r=t(558),e=t(559),i=function(l){return l===n.ORTHOGONAL?e:l===n.ISOMETRIC?a:l===n.HEXAGONAL?d:l===n.STAGGERED?r:o};p.exports=i},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(29),d=t(560),a=t(1),o=t(561),r=t(256),e=function(i){return i===n.ORTHOGONAL?r:i===n.HEXAGONAL?d:i===n.STAGGERED?o:a};p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(562),d=t(3),a=new d,o=function(r,e,i,l){l.tilemapLayer.worldToTileXY(r,e,!0,a,i);var s=a.x,h=a.y;return n(s,h,l)};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(257),d=t(3),a=new d,o=function(r,e,i,l,s,h){return h.tilemapLayer.worldToTileXY(e,i,!0,a,s,h),n(r,a.x,a.y,l,h)};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(63),d=t(257),a=function(o,r,e,i,l){if(i===void 0&&(i=!0),!Array.isArray(o))return null;Array.isArray(o[0])||(o=[o]);for(var s=o.length,h=o[0].length,f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=t(210),a=function(o,r,e,i,l,s){var h,f=n(o,r,e,i,{},s);if(!l)for(l=[],h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(563),d=t(3),a=new d,o=function(r,e,i,l,s,h){return h.tilemapLayer.worldToTileXY(r,e,!0,a,s,h),n(a.x,a.y,i,l,h)};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=t(397),a=new d(105,210,231,150),o=new d(243,134,48,200),r=new d(40,39,37,150),e=function(i,l,s){l===void 0&&(l={});var h=l.tileColor!==void 0?l.tileColor:a,f=l.collidingTileColor!==void 0?l.collidingTileColor:o,v=l.faceColor!==void 0?l.faceColor:r,u=n(0,0,s.width,s.height,null,s);i.translateCanvas(s.tilemapLayer.x,s.tilemapLayer.y),i.scaleCanvas(s.tilemapLayer.scaleX,s.tilemapLayer.scaleY);for(var c=0;c + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(72),d=t(63),a=t(160),o=function(r,e,i,l,s){e===void 0&&(e=!0),i===void 0&&(i=!0),s===void 0&&(s=!0),Array.isArray(r)||(r=[r]);for(var h=0;h + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(72),d=t(63),a=t(160),o=function(r,e,i,l,s,h){if(i===void 0&&(i=!0),l===void 0&&(l=!0),h===void 0&&(h=!0),!(r>e)){for(var f=r;f<=e;f++)a(f,i,s);if(h)for(var v=0;v=r&&c.index<=e&&n(c,i)}l&&d(0,0,s.width,s.height,s)}};p.exports=o},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(72),d=t(63),a=t(160),o=function(r,e,i,l){e===void 0&&(e=!0),i===void 0&&(i=!0),Array.isArray(r)||(r=[r]);for(var s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(72),d=t(63),a=t(126),o=function(r,e,i,l){e===void 0&&(e=!0),i===void 0&&(i=!0);for(var s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(72),d=t(63),a=function(o,r,e){o===void 0&&(o=!0),r===void 0&&(r=!0);for(var i=0;i0&&n(s,o)}}r&&d(0,0,e.width,e.height,e)};p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d,a,o){if(typeof n=="number")o.callbacks[n]=d!==null?{callback:d,callbackContext:a}:void 0;else for(var r=0,e=n.length;r + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=function(a,o,r,e,i,l,s){for(var h=n(a,o,r,e,null,s),f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=t(131),a=function(o,r,e,i,l){var s=n(o,r,e,i,null,l),h=s.map(function(v){return v.index});d(h);for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=function(a,o,r,e,i,l,s){for(var h=n(r,e,i,l,null,s),f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(26),d=function(a,o,r,e,i,l){if(!!i){var s,h=n(a,o,r,e,null,l),f=0;for(s=0;s + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={FromOrientationString:t(258),Parse:t(564),Parse2DArray:t(259),ParseCSV:t(565),Impact:t(1454),Tiled:t(1455)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){for(var a=0;a0){var e={},i={},l,s,h;if(Array.isArray(o.edgecolors))for(l=0;l + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ParseTileLayers:t(578),ParseTilesets:t(579),ParseWeltmeister:t(577)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={AssignTileProperties:t(567),Base64Decode:t(574),BuildTilesetIndex:t(568),CreateGroupLayer:t(161),ParseGID:t(261),ParseImageLayers:t(569),ParseJSONTiled:t(566),ParseObject:t(260),ParseObjectLayers:t(570),ParseTileLayers:t(573),ParseTilesets:t(575)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(1),d=t(1);n=t(1457),d=t(1458),p.exports={renderWebGL:n,renderCanvas:d}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(12),d=function(a,o,r){var e=o.cull(r),i=e.length,l=r.alpha*o.alpha;if(!(i===0||l<=0)){var s=o.gidMap,h=a.pipelines.set(o.pipeline,o),f=n.getTintAppendFloatAlpha,v=o.scrollFactorX,u=o.scrollFactorY,c=o.x,x=o.y,g=o.scaleX,m=o.scaleY;a.pipelines.preBatch(o);for(var y=0;y + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(25),d=new n,a=new n,o=new n,r=function(e,i,l,s){var h=i.cull(l),f=h.length,v=l.alpha*i.alpha;if(!(f===0||v<=0)){var u=d,c=a,x=o;c.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),u.copyFrom(l.matrix);var g=e.currentContext,m=i.gidMap;g.save(),s?(u.multiplyWithOffset(s,-l.scrollX*i.scrollFactorX,-l.scrollY*i.scrollFactorY),c.e=i.x,c.f=i.y,u.multiply(c,x),x.copyToContext(g)):(c.e-=l.scrollX*i.scrollFactorX,c.f-=l.scrollY*i.scrollFactorY,c.copyToContext(g)),(!e.antialias||i.scaleX>1||i.scaleY>1)&&(g.imageSmoothingEnabled=!1);for(var y=0;y + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(16),d=t(262);n.register("tilemap",function(a){var o=a!==void 0?a:{};return d(this.scene,o.key,o.tileWidth,o.tileHeight,o.width,o.height,o.data,o.insertNull)})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(5),d=t(262);n.register("tilemap",function(a,o,r,e,i,l,s){return a===null&&(a=void 0),o===null&&(o=void 0),r===null&&(r=void 0),e===null&&(e=void 0),i===null&&(i=void 0),d(this.scene,a,o,r,e,i,l,s)})},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Clock:t(1462),TimerEvent:t(582)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(0),d=t(24),a=t(20),o=t(582),r=t(93),e=new n({initialize:function(l){this.scene=l,this.systems=l.sys,this.now=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],l.sys.events.once(a.BOOT,this.boot,this),l.sys.events.on(a.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var i=this.systems.events;i.on(a.PRE_UPDATE,this.preUpdate,this),i.on(a.UPDATE,this.update,this),i.once(a.SHUTDOWN,this.shutdown,this)},addEvent:function(i){var l;return i instanceof o?(l=i,this.removeEvent(l),l.elapsed=l.startAt,l.hasDispatched=!1,l.repeatCount=l.repeat===-1||l.loop?999999999999:l.repeat):l=new o(i),this._pendingInsertion.push(l),l},delayedCall:function(i,l,s,h){return this.addEvent({delay:i,callback:l,args:s,callbackScope:h})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(i){Array.isArray(i)||(i=[i]);for(var l=0;l-1&&this._active.splice(f,1),h.destroy()}for(s=0;s=h.delay)){var f=h.elapsed-h.delay;h.elapsed=h.delay,!h.hasDispatched&&h.callback&&(h.hasDispatched=!0,h.callback.apply(h.callbackScope,h.args)),h.repeatCount>0?(h.repeatCount--,h.elapsed=f,h.hasDispatched=!1):this._pendingRemoval.push(h)}}}},shutdown:function(){var i;for(i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(100),d=t(17),a={Builders:t(1464),Events:t(267),TweenManager:t(1480),Tween:t(266),TweenData:t(268),Timeline:t(588)};a=d(!1,a,n),p.exports=a},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={GetBoolean:t(99),GetEaseFunction:t(80),GetNewValue:t(162),GetProps:t(583),GetTargets:t(263),GetTweens:t(584),GetValueOp:t(264),NumberTweenBuilder:t(585),StaggerBuilder:t(586),TimelineBuilder:t(587),TweenBuilder:t(163)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","loop","loopDelay","offset","onActive","onActiveParams","onActiveScope","onComplete","onCompleteParams","onCompleteScope","onLoop","onLoopParams","onLoopScope","onRepeat","onRepeatParams","onRepeatScope","onStart","onStartParams","onStartScope","onStop","onStopParams","onStopScope","onUpdate","onUpdateParams","onUpdateScope","onYoyo","onYoyoParams","onYoyoScope","paused","props","repeat","repeatDelay","targets","useFrames","yoyo"]},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loop"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="active"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="complete"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="loop"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="repeat"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="start"},function(p,E){/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="stop"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="update"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="yoyo"},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(93),d=t(0),a=t(585),o=t(24),r=t(20),e=t(586),i=t(587),l=t(100),s=t(163),h=new d({initialize:function(v){this.scene=v,this.systems=v.sys,this.timeScale=1,this._add=[],this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,v.sys.events.once(r.BOOT,this.boot,this),v.sys.events.on(r.START,this.start,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var f=this.systems.events;f.on(r.PRE_UPDATE,this.preUpdate,this),f.on(r.UPDATE,this.update,this),f.once(r.SHUTDOWN,this.shutdown,this),this.timeScale=1},createTimeline:function(f){return i(this,f)},timeline:function(f){var v=i(this,f);return v.paused||(this._add.push(v),this._toProcess++),v},create:function(f){return s(this,f)},add:function(f){var v=s(this,f);return this._add.push(v),this._toProcess++,v},existing:function(f){return this._add.push(f),this._toProcess++,this},addCounter:function(f){var v=a(this,f);return this._add.push(v),this._toProcess++,v},stagger:function(f,v){return e(f,v)},preUpdate:function(){if(this._toProcess!==0){var f=this._destroy,v=this._active,u=this._pending,c,x;for(c=0;c-1&&(x.state=l.REMOVED,u.splice(g,1))):(x.state=l.REMOVED,v.splice(g,1))}for(f.length=0,f=this._add,c=0;c + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Array:t(208),Base64:t(1482),Objects:t(1484),String:t(1488),NOOP:t(1)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={ArrayBufferToBase64:t(1483),Base64ToArrayBuffer:t(433)}},function(p,E){/** + * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=function(d,a){for(var o=new Uint8Array(d),r=o.length,e=a?"data:"+a+";base64,":"",i=0;i>2],e+=t[(o[i]&3)<<4|o[i+1]>>4],e+=t[(o[i+1]&15)<<2|o[i+2]>>6],e+=t[o[i+2]&63];return r%3===2?e=e.substring(0,e.length-1)+"=":r%3===1&&(e=e.substring(0,e.length-2)+"=="),e};p.exports=n},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Clone:t(77),DeepCopy:t(175),Extend:t(17),GetAdvancedValue:t(13),GetFastValue:t(2),GetMinMaxValue:t(1485),GetValue:t(6),HasAll:t(1486),HasAny:t(455),HasValue:t(126),IsPlainObject:t(7),Merge:t(127),MergeRight:t(1487),Pick:t(571),SetValue:t(478)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(6),d=t(18),a=function(o,r,e,i,l){l===void 0&&(l=e);var s=n(o,r,l);return d(s,e,i)};p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){for(var a=0;a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(77),d=function(a,o){var r=n(a);for(var e in o)r.hasOwnProperty(e)&&(r[e]=o[e]);return r};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Format:t(1489),Pad:t(186),RemoveAt:t(1490),Reverse:t(1491),UppercaseFirst:t(205),UUID:t(222)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return n.replace(/%([0-9]+)/g,function(a,o){return d[Number(o)-1]})};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n,d){return d===0?n.slice(1):n.slice(0,d-1)+n.slice(d)};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t=function(n){return n.split("").reverse().join("")};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={SoundManagerCreator:t(426),Events:t(70),BaseSound:t(146),BaseSoundManager:t(145),WebAudioSound:t(434),WebAudioSoundManager:t(432),HTML5AudioSound:t(429),HTML5AudioSoundManager:t(427),NoAudioSound:t(431),NoAudioSoundManager:t(430)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={Arcade:t(1366),Matter:t(1494)}},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports={BodyBounds:t(1392),Components:t(249),Events:t(272),Factory:t(1394),MatterGameObject:t(1395),Image:t(1396),Matter:t(594),MatterPhysics:t(1524),PolyDecomp:t(1393),Sprite:t(1397),TileBody:t(593),PhysicsEditorParser:t(589),PhysicsJSONParser:t(590),PointerConstraint:t(1398),World:t(1402)}},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setBounce:function(n){return this.body.restitution=n,this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setCollisionCategory:function(n){return this.body.collisionFilter.category=n,this},setCollisionGroup:function(n){return this.body.collisionFilter.group=n,this},setCollidesWith:function(n){var d=0;if(!Array.isArray(n))d=n;else for(var a=0;a + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(41),d={applyForce:function(a){return this._tempVec2.set(this.body.position.x,this.body.position.y),n.applyForce(this.body,this._tempVec2,a),this},applyForceFrom:function(a,o){return n.applyForce(this.body,a,o),this},thrust:function(a){var o=this.body.angle;return this._tempVec2.set(a*Math.cos(o),a*Math.sin(o)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(a){var o=this.body.angle-Math.PI/2;return this._tempVec2.set(a*Math.cos(o),a*Math.sin(o)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(a){var o=this.body.angle+Math.PI/2;return this._tempVec2.set(a*Math.cos(o),a*Math.sin(o)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(a){var o=this.body.angle-Math.PI;return this._tempVec2.set(a*Math.cos(o),a*Math.sin(o)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};p.exports=d},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setFriction:function(n,d,a){return this.body.friction=n,d!==void 0&&(this.body.frictionAir=d),a!==void 0&&(this.body.frictionStatic=a),this},setFrictionAir:function(n){return this.body.frictionAir=n,this},setFrictionStatic:function(n){return this.body.frictionStatic=n,this}};p.exports=t},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setIgnoreGravity:function(n){return this.body.ignoreGravity=n,this}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(41),d=t(3),a={setMass:function(o){return n.setMass(this.body,o),this},setDensity:function(o){return n.setDensity(this.body,o),this},centerOfMass:{get:function(){return new d(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};p.exports=a},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={setSensor:function(n){return this.body.isSensor=n,this},isSensor:function(){return this.body.isSensor}};p.exports=t},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(86),d=t(41),a=t(124),o=t(2),r=t(589),e=t(590),i=t(64),l={setRectangle:function(s,h,f){return this.setBody({type:"rectangle",width:s,height:h},f)},setCircle:function(s,h){return this.setBody({type:"circle",radius:s},h)},setPolygon:function(s,h,f){return this.setBody({type:"polygon",sides:h,radius:s},f)},setTrapezoid:function(s,h,f,v){return this.setBody({type:"trapezoid",width:s,height:h,slope:f},v)},setExistingBody:function(s,h){h===void 0&&(h=!0),this.body&&this.world.remove(this.body,!0),this.body=s;for(var f=0;f + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(272),d=t(165),a=t(166),o={setToSleep:function(){return d.set(this.body,!0),this},setAwake:function(){return d.set(this.body,!1),this},setSleepThreshold:function(r){return r===void 0&&(r=60),this.body.sleepThreshold=r,this},setSleepEvents:function(r,e){return this.setSleepStartEvent(r),this.setSleepEndEvent(e),this},setSleepStartEvent:function(r){if(r){var e=this.world;a.on(this.body,"sleepStart",function(i){e.emit(n.SLEEP_START,i,this)})}else a.off(this.body,"sleepStart");return this},setSleepEndEvent:function(r){if(r){var e=this.world;a.on(this.body,"sleepEnd",function(i){e.emit(n.SLEEP_END,i,this)})}else a.off(this.body,"sleepEnd");return this}};p.exports=o},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="afteradd"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="afterremove"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="afterupdate"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="beforeadd"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="beforeremove"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="beforeupdate"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="collisionactive"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="collisionend"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="collisionstart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragend"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="drag"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="dragstart"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="pause"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="resume"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="sleepend"},function(p,E){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */p.exports="sleepstart"},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(41),d={setStatic:function(a){return n.setStatic(this.body,a),this},isStatic:function(){return this.body.isStatic}};p.exports=d},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(41),d=t(14),a=t(269),o=t(270),r=4,e={x:{get:function(){return this.body.position.x},set:function(i){this._tempVec2.set(i,this.y),n.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(i){this._tempVec2.set(this.x,i),n.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(i){var l=1/this._scaleX,s=1/this._scaleY;this._scaleX=i,this._scaleX===0?this.renderFlags&=~r:this.renderFlags|=r,n.scale(this.body,l,s),n.scale(this.body,i,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(i){var l=1/this._scaleX,s=1/this._scaleY;this._scaleY=i,this._scaleY===0?this.renderFlags&=~r:this.renderFlags|=r,n.scale(this.body,l,s),n.scale(this.body,this._scaleX,i)}},angle:{get:function(){return o(this.body.angle*d.RAD_TO_DEG)},set:function(i){this.rotation=o(i)*d.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(i){this._rotation=a(i),n.setAngle(this.body,this._rotation)}},setPosition:function(i,l){return i===void 0&&(i=0),l===void 0&&(l=i),this._tempVec2.set(i,l),n.setPosition(this.body,this._tempVec2),this},setRotation:function(i){return i===void 0&&(i=0),this._rotation=a(i),n.setAngle(this.body,i),this},setFixedRotation:function(){return n.setInertia(this.body,1/0),this},setAngle:function(i){return i===void 0&&(i=0),this.angle=i,n.setAngle(this.body,this.rotation),this},setScale:function(i,l,s){i===void 0&&(i=1),l===void 0&&(l=i);var h=1/this._scaleX,f=1/this._scaleY;return this._scaleX=i,this._scaleY=l,n.scale(this.body,h,f,s),n.scale(this.body,i,l,s),this}};p.exports=e},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(41),d={setAngularVelocity:function(a){return n.setAngularVelocity(this.body,a),this},setVelocityX:function(a){return this._tempVec2.set(a,this.body.velocity.y),n.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(a){return this._tempVec2.set(this.body.velocity.x,a),n.setVelocity(this.body,this._tempVec2),this},setVelocity:function(a,o){return this._tempVec2.set(a,o),n.setVelocity(this.body,this._tempVec2),this}};p.exports=d},function(p,E,t){var n={};p.exports=n;var d=t(118),a=t(32);(function(){n.create=function(o){var r={extended:!1,narrowDetections:0,narrowphaseTests:0,narrowReuse:0,narrowReuseCount:0,midphaseTests:0,broadphaseTests:0,narrowEff:1e-4,midEff:1e-4,broadEff:1e-4,collisions:0,buckets:0,bodies:0,pairs:0};return a.extend(r,!1,o)},n.reset=function(o){o.extended&&(o.narrowDetections=0,o.narrowphaseTests=0,o.narrowReuse=0,o.narrowReuseCount=0,o.midphaseTests=0,o.broadphaseTests=0,o.narrowEff=0,o.midEff=0,o.broadEff=0,o.collisions=0,o.buckets=0,o.pairs=0,o.bodies=0)},n.update=function(o,r){if(o.extended){var e=r.world,i=d.allBodies(e);o.collisions=o.narrowDetections,o.pairs=r.pairs.list.length,o.bodies=i.length,o.midEff=(o.narrowDetections/(o.midphaseTests||1)).toFixed(2),o.narrowEff=(o.narrowDetections/(o.narrowphaseTests||1)).toFixed(2),o.broadEff=(1-o.broadphaseTests/(i.length||1)).toFixed(2),o.narrowReuse=(o.narrowReuseCount/(o.narrowphaseTests||1)).toFixed(2)}}})()},function(p,E,t){/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var n=t(123),d=t(271),a=t(86),o=t(41),r=t(1392),e=t(84),i=t(0),l=t(118),s=t(591),h=t(128),f=t(273),v=t(50),u=t(1394),c=t(2),x=t(6),g=t(597),m=t(1525),y=t(1526),T=t(1399),S=t(1527),C=t(127),P=t(250),A=t(598),M=t(595),L=t(24),F=t(1400),B=t(599),N=t(274),X=t(20),V=t(592),W=t(83),O=t(64),R=t(1402),I=new i({initialize:function(G){this.scene=G,this.systems=G.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=o,this.composite=l,this.detector=f,this.grid=g,this.pair=P,this.pairs=A,this.query=F,this.resolver=B,this.sat=N,this.constraint=h,this.bodies=a,this.composites=s,this.axes=d,this.bounds=e,this.svg=V,this.vector=W,this.vertices=O,this.verts=O,this._tempVec2=W.create(),x(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),x(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),x(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),B._restingThresh=x(this.config,"restingThresh",4),B._restingThreshTangent=x(this.config,"restingThreshTangent",6),B._positionDampen=x(this.config,"positionDampen",.9),B._positionWarming=x(this.config,"positionWarming",.8),B._frictionNormalMultiplier=x(this.config,"frictionNormalMultiplier",5),G.sys.events.once(X.BOOT,this.boot,this),G.sys.events.on(X.START,this.start,this)},boot:function(){this.world=new R(this.scene,this.config),this.add=new u(this.world),this.bodyBounds=new r,this.systems.events.once(X.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new R(this.scene,this.config),this.add=new u(this.world));var D=this.systems.events;D.on(X.UPDATE,this.world.update,this.world),D.on(X.POST_UPDATE,this.world.postUpdate,this.world),D.once(X.SHUTDOWN,this.shutdown,this)},getConfig:function(){var D=this.systems.game.config.physics,G=this.systems.settings.physics,U=C(c(G,"matter",{}),c(D,"matter",{}));return U},enableAttractorPlugin:function(){return M.register(m),M.use(T,m),this},enableWrapPlugin:function(){return M.register(S),M.use(T,S),this},enableCollisionEventsPlugin:function(){return M.register(y),M.use(T,y),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(D,G){this.world.step(D,G)},containsPoint:function(D,G,U){D=this.getMatterBodies(D);var Y=W.create(G,U),z=F.point(D,Y);return z.length>0},intersectPoint:function(D,G,U){U=this.getMatterBodies(U);var Y=W.create(D,G),z=[],H=F.point(U,Y);return H.forEach(function(w){z.indexOf(w)===-1&&z.push(w)}),z},intersectRect:function(D,G,U,Y,z,H){z===void 0&&(z=!1),H=this.getMatterBodies(H);var w={min:{x:D,y:G},max:{x:D+U,y:G+Y}},K=[],Z=F.region(H,w,z);return Z.forEach(function(J){K.indexOf(J)===-1&&K.push(J)}),K},intersectRay:function(D,G,U,Y,z,H){z===void 0&&(z=1),H=this.getMatterBodies(H);for(var w=[],K=F.ray(H,W.create(D,G),W.create(U,Y),z),Z=0;Z0)for(var l=0;l + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var t={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.14.2",silent:!0,install:function(n){n.after("Engine.create",function(){n.Events.on(this,"collisionStart",function(d){d.pairs.map(function(a){var o=a.bodyA,r=a.bodyB;o.gameObject&&o.gameObject.emit("collide",o,r,a),r.gameObject&&r.gameObject.emit("collide",r,o,a),n.Events.trigger(o,"onCollide",{pair:a}),n.Events.trigger(r,"onCollide",{pair:a}),o.onCollideCallback&&o.onCollideCallback(a),r.onCollideCallback&&r.onCollideCallback(a),o.onCollideWith[r.id]&&o.onCollideWith[r.id](r,a),r.onCollideWith[o.id]&&r.onCollideWith[o.id](o,a)})}),n.Events.on(this,"collisionActive",function(d){d.pairs.map(function(a){var o=a.bodyA,r=a.bodyB;o.gameObject&&o.gameObject.emit("collideActive",o,r,a),r.gameObject&&r.gameObject.emit("collideActive",r,o,a),n.Events.trigger(o,"onCollideActive",{pair:a}),n.Events.trigger(r,"onCollideActive",{pair:a}),o.onCollideActiveCallback&&o.onCollideActiveCallback(a),r.onCollideActiveCallback&&r.onCollideActiveCallback(a)})}),n.Events.on(this,"collisionEnd",function(d){d.pairs.map(function(a){var o=a.bodyA,r=a.bodyB;o.gameObject&&o.gameObject.emit("collideEnd",o,r,a),r.gameObject&&r.gameObject.emit("collideEnd",r,o,a),n.Events.trigger(o,"onCollideEnd",{pair:a}),n.Events.trigger(r,"onCollideEnd",{pair:a}),o.onCollideEndCallback&&o.onCollideEndCallback(a),r.onCollideEndCallback&&r.onCollideEndCallback(a)})})})}};p.exports=t},function(p,E,t){var n=t(594),d={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.14.2",silent:!0,install:function(a){a.after("Engine.update",function(){d.Engine.update(this)})},Engine:{update:function(a){for(var o=a.world,r=n.Composite.allBodies(o),e=n.Composite.allComposites(o),i=0;io.max.x?r=o.min.x-a.max.x:a.max.xo.max.y?e=o.min.y-a.max.y:a.max.y +* @copyright 2020 Photon Storm Ltd. +* @license {@link https://opensource.org/licenses/MIT|MIT License} +*/var d=t(33),a=t(17),o={Actions:t(275),Animations:t(723),BlendModes:t(35),Cache:t(735),Cameras:t(738),Core:t(806),Class:t(0),Create:t(888),Curves:t(894),Data:t(896),Display:t(898),DOM:t(917),Events:t(918),Game:t(920),GameObjects:t(1011),Geom:t(483),Input:t(1308),Loader:t(1338),Math:t(193),Physics:t(1493),Plugins:t(1403),Renderer:t(1405),Scale:t(1412),ScaleModes:t(168),Scene:t(418),Scenes:t(1413),Structs:t(1415),Textures:t(1416),Tilemaps:t(1418),Time:t(1461),Tweens:t(1463),Utils:t(1481)};o.Sound=t(1492),o=a(!1,o,d),p.exports=o,n.Phaser=o}).call(this,t(600))}])})})(Lt);var bt={},kt={},qt={};(function(st){Object.defineProperty(st,"__esModule",{value:!0}),st.ConnectFourError=st.Player=void 0,function(b){b.ONE="ONE",b.TWO="TWO"}(st.Player||(st.Player={})),function(b){b.INVALID_MOVE="Column is already filled, please provide a different column.",b.INVALID_COLUMN="Invalid column specified. Please provide a valid column number.",b.INVALID_MOVE_GAME_IS_OVER="Game has already ended, please reset the game."}(st.ConnectFourError||(st.ConnectFourError={}))})(qt);var Bt={};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.max=Bt.min=void 0;function he(st){return Math.max(st-3,0)}Bt.min=he;function le(st,b){return Math.min(st+3,b)}Bt.max=le;Object.defineProperty(kt,"__esModule",{value:!0});const mt=qt,Kt=Bt,Zt=6,Jt=7;var ot,Pt,Ft,Ot,Mt,Yt,_t,Nt,jt,Xt,te,zt,ee,Vt,ie,Wt,ne,Ht,se,It,Gt;class fe{constructor(){xt(this,Yt);xt(this,Nt);xt(this,Xt);xt(this,zt);xt(this,Vt);xt(this,Wt);xt(this,Ht);xt(this,It);xt(this,ot,[]);xt(this,Pt,mt.Player.ONE);xt(this,Ft,!1);xt(this,Ot,void 0);xt(this,Mt,[]);gt(this,Nt,jt).call(this)}get board(){return JSON.parse(JSON.stringify(rt(this,ot)))}get playersTurn(){return rt(this,Pt)}get isGameOver(){return rt(this,Ft)}get gameWinner(){return rt(this,Ot)}get winningCells(){return rt(this,Mt)}makeMove(b){if(b<0||b>Jt)throw new Error(mt.ConnectFourError.INVALID_COLUMN);if(rt(this,Ft))throw new Error(mt.ConnectFourError.INVALID_MOVE_GAME_IS_OVER);if(this.board[0][b]!==0)throw new Error(mt.ConnectFourError.INVALID_MOVE);let p=0;for(let t=Zt-1;t>=0;t-=1)if(rt(this,ot)[t][b]===0){rt(this,Pt)===mt.Player.ONE?rt(this,ot)[t][b]=1:rt(this,ot)[t][b]=2,p=t;break}gt(this,Xt,te).call(this,p,b);const E={col:b,row:p};return rt(this,Ft)||(rt(this,Pt)===mt.Player.ONE?vt(this,Pt,mt.Player.TWO):vt(this,Pt,mt.Player.ONE)),E}resetGame(){gt(this,Nt,jt).call(this)}}ot=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,Ot=new WeakMap,Mt=new WeakMap,Yt=new WeakSet,_t=function(){vt(this,ot,[]);for(let b=0;bo===0)||d)&&vt(this,Ft,!0)},zt=new WeakSet,ee=function(b,p,E){const t=b;for(let n=p;n<=E;n++){const d=[rt(this,ot)[t][n],rt(this,ot)[t][n+1],rt(this,ot)[t][n+2],rt(this,ot)[t][n+3]];if(gt(this,It,Gt).call(this,d,rt(this,ot)[t][n]))return vt(this,Mt,[{col:n,row:t},{col:n+1,row:t},{col:n+2,row:t},{col:n+3,row:t}]),!0}return!1},Vt=new WeakSet,ie=function(b,p){if(b>2)return!1;const E=[rt(this,ot)[b][p],rt(this,ot)[b+1][p],rt(this,ot)[b+2][p],rt(this,ot)[b+3][p]],t=gt(this,It,Gt).call(this,E,rt(this,ot)[b][p]);return t&&vt(this,Mt,[{col:p,row:b},{col:p,row:b+1},{col:p,row:b+2},{col:p,row:b+3}]),t},Wt=new WeakSet,ne=function(b,p,E,t){let n=Math.min(p-E,t-b);for(;n>=0;){const d=p-n,a=b+n;if(a>2&&d<=3){const o=[rt(this,ot)[a][d],rt(this,ot)[a-1][d+1],rt(this,ot)[a-2][d+2],rt(this,ot)[a-3][d+3]];if(gt(this,It,Gt).call(this,o,rt(this,ot)[b][p]))return vt(this,Mt,[{col:d,row:a},{col:d+1,row:a-1},{col:d+2,row:a-2},{col:d+3,row:a-3}]),!0}n--}return!1},Ht=new WeakSet,se=function(b,p,E,t){let n=Math.min(E-p,t-b);for(;n>=0;){const d=p+n,a=b+n;if(a>2&&d>=3){const o=[rt(this,ot)[a][d],rt(this,ot)[a-1][d-1],rt(this,ot)[a-2][d-2],rt(this,ot)[a-3][d-3]];if(gt(this,It,Gt).call(this,o,rt(this,ot)[b][p]))return vt(this,Mt,[{col:d,row:a},{col:d-1,row:a-1},{col:d-2,row:a-2},{col:d-3,row:a-3}]),!0}n--}return!1},It=new WeakSet,Gt=function(b,p){return b.every(t=>t===p&&t!==0)?(p===1?vt(this,Ot,mt.Player.ONE):vt(this,Ot,mt.Player.TWO),!0):!1};kt.default=fe;var ue=$t&&$t.__importDefault||function(st){return st&&st.__esModule?st:{default:st}};Object.defineProperty(bt,"__esModule",{value:!0});var re=bt.ConnectFour=void 0;const ve=ue(kt);re=bt.ConnectFour=ve.default;const Qt="spritesheet",de=2,ce=32,Rt=de*ce,Dt=Rt*6,Ut=Rt*7;class pe extends Lt.exports.Scene{constructor(){super({key:"Game"})}init(){this.connectFour=new re}preload(){this.load.spritesheet(Qt,"assets/images/connect-four.png",{frameWidth:32,frameHeight:32})}create(){this.createBoard(),this.createInputColumns(),this.checkForGameOver()}createBoard(){for(let b=0;b{this.connectFour.isGameOver||t.setAlpha(.2)}),t.on(Lt.exports.Input.Events.POINTER_OUT,()=>{t.setAlpha(.01)}),t.on(Lt.exports.Input.Events.POINTER_DOWN,()=>{if(!this.connectFour.isGameOver)try{const n=this.connectFour.playersTurn,d=this.connectFour.makeMove(t.getData(b));this.addGamePiece(d.row,d.col,n)}catch{}})}}addGamePiece(b,p,E){const t=E===qt.Player.ONE?0:1,n=p*Rt,d=b*Rt;this.add.image(n,d,Qt,t).setOrigin(0).setScale(2).setDepth(1),this.checkForGameOver()}checkForGameOver(){if(!this.connectFour.isGameOver)return;this.add.rectangle(20,Dt/3,Ut-40,Dt/4,0).setOrigin(0).setDepth(4);let b="Draw";this.connectFour.gameWinner&&(b=`Player ${this.connectFour.gameWinner} Wins!`),this.add.text(Ut/2,Dt/3+30,b,{fontSize:"32px"}).setOrigin(.5).setDepth(5),this.add.text(Ut/2,Dt/2+15,"Click anywhere to play again").setOrigin(.5).setDepth(5),setTimeout(()=>{this.input.once(Lt.exports.Input.Events.POINTER_UP,()=>{this.scene.restart()})},100)}}const xe={type:Lt.exports.CANVAS,pixelArt:!0,scale:{parent:"game-container",width:Ut,height:Dt},backgroundColor:"#5c5b5b",scene:[pe]};new Lt.exports.Game(xe); diff --git a/games/connect-four/index.html b/games/connect-four/index.html new file mode 100644 index 0000000..b64354a --- /dev/null +++ b/games/connect-four/index.html @@ -0,0 +1,28 @@ + + + + + Basic Phaser 3 Example Template + + + + +
+

Phaser 3 - Connect Four

+
+ + +