commit 947d14b75b51fc8b5508584140c7f51a332eddb4 Author: Jenkins Date: Sun Jul 19 01:41:47 2020 +0200 Deploy by Jenkins diff --git a/01efafb864feb60208e1cd71a545ce00.png b/01efafb864feb60208e1cd71a545ce00.png new file mode 100644 index 0000000..25233a5 Binary files /dev/null and b/01efafb864feb60208e1cd71a545ce00.png differ diff --git a/0bcd83143261c0a12103908403ab437a.png b/0bcd83143261c0a12103908403ab437a.png new file mode 100644 index 0000000..553467f Binary files /dev/null and b/0bcd83143261c0a12103908403ab437a.png differ diff --git a/1a03110a67b89df2c217b7e4c91e4aef.mp3 b/1a03110a67b89df2c217b7e4c91e4aef.mp3 new file mode 100644 index 0000000..10398ae Binary files /dev/null and b/1a03110a67b89df2c217b7e4c91e4aef.mp3 differ diff --git a/34a968f73d567460c4c1dc89b5658b30.png b/34a968f73d567460c4c1dc89b5658b30.png new file mode 100644 index 0000000..bd0824f Binary files /dev/null and b/34a968f73d567460c4c1dc89b5658b30.png differ diff --git a/39b196d6c491ec1bb78ddedae45ce123.mp3 b/39b196d6c491ec1bb78ddedae45ce123.mp3 new file mode 100644 index 0000000..8005a03 Binary files /dev/null and b/39b196d6c491ec1bb78ddedae45ce123.mp3 differ diff --git a/3f43f7578333e8272a01a6a27dd17c8b.png b/3f43f7578333e8272a01a6a27dd17c8b.png new file mode 100644 index 0000000..37c17f1 Binary files /dev/null and b/3f43f7578333e8272a01a6a27dd17c8b.png differ diff --git a/42f8d92ec87c7046930da5f608c376dd.png b/42f8d92ec87c7046930da5f608c376dd.png new file mode 100644 index 0000000..bf13184 Binary files /dev/null and b/42f8d92ec87c7046930da5f608c376dd.png differ diff --git a/45a2298129bcfd24ffb095f2444431fe.wav b/45a2298129bcfd24ffb095f2444431fe.wav new file mode 100644 index 0000000..7255d52 Binary files /dev/null and b/45a2298129bcfd24ffb095f2444431fe.wav differ diff --git a/4ebfea37834b4e57bedd9a0823e3db24.png b/4ebfea37834b4e57bedd9a0823e3db24.png new file mode 100644 index 0000000..707a2e9 Binary files /dev/null and b/4ebfea37834b4e57bedd9a0823e3db24.png differ diff --git a/57225412cf84217bdea1e218e91e1780.png b/57225412cf84217bdea1e218e91e1780.png new file mode 100644 index 0000000..3994930 Binary files /dev/null and b/57225412cf84217bdea1e218e91e1780.png differ diff --git a/5b450ce20bbc035bff390b0eb936a933.png b/5b450ce20bbc035bff390b0eb936a933.png new file mode 100644 index 0000000..347f675 Binary files /dev/null and b/5b450ce20bbc035bff390b0eb936a933.png differ diff --git a/5e3e3e4c6b263be8f167c2f2349f3f77.png b/5e3e3e4c6b263be8f167c2f2349f3f77.png new file mode 100644 index 0000000..3ce44d2 Binary files /dev/null and b/5e3e3e4c6b263be8f167c2f2349f3f77.png differ diff --git a/64d379f79b50136fc991a5f8ab2689fb.wav b/64d379f79b50136fc991a5f8ab2689fb.wav new file mode 100644 index 0000000..053b7f0 Binary files /dev/null and b/64d379f79b50136fc991a5f8ab2689fb.wav differ diff --git a/86c9fa3c40f594e5e7ba8637e2150e1c.wav b/86c9fa3c40f594e5e7ba8637e2150e1c.wav new file mode 100644 index 0000000..9c4e7a4 Binary files /dev/null and b/86c9fa3c40f594e5e7ba8637e2150e1c.wav differ diff --git a/8e75f7a1669bc7773727751ba64bce2e.png b/8e75f7a1669bc7773727751ba64bce2e.png new file mode 100644 index 0000000..a729809 Binary files /dev/null and b/8e75f7a1669bc7773727751ba64bce2e.png differ diff --git a/970da3601d02d25a0fcd3ac13c0526ec.png b/970da3601d02d25a0fcd3ac13c0526ec.png new file mode 100644 index 0000000..af501ef Binary files /dev/null and b/970da3601d02d25a0fcd3ac13c0526ec.png differ diff --git a/9cf53335254a36669230a361f24fc911.wav b/9cf53335254a36669230a361f24fc911.wav new file mode 100644 index 0000000..e31a08e Binary files /dev/null and b/9cf53335254a36669230a361f24fc911.wav differ diff --git a/a13f8ec2470d5290133a3722479c1a8d.png b/a13f8ec2470d5290133a3722479c1a8d.png new file mode 100644 index 0000000..0f56794 Binary files /dev/null and b/a13f8ec2470d5290133a3722479c1a8d.png differ diff --git a/a514e7faf4994c8b31087696e2c2104f.png b/a514e7faf4994c8b31087696e2c2104f.png new file mode 100644 index 0000000..e65e106 Binary files /dev/null and b/a514e7faf4994c8b31087696e2c2104f.png differ diff --git a/assets/android-chrome-144x144.png b/assets/android-chrome-144x144.png new file mode 100644 index 0000000..aa13a09 Binary files /dev/null and b/assets/android-chrome-144x144.png differ diff --git a/assets/android-chrome-192x192.png b/assets/android-chrome-192x192.png new file mode 100644 index 0000000..f942d55 Binary files /dev/null and b/assets/android-chrome-192x192.png differ diff --git a/assets/android-chrome-256x256.png b/assets/android-chrome-256x256.png new file mode 100644 index 0000000..ff50215 Binary files /dev/null and b/assets/android-chrome-256x256.png differ diff --git a/assets/android-chrome-36x36.png b/assets/android-chrome-36x36.png new file mode 100644 index 0000000..6d7005f Binary files /dev/null and b/assets/android-chrome-36x36.png differ diff --git a/assets/android-chrome-384x384.png b/assets/android-chrome-384x384.png new file mode 100644 index 0000000..3ff2813 Binary files /dev/null and b/assets/android-chrome-384x384.png differ diff --git a/assets/android-chrome-48x48.png b/assets/android-chrome-48x48.png new file mode 100644 index 0000000..59eb357 Binary files /dev/null and b/assets/android-chrome-48x48.png differ diff --git a/assets/android-chrome-512x512.png b/assets/android-chrome-512x512.png new file mode 100644 index 0000000..013f678 Binary files /dev/null and b/assets/android-chrome-512x512.png differ diff --git a/assets/android-chrome-72x72.png b/assets/android-chrome-72x72.png new file mode 100644 index 0000000..4d086ab Binary files /dev/null and b/assets/android-chrome-72x72.png differ diff --git a/assets/android-chrome-96x96.png b/assets/android-chrome-96x96.png new file mode 100644 index 0000000..bd17946 Binary files /dev/null and b/assets/android-chrome-96x96.png differ diff --git a/assets/apple-touch-icon-1024x1024.png b/assets/apple-touch-icon-1024x1024.png new file mode 100644 index 0000000..8ad091c Binary files /dev/null and b/assets/apple-touch-icon-1024x1024.png differ diff --git a/assets/apple-touch-icon-114x114.png b/assets/apple-touch-icon-114x114.png new file mode 100644 index 0000000..493438d Binary files /dev/null and b/assets/apple-touch-icon-114x114.png differ diff --git a/assets/apple-touch-icon-120x120.png b/assets/apple-touch-icon-120x120.png new file mode 100644 index 0000000..63bea1c Binary files /dev/null and b/assets/apple-touch-icon-120x120.png differ diff --git a/assets/apple-touch-icon-144x144.png b/assets/apple-touch-icon-144x144.png new file mode 100644 index 0000000..aa13a09 Binary files /dev/null and b/assets/apple-touch-icon-144x144.png differ diff --git a/assets/apple-touch-icon-152x152.png b/assets/apple-touch-icon-152x152.png new file mode 100644 index 0000000..e7d0e0b Binary files /dev/null and b/assets/apple-touch-icon-152x152.png differ diff --git a/assets/apple-touch-icon-167x167.png b/assets/apple-touch-icon-167x167.png new file mode 100644 index 0000000..dc73926 Binary files /dev/null and b/assets/apple-touch-icon-167x167.png differ diff --git a/assets/apple-touch-icon-180x180.png b/assets/apple-touch-icon-180x180.png new file mode 100644 index 0000000..0006cbc Binary files /dev/null and b/assets/apple-touch-icon-180x180.png differ diff --git a/assets/apple-touch-icon-57x57.png b/assets/apple-touch-icon-57x57.png new file mode 100644 index 0000000..7c6a435 Binary files /dev/null and b/assets/apple-touch-icon-57x57.png differ diff --git a/assets/apple-touch-icon-60x60.png b/assets/apple-touch-icon-60x60.png new file mode 100644 index 0000000..ea493bf Binary files /dev/null and b/assets/apple-touch-icon-60x60.png differ diff --git a/assets/apple-touch-icon-72x72.png b/assets/apple-touch-icon-72x72.png new file mode 100644 index 0000000..4d086ab Binary files /dev/null and b/assets/apple-touch-icon-72x72.png differ diff --git a/assets/apple-touch-icon-76x76.png b/assets/apple-touch-icon-76x76.png new file mode 100644 index 0000000..676957d Binary files /dev/null and b/assets/apple-touch-icon-76x76.png differ diff --git a/assets/apple-touch-icon-precomposed.png b/assets/apple-touch-icon-precomposed.png new file mode 100644 index 0000000..0006cbc Binary files /dev/null and b/assets/apple-touch-icon-precomposed.png differ diff --git a/assets/apple-touch-icon.png b/assets/apple-touch-icon.png new file mode 100644 index 0000000..0006cbc Binary files /dev/null and b/assets/apple-touch-icon.png differ diff --git a/assets/apple-touch-startup-image-1125x2436.png b/assets/apple-touch-startup-image-1125x2436.png new file mode 100644 index 0000000..7105c2c Binary files /dev/null and b/assets/apple-touch-startup-image-1125x2436.png differ diff --git a/assets/apple-touch-startup-image-1136x640.png b/assets/apple-touch-startup-image-1136x640.png new file mode 100644 index 0000000..3d47655 Binary files /dev/null and b/assets/apple-touch-startup-image-1136x640.png differ diff --git a/assets/apple-touch-startup-image-1242x2208.png b/assets/apple-touch-startup-image-1242x2208.png new file mode 100644 index 0000000..211420b Binary files /dev/null and b/assets/apple-touch-startup-image-1242x2208.png differ diff --git a/assets/apple-touch-startup-image-1242x2688.png b/assets/apple-touch-startup-image-1242x2688.png new file mode 100644 index 0000000..3abe6f9 Binary files /dev/null and b/assets/apple-touch-startup-image-1242x2688.png differ diff --git a/assets/apple-touch-startup-image-1334x750.png b/assets/apple-touch-startup-image-1334x750.png new file mode 100644 index 0000000..8ad33ad Binary files /dev/null and b/assets/apple-touch-startup-image-1334x750.png differ diff --git a/assets/apple-touch-startup-image-1536x2048.png b/assets/apple-touch-startup-image-1536x2048.png new file mode 100644 index 0000000..8e12575 Binary files /dev/null and b/assets/apple-touch-startup-image-1536x2048.png differ diff --git a/assets/apple-touch-startup-image-1620x2160.png b/assets/apple-touch-startup-image-1620x2160.png new file mode 100644 index 0000000..ff098ba Binary files /dev/null and b/assets/apple-touch-startup-image-1620x2160.png differ diff --git a/assets/apple-touch-startup-image-1668x2224.png b/assets/apple-touch-startup-image-1668x2224.png new file mode 100644 index 0000000..74a3f8f Binary files /dev/null and b/assets/apple-touch-startup-image-1668x2224.png differ diff --git a/assets/apple-touch-startup-image-1668x2388.png b/assets/apple-touch-startup-image-1668x2388.png new file mode 100644 index 0000000..b95048b Binary files /dev/null and b/assets/apple-touch-startup-image-1668x2388.png differ diff --git a/assets/apple-touch-startup-image-1792x828.png b/assets/apple-touch-startup-image-1792x828.png new file mode 100644 index 0000000..418f350 Binary files /dev/null and b/assets/apple-touch-startup-image-1792x828.png differ diff --git a/assets/apple-touch-startup-image-2048x1536.png b/assets/apple-touch-startup-image-2048x1536.png new file mode 100644 index 0000000..aa157e9 Binary files /dev/null and b/assets/apple-touch-startup-image-2048x1536.png differ diff --git a/assets/apple-touch-startup-image-2048x2732.png b/assets/apple-touch-startup-image-2048x2732.png new file mode 100644 index 0000000..46f5c8e Binary files /dev/null and b/assets/apple-touch-startup-image-2048x2732.png differ diff --git a/assets/apple-touch-startup-image-2160x1620.png b/assets/apple-touch-startup-image-2160x1620.png new file mode 100644 index 0000000..f8aa0e2 Binary files /dev/null and b/assets/apple-touch-startup-image-2160x1620.png differ diff --git a/assets/apple-touch-startup-image-2208x1242.png b/assets/apple-touch-startup-image-2208x1242.png new file mode 100644 index 0000000..74cef9d Binary files /dev/null and b/assets/apple-touch-startup-image-2208x1242.png differ diff --git a/assets/apple-touch-startup-image-2224x1668.png b/assets/apple-touch-startup-image-2224x1668.png new file mode 100644 index 0000000..aa4aa92 Binary files /dev/null and b/assets/apple-touch-startup-image-2224x1668.png differ diff --git a/assets/apple-touch-startup-image-2388x1668.png b/assets/apple-touch-startup-image-2388x1668.png new file mode 100644 index 0000000..8190362 Binary files /dev/null and b/assets/apple-touch-startup-image-2388x1668.png differ diff --git a/assets/apple-touch-startup-image-2436x1125.png b/assets/apple-touch-startup-image-2436x1125.png new file mode 100644 index 0000000..945c08f Binary files /dev/null and b/assets/apple-touch-startup-image-2436x1125.png differ diff --git a/assets/apple-touch-startup-image-2688x1242.png b/assets/apple-touch-startup-image-2688x1242.png new file mode 100644 index 0000000..7809a7b Binary files /dev/null and b/assets/apple-touch-startup-image-2688x1242.png differ diff --git a/assets/apple-touch-startup-image-2732x2048.png b/assets/apple-touch-startup-image-2732x2048.png new file mode 100644 index 0000000..f20c2fc Binary files /dev/null and b/assets/apple-touch-startup-image-2732x2048.png differ diff --git a/assets/apple-touch-startup-image-640x1136.png b/assets/apple-touch-startup-image-640x1136.png new file mode 100644 index 0000000..141c102 Binary files /dev/null and b/assets/apple-touch-startup-image-640x1136.png differ diff --git a/assets/apple-touch-startup-image-750x1334.png b/assets/apple-touch-startup-image-750x1334.png new file mode 100644 index 0000000..f546395 Binary files /dev/null and b/assets/apple-touch-startup-image-750x1334.png differ diff --git a/assets/apple-touch-startup-image-828x1792.png b/assets/apple-touch-startup-image-828x1792.png new file mode 100644 index 0000000..9def14d Binary files /dev/null and b/assets/apple-touch-startup-image-828x1792.png differ diff --git a/assets/browserconfig.xml b/assets/browserconfig.xml new file mode 100644 index 0000000..a7c7d94 --- /dev/null +++ b/assets/browserconfig.xml @@ -0,0 +1,15 @@ + + + + + + + + + #000 + + + + + + diff --git a/assets/coast-228x228.png b/assets/coast-228x228.png new file mode 100644 index 0000000..2ad9bf0 Binary files /dev/null and b/assets/coast-228x228.png differ diff --git a/assets/favicon-16x16.png b/assets/favicon-16x16.png new file mode 100644 index 0000000..50315cc Binary files /dev/null and b/assets/favicon-16x16.png differ diff --git a/assets/favicon-32x32.png b/assets/favicon-32x32.png new file mode 100644 index 0000000..5e4d420 Binary files /dev/null and b/assets/favicon-32x32.png differ diff --git a/assets/favicon-48x48.png b/assets/favicon-48x48.png new file mode 100644 index 0000000..59eb357 Binary files /dev/null and b/assets/favicon-48x48.png differ diff --git a/assets/favicon.ico b/assets/favicon.ico new file mode 100644 index 0000000..fc426d7 Binary files /dev/null and b/assets/favicon.ico differ diff --git a/assets/firefox_app_128x128.png b/assets/firefox_app_128x128.png new file mode 100644 index 0000000..084548a Binary files /dev/null and b/assets/firefox_app_128x128.png differ diff --git a/assets/firefox_app_512x512.png b/assets/firefox_app_512x512.png new file mode 100644 index 0000000..8264441 Binary files /dev/null and b/assets/firefox_app_512x512.png differ diff --git a/assets/firefox_app_60x60.png b/assets/firefox_app_60x60.png new file mode 100644 index 0000000..46c2403 Binary files /dev/null and b/assets/firefox_app_60x60.png differ diff --git a/assets/manifest.json b/assets/manifest.json new file mode 100644 index 0000000..fa08295 --- /dev/null +++ b/assets/manifest.json @@ -0,0 +1,59 @@ +{ + "name": "Cave Knight", + "short_name": "cave-knight", + "description": "Cave Knight", + "dir": "auto", + "lang": "en-US", + "display": "standalone", + "orientation": "any", + "start_url": "../", + "background_color": "#000", + "theme_color": "#333", + "icons": [ + { + "src": "android-chrome-36x36.png", + "sizes": "36x36", + "type": "image/png" + }, + { + "src": "android-chrome-48x48.png", + "sizes": "48x48", + "type": "image/png" + }, + { + "src": "android-chrome-72x72.png", + "sizes": "72x72", + "type": "image/png" + }, + { + "src": "android-chrome-96x96.png", + "sizes": "96x96", + "type": "image/png" + }, + { + "src": "android-chrome-144x144.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "android-chrome-256x256.png", + "sizes": "256x256", + "type": "image/png" + }, + { + "src": "android-chrome-384x384.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} \ No newline at end of file diff --git a/assets/manifest.webapp b/assets/manifest.webapp new file mode 100644 index 0000000..86064a3 --- /dev/null +++ b/assets/manifest.webapp @@ -0,0 +1,14 @@ +{ + "version": "2.1.0", + "name": "Cave Knight", + "description": "Cave Knight", + "icons": { + "60": "firefox_app_60x60.png", + "128": "firefox_app_128x128.png", + "512": "firefox_app_512x512.png" + }, + "developer": { + "name": "MaMa Productions", + "url": "https://mama.productions" + } +} \ No newline at end of file diff --git a/assets/mstile-144x144.png b/assets/mstile-144x144.png new file mode 100644 index 0000000..aa13a09 Binary files /dev/null and b/assets/mstile-144x144.png differ diff --git a/assets/mstile-150x150.png b/assets/mstile-150x150.png new file mode 100644 index 0000000..33fe137 Binary files /dev/null and b/assets/mstile-150x150.png differ diff --git a/assets/mstile-310x150.png b/assets/mstile-310x150.png new file mode 100644 index 0000000..a778c89 Binary files /dev/null and b/assets/mstile-310x150.png differ diff --git a/assets/mstile-310x310.png b/assets/mstile-310x310.png new file mode 100644 index 0000000..007dd0f Binary files /dev/null and b/assets/mstile-310x310.png differ diff --git a/assets/mstile-70x70.png b/assets/mstile-70x70.png new file mode 100644 index 0000000..e398606 Binary files /dev/null and b/assets/mstile-70x70.png differ diff --git a/assets/yandex-browser-50x50.png b/assets/yandex-browser-50x50.png new file mode 100644 index 0000000..8f53cd1 Binary files /dev/null and b/assets/yandex-browser-50x50.png differ diff --git a/assets/yandex-browser-manifest.json b/assets/yandex-browser-manifest.json new file mode 100644 index 0000000..c66e39c --- /dev/null +++ b/assets/yandex-browser-manifest.json @@ -0,0 +1,9 @@ +{ + "version": "2.1.0", + "api_version": 1, + "layout": { + "logo": "yandex-browser-50x50.png", + "color": "#000", + "show_title": true + } +} \ No newline at end of file diff --git a/b0dcc8fb8552c16e86043956856d304f.png b/b0dcc8fb8552c16e86043956856d304f.png new file mode 100644 index 0000000..422aa5c Binary files /dev/null and b/b0dcc8fb8552c16e86043956856d304f.png differ diff --git a/bundle.min.js b/bundle.min.js new file mode 100644 index 0000000..19fed50 --- /dev/null +++ b/bundle.min.js @@ -0,0 +1,2 @@ +/*! For license information please see bundle.min.js.LICENSE */ +!function(A){var t={};function e(i){if(t[i])return t[i].exports;var s=t[i]={i:i,l:!1,exports:{}};return A[i].call(s.exports,s,s.exports,e),s.l=!0,s.exports}e.m=A,e.c=t,e.d=function(A,t,i){e.o(A,t)||Object.defineProperty(A,t,{enumerable:!0,get:i})},e.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},e.t=function(A,t){if(1&t&&(A=e(A)),8&t)return A;if(4&t&&"object"==typeof A&&A&&A.__esModule)return A;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:A}),2&t&&"string"!=typeof A)for(var s in A)e.d(i,s,function(t){return A[t]}.bind(null,s));return i},e.n=function(A){var t=A&&A.__esModule?function(){return A.default}:function(){return A};return e.d(t,"a",t),t},e.o=function(A,t){return Object.prototype.hasOwnProperty.call(A,t)},e.p="",e(e.s=1490)}([function(A,t){function e(A,t,e){var i=e?A[t]:Object.getOwnPropertyDescriptor(A,t);return!e&&i.value&&"object"==typeof i.value&&(i=i.value),!(!i||!function(A){return!!A.get&&"function"==typeof A.get||!!A.set&&"function"==typeof A.set}(i))&&(void 0===i.enumerable&&(i.enumerable=!0),void 0===i.configurable&&(i.configurable=!0),i)}function i(A,t){var e=Object.getOwnPropertyDescriptor(A,t);return!!e&&(e.value&&"object"==typeof e.value&&(e=e.value),!1===e.configurable)}function s(A,t,s,n){for(var o in t)if(t.hasOwnProperty(o)){var a=e(t,o,s);if(!1!==a){if(i((n||A).prototype,o)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(A.prototype,o,a)}else A.prototype[o]=t[o]}}function n(A,t){if(t){Array.isArray(t)||(t=[t]);for(var e=0;e0&&(e=1/Math.sqrt(e),this.x=A*e,this.y=t*e),this},normalizeRightHand:function(){var A=this.x;return this.x=-1*this.y,this.y=A,this},dot:function(A){return this.x*A.x+this.y*A.y},cross:function(A){return this.x*A.y-this.y*A.x},lerp:function(A,t){void 0===t&&(t=0);var e=this.x,i=this.y;return this.x=e+t*(A.x-e),this.y=i+t*(A.y-i),this},transformMat3:function(A){var t=this.x,e=this.y,i=A.val;return this.x=i[0]*t+i[3]*e+i[6],this.y=i[1]*t+i[4]*e+i[7],this},transformMat4:function(A){var t=this.x,e=this.y,i=A.val;return this.x=i[0]*t+i[4]*e+i[12],this.y=i[1]*t+i[5]*e+i[13],this},reset:function(){return this.x=0,this.y=0,this}});i.ZERO=new i,i.RIGHT=new i(1,0),i.LEFT=new i(-1,0),i.UP=new i(0,-1),i.DOWN=new i(0,1),i.ONE=new i(1,1),A.exports=i},function(A,t,e){var i=e(0),s=e(52),n=new i({initialize:function(A,t){void 0===A&&(A=0),void 0===t&&(t=A),this.type=s.POINT,this.x=A,this.y=t},setTo:function(A,t){return void 0===A&&(A=0),void 0===t&&(t=A),this.x=A,this.y=t,this}});A.exports=n},function(A,t,e){var i=e(0),s=e(18),n=e(21),r=new i({initialize:function(A){this.scene=A,this.systems=A.sys,this.displayList,this.updateList,A.sys.events.once(n.BOOT,this.boot,this),A.sys.events.on(n.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(n.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(n.SHUTDOWN,this.shutdown,this)},existing:function(A){return(A.renderCanvas||A.renderWebGL)&&this.displayList.add(A),A.preUpdate&&this.updateList.add(A),A},shutdown:function(){this.systems.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});r.register=function(A,t){r.prototype.hasOwnProperty(A)||(r.prototype[A]=t)},r.remove=function(A){r.prototype.hasOwnProperty(A)&&delete r.prototype[A]},s.register("GameObjectFactory",r,"add"),A.exports=r},function(A,t){A.exports=function(A,t,e){if(A&&"number"!=typeof A){if(A.hasOwnProperty(t))return A[t];if(-1!==t.indexOf(".")){for(var i=t.split("."),s=A,n=e,r=0;r>>0},getTintAppendFloatAlpha:function(A,t){return((255&(255*t|0))<<24|A)>>>0},getTintAppendFloatAlphaAndSwap:function(A,t){return((255&(255*t|0))<<24|(255&(0|A))<<16|(255&(A>>8|0))<<8|255&(A>>16|0))>>>0},getFloatsFromUintRGB:function(A){return[(255&(A>>16|0))/255,(255&(A>>8|0))/255,(255&(0|A))/255]},getComponentCount:function(A,t){for(var e=0,i=0;i=this.right?this.width=0:this.width=this.right-A,this.x=A}},right:{get:function(){return this.x+this.width},set:function(A){A<=this.x?this.width=0:this.width=A-this.x}},top:{get:function(){return this.y},set:function(A){A>=this.bottom?this.height=0:this.height=this.bottom-A,this.y=A}},bottom:{get:function(){return this.y+this.height},set:function(A){A<=this.y?this.height=0:this.height=A-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(A){this.x=A-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(A){this.y=A-this.height/2}}});A.exports=l},function(A,t,e){A.exports={Alpha:e(273),Animation:e(274),BlendMode:e(277),ComputedSize:e(601),Crop:e(602),Depth:e(278),Flip:e(603),GetBounds:e(604),Mask:e(282),Origin:e(621),PathFollower:e(622),Pipeline:e(122),ScrollFactor:e(285),Size:e(623),Texture:e(624),TextureCrop:e(625),Tint:e(626),ToJSON:e(286),Transform:e(287),TransformMatrix:e(36),Visible:e(288)}},function(A,t,e){var i=e(0),s=e(286),n=e(102),r=e(9),o=e(103),a=new i({Extends:r,initialize:function(A,t){r.call(this),this.scene=A,this.type=t,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,A.sys.queueDepthSort()},setActive:function(A){return this.active=A,this},setName:function(A){return this.name=A,this},setState:function(A){return this.state=A,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(A,t){return this.data||(this.data=new n(this)),this.data.set(A,t),this},getData:function(A){return this.data||(this.data=new n(this)),this.data.get(A)},setInteractive:function(A,t,e){return this.scene.sys.input.enable(this,A,t,e),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},update:function(){},toJSON:function(){return s(this)},willRender:function(A){return!(a.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&A.id)},getIndexList:function(){for(var A=this,t=this.parentContainer,e=[];t&&(e.unshift(t.getIndex(A)),A=t,t.parentContainer);)t=t.parentContainer;return e.unshift(this.scene.sys.displayList.getIndex(A)),e},destroy:function(A){if(void 0===A&&(A=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this);var t=this.scene.sys;A||(t.displayList.remove(this),t.updateList.remove(this)),this.input&&(t.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),A||t.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});a.RENDER_MASK=15,A.exports=a},function(A,t,e){var i=e(183),s=e(6);A.exports=function(A,t,e){var n=s(A,t,null);if(null===n)return e;if(Array.isArray(n))return i.RND.pick(n);if("object"==typeof n){if(n.hasOwnProperty("randInt"))return i.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return i.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if("function"==typeof n)return n(t);return n}},function(A,t,e){var i=e(0),s=e(18),n=e(21),r=new i({initialize:function(A){this.scene=A,this.systems=A.sys,this.displayList,this.updateList,A.sys.events.once(n.BOOT,this.boot,this),A.sys.events.on(n.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(n.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(n.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});r.register=function(A,t){r.prototype.hasOwnProperty(A)||(r.prototype[A]=t)},r.remove=function(A){r.prototype.hasOwnProperty(A)&&delete r.prototype[A]},s.register("GameObjectCreator",r,"make"),A.exports=r},function(A,t,e){var i=e(7),s=function(){var A,t,e,n,r,o,a=arguments[0]||{},h=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},h=2),l===h&&(a=this,--h);h0;t--){var i=Math.floor(e.random()*(t+1)),s=A[t];A[t]=A[i],A[i]=s}return A},e.choose=function(A){return A[Math.floor(e.random()*A.length)]},e.isElement=function(A){return"undefined"!=typeof HTMLElement?A instanceof HTMLElement:!!(A&&A.nodeType&&A.nodeName)},e.isArray=function(A){return"[object Array]"===Object.prototype.toString.call(A)},e.isFunction=function(A){return"function"==typeof A},e.isPlainObject=function(A){return"object"==typeof A&&A.constructor===Object},e.isString=function(A){return"[object String]"===toString.call(A)},e.clamp=function(A,t,e){return Ae?e:A},e.sign=function(A){return A<0?-1:1},e.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-e._nowStartTime},e.random=function(t,e){return e=void 0!==e?e:1,(t=void 0!==t?t:0)+A()*(e-t)};var A=function(){return e._seed=(9301*e._seed+49297)%233280,e._seed/233280};e.colorToNumber=function(A){return 3==(A=A.replace("#","")).length&&(A=A.charAt(0)+A.charAt(0)+A.charAt(1)+A.charAt(1)+A.charAt(2)+A.charAt(2)),parseInt(A,16)},e.logLevel=1,e.log=function(){console&&e.logLevel>0&&e.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},e.info=function(){console&&e.logLevel>0&&e.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},e.warn=function(){console&&e.logLevel>0&&e.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},e.nextId=function(){return e._nextId++},e.indexOf=function(A,t){if(A.indexOf)return A.indexOf(t);for(var e=0;e=400&&A.status<=599&&(i=!1),this.resetXHR(),this.loader.nextFile(this,i)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(A){A.lengthComputable&&(this.bytesLoaded=A.loaded,this.bytesTotal=A.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(n.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.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(A){void 0===A&&(A=this.data);var t=this.key,e=this.type;this.loader.emit(n.FILE_COMPLETE,t,e,A),this.loader.emit(n.FILE_KEY_COMPLETE+e+"-"+t,t,e,A),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(A,t,e){if("function"==typeof URL)A.src=URL.createObjectURL(t);else{var i=new FileReader;i.onload=function(){A.removeAttribute("crossOrigin"),A.src="data:"+(t.type||e)+";base64,"+i.result.split(",")[1]},i.onerror=A.onerror,i.readAsDataURL(t)}},c.revokeObjectURL=function(A){"function"==typeof URL&&URL.revokeObjectURL(A.src)},A.exports=c},function(A,t){A.exports=function(A,t,e){return Math.max(t,Math.min(e,A))}},function(A,t){var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null};A.exports=e},function(A,t,e){var i={};A.exports=i;var s=e(32),n=e(38),r=e(114),o=e(19),a=e(39),h=e(235);!function(){i._inertiaScale=4,i._nextCollidingGroupId=1,i._nextNonCollidingGroupId=-1,i._nextCategory=1,i.create=function(t){var e={id:o.nextId(),type:"body",label:"Body",gameObject:null,parts:[],plugin:{},angle:0,vertices:s.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"),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,ignoreGravity:!1,ignorePointer:!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,render:{visible:!0,opacity:1,sprite:{xScale:1,yScale:1,xOffset:0,yOffset:0},lineWidth:0},events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inertia:0,_original:null},i=o.extend(e,t);return A(i,t),i},i.nextGroup=function(A){return A?i._nextNonCollidingGroupId--:i._nextCollidingGroupId++},i.nextCategory=function(){return i._nextCategory=i._nextCategory<<1,i._nextCategory};var A=function(A,t){t=t||{},i.set(A,{bounds:A.bounds||a.create(A.vertices),positionPrev:A.positionPrev||n.clone(A.position),anglePrev:A.anglePrev||A.angle,vertices:A.vertices,parts:A.parts||[A],isStatic:A.isStatic,isSleeping:A.isSleeping,parent:A.parent||A}),s.rotate(A.vertices,A.angle,A.position),h.rotate(A.axes,A.angle),a.update(A.bounds,A.vertices,A.velocity),i.set(A,{axes:t.axes||A.axes,area:t.area||A.area,mass:t.mass||A.mass,inertia:t.inertia||A.inertia});var e=A.isStatic?"#2e2b44":o.choose(["#006BA6","#0496FF","#FFBC42","#D81159","#8F2D56"]);A.render.fillStyle=A.render.fillStyle||e,A.render.strokeStyle=A.render.strokeStyle||"#000",A.render.sprite.xOffset+=-(A.bounds.min.x-A.position.x)/(A.bounds.max.x-A.bounds.min.x),A.render.sprite.yOffset+=-(A.bounds.min.y-A.position.y)/(A.bounds.max.y-A.bounds.min.y)};i.set=function(A,t,e){var s;for(s in"string"==typeof t&&(s=t,(t={})[s]=e),t)if(t.hasOwnProperty(s))switch(e=t[s],s){case"isStatic":i.setStatic(A,e);break;case"isSleeping":r.set(A,e);break;case"mass":i.setMass(A,e);break;case"density":i.setDensity(A,e);break;case"inertia":i.setInertia(A,e);break;case"vertices":i.setVertices(A,e);break;case"position":i.setPosition(A,e);break;case"angle":i.setAngle(A,e);break;case"velocity":i.setVelocity(A,e);break;case"angularVelocity":i.setAngularVelocity(A,e);break;case"parts":i.setParts(A,e);break;default:A[s]=e}},i.setStatic=function(A,t){for(var e=0;e0&&(r.angle+=A.angularVelocity,n.rotateAbout(r.position,e,A.position,r.position))}},i.setVelocity=function(A,t){A.positionPrev.x=A.position.x-t.x,A.positionPrev.y=A.position.y-t.y,A.velocity.x=t.x,A.velocity.y=t.y,A.speed=n.magnitude(A.velocity)},i.setAngularVelocity=function(A,t){A.anglePrev=A.angle-t,A.angularVelocity=t,A.angularSpeed=Math.abs(A.angularVelocity)},i.translate=function(A,t){i.setPosition(A,n.add(A.position,t))},i.rotate=function(A,t,e){if(e){var s=Math.cos(t),n=Math.sin(t),r=A.position.x-e.x,o=A.position.y-e.y;i.setPosition(A,{x:e.x+(r*s-o*n),y:e.y+(r*n+o*s)}),i.setAngle(A,A.angle+t)}else i.setAngle(A,A.angle+t)},i.scale=function(A,t,e,n){var r=0,o=0;n=n||A.position;for(var l=0;l0&&(r+=c.area,o+=c.inertia),c.position.x=n.x+(c.position.x-n.x)*t,c.position.y=n.y+(c.position.y-n.y)*e,a.update(c.bounds,c.vertices,A.velocity)}A.parts.length>1&&(A.area=r,A.isStatic||(i.setMass(A,A.density*r),i.setInertia(A,o))),A.circleRadius&&(t===e?A.circleRadius*=t:A.circleRadius=null)},i.update=function(A,t,e,i){var r=Math.pow(t*e*A.timeScale,2),o=1-A.frictionAir*e*A.timeScale,l=A.position.x-A.positionPrev.x,c=A.position.y-A.positionPrev.y;A.velocity.x=l*o*i+A.force.x/A.mass*r,A.velocity.y=c*o*i+A.force.y/A.mass*r,A.positionPrev.x=A.position.x,A.positionPrev.y=A.position.y,A.position.x+=A.velocity.x,A.position.y+=A.velocity.y,A.angularVelocity=(A.angle-A.anglePrev)*o*i+A.torque/A.inertia*r,A.anglePrev=A.angle,A.angle+=A.angularVelocity,A.speed=n.magnitude(A.velocity),A.angularSpeed=Math.abs(A.angularVelocity);for(var u=0;u0&&(d.position.x+=A.velocity.x,d.position.y+=A.velocity.y),0!==A.angularVelocity&&(s.rotate(d.vertices,A.angularVelocity,A.position),h.rotate(d.axes,A.angularVelocity),u>0&&n.rotateAbout(d.position,A.angularVelocity,A.position,d.position)),a.update(d.bounds,d.vertices,A.velocity)}},i.applyForce=function(A,t,e){A.force.x+=e.x,A.force.y+=e.y;var i=t.x-A.position.x,s=t.y-A.position.y;A.torque+=i*e.y-s*e.x},i._totalProperties=function(A){for(var t={mass:0,area:0,inertia:0,centre:{x:0,y:0}},e=1===A.parts.length?0:1;er.width&&(e=Math.max(r.width-A,0)),t+s>r.height&&(s=Math.max(r.height-t,0));for(var l=[],c=t;c=0;r--)A[r][t]=e+o*i,o++;return A}},function(A,t,e){var i={};A.exports=i;var s=e(38),n=e(19);i.create=function(A,t){for(var e=[],i=0;i0)return!1}return!0},i.scale=function(A,t,e,n){if(1===t&&1===e)return A;var r,o;n=n||i.centre(A);for(var a=0;a=0?a-1:A.length-1],l=A[a],c=A[(a+1)%A.length],u=t[a0&&(n|=2),3===n)return!1;return 0!==n||null},i.hull=function(A){var t,e,i=[],n=[];for((A=A.slice(0)).sort((function(A,t){var e=A.x-t.x;return 0!==e?e:A.y-t.y})),e=0;e=2&&s.cross3(n[n.length-2],n[n.length-1],t)<=0;)n.pop();n.push(t)}for(e=A.length-1;e>=0;e-=1){for(t=A[e];i.length>=2&&s.cross3(i[i.length-2],i[i.length-1],t)<=0;)i.pop();i.push(t)}return i.pop(),n.pop(),i.concat(n)}},function(A,t,e){var i={VERSION:"3.20.1",BlendModes:e(43),ScaleModes:e(158),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};A.exports=i},function(A,t,e){var i=e(0),s=e(13),n=e(14),r=e(62),o=new i({Extends:n,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Transform,s.Visible],initialize:function(A,t,e){void 0===t&&(t="Shape"),n.call(this,A,t),this.geom=e,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new r,this.initPipeline()},setFillStyle:function(A,t){return void 0===t&&(t=1),void 0===A?this.isFilled=!1:(this.fillColor=A,this.fillAlpha=t,this.isFilled=!0),this},setStrokeStyle:function(A,t,e){return void 0===e&&(e=1),void 0===A?this.isStroked=!1:(this.lineWidth=A,this.strokeColor=t,this.strokeAlpha=e,this.isStroked=!0),this},setClosePath:function(A){return this.closePath=A,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]}});A.exports=o},function(A,t){A.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(A,t,e){var i=e(0),s=e(25),n=e(3),r=new i({initialize:function(A,t,e,i,s,n){void 0===A&&(A=1),void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=1),void 0===s&&(s=0),void 0===n&&(n=0),this.matrix=new Float32Array([A,t,e,i,s,n,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(A){this.matrix[0]=A}},b:{get:function(){return this.matrix[1]},set:function(A){this.matrix[1]=A}},c:{get:function(){return this.matrix[2]},set:function(A){this.matrix[2]=A}},d:{get:function(){return this.matrix[3]},set:function(A){this.matrix[3]=A}},e:{get:function(){return this.matrix[4]},set:function(A){this.matrix[4]=A}},f:{get:function(){return this.matrix[5]},set:function(A){this.matrix[5]=A}},tx:{get:function(){return this.matrix[4]},set:function(A){this.matrix[4]=A}},ty:{get:function(){return this.matrix[5]},set:function(A){this.matrix[5]=A}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var A=this.matrix,t=A[0],e=A[1],i=A[2],n=A[3];return t||e?e>0?Math.acos(t/this.scaleX):-Math.acos(t/this.scaleX):i||n?s.TAU-(n>0?Math.acos(-i/this.scaleY):-Math.acos(i/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 A=this.matrix;return A[0]=1,A[1]=0,A[2]=0,A[3]=1,A[4]=0,A[5]=0,this},translate:function(A,t){var e=this.matrix;return e[4]=e[0]*A+e[2]*t+e[4],e[5]=e[1]*A+e[3]*t+e[5],this},scale:function(A,t){var e=this.matrix;return e[0]*=A,e[1]*=A,e[2]*=t,e[3]*=t,this},rotate:function(A){var t=Math.sin(A),e=Math.cos(A),i=this.matrix,s=i[0],n=i[1],r=i[2],o=i[3];return i[0]=s*e+r*t,i[1]=n*e+o*t,i[2]=s*-t+r*e,i[3]=n*-t+o*e,this},multiply:function(A,t){var e=this.matrix,i=A.matrix,s=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=i[0],c=i[1],u=i[2],d=i[3],g=i[4],p=i[5],f=void 0===t?this:t;return f.a=l*s+c*r,f.b=l*n+c*o,f.c=u*s+d*r,f.d=u*n+d*o,f.e=g*s+p*r+a,f.f=g*n+p*o+h,f},multiplyWithOffset:function(A,t,e){var i=this.matrix,s=A.matrix,n=i[0],r=i[1],o=i[2],a=i[3],h=t*n+e*o+i[4],l=t*r+e*a+i[5],c=s[0],u=s[1],d=s[2],g=s[3],p=s[4],f=s[5];return i[0]=c*n+u*o,i[1]=c*r+u*a,i[2]=d*n+g*o,i[3]=d*r+g*a,i[4]=p*n+f*o+h,i[5]=p*r+f*a+l,this},transform:function(A,t,e,i,s,n){var r=this.matrix,o=r[0],a=r[1],h=r[2],l=r[3],c=r[4],u=r[5];return r[0]=A*o+t*h,r[1]=A*a+t*l,r[2]=e*o+i*h,r[3]=e*a+i*l,r[4]=s*o+n*h+c,r[5]=s*a+n*l+u,this},transformPoint:function(A,t,e){void 0===e&&(e={x:0,y:0});var i=this.matrix,s=i[0],n=i[1],r=i[2],o=i[3],a=i[4],h=i[5];return e.x=A*s+t*r+a,e.y=A*n+t*o+h,e},invert:function(){var A=this.matrix,t=A[0],e=A[1],i=A[2],s=A[3],n=A[4],r=A[5],o=t*s-e*i;return A[0]=s/o,A[1]=-e/o,A[2]=-i/o,A[3]=t/o,A[4]=(i*r-s*n)/o,A[5]=-(t*r-e*n)/o,this},copyFrom:function(A){var t=this.matrix;return t[0]=A.a,t[1]=A.b,t[2]=A.c,t[3]=A.d,t[4]=A.e,t[5]=A.f,this},copyFromArray:function(A){var t=this.matrix;return t[0]=A[0],t[1]=A[1],t[2]=A[2],t[3]=A[3],t[4]=A[4],t[5]=A[5],this},copyToContext:function(A){var t=this.matrix;return A.transform(t[0],t[1],t[2],t[3],t[4],t[5]),A},setToContext:function(A){var t=this.matrix;return A.setTransform(t[0],t[1],t[2],t[3],t[4],t[5]),A},copyToArray:function(A){var t=this.matrix;return void 0===A?A=[t[0],t[1],t[2],t[3],t[4],t[5]]:(A[0]=t[0],A[1]=t[1],A[2]=t[2],A[3]=t[3],A[4]=t[4],A[5]=t[5]),A},setTransform:function(A,t,e,i,s,n){var r=this.matrix;return r[0]=A,r[1]=t,r[2]=e,r[3]=i,r[4]=s,r[5]=n,this},decomposeMatrix:function(){var A=this.decomposedMatrix,t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3],r=e*n-i*s;if(A.translateX=t[4],A.translateY=t[5],e||i){var o=Math.sqrt(e*e+i*i);A.rotation=i>0?Math.acos(e/o):-Math.acos(e/o),A.scaleX=o,A.scaleY=r/o}else if(s||n){var a=Math.sqrt(s*s+n*n);A.rotation=.5*Math.PI-(n>0?Math.acos(-s/a):-Math.acos(s/a)),A.scaleX=r/a,A.scaleY=a}else A.rotation=0,A.scaleX=0,A.scaleY=0;return A},applyITRS:function(A,t,e,i,s){var n=this.matrix,r=Math.sin(e),o=Math.cos(e);return n[4]=A,n[5]=t,n[0]=o*i,n[1]=r*i,n[2]=-r*s,n[3]=o*s,this},applyInverse:function(A,t,e){void 0===e&&(e=new n);var i=this.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],c=1/(s*a+o*-r);return e.x=a*c*A+-o*c*t+(l*o-h*a)*c,e.y=s*c*t+-r*c*A+(-l*s+h*r)*c,e},getX:function(A,t){return A*this.a+t*this.c+this.e},getY:function(A,t){return A*this.b+t*this.d+this.f},getCSSMatrix:function(){var A=this.matrix;return"matrix("+A[0]+","+A[1]+","+A[2]+","+A[3]+","+A[4]+","+A[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});A.exports=r},function(A,t,e){var i=e(0),s=e(177),n=e(300),r=e(178),o=e(301),a=new i({initialize:function(A,t,e,i){void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=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(A,t,e,i)},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(A,t,e,i,s){return void 0===i&&(i=255),void 0===s&&(s=!0),this._locked=!0,this.red=A,this.green=t,this.blue=e,this.alpha=i,this._locked=!1,this.update(s)},setGLTo:function(A,t,e,i){return void 0===i&&(i=1),this._locked=!0,this.redGL=A,this.greenGL=t,this.blueGL=e,this.alphaGL=i,this._locked=!1,this.update(!0)},setFromRGB:function(A){return this._locked=!0,this.red=A.r,this.green=A.g,this.blue=A.b,A.hasOwnProperty("a")&&(this.alpha=A.a),this._locked=!1,this.update(!0)},setFromHSV:function(A,t,e){return r(A,t,e,this)},update:function(A){if(void 0===A&&(A=!1),this._locked)return this;var t=this.r,e=this.g,i=this.b,r=this.a;return this._color=s(t,e,i),this._color32=n(t,e,i,r),this._rgba="rgba("+t+","+e+","+i+","+r/255+")",A&&o(t,e,i,this),this},updateHSV:function(){var A=this.r,t=this.g,e=this.b;return o(A,t,e,this),this},clone:function(){return new a(this.r,this.g,this.b,this.a)},gray:function(A){return this.setTo(A,A,A)},random:function(A,t){void 0===A&&(A=0),void 0===t&&(t=255);var e=Math.floor(A+Math.random()*(t-A)),i=Math.floor(A+Math.random()*(t-A)),s=Math.floor(A+Math.random()*(t-A));return this.setTo(e,i,s)},randomGray:function(A,t){void 0===A&&(A=0),void 0===t&&(t=255);var e=Math.floor(A+Math.random()*(t-A));return this.setTo(e,e,e)},saturate:function(A){return this.s+=A/100,this},desaturate:function(A){return this.s-=A/100,this},lighten:function(A){return this.v+=A/100,this},darken:function(A){return this.v-=A/100,this},brighten:function(A){var t=this.r,e=this.g,i=this.b;return t=Math.max(0,Math.min(255,t-Math.round(-A/100*255))),e=Math.max(0,Math.min(255,e-Math.round(-A/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-A/100*255))),this.setTo(t,e,i)},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(A){this.gl[0]=Math.min(Math.abs(A),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(A){this.gl[1]=Math.min(Math.abs(A),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(A){this.gl[2]=Math.min(Math.abs(A),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(A){this.gl[3]=Math.min(Math.abs(A),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(A){A=Math.floor(Math.abs(A)),this.r=Math.min(A,255),this.gl[0]=A/255,this.update(!0)}},green:{get:function(){return this.g},set:function(A){A=Math.floor(Math.abs(A)),this.g=Math.min(A,255),this.gl[1]=A/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(A){A=Math.floor(Math.abs(A)),this.b=Math.min(A,255),this.gl[2]=A/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(A){A=Math.floor(Math.abs(A)),this.a=Math.min(A,255),this.gl[3]=A/255,this.update()}},h:{get:function(){return this._h},set:function(A){this._h=A,r(A,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(A){this._s=A,r(this._h,A,this._v,this)}},v:{get:function(){return this._v},set:function(A){this._v=A,r(this._h,this._s,A,this)}}});A.exports=a},function(A,t){var e={};A.exports=e,e.create=function(A,t){return{x:A||0,y:t||0}},e.clone=function(A){return{x:A.x,y:A.y}},e.magnitude=function(A){return Math.sqrt(A.x*A.x+A.y*A.y)},e.magnitudeSquared=function(A){return A.x*A.x+A.y*A.y},e.rotate=function(A,t,e){var i=Math.cos(t),s=Math.sin(t);e||(e={});var n=A.x*i-A.y*s;return e.y=A.x*s+A.y*i,e.x=n,e},e.rotateAbout=function(A,t,e,i){var s=Math.cos(t),n=Math.sin(t);i||(i={});var r=e.x+((A.x-e.x)*s-(A.y-e.y)*n);return i.y=e.y+((A.x-e.x)*n+(A.y-e.y)*s),i.x=r,i},e.normalise=function(A){var t=e.magnitude(A);return 0===t?{x:0,y:0}:{x:A.x/t,y:A.y/t}},e.dot=function(A,t){return A.x*t.x+A.y*t.y},e.cross=function(A,t){return A.x*t.y-A.y*t.x},e.cross3=function(A,t,e){return(t.x-A.x)*(e.y-A.y)-(t.y-A.y)*(e.x-A.x)},e.add=function(A,t,e){return e||(e={}),e.x=A.x+t.x,e.y=A.y+t.y,e},e.sub=function(A,t,e){return e||(e={}),e.x=A.x-t.x,e.y=A.y-t.y,e},e.mult=function(A,t){return{x:A.x*t,y:A.y*t}},e.div=function(A,t){return{x:A.x/t,y:A.y/t}},e.perp=function(A,t){return{x:(t=!0===t?-1:1)*-A.y,y:t*A.x}},e.neg=function(A){return{x:-A.x,y:-A.y}},e.angle=function(A,t){return Math.atan2(t.y-A.y,t.x-A.x)},e._temp=[e.create(),e.create(),e.create(),e.create(),e.create(),e.create()]},function(A,t){var e={};A.exports=e,e.create=function(A){var t={min:{x:0,y:0},max:{x:0,y:0}};return A&&e.update(t,A),t},e.update=function(A,t,e){A.min.x=1/0,A.max.x=-1/0,A.min.y=1/0,A.max.y=-1/0;for(var i=0;iA.max.x&&(A.max.x=s.x),s.xA.max.y&&(A.max.y=s.y),s.y0?A.max.x+=e.x:A.min.x+=e.x,e.y>0?A.max.y+=e.y:A.min.y+=e.y)},e.contains=function(A,t){return t.x>=A.min.x&&t.x<=A.max.x&&t.y>=A.min.y&&t.y<=A.max.y},e.overlaps=function(A,t){return A.min.x<=t.max.x&&A.max.x>=t.min.x&&A.max.y>=t.min.y&&A.min.y<=t.max.y},e.translate=function(A,t){A.min.x+=t.x,A.max.x+=t.x,A.min.y+=t.y,A.max.y+=t.y},e.shift=function(A,t){var e=A.max.x-A.min.x,i=A.max.y-A.min.y;A.min.x=t.x,A.max.x=t.x+e,A.min.y=t.y,A.max.y=t.y+i}},function(A,t){A.exports=function(A,t,e,i,s,n){var r;void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=1);var o=0,a=A.length;if(1===n)for(r=s;r=0;r--)A[r][t]+=e+o*i,o++;return A}},function(A,t,e){var i=e(25);A.exports=function(A){return A*i.DEG_TO_RAD}},function(A,t){A.exports=function(A,t,e,i){var s=e||t.fillColor,n=i||t.fillAlpha,r=(16711680&s)>>>16,o=(65280&s)>>>8,a=255&s;A.fillStyle="rgba("+r+","+o+","+a+","+n+")"}},function(A,t){A.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(A,t){A.exports=function(A){return A.y+A.height-A.height*A.originY}},function(A,t){A.exports=function(A,t){return A.y=t-A.height+A.height*A.originY,A}},function(A,t){A.exports=function(A){return A.x-A.width*A.originX}},function(A,t){A.exports=function(A,t){return A.x=t+A.width*A.originX,A}},function(A,t){A.exports=function(A){return A.x+A.width-A.width*A.originX}},function(A,t){A.exports=function(A,t){return A.x=t-A.width+A.width*A.originX,A}},function(A,t){A.exports=function(A){return A.y-A.height*A.originY}},function(A,t){A.exports=function(A,t){return A.y=t+A.height*A.originY,A}},function(A,t){A.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(A,t){A.exports=function(A,t,e){return!(A.width<=0||A.height<=0)&&(A.x<=t&&A.x+A.width>=t&&A.y<=e&&A.y+A.height>=e)}},function(A,t,e){A.exports={DESTROY:e(693),FADE_IN_COMPLETE:e(694),FADE_IN_START:e(695),FADE_OUT_COMPLETE:e(696),FADE_OUT_START:e(697),FLASH_COMPLETE:e(698),FLASH_START:e(699),PAN_COMPLETE:e(700),PAN_START:e(701),POST_RENDER:e(702),PRE_RENDER:e(703),SHAKE_COMPLETE:e(704),SHAKE_START:e(705),ZOOM_COMPLETE:e(706),ZOOM_START:e(707)}},function(A,t,e){A.exports={BOOT:e(871),DESTROY:e(872),DRAG_END:e(873),DRAG_ENTER:e(874),DRAG:e(875),DRAG_LEAVE:e(876),DRAG_OVER:e(877),DRAG_START:e(878),DROP:e(879),GAME_OUT:e(880),GAME_OVER:e(881),GAMEOBJECT_DOWN:e(882),GAMEOBJECT_DRAG_END:e(883),GAMEOBJECT_DRAG_ENTER:e(884),GAMEOBJECT_DRAG:e(885),GAMEOBJECT_DRAG_LEAVE:e(886),GAMEOBJECT_DRAG_OVER:e(887),GAMEOBJECT_DRAG_START:e(888),GAMEOBJECT_DROP:e(889),GAMEOBJECT_MOVE:e(890),GAMEOBJECT_OUT:e(891),GAMEOBJECT_OVER:e(892),GAMEOBJECT_POINTER_DOWN:e(893),GAMEOBJECT_POINTER_MOVE:e(894),GAMEOBJECT_POINTER_OUT:e(895),GAMEOBJECT_POINTER_OVER:e(896),GAMEOBJECT_POINTER_UP:e(897),GAMEOBJECT_POINTER_WHEEL:e(898),GAMEOBJECT_UP:e(899),GAMEOBJECT_WHEEL:e(900),MANAGER_BOOT:e(901),MANAGER_PROCESS:e(902),MANAGER_UPDATE:e(903),POINTER_DOWN:e(904),POINTER_DOWN_OUTSIDE:e(905),POINTER_MOVE:e(906),POINTER_OUT:e(907),POINTER_OVER:e(908),POINTER_UP:e(909),POINTER_UP_OUTSIDE:e(910),POINTER_WHEEL:e(911),POINTERLOCK_CHANGE:e(912),PRE_UPDATE:e(913),SHUTDOWN:e(914),START:e(915),UPDATE:e(916)}},function(A,t,e){var i=e(0),s=e(13),n=e(14),r=e(1022),o=new i({Extends:n,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,r],initialize:function(A,t,e,i,r){n.call(this,A,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s.Animation(this),this.setTexture(i,r),this.setPosition(t,e),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(A,t){this.anims.update(A,t)},play:function(A,t,e){return this.anims.play(A,t,e),this},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});A.exports=o},function(A,t){A.exports=function(A,t,e,i){var s=e||t.strokeColor,n=i||t.strokeAlpha,r=(16711680&s)>>>16,o=(65280&s)>>>8,a=255&s;A.strokeStyle="rgba("+r+","+o+","+a+","+n+")",A.lineWidth=t.lineWidth}},function(A,t){A.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(A,t,e){var i={};A.exports=i;var s=e(32),n=e(19),r=e(26),o=e(39),a=e(38),h=e(491);i.rectangle=function(A,t,e,i,o){o=o||{};var a={label:"Rectangle Body",position:{x:A,y:t},vertices:s.fromPath("L 0 0 L "+e+" 0 L "+e+" "+i+" L 0 "+i)};if(o.chamfer){var h=o.chamfer;a.vertices=s.chamfer(a.vertices,h.radius,h.quality,h.qualityMin,h.qualityMax),delete o.chamfer}return r.create(n.extend({},a,o))},i.trapezoid=function(A,t,e,i,o,a){a=a||{};var h,l=e*(o*=.5),c=l+(1-2*o)*e,u=c+l;h=o<.5?"L 0 0 L "+l+" "+-i+" L "+c+" "+-i+" L "+u+" 0":"L 0 0 L "+c+" "+-i+" L "+u+" 0";var d={label:"Trapezoid Body",position:{x:A,y:t},vertices:s.fromPath(h)};if(a.chamfer){var g=a.chamfer;d.vertices=s.chamfer(d.vertices,g.radius,g.quality,g.qualityMin,g.qualityMax),delete a.chamfer}return r.create(n.extend({},d,a))},i.circle=function(A,t,e,s,r){s=s||{};var o={label:"Circle Body",circleRadius:e};r=r||25;var a=Math.ceil(Math.max(10,Math.min(r,e)));return a%2==1&&(a+=1),i.polygon(A,t,a,e,n.extend({},o,s))},i.polygon=function(A,t,e,o,a){if(a=a||{},e<3)return i.circle(A,t,o,a);for(var h=2*Math.PI/e,l="",c=.5*h,u=0;u0&&s.area(b)1?(d=r.create(n.extend({parts:g.slice(0)},i)),r.setPosition(d,{x:A,y:t}),d):g[0]}},function(A,t,e){var i=e(150),s=e(27);A.exports=function(A,t,e,n,r){for(var o=null,a=null,h=null,l=null,c=s(A,t,e,n,null,r),u=0;u0&&t>=A.left&&t<=A.right&&e>=A.top&&e<=A.bottom&&(A.x-t)*(A.x-t)+(A.y-e)*(A.y-e)<=A.radius*A.radius}},function(A,t,e){var i=e(0),s=e(280),n=e(164),r=e(52),o=e(165),a=e(3),h=new i({initialize:function(A,t,e,i){void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=r.LINE,this.x1=A,this.y1=t,this.x2=e,this.y2=i},getPoint:function(A,t){return s(this,A,t)},getPoints:function(A,t,e){return n(this,A,t,e)},getRandomPoint:function(A){return o(this,A)},setTo:function(A,t,e,i){return void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x1=A,this.y1=t,this.x2=e,this.y2=i,this},getPointA:function(A){return void 0===A&&(A=new a),A.set(this.x1,this.y1),A},getPointB:function(A){return void 0===A&&(A=new a),A.set(this.x2,this.y2),A},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(A){this.x1<=this.x2?this.x1=A:this.x2=A}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(A){this.x1>this.x2?this.x1=A:this.x2=A}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(A){this.y1<=this.y2?this.y1=A:this.y2=A}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(A){this.y1>this.y2?this.y1=A:this.y2=A}}});A.exports=h},function(A,t){A.exports=function(A){return Math.sqrt((A.x2-A.x1)*(A.x2-A.x1)+(A.y2-A.y1)*(A.y2-A.y1))}},function(A,t){A.exports=function(A,t,e){var i=e-t;return t+((A-t)%i+i)%i}},function(A,t){A.exports=function(A,t,e,i){var s=A-e,n=t-i;return Math.sqrt(s*s+n*n)}},function(A,t,e){A.exports={COMPLETE:e(939),DECODED:e(940),DECODED_ALL:e(941),DESTROY:e(942),DETUNE:e(943),GLOBAL_DETUNE:e(944),GLOBAL_MUTE:e(945),GLOBAL_RATE:e(946),GLOBAL_VOLUME:e(947),LOOP:e(948),LOOPED:e(949),MUTE:e(950),PAUSE_ALL:e(951),PAUSE:e(952),PLAY:e(953),RATE:e(954),RESUME_ALL:e(955),RESUME:e(956),SEEK:e(957),STOP_ALL:e(958),STOP:e(959),UNLOCKED:e(960),VOLUME:e(961)}},function(A,t,e){var i=e(0),s=e(22),n=e(23),r=e(8),o=e(2),a=e(6),h=e(7),l=new i({Extends:n,initialize:function(A,t,e,i,r){var l="json";if(h(t)){var c=t;t=o(c,"key"),e=o(c,"url"),i=o(c,"xhrSettings"),l=o(c,"extension",l),r=o(c,"dataKey",r)}var u={type:"json",cache:A.cacheManager.json,extension:l,responseType:"text",key:t,url:e,xhrSettings:i,config:r};n.call(this,A,u),h(e)&&(this.data=r?a(e,r):e,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;var A=JSON.parse(this.xhrLoader.responseText),t=this.config;this.data="string"==typeof t?a(A,t,A):A}this.onProcessComplete()}});r.register("json",(function(A,t,e,i){if(Array.isArray(A))for(var s=0;s80*e){i=a=A[0],o=h=A[1];for(var w=e;wa&&(a=l),d>h&&(h=d);p=0!==(p=Math.max(a-i,h-o))?1/p:0}return r(y,m,e,i,o,p),m}function s(A,t,e,i,s){var n,r;if(s===T(A,t,e,i)>0)for(n=t;n=t;n-=i)r=x(n,A[n],A[n+1],r);return r&&y(r,r.next)&&(C(r),r=r.next),r}function n(A,t){if(!A)return A;t||(t=A);var e,i=A;do{if(e=!1,i.steiner||!y(i,i.next)&&0!==v(i.prev,i,i.next))i=i.next;else{if(C(i),(i=t=i.prev)===i.next)break;e=!0}}while(e||i!==t);return t}function r(A,t,e,i,s,c,u){if(A){!u&&c&&function(A,t,e,i){var s=A;do{null===s.z&&(s.z=d(s.x,s.y,t,e,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==A);s.prevZ.nextZ=null,s.prevZ=null,function(A){var t,e,i,s,n,r,o,a,h=1;do{for(e=A,A=null,n=null,r=0;e;){for(r++,i=e,o=0,t=0;t0||a>0&&i;)0!==o&&(0===a||!i||e.z<=i.z)?(s=e,e=e.nextZ,o--):(s=i,i=i.nextZ,a--),n?n.nextZ=s:A=s,s.prevZ=n,n=s;e=i}n.nextZ=null,h*=2}while(r>1)}(s)}(A,i,s,c);for(var g,p,f=A;A.prev!==A.next;)if(g=A.prev,p=A.next,c?a(A,i,s,c):o(A))t.push(g.i/e),t.push(A.i/e),t.push(p.i/e),C(A),A=p.next,f=p.next;else if((A=p)===f){u?1===u?r(A=h(A,t,e),t,e,i,s,c,2):2===u&&l(A,t,e,i,s,c):r(n(A),t,e,i,s,c,1);break}}}function o(A){var t=A.prev,e=A,i=A.next;if(v(t,e,i)>=0)return!1;for(var s=A.next.next;s!==A.prev;){if(p(t.x,t.y,e.x,e.y,i.x,i.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function a(A,t,e,i){var s=A.prev,n=A,r=A.next;if(v(s,n,r)>=0)return!1;for(var o=s.xn.x?s.x>r.x?s.x:r.x:n.x>r.x?n.x:r.x,l=s.y>n.y?s.y>r.y?s.y:r.y:n.y>r.y?n.y:r.y,c=d(o,a,t,e,i),u=d(h,l,t,e,i),g=A.prevZ,f=A.nextZ;g&&g.z>=c&&f&&f.z<=u;){if(g!==A.prev&&g!==A.next&&p(s.x,s.y,n.x,n.y,r.x,r.y,g.x,g.y)&&v(g.prev,g,g.next)>=0)return!1;if(g=g.prevZ,f!==A.prev&&f!==A.next&&p(s.x,s.y,n.x,n.y,r.x,r.y,f.x,f.y)&&v(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;g&&g.z>=c;){if(g!==A.prev&&g!==A.next&&p(s.x,s.y,n.x,n.y,r.x,r.y,g.x,g.y)&&v(g.prev,g,g.next)>=0)return!1;g=g.prevZ}for(;f&&f.z<=u;){if(f!==A.prev&&f!==A.next&&p(s.x,s.y,n.x,n.y,r.x,r.y,f.x,f.y)&&v(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function h(A,t,e){var i=A;do{var s=i.prev,n=i.next.next;!y(s,n)&&m(s,i,i.next,n)&&w(s,n)&&w(n,s)&&(t.push(s.i/e),t.push(i.i/e),t.push(n.i/e),C(i),C(i.next),i=A=n),i=i.next}while(i!==A);return i}function l(A,t,e,i,s,o){var a=A;do{for(var h=a.next.next;h!==a.prev;){if(a.i!==h.i&&f(a,h)){var l=B(a,h);return a=n(a,a.next),l=n(l,l.next),r(a,t,e,i,s,o),void r(l,t,e,i,s,o)}h=h.next}a=a.next}while(a!==A)}function c(A,t){return A.x-t.x}function u(A,t){if(t=function(A,t){var e,i=t,s=A.x,n=A.y,r=-1/0;do{if(n<=i.y&&n>=i.next.y&&i.next.y!==i.y){var o=i.x+(n-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(o<=s&&o>r){if(r=o,o===s){if(n===i.y)return i;if(n===i.next.y)return i.next}e=i.x=i.x&&i.x>=l&&s!==i.x&&p(ne.x)&&w(i,A)&&(e=i,u=a),i=i.next;return e}(A,t)){var e=B(t,A);n(e,e.next)}}function d(A,t,e,i,s){return(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=32767*(A-e)*s)|A<<8))|A<<4))|A<<2))|A<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function g(A){var t=A,e=A;do{t.x=0&&(A-r)*(i-o)-(e-r)*(t-o)>=0&&(e-r)*(n-o)-(s-r)*(i-o)>=0}function f(A,t){return A.next.i!==t.i&&A.prev.i!==t.i&&!function(A,t){var e=A;do{if(e.i!==A.i&&e.next.i!==A.i&&e.i!==t.i&&e.next.i!==t.i&&m(e,e.next,A,t))return!0;e=e.next}while(e!==A);return!1}(A,t)&&w(A,t)&&w(t,A)&&function(A,t){var e=A,i=!1,s=(A.x+t.x)/2,n=(A.y+t.y)/2;do{e.y>n!=e.next.y>n&&e.next.y!==e.y&&s<(e.next.x-e.x)*(n-e.y)/(e.next.y-e.y)+e.x&&(i=!i),e=e.next}while(e!==A);return i}(A,t)}function v(A,t,e){return(t.y-A.y)*(e.x-t.x)-(t.x-A.x)*(e.y-t.y)}function y(A,t){return A.x===t.x&&A.y===t.y}function m(A,t,e,i){return!!(y(A,t)&&y(e,i)||y(A,i)&&y(e,t))||v(A,t,e)>0!=v(A,t,i)>0&&v(e,i,A)>0!=v(e,i,t)>0}function w(A,t){return v(A.prev,A,A.next)<0?v(A,t,A.next)>=0&&v(A,A.prev,t)>=0:v(A,t,A.prev)<0||v(A,A.next,t)<0}function B(A,t){var e=new b(A.i,A.x,A.y),i=new b(t.i,t.x,t.y),s=A.next,n=t.prev;return A.next=t,t.prev=A,e.next=s,s.prev=e,i.next=e,e.prev=i,n.next=i,i.prev=n,i}function x(A,t,e,i){var s=new b(A,t,e);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function C(A){A.next.prev=A.prev,A.prev.next=A.next,A.prevZ&&(A.prevZ.nextZ=A.nextZ),A.nextZ&&(A.nextZ.prevZ=A.prevZ)}function b(A,t,e){this.i=A,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function T(A,t,e,i){for(var s=0,n=t,r=e-i;n0&&(i+=A[s-1].length,e.holes.push(i))}return e}},function(A,t){A.exports=function(A){var t={};for(var e in A)Array.isArray(A[e])?t[e]=A[e].slice(0):t[e]=A[e];return t}},function(A,t){A.exports=function(A,t,e,i){var s=A.length;if(t<0||t>s||t>=e||e>s||t+e>s){if(i)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(A,t,e){var i=e(11);A.exports=function(A,t,e,s,n){var r=A.strokeTint,o=i.getTintAppendFloatAlphaAndSwap(t.strokeColor,t.strokeAlpha*e);r.TL=o,r.TR=o,r.BL=o,r.BR=o;var a=t.pathData,h=a.length-1,l=t.lineWidth,c=l/2,u=a[0]-s,d=a[1]-n;t.closePath||(h-=2);for(var g=2;g=this.x2&&this.x1>=this.x3?this.x1-A:this.x2>=this.x1&&this.x2>=this.x3?this.x2-A:this.x3-A,this.x1-=t,this.x2-=t,this.x3-=t}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(A){var t=0;t=this.y1<=this.y2&&this.y1<=this.y3?this.y1-A:this.y2<=this.y1&&this.y2<=this.y3?this.y2-A:this.y3-A,this.y1-=t,this.y2-=t,this.y3-=t}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(A){var t=0;t=this.y1>=this.y2&&this.y1>=this.y3?this.y1-A:this.y2>=this.y1&&this.y2>=this.y3?this.y2-A:this.y3-A,this.y1-=t,this.y2-=t,this.y3-=t}}});A.exports=l},function(A,t,e){var i=e(0),s=e(22),n=e(23),r=e(8),o=e(2),a=e(7),h=new i({Extends:n,initialize:function A(t,e,i,s,r){var h,l="png";if(a(e)){var c=e;e=o(c,"key"),i=o(c,"url"),h=o(c,"normalMap"),s=o(c,"xhrSettings"),l=o(c,"extension",l),r=o(c,"frameConfig")}Array.isArray(i)&&(h=i[1],i=i[0]);var u={type:"image",cache:t.textureManager,extension:l,responseType:"blob",key:e,url:i,xhrSettings:s,config:r};if(n.call(this,t,u),h){var d=new A(t,this.key,h,s,r);d.type="normalMap",this.setLink(d),t.addFile(d)}},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var A=this;this.data.onload=function(){n.revokeObjectURL(A.data),A.onProcessComplete()},this.data.onerror=function(){n.revokeObjectURL(A.data),A.onProcessError()},n.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var A,t=this.linkFile;t&&t.state===s.FILE_COMPLETE?(A="image"===this.type?this.cache.addImage(this.key,this.data,t.data):this.cache.addImage(t.key,t.data,this.data),this.pendingDestroy(A),t.pendingDestroy(A)):t||(A=this.cache.addImage(this.key,this.data),this.pendingDestroy(A))}});r.register("image",(function(A,t,e){if(Array.isArray(A))for(var i=0;ithis.right||t>this.bottom)},copy:function(A){return this.index=A.index,this.alpha=A.alpha,this.properties=A.properties,this.visible=A.visible,this.setFlip(A.flipX,A.flipY),this.tint=A.tint,this.rotation=A.rotation,this.collideUp=A.collideUp,this.collideDown=A.collideDown,this.collideLeft=A.collideLeft,this.collideRight=A.collideRight,this.collisionCallback=A.collisionCallback,this.collisionCallbackContext=A.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(A){var t=this.tilemapLayer;return t?t.tileToWorldX(this.x,A):this.x*this.baseWidth},getRight:function(A){var t=this.tilemapLayer;return t?this.getLeft(A)+this.width*t.scaleX:this.getLeft(A)+this.width},getTop:function(A){var t=this.tilemapLayer;return t?t.tileToWorldY(this.y,A)-(this.height-this.baseHeight)*t.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(A){var t=this.tilemapLayer;return t?this.getTop(A)+this.height*t.scaleY:this.getTop(A)+this.height},getBounds:function(A,t){return void 0===t&&(t=new n),t.x=this.getLeft(),t.y=this.getTop(),t.width=this.getRight()-t.x,t.height=this.getBottom()-t.y,t},getCenterX:function(A){return(this.getLeft(A)+this.getRight(A))/2},getCenterY:function(A){return(this.getTop(A)+this.getBottom(A))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(A,t,e,i){return!(e<=this.pixelX||i<=this.pixelY||A>=this.right||t>=this.bottom)},isInteresting:function(A,t){return A&&t?this.canCollide||this.hasInterestingFace:A?this.collides:!!t&&this.hasInterestingFace},resetCollision:function(A){(void 0===A&&(A=!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,A)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(A,t,e,i,s){(void 0===t&&(t=A),void 0===e&&(e=A),void 0===i&&(i=A),void 0===s&&(s=!0),this.collideLeft=A,this.collideRight=t,this.collideUp=e,this.collideDown=i,this.faceLeft=A,this.faceRight=t,this.faceTop=e,this.faceBottom=i,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(A,t){return null===A?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=A,this.collisionCallbackContext=t),this},setSize:function(A,t,e,i){return void 0!==A&&(this.width=A),void 0!==t&&(this.height=t),void 0!==e&&(this.baseWidth=e),void 0!==i&&(this.baseHeight=i),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var A=this.layer.tilemapLayer;if(A){var t=A.gidMap[this.index];if(t)return t}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var A=this.tilemapLayer;return A?A.tilemap:null}}});A.exports=r},function(A,t){A.exports=function(A){return A.x-A.width*A.originX+.5*A.width}},function(A,t){A.exports=function(A,t){var e=A.width*A.originX;return A.x=t+e-.5*A.width,A}},function(A,t){A.exports=function(A,t){var e=A.height*A.originY;return A.y=t+e-.5*A.height,A}},function(A,t){A.exports=function(A){return A.y-A.height*A.originY+.5*A.height}},function(A,t,e){var i=e(0),s=e(61),n=e(270),r=e(271),o=e(52),a=e(161),h=new i({initialize:function(A,t,e){void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=0),this.type=o.CIRCLE,this.x=A,this.y=t,this._radius=e,this._diameter=2*e},contains:function(A,t){return s(this,A,t)},getPoint:function(A,t){return n(this,A,t)},getPoints:function(A,t,e){return r(this,A,t,e)},getRandomPoint:function(A){return a(this,A)},setTo:function(A,t,e){return this.x=A,this.y=t,this._radius=e,this._diameter=2*e,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(A,t){return void 0===t&&(t=A),this.x=A,this.y=t,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(A){this._radius=A,this._diameter=2*A}},diameter:{get:function(){return this._diameter},set:function(A){this._diameter=A,this._radius=.5*A}},left:{get:function(){return this.x-this._radius},set:function(A){this.x=A+this._radius}},right:{get:function(){return this.x+this._radius},set:function(A){this.x=A-this._radius}},top:{get:function(){return this.y-this._radius},set:function(A){this.y=A+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(A){this.y=A-this._radius}}});A.exports=h},function(A,t,e){var i=new(e(0))({initialize:function(A,t,e){this.x=0,this.y=0,this.z=0,"object"==typeof A?(this.x=A.x||0,this.y=A.y||0,this.z=A.z||0):(this.x=A||0,this.y=t||0,this.z=e||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(A,t){var e=A.x,i=A.y,s=A.z,n=t.x,r=t.y,o=t.z;return this.x=i*o-s*r,this.y=s*n-e*o,this.z=e*r-i*n,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,t,e){return"object"==typeof A?(this.x=A.x||0,this.y=A.y||0,this.z=A.z||0):(this.x=A||0,this.y=t||0,this.z=e||0),this},add:function(A){return this.x+=A.x,this.y+=A.y,this.z+=A.z||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 t=A.x-this.x,e=A.y-this.y,i=A.z-this.z||0;return Math.sqrt(t*t+e*e+i*i)},distanceSq:function(A){var t=A.x-this.x,e=A.y-this.y,i=A.z-this.z||0;return t*t+e*e+i*i},length:function(){var A=this.x,t=this.y,e=this.z;return Math.sqrt(A*A+t*t+e*e)},lengthSq:function(){var A=this.x,t=this.y,e=this.z;return A*A+t*t+e*e},normalize:function(){var A=this.x,t=this.y,e=this.z,i=A*A+t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=A*i,this.y=t*i,this.z=e*i),this},dot:function(A){return this.x*A.x+this.y*A.y+this.z*A.z},cross:function(A){var t=this.x,e=this.y,i=this.z,s=A.x,n=A.y,r=A.z;return this.x=e*r-i*n,this.y=i*s-t*r,this.z=t*n-e*s,this},lerp:function(A,t){void 0===t&&(t=0);var e=this.x,i=this.y,s=this.z;return this.x=e+t*(A.x-e),this.y=i+t*(A.y-i),this.z=s+t*(A.z-s),this},transformMat3:function(A){var t=this.x,e=this.y,i=this.z,s=A.val;return this.x=t*s[0]+e*s[3]+i*s[6],this.y=t*s[1]+e*s[4]+i*s[7],this.z=t*s[2]+e*s[5]+i*s[8],this},transformMat4:function(A){var t=this.x,e=this.y,i=this.z,s=A.val;return this.x=s[0]*t+s[4]*e+s[8]*i+s[12],this.y=s[1]*t+s[5]*e+s[9]*i+s[13],this.z=s[2]*t+s[6]*e+s[10]*i+s[14],this},transformCoordinates:function(A){var t=this.x,e=this.y,i=this.z,s=A.val,n=t*s[0]+e*s[4]+i*s[8]+s[12],r=t*s[1]+e*s[5]+i*s[9]+s[13],o=t*s[2]+e*s[6]+i*s[10]+s[14],a=t*s[3]+e*s[7]+i*s[11]+s[15];return this.x=n/a,this.y=r/a,this.z=o/a,this},transformQuat:function(A){var t=this.x,e=this.y,i=this.z,s=A.x,n=A.y,r=A.z,o=A.w,a=o*t+n*i-r*e,h=o*e+r*t-s*i,l=o*i+s*e-n*t,c=-s*t-n*e-r*i;return this.x=a*o+c*-s+h*-r-l*-n,this.y=h*o+c*-n+l*-s-a*-r,this.z=l*o+c*-r+a*-n-h*-s,this},project:function(A){var t=this.x,e=this.y,i=this.z,s=A.val,n=s[0],r=s[1],o=s[2],a=s[3],h=s[4],l=s[5],c=s[6],u=s[7],d=s[8],g=s[9],p=s[10],f=s[11],v=s[12],y=s[13],m=s[14],w=1/(t*a+e*u+i*f+s[15]);return this.x=(t*n+e*h+i*d+v)*w,this.y=(t*r+e*l+i*g+y)*w,this.z=(t*o+e*c+i*p+m)*w,this},unproject:function(A,t){var e=A.x,i=A.y,s=A.z,n=A.w,r=this.x-e,o=n-this.y-1-i,a=this.z;return this.x=2*r/s-1,this.y=2*o/n-1,this.z=2*a-1,this.project(t)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});i.ZERO=new i,i.RIGHT=new i(1,0,0),i.LEFT=new i(-1,0,0),i.UP=new i(0,-1,0),i.DOWN=new i(0,1,0),i.FORWARD=new i(0,0,1),i.BACK=new i(0,0,-1),i.ONE=new i(1,1,1),A.exports=i},function(A,t){A.exports=function(A,t){if(!(t>=A.length)){for(var e=A.length-1,i=A[t],s=t;se&&(t=e/2);var i=Math.max(1,Math.round(e/t));return s(this.getSpacedPoints(i),A)},getDistancePoints:function(A){var t=this.getLength(),e=Math.max(1,t/A);return this.getSpacedPoints(e)},getEndPoint:function(A){return void 0===A&&(A=new r),this.getPointAt(1,A)},getLength:function(){var A=this.getLengths();return A[A.length-1]},getLengths:function(A){if(void 0===A&&(A=this.arcLengthDivisions),this.cacheArcLengths.length===A+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,e=[],i=this.getPoint(0,this._tmpVec2A),s=0;e.push(0);for(var n=1;n<=A;n++)s+=(t=this.getPoint(n/A,this._tmpVec2B)).distance(i),e.push(s),i.copy(t);return this.cacheArcLengths=e,e},getPointAt:function(A,t){var e=this.getUtoTmapping(A);return this.getPoint(e,t)},getPoints:function(A){void 0===A&&(A=this.defaultDivisions);for(var t=[],e=0;e<=A;e++)t.push(this.getPoint(e/A));return t},getRandomPoint:function(A){return void 0===A&&(A=new r),this.getPoint(Math.random(),A)},getSpacedPoints:function(A){void 0===A&&(A=this.defaultDivisions);for(var t=[],e=0;e<=A;e++){var i=this.getUtoTmapping(e/A,null,A);t.push(this.getPoint(i))}return t},getStartPoint:function(A){return void 0===A&&(A=new r),this.getPointAt(0,A)},getTangent:function(A,t){void 0===t&&(t=new r);var e=A-1e-4,i=A+1e-4;return e<0&&(e=0),i>1&&(i=1),this.getPoint(e,this._tmpVec2A),this.getPoint(i,t),t.subtract(this._tmpVec2A).normalize()},getTangentAt:function(A,t){var e=this.getUtoTmapping(A);return this.getTangent(e,t)},getTFromDistance:function(A,t){return A<=0?0:this.getUtoTmapping(0,A,t)},getUtoTmapping:function(A,t,e){var i,s=this.getLengths(e),n=0,r=s.length;i=t?Math.min(t,s[r-1]):A*s[r-1];for(var o,a=0,h=r-1;a<=h;)if((o=s[n=Math.floor(a+(h-a)/2)]-i)<0)a=n+1;else{if(!(o>0)){h=n;break}h=n-1}if(s[n=h]===i)return n/(r-1);var l=s[n];return(n+(i-l)/(s[n+1]-l))/(r-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});A.exports=o},function(A,t,e){A.exports={ADD:e(918),COMPLETE:e(919),FILE_COMPLETE:e(920),FILE_KEY_COMPLETE:e(921),FILE_LOAD_ERROR:e(922),FILE_LOAD:e(923),FILE_PROGRESS:e(924),POST_PROCESS:e(925),PROGRESS:e(926),START:e(927)}},function(A,t,e){var i=e(72);A.exports=function(A,t){var e=i(A);for(var s in t)e.hasOwnProperty(s)||(e[s]=t[s]);return e}},function(A,t,e){var i=new(e(0))({initialize:function(A){if(this.entries=[],Array.isArray(A))for(var t=0;t-1&&this.entries.splice(t,1),this},dump:function(){console.group("Set");for(var A=0;A-1},union:function(A){var t=new i;return A.entries.forEach((function(A){t.set(A)})),this.entries.forEach((function(A){t.set(A)})),t},intersect:function(A){var t=new i;return this.entries.forEach((function(e){A.contains(e)&&t.set(e)})),t},difference:function(A){var t=new i;return this.entries.forEach((function(e){A.contains(e)||t.set(e)})),t},size:{get:function(){return this.entries.length},set:function(A){return A=0&&v>=0&&f+v<1}},function(A,t,e){var i=e(4);A.exports=function(A,t,e){void 0===e&&(e=new i);var s=A.x1,n=A.y1,r=A.x2,o=A.y2,a=t.x1,h=t.y1,l=t.x2,c=t.y2,u=(c-h)*(r-s)-(l-a)*(o-n);if(0===u)return!1;var d=((l-a)*(n-h)-(c-h)*(s-a))/u,g=((r-s)*(n-h)-(o-n)*(s-a))/u;return d>=0&&d<=1&&g>=0&&g<=1&&(e.x=s+d*(r-s),e.y=n+d*(o-n),!0)}},function(A,t){A.exports=function(A){return Math.atan2(A.y2-A.y1,A.x2-A.x1)}},function(A,t,e){var i={};A.exports=i;var s=e(19);i.on=function(A,t,e){for(var i,s=t.split(" "),n=0;n0){e||(e={}),i=t.split(" ");for(var h=0;h0?1:.7),t.damping=t.damping||0,t.angularStiffness=t.angularStiffness||0,t.angleA=t.bodyA?t.bodyA.angle:t.angleA,t.angleB=t.bodyB?t.bodyB.angle:t.angleB,t.plugin={};var r={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===t.length&&t.stiffness>.1?(r.type="pin",r.anchors=!1):t.stiffness<.9&&(r.type="spring"),t.render=h.extend(r,t.render),t},i.preSolveAll=function(A){for(var t=0;t0&&(c.position.x+=h.x,c.position.y+=h.y),0!==h.angle&&(s.rotate(c.vertices,h.angle,e.position),a.rotate(c.axes,h.angle),l>0&&n.rotateAbout(c.position,h.angle,e.position,c.position)),o.update(c.bounds,c.vertices,e.velocity)}h.angle*=i._warming,h.x*=i._warming,h.y*=i._warming}}}},function(A,t,e){var i=e(24);A.exports=function(A,t,e){return(e-t)*(A=i(A,0,1))}},function(A,t){A.exports=function(A,t,e){return A&&A.hasOwnProperty(t)?A[t]:e}},function(A,t){A.exports={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}},function(A,t,e){var i=e(0),s=e(289),n=new i({initialize:function(A,t){this.parent=A,this.events=t,t||(this.events=A.events?A.events:A),this.list={},this.values={},this._frozen=!1,!A.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(A){var t=this.list;if(Array.isArray(A)){for(var e=[],i=0;iE&&BT&&xs&&(A=s),A},clampY:function(A){var t=this._bounds,e=this.displayHeight,i=t.y+(e-this.height)/2,s=Math.max(i,i+t.height-e);return As&&(A=s),A},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(A){return void 0===A&&(A=0),this.rotation=n(A),this},setBackgroundColor:function(A){return void 0===A&&(A="rgba(0,0,0,0)"),this.backgroundColor=l(A),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(A,t,e,i,s){return void 0===s&&(s=!1),this._bounds.setTo(A,t,e,i),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(A){void 0===A&&(A=new a);var t=this._bounds;return A.setTo(t.x,t.y,t.width,t.height),A},setName:function(A){return void 0===A&&(A=""),this.name=A,this},setPosition:function(A,t){return void 0===t&&(t=A),this.x=A,this.y=t,this},setRotation:function(A){return void 0===A&&(A=0),this.rotation=A,this},setRoundPixels:function(A){return this.roundPixels=A,this},setScene:function(A){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=A;var t=A.sys;this.sceneManager=t.game.scene,this.scaleManager=t.scale,this.cameraManager=t.cameras;var e=this.scaleManager.resolution;return this.resolution=e,this._cx=this._x*e,this._cy=this._y*e,this._cw=this._width*e,this._ch=this._height*e,this.updateSystem(),this},setScroll:function(A,t){return void 0===t&&(t=A),this.scrollX=A,this.scrollY=t,this},setSize:function(A,t){return void 0===t&&(t=A),this.width=A,this.height=t,this},setViewport:function(A,t,e,i){return this.x=A,this.y=t,this.width=e,this.height=i,this},setZoom:function(A){return void 0===A&&(A=1),0===A&&(A=.001),this.zoom=A,this},setMask:function(A,t){return void 0===t&&(t=!0),this.mask=A,this._maskCamera=t?this.cameraManager.default:this,this},clearMask:function(A){return void 0===A&&(A=!1),A&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var A={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&&(A.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),A},update:function(){},updateSystem:function(){if(this.scaleManager){var A=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,t=this.sceneManager;A&&!this._customViewport?t.customViewports++:!A&&this._customViewport&&t.customViewports--,this.dirty=!0,this._customViewport=A}},destroy:function(){this.emit(o.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(A){this._x=A,this._cx=A*this.resolution,this.updateSystem()}},y:{get:function(){return this._y},set:function(A){this._y=A,this._cy=A*this.resolution,this.updateSystem()}},width:{get:function(){return this._width},set:function(A){this._width=A,this._cw=A*this.resolution,this.updateSystem()}},height:{get:function(){return this._height},set:function(A){this._height=A,this._ch=A*this.resolution,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(A){this._scrollX=A,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(A){this._scrollY=A,this.dirty=!0}},zoom:{get:function(){return this._zoom},set:function(A){this._zoom=A,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(A){this._rotation=A,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.zoom}},displayHeight:{get:function(){return this.height/this.zoom}}});A.exports=u},function(A,t,e){A.exports={ENTER_FULLSCREEN:e(746),FULLSCREEN_FAILED:e(747),FULLSCREEN_UNSUPPORTED:e(748),LEAVE_FULLSCREEN:e(749),ORIENTATION_CHANGE:e(750),RESIZE:e(751)}},function(A,t){A.exports=function(A,t,e,i){return void 0===e&&(e=0),0===t?A:(A-=e,A=t*Math.floor(A/t),i?(e+A)/t:e+A)}},function(A,t,e){var i=e(0),s=e(24),n=e(17),r=new i({initialize:function(A,t,e,i,s,n,r){this.texture=A,this.name=t,this.source=A.source[e],this.sourceIndex=e,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(n,r,i,s)},setSize:function(A,t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),this.cutX=e,this.cutY=i,this.cutWidth=A,this.cutHeight=t,this.width=A,this.height=t,this.halfWidth=Math.floor(.5*A),this.halfHeight=Math.floor(.5*t),this.centerX=Math.floor(A/2),this.centerY=Math.floor(t/2);var s=this.data,n=s.cut;n.x=e,n.y=i,n.w=A,n.h=t,n.r=e+A,n.b=i+t,s.sourceSize.w=A,s.sourceSize.h=t,s.spriteSourceSize.w=A,s.spriteSourceSize.h=t,s.radius=.5*Math.sqrt(A*A+t*t);var r=s.drawImage;return r.x=e,r.y=i,r.width=A,r.height=t,this.updateUVs()},setTrim:function(A,t,e,i,s,n){var r=this.data,o=r.spriteSourceSize;return r.trim=!0,r.sourceSize.w=A,r.sourceSize.h=t,o.x=e,o.y=i,o.w=s,o.h=n,o.r=e+s,o.b=i+n,this.x=e,this.y=i,this.width=s,this.height=n,this.halfWidth=.5*s,this.halfHeight=.5*n,this.centerX=Math.floor(s/2),this.centerY=Math.floor(n/2),this.updateUVs()},setCropUVs:function(A,t,e,i,n,r,o){var a=this.cutX,h=this.cutY,l=this.cutWidth,c=this.cutHeight,u=this.realWidth,d=this.realHeight,g=a+(t=s(t,0,u)),p=h+(e=s(e,0,d)),f=i=s(i,0,u-t),v=n=s(n,0,d-e),y=this.data;if(y.trim){var m=y.spriteSourceSize,w=t+(i=s(i,0,l-t)),B=e+(n=s(n,0,c-e));if(!(m.rw||m.y>B)){var x=Math.max(m.x,t),C=Math.max(m.y,e),b=Math.min(m.r,w)-x,T=Math.min(m.b,B)-C;f=b,v=T,g=r?a+(l-(x-m.x)-b):a+(x-m.x),p=o?h+(c-(C-m.y)-T):h+(C-m.y),t=x,e=C,i=b,n=T}else g=0,p=0,f=0,v=0}else r&&(g=a+(l-t-i)),o&&(p=h+(c-e-n));var Q=this.source.width,E=this.source.height;return A.u0=Math.max(0,g/Q),A.v0=Math.max(0,p/E),A.u1=Math.min(1,(g+f)/Q),A.v1=Math.min(1,(p+v)/E),A.x=t,A.y=e,A.cx=g,A.cy=p,A.cw=f,A.ch=v,A.width=i,A.height=n,A.flipX=r,A.flipY=o,A},updateCropUVs:function(A,t,e){return this.setCropUVs(A,A.x,A.y,A.width,A.height,t,e)},updateUVs:function(){var A=this.cutX,t=this.cutY,e=this.cutWidth,i=this.cutHeight,s=this.data.drawImage;s.width=e,s.height=i;var n=this.source.width,r=this.source.height;return this.u0=A/n,this.v0=t/r,this.u1=(A+e)/n,this.v1=(t+i)/r,this},updateUVsInverted:function(){var A=this.source.width,t=this.source.height;return this.u0=(this.cutX+this.cutHeight)/A,this.v0=this.cutY/t,this.u1=this.cutX/A,this.v1=(this.cutY+this.cutWidth)/t,this},clone:function(){var A=new r(this.texture,this.name,this.sourceIndex);return A.cutX=this.cutX,A.cutY=this.cutY,A.cutWidth=this.cutWidth,A.cutHeight=this.cutHeight,A.x=this.x,A.y=this.y,A.width=this.width,A.height=this.height,A.halfWidth=this.halfWidth,A.halfHeight=this.halfHeight,A.centerX=this.centerX,A.centerY=this.centerY,A.rotated=this.rotated,A.data=n(!0,A.data,this.data),A.updateUVs(),A},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}}});A.exports=r},function(A,t,e){var i=e(0),s=e(109),n=e(407),r=e(408),o=e(52),a=e(169),h=new i({initialize:function(A,t,e,i){void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=o.ELLIPSE,this.x=A,this.y=t,this.width=e,this.height=i},contains:function(A,t){return s(this,A,t)},getPoint:function(A,t){return n(this,A,t)},getPoints:function(A,t,e){return r(this,A,t,e)},getRandomPoint:function(A){return a(this,A)},setTo:function(A,t,e,i){return this.x=A,this.y=t,this.width=e,this.height=i,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(A,t){return void 0===t&&(t=A),this.x=A,this.y=t,this},setSize:function(A,t){return void 0===t&&(t=A),this.width=A,this.height=t,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(A){this.x=A+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(A){this.x=A-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(A){this.y=A+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(A){this.y=A-this.height/2}}});A.exports=h},function(A,t){A.exports=function(A,t,e){if(A.width<=0||A.height<=0)return!1;var i=(t-A.x)/A.width,s=(e-A.y)/A.height;return(i*=i)+(s*=s)<.25}},function(A,t,e){var i=e(258),s=e(0),n=e(103),r=e(2),o=e(6),a=e(7),h=e(402),l=e(90),c=e(56),u=new s({initialize:function(A,t,e){e?t&&!Array.isArray(t)&&(t=[t]):Array.isArray(t)?a(t[0])&&(e=t,t=null):a(t)&&(e=t,t=null),this.scene=A,this.children=new l(t),this.isParent=!0,this.classType=r(e,"classType",c),this.name=r(e,"name",""),this.active=r(e,"active",!0),this.maxSize=r(e,"maxSize",-1),this.defaultKey=r(e,"defaultKey",null),this.defaultFrame=r(e,"defaultFrame",null),this.runChildUpdate=r(e,"runChildUpdate",!1),this.createCallback=r(e,"createCallback",null),this.removeCallback=r(e,"removeCallback",null),this.createMultipleCallback=r(e,"createMultipleCallback",null),e&&this.createMultiple(e)},create:function(A,t,e,i,s,n){if(void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=this.defaultKey),void 0===i&&(i=this.defaultFrame),void 0===s&&(s=!0),void 0===n&&(n=!0),this.isFull())return null;var r=new this.classType(this.scene,A,t,e,i);return this.scene.sys.displayList.add(r),r.preUpdate&&this.scene.sys.updateList.add(r),r.visible=s,r.setActive(n),this.add(r),r},createMultiple:function(A){if(this.isFull())return[];Array.isArray(A)||(A=[A]);var t=[];if(A[0].key)for(var e=0;e=0;l--)if((h=u[l]).active===e){if(++c===t)break}else h=null;return h?("number"==typeof s&&(h.x=s),"number"==typeof n&&(h.y=n),h):i?this.create(s,n,r,o,a):null},get:function(A,t,e,i,s){return this.getFirst(!1,!0,A,t,e,i,s)},getFirstAlive:function(A,t,e,i,s,n){return this.getFirst(!0,A,t,e,i,s,n)},getFirstDead:function(A,t,e,i,s,n){return this.getFirst(!1,A,t,e,i,s,n)},playAnimation:function(A,t){return i.PlayAnimation(this.children.entries,A,t),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(A){void 0===A&&(A=!0);for(var t=0,e=0;e0&&n.motion=n.sleepThreshold&&i.set(n,!0)):n.sleepCounter>0&&(n.sleepCounter-=1)}else i.set(n,!1)}},i.afterCollisions=function(A,t){for(var e=t*t*t,s=0;si._motionWakeThreshold*e&&i.set(h,!1)}}}},i.set=function(A,t){var e=A.isSleeping;t?(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,e||s.trigger(A,"sleepStart")):(A.isSleeping=!1,A.sleepCounter=0,e&&s.trigger(A,"sleepEnd"))}},function(A,t){A.exports=function(A,t,e){return A>=0&&A=0&&t0;t--){var e=Math.floor(Math.random()*(t+1)),i=A[t];A[t]=A[e],A[e]=i}return A}},function(A,t){A.exports=function(A,t,e){return(t-A)*e+A}},function(A,t,e){(function(t){var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};A.exports=function(){var A=navigator.userAgent;/Windows/.test(A)?e.windows=!0:/Mac OS/.test(A)&&!/like Mac OS/.test(A)?e.macOS=!0:/Android/.test(A)?e.android=!0:/Linux/.test(A)?e.linux=!0:/iP[ao]d|iPhone/i.test(A)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==A.toLowerCase().indexOf("iphone"),e.iPad=-1!==A.toLowerCase().indexOf("ipad")):/Kindle/.test(A)||/\bKF[A-Z][A-Z]+/.test(A)||/Silk.*Mobile Safari/.test(A)?e.kindle=!0:/CrOS/.test(A)&&(e.chromeOS=!0),(/Windows Phone/i.test(A)||/IEMobile/i.test(A))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(A);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(A)&&/Touch/i.test(A))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),void 0!==window.cordova&&(e.cordova=!0),void 0!==t&&t.versions&&t.versions.node&&(e.node=!0),e.node&&"object"==typeof t.versions&&(e.nodeWebkit=!!t.versions["node-webkit"],e.electron=!!t.versions.electron),void 0!==window.ejecta&&(e.ejecta=!0),/Crosswalk/.test(A)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()}).call(this,e(772))},function(A,t,e){var i,s=e(125),n={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};A.exports=(i=navigator.userAgent,/Edge\/\d+/.test(i)?n.edge=!0:/Chrome\/(\d+)/.test(i)&&!s.windowsPhone?(n.chrome=!0,n.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(i)?(n.firefox=!0,n.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(i)&&s.iOS?n.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(i)?(n.ie=!0,n.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(i)?n.opera=!0:/Safari/.test(i)&&!s.windowsPhone?n.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(i)&&(n.ie=!0,n.trident=!0,n.tridentVersion=parseInt(RegExp.$1,10),n.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(i)&&(n.silk=!0),n)},function(A,t){A.exports=function(A,t){return A>0&&0==(A&A-1)&&t>0&&0==(t&t-1)}},function(A,t,e){var i=new(e(0))({initialize:function(A,t,e,i){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof A?(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=t||0,this.z=e||0,this.w=i||0)},clone:function(){return new i(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,t,e,i){return"object"==typeof A?(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=t||0,this.z=e||0,this.w=i||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,t=this.y,e=this.z,i=this.w;return Math.sqrt(A*A+t*t+e*e+i*i)},lengthSq:function(){var A=this.x,t=this.y,e=this.z,i=this.w;return A*A+t*t+e*e+i*i},normalize:function(){var A=this.x,t=this.y,e=this.z,i=this.w,s=A*A+t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=A*s,this.y=t*s,this.z=e*s,this.w=i*s),this},dot:function(A){return this.x*A.x+this.y*A.y+this.z*A.z+this.w*A.w},lerp:function(A,t){void 0===t&&(t=0);var e=this.x,i=this.y,s=this.z,n=this.w;return this.x=e+t*(A.x-e),this.y=i+t*(A.y-i),this.z=s+t*(A.z-s),this.w=n+t*(A.w-n),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 t=A.x-this.x,e=A.y-this.y,i=A.z-this.z||0,s=A.w-this.w||0;return Math.sqrt(t*t+e*e+i*i+s*s)},distanceSq:function(A){var t=A.x-this.x,e=A.y-this.y,i=A.z-this.z||0,s=A.w-this.w||0;return t*t+e*e+i*i+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(A){var t=this.x,e=this.y,i=this.z,s=this.w,n=A.val;return this.x=n[0]*t+n[4]*e+n[8]*i+n[12]*s,this.y=n[1]*t+n[5]*e+n[9]*i+n[13]*s,this.z=n[2]*t+n[6]*e+n[10]*i+n[14]*s,this.w=n[3]*t+n[7]*e+n[11]*i+n[15]*s,this},transformQuat:function(A){var t=this.x,e=this.y,i=this.z,s=A.x,n=A.y,r=A.z,o=A.w,a=o*t+n*i-r*e,h=o*e+r*t-s*i,l=o*i+s*e-n*t,c=-s*t-n*e-r*i;return this.x=a*o+c*-s+h*-r-l*-n,this.y=h*o+c*-n+l*-s-a*-r,this.z=l*o+c*-r+a*-n-h*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});i.prototype.sub=i.prototype.subtract,i.prototype.mul=i.prototype.multiply,i.prototype.div=i.prototype.divide,i.prototype.dist=i.prototype.distance,i.prototype.distSq=i.prototype.distanceSq,i.prototype.len=i.prototype.length,i.prototype.lenSq=i.prototype.lengthSq,A.exports=i},function(A,t,e){A.exports={ADD:e(816),ERROR:e(817),LOAD:e(818),READY:e(819),REMOVE:e(820)}},function(A,t){A.exports=function(A,t){var e;if(t)"string"==typeof t?e=document.getElementById(t):"object"==typeof t&&1===t.nodeType&&(e=t);else if(A.parentElement)return A;return e||(e=document.body),e.appendChild(A),A}},function(A,t,e){var i=e(86);A.exports=function(A,t,e,s){var n;if(void 0===s&&(s=A),!Array.isArray(t))return-1!==(n=A.indexOf(t))?(i(A,n),e&&e.call(s,t),t):null;for(var r=t.length-1;r>=0;){var o=t[r];-1!==(n=A.indexOf(o))?(i(A,n),e&&e.call(s,o)):t.pop(),r--}return t}},function(A,t){A.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,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}},function(A,t){A.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(A,t,e){var i=e(0),s=e(72),n=e(9),r=e(66),o=e(20),a=e(1),h=new i({Extends:n,initialize:function(A){n.call(this),this.game=A,this.jsonCache=A.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,A.events.on(o.BLUR,(function(){this.pauseOnBlur&&this.onBlur()}),this),A.events.on(o.FOCUS,(function(){this.pauseOnBlur&&this.onFocus()}),this),A.events.on(o.PRE_STEP,this.update,this),A.events.once(o.DESTROY,this.destroy,this)},add:a,addAudioSprite:function(A,t){void 0===t&&(t={});var e=this.add(A,t);for(var i in e.spritemap=this.jsonCache.get(A).spritemap,e.spritemap)if(e.spritemap.hasOwnProperty(i)){var n=s(t),r=e.spritemap[i];n.loop=!!r.hasOwnProperty("loop")&&r.loop,e.addMarker({name:i,start:r.start,duration:r.end-r.start,config:n})}return e},play:function(A,t){var e=this.add(A);return e.once(r.COMPLETE,e.destroy,e),t?t.name?(e.addMarker(t),e.play(t.name)):e.play(t):e.play()},playAudioSprite:function(A,t,e){var i=this.addAudioSprite(A);return i.once(r.COMPLETE,i.destroy,i),i.play(t,e)},remove:function(A){var t=this.sounds.indexOf(A);return-1!==t&&(A.destroy(),this.sounds.splice(t,1),!0)},removeByKey:function(A){for(var t=0,e=this.sounds.length-1;e>=0;e--){var i=this.sounds[e];i.key===A&&(i.destroy(),this.sounds.splice(e,1),t++)}return t},pauseAll:function(){this.forEachActiveSound((function(A){A.pause()})),this.emit(r.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(A){A.resume()})),this.emit(r.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound((function(A){A.stop()})),this.emit(r.STOP_ALL,this)},unlock:a,onBlur:a,onFocus:a,update:function(A,t){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(r.UNLOCKED,this));for(var e=this.sounds.length-1;e>=0;e--)this.sounds[e].pendingRemove&&this.sounds.splice(e,1);this.sounds.forEach((function(e){e.update(A,t)}))},destroy:function(){this.removeAllListeners(),this.forEachActiveSound((function(A){A.destroy()})),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(A,t){var e=this;this.sounds.forEach((function(i,s){i&&!i.pendingRemove&&A.call(t||e,i,s,e.sounds)}))},setRate:function(A){return this.rate=A,this},rate:{get:function(){return this._rate},set:function(A){this._rate=A,this.forEachActiveSound((function(A){A.calculateRate()})),this.emit(r.GLOBAL_RATE,this,A)}},setDetune:function(A){return this.detune=A,this},detune:{get:function(){return this._detune},set:function(A){this._detune=A,this.forEachActiveSound((function(A){A.calculateRate()})),this.emit(r.GLOBAL_DETUNE,this,A)}}});A.exports=h},function(A,t,e){var i=e(0),s=e(9),n=e(66),r=e(17),o=e(1),a=new i({Extends:s,initialize:function(A,t,e){s.call(this),this.manager=A,this.key=t,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},this.currentConfig=this.config,this.config=r(this.config,e),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(A){return!(!A||!A.name||"string"!=typeof A.name)&&(this.markers[A.name]?(console.error("addMarker "+A.name+" already exists in Sound"),!1):(A=r(!0,{name:"",start:0,duration:this.totalDuration-(A.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},A),this.markers[A.name]=A,!0))},updateMarker:function(A){return!(!A||!A.name||"string"!=typeof A.name)&&(this.markers[A.name]?(this.markers[A.name]=r(!0,this.markers[A.name],A),!0):(console.warn("Audio Marker: "+A.name+" missing in Sound: "+this.key),!1))},removeMarker:function(A){var t=this.markers[A];return t?(this.markers[A]=null,t):null},play:function(A,t){if(void 0===A&&(A=""),"object"==typeof A&&(t=A,A=""),"string"!=typeof A)return!1;if(A){if(!this.markers[A])return console.warn("Marker: "+A+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[A],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=r(this.currentConfig,t),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,calculateRate:function(){var A=this.currentConfig.detune+this.manager.detune,t=Math.pow(1.0005777895065548,A);this.totalRate=this.currentConfig.rate*this.manager.rate*t},destroy:function(){this.pendingRemove||(this.emit(n.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)}});A.exports=a},function(A,t,e){var i=e(199),s=e(0),n=e(1),r=e(138),o=new s({initialize:function(A){this.parent=A,this.list=[],this.position=0,this.addCallback=n,this.removeCallback=n,this._sortKey=""},add:function(A,t){return t?i.Add(this.list,A):i.Add(this.list,A,0,this.addCallback,this)},addAt:function(A,t,e){return e?i.AddAt(this.list,A,t):i.AddAt(this.list,A,t,0,this.addCallback,this)},getAt:function(A){return this.list[A]},getIndex:function(A){return this.list.indexOf(A)},sort:function(A,t){return A?(void 0===t&&(t=function(t,e){return t[A]-e[A]}),r.inplace(this.list,t),this):this},getByName:function(A){return i.GetFirst(this.list,"name",A)},getRandom:function(A,t){return i.GetRandom(this.list,A,t)},getFirst:function(A,t,e,s){return i.GetFirst(this.list,A,t,e,s)},getAll:function(A,t,e,s){return i.GetAll(this.list,A,t,e,s)},count:function(A,t){return i.CountAllMatching(this.list,A,t)},swap:function(A,t){i.Swap(this.list,A,t)},moveTo:function(A,t){return i.MoveTo(this.list,A,t)},remove:function(A,t){return t?i.Remove(this.list,A):i.Remove(this.list,A,this.removeCallback,this)},removeAt:function(A,t){return t?i.RemoveAt(this.list,A):i.RemoveAt(this.list,A,this.removeCallback,this)},removeBetween:function(A,t,e){return e?i.RemoveBetween(this.list,A,t):i.RemoveBetween(this.list,A,t,this.removeCallback,this)},removeAll:function(A){for(var t=this.list.length;t--;)this.remove(this.list[t],A);return this},bringToTop:function(A){return i.BringToTop(this.list,A)},sendToBack:function(A){return i.SendToBack(this.list,A)},moveUp:function(A){return i.MoveUp(this.list,A),A},moveDown:function(A){return i.MoveDown(this.list,A),A},reverse:function(){return this.list.reverse(),this},shuffle:function(){return i.Shuffle(this.list),this},replace:function(A,t){return i.Replace(this.list,A,t)},exists:function(A){return this.list.indexOf(A)>-1},setAll:function(A,t,e,s){return i.SetAll(this.list,A,t,e,s),this},each:function(A,t){for(var e=[null],i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});A.exports=o},function(A,t,e){var i=e(200),s=e(400);A.exports=function(A,t){if(void 0===t&&(t=90),!i(A))return null;if("string"!=typeof t&&(t=(t%360+360)%360),90===t||-270===t||"rotateLeft"===t)(A=s(A)).reverse();else if(-90===t||270===t||"rotateRight"===t)A.reverse(),A=s(A);else if(180===Math.abs(t)||"rotate180"===t){for(var e=0;eh&&(n=h),r>h&&(r=h),o=s,a=n;;)if(o0&&r.length0&&o.lengtht.right||A.y>t.bottom)}},function(A,t,e){var i=e(6),s={},n={register:function(A,t,e,i,n){s[A]={plugin:t,mapping:e,settingsKey:i,configKey:n}},getPlugin:function(A){return s[A]},install:function(A){var t=A.scene.sys,e=t.settings.input,n=t.game.config;for(var r in s){var o=s[r].plugin,a=s[r].mapping,h=s[r].settingsKey,l=s[r].configKey;i(e,h,n[l])&&(A[a]=new o(A))}},remove:function(A){s.hasOwnProperty(A)&&delete s[A]}};A.exports=n},function(A,t,e){A.exports={ANY_KEY_DOWN:e(1265),ANY_KEY_UP:e(1266),COMBO_MATCH:e(1267),DOWN:e(1268),KEY_DOWN:e(1269),KEY_UP:e(1270),UP:e(1271)}},function(A,t){A.exports=function(A,t){return!!A.url&&(A.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?A.url:t+A.url)}},function(A,t){A.exports=function(A,t,e,i,s){return void 0===A&&(A=""),void 0===t&&(t=!0),void 0===e&&(e=""),void 0===i&&(i=""),void 0===s&&(s=0),{responseType:A,async:t,user:e,password:i,timeout:s,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(A,t,e){var i=e(0),s=e(231),n=e(56),r=new i({Extends:n,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(A,t,e,i,s){n.call(this,A,t,e,i,s),this.body=null}});A.exports=r},function(A,t,e){A.exports={Bounce:e(1366),Collision:e(1367),Force:e(1368),Friction:e(1369),Gravity:e(1370),Mass:e(1371),Static:e(1372),Sensor:e(1373),SetBody:e(1374),Sleep:e(1375),Transform:e(1388),Velocity:e(1389)}},function(A,t){var e={};A.exports=e,e.create=function(A,t){var i=A.bodyA,s=A.bodyB,n={id:e.id(i,s),bodyA:i,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:i.isSensor||s.isSensor,timeCreated:t,timeUpdated:t,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return e.update(n,A,t),n},e.update=function(A,t,i){if(A.collision=t,t.collided){var s=t.supports,n=A.activeContacts,r=t.parentA,o=t.parentB;A.inverseMass=r.inverseMass+o.inverseMass,A.friction=Math.min(r.friction,o.friction),A.frictionStatic=Math.max(r.frictionStatic,o.frictionStatic),A.restitution=Math.max(r.restitution,o.restitution),A.slop=Math.max(r.slop,o.slop);for(var a=0;a=this.firstgid&&A1?2-s:s,r=n*Math.cos(e),o=n*Math.sin(e);return t.x=A.x+r*A.radius,t.y=A.y+o*A.radius,t}},function(A,t,e){var i=e(24),s=e(0),n=e(9),r=e(120),o=e(275),a=e(276),h=e(6),l=new s({Extends:n,initialize:function(A,t,e){n.call(this),this.manager=A,this.key=t,this.type="frame",this.frames=this.getFrames(A.textureManager,h(e,"frames",[]),h(e,"defaultTextureKey",null)),this.frameRate=h(e,"frameRate",null),this.duration=h(e,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=h(e,"skipMissedFrames",!0),this.delay=h(e,"delay",0),this.repeat=h(e,"repeat",0),this.repeatDelay=h(e,"repeatDelay",0),this.yoyo=h(e,"yoyo",!1),this.showOnStart=h(e,"showOnStart",!1),this.hideOnComplete=h(e,"hideOnComplete",!1),this.paused=!1,this.manager.on(r.PAUSE_ALL,this.pause,this),this.manager.on(r.RESUME_ALL,this.resume,this)},addFrame:function(A){return this.addFrameAt(this.frames.length,A)},addFrameAt:function(A,t){var e=this.getFrames(this.manager.textureManager,t);if(e.length>0){if(0===A)this.frames=e.concat(this.frames);else if(A===this.frames.length)this.frames=this.frames.concat(e);else{var i=this.frames.slice(0,A),s=this.frames.slice(A);this.frames=i.concat(e,s)}this.updateFrameSequence()}return this},checkFrame:function(A){return A>=0&&A0){s.isLast=!0,s.nextFrame=o[0],o[0].prevFrame=s;var f=1/(o.length-1);for(n=0;n=this.frames.length&&(t=0),A.currentAnim!==this&&(A.currentAnim=this,A.frameRate=this.frameRate,A.duration=this.duration,A.msPerFrame=this.msPerFrame,A.skipMissedFrames=this.skipMissedFrames,A._delay=this.delay,A._repeat=this.repeat,A._repeatDelay=this.repeatDelay,A._yoyo=this.yoyo);var e=this.frames[t];0!==t||A.forward||(e=this.getLastFrame()),A.updateFrame(e)},getFrameByProgress:function(A){return A=i(A,0,1),o(A,this.frames,"progress")},nextFrame:function(A){var t=A.currentFrame;t.isLast?A._yoyo?this.handleYoyoFrame(A,!1):A.repeatCounter>0?A._reverse&&A.forward?A.forward=!1:this.repeatAnimation(A):this.completeAnimation(A):this.updateAndGetNextTick(A,t.nextFrame)},handleYoyoFrame:function(A,t){if(t||(t=!1),A._reverse===!t&&A.repeatCounter>0)return A.forward=t,void this.repeatAnimation(A);if(A._reverse===t||0!==A.repeatCounter){A.forward=t;var e=t?A.currentFrame.nextFrame:A.currentFrame.prevFrame;this.updateAndGetNextTick(A,e)}else this.completeAnimation(A)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(A){var t=A.currentFrame;t.isFirst?A._yoyo?this.handleYoyoFrame(A,!0):A.repeatCounter>0?A._reverse&&!A.forward?(A.currentFrame=this.getLastFrame(),this.repeatAnimation(A)):(A.forward=!0,this.repeatAnimation(A)):this.completeAnimation(A):this.updateAndGetNextTick(A,t.prevFrame)},updateAndGetNextTick:function(A,t){A.updateFrame(t),this.getNextTick(A)},removeFrame:function(A){var t=this.frames.indexOf(A);return-1!==t&&this.removeFrameAt(t),this},removeFrameAt:function(A){return this.frames.splice(A,1),this.updateFrameSequence(),this},repeatAnimation:function(A){if(2===A._pendingStop)return this.completeAnimation(A);if(A._repeatDelay>0&&!1===A.pendingRepeat)A.pendingRepeat=!0,A.accumulator-=A.nextTick,A.nextTick+=A._repeatDelay;else if(A.repeatCounter--,A.updateFrame(A.currentFrame[A.forward?"nextFrame":"prevFrame"]),A.isPlaying){this.getNextTick(A),A.pendingRepeat=!1;var t=A.currentFrame,e=A.parent;this.emit(r.ANIMATION_REPEAT,this,t),e.emit(r.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,t,A.repeatCounter,e),e.emit(r.SPRITE_ANIMATION_REPEAT,this,t,A.repeatCounter,e)}},setFrame:function(A){A.forward?this.nextFrame(A):this.previousFrame(A)},toJSON:function(){var A={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(t){A.frames.push(t.toJSON())})),A},updateFrameSequence:function(){for(var A,t=this.frames.length,e=1/(t-1),i=0;i1?(A.isLast=!0,A.prevFrame=this.frames[t-2],A.nextFrame=this.frames[0]):t>1&&(A.prevFrame=this.frames[i-1],A.nextFrame=this.frames[i+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(r.PAUSE_ALL,this.pause,this),this.manager.off(r.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var A=0;A=1)return e.x=A.x,e.y=A.y,e;var n=i(A)*t;return t>.5?(n-=A.width+A.height)<=A.width?(e.x=A.right-n,e.y=A.bottom):(e.x=A.x,e.y=A.bottom-(n-A.width)):n<=A.width?(e.x=A.x+n,e.y=A.y):(e.x=A.right,e.y=A.y+(n-A.width)),e}},function(A,t,e){var i=e(63),s=e(4);A.exports=function(A,t,e,n){void 0===n&&(n=[]),t||(t=i(A)/e);for(var r=A.x1,o=A.y1,a=A.x2,h=A.y2,l=0;l=1&&(o=1-o,a=1-a),t.x=A.x1+(e*o+n*a),t.y=A.y1+(s*o+r*a),t}},function(A,t){A.exports=function(A,t,e,i,s){var n=i+Math.atan2(A.y-e,A.x-t);return A.x=t+s*Math.cos(n),A.y=e+s*Math.sin(n),A}},function(A,t){A.exports=function(A,t,e){return(A=Math.max(0,Math.min(1,(A-t)/(e-t))))*A*A*(A*(6*A-15)+10)}},function(A,t){A.exports=function(A,t,e){return A<=t?0:A>=e?1:(A=(A-t)/(e-t))*A*(3-2*A)}},function(A,t,e){var i=new(e(0))({initialize:function(A){if(this.entries={},this.size=0,Array.isArray(A))for(var t=0;t=(A=A.toString()).length)switch(i){case 1:A=new Array(t+1-A.length).join(e)+A;break;case 3:var n=Math.ceil((s=t-A.length)/2);A=new Array(s-n+1).join(e)+A+new Array(n+1).join(e);break;default:A+=new Array(t+1-A.length).join(e)}return A}},function(A,t,e){var i=e(299),s=e(302),n=e(304),r=e(305);A.exports=function(A){switch(typeof A){case"string":return"rgb"===A.substr(0,3).toLowerCase()?r(A):i(A);case"number":return s(A);case"object":return n(A)}}},function(A,t){A.exports=function(A,t,e){return A<<16|t<<8|e}},function(A,t,e){var i=e(177);A.exports=function(A,t,e,s){void 0===t&&(t=1),void 0===e&&(e=1);var n=Math.floor(6*A),r=6*A-n,o=Math.floor(e*(1-t)*255),a=Math.floor(e*(1-r*t)*255),h=Math.floor(e*(1-(1-r)*t)*255),l=e=Math.floor(e*=255),c=e,u=e,d=n%6;return 0===d?(c=h,u=o):1===d?(l=a,u=o):2===d?(l=o,u=h):3===d?(l=o,c=a):4===d?(l=h,c=o):5===d&&(c=o,u=a),s?s.setTo?s.setTo(l,c,u,s.alpha,!1):(s.r=l,s.g=c,s.b=u,s.color=i(l,c,u),s):{r:l,g:c,b:u,color:i(l,c,u)}}},function(A,t){var e,i="";A.exports={disable:function(A){return""===i&&(i=e(A)),i&&(A[i]=!1),A},enable:function(A){return""===i&&(i=e(A)),i&&(A[i]=!0),A},getPrefix:e=function(A){for(var t=["i","webkitI","msI","mozI","oI"],e=0;e=this.vertexCapacity},resize:function(A,t,e){return this.width=A*e,this.height=t*e,this.resolution=e,this},bind:function(){var A=this.gl,t=this.vertexBuffer,e=this.attributes,i=this.program,s=this.renderer,n=this.vertexSize;s.setProgram(i),s.setVertexBuffer(t);for(var r=0;r=0?(A.enableVertexAttribArray(a),A.vertexAttribPointer(a,o.size,o.type,o.normalized,n,o.offset)):-1!==a&&A.disableVertexAttribArray(a)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var A=this.gl,t=this.vertexCount,e=this.topology,i=this.vertexSize;if(0!==t)return A.bufferSubData(A.ARRAY_BUFFER,0,this.bytes.subarray(0,t*i)),A.drawArrays(e,0,t),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var A=this.gl;return A.deleteProgram(this.program),A.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this},setFloat1:function(A,t){return this.renderer.setFloat1(this.program,A,t),this},setFloat2:function(A,t,e){return this.renderer.setFloat2(this.program,A,t,e),this},setFloat3:function(A,t,e,i){return this.renderer.setFloat3(this.program,A,t,e,i),this},setFloat4:function(A,t,e,i,s){return this.renderer.setFloat4(this.program,A,t,e,i,s),this},setFloat1v:function(A,t){return this.renderer.setFloat1v(this.program,A,t),this},setFloat2v:function(A,t){return this.renderer.setFloat2v(this.program,A,t),this},setFloat3v:function(A,t){return this.renderer.setFloat3v(this.program,A,t),this},setFloat4v:function(A,t){return this.renderer.setFloat4v(this.program,A,t),this},setInt1:function(A,t){return this.renderer.setInt1(this.program,A,t),this},setInt2:function(A,t,e){return this.renderer.setInt2(this.program,A,t,e),this},setInt3:function(A,t,e,i){return this.renderer.setInt3(this.program,A,t,e,i),this},setInt4:function(A,t,e,i,s){return this.renderer.setInt4(this.program,A,t,e,i,s),this},setMatrix2:function(A,t,e){return this.renderer.setMatrix2(this.program,A,t,e),this},setMatrix3:function(A,t,e){return this.renderer.setMatrix3(this.program,A,t,e),this},setMatrix4:function(A,t,e){return this.renderer.setMatrix4(this.program,A,t,e),this}});A.exports=n},function(A,t,e){var i=e(0),s=e(71),n=e(2),r=e(352),o=e(824),a=e(825),h=e(36),l=e(11),c=e(190),u=new i({Extends:c,Mixins:[r],initialize:function(A){var t=A.renderer.config;c.call(this,{game:A.game,renderer:A.renderer,gl:A.renderer.gl,topology:n(A,"topology",A.renderer.gl.TRIANGLES),vertShader:n(A,"vertShader",a),fragShader:n(A,"fragShader",o),vertexCapacity:n(A,"vertexCapacity",6*t.batchSize),vertexSize:n(A,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:A.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:A.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:A.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:A.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=t.batchSize,this.batches=[],this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this._tempMatrix4=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.tintEffect=2,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=[],this.mvpInit()},onBind:function(){return c.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(A,t,e){return c.prototype.resize.call(this,A,t,e),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},setTexture2D:function(A,t){return void 0===A&&(A=this.renderer.blankTexture.glTexture),void 0===t&&(t=0),this.requireTextureBatch(A,t)&&this.pushBatch(A,t),this},requireTextureBatch:function(A,t){var e=this.batches,i=e.length;return!(i>0)||!((t>0?e[i-1].textures[t-1]:e[i-1].texture)===A)},pushBatch:function(A,t){if(0===t)this.batches.push({first:this.vertexCount,texture:A,textures:[]});else{var e=[];e[t-1]=A,this.batches.push({first:this.vertexCount,texture:null,textures:e})}},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var A,t,e,i=this.gl,s=this.vertexCount,n=this.topology,r=this.vertexSize,o=this.renderer,a=this.batches,h=a.length,l=0,c=null;if(0===h||0===s)return this.flushLocked=!1,this;i.bufferSubData(i.ARRAY_BUFFER,0,this.bytes.subarray(0,s*r));for(var u=0;u0){for(t=0;t0){for(t=0;t0&&(o.setTexture2D(c.texture,0,!1),i.drawArrays(n,c.first,l)),this.vertexCount=0,a.length=0,this.flushLocked=!1,this},batchSprite:function(A,t,e){this.renderer.setPipeline(this);var i=this._tempMatrix1,s=this._tempMatrix2,n=this._tempMatrix3,r=A.frame,o=r.glTexture,a=r.u0,h=r.v0,c=r.u1,u=r.v1,d=r.x,g=r.y,p=r.cutWidth,f=r.cutHeight,v=r.customPivot,y=A.displayOriginX,m=A.displayOriginY,w=-y+d,B=-m+g;if(A.isCropped){var x=A._crop;x.flipX===A.flipX&&x.flipY===A.flipY||r.updateCropUVs(x,A.flipX,A.flipY),a=x.u0,h=x.v0,c=x.u1,u=x.v1,p=x.width,f=x.height,w=-y+(d=x.x),B=-m+(g=x.y)}var C=1,b=1;A.flipX&&(v||(w+=-r.realWidth+2*y),C=-1),(A.flipY||r.source.isGLTexture&&!o.flipY)&&(v||(B+=-r.realHeight+2*m),b=-1),s.applyITRS(A.x,A.y,A.rotation,A.scaleX*C,A.scaleY*b),i.copyFrom(t.matrix),e?(i.multiplyWithOffset(e,-t.scrollX*A.scrollFactorX,-t.scrollY*A.scrollFactorY),s.e=A.x,s.f=A.y,i.multiply(s,n)):(s.e-=t.scrollX*A.scrollFactorX,s.f-=t.scrollY*A.scrollFactorY,i.multiply(s,n));var T=w+p,Q=B+f,E=n.getX(w,B),F=n.getY(w,B),M=n.getX(w,Q),I=n.getY(w,Q),S=n.getX(T,Q),D=n.getY(T,Q),_=n.getX(T,B),O=n.getY(T,B),k=l.getTintAppendFloatAlpha(A._tintTL,t.alpha*A._alphaTL),G=l.getTintAppendFloatAlpha(A._tintTR,t.alpha*A._alphaTR),H=l.getTintAppendFloatAlpha(A._tintBL,t.alpha*A._alphaBL),P=l.getTintAppendFloatAlpha(A._tintBR,t.alpha*A._alphaBR);t.roundPixels&&(E=Math.round(E),F=Math.round(F),M=Math.round(M),I=Math.round(I),S=Math.round(S),D=Math.round(D),_=Math.round(_),O=Math.round(O)),this.setTexture2D(o,0);var R=A._isTinted&&A.tintFill;this.batchQuad(E,F,M,I,S,D,_,O,a,h,c,u,k,G,H,P,R,o,0)},batchQuad:function(A,t,e,i,s,n,r,o,a,h,l,c,u,d,g,p,f,v,y){var m=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),m=!0,this.setTexture2D(v,y));var w=this.vertexViewF32,B=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return w[++x]=A,w[++x]=t,w[++x]=a,w[++x]=h,w[++x]=f,B[++x]=u,w[++x]=e,w[++x]=i,w[++x]=a,w[++x]=c,w[++x]=f,B[++x]=g,w[++x]=s,w[++x]=n,w[++x]=l,w[++x]=c,w[++x]=f,B[++x]=p,w[++x]=A,w[++x]=t,w[++x]=a,w[++x]=h,w[++x]=f,B[++x]=u,w[++x]=s,w[++x]=n,w[++x]=l,w[++x]=c,w[++x]=f,B[++x]=p,w[++x]=r,w[++x]=o,w[++x]=l,w[++x]=h,w[++x]=f,B[++x]=d,this.vertexCount+=6,m},batchTri:function(A,t,e,i,s,n,r,o,a,h,l,c,u,d,g,p){var f=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),this.setTexture2D(g,p),f=!0);var v=this.vertexViewF32,y=this.vertexViewU32,m=this.vertexCount*this.vertexComponentCount-1;return v[++m]=A,v[++m]=t,v[++m]=r,v[++m]=o,v[++m]=d,y[++m]=l,v[++m]=e,v[++m]=i,v[++m]=r,v[++m]=h,v[++m]=d,y[++m]=c,v[++m]=s,v[++m]=n,v[++m]=a,v[++m]=h,v[++m]=d,y[++m]=u,this.vertexCount+=3,f},batchTexture:function(A,t,e,i,s,n,r,o,a,h,l,c,u,d,g,p,f,v,y,m,w,B,x,C,b,T,Q,E,F,M,I){this.renderer.setPipeline(this,A);var S=this._tempMatrix1,D=this._tempMatrix2,_=this._tempMatrix3,O=v/e+Q,k=y/i+E,G=(v+m)/e+Q,H=(y+w)/i+E,P=r,R=o,N=-p,L=-f;if(A.isCropped){var X=A._crop;P=X.width,R=X.height,r=X.width,o=X.height;var U=v=X.x,Y=y=X.y;c&&(U=m-X.x-X.width),u&&!t.isRenderTexture&&(Y=w-X.y-X.height),O=U/e+Q,k=Y/i+E,G=(U+X.width)/e+Q,H=(Y+X.height)/i+E,N=-p+v,L=-f+y}c&&(P*=-1,N+=r),(u^=!I&&t.isRenderTexture?1:0)&&(R*=-1,L+=o);var z=N+P,j=L+R;D.applyITRS(s,n,l,a,h),S.copyFrom(F.matrix),M?(S.multiplyWithOffset(M,-F.scrollX*d,-F.scrollY*g),D.e=s,D.f=n,S.multiply(D,_)):(D.e-=F.scrollX*d,D.f-=F.scrollY*g,S.multiply(D,_));var W=_.getX(N,L),Z=_.getY(N,L),V=_.getX(N,j),K=_.getY(N,j),J=_.getX(z,j),q=_.getY(z,j),$=_.getX(z,L),AA=_.getY(z,L);F.roundPixels&&(W=Math.round(W),Z=Math.round(Z),V=Math.round(V),K=Math.round(K),J=Math.round(J),q=Math.round(q),$=Math.round($),AA=Math.round(AA)),this.setTexture2D(t,0),this.batchQuad(W,Z,V,K,J,q,$,AA,O,k,G,H,B,x,C,b,T,t,0)},batchTextureFrame:function(A,t,e,i,s,n,r){this.renderer.setPipeline(this);var o=this._tempMatrix1.copyFrom(n),a=this._tempMatrix2,h=t+A.width,c=e+A.height;r?o.multiply(r,a):a=o;var u=a.getX(t,e),d=a.getY(t,e),g=a.getX(t,c),p=a.getY(t,c),f=a.getX(h,c),v=a.getY(h,c),y=a.getX(h,e),m=a.getY(h,e);this.setTexture2D(A.glTexture,0),i=l.getTintAppendFloatAlpha(i,s),this.batchQuad(u,d,g,p,f,v,y,m,A.u0,A.v0,A.u1,A.v1,i,i,i,i,0,A.glTexture,0)},drawFillRect:function(A,t,e,i,s,n){var r=A+e,o=t+i;this.setTexture2D();var a=l.getTintAppendFloatAlphaAndSwap(s,n);this.batchQuad(A,t,A,o,r,o,r,t,0,0,1,1,a,a,a,a,2)},batchFillRect:function(A,t,e,i,s,n){this.renderer.setPipeline(this);var r=this._tempMatrix3;n&&n.multiply(s,r);var o=A+e,a=t+i,h=r.getX(A,t),l=r.getY(A,t),c=r.getX(A,a),u=r.getY(A,a),d=r.getX(o,a),g=r.getY(o,a),p=r.getX(o,t),f=r.getY(o,t),v=this.currentFrame,y=v.u0,m=v.v0,w=v.u1,B=v.v1;this.batchQuad(h,l,c,u,d,g,p,f,y,m,w,B,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(A,t,e,i,s,n,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix3;o&&o.multiply(r,a);var h=a.getX(A,t),l=a.getY(A,t),c=a.getX(e,i),u=a.getY(e,i),d=a.getX(s,n),g=a.getY(s,n),p=this.currentFrame,f=p.u0,v=p.v0,y=p.u1,m=p.v1;this.batchTri(h,l,c,u,d,g,f,v,y,m,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(A,t,e,i,s,n,r,o,a){var h=this.tempTriangle;h[0].x=A,h[0].y=t,h[0].width=r,h[1].x=e,h[1].y=i,h[1].width=r,h[2].x=s,h[2].y=n,h[2].width=r,h[3].x=A,h[3].y=t,h[3].width=r,this.batchStrokePath(h,r,!1,o,a)},batchFillPath:function(A,t,e){this.renderer.setPipeline(this);var i=this._tempMatrix3;e&&e.multiply(t,i);for(var n,r,o=A.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,c=this.fillTint.BL,u=this.tintEffect,d=0;d0&&j[4]?this.batchQuad(_,O,M,I,j[0],j[1],j[2],j[3],X,U,Y,z,H,P,R,N,G):(W[0]=_,W[1]=O,W[2]=M,W[3]=I,W[4]=1),a&&W[4]?this.batchQuad(E,F,S,D,W[0],W[1],W[2],W[3],X,U,Y,z,H,P,R,N,G):(j[0]=E,j[1]=F,j[2]=S,j[3]=D,j[4]=1)}}});A.exports=u},function(A,t,e){var i=e(12);A.exports=function(A,t){if(void 0===t&&(t=new i),0===A.length)return t;for(var e,s,n,r=Number.MAX_VALUE,o=Number.MAX_VALUE,a=Number.MIN_SAFE_INTEGER,h=Number.MIN_SAFE_INTEGER,l=0;l0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(A){return this.settings.visible=A,this},setActive:function(A,t){return A?this.resume(t):this.pause(t)},start:function(A){A&&(this.settings.data=A),this.settings.status=s.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit(r.START,this),this.events.emit(r.READY,this,A)},shutdown:function(A){this.events.off(r.TRANSITION_INIT),this.events.off(r.TRANSITION_START),this.events.off(r.TRANSITION_COMPLETE),this.events.off(r.TRANSITION_OUT),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit(r.SHUTDOWN,this,A)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit(r.DESTROY,this),this.events.removeAllListeners();for(var A=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],t=0;t0?s.delayedPlay(u,n,r):s.load(n)}return A}},function(A,t){function e(A,t){return parseInt(A.getAttribute(t),10)}A.exports=function(A,t,i,s){void 0===t&&(t=0),void 0===i&&(i=0);var n={},r=A.getElementsByTagName("info")[0],o=A.getElementsByTagName("common")[0];n.font=r.getAttribute("face"),n.size=e(r,"size"),n.lineHeight=e(o,"lineHeight")+i,n.chars={};var a=A.getElementsByTagName("char"),h=void 0!==s&&s.trimmed;if(h)var l=s.height,c=s.width;for(var u=0;u0},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=[]}});A.exports=l},function(A,t,e){var i=e(199),s=e(43),n=e(0),r=e(13),o=e(103),a=e(14),h=e(12),l=e(1009),c=e(403),u=e(3),d=new n({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Depth,r.Mask,r.Transform,r.Visible,l],initialize:function(A,t,e,i){a.call(this,A,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new r.TransformMatrix,this.tempTransformMatrix=new r.TransformMatrix,this._displayList=A.sys.displayList,this._sortKey="",this._sysEvents=A.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(t,e),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),i&&this.add(i)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(A){return void 0===A&&(A=!0),this.exclusive=A,this},getBounds:function(A){if(void 0===A&&(A=new h),A.setTo(this.x,this.y,0,0),this.list.length>0)for(var t=this.list,e=new h,i=0;i-1},setAll:function(A,t,e,s){return i.SetAll(this.list,A,t,e,s),this},each:function(A,t){var e,i=[null],s=this.list.slice(),n=s.length;for(e=2;e0?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=[],this._displayList=null}});A.exports=d},function(A,t,e){var i=e(139),s=e(0),n=e(1014),r=new s({Extends:i,Mixins:[n],initialize:function(A,t,e,s,n,r,o){i.call(this,A,t,e,s,n,r,o),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(A,t){return this.cropWidth=A,this.cropHeight=t,this},setDisplayCallback:function(A){return this.displayCallback=A,this},setScrollX:function(A){return this.scrollX=A,this},setScrollY:function(A){return this.scrollY=A,this}});A.exports=r},function(A,t,e){var i=e(104),s=e(0),n=e(209),r=e(273),o=e(277),a=e(278),h=e(282),l=e(122),c=e(287),u=e(288),d=e(285),g=e(36),p=e(108),f=e(14),v=e(2),y=e(6),m=e(25),w=e(1020),B=new s({Extends:f,Mixins:[r,o,a,h,l,c,u,d,w],initialize:function(A,t){var e=y(t,"x",0),i=y(t,"y",0);f.call(this,A,"Graphics"),this.setPosition(e,i),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._tempMatrix1=new g,this._tempMatrix2=new g,this._tempMatrix3=new g,this.setDefaultStyles(t)},setDefaultStyles:function(A){return y(A,"lineStyle",null)&&(this.defaultStrokeWidth=y(A,"lineStyle.width",1),this.defaultStrokeColor=y(A,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(A,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(A,"fillStyle",null)&&(this.defaultFillColor=y(A,"fillStyle.color",16777215),this.defaultFillAlpha=y(A,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(A,t,e){return void 0===e&&(e=1),this.commandBuffer.push(n.LINE_STYLE,A,t,e),this._lineWidth=A,this},fillStyle:function(A,t){return void 0===t&&(t=1),this.commandBuffer.push(n.FILL_STYLE,A,t),this},fillGradientStyle:function(A,t,e,i,s){return void 0===s&&(s=1),this.commandBuffer.push(n.GRADIENT_FILL_STYLE,s,A,t,e,i),this},lineGradientStyle:function(A,t,e,i,s,r){return void 0===r&&(r=1),this.commandBuffer.push(n.GRADIENT_LINE_STYLE,A,r,t,e,i,s),this},setTexture:function(A,t,e){if(void 0===e&&(e=0),void 0===A)this.commandBuffer.push(n.CLEAR_TEXTURE);else{var i=this.scene.sys.textures.getFrame(A,t);i&&(2===e&&(e=3),this.commandBuffer.push(n.SET_TEXTURE,i,e))}return this},beginPath:function(){return this.commandBuffer.push(n.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(n.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(n.FILL_PATH),this},fill:function(){return this.commandBuffer.push(n.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(n.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(n.STROKE_PATH),this},fillCircleShape:function(A){return this.fillCircle(A.x,A.y,A.radius)},strokeCircleShape:function(A){return this.strokeCircle(A.x,A.y,A.radius)},fillCircle:function(A,t,e){return this.beginPath(),this.arc(A,t,e,0,m.PI2),this.fillPath(),this},strokeCircle:function(A,t,e){return this.beginPath(),this.arc(A,t,e,0,m.PI2),this.strokePath(),this},fillRectShape:function(A){return this.fillRect(A.x,A.y,A.width,A.height)},strokeRectShape:function(A){return this.strokeRect(A.x,A.y,A.width,A.height)},fillRect:function(A,t,e,i){return this.commandBuffer.push(n.FILL_RECT,A,t,e,i),this},strokeRect:function(A,t,e,i){var s=this._lineWidth/2,n=A-s,r=A+s;return this.beginPath(),this.moveTo(A,t),this.lineTo(A,t+i),this.strokePath(),this.beginPath(),this.moveTo(A+e,t),this.lineTo(A+e,t+i),this.strokePath(),this.beginPath(),this.moveTo(n,t),this.lineTo(r+e,t),this.strokePath(),this.beginPath(),this.moveTo(n,t+i),this.lineTo(r+e,t+i),this.strokePath(),this},fillRoundedRect:function(A,t,e,i,s){void 0===s&&(s=20);var n=s,r=s,o=s,a=s;return"number"!=typeof s&&(n=v(s,"tl",20),r=v(s,"tr",20),o=v(s,"bl",20),a=v(s,"br",20)),this.beginPath(),this.moveTo(A+n,t),this.lineTo(A+e-r,t),this.arc(A+e-r,t+r,r,-m.TAU,0),this.lineTo(A+e,t+i-a),this.arc(A+e-a,t+i-a,a,0,m.TAU),this.lineTo(A+o,t+i),this.arc(A+o,t+i-o,o,m.TAU,Math.PI),this.lineTo(A,t+n),this.arc(A+n,t+n,n,-Math.PI,-m.TAU),this.fillPath(),this},strokeRoundedRect:function(A,t,e,i,s){void 0===s&&(s=20);var n=s,r=s,o=s,a=s;return"number"!=typeof s&&(n=v(s,"tl",20),r=v(s,"tr",20),o=v(s,"bl",20),a=v(s,"br",20)),this.beginPath(),this.moveTo(A+n,t),this.lineTo(A+e-r,t),this.arc(A+e-r,t+r,r,-m.TAU,0),this.lineTo(A+e,t+i-a),this.arc(A+e-a,t+i-a,a,0,m.TAU),this.lineTo(A+o,t+i),this.arc(A+o,t+i-o,o,m.TAU,Math.PI),this.lineTo(A,t+n),this.arc(A+n,t+n,n,-Math.PI,-m.TAU),this.strokePath(),this},fillPointShape:function(A,t){return this.fillPoint(A.x,A.y,t)},fillPoint:function(A,t,e){return!e||e<1?e=1:(A-=e/2,t-=e/2),this.commandBuffer.push(n.FILL_RECT,A,t,e,e),this},fillTriangleShape:function(A){return this.fillTriangle(A.x1,A.y1,A.x2,A.y2,A.x3,A.y3)},strokeTriangleShape:function(A){return this.strokeTriangle(A.x1,A.y1,A.x2,A.y2,A.x3,A.y3)},fillTriangle:function(A,t,e,i,s,r){return this.commandBuffer.push(n.FILL_TRIANGLE,A,t,e,i,s,r),this},strokeTriangle:function(A,t,e,i,s,r){return this.commandBuffer.push(n.STROKE_TRIANGLE,A,t,e,i,s,r),this},strokeLineShape:function(A){return this.lineBetween(A.x1,A.y1,A.x2,A.y2)},lineBetween:function(A,t,e,i){return this.beginPath(),this.moveTo(A,t),this.lineTo(e,i),this.strokePath(),this},lineTo:function(A,t){return this.commandBuffer.push(n.LINE_TO,A,t),this},moveTo:function(A,t){return this.commandBuffer.push(n.MOVE_TO,A,t),this},strokePoints:function(A,t,e,i){void 0===t&&(t=!1),void 0===e&&(e=!1),void 0===i&&(i=A.length),this.beginPath(),this.moveTo(A[0].x,A[0].y);for(var s=1;s-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(A,t,e){var i,s,n=this.scene.sys,r=n.game.renderer;if(void 0===t&&(t=n.scale.width),void 0===e&&(e=n.scale.height),B.TargetCamera.setScene(this.scene),B.TargetCamera.setViewport(0,0,t,e),B.TargetCamera.scrollX=this.x,B.TargetCamera.scrollY=this.y,"string"==typeof A)if(n.textures.exists(A)){var o=(i=n.textures.get(A)).getSourceImage();o instanceof HTMLCanvasElement&&(s=o.getContext("2d"))}else s=(i=n.textures.createCanvas(A,t,e)).getSourceImage().getContext("2d");else A instanceof HTMLCanvasElement&&(s=A.getContext("2d"));return s&&(this.renderCanvas(r,this,0,B.TargetCamera,null,s,!1),i&&i.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});B.TargetCamera=new i,A.exports=B},function(A,t){A.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,SET_TEXTURE:19,CLEAR_TEXTURE:20,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(A,t,e){var i=e(4);A.exports=function(A,t,e){void 0===e&&(e=new i);var s=A.width/2,n=A.height/2;return e.x=A.x+s*Math.cos(t),e.y=A.y+n*Math.sin(t),e}},function(A,t,e){var i=e(0),s=e(13),n=e(14),r=e(411),o=e(136),a=e(413),h=e(1030),l=new i({Extends:n,Mixins:[s.Depth,s.Mask,s.Pipeline,s.Transform,s.Visible,h],initialize:function(A,t,e,i){if(n.call(this,A,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===e||"object"!=typeof e&&!Array.isArray(e)||(i=e,e=null),this.setTexture(t,e),this.initPipeline(),this.emitters=new o(this),this.wells=new o(this),i){Array.isArray(i)||(i=[i]);for(var s=0;s0?t.defaultFrame=e[0]:t.defaultFrame=this.defaultFrame,this},addEmitter:function(A){return this.emitters.add(A)},createEmitter:function(A){return this.addEmitter(new a(this,A))},addGravityWell:function(A){return this.wells.add(A)},createGravityWell:function(A){return this.addGravityWell(new r(A))},emitParticle:function(A,t,e){for(var i=this.emitters.list,s=0;ss.width&&(A=s.width-this.frame.cutX),this.frame.cutY+t>s.height&&(t=s.height-this.frame.cutY),this.frame.setSize(A,t,this.frame.cutX,this.frame.cutY)}this.updateDisplayOrigin();var n=this.input;return n&&!n.customHitArea&&(n.hitArea.width=A,n.hitArea.height=t),this},setGlobalTint:function(A){return this.globalTint=A,this},setGlobalAlpha:function(A){return this.globalAlpha=A,this},saveTexture:function(A){return this.textureManager.renameTexture(this.texture.key,A),this._saved=!0,this.texture},fill:function(A,t,e,i,s,n){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=this.frame.cutWidth),void 0===n&&(n=this.frame.cutHeight);var r=255&(A>>16|0),o=255&(A>>8|0),a=255&(0|A),h=this.gl,l=this.frame;if(this.camera.preRender(1,1),h){var c=this.camera._cx,d=this.camera._cy,g=this.camera._cw,p=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(c,d,g,p,p);var f=this.pipeline;f.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),f.drawFillRect(e,i,s,n,u.getTintFromFloats(r/255,o/255,a/255,1),t),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),f.projOrtho(0,f.width,f.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.context.fillStyle="rgba("+r+","+o+","+a+","+t+")",this.context.fillRect(e+l.cutX,i+l.cutY,s,n),this.renderer.setContext();return this.dirty=!0,this},clear:function(){if(this.dirty){var A=this.gl;if(A){var t=this.renderer;t.setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||A.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),A.clearColor(0,0,0,0),A.clear(A.COLOR_BUFFER_BIT),t.setFramebuffer(null,!0)}else{var e=this.context;e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),e.restore()}this.dirty=!1}return this},erase:function(A,t,e){this._eraseMode=!0;var s=this.renderer.currentBlendMode;return this.renderer.setBlendMode(i.ERASE),this.draw(A,t,e,1,16777215),this.renderer.setBlendMode(s),this._eraseMode=!1,this},draw:function(A,t,e,i,s){void 0===i&&(i=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(A)||(A=[A]);var n=this.gl;if(this.camera.preRender(1,1),n){var r=this.camera._cx,o=this.camera._cy,a=this.camera._cw,h=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(r,o,a,h,h);var l=this.pipeline;l.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(A,t,e,i,s),l.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),l.projOrtho(0,l.width,l.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.batchList(A,t,e,i,s),this.renderer.setContext();return this.dirty=!0,this},drawFrame:function(A,t,e,i,s,n){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=this.globalAlpha),n=void 0===n?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(n>>16)+(65280&n)+((255&n)<<16);var r=this.gl,o=this.textureManager.getFrame(A,t);if(o){if(this.camera.preRender(1,1),r){var a=this.camera._cx,h=this.camera._cy,l=this.camera._cw,c=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(a,h,l,c,c);var u=this.pipeline;u.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),u.batchTextureFrame(o,e+this.frame.cutX,i+this.frame.cutY,n,s,this.camera.matrix,null),u.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)}else this.batchTextureFrame(o,e+this.frame.cutX,i+this.frame.cutY,s,n);this.dirty=!0}return this},batchList:function(A,t,e,i,s){for(var n=0;nh){if(0===c){for(var p=d;p.length&&(p=p.slice(0,-1),!((g=t.measureText(p).width)<=h)););if(!p.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var f=u.substr(p.length);l[c]=f,a+=p}var v=l[c].length?c:c+1,y=l.slice(v).join(" ").replace(/[ \n]*$/gi,"");s[r+1]=y+" "+(s[r+1]||""),n=s.length;break}a+=d,h-=g}i+=a.replace(/[ \n]*$/gi,"")+"\n"}}return i=i.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(A,t,e){for(var i="",s=A.split(this.splitRegExp),n=0;nr?(a>0&&(i+="\n"),i+=o[a]+" ",r=e-h):(r-=h,i+=o[a],a0&&(u+=a.lineSpacing*p),e.rtl)c=d-c;else if("right"===e.align)c+=r-a.lineWidths[p];else if("center"===e.align)c+=(r-a.lineWidths[p])/2;else if("justify"===e.align){if(a.lineWidths[p]/a.width>=.85){var f=a.width-a.lineWidths[p],v=t.measureText(" ").width,y=o[p].trim(),m=y.split(" ");f+=(o[p].length-y.length)*v;for(var w=Math.floor(f/v),B=0;w>0;)m[B]+=" ",B=(B+1)%(m.length-1||1),--w;o[p]=m.join(" ")}}this.autoRound&&(c=Math.round(c),u=Math.round(u)),e.strokeThickness&&(this.style.syncShadow(t,e.shadowStroke),t.strokeText(o[p],c,u)),e.color&&(this.style.syncShadow(t,e.shadowFill),t.fillText(o[p],c,u))}t.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(A,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var x=this.input;return x&&!x.customHitArea&&(x.hitArea.width=this.width,x.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(A){this.setText(A)}},toJSON:function(){var A=r.ToJSON(this),t={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 A.data=t,A},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});A.exports=g},function(A,t,e){var i=e(28),s=e(0),n=e(13),r=e(20),o=e(14),a=e(332),h=e(179),l=e(1046),c=e(3),u=new s({Extends:o,Mixins:[n.Alpha,n.BlendMode,n.ComputedSize,n.Crop,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Tint,n.Transform,n.Visible,l],initialize:function(A,t,e,s,n,h,l){var u=A.sys.game.renderer;o.call(this,A,"TileSprite");var d=A.sys.textures.get(h),g=d.get(l);s&&n?(s=Math.floor(s),n=Math.floor(n)):(s=g.width,n=g.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=u,this.canvas=i.create(this,s,n),this.context=this.canvas.getContext("2d"),this.displayTexture=d,this.displayFrame=g,this._crop=this.resetCropObject(),this.texture=A.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=a(g.width),this.potHeight=a(g.height),this.fillCanvas=i.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(t,e),this.setSize(s,n),this.setFrame(l),this.setOriginFromFrame(),this.initPipeline(),A.sys.game.events.on(r.CONTEXT_RESTORED,(function(A){var t=A.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=A.createTexture2D(0,t.LINEAR,t.LINEAR,t.REPEAT,t.REPEAT,t.RGBA,this.fillCanvas,this.potWidth,this.potHeight)}),this)},setTexture:function(A,t){return this.displayTexture=this.scene.sys.textures.get(A),this.setFrame(t)},setFrame:function(A){return this.displayFrame=this.displayTexture.get(A),this.displayFrame.cutWidth&&this.displayFrame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(A,t){return void 0!==A&&(this.tilePositionX=A),void 0!==t&&(this.tilePositionY=t),this},setTileScale:function(A,t){return void 0===A&&(A=this.tileScaleX),void 0===t&&(t=A),this.tileScaleX=A,this.tileScaleY=t,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var A=this.displayFrame;if(A.source.isRenderTexture||A.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var t=this.fillContext,e=this.fillCanvas,i=this.potWidth,s=this.potHeight;this.renderer.gl||(i=A.cutWidth,s=A.cutHeight),t.clearRect(0,0,i,s),e.width=i,e.height=s,t.drawImage(A.source.image,A.cutX,A.cutY,A.cutWidth,A.cutHeight,0,0,i,s),this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(e,this.fillPattern):this.fillPattern=t.createPattern(e,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var A=this.canvas;if(A.width===this.width&&A.height===this.height||(A.width=this.width,A.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var t=this.context;this.scene.sys.game.config.antialias||h.disable(t);var e=this._tileScale.x,i=this._tileScale.y,s=this._tilePosition.x,n=this._tilePosition.y;t.clearRect(0,0,this.width,this.height),t.save(),t.scale(e,i),t.translate(-s,-n),t.fillStyle=this.fillPattern,t.fillRect(s,n,this.width/e,this.height/i),t.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),i.remove(this.canvas),i.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(A){this._tilePosition.x=A,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(A){this._tilePosition.y=A,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(A){this._tileScale.x=A,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(A){this._tileScale.y=A,this.dirty=!0}}});A.exports=u},function(A,t,e){var i=e(0),s=e(24),n=e(13),r=e(103),o=e(20),a=e(14),h=e(66),l=e(213),c=e(1049),u=new i({Extends:a,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,c],initialize:function(A,t,e,i){a.call(this,A,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=l(),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=Number.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.setPosition(t,e),this.initPipeline(),i&&this.changeSource(i,!1);var s=A.sys.game.events;s.on(o.PAUSE,this.globalPause,this),s.on(o.RESUME,this.globalResume,this);var n=A.sys.sound;n&&n.on(h.GLOBAL_MUTE,this.globalMute,this)},play:function(A,t,e){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var i=this.video;if(!i)return console.warn("Video not loaded"),this;void 0===A&&(A=i.loop);var s=this.scene.sys.sound;s&&s.mute&&this.setMute(!0),isNaN(t)||(this._markerIn=t),!isNaN(e)&&e>t&&(this._markerOut=e),i.loop=A;var n=this._callbacks,r=i.play();return void 0!==r?r.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(i.addEventListener("playing",n.play,!0),i.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),i.addEventListener("ended",n.end,!0),i.addEventListener("timeupdate",n.time,!0),i.addEventListener("seeking",n.seeking,!0),i.addEventListener("seeked",n.seeked,!0),this},changeSource:function(A,t,e,i,s){void 0===t&&(t=!0),this.video&&this.stop();var n=this.scene.sys.cache.video.get(A);return n?(this.video=n,this._cacheKey=A,this._codePaused=n.paused,this._codeMuted=n.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,n,n.videoWidth,n.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,n.videoWidth,n.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(r.VIDEO_CREATED,this,n.videoWidth,n.videoHeight)):this.updateTexture(),n.currentTime=0,this._lastUpdate=0,t&&this.play(e,i,s)):this.video=null,this},addMarker:function(A,t,e){return!isNaN(t)&&t>=0&&!isNaN(e)&&(this.markers[A]=[t,e]),this},playMarker:function(A,t){var e=this.markers[A];return e&&this.play(t,e[0],e[1]),this},removeMarker:function(A){return delete this.markers[A],this},snapshot:function(A,t){return void 0===A&&(A=this.width),void 0===t&&(t=this.height),this.snapshotArea(0,0,this.width,this.height,A,t)},snapshotArea:function(A,t,e,i,s,n){void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=this.width),void 0===i&&(i=this.height),void 0===s&&(s=e),void 0===n&&(n=i);var r=this.video,o=this.snapshotTexture;return o?(o.setSize(s,n),r&&o.context.drawImage(r,A,t,e,i,0,0,s,n)):(o=this.scene.sys.textures.createCanvas(l(),s,n),this.snapshotTexture=o,r&&o.context.drawImage(r,A,t,e,i,0,0,s,n)),o.update()},saveSnapshotTexture:function(A){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,A):this.snapshotTexture=this.scene.sys.textures.createCanvas(A,this.width,this.height),this.snapshotTexture},loadURL:function(A,t,e){void 0===t&&(t="loadeddata"),void 0===e&&(e=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var i=document.createElement("video");return i.controls=!1,e&&(i.muted=!0,i.defaultMuted=!0,i.setAttribute("autoplay","autoplay")),i.setAttribute("playsinline","playsinline"),i.setAttribute("preload","auto"),i.addEventListener("error",this._callbacks.error,!0),i.src=A,i.load(),this.video=i,this},playPromiseSuccessHandler:function(){this.touchLocked=!1,this.emit(r.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(A){this.scene.sys.input.once("pointerdown",this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(r.VIDEO_ERROR,this,A)},playHandler:function(){this.touchLocked=!1,this.emit(r.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(A){this.stop(),this.emit(r.VIDEO_ERROR,this,A)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(r.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(r.VIDEO_PLAY,this)},completeHandler:function(){this.emit(r.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(A.loop?(A.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(r.VIDEO_LOOP,this)):(this.emit(r.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(r.VIDEO_TIMEOUT,this))},updateTexture:function(){var A=this.video,t=A.videoWidth,e=A.videoHeight;if(this.videoTexture){var i=this.videoTextureSource;i.source!==A&&(i.source=A,i.width=t,i.height=e),i.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,A,t,e),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,t,e),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(r.VIDEO_CREATED,this,t,e)},getVideoKey:function(){return this._cacheKey},seekTo:function(A){var t=this.video;if(t){var e=t.duration;if(e!==1/0&&!isNaN(e)){var i=e*A;this.setCurrentTime(i)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(A){var t=this.video;if(t){if("string"==typeof A){var e=A[0],i=parseFloat(A.substr(1));"+"===e?A=t.currentTime+i:"-"===e&&(A=t.currentTime-i)}t.currentTime=A,this._lastUpdate=A}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(r.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(r.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var A=this.video;if(A){var t=A.currentTime,e=A.duration;if(e!==1/0&&!isNaN(e))return t/e}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(A){void 0===A&&(A=!0),this._codeMuted=A;var t=this.video;return t&&(t.muted=!!this._systemMuted||A),this},isMuted:function(){return this._codeMuted},globalMute:function(A,t){this._systemMuted=t;var e=this.video;e&&(e.muted=!!this._codeMuted||t)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(A){void 0===A&&(A=!0);var t=this.video;return this._codePaused=A,t&&(A?t.paused||t.pause():A||t.paused&&!this._systemPaused&&t.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(A){return void 0===A&&(A=1),this.video&&(this.video.volume=s(A,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(A){return this.video&&(this.video.playbackRate=A),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(A){return void 0===A&&(A=!0),this.video&&(this.video.loop=A),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(A,t){return void 0===t&&(t=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,A),this._key=A,this.flipY=t,this.videoTextureSource&&this.videoTextureSource.setFlipY(t),this.videoTexture},stop:function(){var A=this.video;if(A){var t=this._callbacks;for(var e in t)A.removeEventListener(e,t[e],!0);A.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(r.VIDEO_STOP,this),this},removeVideoElement:function(){var A=this.video;if(A){for(A.parentNode&&A.parentNode.removeChild(A);A.hasChildNodes();)A.removeChild(A.firstChild);A.removeAttribute("autoplay"),A.removeAttribute("src"),this.video=null}},destroy:function(A){void 0===A&&(A=!1),this.stop(),A&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(o.PAUSE,this.globalPause,this),t.off(o.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(h.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});A.exports=u},function(A,t,e){var i=e(0),s=e(218),n=e(428),r=e(52),o=new i({initialize:function(A){this.type=r.POLYGON,this.area=0,this.points=[],A&&this.setTo(A)},contains:function(A,t){return s(this,A,t)},setTo:function(A){if(this.area=0,this.points=[],"string"==typeof A&&(A=A.split(" ")),!Array.isArray(A))return this;for(var t,e=Number.MAX_VALUE,i=0;i=0&&B<=1&&e.push(new i(n,r))}else if(w>0){var x=(-m-Math.sqrt(w))/(2*y);n=o+x*g,r=a+x*p,x>=0&&x<=1&&e.push(new i(n,r));var C=(-m+Math.sqrt(w))/(2*y);n=o+C*g,r=a+C*p,C>=0&&C<=1&&e.push(new i(n,r))}}return e}},function(A,t,e){var i=e(61),s=new(e(4));A.exports=function(A,t,e){if(void 0===e&&(e=s),i(t,A.x1,A.y1))return e.x=A.x1,e.y=A.y1,!0;if(i(t,A.x2,A.y2))return e.x=A.x2,e.y=A.y2,!0;var n=A.x2-A.x1,r=A.y2-A.y1,o=t.x-A.x1,a=t.y-A.y1,h=n*n+r*r,l=n,c=r;if(h>0){var u=(o*n+a*r)/h;l*=u,c*=u}return e.x=A.x1+l,e.y=A.y1+c,l*l+c*c<=h&&l*n+c*r>=0&&i(t,e.x,e.y)}},function(A,t,e){var i=e(4),s=e(95),n=e(443);A.exports=function(A,t,e){if(void 0===e&&(e=[]),n(A,t))for(var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD(),l=[new i,new i,new i,new i],c=[s(r,A,l[0]),s(o,A,l[1]),s(a,A,l[2]),s(h,A,l[3])],u=0;u<4;u++)c[u]&&e.push(l[u]);return e}},function(A,t){A.exports=function(A,t,e,i){void 0===e&&(e=!1),void 0===i&&(i=[]);for(var s,n,r,o,a,h,l=A.x3-A.x1,c=A.y3-A.y1,u=A.x2-A.x1,d=A.y2-A.y1,g=l*l+c*c,p=l*u+c*d,f=u*u+d*d,v=g*f-p*p,y=0===v?0:1/v,m=A.x1,w=A.y1,B=0;B=0&&n>=0&&s+n<1&&(i.push({x:t[B].x,y:t[B].y}),e)));B++);return i}},function(A,t){A.exports=function(A,t,e,i){var s=Math.cos(i),n=Math.sin(i),r=A.x1-t,o=A.y1-e;return A.x1=r*s-o*n+t,A.y1=r*n+o*s+e,r=A.x2-t,o=A.y2-e,A.x2=r*s-o*n+t,A.y2=r*n+o*s+e,A}},function(A,t){A.exports=function(A){return 0===A.height?NaN:A.width/A.height}},function(A,t){A.exports=function(A,t,e,i){var s=Math.cos(i),n=Math.sin(i),r=A.x1-t,o=A.y1-e;return A.x1=r*s-o*n+t,A.y1=r*n+o*s+e,r=A.x2-t,o=A.y2-e,A.x2=r*s-o*n+t,A.y2=r*n+o*s+e,r=A.x3-t,o=A.y3-e,A.x3=r*s-o*n+t,A.y3=r*n+o*s+e,A}},function(A,t,e){A.exports={BUTTON_DOWN:e(1251),BUTTON_UP:e(1252),CONNECTED:e(1253),DISCONNECTED:e(1254),GAMEPAD_BUTTON_DOWN:e(1255),GAMEPAD_BUTTON_UP:e(1256)}},function(A,t,e){var i=e(17),s=e(145);A.exports=function(A,t){var e=void 0===A?s():i({},A);if(t)for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}},function(A,t,e){var i=e(0),s=e(22),n=e(23),r=e(8),o=e(2),a=e(7),h=e(375),l=new i({Extends:n,initialize:function(A,t,e,i){var s="xml";if(a(t)){var r=t;t=o(r,"key"),e=o(r,"url"),i=o(r,"xhrSettings"),s=o(r,"extension",s)}var h={type:"xml",cache:A.cacheManager.xml,extension:s,responseType:"text",key:t,url:e,xhrSettings:i};n.call(this,A,h)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=h(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});r.register("xml",(function(A,t,e){if(Array.isArray(A))for(var i=0;i0?this.setFromTileCollision(e):this.setFromTileRectangle(e)}},setFromTileRectangle:function(A){void 0===A&&(A={}),a(A,"isStatic")||(A.isStatic=!0),a(A,"addToWorld")||(A.addToWorld=!0);var t=this.tile.getBounds(),e=t.x+t.width/2,s=t.y+t.height/2,n=i.rectangle(e,s,t.width,t.height,A);return this.setBody(n,A.addToWorld),this},setFromTileCollision:function(A){void 0===A&&(A={}),a(A,"isStatic")||(A.isStatic=!0),a(A,"addToWorld")||(A.addToWorld=!0);for(var t=this.tile.tilemapLayer.scaleX,e=this.tile.tilemapLayer.scaleY,n=this.tile.getLeft(),r=this.tile.getTop(),l=this.tile.getCollisionGroup(),c=o(l,"objects",[]),u=[],d=0;d1&&(A.parts=u,this.setBody(s.create(A),A.addToWorld)),this},setBody:function(A,t){return void 0===t&&(t=!0),this.body&&this.removeBody(),this.body=A,this.body.gameObject=this,t&&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}});A.exports=l},function(A,t,e){var i={};A.exports=i;var s=e(239),n=e(148),r=e(39);i.collisions=function(A,t){for(var e=[],o=t.pairs.table,a=t.metrics,h=0;h1?1:0;u1?1:0;g0:0!=(A.mask&t.category)&&0!=(t.mask&A.category)}},function(A,t,e){var i={};A.exports=i;var s=e(32),n=e(38);i.collides=function(A,t,e){var r,o,a,h,l=!1;if(e){var c=A.parent,u=t.parent,d=c.speed*c.speed+c.angularSpeed*c.angularSpeed+u.speed*u.speed+u.angularSpeed*u.angularSpeed;l=e&&e.collided&&d<.2,h=e}else h={collided:!1,bodyA:A,bodyB:t};if(e&&l){var g=h.axisBody,p=g===A?t:A,f=[g.axes[e.axisNumber]];if(a=i._overlapAxes(g.vertices,p.vertices,f),h.reused=!0,a.overlap<=0)return h.collided=!1,h}else{if((r=i._overlapAxes(A.vertices,t.vertices,A.axes)).overlap<=0)return h.collided=!1,h;if((o=i._overlapAxes(t.vertices,A.vertices,t.axes)).overlap<=0)return h.collided=!1,h;r.overlaps?s=o:o=0?r.index-1:l.length-1],h.x=s.x-c.x,h.y=s.y-c.y,a=-n.dot(e,h),o=s,s=l[(r.index+1)%l.length],h.x=s.x-c.x,h.y=s.y-c.y,(i=-n.dot(e,h))n?(s.warn("Plugin.register:",i.toString(t),"was upgraded to",i.toString(A)),i._registry[A.name]=A):e-1},i.isFor=function(A,t){var e=A.for&&i.dependencyParse(A.for);return!A.for||t.name===e.name&&i.versionSatisfies(t.version,e.range)},i.use=function(A,t){if(A.uses=(A.uses||[]).concat(t||[]),0!==A.uses.length){for(var e=i.dependencies(A),n=s.topologicalSort(e),r=[],o=0;o0&&!a.silent&&s.info(r.join(" "))}else s.warn("Plugin.use:",i.toString(A),"does not specify any dependencies to install.")},i.dependencies=function(A,t){var e=i.dependencyParse(A),n=e.name;if(!(n in(t=t||{}))){A=i.resolve(A)||A,t[n]=s.map(A.uses||[],(function(t){i.isPlugin(t)&&i.register(t);var n=i.dependencyParse(t),r=i.resolve(t);return r&&!i.versionSatisfies(r.version,n.range)?(s.warn("Plugin.dependencies:",i.toString(r),"does not satisfy",i.toString(n),"used by",i.toString(e)+"."),r._warned=!0,A._warned=!0):r||(s.warn("Plugin.dependencies:",i.toString(t),"used by",i.toString(e),"could not be resolved."),A._warned=!0),n.name}));for(var r=0;r=s[2];if("^"===e.operator)return s[0]>0?r[0]===s[0]&&n.number>=e.number:s[1]>0?r[1]===s[1]&&r[2]>=s[2]:r[2]===s[2]}return A===t||"*"===A}},function(A,t,e){var i={};A.exports=i;var s=e(77),n=(e(98),e(19));i.create=function(A){var t=s.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 n.extend(t,e,A)}},function(A,t,e){var i=e(150);A.exports=function(A,t,e){var s=i(A,t,!0,e),n=i(A,t-1,!0,e),r=i(A,t+1,!0,e),o=i(A-1,t,!0,e),a=i(A+1,t,!0,e),h=s&&s.collides;return h&&(s.faceTop=!0,s.faceBottom=!0,s.faceLeft=!0,s.faceRight=!0),n&&n.collides&&(h&&(s.faceTop=!1),n.faceBottom=!h),r&&r.collides&&(h&&(s.faceBottom=!1),r.faceTop=!h),o&&o.collides&&(h&&(s.faceLeft=!1),o.faceRight=!h),a&&a.collides&&(h&&(s.faceRight=!1),a.faceLeft=!h),s&&!s.collides&&s.resetFaces(),s}},function(A,t,e){var i=e(79),s=e(115),n=e(243),r=e(78);A.exports=function(A,t,e,o,a){if(!s(t,e,a))return null;void 0===o&&(o=!0);var h=a.data[e][t],l=h&&h.collides;if(A instanceof i)null===a.data[e][t]&&(a.data[e][t]=new i(a,A.index,t,e,A.width,A.height)),a.data[e][t].copy(A);else{var c=A;null===a.data[e][t]?a.data[e][t]=new i(a,c,t,e,a.tileWidth,a.tileHeight):a.data[e][t].index=c}var u=a.data[e][t],d=-1!==a.collideIndexes.indexOf(u.index);return r(u,d),o&&l!==u.collides&&n(t,e,a),u}},function(A,t){A.exports=function(A,t,e){var i=e.collideIndexes.indexOf(A);t&&-1===i?e.collideIndexes.push(A):t||-1===i||e.collideIndexes.splice(i,1)}},function(A,t,e){var i=e(35),s=e(116),n=e(117),r=e(79);A.exports=function(A,t,e,o,a){for(var h=new s({tileWidth:e,tileHeight:o}),l=new n({name:A,tileWidth:e,tileHeight:o,format:i.ARRAY_2D,layers:[h]}),c=[],u=t.length,d=0,g=0;g0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>A&&(A=s.totalDuration),s.delay0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=t},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=a.PENDING_ADD,this._pausedState=a.INIT,!1;for(var A=this.data,t=this.totalTargets,e=0;e0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTweenEvent(n.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTweenEvent(n.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===a.PAUSED?this:(this.paused=!0,this._pausedState=this.state,this.state=a.PAUSED,this)},play:function(A){void 0===A&&(A=!1);var t=this.state;return t!==a.INIT||this.parentIsTimeline?t===a.ACTIVE||t===a.PENDING_ADD&&this._pausedState===a.PENDING_ADD?this:this.parentIsTimeline||t!==a.PENDING_REMOVE&&t!==a.REMOVED?(this.parentIsTimeline?(this.resetTweenData(A),0===this.calculatedOffset?this.state=a.ACTIVE:(this.countdown=this.calculatedOffset,this.state=a.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(A),this.state=a.ACTIVE,this.makeActive()),this):(this.seek(0),this.parent.makeActive(this),this):(this.resetTweenData(!1),this.state=a.ACTIVE,this)},resetTweenData:function(A){for(var t=this.data,e=this.totalData,i=this.totalTargets,s=0;s0&&(n.elapsed=n.delay,n.state=a.DELAY),n.getActiveValue&&(r[o]=n.getActiveValue(n.target,n.key,n.start))}},resume:function(){return this.state===a.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(A,t){if(void 0===t&&(t=16.6),this.totalDuration>=36e5)return console.warn("Tween.seek duration too long"),this;this.state===a.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var e=this.data,i=this.totalTargets,s=0;s0&&(n.elapsed=n.delay,n.state=a.DELAY)}this.calcDuration();var c=!1;this.state===a.PAUSED&&(c=!0,this.state=a.ACTIVE),this.isSeeking=!0;do{this.update(0,t)}while(this.totalProgress0?(t.repeatCounter--,t.elapsed=e,t.progress=e/t.duration,t.flipX&&t.target.toggleFlipX(),t.flipY&&t.target.toggleFlipY(),t.start=t.getStartValue(t.target,t.key,t.start,t.index,A.totalTargets,A),t.end=t.getEndValue(t.target,t.key,t.start,t.index,A.totalTargets,A),t.repeatDelay>0?(t.elapsed=t.repeatDelay-e,t.current=t.start,t.target[t.key]=t.current,a.REPEAT_DELAY):(this.dispatchTweenDataEvent(n.TWEEN_REPEAT,A.callbacks.onRepeat,t),a.PLAYING_FORWARD)):a.COMPLETE},setStateFromStart:function(A,t,e){return t.repeatCounter>0?(t.repeatCounter--,t.elapsed=e,t.progress=e/t.duration,t.flipX&&t.target.toggleFlipX(),t.flipY&&t.target.toggleFlipY(),t.end=t.getEndValue(t.target,t.key,t.start,t.index,A.totalTargets,A),t.repeatDelay>0?(t.elapsed=t.repeatDelay-e,t.current=t.start,t.target[t.key]=t.current,a.REPEAT_DELAY):(this.dispatchTweenDataEvent(n.TWEEN_REPEAT,A.callbacks.onRepeat,t),a.PLAYING_FORWARD)):a.COMPLETE},updateTweenData:function(A,t,e){var i=t.target;switch(t.state){case a.PLAYING_FORWARD:case a.PLAYING_BACKWARD:if(!i){t.state=a.COMPLETE;break}var s=t.elapsed,r=t.duration,o=0;(s+=e)>r&&(o=s-r,s=r);var h=t.state===a.PLAYING_FORWARD,l=s/r;if(t.elapsed=s,t.progress=l,1===l)h?(t.current=t.end,i[t.key]=t.end,t.hold>0?(t.elapsed=t.hold-o,t.state=a.HOLD_DELAY):t.state=this.setStateFromEnd(A,t,o)):(t.current=t.start,i[t.key]=t.start,t.state=this.setStateFromStart(A,t,o));else{var c=h?t.ease(l):t.ease(1-l);t.current=t.start+(t.end-t.start)*c,i[t.key]=t.current}this.dispatchTweenDataEvent(n.TWEEN_UPDATE,A.callbacks.onUpdate,t);break;case a.DELAY:t.elapsed-=e,t.elapsed<=0&&(t.elapsed=Math.abs(t.elapsed),t.state=a.PENDING_RENDER);break;case a.REPEAT_DELAY:t.elapsed-=e,t.elapsed<=0&&(t.elapsed=Math.abs(t.elapsed),t.state=a.PLAYING_FORWARD,this.dispatchTweenDataEvent(n.TWEEN_REPEAT,A.callbacks.onRepeat,t));break;case a.HOLD_DELAY:t.elapsed-=e,t.elapsed<=0&&(t.state=this.setStateFromEnd(A,t,Math.abs(t.elapsed)));break;case a.PENDING_RENDER:i?(t.start=t.getStartValue(i,t.key,i[t.key],t.index,A.totalTargets,A),t.end=t.getEndValue(i,t.key,t.start,t.index,A.totalTargets,A),t.current=t.start,i[t.key]=t.start,t.state=a.PLAYING_FORWARD):t.state=a.COMPLETE}return t.state!==a.COMPLETE}});h.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],o.register("tween",(function(A){return this.scene.sys.tweens.add(A)})),r.register("tween",(function(A){return this.scene.sys.tweens.create(A)})),A.exports=h},function(A,t,e){A.exports={TIMELINE_COMPLETE:e(1456),TIMELINE_LOOP:e(1457),TIMELINE_PAUSE:e(1458),TIMELINE_RESUME:e(1459),TIMELINE_START:e(1460),TIMELINE_UPDATE:e(1461),TWEEN_ACTIVE:e(1462),TWEEN_COMPLETE:e(1463),TWEEN_LOOP:e(1464),TWEEN_REPEAT:e(1465),TWEEN_START:e(1466),TWEEN_UPDATE:e(1467),TWEEN_YOYO:e(1468)}},function(A,t){A.exports=function(A,t,e,i,s,n,r,o,a,h,l,c,u,d,g){return{target:A,index:t,key:e,getActiveValue:n,getEndValue:i,getStartValue:s,ease:r,duration:0,totalDuration:0,delay:0,yoyo:h,hold:0,repeat:0,repeatDelay:0,flipX:d,flipY:g,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:o,duration:a,hold:l,repeat:c,repeatDelay:u},state:0}}},function(A,t,e){var i=e(0),s=e(188),n=e(335),r=e(336),o=e(342),a=e(90),h=e(156),l=e(3),c=e(85),u=e(128),d=new c,g=new u,p=new c,f=new c,v=new s,y=new i({initialize:function(A){this.scene=A,this.displayList=A.sys.displayList,this.updateList=A.sys.updateList,this.name="",this.direction=new c(0,0,-1),this.up=new c(0,1,0),this.position=new c,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new c,direction:new c},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new a},setPosition:function(A,t,e){return this.position.set(A,t,e),this.update()},setScene:function(A){return this.scene=A,this},setPixelScale:function(A){return this.pixelScale=A,this.update()},add:function(A){return this.children.set(A),this.displayList.add(A.gameObject),this.updateList.add(A.gameObject),this.updateChildren(),A},remove:function(A){return this.displayList.remove(A.gameObject),this.updateList.remove(A.gameObject),this.children.delete(A),this},clear:function(){for(var A=this.getChildren(),t=0;t=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(A){var t=this.parent;return this.currentFrame=A,t.texture=A.frame.texture,t.frame=A.frame,t.isCropped&&t.frame.updateCropUVs(t._crop,t.flipX,t.flipY),t.setSizeToFrame(),A.frame.customPivot?t.setOrigin(A.frame.pivotX,A.frame.pivotY):t.updateDisplayOrigin(),t},updateFrame:function(A){var t=this.setCurrentFrame(A);if(this.isPlaying){A.setAlpha&&(t.alpha=A.alpha);var e=this.currentAnim;t.emit(n.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,A,t),t.emit(n.SPRITE_ANIMATION_UPDATE,e,A,t),3===this._pendingStop&&this._pendingStopValue===A&&this.currentAnim.completeAnimation(this)}},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(A){return void 0===A&&(A=!1),this._yoyo=A,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(n.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});A.exports=r},function(A,t){A.exports=function(A,t,e){if(!t.length)return NaN;if(1===t.length)return t[0];var i,s,n=1;if(e){if(At.length&&(n=t.length),e?(i=t[n-1][e],(s=t[n][e])-A<=A-i?t[n]:t[n-1]):(i=t[n-1],(s=t[n])-A<=A-i?s:i)}},function(A,t,e){var i=new(e(0))({initialize:function(A,t,e,i){this.textureKey=A,this.textureFrame=t,this.index=e,this.frame=i,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});A.exports=i},function(A,t,e){var i=e(43),s={_blendMode:i.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(A){"string"==typeof A&&(A=i[A]),(A|=0)>=-1&&(this._blendMode=A)}},setBlendMode:function(A){return this.blendMode=A,this}};A.exports=s},function(A,t){var e={_depth:0,depth:{get:function(){return this._depth},set:function(A){this.scene.sys.queueDepthSort(),this._depth=A}},setDepth:function(A){return void 0===A&&(A=0),this.depth=A,this}};A.exports=e},function(A,t,e){var i=e(163),s=e(121);A.exports=function(A,t,e,n){void 0===n&&(n=[]),t||(t=s(A)/e);for(var r=0;r=A.right&&(a=1,o+=r-A.right,r=A.right);break;case 1:(o+=t)>=A.bottom&&(a=2,r-=o-A.bottom,o=A.bottom);break;case 2:(r-=t)<=A.left&&(a=3,o-=A.left-r,r=A.left);break;case 3:(o-=t)<=A.top&&(a=0,o=A.top)}return n}},function(A,t){A.exports=function(A,t){void 0===t&&(t=1);for(var e=null,i=0;i-a&&(c-=a,i+=h),du.right&&(d=l(d,d+(p-u.right),this.lerp.x)),fu.bottom&&(g=l(g,g+(f-u.bottom),this.lerp.y))):(d=l(d,p-a,this.lerp.x),g=l(g,f-h,this.lerp.y))}this.useBounds&&(d=this.clampX(d),g=this.clampY(g)),this.roundPixels&&(a=Math.round(a),h=Math.round(h)),this.scrollX=d,this.scrollY=g;var v=d+i,y=g+s;this.midPoint.set(v,y);var m=t/r,w=e/r;this.worldView.setTo(v-m/2,y-w/2,m,w),o.applyITRS(this.x+a,this.y+h,this.rotation,r,r),o.translate(-a,-h),this.shakeEffect.preRender()},setLerp:function(A,t){return void 0===A&&(A=1),void 0===t&&(t=A),this.lerp.set(A,t),this},setFollowOffset:function(A,t){return void 0===A&&(A=0),void 0===t&&(t=0),this.followOffset.set(A,t),this},startFollow:function(A,t,e,i,s,n){void 0===t&&(t=!1),void 0===e&&(e=1),void 0===i&&(i=e),void 0===s&&(s=0),void 0===n&&(n=s),this._follow=A,this.roundPixels=t,e=r(e,0,1),i=r(i,0,1),this.lerp.set(e,i),this.followOffset.set(s,n);var o=this.width/2,a=this.height/2,h=A.x-s,l=A.y-n;return this.midPoint.set(h,l),this.scrollX=h-o,this.scrollY=l-a,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.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(A,t){this.visible&&(this.panEffect.update(A,t),this.zoomEffect.update(A,t),this.shakeEffect.update(A,t),this.flashEffect.update(A,t),this.fadeEffect.update(A,t))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),i.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});A.exports=d},function(A,t,e){var i=e(37);A.exports=function(A){var t=new i;A=A.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,(function(A,t,e,i){return t+t+e+e+i+i}));var e=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(A);if(e){var s=parseInt(e[1],16),n=parseInt(e[2],16),r=parseInt(e[3],16);t.setTo(s,n,r)}return t}},function(A,t){A.exports=function(A,t,e,i){return i<<24|A<<16|t<<8|e}},function(A,t){A.exports=function(A,t,e,i){void 0===i&&(i={h:0,s:0,v:0}),A/=255,t/=255,e/=255;var s=Math.min(A,t,e),n=Math.max(A,t,e),r=n-s,o=0,a=0===n?0:r/n,h=n;return n!==s&&(n===A?o=(t-e)/r+(t16777215?{a:A>>>24,r:A>>16&255,g:A>>8&255,b:255&A}:{a:255,r:A>>16&255,g:A>>8&255,b:255&A}}},function(A,t,e){var i=e(37);A.exports=function(A){return new i(A.r,A.g,A.b,A.a)}},function(A,t,e){var i=e(37);A.exports=function(A){var t=new i,e=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(A.toLowerCase());if(e){var s=parseInt(e[1],10),n=parseInt(e[2],10),r=parseInt(e[3],10),o=void 0!==e[4]?parseFloat(e[4]):1;t.setTo(s,n,r,255*o)}return t}},function(A,t,e){A.exports={Fade:e(708),Flash:e(709),Pan:e(710),Shake:e(743),Zoom:e(744)}},function(A,t,e){A.exports={In:e(711),Out:e(712),InOut:e(713)}},function(A,t,e){A.exports={In:e(714),Out:e(715),InOut:e(716)}},function(A,t,e){A.exports={In:e(717),Out:e(718),InOut:e(719)}},function(A,t,e){A.exports={In:e(720),Out:e(721),InOut:e(722)}},function(A,t,e){A.exports={In:e(723),Out:e(724),InOut:e(725)}},function(A,t,e){A.exports={In:e(726),Out:e(727),InOut:e(728)}},function(A,t,e){A.exports=e(729)},function(A,t,e){A.exports={In:e(730),Out:e(731),InOut:e(732)}},function(A,t,e){A.exports={In:e(733),Out:e(734),InOut:e(735)}},function(A,t,e){A.exports={In:e(736),Out:e(737),InOut:e(738)}},function(A,t,e){A.exports={In:e(739),Out:e(740),InOut:e(741)}},function(A,t,e){A.exports=e(742)},function(A,t,e){var i=e(0),s=e(33),n=e(320),r=e(2),o=e(6),a=e(7),h=e(183),l=e(1),c=e(189),u=e(176),d=new i({initialize:function(A){void 0===A&&(A={});this.width=o(A,"width",1024),this.height=o(A,"height",768),this.zoom=o(A,"zoom",1),this.resolution=o(A,"resolution",1),this.parent=o(A,"parent",void 0),this.scaleMode=o(A,"scaleMode",0),this.expandParent=o(A,"expandParent",!0),this.autoRound=o(A,"autoRound",!1),this.autoCenter=o(A,"autoCenter",0),this.resizeInterval=o(A,"resizeInterval",500),this.fullscreenTarget=o(A,"fullscreenTarget",null),this.minWidth=o(A,"minWidth",0),this.maxWidth=o(A,"maxWidth",0),this.minHeight=o(A,"minHeight",0),this.maxHeight=o(A,"maxHeight",0);var t=o(A,"scale",null);t&&(this.width=o(t,"width",this.width),this.height=o(t,"height",this.height),this.zoom=o(t,"zoom",this.zoom),this.resolution=o(t,"resolution",this.resolution),this.parent=o(t,"parent",this.parent),this.scaleMode=o(t,"mode",this.scaleMode),this.expandParent=o(t,"expandParent",this.expandParent),this.autoRound=o(t,"autoRound",this.autoRound),this.autoCenter=o(t,"autoCenter",this.autoCenter),this.resizeInterval=o(t,"resizeInterval",this.resizeInterval),this.fullscreenTarget=o(t,"fullscreenTarget",this.fullscreenTarget),this.minWidth=o(t,"min.width",this.minWidth),this.maxWidth=o(t,"max.width",this.maxWidth),this.minHeight=o(t,"min.height",this.minHeight),this.maxHeight=o(t,"max.height",this.maxHeight)),this.renderType=o(A,"type",s.AUTO),this.canvas=o(A,"canvas",null),this.context=o(A,"context",null),this.canvasStyle=o(A,"canvasStyle",null),this.customEnvironment=o(A,"customEnvironment",!1),this.sceneConfig=o(A,"scene",null),this.seed=o(A,"seed",[(Date.now()*Math.random()).toString()]),h.RND=new h.RandomDataGenerator(this.seed),this.gameTitle=o(A,"title",""),this.gameURL=o(A,"url","https://phaser.io"),this.gameVersion=o(A,"version",""),this.autoFocus=o(A,"autoFocus",!0),this.domCreateContainer=o(A,"dom.createContainer",!1),this.domBehindCanvas=o(A,"dom.behindCanvas",!1),this.inputKeyboard=o(A,"input.keyboard",!0),this.inputKeyboardEventTarget=o(A,"input.keyboard.target",window),this.inputKeyboardCapture=o(A,"input.keyboard.capture",[]),this.inputMouse=o(A,"input.mouse",!0),this.inputMouseEventTarget=o(A,"input.mouse.target",null),this.inputMouseCapture=o(A,"input.mouse.capture",!0),this.inputTouch=o(A,"input.touch",n.input.touch),this.inputTouchEventTarget=o(A,"input.touch.target",null),this.inputTouchCapture=o(A,"input.touch.capture",!0),this.inputActivePointers=o(A,"input.activePointers",1),this.inputSmoothFactor=o(A,"input.smoothFactor",0),this.inputWindowEvents=o(A,"input.windowEvents",!0),this.inputGamepad=o(A,"input.gamepad",!1),this.inputGamepadEventTarget=o(A,"input.gamepad.target",window),this.disableContextMenu=o(A,"disableContextMenu",!1),this.audio=o(A,"audio"),this.hideBanner=!1===o(A,"banner",null),this.hidePhaser=o(A,"banner.hidePhaser",!1),this.bannerTextColor=o(A,"banner.text","#ffffff"),this.bannerBackgroundColor=o(A,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=o(A,"fps",null);var e=o(A,"render",A);this.antialias=o(e,"antialias",!0),this.antialiasGL=o(e,"antialiasGL",!0),this.desynchronized=o(e,"desynchronized",!1),this.roundPixels=o(e,"roundPixels",!1),this.pixelArt=o(e,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=o(e,"transparent",!1),this.clearBeforeRender=o(e,"clearBeforeRender",!0),this.premultipliedAlpha=o(e,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=o(e,"failIfMajorPerformanceCaveat",!1),this.powerPreference=o(e,"powerPreference","default"),this.batchSize=o(e,"batchSize",2e3),this.maxLights=o(e,"maxLights",10);var i=o(A,"backgroundColor",0);this.backgroundColor=u(i),0===i&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=o(A,"callbacks.preBoot",l),this.postBoot=o(A,"callbacks.postBoot",l),this.physics=o(A,"physics",{}),this.defaultPhysicsSystem=o(this.physics,"default",!1),this.loaderBaseURL=o(A,"loader.baseURL",""),this.loaderPath=o(A,"loader.path",""),this.loaderMaxParallelDownloads=o(A,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=o(A,"loader.crossOrigin",void 0),this.loaderResponseType=o(A,"loader.responseType",""),this.loaderAsync=o(A,"loader.async",!0),this.loaderUser=o(A,"loader.user",""),this.loaderPassword=o(A,"loader.password",""),this.loaderTimeout=o(A,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var d=o(A,"plugins",null),g=c.DefaultScene;d&&(Array.isArray(d)?this.defaultPlugins=d:a(d)&&(this.installGlobalPlugins=r(d,"global",[]),this.installScenePlugins=r(d,"scene",[]),Array.isArray(d.default)?g=d.default:Array.isArray(d.defaultMerge)&&(g=g.concat(d.defaultMerge)))),this.defaultPlugins=g;var p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=o(A,"images.default",p+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=o(A,"images.missing",p+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});A.exports=d},function(A,t,e){A.exports={os:e(125),browser:e(126),features:e(182),input:e(773),audio:e(774),video:e(775),fullscreen:e(776),canvasFeatures:e(321)}},function(A,t,e){var i,s,n,r=e(28),o={supportInverseAlpha:!1,supportNewBlendModes:!1};A.exports=(void 0!==document&&(o.supportNewBlendModes=(i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(n=new Image).onload=function(){var A=new Image;A.onload=function(){var t=r.create(A,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(n,0,0),t.drawImage(A,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;r.remove(A),o.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},A.src=i+"/wCKxvRF"+s},n.src=i+"AP804Oa6"+s,!1),o.supportInverseAlpha=function(){var A=r.create(this,2,1).getContext("2d");A.fillStyle="rgba(10, 20, 30, 0.5)",A.fillRect(0,0,1,1);var t=A.getImageData(0,0,1,1);if(null===t)return!1;A.putImageData(t,1,0);var e=A.getImageData(1,0,1,1);return e.data[0]===t.data[0]&&e.data[1]===t.data[1]&&e.data[2]===t.data[2]&&e.data[3]===t.data[3]}()),o)},function(A,t){A.exports=function(A,t,e,i){return Math.atan2(i-t,e-A)}},function(A,t){A.exports=function(A){return(A%=2*Math.PI)>=0?A:A+2*Math.PI}},function(A,t){A.exports=function(A,t,e,i){var s=A-e,n=t-i;return s*s+n*n}},function(A,t){A.exports=function(A,t,e){return void 0===e&&(e=1e-4),A>t-e}},function(A,t){A.exports=function(A,t,e){return void 0===e&&(e=1e-4),A0?Math.ceil(A):Math.floor(A)}},function(A,t,e){var i=e(3);A.exports=function(A,t,e,s,n,r,o,a){void 0===a&&(a=new i);var h=Math.sin(n),l=Math.cos(n),c=l*r,u=h*r,d=-h*o,g=l*o,p=1/(c*g+d*-u);return a.x=g*p*A+-d*p*t+(s*d-e*g)*p,a.y=c*p*t+-u*p*A+(-s*c+e*u)*p,a}},function(A,t,e){var i=new(e(0))({initialize:function(A){this.val=new Float32Array(9),A?this.copy(A):this.identity()},clone:function(){return new i(this)},set:function(A){return this.copy(A)},copy:function(A){var t=this.val,e=A.val;return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],this},fromMat4:function(A){var t=A.val,e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],this},fromArray:function(A){var t=this.val;return t[0]=A[0],t[1]=A[1],t[2]=A[2],t[3]=A[3],t[4]=A[4],t[5]=A[5],t[6]=A[6],t[7]=A[7],t[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,t=A[1],e=A[2],i=A[5];return A[1]=A[3],A[2]=A[6],A[3]=t,A[5]=A[7],A[6]=e,A[7]=i,this},invert:function(){var A=this.val,t=A[0],e=A[1],i=A[2],s=A[3],n=A[4],r=A[5],o=A[6],a=A[7],h=A[8],l=h*n-r*a,c=-h*s+r*o,u=a*s-n*o,d=t*l+e*c+i*u;return d?(d=1/d,A[0]=l*d,A[1]=(-h*e+i*a)*d,A[2]=(r*e-i*n)*d,A[3]=c*d,A[4]=(h*t-i*o)*d,A[5]=(-r*t+i*s)*d,A[6]=u*d,A[7]=(-a*t+e*o)*d,A[8]=(n*t-e*s)*d,this):null},adjoint:function(){var A=this.val,t=A[0],e=A[1],i=A[2],s=A[3],n=A[4],r=A[5],o=A[6],a=A[7],h=A[8];return A[0]=n*h-r*a,A[1]=i*a-e*h,A[2]=e*r-i*n,A[3]=r*o-s*h,A[4]=t*h-i*o,A[5]=i*s-t*r,A[6]=s*a-n*o,A[7]=e*o-t*a,A[8]=t*n-e*s,this},determinant:function(){var A=this.val,t=A[0],e=A[1],i=A[2],s=A[3],n=A[4],r=A[5],o=A[6],a=A[7],h=A[8];return t*(h*n-r*a)+e*(-h*s+r*o)+i*(a*s-n*o)},multiply:function(A){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],c=A.val,u=c[0],d=c[1],g=c[2],p=c[3],f=c[4],v=c[5],y=c[6],m=c[7],w=c[8];return t[0]=u*e+d*n+g*a,t[1]=u*i+d*r+g*h,t[2]=u*s+d*o+g*l,t[3]=p*e+f*n+v*a,t[4]=p*i+f*r+v*h,t[5]=p*s+f*o+v*l,t[6]=y*e+m*n+w*a,t[7]=y*i+m*r+w*h,t[8]=y*s+m*o+w*l,this},translate:function(A){var t=this.val,e=A.x,i=A.y;return t[6]=e*t[0]+i*t[3]+t[6],t[7]=e*t[1]+i*t[4]+t[7],t[8]=e*t[2]+i*t[5]+t[8],this},rotate:function(A){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=Math.sin(A),h=Math.cos(A);return t[0]=h*e+a*n,t[1]=h*i+a*r,t[2]=h*s+a*o,t[3]=h*n-a*e,t[4]=h*r-a*i,t[5]=h*o-a*s,this},scale:function(A){var t=this.val,e=A.x,i=A.y;return t[0]=e*t[0],t[1]=e*t[1],t[2]=e*t[2],t[3]=i*t[3],t[4]=i*t[4],t[5]=i*t[5],this},fromQuat:function(A){var t=A.x,e=A.y,i=A.z,s=A.w,n=t+t,r=e+e,o=i+i,a=t*n,h=t*r,l=t*o,c=e*r,u=e*o,d=i*o,g=s*n,p=s*r,f=s*o,v=this.val;return v[0]=1-(c+d),v[3]=h+f,v[6]=l-p,v[1]=h-f,v[4]=1-(a+d),v[7]=u+g,v[2]=l+p,v[5]=u-g,v[8]=1-(a+c),this},normalFromMat4:function(A){var t=A.val,e=this.val,i=t[0],s=t[1],n=t[2],r=t[3],o=t[4],a=t[5],h=t[6],l=t[7],c=t[8],u=t[9],d=t[10],g=t[11],p=t[12],f=t[13],v=t[14],y=t[15],m=i*a-s*o,w=i*h-n*o,B=i*l-r*o,x=s*h-n*a,C=s*l-r*a,b=n*l-r*h,T=c*f-u*p,Q=c*v-d*p,E=c*y-g*p,F=u*v-d*f,M=u*y-g*f,I=d*y-g*v,S=m*I-w*M+B*F+x*E-C*Q+b*T;return S?(S=1/S,e[0]=(a*I-h*M+l*F)*S,e[1]=(h*E-o*I-l*Q)*S,e[2]=(o*M-a*E+l*T)*S,e[3]=(n*M-s*I-r*F)*S,e[4]=(i*I-n*E+r*Q)*S,e[5]=(s*E-i*M-r*T)*S,e[6]=(f*b-v*C+y*x)*S,e[7]=(v*B-p*b-y*w)*S,e[8]=(p*C-f*B+y*m)*S,this):null}});A.exports=i},function(A,t,e){var i=e(0),s=e(85),n=e(340),r=new Int8Array([1,2,0]),o=new Float32Array([0,0,0]),a=new s(1,0,0),h=new s(0,1,0),l=new s,c=new n,u=new i({initialize:function(A,t,e,i){"object"==typeof A?(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=t||0,this.z=e||0,this.w=i||0)},copy:function(A){return this.x=A.x,this.y=A.y,this.z=A.z,this.w=A.w,this},set:function(A,t,e,i){return"object"==typeof A?(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=t||0,this.z=e||0,this.w=i||0),this},add:function(A){return this.x+=A.x,this.y+=A.y,this.z+=A.z,this.w+=A.w,this},subtract:function(A){return this.x-=A.x,this.y-=A.y,this.z-=A.z,this.w-=A.w,this},scale:function(A){return this.x*=A,this.y*=A,this.z*=A,this.w*=A,this},length:function(){var A=this.x,t=this.y,e=this.z,i=this.w;return Math.sqrt(A*A+t*t+e*e+i*i)},lengthSq:function(){var A=this.x,t=this.y,e=this.z,i=this.w;return A*A+t*t+e*e+i*i},normalize:function(){var A=this.x,t=this.y,e=this.z,i=this.w,s=A*A+t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=A*s,this.y=t*s,this.z=e*s,this.w=i*s),this},dot:function(A){return this.x*A.x+this.y*A.y+this.z*A.z+this.w*A.w},lerp:function(A,t){void 0===t&&(t=0);var e=this.x,i=this.y,s=this.z,n=this.w;return this.x=e+t*(A.x-e),this.y=i+t*(A.y-i),this.z=s+t*(A.z-s),this.w=n+t*(A.w-n),this},rotationTo:function(A,t){var e=A.x*t.x+A.y*t.y+A.z*t.z;return e<-.999999?(l.copy(a).cross(A).length()<1e-6&&l.copy(h).cross(A),l.normalize(),this.setAxisAngle(l,Math.PI)):e>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(l.copy(A).cross(t),this.x=l.x,this.y=l.y,this.z=l.z,this.w=1+e,this.normalize())},setAxes:function(A,t,e){var i=c.val;return i[0]=t.x,i[3]=t.y,i[6]=t.z,i[1]=e.x,i[4]=e.y,i[7]=e.z,i[2]=-A.x,i[5]=-A.y,i[8]=-A.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(A,t){t*=.5;var e=Math.sin(t);return this.x=e*A.x,this.y=e*A.y,this.z=e*A.z,this.w=Math.cos(t),this},multiply:function(A){var t=this.x,e=this.y,i=this.z,s=this.w,n=A.x,r=A.y,o=A.z,a=A.w;return this.x=t*a+s*n+e*o-i*r,this.y=e*a+s*r+i*n-t*o,this.z=i*a+s*o+t*r-e*n,this.w=s*a-t*n-e*r-i*o,this},slerp:function(A,t){var e=this.x,i=this.y,s=this.z,n=this.w,r=A.x,o=A.y,a=A.z,h=A.w,l=e*r+i*o+s*a+n*h;l<0&&(l=-l,r=-r,o=-o,a=-a,h=-h);var c=1-t,u=t;if(1-l>1e-6){var d=Math.acos(l),g=Math.sin(d);c=Math.sin((1-t)*d)/g,u=Math.sin(t*d)/g}return this.x=c*e+u*r,this.y=c*i+u*o,this.z=c*s+u*a,this.w=c*n+u*h,this},invert:function(){var A=this.x,t=this.y,e=this.z,i=this.w,s=A*A+t*t+e*e+i*i,n=s?1/s:0;return this.x=-A*n,this.y=-t*n,this.z=-e*n,this.w=i*n,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(A){A*=.5;var t=this.x,e=this.y,i=this.z,s=this.w,n=Math.sin(A),r=Math.cos(A);return this.x=t*r+s*n,this.y=e*r+i*n,this.z=i*r-e*n,this.w=s*r-t*n,this},rotateY:function(A){A*=.5;var t=this.x,e=this.y,i=this.z,s=this.w,n=Math.sin(A),r=Math.cos(A);return this.x=t*r-i*n,this.y=e*r+s*n,this.z=i*r+t*n,this.w=s*r-e*n,this},rotateZ:function(A){A*=.5;var t=this.x,e=this.y,i=this.z,s=this.w,n=Math.sin(A),r=Math.cos(A);return this.x=t*r+e*n,this.y=e*r-t*n,this.z=i*r+s*n,this.w=s*r-i*n,this},calculateW:function(){var A=this.x,t=this.y,e=this.z;return this.w=-Math.sqrt(1-A*A-t*t-e*e),this},fromMat3:function(A){var t,e=A.val,i=e[0]+e[4]+e[8];if(i>0)t=Math.sqrt(i+1),this.w=.5*t,t=.5/t,this.x=(e[7]-e[5])*t,this.y=(e[2]-e[6])*t,this.z=(e[3]-e[1])*t;else{var s=0;e[4]>e[0]&&(s=1),e[8]>e[3*s+s]&&(s=2);var n=r[s],a=r[n];t=Math.sqrt(e[3*s+s]-e[3*n+n]-e[3*a+a]+1),o[s]=.5*t,t=.5/t,o[n]=(e[3*n+s]+e[3*s+n])*t,o[a]=(e[3*a+s]+e[3*s+a])*t,this.x=o[0],this.y=o[1],this.z=o[2],this.w=(e[3*a+n]-e[3*n+a])*t}return this}});A.exports=u},function(A,t,e){var i=e(85),s=e(188),n=e(341),r=new s,o=new n,a=new i;A.exports=function(A,t,e){return o.setAxisAngle(t,e),r.fromRotationTranslation(o,a.set(0,0,0)),A.transformMat4(r)}},function(A,t,e){var i=e(344),s=e(28),n=e(33),r=e(182);A.exports=function(A){var t=A.config;if((t.customEnvironment||t.canvas)&&t.renderType===n.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!t.customEnvironment&&!t.canvas&&t.renderType!==n.HEADLESS)if(t.renderType===n.CANVAS||t.renderType!==n.CANVAS&&!r.webGL){if(!r.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");t.renderType=n.CANVAS}else t.renderType=n.WEBGL;t.antialias||s.disableSmoothing();var o,a,h=A.scale.baseSize,l=h.width,c=h.height;(t.canvas?(A.canvas=t.canvas,A.canvas.width=l,A.canvas.height=c):A.canvas=s.create(A,l,c,t.renderType),t.canvasStyle&&(A.canvas.style=t.canvasStyle),t.antialias||i.setCrisp(A.canvas),t.renderType!==n.HEADLESS)&&(o=e(345),a=e(348),t.renderType===n.WEBGL?A.renderer=new a(A):(A.renderer=new o(A),A.context=A.renderer.gameContext))}},function(A,t){A.exports={setCrisp:function(A){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach((function(t){A.style["image-rendering"]=t})),A.style.msInterpolationMode="nearest-neighbor",A},setBicubic:function(A){return A.style["image-rendering"]="auto",A.style.msInterpolationMode="bicubic",A}}},function(A,t,e){var i=e(346),s=e(54),n=e(0),r=e(33),o=e(347),a=e(105),h=e(36),l=new n({initialize:function(A){this.game=A,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:A.config.clearBeforeRender,backgroundColor:A.config.backgroundColor,resolution:A.config.resolution,antialias:A.config.antialias,roundPixels:A.config.roundPixels},this.gameCanvas=A.canvas;var t={alpha:A.config.transparent,desynchronized:A.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",t),this.currentContext=this.gameContext,this.antialias=A.config.antialias,this.blendModes=o(),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._tempMatrix4=new h,this.init()},init:function(){this.game.scale.on(a.RESIZE,this.onResize,this);var A=this.game.scale.baseSize;this.resize(A.width,A.height)},onResize:function(A,t){t.width===this.width&&t.height===this.height||this.resize(t.width,t.height)},resize:function(A,t){this.width=A,this.height=t},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(A){return this.currentContext.globalCompositeOperation=A,this},setContext:function(A){return this.currentContext=A||this.gameContext,this},setAlpha:function(A){return this.currentContext.globalAlpha=A,this},preRender:function(){var A=this.gameContext,t=this.config,e=this.width,i=this.height;A.globalAlpha=1,A.globalCompositeOperation="source-over",A.setTransform(1,0,0,1,0,0),t.clearBeforeRender&&A.clearRect(0,0,e,i),t.transparent||(A.fillStyle=t.backgroundColor.rgba,A.fillRect(0,0,e,i)),A.save(),this.drawCount=0},render:function(A,t,e,i){var n=t.list,r=n.length,o=i._cx,a=i._cy,h=i._cw,l=i._ch,c=i.renderToTexture?i.context:A.sys.context;c.save(),this.game.scene.customViewports&&(c.beginPath(),c.rect(o,a,h,l),c.clip()),this.currentContext=c;var u=i.mask;u&&u.preRenderCanvas(this,null,i._maskCamera),i.transparent||(c.fillStyle=i.backgroundColor.rgba,c.fillRect(o,a,h,l)),c.globalAlpha=i.alpha,c.globalCompositeOperation="source-over",this.drawCount+=n.length,i.renderToTexture&&i.emit(s.PRE_RENDER,i),i.matrix.copyToContext(c);for(var d=0;d=0?y=-(y+u):y<0&&(y=Math.abs(y)-u)),A.flipY&&(m>=0?m=-(m+d):m<0&&(m=Math.abs(m)-d))}var B=1,x=1;A.flipX&&(g||(y+=-t.realWidth+2*f),B=-1),A.flipY&&(g||(m+=-t.realHeight+2*v),x=-1),o.applyITRS(A.x,A.y,A.rotation,A.scaleX*B,A.scaleY*x),r.copyFrom(e.matrix),i?(r.multiplyWithOffset(i,-e.scrollX*A.scrollFactorX,-e.scrollY*A.scrollFactorY),o.e=A.x,o.f=A.y,r.multiply(o,a)):(o.e-=e.scrollX*A.scrollFactorX,o.f-=e.scrollY*A.scrollFactorY,r.multiply(o,a)),n.save(),a.setToContext(n),n.globalCompositeOperation=this.blendModes[A.blendMode],n.globalAlpha=s,n.imageSmoothingEnabled=!(!this.antialias||t.source.scaleMode),n.drawImage(t.source.image,l,c,u,d,y,m,u/p,d/p),n.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});A.exports=l},function(A,t,e){var i=e(28),s=e(37),n=e(2);A.exports=function(A,t){var e=n(t,"callback"),r=n(t,"type","image/png"),o=n(t,"encoder",.92),a=Math.abs(Math.round(n(t,"x",0))),h=Math.abs(Math.round(n(t,"y",0))),l=n(t,"width",A.width),c=n(t,"height",A.height);if(n(t,"getPixel",!1)){var u=A.getContext("2d").getImageData(a,h,1,1).data;e.call(null,new s(u[0],u[1],u[2],u[3]/255))}else if(0!==a||0!==h||l!==A.width||c!==A.height){var d=i.createWebGL(this,l,c);d.getContext("2d").drawImage(A,a,h,l,c,0,0,l,c);var g=new Image;g.onerror=function(){e.call(null),i.remove(d)},g.onload=function(){e.call(null,g),i.remove(d)},g.src=d.toDataURL(r,o)}else{var p=new Image;p.onerror=function(){e.call(null)},p.onload=function(){e.call(null,p)},p.src=A.toDataURL(r,o)}}},function(A,t,e){var i=e(43),s=e(321);A.exports=function(){var A=[],t=s.supportNewBlendModes,e="source-over";return A[i.NORMAL]=e,A[i.ADD]="lighter",A[i.MULTIPLY]=t?"multiply":e,A[i.SCREEN]=t?"screen":e,A[i.OVERLAY]=t?"overlay":e,A[i.DARKEN]=t?"darken":e,A[i.LIGHTEN]=t?"lighten":e,A[i.COLOR_DODGE]=t?"color-dodge":e,A[i.COLOR_BURN]=t?"color-burn":e,A[i.HARD_LIGHT]=t?"hard-light":e,A[i.SOFT_LIGHT]=t?"soft-light":e,A[i.DIFFERENCE]=t?"difference":e,A[i.EXCLUSION]=t?"exclusion":e,A[i.HUE]=t?"hue":e,A[i.SATURATION]=t?"saturation":e,A[i.COLOR]=t?"color":e,A[i.LUMINOSITY]=t?"luminosity":e,A[i.ERASE]="destination-out",A[i.SOURCE_IN]="source-in",A[i.SOURCE_OUT]="source-out",A[i.SOURCE_ATOP]="source-atop",A[i.DESTINATION_OVER]="destination-over",A[i.DESTINATION_IN]="destination-in",A[i.DESTINATION_OUT]="destination-out",A[i.DESTINATION_ATOP]="destination-atop",A[i.LIGHTER]="lighter",A[i.COPY]="copy",A[i.XOR]="xor",A}},function(A,t,e){var i=e(104),s=e(54),n=e(0),r=e(33),o=e(20),a=e(127),h=e(1),l=e(105),c=e(86),u=e(129),d=e(36),g=e(11),p=e(349),f=e(350),v=e(351),y=e(191),m=new n({initialize:function(A){var t=A.config,e={alpha:t.transparent,desynchronized:t.desynchronized,depth:!1,antialias:t.antialiasGL,premultipliedAlpha:t.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:t.failIfMajorPerformanceCaveat,powerPreference:t.powerPreference};this.config={clearBeforeRender:t.clearBeforeRender,antialias:t.antialias,backgroundColor:t.backgroundColor,contextCreation:e,resolution:t.resolution,roundPixels:t.roundPixels,maxTextures:t.maxTextures,maxTextureSize:t.maxTextureSize,batchSize:t.batchSize,maxLights:t.maxLights},this.game=A,this.type=r.WEBGL,this.width=0,this.height=0,this.canvas=A.canvas,this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,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.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=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.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.defaultCamera=new i(0,0,0,0),this._tempMatrix1=new d,this._tempMatrix2=new d,this._tempMatrix3=new d,this._tempMatrix4=new d,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.init(this.config)},init:function(A){var t,e=this.game,i=this.canvas,s=A.backgroundColor;if(!(t=e.config.context?e.config.context:i.getContext("webgl",A.contextCreation)||i.getContext("experimental-webgl",A.contextCreation))||t.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=t;var n=this;this.contextLostHandler=function(A){n.contextLost=!0,n.game.events.emit(o.CONTEXT_LOST,n),A.preventDefault()},this.contextRestoredHandler=function(){n.contextLost=!1,n.init(n.config),n.game.events.emit(o.CONTEXT_RESTORED,n)},i.addEventListener("webglcontextlost",this.contextLostHandler,!1),i.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),e.context=t;for(var a=0;a<=27;a++)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 h=t.getSupportedExtensions();A.maxTextures||(A.maxTextures=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)),A.maxTextureSize||(A.maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE));var l="WEBGL_compressed_texture_",c="WEBKIT_"+l;this.compression.ETC1=t.getExtension(l+"etc1")||t.getExtension(c+"etc1"),this.compression.PVRTC=t.getExtension(l+"pvrtc")||t.getExtension(c+"pvrtc"),this.compression.S3TC=t.getExtension(l+"s3tc")||t.getExtension(c+"s3tc"),this.supportedExtensions=h,t.disable(t.DEPTH_TEST),t.disable(t.CULL_FACE),t.enable(t.BLEND),t.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL);for(var d=0;d0&&i>0;if(r&&o){var a=r[0],h=r[1],l=r[2],c=r[3];o=a!==A||h!==t||l!==e||c!==i}o&&(this.flush(),n.scissor(A,s-t-i,e,i))},popScissor:function(){var A=this.scissorStack;A.pop();var t=A[A.length-1];t&&this.setScissor(t[0],t[1],t[2],t[3]),this.currentScissor=t},setPipeline:function(A,t){return this.currentPipeline===A&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=A,this.currentPipeline.bind()),this.currentPipeline.onBind(t),this.currentPipeline},hasActiveStencilMask:function(){var A=this.currentMask.mask,t=this.currentCameraMask.mask;return A&&A.isStencil||t&&t.isStencil},rebindPipeline:function(A){var t=this.gl;t.disable(t.DEPTH_TEST),t.disable(t.CULL_FACE),this.hasActiveStencilMask()?t.clear(t.DEPTH_BUFFER_BIT):(t.disable(t.STENCIL_TEST),t.clear(t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)),t.viewport(0,0,this.width,this.height),this.setBlendMode(0,!0),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,this.blankTexture.glTexture),this.currentActiveTextureUnit=0,this.currentTextures[0]=this.blankTexture.glTexture,this.currentPipeline=A,this.currentPipeline.bind(),this.currentPipeline.onBind()},clearPipeline:function(){this.flush(),this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.setBlendMode(0,!0)},setBlendMode:function(A,t){void 0===t&&(t=!1);var e=this.gl,i=this.blendModes[A];return!!(t||A!==r.BlendModes.SKIP_CHECK&&this.currentBlendMode!==A)&&(this.flush(),e.enable(e.BLEND),e.blendEquation(i.equation),i.func.length>2?e.blendFuncSeparate(i.func[0],i.func[1],i.func[2],i.func[3]):e.blendFunc(i.func[0],i.func[1]),this.currentBlendMode=A,!0)},addBlendMode:function(A,t){return this.blendModes.push({func:A,equation:t})-1},updateBlendMode:function(A,t,e){return this.blendModes[A]&&(this.blendModes[A].func=t,e&&(this.blendModes[A].equation=e)),this},removeBlendMode:function(A){return A>17&&this.blendModes[A]&&this.blendModes.splice(A,1),this},setBlankTexture:function(A){void 0===A&&(A=!1),!A&&0===this.currentActiveTextureUnit&&this.currentTextures[0]||this.setTexture2D(this.blankTexture.glTexture,0)},setTexture2D:function(A,t,e){void 0===e&&(e=!0);var i=this.gl;return A!==this.currentTextures[t]&&(e&&this.flush(),this.currentActiveTextureUnit!==t&&(i.activeTexture(i.TEXTURE0+t),this.currentActiveTextureUnit=t),i.bindTexture(i.TEXTURE_2D,A),this.currentTextures[t]=A),this},setFramebuffer:function(A,t){void 0===t&&(t=!1);var e=this.gl,i=this.width,s=this.height;return A!==this.currentFramebuffer&&(A&&A.renderTexture?(i=A.renderTexture.width,s=A.renderTexture.height):this.flush(),e.bindFramebuffer(e.FRAMEBUFFER,A),e.viewport(0,0,i,s),t&&(A?(this.drawingBufferHeight=s,this.pushScissor(0,0,i,s)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=A),this},setProgram:function(A){var t=this.gl;return A!==this.currentProgram&&(this.flush(),t.useProgram(A),this.currentProgram=A),this},setVertexBuffer:function(A){var t=this.gl;return A!==this.currentVertexBuffer&&(this.flush(),t.bindBuffer(t.ARRAY_BUFFER,A),this.currentVertexBuffer=A),this},setIndexBuffer:function(A){var t=this.gl;return A!==this.currentIndexBuffer&&(this.flush(),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,A),this.currentIndexBuffer=A),this},createTextureFromSource:function(A,t,e,i){var s=this.gl,n=s.NEAREST,o=s.CLAMP_TO_EDGE;return t=A?A.width:t,e=A?A.height:e,a(t,e)&&(o=s.REPEAT),i===r.ScaleModes.LINEAR&&this.config.antialias&&(n=s.LINEAR),A||"number"!=typeof t||"number"!=typeof e?this.createTexture2D(0,n,n,o,o,s.RGBA,A):this.createTexture2D(0,n,n,o,o,s.RGBA,null,t,e)},createTexture2D:function(A,t,e,i,s,n,r,o,a,h,l,c){h=null==h||h,void 0===l&&(l=!1),void 0===c&&(c=!1);var u=this.gl,d=u.createTexture();return this.setTexture2D(d,0),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,t),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,e),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,s),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,i),u.pixelStorei(u.UNPACK_PREMULTIPLY_ALPHA_WEBGL,h),u.pixelStorei(u.UNPACK_FLIP_Y_WEBGL,c),null==r?u.texImage2D(u.TEXTURE_2D,A,n,o,a,0,n,u.UNSIGNED_BYTE,null):(l||(o=r.width,a=r.height),u.texImage2D(u.TEXTURE_2D,A,n,n,u.UNSIGNED_BYTE,r)),this.setTexture2D(null,0),d.isAlphaPremultiplied=h,d.isRenderTexture=!1,d.width=o,d.height=a,this.nativeTextures.push(d),d},createFramebuffer:function(A,t,e,i){var s,n=this.gl,r=n.createFramebuffer();if(this.setFramebuffer(r),i){var o=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,o),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,A,t),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,o)}if(e.isRenderTexture=!0,e.isAlphaPremultiplied=!1,n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0),(s=n.checkFramebufferStatus(n.FRAMEBUFFER))!==n.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return r.renderTexture=e,this.setFramebuffer(null),r},createProgram:function(A,t){var e=this.gl,i=e.createProgram(),s=e.createShader(e.VERTEX_SHADER),n=e.createShader(e.FRAGMENT_SHADER);if(e.shaderSource(s,A),e.shaderSource(n,t),e.compileShader(s),e.compileShader(n),!e.getShaderParameter(s,e.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+e.getShaderInfoLog(s));if(!e.getShaderParameter(n,e.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+e.getShaderInfoLog(n));if(e.attachShader(i,s),e.attachShader(i,n),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))throw new Error("Failed to link program:\n"+e.getProgramInfoLog(i));return i},createVertexBuffer:function(A,t){var e=this.gl,i=e.createBuffer();return this.setVertexBuffer(i),e.bufferData(e.ARRAY_BUFFER,A,t),this.setVertexBuffer(null),i},createIndexBuffer:function(A,t){var e=this.gl,i=e.createBuffer();return this.setIndexBuffer(i),e.bufferData(e.ELEMENT_ARRAY_BUFFER,A,t),this.setIndexBuffer(null),i},deleteTexture:function(A){var t=this.nativeTextures.indexOf(A);return-1!==t&&c(this.nativeTextures,t),this.gl.deleteTexture(A),this.currentTextures[0]!==A||this.game.pendingDestroy||this.setBlankTexture(!0),this},deleteFramebuffer:function(A){return this.gl.deleteFramebuffer(A),this},deleteProgram:function(A){return this.gl.deleteProgram(A),this},deleteBuffer:function(A){return this.gl.deleteBuffer(A),this},preRenderCamera:function(A){var t=A._cx,e=A._cy,i=A._cw,n=A._ch,r=this.pipelines.TextureTintPipeline,o=A.backgroundColor;if(A.renderToTexture){this.flush(),this.pushScissor(t,e,i,-n),this.setFramebuffer(A.framebuffer);var a=this.gl;a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),r.projOrtho(t,i+t,e,n+e,-1e3,1e3),A.mask&&(this.currentCameraMask.mask=A.mask,this.currentCameraMask.camera=A._maskCamera,A.mask.preRenderWebGL(this,A,A._maskCamera)),o.alphaGL>0&&r.drawFillRect(t,e,i+t,n+e,g.getTintFromFloats(o.redGL,o.greenGL,o.blueGL,1),o.alphaGL),A.emit(s.PRE_RENDER,A)}else this.pushScissor(t,e,i,n),A.mask&&(this.currentCameraMask.mask=A.mask,this.currentCameraMask.camera=A._maskCamera,A.mask.preRenderWebGL(this,A,A._maskCamera)),o.alphaGL>0&&r.drawFillRect(t,e,i,n,g.getTintFromFloats(o.redGL,o.greenGL,o.blueGL,1),o.alphaGL)},getCurrentStencilMask:function(){var A=null,t=this.maskStack,e=this.currentCameraMask;return t.length>0?A=t[t.length-1]:e.mask&&e.mask.isStencil&&(A=e),A},postRenderCamera:function(A){var t=this.pipelines.TextureTintPipeline;if(A.flashEffect.postRenderWebGL(t,g.getTintFromFloats),A.fadeEffect.postRenderWebGL(t,g.getTintFromFloats),A.dirty=!1,this.popScissor(),A.renderToTexture){t.flush(),this.setFramebuffer(null),A.emit(s.POST_RENDER,A),t.projOrtho(0,t.width,t.height,0,-1e3,1e3);var e=g.getTintAppendFloatAlpha;(A.pipeline?A.pipeline:t).batchTexture(A,A.glTexture,A.width,A.height,A.x,A.y,A.width,A.height,A.zoom,A.zoom,A.rotation,A.flipX,!A.flipY,1,1,0,0,0,0,A.width,A.height,e(A._tintTL,A._alphaTL),e(A._tintTR,A._alphaTR),e(A._tintBL,A._alphaBL),e(A._tintBR,A._alphaBR),A._isTinted&&A.tintFill,0,0,this.defaultCamera,null),this.setBlankTexture(!0)}A.mask&&(this.currentCameraMask.mask=null,A.mask.postRenderWebGL(this,A._maskCamera))},preRender:function(){if(!this.contextLost){var A=this.gl,t=this.pipelines;if(A.bindFramebuffer(A.FRAMEBUFFER,null),this.config.clearBeforeRender){var e=this.config.backgroundColor;A.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),A.clear(A.COLOR_BUFFER_BIT|A.DEPTH_BUFFER_BIT|A.STENCIL_BUFFER_BIT)}for(var i in A.enable(A.SCISSOR_TEST),t)t[i].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&A.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(A,t,e,i){if(!this.contextLost){var s=t.list,n=s.length,o=this.pipelines;for(var a in o)o[a].onRender(A,i);if(this.preRenderCamera(i),0===n)return this.setBlendMode(r.BlendModes.NORMAL),void this.postRenderCamera(i);this.currentType="";for(var h=this.currentMask,l=0;l0&&n>0&&(this.setTexture2D(t,0),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,e),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,A),t.width=s,t.height=n,this.setTexture2D(null,0)),t},createVideoTexture:function(A,t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.gl,s=A.videoWidth,n=A.videoHeight,r=i.CLAMP_TO_EDGE;!t&&a(s,n)&&(r=i.REPEAT);var o=this.config.antialias?i.LINEAR:i.NEAREST;return this.createTexture2D(0,o,o,r,r,i.RGBA,A,s,n,!0,!0,e)},updateVideoTexture:function(A,t,e){void 0===e&&(e=!1);var i=this.gl,s=A.videoWidth,n=A.videoHeight;return s>0&&n>0&&(this.setTexture2D(t,0),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,e),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,A),t.width=s,t.height=n,this.setTexture2D(null,0)),t},setTextureFilter:function(A,t){var e=this.gl,i=[e.LINEAR,e.NEAREST][t];return this.setTexture2D(A,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,i),this.setTexture2D(null,0),this},setFloat1:function(A,t,e){return this.setProgram(A),this.gl.uniform1f(this.gl.getUniformLocation(A,t),e),this},setFloat2:function(A,t,e,i){return this.setProgram(A),this.gl.uniform2f(this.gl.getUniformLocation(A,t),e,i),this},setFloat3:function(A,t,e,i,s){return this.setProgram(A),this.gl.uniform3f(this.gl.getUniformLocation(A,t),e,i,s),this},setFloat4:function(A,t,e,i,s,n){return this.setProgram(A),this.gl.uniform4f(this.gl.getUniformLocation(A,t),e,i,s,n),this},setFloat1v:function(A,t,e){return this.setProgram(A),this.gl.uniform1fv(this.gl.getUniformLocation(A,t),e),this},setFloat2v:function(A,t,e){return this.setProgram(A),this.gl.uniform2fv(this.gl.getUniformLocation(A,t),e),this},setFloat3v:function(A,t,e){return this.setProgram(A),this.gl.uniform3fv(this.gl.getUniformLocation(A,t),e),this},setFloat4v:function(A,t,e){return this.setProgram(A),this.gl.uniform4fv(this.gl.getUniformLocation(A,t),e),this},setInt1:function(A,t,e){return this.setProgram(A),this.gl.uniform1i(this.gl.getUniformLocation(A,t),e),this},setInt2:function(A,t,e,i){return this.setProgram(A),this.gl.uniform2i(this.gl.getUniformLocation(A,t),e,i),this},setInt3:function(A,t,e,i,s){return this.setProgram(A),this.gl.uniform3i(this.gl.getUniformLocation(A,t),e,i,s),this},setInt4:function(A,t,e,i,s,n){return this.setProgram(A),this.gl.uniform4i(this.gl.getUniformLocation(A,t),e,i,s,n),this},setMatrix2:function(A,t,e,i){return this.setProgram(A),this.gl.uniformMatrix2fv(this.gl.getUniformLocation(A,t),e,i),this},setMatrix3:function(A,t,e,i){return this.setProgram(A),this.gl.uniformMatrix3fv(this.gl.getUniformLocation(A,t),e,i),this},setMatrix4:function(A,t,e,i){return this.setProgram(A),this.gl.uniformMatrix4fv(this.gl.getUniformLocation(A,t),e,i),this},getMaxTextures:function(){return this.config.maxTextures},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){for(var A=0;A0&&this.flush();var t=this.inverseRotationMatrix;if(A){var e=-A,i=Math.cos(e),s=Math.sin(e);t[1]=s,t[3]=-s,t[0]=t[4]=i}else t[0]=t[4]=1,t[1]=t[3]=0;this.renderer.setMatrix3(this.program,"uInverseRotationMatrix",!1,t),this.currentNormalMapRotation=A}},batchSprite:function(A,t,e){if(this.active){var i=A.texture.dataSource[A.frame.sourceIndex];i&&(this.renderer.setPipeline(this),this.setTexture2D(i.glTexture,1),this.setNormalMapRotation(A.rotation),n.prototype.batchSprite.call(this,A,t,e))}}});o.LIGHT_COUNT=r,A.exports=o},function(A,t){var e={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),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},mvpUpdate:function(){var A=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(A,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(A,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(A,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var A=this.modelMatrix;return A[0]=1,A[1]=0,A[2]=0,A[3]=0,A[4]=0,A[5]=1,A[6]=0,A[7]=0,A[8]=0,A[9]=0,A[10]=1,A[11]=0,A[12]=0,A[13]=0,A[14]=0,A[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(A,t,e){var i=this.modelMatrix;return i[0]=i[0]*A,i[1]=i[1]*A,i[2]=i[2]*A,i[3]=i[3]*A,i[4]=i[4]*t,i[5]=i[5]*t,i[6]=i[6]*t,i[7]=i[7]*t,i[8]=i[8]*e,i[9]=i[9]*e,i[10]=i[10]*e,i[11]=i[11]*e,this.modelMatrixDirty=!0,this},modelTranslate:function(A,t,e){var i=this.modelMatrix;return i[12]=i[0]*A+i[4]*t+i[8]*e+i[12],i[13]=i[1]*A+i[5]*t+i[9]*e+i[13],i[14]=i[2]*A+i[6]*t+i[10]*e+i[14],i[15]=i[3]*A+i[7]*t+i[11]*e+i[15],this.modelMatrixDirty=!0,this},modelRotateX:function(A){var t=this.modelMatrix,e=Math.sin(A),i=Math.cos(A),s=t[4],n=t[5],r=t[6],o=t[7],a=t[8],h=t[9],l=t[10],c=t[11];return t[4]=s*i+a*e,t[5]=n*i+h*e,t[6]=r*i+l*e,t[7]=o*i+c*e,t[8]=a*i-s*e,t[9]=h*i-n*e,t[10]=l*i-r*e,t[11]=c*i-o*e,this.modelMatrixDirty=!0,this},modelRotateY:function(A){var t=this.modelMatrix,e=Math.sin(A),i=Math.cos(A),s=t[0],n=t[1],r=t[2],o=t[3],a=t[8],h=t[9],l=t[10],c=t[11];return t[0]=s*i-a*e,t[1]=n*i-h*e,t[2]=r*i-l*e,t[3]=o*i-c*e,t[8]=s*e+a*i,t[9]=n*e+h*i,t[10]=r*e+l*i,t[11]=o*e+c*i,this.modelMatrixDirty=!0,this},modelRotateZ:function(A){var t=this.modelMatrix,e=Math.sin(A),i=Math.cos(A),s=t[0],n=t[1],r=t[2],o=t[3],a=t[4],h=t[5],l=t[6],c=t[7];return t[0]=s*i+a*e,t[1]=n*i+h*e,t[2]=r*i+l*e,t[3]=o*i+c*e,t[4]=a*i-s*e,t[5]=h*i-n*e,t[6]=l*i-r*e,t[7]=c*i-o*e,this.modelMatrixDirty=!0,this},viewIdentity:function(){var A=this.viewMatrix;return A[0]=1,A[1]=0,A[2]=0,A[3]=0,A[4]=0,A[5]=1,A[6]=0,A[7]=0,A[8]=0,A[9]=0,A[10]=1,A[11]=0,A[12]=0,A[13]=0,A[14]=0,A[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(A,t,e){var i=this.viewMatrix;return i[0]=i[0]*A,i[1]=i[1]*A,i[2]=i[2]*A,i[3]=i[3]*A,i[4]=i[4]*t,i[5]=i[5]*t,i[6]=i[6]*t,i[7]=i[7]*t,i[8]=i[8]*e,i[9]=i[9]*e,i[10]=i[10]*e,i[11]=i[11]*e,this.viewMatrixDirty=!0,this},viewTranslate:function(A,t,e){var i=this.viewMatrix;return i[12]=i[0]*A+i[4]*t+i[8]*e+i[12],i[13]=i[1]*A+i[5]*t+i[9]*e+i[13],i[14]=i[2]*A+i[6]*t+i[10]*e+i[14],i[15]=i[3]*A+i[7]*t+i[11]*e+i[15],this.viewMatrixDirty=!0,this},viewRotateX:function(A){var t=this.viewMatrix,e=Math.sin(A),i=Math.cos(A),s=t[4],n=t[5],r=t[6],o=t[7],a=t[8],h=t[9],l=t[10],c=t[11];return t[4]=s*i+a*e,t[5]=n*i+h*e,t[6]=r*i+l*e,t[7]=o*i+c*e,t[8]=a*i-s*e,t[9]=h*i-n*e,t[10]=l*i-r*e,t[11]=c*i-o*e,this.viewMatrixDirty=!0,this},viewRotateY:function(A){var t=this.viewMatrix,e=Math.sin(A),i=Math.cos(A),s=t[0],n=t[1],r=t[2],o=t[3],a=t[8],h=t[9],l=t[10],c=t[11];return t[0]=s*i-a*e,t[1]=n*i-h*e,t[2]=r*i-l*e,t[3]=o*i-c*e,t[8]=s*e+a*i,t[9]=n*e+h*i,t[10]=r*e+l*i,t[11]=o*e+c*i,this.viewMatrixDirty=!0,this},viewRotateZ:function(A){var t=this.viewMatrix,e=Math.sin(A),i=Math.cos(A),s=t[0],n=t[1],r=t[2],o=t[3],a=t[4],h=t[5],l=t[6],c=t[7];return t[0]=s*i+a*e,t[1]=n*i+h*e,t[2]=r*i+l*e,t[3]=o*i+c*e,t[4]=a*i-s*e,t[5]=h*i-n*e,t[6]=l*i-r*e,t[7]=c*i-o*e,this.viewMatrixDirty=!0,this},viewLoad2D:function(A){var t=this.viewMatrix;return t[0]=A[0],t[1]=A[1],t[2]=0,t[3]=0,t[4]=A[2],t[5]=A[3],t[6]=0,t[7]=0,t[8]=A[4],t[9]=A[5],t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(A){var t=this.viewMatrix;return t[0]=A[0],t[1]=A[1],t[2]=A[2],t[3]=A[3],t[4]=A[4],t[5]=A[5],t[6]=A[6],t[7]=A[7],t[8]=A[8],t[9]=A[9],t[10]=A[10],t[11]=A[11],t[12]=A[12],t[13]=A[13],t[14]=A[14],t[15]=A[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var A=this.projectionMatrix;return A[0]=1,A[1]=0,A[2]=0,A[3]=0,A[4]=0,A[5]=1,A[6]=0,A[7]=0,A[8]=0,A[9]=0,A[10]=1,A[11]=0,A[12]=0,A[13]=0,A[14]=0,A[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(A,t,e,i,s,n){var r=this.projectionMatrix,o=1/(A-t),a=1/(e-i),h=1/(s-n);return r[0]=-2*o,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*a,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*h,r[11]=0,r[12]=(A+t)*o,r[13]=(i+e)*a,r[14]=(n+s)*h,r[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(A,t,e,i){var s=this.projectionMatrix,n=1/Math.tan(A/2),r=1/(e-i);return s[0]=n/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=n,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(i+e)*r,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*i*e*r,s[15]=0,this.projectionMatrixDirty=!0,this}};A.exports=e},function(A,t,e){var i=e(33);A.exports=function(A){var t=A.config;if(!t.hideBanner){var e="WebGL";t.renderType===i.CANVAS?e="Canvas":t.renderType===i.HEADLESS&&(e="Headless");var s,n=t.audio,r=A.device.audio;if(s=!r.webAudio||n&&n.disableWebAudio?n&&n.noAudio||!r.webAudio&&!r.audioData?"No Audio":"HTML5 Audio":"Web Audio",A.device.browser.ie)window.console&&console.log("Phaser v"+i.VERSION+" / https://phaser.io");else{var o,a="",h=[a];if(Array.isArray(t.bannerBackgroundColor))t.bannerBackgroundColor.forEach((function(A){a=a.concat("%c "),h.push("background: "+A),o=A})),h[h.length-1]="color: "+t.bannerTextColor+"; background: "+o;else a=a.concat("%c "),h.push("color: "+t.bannerTextColor+"; background: "+t.bannerBackgroundColor);h.push("background: #fff"),t.gameTitle&&(a=a.concat(t.gameTitle),t.gameVersion&&(a=a.concat(" v"+t.gameVersion)),t.hidePhaser||(a=a.concat(" / ")));t.hidePhaser||(a=a.concat("Phaser v"+i.VERSION+"-FB ("+e+" | "+s+")")),a=a.concat(" %c "+t.gameURL),h[0]=a,console.log.apply(console,h)}}}},function(A,t,e){var i=e(0),s=e(6),n=e(1),r=e(355),o=new i({initialize:function(A,t){this.game=A,this.raf=new r,this.started=!1,this.running=!1,this.minFps=s(t,"min",5),this.targetFps=s(t,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=n,this.forceSetTimeOut=s(t,"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=s(t,"deltaHistory",10),this.panicMax=s(t,"panicMax",120),this.rawDelta=0,this.now=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 A=window.performance.now();this.time=A,this.lastTime=A,this.nextFpsUpdate=A+1e3,this.framesThisSecond=0;for(var t=0;t0||!this.inFocus)&&(this._coolDown--,n=Math.min(n,this._target)),n>this._min&&(n=i[e],n=Math.min(n,this._min)),i[e]=n,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var r=0,o=0;othis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=A+1e3,this.framesThisSecond=0),this.framesThisSecond++;var a=r/this._target;this.callback(A,r,a),this.lastTime=A,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(A){this.running?this.sleep():A&&(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=n,this.raf=null,this.game=null}});A.exports=o},function(A,t,e){var i=e(0),s=e(1),n=new i({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0;var A=this;this.step=function t(){var e=window.performance.now();A.lastTime=A.tick,A.tick=e,A.callback(e),A.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.max(16+A.lastTime-e,0);A.lastTime=A.tick,A.tick=e,A.callback(e),A.timeOutID=window.setTimeout(t,i)}},start:function(A,t){this.isRunning||(this.callback=A,this.isSetTimeOut=t,this.isRunning=!0,this.timeOutID=t?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=s}});A.exports=n},function(A,t,e){var i=e(20);A.exports=function(A){var t,e=A.events;if(void 0!==document.hidden)t="visibilitychange";else{["webkit","moz","ms"].forEach((function(A){void 0!==document[A+"Hidden"]&&(document.hidden=function(){return document[A+"Hidden"]},t=A+"visibilitychange")}))}t&&document.addEventListener(t,(function(A){document.hidden||"pause"===A.type?e.emit(i.HIDDEN):e.emit(i.VISIBLE)}),!1),window.onblur=function(){e.emit(i.BLUR)},window.onfocus=function(){e.emit(i.FOCUS)},window.focus&&A.config.autoFocus&&window.focus()}},function(A,t,e){var i=e(358),s=e(28),n=e(6);A.exports=function(A){var t=n(A,"data",[]),e=n(A,"canvas",null),r=n(A,"palette",i),o=n(A,"pixelWidth",1),a=n(A,"pixelHeight",o),h=n(A,"resizeCanvas",!0),l=n(A,"clearCanvas",!0),c=n(A,"preRender",null),u=n(A,"postRender",null),d=Math.floor(Math.abs(t[0].length*o)),g=Math.floor(Math.abs(t.length*a));e||(e=s.create2D(this,d,g),h=!1,l=!1),h&&(e.width=d,e.height=g);var p=e.getContext("2d");l&&p.clearRect(0,0,d,g),c&&c(e,p);for(var f=0;fe;)i-=e;ie.length-2?e.length-1:n+1],c=e[n>e.length-3?e.length-1:n+2];return t.set(i(o,a.x,h.x,l.x,c.x),i(o,a.y,h.y,l.y,c.y))},toJSON:function(){for(var A=[],t=0;t1&&(e-=1),e<1/6?A+6*(t-A)*e:e<.5?t:e<2/3?A+(t-A)*(2/3-e)*6:A}},function(A,t,e){var i=e(125);A.exports=function(A){if("complete"!==document.readyState&&"interactive"!==document.readyState){var t=function(){document.removeEventListener("deviceready",t,!0),document.removeEventListener("DOMContentLoaded",t,!0),window.removeEventListener("load",t,!0),A()};document.body?i.cordova?document.addEventListener("deviceready",t,!1):(document.addEventListener("DOMContentLoaded",t,!0),window.addEventListener("load",t,!0)):window.setTimeout(t,20)}else A()}},function(A,t,e){var i=e(193);A.exports=function(A,t){var e=window.screen,s=!!e&&(e.orientation||e.mozOrientation||e.msOrientation);if(s&&"string"==typeof s.type)return s.type;if("string"==typeof s)return s;if(e)return e.height>e.width?i.PORTRAIT:i.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?i.PORTRAIT:i.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return i.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return i.LANDSCAPE}return t>A?i.PORTRAIT:i.LANDSCAPE}},function(A,t){A.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(A,t){A.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(A,t){A.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(A,t){A.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(A,t){A.exports=function(A){var t;return""!==A&&("string"==typeof A?t=document.getElementById(A):A&&1===A.nodeType&&(t=A)),t||(t=document.body),t}},function(A,t){A.exports=function(A){var t="";try{if(window.DOMParser)t=(new DOMParser).parseFromString(A,"text/xml");else(t=new ActiveXObject("Microsoft.XMLDOM")).loadXML(A)}catch(A){t=null}return t&&t.documentElement&&!t.getElementsByTagName("parsererror").length?t:null}},function(A,t,e){var i=e(0),s=e(195),n=e(9),r=e(55),o=e(20),a=e(377),h=e(378),l=e(379),c=e(380),u=e(36),d=e(339),g=new i({initialize:function(A,t){this.game=A,this.scaleManager,this.canvas,this.config=t,this.enabled=!0,this.events=new n,this.isOver=!0,this.defaultCursor="",this.keyboard=t.inputKeyboard?new a(this):null,this.mouse=t.inputMouse?new h(this):null,this.touch=t.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=t.inputActivePointers,t.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var e=0;e<=this.pointersTotal;e++){var i=new l(this,e);i.smoothFactor=t.inputSmoothFactor,this.pointers.push(i)}this.mousePointer=t.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 u,this._tempMatrix2=new u,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],A.events.once(o.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(r.MANAGER_BOOT),this.game.events.on(o.PRE_RENDER,this.preRender,this),this.game.events.once(o.DESTROY,this.destroy,this)},setCanvasOver:function(A){this.isOver=!0,this.events.emit(r.GAME_OVER,A)},setCanvasOut:function(A){this.isOver=!1,this.events.emit(r.GAME_OUT,A)},preRender:function(){var A=this.game.loop.now,t=this.game.loop.delta,e=this.game.scene.getScenes(!0,!0);this.time=A,this.events.emit(r.MANAGER_UPDATE);for(var i=0;i10&&(A=10-this.pointersTotal);for(var e=0;e-1&&t.preventDefault()}},this.onKeyUp=function(t){if(!t.defaultPrevented&&A.enabled&&A.manager){A.queue.push(t),A.manager.useQueue||A.manager.events.emit(r.MANAGER_PROCESS);var e=t.altKey||t.ctrlKey||t.shiftKey||t.metaKey;A.preventDefault&&!e&&A.captures.indexOf(t.keyCode)>-1&&t.preventDefault()}};var t=this.target;t&&(t.addEventListener("keydown",this.onKeyDown,!1),t.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var A=this.target;A.removeEventListener("keydown",this.onKeyDown,!1),A.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(A){"string"==typeof A&&(A=A.split(",")),Array.isArray(A)||(A=[A]);for(var t=this.captures,e=0;e0},removeCapture:function(A){"string"==typeof A&&(A=A.split(",")),Array.isArray(A)||(A=[A]);for(var t=this.captures,e=0;e0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(n.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});A.exports=h},function(A,t,e){var i=e(0),s=e(182),n=e(55),r=e(0),o=new i({initialize:function(A){this.manager=A,this.capture=!0,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=r,this.onMouseDown=r,this.onMouseUp=r,this.onMouseDownWindow=r,this.onMouseUpWindow=r,this.onMouseOver=r,this.onMouseOut=r,this.onMouseWheel=r,this.pointerLockChange=r,A.events.once(n.MANAGER_BOOT,this.boot,this)},boot:function(){var A=this.manager.config;this.enabled=A.inputMouse,this.target=A.inputMouseEventTarget,this.capture=A.inputMouseCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,A.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",(function(A){return A.preventDefault(),!1})),this},requestPointerLock:function(){if(s.pointerLock){var A=this.target;A.requestPointerLock=A.requestPointerLock||A.mozRequestPointerLock||A.webkitRequestPointerLock,A.requestPointerLock()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var A=this,t=this.manager.canvas,e=window&&window.focus&&this.manager.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&A.enabled&&A.manager&&A.manager.enabled&&(A.manager.onMouseMove(t),A.capture&&t.preventDefault())},this.onMouseDown=function(i){e&&window.focus(),!i.defaultPrevented&&A.enabled&&A.manager&&A.manager.enabled&&(A.manager.onMouseDown(i),A.capture&&i.target===t&&i.preventDefault())},this.onMouseDownWindow=function(e){!e.defaultPrevented&&A.enabled&&A.manager&&A.manager.enabled&&e.target!==t&&A.manager.onMouseDown(e)},this.onMouseUp=function(e){!e.defaultPrevented&&A.enabled&&A.manager&&A.manager.enabled&&(A.manager.onMouseUp(e),A.capture&&e.target===t&&e.preventDefault())},this.onMouseUpWindow=function(e){!e.defaultPrevented&&A.enabled&&A.manager&&A.manager.enabled&&e.target!==t&&A.manager.onMouseUp(e)},this.onMouseOver=function(t){!t.defaultPrevented&&A.enabled&&A.manager&&A.manager.enabled&&A.manager.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&A.enabled&&A.manager&&A.manager.enabled&&A.manager.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&A.enabled&&A.manager&&A.manager.enabled&&A.manager.onMouseWheel(t)};var i=this.target;if(i){var n={passive:!0},r={passive:!1};i.addEventListener("mousemove",this.onMouseMove,this.capture?r:n),i.addEventListener("mousedown",this.onMouseDown,this.capture?r:n),i.addEventListener("mouseup",this.onMouseUp,this.capture?r:n),i.addEventListener("mouseover",this.onMouseOver,this.capture?r:n),i.addEventListener("mouseout",this.onMouseOut,this.capture?r:n),i.addEventListener("wheel",this.onMouseWheel,this.capture?r:n),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("mousedown",this.onMouseDownWindow,r),window.addEventListener("mouseup",this.onMouseUpWindow,r)),s.pointerLock&&(this.pointerLockChange=function(t){var e=A.target;A.locked=document.pointerLockElement===e||document.mozPointerLockElement===e||document.webkitPointerLockElement===e,A.manager.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var A=this.target;A.removeEventListener("mousemove",this.onMouseMove),A.removeEventListener("mousedown",this.onMouseDown),A.removeEventListener("mouseup",this.onMouseUp),A.removeEventListener("mouseover",this.onMouseOver),A.removeEventListener("mouseout",this.onMouseOut),window&&(window.removeEventListener("mousedown",this.onMouseDownWindow),window.removeEventListener("mouseup",this.onMouseUpWindow)),s.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}});A.exports=o},function(A,t,e){var i=e(322),s=e(0),n=e(65),r=e(184),o=e(331),a=e(3),h=new s({initialize:function(A,t){this.manager=A,this.id=t,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new a,this.prevPosition=new a,this.midPoint=new a(-1,-1),this.velocity=new a,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===t,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(A){var t=this.x,e=this.y;1!==A.resolution&&(t+=A._x,e+=A._y);var i=A.getWorldPoint(t,e);return this.worldX=i.x,this.worldY=i.y,this},positionToCamera:function(A,t){return A.getWorldPoint(this.x,this.y,t)},updateMotion:function(){var A=this.position.x,t=this.position.y,e=this.midPoint.x,s=this.midPoint.y;if(A!==e||t!==s){var n=o(this.motionFactor,e,A),a=o(this.motionFactor,s,t);r(n,A,.1)&&(n=A),r(a,t,.1)&&(a=t),this.midPoint.set(n,a);var h=A-n,l=t-a;this.velocity.set(h,l),this.angle=i(n,a,A,t),this.distance=Math.sqrt(h*h+l*l)}},up:function(A){"buttons"in A&&(this.buttons=A.buttons),this.event=A,this.button=A.button,this.upElement=A.target,this.manager.transformPointer(this,A.pageX,A.pageY,!1),0===A.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=A.timeStamp),this.isDown=!1,this.wasTouch=!1},down:function(A){"buttons"in A&&(this.buttons=A.buttons),this.event=A,this.button=A.button,this.downElement=A.target,this.manager.transformPointer(this,A.pageX,A.pageY,!1),0===A.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=A.timeStamp),this.isDown=!0,this.wasTouch=!1},move:function(A){"buttons"in A&&(this.buttons=A.buttons),this.event=A,this.manager.transformPointer(this,A.pageX,A.pageY,!0),this.locked&&(this.movementX=A.movementX||A.mozMovementX||A.webkitMovementX||0,this.movementY=A.movementY||A.mozMovementY||A.webkitMovementY||0),this.moveTime=A.timeStamp,this.wasTouch=!1},wheel:function(A){"buttons"in A&&(this.buttons=A.buttons),this.event=A,this.manager.transformPointer(this,A.pageX,A.pageY,!1),this.deltaX=A.deltaX,this.deltaY=A.deltaY,this.deltaZ=A.deltaZ,this.wasTouch=!1},touchstart:function(A,t){A.pointerId&&(this.pointerId=A.pointerId),this.identifier=A.identifier,this.target=A.target,this.active=!0,this.buttons=1,this.event=t,this.downElement=A.target,this.manager.transformPointer(this,A.pageX,A.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=t.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(A,t){this.event=t,this.manager.transformPointer(this,A.pageX,A.pageY,!0),this.moveTime=t.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(A,t){this.buttons=0,this.event=t,this.upElement=A.target,this.manager.transformPointer(this,A.pageX,A.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(A,t){this.buttons=0,this.event=t,this.upElement=A.target,this.manager.transformPointer(this,A.pageX,A.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?i(this.downX,this.downY,this.x,this.y):i(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(A,t){void 0===A&&(A=10),void 0===t&&(t=[]);for(var e=this.prevPosition.x,i=this.prevPosition.y,s=this.position.x,n=this.position.y,r=0;r0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),A.events.on(o.PRE_STEP,this.step,this),this.startListeners()},parseConfig:function(A){this.getParent(A),this.getParentBounds();var t=A.width,e=A.height,s=A.scaleMode,n=A.resolution,r=A.zoom,o=A.autoRound;if("string"==typeof t){var a=this.parentSize.width;0===a&&(a=window.innerWidth);var h=parseInt(t,10)/100;t=Math.floor(a*h)}if("string"==typeof e){var c=this.parentSize.height;0===c&&(c=window.innerHeight);var u=parseInt(e,10)/100;e=Math.floor(c*u)}this.resolution=1,this.scaleMode=s,this.autoRound=o,this.autoCenter=A.autoCenter,this.resizeInterval=A.resizeInterval,o&&(t=Math.floor(t),e=Math.floor(e)),this.gameSize.setSize(t,e),r===i.ZOOM.MAX_ZOOM&&(r=this.getMaxZoom()),this.zoom=r,1!==r&&(this._resetZoom=!0),this.baseSize.setSize(t*n,e*n),o&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),A.minWidth>0&&this.displaySize.setMin(A.minWidth*r,A.minHeight*r),A.maxWidth>0&&this.displaySize.setMax(A.maxWidth*r,A.maxHeight*r),this.displaySize.setSize(t,e),this.orientation=l(t,e)},getParent:function(A){var t=A.parent;if(null!==t){if(this.parent=h(t),this.parentIsWindow=this.parent===document.body,A.expandParent&&A.scaleMode!==i.SCALE_MODE.NONE){var e=this.parent.getBoundingClientRect();(this.parentIsWindow||0===e.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",e=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==e.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}A.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=h(A.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var A=this.parentSize,t=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(t.height=a(!0));var e=this.resolution,i=t.width*e,s=t.height*e;return(A.width!==i||A.height!==s)&&(A.setSize(i,s),!0)},lockOrientation:function(A){var t=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!t&&t(A)},setParentSize:function(A,t){return this.parentSize.setSize(A,t),this.refresh()},setGameSize:function(A,t){var e=this.autoRound,i=this.resolution;e&&(A=Math.floor(A),t=Math.floor(t));var s=this.width,n=this.height;return this.gameSize.resize(A,t),this.baseSize.resize(A*i,t*i),e&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(A,t),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,n)},resize:function(A,t){var e=this.zoom,i=this.resolution,s=this.autoRound;s&&(A=Math.floor(A),t=Math.floor(t));var n=this.width,r=this.height;this.gameSize.resize(A,t),this.baseSize.resize(A*i,t*i),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(A*e*i,t*e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var o=this.canvas.style,a=A*e,h=t*e;return s&&(a=Math.floor(a),h=Math.floor(h)),a===A&&h===t||(o.width=a+"px",o.height=h+"px"),this.refresh(n,r)},setZoom:function(A){return this.zoom=A,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(A,t){void 0===A&&(A=this.width),void 0===t&&(t=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var e=this.game.domContainer;if(e){this.baseSize.setCSS(e);var i=this.canvas.style,s=e.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=i.marginLeft,s.marginTop=i.marginTop}return this.emit(r.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution,A,t),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var A=l(this.width,this.height);A!==this.orientation&&(this.orientation=A,this.emit(r.ORIENTATION_CHANGE,A))}},updateScale:function(){var A,t,e=this.canvas.style,s=this.gameSize.width,n=this.gameSize.height,r=this.zoom,o=this.autoRound;this.scaleMode===i.SCALE_MODE.NONE?(this.displaySize.setSize(s*r*1,n*r*1),A=this.displaySize.width/1,t=this.displaySize.height/1,o&&(A=Math.floor(A),t=Math.floor(t)),this._resetZoom&&(e.width=A+"px",e.height=t+"px",this._resetZoom=!1)):this.scaleMode===i.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(1*this.displaySize.width,1*this.displaySize.height),A=this.displaySize.width/1,t=this.displaySize.height/1,o&&(A=Math.floor(A),t=Math.floor(t)),this.canvas.width=A,this.canvas.height=t):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),A=this.displaySize.width/1,t=this.displaySize.height/1,o&&(A=Math.floor(A),t=Math.floor(t)),e.width=A+"px",e.height=t+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var A=g(this.parentSize.width,this.gameSize.width,0,!0),t=g(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(A,t),1)},updateCenter:function(){var A=this.autoCenter;if(A!==i.CENTER.NO_CENTER){var t=this.canvas,e=t.style,s=t.getBoundingClientRect(),n=s.width,r=s.height,o=Math.floor((this.parentSize.width-n)/2),a=Math.floor((this.parentSize.height-r)/2);A===i.CENTER.CENTER_HORIZONTALLY?a=0:A===i.CENTER.CENTER_VERTICALLY&&(o=0),e.marginLeft=o+"px",e.marginTop=a+"px"}},updateBounds:function(){var A=this.canvasBounds,t=this.canvas.getBoundingClientRect();A.x=t.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),A.y=t.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),A.width=t.width,A.height=t.height},transformX:function(A){return(A-this.canvasBounds.left)*this.displayScale.x},transformY:function(A){return(A-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(A){void 0===A&&(A={navigationUI:"hide"});var t=this.fullscreen;if(t.available){if(!t.active){var e,i=this.getFullscreenTarget();this._requestedFullscreenChange=!0,(e=t.keyboard?i[t.request](Element.ALLOW_KEYBOARD_INPUT):i[t.request](A))?e.then(this.fullscreenSuccessHandler.bind(this)).catch(this.fullscreenErrorHandler.bind(this)):t.active?this.fullscreenSuccessHandler():this.fullscreenErrorHandler()}}else this.emit(r.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(r.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(A){this.removeFullscreenTarget(),this.emit(r.FULLSCREEN_FAILED,A)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var A=document.createElement("div");A.style.margin="0",A.style.padding="0",A.style.width="100%",A.style.height="100%",this.fullscreenTarget=A,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var A=this.fullscreenTarget;if(A&&A.parentNode){var t=A.parentNode;t.insertBefore(this.canvas,A),t.removeChild(A)}}},stopFullscreen:function(){var A=this.fullscreen;if(!A.available)return this.emit(r.FULLSCREEN_UNSUPPORTED),!1;A.active&&(this._requestedFullscreenChange=!0,document[A.cancel]()),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(r.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(A){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(A)},startListeners:function(){var A=this,t=this.listeners;if(t.orientationChange=function(){A._checkOrientation=!0,A.dirty=!0},t.windowResize=function(){A.dirty=!0},window.addEventListener("orientationchange",t.orientationChange,!1),window.addEventListener("resize",t.windowResize,!1),this.fullscreen.available){t.fullScreenChange=function(t){return A.onFullScreenChange(t)},t.fullScreenError=function(t){return A.onFullScreenError(t)};["webkit","moz",""].forEach((function(A){document.addEventListener(A+"fullscreenchange",t.fullScreenChange,!1),document.addEventListener(A+"fullscreenerror",t.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.addEventListener("MSFullscreenError",t.fullScreenError,!1)}},onFullScreenChange:function(){this._requestedFullscreenChange||this.stopFullscreen(),this._requestedFullscreenChange=!1},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(A,t){this.parent&&(this._lastCheck+=t,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var A=this.listeners;window.removeEventListener("orientationchange",A.orientationChange,!1),window.removeEventListener("resize",A.windowResize,!1);["webkit","moz",""].forEach((function(t){document.removeEventListener(t+"fullscreenchange",A.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",A.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",A.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",A.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===i.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===i.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});A.exports=f},function(A,t,e){var i=e(24),s=e(0),n=e(106),r=e(3),o=new s({initialize:function(A,t,e,i){void 0===A&&(A=0),void 0===t&&(t=A),void 0===e&&(e=0),void 0===i&&(i=null),this._width=A,this._height=t,this._parent=i,this.aspectMode=e,this.aspectRatio=0===t?1:A/t,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new r},setAspectMode:function(A){return void 0===A&&(A=0),this.aspectMode=A,this.setSize(this._width,this._height)},setSnap:function(A,t){return void 0===A&&(A=0),void 0===t&&(t=A),this.snapTo.set(A,t),this.setSize(this._width,this._height)},setParent:function(A){return this._parent=A,this.setSize(this._width,this._height)},setMin:function(A,t){return void 0===A&&(A=0),void 0===t&&(t=A),this.minWidth=i(A,0,this.maxWidth),this.minHeight=i(t,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(A,t){return void 0===A&&(A=Number.MAX_VALUE),void 0===t&&(t=A),this.maxWidth=i(A,this.minWidth,Number.MAX_VALUE),this.maxHeight=i(t,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(A,t){switch(void 0===A&&(A=0),void 0===t&&(t=A),this.aspectMode){case o.NONE:this._width=this.getNewWidth(n(A,this.snapTo.x)),this._height=this.getNewHeight(n(t,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case o.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(n(A,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case o.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(n(t,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case o.FIT:this.constrain(A,t,!0);break;case o.ENVELOP:this.constrain(A,t,!1)}return this},setAspectRatio:function(A){return this.aspectRatio=A,this.setSize(this._width,this._height)},resize:function(A,t){return this._width=this.getNewWidth(n(A,this.snapTo.x)),this._height=this.getNewHeight(n(t,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(A,t){return void 0===t&&(t=!0),A=i(A,this.minWidth,this.maxWidth),t&&this._parent&&A>this._parent.width&&(A=Math.max(this.minWidth,this._parent.width)),A},getNewHeight:function(A,t){return void 0===t&&(t=!0),A=i(A,this.minHeight,this.maxHeight),t&&this._parent&&A>this._parent.height&&(A=Math.max(this.minHeight,this._parent.height)),A},constrain:function(A,t,e){void 0===A&&(A=0),void 0===t&&(t=A),void 0===e&&(e=!0),A=this.getNewWidth(A),t=this.getNewHeight(t);var i=this.snapTo,s=0===t?1:A/t;return e&&this.aspectRatio>s||!e&&this.aspectRatio0&&(A=(t=n(t,i.y))*this.aspectRatio)):(e&&this.aspectRatios)&&(A=(t=n(t,i.y))*this.aspectRatio,i.x>0&&(t=(A=n(A,i.x))*(1/this.aspectRatio))),this._width=A,this._height=t,this},fitTo:function(A,t){return this.constrain(A,t,!0)},envelop:function(A,t){return this.constrain(A,t,!1)},setWidth:function(A){return this.setSize(A,this._height)},setHeight:function(A){return this.setSize(this._width,A)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(A){A&&A.style&&(A.style.width=this._width+"px",A.style.height=this._height+"px")},copy:function(A){return A.setAspectMode(this.aspectMode),A.aspectRatio=this.aspectRatio,A.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(A){this.setSize(A,this._height)}},height:{get:function(){return this._height},set:function(A){this.setSize(this._width,A)}}});o.NONE=0,o.WIDTH_CONTROLS_HEIGHT=1,o.HEIGHT_CONTROLS_WIDTH=2,o.FIT=3,o.ENVELOP=4,A.exports=o},function(A,t,e){var i=e(0),s=e(133),n=e(21),r=e(20),o=e(6),a=e(88),h=e(1),l=e(385),c=e(196),u=new i({initialize:function(A,t){if(this.game=A,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,t){Array.isArray(t)||(t=[t]);for(var e=0;e-1&&(delete this.keys[i],this.scenes.splice(e,1),this._start.indexOf(i)>-1&&(e=this._start.indexOf(i),this._start.splice(e,1)),t.sys.destroy())}return this},bootScene:function(A){var t,e=A.sys,i=e.settings;A.init&&(A.init.call(A,i.data),i.status=s.INIT,i.isTransition&&e.events.emit(n.TRANSITION_INIT,i.transitionFrom,i.transitionDuration)),e.load&&(t=e.load).reset(),t&&A.preload?(A.preload.call(A),0===t.list.size?this.create(A):(i.status=s.LOADING,t.once(a.COMPLETE,this.loadComplete,this),t.start())):this.create(A)},loadComplete:function(A){var t=A.scene;this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(t)},payloadComplete:function(A){this.bootScene(A.scene)},update:function(A,t){this.processQueue(),this.isProcessing=!0;for(var e=this.scenes.length-1;e>=0;e--){var i=this.scenes[e].sys;i.settings.status>s.START&&i.settings.status<=s.RUNNING&&i.step(A,t)}},render:function(A){for(var t=0;t=s.LOADING&&e.settings.status0){var e=this.getScene(A);this.scenes.splice(t,1),this.scenes.unshift(e)}}return this},moveDown:function(A){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:A,keyB:null});else{var t=this.getIndex(A);if(t>0){var e=t-1,i=this.getScene(A),s=this.getAt(e);this.scenes[t]=s,this.scenes[e]=i}}return this},moveUp:function(A){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:A,keyB:null});else{var t=this.getIndex(A);if(t=n.x&&A=n.y&&t=n.x&&A=n.y&&t-1){var r=this.context.getImageData(A,t,1,1);r.data[0]=e,r.data[1]=i,r.data[2]=s,r.data[3]=n,this.context.putImageData(r,A,t)}return this},putData:function(A,t,e,i,s,n,r){return void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=A.width),void 0===r&&(r=A.height),this.context.putImageData(A,t,e,i,s,n,r),this},getData:function(A,t,e,i){return A=s(Math.floor(A),0,this.width-1),t=s(Math.floor(t),0,this.height-1),e=s(e,1,this.width-A),i=s(i,1,this.height-t),this.context.getImageData(A,t,e,i)},getPixel:function(A,t,e){e||(e=new n);var i=this.getIndex(A,t);if(i>-1){var s=this.data,r=s[i+0],o=s[i+1],a=s[i+2],h=s[i+3];e.setTo(r,o,a,h)}return e},getPixels:function(A,t,e,i){void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=this.width),void 0===i&&(i=e),A=Math.abs(Math.round(A)),t=Math.abs(Math.round(t));for(var r=s(A,0,this.width),o=s(A+e,0,this.width),a=s(t,0,this.height),h=s(t+i,0,this.height),l=new n,c=[],u=a;u0)&&(!!i.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(n.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!i.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(n.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!i.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(n.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var A=this.currentConfig.seek,t=this.currentConfig.delay,e=(this.currentMarker?this.currentMarker.start:0)+A;return this.previousTime=e,this.audio.currentTime=e,this.applyConfig(),0===t?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*t,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var A=0;A0)this.startTime=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,s-i),s=this.audio.currentTime):s=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(n.COMPLETE,this);this.previousTime=s}},destroy:function(){i.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=this.currentConfig.volume*this.manager.volume)},calculateRate:function(){i.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(A){this.currentConfig.mute=A,this.manager.isLocked(this,"mute",A)||(this.updateMute(),this.emit(n.MUTE,this,A))}},setMute:function(A){return this.mute=A,this},volume:{get:function(){return this.currentConfig.volume},set:function(A){this.currentConfig.volume=A,this.manager.isLocked(this,"volume",A)||(this.updateVolume(),this.emit(n.VOLUME,this,A))}},setVolume:function(A){return this.volume=A,this},rate:{get:function(){return this.currentConfig.rate},set:function(A){this.currentConfig.rate=A,this.manager.isLocked(this,n.RATE,A)||(this.calculateRate(),this.emit(n.RATE,this,A))}},setRate:function(A){return this.rate=A,this},detune:{get:function(){return this.currentConfig.detune},set:function(A){this.currentConfig.detune=A,this.manager.isLocked(this,n.DETUNE,A)||(this.calculateRate(),this.emit(n.DETUNE,this,A))}},setDetune:function(A){return this.detune=A,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(A){this.manager.isLocked(this,"seek",A)||this.startTime>0||(this.isPlaying||this.isPaused)&&(A=Math.min(Math.max(0,A),this.duration),this.isPlaying?(this.previousTime=A,this.audio.currentTime=A):this.isPaused&&(this.currentConfig.seek=A),this.emit(n.SEEK,this,A))}},setSeek:function(A){return this.seek=A,this},loop:{get:function(){return this.currentConfig.loop},set:function(A){this.currentConfig.loop=A,this.manager.isLocked(this,"loop",A)||(this.audio&&(this.audio.loop=A),this.emit(n.LOOP,this,A))}},setLoop:function(A){return this.loop=A,this}});A.exports=r},function(A,t,e){var i=e(134),s=e(0),n=e(9),r=e(395),o=e(1),a=new s({Extends:n,initialize:function(A){n.call(this),this.game=A,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(A,t){var e=new r(this,A,t);return this.sounds.push(e),e},addAudioSprite:function(A,t){var e=this.add(A,t);return e.spritemap={},e},play:function(A,t){return!1},playAudioSprite:function(A,t,e){return!1},remove:function(A){return i.prototype.remove.call(this,A)},removeByKey:function(A){return i.prototype.removeByKey.call(this,A)},pauseAll:o,resumeAll:o,stopAll:o,update:o,setRate:o,setDetune:o,setMute:o,setVolume:o,forEachActiveSound:function(A,t){i.prototype.forEachActiveSound.call(this,A,t)},destroy:function(){i.prototype.destroy.call(this)}});A.exports=a},function(A,t,e){var i=e(135),s=e(0),n=e(9),r=e(17),o=new s({Extends:n,initialize:function(A,t,e){void 0===e&&(e={}),n.call(this),this.manager=A,this.key=t,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=r({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},e),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(A){return!1},updateMarker:function(A){return!1},removeMarker:function(A){return null},play:function(A,t){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),i.prototype.destroy.call(this)}});A.exports=o},function(A,t,e){var i=e(397),s=e(134),n=e(0),r=e(66),o=e(398),a=new n({Extends:s,initialize:function(A){this.context=this.createAudioContext(A),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,A),this.locked&&this.unlock()},createAudioContext:function(A){var t=A.config.audio;return t&&t.context?(t.context.resume(),t.context):new AudioContext},add:function(A,t){var e=new o(this,A,t);return this.sounds.push(e),e},decodeAudio:function(A,t){var e;e=Array.isArray(A)?A:[{key:A,data:t}];for(var s=this.game.cache.audio,n=e.length,o=0;o>4,l[a++]=(15&e)<<4|s>>2,l[a++]=(3&s)<<6|63&n;return h}},function(A,t,e){var i=e(135),s=e(0),n=e(66),r=new s({Extends:i,initialize:function(A,t,e){void 0===e&&(e={}),this.audioBuffer=A.game.cache.audio.get(t),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=A.context.createGain(),this.volumeNode=A.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(A.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,i.call(this,A,t,e)):console.warn("Audio cache entry missing: "+t)},play:function(A,t){return!!i.prototype.play.call(this,A,t)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(n.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime1e3)return console.warn("Switch Game data too long. Max 1000 chars."),this;var e=this;return FBInstant.switchGameAsync(A,t).then((function(){e.emit("switchgame",A)})).catch((function(A){e.emit("switchgamefail",A)})),this},createShortcut:function(){var A=this;return FBInstant.canCreateShortcutAsync().then((function(t){t&&FBInstant.createShortcutAsync().then((function(){A.emit("shortcutcreated")})).catch((function(t){A.emit("shortcutfailed",t)}))})),this},quit:function(){FBInstant.quit()},log:function(A,t,e){return this.checkAPI("logEvent")?(void 0===e&&(e={}),A.length>=2&&A.length<=40&&FBInstant.logEvent(A,parseFloat(t),e),this):this},preloadAds:function(A){if(!this.checkAPI("getInterstitialAdAsync"))return this;var t;Array.isArray(A)||(A=[A]);var e=this,s=0;for(t=0;t=3)return console.warn("Too many AdInstances. Show an ad before loading more"),this;for(t=0;t=3)return console.warn("Too many AdInstances. Show an ad before loading more"),this;for(t=0;t-1;n--)i[s][n]=A[n][s]}return i}},function(A,t){function e(A,t,e){var i=A[t];A[t]=A[e],A[e]=i}function i(A,t){return At?1:0}var s=function(A,t,n,r,o){for(void 0===n&&(n=0),void 0===r&&(r=A.length-1),void 0===o&&(o=i);r>n;){if(r-n>600){var a=r-n+1,h=t-n+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(h-a/2<0?-1:1),d=Math.max(n,Math.floor(t-h*c/a+u)),g=Math.min(r,Math.floor(t+(a-h)*c/a+u));s(A,t,d,g,o)}var p=A[t],f=n,v=r;for(e(A,n,t),o(A[r],p)>0&&e(A,n,r);f0;)v--}0===o(A[n],p)?e(A,n,v):e(A,++v,r),v<=t&&(n=v+1),t<=v&&(r=v-1)}};A.exports=s},function(A,t,e){var i=e(6),s=e(123),n=function(A,t,e){for(var i=[],s=0;s>>16,y=(65280&g)>>>8,m=255&g,c.strokeStyle="rgba("+v+","+y+","+m+","+u+")",c.lineWidth=f,w+=3;break;case i.FILL_STYLE:p=h[w+1],d=h[w+2],v=(16711680&p)>>>16,y=(65280&p)>>>8,m=255&p,c.fillStyle="rgba("+v+","+y+","+m+","+d+")",w+=2;break;case i.BEGIN_PATH:c.beginPath();break;case i.CLOSE_PATH:c.closePath();break;case i.FILL_PATH:a||c.fill();break;case i.STROKE_PATH:a||c.stroke();break;case i.FILL_RECT:a?c.rect(h[w+1],h[w+2],h[w+3],h[w+4]):c.fillRect(h[w+1],h[w+2],h[w+3],h[w+4]),w+=4;break;case i.FILL_TRIANGLE:c.beginPath(),c.moveTo(h[w+1],h[w+2]),c.lineTo(h[w+3],h[w+4]),c.lineTo(h[w+5],h[w+6]),c.closePath(),a||c.fill(),w+=6;break;case i.STROKE_TRIANGLE:c.beginPath(),c.moveTo(h[w+1],h[w+2]),c.lineTo(h[w+3],h[w+4]),c.lineTo(h[w+5],h[w+6]),c.closePath(),a||c.stroke(),w+=6;break;case i.LINE_TO:c.lineTo(h[w+1],h[w+2]),w+=2;break;case i.MOVE_TO:c.moveTo(h[w+1],h[w+2]),w+=2;break;case i.LINE_FX_TO:c.lineTo(h[w+1],h[w+2]),w+=5;break;case i.MOVE_FX_TO:c.moveTo(h[w+1],h[w+2]),w+=5;break;case i.SAVE:c.save();break;case i.RESTORE:c.restore();break;case i.TRANSLATE:c.translate(h[w+1],h[w+2]),w+=2;break;case i.SCALE:c.scale(h[w+1],h[w+2]),w+=2;break;case i.ROTATE:c.rotate(h[w+1]),w+=1;break;case i.GRADIENT_FILL_STYLE:w+=5;break;case i.GRADIENT_LINE_STYLE:w+=6;break;case i.SET_TEXTURE:w+=2}}c.restore()}}},function(A,t,e){var i=e(0),s=e(2),n=new i({initialize:function(A,t,e,i,n){if("object"==typeof A){var r=A;A=s(r,"x",0),t=s(r,"y",0),e=s(r,"power",0),i=s(r,"epsilon",100),n=s(r,"gravity",50)}else void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=100),void 0===n&&(n=50);this.x=A,this.y=t,this.active=!0,this._gravity=n,this._power=0,this._epsilon=0,this.power=e,this.epsilon=i},update:function(A,t){var e=this.x-A.x,i=this.y-A.y,s=e*e+i*i;if(0!==s){var n=Math.sqrt(s);s0},resetPosition:function(){this.x=0,this.y=0},fire:function(A,t){var e=this.emitter;this.frame=e.getFrame(),e.emitZone&&e.emitZone.getPoint(this),void 0===A?(e.follow&&(this.x+=e.follow.x+e.followOffset.x),this.x+=e.x.onEmit(this,"x")):this.x+=A,void 0===t?(e.follow&&(this.y+=e.follow.y+e.followOffset.y),this.y+=e.y.onEmit(this,"y")):this.y+=t,this.life=e.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var i=e.speedX.onEmit(this,"speedX"),r=e.speedY?e.speedY.onEmit(this,"speedY"):i;if(e.radial){var o=s(e.angle.onEmit(this,"angle"));this.velocityX=Math.cos(o)*Math.abs(i),this.velocityY=Math.sin(o)*Math.abs(r)}else if(e.moveTo){var a=e.moveToX.onEmit(this,"moveToX"),h=e.moveToY?e.moveToY.onEmit(this,"moveToY"):a,l=Math.atan2(h-this.y,a-this.x),c=n(this.x,this.y,a,h)/(this.life/1e3);this.velocityX=Math.cos(l)*c,this.velocityY=Math.sin(l)*c}else this.velocityX=i,this.velocityY=r;e.acceleration&&(this.accelerationX=e.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=e.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=e.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=e.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=e.delay.onEmit(this,"delay"),this.scaleX=e.scaleX.onEmit(this,"scaleX"),this.scaleY=e.scaleY?e.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=e.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=e.bounce.onEmit(this,"bounce"),this.alpha=e.alpha.onEmit(this,"alpha"),this.tint=e.tint.onEmit(this,"tint")},computeVelocity:function(A,t,e,i){var s=this.velocityX,n=this.velocityY,r=this.accelerationX,o=this.accelerationY,a=this.maxVelocityX,h=this.maxVelocityY;s+=A.gravityX*e,n+=A.gravityY*e,r&&(s+=r*e),o&&(n+=o*e),s>a?s=a:s<-a&&(s=-a),n>h?n=h:n<-h&&(n=-h),this.velocityX=s,this.velocityY=n;for(var l=0;lt.right&&A.collideRight&&(this.x=t.right,this.velocityX*=e),this.yt.bottom&&A.collideBottom&&(this.y=t.bottom,this.velocityY*=e)},update:function(A,t,e){if(this.delayCurrent>0)return this.delayCurrent-=A,!1;var i=this.emitter,n=1-this.lifeCurrent/this.life;return this.lifeT=n,this.computeVelocity(i,A,t,e),this.x+=this.velocityX*t,this.y+=this.velocityY*t,i.bounds&&this.checkBounds(i),i.deathZone&&i.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=i.scaleX.onUpdate(this,"scaleX",n,this.scaleX),i.scaleY?this.scaleY=i.scaleY.onUpdate(this,"scaleY",n,this.scaleY):this.scaleY=this.scaleX,this.angle=i.rotate.onUpdate(this,"rotate",n,this.angle),this.rotation=s(this.angle),this.alpha=i.alpha.onUpdate(this,"alpha",n,this.alpha),this.tint=i.tint.onUpdate(this,"tint",n,this.tint),this.lifeCurrent-=A,this.lifeCurrent<=0)}});A.exports=r},function(A,t,e){var i=e(43),s=e(0),n=e(13),r=e(414),o=e(415),a=e(1029),h=e(2),l=e(201),c=e(416),u=e(93),d=e(412),g=e(417),p=e(12),f=e(138),v=e(3),y=e(64),m=new s({Mixins:[n.BlendMode,n.Mask,n.ScrollFactor,n.Visible],initialize:function(A,t){this.manager=A,this.texture=A.texture,this.frames=[A.defaultFrame],this.defaultFrame=A.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=d,this.x=new a(t,"x",0,!0),this.y=new a(t,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new a(t,"accelerationX",0,!0),this.accelerationY=new a(t,"accelerationY",0,!0),this.maxVelocityX=new a(t,"maxVelocityX",1e4,!0),this.maxVelocityY=new a(t,"maxVelocityY",1e4,!0),this.speedX=new a(t,"speedX",0,!0),this.speedY=new a(t,"speedY",0,!0),this.moveTo=!1,this.moveToX=new a(t,"moveToX",0,!0),this.moveToY=new a(t,"moveToY",0,!0),this.bounce=new a(t,"bounce",0,!0),this.scaleX=new a(t,"scaleX",1),this.scaleY=new a(t,"scaleY",1),this.tint=new a(t,"tint",4294967295),this.alpha=new a(t,"alpha",1),this.lifespan=new a(t,"lifespan",1e3,!0),this.angle=new a(t,"angle",{min:0,max:360},!0),this.rotate=new a(t,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new a(t,"quantity",1,!0),this.delay=new a(t,"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=i.NORMAL,this.follow=null,this.followOffset=new v,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,t&&this.fromJSON(t)},fromJSON:function(A){if(!A)return this;var t=0,e="";for(t=0;t0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(A,t){return void 0===A?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof A&&(this.emitCallback=A,t&&(this.emitCallbackScope=t)),this},onParticleDeath:function(A,t){return void 0===A?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof A&&(this.deathCallback=A,t&&(this.deathCallbackScope=t)),this},killAll:function(){for(var A=this.dead,t=this.alive;t.length>0;)A.push(t.pop());return this},forEachAlive:function(A,t){for(var e=this.alive,i=e.length,s=0;s0){var l=this.deathCallback,c=this.deathCallbackScope;for(r=a-1;r>=0;r--){var u=o[r];s.splice(u.index,1),n.push(u.particle),l&&l.call(c,u.particle),u.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=t,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(A,t){return A.y-t.y}});A.exports=m},function(A,t,e){var i=new(e(0))({initialize:function(A,t){this.source=A,this.killOnEnter=t},willKill:function(A){var t=this.source.contains(A.x,A.y);return t&&this.killOnEnter||!t&&!this.killOnEnter}});A.exports=i},function(A,t,e){var i=new(e(0))({initialize:function(A,t,e,i,s){void 0===i&&(i=!1),void 0===s&&(s=!0),this.source=A,this.points=[],this.quantity=t,this.stepRate=e,this.yoyo=i,this.counter=-1,this.seamless=s,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],t=this.points[this.points.length-1];A.x===t.x&&A.y===t.y&&this.points.pop()}var e=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){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var t=this.points[this.counter];t&&(A.x=t.x,A.y=t.y)}});A.exports=i},function(A,t){A.exports=function(A,t){for(var e=0;e0&&(s=-a.PI2+s%a.PI2):s>a.PI2?s=a.PI2:s<0&&(s=a.PI2+s%a.PI2);for(var l,c=[o+Math.cos(i)*e,h+Math.sin(i)*e];t<1;)l=s*t+i,c.push(o+Math.cos(l)*e,h+Math.sin(l)*e),t+=A;return l=s+i,c.push(o+Math.cos(l)*e,h+Math.sin(l)*e),c.push(o+Math.cos(i)*e,h+Math.sin(i)*e),this.pathIndexes=r(c),this.pathData=c,this}});A.exports=l},function(A,t,e){var i=e(0),s=e(1055),n=e(71),r=e(12),o=e(34),a=new i({Extends:o,Mixins:[s],initialize:function(A,t,e,i,s,n){void 0===t&&(t=0),void 0===e&&(e=0),o.call(this,A,"Curve",i),this._smoothness=32,this._curveBounds=new r,this.closePath=!1,this.setPosition(t,e),void 0!==s&&this.setFillStyle(s,n),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(A){this._smoothness=A,this.updateData()}},setSmoothness:function(A){return this._smoothness=A,this.updateData()},updateData:function(){var A=this._curveBounds,t=this._smoothness;this.geom.getBounds(A,t),this.setSize(A.width,A.height),this.updateDisplayOrigin();for(var e=[],i=this.geom.getPoints(t),s=0;sc+f)){var v=p.getPoint((l-c)/f);r.push(v);break}c+=f}return r}},function(A,t,e){var i=e(63),s=e(62);A.exports=function(A){for(var t=A.points,e=0,n=0;n0&&n.push(e([0,0],i[0])),t=0;t1&&n.push(e([0,0],i[i.length-1])),A.setTo(n)}},function(A,t,e){var i=e(0),s=e(12),n=e(34),r=e(1076),o=new i({Extends:n,Mixins:[r],initialize:function(A,t,e,i,r,o,a){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===r&&(r=128),n.call(this,A,"Rectangle",new s(0,0,i,r)),this.setPosition(t,e),this.setSize(i,r),void 0!==o&&this.setFillStyle(o,a),this.updateDisplayOrigin(),this.updateData()},updateData:function(){var A=[],t=this.geom,e=this._tempLine;return t.getLineA(e),A.push(e.x1,e.y1,e.x2,e.y2),t.getLineB(e),A.push(e.x2,e.y2),t.getLineC(e),A.push(e.x2,e.y2),t.getLineD(e),A.push(e.x2,e.y2),this.pathData=A,this}});A.exports=o},function(A,t,e){var i=e(1079),s=e(0),n=e(71),r=e(34),o=new s({Extends:r,Mixins:[i],initialize:function(A,t,e,i,s,n,o,a){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=5),void 0===s&&(s=32),void 0===n&&(n=64),r.call(this,A,"Star",null),this._points=i,this._innerRadius=s,this._outerRadius=n,this.setPosition(t,e),this.setSize(2*n,2*n),void 0!==o&&this.setFillStyle(o,a),this.updateDisplayOrigin(),this.updateData()},setPoints:function(A){return this._points=A,this.updateData()},setInnerRadius:function(A){return this._innerRadius=A,this.updateData()},setOuterRadius:function(A){return this._outerRadius=A,this.updateData()},points:{get:function(){return this._points},set:function(A){this._points=A,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(A){this._innerRadius=A,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(A){this._outerRadius=A,this.updateData()}},updateData:function(){var A=[],t=this._points,e=this._innerRadius,i=this._outerRadius,s=Math.PI/2*3,r=Math.PI/t,o=i,a=i;A.push(o,a+-i);for(var h=0;h=1)return e.x=n.x1,e.y=n.y1,e;var a=s(n),h=s(r),l=s(o),c=(a+h+l)*t,u=0;return ca+h?(u=(c-=a+h)/l,e.x=o.x1+(o.x2-o.x1)*u,e.y=o.y1+(o.y2-o.y1)*u):(u=(c-=a)/h,e.x=r.x1+(r.x2-r.x1)*u,e.y=r.y1+(r.y2-r.y1)*u),e}},function(A,t,e){var i=e(63),s=e(4);A.exports=function(A,t,e,n){void 0===n&&(n=[]);var r=A.getLineA(),o=A.getLineB(),a=A.getLineC(),h=i(r),l=i(o),c=i(a),u=h+l+c;t||(t=u/e);for(var d=0;dh+l?(p=(g-=h+l)/c,f.x=a.x1+(a.x2-a.x1)*p,f.y=a.y1+(a.y2-a.y1)*p):(p=(g-=h)/l,f.x=o.x1+(o.x2-o.x1)*p,f.y=o.y1+(o.y2-o.y1)*p),n.push(f)}return n}},function(A,t){A.exports=function(A,t,e){if(!A||"number"==typeof A)return!1;if(A.hasOwnProperty(t))return A[t]=e,!0;if(-1!==t.indexOf(".")){for(var i=t.split("."),s=A,n=A,r=0;r0?(a=this.lightPool.pop()).set(A,t,e,o[0],o[1],o[2],r):a=new s(A,t,e,o[0],o[1],o[2],r),this.lights.push(a),a},removeLight:function(A){var t=this.lights.indexOf(A);return t>=0&&(this.lightPool.push(A),this.lights.splice(t,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});A.exports=r},function(A,t,e){var i=e(52),s=e(17),n={Circle:e(1140),Ellipse:e(1150),Intersects:e(440),Line:e(1169),Point:e(1190),Polygon:e(1204),Rectangle:e(455),Triangle:e(1234)};n=s(!1,n,i),A.exports=n},function(A,t,e){A.exports={CircleToCircle:e(441),CircleToRectangle:e(442),GetCircleToCircle:e(1160),GetCircleToRectangle:e(1161),GetLineToCircle:e(221),GetLineToRectangle:e(223),GetRectangleIntersection:e(1162),GetRectangleToRectangle:e(1163),GetRectangleToTriangle:e(1164),GetTriangleToCircle:e(1165),GetTriangleToLine:e(447),GetTriangleToTriangle:e(1166),LineToCircle:e(222),LineToLine:e(95),LineToRectangle:e(443),PointToLine:e(451),PointToLineSegment:e(1167),RectangleToRectangle:e(141),RectangleToTriangle:e(444),RectangleToValues:e(1168),TriangleToCircle:e(446),TriangleToLine:e(448),TriangleToTriangle:e(449)}},function(A,t,e){var i=e(65);A.exports=function(A,t){return i(A.x,A.y,t.x,t.y)<=A.radius+t.radius}},function(A,t){A.exports=function(A,t){var e=t.width/2,i=t.height/2,s=Math.abs(A.x-t.x-e),n=Math.abs(A.y-t.y-i),r=e+A.radius,o=i+A.radius;if(s>r||n>o)return!1;if(s<=e||n<=i)return!0;var a=s-e,h=n-i;return a*a+h*h<=A.radius*A.radius}},function(A,t){A.exports=function(A,t){var e=A.x1,i=A.y1,s=A.x2,n=A.y2,r=t.x,o=t.y,a=t.right,h=t.bottom,l=0;if(e>=r&&e<=a&&i>=o&&i<=h||s>=r&&s<=a&&n>=o&&n<=h)return!0;if(e=r){if((l=i+(n-i)*(r-e)/(s-e))>o&&l<=h)return!0}else if(e>a&&s<=a&&(l=i+(n-i)*(a-e)/(s-e))>=o&&l<=h)return!0;if(i=o){if((l=e+(s-e)*(o-i)/(n-i))>=r&&l<=a)return!0}else if(i>h&&n<=h&&(l=e+(s-e)*(h-i)/(n-i))>=r&&l<=a)return!0;return!1}},function(A,t,e){var i=e(95),s=e(53),n=e(224),r=e(445);A.exports=function(A,t){if(t.left>A.right||t.rightA.bottom||t.bottom0}},function(A,t){A.exports=function(A,t){return void 0===t&&(t=[]),t.push({x:A.x,y:A.y}),t.push({x:A.right,y:A.y}),t.push({x:A.right,y:A.bottom}),t.push({x:A.x,y:A.bottom}),t}},function(A,t,e){var i=e(222),s=e(94);A.exports=function(A,t){return!(A.left>t.right||A.rightt.bottom||A.bottomt.right||A.rightt.bottom||A.bottom0||(c=s(t),(u=i(A,c,!0)).length>0)}},function(A,t){A.exports=function(A,t){return void 0===t&&(t=[]),t.push({x:A.x1,y:A.y1}),t.push({x:A.x2,y:A.y2}),t.push({x:A.x3,y:A.y3}),t}},function(A,t){A.exports=function(A,t,e){void 0===e&&(e=1);var i=t.x1,s=t.y1,n=t.x2,r=t.y2,o=A.x,a=A.y,h=(n-i)*(n-i)+(r-s)*(r-s);if(0===h)return!1;var l=((o-i)*(n-i)+(a-s)*(r-s))/h;if(l<0)return Math.sqrt((i-o)*(i-o)+(s-a)*(s-a))<=e;if(l>=0&&l<=1){var c=((s-a)*(n-i)-(i-o)*(r-s))/h;return Math.abs(c)*Math.sqrt(h)<=e}return Math.sqrt((n-o)*(n-o)+(r-a)*(r-a))<=e}},function(A,t,e){var i=e(25),s=e(64),n=e(96);A.exports=function(A){var t=n(A)-i.TAU;return s(t,-Math.PI,Math.PI)}},function(A,t){A.exports=function(A){return Math.sqrt(A.x*A.x+A.y*A.y)}},function(A,t){A.exports=function(A){return A.x*A.x+A.y*A.y}},function(A,t,e){var i=e(12);i.Area=e(1209),i.Ceil=e(1210),i.CeilAll=e(1211),i.CenterOn=e(180),i.Clone=e(1212),i.Contains=e(53),i.ContainsPoint=e(1213),i.ContainsRect=e(456),i.CopyFrom=e(1214),i.Decompose=e(445),i.Equals=e(1215),i.FitInside=e(1216),i.FitOutside=e(1217),i.Floor=e(1218),i.FloorAll=e(1219),i.FromPoints=e(192),i.GetAspectRatio=e(226),i.GetCenter=e(1220),i.GetPoint=e(163),i.GetPoints=e(279),i.GetSize=e(1221),i.Inflate=e(1222),i.Intersection=e(1223),i.MarchingAnts=e(290),i.MergePoints=e(1224),i.MergeRect=e(1225),i.MergeXY=e(1226),i.Offset=e(1227),i.OffsetPoint=e(1228),i.Overlaps=e(1229),i.Perimeter=e(121),i.PerimeterPoint=e(1230),i.Random=e(166),i.RandomOutside=e(1231),i.SameDimensions=e(1232),i.Scale=e(1233),i.Union=e(403),A.exports=i},function(A,t){A.exports=function(A,t){return!(t.width*t.height>A.width*A.height)&&(t.x>A.x&&t.xA.x&&t.rightA.y&&t.yA.y&&t.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,t,this,A),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,e,A,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,t,this,A),this.pad.emit(s.GAMEPAD_BUTTON_UP,e,A,this))},destroy:function(){this.pad=null,this.events=null}});A.exports=n},function(A,t,e){var i=e(461),s=e(462),n=e(0),r=e(9),o=e(3),a=new n({Extends:r,initialize:function(A,t){r.call(this),this.manager=A,this.pad=t,this.id=t.id,this.index=t.index;for(var e=[],n=0;n=2&&(this.leftStick.set(n[0].getValue(),n[1].getValue()),s>=4&&this.rightStick.set(n[2].getValue(),n[3].getValue()))},destroy:function(){var A;for(this.removeAllListeners(),this.manager=null,this.pad=null,A=0;A=n;for(e=0;e=n;)this._elapsed-=n,this.step(s)}},step:function(A){var t,e,i=this.bodies.entries,s=i.length;for(t=0;t0){var h=this.tree,l=this.staticTree;for(i=(e=a.entries).length,A=0;A-1&&g>p&&(A.velocity.normalize().scale(p),g=p),A.speed=g},separate:function(A,t,e,i,s){if(!A.enable||!t.enable||A.checkCollision.none||t.checkCollision.none||!this.intersects(A,t))return!1;if(e&&!1===e.call(i,A.gameObject,t.gameObject))return!1;if(A.isCircle&&t.isCircle)return this.separateCircle(A,t,s);if(A.isCircle!==t.isCircle){var n=A.isCircle?t:A,r=A.isCircle?A:t,o={x:n.x,y:n.y,right:n.right,bottom:n.bottom},a=r.center;if((a.yo.bottom)&&(a.xo.right))return this.separateCircle(A,t,s)}var h=!1,c=!1;this.forceX||Math.abs(this.gravity.y+A.gravity.y)n.right&&(s=a(r.x,r.y,n.right,n.y)-r.radius):r.y>n.bottom&&(r.xn.right&&(s=a(r.x,r.y,n.right,n.bottom)-r.radius)),s*=-1}else s=A.halfWidth+t.halfWidth-a(A.center.x,A.center.y,t.center.x,t.center.y);if(e||0===s||A.immovable&&t.immovable||A.customSeparateX||t.customSeparateX)return 0!==s&&(A.onOverlap||t.onOverlap)&&this.emit(l.OVERLAP,A.gameObject,t.gameObject,A,t),0!==s;var o=A.center.x-t.center.x,h=A.center.y-t.center.y,c=Math.sqrt(Math.pow(o,2)+Math.pow(h,2)),u=(t.center.x-A.center.x)/c||0,d=(t.center.y-A.center.y)/c||0,f=2*(A.velocity.x*u+A.velocity.y*d-t.velocity.x*u-t.velocity.y*d)/(A.mass+t.mass);A.immovable||(A.velocity.x=A.velocity.x-f*A.mass*u,A.velocity.y=A.velocity.y-f*A.mass*d),t.immovable||(t.velocity.x=t.velocity.x+f*t.mass*u,t.velocity.y=t.velocity.y+f*t.mass*d);var v=t.velocity.x-A.velocity.x,y=t.velocity.y-A.velocity.y,m=Math.atan2(y,v),w=this._frameTime;return A.immovable||t.immovable||(s/=2),A.immovable||(A.x+=A.velocity.x*w-s*Math.cos(m),A.y+=A.velocity.y*w-s*Math.sin(m)),t.immovable||(t.x+=t.velocity.x*w+s*Math.cos(m),t.y+=t.velocity.y*w+s*Math.sin(m)),A.velocity.x*=A.bounce.x,A.velocity.y*=A.bounce.y,t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,(A.onCollide||t.onCollide)&&this.emit(l.COLLIDE,A.gameObject,t.gameObject,A,t),!0},intersects:function(A,t){return A!==t&&(A.isCircle||t.isCircle?A.isCircle?t.isCircle?a(A.center.x,A.center.y,t.center.x,t.center.y)<=A.halfWidth+t.halfWidth:this.circleBodyIntersects(A,t):this.circleBodyIntersects(t,A):!(A.right<=t.position.x||A.bottom<=t.position.y||A.position.x>=t.right||A.position.y>=t.bottom))},circleBodyIntersects:function(A,t){var e=s(A.center.x,t.left,t.right),i=s(A.center.y,t.top,t.bottom);return(A.center.x-e)*(A.center.x-e)+(A.center.y-i)*(A.center.y-i)<=A.halfWidth*A.halfWidth},overlap:function(A,t,e,i,s){return void 0===e&&(e=null),void 0===i&&(i=null),void 0===s&&(s=e),this.collideObjects(A,t,e,i,s,!0)},collide:function(A,t,e,i,s){return void 0===e&&(e=null),void 0===i&&(i=null),void 0===s&&(s=e),this.collideObjects(A,t,e,i,s,!1)},collideObjects:function(A,t,e,i,s,n){var r,o;A.isParent&&void 0===A.physicsType&&(A=A.children.entries),t&&t.isParent&&void 0===t.physicsType&&(t=t.children.entries);var a=Array.isArray(A),h=Array.isArray(t);if(this._total=0,a||h)if(!a&&h)for(r=0;r0},collideHandler:function(A,t,e,i,s,n){if(void 0===t&&A.isParent)return this.collideGroupVsGroup(A,A,e,i,s,n);if(!A||!t)return!1;if(A.body){if(t.body)return this.collideSpriteVsSprite(A,t,e,i,s,n);if(t.isParent)return this.collideSpriteVsGroup(A,t,e,i,s,n);if(t.isTilemap)return this.collideSpriteVsTilemapLayer(A,t,e,i,s,n)}else if(A.isParent){if(t.body)return this.collideSpriteVsGroup(t,A,e,i,s,n);if(t.isParent)return this.collideGroupVsGroup(A,t,e,i,s,n);if(t.isTilemap)return this.collideGroupVsTilemapLayer(A,t,e,i,s,n)}else if(A.isTilemap){if(t.body)return this.collideSpriteVsTilemapLayer(t,A,e,i,s,n);if(t.isParent)return this.collideGroupVsTilemapLayer(t,A,e,i,s,n)}},collideSpriteVsSprite:function(A,t,e,i,s,n){return!(!A.body||!t.body)&&(this.separate(A.body,t.body,i,s,n)&&(e&&e.call(s,A,t),this._total++),!0)},collideSpriteVsGroup:function(A,t,e,i,s,n){var r,a,h,l=A.body;if(0!==t.length&&l&&l.enable)if(this.useTree){var c=this.treeMinMax;c.minX=l.left,c.minY=l.top,c.maxX=l.right,c.maxY=l.bottom;var u=t.physicsType===o.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(a=u.length,r=0;rc.baseTileWidth){var u=(c.tileWidth-c.baseTileWidth)*t.scaleX;o-=u,h+=u}c.tileHeight>c.baseTileHeight&&(l+=(c.tileHeight-c.baseTileHeight)*t.scaleY);var d=t.getTilesWithinWorldXY(o,a,h,l);return 0!==d.length&&this.collideSpriteVsTilesHandler(A,d,e,i,s,n,!0)},collideSpriteVsTilesHandler:function(A,t,e,i,s,n,r){for(var o,a,h=A.body,c={left:0,right:0,top:0,bottom:0},u=!1,d=0;d0&&A>e&&(A=e)),0!==i&&0!==t&&(t<0&&t<-i?t=-i:t>0&&t>i&&(t=i)),this.gameObject.x+=A,this.gameObject.y+=t}A<0?this.facing=s.FACING_LEFT:A>0&&(this.facing=s.FACING_RIGHT),t<0?this.facing=s.FACING_UP:t>0&&(this.facing=s.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ())},setBoundsRectangle:function(A){return this.customBoundsRectangle=A||this.world.bounds,this},checkWorldBounds:function(){var A=this.position,t=this.customBoundsRectangle,e=this.world.checkCollision,i=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y,n=!1;return A.xt.right&&e.right&&(A.x=t.right-this.width,this.velocity.x*=i,this.blocked.right=!0,n=!0),A.yt.bottom&&e.down&&(A.y=t.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,n=!0),n&&(this.blocked.none=!1),n},setOffset:function(A,t){return void 0===t&&(t=A),this.offset.set(A,t),this.updateCenter(),this},setSize:function(A,t,e){void 0===e&&(e=!0);var i=this.gameObject;if(!A&&i.frame&&(A=i.frame.realWidth),!t&&i.frame&&(t=i.frame.realHeight),this.sourceWidth=A,this.sourceHeight=t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),e&&i.getCenter){var s=i.displayWidth/2,n=i.displayHeight/2;this.offset.set(s-this.halfWidth,n-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(A,t,e){return void 0===t&&(t=this.offset.x),void 0===e&&(e=this.offset.y),A>0?(this.isCircle=!0,this.radius=A,this.sourceWidth=2*A,this.sourceHeight=2*A,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(t,e),this.updateCenter()):this.isCircle=!1,this},reset:function(A,t){this.stop();var e=this.gameObject;e.setPosition(A,t),e.getTopLeft?e.getTopLeft(this.position):this.position.set(A,t),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=e.angle,this.preRotation=e.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(A){return A.x=this.x,A.y=this.y,A.right=this.right,A.bottom=this.bottom,A},hitTest:function(A,t){return this.isCircle?this.radius>0&&A>=this.left&&A<=this.right&&t>=this.top&&t<=this.bottom&&(this.center.x-A)*(this.center.x-A)+(this.center.y-t)*(this.center.y-t)<=this.radius*this.radius:a(this,A,t)},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},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(A){var t=this.position,e=t.x+this.halfWidth,i=t.y+this.halfHeight;this.debugShowBody&&(A.lineStyle(A.defaultStrokeWidth,this.debugBodyColor),this.isCircle?A.strokeCircle(e,i,this.width/2):(this.checkCollision.up&&A.lineBetween(t.x,t.y,t.x+this.width,t.y),this.checkCollision.right&&A.lineBetween(t.x+this.width,t.y,t.x+this.width,t.y+this.height),this.checkCollision.down&&A.lineBetween(t.x,t.y+this.height,t.x+this.width,t.y+this.height),this.checkCollision.left&&A.lineBetween(t.x,t.y,t.x,t.y+this.height))),this.debugShowVelocity&&(A.lineStyle(A.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),A.lineBetween(e,i,e+this.velocity.x/2,i+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(A,t,e){void 0===A&&(A=!0),this.collideWorldBounds=A;var i=void 0!==t,s=void 0!==e;return(i||s)&&(this.worldBounce||(this.worldBounce=new h),i&&(this.worldBounce.x=t),s&&(this.worldBounce.y=e)),this},setVelocity:function(A,t){return this.velocity.set(A,t),A=this.velocity.x,t=this.velocity.y,this.speed=Math.sqrt(A*A+t*t),this},setVelocityX:function(A){this.velocity.x=A;var t=A,e=this.velocity.y;return this.speed=Math.sqrt(t*t+e*e),this},setVelocityY:function(A){this.velocity.y=A;var t=this.velocity.x,e=A;return this.speed=Math.sqrt(t*t+e*e),this},setMaxVelocity:function(A,t){return this.maxVelocity.set(A,t),this},setMaxSpeed:function(A){return this.maxSpeed=A,this},setBounce:function(A,t){return this.bounce.set(A,t),this},setBounceX:function(A){return this.bounce.x=A,this},setBounceY:function(A){return this.bounce.y=A,this},setAcceleration:function(A,t){return this.acceleration.set(A,t),this},setAccelerationX:function(A){return this.acceleration.x=A,this},setAccelerationY:function(A){return this.acceleration.y=A,this},setAllowDrag:function(A){return void 0===A&&(A=!0),this.allowDrag=A,this},setAllowGravity:function(A){return void 0===A&&(A=!0),this.allowGravity=A,this},setAllowRotation:function(A){return void 0===A&&(A=!0),this.allowRotation=A,this},setDrag:function(A,t){return this.drag.set(A,t),this},setDragX:function(A){return this.drag.x=A,this},setDragY:function(A){return this.drag.y=A,this},setGravity:function(A,t){return this.gravity.set(A,t),this},setGravityX:function(A){return this.gravity.x=A,this},setGravityY:function(A){return this.gravity.y=A,this},setFriction:function(A,t){return this.friction.set(A,t),this},setFrictionX:function(A){return this.friction.x=A,this},setFrictionY:function(A){return this.friction.y=A,this},setAngularVelocity:function(A){return this.angularVelocity=A,this},setAngularAcceleration:function(A){return this.angularAcceleration=A,this},setAngularDrag:function(A){return this.angularDrag=A,this},setMass:function(A){return this.mass=A,this},setImmovable:function(A){return void 0===A&&(A=!0),this.immovable=A,this},setEnable:function(A){return void 0===A&&(A=!0),this.enable=A,this},x:{get:function(){return this.position.x},set:function(A){this.position.x=A}},y:{get:function(){return this.position.y},set:function(A){this.position.y=A}},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}}});A.exports=l},function(A,t,e){var i=new(e(0))({initialize:function(A,t,e,i,s,n,r){this.world=A,this.name="",this.active=!0,this.overlapOnly=t,this.object1=e,this.object2=i,this.collideCallback=s,this.processCallback=n,this.callbackContext=r},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}});A.exports=i},function(A,t,e){var i=e(58);A.exports=function(A,t,e,s){var n=0,r=A.deltaAbsX()+t.deltaAbsX()+s;return 0===A._dx&&0===t._dx?(A.embedded=!0,t.embedded=!0):A._dx>t._dx?(n=A.right-t.x)>r&&!e||!1===A.checkCollision.right||!1===t.checkCollision.left?n=0:(A.touching.none=!1,A.touching.right=!0,t.touching.none=!1,t.touching.left=!0,t.physicsType===i.STATIC_BODY&&(A.blocked.none=!1,A.blocked.right=!0),A.physicsType===i.STATIC_BODY&&(t.blocked.none=!1,t.blocked.left=!0)):A._dxr&&!e||!1===A.checkCollision.left||!1===t.checkCollision.right?n=0:(A.touching.none=!1,A.touching.left=!0,t.touching.none=!1,t.touching.right=!0,t.physicsType===i.STATIC_BODY&&(A.blocked.none=!1,A.blocked.left=!0),A.physicsType===i.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0))),A.overlapX=n,t.overlapX=n,n}},function(A,t,e){var i=e(58);A.exports=function(A,t,e,s){var n=0,r=A.deltaAbsY()+t.deltaAbsY()+s;return 0===A._dy&&0===t._dy?(A.embedded=!0,t.embedded=!0):A._dy>t._dy?(n=A.bottom-t.y)>r&&!e||!1===A.checkCollision.down||!1===t.checkCollision.up?n=0:(A.touching.none=!1,A.touching.down=!0,t.touching.none=!1,t.touching.up=!0,t.physicsType===i.STATIC_BODY&&(A.blocked.none=!1,A.blocked.down=!0),A.physicsType===i.STATIC_BODY&&(t.blocked.none=!1,t.blocked.up=!0)):A._dyr&&!e||!1===A.checkCollision.up||!1===t.checkCollision.down?n=0:(A.touching.none=!1,A.touching.up=!0,t.touching.none=!1,t.touching.down=!0,t.physicsType===i.STATIC_BODY&&(A.blocked.none=!1,A.blocked.up=!0),A.physicsType===i.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0))),A.overlapY=n,t.overlapY=n,n}},function(A,t,e){var i=e(401);function s(A){if(!(this instanceof s))return new s(A,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,A||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function n(A,t,e){if(!e)return t.indexOf(A);for(var i=0;i=A.minX&&t.maxY>=A.minY}function p(A){return{children:A,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(A,t,e,s,n){for(var r,o=[t,e];o.length;)(e=o.pop())-(t=o.pop())<=s||(r=t+Math.ceil((e-t)/s/2)*s,i(A,r,t,e,n),o.push(t,r,r,e))}s.prototype={all:function(){return this._all(this.data,[])},search:function(A){var t=this.data,e=[],i=this.toBBox;if(!g(A,t))return e;for(var s,n,r,o,a=[];t;){for(s=0,n=t.children.length;s=0&&n[t].children.length>this._maxEntries;)this._split(n,t),t--;this._adjustParentBBoxes(s,n,t)},_split:function(A,t){var e=A[t],i=e.children.length,s=this._minEntries;this._chooseSplitAxis(e,s,i);var n=this._chooseSplitIndex(e,s,i),o=p(e.children.splice(n,e.children.length-n));o.height=e.height,o.leaf=e.leaf,r(e,this.toBBox),r(o,this.toBBox),t?A[t-1].children.push(o):this._splitRoot(e,o)},_splitRoot:function(A,t){this.data=p([A,t]),this.data.height=A.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(A,t,e){var i,s,n,r,a,h,l,u,d,g,p,f,v,y;for(h=l=1/0,i=t;i<=e-t;i++)s=o(A,0,i,this.toBBox),n=o(A,i,e,this.toBBox),d=s,g=n,p=void 0,f=void 0,v=void 0,y=void 0,p=Math.max(d.minX,g.minX),f=Math.max(d.minY,g.minY),v=Math.min(d.maxX,g.maxX),y=Math.min(d.maxY,g.maxY),r=Math.max(0,v-p)*Math.max(0,y-f),a=c(s)+c(n),r=t;s--)n=A.children[s],a(l,A.leaf?r(n):n),c+=u(l);return c},_adjustParentBBoxes:function(A,t,e){for(var i=e;i>=0;i--)a(t[i],A)},_condense:function(A){for(var t,e=A.length-1;e>=0;e--)0===A[e].children.length?e>0?(t=A[e-1].children).splice(t.indexOf(A[e]),1):this.clear():r(A[e],this.toBBox)},compareMinX:function(A,t){return A.left-t.left},compareMinY:function(A,t){return A.top-t.top},toBBox:function(A){return{minX:A.left,minY:A.top,maxX:A.right,maxY:A.bottom}}},A.exports=s},function(A,t){A.exports=function(A,t){return!(t.right<=A.left||t.bottom<=A.top||t.position.x>=A.right||t.position.y>=A.bottom)}},function(A,t,e){var i=e(61),s=e(0),n=e(58),r=e(53),o=e(3),a=new s({initialize:function(A,t){var e=t.width?t.width:64,i=t.height?t.height:64;this.world=A,this.gameObject=t,this.debugShowBody=A.defaults.debugShowStaticBody,this.debugBodyColor=A.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new o,this.position=new o(t.x-t.displayOriginX,t.y-t.displayOriginY),this.width=e,this.height=i,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new o(t.x+this.halfWidth,t.y+this.halfHeight),this.velocity=o.ZERO,this.allowGravity=!1,this.gravity=o.ZERO,this.bounce=o.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!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.physicsType=n.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(A,t){return A&&A!==this.gameObject&&(this.gameObject.body=null,A.body=this,this.gameObject=A),t&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var A=this.gameObject;return A.getTopLeft(this.position),this.width=A.displayWidth,this.height=A.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(A,t){return void 0===t&&(t=A),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(A,t),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(A,t,e){void 0===e&&(e=!0);var i=this.gameObject;if(!A&&i.frame&&(A=i.frame.realWidth),!t&&i.frame&&(t=i.frame.realHeight),this.world.staticTree.remove(this),this.width=A,this.height=t,this.halfWidth=Math.floor(A/2),this.halfHeight=Math.floor(t/2),e&&i.getCenter){var s=i.displayWidth/2,n=i.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,n-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(A,t,e){return void 0===t&&(t=this.offset.x),void 0===e&&(e=this.offset.y),A>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=A,this.width=2*A,this.height=2*A,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(t,e),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(A,t){var e=this.gameObject;void 0===A&&(A=e.x),void 0===t&&(t=e.y),this.world.staticTree.remove(this),e.setPosition(A,t),e.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(A){return A.x=this.x,A.y=this.y,A.right=this.right,A.bottom=this.bottom,A},hitTest:function(A,t){return this.isCircle?i(this,A,t):r(this,A,t)},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(A){var t=this.position,e=t.x+this.halfWidth,i=t.y+this.halfHeight;this.debugShowBody&&(A.lineStyle(A.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?A.strokeCircle(e,i,this.width/2):A.strokeRect(t.x,t.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(A){return A<=0&&(A=.1),this.mass=A,this},x:{get:function(){return this.position.x},set:function(A){this.world.staticTree.remove(this),this.position.x=A,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(A){this.world.staticTree.remove(this),this.position.y=A,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}}});A.exports=a},function(A,t,e){var i=e(0),s=e(112),n=e(1342),r=e(113),o=e(1343),a=new i({initialize:function(A,t,e,i,n){void 0===i&&(i=16),void 0===n&&(n=i),this.world=A,this.gameObject=null,this.enabled=!0,this.parent,this.id=A.getNextID(),this.name="",this.size={x:i,y:n},this.offset={x:0,y:0},this.pos={x:t,y:e},this.last={x:t,y:e},this.vel={x:0,y:0},this.accel={x:0,y:0},this.friction={x:0,y:0},this.maxVel={x:A.defaults.maxVelocityX,y:A.defaults.maxVelocityY},this.standing=!1,this.gravityFactor=A.defaults.gravityFactor,this.bounciness=A.defaults.bounciness,this.minBounceVelocity=A.defaults.minBounceVelocity,this.accelGround=0,this.accelAir=0,this.jumpSpeed=0,this.type=r.NONE,this.checkAgainst=r.NONE,this.collides=s.NEVER,this.debugShowBody=A.defaults.debugShowBody,this.debugShowVelocity=A.defaults.debugShowVelocity,this.debugBodyColor=A.defaults.bodyDebugColor,this.updateCallback,this.slopeStanding={min:.767944870877505,max:2.3736477827122884}},reset:function(A,t){this.pos={x:A,y:t},this.last={x:A,y:t},this.vel={x:0,y:0},this.accel={x:0,y:0},this.friction={x:0,y:0},this.maxVel={x:100,y:100},this.standing=!1,this.gravityFactor=1,this.bounciness=0,this.minBounceVelocity=40,this.accelGround=0,this.accelAir=0,this.jumpSpeed=0,this.type=r.NONE,this.checkAgainst=r.NONE,this.collides=s.NEVER},update:function(A){var t=this.pos;this.last.x=t.x,this.last.y=t.y,this.vel.y+=this.world.gravity*A*this.gravityFactor,this.vel.x=n(A,this.vel.x,this.accel.x,this.friction.x,this.maxVel.x),this.vel.y=n(A,this.vel.y,this.accel.y,this.friction.y,this.maxVel.y);var e=this.vel.x*A,i=this.vel.y*A,s=this.world.collisionMap.trace(t.x,t.y,e,i,this.size.x,this.size.y);this.handleMovementTrace(s)&&o(this,s);var r=this.gameObject;r&&(r.x=t.x-this.offset.x+r.displayOriginX*r.scaleX,r.y=t.y-this.offset.y+r.displayOriginY*r.scaleY),this.updateCallback&&this.updateCallback(this)},drawDebug:function(A){var t=this.pos;if(this.debugShowBody&&(A.lineStyle(1,this.debugBodyColor,1),A.strokeRect(t.x,t.y,this.size.x,this.size.y)),this.debugShowVelocity){var e=t.x+this.size.x/2,i=t.y+this.size.y/2;A.lineStyle(1,this.world.defaults.velocityDebugColor,1),A.lineBetween(e,i,e+this.vel.x,i+this.vel.y)}},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},skipHash:function(){return!this.enabled||0===this.type&&0===this.checkAgainst&&0===this.collides},touches:function(A){return!(this.pos.x>=A.pos.x+A.size.x||this.pos.x+this.size.x<=A.pos.x||this.pos.y>=A.pos.y+A.size.y||this.pos.y+this.size.y<=A.pos.y)},resetSize:function(A,t,e,i){return this.pos.x=A,this.pos.y=t,this.size.x=e,this.size.y=i,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(){},check:function(){},collideWith:function(A,t){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,A,t)},handleMovementTrace:function(){return!0},destroy:function(){this.world.remove(this),this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});A.exports=a},function(A,t,e){var i=e(0),s=e(1347),n=new i({initialize:function(A,t){void 0===A&&(A=32),this.tilesize=A,this.data=Array.isArray(t)?t:[],this.width=Array.isArray(t)?t[0].length:0,this.height=Array.isArray(t)?t.length:0,this.lastSlope=55,this.tiledef=s},trace:function(A,t,e,i,s,n){var r={collision:{x:!1,y:!1,slope:!1},pos:{x:A+e,y:t+i},tile:{x:0,y:0}};if(!this.data)return r;var o=Math.ceil(Math.max(Math.abs(e),Math.abs(i))/this.tilesize);if(o>1)for(var a=e/o,h=i/o,l=0;l0?n:0,v=i<0?d:0,y=Math.max(Math.floor(e/d),0),m=Math.min(Math.ceil((e+r)/d),p);l=Math.floor((A.pos.x+f)/d);var w=Math.floor((t+f)/d);if((h>0||l===w||w<0||w>=g)&&(w=-1),l>=0&&l1&&u<=this.lastSlope&&this.checkDef(A,u,t,e,o,a,n,r,w,c));c++)if(1===(u=this.data[c][l])||u>this.lastSlope||u>1&&this.checkDef(A,u,t,e,o,a,n,r,l,c)){if(u>1&&u<=this.lastSlope&&A.collision.slope)break;A.collision.x=!0,A.tile.x=u,A.pos.x=l*d-f+v,t=A.pos.x,o=0;break}}if(s){var B=s>0?r:0,x=s<0?d:0,C=Math.max(Math.floor(A.pos.x/d),0),b=Math.min(Math.ceil((A.pos.x+n)/d),g);c=Math.floor((A.pos.y+B)/d);var T=Math.floor((e+B)/d);if((h>0||c===T||T<0||T>=p)&&(T=-1),c>=0&&c1&&u<=this.lastSlope&&this.checkDef(A,u,t,e,o,a,n,r,l,T));l++)if(1===(u=this.data[c][l])||u>this.lastSlope||u>1&&this.checkDef(A,u,t,e,o,a,n,r,l,c)){if(u>1&&u<=this.lastSlope&&A.collision.slope)break;A.collision.y=!0,A.tile.y=u,A.pos.y=c*d-B+x;break}}},checkDef:function(A,t,e,i,s,n,r,o,a,h){var l=this.tiledef[t];if(!l)return!1;var c=this.tilesize,u=(a+l[0])*c,d=(h+l[1])*c,g=(l[2]-l[0])*c,p=(l[3]-l[1])*c,f=l[4],v=e+s+(p<0?r:0)-u,y=i+n+(g>0?o:0)-d;if(g*y-p*v>0){if(s*-p+n*g<0)return f;var m=Math.sqrt(g*g+p*p),w=p/m,B=-g/m,x=v*w+y*B,C=w*x,b=B*x;return C*C+b*b>=s*s+n*n?f||g*(y-n)-p*(v-s)<.5:(A.pos.x=e+s-C,A.pos.y=i+n-b,A.collision.slope={x:g,y:p,nx:w,ny:B},!0)}return!1}});A.exports=n},function(A,t,e){var i=e(0),s=e(486),n=e(487),r=e(488),o=new i({initialize:function(A){this.world=A,this.sys=A.scene.sys},body:function(A,t,e,i){return new s(this.world,A,t,e,i)},existing:function(A){var t=A.x-A.frame.centerX,e=A.y-A.frame.centerY,i=A.width,s=A.height;return A.body=this.world.create(t,e,i,s),A.body.parent=A,A.body.gameObject=A,A},image:function(A,t,e,i){var s=new n(this.world,A,t,e,i);return this.sys.displayList.add(s),s},sprite:function(A,t,e,i){var s=new r(this.world,A,t,e,i);return this.sys.displayList.add(s),this.sys.updateList.add(s),s},destroy:function(){this.world=null,this.sys=null}});A.exports=o},function(A,t,e){var i=e(0),s=e(234),n=new i({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(A,t,e,i,s){this.body=A.create(t,e,i,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});A.exports=n},function(A,t,e){var i=e(0),s=e(234),n=e(91),r=new i({Extends:n,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(A,t,e,i,s){n.call(this,A.scene,t,e,i,s),this.body=A.create(t-this.frame.centerX,e-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});A.exports=r},function(A,t,e){var i=e(0),s=e(234),n=e(56),r=new i({Extends:n,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(A,t,e,i,s){n.call(this,A.scene,t,e,i,s),this.body=A.create(t-this.frame.centerX,e-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});A.exports=r},function(A,t,e){var i=e(483),s=e(0),n=e(112),r=e(484),o=e(9),a=e(233),h=e(2),l=e(93),c=e(90),u=e(1361),d=e(35),g=e(113),p=new s({Extends:o,initialize:function(A,t){o.call(this),this.scene=A,this.bodies=new c,this.gravity=h(t,"gravity",0),this.cellSize=h(t,"cellSize",64),this.collisionMap=new r,this.timeScale=h(t,"timeScale",1),this.maxStep=h(t,"maxStep",.05),this.enabled=!0,this.drawDebug=h(t,"debug",!1),this.debugGraphic;var e=h(t,"maxVelocity",100);if(this.defaults={debugShowBody:h(t,"debugShowBody",!0),debugShowVelocity:h(t,"debugShowVelocity",!0),bodyDebugColor:h(t,"debugBodyColor",16711935),velocityDebugColor:h(t,"debugVelocityColor",65280),maxVelocityX:h(t,"maxVelocityX",e),maxVelocityY:h(t,"maxVelocityY",e),minBounceVelocity:h(t,"minBounceVelocity",40),gravityFactor:h(t,"gravityFactor",1),bounciness:h(t,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,h(t,"setBounds",!1)){var i=t.setBounds;if("boolean"==typeof i)this.setBounds();else{var s=h(i,"x",0),n=h(i,"y",0),a=h(i,"width",A.sys.scale.width),l=h(i,"height",A.sys.scale.height),u=h(i,"thickness",64),d=h(i,"left",!0),g=h(i,"right",!0),p=h(i,"top",!0),f=h(i,"bottom",!0);this.setBounds(s,n,a,l,u,d,g,p,f)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(A,t){if("string"==typeof A){var e=this.scene.cache.tilemap.get(A);if(!e||e.format!==d.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+A),null;for(var i,s=e.data.layer,n=0;nn.ACTIVE&&u(this,A,t))},setCollidesNever:function(A){for(var t=0;t=0&&a<=1&&h>=0&&h<=1}function s(A,t,e){return(t[0]-A[0])*(e[1]-A[1])-(e[0]-A[0])*(t[1]-A[1])}function n(A,t,e){return s(A,t,e)>0}function r(A,t,e){return s(A,t,e)>=0}function o(A,t,e){return s(A,t,e)<0}function a(A,t,e){return s(A,t,e)<=0}A.exports={decomp:function(A){var t=function A(t){for(var e=[],i=[],s=[],n=[],r=Number.MAX_VALUE,o=0;o0?function A(t,e){if(0===e.length)return[t];if(e instanceof Array&&e.length&&e[0]instanceof Array&&2===e[0].length&&e[0][0]instanceof Array){for(var i=[t],s=0;sl)return console.warn("quickDecomp: max level ("+l+") reached."),e;for(var D=0;DT&&(T+=t.length),b=Number.MAX_VALUE,T3&&i>=0;--i)c(d(A,i-1),d(A,i),d(A,i+1),t)&&(A.splice(i%A.length,1),e++);return e},removeDuplicatePoints:function(A,t){for(var e=A.length-1;e>=1;--e)for(var i=A[e],s=e-1;s>=0;--s)C(i,A[s],t)&&A.splice(e,1)},makeCCW:function(A){for(var t=0,e=A,i=1;ie[t][0])&&(t=i);return!n(d(A,t-1),d(A,t),d(A,t+1))&&(function(A){for(var t=[],e=A.length,i=0;i!==e;i++)t.push(A.pop());for(i=0;i!==e;i++)A[i]=t[i]}(A),!0)}};var h=[],l=[];function c(A,t,e,i){if(i){var n=h,r=l;n[0]=t[0]-A[0],n[1]=t[1]-A[1],r[0]=e[0]-t[0],r[1]=e[1]-t[1];var o=n[0]*r[0]+n[1]*r[1],a=Math.sqrt(n[0]*n[0]+n[1]*n[1]),c=Math.sqrt(r[0]*r[0]+r[1]*r[1]);return Math.acos(o/(a*c))p&&(p=y),o.translate(v,{x:.5*m,y:.5*y}),c=v.bounds.max.x+n,s.addBody(l,v),h=v,d+=1}else c+=n}u+=p+r,c=A}return l},i.chain=function(A,t,e,i,o,a){for(var h=A.bodies,l=1;l0)for(h=0;h0&&(u=d[h-1+(a-1)*t],s.addConstraint(A,n.create(r.extend({bodyA:u,bodyB:c},o)))),i&&hu||r<(h=u-h)||r>e-1-h))return 1===c&&o.translate(l,{x:(r+(e%2==1?1:-1))*d,y:0}),a(A+(l?r*d:0)+r*n,i,r,h,l,c)}))},i.newtonsCradle=function(A,t,e,i,r){for(var o=s.create({label:"Newtons Cradle"}),h=0;hl.bounds.max.x||g.bounds.max.yl.bounds.max.y)){var p=i._getRegion(A,g);if(!g.region||p.id!==g.region.id||s){d.broadphaseTests+=1,g.region&&!s||(g.region=p);var f=i._regionUnion(p,g.region);for(r=f.startCol;r<=f.endCol;r++)for(o=f.startRow;o<=f.endRow;o++){a=c[h=i._getBucketId(r,o)];var v=r>=p.startCol&&r<=p.endCol&&o>=p.startRow&&o<=p.endRow,y=r>=g.region.startCol&&r<=g.region.endCol&&o>=g.region.startRow&&o<=g.region.endRow;!v&&y&&y&&a&&i._bucketRemoveBody(A,a,g),(g.region===p||v&&!y||s)&&(a||(a=i._createBucket(c,h)),i._bucketAddBody(A,a,g))}g.region=p,u=!0}}}u&&(A.pairsList=i._createActivePairsList(A))},i.clear=function(A){A.buckets={},A.pairs={},A.pairsList=[]},i._regionUnion=function(A,t){var e=Math.min(A.startCol,t.startCol),s=Math.max(A.endCol,t.endCol),n=Math.min(A.startRow,t.startRow),r=Math.max(A.endRow,t.endRow);return i._createRegion(e,s,n,r)},i._getRegion=function(A,t){var e=t.bounds,s=Math.floor(e.min.x/A.bucketWidth),n=Math.floor(e.max.x/A.bucketWidth),r=Math.floor(e.min.y/A.bucketHeight),o=Math.floor(e.max.y/A.bucketHeight);return i._createRegion(s,n,r,o)},i._createRegion=function(A,t,e,i){return{id:A+","+t+","+e+","+i,startCol:A,endCol:t,startRow:e,endRow:i}},i._getBucketId=function(A,t){return"C"+A+"R"+t},i._createBucket=function(A,t){return A[t]=[]},i._bucketAddBody=function(A,t,e){for(var i=0;i0?i.push(e):delete A.pairs[t[s]];return i}},function(A,t,e){var i={};A.exports=i;var s=e(148),n=e(19);i._pairMaxIdleLife=1e3,i.create=function(A){return n.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},A)},i.update=function(A,t,e){var i,n,r,o,a=A.list,h=A.table,l=A.collisionStart,c=A.collisionEnd,u=A.collisionActive;for(l.length=0,c.length=0,u.length=0,o=0;oi._pairMaxIdleLife&&h.push(r);for(r=0;rd.friction*d.frictionStatic*O*e&&(G=S,k=r.clamp(d.friction*D*e,-G,G));var H=n.cross(b,v),P=n.cross(T,v),R=w/(p.inverseMass+f.inverseMass+p.inverseInertia*H*H+f.inverseInertia*P*P);if(_*=R,k*=R,M<0&&M*M>i._restingThresh*e)x.normalImpulse=0;else{var N=x.normalImpulse;x.normalImpulse=Math.min(x.normalImpulse+_,0),_=x.normalImpulse-N}if(I*I>i._restingThreshTangent*e)x.tangentImpulse=0;else{var L=x.tangentImpulse;x.tangentImpulse=r.clamp(x.tangentImpulse+k,-G,G),k=x.tangentImpulse-L}s.x=v.x*_+y.x*k,s.y=v.y*_+y.y*k,p.isStatic||p.isSleeping||(p.positionPrev.x+=s.x*p.inverseMass,p.positionPrev.y+=s.y*p.inverseMass,p.anglePrev+=n.cross(b,s)*p.inverseInertia),f.isStatic||f.isSleeping||(f.positionPrev.x-=s.x*f.inverseMass,f.positionPrev.y-=s.y*f.inverseMass,f.anglePrev-=n.cross(T,s)*f.inverseInertia)}}}}},function(A,t,e){var i={};A.exports=i;var s=e(242),n=e(114),r=e(499),o=e(498),a=e(1392),h=e(497),l=e(97),c=e(77),u=e(98),d=e(19),g=e(26);i.create=function(A,t){t=(t=d.isElement(A)?t:A)||{},((A=d.isElement(A)?A:null)||t.render)&&d.warn("Engine.create: engine.render is deprecated (see docs)");var e={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:h}},i=d.extend(e,t);if(A||i.render){var n={element:A,controller:Render};i.render=d.extend(n,i.render)}return i.render&&i.render.controller&&(i.render=i.render.controller.create(i.render)),i.render&&(i.render.engine=i),i.world=t.world||s.create(i.world),i.pairs=o.create(),i.broadphase=i.broadphase.controller.create(i.broadphase),i.metrics=i.metrics||{extended:!1},i.metrics=a.create(i.metrics),i},i.update=function(A,t,e){t=t||1e3/60,e=e||1;var s,h=A.world,d=A.timing,g=A.broadphase,p=[];d.timestamp+=t*d.timeScale;var f={timestamp:d.timestamp};l.trigger(A,"beforeUpdate",f);var v=c.allBodies(h),y=c.allConstraints(h);for(a.reset(A.metrics),A.enableSleeping&&n.update(v,d.timeScale),i._bodiesApplyGravity(v,h.gravity),i._bodiesUpdate(v,t,d.timeScale,e,h.bounds),u.preSolveAll(v),s=0;s0&&l.trigger(A,"collisionStart",{pairs:w.collisionStart}),r.preSolvePosition(w.list),s=0;s0&&l.trigger(A,"collisionActive",{pairs:w.collisionActive}),w.collisionEnd.length>0&&l.trigger(A,"collisionEnd",{pairs:w.collisionEnd}),a.update(A.metrics,A),i._bodiesClearForces(v),l.trigger(A,"afterUpdate",f),A},i.merge=function(A,t){if(d.extend(A,t),t.world){A.world=t.world,i.clear(A);for(var e=c.allBodies(A.world),s=0;s0&&(e=s[0].bodyA,i=s[0].bodyB),A.emit(l.COLLISION_START,t,e,i)})),g.on(t,"collisionActive",(function(t){var e,i,s=t.pairs;s.length>0&&(e=s[0].bodyA,i=s[0].bodyB),A.emit(l.COLLISION_ACTIVE,t,e,i)})),g.on(t,"collisionEnd",(function(t){var e,i,s=t.pairs;s.length>0&&(e=s[0].bodyA,i=s[0].bodyB),A.emit(l.COLLISION_END,t,e,i)}))},setBounds:function(A,t,e,i,s,n,r,o,a){return void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e=this.scene.sys.scale.width),void 0===i&&(i=this.scene.sys.scale.height),void 0===s&&(s=128),void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),this.updateWall(n,"left",A-s,t-s,s,i+2*s),this.updateWall(r,"right",A+e,t-s,s,i+2*s),this.updateWall(o,"top",A,t-s,e,s),this.updateWall(a,"bottom",A,t+i,e,s),this},updateWall:function(A,t,e,i,s,n){var r=this.walls[t];A?(r&&f.remove(this.localWorld,r),e+=s/2,i+=n/2,this.walls[t]=this.create(e,i,s,n,{isStatic:!0,friction:0,frictionStatic:0})):(r&&f.remove(this.localWorld,r),this.walls[t]=null)},createDebugGraphic:function(){var A=this.scene.sys.add.graphics({x:0,y:0});return A.setDepth(Number.MAX_VALUE),this.debugGraphic=A,this.drawDebug=!0,A},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(A,t,e){return void 0===A&&(A=0),void 0===t&&(t=1),this.localWorld.gravity.x=A,this.localWorld.gravity.y=t,void 0!==e&&(this.localWorld.gravity.scale=e),this},create:function(A,t,e,s,n){var r=i.rectangle(A,t,e,s,n);return f.add(this.localWorld,r),r},add:function(A){return f.add(this.localWorld,A),this},remove:function(A,t){var e=A.body?A.body:A;return o.remove(this.localWorld,e,t),this},removeConstraint:function(A,t){return o.remove(this.localWorld,A,t),this},convertTilemapLayer:function(A,t){var e=A.layer,i=A.getTilesWithin(0,0,e.width,e.height,{isColliding:!0});return this.convertTiles(i,t),this},convertTiles:function(A,t){if(0===A.length)return this;for(var e=0;e1?1:0;n1?1:0;s-1}return!1}},function(A,t,e){var i=e(79),s=e(115),n=e(243);A.exports=function(A,t,e,r,o){if(void 0===e&&(e=!1),void 0===r&&(r=!0),!s(A,t,o))return null;var a=o.data[t][A];return a?(o.data[t][A]=e?null:new i(o,-1,A,t,a.width,a.height),r&&a&&a.collides&&n(A,t,o),a):null}},function(A,t,e){var i=e(35),s=e(246),n=e(507),r=e(508),o=e(519);A.exports=function(A,t,e,a,h,l){var c;switch(t){case i.ARRAY_2D:c=s(A,e,a,h,l);break;case i.CSV:c=n(A,e,a,h,l);break;case i.TILED_JSON:c=r(A,e,l);break;case i.WELTMEISTER:c=o(A,e,l);break;default:console.warn("Unrecognized tilemap data format: "+t),c=null}return c}},function(A,t,e){var i=e(35),s=e(246);A.exports=function(A,t,e,n,r){var o=t.trim().split("\n").map((function(A){return A.split(",")})),a=s(A,o,e,n,r);return a.format=i.CSV,a}},function(A,t,e){var i=e(35),s=e(117),n=e(509),r=e(511),o=e(512),a=e(515),h=e(517),l=e(518);A.exports=function(A,t,e){if("orthogonal"!==t.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:t.width,height:t.height,name:A,tileWidth:t.tilewidth,tileHeight:t.tileheight,orientation:t.orientation,format:i.TILED_JSON,version:t.version,properties:t.properties,renderOrder:t.renderorder,infinite:t.infinite});c.layers=n(t,e),c.images=r(t);var u=o(t);return c.tilesets=u.tilesets,c.imageCollections=u.imageCollections,c.objects=a(t),c.tiles=h(c),l(c),c}},function(A,t,e){var i=e(510),s=e(2),n=e(116),r=e(247),o=e(79);A.exports=function(A,t){for(var e=s(A,"infinite",!1),a=[],h=0;h0?((d=new o(c,u.gid,E,F,A.tilewidth,A.tileheight)).rotation=u.rotation,d.flipX=u.flipped,p[F][E]=d):(g=t?null:new o(c,-1,E,F,A.tilewidth,A.tileheight),p[F][E]=g),++f===B.width&&(b++,f=0)}}else{c=new n({name:l.name,x:s(l,"offsetx",0)+l.x,y:s(l,"offsety",0)+l.y,width:l.width,height:l.height,tileWidth:A.tilewidth,tileHeight:A.tileheight,alpha:l.opacity,visible:l.visible,properties:s(l,"properties",{})});for(var M=[],I=0,S=l.data.length;I0?((d=new o(c,u.gid,f,p.length,A.tilewidth,A.tileheight)).rotation=u.rotation,d.flipX=u.flipped,M.push(d)):(g=t?null:new o(c,-1,f,p.length,A.tilewidth,A.tileheight),M.push(g)),++f===l.width&&(p.push(M),f=0,M=[])}c.data=p,a.push(c)}}return a}},function(A,t){A.exports=function(A){for(var t=window.atob(A),e=t.length,i=new Array(e/4),s=0;s>>0;return i}},function(A,t,e){var i=e(2);A.exports=function(A){for(var t=[],e=0;e1){if(Array.isArray(h.tiles)){for(var c={},u={},d=0;d=this.firstgid&&Ao&&(o=t.layer[h].width),t.layer[h].height>a&&(a=t.layer[h].height);var l=new s({width:o,height:a,name:A,tileWidth:t.layer[0].tilesize,tileHeight:t.layer[0].tilesize,format:i.WELTMEISTER});return l.layers=n(t,e),l.tilesets=r(t),l}},function(A,t,e){var i=e(116),s=e(79);A.exports=function(A,t){for(var e=[],n=0;n-1?new s(o,d,c,l,r.tilesize,r.tilesize):t?null:new s(o,-1,c,l,r.tilesize,r.tilesize),a.push(u)}h.push(a),a=[]}o.data=h,e.push(o)}return e}},function(A,t,e){var i=e(153);A.exports=function(A){for(var t=[],e=[],s=0;s-1&&(this.renderOrder=A),this},addTilesetImage:function(A,t,e,i,s,n,r){if(void 0===A)return null;if(null==t&&(t=A),!this.scene.sys.textures.exists(t))return console.warn("Invalid Tileset Image: "+t),null;var a=this.scene.sys.textures.get(t),h=this.getTilesetIndex(A);if(null===h&&this.format===o.TILED_JSON)return console.warn("No data found for Tileset: "+A),null;var l=this.tilesets[h];return l?(l.setTileSize(e,i),l.setSpacing(s,n),l.setImage(a),l):(void 0===e&&(e=this.tileWidth),void 0===i&&(i=this.tileHeight),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),(l=new g(A,r,e,i,s,n)).setImage(a),this.tilesets.push(l),l)},convertLayerToStatic:function(A){if(null===(A=this.getLayer(A)))return null;var t=A.tilemapLayer;if(!(t&&t instanceof n))return null;var e=new c(t.scene,t.tilemap,t.layerIndex,t.tileset,t.x,t.y);return this.scene.sys.displayList.add(e),t.destroy(),e},copy:function(A,t,e,i,s,n,r,o){return o=this.getLayer(o),this._isStaticCall(o,"copy")?this:null!==o?(d.Copy(A,t,e,i,s,n,r,o),this):null},createBlankDynamicLayer:function(A,t,e,i,s,r,o,h){if(void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=this.width),void 0===r&&(r=this.height),void 0===o&&(o=this.tileWidth),void 0===h&&(h=this.tileHeight),null!==this.getLayerIndex(A))return console.warn("Invalid Tilemap Layer ID: "+A),null;for(var l,c=new a({name:A,tileWidth:o,tileHeight:h,width:s,height:r}),d=0;d-1&&this.putTileAt(t,n.x,n.y,e,n.tilemapLayer)}return i},removeTileAt:function(A,t,e,i,s){return s=this.getLayer(s),this._isStaticCall(s,"removeTileAt")?null:null===s?null:d.RemoveTileAt(A,t,e,i,s)},removeTileAtWorldXY:function(A,t,e,i,s,n){return n=this.getLayer(n),this._isStaticCall(n,"removeTileAtWorldXY")?null:null===n?null:d.RemoveTileAtWorldXY(A,t,e,i,s,n)},renderDebug:function(A,t,e){return null===(e=this.getLayer(e))?null:(d.RenderDebug(A,t,e),this)},renderDebugFull:function(A,t){for(var e=this.layers,i=0;i=0&&A<4&&(this._renderOrder=A),this},calculateFacesAt:function(A,t){return o.CalculateFacesAt(A,t,this.layer),this},calculateFacesWithin:function(A,t,e,i){return o.CalculateFacesWithin(A,t,e,i,this.layer),this},createFromTiles:function(A,t,e,i,s){return o.CreateFromTiles(A,t,e,i,s,this.layer)},cull:function(A){return this.cullCallback(this.layer,A,this.culledTiles,this._renderOrder)},copy:function(A,t,e,i,s,n,r){return o.Copy(A,t,e,i,s,n,r,this.layer),this},destroy:function(A){void 0===A&&(A=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),A&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))},fill:function(A,t,e,i,s,n){return o.Fill(A,t,e,i,s,n,this.layer),this},filterTiles:function(A,t,e,i,s,n,r){return o.FilterTiles(A,t,e,i,s,n,r,this.layer)},findByIndex:function(A,t,e){return o.FindByIndex(A,t,e,this.layer)},findTile:function(A,t,e,i,s,n,r){return o.FindTile(A,t,e,i,s,n,r,this.layer)},forEachTile:function(A,t,e,i,s,n,r){return o.ForEachTile(A,t,e,i,s,n,r,this.layer),this},getTileAt:function(A,t,e){return o.GetTileAt(A,t,e,this.layer)},getTileAtWorldXY:function(A,t,e,i){return o.GetTileAtWorldXY(A,t,e,i,this.layer)},getTilesWithin:function(A,t,e,i,s){return o.GetTilesWithin(A,t,e,i,s,this.layer)},getTilesWithinShape:function(A,t,e){return o.GetTilesWithinShape(A,t,e,this.layer)},getTilesWithinWorldXY:function(A,t,e,i,s,n){return o.GetTilesWithinWorldXY(A,t,e,i,s,n,this.layer)},hasTileAt:function(A,t){return o.HasTileAt(A,t,this.layer)},hasTileAtWorldXY:function(A,t,e){return o.HasTileAtWorldXY(A,t,e,this.layer)},putTileAt:function(A,t,e,i){return o.PutTileAt(A,t,e,i,this.layer)},putTileAtWorldXY:function(A,t,e,i,s){return o.PutTileAtWorldXY(A,t,e,i,s,this.layer)},putTilesAt:function(A,t,e,i){return o.PutTilesAt(A,t,e,i,this.layer),this},randomize:function(A,t,e,i,s){return o.Randomize(A,t,e,i,s,this.layer),this},removeTileAt:function(A,t,e,i){return o.RemoveTileAt(A,t,e,i,this.layer)},removeTileAtWorldXY:function(A,t,e,i,s){return o.RemoveTileAtWorldXY(A,t,e,i,s,this.layer)},renderDebug:function(A,t){return o.RenderDebug(A,t,this.layer),this},replaceByIndex:function(A,t,e,i,s,n){return o.ReplaceByIndex(A,t,e,i,s,n,this.layer),this},setSkipCull:function(A){return void 0===A&&(A=!0),this.skipCull=A,this},setCullPadding:function(A,t){return void 0===A&&(A=1),void 0===t&&(t=1),this.cullPaddingX=A,this.cullPaddingY=t,this},setCollision:function(A,t,e,i){return o.SetCollision(A,t,e,this.layer,i),this},setCollisionBetween:function(A,t,e,i){return o.SetCollisionBetween(A,t,e,i,this.layer),this},setCollisionByProperty:function(A,t,e){return o.SetCollisionByProperty(A,t,e,this.layer),this},setCollisionByExclusion:function(A,t,e){return o.SetCollisionByExclusion(A,t,e,this.layer),this},setCollisionFromCollisionGroup:function(A,t){return o.SetCollisionFromCollisionGroup(A,t,this.layer),this},setTileIndexCallback:function(A,t,e){return o.SetTileIndexCallback(A,t,e,this.layer),this},setTileLocationCallback:function(A,t,e,i,s,n){return o.SetTileLocationCallback(A,t,e,i,s,n,this.layer),this},shuffle:function(A,t,e,i){return o.Shuffle(A,t,e,i,this.layer),this},swapByIndex:function(A,t,e,i,s,n){return o.SwapByIndex(A,t,e,i,s,n,this.layer),this},tileToWorldX:function(A,t){return o.TileToWorldX(A,t,this.layer)},tileToWorldY:function(A,t){return o.TileToWorldY(A,t,this.layer)},tileToWorldXY:function(A,t,e,i){return o.TileToWorldXY(A,t,e,i,this.layer)},weightedRandomize:function(A,t,e,i,s){return o.WeightedRandomize(A,t,e,i,s,this.layer),this},worldToTileX:function(A,t,e){return o.WorldToTileX(A,t,e,this.layer)},worldToTileY:function(A,t,e){return o.WorldToTileY(A,t,e,this.layer)},worldToTileXY:function(A,t,e,i,s){return o.WorldToTileXY(A,t,e,i,s,this.layer)}});A.exports=a},function(A,t,e){var i=e(0),s=e(13),n=e(20),r=e(14),o=e(1446),a=e(149),h=e(36),l=e(11),c=new i({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.Transform,s.Visible,s.ScrollFactor,o],initialize:function(A,t,e,i,s,o){r.call(this,A,"StaticTilemapLayer"),this.isTilemap=!0,this.tilemap=t,this.layerIndex=e,this.layer=t.layers[e],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=a.CullTiles,this.renderer=A.sys.game.renderer,this.vertexBuffer=[],this.bufferData=[],this.vertexViewF32=[],this.vertexViewU32=[],this.dirty=[],this.vertexCount=[],this._renderOrder=0,this._tempMatrix=new h,this.gidMap=[],this.setTilesets(i),this.setAlpha(this.layer.alpha),this.setPosition(s,o),this.setOrigin(),this.setSize(t.tileWidth*this.layer.width,t.tileHeight*this.layer.height),this.updateVBOData(),this.initPipeline("TextureTintPipeline"),A.sys.game.events.on(n.CONTEXT_RESTORED,(function(){this.updateVBOData()}),this)},setTilesets:function(A){var t=[],e=[],i=this.tilemap;Array.isArray(A)||(A=[A]);for(var s=0;sf||!n.visible||(m=this.batchTile(m,n,a,c,u,A,t));else if(1===g)for(r=0;r=0;o--)!(n=d[r][o])||n.indexf||!n.visible||(m=this.batchTile(m,n,a,c,u,A,t));else if(2===g)for(r=l-1;r>=0;r--)for(o=0;of||!n.visible||(m=this.batchTile(m,n,a,c,u,A,t));else if(3===g)for(r=l-1;r>=0;r--)for(o=h-1;o>=0;o--)!(n=d[r][o])||n.indexf||!n.visible||(m=this.batchTile(m,n,a,c,u,A,t));this.dirty[t]=!1,null===v?(v=e.createVertexBuffer(y,i.STATIC_DRAW),this.vertexBuffer[t]=v):(e.setVertexBuffer(v),i.bufferSubData(i.ARRAY_BUFFER,0,y))}return this},batchTile:function(A,t,e,i,s,n,r){var o=e.getTileTextureCoordinates(t.index);if(!o)return A;var a=e.tileWidth,h=e.tileHeight,c=a/2,u=h/2,d=o.x/i,g=o.y/s,p=(o.x+a)/i,f=(o.y+h)/s,v=this._tempMatrix,y=-c,m=-u;t.flipX&&(a*=-1,y+=e.tileWidth),t.flipY&&(h*=-1,m+=e.tileHeight);var w=y+a,B=m+h;v.applyITRS(c+t.pixelX,u+t.pixelY,t.rotation,1,1);var x=l.getTintAppendFloatAlpha(16777215,n.alpha*this.alpha*t.alpha),C=v.getX(y,m),b=v.getY(y,m),T=v.getX(y,B),Q=v.getY(y,B),E=v.getX(w,B),F=v.getY(w,B),M=v.getX(w,m),I=v.getY(w,m);n.roundPixels&&(C=Math.round(C),b=Math.round(b),T=Math.round(T),Q=Math.round(Q),E=Math.round(E),F=Math.round(F),M=Math.round(M),I=Math.round(I));var S=this.vertexViewF32[r],D=this.vertexViewU32[r];return S[++A]=C,S[++A]=b,S[++A]=d,S[++A]=g,S[++A]=0,D[++A]=x,S[++A]=T,S[++A]=Q,S[++A]=d,S[++A]=f,S[++A]=0,D[++A]=x,S[++A]=E,S[++A]=F,S[++A]=p,S[++A]=f,S[++A]=0,D[++A]=x,S[++A]=C,S[++A]=b,S[++A]=d,S[++A]=g,S[++A]=0,D[++A]=x,S[++A]=E,S[++A]=F,S[++A]=p,S[++A]=f,S[++A]=0,D[++A]=x,S[++A]=M,S[++A]=I,S[++A]=p,S[++A]=g,S[++A]=0,D[++A]=x,this.vertexCount[r]+=6,A},setRenderOrder:function(A){if("string"==typeof A&&(A=["right-down","left-down","right-up","left-up"].indexOf(A)),A>=0&&A<4){this._renderOrder=A;for(var t=0;t0){var A=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/A}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(A){void 0===A&&(A=!1),this.elapsed=this.delay,this.hasDispatched=!A,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});A.exports=n},function(A,t,e){var i=e(1455);A.exports=function(A){var t,e=[];if(A.hasOwnProperty("props"))for(t in A.props)"_"!==t.substr(0,1)&&e.push({key:t,value:A.props[t]});else for(t in A)-1===i.indexOf(t)&&"_"!==t.substr(0,1)&&e.push({key:t,value:A[t]});return e}},function(A,t,e){var i=e(6);A.exports=function(A){var t=i(A,"tweens",null);return null===t?[]:("function"==typeof t&&(t=t.call()),Array.isArray(t)||(t=[t]),t)}},function(A,t,e){var i=e(252),s=e(15),n=e(100),r=e(92),o=e(154),a=e(6),h=e(251),l=e(253),c=e(255);A.exports=function(A,t,e){void 0===e&&(e=i);var u=a(t,"from",0),d=a(t,"to",1),g=[{value:u}],p=o(t,"delay",e.delay),f=o(t,"duration",e.duration),v=a(t,"easeParams",e.easeParams),y=r(a(t,"ease",e.ease),v),m=o(t,"hold",e.hold),w=o(t,"repeat",e.repeat),B=o(t,"repeatDelay",e.repeatDelay),x=n(t,"yoyo",e.yoyo),C=[],b=h("value",d),T=c(g[0],0,"value",b.getEnd,b.getStart,b.getActive,y,p,f,x,m,w,B,!1,!1);T.start=u,T.current=u,T.to=d,C.push(T);var Q=new l(A,C,g);Q.offset=s(t,"offset",null),Q.completeDelay=s(t,"completeDelay",0),Q.loop=Math.round(s(t,"loop",0)),Q.loopDelay=Math.round(s(t,"loopDelay",0)),Q.paused=n(t,"paused",!1),Q.useFrames=n(t,"useFrames",!1);for(var E=a(t,"callbackScope",Q),F=[Q,null],M=l.TYPES,I=0;I0?Math.floor(f/g.length):a(t,"duration",p.duration),p.delay=a(t,"delay",p.delay),p.easeParams=c(t,"easeParams",p.easeParams),p.ease=o(c(t,"ease",p.ease),p.easeParams),p.hold=a(t,"hold",p.hold),p.repeat=a(t,"repeat",p.repeat),p.repeatDelay=a(t,"repeatDelay",p.repeatDelay),p.yoyo=r(t,"yoyo",p.yoyo),p.flipX=r(t,"flipX",p.flipX),p.flipY=r(t,"flipY",p.flipY);for(var v=0;v0?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=o.PAUSED,!1)},resetTweens:function(A){for(var t=0;t0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=o.LOOP_DELAY):(this.state=o.ACTIVE,this.dispatchTimelineEvent(n.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=o.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=o.PENDING_REMOVE,this.dispatchTimelineEvent(n.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(A,t){if(this.state!==o.PAUSED){switch(this.useFrames&&(t=1*this.manager.timeScale),t*=this.timeScale,this.elapsed+=t,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=t,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case o.ACTIVE:for(var e=this.totalData,i=0;i"},"type":"text","visible":true,"width":96,"x":336.125,"y":175.875},{"height":16,"id":48,"name":"","rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"Interact"},"type":"text","visible":true,"width":96,"x":191.75,"y":112.181818181818},{"height":16,"id":49,"name":"action","properties":[{"name":"action","type":"string","value":"key_interact"}],"rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"< S >"},"type":"text","visible":true,"width":96,"x":191.75,"y":128.181818181818},{"height":16,"id":50,"name":"","rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"Pause"},"type":"text","visible":true,"width":96,"x":48,"y":159.818181818182},{"height":16,"id":51,"name":"action","properties":[{"name":"action","type":"string","value":"key_pause"}],"rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"< ESC >"},"type":"text","visible":true,"width":96,"x":48,"y":175.818181818182},{"height":16,"id":52,"name":"","rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"Use Left"},"type":"text","visible":true,"width":96,"x":47.8181818181818,"y":64.1666666666667},{"height":16,"id":53,"name":"action","properties":[{"name":"action","type":"string","value":"key_use_left"}],"rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"< Q >"},"type":"text","visible":true,"width":96,"x":47.8181818181818,"y":80.1666666666667},{"height":16,"id":54,"name":"","rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"Jump"},"type":"text","visible":true,"width":96,"x":192.181818181818,"y":64.0568181818182},{"height":16,"id":55,"name":"action","properties":[{"name":"action","type":"string","value":"key_jump"}],"rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"< W >"},"type":"text","visible":true,"width":96,"x":192.181818181818,"y":80.0568181818182},{"height":16,"id":56,"name":"","rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"Walk Left"},"type":"text","visible":true,"width":96,"x":48.1515151515152,"y":112.020833333333},{"height":16,"id":57,"name":"action","properties":[{"name":"action","type":"string","value":"key_w_left"}],"rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"< A >"},"type":"text","visible":true,"width":96,"x":48.1515151515152,"y":128.020833333333},{"height":16,"id":58,"name":"","rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"Walk Right"},"type":"text","visible":true,"width":96,"x":335.890151515152,"y":111.931818181818},{"height":16,"id":59,"name":"action","properties":[{"name":"action","type":"string","value":"key_w_right"}],"rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"< D >"},"type":"text","visible":true,"width":96,"x":335.890151515152,"y":127.931818181818},{"height":16,"id":62,"name":"","rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"Use Right"},"type":"text","visible":true,"width":96,"x":336.121212121212,"y":64.030303030303},{"height":16,"id":63,"name":"action","properties":[{"name":"action","type":"string","value":"key_use_right"}],"rotation":0,"text":{"color":"#ffffff","fontfamily":"Courier New","halign":"center","pixelsize":13,"text":"< E >"},"type":"text","visible":true,"width":96,"x":336.121212121212,"y":80.030303030303},{"height":21.4167,"id":65,"name":"action","properties":[{"name":"action","type":"string","value":"controls_reset"}],"rotation":0,"text":{"fontfamily":"Courier","halign":"center","text":"Reset","wrap":true},"type":"text","visible":true,"width":63,"x":160.5,"y":215.749983333333},{"height":21.4167,"id":66,"name":"action","properties":[{"name":"action","type":"string","value":"menu_back"}],"rotation":0,"text":{"fontfamily":"Courier","halign":"center","text":"Back","wrap":true},"type":"text","visible":true,"width":63,"x":256.666666666667,"y":215.79165}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0},{"compression":"","data":"AAAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAAAAAA","encoding":"base64","height":17,"id":3,"name":"temp","opacity":0.36,"type":"tilelayer","visible":true,"width":30,"x":0,"y":0}],"nextlayerid":30,"nextobjectid":67,"orientation":"orthogonal","renderorder":"right-down","tiledversion":"1.4.1","tileheight":16,"tilesets":[{"columns":19,"firstgid":1,"image":"menu.png","imageheight":342,"imagewidth":342,"margin":1,"name":"menu","spacing":2,"tilecount":361,"tileheight":16,"tilewidth":16},{"columns":21,"firstgid":362,"image":"buttons.png","imageheight":378,"imagewidth":378,"margin":1,"name":"button","spacing":2,"tilecount":441,"tileheight":16,"tilewidth":16}],"tilewidth":16,"type":"map","version":1.4,"width":30}')},function(A){A.exports=JSON.parse('{"frames":{"skeleton_archer_style_A/attack/frame1":{"frame":{"x":0,"y":0,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame10":{"frame":{"x":0,"y":64,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame11":{"frame":{"x":75,"y":0,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame12":{"frame":{"x":75,"y":64,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame13":{"frame":{"x":0,"y":128,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame14":{"frame":{"x":75,"y":128,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame15":{"frame":{"x":150,"y":0,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame16":{"frame":{"x":150,"y":64,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame17":{"frame":{"x":0,"y":192,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame18":{"frame":{"x":150,"y":128,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame19":{"frame":{"x":75,"y":192,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame2":{"frame":{"x":225,"y":0,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame20":{"frame":{"x":225,"y":64,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame3":{"frame":{"x":150,"y":192,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame4":{"frame":{"x":0,"y":256,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame5":{"frame":{"x":225,"y":128,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame6":{"frame":{"x":75,"y":256,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame7":{"frame":{"x":225,"y":192,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame8":{"frame":{"x":150,"y":256,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/attack/frame9":{"frame":{"x":300,"y":0,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame1":{"frame":{"x":0,"y":0,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame10":{"frame":{"x":300,"y":64,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame11":{"frame":{"x":0,"y":320,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame12":{"frame":{"x":300,"y":128,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame13":{"frame":{"x":75,"y":320,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame14":{"frame":{"x":225,"y":256,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame15":{"frame":{"x":150,"y":320,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame16":{"frame":{"x":300,"y":192,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame17":{"frame":{"x":375,"y":0,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame18":{"frame":{"x":375,"y":64,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame19":{"frame":{"x":0,"y":384,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame2":{"frame":{"x":225,"y":320,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame20":{"frame":{"x":75,"y":384,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame21":{"frame":{"x":300,"y":256,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame3":{"frame":{"x":375,"y":128,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame4":{"frame":{"x":150,"y":384,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame5":{"frame":{"x":375,"y":192,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame6":{"frame":{"x":300,"y":320,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame7":{"frame":{"x":225,"y":384,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame8":{"frame":{"x":0,"y":448,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/die/frame9":{"frame":{"x":450,"y":0,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/get_hit/frame1":{"frame":{"x":0,"y":0,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/get_hit/frame10":{"frame":{"x":225,"y":320,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/get_hit/frame11":{"frame":{"x":0,"y":0,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/get_hit/frame2":{"frame":{"x":225,"y":320,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/get_hit/frame3":{"frame":{"x":375,"y":128,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/get_hit/frame4":{"frame":{"x":150,"y":384,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/get_hit/frame5":{"frame":{"x":375,"y":256,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/get_hit/frame6":{"frame":{"x":75,"y":448,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/get_hit/frame7":{"frame":{"x":375,"y":192,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/get_hit/frame8":{"frame":{"x":150,"y":384,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/get_hit/frame9":{"frame":{"x":375,"y":128,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/idle/frame1":{"frame":{"x":0,"y":0,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/idle/frame2":{"frame":{"x":0,"y":0,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/idle/frame3":{"frame":{"x":450,"y":64,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/idle/frame4":{"frame":{"x":450,"y":128,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/idle/frame5":{"frame":{"x":150,"y":448,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/idle/frame6":{"frame":{"x":300,"y":384,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/idle/frame7":{"frame":{"x":450,"y":192,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/idle/frame8":{"frame":{"x":375,"y":320,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/run/frame1":{"frame":{"x":225,"y":448,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/run/frame2":{"frame":{"x":450,"y":256,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/run/frame3":{"frame":{"x":375,"y":384,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/run/frame4":{"frame":{"x":300,"y":448,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/run/frame5":{"frame":{"x":450,"y":320,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/run/frame6":{"frame":{"x":375,"y":448,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/run/frame7":{"frame":{"x":450,"y":384,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false},"skeleton_archer_style_A/run/frame8":{"frame":{"x":450,"y":448,"w":73,"h":62},"sourceSize":{"w":73,"h":62},"rotated":false}}}')},function(A,t,e){A.exports=e.p+"c421d9fd6c9875f06fab244e186ce434.png"},function(A,t,e){A.exports=e.p+"42f8d92ec87c7046930da5f608c376dd.png"},function(A,t,e){A.exports=e.p+"8e75f7a1669bc7773727751ba64bce2e.png"},function(A,t,e){A.exports=e.p+"970da3601d02d25a0fcd3ac13c0526ec.png"},function(A,t,e){A.exports=e.p+"57225412cf84217bdea1e218e91e1780.png"},function(A,t,e){A.exports=e.p+"3f43f7578333e8272a01a6a27dd17c8b.png"},function(A,t,e){A.exports=e.p+"5b450ce20bbc035bff390b0eb936a933.png"},function(A,t,e){A.exports=e.p+"0bcd83143261c0a12103908403ab437a.png"},function(A,t,e){A.exports=e.p+"5e3e3e4c6b263be8f167c2f2349f3f77.png"},function(A,t,e){A.exports=e.p+"d7b2cdbbdfbf4919ce03260b66049cb2.png"},function(A,t,e){A.exports=e.p+"34a968f73d567460c4c1dc89b5658b30.png"},function(A,t,e){A.exports=e.p+"a514e7faf4994c8b31087696e2c2104f.png"},function(A,t,e){A.exports=e.p+"ec8d77fb551dffa2065945f1f99c5b66.png"},function(A,t,e){A.exports=e.p+"a13f8ec2470d5290133a3722479c1a8d.png"},function(A,t,e){A.exports=e.p+"fb612a88f65bf10a58e586f55f10aad3.png"},function(A,t,e){A.exports=e.p+"4ebfea37834b4e57bedd9a0823e3db24.png"},function(A,t,e){A.exports=e.p+"ea41e747666a6a5bb8e29cbc972bb679.png"},function(A,t,e){A.exports=e.p+"e7657c30dcbcf34db521e0c7cbceca30.png"},function(A,t,e){A.exports=e.p+"b0dcc8fb8552c16e86043956856d304f.png"},function(A,t,e){A.exports=e.p+"86c9fa3c40f594e5e7ba8637e2150e1c.wav"},function(A,t,e){A.exports=e.p+"64d379f79b50136fc991a5f8ab2689fb.wav"},function(A,t,e){A.exports=e.p+"1a03110a67b89df2c217b7e4c91e4aef.mp3"},function(A,t,e){A.exports=e.p+"39b196d6c491ec1bb78ddedae45ce123.mp3"},function(A,t,e){A.exports=e.p+"45a2298129bcfd24ffb095f2444431fe.wav"},function(A,t,e){A.exports=e.p+"9cf53335254a36669230a361f24fc911.wav"},function(A,t,e){"use strict";function i(A,t,e){e=e||2;var i,o,a,h,l,d,p,f=t&&t.length,v=f?t[0]*e:A.length,y=s(A,0,v,e,!0),m=[];if(!y||y.next===y.prev)return m;if(f&&(y=function(A,t,e,i){var r,o,a,h,l,d=[];for(r=0,o=t.length;r80*e){i=a=A[0],o=h=A[1];for(var w=e;wa&&(a=l),d>h&&(h=d);p=0!==(p=Math.max(a-i,h-o))?1/p:0}return r(y,m,e,i,o,p),m}function s(A,t,e,i,s){var n,r;if(s===T(A,t,e,i)>0)for(n=t;n=t;n-=i)r=x(n,A[n],A[n+1],r);return r&&y(r,r.next)&&(C(r),r=r.next),r}function n(A,t){if(!A)return A;t||(t=A);var e,i=A;do{if(e=!1,i.steiner||!y(i,i.next)&&0!==v(i.prev,i,i.next))i=i.next;else{if(C(i),(i=t=i.prev)===i.next)break;e=!0}}while(e||i!==t);return t}function r(A,t,e,i,s,c,u){if(A){!u&&c&&function(A,t,e,i){var s=A;do{null===s.z&&(s.z=d(s.x,s.y,t,e,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==A);s.prevZ.nextZ=null,s.prevZ=null,function(A){var t,e,i,s,n,r,o,a,h=1;do{for(e=A,A=null,n=null,r=0;e;){for(r++,i=e,o=0,t=0;t0||a>0&&i;)0!==o&&(0===a||!i||e.z<=i.z)?(s=e,e=e.nextZ,o--):(s=i,i=i.nextZ,a--),n?n.nextZ=s:A=s,s.prevZ=n,n=s;e=i}n.nextZ=null,h*=2}while(r>1)}(s)}(A,i,s,c);for(var g,p,f=A;A.prev!==A.next;)if(g=A.prev,p=A.next,c?a(A,i,s,c):o(A))t.push(g.i/e),t.push(A.i/e),t.push(p.i/e),C(A),A=p.next,f=p.next;else if((A=p)===f){u?1===u?r(A=h(A,t,e),t,e,i,s,c,2):2===u&&l(A,t,e,i,s,c):r(n(A),t,e,i,s,c,1);break}}}function o(A){var t=A.prev,e=A,i=A.next;if(v(t,e,i)>=0)return!1;for(var s=A.next.next;s!==A.prev;){if(p(t.x,t.y,e.x,e.y,i.x,i.y,s.x,s.y)&&v(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function a(A,t,e,i){var s=A.prev,n=A,r=A.next;if(v(s,n,r)>=0)return!1;for(var o=s.xn.x?s.x>r.x?s.x:r.x:n.x>r.x?n.x:r.x,l=s.y>n.y?s.y>r.y?s.y:r.y:n.y>r.y?n.y:r.y,c=d(o,a,t,e,i),u=d(h,l,t,e,i),g=A.prevZ,f=A.nextZ;g&&g.z>=c&&f&&f.z<=u;){if(g!==A.prev&&g!==A.next&&p(s.x,s.y,n.x,n.y,r.x,r.y,g.x,g.y)&&v(g.prev,g,g.next)>=0)return!1;if(g=g.prevZ,f!==A.prev&&f!==A.next&&p(s.x,s.y,n.x,n.y,r.x,r.y,f.x,f.y)&&v(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;g&&g.z>=c;){if(g!==A.prev&&g!==A.next&&p(s.x,s.y,n.x,n.y,r.x,r.y,g.x,g.y)&&v(g.prev,g,g.next)>=0)return!1;g=g.prevZ}for(;f&&f.z<=u;){if(f!==A.prev&&f!==A.next&&p(s.x,s.y,n.x,n.y,r.x,r.y,f.x,f.y)&&v(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function h(A,t,e){var i=A;do{var s=i.prev,n=i.next.next;!y(s,n)&&m(s,i,i.next,n)&&w(s,n)&&w(n,s)&&(t.push(s.i/e),t.push(i.i/e),t.push(n.i/e),C(i),C(i.next),i=A=n),i=i.next}while(i!==A);return i}function l(A,t,e,i,s,o){var a=A;do{for(var h=a.next.next;h!==a.prev;){if(a.i!==h.i&&f(a,h)){var l=B(a,h);return a=n(a,a.next),l=n(l,l.next),r(a,t,e,i,s,o),void r(l,t,e,i,s,o)}h=h.next}a=a.next}while(a!==A)}function c(A,t){return A.x-t.x}function u(A,t){if(t=function(A,t){var e,i=t,s=A.x,n=A.y,r=-1/0;do{if(n<=i.y&&n>=i.next.y&&i.next.y!==i.y){var o=i.x+(n-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(o<=s&&o>r){if(r=o,o===s){if(n===i.y)return i;if(n===i.next.y)return i.next}e=i.x=i.x&&i.x>=l&&s!==i.x&&p(ne.x)&&w(i,A)&&(e=i,u=a),i=i.next;return e}(A,t)){var e=B(t,A);n(e,e.next)}}function d(A,t,e,i,s){return(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=32767*(A-e)*s)|A<<8))|A<<4))|A<<2))|A<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function g(A){var t=A,e=A;do{t.x=0&&(A-r)*(i-o)-(e-r)*(t-o)>=0&&(e-r)*(n-o)-(s-r)*(i-o)>=0}function f(A,t){return A.next.i!==t.i&&A.prev.i!==t.i&&!function(A,t){var e=A;do{if(e.i!==A.i&&e.next.i!==A.i&&e.i!==t.i&&e.next.i!==t.i&&m(e,e.next,A,t))return!0;e=e.next}while(e!==A);return!1}(A,t)&&w(A,t)&&w(t,A)&&function(A,t){var e=A,i=!1,s=(A.x+t.x)/2,n=(A.y+t.y)/2;do{e.y>n!=e.next.y>n&&e.next.y!==e.y&&s<(e.next.x-e.x)*(n-e.y)/(e.next.y-e.y)+e.x&&(i=!i),e=e.next}while(e!==A);return i}(A,t)}function v(A,t,e){return(t.y-A.y)*(e.x-t.x)-(t.x-A.x)*(e.y-t.y)}function y(A,t){return A.x===t.x&&A.y===t.y}function m(A,t,e,i){return!!(y(A,t)&&y(e,i)||y(A,i)&&y(e,t))||v(A,t,e)>0!=v(A,t,i)>0&&v(e,i,A)>0!=v(e,i,t)>0}function w(A,t){return v(A.prev,A,A.next)<0?v(A,t,A.next)>=0&&v(A,A.prev,t)>=0:v(A,t,A.prev)<0||v(A,A.next,t)<0}function B(A,t){var e=new b(A.i,A.x,A.y),i=new b(t.i,t.x,t.y),s=A.next,n=t.prev;return A.next=t,t.prev=A,e.next=s,s.prev=e,i.next=e,e.prev=i,n.next=i,i.prev=n,i}function x(A,t,e,i){var s=new b(A,t,e);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function C(A){A.next.prev=A.prev,A.prev.next=A.next,A.prevZ&&(A.prevZ.nextZ=A.nextZ),A.nextZ&&(A.nextZ.prevZ=A.prevZ)}function b(A,t,e){this.i=A,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function T(A,t,e,i){for(var s=0,n=t,r=e-i;n0&&(i+=A[s-1].length,e.holes.push(i))}return e}},function(A,t,e){var i=e(1486),s=e(1487);A.exports=function(A,t,e,n,r){var o=this.pipeline,a=o._tempMatrix1,h=o._tempMatrix2,l=o._tempMatrix3;A.setPipeline(o),h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),a.copyFrom(n.matrix),r?(a.multiplyWithOffset(r,-n.scrollX*t.scrollFactorX,-n.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=n.scrollX*t.scrollFactorX,h.f-=n.scrollY*t.scrollFactorY),a.multiply(h,l);var c=t._displayOriginX,u=t._displayOriginY,d=n.alpha*t.alpha;t.isFilled&&i(o,l,t,d,c,u),t.isStroked&&s(o,t,d,c,u)}},function(A,t,e){var i=e(1488),s=e(1489),n=Phaser.Renderer.Canvas.SetTransform;A.exports=function(A,t,e,r,o){var a=A.currentContext;if(n(A,a,t,r,o)){var h=t._displayOriginX,l=t._displayOriginY,c=t.pathData,u=c.length-1,d=c[0]-h,g=c[1]-l;a.beginPath(),a.moveTo(d,g),t.closePath||(u-=2);for(var p=2;p>>0;if("function"!=typeof A)throw new TypeError;for(var i=arguments.length>=2?arguments[1]:void 0,s=0;s>16)+(65280&A)+((255&A)<<16)},i={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(A,t,i,s){return void 0===A&&(A=16777215),void 0===t&&(t=A,i=A,s=A),this._tintTL=e(A),this._tintTR=e(t),this._tintBL=e(i),this._tintBR=e(s),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(A,t,e,i){return this.setTint(A,t,e,i),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(A){this._tintTL=e(A),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(A){this._tintTR=e(A),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(A){this._tintBL=e(A),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(A){this._tintBR=e(A),this._isTinted=!0}},tint:{set:function(A){this.setTint(A,A,A,A)}},isTinted:{get:function(){return this._isTinted}}};A.exports=i},function(A,t){A.exports="changedata"},function(A,t){A.exports="changedata-"},function(A,t){A.exports="removedata"},function(A,t){A.exports="setdata"},function(A,t){A.exports="destroy"},function(A,t){A.exports="complete"},function(A,t){A.exports="created"},function(A,t){A.exports="error"},function(A,t){A.exports="loop"},function(A,t){A.exports="play"},function(A,t){A.exports="seeked"},function(A,t){A.exports="seeking"},function(A,t){A.exports="stop"},function(A,t){A.exports="timeout"},function(A,t){A.exports="unlocked"},function(A,t,e){var i=e(40);A.exports=function(A,t,e,s,n){return i(A,"alpha",t,e,s,n)}},function(A,t,e){var i=e(40);A.exports=function(A,t,e,s,n){return i(A,"x",t,e,s,n)}},function(A,t,e){var i=e(40);A.exports=function(A,t,e,s,n,r,o){return null==e&&(e=t),i(A,"x",t,s,r,o),i(A,"y",e,n,r,o)}},function(A,t,e){var i=e(40);A.exports=function(A,t,e,s,n){return i(A,"y",t,e,s,n)}},function(A,t){A.exports=function(A,t,e,i){void 0===e&&(e=0),void 0===i&&(i=6.28);for(var s=e,n=(i-e)/A.length,r=0;r0?s(r,e):e<0&&n(r,Math.abs(e));for(var o=0;o1)if(0===s){var u=A.length-1;for(r=A[u].x,o=A[u].y,a=u-1;a>=0;a--)h=(c=A[a]).x,l=c.y,c.x=r,c.y=o,r=h,o=l;A[u].x=t,A[u].y=e}else{for(r=A[0].x,o=A[0].y,a=1;a0?(this._speedX-=this.dragX*A,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*A,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*A,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*A,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(t.scrollX-=this._speedX*A|0),0!==this._speedY&&(t.scrollY-=this._speedY*A|0),0!==this._zoom&&(t.zoom+=this._zoom,t.zoom<.001&&(t.zoom=.001))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});A.exports=n},function(A,t,e){A.exports={Camera:e(298),BaseCamera:e(104),CameraManager:e(745),Effects:e(306),Events:e(54)}},function(A,t){A.exports="cameradestroy"},function(A,t){A.exports="camerafadeincomplete"},function(A,t){A.exports="camerafadeinstart"},function(A,t){A.exports="camerafadeoutcomplete"},function(A,t){A.exports="camerafadeoutstart"},function(A,t){A.exports="cameraflashcomplete"},function(A,t){A.exports="cameraflashstart"},function(A,t){A.exports="camerapancomplete"},function(A,t){A.exports="camerapanstart"},function(A,t){A.exports="postrender"},function(A,t){A.exports="prerender"},function(A,t){A.exports="camerashakecomplete"},function(A,t){A.exports="camerashakestart"},function(A,t){A.exports="camerazoomcomplete"},function(A,t){A.exports="camerazoomstart"},function(A,t,e){var i=e(24),s=e(0),n=e(54),r=new s({initialize:function(A){this.camera=A,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(A,t,e,i,s,r,o,a){if(void 0===A&&(A=!0),void 0===t&&(t=1e3),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=t,this.direction=A,this.progress=0,this.red=e,this.green=i,this.blue=s,this.alpha=A?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=A?n.FADE_OUT_START:n.FADE_IN_START;return this.camera.emit(h,this.camera,this,t,e,i,s),this.camera},update:function(A,t){this.isRunning&&(this._elapsed+=t,this.progress=i(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed=1?1:1/t*(1+(t*A|0))}},function(A,t,e){var i=e(24),s=e(0),n=e(54),r=e(3),o=new s({initialize:function(A){this.camera=A,this.isRunning=!1,this.duration=0,this.intensity=new r,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(A,t,e,i,s){return void 0===A&&(A=100),void 0===t&&(t=.05),void 0===e&&(e=!1),void 0===i&&(i=null),void 0===s&&(s=this.camera.scene),!e&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=A,this.progress=0,"number"==typeof t?this.intensity.set(t):this.intensity.set(t.x,t.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=i,this._onUpdateScope=s,this.camera.emit(n.SHAKE_START,this.camera,this,A,t),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(A,t){if(this.isRunning)if(this._elapsed+=t,this.progress=i(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed0&&(r.preRender(1),A.render(i,t,e,r))}},resetAll:function(){for(var A=0;A1)for(var e=1;e=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||i.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":i.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll"),s)},function(A,t,e){var i=e(126),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};A.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var A=document.createElement("audio"),t=!!A.canPlayType;try{if(t&&(A.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(A.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||A.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),A.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),A.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(A.canPlayType("audio/x-m4a;")||A.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),A.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==A.canPlayType('audio/mp4;codecs="ec-3"')))if(i.edge)s.dolby=!0;else if(i.safari&&i.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var e=parseInt(RegExp.$1,10),n=parseInt(RegExp.$2,10);(10===e&&n>=11||e>10)&&(s.dolby=!0)}}catch(A){}return s}()},function(A,t){var e={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};A.exports=function(){var A=document.createElement("video"),t=!!A.canPlayType;try{t&&(A.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(e.ogg=!0),A.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(e.h264=!0,e.mp4=!0),A.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(e.webm=!0),A.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(e.vp9=!0),A.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(e.hls=!0))}catch(A){}return e}()},function(A,t){var e={available:!1,cancel:"",keyboard:!1,request:""};A.exports=function(){var A,t="Fullscreen",i="FullScreen",s=["request"+t,"request"+i,"webkitRequest"+t,"webkitRequest"+i,"msRequest"+t,"msRequest"+i,"mozRequest"+i,"mozRequest"+t];for(A=0;AMath.PI&&(A-=i.PI2),Math.abs(((A+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(A,t,e){var i=e(323);A.exports=function(A){return i(A+Math.PI)}},function(A,t,e){var i=e(25);A.exports=function(A,t,e){return void 0===e&&(e=.05),A===t?A:(Math.abs(t-A)<=e||Math.abs(t-A)>=i.PI2-e?A=t:(Math.abs(t-A)>Math.PI&&(tA?A+=e:t1?A[e]-(i(s-e,A[e],A[e],A[e-1],A[e-1])-A[e]):i(s-n,A[n?n-1:0],A[n],A[e1?i(A[e],A[e-1],e-s):i(A[n],A[n+1>e?e:n+1],s-n)}},function(A,t,e){var i=e(172);A.exports=function(A,t,e){return t+(e-t)*i(A,0,1)}},function(A,t,e){A.exports={GetNext:e(332),IsSize:e(127),IsValue:e(797)}},function(A,t){A.exports=function(A){return A>0&&0==(A&A-1)}},function(A,t,e){A.exports={Ceil:e(333),Floor:e(106),To:e(799)}},function(A,t){A.exports=function(A,t,e,i){return void 0===e&&(e=0),0===t?A:(A-=e,A=t*Math.round(A/t),i?(e+A)/t:e+A)}},function(A,t,e){var i=new(e(0))({initialize:function(A){void 0===A&&(A=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],A&&this.init(A)},rnd:function(){var A=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|A,this.s0=this.s1,this.s1=this.s2,this.s2=A-this.c,this.s2},hash:function(A){var t,e=this.n;A=A.toString();for(var i=0;i>>0,e=(t*=e)>>>0,e+=4294967296*(t-=e);return this.n=e,2.3283064365386963e-10*(e>>>0)},init:function(A){"string"==typeof A?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 t=0;t0;t--){var e=Math.floor(this.frac()*(t+1)),i=A[e];A[e]=A[t],A[t]=i}return A}});A.exports=i},function(A,t){A.exports=function(A){for(var t=0,e=0;e1?void 0!==i?(s=(i-A)/(i-e))<0&&(s=0):s=1:s<0&&(s=0),s}},function(A,t){A.exports=function(A,t){void 0===t&&(t=1);var e=2*Math.random()*Math.PI;return A.x=Math.cos(e)*t,A.y=Math.sin(e)*t,A}},function(A,t){A.exports=function(A,t,e){void 0===t&&(t=0),void 0===e&&(e=10);var i=Math.pow(e,-t);return Math.round(A*i)/i}},function(A,t){A.exports=function(A,t,e,i){void 0===t&&(t=1),void 0===e&&(e=1),void 0===i&&(i=1),i*=Math.PI/A;for(var s=[],n=[],r=0;r0&&A<=t*e&&(n=A>t-1?A-(r=Math.floor(A/t))*t:A,s.set(n,r)),s}},function(A,t){A.exports=function(A,t,e){return Math.abs(A-t)<=e}},function(A,t){A.exports="addtexture"},function(A,t){A.exports="onerror"},function(A,t){A.exports="onload"},function(A,t){A.exports="ready"},function(A,t){A.exports="removetexture"},function(A,t){A.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("\n")},function(A,t){A.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(A,t){A.exports=["#define SHADER_NAME PHASER_FORWARD_DIFFUSE_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.rgb * 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("\n")},function(A,t){A.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_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.rgb * outTint.a, outTint.a);"," vec4 color = texture;",""," if (outTintEffect == 0.0)"," {"," // Multiply texture tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);"," color.a = texture.a * texel.a;"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(A,t){A.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}","",""].join("\n")},function(A,t,e){A.exports={GenerateTexture:e(357),Palettes:e(827)}},function(A,t,e){A.exports={ARNE16:e(358),C64:e(828),CGA:e(829),JMP:e(830),MSX:e(831)}},function(A,t){A.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(A,t){A.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(A,t){A.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(A,t){A.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(A,t,e){A.exports={Path:e(833),CubicBezier:e(359),Curve:e(87),Ellipse:e(360),Line:e(361),QuadraticBezier:e(362),Spline:e(363)}},function(A,t,e){var i=e(0),s=e(359),n=e(360),r=e(5),o=e(361),a=e(834),h=e(362),l=e(12),c=e(363),u=e(3),d=new i({initialize:function(A,t){void 0===A&&(A=0),void 0===t&&(t=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new u,this._tmpVec2A=new u,this._tmpVec2B=new u,"object"==typeof A?this.fromJSON(A):this.startPoint.set(A,t)},add:function(A){return this.curves.push(A),this},circleTo:function(A,t,e){return void 0===t&&(t=!1),this.ellipseTo(A,A,0,360,t,e)},closePath:function(){var A=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);return A.equals(t)||this.curves.push(new o(t,A)),this},cubicBezierTo:function(A,t,e,i,n,r){var o,a,h,l=this.getEndPoint();return A instanceof u?(o=A,a=t,h=e):(o=new u(e,i),a=new u(n,r),h=new u(A,t)),this.add(new s(l,o,a,h))},quadraticBezierTo:function(A,t,e,i){var s,n,r=this.getEndPoint();return A instanceof u?(s=A,n=t):(s=new u(e,i),n=new u(A,t)),this.add(new h(r,s,n))},draw:function(A,t){for(var e=0;e0?this.curves[this.curves.length-1].getPoint(1,A):A.copy(this.startPoint),A},getLength:function(){var A=this.getCurveLengths();return A[A.length-1]},getPoint:function(A,t){void 0===t&&(t=new u);for(var e=A*this.getLength(),i=this.getCurveLengths(),s=0;s=e){var n=i[s]-e,r=this.curves[s],o=r.getLength(),a=0===o?0:1-n/o;return r.getPointAt(a,t)}s++}return null},getPoints:function(A){void 0===A&&(A=12);for(var t,e=[],i=0;i1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},getRandomPoint:function(A){return void 0===A&&(A=new u),this.getPoint(Math.random(),A)},getSpacedPoints:function(A){void 0===A&&(A=40);for(var t=[],e=0;e<=A;e++)t.push(this.getPoint(e/A));return this.autoClose&&t.push(t[0]),t},getStartPoint:function(A){return void 0===A&&(A=new u),A.copy(this.startPoint)},lineTo:function(A,t){A instanceof u?this._tmpVec2B.copy(A):this._tmpVec2B.set(A,t);var e=this.getEndPoint(this._tmpVec2A);return this.add(new o([e.x,e.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(A){return A.unshift(this.getEndPoint()),this.add(new c(A))},moveTo:function(A,t){return A instanceof u?this.add(new a(A.x,A.y)):this.add(new a(A,t))},toJSON:function(){for(var A=[],t=0;t>16&255,g:A>>8&255,b:255&A,a:255};return A>16777215&&(t.a=A>>>24),t}},function(A,t,e){var i=e(37),s=e(367);A.exports=function(A,t,e){var n=e,r=e,o=e;if(0!==t){var a=e<.5?e*(1+t):e+t-e*t,h=2*e-a;n=s(h,a,A+1/3),r=s(h,a,A),o=s(h,a,A-1/3)}return(new i).setGLTo(n,r,o,1)}},function(A,t,e){var i=e(178);A.exports=function(A,t){void 0===A&&(A=1),void 0===t&&(t=1);for(var e=[],s=0;s<=359;s++)e.push(i(s/359,A,t));return e}},function(A,t,e){var i=e(124),s=function(A,t,e,s,n,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:i(A,s,h),g:i(t,n,h),b:i(e,r,h)}};A.exports={RGBWithRGB:s,ColorWithRGB:function(A,t,e,i,n,r){return void 0===n&&(n=100),void 0===r&&(r=0),s(A.r,A.g,A.b,t,e,i,n,r)},ColorWithColor:function(A,t,e,i){return void 0===e&&(e=100),void 0===i&&(i=0),s(A.r,A.g,A.b,t.r,t.g,t.b,e,i)}}},function(A,t,e){var i=e(186),s=e(37);A.exports=function(A,t){return void 0===A&&(A=0),void 0===t&&(t=255),new s(i(A,t),i(A,t),i(A,t))}},function(A,t,e){var i=e(366);A.exports=function(A,t,e,s,n){return void 0===s&&(s=255),void 0===n&&(n="#"),"#"===n?"#"+((1<<24)+(A<<16)+(t<<8)+e).toString(16).slice(1):"0x"+i(s)+i(A)+i(t)+i(e)}},function(A,t,e){A.exports={BitmapMask:e(283),GeometryMask:e(284)}},function(A,t,e){var i={AddToDOM:e(130),DOMContentLoaded:e(368),GetScreenOrientation:e(369),GetTarget:e(374),ParseXML:e(375),RemoveFromDOM:e(194),RequestAnimationFrame:e(355)};A.exports=i},function(A,t,e){A.exports={EventEmitter:e(868)}},function(A,t,e){var i=e(0),s=e(9),n=e(18),r=new i({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});n.register("EventEmitter",r,"events"),A.exports=r},function(A,t,e){var i=e(130),s=e(294),n=e(297),r=e(28),o=e(0),a=e(319),h=e(870),l=e(343),c=e(102),u=e(353),d=e(320),g=e(368),p=e(9),f=e(20),v=e(376),y=e(18),m=e(381),w=e(382),B=e(384),x=e(129),C=e(387),b=e(354),T=e(356),Q=e(391),E=e(399),F=new o({initialize:function(A){this.config=new a(A),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new p,this.anims=new s(this),this.textures=new C(this),this.cache=new n(this),this.registry=new c(this),this.input=new v(this,this.config),this.scene=new B(this,this.config.sceneConfig),this.device=d,this.scale=new w(this,this.config),this.sound=null,this.sound=Q.create(this),this.loop=new b(this,this.config.fps),this.plugins=new m(this,this.config),this.facebook=new E(this),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,g(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),l(this),h(this),u(this),i(this.canvas,this.config.parent),this.textures.once(x.READY,this.texturesReady,this),this.events.emit(f.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(f.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)),T(this);var A=this.events;A.on(f.HIDDEN,this.onHidden,this),A.on(f.VISIBLE,this.onVisible,this),A.on(f.BLUR,this.onBlur,this),A.on(f.FOCUS,this.onFocus,this)},step:function(A,t){if(this.pendingDestroy)return this.runDestroy();var e=this.events;e.emit(f.PRE_STEP,A,t),e.emit(f.STEP,A,t),this.scene.update(A,t),e.emit(f.POST_STEP,A,t);var i=this.renderer;i.preRender(),e.emit(f.PRE_RENDER,i,A,t),this.scene.render(i),i.postRender(),e.emit(f.POST_RENDER,i,A,t)},headlessStep:function(A,t){var e=this.events;e.emit(f.PRE_STEP,A,t),e.emit(f.STEP,A,t),this.scene.update(A,t),e.emit(f.POST_STEP,A,t),e.emit(f.PRE_RENDER),e.emit(f.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(f.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(f.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(A,t){void 0===t&&(t=!1),this.pendingDestroy=!0,this.removeCanvas=A,this.noReturn=t},runDestroy:function(){this.events.emit(f.DESTROY),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(r.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});A.exports=F},function(A,t,e){var i=e(130);A.exports=function(A){var t=A.config;if(t.parent&&t.domCreateContainer){var e=document.createElement("div");e.style.cssText=["display: block;","width: "+A.scale.width+"px;","height: "+A.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),A.domContainer=e,i(e,t.parent)}}},function(A,t){A.exports="boot"},function(A,t){A.exports="destroy"},function(A,t){A.exports="dragend"},function(A,t){A.exports="dragenter"},function(A,t){A.exports="drag"},function(A,t){A.exports="dragleave"},function(A,t){A.exports="dragover"},function(A,t){A.exports="dragstart"},function(A,t){A.exports="drop"},function(A,t){A.exports="gameout"},function(A,t){A.exports="gameover"},function(A,t){A.exports="gameobjectdown"},function(A,t){A.exports="dragend"},function(A,t){A.exports="dragenter"},function(A,t){A.exports="drag"},function(A,t){A.exports="dragleave"},function(A,t){A.exports="dragover"},function(A,t){A.exports="dragstart"},function(A,t){A.exports="drop"},function(A,t){A.exports="gameobjectmove"},function(A,t){A.exports="gameobjectout"},function(A,t){A.exports="gameobjectover"},function(A,t){A.exports="pointerdown"},function(A,t){A.exports="pointermove"},function(A,t){A.exports="pointerout"},function(A,t){A.exports="pointerover"},function(A,t){A.exports="pointerup"},function(A,t){A.exports="wheel"},function(A,t){A.exports="gameobjectup"},function(A,t){A.exports="gameobjectwheel"},function(A,t){A.exports="boot"},function(A,t){A.exports="process"},function(A,t){A.exports="update"},function(A,t){A.exports="pointerdown"},function(A,t){A.exports="pointerdownoutside"},function(A,t){A.exports="pointermove"},function(A,t){A.exports="pointerout"},function(A,t){A.exports="pointerover"},function(A,t){A.exports="pointerup"},function(A,t){A.exports="pointerupoutside"},function(A,t){A.exports="wheel"},function(A,t){A.exports="pointerlockchange"},function(A,t){A.exports="preupdate"},function(A,t){A.exports="shutdown"},function(A,t){A.exports="start"},function(A,t){A.exports="update"},function(A,t){A.exports=function(A){if(!A)return window.innerHeight;var t=Math.abs(window.orientation),e={w:0,h:0},i=document.createElement("div");return i.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(i),e.w=90===t?i.offsetHeight:window.innerWidth,e.h=90===t?window.innerWidth:i.offsetHeight,document.documentElement.removeChild(i),i=null,90!==Math.abs(window.orientation)?e.h:e.w}},function(A,t){A.exports="addfile"},function(A,t){A.exports="complete"},function(A,t){A.exports="filecomplete"},function(A,t){A.exports="filecomplete-"},function(A,t){A.exports="loaderror"},function(A,t){A.exports="load"},function(A,t){A.exports="fileprogress"},function(A,t){A.exports="postprocess"},function(A,t){A.exports="progress"},function(A,t){A.exports="start"},function(A,t,e){var i=e(2),s=e(197);A.exports=function(A){var t=A.game.config.defaultPhysicsSystem,e=i(A.settings,"physics",!1);if(t||e){var n=[];if(t&&n.push(s(t+"Physics")),e)for(var r in e)r=s(r.concat("Physics")),-1===n.indexOf(r)&&n.push(r);return n}}},function(A,t,e){var i=e(2);A.exports=function(A){var t=A.plugins.getDefaultScenePlugins(),e=i(A.settings,"plugins",!1);return Array.isArray(e)?e:t||[]}},function(A,t){var e={game:"game",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",cameras3d:"cameras3d",facebook:"facebook"};A.exports=e},function(A,t){A.exports=function(A,t,e){if(e.getElementsByTagName("TextureAtlas")){var i=A.source[t];A.add("__BASE",t,0,0,i.width,i.height);for(var s,n=e.getElementsByTagName("SubTexture"),r=0;rp||c<-p)&&(c=0),c<0&&(c=p+c),-1!==u&&(p=c+(u+1));for(var f=d,v=d,y=0,m=0,w=0;wn&&(y=B-n),x>r&&(m=x-r),A.add(w,t,e+f,s+v,a-y,h-m),(f+=a+g)+a>n&&(f=d,v+=h+g)}return A}},function(A,t,e){var i=e(2);A.exports=function(A,t,e){var s=i(e,"frameWidth",null),n=i(e,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var r=A.source[0];A.add("__BASE",0,0,0,r.width,r.height);var o,a=i(e,"startFrame",0),h=i(e,"endFrame",-1),l=i(e,"margin",0),c=i(e,"spacing",0),u=t.cutX,d=t.cutY,g=t.cutWidth,p=t.cutHeight,f=t.realWidth,v=t.realHeight,y=Math.floor((f-l+c)/(s+c)),m=Math.floor((v-l+c)/(n+c)),w=y*m,B=t.x,x=s-B,C=s-(f-g-B),b=t.y,T=n-b,Q=n-(v-p-b);(a>w||a<-w)&&(a=0),a<0&&(a=w+a),-1!==h&&(w=a+(h+1));for(var E=l,F=l,M=0,I=t.sourceIndex,S=0;S0){var n=e-A.length;if(n<=0)return null}if(!Array.isArray(t))return-1===A.indexOf(t)?(A.push(t),i&&i.call(s,t),t):null;for(var r=t.length-1;r>=0;)-1!==A.indexOf(t[r])&&t.splice(r,1),r--;if(0===(r=t.length))return null;e>0&&r>n&&(t.splice(n),r=n);for(var o=0;o0){var r=i-A.length;if(r<=0)return null}if(!Array.isArray(t))return-1===A.indexOf(t)?(A.splice(e,0,t),s&&s.call(n,t),t):null;for(var o=t.length-1;o>=0;)-1!==A.indexOf(t[o])&&t.pop(),o--;if(0===(o=t.length))return null;i>0&&o>r&&(t.splice(r),o=r);for(var a=o-1;a>=0;a--){var h=t[a];A.splice(e,0,h),s&&s.call(n,h)}return t}},function(A,t){A.exports=function(A,t){var e=A.indexOf(t);return-1!==e&&e0){var i=A[e-1],s=A.indexOf(i);A[e]=i,A[s]=t}return A}},function(A,t){A.exports=function(A,t,e){var i=A.indexOf(t);if(-1===i||e<0||e>=A.length)throw new Error("Supplied index out of bounds");return i!==e&&(A.splice(i,1),A.splice(e,0,t)),t}},function(A,t){A.exports=function(A,t){var e=A.indexOf(t);if(-1!==e&&eA.length-1)throw new Error("Index out of bounds");var n=i(A,t);return e&&e.call(s,n),n}},function(A,t,e){var i=e(73);A.exports=function(A,t,e,s,n){if(void 0===t&&(t=0),void 0===e&&(e=A.length),void 0===n&&(n=A),i(A,t,e)){var r=e-t,o=A.splice(t,r);if(s)for(var a=0;a0&&(A.splice(e,1),A.unshift(t)),t}},function(A,t,e){var i=e(73);A.exports=function(A,t,e,s,n){if(void 0===s&&(s=0),void 0===n&&(n=A.length),i(A,s,n))for(var r=s;rf&&(n=f),r>v&&(r=v);var I=f+p.xAdvance,S=v+l;oT&&(T=E),ET&&(T=E),E0!=A>0,this._alpha=A}}});A.exports=n},function(A,t,e){var i=e(1),s=e(1);i=e(1010),s=e(1011),A.exports={renderWebGL:i,renderCanvas:s}},function(A,t){A.exports=function(A,t,e,i,s){var n=t.list;if(0!==n.length){var r=t.localTransform;s?(r.loadIdentity(),r.multiply(s),r.translate(t.x,t.y),r.rotate(t.rotation),r.scale(t.scaleX,t.scaleY)):r.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY);var o=-1!==t.blendMode;o||A.setBlendMode(0);for(var a=t.alphaTopLeft,h=t.alphaTopRight,l=t.alphaBottomLeft,c=t.alphaBottomRight,u=t.scrollFactorX,d=t.scrollFactorY,g=n,p=n.length,f=0;f0||t.cropHeight>0;h&&(a.flush(),A.pushScissor(t.x,t.y,t.cropWidth*t.scaleX,t.cropHeight*t.scaleY));var l=a._tempMatrix1,c=a._tempMatrix2,u=a._tempMatrix3,d=a._tempMatrix4;c.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),l.copyFrom(s.matrix),n?(l.multiplyWithOffset(n,-s.scrollX*t.scrollFactorX,-s.scrollY*t.scrollFactorY),c.e=t.x,c.f=t.y,l.multiply(c,u)):(c.e-=s.scrollX*t.scrollFactorX,c.f-=s.scrollY*t.scrollFactorY,l.multiply(c,u));var g=t.frame,p=g.glTexture,f=g.cutX,v=g.cutY,y=p.width,m=p.height,w=t._isTinted&&t.tintFill,B=i.getTintAppendFloatAlpha(t._tintTL,s.alpha*t._alphaTL),x=i.getTintAppendFloatAlpha(t._tintTR,s.alpha*t._alphaTR),C=i.getTintAppendFloatAlpha(t._tintBL,s.alpha*t._alphaBL),b=i.getTintAppendFloatAlpha(t._tintBR,s.alpha*t._alphaBR);a.setTexture2D(p,0);var T,Q,E=0,F=0,M=0,I=0,S=t.letterSpacing,D=0,_=0,O=0,k=0,G=t.scrollX,H=t.scrollY,P=t.fontData,R=P.chars,N=P.lineHeight,L=t.fontSize/P.size,X=0,U=t._align,Y=0,z=0;t.getTextBounds(!1);var j=t._bounds.lines;1===U?z=(j.longest-j.lengths[0])/2:2===U&&(z=j.longest-j.lengths[0]);for(var W=s.roundPixels,Z=t.displayCallback,V=t.callbackData,K=0;K0&&t.cropHeight>0&&(a.beginPath(),a.rect(0,0,t.cropWidth,t.cropHeight),a.clip());for(var P=0;P0&&(R=R%x-x):R>x?R=x:R<0&&(R=x+R%x),null===Q&&(Q=new r(k+Math.cos(P)*H,G+Math.sin(P)*H,f),C.push(Q),O+=.01);O<1+L;)B=R*O+P,m=k+Math.cos(B)*H,w=G+Math.sin(B)*H,Q.points.push(new n(m,w,f)),O+=.01;B=R+P,m=k+Math.cos(B)*H,w=G+Math.sin(B)*H,Q.points.push(new n(m,w,f));break;case i.FILL_RECT:l.setTexture2D(F),l.batchFillRect(g[++M],g[++M],g[++M],g[++M],d,c);break;case i.FILL_TRIANGLE:l.setTexture2D(F),l.batchFillTriangle(g[++M],g[++M],g[++M],g[++M],g[++M],g[++M],d,c);break;case i.STROKE_TRIANGLE:l.setTexture2D(F),l.batchStrokeTriangle(g[++M],g[++M],g[++M],g[++M],g[++M],g[++M],f,d,c);break;case i.LINE_TO:null!==Q?Q.points.push(new n(g[++M],g[++M],f)):(Q=new r(g[++M],g[++M],f),C.push(Q));break;case i.MOVE_TO:Q=new r(g[++M],g[++M],f),C.push(Q);break;case i.SAVE:o.push(d.copyToArray());break;case i.RESTORE:d.copyFromArray(o.pop());break;case i.TRANSLATE:k=g[++M],G=g[++M],d.translate(k,G);break;case i.SCALE:k=g[++M],G=g[++M],d.scale(k,G);break;case i.ROTATE:d.rotate(g[++M]);break;case i.SET_TEXTURE:var X=g[++M],U=g[++M];l.currentFrame=X,l.setTexture2D(X.glTexture,0),l.tintEffect=U,F=X.glTexture;break;case i.CLEAR_TEXTURE:l.currentFrame=A.blankTexture,l.tintEffect=2,F=A.blankTexture.glTexture}}}},function(A,t,e){var i=e(1),s=e(1);i=e(1023),s=e(1024),A.exports={renderWebGL:i,renderCanvas:s}},function(A,t){A.exports=function(A,t,e,i,s){this.pipeline.batchSprite(t,i,s)}},function(A,t){A.exports=function(A,t,e,i,s){A.batchSprite(t,t.frame,i,s)}},function(A,t,e){var i=e(1),s=e(1);i=e(1026),s=e(1027),A.exports={renderWebGL:i,renderCanvas:s}},function(A,t){A.exports=function(A,t,e,i,s){this.pipeline.batchSprite(t,i,s)}},function(A,t){A.exports=function(A,t,e,i,s){A.batchSprite(t,t.frame,i,s)}},function(A,t,e){A.exports={GravityWell:e(411),Particle:e(412),ParticleEmitter:e(413),ParticleEmitterManager:e(211),Zones:e(1033)}},function(A,t,e){var i=e(0),s=e(334),n=e(92),r=e(2),o=e(64),a=new i({initialize:function(A,t,e,i){void 0===i&&(i=!1),this.propertyKey=t,this.propertyValue=e,this.defaultValue=e,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=i,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(A)},loadConfig:function(A,t){void 0===A&&(A={}),t&&(this.propertyKey=t),this.propertyValue=r(A,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(A){return this.propertyValue=A,this.setMethods()},setMethods:function(){var A=this.propertyValue,t=typeof A;if("number"===t)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(A))this.onEmit=this.randomStaticValueEmit;else if("function"===t)this.emitOnly?this.onEmit=A:this.onUpdate=A;else if("object"===t&&(this.has(A,"random")||this.hasBoth(A,"start","end")||this.hasBoth(A,"min","max"))){this.start=this.has(A,"start")?A.start:A.min,this.end=this.has(A,"end")?A.end:A.max;var e=this.hasBoth(A,"min","max")||!!A.random;if(e){var i=A.random;Array.isArray(i)&&(this.start=i[0],this.end=i[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(A,"steps"))this.steps=A.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(A,"ease")?A.ease:"Linear";this.ease=n(s),e||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===t&&this.hasEither(A,"onEmit","onUpdate")&&(this.has(A,"onEmit")&&(this.onEmit=A.onEmit),this.has(A,"onUpdate")&&(this.onUpdate=A.onUpdate));return this},has:function(A,t){return A.hasOwnProperty(t)},hasBoth:function(A,t,e){return A.hasOwnProperty(t)&&A.hasOwnProperty(e)},hasEither:function(A,t,e){return A.hasOwnProperty(t)||A.hasOwnProperty(e)},defaultEmit:function(A,t,e){return e},defaultUpdate:function(A,t,e,i){return i},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var A=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[A]},randomRangedValueEmit:function(A,t){var e=s(this.start,this.end);return A&&A.data[t]&&(A.data[t].min=e),e},steppedEmit:function(){var A=this.counter,t=this.counter+(this.end-this.start)/this.steps;return this.counter=o(t,this.start,this.end),A},easedValueEmit:function(A,t){if(A&&A.data[t]){var e=A.data[t];e.min=this.start,e.max=this.end}return this.start},easeValueUpdate:function(A,t,e){var i=A.data[t];return(i.max-i.min)*this.ease(e)+i.min}});A.exports=a},function(A,t,e){var i=e(1),s=e(1);i=e(1031),s=e(1032),A.exports={renderWebGL:i,renderCanvas:s}},function(A,t,e){var i=e(11);A.exports=function(A,t,e,s,n){var r=t.emitters.list,o=r.length;if(0!==o){var a=this.pipeline,h=a._tempMatrix1.copyFrom(s.matrix),l=a._tempMatrix2,c=a._tempMatrix3,u=a._tempMatrix4.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY);h.multiply(u),A.setPipeline(a);var d=s.roundPixels,g=t.defaultFrame.glTexture,p=i.getTintAppendFloatAlphaAndSwap;a.setTexture2D(g,0);for(var f=0;f?@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"}},function(A,t,e){var i=e(6);A.exports=function(A,t){var e=t.width,s=t.height,n=Math.floor(e/2),r=Math.floor(s/2),o=i(t,"chars","");if(""!==o){var a=i(t,"image",""),h=i(t,"offset.x",0),l=i(t,"offset.y",0),c=i(t,"spacing.x",0),u=i(t,"spacing.y",0),d=i(t,"lineSpacing",0),g=i(t,"charsPerRow",null);null===g&&(g=A.sys.textures.getFrame(a).width/e)>o.length&&(g=o.length);for(var p=h,f=l,v={retroFont:!0,font:a,size:e,lineHeight:s+d,chars:{}},y=0,m=0;m0&&n.maxLines1&&(u+=d*(a-1)),{width:o,height:u,lines:a,lineWidths:r,lineSpacing:d,lineHeight:c}}},function(A,t,e){var i=e(1),s=e(1);i=e(1042),s=e(1043),A.exports={renderWebGL:i,renderCanvas:s}},function(A,t,e){var i=e(11);A.exports=function(A,t,e,s,n){if(0!==t.width&&0!==t.height){var r=t.frame,o=r.width,a=r.height,h=i.getTintAppendFloatAlpha;this.pipeline.batchTexture(t,r.glTexture,o,a,t.x,t.y,o/t.style.resolution,a/t.style.resolution,t.scaleX,t.scaleY,t.rotation,t.flipX,t.flipY,t.scrollFactorX,t.scrollFactorY,t.displayOriginX,t.displayOriginY,0,0,o,a,h(t._tintTL,s.alpha*t._alphaTL),h(t._tintTR,s.alpha*t._alphaTR),h(t._tintBL,s.alpha*t._alphaBL),h(t._tintBR,s.alpha*t._alphaBR),t._isTinted&&t.tintFill,0,0,s,n)}}},function(A,t){A.exports=function(A,t,e,i,s){0!==t.width&&0!==t.height&&A.batchSprite(t,t.frame,i,s)}},function(A,t,e){var i=e(0),s=e(15),n=e(6),r=e(1045),o={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},a=new i({initialize:function(A,t){this.parent=A,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._font,this.setStyle(t,!1,!0);var e=n(t,"metrics",!1);this.metrics=e?{ascent:n(e,"ascent",0),descent:n(e,"descent",0),fontSize:n(e,"fontSize",0)}:r(this)},setStyle:function(A,t,e){for(var i in void 0===t&&(t=!0),void 0===e&&(e=!1),A&&A.hasOwnProperty("fontSize")&&"number"==typeof A.fontSize&&(A.fontSize=A.fontSize.toString()+"px"),o){var r=e?o[i][1]:this[i];this[i]="wordWrapCallback"===i||"wordWrapCallbackScope"===i?n(A,o[i][0],r):s(A,o[i][0],r)}var a=n(A,"font",null);null!==a&&this.setFont(a,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var h=n(A,"fill",null);return null!==h&&(this.color=h),t?this.update(!0):this.parent},syncFont:function(A,t){t.font=this._font},syncStyle:function(A,t){t.textBaseline="alphabetic",t.fillStyle=this.color,t.strokeStyle=this.stroke,t.lineWidth=this.strokeThickness,t.lineCap="round",t.lineJoin="round"},syncShadow:function(A,t){t?(A.shadowOffsetX=this.shadowOffsetX,A.shadowOffsetY=this.shadowOffsetY,A.shadowColor=this.shadowColor,A.shadowBlur=this.shadowBlur):(A.shadowOffsetX=0,A.shadowOffsetY=0,A.shadowColor=0,A.shadowBlur=0)},update:function(A){return A&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=r(this)),this.parent.updateText()},setFont:function(A,t){void 0===t&&(t=!0);var e=A,i="",s="";if("string"!=typeof A)e=n(A,"fontFamily","Courier"),i=n(A,"fontSize","16px"),s=n(A,"fontStyle","");else{var r=A.split(" "),o=0;s=r.length>2?r[o++]:"",i=r[o++]||"16px",e=r[o++]||"Courier"}return e===this.fontFamily&&i===this.fontSize&&s===this.fontStyle||(this.fontFamily=e,this.fontSize=i,this.fontStyle=s,t&&this.update(!0)),this.parent},setFontFamily:function(A){return this.fontFamily!==A&&(this.fontFamily=A,this.update(!0)),this.parent},setFontStyle:function(A){return this.fontStyle!==A&&(this.fontStyle=A,this.update(!0)),this.parent},setFontSize:function(A){return"number"==typeof A&&(A=A.toString()+"px"),this.fontSize!==A&&(this.fontSize=A,this.update(!0)),this.parent},setTestString:function(A){return this.testString=A,this.update(!0)},setFixedSize:function(A,t){return this.fixedWidth=A,this.fixedHeight=t,A&&(this.parent.width=A),t&&(this.parent.height=t),this.update(!1)},setBackgroundColor:function(A){return this.backgroundColor=A,this.update(!1)},setFill:function(A){return this.color=A,this.update(!1)},setColor:function(A){return this.color=A,this.update(!1)},setResolution:function(A){return this.resolution=A,this.update(!1)},setStroke:function(A,t){return void 0===t&&(t=this.strokeThickness),void 0===A&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===A&&this.strokeThickness===t||(this.stroke=A,this.strokeThickness=t,this.update(!0)),this.parent},setShadow:function(A,t,e,i,s,n){return void 0===A&&(A=0),void 0===t&&(t=0),void 0===e&&(e="#000"),void 0===i&&(i=0),void 0===s&&(s=!1),void 0===n&&(n=!0),this.shadowOffsetX=A,this.shadowOffsetY=t,this.shadowColor=e,this.shadowBlur=i,this.shadowStroke=s,this.shadowFill=n,this.update(!1)},setShadowOffset:function(A,t){return void 0===A&&(A=0),void 0===t&&(t=A),this.shadowOffsetX=A,this.shadowOffsetY=t,this.update(!1)},setShadowColor:function(A){return void 0===A&&(A="#000"),this.shadowColor=A,this.update(!1)},setShadowBlur:function(A){return void 0===A&&(A=0),this.shadowBlur=A,this.update(!1)},setShadowStroke:function(A){return this.shadowStroke=A,this.update(!1)},setShadowFill:function(A){return this.shadowFill=A,this.update(!1)},setWordWrapWidth:function(A,t){return void 0===t&&(t=!1),this.wordWrapWidth=A,this.wordWrapUseAdvanced=t,this.update(!1)},setWordWrapCallback:function(A,t){return void 0===t&&(t=null),this.wordWrapCallback=A,this.wordWrapCallbackScope=t,this.update(!1)},setAlign:function(A){return void 0===A&&(A="left"),this.align=A,this.update(!1)},setMaxLines:function(A){return void 0===A&&(A=0),this.maxLines=A,this.update(!1)},getTextMetrics:function(){var A=this.metrics;return{ascent:A.ascent,descent:A.descent,fontSize:A.fontSize}},toJSON:function(){var A={};for(var t in o)A[t]=this[t];return A.metrics=this.getTextMetrics(),A},destroy:function(){this.parent=void 0}});A.exports=a},function(A,t,e){var i=e(28);A.exports=function(A){var t=i.create(this),e=t.getContext("2d");A.syncFont(t,e);var s=Math.ceil(e.measureText(A.testString).width*A.baselineX),n=s,r=2*n;n=n*A.baselineY|0,t.width=s,t.height=r,e.fillStyle="#f00",e.fillRect(0,0,s,r),e.font=A._font,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(A.testString,0,n);var o={ascent:0,descent:0,fontSize:0};if(!e.getImageData(0,0,s,r))return o.ascent=n,o.descent=n+6,o.fontSize=o.ascent+o.descent,i.remove(t),o;var a,h,l=e.getImageData(0,0,s,r).data,c=l.length,u=4*s,d=0,g=!1;for(a=0;an;a--){for(h=0;h0)for(l=r.fillTint,c=i.getTintAppendFloatAlphaAndSwap(t.fillColor,t.fillAlpha*u),l.TL=c,l.TR=c,l.BL=c,l.BR=c,E=0;E0)for(l=r.fillTint,c=i.getTintAppendFloatAlphaAndSwap(t.altFillColor,t.altFillAlpha*u),l.TL=c,l.TR=c,l.BL=c,l.BR=c,E=0;E0){var S=r.strokeTint,D=i.getTintAppendFloatAlphaAndSwap(t.outlineFillColor,t.outlineFillAlpha*u);for(S.TL=D,S.TR=D,S.BL=D,S.BR=D,Q=1;Q0)for(i(a,t),Q=0;Q0)for(i(a,t,t.altFillColor,t.altFillAlpha*c),Q=0;Q0){for(s(a,t,t.outlineFillColor,t.outlineFillAlpha*c),T=1;Tr.vertexCapacity&&r.flush(),r.setTexture2D(l,0);for(var v=r.vertexViewF32,y=r.vertexViewU32,m=r.vertexCount*r.vertexComponentCount-1,w=0,B=t.tintFill,x=0;x0?Math.PI*A.radius*A.radius:0}},function(A,t,e){var i=e(84);A.exports=function(A){return new i(A.x,A.y,A.radius)}},function(A,t,e){var i=e(61);A.exports=function(A,t){return i(A,t.x,t.y)}},function(A,t,e){var i=e(61);A.exports=function(A,t){return i(A,t.x,t.y)&&i(A,t.right,t.y)&&i(A,t.x,t.bottom)&&i(A,t.right,t.bottom)}},function(A,t){A.exports=function(A,t){return t.setTo(A.x,A.y,A.radius)}},function(A,t){A.exports=function(A,t){return A.x===t.x&&A.y===t.y&&A.radius===t.radius}},function(A,t,e){var i=e(12);A.exports=function(A,t){return void 0===t&&(t=new i),t.x=A.left,t.y=A.top,t.width=A.diameter,t.height=A.diameter,t}},function(A,t){A.exports=function(A,t,e){return A.x+=t,A.y+=e,A}},function(A,t){A.exports=function(A,t){return A.x+=t.x,A.y+=t.y,A}},function(A,t,e){var i=e(108);i.Area=e(1151),i.Circumference=e(409),i.CircumferencePoint=e(210),i.Clone=e(1152),i.Contains=e(109),i.ContainsPoint=e(1153),i.ContainsRect=e(1154),i.CopyFrom=e(1155),i.Equals=e(1156),i.GetBounds=e(1157),i.GetPoint=e(407),i.GetPoints=e(408),i.Offset=e(1158),i.OffsetPoint=e(1159),i.Random=e(169),A.exports=i},function(A,t){A.exports=function(A){return A.isEmpty()?0:A.getMajorRadius()*A.getMinorRadius()*Math.PI}},function(A,t,e){var i=e(108);A.exports=function(A){return new i(A.x,A.y,A.width,A.height)}},function(A,t,e){var i=e(109);A.exports=function(A,t){return i(A,t.x,t.y)}},function(A,t,e){var i=e(109);A.exports=function(A,t){return i(A,t.x,t.y)&&i(A,t.right,t.y)&&i(A,t.x,t.bottom)&&i(A,t.right,t.bottom)}},function(A,t){A.exports=function(A,t){return t.setTo(A.x,A.y,A.width,A.height)}},function(A,t){A.exports=function(A,t){return A.x===t.x&&A.y===t.y&&A.width===t.width&&A.height===t.height}},function(A,t,e){var i=e(12);A.exports=function(A,t){return void 0===t&&(t=new i),t.x=A.left,t.y=A.top,t.width=A.width,t.height=A.height,t}},function(A,t){A.exports=function(A,t,e){return A.x+=t,A.y+=e,A}},function(A,t){A.exports=function(A,t){return A.x+=t.x,A.y+=t.y,A}},function(A,t,e){var i=e(4),s=e(441);A.exports=function(A,t,e){if(void 0===e&&(e=[]),s(A,t)){var n,r,o,a,h=A.x,l=A.y,c=A.radius,u=t.x,d=t.y,g=t.radius;if(l===d)0===(o=(r=-2*d)*r-4*(n=1)*(u*u+(a=(g*g-c*c-u*u+h*h)/(2*(h-u)))*a-2*u*a+d*d-g*g))?e.push(new i(a,-r/(2*n))):o>0&&(e.push(new i(a,(-r+Math.sqrt(o))/(2*n))),e.push(new i(a,(-r-Math.sqrt(o))/(2*n))));else{var p=(h-u)/(l-d),f=(g*g-c*c-u*u+h*h-d*d+l*l)/(2*(l-d));0===(o=(r=2*l*p-2*f*p-2*h)*r-4*(n=p*p+1)*(h*h+l*l+f*f-c*c-2*l*f))?(a=-r/(2*n),e.push(new i(a,f-a*p))):o>0&&(a=(-r+Math.sqrt(o))/(2*n),e.push(new i(a,f-a*p)),a=(-r-Math.sqrt(o))/(2*n),e.push(new i(a,f-a*p)))}}return e}},function(A,t,e){var i=e(221),s=e(442);A.exports=function(A,t,e){if(void 0===e&&(e=[]),s(A,t)){var n=t.getLineA(),r=t.getLineB(),o=t.getLineC(),a=t.getLineD();i(n,A,e),i(r,A,e),i(o,A,e),i(a,A,e)}return e}},function(A,t,e){var i=e(12),s=e(141);A.exports=function(A,t,e){return void 0===e&&(e=new i),s(A,t)&&(e.x=Math.max(A.x,t.x),e.y=Math.max(A.y,t.y),e.width=Math.min(A.right,t.right)-e.x,e.height=Math.min(A.bottom,t.bottom)-e.y),e}},function(A,t,e){var i=e(223),s=e(141);A.exports=function(A,t,e){if(void 0===e&&(e=[]),s(A,t)){var n=A.getLineA(),r=A.getLineB(),o=A.getLineC(),a=A.getLineD();i(n,t,e),i(r,t,e),i(o,t,e),i(a,t,e)}return e}},function(A,t,e){var i=e(444),s=e(223);A.exports=function(A,t,e){if(void 0===e&&(e=[]),i(A,t)){var n=t.getLineA(),r=t.getLineB(),o=t.getLineC();s(n,A,e),s(r,A,e),s(o,A,e)}return e}},function(A,t,e){var i=e(221),s=e(446);A.exports=function(A,t,e){if(void 0===e&&(e=[]),s(A,t)){var n=A.getLineA(),r=A.getLineB(),o=A.getLineC();i(n,t,e),i(r,t,e),i(o,t,e)}return e}},function(A,t,e){var i=e(449),s=e(447);A.exports=function(A,t,e){if(void 0===e&&(e=[]),i(A,t)){var n=t.getLineA(),r=t.getLineB(),o=t.getLineC();s(A,n,e),s(A,r,e),s(A,o,e)}return e}},function(A,t,e){var i=e(451);A.exports=function(A,t){if(!i(A,t))return!1;var e=Math.min(t.x1,t.x2),s=Math.max(t.x1,t.x2),n=Math.min(t.y1,t.y2),r=Math.max(t.y1,t.y2);return A.x>=e&&A.x<=s&&A.y>=n&&A.y<=r}},function(A,t){A.exports=function(A,t,e,i,s,n){return void 0===n&&(n=0),!(t>A.right+n||eA.bottom+n||se&&(e=a.x),a.xn&&(n=a.y),a.yi(t)?A.setSize(t.height*e,t.height):A.setSize(t.width,t.width/e),A.setPosition(t.centerX-A.width/2,t.centerY-A.height/2)}},function(A,t){A.exports=function(A){return A.x=Math.floor(A.x),A.y=Math.floor(A.y),A}},function(A,t){A.exports=function(A){return A.x=Math.floor(A.x),A.y=Math.floor(A.y),A.width=Math.floor(A.width),A.height=Math.floor(A.height),A}},function(A,t,e){var i=e(4);A.exports=function(A,t){return void 0===t&&(t=new i),t.x=A.centerX,t.y=A.centerY,t}},function(A,t,e){var i=e(4);A.exports=function(A,t){return void 0===t&&(t=new i),t.x=A.width,t.y=A.height,t}},function(A,t,e){var i=e(180);A.exports=function(A,t,e){var s=A.centerX,n=A.centerY;return A.setSize(A.width+2*t,A.height+2*e),i(A,s,n)}},function(A,t,e){var i=e(12),s=e(141);A.exports=function(A,t,e){return void 0===e&&(e=new i),s(A,t)?(e.x=Math.max(A.x,t.x),e.y=Math.max(A.y,t.y),e.width=Math.min(A.right,t.right)-e.x,e.height=Math.min(A.bottom,t.bottom)-e.y):e.setEmpty(),e}},function(A,t){A.exports=function(A,t){for(var e=A.x,i=A.right,s=A.y,n=A.bottom,r=0;rt.x&&A.yt.y}},function(A,t,e){var i=e(4),s=e(41);A.exports=function(A,t,e){void 0===e&&(e=new i),t=s(t);var n=Math.sin(t),r=Math.cos(t),o=r>0?A.width/2:A.width/-2,a=n>0?A.height/2:A.height/-2;return Math.abs(o*n)-1&&(s.splice(o,1),this.clear(r,!0))}A.length=0,this._pendingRemoval.length=0,this._list=s.concat(t.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(A,t){if(!this.isActive())return!1;if(this.pluginEvents.emit(u.UPDATE,A,t),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var e,i=this.manager,s=i.pointers,n=i.pointersTotal;for(e=0;e0){if(this._pollTimer-=t,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var o=!1;for(e=0;e0&&(o=!0)}return o},update:function(A,t){if(!this.isActive())return!1;for(var e=t.length,i=!1,s=0;s0&&(i=!0)}return this._updatedThisFrame=!0,i},clear:function(A,t){void 0===t&&(t=!1);var e=A.input;if(e){t||this.queueForRemoval(A),e.gameObject=void 0,e.target=void 0,e.hitArea=void 0,e.hitAreaCallback=void 0,e.callbackContext=void 0,this.manager.resetCursor(e),A.input=null;var i=this._draggable.indexOf(A);return i>-1&&this._draggable.splice(i,1),(i=this._drag[0].indexOf(A))>-1&&this._drag[0].splice(i,1),(i=this._over[0].indexOf(A))>-1&&this._over[0].splice(i,1),A}},disable:function(A){A.input.enabled=!1},enable:function(A,t,e,i){return void 0===i&&(i=!1),A.input?A.input.enabled=!0:this.setHitArea(A,t,e),A.input&&i&&!A.input.dropZone&&(A.input.dropZone=i),this},hitTestPointer:function(A){for(var t=this.cameras.getCamerasBelowPointer(A),e=0;e0)return A.camera=i,s}return A.camera=t[0],[]},processDownEvents:function(A){var t=0,e=this._temp,i=this._eventData,s=this._eventContainer;i.cancelled=!1;for(var n=!1,r=0;r0&&h(A.x,A.y,A.downX,A.downY)>=s?e=!0:i>0&&t>=A.downTime+i&&(e=!0),e)return this.setDragState(A,3),this.processDragStartList(A)},processDragStartList:function(A){if(3!==this.getDragState(A))return 0;for(var t=this._drag[A.id],e=0;e1&&(this.sortGameObjects(e),this.topOnly&&e.splice(1)),this._drag[A.id]=e,0===this.dragDistanceThreshold||0===this.dragTimeThreshold?(this.setDragState(A,3),this.processDragStartList(A)):(this.setDragState(A,2),0))},processDragMoveEvent:function(A){if(4!==this.getDragState(A))return 0;for(var t=this._tempZones,e=this._drag[A.id],i=0;i0?(r.emit(u.GAMEOBJECT_DRAG_LEAVE,A,a),this.emit(u.DRAG_LEAVE,A,r,a),o.target=t[0],a=o.target,r.emit(u.GAMEOBJECT_DRAG_ENTER,A,a),this.emit(u.DRAG_ENTER,A,r,a)):(r.emit(u.GAMEOBJECT_DRAG_LEAVE,A,a),this.emit(u.DRAG_LEAVE,A,r,a),t[0]?(o.target=t[0],a=o.target,r.emit(u.GAMEOBJECT_DRAG_ENTER,A,a),this.emit(u.DRAG_ENTER,A,r,a)):o.target=null)}else!a&&t[0]&&(o.target=t[0],a=o.target,r.emit(u.GAMEOBJECT_DRAG_ENTER,A,a),this.emit(u.DRAG_ENTER,A,r,a));if(r.parentContainer){var l=A.x-o.dragStartXGlobal,c=A.y-o.dragStartYGlobal,d=r.getParentRotation(),g=l*Math.cos(d)+c*Math.sin(d),p=c*Math.cos(d)-l*Math.sin(d);g*=1/r.parentContainer.scaleX,p*=1/r.parentContainer.scaleY,s=g+o.dragStartX,n=p+o.dragStartY}else s=A.x-o.dragX,n=A.y-o.dragY;r.emit(u.GAMEOBJECT_DRAG,A,s,n),this.emit(u.DRAG,A,r,s,n)}return e.length},processDragUpEvent:function(A){for(var t=this._drag[A.id],e=0;e0){var n=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;for(var a=!1,h=0;h0){var s=this.manager,n=this._eventData,r=this._eventContainer;n.cancelled=!1;var o=!1;this.sortGameObjects(t);for(var a=0;a0){for(this.sortGameObjects(s),t=0;t0){for(this.sortGameObjects(n),t=0;t-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(A){void 0===A&&(A=1);var t=this.systems.textures;return a(t,A)},setHitArea:function(A,t,e){if(void 0===t)return this.setHitAreaFromTexture(A);Array.isArray(A)||(A=[A]);var i=!1,s=!1,n=!1,r=!1,a=!1,h=!0;if(v(t)){var l=t;t=g(l,"hitArea",null),e=g(l,"hitAreaCallback",null),i=g(l,"draggable",!1),s=g(l,"dropZone",!1),n=g(l,"cursor",!1),r=g(l,"useHandCursor",!1),a=g(l,"pixelPerfect",!1);var c=g(l,"alphaTolerance",1);a&&(t={},e=this.makePixelPerfect(c)),t&&e||(this.setHitAreaFromTexture(A),h=!1)}else"function"!=typeof t||e||(e=t,t={});for(var u=0;u=t}}},function(A,t,e){A.exports={Events:e(143),KeyboardManager:e(377),KeyboardPlugin:e(1272),Key:e(464),KeyCodes:e(132),KeyCombo:e(465),JustDown:e(1277),JustUp:e(1278),DownDuration:e(1279),UpDuration:e(1280)}},function(A,t){A.exports="keydown"},function(A,t){A.exports="keyup"},function(A,t){A.exports="keycombomatch"},function(A,t){A.exports="down"},function(A,t){A.exports="keydown-"},function(A,t){A.exports="keyup-"},function(A,t){A.exports="up"},function(A,t,e){var i=e(0),s=e(9),n=e(143),r=e(20),o=e(6),a=e(55),h=e(142),l=e(464),c=e(132),u=e(465),d=e(1276),g=e(106),p=new i({Extends:s,initialize:function(A){s.call(this),this.game=A.systems.game,this.scene=A.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=A,this.manager=A.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],A.pluginEvents.once(a.BOOT,this.boot,this),A.pluginEvents.on(a.START,this.start,this)},boot:function(){var A=this.settings.input;this.enabled=o(A,"keyboard",!0);var t=o(A,"keyboard.capture",null);t&&this.addCaptures(t),this.sceneInputPlugin.pluginEvents.once(a.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.useQueue?this.sceneInputPlugin.pluginEvents.on(a.UPDATE,this.update,this):this.sceneInputPlugin.manager.events.on(a.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(a.SHUTDOWN,this.shutdown,this),this.game.events.on(r.BLUR,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(A){return this.manager.addCapture(A),this},removeCapture:function(A){return this.manager.removeCapture(A),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(A,t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);var i={};if("string"==typeof A){A=A.split(",");for(var s=0;s-1?i[s]=A:i[A.keyCode]=A,t&&this.addCapture(A.keyCode),A.setEmitOnRepeat(e),A}return"string"==typeof A&&(A=c[A.toUpperCase()]),i[A]||(i[A]=new l(this,A),t&&this.addCapture(A),i[A].setEmitOnRepeat(e)),i[A]},removeKey:function(A,t){void 0===t&&(t=!1);var e,i=this.keys;if(A instanceof l){var s=i.indexOf(A);s>-1&&(e=this.keys[s],this.keys[s]=void 0)}else"string"==typeof A&&(A=c[A.toUpperCase()]);return i[A]&&(e=i[A],i[A]=void 0),e&&(e.plugin=null,t&&e.destroy()),this},createCombo:function(A,t){return new u(this,A,t)},checkDown:function(A,t){if(this.enabled&&A.isDown){var e=g(this.time-A.timeDown,t);if(e>A._tick)return A._tick=e,!0}return!1},update:function(){var A=this.manager.queue,t=A.length;if(this.isActive()&&0!==t)for(var e=this.keys,i=0;i0&&t.maxKeyDelay>0){var n=t.timeLastMatched+t.maxKeyDelay;A.timeStamp<=n&&(s=!0,e=i(A,t))}else s=!0,e=i(A,t);return!s&&t.resetOnWrongKey&&(t.index=0,t.current=t.keyCodes[0]),e&&(t.timeLastMatched=A.timeStamp,t.matched=!0,t.timeMatched=A.timeStamp),e}},function(A,t){A.exports=function(A,t){return t.timeLastMatched=A.timeStamp,t.index++,t.index===t.size||(t.current=t.keyCodes[t.index],!1)}},function(A,t){A.exports=function(A){return A.current=A.keyCodes[0],A.index=0,A.timeLastMatched=0,A.matched=!1,A.timeMatched=0,A}},function(A,t,e){var i=e(132),s={};for(var n in i)s[i[n]]=n;A.exports=s},function(A,t){A.exports=function(A){return!!A._justDown&&(A._justDown=!1,!0)}},function(A,t){A.exports=function(A){return!!A._justUp&&(A._justUp=!1,!0)}},function(A,t){A.exports=function(A,t){void 0===t&&(t=50);var e=A.plugin.game.loop.time-A.timeDown;return A.isDown&&e'),e.push(''),e.push(''),e.push(this.xhrLoader.responseText),e.push(""),e.push(""),e.push("");var i=[e.join("\n")],r=this;try{var o=new window.Blob(i,{type:"image/svg+xml;charset=utf-8"})}catch(A){return r.state=s.FILE_ERRORED,void r.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){n.revokeObjectURL(r.data),r.onProcessComplete()},this.data.onerror=function(){n.revokeObjectURL(r.data),r.onProcessError()},n.createObjectURL(this.data,o,"image/svg+xml")},addToCache:function(){var A=this.cache.addImage(this.key,this.data);this.pendingDestroy(A)}});r.register("htmlTexture",(function(A,t,e,i,s){if(Array.isArray(A))for(var n=0;n0},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(o.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(o.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.sizee&&(i=A,e=t)})),i},moveTo:function(A,t,e,i,s){void 0===i&&(i=60),void 0===s&&(s=0);var r=Math.atan2(e-A.y,t-A.x);return s>0&&(i=n(A.x,A.y,t,e)/(s/1e3)),A.body.velocity.setToPolar(r,i),r},moveToObject:function(A,t,e,i){return this.moveTo(A,t.x,t.y,e,i)},velocityFromAngle:function(A,t,e){return void 0===t&&(t=60),void 0===e&&(e=new d),e.setToPolar(s(A),t)},velocityFromRotation:function(A,t,e){return void 0===t&&(t=60),void 0===e&&(e=new d),e.setToPolar(A,t)},overlapRect:function(A,t,e,i,s,n){return l(this.world,A,t,e,i,s,n)},shutdown:function(){if(this.world){var A=this.systems.events;A.off(u.UPDATE,this.world.update,this.world),A.off(u.POST_UPDATE,this.world.postUpdate,this.world),A.off(u.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(u.START,this.start,this),this.scene=null,this.systems=null}});c.register("ArcadePhysics",p,"arcadePhysics"),A.exports=p},function(A,t){A.exports={setAcceleration:function(A,t){return this.body.acceleration.set(A,t),this},setAccelerationX:function(A){return this.body.acceleration.x=A,this},setAccelerationY:function(A){return this.body.acceleration.y=A,this}}},function(A,t){A.exports={setAngularVelocity:function(A){return this.body.angularVelocity=A,this},setAngularAcceleration:function(A){return this.body.angularAcceleration=A,this},setAngularDrag:function(A){return this.body.angularDrag=A,this}}},function(A,t){A.exports={setBounce:function(A,t){return this.body.bounce.set(A,t),this},setBounceX:function(A){return this.body.bounce.x=A,this},setBounceY:function(A){return this.body.bounce.y=A,this},setCollideWorldBounds:function(A,t,e){return this.body.setCollideWorldBounds(A,t,e),this}}},function(A,t){A.exports={setDebug:function(A,t,e){return this.debugShowBody=A,this.debugShowVelocity=t,this.debugBodyColor=e,this},setDebugBodyColor:function(A){return this.body.debugBodyColor=A,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(A){this.body.debugShowBody=A}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(A){this.body.debugShowVelocity=A}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(A){this.body.debugBodyColor=A}}}},function(A,t){A.exports={setDrag:function(A,t){return this.body.drag.set(A,t),this},setDragX:function(A){return this.body.drag.x=A,this},setDragY:function(A){return this.body.drag.y=A,this},setDamping:function(A){return this.body.useDamping=A,this}}},function(A,t){var e={enableBody:function(A,t,e,i,s){return A&&this.body.reset(t,e),i&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(A,t){return void 0===A&&(A=!1),void 0===t&&(t=!1),this.body.stop(),this.body.enable=!1,A&&(this.body.gameObject.active=!1),t&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};A.exports=e},function(A,t){A.exports={setFriction:function(A,t){return this.body.friction.set(A,t),this},setFrictionX:function(A){return this.body.friction.x=A,this},setFrictionY:function(A){return this.body.friction.y=A,this}}},function(A,t){A.exports={setGravity:function(A,t){return this.body.gravity.set(A,t),this},setGravityX:function(A){return this.body.gravity.x=A,this},setGravityY:function(A){return this.body.gravity.y=A,this}}},function(A,t){var e={setImmovable:function(A){return void 0===A&&(A=!0),this.body.immovable=A,this}};A.exports=e},function(A,t){A.exports={setMass:function(A){return this.body.mass=A,this}}},function(A,t){A.exports={setOffset:function(A,t){return this.body.setOffset(A,t),this},setSize:function(A,t,e){return this.body.setSize(A,t,e),this},setCircle:function(A,t,e){return this.body.setCircle(A,t,e),this}}},function(A,t){A.exports={setVelocity:function(A,t){return this.body.setVelocity(A,t),this},setVelocityX:function(A){return this.body.setVelocityX(A),this},setVelocityY:function(A){return this.body.setVelocityY(A),this},setMaxVelocity:function(A,t){return this.body.maxVelocity.set(A,t),this}}},function(A,t){A.exports=function(A,t,e,i,s,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1);var o=[],a=[],h=A.treeMinMax;if(h.minX=t,h.minY=e,h.maxX=t+i,h.maxY=e+s,r&&(a=A.staticTree.search(h)),n&&A.useTree)o=A.tree.search(h);else if(n){var l=A.bodies,c={position:{x:t,y:e},left:t,top:e,right:t+i,bottom:e+s,isCircle:!1},u=A.intersects;l.iterate((function(A){u(A,c)&&o.push(A)}))}return a.concat(o)}},function(A,t){A.exports="collide"},function(A,t){A.exports="overlap"},function(A,t){A.exports="pause"},function(A,t){A.exports="resume"},function(A,t){A.exports="tilecollide"},function(A,t){A.exports="tileoverlap"},function(A,t){A.exports="worldbounds"},function(A,t){A.exports="worldstep"},function(A,t){A.exports=function(A,t){return A.collisionCallback?!A.collisionCallback.call(A.collisionCallbackContext,t,A):!A.layer.callbacks[A.index]||!A.layer.callbacks[A.index].callback.call(A.layer.callbacks[A.index].callbackContext,t,A)}},function(A,t,e){var i=e(1335),s=e(1337),n=e(481);A.exports=function(A,t,e,r,o,a,h){var l=r.left,c=r.top,u=r.right,d=r.bottom,g=e.faceLeft||e.faceRight,p=e.faceTop||e.faceBottom;if(h||(g=!0,p=!0),!g&&!p)return!1;var f=0,v=0,y=0,m=1;if(t.deltaAbsX()>t.deltaAbsY()?y=-1:t.deltaAbsX()0&&l&&A.checkCollision.right&&a&&A.right>e&&(o=A.right-e)>n&&(o=0),0!==o&&(A.customSeparateX?A.overlapX=o:i(A,o)),o}},function(A,t){A.exports=function(A,t){t<0?(A.blocked.none=!1,A.blocked.left=!0):t>0&&(A.blocked.none=!1,A.blocked.right=!0),A.position.x-=t,0===A.bounce.x?A.velocity.x=0:A.velocity.x=-A.velocity.x*A.bounce.x}},function(A,t,e){var i=e(1338);A.exports=function(A,t,e,s,n,r){var o=0,a=t.faceTop,h=t.faceBottom,l=t.collideUp,c=t.collideDown;return r||(a=!0,h=!0,l=!0,c=!0),A.deltaY()<0&&c&&A.checkCollision.up?h&&A.y0&&l&&A.checkCollision.down&&a&&A.bottom>e&&(o=A.bottom-e)>n&&(o=0),0!==o&&(A.customSeparateY?A.overlapY=o:i(A,o)),o}},function(A,t){A.exports=function(A,t){t<0?(A.blocked.none=!1,A.blocked.up=!0):t>0&&(A.blocked.none=!1,A.blocked.down=!0),A.position.y-=t,0===A.bounce.y?A.velocity.y=0:A.velocity.y=-A.velocity.y*A.bounce.y}},function(A,t,e){var i=e(478);A.exports=function(A,t,e,s){var n=i(A,t,e,s);if(e||0===n||A.immovable&&t.immovable||A.customSeparateX||t.customSeparateX)return 0!==n||A.embedded&&t.embedded;var r=A.velocity.x,o=t.velocity.x;if(A.immovable||t.immovable)A.immovable?(t.x+=n,t.velocity.x=r-o*t.bounce.x,A.moves&&(t.y+=(A.y-A.prev.y)*A.friction.y)):(A.x-=n,A.velocity.x=o-r*A.bounce.x,t.moves&&(A.y+=(t.y-t.prev.y)*t.friction.y));else{n*=.5,A.x-=n,t.x+=n;var a=Math.sqrt(o*o*t.mass/A.mass)*(o>0?1:-1),h=Math.sqrt(r*r*A.mass/t.mass)*(r>0?1:-1),l=.5*(a+h);a-=l,h-=l,A.velocity.x=l+a*A.bounce.x,t.velocity.x=l+h*t.bounce.x}return!0}},function(A,t,e){var i=e(479);A.exports=function(A,t,e,s){var n=i(A,t,e,s);if(e||0===n||A.immovable&&t.immovable||A.customSeparateY||t.customSeparateY)return 0!==n||A.embedded&&t.embedded;var r=A.velocity.y,o=t.velocity.y;if(A.immovable||t.immovable)A.immovable?(t.y+=n,t.velocity.y=r-o*t.bounce.y,A.moves&&(t.x+=(A.x-A.prev.x)*A.friction.x)):(A.y-=n,A.velocity.y=o-r*A.bounce.y,t.moves&&(A.x+=(t.x-t.prev.x)*t.friction.x));else{n*=.5,A.y-=n,t.y+=n;var a=Math.sqrt(o*o*t.mass/A.mass)*(o>0?1:-1),h=Math.sqrt(r*r*A.mass/t.mass)*(r>0?1:-1),l=.5*(a+h);a-=l,h-=l,A.velocity.y=l+a*A.bounce.y,t.velocity.y=l+h*t.bounce.y}return!0}},function(A,t,e){A.exports={Body:e(483),Events:e(233),COLLIDES:e(112),CollisionMap:e(484),Factory:e(485),Image:e(487),ImpactBody:e(486),ImpactPhysics:e(1360),Sprite:e(488),TYPE:e(113),World:e(489)}},function(A,t,e){var i=e(24);A.exports=function(A,t,e,s,n){if(e)return i(t+e*A,-n,n);if(s){var r=s*A;return t-r>0?t-r:t+r<0?t+r:0}return i(t,-n,n)}},function(A,t){A.exports=function(A,t){if(A.standing=!1,t.collision.y&&(A.bounciness>0&&Math.abs(A.vel.y)>A.minBounceVelocity?A.vel.y*=-A.bounciness:(A.vel.y>0&&(A.standing=!0),A.vel.y=0)),t.collision.x&&(A.bounciness>0&&Math.abs(A.vel.x)>A.minBounceVelocity?A.vel.x*=-A.bounciness:A.vel.x=0),t.collision.slope){var e=t.collision.slope;if(A.bounciness>0){var i=A.vel.x*e.nx+A.vel.y*e.ny;A.vel.x=(A.vel.x-e.nx*i*2)*A.bounciness,A.vel.y=(A.vel.y-e.ny*i*2)*A.bounciness}else{var s=e.x*e.x+e.y*e.y,n=(A.vel.x*e.x+A.vel.y*e.y)/s;A.vel.x=e.x*n,A.vel.y=e.y*n;var r=Math.atan2(e.x,e.y);r>A.slopeStanding.min&&re.last.x&&t.last.xe.last.y&&t.last.y0))n=A.collisionMap.trace(t.pos.x,t.pos.y,0,-(t.pos.y+t.size.y-e.pos.y),t.size.x,t.size.y),t.pos.y=n.pos.y,t.bounciness>0&&t.vel.y>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.standing=!0,t.vel.y=0);else{var h=(t.vel.y-e.vel.y)/2;t.vel.y=-h,e.vel.y=h,s=e.vel.x*A.delta,n=A.collisionMap.trace(t.pos.x,t.pos.y,s,-r/2,t.size.x,t.size.y),t.pos.y=n.pos.y;var l=A.collisionMap.trace(e.pos.x,e.pos.y,0,r/2,e.size.x,e.size.y);e.pos.y=l.pos.y}}},function(A,t,e){A.exports={Factory:e(490),Image:e(494),Matter:e(240),MatterPhysics:e(1394),PolyDecomp:e(491),Sprite:e(495),TileBody:e(237),PhysicsEditorParser:e(493),World:e(501)}},function(A,t,e){var i=e(147),s=e(2),n=e(3);A.exports=function(A,t,e){void 0===e&&(e={});var r=t.x,o=t.y;if(t.body={temp:!0,position:{x:r,y:o}},[i.Bounce,i.Collision,i.Force,i.Friction,i.Gravity,i.Mass,i.Sensor,i.SetBody,i.Sleep,i.Static,i.Transform,i.Velocity].forEach((function(A){for(var e in A)(i=A[e]).get&&"function"==typeof i.get||i.set&&"function"==typeof i.set?Object.defineProperty(t,e,{get:A[e].get,set:A[e].set}):Object.defineProperty(t,e,{value:A[e]});var i})),t.world=A,t._tempVec2=new n(r,o),e.hasOwnProperty("type")&&"body"===e.type)t.setExistingBody(e,!0);else{var a=s(e,"shape",null);a||(a="rectangle"),t.setBody(a,e)}return t}},function(A,t){A.exports={setBounce:function(A){return this.body.restitution=A,this}}},function(A,t){var e={setCollisionCategory:function(A){return this.body.collisionFilter.category=A,this},setCollisionGroup:function(A){return this.body.collisionFilter.group=A,this},setCollidesWith:function(A){var t=0;if(Array.isArray(A))for(var e=0;e1?1:0;i1;if(!u||A!=u.x||t!=u.y){u&&i?(d=u.x,g=u.y):(d=0,g=0);var s={x:d+A,y:g+t};!i&&u||(u=s),p.push(s),v=d+A,y=g+t}},w=function(A){var t=A.pathSegTypeAsLetter.toUpperCase();if("Z"!==t){switch(t){case"M":case"L":case"T":case"C":case"S":case"Q":v=A.x,y=A.y;break;case"H":v=A.x;break;case"V":y=A.y}m(v,y,A.pathSegType)}};for(i._svgPathToAbsolute(A),r=A.getTotalLength(),h=[],e=0;e0)for(var o=s+1;ot.max.x?e=t.min.x-A.max.x:A.max.xt.max.y?i=t.min.y-A.max.y:A.max.y=this._duration&&this.transitionComplete()},transitionComplete:function(){var A=this._target.sys,t=this._target.sys.settings;this.systems.events.off(n.UPDATE,this.step,this),A.events.emit(n.TRANSITION_COMPLETE,this.scene),t.isTransition=!1,t.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(A,t,e,i){return this.manager.add(A,t,e,i)},launch:function(A,t){return A&&A!==this.key&&this.manager.queueOp("start",A,t),this},run:function(A,t){return A&&A!==this.key&&this.manager.queueOp("run",A,t),this},pause:function(A,t){return void 0===A&&(A=this.key),this.manager.queueOp("pause",A,t),this},resume:function(A,t){return void 0===A&&(A=this.key),this.manager.queueOp("resume",A,t),this},sleep:function(A,t){return void 0===A&&(A=this.key),this.manager.queueOp("sleep",A,t),this},wake:function(A,t){return void 0===A&&(A=this.key),this.manager.queueOp("wake",A,t),this},switch:function(A){return A!==this.key&&this.manager.queueOp("switch",this.key,A),this},stop:function(A,t){return void 0===A&&(A=this.key),this.manager.queueOp("stop",A,t),this},setActive:function(A,t,e){void 0===t&&(t=this.key);var i=this.manager.getScene(t);return i&&i.sys.setActive(A,e),this},setVisible:function(A,t){void 0===t&&(t=this.key);var e=this.manager.getScene(t);return e&&e.sys.setVisible(A),this},isSleeping:function(A){return void 0===A&&(A=this.key),this.manager.isSleeping(A)},isActive:function(A){return void 0===A&&(A=this.key),this.manager.isActive(A)},isPaused:function(A){return void 0===A&&(A=this.key),this.manager.isPaused(A)},isVisible:function(A){return void 0===A&&(A=this.key),this.manager.isVisible(A)},swapPosition:function(A,t){return void 0===t&&(t=this.key),A!==t&&this.manager.swapPosition(A,t),this},moveAbove:function(A,t){return void 0===t&&(t=this.key),A!==t&&this.manager.moveAbove(A,t),this},moveBelow:function(A,t){return void 0===t&&(t=this.key),A!==t&&this.manager.moveBelow(A,t),this},remove:function(A){return void 0===A&&(A=this.key),this.manager.remove(A),this},moveUp:function(A){return void 0===A&&(A=this.key),this.manager.moveUp(A),this},moveDown:function(A){return void 0===A&&(A=this.key),this.manager.moveDown(A),this},bringToTop:function(A){return void 0===A&&(A=this.key),this.manager.bringToTop(A),this},sendToBack:function(A){return void 0===A&&(A=this.key),this.manager.sendToBack(A),this},get:function(A){return this.manager.getScene(A)},getIndex:function(A){return void 0===A&&(A=this.key),this.manager.getIndex(A)},shutdown:function(){var A=this.systems.events;A.off(n.SHUTDOWN,this.shutdown,this),A.off(n.POST_UPDATE,this.step,this),A.off(n.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});o.register("ScenePlugin",a,"scenePlugin"),A.exports=a},function(A,t,e){A.exports={List:e(136),Map:e(174),ProcessQueue:e(202),RTree:e(480),Set:e(90),Size:e(383)}},function(A,t,e){var i=e(17),s=e(1409),n={CanvasTexture:e(388),Events:e(129),FilterMode:s,Frame:e(107),Parsers:e(390),Texture:e(198),TextureManager:e(387),TextureSource:e(389)};n=i(!1,n,s),A.exports=n},function(A,t){A.exports={LINEAR:0,NEAREST:1}},function(A,t,e){A.exports={Components:e(149),Parsers:e(1440),Formats:e(35),ImageCollection:e(513),ParseToTilemap:e(249),Tile:e(79),Tilemap:e(522),TilemapCreator:e(1449),TilemapFactory:e(1450),Tileset:e(153),LayerData:e(116),MapData:e(117),ObjectLayer:e(516),DynamicTilemapLayer:e(523),StaticTilemapLayer:e(524)}},function(A,t,e){var i=e(27),s=e(60);A.exports=function(A,t,e,n,r,o,a,h){A<0&&(A=0),t<0&&(t=0),void 0===a&&(a=!0);for(var l=i(A,t,e,n,null,h),c=r-A,u=o-t,d=0;d=0&&g=0&&p=f;r--)(a=c[o][r])&&-1!==a.index&&a.visible&&0!==a.alpha&&e.push(a);else if(2===n)for(o=m;o>=y;o--)for(r=f;c[o]&&r=y;o--)for(r=v;c[o]&&r>=f;r--)(a=c[o][r])&&-1!==a.index&&a.visible&&0!==a.alpha&&e.push(a);return l.tilesDrawn=e.length,l.tilesTotal=u*d,e}},function(A,t,e){var i=e(27),s=e(60),n=e(78);A.exports=function(A,t,e,r,o,a,h){for(var l=-1!==h.collideIndexes.indexOf(A),c=i(t,e,r,o,null,h),u=0;u=0;n--)for(s=i.width-1;s>=0;s--)if((r=i.data[n][s])&&r.index===A){if(o===t)return r;o+=1}}else for(n=0;nt)){for(var h=A;h<=t;h++)n(h,e,o);if(a)for(var l=0;l=A&&u.index<=t&&i(u,e)}r&&s(0,0,o.width,o.height,o)}}},function(A,t,e){var i=e(78),s=e(60),n=e(245);A.exports=function(A,t,e,r){void 0===t&&(t=!0),void 0===e&&(e=!0),Array.isArray(A)||(A=[A]);for(var o=0;o0&&i(o,A)}}t&&s(0,0,e.width,e.height,e)}},function(A,t){A.exports=function(A,t,e,i){if("number"==typeof A)i.callbacks[A]=null!==t?{callback:t,callbackContext:e}:void 0;else for(var s=0,n=A.length;s1||t.scaleY>1)&&(l.imageSmoothingEnabled=!1);for(var d=0;d0&&(A.currentPipeline&&A.currentPipeline.vertexCount>0&&A.flush(),n.vertexBuffer=t.vertexBuffer[o],A.setPipeline(n),A.setTexture2D(s[o].glTexture,0),A.gl.drawArrays(n.topology,0,t.vertexCount[o]));n.vertexBuffer=r,n.viewIdentity(),n.modelIdentity()}},function(A,t){A.exports=function(A,t,e,i,s){t.cull(i);var n=t.culledTiles,r=n.length;if(0!==r){var o=A._tempMatrix1,a=A._tempMatrix2,h=A._tempMatrix3;a.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),o.copyFrom(i.matrix);var l=A.currentContext,c=t.gidMap;l.save(),s?(o.multiplyWithOffset(s,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y,o.multiply(a,h),h.copyToContext(l)):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY,a.copyToContext(l));var u=i.alpha*t.alpha;(!A.antialias||t.scaleX>1||t.scaleY>1)&&(l.imageSmoothingEnabled=!1);for(var d=0;d-1&&this._active.splice(s,1),i.destroy()}for(e=0;e=i.delay)){var s=i.elapsed-i.delay;i.elapsed=i.delay,!i.hasDispatched&&i.callback&&(i.hasDispatched=!0,i.callback.apply(i.callbackScope,i.args)),i.repeatCount>0?(i.repeatCount--,i.elapsed=s,i.hasDispatched=!1):this._pendingRemoval.push(i)}}}},shutdown:function(){var A;for(A=0;A-1&&(t.state=l.REMOVED,s.splice(n,1)):(t.state=l.REMOVED,i.splice(n,1))}for(e.length=0,e=this._add,A=0;AC&&(C=Q),x[b][T]=Q}}}var E=n?i(n):null;return r?function(A,t,i,s){var n,r=0,o=s%f,a=Math.floor(s/f);if(o>=0&&o=0&&a>2],n+=e[(3&i[r])<<4|i[r+1]>>4],n+=e[(15&i[r+1])<<2|i[r+2]>>6],n+=e[63&i[r+2]];return s%3==2?n=n.substring(0,n.length-1)+"=":s%3==1&&(n=n.substring(0,n.length-2)+"=="),n}},function(A,t,e){A.exports={Clone:e(72),Extend:e(17),GetAdvancedValue:e(15),GetFastValue:e(2),GetMinMaxValue:e(1475),GetValue:e(6),HasAll:e(1476),HasAny:e(416),HasValue:e(93),IsPlainObject:e(7),Merge:e(89),MergeRight:e(1477),Pick:e(514),SetValue:e(436)}},function(A,t,e){var i=e(6),s=e(24);A.exports=function(A,t,e,n,r){void 0===r&&(r=e);var o=i(A,t,r);return s(o,e,n)}},function(A,t){A.exports=function(A,t){for(var e=0;e0;){this.cameras.pop().destroy()}return this.main},update:function(A,t){for(var e=0,i=this.cameras.length;e>>16,o=(65280&s)>>>8,a=255&s;A.fillStyle="rgba("+r+","+o+","+a+","+n+")"}},function(A,t){A.exports=function(A,t,e,i){var s=e||t.strokeColor,n=i||t.strokeAlpha,r=(16711680&s)>>>16,o=(65280&s)>>>8,a=255&s;A.strokeStyle="rgba("+r+","+o+","+a+","+n+")",A.lineWidth=t.lineWidth}},function(A,t,e){"use strict";e.r(t);var i=e(118),s=e.n(i);function n(A){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(A)}function r(A,t){for(var e=0;e=2&&this.items.shift().setPosition(this.x,this.y).drop(),A.interact(),this.items[this.items.length]=A):A instanceof ct&&A.interact()}},{key:"hit",value:function(A){pt(ft(t.prototype),"hit",this).call(this,A),this.getData("hp")>this.scene.hearts.length&&this.setData("hp",this.scene.hearts.length);for(var e=this.getData("hp");e=1&&this.items[0].setPosition(this.body.x,this.body.y-16),this.items.length>=2&&this.items[1].setPosition(this.body.x+32,this.body.y-16),this.scene.keyAction1.isDown&&this.items.length>=1&&(this.items.shift().use(this),this.scene.keyAction1.reset()),this.scene.keyAction2.isDown&&this.items.length>=2&&(this.items.pop().use(this),this.scene.keyAction2.reset()))}},{key:"die",value:function(){var A=this;this.anims.stop(),this.pause=!0,this.play(this.dieAnimation).once("animationcomplete",(function(){A.setFrame(51),A.scene.scene.pause(),A.scene.music.pause(),A.scene.scene.launch("GUI",{key:"Dead"}).bringToTop("GUI")}))}}])&&dt(e.prototype,i),s&&dt(e,s),t}(FA);function mt(A){return(mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(A)}function wt(A,t){for(var e=0;e=this.x-this.width&&(this.turnedActive(),this.setActive(!0),this.setData("active",!0))}}])&&wt(e.prototype,i),s&&wt(e,s),t}(FA);function Qt(A){return(Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(A)}function Et(A,t){for(var e=0;e0)}}])&&_t(e.prototype,i),s&&_t(e,s),t}(function(A){function t(A,e,i){var s;return function(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(s=Ft(this,It(t).call(this,A,e,i))).body.setAllowGravity(!1),s}var e,i,s;return function(A,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(t&&t.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),t&&St(A,t)}(t,A),e=t,(i=[{key:"turnedActive",value:function(){Mt(It(t.prototype),"turnedActive",this).call(this);var A=this.spawnPoint.properties.filter((function(A){return"velocity"===A.name}))[0].value;this.body.velocity.x=A}}])&&Et(e.prototype,i),s&&Et(e,s),t}(Tt));function Rt(A,t){for(var e=0;e=1)return void this.scene.scene.start("Game",{level:A[0].value})}this.scene.scene.launch("GUI",{key:"Win"}).bringToTop("GUI")}}])&&Xt(e.prototype,i),s&&Xt(e,s),t}(FA);function Wt(A,t){for(var e=0;e"),i.scene.input.keyboard.once("keydown",(function(t){var e=Nt.get();e.controls[A].bind=t.keyCode,Nt.set(e),i.updateText(A),i.activated=!1})),i.activated=!0)}}))}}var t,e,i;return t=A,(e=[{key:"updateText",value:function(A){var t=Nt.get().controls;void 0===t[A]&&(Nt.reset(),t=Nt.get().controls),this.text.setText("< "+this.getKeyById(t[A].bind)+" >")}},{key:"getKeyById",value:function(A){return Object.keys(Phaser.Input.Keyboard.KeyCodes).find((function(t){return Phaser.Input.Keyboard.KeyCodes[t]===A}))}},{key:"endMyself",value:function(){this.scene.scene.stop(),this.scene.scene.setVisible(!1)}}])&&Wt(t.prototype,e),i&&Wt(t,i),A}();function Vt(A){return(Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(A)}function Kt(A,t){return!t||"object"!==Vt(t)&&"function"!=typeof t?function(A){if(void 0===A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}(A):t}function Jt(A){return(Jt=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)})(A)}function qt(A,t){return(qt=Object.setPrototypeOf||function(A,t){return A.__proto__=t,A})(A,t)}var $t=function(A){function t(A,e){var i;return function(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(i=Kt(this,Jt(t).call(this,A,e.x,e.y,null))).body.setAllowGravity(!1),i.setOrigin(0,0),i.alpha=0,i.setDisplaySize(e.width,e.height),i.setData("active",!0),i.setData("dmg",e.properties.filter((function(A){return"dmg"===A.name}))[0].value),i}return function(A,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(t&&t.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),t&&qt(A,t)}(t,A),t}(FA);function Ae(A){return(Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(A)}function te(A,t){for(var e=0;e0?e[0].value:40,this.play("zombie_emerge").once("animationcomplete",(function(){A.body.velocity.x=e,A.play("zombie_walk")}))}},{key:"update",value:function(){for(var A,e=arguments.length,i=new Array(e),s=0;s0?.1:-.1,A.play("skeleton_attack_start").once("animationcomplete",(function(){var t=A.flipX?-1:1,i=new de(A.scene,{x:A.x,y:A.y-.6*A.body.height},120*t);i.turnedActive(),A.scene.enemys.add(i),A.play("skeleton_attack_end").once("animationcomplete",(function(){A.body.velocity.x=e,A.play("skeleton_run")}))}))):clearInterval(A.shooting)}),3e3)}},{key:"update",value:function(){for(var A,e=arguments.length,i=new Array(e),s=0;s=2){var s=e[i-2],n=e[i-1];if(A===s&&t===n)return e}return e.push(A,t),e},_e=e(257),Oe=e.n(_e),ke=function(A,t,e,i,s,n,r,o,a){var h,l,c;r&&(n+=360),s=Oe()(s);for(var u=((n=Oe()(n))-s)/o,d=0;d<=o;d++)c=s+u*d,h=A+e*Math.cos(c),l=t+i*Math.sin(c),De(h,l,a);return a},Ge=e(564),He=e.n(Ge),Pe=e(565),Re=e.n(Pe),Ne=e(566),Le=e.n(Ne),Xe={renderWebGL:Re.a,renderCanvas:Le.a};const Ue=Phaser.Utils.Objects.GetValue;class Ye extends Phaser.GameObjects.Shape{constructor(A,t,e,i,s,n,r,o){void 0===t&&(t=0),void 0===e&&(e=0);var a=Ue(n,"iteration",void 0);n=Ue(n,"radius",n),super(A,"RoundRectangle",new Se(0,0,i,s,n)),this.setIteration(a),this.setPosition(t,e),void 0!==r&&this.setFillStyle(r,o),this.updateDisplayOrigin(),this.updateData()}updateData(){var A=this.geom,t=this.pathData;t.length=0;var e,i=A.cornerRadius,s=this.iteration+1;if(e=i.br,ze(e)){var n=A.width-e.x,r=A.height-e.y;ke(n,r,e.x,e.y,0,90,!1,s,t)}else De(A.width,A.height,t);if(e=i.bl,ze(e)){n=e.x,r=A.height-e.y;ke(n,r,e.x,e.y,90,180,!1,s,t)}else De(0,A.height,t);if(e=i.tl,ze(e)){n=e.x,r=e.y;ke(n,r,e.x,e.y,180,270,!1,s,t)}else De(0,0,t);if(e=i.tr,ze(e)){n=A.width-e.x,r=e.y;ke(n,r,e.x,e.y,270,360,!1,s,t)}else De(A.width,0,t);return t.push(t[0],t[1]),this.pathIndexes=He()(t),this}get width(){return this.geom.width}set width(A){this.resize(A,this.height)}get height(){return this.geom.height}set height(A){this.resize(this.width,A)}resize(A,t){if(void 0===t&&(t=A),this.geom.width===A&&this.geom.height===t)return this;this.geom.height=t,this.geom.width=A,this.updateDisplayOrigin(),this.updateData();var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=A,e.hitArea.height=t),this}get iteration(){return this._iteration}set iteration(A){void 0!==this._iteration?this._iteration!==A&&(this._iteration=A,this.updateData()):this._iteration=A}setIteration(A){return void 0===A&&(A=6),this.iteration=A,this}get radius(){return this.geom.radius}set radius(A){this.geom.setRadius(A),this.updateDisplayOrigin(),this.updateData()}setRadius(A){return void 0===A&&(A=0),this.radius=A,this}get cornerRadius(){return this.geom.cornerRadius}set cornerRadius(A){this.radius=A}setCornerRadius(A){return this.setRadius(A)}}var ze=function(A){return 0!==A.x&&0!==A.y};Object.assign(Ye.prototype,Xe);var je=Ye,We=function(A){return null==A||""===A||0===A.length},Ze=function(A,t,e){if("object"==typeof A){if(We(t)){if(null==e)return;"object"==typeof e&&(A=e)}else{"string"==typeof t&&(t=t.split("."));var i=t.pop();(function(A,t,e){var i=A;if(We(t));else{var s;"string"==typeof t&&(t=t.split("."));for(var n=0,r=t.length;ns;o--){for(a=0;a0&&v>y?(a=y,h="center"===g?Math.floor((v-a)/2):"bottom"===g?v-a:0):(a=v,h=0),l=h+a,u="center"===g?Math.max((i-a*p)/2,0):"bottom"===g?Math.max(i-a*p-2,0):0,u+=t;for(var m=h;m0&&A.width>0&&this.drawUnderline(t,e,A.width,n),A.isTextPen&&this.drawText(t,e,A.text,n),A.isImagePen&&this.drawImage(t,e,A.prop.img,n),s.restore(),A.hasAreaMarker&&A.width>0&&this.hitAreaManager.add(A.prop.area,t,e-this.startYOffset,A.width,this.defatultStyle.lineHeight)},clear(){var A=this.canvas;this.context.clearRect(0,0,A.width,A.height)},drawBackground(A){null!==A&&(this.context.fillStyle=A,this.context.fillRect(0,0,this.canvas.width,this.canvas.height))},drawUnderline(A,t,e,i){t+=i.underlineOffset-i.underlineThickness/2,this.autoRound&&(A=Math.round(A),t=Math.round(t));var s=this.context,n=s.lineCap;s.lineCap="butt",s.beginPath(),s.strokeStyle=i.underlineColor,s.lineWidth=i.underlineThickness,s.moveTo(A,t),s.lineTo(A+e,t),s.stroke(),s.lineCap=n},drawText(A,t,e,i){this.autoRound&&(A=Math.round(A),t=Math.round(t));var s=this.context;i.strokeThickness&&(i.syncShadow(s,i.shadowStroke),s.strokeText(e,A,t)),i.color&&"none"!==i.color&&(i.syncShadow(s,i.shadowFill),s.fillText(e,A,t))},drawImage(A,t,e,i){var s=this.parent.imageManager,n=s.get(e),r=s.getFrame(e);A+=n.left,t+=-this.startYOffset+n.y,this.autoRound&&(A=Math.round(A),t=Math.round(t)),this.context.drawImage(r.source.image,r.cutX,r.cutY,r.cutWidth,r.cutHeight,A,t,n.width,n.height)}};var hi=class{constructor(){this.items=[]}destroy(){this.clear(),this.items=void 0}pop(){return this.items.length>0?this.items.pop():null}push(A){return this.items.push(A),this}pushMultiple(A){return this.items.push.apply(this.items,A),A.length=0,this}clear(){return this.items.length=0,this}};const li=Phaser.Utils.Objects.GetValue,ci=ei.NO_NEWLINE,ui=ei.RAW_NEWLINE;var di=class{constructor(A){this.prop={},this.resetFromJSON(A)}resetFromJSON(A){this.text=li(A,"text",""),this.x=li(A,"x",0),this.y=li(A,"y",0),this.width=li(A,"width",0);var t=li(A,"prop",null);null===t&&(t={}),this.prop=t,this.newLineMode=li(A,"newLineMode",0),this.startIndex=li(A,"startIndex",0)}get plainText(){var A=this.text;return this.newLineMode===ui&&(A+="\n"),A}get wrapText(){var A=this.text;return this.newLineMode!==ci&&(A+="\n"),A}get rawTextLength(){var A=this.text.length;return this.newLineMode===ui&&(A+=1),A}get endIndex(){return this.startIndex+this.rawTextLength}get lastX(){return this.x+this.width}get isTextPen(){return""!==this.text}get isImagePen(){return!!this.prop.img}get hasAreaMarker(){return!!this.prop.area}},gi=function(A){if(Array.isArray(A))A.length=0;else for(var t in A)delete A[t]},pi=function(A,t){var e=Array.isArray(A);if(void 0===t?t=e?[]:{}:gi(t),e){t.length=A.length;for(var i=0,s=A.length;i=this.lines.length)return this.getLineEndIndex(A);var t=this.lines[A];return t&&t[0]?t[0].startIndex:0}getLineEndIndex(A){A>=this.lines.length&&(A=this.lines.length-1);var t,e,i=!1;for(t=A;t>=0&&!(i=null!=(e=this.lines[t])&&e.length>0);t--);return i?e[e.length-1].endIndex:0}getLineWidth(A){var t=this.lines[A];if(!t)return 0;var e=t[t.length-1];return null==e?0:e.lastX}getMaxLineWidth(){if(void 0!==this.maxLinesWidth)return this.maxLinesWidth;for(var A,t=0,e=0,i=this.lines.length;et&&(t=A);return this.maxLinesWidth=t,t}getLineWidths(){for(var A=[],t=0,e=this.lines.length;t=A&&o<=t||(n=n.substring(A-r,t-r)),this.tagToTextScope?l+=this.tagToText.call(this.tagToTextScope,n,a,h):l+=this.tagToText(n,a,h),h=a,!(o>=t)));c++);return l}}var Ci={},bi=xi;const Ti=Phaser.Geom.Rectangle;var Qi=new hi;var Ei=class{constructor(){this.hitAreas=[]}destroy(){this.clear()}clear(){return Qi.pushMultiple(this.hitAreas),this}add(A,t,e,i,s){var n=Qi.pop();return null===n?n=new Ti(t,e,i,s):n.setTo(t,e,i,s),n.key=A,this.hitAreas.push(n),this}getFirstHitArea(A,t){for(var e,i=this.hitAreas,s=0,n=i.length;so&&(0===y?n.push(Hi.newline("",0,Di)):(n.push(Hi.newline(f,v,Di)),p=d,e===Oi&&y0&&t!==Ni&&e0&&A>t&&(A=t),A}get linesWidth(){return this.penManager.getMaxLineWidth()}get linesHeight(){var A=this.desplayLinesCount,t=this.defatultStyle.lineHeight*A;return A>0&&(t-=this.defatultStyle.lineSpacing),t}get imageManager(){return this.parent.imageManager}newPenManager(){return new bi({pensPool:this.pensPool,tagToText:this.parser.propToTagText,tagToTextScope:this.parser})}get tmpPenManager(){return null===this._tmpPenManager&&(this._tmpPenManager=this.newPenManager()),this._tmpPenManager}getPlainText(A,t,e){var i;if(null==A)i=this.penManager.plainText;else{var s=this.parser.splitText(A,1);i="";for(var n=0,r=s.length;n=1&&(i.color=o[0]),h>=2&&(i.thinkness=parseInt(o[1].replace("px","")));break;case"shadow":var a=i.split(" ");i={},(h=a.length)>=1&&(i.color=a[0]),h>=2&&(i.offsetX=parseInt(a[1].replace("px",""))),h>=3&&(i.offsetY=parseInt(a[2].replace("px",""))),h>=4&&(i.blur=parseInt(a[3].replace("px","")));break;case"u":case"underline":var h,l=i.split(" ");i={},(h=l.length)>=1&&(i.color=l[0]),h>=2&&(i.thinkness=parseInt(l[1].replace("px",""))),h>=3&&(i.offset=parseInt(l[2].replace("px","")))}s[e]=i}return s},Rs=function(A){return 0===(A=A.replace(zs,"")).length},Ns=/<\s*class=["|']([^"|']+)["|']\s*\>([\s\S]*?)<\s*\/class\s*\>|<\s*style=["|']([^"|']+)["|']\s*\>([\s\S]*?)<\s*\/style\s*\>/g,Ls=/<\s*class=/i,Xs=/<\s*class=["|']([^"|']+)["|']\s*\>([\s\S]*?)<\s*\/class\s*\>/,Us=/<\s*style=/i,Ys=/<\s*style=["|']([^"|']+)["|']\s*\>([\s\S]*?)<\s*\/style\s*\>/,zs=/^\s+|\s+$/,js=class{constructor(A){void 0===A&&(A={}),this.tags=A}addTag(A,t){this.tags[A]=t}splitText(A,t){for(var e,i,s,n=[],r=0,o=A.length,a=o;e=Ns.exec(A);)i=e[0],r<(a=Ns.lastIndex-i.length)&&n.push(A.substring(r,a)),void 0===t?n.push(i):1===t&&(Ls.test(i)?(s=i.match(Xs),n.push(s[2])):Us.test(i)&&(s=i.match(Ys),n.push(s[2]))),r=Ns.lastIndex;return r"+A+"":t.hasOwnProperty("_style")?""+A+"":void 0}destroy(){this.tags=void 0}isTextTag(A){var t=this.tags[A];return!!t&&null==t.img}};const Ws=Phaser.Utils.Objects.GetValue;var Zs=class extends ss{constructor(A,t,e,i,s){var n=Ws(s,"tags",void 0),r=new js(n);super(A,t,e,i,s,"rexTagText",r),this.parser=r}addTag(A,t){return this.parser.addTag(A,t),this.updateText(!0)}addTags(A){for(var t in A)this.parser.addTag(t,A[t]);return this.updateText(!0)}preDestroy(){super.preDestroy(),this.parser.destroy(),this.parser=void 0}};Fe.register("tagText",(function(A,t,e,i){var s=new Zs(this.scene,A,t,e,i);return this.scene.add.existing(s),s})),Ze(window,"RexPlugins.UI.TagText",Zs);const Vs=Phaser.GameObjects.Zone,Ks=Phaser.Utils.Array.Add,Js=Phaser.Utils.Array.Remove;class qs extends Vs{constructor(A,t,e,i,s){Array.isArray(i)&&(children=i,i=void 0),void 0===i&&(i=1),void 0===s&&(s=1),super(A,t,e,i,s),this.children=[]}destroy(A){this.scene&&(this.clear(!A),super.destroy(A))}contains(A){return-1!==this.children.indexOf(A)}add(A){return Ks(this.children,A,0,(function(A){A.on("destroy",this.remove,this)}),this),this}remove(A,t){return Js(this.children,A,(function(A){A.off("destroy",this.remove,this),t&&A.destroy()})),this}clear(A){for(var t,e=0,i=this.children.length;e(A.hasOwnProperty("rexContainer")||(A.rexContainer={}),A.rexContainer),resetChildState(A){return this.resetChildPositionState(A).resetChildVisibleState(A).resetChildAlphaState(A).resetChildActiveState(A),this},resetChildrenState(A){for(var t=0,e=A.length;t0?0:p,m=0;a=0;for(var C=e.length;a0?0:f),f>=1&&p>=1?(v=this.getFrameNameCallback(a,B,t))&&s.add(v,0,m+n.cutX,w+n.cutY,f,p):console.warn(`Size of Grid(${a},${B}) = ${f}x${p}, which is invalid`),m+=f;w+=p}return this.updateTexture(),this},Jn=function(A,t,e){return void 0===e&&(e="image"),A[t]||(A[t]=A.scene.make[e]({add:!1,origin:{x:0,y:0}}),A.on("destroy",(function(){A[t]&&(A[t].destroy(),A[t]=void 0)}))),A[t]},qn=function(){if(this.clear(),void 0===this.textureKey)return this;var A=this.scene.textures.get(this.textureKey);if(!A)return this;var t,e,i=this.width-this.columns.minWidth;i>=0?(t=this.columns.stretch>0?i/this.columns.stretch:0,e=1):(t=0,e=this.width/this.columns.minWidth);var s,n,r,o,a,h,l,c=this.height-this.rows.minHeight;c>=0?(s=this.rows.stretch>0?c/this.rows.stretch:0,n=1):(s=0,n=this.height/this.rows.minHeight);for(var u,d=0,g=0,p=0,f=this.rows.count;p0&&l>0&&A.has(r)&&(0===(0===a.stretch&&0===o.stretch?0:0===this.getStretchMode(v,p)?0:1)?(u=Jn(this,"_image","image")).setTexture(this.textureKey,r).setDisplaySize(h,l):(u=Jn(this,"_tileSprite","tileSprite")).setTexture(this.textureKey,r).setSize(h,l)),u&&(this.draw(u,d,g),u=void 0),d+=h;g+=l}};const $n=Phaser.Utils.Objects.IsPlainObject,Ar=Phaser.Utils.Objects.GetValue;var tr=function(A){return"string"==typeof A&&(A=er[A]),A};const er={scale:0,repeat:1};var ir=function(A,t){return 0===A||A===this.columns.count-1||0===t||t===this.rows.count-1},sr={setTexture:Kn,updateTexture:qn,setStretchMode:function(A){return $n(A)?(this.stretchMode.edge=tr(Ar(A,"edge",0)),this.stretchMode.internal=tr(Ar(A,"internal",0))):(A=tr(A),this.stretchMode.edge=A,this.stretchMode.internal=A),this},getStretchMode:function(A,t){return ir.call(this,A,t)?this.stretchMode.edge:this.stretchMode.internal}};var nr=function(A,t,e){return"__BASE"===e?`${A},${t}`:`${e}_${A},${t}`};const rr=Phaser.GameObjects.RenderTexture,or=Phaser.Utils.Objects.IsPlainObject,ar=Phaser.Utils.Objects.GetValue;class hr extends rr{constructor(A,t,e,i,s,n,r,o,a,h){or(t)?(t=ar(h=t,"x",0),e=ar(h,"y",0),i=ar(h,"width",1),s=ar(h,"height",1),n=ar(h,"key",void 0),r=ar(h,"baseFrame",void 0),o=ar(h,"columns",void 0),a=ar(h,"rows",void 0)):or(i)?(i=ar(h=i,"width",1),s=ar(h,"height",1),n=ar(h,"key",void 0),r=ar(h,"baseFrame",void 0),o=ar(h,"columns",void 0),a=ar(h,"rows",void 0)):or(n)?(n=ar(h=n,"key",void 0),r=ar(h,"baseFrame",void 0),o=ar(h,"columns",void 0),a=ar(h,"rows",void 0)):or(r)?(r=ar(h=r,"baseFrame",void 0),o=ar(h,"columns",void 0),a=ar(h,"rows",void 0)):bn(r)?(h=a,a=o,o=r,r=ar(h,"baseFrame",void 0)):or(o)&&(o=ar(h=o,"columns",void 0),a=ar(h,"rows",void 0)),super(A,t,e,i,s),this.columns={},this.rows={},this.stretchMode={},this._tileSprite=void 0,this._image=void 0,this.setOrigin(.5,.5),this.setGetFrameNameCallback(ar(h,"getFrameNameCallback",void 0)),this.setStretchMode(ar(h,"stretchMode",0)),this.setTexture(n,r,o,a)}setGetFrameNameCallback(A){return void 0===A&&(A=nr),this.getFrameNameCallback=A,this}get minWidth(){return this.columns.minWidth}get minHeight(){return this.rows.minHeight}resize(A,t){return this.width===A&&this.height===t?this:(super.resize(A,t),this.updateTexture(),this)}}Object.assign(hr.prototype,sr);var lr=hr;Fe.register("ninePatch",(function(A,t,e,i,s,n,r,o){var a=new lr(this.scene,A,t,e,i,s,n,r,o);return this.scene.add.existing(a),a})),Ze(window,"RexPlugins.UI.NinePatch",lr);var cr,ur=function(A){return A.hasOwnProperty("rexSizer")||(A.rexSizer={}),A.rexSizer},dr=function(A,t){void 0===t&&(void 0===cr&&(cr=new Phaser.Geom.Rectangle),t=cr);var e=A.game.config;return t.setTo(0,0,e.width,e.height),t},gr=function(A){return void 0===A&&(A=dr(this.scene)),this.left=Math.max(this.left,A.left),this.right=Math.min(this.right,A.right),this.top=Math.max(this.top,A.top),this.bottom=Math.min(this.bottom,A.bottom),this};const pr=Phaser.Display.Align;var fr={center:pr.CENTER,left:pr.LEFT_CENTER,right:pr.RIGHT_CENTER,top:pr.TOP_CENTER,bottom:pr.BOTTOM_CENTER,"left-top":pr.TOP_LEFT,"left-center":pr.LEFT_CENTER,"left-bottom":pr.BOTTOM_LEFT,"center-top":pr.TOP_CENTER,"center-center":pr.CENTER,"center-bottom":pr.BOTTOM_CENTER,"right-top":pr.TOP_RIGHT,"right-center":pr.RIGHT_CENTER,"right-bottom":pr.BOTTOM_RIGHT},vr=new Phaser.GameObjects.Zone({sys:{queueDepthSort:fi,events:{once:fi}}},0,0,1,1);vr.setOrigin(0);var yr=vr,mr={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},wr=function(A){return void 0!==A.displayWidth?A.displayWidth:A.width},Br=function(A){return void 0!==A.displayHeight?A.displayHeight:A.height},xr=function(A){var t=Br(A);return A.y+t-t*A.originY},Cr=function(A){var t=wr(A);return A.x-t*A.originX+.5*t},br=function(A,t){var e=Br(A);return A.y=t-e+e*A.originY,A},Tr=function(A,t){var e=wr(A),i=e*A.originX;return A.x=t+i-.5*e,A},Qr=function(A,t,e,i){return void 0===e&&(e=0),void 0===i&&(i=0),Tr(A,Cr(t)+e),br(A,xr(t)+i),A},Er=function(A){var t=wr(A);return A.x-t*A.originX},Fr=function(A,t){var e=wr(A);return A.x=t+e*A.originX,A},Mr=function(A,t,e,i){return void 0===e&&(e=0),void 0===i&&(i=0),Fr(A,Er(t)-e),br(A,xr(t)+i),A},Ir=function(A){var t=wr(A);return A.x+t-t*A.originX},Sr=function(A,t){var e=wr(A);return A.x=t-e+e*A.originX,A},Dr=function(A,t,e,i){return void 0===e&&(e=0),void 0===i&&(i=0),Sr(A,Ir(t)+e),br(A,xr(t)+i),A},_r=function(A,t){var e=Br(A),i=e*A.originY;return A.y=t+i-.5*e,A},Or=function(A,t,e){return Tr(A,t),_r(A,e)},kr=function(A){var t=Br(A);return A.y-t*A.originY+.5*t},Gr=function(A,t,e,i){return void 0===e&&(e=0),void 0===i&&(i=0),Or(A,Cr(t)+e,kr(t)+i),A},Hr=function(A,t,e,i){return void 0===e&&(e=0),void 0===i&&(i=0),Fr(A,Er(t)-e),_r(A,kr(t)+i),A},Pr=function(A,t,e,i){return void 0===e&&(e=0),void 0===i&&(i=0),Sr(A,Ir(t)+e),_r(A,kr(t)+i),A},Rr=function(A){var t=Br(A);return A.y-t*A.originY},Nr=function(A,t){var e=Br(A);return A.y=t+e*A.originY,A},Lr=function(A,t,e,i){return void 0===e&&(e=0),void 0===i&&(i=0),Tr(A,Cr(t)+e),Nr(A,Rr(t)-i),A},Xr=function(A,t,e,i){return void 0===e&&(e=0),void 0===i&&(i=0),Fr(A,Er(t)-e),Nr(A,Rr(t)-i),A},Ur=function(A,t,e,i){return void 0===e&&(e=0),void 0===i&&(i=0),Sr(A,Ir(t)+e),Nr(A,Rr(t)-i),A},Yr=[];Yr[mr.BOTTOM_CENTER]=Qr,Yr[mr.BOTTOM_LEFT]=Mr,Yr[mr.BOTTOM_RIGHT]=Dr,Yr[mr.CENTER]=Gr,Yr[mr.LEFT_CENTER]=Hr,Yr[mr.RIGHT_CENTER]=Pr,Yr[mr.TOP_CENTER]=Lr,Yr[mr.TOP_LEFT]=Xr,Yr[mr.TOP_RIGHT]=Ur;var zr=function(A,t,e,i,s){return Yr[e](A,t,i,s)};const jr=Phaser.Utils.Objects.GetValue,Wr=Phaser.GameObjects.Group;var Zr=function(A,t,e){return A.add.text(0,0,"")},Vr=new Phaser.Geom.Rectangle,Kr=function(A,t){var e,i,s,n,r=A.scene;if("number"==typeof t)e=t;else{e=jr(t,"color",16777215);var o=jr(t,"name",!1);o&&(i=jr(o,"createTextCallback",Zr),s=jr(o,"createTextCallbackScope",void 0),"string"==typeof(n=jr(o,"align","left-top"))&&(n=fr[n]))}if(i&&!A.children){A.children=new Wr(r),A.on("destroy",(function(){A.children.destroy(!0),A.children=void 0}));var a=A.clear.bind(A);A.clear=function(){a(),A.children.clear(!1,!0)}}for(var h,l,c=this.getAllChildren([this]),u=0,d=c.length;u=0?0:-i.x*s.x,t.y=i.y>=0?0:-i.y*s.y,t.width=i.width*s.x-t.x,t.height=i.height*s.y-t.y,1!==n&&2!==n||(t.width-=t.x),1!==n&&3!==n||(t.height-=t.y),t};var fo=class{constructor(A,t){this.gameObject=A,this.scene=A.scene,this.resetFromJSON(t),this.boot()}resetFromJSON(A){var t,e,i,s,n,r,o,a;return void 0!==A.x?(t=null,e=A.x):void 0!==A.left?(t=0,e=A.left):void 0!==A.right?(t=1,e=A.right):void 0!==A.centerX&&(t=.5,e=A.centerX),void 0!==A.y?(i=null,s=A.y):void 0!==A.top?(i=0,s=A.top):void 0!==A.bottom?(i=1,s=A.bottom):void 0!==A.centerY&&(i=.5,s=A.centerY),void 0!==e&&(e=e.replace("left","0%").replace("right","100%").replace("center","50%").split("%"),n=parseFloat(e[0])/100,r=""===e[1]?0:parseFloat(e[1])),void 0!==s&&(s=s.replace("top","0%").replace("bottom","100%").replace("center","50%").split("%"),o=parseFloat(s[0])/100,a=""===s[1]?0:parseFloat(s[1])),this.setAlign(t,i),this.setPercentage(n,o),this.setOffset(r,a),this}boot(){this.scene.scale.on("resize",this.anchor,this),this.gameObject.on("destroy",this.destroy,this),this.anchor()}shutdown(){this.scene.scale.off("resize",this.anchor,this),this.gameObject=void 0,this.scene=void 0}destroy(){this.shutdown()}setAlign(A,t){return this.alignX=A,this.alignY=t,this}setPercentage(A,t){return this.percentageX=A,this.percentageY=t,this}setOffset(A,t){return this.offsetX=A,this.offsetY=t,this}anchor(){return this.viewport=po(this.scene,!0),this.updatePosition(),this}updatePosition(){var A=this.gameObject;return null===this.alignX?A.x=this.anchorX:void 0!==this.alignX&&(A.x=this.anchorX+A.displayWidth*(A.originX-this.alignX)),null===this.alignY?this.gameObject.y=this.anchorY:void 0!==this.alignY&&(A.y=this.anchorY+A.displayHeight*(A.originY-this.alignY)),this}get anchorX(){return this.viewport.x+this.viewport.width*this.percentageX+this.offsetX}get anchorY(){return this.viewport.y+this.viewport.height*this.percentageY+this.offsetY}},vo=function(A){return void 0===this._anchor?this._anchor=new fo(this,A):this._anchor.resetFromJSON(A),this},yo={setEventEmitter(A,t){return void 0===t&&(t=Phaser.Events.EventEmitter),this._privateEE=void 0===A,this._eventEmitter=this._privateEE?new t:A,this},destroyEventEmitter(){return this._eventEmitter&&this._privateEE&&this._eventEmitter.shutdown(),this},getEventEmitter(){return this._eventEmitter},on:function(){return this._eventEmitter&&this._eventEmitter.on.apply(this._eventEmitter,arguments),this},once:function(){return this._eventEmitter&&this._eventEmitter.once.apply(this._eventEmitter,arguments),this},off:function(){return this._eventEmitter&&this._eventEmitter.off.apply(this._eventEmitter,arguments),this},emit:function(A){return this._eventEmitter&&A&&this._eventEmitter.emit.apply(this._eventEmitter,arguments),this},addListener:function(){return this._eventEmitter&&this._eventEmitter.addListener.apply(this._eventEmitter,arguments),this},removeListener:function(){return this._eventEmitter&&this._eventEmitter.removeListener.apply(this._eventEmitter,arguments),this},removeAllListeners:function(){return this._eventEmitter&&this._eventEmitter.removeAllListeners.apply(this._eventEmitter,arguments),this},listenerCount:function(){return this._eventEmitter?this._eventEmitter.listenerCount.apply(this._eventEmitter,arguments):0},listeners:function(){return this._eventEmitter?this._eventEmitter.listeners.apply(this._eventEmitter,arguments):[]}};const mo=Phaser.Scene;var wo=function(A){return A instanceof mo},Bo=function(A){return wo(A)?A:A.scene&&wo(A.scene)?A.scene:A.parent&&A.parent.scene&&wo(A.parent.scene)?A.parent.scene:void 0};const xo=Phaser.GameObjects.GameObject;var Co=function(A){return A instanceof xo};const bo=Phaser.Utils.Objects.GetValue;class To{constructor(A,t){this.parent=A,this.scene=Bo(A);var e=bo(t,"eventEmitter",!1);!0===e&&(e=void 0),this.setEventEmitter(e),this.boot()}boot(){Co(this.parent)?this.parent.once&&this.parent.on("destroy",this.destroy,this):wo(this.parent)&&this.parent.events.once("shutdown",this.destroy,this)}shutdown(){return this.stop(),wo(this.parent)&&this.parent.events.off("shutdown",this.destroy,this),this.destroyEventEmitter(),this.parent=void 0,this.scene=void 0,this}destroy(){return this.shutdown(),this}start(A){return this.isRunning?this:(this.tween=this.scene.tweens.add(A).on("complete",this.complete,this),!1===this.getEventEmitter()&&this.setEventEmitter(this.tween),this)}restart(){return this.stop().start(),this}stop(){return this.tween?(this.getEventEmitter()===this.tween&&this.setEventEmitter(!1),this.tween.remove(),this.tween=void 0,this):this}complete(){return this.stop(),this.getEventEmitter()&&this.emit("complete"),this}get isRunning(){return!!this.tween}}Object.assign(To.prototype,yo);var Qo=To;const Eo=Phaser.Utils.Objects.GetValue,Fo=Phaser.Utils.Objects.GetAdvancedValue;const Mo={stop:0,destroy:1,yoyo:2};var Io=class extends Qo{constructor(A,t){super(A),this.gameObject=A,this.scaleStart={},this.scaleEnd={},this.resetFromJSON(t)}resetFromJSON(A){return this.setMode(Eo(A,"mode",0)),this.setScaleRange(Fo(A,"start",void 0),Fo(A,"end",0)),this.setDelay(Fo(A,"delay",0)),this.setDuration(Fo(A,"duration",1e3)),this.setEase(Eo(A,"ease",void 0)),this}toJSON(){return{mode:this.mode,startX:this.startX,startY:this.startY,endX:this.endX,endY:this.endY,delay:this.delay,duration:this.duration}}setMode(A){return"string"==typeof A&&(A=Mo[A]),this.mode=A,this}setScaleRange(A,t){return"number"==typeof A?(this.startX=A,this.startY=A):(this.startX=Fo(A,"x",this.gameObject.scaleX),this.startY=Fo(A,"y",this.gameObject.scaleY)),"number"==typeof t?(this.endX=t,this.endY=t):(this.endX=Fo(t,"x",void 0),this.endY=Fo(t,"y",void 0)),this}setDelay(A){return this.delay=A,this}setDuration(A){return this.duration=A,this}setEase(A){return void 0===A&&(A="Linear"),this.ease=A,this}start(){if(this.isRunning)return this;var A={targets:this.gameObject,delay:this.delay,duration:this.duration,ease:this.ease,yoyo:2==this.mode,repeat:2==this.mode?-1:0};return void 0!==this.startX&&void 0!==this.endX&&(A.scaleX={start:this.startX,to:this.endX}),void 0!==this.startY&&void 0!==this.endY&&(A.scaleY={start:this.startY,to:this.endY}),super.start(A),this}complete(){return super.complete(),1===this.mode&&this.gameObject.destroy(),this}},So={},Do=function(A,t,e,i,s){switch(So.mode=0,e){case 0:case"x":So.start={x:0};break;case 1:case"y":So.start={y:0};break;default:So.start=0}return So.end=1,So.duration=t,So.ease=void 0===i?"Cubic":i,void 0===s?s=new Io(A,So):s.resetFromJSON(So),s.restart(),s},_o=function(A,t,e,i,s,n){s instanceof Io&&(n=s,s=void 0),void 0===s&&(s=!0);var r={};switch(r.mode=s?1:0,e){case 0:case"x":r.end={x:0};break;case 1:case"y":r.end={y:0};break;default:r.end=0}return r.duration=t,r.ease=void 0===i?"Linear":i,void 0===n?n=new Io(A,r):n.resetFromJSON(r),n.restart(),n},Oo=function(A,t){return new Promise((function(e,i){A.once(t,(function(){e()}))}))},ko=function(A){return Oo(A,"complete")};const Go=Phaser.Utils.Objects.IsPlainObject;var Ho={popUp(A,t,e){if(Go(A)){var i=A;A=i.duration,t=i.orientation,e=i.ease}this._scale=Do(this,A,t,e,this._scale),this._scale.once("complete",(function(){this.emit("popup.complete",this)}),this);var s=this.getParentSizer();if(s){var n=this;this._scale.on("update",(function(){s.resetChildPositionState(n)}))}return this},popUpPromise(A,t,e){return this.popUp(A,t,e),ko(this._scale)},scaleDownDestroy(A,t,e,i){if(Go(A)){var s=A;A=s.duration,t=s.orientation,e=s.ease,i=s.destroy}this._scale=_o(this,A,t,e,i,this._scale),this._scale.once("complete",(function(){this.emit("scaledown.complete",this)}),this);var n=this.getParentSizer();if(n){var r=this;this._scale.on("update",(function(){n.resetChildPositionState(r)}))}return this},scaleDownDestroyPromise(A,t,e,i){return this.scaleDownDestroy(A,t,e,i),ko(this._scale)},scaleDown(A,t,e){return this.scaleDownDestroy(A,t,e,!1),this},scaleDownPromise(A,t,e){return this.scaleDown(A,t,e),ko(this._scale)}};const Po=Phaser.Utils.Objects.GetValue,Ro=Phaser.Utils.Objects.GetAdvancedValue;const No={stop:0,destroy:1,yoyo:2};var Lo=class extends Qo{constructor(A,t){super(A),this.gameObject=A,this.alphaStart=void 0,this.alphaEnd=void 0,this.resetFromJSON(t)}resetFromJSON(A){return this.setMode(Po(A,"mode",0)),this.setAlphaRange(Ro(A,"start",this.gameObject.alpha),Ro(A,"end",0)),this.setDelay(Ro(A,"delay",0)),this.setDuration(Ro(A,"duration",1e3)),this}toJSON(){return{mode:this.mode,start:this.alphaStart,end:this.alphaEnd,delay:this.delay,duration:this.duration}}shutdown(){return super.shutdown(),this.gameObject=void 0,this}setMode(A){return"string"==typeof A&&(A=No[A]),this.mode=A,this}setAlphaRange(A,t){return this.alphaStart=A,this.alphaEnd=t,this}setDelay(A){return this.delay=A,this}setDuration(A){return this.duration=A,this}start(){return this.isRunning?this:(super.start({targets:this.gameObject,alpha:{start:this.alphaStart,to:this.alphaEnd},delay:this.delay,duration:this.duration,ease:"Linear",yoyo:2==this.mode,repeat:2==this.mode?-1:0}),this)}complete(){return super.complete(),1===this.mode&&this.gameObject.destroy(),this}};const Xo=Phaser.Utils.Objects.IsPlainObject;var Uo={},Yo=function(A,t,e,i){var s,n;return Xo(e)?(s=e.start,n=e.end):n=e,void 0===s&&(s=0),void 0===n&&(n=A.alpha),Uo.mode=0,Uo.start=s,Uo.end=n,Uo.duration=t,void 0===i?i=new Lo(A,Uo):i.resetFromJSON(Uo),i.restart(),i},zo={},jo=function(A,t,e,i){return e instanceof Lo&&(i=e,e=void 0),void 0===e&&(e=!0),zo.mode=e?1:0,zo.end=0,zo.duration=t,void 0===i?i=new Lo(A,zo):i.resetFromJSON(zo),i.restart(),i};const Wo=Phaser.Utils.Objects.IsPlainObject;var Zo={fadeIn(A,t){Wo(A)&&(A=A.duration);this._fade=Yo(this,A,t,this._fade),this._fade.once("complete",(function(){this.emit("fadein.complete",this)}),this);var e=this.getParentSizer();if(e){var i=this;this._fade.on("update",(function(){e.resetChildAlphaState(i)}))}return this},fadeInPromoise(A,t){return this.fadeIn(A,t),ko(this._fade)},fadeOutDestroy(A,t){if(Wo(A)){var e=A;A=e.duration,t=e.destroy}this._fade=jo(this,A,t,this._fade),this._fade.once("complete",(function(){this.emit("fadeout.complete",this)}),this);var i=this.getParentSizer();if(i){var s=this;this._fade.on("update",(function(){i.resetChildAlphaState(s)}))}return this},fadeOutDestroyPromise(A,t){return this.fadeOutDestroy(A,t),ko(this._fade)},fadeOut(A){return this.fadeOutDestroy(A,!1),this},fadeOutPromise(A){return this.fadeOut(A),ko(this._fade)}};const Vo=Phaser.Utils.Objects.GetValue,Ko=Phaser.Utils.Objects.GetAdvancedValue;const Jo={stop:0,destroy:1,yoyo:2};var qo=class extends Qo{constructor(A,t){super(A),this.gameObject=A,this.resetFromJSON(t)}resetFromJSON(A){if(this.setMode(Vo(A,"mode",0)),A&&(A.hasOwnProperty("x")||A.hasOwnProperty("y"))){var t=Ko(A,"x",void 0),e=Ko(A,"y",void 0);this.setTargetPosition(t,e)}else this.setTargetPosition(A);return this.setDelay(Ko(A,"delay",0)),this.setDuration(Ko(A,"duration",1e3)),this.setEase(Vo(A,"ease",void 0)),this}toJSON(){return{mode:this.mode,startX:this.startX,startY:this.startY,endX:this.endX,endY:this.endY,delay:this.delay,duration:this.duration}}setMode(A){return"string"==typeof A&&(A=Jo[A]),this.mode=A,this}setTargetPosition(A,t){if("number"==typeof A||"number"==typeof t)this.startX=this.gameObject.x,this.startY=this.gameObject.y,this.endX=A,this.endY=t;else{var e=A;this.startX=Ko(e,"startX",void 0),this.startY=Ko(e,"startY",void 0),this.endX=Ko(e,"endX",void 0),this.endY=Ko(e,"endY",void 0)}return this}setDelay(A){return this.delay=A,this}setDuration(A){return this.duration=A,this}setEase(A){return void 0===A&&(A="Linear"),this.ease=A,this}start(){if(this.isRunning)return this;var A={targets:this.gameObject,delay:this.delay,duration:this.duration,ease:this.ease,yoyo:2==this.mode,repeat:2==this.mode?-1:0};return void 0!==this.startX&&void 0!==this.endX&&(A.x={start:this.startX,to:this.endX}),void 0!==this.startY&&void 0!==this.endY&&(A.y={start:this.startY,to:this.endY}),super.start(A),this}complete(){return super.complete(),1===this.mode&&this.gameObject.destroy(),this}},$o=function(A,t,e,i,s,n,r){n instanceof qo&&(r=n,n=void 0),void 0===n&&(n=!1);var o={};return o.mode=n?1:0,void 0!==e&&(o.startX=A.x,o.endX=ta(e,A.x)),void 0!==i&&(o.startY=A.y,o.endY=ta(i,A.y)),o.duration=t,o.ease=void 0===s?"Linear":s,void 0===r?r=new qo(A,o):r.resetFromJSON(o),r.restart(),r},Aa=function(A,t,e,i,s,n,r){n instanceof qo&&(r=n,n=void 0),void 0===n&&(n=!1);var o={};return o.mode=n?1:0,void 0!==e&&(o.startX=ta(e,A.x),o.endX=A.x),void 0!==i&&(o.startY=ta(i,A.y),o.endY=A.y),o.duration=t,o.ease=void 0===s?"Linear":s,void 0===r?r=new qo(A,o):r.resetFromJSON(o),r.restart(),r},ta=function(A,t){if("number"==typeof A)return A;var e=A[0],i=parseFloat(A.substr(2));switch(e){case"+":return t+i;case"-":return t-i;case"*":return t*i;case"/":return t/i}};const ea=Phaser.Utils.Objects.IsPlainObject;var ia={moveFrom(A,t,e,i,s){if(ea(t)){var n=t;t=n.x,e=n.y,A=n.duration,i=n.ease}this._easeMove=Aa(this,A,t,e,i,s,this._easeMove),this._easeMove.once("complete",(function(){this.emit("movefrom.complete",this)}),this);var r=this.getParentSizer();if(r){var o=this;this._easeMove.on("update",(function(){r.resetChildPositionState(o)}))}return this},moveFromPromise(A,t,e,i,s){return this.moveFrom(A,t,e,i,s),ko(this._easeMove)},moveFromDestroy(A,t,e,i){return this.moveFrom(A,t,e,i,!0),this},moveFromDestroyPromise(A,t,e,i){return this.moveFromDestroy(A,t,e,i),ko(this._easeMove)},moveTo(A,t,e,i,s){if(ea(t)){var n=t;t=n.x,e=n.y,A=n.duration,i=n.ease}this._easeMove=$o(this,A,t,e,i,s,this._easeMove),this._easeMove.once("complete",(function(){this.emit("moveto.complete",this)}),this);var r=this.getParentSizer();if(r){var o=this;this._easeMove.on("update",(function(){r.resetChildPositionState(o)}))}return this},moveToPromise(A,t,e,i,s){return this.moveTo(A,t,e,i,s),ko(this._easeMove)},moveToDestroy(A,t,e,i){return this.moveTo(A,t,e,i,!0),this},moveToDestroyPromise(A,t,e,i){return this.moveToDestroy(A,t,e,i,!0),ko(this._easeMove)}},sa=void 0,na=function(A,t,e,i,s){return!(!A||!A.getBounds)&&(!(i&&!i(A,t,e))&&(!!(sa=A.getBounds(sa)).contains(t,e)&&!(s&&!s(A,t,e))))},ra=function(A,t,e,i){if(t)return na(A,t.x,t.y,e,i);for(var s=A.scene.input.manager,n=s.pointersTotal,r=s.pointers,o=0;o0?t.isRexSizer?Math.max(t.minWidth,t.childrenWidth):wr(t):0,i+=(e=t.rexSizer.padding).left+e.right,r>0&&(i+=this.space.item),s+=i);else for(r=0,o=n.length;r0?t.isRexSizer?Math.max(t.minHeight,t.childrenHeight):Br(t):0,i+=(e=t.rexSizer.padding).top+e.bottom,r>0&&(i+=this.space.item),s+=i));return s+this.space.top+this.space.bottom},Ta=function(){for(var A,t,e=0,i=this.sizerChildren,s=0,n=i.length;s0&&(e+=t);return e},Qa=function(A){void 0===A&&(A=[]);for(var t,e=this.sizerChildren,i=0,s=e.length;i0&&A.proportionLength>0&&(e=i.proportion*A.proportionLength):i.expand&&(e=A.innerWidth-s.left-s.right),e},Fa=function(A,t){var e,i=t.rexSizer,s=i.padding;return 0===A.orientation?i.expand&&(e=A.innerHeight-s.top-s.bottom):i.proportion>0&&A.proportionLength>0&&(e=i.proportion*A.proportionLength),e},Ma=function(A,t,e){if(this.rexSizer.hidden||!this.dirty)return this;var i;if(this.preLayout(A),void 0===t&&(t=Math.max(this.childrenWidth,this.minWidth)),void 0===e&&(e=Math.max(this.childrenHeight,this.minHeight)),this.resize(t,e),this.childrenProportion>0){var s=0===this.orientation?this.width-this.childrenWidth:this.height-this.childrenHeight;i=s>0?(s=0===this.orientation?this.width-this.getChildrenWidth(!1):this.height-this.getChildrenHeight(!1))/this.childrenProportion:0}else i=0;this.proportionLength=i;for(var n,r,o,a,h,l,c,u,d,g=this.sizerChildren,p=this.innerLeft,f=this.innerTop,v=this.innerWidth,y=this.innerHeight,m=p,w=f,B=0,x=g.length;B=this.sizerChildren.length?this.sizerChildren.push(A):this.sizerChildren.splice(r,0,A),void 0!==n&&this.addChildrenMap(n,A),this},Ha={add:Ga,addSpace(A){return void 0===A&&(A=1),Ga.call(this,Sa(this.scene),A),this},insert(A,t,e,i,s,n,r){return Ga.call(this,t,e,i,s,n,r,A),this}};const Pa=Phaser.Utils.Array.Remove,Ra=In.prototype.remove,Na=In.prototype.clear;var La={remove(A,t){return this.getParentSizer(A)!==this?this:(Pa(this.sizerChildren,A),Ra.call(this,A,t),this)},removeAll(A){for(var t=0,e=this.sizerChildren;t0){var h=this.rexSizer.padding;t=A.width-h.left-h.right}else t=Math.max(this.childrenWidth,this.minWidth);if(void 0===e)if(A&&a>0){var h=this.rexSizer.padding;e=A.height-h.top-h.bottom}else e=Math.max(this.childrenHeight,this.minHeight);this.resize(t,e),i=o>0?(this.width-this.childrenWidth)/o:0,s=a>0?(this.height-this.childrenHeight)/a:0;for(var l,c,u,d,g,p,f,v,y,m,w=this.innerLeft,B=w,x=this.innerTop,C=this.space.column,b=this.space.row,T=0;T=this.columnProportions.length?this:(this.columnProportions[A]=t,this)}setRowProportion(A,t){return A>=this.rowProportions.length?this:(this.rowProportions[A]=t,this)}get totalColumnProportions(){for(var A,t=0,e=0;e0&&(t+=A);return t}get totalRowProportions(){for(var A,t=0,e=0;e0&&(t+=A);return t}getChildAt(A,t){return this.sizerChildren[t*this.columnCount+A]}childToGridIndex(A,t){if(!A)return null;var e=this.sizerChildren.indexOf(A);return-1===e?null:(void 0===t&&(t={}),t.x=e%this.columnCount,t.y=Math.floor(e/this.columnCount),t)}}Object.assign(vh.prototype,gh);var yh=vh;Fe.register("gridSizer",(function(A,t,e,i,s,n,r,o,a){var h=new yh(this.scene,A,t,e,i,s,n,r,o,a);return this.scene.add.existing(h),h})),Ze(window,"RexPlugins.UI.GridSizer",yh);var mh=function(){return this.rexSizer.hidden?0:(0===this.orientation?this.maxChildWidth:0)+this.space.left+this.space.right},wh=function(){return this.rexSizer.hidden?0:(0===this.orientation?0:this.maxChildHeight)+this.space.top+this.space.bottom},Bh=function(A){void 0===A&&(A=[]);for(var t,e=this.sizerChildren,i=0,s=e.length;i0&&(a+=this.space.item),h=m+o.top,l=wr(n),c=Br(n),y=a+l+o.right+p):(a=y+o.left,h=m+o.top,C>0&&(h+=this.space.item),l=wr(n),m=h+(c=Br(n))+o.bottom+p),yr.setPosition(a,h).setSize(l,c),zr(n,yr,r.align),this.resetChildPositionState(n);0===this.orientation?(y=f,m+=u.height+this.space.line):(y+=u.height+this.space.line,m=v)}return this.layoutBackgrounds(),this.postLayout()},Eh=function(){co.call(this),this._maxChildWidth=void 0,this._maxChildHeight=void 0};const Fh=Phaser.Utils.Objects.IsPlainObject,Mh=Phaser.Utils.Objects.GetValue,Ih=Phaser.Display.Align.CENTER;var Sh=function(A,t,e,i){if("\n"===A)return this.addNewLine(),this;var s;(this.pin(A),Fh(t))&&(t=Mh(s=t,"padding",0),e=Mh(s,"key",void 0),i=Mh(s,"index",void 0));return void 0===t&&(t=0),(s=this.getSizerConfig(A)).align=Ih,s.padding=qr(t),void 0===i||i>=this.sizerChildren.length?this.sizerChildren.push(A):this.sizerChildren.splice(i,0,A),void 0!==e&&this.addChildrenMap(e,A),this},Dh={add(A,t,e){if(bn(A))for(var i=A,s=0,n=i.length;s=this.dragThreshold&&this.cancel()}click(A,t,e){if(!this.enable)return this;if(void 0===A)return this.emit("click",this,this.gameObject,t,e),this;this.pointer=void 0;var i=this.lastClickTime;return void 0!==i&&A-i<=this.clickInterval?this:(this.lastClickTime=A,this.emit("click",this,this.gameObject,t,e),this)}cancel(){return this.pointer=void 0,this}}Object.assign(vl.prototype,yo);const yl={press:0,pointerdown:0,release:1,pointerup:1};var ml=vl,wl=ml,Bl=function(A,t){A._buttonBehavior=new wl(A,t),A._buttonBehavior.on("click",(function(A,t,e,i){xl.call(this,"button.click",t,e,i)}),this).on("enable",(function(A,t){xl.call(this,"button.enable",t)}),this).on("disable",(function(A,t){xl.call(this,"button.disable",t)}),this),A.on("pointerover",(function(t,e,i,s){xl.call(this,"button.over",A,t,s)}),this).on("pointerout",(function(t,e){xl.call(this,"button.out",A,t,e)}),this)},xl=function(A,t,e,i){var s;if("number"==typeof t){if(s=t,!(t=this.buttons[s]))return}else if(-1===(s=this.buttons.indexOf(t)))return;this.eventEmitter!==this&&this.emit(A,t,s,e,i),void 0!==this.groupName?this.eventEmitter.emit(A,t,this.groupName,s,e,i):this.eventEmitter.emit(A,t,s,e,i)};const Cl=Za.prototype.add,bl=Za.prototype.addSpace,Tl=Za.prototype.insert;var Ql=function(A){if(0===this.buttons.length){if(!this.buttonsExpand)switch(this.buttonsAlign){case"right":case"bottom":case"center":bl.call(this)}Cl.call(this,A,this.buttonProportion,"center",0,!0),this.buttonsExpand||"center"===this.buttonsAlign&&bl.call(this)}else{var t=this.sizerChildren.length-1;this.sizerChildren[t].isRexSpace?Tl.call(this,t,A,this.buttonProportion,"center",0,!0):Cl.call(this,A,this.buttonProportion,"center",0,!0)}return this.buttons.push(A),Bl.call(this,A,this.clickConfig),this},El={addButton(A){if(bn(A))for(var t=A,e=0,i=t.length;es&&rc.addNewLine(this)}else for(n=0,r=A.length;n=A.dragThreshold?"DRAG":"DRAGBEGIN":"IDLE"}update_DRAGBEGIN(A,t){this.next()}next_DRAG(){var A,t=this.parent;return t.dragState.isUp&&(A=t.outOfBounds?"BACK":t.slidingEnable?"SLIDE":"IDLE"),A}update_DRAG(A,t){var e=this.parent;e.dragState.justMoved&&e.dragging(),this.next()}next_SLIDE(){var A,t=this.parent;return t.dragState.isDown?A="DRAG":t.isSliding||(A="IDLE"),A}enter_SLIDE(){this.parent.onSliding()}exit_SLIDE(){this.parent.stop()}update_SLIDE(A,t){this.parent.sliding(A,t),this.next()}next_BACK(){var A,t=this.parent;return t.dragState.isDown?A="DRAG":t.isPullBack||(A="IDLE"),A}enter_BACK(){this.parent.onPullBack()}exit_BACK(){this.parent.stop()}update_BACK(A,t){this.parent.pullBack(A,t),this.next()}};const cu=Phaser.Utils.Objects.GetValue,uu=Phaser.Math.Distance.Between;class du{constructor(A,t){this.gameObject=A,this.scene=Bo(A),this.setEventEmitter(cu(t,"eventEmitter",void 0)),this._enable=void 0,A.setInteractive(cu(t,"inputConfig",void 0)),this.resetFromJSON(t),this.boot()}resetFromJSON(A){return this.pointer=void 0,this.isInTouched=!1,this.holdStartTime=void 0,this.x=void 0,this.y=void 0,this.preX=void 0,this.preY=void 0,this.localX=void 0,this.localY=void 0,this.justMoved=!1,this.setEnable(cu(A,"enable",!0)),this.holdThreshold=cu(A,"holdThreshold",50),this}boot(){this.gameObject.on("pointerdown",this.onPointIn,this),this.gameObject.on("pointerover",this.onPointIn,this),this.gameObject.on("pointerup",this.onPointOut,this),this.gameObject.on("pointerout",this.onPointOut,this),this.gameObject.on("pointermove",this.onPointerMove,this),this.gameObject.on("destroy",this.destroy,this),this.scene.events.on("preupdate",this.preupdate,this)}shutdown(){this.scene&&this.scene.events.off("preupdate",this.preupdate,this),this.pointer=void 0,this.gameObject=void 0,this.scene=void 0,this.destroyEventEmitter()}destroy(){this.shutdown()}get enable(){return this._enable}set enable(A){this._enable!==A&&(A||(this.isInTouched=!1,this.pointer=void 0),this._enable=A)}setEnable(A){return void 0===A&&(A=!0),this.enable=A,this}toggleEnable(){return this.setEnable(!this.enable),this}get isDown(){return this.pointer&&this.pointer.isDown}get isUp(){return!this.isDown}get dx(){return this.x-this.preX}get dy(){return this.y-this.preY}get dt(){return this.scene.sys.game.loop.delta}get speed(){return this.x===this.preX&&this.y===this.preY?0:uu(this.preX,this.preY,this.x,this.y)/(.001*this.dt)}get speedX(){return this.dx/(.001*this.dt)}get speedY(){return this.dy/(.001*this.dt)}onPointIn(A,t,e){this.enable&&A.isDown&&void 0===this.pointer&&(this.pointer=A,this.localX=t,this.localY=e)}onPointOut(A){this.enable&&this.pointer===A&&(this.pointer=void 0)}onPointerMove(A,t,e){this.enable&&A.isDown&&this.pointer===A&&(this.localX=t,this.localY=e)}preupdate(A,t){if(this.enable){var e=this.pointer;this.justMoved=!1,e&&!this.isInTouched?(this.x=e.x,this.y=e.y,this.preX=e.x,this.preY=e.y,this.isInTouched=!0,this.holdStartTime=void 0,this.emit("touchstart",e,this.localX,this.localY)):e&&this.isInTouched?this.x===e.x&&this.y===e.y?void 0===this.holdStartTime?this.holdStartTime=A:A-this.holdStartTime>this.holdThreshold&&(this.preX=this.x,this.preY=this.y):(this.preX=this.x,this.preY=this.y,this.x=e.x,this.y=e.y,this.holdStartTime=void 0,this.justMoved=!0,this.emit("touchmove",e,this.localX,this.localY)):!e&&this.isInTouched&&(this.isInTouched=!1,this.holdStartTime=void 0,this.emit("touchend",e))}}}Object.assign(du.prototype,yo);var gu=du;const pu=Phaser.Utils.Objects.GetValue;var fu=class{constructor(A){this.resetFromJSON(A)}resetFromJSON(A){return this.setValue(pu(A,"value",0)),this.setSpeed(pu(A,"speed",0)),this.setAcceleration(pu(A,"acceleration",0)),this}reset(){this.setValue(0),this.setSpeed(0),this.setAcceleration(0)}setValue(A){return this.value=A,this}setSpeed(A){return this.speed=A,this}setAcceleration(A){return this.acceleration=A,this}updateSpeed(A){return 0!==this.acceleration&&(this.speed+=this.acceleration*A,this.speed<0&&(this.speed=0)),this}getDeltaValue(A){return this.updateSpeed(A),this.speed<=0?0:this.speed*A}update(A){return this.updateSpeed(A),this.speed>0&&(this.value+=this.getDeltaValue(A)),this}get isMoving(){return this.speed>0}};var vu=class{constructor(){this.value,this.dir,this.movement=new fu}init(A,t,e,i,s){return this.value=A,this.end=s,this.dir=void 0!==s?Athis.end&&(this.value=this.end):this.valuethis.maxValue}overMin(A){return null!=this.minValue&&A0,Math.abs(t),e)}sliding(A,t){t*=.001;var e=this._slowDown.update(t).value;this.overMax(e)?(this.value=this.maxValue,this._slowDown.stop()):this.overMin(e)?(this.value=this.minValue,this._slowDown.stop()):this.value=e}onPullBack(){var A=this.value,t=this.outOfMinBound?this.minValue:this.maxValue,e=Math.abs(t-A),i=this.backDeceleration,s=Math.sqrt(2*i*e);this._slowDown.init(A,void 0,s,i,t)}pullBack(A,t){t*=.001,this.value=this._slowDown.update(t).value,this._slowDown.isMoving||this._state.next()}stop(){this._slowDown.stop()}}Object.assign(mu.prototype,yo);const wu={y:0,v:0,vertical:0,x:1,h:1,horizontal:1};var Bu=mu;const xu=Phaser.Utils.Objects.GetValue;var Cu=function(A){var t,e,i=this.scene,s=nu(A),n=new Za(i,{orientation:s}),r=xu(A,"child.gameObject",void 0),o=xu(A,"slider",void 0),a=xu(A,"scroller",!0);if(r){var h=xu(A,"space.child",0);if(this.childPadding={},"number"!=typeof h){var l=h;0===s?(h=xu(l,"right",0),this.childPadding.top=xu(l,"top",0),this.childPadding.bottom=xu(l,"bottom",0)):(h=xu(l,"bottom",0),this.childPadding.top=xu(l,"left",0),this.childPadding.bottom=xu(l,"right",0))}else this.childPadding.top=0,this.childPadding.bottom=0;var c,u=xu(A,"child.proportion",1),d=xu(A,"child.expand",!0);if(n.add(r,u,"center",0,d),o)!0===o&&(o={}),c=0===s?{left:h}:{top:h},o.orientation=0===n.orientation?1:0,t=new eu(i,o),n.add(t,0,"center",c,!0);a&&(!0===a&&(a={}),a.orientation=s,e=new Bu(r,a))}return t&&t.on("valuechange",(function(A){this.t=A}),this),e&&e.on("valuechange",(function(A){this.childOY=A}),this),this.addChildrenMap("child",r),this.addChildrenMap("slider",t),this.addChildrenMap("scroller",e),n},bu=function(){var A=this.topChildOY,t=this.bottomChildOY,e=this.childrenMap.scroller,i=this.childrenMap.slider;return e&&e.setBounds(t,A),i&&i.setEnable(t!==A),this.updateController(),this},Tu=function(){var A=this.childrenMap.scroller,t=this.childrenMap.slider;A&&A.setValue(this.childOY),t&&t.setValue(this.t)};const Qu=Phaser.Utils.Objects.GetValue;class Eu extends Za{constructor(A,t){void 0===t&&(t={});var e=nu(t);t.orientation=0===e?1:0,super(A,t),this.type=Qu(t,"type","rexScrollable");var i=Qu(t,"background",void 0),s=Cu.call(this,t),n=Qu(t,"header",void 0),r=Qu(t,"footer",void 0);if(i&&this.addBackground(i),n){var o=Qu(t,"align.header","center"),a=Qu(t,"space.header",0);l=0===e?{bottom:a}:{right:a};var h=Qu(t,"expand.header",!0);this.add(n,0,o,l,h)}if(s&&this.add(s,1,"center",0,!0),r){o=Qu(t,"align.footer","center");var l,c=Qu(t,"space.footer",0);l=0===e?{top:c}:{left:c};h=Qu(t,"expand.footer",!0);this.add(r,0,o,l,h)}this.addChildrenMap("background",i),this.addChildrenMap("header",n),this.addChildrenMap("footer",r)}layout(A,t,e){return this.rexSizer.hidden||!this.dirty?this:(super.layout(A,t,e),this.resizeController(),this)}set t(A){var t=this.childPadding;if(0!==t.top||0!==t.bottom){var e=this.childrenMap.child,i=e.topChildOY-e.bottomChildOY;A=((i+t.top+t.bottom)*A-t.top)/i}this.childrenMap.child.t=A,this.updateController()}get t(){var A=this.childrenMap.child.t,t=this.childPadding;if(0!==t.top||0!==t.bottom){var e=this.childrenMap.child,i=e.topChildOY-e.bottomChildOY,s=i+t.top+t.bottom;A=(i*A+t.top)/s}return A}set childOY(A){this.childrenMap.child.childOY=A,this.updateController()}get childOY(){return this.childrenMap.child.childOY}get topChildOY(){return this.childrenMap.child.topChildOY+this.childPadding.top}get bottomChildOY(){return this.childrenMap.child.bottomChildOY-this.childPadding.bottom}setChildOY(A){return this.childOY=A,this}setT(A){return this.t=A,this}scrollToTop(){return this.t=0,this}scrollToBottom(){return this.t=1,this}get sliderEnable(){var A=this.childrenMap.slider;if(A)return A.enable}set sliderEnable(A){var t=this.childrenMap.slider;t&&t.setEnable(A)}setSliderEnable(A){return void 0===A&&(A=!0),this.sliderEnable=A,this}get scrollerEnable(){var A=this.childrenMap.scroller;if(A)return A.enable}set scrollerEnable(A){var t=this.childrenMap.scroller;t&&t.setEnable(A)}setScrollerEnable(A){return void 0===A&&(A=!0),this.scrollerEnable=A,this}}var Fu={resizeController:bu,updateController:Tu};Object.assign(Eu.prototype,Fu);var Mu=Eu,Iu={enableData(){return void 0===this.data&&(this.data={}),this},getData(A,t){return this.enableData(),void 0===A?this.data:ou()(this.data,A,t)},setData(A,t){return this.enableData(),this.data[A]=t,this},incData(A,t,e){return void 0===e&&(e=0),this.enableData(),this.setData(A,this.getData(A,e)+t),this},mulData(A,t,e){return void 0===e&&(e=0),this.enableData(),this.setData(A,this.getData(A,e)*t),this},clearData(){return this.data&&gi(this.data),this},resetData(A){if(this.clearData(),A)for(var t in this.enableData(),A)this.data[t]=A[t];return this},cloneData(){return this.data?pi(this.data):{}}};class Su{constructor(A,t){this.container=null,this._deltaHeight=0,this.setParent(A)}setParent(A){this.parent=A,this.parentContainer=A.getParentContainer()}destroy(A){void 0===A&&(A=!1),A||this.destroyContainer(),this.deltaHeight=0,this.data=void 0,this.container=null,this.parent=void 0,this.parentContainer=void 0}get table(){return this.parent}get scrollMode(){return this.parentContainer.scrollMode}get colIndx(){return this.parent.cellIndxeToColIndex(this.index)}get rowIndx(){return this.parent.cellIndxeToRowIndex(this.index)}getContainer(){return this.container}setContainer(A){return A?(this.container&&this.container.destroy(),this.container=A,this.parentContainer.add(A),this):(this.destroyContainer(),this)}destroyContainer(){return this.container&&(this.container.destroy(),this.container=null),this}popContainer(){if(this.container){var A=this.container;return this.container=null,this.parentContainer.remove(A),A}return null}setXY(A,t){return this.container&&this.parentContainer.setChildLocalPosition(this.container,A,t),this}get deltaHeight(){return this._deltaHeight}set deltaHeight(A){null==A&&(A=0);var t=this.parent;0===this._deltaHeight&&0!==A?t.nonZeroDeltaHeightCount++:0!==this._deltaHeight&&0===A&&t.nonZeroDeltaHeightCount--,this._deltaHeight=A}get deltaWidth(){return this.deltaHeight}set deltaWidth(A){this.deltaHeight=A}setDeltaHeight(A){return this.deltaHeight=A,this}setDeltaWidth(A){return this.deltaHeight=A,this}get height(){return 0===this.scrollMode?this.deltaHeight+this.parent.defaultCellHeight:this.parent.defaultCellWidth}set height(A){1!==this.scrollMode&&this.setDeltaHeight(A-this.parent.defaultCellHeight)}setHeight(A){return this.height=A,this}get width(){return 0===this.scrollMode?this.parent.defaultCellWidth:this.deltaHeight+this.parent.defaultCellHeight}set width(A){0!==this.scrollMode&&this.setDeltaHeight(A-this.parent.defaultCellHeight)}setWidth(A){return this.width=A,this}get scene(){return this.parentContainer.scene}}Object.assign(Su.prototype,Iu);var Du=Su;const _u=Phaser.Utils.Objects.GetValue,Ou=Phaser.Utils.Array.SpliceOne;var ku=class{constructor(A,t){this.parent=A,this.cells=[],this.cellPool=new hi,this.resetFromJSON(t)}resetFromJSON(A){return this.colCount=void 0,this._nonZeroDeltaHeightCount=0,this.resetTotalRowsHeight(),this.setDefaultCellHeight(_u(A,"cellHeight",30)),this.setDefaultCellWidth(_u(A,"cellWidth",30)),this.initCells(_u(A,"cellsCount",0)),this.setColumnCount(_u(A,"columns",1)),this}destroy(A){for(var t=0,e=this.cells.length;t=0&&A=0&&e0&&i)){if(0===n)return e;if(t){var r=e;(i=(e+=1)>=0&&e=this.colCount?null:t*this.colCount+A}rowIndexToHeight(A,t){if(this.defaultCellHeightMode)return(t-A+1)*this.defaultCellHeight;for(var e=0,i=A;i<=t;i++)e+=this.getRowHeight(i);return e}colIndexToWidth(A,t){return(t-A+1)*this.defaultCellWidth}getRowHeight(A){var t=this.colCount;if(t<=1)return this.getCellHeight(this.colRowToCellIndex(0,A));for(var e,i=0,s=0;sthis.topTableOY,n=Athis.leftTableOX,n=AA?this.removeCells(A,t-A):this.insertNewCells(t,A-t),this)};const sd=Phaser.Math.Clamp;var nd={setTableOY:Hu,setTableOX:Pu,maskCells:ju,updateTable:Ad,isCellVisible:td,pointToCellIndex:ed,pointToCellContainer:function(A,t){var e=ed.call(this,A,t);if(null!==e)return this.getCellContainer(e)},eachVisibleCell:function(A,t){return this.visibleCells.each(A,t),this},iterateVisibleCell:function(A,t){return this.visibleCells.iterate(A,t),this},eachCell:function(A,t){return this.table.cells.slice().forEach(A,t),this},iterateCell:function(A,t){return this.table.cells.forEach(A,t),this},setCellsCount:id,insertNewCells:function(A,t){return"object"==typeof A&&(A=A.index),void 0===t&&(t=1),t<=0?this:(A=sd(A,0,this.cellsCount),this.table.insertNewCells(A,t),this)},removeCells:function(A,t){if("object"==typeof A&&(A=A.index),void 0===t&&(t=1),A<0&&(t+=A,A=0),t<=0)return this;if(A>this.cellsCount)return this;for(var e,i=A,s=A+t;it?A-t:0}get tableVisibleWidth(){var A=this.tableWidth,t=this.instWidth;return A>t?A-t:0}get bottomLeftY(){return-this.displayHeight*this.originY+this.displayHeight}get topRightX(){return-this.displayWidth*this.originX+this.displayWidth}get topLeftX(){return-this.displayWidth*this.originX}get topLeftY(){return-this.displayHeight*this.originY}get bottomBound(){return 0===this.scrollMode?this.bottomLeftY:this.topRightX}get rightBound(){return 0===this.scrollMode?this.topRightX:this.bottomLeftY}resize(A,t){return this.width===A&&this.height===t?this:(super.resize(A,t),this.cellsMask&&pa(Gu(this.cellsMask),A,t),this.expandCellSize&&this.table.setDefaultCellWidth(this.instWidth/this.table.colCount),this.updateTable(!0),this)}}Object.assign(ld.prototype,od.GetBounds,nd);const cd={v:0,vertical:0,h:1,horizontal:1},ud={update:0,everyTick:1};var dd=ld,gd=function(A){Object.defineProperty(A,"childOY",{configurable:!0,get:function(){return A.tableOY},set:function(t){A.tableOY=t}}),Object.defineProperty(A,"topChildOY",{get:function(){return A.topTableOY}}),Object.defineProperty(A,"bottomChildOY",{get:function(){return A.bottomTableOY}})},pd=function(A){A.on("cellvisible",(function(A,t,e){var i=this.createCellContainerCallback,s=this.createCellContainerCallbackScope;A.item=this.items[A.index],(t=s?i.call(s,A,t,e):i(A,t,e))&&(t.setOrigin&&t.setOrigin(0),t.isRexSizer&&t.layout()),A.item=void 0,A.setContainer(t)}),this)},fd=function(A,t,e,i,s,n){var r;if(null!=(r=void 0===s?i:e.pointToCellIndex(i,s))){var o=e.getCellContainer(r);A.emit(t,o,r,n)}},vd=function(A,t){A.on("pointerdown",(function(t){fd(this.eventEmitter,"cell.down",A,t.x,t.y,t)}),this).on("pointerup",(function(t){fd(this.eventEmitter,"cell.up",A,t.x,t.y,t)}),this)},yd=function(A){var t=this.childrenMap.child,e=t.pointToCellIndex(A.x,A.y);if(e!==t.input.lastOverCellIndex){var i=t.input.lastOverCellIndex;t.input.lastOverCellIndex=e,fd(this.eventEmitter,"cell.out",t,i,void 0,A),fd(this.eventEmitter,"cell.over",t,e,void 0,A)}},md=function(A){var t=this.childrenMap.child,e=t.input.lastOverCellIndex;t.input.lastOverCellIndex=void 0,fd(this.eventEmitter,"cell.out",t,e,void 0,A)},wd=function(A,t){A.on("pointermove",yd,this).on("pointerover",yd,this).on("pointerout",md,this)};const Bd=Phaser.Utils.Objects.GetValue;var xd=function(A,t){var e=Bd(t,"button",void 0);!1!==e&&(void 0===e&&(e={}),e.threshold=10,A._click=new ml(A,e),A._click.on("click",(function(A,t,e){fd(this.eventEmitter,"cell.click",t,e.x,e.y,e)}),this))};const Cd=Phaser.Utils.Objects.GetValue;class bd{constructor(A,t){this.parent=A,this._isRunning=!1,this.tickingState=!1,this.setEventEmitter(Cd(t,"eventEmitter",void 0)),this.setTickingMode(Cd(t,"tickingMode",1))}boot(){2!==this.tickingMode||this.tickingState||this.startTicking()}shutdown(){this.destroyEventEmitter(),this.tickingState&&this.stopTicking()}setTickingMode(A){"string"==typeof A&&(A=Td[A]),this.tickingMode=A}startTicking(){this.tickingState=!0}stopTicking(){this.tickingState=!1}get isRunning(){return this._isRunning}set isRunning(A){this._isRunning!==A&&(this._isRunning=A,1===this.tickingMode&&A!=this.tickingState&&(A?this.startTicking():this.stopTicking()))}start(){return this.isRunning=!0,this}pause(){return this.isRunning=!1,this}resume(){return this.isRunning=!0,this}stop(){return this.isRunning=!1,this}complete(){this.isRunning=!1,this.emit("complete",this.parent,this)}}Object.assign(bd.prototype,yo);const Td={no:0,lazy:1,always:2};var Qd=bd;const Ed=Phaser.Utils.Objects.GetValue;const Fd=0,Md=1,Id="IDLE";var Sd=class extends Qd{constructor(A,t){var e=Bo(A);e===A&&(A=void 0),super(e,t),this.scene=e,this.gameObject=A,A&&A.setInteractive(Ed(t,"inputConfig",void 0)),this._enable=void 0,this.resetFromJSON(t),this.boot()}resetFromJSON(A){return this.setEnable(Ed(A,"enable",!0)),void 0===this.gameObject?this.bounds=Ed(A,"bounds",void 0):this.bounds=void 0,this.tracerState=Fd,this.pointer=void 0,this.lastPointer=void 0,this.movedState=!1,this.isTouchingAnyObject=!1,this}boot(){super.boot(),this.gameObject?this.gameObject.on("pointerdown",this.onPointerDown,this):this.scene.input.on("pointerdown",this.onPointerDown,this),this.scene.input.on("pointerup",this.onPointerUp,this),this.scene.input.on("pointermove",this.onPointerMove,this),this.scene.events.once("shutdown",this.destroy,this)}shutdown(){this.gameObject?this.gameObject.off("pointerdown",this.onPointerDown,this):this.scene&&this.scene.input.off("pointerdown",this.onPointerDown,this),this.scene&&(this.scene.input.off("pointerup",this.onPointerUp,this),this.scene.input.off("pointermove",this.onPointerMove,this),this.scene.events.off("destroy",this.destroy,this),this.scene=void 0),this.scene=void 0,this.gameObject=void 0,this.bounds=void 0,this.pointer=void 0,this.lastPointer=void 0,this.movedState=!1,super.shutdown()}destroy(){this.shutdown()}get enable(){return this._enable}set enable(A){if(this._enable!==A)return A||this.dragCancel(),this._enable=A,this}setEnable(A){return void 0===A&&(A=!0),this.enable=A,this}toggleEnable(){return this.setEnable(!this.enable),this}onPointerDown(A,t){this.enable&&(void 0===this.pointer&&(!this.bounds||this.bounds.contains(A.x,A.y))&&this.pointer!==A&&(this.pointer=A,this.lastPointer=A,this.movedState=!1,this.tracerState=Md,void 0===this.gameObject&&(this.isTouchingAnyObject=t.length>0),this.onDragStart()))}onPointerUp(A){this.enable&&((!this.bounds||this.bounds.contains(A.x,A.y))&&this.pointer===A&&(this.pointer=void 0,this.movedState=!1,this.tracerState=Fd,this.onDragEnd()))}onPointerMove(A){if(this.enable&&A.isDown){var t=!this.bounds||this.bounds.contains(A.x,A.y),e=this.pointer===A;!e&&t||(e&&!t?this.onPointerUp(A):(this.movedState||(this.movedState=A.x!==A.downX||A.y!==A.downY),this.movedState&&this.onDrag()))}}dragCancel(){return this.tracerState===Md&&this.onDragEnd(),this.pointer=void 0,this.tracerState=Fd,this}onDragStart(){this.emit("dragstart",this)}onDragEnd(){this.emit("dragend",this)}onDrag(){this.emit("drag",this)}preUpdate(A,t){}postUpdate(A,t){}startTicking(){super.startTicking(),this.scene.events.on("preupdate",this.preUpdate,this),this.scene.events.on("postupdate",this.postUpdate,this)}stopTicking(){super.stopTicking(),this.scene&&(this.scene.events.off("preupdate",this.preUpdate,this),this.scene.events.off("postupdate",this.postUpdate,this))}setRecongizedStateObject(A){return this.recongizedState=A,this}get state(){return this.recongizedState.state}set state(A){this.recongizedState.state=A}cancel(){return this.state=Id,this}};const Dd=Phaser.Utils.Objects.GetValue,_d=Phaser.Math.Distance.Between;const Od="IDLE",kd="BEGIN",Gd="RECOGNIZED";var Hd=class extends Sd{constructor(A,t){super(A,t);var e=this,i={states:{IDLE:{enter:function(){e.stop(),e.tapsCount=0,e.x=0,e.y=0,e.worldX=0,e.worldY=0},exit:function(){var A=e.lastPointer;e.x=A.x,e.y=A.y,e.worldX=A.worldX,e.worldY=A.worldY}},BEGIN:{enter:function(){e.start(),e.tapsCount=0,e.emit("tappingstart",e,e.gameObject,e.lastPointer)}},RECOGNIZED:{enter:function(){e.start(),e.emit("tap",e,e.gameObject,e.lastPointer),e.emit(`${e.tapsCount}tap`,e,e.gameObject,e.lastPointer)}}},init:function(){this.state=Od},eventEmitter:!1};this.setRecongizedStateObject(new hu(i))}resetFromJSON(A){super.resetFromJSON(A),this.setMaxHoldTime(Dd(A,"time",250)),this.setTapInterval(Dd(A,"tapInterval",200)),this.setDragThreshold(Dd(A,"threshold",9)),this.setTapOffset(Dd(A,"tapOffset",10));var t=Dd(A,"taps",void 0);return void 0!==t?this.setTaps(t):(this.setMaxTaps(Dd(A,"maxTaps",void 0)),this.setMinTaps(Dd(A,"minTaps",void 0))),this}onDragStart(){switch(this.state){case Od:this.state=kd;break;case kd:var A=this.lastPointer;_d(A.upX,A.upY,A.x,A.y)>this.tapOffset&&(this.state=Gd,this.state=kd);break;case Gd:this.state=kd}}onDragEnd(){this.state===kd&&(this.tapsCount++,this.emit("tapping",this,this.gameObject,this.lastPointer),void 0!==this.maxTaps&&this.tapsCount===this.maxTaps&&(this.state=Gd))}onDrag(){this.state!==Od&&this.pointer.getDistance()>this.dragThreshold&&(this.state=Od)}preUpdate(A,t){if(this.state===kd){var e=this.lastPointer;if(e.isDown)A-e.downTime>this.holdTime&&(this.state=Od);else A-e.upTime>this.tapInterval&&(void 0===this.minTaps||this.tapsCount>=this.minTaps?this.state=Gd:this.state=Od)}}postUpdate(A,t){this.state===Gd&&(this.state=Od)}get isTapped(){return this.state===Gd}setMaxHoldTime(A){return this.holdTime=A,this}setTapInterval(A){return this.tapInterval=A,this}setDragThreshold(A){return this.dragThreshold=A,this}setTapOffset(A){return this.tapOffset=A,this}setMaxTaps(A){return this.maxTaps=A,this}setMinTaps(A){return this.minTaps=A,this}setTaps(A,t){return void 0===t&&(t=A),this.setMinTaps(A).setMaxTaps(t),this}};const Pd=Phaser.Utils.Objects.GetValue;var Rd=function(A,t){var e=Pd(t,"press",void 0);!1!==e&&(A._tap=new Hd(A,e),A._tap.on("tap",(function(A,t,e){var i=`cell.${A.tapsCount}tap`;fd(this.eventEmitter,i,A.gameObject,A.x,A.y,e)}),this))};const Nd=Phaser.Utils.Objects.GetValue;const Ld="IDLE",Xd="BEGIN",Ud="RECOGNIZED";var Yd=class extends Sd{constructor(A,t){super(A,t);var e=this,i={states:{IDLE:{enter:function(){e.x=0,e.y=0,e.worldX=0,e.worldY=0},exit:function(){var A=e.lastPointer;e.x=A.x,e.y=A.y,e.worldX=A.worldX,e.worldY=A.worldY}},BEGIN:{enter:function(){e.start()},exit:function(){e.stop()}},RECOGNIZED:{enter:function(){e.emit("pressstart",e,e.gameObject,e.lastPointer)},exit:function(){e.emit("pressend",e,e.gameObject,e.lastPointer)}}},init:function(){this.state=Ld},eventEmitter:!1};this.setRecongizedStateObject(new hu(i))}resetFromJSON(A){return super.resetFromJSON(A),this.setDragThreshold(Nd(A,"threshold",9)),this.setMinHoldTime(Nd(A,"time",251)),this}onDragStart(){this.state=0===this.holdTime?Ud:Xd}onDragEnd(){this.state=Ld}onDrag(){this.state!==Ld&&this.pointer.getDistance()>this.dragThreshold&&(this.state=Ld)}preUpdate(A,t){this.state===Xd&&(A-this.pointer.downTime>=this.holdTime&&(this.state=Ud))}get isPressed(){return this.state===Ud}setDragThreshold(A){return this.dragThreshold=A,this}setMinHoldTime(A){return this.holdTime=A,this}};const zd=Phaser.Utils.Objects.GetValue;var jd=function(A,t){var e=zd(t,"press",void 0);!1!==e&&(A._press=new Yd(A,e),A._press.on("pressstart",(function(t,e,i){fd(this.eventEmitter,"cell.pressstart",A,t.x,t.y,i)}),this).on("pressend",(function(t,e,i){fd(this.eventEmitter,"cell.pressend",A,t.x,t.y,i)}),this))};const Wd=Phaser.Math.Distance.Between,Zd=Phaser.Math.Angle.Between;var Vd={getDt:function(){return this.scene.sys.game.loop.delta},getVelocity:function(){var A=this.pointer.position,t=this.pointer.prevPosition;return Wd(t.x,t.y,A.x,A.y)/(.001*this.getDt())},getVelocityX:function(){var A=this.pointer.position,t=this.pointer.prevPosition;return Math.abs(A.x-t.x)/(.001*this.getDt())},getVelocityY:function(){var A=this.pointer.position,t=this.pointer.prevPosition;return Math.abs(A.y-t.y)/(.001*this.getDt())},getVelocityAngle:function(){var A=this.pointer.position,t=this.pointer.prevPosition;return Zd(t.x,t.y,A.x,A.y)}},Kd={"up&down":0,"left&right":1,"4dir":2,"8dir":3},Jd={},qd=function(A,t,e){switch(void 0===e?e={}:!0===e&&(e=Jd),e.left=!1,e.right=!1,e.up=!1,e.down=!1,A=(A+360)%360,t){case 0:A<180?e.down=!0:e.up=!0;break;case 1:A>90&&A<=270?e.left=!0:e.right=!0;break;case 2:A>45&&A<=135?e.down=!0:A>135&&A<=225?e.left=!0:A>225&&A<=315?e.up=!0:e.right=!0;break;case 3:A>22.5&&A<=67.5?(e.down=!0,e.right=!0):A>67.5&&A<=112.5?e.down=!0:A>112.5&&A<=157.5?(e.down=!0,e.left=!0):A>157.5&&A<=202.5?e.left=!0:A>202.5&&A<=247.5?(e.left=!0,e.up=!0):A>247.5&&A<=292.5?e.up=!0:A>292.5&&A<=337.5?(e.up=!0,e.right=!0):e.right=!0}return e};const $d=Phaser.Utils.Objects.GetValue,Ag=Phaser.Math.RadToDeg;class tg extends Sd{constructor(A,t){super(A,t);var e=this,i={states:{IDLE:{enter:function(){e.x=0,e.y=0,e.worldX=0,e.worldY=0},exit:function(){var A=e.lastPointer;e.x=A.x,e.y=A.y,e.worldX=A.worldX,e.worldY=A.worldY}},BEGIN:{enter:function(){e.validDrag=!1}},RECOGNIZED:{enter:function(){e.start(),e.updateDirectionStates(),e.emit("swipe",e,e.gameObject,e.lastPointer)},exit:function(){e.stop(),e.clearDirectionStates()}}},init:function(){this.state=eg},eventEmitter:!1};this.setRecongizedStateObject(new hu(i)),this.clearDirectionStates()}resetFromJSON(A){return super.resetFromJSON(A),this.setDragThreshold($d(A,"threshold",10)),this.setMinDragVelocity($d(A,"velocityThreshold",1e3)),this.setDirectionMode($d(A,"dir","8dir")),this}onDragStart(){this.state=ig}onDragEnd(){this.state=eg}onDrag(){this.state===ig&&(this.vaildDrag||(this.vaildDrag=0===this.dragThreshold||this.pointer.getDistance()>=this.dragThreshold),this.vaildDrag&&this.dragVelocity>this.minDragVelocity&&(this.state=sg))}postUpdate(A,t){this.state===sg&&(this.state=eg)}get isSwiped(){return this.state===sg}get dragVelocity(){var A;switch(this.dirMode){case 0:A=this.getVelocityY();break;case 1:A=this.getVelocityX();break;default:A=this.getVelocity()}return A}setDragThreshold(A){return this.dragThreshold=A,this}setMinDragVelocity(A){return this.minDragVelocity=A,this}setDirectionMode(A){return"string"==typeof A&&(A=Kd[A]),this.dirMode=A,this}updateDirectionStates(){var A=Ag(this.getVelocityAngle());return qd(A,this.dirMode,this),this}clearDirectionStates(){return this.left=!1,this.right=!1,this.up=!1,this.down=!1,this}}Object.assign(tg.prototype,Vd);const eg="IDLE",ig="BEGIN",sg="RECOGNIZED";var ng=tg;const rg=Phaser.Utils.Objects.GetValue;var og=function(A,t){var e=rg(t,"swipe",void 0);!1!==e&&(void 0===e&&(e={}),e.dir="4dir",A._swipe=new ng(A,e),A._swipe.on("swipe",(function(t,e,i){var s=t.left?"left":t.right?"right":t.up?"up":"down";fd(this.eventEmitter,`cell.swipe${s}`,A,t.x,t.y,i)}),this))},ag=function(A,t){A.setInteractive(),vd.call(this,A,t),wd.call(this,A,t),xd.call(this,A,t),Rd.call(this,A,t),jd.call(this,A,t),og.call(this,A,t)},hg=function(A){void 0===A?this.items.length=0:this.items=A;var t=this.childrenMap.child;return t.setCellsCount(this.items.length),t.updateTable(!0),this.resizeController(),this};const lg=Phaser.Utils.Objects.GetValue;class cg extends Mu{constructor(A,t){void 0===t&&(t={});var e=nu(t),i=lg(t,"table",void 0);void 0===i&&(i={}),i.scrollMode=e,i.clamplTableOXY=lg(t,"clamplChildOY",!1);var s,n,r=lg(i,"width",void 0),o=lg(i,"height",void 0),a=new dd(A,0,0,r,o,i);A.add.existing(a),0===e?(s=void 0===r?1:0,n=void 0===o):(s=void 0===o?1:0,n=void 0===r),gd(a),t.type="rexGridTable",t.child={gameObject:a,proportion:s,expand:n};var h=lg(t,"space",void 0);h&&(h.child=h.table),super(A,t),this.addChildrenMap("table",a),this.eventEmitter=lg(t,"eventEmitter",this);var l=lg(t,"createCellContainerCallback",fi),c=lg(t,"createCellContainerCallbackScope",void 0);this.setCreateCellContainerCallback(l,c),pd.call(this,a),lg(i,"interactive",!0)&&ag.call(this,a,i),this.setItems(lg(t,"items",[]))}setCreateCellContainerCallback(A,t){return this.createCellContainerCallback=A,this.createCellContainerCallbackScope=t,this}refresh(){return this.setItems(this.items),this}}var ug={setItems:hg};Object.assign(cg.prototype,ug);var dg=cg;Fe.register("gridTable",(function(A){var t=new dg(this.scene,A);return this.scene.add.existing(t),t})),Ze(window,"RexPlugins.UI.GridTable",dg);var gg=function(A,t){return t.orientation=A.orientation,t},pg={expandSubMenu:function(A,t){var e;this.collapseSubMenu(),e=this.root.toggleOrientation?0===this.orientation?1:0:this.orientation;var i=new this.constructor(this.scene,{items:t,orientation:e,createBackgroundCallback:this.root.createBackgroundCallback,createBackgroundCallbackScope:this.root.createBackgroundCallbackScope,createButtonCallback:this.root.createButtonCallback,createButtonCallbackScope:this.root.createButtonCallbackScope,easeIn:this.root.easeIn,easeOut:this.root.easeOut,_rootMenu:this.root,_parentMenu:this,_parentButton:A});return this.pin(i),this.childrenMap.subMenu=i,this.root.emit("expand",i,A,this),this},collapse:function(){return this.root.emit("collapse",this,this.parentButton,this.parentMenu),this.scaleDownDestroy(gg(this,this.root.easeOut)),this.collapseSubMenu(),this},collapseSubMenu:function(){if(void 0===this.childrenMap.subMenu)return this;var A=this.childrenMap.subMenu;return this.childrenMap.subMenu=void 0,this.remove(A),A.collapse(),this}},fg=function(A,t,e,i){var s;return e&&(t.scene=A,s=i?e.call(i,t):e(t),t.scene=void 0),s},vg=function(A,t,e,i){var s,n,r=[];if(t&&e)for(var o=0,a=t.length;o=this.pageCount-1}setText(A,t){return void 0===t&&(t=!0),this.text=Qg(A),0===this.textObjectType?this.lines=this.gameObject.getWrappedText(this.text):this.lines=this.gameObject.getPenManager(this.text,this.lines),this.pageCount=Math.ceil(this.totalLinesCount/this.pageLinesCount),t&&this.resetPageIdx(),this}appendText(A){return this.setText(this.text.concat(Qg(A))),this}getPage(A){return void 0===A&&(A=this.pageIndex),this.setPageIdx(A).getLines()}getNextPage(){return this.getPage(this.pageIndex+1)}getPreviousPage(){return this.getPage(this.pageIndex-1)}showPage(A){return this.displayText(this.getPage()),this}showNextPage(){return this.displayText(this.getNextPage()),this}showPreviousPage(){return this.displayText(this.getPreviousPage()),this}show(){return this.displayText(this.getLines()),this}showNextLine(){return this.displayText(this.setStartIdx(this.startLineIdx+1).getLines()),this}showPreviousLine(){return this.displayText(this.setStartIdx(this.startLineIdx-1).getLines()),this}setStartIdx(A){return A=Tg(A,0,this.totalLinesCount-1),this.startLineIdx=A,this}resetPageIdx(){this.pageIndex=-1}setPageIdx(A){return A=Tg(A,0,this.pageCount-1),this.pageIndex=A,this.setStartIdx(this.pageIndex*this.pageLinesCount),this}get totalLinesCount(){return 0===this.textObjectType?this.lines.length:this.lines.linesCount}get pageLinesCount(){var A=this.gameObject.style.maxLines;return A>0?A:this.totalLinesCount}getLines(A){void 0===A&&(A=this.startLineIdx);var t,e=A+this.pageLinesCount;if(0===this.textObjectType)t=this.lines.slice(A,e).join("\n");else{var i=this.lines.getLineStartIndex(A),s=this.lines.getLineEndIndex(e-1);t=this.lines.getSliceTagText(i,s,!0)}return t}displayText(A){this.gameObject.setText(A)}};const Fg=Phaser.Utils.Objects.GetFastValue,Mg=Phaser.Utils.Objects.GetValue;class Ig{constructor(A,t){this.gameObject=A,this.scene=Bo(A),this.setEventEmitter(Mg(t,"eventEmitter",void 0)),this.timer=null,this.resetFromJSON(t),this.boot()}resetFromJSON(A){this.setTypeMode(Mg(A,"typeMode",0)),this.setTypeSpeed(Mg(A,"speed",333)),this.setTextCallback=Fg(A,"setTextCallback",null),this.setTextCallbackScope=Fg(A,"setTextCallbackScope",null),this.typingIdx=Fg(A,"typingIdx",0),this.text=Sg(Fg(A,"text","")),this.textLen=Fg(A,"textLen",0),this.insertIdx=Fg(A,"insertIdx",null);var t=Fg(A,"elapsed",null);return null!==t&&this.start(void 0,void 0,this.typingIdx,t),this}toJSON(){var A,t=this.getTimer();return A=t?t.elapsed:null,{typeMode:this.typeMode,speed:this.speed,setTextCallback:this.setTextCallback,setTextCallbackScope:this.setTextCallbackScope,typingIdx:this.typingIdx,text:this.text,textLen:this.textLen,insertIdx:this.insertIdx,elapsed:A}}boot(){return this.gameObject.once&&this.gameObject.on("destroy",this.destroy,this),this}shutdown(){return this.destroyEventEmitter(),this.freeTimer(),this.gameObject=void 0,this.scene=void 0,this}destroy(){return this.shutdown(),this}setTypeMode(A){return"string"==typeof A&&(A=Dg[A]),this.typeMode=A,this}setTypeSpeed(A){return this.speed=A,this}get isTyping(){return null!==this.getTimer()}get isLastChar(){return this.typingIdx===this.textLen}start(A,t,e,i){return void 0!==A&&this.setTypingContent(A),void 0!==t&&(this.speed=t),void 0===e&&(e=0),this.typingIdx=e+1,0===this.speed?this.stop(!0):this.startTimer(i),this}appendText(A){var t=this.text.concat(Sg(A));return this.isTyping?this.setTypingContent(t):this.start(t,void 0,this.textLen),this}stop(A){return this.getTimer()&&this.freeTimer(),A&&(this.typingIdx=this.textLen,this.setText(this.text),this.emit("type"),this.emit("complete",this,this.gameObject)),this}pause(){var A=this.getTimer();return A&&(A.paused=!0),this}resume(){var A=this.getTimer();return A&&(A.paused=!1),this}setTypingContent(A){return this.text=Sg(A),this.textLen=this.getTextLength(this.text),this}onTyping(){var A=this.getTypingString(this.text,this.typingIdx,this.textLen,this.typeMode);this.setText(A),this.emit("type"),this.isLastChar?(this.freeTimer(),this.emit("complete",this,this.gameObject)):(this.timer.delay=this.speed,this.typingIdx++)}getTypingString(A,t,e,i){var s;if(0===i){var n=0,r=t;this.insertIdx=r,s=this.getSubString(A,n,r)}else if(1===i){n=(r=e)-t;this.insertIdx=0,s=this.getSubString(A,n,r)}else if(2===i){var o=e/2;r=(n=Math.floor(o-t/2))+t;this.insertIdx=t%2?t:0,s=this.getSubString(A,n,r)}else if(3===i){var a,h=Math.floor(t/2);if(h>0){n=(r=e)-h;a=this.getSubString(A,n,r)}else a="";var l,c=t-h;if(c>0){r=(n=0)+c;this.insertIdx=r,l=this.getSubString(A,n,r)}else l="",this.insertIdx=0;s=l+a}return s}startTimer(A){var t;return this.timer&&this.freeTimer(),void 0===A?(0,t=0):(this.speed,t=A),this.timer=this.scene.time.addEvent({delay:0,startAt:t,loop:!0,callback:this.onTyping,callbackScope:this}),this}getTimer(){return this.timer}freeTimer(){return this.timer&&(this.timer.remove(),this.timer=null),this}setText(A){this.setTextCallback&&(A=this.setTextCallbackScope?this.setTextCallback.call(this.setTextCallbackScope,A,this.isLastChar,this.insertIdx):this.setTextCallback(A,this.isLastChar,this.insertIdx)),this.gameObject.setText(A)}getTextLength(A){var t=this.gameObject;return t.getPlainText?t.getPlainText(A).length:A.length}getSubString(A,t,e){var i=this.gameObject;return i.getSubString?i.getSubString(A,t,e):A.slice(t,e)}}Object.assign(Ig.prototype,yo);var Sg=function(A){return Array.isArray(A)?A=A.join("\n"):"number"==typeof A&&(A=A.toString()),A};const Dg={"left-to-right":0,"right-to-left":1,"middle-to-sides":2,"sides-to-middle":3};var _g=Ig;const Og=Phaser.Utils.Objects.GetValue;var kg=function(A){return A.add.text(0,0,"",{wordWrap:{width:200},maxLines:5})},Gg=class extends pl{constructor(A,t){void 0===t&&(t={text:kg(A)}),super(A,t),this.type="rexTextBox";var e=this.childrenMap.text;this.page=new Eg(e,Og(t,"page",void 0)),this.typing=new _g(e,Og(t,"type",void 0)),this.typing.on("complete",this.onPageEnd,this).on("type",this.onType,this),this.textWidth=e.width,this.textHeight=e.height}start(A,t){return this.page.setText(A),void 0!==t&&this.typing.setTypeSpeed(t),this.typeNextPage(),this}typeNextPage(){if(this.page.isLastPage)this.emit("complete");else{var A=this.page.getNextPage();this.typing.start(A)}return this}pause(){return this.typing.pause(),this}resume(){return this.typing.resume(),this}stop(A){return this.typing.stop(A),this}get isTyping(){return this.typing.isTyping}get isLastPage(){return this.page.isLastPage}get isFirstPage(){return this.page.isFirstPage}get pageCount(){return this.page.pageCount}get pageIndex(){return this.page.pageIndex}onType(){var A=this.childrenMap.text;this.textWidth===A.width&&this.textHeight===A.height||(this.textWidth=A.width,this.textHeight=A.height,this.getTopmostSizer().layout()),this.emit("type")}onPageEnd(){this.emit("pageend")}};Fe.register("textBox",(function(A){var t=new Gg(this.scene,A);return this.scene.add.existing(t),t})),Ze(window,"RexPlugins.UI.TextBox",Gg);const Hg=Phaser.Utils.Objects.GetValue,Pg=Phaser.Math.Percent,Rg=Phaser.Math.Linear;class Ng extends Za{constructor(A,t){super(A,t),this.type="rexNumberBar";var e,i=Hg(t,"background",void 0),s=Hg(t,"icon",void 0),n=Hg(t,"iconMask",void 0),r=Hg(t,"slider",void 0),o=Hg(t,"text",void 0),a=Hg(t,"space.icon",0),h=Hg(t,"space.slider",0);(i&&this.addBackground(i),s)&&(0===this.orientation?(r||o)&&(l={right:a}):(r||o)&&(l={bottom:a}),this.add(s,0,"center",l),n&&(n=this.addChildMask(s,s,1)));if(r){var l,c;if(r.orientation=this.orientation,r.eventEmitter=this,r.value=null,r.hasOwnProperty("input")||(r.input=-1),e=new eu(A,r),0===this.orientation?o&&(l={right:h}):o&&(l={bottom:h}),0===this.orientation)c=void 0===Hg(r,"width",void 0)?1:0;else c=void 0===Hg(r,"height",void 0)?1:0;this.add(e,c,"center",l)}o&&this.add(o),this.addChildrenMap("background",i),this.addChildrenMap("icon",s),this.addChildrenMap("iconMask",n),this.addChildrenMap("slider",e),this.addChildrenMap("text",o);var u=Hg(t,"valuechangeCallback",null);if(null!==u){var d=Hg(t,"valuechangeCallbackScope",void 0);this.on("valuechange",u,d)}this.setEnable(Hg(t,"enable",void 0)),this.setValue(Hg(t,"value",0))}setEnable(A){return this.childrenMap.slider?this:(void 0===A&&(A=!0),this.childrenMap.slider.enable=A,this)}get value(){return this.childrenMap.slider?this.childrenMap.slider.value:0}set value(A){this.childrenMap.slider&&(this.childrenMap.slider.value=A)}setValue(A,t,e){return void 0!==t&&(A=Pg(A,t,e)),this.value=A,this}addValue(A,t,e){return void 0!==t&&(A=Pg(A,t,e)),this.value+=A,this}getValue(A,t){var e=this.value;return void 0!==A&&(e=Rg(A,t,e)),e}get text(){var A=this.childrenMap.text;return void 0===A?"":A.text?A.text:A.getData("text")}set text(A){var t=this.childrenMap.text;void 0!==t&&(t.setText?t.setText(A):t.setData("text",A))}setText(A){return this.text=A,this}}var Lg={addChildMask:cl};Object.assign(Ng.prototype,Lg);var Xg=Ng;Fe.register("numberBar",(function(A){var t=new Xg(this.scene,A);return this.scene.add.existing(t),t})),Ze(window,"RexPlugins.UI.NumberBar",Xg);var Ug=function(A,t,e,i,s){return A.setVisible(!1),this.add(A,t,e,i,s),this},Yg=function(A){return void 0===A?null:this.sizerChildren.hasOwnProperty(A)?this.sizerChildren[A]:null};const zg=In.prototype.setChildVisible;var jg={addPage:Ug,getPage:Yg,swapPage:function(A){this._previousKey=this._currentKey;var t=this.previousPage;t&&(0===this.swapMode?(zg.call(this,t,!1),this.emit("pageinvisible",t,this._previousKey,this)):t.destroy()),A&&!this.sizerChildren.hasOwnProperty(A)&&this.emit("createpage",A,this),this._currentKey=A;var e=this.currentPage;return e&&(zg.call(this,e,!0),this.emit("pagevisible",e,this._currentKey,this)),this}};const Wg=Phaser.Utils.Objects.GetValue;class Zg extends ol{constructor(A,t){super(A,t),this.type="rexPages",this.childrenMap=this.sizerChildren,this._previousKey=void 0,this._currentKey=void 0,this.setSwapMode(Wg(t,"swapMode",0))}setSwapMode(A){return"string"==typeof A&&(A=Vg[A]),this.swapMode=A,this}get previousKey(){return this._previousKey}get currentKey(){return this._currentKey}set currentKey(A){this.swapPage(A)}get currentPage(){return this.getPage(this.currentKey)}get previousPage(){return this.getPage(this.previousKey)}get keys(){return Object.keys(this.sizerChildren)}}Object.assign(Zg.prototype,jg);const Vg={invisible:0,destroy:1};var Kg=Zg;Fe.register("pages",(function(A){var t=new Kg(this.scene,A);return this.scene.add.existing(t),t})),Ze(window,"RexPlugins.UI.Pages",Kg);const Jg=Phaser.Display.Align.TOP_LEFT;var qg=function(A){return(A-this.textLineSpacing)/(this.textLineHeight+this.textLineSpacing)},$g=function(A){return A*(this.textLineHeight+this.textLineSpacing)-this.textLineSpacing},Ap=function(A){var t,e=A+this.textObject.style.maxLines;if(0===this.textObjectType)t=this.lines.slice(A,e).join("\n");else{var i=this.lines.getLineStartIndex(A),s=this.lines.getLineEndIndex(e-1);t=this.lines.getSliceTagText(i,s,!0)}return t},tp=function(){var A=this.textObject.rexSizer;this.textObject.y+=A.offsetY-A.preOffsetY,A.preOffsetY=A.offsetY,this.resetChildPositionState(this.textObject)},ep=function(A,t,e){if(e+=this.textLineHeight+this.textLineSpacing,A.width!==t||A.height!==e){A.setFixedSize(t,e);var i=A.style,s=Math.max(t,0),n=Math.ceil(qg.call(this,e))+1;0===this.textObjectType?(i.wordWrapWidth=s,i.maxLines=n):(i.wrapWidth=s,i.maxLines=n),this.setText()}},ip={addChildMask:cl,setTextObject:function(A,t){void 0===t&&(t=!0),this.add(A);var e=this.getSizerConfig(A);return e.align=Jg,e.padding=qr(0),e.expand=!0,this.textObject=A,this.textObjectType=Cg(A)?0:1,e.preOffsetY=0,e.offsetY=0,t&&(this.textMask=this.addChildMask(this.textObject,this)),this},setText:function(A){return void 0!==A&&(this.text=A),0===this.textObjectType?this.lines=this.textObject.getWrappedText(this.text):this.lines=this.textObject.getPenManager(this.text,this.lines),this.updateTextObject(),this},updateTextObject:function(){var A=Math.max(Math.floor(qg.call(this,-this.textOY)),0),t=$g.call(this,A)+this.textOY;return this.textObject.setText(Ap.call(this,A)),this.textObject.rexSizer.offsetY=t,tp.call(this),this},layout:function(A,t,e){if(this.rexSizer.hidden||!this.dirty)return this;var i,s,n;this.preLayout(A),void 0===t&&(t=this.minWidth),void 0===e&&(e=this.minHeight),this.resize(t,e);var r,o,a,h,l=this.left,c=this.top;return(i=this.textObject).rexSizer.hidden||(r=l+(n=(s=i.rexSizer).padding).left,o=c+n.top,a=this.width-n.left-n.right,h=this.height-n.top-n.bottom,ep.call(this,i,a,h),yr.setPosition(r,o).setSize(a,h),zr(i,yr,s.align),s.preOffsetY=0,tp.call(this),this.textMask&&(this.textMask.setPosition().resize(),this.resetChildPositionState(this.textMask))),this.layoutBackgrounds(),this.postLayout()}};const sp=Phaser.Utils.Objects.IsPlainObject,np=Phaser.Utils.Objects.GetValue;class rp extends xa{constructor(A,t,e,i,s,n){sp(t)?(t=np(n=t,"x",0),e=np(n,"y",0),i=np(n,"width",void 0),s=np(n,"height",void 0)):sp(i)&&(i=np(n=i,"width",void 0),s=np(n,"height",void 0)),super(A,t,e,i,s,n),this.type="rexTextBlock",this.textObject=void 0,this.textMask=void 0,this.textObjectType=void 0,this.lines=void 0,this.text=np(n,"content",""),this._textOY=0,this.execeedTopState=!1,this.execeedBottomState=!1,this.setClampMode(np(n,"clamplTextOY",!0));var r=np(n,"background",void 0),o=np(n,"text",void 0);void 0===o&&(o=op(A));var a=np(n,"textMask",!0);r&&this.addBackground(r),this.setTextObject(o,a),this.addChildrenMap("background",r),this.addChildrenMap("text",o)}destroy(A){this.scene&&(this.textObject=void 0,this.textMask=void 0,void 0===this.lines||(0===this.textObjectType?this.lines.length=0:this.lines.destroy()),super.destroy(A))}setClampMode(A){return this.clampTextOYMode=A,this}get textLineHeight(){var A=this.textObject.style;return A.metrics.fontSize+A.strokeThickness}get textLineSpacing(){return this.textObject.lineSpacing}get linesCount(){return void 0===this.lines?0:0===this.textObjectType?this.lines.length:this.lines.linesCount}get visibleLinesCount(){return Math.floor(qg.call(this,this.textObject.height))}get topTextOY(){return 0}get bottomTextOY(){return-this.textVisibleHeight}get textHeight(){return $g.call(this,this.linesCount)}get textObjectHeight(){return this.textObject.height-this.textLineHeight-this.textLineSpacing}get textVisibleHeight(){var A=this.textHeight,t=this.textObjectHeight;return A>t?A-t:0}textOYExceedTop(A){return void 0===A&&(A=this.textOY),A>this.topTextOY}textOYExeceedBottom(A){return void 0===A&&(A=this.textOY),Athis.linesCount?A=0:i?A=t:s&&(A=e)),this._textOY!==A&&(this._textOY=A,this.updateTextObject()),i&&(this.execeedTopState||this.emit("execeedtop",this,A,t)),this.execeedTopState=i,s&&(this.execeedBottomState||this.emit("execeedbottom",this,A,e)),this.execeedBottomState=s}setTextOY(A){return this.textOY=A,this}set t(A){this.textOY=-this.textVisibleHeight*A}get t(){var A=this.textVisibleHeight;return 0===A?0:this.textOY/-A}setTextOYByPercentage(A){return this.t=A,this}}var op=function(A){return A.add.text(0,0,"")};Object.assign(rp.prototype,ip);var ap=rp;Fe.register("textBlock",(function(A,t,e,i,s,n){var r=new ap(this.scene,A,t,e,i,s,n);return this.scene.add.existing(r),r})),Ze(window,"RexPlugins.UI.TextBlock",ap);var hp=function(A){Object.defineProperty(A,"childOY",{configurable:!0,get:function(){return A.textOY},set:function(t){A.textOY=t}}),Object.defineProperty(A,"topChildOY",{get:function(){return A.topTextOY}}),Object.defineProperty(A,"bottomChildOY",{get:function(){return A.bottomTextOY}})},lp=function(A){return this.childrenMap.child.setText(A),this.resizeController(),this},cp=function(A){return this.setText(this.text+A),this};const up=Phaser.Utils.Objects.GetValue;class dp extends Mu{constructor(A,t){void 0===t&&(t={});var e=up(t,"text",void 0),i=up(t,"textWidth",void 0),s=up(t,"textHeight",void 0),n=up(t,"textMask",!0),r=up(t,"content",""),o=new ap(A,{width:i,height:s,text:e,textMask:n,content:r,clamplTextOY:up(t,"clamplChildOY",!1)});A.add.existing(o);var a=void 0===i?1:0,h=void 0===s;hp(o),t.scrollMode=0,t.type="rexTextArea",t.child={gameObject:o,proportion:a,expand:h};var l=up(t,"space",void 0);l&&(l.child=l.text),super(A,t),this.addChildrenMap("text",e)}get text(){return this.childrenMap.child.text}get linesCount(){return this.childrenMap.child.linesCount}}var gp={setText:lp,appendText:cp};Object.assign(dp.prototype,gp);var pp=dp;Fe.register("textArea",(function(A){var t=new pp(this.scene,A);return this.scene.add.existing(t),t})),Ze(window,"RexPlugins.UI.TextArea",pp);const fp=Phaser.Utils.Objects.GetValue,vp=Phaser.Display.Align.TOP_LEFT;const yp={update:0,everyTick:1};var mp={addChildMask:cl,enableChildrenMask(A){var t=this.addChildMask(null,this,0,A);return this.childrenMask=t.createGeometryMask(),this},maskChildren(A){return void 0===A&&(A=this.getAllChildren()),zu(this,this.childrenMask,A),this},layoutChildrenMask(){if(void 0===this.childrenMask)return this;var A=Gu(this.childrenMask);return A.setPosition().resize(),this.resetChildPositionState(A),this}},wp={setChild:function(A,t,e){A.setOrigin&&A.setOrigin(0),this.add(A);var i,s,n,r=this.getSizerConfig(A);return r.align=vp,r.expand=t,this.child=A,!0===e?(i=!0,s=0,n=0):!1===e?i=!1:(i=fp(e,"mask",!0),s=fp(e,"padding",0),n=fp(r,"updateMode",0)),this.maskUpdateMode=n,i&&("string"==typeof n&&(n=yp[n]),1===n&&this.scene.game.events.on("poststep",this.maskChildren,this),this.enableChildrenMask(s)),this},getChildrenWidth:function(){if(this.rexSizer.hidden)return 0;var A=this.child;return A.rexSizer.hidden?0:0===this.scrollMode?A.isRexSizer?Math.max(A.minWidth,A.childrenWidth):wr(A):0},getChildrenHeight:function(){if(this.rexSizer.hidden)return 0;var A=this.child;return A.rexSizer.hidden?0:0===this.scrollMode?0:A.isRexSizer?Math.max(A.minHeight,A.childrenHeight):Br(A)},getChildrenSizers:function(A){return void 0===A&&(A=[]),this.child&&this.child.isRexSizer&&A.push(this.child),A},resetChildPosition:function(){var A=this.left,t=this.top;0===this.scrollMode?t+=this.childOY:A+=this.childOY,this.child.setPosition(A,t),this.resetChildPositionState(this.child),0===this.maskUpdateMode&&this.maskChildren()},layout:function(A,t,e){if(this.rexSizer.hidden||!this.dirty)return this;this.preLayout(A),void 0===t&&(t=Math.max(this.childrenWidth,this.minWidth)),void 0===e&&(e=Math.max(this.childrenHeight,this.minHeight)),this.resize(t,e);var i,s,n=this.child;return n.rexSizer.hidden||(0===this.scrollMode?i=this.width:s=this.height,n.isRexSizer?n.layout(this,i,s):pa(n,i,s),this.layoutChildrenMask(),this.resetChildPosition()),this.postLayout()}};Object.assign(wp,mp);var Bp=wp;const xp=Phaser.Utils.Objects.IsPlainObject,Cp=Phaser.Utils.Objects.GetValue;class bp extends xa{constructor(A,t,e,i,s,n){xp(t)?(t=Cp(n=t,"x",0),e=Cp(n,"y",0),i=Cp(n,"width",void 0),s=Cp(n,"height",void 0)):xp(i)&&(i=Cp(n=i,"width",void 0),s=Cp(n,"height",void 0)),super(A,t,e,i,s,n),this.type="rexScrollableBlock",this.child=void 0,this.childrenMask=void 0,this._childOY=0,this.execeedTopState=!1,this.execeedBottomState=!1,this.setScrollMode(Cp(n,"scrollMode",!0)),this.setClampMode(Cp(n,"clamplChildOY",!0));var r=Cp(n,"child",void 0),o=Cp(n,"expand",!0),a=Cp(n,"mask",void 0);this.setChild(r,o,a)}destroy(A){this.scene&&(1===this.maskUpdateMode&&this.scene.game.events.off("poststep",this.maskChildren,this),this.child=void 0,this.childrenMask&&(this.childrenMask.destroy(),this.childrenMask=void 0),super.destroy(A))}setScrollMode(A){return"string"==typeof A&&(A=iu[A.toLowerCase()]),this.scrollMode=A,this}setClampMode(A){return this.clampChildOYMode=A,this}get instHeight(){return 0===this.scrollMode?this.height:this.width}get instWidth(){return 0===this.scrollMode?this.width:this.height}get childHeight(){return 0===this.scrollMode?Br(this.child):wr(this.child)}get childWidth(){return 0===this.scrollMode?wr(this.child):Br(this.child)}get topChildOY(){return 0}get bottomChildOY(){return-this.visibleHeight}get visibleHeight(){var A=this.childHeight,t=this.instHeight;return A>t?A-t:0}childOYExceedTop(A){return void 0===A&&(A=this.childOY),A>this.topChildOY}childOYExeceedBottom(A){return void 0===A&&(A=this.childOY),Athis.childHeight?A=0:i?A=t:s&&(A=e)),this._childOY!==A&&(this._childOY=A,this.resetChildPosition()),i&&(this.execeedTopState||this.emit("execeedtop",this,A,t)),this.execeedTopState=i,s&&(this.execeedBottomState||this.emit("execeedbottom",this,A,e)),this.execeedBottomState=s}setChildOY(A){return this.childOY=A,this}set t(A){this.childOY=-this.visibleHeight*A}get t(){var A=this.visibleHeight;return 0===A?0:this.childOY/-A}setChildOYByPercentage(A){return this.t=A,this}}Object.assign(bp.prototype,Bp);var Tp=bp;Fe.register("scrollableBlock",(function(A){var t=new Tp(this.scene,A);return this.scene.add.existing(t),t})),Ze(window,"RexPlugins.UI.ScrollableBlock",Tp);const Qp=Phaser.Utils.Objects.GetValue;var Ep=class extends Mu{constructor(A,t){void 0===t&&(t={});var e=nu(t),i=Qp(t,"panel",void 0);void 0===i&&(i={}),i.scrollMode=e,i.clamplChildOY=Qp(t,"clamplChildOY",!1);var s=new Tp(A,i);A.add.existing(s);var n,r,o=Qp(i,"width",void 0),a=Qp(i,"height",void 0);0===e?(n=void 0===o?1:0,r=void 0===a):(n=void 0===a?1:0,r=void 0===o),t.type="rexScrollablePanel",t.child={gameObject:s,proportion:n,expand:r};var h=Qp(t,"space",void 0);h&&(h.child=h.panel),super(A,t),this.addChildrenMap("panel",this.childrenMap.child.child)}};Fe.register("scrollablePanel",(function(A){var t=new Ep(this.scene,A);return this.scene.add.existing(t),t})),Ze(window,"RexPlugins.UI.ScrollablePanel",Ep);var Fp={popUp:0,fadeIn:1,scaleDown:0,fadeOut:1},Mp={popUp:function(A,t){A.popUp(t)},scaleDown:function(A,t){A.scaleDown(t)},fadeIn:function(A,t){A.fadeIn(t)},fadeOut:function(A,t){A.fadeOut(t)}},Ip=function(A,t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length),A.length=i-e;for(var s=0,n=A.length;s=0;n--)i=Op(A[n],t,e);else for(var n=0,r=A.length;ni?1:ethis.now)return this;for(;;){var e=this.commands[this.index],i=e[1];if(bn(i)||(i=Ip(Rp,e,1)),Hp(i,this.scope),this.emit("runcommand",i,this.scope),this.index===this.commands.length-1)return this.complete(),this;if(this.index++,this.nextDt=this.getNextDt(this.nextDt),this.nextDt>this.now)return this}}complete(){super.complete(),this.state=2}getNextDt(A){var t=this.commands[this.index][0];return 1===this.timeUnit&&(t*=1e3),1===this.dtMode&&(t+=A),t}setDtMode(A){return"string"==typeof A&&(A=Lp[A]),this.dtMode=A,this}setTimeUnit(A){return"string"==typeof A&&(A=Np[A]),this.timeUnit=A,this}};const Up=Phaser.Utils.Objects.GetValue;var Yp=class extends pl{constructor(A,t){void 0===t&&(t={text:createDefaultTextObject(A)}),super(A,t),this.type="rexToast",this.setTransitInTime(Up(t,"duration.in",200)),this.setDisplayTime(Up(t,"duration.hold",1200)),this.setTransitOutTime(Up(t,"duration.out",200)),this.setTransitInCallback(Up(t,"transitIn",Fp.popUp)),this.setTransitOutCallback(Up(t,"transitOut",Fp.scaleDown)),this.player=new Xp(this,{dtMode:1}),this.messages=[],this.setVisible(!1)}destroy(A){this.scene&&(this.player.destroy(),this.player=void 0,this.messages=void 0,super.destroy(A))}setDisplayTime(A){return this.displayTime=A,this}setTransitOutTime(A){return this.transitOutTime=A,this}setTransitInTime(A){return this.transitInTime=A,this}setTransitInCallback(A){switch("string"==typeof A&&(A=Fp[A]),A){case Fp.popUp:A=Mp.popUp;break;case Fp.fadeIn:A=Mp.fadeIn}return this.transitInCallback=A,this}setTransitOutCallback(A){switch("string"==typeof A&&(A=Fp[A]),A){case Fp.scaleDown:A=Mp.scaleDown;break;case Fp.fadeOut:A=Mp.fadeOut}return this.transitOutCallback=A,this}show(A){if(void 0===A){if(0===this.messages.length)return this;A=this.messages.shift()}if(this.player.isPlaying)return this.messages.push(A),this;this.setScale(1,1).setVisible(!0),"string"==typeof A?this.setText(A):A(this),this.layout();var t=[[0,[this.transitInCallback,this,this.transitInTime]],[this.transitInTime,[fi]],[this.displayTime,[this.transitOutCallback,this,this.transitOutTime]],[this.transitOutTime,[this.setVisible,!1]],[30,[fi]]];return this.player.load(t,this).once("complete",(function(){this.show()}),this).start(),this}};Fe.register("toast",(function(A){var t=new Yp(this.scene,A);return this.scene.add.existing(t),t})),Ze(window,"RexPlugins.UI.Toast",Yp);var zp={showChild(A,t){var e=this.sizerChildren[A];return e&&(this.emit("showchild",e,A,this,t),this.resetChildState(e)),this},hideChild(A,t){var e=this.sizerChildren[A];return e&&(this.emit("hidechild",e,A,this,t),this.resetChildState(e)),this},swapChild(A,t){return this.currentChildKey===A||("panel"===this.currentChildKey||"panel"===A?(this.previousChildKey=this.currentChildKey,this.currentChildKey=A,this.hideChild(this.previousChildKey,t),this.showChild(this.currentChildKey,t)):(this.swapChild("panel",t),this.swapChild(A,t))),this},showPanel(A){return this.swapChild("panel",A),this},showLeftSide(){return this.swapChild("leftSide"),this},showRightSide(){return this.swapChild("rightSide"),this},showTopSide(){return this.swapChild("topSide"),this},showBottomSide(){return this.swapChild("bottomSide"),this},hideLeftSide(){return"leftSide"==this.currentChildKey&&this.showPanel(),this},hideRightSide(){return"rightSide"==this.currentChildKey&&this.showPanel(),this},hideTopSide(){return"topSide"==this.currentChildKey&&this.showPanel(),this},hideBottomSide(){return"bottomSide"==this.currentChildKey&&this.showPanel(),this},toggleLeftSide(){var A="panel"!==this.currentChildKey?"panel":"leftSide";return this.swapChild(A),this},toggleRightSide(){var A="panel"!==this.currentChildKey?"panel":"rightSide";return this.swapChild(A),this},toggleTopSide(){var A="panel"!==this.currentChildKey?"panel":"topSide";return this.swapChild(A),this},toggleBottomSide(){var A="panel"!==this.currentChildKey?"panel":"bottomSide";return this.swapChild(A),this}},jp=function(A,t){if(Array.isArray(A))return A.indexOf(t);for(var e in A)if(A[e]===t)return e;return null};const Wp=In.prototype.setChildVisible;var Zp={setChildVisible(A,t){if("string"==typeof A){var e=A;A=this.sizerChildren[e]}else e=jp(this.sizerChildren,A);return void 0===t&&(t=this.currentChildKey===e),Wp.call(this,A,t),this}},Vp={fadeChild(A,t,e){var i;return"string"==typeof A?(i=A,A=this.sizerChildren[i]):i=jp(this.sizerChildren,A),void 0===t&&(t=500),void 0===e&&(e=this.currentChildKey===i?1:0),A.fadeIn(t,{start:A.alpha,end:e}),this},fadeChildPromise(A,t,e){return"string"==typeof A&&(A=this.sizerChildren[key]),this.fadeChild(A,t,e),A._fade?ko(A._fade):Promise.resolve()}},Kp={moveChild(A,t,e,i){var s;"string"==typeof A?(s=A,A=this.sizerChildren[s]):s=jp(this.sizerChildren,A),void 0===t&&(t=500);var n,r,o,a,h=this.currentChildKey===s;if(void 0===i)switch(s){case"leftSide":case"rightSide":i=wr(A);break;case"topSide":case"bottomSide":i=Br(A);break;default:if(h){var l=this.sizerChildren[this.previousChildKey];switch(this.previousChildKey){case"leftSide":case"rightSide":i=wr(l);break;case"topSide":case"bottomSide":i=Br(l)}}else{var c=this.sizerChildren[this.currentChildKey];switch(this.currentChildKey){case"leftSide":case"rightSide":i=wr(c);break;case"topSide":case"bottomSide":i=Br(c)}}}if(h)switch(s){case"panel":switch(this.previousChildKey){case"leftSide":n=!0;break;case"rightSide":r=!0;break;case"topSide":o=!0;break;case"bottomSide":a=!0}break;case"leftSide":r=!0;break;case"rightSide":n=!0;break;case"topSide":a=!0;break;case"bottomSide":o=!0}else switch(s){case"panel":switch(this.currentChildKey){case"leftSide":r=!0;break;case"rightSide":n=!0;break;case"topSide":a=!0;break;case"bottomSide":o=!0}break;case"leftSide":n=!0;break;case"rightSide":r=!0;break;case"topSide":o=!0;break;case"bottomSide":a=!0}return n?A.moveTo(t,`-=${i}`,void 0,e):r?A.moveTo(t,`+=${i}`,void 0,e):o?A.moveTo(t,void 0,`-=${i}`,e):a&&A.moveTo(t,void 0,`+=${i}`,e),this},moveChildPromise(A,t,e,i){return"string"==typeof A&&(A=this.sizerChildren[key]),this.moveChild(A,t,e,i),A._easeMove?ko(A._easeMove):Promise.resolve()}},Jp={};Object.assign(Jp,Zp,Vp,Kp);var qp=Jp;const $p=Phaser.Utils.Objects.GetValue;class Af extends ol{constructor(A,t){super(A,t),this.type="rexSides",this.childrenMap=this.sizerChildren,this.previousChildKey=void 0,this.currentChildKey=void 0;var e=$p(t,"showChildCallback",void 0),i=$p(t,"showChildCallbackScope",void 0),s=$p(t,"hideChildCallback",void 0),n=$p(t,"hideChildCallbackScope",void 0);e&&this.on("showchild",e,i),s&&this.on("hidechild",s,n);var r=$p(t,"background",void 0),o=$p(t,"panel",void 0),a=$p(t,"leftSide",void 0),h=$p(t,"rightSide",void 0),l=$p(t,"topSide",void 0),c=$p(t,"bottomSide",void 0);if(r&&this.addBackground(r),o&&this.add(o,"panel","center",0,!0),a){var u=$p(t,"expand.left",!0);this.add(a,"leftSide","left-top",0,{height:u})}if(h){u=$p(t,"expand.right",!0);this.add(h,"rightSide","right-top",0,{height:u})}if(l){u=$p(t,"expand.top",!0);this.add(l,"topSide","left-top",0,{width:u})}if(c){u=$p(t,"expand.bottom",!0);this.add(c,"bottomSide","left-bottom",0,{width:u})}this.currentChildKey="panel",this.showChild("panel"),this.hideChild("leftSide"),this.hideChild("rightSide"),this.hideChild("topSide"),this.hideChild("bottomSide")}}Object.assign(Af.prototype,zp,qp);var tf=Af;Fe.register("sides",(function(A){var t=new tf(this.scene,A);return this.scene.add.existing(t),t})),Ze(window,"RexPlugins.UI.Sides",tf);Fe.register("click",(function(A,t){return Co(A)||(t=A,A=this.scene),new wl(A,t)})),Ze(window,"RexPlugins.UI.Click",wl);Fe.register("tap",(function(A,t){return Co(A)||(t=A,A=this.scene),new Hd(A,t)})),Ze(window,"RexPlugins.UI.Tap",Hd);Fe.register("press",(function(A,t){return Co(A)||(t=A,A=this.scene),new Yd(A,t)})),Ze(window,"RexPlugins.UI.Press",Yd);Fe.register("swipe",(function(A,t){return Co(A)||(t=A,A=this.scene),new ng(A,t)})),Ze(window,"RexPlugins.UI.Swipe",ng);const ef=Phaser.Utils.Objects.GetValue;const sf="IDLE",nf="BEGIN",rf="RECOGNIZED";var of=class extends Sd{constructor(A,t){super(A,t);var e=this,i={states:{IDLE:{},BEGIN:{enter:function(){var A=e.pointer;e.startX=A.x,e.startY=A.y,e.startWorldX=A.worldX,e.startWorldY=A.worldY}},RECOGNIZED:{enter:function(){e.emit("panstart",e,e.gameObject,e.lastPointer)},exit:function(){var A=e.lastPointer;e.endX=A.x,e.endY=A.y,e.endWorldX=A.worldX,e.endWorldY=A.worldY,e.emit("panend",e,e.gameObject,e.lastPointer)}}},init:function(){this.state=sf},eventEmitter:!1};this.setRecongizedStateObject(new hu(i))}resetFromJSON(A){return super.resetFromJSON(A),this.setDragThreshold(ef(A,"threshold",10)),this}onDragStart(){this.state=0===this.dragThreshold?rf:nf}onDragEnd(){this.state=sf}onDrag(){switch(this.state){case nf:this.pointer.getDistance()>=this.dragThreshold&&(this.state=rf);break;case rf:var A=this.pointer.position,t=this.pointer.prevPosition;this.dx=A.x-t.x,this.dy=A.y-t.y;var e=this.pointer;this.x=e.x,this.y=e.y,this.worldX=e.worldX,this.worldY=e.worldY,this.emit("pan",this,this.gameObject,this.lastPointer)}}get isPan(){return this.state===rf}setDragThreshold(A){return this.dragThreshold=A,this}};Fe.register("pan",(function(A,t){return Co(A)||(t=A,A=this.scene),new of(A,t)})),Ze(window,"RexPlugins.UI.Pan",of);const af=Phaser.Utils.Objects.GetValue,hf=Phaser.Utils.Array.SpliceOne,lf=Phaser.Math.Distance.Between,cf=Phaser.Math.Angle.Between;class uf{constructor(A,t){var e=A.input.manager.pointersTotal-1;e<2&&A.input.addPointer(2-e),this.scene=A,this.setEventEmitter(af(t,"eventEmitter",void 0)),this._enable=void 0,this.pointers=[],this.movedState={},this.resetFromJSON(t),this.boot()}resetFromJSON(A){return this.setEnable(af(A,"enable",!0)),this.bounds=af(A,"bounds",void 0),this.tracerState=gf,this.pointers.length=0,gi(this.movedState),this}boot(){this.scene.input.on("pointerdown",this.onPointerDown,this),this.scene.input.on("pointerup",this.onPointerUp,this),this.scene.input.on("pointermove",this.onPointerMove,this),this.scene.events.once("shutdown",this.destroy,this)}shutdown(){this.destroyEventEmitter(),this.pointers.length=0,gi(this.movedState),this.scene&&(this.scene.input.off("pointerdown",this.onPointerDown,this),this.scene.input.off("pointerup",this.onPointerUp,this),this.scene.input.off("pointermove",this.onPointerMove,this),this.scene.events.off("destroy",this.destroy,this),this.scene=void 0),this.scene=void 0}destroy(){this.shutdown()}get enable(){return this._enable}set enable(A){if(this._enable!==A)return A||this.dragCancel(),this._enable=A,this}setEnable(A){return void 0===A&&(A=!0),this.enable=A,this}toggleEnable(){return this.setEnable(!this.enable),this}onPointerDown(A){if(this.enable&&(2!==this.pointers.length&&(!this.bounds||this.bounds.contains(A.x,A.y))&&-1===this.pointers.indexOf(A)))switch(this.movedState[A.id]=!1,this.pointers.push(A),this.tracerState){case gf:this.tracerState=pf,this.onDrag1Start();break;case pf:this.tracerState=ff,this.onDrag2Start()}}onPointerUp(A){if(this.enable&&(!this.bounds||this.bounds.contains(A.x,A.y))){var t=this.pointers.indexOf(A);if(-1!==t)switch(delete this.movedState[A.id],hf(this.pointers,t),this.tracerState){case pf:this.tracerState=gf,this.onDrag1End();break;case ff:this.tracerState=pf,this.onDrag2End(),this.onDrag1Start()}}}onPointerMove(A){if(this.enable&&A.isDown){var t=!this.bounds||this.bounds.contains(A.x,A.y),e=-1!==this.pointers.indexOf(A);if(!e&&t);else if(e&&!t)this.onPointerUp(A);else if(this.movedState[A.id]||(this.movedState[A.id]=A.x!==A.downX||A.y!==A.downY),this.movedState[A.id])switch(this.tracerState){case pf:this.onDrag1();break;case ff:this.onDrag2()}}}dragCancel(){return this.tracerState===ff&&this.onDrag2End(),this.pointers.length=0,gi(this.movedState),this.tracerState=gf,this}onDrag1Start(){this.emit("drag1start",this)}onDrag1End(){this.emit("drag1end",this)}onDrag1(){this.emit("drag1",this)}onDrag2Start(){this.emit("drag2start",this)}onDrag2End(){this.emit("drag2end",this)}onDrag2(){this.emit("drag2",this)}get distanceBetween(){if(this.tracerState!==ff)return 0;var A=this.pointers[0],t=this.pointers[1];return lf(A.x,A.y,t.x,t.y)}get angleBetween(){if(this.tracerState!==ff)return 0;var A=this.pointers[0],t=this.pointers[1];return cf(A.x,A.y,t.x,t.y)}get drag1Vector(){var A=this.pointers[0];if(A&&this.movedState[A.id]){var t=A.position,e=A.prevPosition;df.x=t.x-e.x,df.y=t.y-e.y}else df.x=0,df.y=0;return df}get centerX(){if(this.tracerState!==ff)return 0;var A=this.pointers[0].position,t=this.pointers[1].position;return(A.x+t.x)/2}get centerY(){if(this.tracerState!==ff)return 0;var A=this.pointers[0].position,t=this.pointers[1].position;return(A.y+t.y)/2}get prevCenterX(){if(this.tracerState!==ff)return 0;var A=this.movedState[this.pointers[0].id]?this.pointers[0].prevPosition:this.pointers[0].position,t=this.movedState[this.pointers[1].id]?this.pointers[1].prevPosition:this.pointers[1].position;return(A.x+t.x)/2}get prevCenterY(){if(this.tracerState!==ff)return 0;var A=this.movedState[this.pointers[0].id]?this.pointers[0].prevPosition:this.pointers[0].position,t=this.movedState[this.pointers[1].id]?this.pointers[1].prevPosition:this.pointers[1].position;return(A.y+t.y)/2}get movementCenterX(){return this.centerX-this.prevCenterX}get movementCenterY(){return this.centerY-this.prevCenterY}setRecongizedStateObject(A){return this.recongizedState=A,this}get state(){return this.recongizedState.state}set state(A){this.recongizedState.state=A}cancel(){return this.state=vf,this}}Object.assign(uf.prototype,yo);var df={};const gf=0,pf=1,ff=2,vf="IDLE";var yf=uf;const mf=Phaser.Utils.Objects.GetValue;const wf="IDLE",Bf="BEGIN",xf="RECOGNIZED";var Cf=class extends yf{constructor(A,t){super(A,t);var e=this,i={states:{IDLE:{enter:function(){e.prevDistance=void 0,e.scaleFactor=1}},BEGIN:{},RECOGNIZED:{enter:function(){e.emit("pinchstart",e)},exit:function(){e.emit("pinchend",e)}}},init:function(){this.state=wf},eventEmitter:!1};this.setRecongizedStateObject(new hu(i))}resetFromJSON(A){return super.resetFromJSON(A),this.setDragThreshold(mf(A,"threshold",0)),this}onDrag2Start(){this.scaleFactor=1,this.prevDistance=this.distanceBetween,this.state=0===this.dragThreshold?xf:Bf}onDrag2End(){this.state=wf}onDrag2(){switch(this.state){case Bf:if(this.pointers[0].getDistance()>=this.dragThreshold&&this.pointers[1].getDistance()>=this.dragThreshold){var A=this.distanceBetween;this.scaleFactor=A/this.prevDistance,this.prevDistance=A,this.state=xf}break;case xf:A=this.distanceBetween;this.scaleFactor=A/this.prevDistance,this.emit("pinch",this),this.prevDistance=A}}get isPinch(){return this.state===xf}setDragThreshold(A){return this.dragThreshold=A,this}};Fe.register("pinch",(function(A){return new Cf(this.scene,A)})),Ze(window,"RexPlugins.UI.Pinch",Cf);const bf=Phaser.Math.RotateAround;var Tf=function(A,t,e,i){return bf(A,t,e,i),A.rotation+=i,A},Qf={},Ef=function(A,t){if(!this.isRotation)return this;void 0===t&&(t=this.pointers[0].camera);var e=this.movementCenterX,i=this.movementCenterY;t.getWorldPoint(this.centerX,this.centerY,Qf);var s=Qf.x,n=Qf.y,r=this.rotation;if(Array.isArray(A))for(var o=A,a=0,h=o.length;a=this.dragThreshold&&this.pointers[1].getDistance()>=this.dragThreshold){var A=Mf(Sf(this.angleBetween));this.angle=If(this.prevAngle,A),this.prevAngle=A,this.state=Hf}break;case Hf:A=Mf(Sf(this.angleBetween));this.angle=If(this.prevAngle,A),this.prevAngle=A,this.emit("rotate",this)}}get isRotation(){return this.state===Hf}get rotation(){return Df(this.angle)}setDragThreshold(A){return this.dragThreshold=A,this}}var Of={spinObject:Ef};Object.assign(_f.prototype,Of);const kf="IDLE",Gf="BEGIN",Hf="RECOGNIZED";var Pf=_f;Fe.register("rotate",(function(A){return new Pf(this.scene,A)})),Ze(window,"RexPlugins.UI.Rotate",Pf);const Rf=Phaser.Utils.Objects.IsPlainObject,Nf=Phaser.Utils.Objects.GetValue;var Lf=function(A,t,e){var i;if(void 0===A)A=e.texture.key,t=e.frame.name;else if(Rf(A)){var s=A;A=Nf(s,"key",e.texture.key),t=Nf(s,"frame",e.frame.name)}else"string"==typeof A||(i=A);return void 0===i&&(i=function(e){e.setTexture(A,t)}),i};const Xf=Phaser.Utils.Objects.GetValue,Uf=Phaser.Utils.Objects.GetAdvancedValue;const Yf={x:0,horizontal:0,y:1,vertical:1},zf={front:0,back:1};var jf=class extends Qo{constructor(A,t){super(A,{eventEmitter:!0}),this.gameObject=A,this.resetFromJSON(t)}resetFromJSON(A){return this.setOrientation(Xf(A,"orientation",0)),this.setDelay(Uf(A,"delay",0)),this.setDuration(Uf(A,"duration",500)),this.setEase(Xf(A,"ease","Sine")),this.setFrontFace(Xf(A,"front",void 0)),this.setBackFace(Xf(A,"back",void 0)),this.setFace(Xf(A,"face",0)),this}shutdown(){return super.shutdown(),this.gameObject=void 0,this}setOrientation(A){return"string"==typeof A&&(A=Yf[A]),this.orientation=A,this}setDelay(A){return this.delay=A,this}setDuration(A){return this.duration=A,this}setEase(A){return void 0===A&&(A="Linear"),this.ease=A,this}get face(){return this._face}set face(A){"string"==typeof A&&(A=zf[A]),this._face=A,0===A&&this.frontFaceCallback?this.frontFaceCallback(this.gameObject):1===A&&this.backFaceCallback&&this.backFaceCallback(this.gameObject)}setFace(A){return this.face=A,this}toggleFace(){var A=0===this.face?1:0;return this.setFace(A),this}setFrontFace(A,t){return this.frontFaceCallback=Lf(A,t,this.gameObject),this}setBackFace(A,t){return this.backFaceCallback=Lf(A,t,this.gameObject),this}start(){if(this.isRunning)return this;var A={targets:this.gameObject,delay:this.delay,duration:this.duration/2,ease:this.ease,yoyo:!0,repeat:0,onYoyo:this.toggleFace,onYoyoScope:this};return A[0===this.orientation?"scaleX":"scaleY"]={start:1,to:0},super.start(A),this}flip(A){return this.isRunning?this:(void 0!==A&&this.setDuration(A),this.start(),this)}};Fe.register("flip",(function(A,t){return new jf(A,t)})),Ze(window,"RexPlugins.UI.Flip",jf);const Wf=tn,Zf=en;var Vf=function(A,t){if(this.scene.scale.autoRound&&(A=Math.floor(A),t=Math.floor(t)),this.width===A&&this.height===t)return this;var e=this.node.style;return e.width=`${A}px`,e.height=`${t}px`,this.updateSize(),this};const Kf=Phaser.Utils.Objects.GetValue;var Jf=function(A,t,e){var i,s;for(var n in void 0===e&&(e={}),A)i=A[n],void 0!==(s=Kf(t,n,i[1]))&&(e[i[0]]=s);return e},qf=function(A,t,e){for(let i in e)t[e[i]]=function(t){A.emit(i,A,t)}},$f=function(A){A.stopPropagation()},Av=function(A){A.addEventListener("touchstart",$f,!1),A.addEventListener("touchmove",$f,!1),A.addEventListener("touchend",$f,!1),A.addEventListener("mousedown",$f,!1),A.addEventListener("mouseup",$f,!1),A.addEventListener("mousemove",$f,!1)};const tv=Phaser.GameObjects.DOMElement,ev=Phaser.Utils.Objects.IsPlainObject,iv=Phaser.Utils.Objects.GetValue;class sv extends tv{constructor(A,t,e,i,s,n){var r;ev(t)?(t=iv(n=t,"x",0),e=iv(n,"y",0),i=iv(n,"width",0),s=iv(n,"height",0)):ev(i)&&(i=iv(n=i,"width",0),s=iv(n,"height",0)),void 0===n&&(n={});var o=iv(n,"type","text");"textarea"===o?(r=document.createElement("textarea")).style.resize="none":(r=document.createElement("input")).type=o,Jf(rv,n,r);var a=iv(n,"style",void 0);a=Jf(ov,n,a);var h=r.style;for(var l in n)l in rv||l in ov||l in h&&(a[l]=n[l]);a["box-sizing"]="border-box",super(A,t,e,r,a),this.type="rexInputText",this.resize(i,s),qf(this,r,av),Av(r)}get text(){return this.node.value}set text(A){this.node.value=A}setText(A){return this.text=A,this}selectText(){return this.node.select(),this}get placeholder(){return this.node.placeholder}set placeholder(A){this.node.placeholder=A}setPlaceholder(A){return this.placeholder=A,this}get tooltip(){return this.node.title}set tooltip(A){this.node.title=A}setTooltip(A){return this.tooltip=A,this}setTextChangedCallback(A){return this.onTextChanged=A,this}get readOnly(){return this.node.readOnly}set readOnly(A){this.node.readOnly=A}setReadOnly(A){return void 0===A&&(A=!0),this.readOnly=A,this}get spellCheck(){return this.node.spellcheck}set spellCheck(A){this.node.spellcheck=A}setSpellCheck(A){return this.spellCheck=A,this}setStyle(A,t){return this.node.style[A]=t,this}getStyle(A){return this.node.style[A]}scrollToBottom(){return this.node.scrollTop=this.node.scrollHeight,this}setEnabled(A){return void 0===A&&(A=!0),this.node.disabled=!A,this}setBlur(){return this.node.blur(),this}setFocus(){return this.node.focus(),this}}var nv={resize:Vf};Object.assign(sv.prototype,nv);const rv={id:["id",void 0],text:["value",void 0],placeholder:["placeholder",void 0],tooltip:["title",void 0],readOnly:["readonly",!1],spellCheck:["spellcheck",!1],autoComplete:["autocomplete","off"]},ov={align:["textAlign",void 0],paddingLeft:["padding-left",void 0],paddingRight:["padding-right",void 0],paddingTop:["padding-top",void 0],paddingBottom:["padding-bottom",void 0],fontFamily:["fontFamily",void 0],fontSize:["font-size",void 0],color:["color","#ffffff"],backgroundColor:["backgroundColor","transparent"],border:["border",0],borderColor:["borderColor","transparent"],outline:["outline","none"]},av={textchange:"oninput",click:"onclick",dblclick:"ondblclick",focus:"onfocus",blur:"onblur"};var hv=sv;const lv=Phaser.Utils.Objects.GetValue;var cv=function(A){return A.hasOwnProperty("align")?A.align:A.hasOwnProperty("halign")?A.halign:"left"},uv=function(A,t){void 0===t&&(t={});var e=A.scene,i=A.style,s=lv(t,"backgroundColor",i.backgroundColor);null===s&&(s="transparent"),t.text=lv(t,"text",A.text),t.fontFamily=lv(t,"fontFamily",i.fontFamily),t.fontSize=lv(t,"fontSize",i.fontSize),t.color=lv(t,"color",i.color),t.backgroundColor=s,t.align=lv(t,"align",cv(i));var n=new hv(e,A.x,A.y,lv(t,"width",A.width),lv(t,"height",A.height),t);return n.setOrigin(A.originX,A.originY),e.add.existing(n),n};const dv=Phaser.Utils.Objects.GetValue;var gv=void 0,pv=class{constructor(A){this.gameObject=A,this.scene=Bo(A),this.inputText=void 0,this.onClose=void 0,this.delayCall=void 0,this.boot()}boot(){return this.gameObject.on("destroy",this.destroy,this),this}shutdown(){return this.close(),this.gameObject=void 0,this.scene=void 0,gv===this&&(gv=void 0),this}destroy(){return this.shutdown(),this}open(A,t){void 0!==gv&&gv.close(),gv=this,aa(A)&&(t=A,A=void 0),void 0===t&&(t=dv(A,"onClose",void 0));var e=dv(A,"onTextChanged",void 0);return this.inputText=uv(this.gameObject,A).on("textchange",(function(A){var t=A.text;e?e(this.gameObject,t):this.gameObject.text=t}),this).setFocus(),this.gameObject.setVisible(!1),this.onClose=t,this.scene.input.keyboard.once("keydown-ENTER",this.close,this),this.delayCall=this.scene.time.delayedCall(0,(function(){this.scene.input.once("pointerdown",this.close,this)}),[],this),this}close(){return gv=void 0,this.inputText?(this.gameObject.setVisible(!0),this.inputText.destroy(),this.inputText=void 0,this.delayCall&&(this.delayCall.remove(),this.delayCall=void 0),this.scene.input.keyboard.off("keydown-ENTER",this.close,this),this.scene.input.off("pointerdown",this.close,this),this.onClose&&this.onClose(this.gameObject),this):this}get isOpened(){return void 0!==this.inputText}get text(){return this.isOpened?this.inputText.text:this.gameObject.text}},fv=function(A,t,e){return A._edit||(A._edit=new pv(A)),A._edit.open(t,e),A._edit},vv=function(A,t,e){for(var i,s=0,n=A.length;s + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) + * @author Richard Davey + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @author Richard Davey + * @author Igor Ognichenko + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @author Richard Davey + * @author Benjamin D. Richards + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @author Vladimir Agafonkin + * @author Richard Davey + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @author Stefan Hedman (http://steffe.se) + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @author Joachim Grill + * @copyright 2018 CodeAndWeb GmbH + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** +* @author Richard Davey +* @copyright 2019 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ + +/** + * @author Richard Davey + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +/** + * @author Richard Davey + * @author samme + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2019 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ diff --git a/c421d9fd6c9875f06fab244e186ce434.png b/c421d9fd6c9875f06fab244e186ce434.png new file mode 100644 index 0000000..afe3603 Binary files /dev/null and b/c421d9fd6c9875f06fab244e186ce434.png differ diff --git a/d7b2cdbbdfbf4919ce03260b66049cb2.png b/d7b2cdbbdfbf4919ce03260b66049cb2.png new file mode 100644 index 0000000..da978e6 Binary files /dev/null and b/d7b2cdbbdfbf4919ce03260b66049cb2.png differ diff --git a/e7657c30dcbcf34db521e0c7cbceca30.png b/e7657c30dcbcf34db521e0c7cbceca30.png new file mode 100644 index 0000000..300cfca Binary files /dev/null and b/e7657c30dcbcf34db521e0c7cbceca30.png differ diff --git a/ea41e747666a6a5bb8e29cbc972bb679.png b/ea41e747666a6a5bb8e29cbc972bb679.png new file mode 100644 index 0000000..ba7db0a Binary files /dev/null and b/ea41e747666a6a5bb8e29cbc972bb679.png differ diff --git a/ec8d77fb551dffa2065945f1f99c5b66.png b/ec8d77fb551dffa2065945f1f99c5b66.png new file mode 100644 index 0000000..0392831 Binary files /dev/null and b/ec8d77fb551dffa2065945f1f99c5b66.png differ diff --git a/fb612a88f65bf10a58e586f55f10aad3.png b/fb612a88f65bf10a58e586f55f10aad3.png new file mode 100644 index 0000000..6e813ea Binary files /dev/null and b/fb612a88f65bf10a58e586f55f10aad3.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..5de8d0b --- /dev/null +++ b/index.html @@ -0,0 +1,23 @@ + + + + + + + Cave Knight + + + + + diff --git a/service-worker.js b/service-worker.js new file mode 100644 index 0000000..d011b18 --- /dev/null +++ b/service-worker.js @@ -0,0 +1 @@ +if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let a=Promise.resolve();return s[e]||(a=new Promise(async a=>{if("document"in self){const s=document.createElement("script");s.src=e,document.head.appendChild(s),s.onload=a}else importScripts(e),a()})),a.then(()=>{if(!s[e])throw new Error(`Module ${e} didn’t register its module`);return s[e]})},a=(a,s)=>{Promise.all(a.map(e)).then(e=>s(1===e.length?e[0]:e))},s={require:Promise.resolve(a)};self.define=(a,c,r)=>{s[a]||(s[a]=Promise.resolve().then(()=>{let s={};const i={uri:location.origin+a.slice(1)};return Promise.all(c.map(a=>{switch(a){case"exports":return s;case"module":return i;default:return e(a)}})).then(e=>{const a=r(...e);return s.default||(s.default=a),s})}))}}define("./service-worker.js",["./workbox-468c4d03"],(function(e){"use strict";e.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"01efafb864feb60208e1cd71a545ce00.png",revision:"01efafb864feb60208e1cd71a545ce00"},{url:"0bcd83143261c0a12103908403ab437a.png",revision:"0bcd83143261c0a12103908403ab437a"},{url:"1a03110a67b89df2c217b7e4c91e4aef.mp3",revision:"1a03110a67b89df2c217b7e4c91e4aef"},{url:"34a968f73d567460c4c1dc89b5658b30.png",revision:"34a968f73d567460c4c1dc89b5658b30"},{url:"39b196d6c491ec1bb78ddedae45ce123.mp3",revision:"39b196d6c491ec1bb78ddedae45ce123"},{url:"3f43f7578333e8272a01a6a27dd17c8b.png",revision:"3f43f7578333e8272a01a6a27dd17c8b"},{url:"42f8d92ec87c7046930da5f608c376dd.png",revision:"42f8d92ec87c7046930da5f608c376dd"},{url:"45a2298129bcfd24ffb095f2444431fe.wav",revision:"45a2298129bcfd24ffb095f2444431fe"},{url:"4ebfea37834b4e57bedd9a0823e3db24.png",revision:"4ebfea37834b4e57bedd9a0823e3db24"},{url:"57225412cf84217bdea1e218e91e1780.png",revision:"57225412cf84217bdea1e218e91e1780"},{url:"5b450ce20bbc035bff390b0eb936a933.png",revision:"5b450ce20bbc035bff390b0eb936a933"},{url:"5e3e3e4c6b263be8f167c2f2349f3f77.png",revision:"5e3e3e4c6b263be8f167c2f2349f3f77"},{url:"64d379f79b50136fc991a5f8ab2689fb.wav",revision:"64d379f79b50136fc991a5f8ab2689fb"},{url:"86c9fa3c40f594e5e7ba8637e2150e1c.wav",revision:"86c9fa3c40f594e5e7ba8637e2150e1c"},{url:"8e75f7a1669bc7773727751ba64bce2e.png",revision:"8e75f7a1669bc7773727751ba64bce2e"},{url:"970da3601d02d25a0fcd3ac13c0526ec.png",revision:"970da3601d02d25a0fcd3ac13c0526ec"},{url:"9cf53335254a36669230a361f24fc911.wav",revision:"9cf53335254a36669230a361f24fc911"},{url:"a13f8ec2470d5290133a3722479c1a8d.png",revision:"a13f8ec2470d5290133a3722479c1a8d"},{url:"a514e7faf4994c8b31087696e2c2104f.png",revision:"a514e7faf4994c8b31087696e2c2104f"},{url:"assets/android-chrome-144x144.png",revision:"b83aaeb68a5d305521b381001c0cceca"},{url:"assets/android-chrome-192x192.png",revision:"887dffad6de1a5698bba0e0524c77439"},{url:"assets/android-chrome-256x256.png",revision:"e166f3cd967c211d048ed1f84d80d3b2"},{url:"assets/android-chrome-36x36.png",revision:"498a13047e4615607c0fa492f20a37ca"},{url:"assets/android-chrome-384x384.png",revision:"7f6d9e8bfe5acca8b0af38fe1ea2bbb2"},{url:"assets/android-chrome-48x48.png",revision:"e7ba3fde82770b577e3880246c294a49"},{url:"assets/android-chrome-512x512.png",revision:"815dc9b2724d52b6adbe40170051a7d2"},{url:"assets/android-chrome-72x72.png",revision:"1efe273b073c3c187467a13fdb4cb8a6"},{url:"assets/android-chrome-96x96.png",revision:"d3a1b683259d23fb063541872bee2277"},{url:"assets/apple-touch-icon-1024x1024.png",revision:"d5df3d68a87bcb4775d9976baff46670"},{url:"assets/apple-touch-icon-114x114.png",revision:"92951468793a0e0e14866ea799ddef6e"},{url:"assets/apple-touch-icon-120x120.png",revision:"693d945dd90db5f239f6a527ebe76cd7"},{url:"assets/apple-touch-icon-144x144.png",revision:"b83aaeb68a5d305521b381001c0cceca"},{url:"assets/apple-touch-icon-152x152.png",revision:"50b9f0ea9b46e717c9524cd4e63ece78"},{url:"assets/apple-touch-icon-167x167.png",revision:"51f97f34fe1e4f1cc5e69ec66142a43d"},{url:"assets/apple-touch-icon-180x180.png",revision:"496912cabd4ca9e946a7e24c4557513c"},{url:"assets/apple-touch-icon-57x57.png",revision:"0a953f595b340f126edc67b1e82e69c9"},{url:"assets/apple-touch-icon-60x60.png",revision:"adaaf02a9629daa913b66967eebde36a"},{url:"assets/apple-touch-icon-72x72.png",revision:"1efe273b073c3c187467a13fdb4cb8a6"},{url:"assets/apple-touch-icon-76x76.png",revision:"b626c9e41185be3a7b602ab23ffe5669"},{url:"assets/apple-touch-icon-precomposed.png",revision:"496912cabd4ca9e946a7e24c4557513c"},{url:"assets/apple-touch-icon.png",revision:"496912cabd4ca9e946a7e24c4557513c"},{url:"assets/apple-touch-startup-image-1125x2436.png",revision:"0c784d62a88709e73f2098a56203ddce"},{url:"assets/apple-touch-startup-image-1136x640.png",revision:"8b0a8d73760931b1fd96a357e49a778e"},{url:"assets/apple-touch-startup-image-1242x2208.png",revision:"78741417913fc45f94b7e5c9b1acdd91"},{url:"assets/apple-touch-startup-image-1242x2688.png",revision:"c564e09fa22b3168ee9575c5321d0091"},{url:"assets/apple-touch-startup-image-1334x750.png",revision:"04c6dcb0606341c9df87306cf829536f"},{url:"assets/apple-touch-startup-image-1536x2048.png",revision:"4a1e3e8ec318208b27b40f8e48c9b229"},{url:"assets/apple-touch-startup-image-1620x2160.png",revision:"9f33c7af78a3fb0736f983c615738fd8"},{url:"assets/apple-touch-startup-image-1668x2224.png",revision:"fe6162df1be49c612117b4d0cf5bd707"},{url:"assets/apple-touch-startup-image-1668x2388.png",revision:"4c5e0c4bc96207241ef9f73458bb5ebc"},{url:"assets/apple-touch-startup-image-1792x828.png",revision:"6a99f4e2f9eed4dc8d74f6a22bc83d81"},{url:"assets/apple-touch-startup-image-2048x1536.png",revision:"d55783d13e63bed0321a86fc7692ff9d"},{url:"assets/apple-touch-startup-image-2048x2732.png",revision:"6a51ac39b019c43b9c2c6fcc89a7ed1c"},{url:"assets/apple-touch-startup-image-2160x1620.png",revision:"5d710ad5bc3af143e06b36f5201769cf"},{url:"assets/apple-touch-startup-image-2208x1242.png",revision:"22e286eb2d655f80adf36fd965a725f0"},{url:"assets/apple-touch-startup-image-2224x1668.png",revision:"91ed7bb48d12a4dc27e53b2a0582efea"},{url:"assets/apple-touch-startup-image-2388x1668.png",revision:"84dbb187257753bf6eb4d5e7049cfc5d"},{url:"assets/apple-touch-startup-image-2436x1125.png",revision:"cf013bb859b4c46cf1db0bd2a08ce224"},{url:"assets/apple-touch-startup-image-2688x1242.png",revision:"b8bbdafc7564c111b2e3f39a68e6c19d"},{url:"assets/apple-touch-startup-image-2732x2048.png",revision:"60ebf5e1a4ff3556b298fcadbe5c1d74"},{url:"assets/apple-touch-startup-image-640x1136.png",revision:"dacbe9216aaee5d08bf578fd6e12c1ae"},{url:"assets/apple-touch-startup-image-750x1334.png",revision:"72f47c1716ecd53f258f0d716c50cb63"},{url:"assets/apple-touch-startup-image-828x1792.png",revision:"2d83dda3a442a374d481f0dda5b7cca3"},{url:"assets/browserconfig.xml",revision:"c963c752b7288b2b87b16118441d5f2c"},{url:"assets/coast-228x228.png",revision:"86359789fffdf4386b2f9f6c6b60e8cd"},{url:"assets/favicon-16x16.png",revision:"834bbdfa47028c3faff8ec4b0ee25221"},{url:"assets/favicon-32x32.png",revision:"3babfde76d39cb1ed4b6c83a5dc99db3"},{url:"assets/favicon-48x48.png",revision:"e7ba3fde82770b577e3880246c294a49"},{url:"assets/favicon.ico",revision:"60ba54f18c30ae750087024a83ce4d57"},{url:"assets/firefox_app_128x128.png",revision:"8c3569c51bd4616623868b4a23c93686"},{url:"assets/firefox_app_512x512.png",revision:"30bd749d8f434144c79724c768f7bf4a"},{url:"assets/firefox_app_60x60.png",revision:"af234e127634934600e59ddbc4fce3a6"},{url:"assets/manifest.json",revision:"43eaad825ec7959078b75d7ba35d1aa7"},{url:"assets/manifest.webapp",revision:"bdfa6d9f3ec5740c310976e0c863bf5d"},{url:"assets/mstile-144x144.png",revision:"b83aaeb68a5d305521b381001c0cceca"},{url:"assets/mstile-150x150.png",revision:"ca120362f8afa56dd49ffb49b4c0976d"},{url:"assets/mstile-310x150.png",revision:"52ff0ff93544696d36da342bb74a6d29"},{url:"assets/mstile-310x310.png",revision:"575bd12a1fdb59a68502dcb4df91e2e7"},{url:"assets/mstile-70x70.png",revision:"78f0ad1d708360fb4ef07af467a00480"},{url:"assets/yandex-browser-50x50.png",revision:"83077f346a9e39bd4055bf43d126d2f9"},{url:"assets/yandex-browser-manifest.json",revision:"09bc7ae1d521a76099f670aa992a2040"},{url:"b0dcc8fb8552c16e86043956856d304f.png",revision:"b0dcc8fb8552c16e86043956856d304f"},{url:"bundle.min.js.LICENSE",revision:"0bf0afe03f085374c7b612acd1075f35"},{url:"c421d9fd6c9875f06fab244e186ce434.png",revision:"c421d9fd6c9875f06fab244e186ce434"},{url:"d7b2cdbbdfbf4919ce03260b66049cb2.png",revision:"d7b2cdbbdfbf4919ce03260b66049cb2"},{url:"e7657c30dcbcf34db521e0c7cbceca30.png",revision:"e7657c30dcbcf34db521e0c7cbceca30"},{url:"ea41e747666a6a5bb8e29cbc972bb679.png",revision:"ea41e747666a6a5bb8e29cbc972bb679"},{url:"ec8d77fb551dffa2065945f1f99c5b66.png",revision:"ec8d77fb551dffa2065945f1f99c5b66"},{url:"fb612a88f65bf10a58e586f55f10aad3.png",revision:"fb612a88f65bf10a58e586f55f10aad3"},{url:"index.html",revision:"2cb580309d7a1eb51c6b5e84cbfb86e6"}],{})})); diff --git a/workbox-468c4d03.js b/workbox-468c4d03.js new file mode 100644 index 0000000..ca9d2bf --- /dev/null +++ b/workbox-468c4d03.js @@ -0,0 +1 @@ +define("./workbox-468c4d03.js",["exports"],(function(e){"use strict";try{self["workbox:core:5.1.3"]&&_()}catch(e){}const t={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},n=e=>[t.prefix,e,t.suffix].filter(e=>e&&e.length>0).join("-"),s=e=>e||n(t.precache),i=e=>new URL(String(e),location.href).href.replace(new RegExp("^"+location.origin),""),c=(e,...t)=>{let n=e;return t.length>0&&(n+=" :: "+JSON.stringify(t)),n};class o extends Error{constructor(e,t){super(c(e,t)),this.name=e,this.details=t}}const r=new Set;const a=(e,t)=>e.filter(e=>t in e),u=async({request:e,mode:t,plugins:n=[]})=>{const s=a(n,"cacheKeyWillBeUsed");let i=e;for(const e of s)i=await e.cacheKeyWillBeUsed.call(e,{mode:t,request:i}),"string"==typeof i&&(i=new Request(i));return i},l=async({cacheName:e,request:t,event:n,matchOptions:s,plugins:i=[]})=>{const c=await self.caches.open(e),o=await u({plugins:i,request:t,mode:"read"});let r=await c.match(o,s);for(const t of i)if("cachedResponseWillBeUsed"in t){const i=t.cachedResponseWillBeUsed;r=await i.call(t,{cacheName:e,event:n,matchOptions:s,cachedResponse:r,request:o})}return r},h=async({cacheName:e,request:t,response:n,event:s,plugins:c=[],matchOptions:h})=>{const f=await u({plugins:c,request:t,mode:"write"});if(!n)throw new o("cache-put-with-no-response",{url:i(f.url)});const w=await(async({request:e,response:t,event:n,plugins:s=[]})=>{let i=t,c=!1;for(const t of s)if("cacheWillUpdate"in t){c=!0;const s=t.cacheWillUpdate;if(i=await s.call(t,{request:e,response:i,event:n}),!i)break}return c||(i=i&&200===i.status?i:void 0),i||null})({event:s,plugins:c,response:n,request:f});if(!w)return;const d=await self.caches.open(e),p=a(c,"cacheDidUpdate"),y=p.length>0?await l({cacheName:e,matchOptions:h,request:f}):null;try{await d.put(f,w)}catch(e){throw"QuotaExceededError"===e.name&&await async function(){for(const e of r)await e()}(),e}for(const t of p)await t.cacheDidUpdate.call(t,{cacheName:e,event:s,oldResponse:y,newResponse:w,request:f})},f=async({request:e,fetchOptions:t,event:n,plugins:s=[]})=>{if("string"==typeof e&&(e=new Request(e)),n instanceof FetchEvent&&n.preloadResponse){const e=await n.preloadResponse;if(e)return e}const i=a(s,"fetchDidFail"),c=i.length>0?e.clone():null;try{for(const t of s)if("requestWillFetch"in t){const s=t.requestWillFetch,i=e.clone();e=await s.call(t,{request:i,event:n})}}catch(e){throw new o("plugin-error-request-will-fetch",{thrownError:e})}const r=e.clone();try{let i;i="navigate"===e.mode?await fetch(e):await fetch(e,t);for(const e of s)"fetchDidSucceed"in e&&(i=await e.fetchDidSucceed.call(e,{event:n,request:r,response:i}));return i}catch(e){for(const t of i)await t.fetchDidFail.call(t,{error:e,event:n,originalRequest:c.clone(),request:r.clone()});throw e}};let w;async function d(e,t){const n=e.clone(),s={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=t?t(s):s,c=function(){if(void 0===w){const e=new Response("");if("body"in e)try{new Response(e.body),w=!0}catch(e){w=!1}w=!1}return w}()?n.body:await n.blob();return new Response(c,i)}try{self["workbox:precaching:5.1.3"]&&_()}catch(e){}function p(e){if(!e)throw new o("add-to-cache-list-unexpected-type",{entry:e});if("string"==typeof e){const t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}const{revision:t,url:n}=e;if(!n)throw new o("add-to-cache-list-unexpected-type",{entry:e});if(!t){const e=new URL(n,location.href);return{cacheKey:e.href,url:e.href}}const s=new URL(n,location.href),i=new URL(n,location.href);return s.searchParams.set("__WB_REVISION__",t),{cacheKey:s.href,url:i.href}}class y{constructor(e){this.t=s(e),this.s=new Map,this.i=new Map,this.o=new Map}addToCacheList(e){const t=[];for(const n of e){"string"==typeof n?t.push(n):n&&void 0===n.revision&&t.push(n.url);const{cacheKey:e,url:s}=p(n),i="string"!=typeof n&&n.revision?"reload":"default";if(this.s.has(s)&&this.s.get(s)!==e)throw new o("add-to-cache-list-conflicting-entries",{firstEntry:this.s.get(s),secondEntry:e});if("string"!=typeof n&&n.integrity){if(this.o.has(e)&&this.o.get(e)!==n.integrity)throw new o("add-to-cache-list-conflicting-integrities",{url:s});this.o.set(e,n.integrity)}if(this.s.set(s,e),this.i.set(s,i),t.length>0){const e=`Workbox is precaching URLs without revision info: ${t.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}async install({event:e,plugins:t}={}){const n=[],s=[],i=await self.caches.open(this.t),c=await i.keys(),o=new Set(c.map(e=>e.url));for(const[e,t]of this.s)o.has(t)?s.push(e):n.push({cacheKey:t,url:e});const r=n.map(({cacheKey:n,url:s})=>{const i=this.o.get(n),c=this.i.get(s);return this.u({cacheKey:n,cacheMode:c,event:e,integrity:i,plugins:t,url:s})});await Promise.all(r);return{updatedURLs:n.map(e=>e.url),notUpdatedURLs:s}}async activate(){const e=await self.caches.open(this.t),t=await e.keys(),n=new Set(this.s.values()),s=[];for(const i of t)n.has(i.url)||(await e.delete(i),s.push(i.url));return{deletedURLs:s}}async u({cacheKey:e,url:t,cacheMode:n,event:s,plugins:i,integrity:c}){const r=new Request(t,{integrity:c,cache:n,credentials:"same-origin"});let a,u=await f({event:s,plugins:i,request:r});for(const e of i||[])"cacheWillUpdate"in e&&(a=e);if(!(a?await a.cacheWillUpdate({event:s,request:r,response:u}):u.status<400))throw new o("bad-precaching-response",{url:t,status:u.status});u.redirected&&(u=await d(u)),await h({event:s,plugins:i,response:u,request:e===t?r:new Request(e),cacheName:this.t,matchOptions:{ignoreSearch:!0}})}getURLsToCacheKeys(){return this.s}getCachedURLs(){return[...this.s.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this.s.get(t.href)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n){return(await self.caches.open(this.t)).match(n)}}createHandler(e=!0){return async({request:t})=>{try{const e=await this.matchPrecache(t);if(e)return e;throw new o("missing-precache-entry",{cacheName:this.t,url:t instanceof Request?t.url:t})}catch(n){if(e)return fetch(t);throw n}}}createHandlerBoundToURL(e,t=!0){if(!this.getCacheKeyForURL(e))throw new o("non-precached-url",{url:e});const n=this.createHandler(t),s=new Request(e);return()=>n({request:s})}}let g;const R=()=>(g||(g=new y),g);const q=(e,t)=>{const n=R().getURLsToCacheKeys();for(const s of function*(e,{ignoreURLParametersMatching:t,directoryIndex:n,cleanURLs:s,urlManipulation:i}={}){const c=new URL(e,location.href);c.hash="",yield c.href;const o=function(e,t=[]){for(const n of[...e.searchParams.keys()])t.some(e=>e.test(n))&&e.searchParams.delete(n);return e}(c,t);if(yield o.href,n&&o.pathname.endsWith("/")){const e=new URL(o.href);e.pathname+=n,yield e.href}if(s){const e=new URL(o.href);e.pathname+=".html",yield e.href}if(i){const e=i({url:c});for(const t of e)yield t.href}}(e,t)){const e=n.get(s);if(e)return e}};let U=!1;function m(e){U||((({ignoreURLParametersMatching:e=[/^utm_/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:i}={})=>{const c=s();self.addEventListener("fetch",s=>{const o=q(s.request.url,{cleanURLs:n,directoryIndex:t,ignoreURLParametersMatching:e,urlManipulation:i});if(!o)return;let r=self.caches.open(c).then(e=>e.match(o)).then(e=>e||fetch(o));s.respondWith(r)})})(e),U=!0)}const v=[],L={get:()=>v,add(e){v.push(...e)}},x=e=>{const t=R(),n=L.get();e.waitUntil(t.install({event:e,plugins:n}).catch(e=>{throw e}))},K=e=>{const t=R();e.waitUntil(t.activate())};e.clientsClaim=function(){self.addEventListener("activate",()=>self.clients.claim())},e.precacheAndRoute=function(e,t){!function(e){R().addToCacheList(e),e.length>0&&(self.addEventListener("install",x),self.addEventListener("activate",K))}(e),m(t)},e.skipWaiting=function(){self.addEventListener("install",()=>self.skipWaiting())}}));