mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
1 line
No EOL
1.8 MiB
1 line
No EOL
1.8 MiB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(self,(()=>(()=>{var t={50792:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function s(t,e,n,s,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new r(n,s||t,o),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},a.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,s=n.length,o=new Array(s);r<s;r++)o[r]=n[r].fn;return o},a.prototype.listenerCount=function(t){var e=i?i+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,r,s,o){var a=i?i+t:t;if(!this._events[a])return!1;var h,l,u=this._events[a],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,n),!0;case 4:return u.fn.call(u.context,e,n,r),!0;case 5:return u.fn.call(u.context,e,n,r,s),!0;case 6:return u.fn.call(u.context,e,n,r,s,o),!0}for(l=1,h=new Array(c-1);l<c;l++)h[l-1]=arguments[l];u.fn.apply(u.context,h)}else{var d,p=u.length;for(l=0;l<p;l++)switch(u[l].once&&this.removeListener(t,u[l].fn,void 0,!0),c){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,e);break;case 3:u[l].fn.call(u[l].context,e,n);break;case 4:u[l].fn.call(u[l].context,e,n,r);break;default:if(!h)for(d=1,h=new Array(c-1);d<c;d++)h[d-1]=arguments[d];u[l].fn.apply(u[l].context,h)}}return!0},a.prototype.on=function(t,e,i){return s(this,t,e,i,!1)},a.prototype.once=function(t,e,i){return s(this,t,e,i,!0)},a.prototype.removeListener=function(t,e,n,r){var s=i?i+t:t;if(!this._events[s])return this;if(!e)return o(this,s),this;var a=this._events[s];if(a.fn)a.fn!==e||r&&!a.once||n&&a.context!==n||o(this,s);else{for(var h=0,l=[],u=a.length;h<u;h++)(a[h].fn!==e||r&&!a[h].once||n&&a[h].context!==n)&&l.push(a[h]);l.length?this._events[s]=1===l.length?l[0]:l:o(this,s)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&o(this,e)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=i,a.EventEmitter=a,t.exports=a},92129:t=>{var e;self,e=()=>(()=>{var t={866:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(81),r=i.n(n),s=i(645),o=i.n(s)()(r());o.push([t.id,"@import url(https://fonts.googleapis.com/css?family=Montserrat:300,400);"]),o.push([t.id,'.captureMenuComponent{position:absolute;padding:7px;z-index:99999;top:10px;left:50%;margin-left:-209px;height:40px;width:400px;border:2px solid #222;background-color:#2c2c2c;visibility:hidden;display:none;color:#f9f9f9;font-family:Consolas,monaco,monospace;font-size:14px;font-weight:500}.captureMenuComponent.active{visibility:visible;display:block}.captureMenuComponent,.captureMenuComponent:after,.captureMenuComponent:before{box-sizing:content-box}.captureMenuLogComponent{position:absolute;padding:7px;z-index:80000;top:66px;left:50%;margin-left:-209px;height:40px;width:400px;border:2px solid #222;background-color:#2c2c2c;visibility:hidden;display:none;color:#f9f9f9;font-family:Consolas,monaco,monospace;font-size:14px;font-weight:500}.captureMenuLogComponent.active{visibility:visible;display:block}.captureMenuLogComponent,.captureMenuLogComponent:after,.captureMenuLogComponent:before{box-sizing:content-box}.captureMenuLogComponent span.error{color:red}.canvasListComponent{float:left;width:50%;height:100%}.canvasListComponent [commandName=onCanvasSelection]{vertical-align:center;line-height:40px;white-space:nowrap;text-overflow:ellipsis;width:190px;display:inline-block;overflow:hidden;margin:0px 5px}.canvasListComponent [commandName=onCanvasSelection]:hover{color:#c9c9c9;cursor:pointer;transition:color .3s;-webkit-transition:color .3s;-moz-transition:color .3s}.canvasListComponent ul{margin:0px;padding:7px;list-style:none;position:absolute;top:54px;left:-2px;width:400px;border:2px solid #222;background-color:#2c2c2c}.canvasListComponent ul li{margin:5px}.canvasListComponent ul li:hover{color:#c9c9c9;cursor:pointer;transition:color .3s;-webkit-transition:color .3s;-moz-transition:color .3s}.captureMenuActionsComponent{float:left;width:30%;height:100%;margin-top:7.5px}.captureMenuActionsComponent div{float:left}.captureMenuActionsComponent [commandName=onCaptureRequested]{border-radius:50%;background:#2c2c2c;border:2px solid red;width:21px;height:21px}.captureMenuActionsComponent [commandName=onCaptureRequested]:hover{background:red;cursor:pointer;transition:background .3s;-webkit-transition:background .3s;-moz-transition:background .3s}.captureMenuActionsComponent [commandName=onPlayRequested],.captureMenuActionsComponent [commandName=onPlayNextFrameRequested]{width:21px;height:21px;border:2px solid #f9f9f9;border-radius:50%;margin-left:9px}.captureMenuActionsComponent [commandName=onPlayRequested]:before,.captureMenuActionsComponent [commandName=onPlayNextFrameRequested]:before{content:"";position:absolute;display:inline-block;margin-top:6px;margin-left:4px;width:7px;height:7px;border-top:2px solid #f9f9f9;border-right:2px solid #f9f9f9;background-color:#f9f9f9;-moz-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);z-index:-20}.captureMenuActionsComponent [commandName=onPlayRequested]:after,.captureMenuActionsComponent [commandName=onPlayNextFrameRequested]:after{content:"";position:absolute;display:inline-block;width:8px;height:20px;background-color:#2c2c2c;z-index:-10}.captureMenuActionsComponent [commandName=onPlayRequested]:hover,.captureMenuActionsComponent [commandName=onPlayNextFrameRequested]:hover{cursor:pointer;border:2px solid #c9c9c9;transition:border .3s;-webkit-transition:border .3s;-moz-transition:border .3s}.captureMenuActionsComponent [commandName=onPauseRequested]{width:21px;height:21px;border:2px solid #f9f9f9;border-radius:50%;margin-left:9px}.captureMenuActionsComponent [commandName=onPauseRequested]:before{content:"";position:absolute;display:inline-block;width:2px;height:13px;margin-left:12px;margin-top:4px;background-color:#f9f9f9}.captureMenuActionsComponent [commandName=onPauseRequested]:after{content:"";position:absolute;display:inline-block;width:2px;height:13px;margin-left:7px;margin-top:4px;background-color:#f9f9f9}.captureMenuActionsComponent [commandName=onPauseRequested]:hover{cursor:pointer;border:2px solid #c9c9c9;transition:border .3s;-webkit-transition:border .3s;-moz-transition:border .3s}.captureMenuActionsComponent [commandName=onPlayNextFrameRequested]:before{background-color:#2c2c2c}.fpsCounterComponent{float:left;width:20%;vertical-align:center;line-height:40px;white-space:nowrap}',""]);const a=o},625:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(81),r=i.n(n),s=i(645),o=i.n(s)()(r());o.push([t.id,"@import url(https://fonts.googleapis.com/css?family=Montserrat:300,400);"]),o.push([t.id,'.resultViewComponent{position:absolute;z-index:99999;border:1px solid #000;top:0;left:0;bottom:0;right:0;background-color:#222;opacity:1;visibility:hidden;display:none;color:#f9f9f9;font-family:Consolas,monaco,monospace;font-size:14px;font-weight:500}.resultViewComponent.active{visibility:visible;display:block}.resultViewComponent,.resultViewComponent:after,.resultViewComponent:before{box-sizing:content-box}.resultViewMenuComponent{font-family:"Montserrat",sans-serif;font-size:13px;font-weight:300;line-height:40px;flex:1 100%;display:flex;flex-flow:row wrap;height:42px;outline:0 none;border-bottom:2px solid #222;box-sizing:border-box;list-style:none;margin:0;background:#2c2c2c;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;justify-content:flex-end}.resultViewMenuComponent .resultViewMenuOpen{display:none;visibility:hidden}.resultViewMenuComponent a{outline:0 none;text-decoration:none;display:block;padding:0 20px 0 20px;color:#ccc;background:#2c2c2c;box-sizing:border-box;height:100%}.resultViewMenuComponent a.active{background:#222;color:#fff;font-weight:400;border-bottom:2px solid #f0640d}.resultViewMenuComponent a:hover{background:#222;color:#c9c9c9;cursor:pointer;transition:color .3s;-webkit-transition:color .3s;-moz-transition:color .3s}.resultViewMenuComponent a:hover.active{color:#f0640d;transition:color 0;-webkit-transition:color 0;-moz-transition:color 0}.resultViewMenuComponent a.clearSearch{padding:0px;margin-left:-30px;margin-right:20px;z-index:9000;color:#f9f9f9}.resultViewMenuComponent a.clearSearch:hover{background:#2c2c2c;color:#f0640d}@media all and (max-width: 1024px){.resultViewMenuComponent{padding:0px;position:absolute;overflow-y:visible;top:0px;left:0px;right:0px;bottom:0px;z-index:999999;display:block}.resultViewMenuComponent .resultViewMenuOpen{display:block;visibility:visible}.resultViewMenuComponent li:not(.resultViewMenuSmall){display:none;visibility:hidden}.resultViewMenuComponent li{background:#2c2c2c}.resultViewMenuComponent li.searchContainer{background:#464646}.resultViewMenuComponent a.active{background:#2c2c2c}}.resultViewMenuComponent input{border:0;font-family:"Montserrat",sans-serif;font-weight:300;padding:0 20px 0 20px;background:#464646;color:#f9f9f9;height:40px;position:relative;top:-1px;box-sizing:border-box}.resultViewMenuComponent input:focus{border:0;outline:0 none}.resultViewMenuComponent .clearSearch{position:relative;background:rgba(0,0,0,0);display:inline;padding:0px;margin-left:-30px;z-index:9000;color:#f0640d}.resultViewMenuComponent .clearSearch:hover{background:rgba(0,0,0,0) !important}.resultViewMenuComponent ::-webkit-input-placeholder{color:#ccc}.resultViewMenuComponent :-moz-placeholder{color:#ccc}.resultViewMenuComponent ::-moz-placeholder{color:#ccc}.resultViewMenuComponent :-ms-input-placeholder{color:#ccc}.resultViewContentComponent{position:absolute;top:40px;left:0;bottom:0;right:0}.informationColumnLeftComponent{position:absolute;top:0;left:0;bottom:0;right:50%;overflow:auto;overflow-x:hidden;overflow-y:visible}.informationColumnRightComponent{position:absolute;top:0;left:50%;bottom:0;right:0;overflow:auto;overflow-x:hidden;overflow-y:visible}.captureListComponent{position:absolute;top:40px;left:0;bottom:0;right:0;background:#222;z-index:9000;display:none;visibility:hidden;overflow-y:visible;overflow-x:hidden}.captureListComponent.active{display:block;visibility:visible}.captureListComponent .openCaptureFile{border:1px dashed #f9f9f9;display:block;margin:5px;padding:5px;text-align:center;font-style:italic}.captureListComponent .openCaptureFile span{line-height:100%;vertical-align:middle}.captureListComponent ul{margin:0px;padding:0px;list-style:none;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;justify-content:flex-start}.captureListComponent ul li{margin:5px;border:1px solid #606060}.captureListComponent ul li img{width:295px;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)),-webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)),-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9)),-webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9));background-image:-moz-linear-gradient(45deg, #d9d9d9 25%, transparent 25%),-moz-linear-gradient(-45deg, #d9d9d9 25%, transparent 25%),-moz-linear-gradient(45deg, transparent 75%, #d9d9d9 75%),-moz-linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);-webkit-background-size:50px 51px;-moz-background-size:50px 50px;background-size:50px 50px;background-position:0 0,25px 0,25px -25px,0px 25px;display:block}.captureListComponent ul li span{display:block;text-align:center;border:5px solid #222}.captureListComponent ul li span .captureListItemSave{color:#f9f9f9;font-size:16px;margin-left:10px;position:relative;padding:3px 8px 3px 32px}.captureListComponent ul li span .captureListItemSave:before,.captureListComponent ul li span .captureListItemSave:after{box-sizing:border-box;content:"";position:absolute}.captureListComponent ul li span .captureListItemSave:before{background:#d9d9d9;border-color:#f9f9f9;border-style:solid;border-width:7px 2px 1px;border-radius:1px;height:16px;left:8px;top:5px;width:16px}.captureListComponent ul li span .captureListItemSave:after{background:#f9f9f9;border-color:#d9d9d9;border-style:solid;border-width:1px 1px 1px 4px;height:5px;left:13px;top:5px;width:7px}.captureListComponent ul li:hover{cursor:pointer}.captureListComponent ul li.active span{background:#f0640d;border:5px solid #f0640d}.captureListComponent ul li.active span .captureListItemSave:before{background:#f0640d}.captureListComponent ul li.active span .captureListItemSave:after{border-color:#f0640d}.visualStateListComponent{position:absolute;top:0;left:0;bottom:0;padding:5px;right:80%;overflow-y:visible;overflow-x:hidden}.visualStateListComponent ul{margin:0px;padding:0px;list-style:none}.visualStateListComponent ul li{margin:20px 15px 0px 15px;border:1px solid #606060}.visualStateListComponent ul li img{display:block;padding:0px;box-sizing:border-box;max-height:600px;width:100%;margin:0 auto;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)),-webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)),-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9)),-webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9));background-image:-moz-linear-gradient(45deg, #d9d9d9 25%, transparent 25%),-moz-linear-gradient(-45deg, #d9d9d9 25%, transparent 25%),-moz-linear-gradient(45deg, transparent 75%, #d9d9d9 75%),-moz-linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);-webkit-background-size:50px 51px;-moz-background-size:50px 50px;background-size:50px 50px;background-position:0 0,25px 0,25px -25px,0px 25px}.visualStateListComponent ul li:hover{cursor:pointer}.visualStateListComponent ul li span{border:5px solid #222;background:#222;box-sizing:border-box;display:inline-block;width:100%;margin:0px;padding:5px;word-wrap:break-word}.visualStateListComponent ul li.active{border:2px solid #f0640d}.commandListComponent{position:absolute;top:0;left:20%;right:40%;bottom:0;color:#d3d3d3}.commandListComponent ul{margin:0px;padding:0px;list-style:none;overflow-y:visible;overflow-x:hidden;height:100%}.commandListComponent ul li{padding:8px}.commandListComponent ul li span{word-wrap:break-word;line-height:22px}.commandListComponent ul li:hover{color:#f9f9f9;cursor:pointer;transition:color .3s;-webkit-transition:color .3s;-moz-transition:color .3s}.commandListComponent ul li:nth-child(even){background:#2c2c2c}.commandListComponent ul li:nth-child(odd){background:#222}.commandListComponent ul li .important{font-weight:800}.commandListComponent ul li .important.deprecated{color:red}.commandListComponent ul li .important.unused{color:#ff0}.commandListComponent ul li .important.disabled{color:gray}.commandListComponent ul li .important.redundant{color:orange}.commandListComponent ul li .important.valid{color:#adff2f}.commandListComponent ul li .marker{font-size:16px;font-weight:900;color:#adff2f}.commandListComponent ul li.active{background:#f37628;color:#222}.commandListComponent ul li.drawCall{background:#5db0d7;color:#222}.commandListComponent ul li a{margin-left:5px;margin-right:5px;color:#5db0d7;background:#222;padding:5px;font-weight:900;display:inline-block}.commandDetailComponent{position:absolute;top:0;left:60%;right:0;bottom:0;overflow-y:visible;overflow-x:hidden}.jsonGroupComponent{display:block;margin:10px;padding:10px;padding-bottom:5px}.jsonGroupComponent .jsonGroupComponentTitle{display:block;font-size:16px;color:#5db0d7;border-bottom:1px solid #5db0d7;padding-bottom:5px;margin-bottom:5px;text-transform:capitalize}.jsonGroupComponent ul{margin:0px;padding:0px;list-style:none}.jsonGroupComponent ul li:nth-child(even){background:#222}.jsonGroupComponent ul li:nth-child(odd){background:#222}.jsonItemComponentKey{color:#f0640d}.jsonItemComponentValue{white-space:pre-wrap}.jsonItemImageHolder{width:50%;margin:auto}.jsonItemImageHolder .jsonItemImage{margin:5px;display:block;border:1px solid #606060;width:100%}.jsonItemImageHolder .jsonItemImage img{width:100%;display:block;margin:auto;max-width:256px;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)),-webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)),-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9)),-webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9));background-image:-moz-linear-gradient(45deg, #d9d9d9 25%, transparent 25%),-moz-linear-gradient(-45deg, #d9d9d9 25%, transparent 25%),-moz-linear-gradient(45deg, transparent 75%, #d9d9d9 75%),-moz-linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);-webkit-background-size:50px 51px;-moz-background-size:50px 50px;background-size:50px 50px;background-position:0 0,25px 0,25px -25px,0px 25px}.jsonItemImageHolder .jsonItemImage span{margin:0px;padding:5px;word-wrap:break-word;display:inline-block;width:100%;box-sizing:border-box}[commandName=onOpenSourceClicked]:hover{color:#f9f9f9;cursor:pointer;transition:color .3s;-webkit-transition:color .3s;-moz-transition:color .3s}.jsonVisualStateItemComponent{text-align:center;padding:10px}.jsonVisualStateItemComponent img{background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)),-webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.25, #c9c9c9), color-stop(0.25, transparent)),-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9)),-webkit-gradient(linear, 0 0, 100% 100%, color-stop(0.75, transparent), color-stop(0.75, #c9c9c9));background-image:-moz-linear-gradient(45deg, #d9d9d9 25%, transparent 25%),-moz-linear-gradient(-45deg, #d9d9d9 25%, transparent 25%),-moz-linear-gradient(45deg, transparent 75%, #d9d9d9 75%),-moz-linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);-webkit-background-size:50px 51px;-moz-background-size:50px 50px;background-size:50px 50px;background-position:0 0,25px 0,25px -25px,0px 25px;border:1px solid #606060;margin:5px;width:100%;max-width:512px;max-height:800px}.jsonVisualStateItemComponent span{display:block}.jsonContentComponent{position:absolute;top:0;left:0;right:0;bottom:0;padding:10px;overflow-y:visible;overflow-x:hidden}.jsonItemComponentValue{word-break:break-all;white-space:normal}.jsonSourceItemComponentOpen{font-weight:bold;color:#5db0d7;text-decoration:underline}.sourceCodeMenuComponentContainer{position:absolute;left:0;top:0;right:40%}.sourceCodeMenuComponent{font-family:"Montserrat",sans-serif;font-size:13px;font-weight:300;line-height:40px;flex:1 100%;display:flex;flex-flow:row wrap;height:42px;outline:0 none;border-bottom:2px solid #222;box-sizing:border-box;list-style:none;margin:0;background:#2c2c2c;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-flow:row wrap;flex-flow:row wrap;justify-content:flex-end}.sourceCodeMenuComponent .resultViewMenuOpen{display:none;visibility:hidden}.sourceCodeMenuComponent a{outline:0 none;text-decoration:none;display:block;padding:0 20px 0 20px;color:#ccc;background:#2c2c2c;box-sizing:border-box;height:100%}.sourceCodeMenuComponent a.active{background:#222;color:#fff;font-weight:400;border-bottom:2px solid #f0640d}.sourceCodeMenuComponent a:hover{background:#222;color:#c9c9c9;cursor:pointer;transition:color .3s;-webkit-transition:color .3s;-moz-transition:color .3s}.sourceCodeMenuComponent a:hover.active{color:#f0640d;transition:color 0;-webkit-transition:color 0;-moz-transition:color 0}.sourceCodeMenuComponent a.clearSearch{display:inline-block;padding:0px;margin-left:-30px;margin-right:20px;z-index:9000;color:#f9f9f9}.sourceCodeMenuComponent a.clearSearch:hover{background:#2c2c2c;color:#f0640d}.sourceCodeMenuComponent input{border:0;font-family:"Montserrat",sans-serif;font-weight:300;padding:0 20px 0 20px;background:#464646;color:#f9f9f9;height:100%;position:relative;top:-1px;box-sizing:border-box}.sourceCodeMenuComponent input:focus{border:0;outline:0 none}.sourceCodeMenuComponent .clearSearch{position:relative;background:rgba(0,0,0,0);display:inline;padding:0px;margin-left:-30px;z-index:9000;color:#f0640d}.sourceCodeMenuComponent .clearSearch:hover{background:rgba(0,0,0,0) !important}.sourceCodeMenuComponent ::-webkit-input-placeholder{color:#ccc}.sourceCodeMenuComponent :-moz-placeholder{color:#ccc}.sourceCodeMenuComponent ::-moz-placeholder{color:#ccc}.sourceCodeMenuComponent :-ms-input-placeholder{color:#ccc}.sourceCodeComponent{position:absolute;top:42px;left:0;bottom:0;right:40%;background:#222;z-index:9000;overflow-x:visible;overflow:auto}.sourceCodeComponent .sourceCodeComponentTitle{font-size:16px;font-weight:800;line-height:50px;color:#f0640d;padding:1em;margin:.5em 0}',""]);const a=o},827:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(81),r=i.n(n),s=i(645),o=i.n(s)()(r());o.push([t.id,".ace-monokai {\r\n color: #f9f9f9;\r\n font-size: 14px;\r\n}\r\n\r\n.ace-monokai .ace_entity.ace_name.ace_tag,\r\n.ace-monokai .ace_keyword,\r\n.ace-monokai .ace_meta.ace_tag,\r\n.ace-monokai .ace_storage {\r\n color: #F0640D\r\n}\r\n\r\n.ace-monokai .ace_constant.ace_character,\r\n.ace-monokai .ace_constant.ace_other {\r\n color: #5db0d7;\r\n}\r\n\r\n.ace-monokai .ace_marker-layer .ace_selection {\r\n background: #a6e22e\r\n}\r\n\r\n.ace-monokai .ace_marker-layer .ace_bracket {\r\n margin: -1px 0 0 -1px;\r\n border: 1px solid #a6e22e;\r\n}\r\n\r\n.ace-monokai .ace_marker-layer .ace_active-line {\r\n background: #2c2c2c\r\n}\r\n.ace-monokai .ace_gutter-active-line {\r\n background-color: #2c2c2c\r\n}\r\n.ace-monokai .ace_marker-layer .ace_selected-word {\r\n border: 1px solid #a6e22e\r\n}\r\n\r\n.ace-monokai .ace_constant.ace_language {\r\n color: #e6db74\r\n}\r\n.ace-monokai .ace_constant.ace_numeric {\r\n color: #ae81ff\r\n}\r\n\r\n.ace-monokai .ace_gutter {\r\n background: #222;\r\n color: #8F908A;\r\n}",""]);const a=o},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,n,r,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(n)for(var a=0;a<this.length;a++){var h=this[a][0];null!=h&&(o[h]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&o[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),i&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=i):u[2]=i),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}},81:t=>{"use strict";t.exports=function(t){return t[1]}},819:(t,e,i)=>{t=i.nmd(t),function(){var t=function(){return this}();t||"undefined"==typeof window||(t=window);var e=function(t,i,n){"string"==typeof t?(2==arguments.length&&(n=i),e.modules[t]||(e.payloads[t]=n,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};e.modules={},e.payloads={};var i,n=function(t,e,i){if("string"==typeof e){var n=o(t,e);if(null!=n)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(e)){for(var s=[],a=0,h=e.length;a<h;++a){var l=o(t,e[a]);if(null==l&&r.original)return;s.push(l)}return i&&i.apply(null,s)||!0}},r=function(t,e){var i=n("",t,e);return null==i&&r.original?r.original.apply(this,arguments):i},s=function(t,e){if(-1!==e.indexOf("!")){var i=e.split("!");return s(t,i[0])+"!"+s(t,i[1])}if("."==e.charAt(0))for(e=t.split("/").slice(0,-1).join("/")+"/"+e;-1!==e.indexOf(".")&&n!=e;){var n=e;e=e.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return e},o=function(t,i){i=s(t,i);var r=e.modules[i];if(!r){if("function"==typeof(r=e.payloads[i])){var o={},a={id:i,uri:"",exports:o,packaged:!0};o=r((function(t,e){return n(i,t,e)}),o,a)||a.exports,e.modules[i]=o,delete e.payloads[i]}r=e.modules[i]=o||r}return r};i=t,t.ace||(t.ace={}),(i=t.ace).define&&i.define.packaged||(e.original=i.define,i.define=e,i.define.packaged=!0),i.require&&i.require.packaged||(r.original=i.require,i.require=r,i.require.packaged=!0)}(),ace.define("ace/lib/regexp",["require","exports","module"],(function(t,e,i){"use strict";var n,r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},s=void 0===r.exec.call(/()??/,"")[1],o=(n=/^/g,r.test.call(n,""),!n.lastIndex);o&&s||(RegExp.prototype.exec=function(t){var e,i,n=r.exec.apply(this,arguments);if("string"==typeof t&&n){if(!s&&n.length>1&&function(t,e,i){if(Array.prototype.indexOf)return t.indexOf(e,i);for(var n=i||0;n<t.length;n++)if(t[n]===e)return n;return-1}(n,"")>-1&&(i=RegExp(this.source,r.replace.call(function(t){return(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.extended?"x":"")+(t.sticky?"y":"")}(this),"g","")),r.replace.call(t.slice(n.index),i,(function(){for(var t=1;t<arguments.length-2;t++)void 0===arguments[t]&&(n[t]=void 0)}))),this._xregexp&&this._xregexp.captureNames)for(var a=1;a<n.length;a++)(e=this._xregexp.captureNames[a-1])&&(n[e]=n[a]);!o&&this.global&&!n[0].length&&this.lastIndex>n.index&&this.lastIndex--}return n},o||(RegExp.prototype.test=function(t){var e=r.exec.call(this,t);return e&&this.global&&!e[0].length&&this.lastIndex>e.index&&this.lastIndex--,!!e}))})),ace.define("ace/lib/es5-shim",["require","exports","module"],(function(t,e,i){function n(){}Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if("function"!=typeof e)throw new TypeError("Function.prototype.bind called on incompatible "+e);var i=d.call(arguments,1),r=function(){if(this instanceof r){var n=e.apply(this,i.concat(d.call(arguments)));return Object(n)===n?n:this}return e.apply(t,i.concat(d.call(arguments)))};return e.prototype&&(n.prototype=e.prototype,r.prototype=new n,n.prototype=null),r});var r,s,o,a,h,l=Function.prototype.call,u=Array.prototype,c=Object.prototype,d=u.slice,p=l.bind(c.toString),f=l.bind(c.hasOwnProperty);if((h=f(c,"__defineGetter__"))&&(r=l.bind(c.__defineGetter__),s=l.bind(c.__defineSetter__),o=l.bind(c.__lookupGetter__),a=l.bind(c.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function t(t){var e=new Array(t+2);return e[0]=e[1]=0,e}var e,i=[];if(i.splice.apply(i,t(20)),i.splice.apply(i,t(26)),e=i.length,i.splice(5,0,"XXX"),i.length,e+1==i.length)return!0}()){var m=Array.prototype.splice;Array.prototype.splice=function(t,e){return arguments.length?m.apply(this,[void 0===t?0:t,void 0===e?this.length-t:e].concat(d.call(arguments,2))):[]}}else Array.prototype.splice=function(t,e){var i=this.length;t>0?t>i&&(t=i):null==t?t=0:t<0&&(t=Math.max(i+t,0)),t+e<i||(e=i-t);var n=this.slice(t,t+e),r=d.call(arguments,2),s=r.length;if(t===i)s&&this.push.apply(this,r);else{var o=Math.min(e,i-t),a=t+o,h=a+s-o,l=i-a,u=i-o;if(h<a)for(var c=0;c<l;++c)this[h+c]=this[a+c];else if(h>a)for(c=l;c--;)this[h+c]=this[a+c];if(s&&t===u)this.length=u,this.push.apply(this,r);else for(this.length=u+s,c=0;c<s;++c)this[t+c]=r[c]}return n};Array.isArray||(Array.isArray=function(t){return"[object Array]"==p(t)});var g,v,y=Object("a"),x="a"!=y[0]||!(0 in y);function E(t){try{return Object.defineProperty(t,"sentinel",{}),"sentinel"in t}catch(t){}}if(Array.prototype.forEach||(Array.prototype.forEach=function(t){var e=P(this),i=x&&"[object String]"==p(this)?this.split(""):e,n=arguments[1],r=-1,s=i.length>>>0;if("[object Function]"!=p(t))throw new TypeError;for(;++r<s;)r in i&&t.call(n,i[r],r,e)}),Array.prototype.map||(Array.prototype.map=function(t){var e=P(this),i=x&&"[object String]"==p(this)?this.split(""):e,n=i.length>>>0,r=Array(n),s=arguments[1];if("[object Function]"!=p(t))throw new TypeError(t+" is not a function");for(var o=0;o<n;o++)o in i&&(r[o]=t.call(s,i[o],o,e));return r}),Array.prototype.filter||(Array.prototype.filter=function(t){var e,i=P(this),n=x&&"[object String]"==p(this)?this.split(""):i,r=n.length>>>0,s=[],o=arguments[1];if("[object Function]"!=p(t))throw new TypeError(t+" is not a function");for(var a=0;a<r;a++)a in n&&(e=n[a],t.call(o,e,a,i)&&s.push(e));return s}),Array.prototype.every||(Array.prototype.every=function(t){var e=P(this),i=x&&"[object String]"==p(this)?this.split(""):e,n=i.length>>>0,r=arguments[1];if("[object Function]"!=p(t))throw new TypeError(t+" is not a function");for(var s=0;s<n;s++)if(s in i&&!t.call(r,i[s],s,e))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var e=P(this),i=x&&"[object String]"==p(this)?this.split(""):e,n=i.length>>>0,r=arguments[1];if("[object Function]"!=p(t))throw new TypeError(t+" is not a function");for(var s=0;s<n;s++)if(s in i&&t.call(r,i[s],s,e))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var e=P(this),i=x&&"[object String]"==p(this)?this.split(""):e,n=i.length>>>0;if("[object Function]"!=p(t))throw new TypeError(t+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var r,s=0;if(arguments.length>=2)r=arguments[1];else for(;;){if(s in i){r=i[s++];break}if(++s>=n)throw new TypeError("reduce of empty array with no initial value")}for(;s<n;s++)s in i&&(r=t.call(void 0,r,i[s],s,e));return r}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var e=P(this),i=x&&"[object String]"==p(this)?this.split(""):e,n=i.length>>>0;if("[object Function]"!=p(t))throw new TypeError(t+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,s=n-1;if(arguments.length>=2)r=arguments[1];else for(;;){if(s in i){r=i[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}do{s in this&&(r=t.call(void 0,r,i[s],s,e))}while(s--);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(t){var e=x&&"[object String]"==p(this)?this.split(""):P(this),i=e.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=O(arguments[1])),n=n>=0?n:Math.max(0,i+n);n<i;n++)if(n in e&&e[n]===t)return n;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(t){var e=x&&"[object String]"==p(this)?this.split(""):P(this),i=e.length>>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,O(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in e&&t===e[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:c)}),Object.getOwnPropertyDescriptor||(Object.getOwnPropertyDescriptor=function(t,e){if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+t);if(f(t,e)){var i;if(i={enumerable:!0,configurable:!0},h){var n=t.__proto__;t.__proto__=c;var r=o(t,e),s=a(t,e);if(t.__proto__=n,r||s)return r&&(i.get=r),s&&(i.set=s),i}return i.value=t[e],i}}),Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)}),Object.create||(g=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var t={};for(var e in t)t[e]=null;return t.constructor=t.hasOwnProperty=t.propertyIsEnumerable=t.isPrototypeOf=t.toLocaleString=t.toString=t.valueOf=t.__proto__=null,t},Object.create=function(t,e){var i;if(null===t)i=g();else{if("object"!=typeof t)throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var n=function(){};n.prototype=t,(i=new n).__proto__=t}return void 0!==e&&Object.defineProperties(i,e),i}),Object.defineProperty){var T=E({}),_="undefined"==typeof document||E(document.createElement("div"));if(!T||!_)var w=Object.defineProperty}Object.defineProperty&&!w||(Object.defineProperty=function(t,e,i){if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError("Object.defineProperty called on non-object: "+t);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError("Property description must be an object: "+i);if(w)try{return w.call(Object,t,e,i)}catch(t){}if(f(i,"value"))if(h&&(o(t,e)||a(t,e))){var n=t.__proto__;t.__proto__=c,delete t[e],t[e]=i.value,t.__proto__=n}else t[e]=i.value;else{if(!h)throw new TypeError("getters & setters can not be defined on this javascript engine");f(i,"get")&&r(t,e,i.get),f(i,"set")&&s(t,e,i.set)}return t}),Object.defineProperties||(Object.defineProperties=function(t,e){for(var i in e)f(e,i)&&Object.defineProperty(t,i,e[i]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze((function(){}))}catch(t){Object.freeze=(v=Object.freeze,function(t){return"function"==typeof t?t:v(t)})}if(Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;for(var e="";f(t,e);)e+="?";t[e]=!0;var i=f(t,e);return delete t[e],i}),!Object.keys){var S=!0,b=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],C=b.length;for(var A in{toString:null})S=!1;Object.keys=function(t){if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError("Object.keys called on a non-object");var e=[];for(var i in t)f(t,i)&&e.push(i);if(S)for(var n=0,r=C;n<r;n++){var s=b[n];f(t,s)&&e.push(s)}return e}}Date.now||(Date.now=function(){return(new Date).getTime()});var R="\t\n\v\f\r \u2028\u2029\ufeff";if(!String.prototype.trim){R="["+R+"]";var M=new RegExp("^"+R+R+"*"),L=new RegExp(R+R+"*$");String.prototype.trim=function(){return String(this).replace(M,"").replace(L,"")}}function O(t){return(t=+t)!=t?t=0:0!==t&&t!==1/0&&t!==-1/0&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}var P=function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return Object(t)}})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],(function(t,e,i){"use strict";t("./regexp"),t("./es5-shim"),"undefined"==typeof Element||Element.prototype.remove||Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})})),ace.define("ace/lib/useragent",["require","exports","module"],(function(t,e,i){"use strict";e.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},e.getOS=function(){return e.isMac?e.OS.MAC:e.isLinux?e.OS.LINUX:e.OS.WINDOWS};var n="object"==typeof navigator?navigator:{},r=(/mac|win|linux/i.exec(n.platform)||["other"])[0].toLowerCase(),s=n.userAgent||"",o=n.appName||"";e.isWin="win"==r,e.isMac="mac"==r,e.isLinux="linux"==r,e.isIE="Microsoft Internet Explorer"==o||o.indexOf("MSAppHost")>=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),e.isOldIE=e.isIE&&e.isIE<9,e.isGecko=e.isMozilla=s.match(/ Gecko\/\d+/),e.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),e.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,e.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,e.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,e.isAIR=s.indexOf("AdobeAIR")>=0,e.isAndroid=s.indexOf("Android")>=0,e.isChromeOS=s.indexOf(" CrOS ")>=0,e.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,e.isIOS&&(e.isMac=!0),e.isMobile=e.isIOS||e.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(t,e,i){"use strict";var n=t("./useragent");if(e.buildDom=function t(e,i,n){if("string"==typeof e&&e){var r=document.createTextNode(e);return i&&i.appendChild(r),r}if(!Array.isArray(e))return e;if("string"!=typeof e[0]||!e[0]){for(var s=[],o=0;o<e.length;o++){var a=t(e[o],i,n);a&&s.push(a)}return s}var h=document.createElement(e[0]),l=e[1],u=1;for(l&&"object"==typeof l&&!Array.isArray(l)&&(u=2),o=u;o<e.length;o++)t(e[o],h,n);return 2==u&&Object.keys(l).forEach((function(t){var e=l[t];"class"===t?h.className=Array.isArray(e)?e.join(" "):e:"function"==typeof e||"value"==t?h[t]=e:"ref"===t?n&&(n[e]=h):null!=e&&h.setAttribute(t,e)})),i&&i.appendChild(h),h},e.getDocumentHead=function(t){return t||(t=document),t.head||t.getElementsByTagName("head")[0]||t.documentElement},e.createElement=function(t,e){return document.createElementNS?document.createElementNS(e||"http://www.w3.org/1999/xhtml",t):document.createElement(t)},e.removeChildren=function(t){t.innerHTML=""},e.createTextNode=function(t,e){return(e?e.ownerDocument:document).createTextNode(t)},e.createFragment=function(t){return(t?t.ownerDocument:document).createDocumentFragment()},e.hasCssClass=function(t,e){return-1!==(t.className+"").split(/\s+/g).indexOf(e)},e.addCssClass=function(t,i){e.hasCssClass(t,i)||(t.className+=" "+i)},e.removeCssClass=function(t,e){for(var i=t.className.split(/\s+/g);;){var n=i.indexOf(e);if(-1==n)break;i.splice(n,1)}t.className=i.join(" ")},e.toggleCssClass=function(t,e){for(var i=t.className.split(/\s+/g),n=!0;;){var r=i.indexOf(e);if(-1==r)break;n=!1,i.splice(r,1)}return n&&i.push(e),t.className=i.join(" "),n},e.setCssClass=function(t,i,n){n?e.addCssClass(t,i):e.removeCssClass(t,i)},e.hasCssString=function(t,e){var i,n=0;if(i=(e=e||document).querySelectorAll("style"))for(;n<i.length;)if(i[n++].id===t)return!0},e.importCssString=function(t,i,n){var r=n;n&&n.getRootNode&&(r=n.getRootNode())&&r!=n||(r=document);var s=r.ownerDocument||r;if(i&&e.hasCssString(i,r))return null;i&&(t+="\n/*# sourceURL=ace/css/"+i+" */");var o=e.createElement("style");o.appendChild(s.createTextNode(t)),i&&(o.id=i),r==s&&(r=e.getDocumentHead(s)),r.insertBefore(o,r.firstChild)},e.importCssStylsheet=function(t,i){e.buildDom(["link",{rel:"stylesheet",href:t}],e.getDocumentHead(i))},e.scrollbarWidth=function(t){var i=e.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var n=e.createElement("ace_outer"),r=n.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",n.appendChild(i);var s=t.documentElement;s.appendChild(n);var o=i.offsetWidth;r.overflow="scroll";var a=i.offsetWidth;return o==a&&(a=n.clientWidth),s.removeChild(n),o-a},"undefined"==typeof document&&(e.importCssString=function(){}),e.computedStyle=function(t,e){return window.getComputedStyle(t,"")||{}},e.setStyle=function(t,e,i){t[e]!==i&&(t[e]=i)},e.HAS_CSS_ANIMATION=!1,e.HAS_CSS_TRANSFORMS=!1,e.HI_DPI=!n.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,"undefined"!=typeof document){var r=document.createElement("div");e.HI_DPI&&void 0!==r.style.transform&&(e.HAS_CSS_TRANSFORMS=!0),n.isEdge||void 0===r.style.animationName||(e.HAS_CSS_ANIMATION=!0),r=null}e.HAS_CSS_TRANSFORMS?e.translate=function(t,e,i){t.style.transform="translate("+Math.round(e)+"px, "+Math.round(i)+"px)"}:e.translate=function(t,e,i){t.style.top=Math.round(i)+"px",t.style.left=Math.round(e)+"px"}})),ace.define("ace/lib/oop",["require","exports","module"],(function(t,e,i){"use strict";e.inherits=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},e.mixin=function(t,e){for(var i in e)t[i]=e[i];return t},e.implement=function(t,i){e.mixin(t,i)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(t,e,i){"use strict";var n=t("./oop"),r=function(){var t,e,i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(e in i.FUNCTION_KEYS)t=i.FUNCTION_KEYS[e].toLowerCase(),i[t]=parseInt(e,10);for(e in i.PRINTABLE_KEYS)t=i.PRINTABLE_KEYS[e].toLowerCase(),i[t]=parseInt(e,10);return n.mixin(i,i.MODIFIER_KEYS),n.mixin(i,i.PRINTABLE_KEYS),n.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,i[173]="-",function(){for(var t=["cmd","ctrl","alt","shift"],e=Math.pow(2,t.length);e--;)i.KEY_MODS[e]=t.filter((function(t){return e&i.KEY_MODS[t]})).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",i}();n.mixin(e,r),e.keyCodeToString=function(t){var e=r[t];return"string"!=typeof e&&(e=String.fromCharCode(t)),e.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(t,e,i){"use strict";var n=t("./keys"),r=t("./useragent"),s=null,o=0;e.addListener=function(t,e,i){if(t.addEventListener)return t.addEventListener(e,i,!1);if(t.attachEvent){var n=function(){i.call(t,window.event)};i._wrapper=n,t.attachEvent("on"+e,n)}},e.removeListener=function(t,e,i){if(t.removeEventListener)return t.removeEventListener(e,i,!1);t.detachEvent&&t.detachEvent("on"+e,i._wrapper||i)},e.stopEvent=function(t){return e.stopPropagation(t),e.preventDefault(t),!1},e.stopPropagation=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},e.preventDefault=function(t){t.preventDefault?t.preventDefault():t.returnValue=!1},e.getButton=function(t){return"dblclick"==t.type?0:"contextmenu"==t.type||r.isMac&&t.ctrlKey&&!t.altKey&&!t.shiftKey?2:t.preventDefault?t.button:{1:0,2:2,4:1}[t.button]},e.capture=function(t,i,n){function r(t){i&&i(t),n&&n(t),e.removeListener(document,"mousemove",i,!0),e.removeListener(document,"mouseup",r,!0),e.removeListener(document,"dragstart",r,!0)}return e.addListener(document,"mousemove",i,!0),e.addListener(document,"mouseup",r,!0),e.addListener(document,"dragstart",r,!0),r},e.addMouseWheelListener=function(t,i){"onmousewheel"in t?e.addListener(t,"mousewheel",(function(t){void 0!==t.wheelDeltaX?(t.wheelX=-t.wheelDeltaX/8,t.wheelY=-t.wheelDeltaY/8):(t.wheelX=0,t.wheelY=-t.wheelDelta/8),i(t)})):"onwheel"in t?e.addListener(t,"wheel",(function(t){switch(t.deltaMode){case t.DOM_DELTA_PIXEL:t.wheelX=.35*t.deltaX||0,t.wheelY=.35*t.deltaY||0;break;case t.DOM_DELTA_LINE:case t.DOM_DELTA_PAGE:t.wheelX=5*(t.deltaX||0),t.wheelY=5*(t.deltaY||0)}i(t)})):e.addListener(t,"DOMMouseScroll",(function(t){t.axis&&t.axis==t.HORIZONTAL_AXIS?(t.wheelX=5*(t.detail||0),t.wheelY=0):(t.wheelX=0,t.wheelY=5*(t.detail||0)),i(t)}))},e.addMultiMouseDownListener=function(t,i,n,s){var o,a,h,l=0,u={2:"dblclick",3:"tripleclick",4:"quadclick"};function c(t){if(0!==e.getButton(t)?l=0:t.detail>1?++l>4&&(l=1):l=1,r.isIE){var c=Math.abs(t.clientX-o)>5||Math.abs(t.clientY-a)>5;h&&!c||(l=1),h&&clearTimeout(h),h=setTimeout((function(){h=null}),i[l-1]||600),1==l&&(o=t.clientX,a=t.clientY)}if(t._clicks=l,n[s]("mousedown",t),l>4)l=0;else if(l>1)return n[s](u[l],t)}function d(t){l=2,h&&clearTimeout(h),h=setTimeout((function(){h=null}),i[l-1]||600),n[s]("mousedown",t),n[s](u[l],t)}Array.isArray(t)||(t=[t]),t.forEach((function(t){e.addListener(t,"mousedown",c),r.isOldIE&&e.addListener(t,"dblclick",d)}))};var a=r.isMac&&r.isOpera&&!("KeyboardEvent"in window)?function(t){return 0|(t.metaKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.ctrlKey?8:0)}:function(t){return 0|(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0)};function h(t,e,i){var h=a(e);if(!r.isMac&&s){if(e.getModifierState&&(e.getModifierState("OS")||e.getModifierState("Win"))&&(h|=8),s.altGr){if(3==(3&h))return;s.altGr=0}if(18===i||17===i){var l="location"in e?e.location:e.keyLocation;17===i&&1===l?1==s[i]&&(o=e.timeStamp):18===i&&3===h&&2===l&&e.timeStamp-o<50&&(s.altGr=!0)}}if(i in n.MODIFIER_KEYS&&(i=-1),h||13!==i||3!==(l="location"in e?e.location:e.keyLocation)||(t(e,h,-i),!e.defaultPrevented)){if(r.isChromeOS&&8&h){if(t(e,h,i),e.defaultPrevented)return;h&=-9}return!!(h||i in n.FUNCTION_KEYS||i in n.PRINTABLE_KEYS)&&t(e,h,i)}}function l(){s=Object.create(null)}if(e.getModifierString=function(t){return n.KEY_MODS[a(t)]},e.addCommandKeyListener=function(t,i){var n=e.addListener;if(r.isOldGecko||r.isOpera&&!("KeyboardEvent"in window)){var o=null;n(t,"keydown",(function(t){o=t.keyCode})),n(t,"keypress",(function(t){return h(i,t,o)}))}else{var a=null;n(t,"keydown",(function(t){s[t.keyCode]=(s[t.keyCode]||0)+1;var e=h(i,t,t.keyCode);return a=t.defaultPrevented,e})),n(t,"keypress",(function(t){a&&(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&(e.stopEvent(t),a=null)})),n(t,"keyup",(function(t){s[t.keyCode]=null})),s||(l(),n(window,"focus",l))}},"object"==typeof window&&window.postMessage&&!r.isOldIE){var u=1;e.nextTick=function(t,i){i=i||window;var n="zero-timeout-message-"+u++,r=function(s){s.data==n&&(e.stopPropagation(s),e.removeListener(i,"message",r),t())};e.addListener(i,"message",r),i.postMessage(n,"*")}}e.$idleBlocked=!1,e.onIdle=function(t,i){return setTimeout((function i(){e.$idleBlocked?setTimeout(i,100):t()}),i)},e.$idleBlockId=null,e.blockIdle=function(t){e.$idleBlockId&&clearTimeout(e.$idleBlockId),e.$idleBlocked=!0,e.$idleBlockId=setTimeout((function(){e.$idleBlocked=!1}),t||100)},e.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),e.nextFrame?e.nextFrame=e.nextFrame.bind(window):e.nextFrame=function(t){setTimeout(t,17)}})),ace.define("ace/range",["require","exports","module"],(function(t,e,i){"use strict";var n=function(t,e,i,n){this.start={row:t,column:e},this.end={row:i,column:n}};(function(){this.isEqual=function(t){return this.start.row===t.start.row&&this.end.row===t.end.row&&this.start.column===t.start.column&&this.end.column===t.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(t,e){return 0==this.compare(t,e)},this.compareRange=function(t){var e,i=t.end,n=t.start;return 1==(e=this.compare(i.row,i.column))?1==(e=this.compare(n.row,n.column))?2:0==e?1:0:-1==e?-2:-1==(e=this.compare(n.row,n.column))?-1:1==e?42:0},this.comparePoint=function(t){return this.compare(t.row,t.column)},this.containsRange=function(t){return 0==this.comparePoint(t.start)&&0==this.comparePoint(t.end)},this.intersects=function(t){var e=this.compareRange(t);return-1==e||0==e||1==e},this.isEnd=function(t,e){return this.end.row==t&&this.end.column==e},this.isStart=function(t,e){return this.start.row==t&&this.start.column==e},this.setStart=function(t,e){"object"==typeof t?(this.start.column=t.column,this.start.row=t.row):(this.start.row=t,this.start.column=e)},this.setEnd=function(t,e){"object"==typeof t?(this.end.column=t.column,this.end.row=t.row):(this.end.row=t,this.end.column=e)},this.inside=function(t,e){return 0==this.compare(t,e)&&!this.isEnd(t,e)&&!this.isStart(t,e)},this.insideStart=function(t,e){return 0==this.compare(t,e)&&!this.isEnd(t,e)},this.insideEnd=function(t,e){return 0==this.compare(t,e)&&!this.isStart(t,e)},this.compare=function(t,e){return this.isMultiLine()||t!==this.start.row?t<this.start.row?-1:t>this.end.row?1:this.start.row===t?e>=this.start.column?0:-1:this.end.row===t?e<=this.end.column?0:1:0:e<this.start.column?-1:e>this.end.column?1:0},this.compareStart=function(t,e){return this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},this.compareEnd=function(t,e){return this.end.row==t&&this.end.column==e?1:this.compare(t,e)},this.compareInside=function(t,e){return this.end.row==t&&this.end.column==e?1:this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},this.clipRows=function(t,e){if(this.end.row>e)var i={row:e+1,column:0};else this.end.row<t&&(i={row:t,column:0});if(this.start.row>e)var r={row:e+1,column:0};else this.start.row<t&&(r={row:t,column:0});return n.fromPoints(r||this.start,i||this.end)},this.extend=function(t,e){var i=this.compare(t,e);if(0==i)return this;if(-1==i)var r={row:t,column:e};else var s={row:t,column:e};return n.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return n.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new n(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new n(this.start.row,0,this.end.row,0)},this.toScreenRange=function(t){var e=t.documentToScreenPosition(this.start),i=t.documentToScreenPosition(this.end);return new n(e.row,e.column,i.row,i.column)},this.moveBy=function(t,e){this.start.row+=t,this.start.column+=e,this.end.row+=t,this.end.column+=e}}).call(n.prototype),n.fromPoints=function(t,e){return new n(t.row,t.column,e.row,e.column)},n.comparePoints=function(t,e){return t.row-e.row||t.column-e.column},n.comparePoints=function(t,e){return t.row-e.row||t.column-e.column},e.Range=n})),ace.define("ace/lib/lang",["require","exports","module"],(function(t,e,i){"use strict";e.last=function(t){return t[t.length-1]},e.stringReverse=function(t){return t.split("").reverse().join("")},e.stringRepeat=function(t,e){for(var i="";e>0;)1&e&&(i+=t),(e>>=1)&&(t+=t);return i};var n=/^\s\s*/,r=/\s\s*$/;e.stringTrimLeft=function(t){return t.replace(n,"")},e.stringTrimRight=function(t){return t.replace(r,"")},e.copyObject=function(t){var e={};for(var i in t)e[i]=t[i];return e},e.copyArray=function(t){for(var e=[],i=0,n=t.length;i<n;i++)t[i]&&"object"==typeof t[i]?e[i]=this.copyObject(t[i]):e[i]=t[i];return e},e.deepCopy=function t(e){if("object"!=typeof e||!e)return e;var i;if(Array.isArray(e)){i=[];for(var n=0;n<e.length;n++)i[n]=t(e[n]);return i}if("[object Object]"!==Object.prototype.toString.call(e))return e;for(var n in i={},e)i[n]=t(e[n]);return i},e.arrayToMap=function(t){for(var e={},i=0;i<t.length;i++)e[t[i]]=1;return e},e.createMap=function(t){var e=Object.create(null);for(var i in t)e[i]=t[i];return e},e.arrayRemove=function(t,e){for(var i=0;i<=t.length;i++)e===t[i]&&t.splice(i,1)},e.escapeRegExp=function(t){return t.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},e.escapeHTML=function(t){return(""+t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},e.getMatchOffsets=function(t,e){var i=[];return t.replace(e,(function(t){i.push({offset:arguments[arguments.length-2],length:t.length})})),i},e.deferredCall=function(t){var e=null,i=function(){e=null,t()},n=function(t){return n.cancel(),e=setTimeout(i,t||0),n};return n.schedule=n,n.call=function(){return this.cancel(),t(),n},n.cancel=function(){return clearTimeout(e),e=null,n},n.isPending=function(){return e},n},e.delayedCall=function(t,e){var i=null,n=function(){i=null,t()},r=function(t){null==i&&(i=setTimeout(n,t||e))};return r.delay=function(t){i&&clearTimeout(i),i=setTimeout(n,t||e)},r.schedule=r,r.call=function(){this.cancel(),t()},r.cancel=function(){i&&clearTimeout(i),i=null},r.isPending=function(){return i},r}})),ace.define("ace/clipboard",["require","exports","module"],(function(t,e,i){"use strict";var n;i.exports={lineMode:!1,pasteCancelled:function(){return!!(n&&n>Date.now()-50)||(n=!1)},cancel:function(){n=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(t,e,i){"use strict";var n=t("../lib/event"),r=t("../lib/useragent"),s=t("../lib/dom"),o=t("../lib/lang"),a=t("../clipboard"),h=r.isChrome<18,l=r.isIE,u=r.isChrome>63,c=400,d=t("../lib/keys"),p=d.KEY_MODS,f=r.isIOS,m=f?/\s/:/\n/;e.TextInput=function(t,e){var i=s.createElement("textarea");i.className="ace_text-input",i.setAttribute("wrap","off"),i.setAttribute("autocorrect","off"),i.setAttribute("autocapitalize","off"),i.setAttribute("spellcheck",!1),i.style.opacity="0",t.insertBefore(i,t.firstChild);var g=!1,v=!1,y=!1,x=!1,E="";r.isMobile||(i.style.fontSize="1px");var T=!1,_=!1,w="",S=0,b=0,C=0;try{var A=document.activeElement===i}catch(t){}n.addListener(i,"blur",(function(t){_||(e.onBlur(t),A=!1)})),n.addListener(i,"focus",(function(t){if(!_){if(A=!0,r.isEdge)try{if(!document.hasFocus())return}catch(t){}e.onFocus(t),r.isEdge?setTimeout(R):R()}})),this.$focusScroll=!1,this.focus=function(){if(E||u||"browser"==this.$focusScroll)return i.focus({preventScroll:!0});var t=i.style.top;i.style.position="fixed",i.style.top="0px";try{var e=0!=i.getBoundingClientRect().top}catch(t){return}var n=[];if(e)for(var r=i.parentElement;r&&1==r.nodeType;)n.push(r),r.setAttribute("ace_nocontext",!0),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement;i.focus({preventScroll:!0}),e&&n.forEach((function(t){t.removeAttribute("ace_nocontext")})),setTimeout((function(){i.style.position="","0px"==i.style.top&&(i.style.top=t)}),0)},this.blur=function(){i.blur()},this.isFocused=function(){return A},e.on("beforeEndOperation",(function(){e.curOp&&"insertstring"==e.curOp.command.name||(y&&(w=i.value="",U()),R())}));var R=f?function(t){if(A&&(!g||t)&&!x){t||(t="");var n="\n ab"+t+"cde fg\n";n!=i.value&&(i.value=w=n);var r=4+(t.length||(e.selection.isEmpty()?0:1));4==S&&b==r||i.setSelectionRange(4,r),S=4,b=r}}:function(){if(!y&&!x&&(A||L)){y=!0;var t=e.selection,n=t.getRange(),r=t.cursor.row,s=n.start.column,o=n.end.column,a=e.session.getLine(r);if(n.start.row!=r){var h=e.session.getLine(r-1);s=n.start.row<r-1?0:s,o+=h.length+1,a=h+"\n"+a}else if(n.end.row!=r){var l=e.session.getLine(r+1);o=n.end.row>r+1?l.length:o,o+=a.length+1,a=a+"\n"+l}a.length>c&&(s<c&&o<c?a=a.slice(0,c):(a="\n",s=0,o=1));var u=a+"\n\n";if(u!=w&&(i.value=w=u,S=b=u.length),L&&(S=i.selectionStart,b=i.selectionEnd),b!=o||S!=s||i.selectionEnd!=b)try{i.setSelectionRange(s,o),S=s,b=o}catch(t){}y=!1}};A&&e.onFocus();var M=null;this.setInputHandler=function(t){M=t},this.getInputHandler=function(){return M};var L=!1,O=function(t,n){if(L&&(L=!1),v)return R(),t&&e.onPaste(t),v=!1,"";for(var r=i.selectionStart,s=i.selectionEnd,o=S,a=w.length-b,h=t,l=t.length-r,u=t.length-s,c=0;o>0&&w[c]==t[c];)c++,o--;for(h=h.slice(c),c=1;a>0&&w.length-c>S-1&&w[w.length-c]==t[t.length-c];)c++,a--;l-=c-1,u-=c-1;var d=h.length-c+1;return d<0&&(o=-d,d=0),h=h.slice(0,d),n||h||l||o||a||u?(x=!0,h&&!o&&!a&&!l&&!u||T?e.onTextInput(h):e.onTextInput(h,{extendLeft:o,extendRight:a,restoreStart:l,restoreEnd:u}),x=!1,w=t,S=r,b=s,C=u,h):""},P=function(t){if(y)return B();if(t&&t.inputType){if("historyUndo"==t.inputType)return e.execCommand("undo");if("historyRedo"==t.inputType)return e.execCommand("redo")}var n=i.value,r=O(n,!0);(n.length>500||m.test(r))&&R()},F=function(t,e,i){var n=t.clipboardData||window.clipboardData;if(n&&!h){var r=l||i?"Text":"text/plain";try{return e?!1!==n.setData(r,e):n.getData(r)}catch(t){if(!i)return F(t,e,!0)}}},I=function(t,r){var s=e.getCopyText();if(!s)return n.preventDefault(t);F(t,s)?(f&&(R(s),g=s,setTimeout((function(){g=!1}),10)),r?e.onCut():e.onCopy(),n.preventDefault(t)):(g=!0,i.value=s,i.select(),setTimeout((function(){g=!1,R(),r?e.onCut():e.onCopy()})))},D=function(t){I(t,!0)},N=function(t){I(t,!1)},k=function(t){var s=F(t);a.pasteCancelled()||("string"==typeof s?(s&&e.onPaste(s,t),r.isIE&&setTimeout(R),n.preventDefault(t)):(i.value="",v=!0))};n.addCommandKeyListener(i,e.onCommandKey.bind(e)),n.addListener(i,"select",(function(t){y||(g?g=!1:function(t){return 0===t.selectionStart&&t.selectionEnd>=w.length&&t.value===w&&w&&t.selectionEnd!==b}(i)&&(e.selectAll(),R()))})),n.addListener(i,"input",P),n.addListener(i,"cut",D),n.addListener(i,"copy",N),n.addListener(i,"paste",k),"oncut"in i&&"oncopy"in i&&"onpaste"in i||n.addListener(t,"keydown",(function(t){if((!r.isMac||t.metaKey)&&t.ctrlKey)switch(t.keyCode){case 67:N(t);break;case 86:k(t);break;case 88:D(t)}}));var B=function(){if(y&&e.onCompositionUpdate&&!e.$readOnly){if(T)return G();if(y.useTextareaForIME)e.onCompositionUpdate(i.value);else{var t=i.value;O(t),y.markerRange&&(y.context&&(y.markerRange.start.column=y.selectionStart=y.context.compositionStartOffset),y.markerRange.end.column=y.markerRange.start.column+b-y.selectionStart+C)}}},U=function(t){e.onCompositionEnd&&!e.$readOnly&&(y=!1,e.onCompositionEnd(),e.off("mousedown",G),t&&P())};function G(){_=!0,i.blur(),i.focus(),_=!1}var W,X=o.delayedCall(B,50).schedule.bind(null,null);function V(){clearTimeout(W),W=setTimeout((function(){E&&(i.style.cssText=E,E=""),e.renderer.$isMousePressed=!1,e.renderer.$keepTextAreaAtCursor&&e.renderer.$moveTextAreaToCursor()}),0)}n.addListener(i,"compositionstart",(function(t){if(!y&&e.onCompositionStart&&!e.$readOnly&&(y={},!T)){setTimeout(B,0),e.on("mousedown",G);var n=e.getSelectionRange();n.end.row=n.start.row,n.end.column=n.start.column,y.markerRange=n,y.selectionStart=S,e.onCompositionStart(y),y.useTextareaForIME?(i.value="",w="",S=0,b=0):(i.msGetInputContext&&(y.context=i.msGetInputContext()),i.getInputContext&&(y.context=i.getInputContext()))}})),n.addListener(i,"compositionupdate",B),n.addListener(i,"keyup",(function(t){27==t.keyCode&&i.value.length<i.selectionStart&&(y||(w=i.value),S=b=-1,R()),X()})),n.addListener(i,"keydown",X),n.addListener(i,"compositionend",U),this.getElement=function(){return i},this.setCommandMode=function(t){T=t,i.readOnly=!1},this.setReadOnly=function(t){T||(i.readOnly=t)},this.setCopyWithEmptySelection=function(t){},this.onContextMenu=function(t){L=!0,R(),e._emit("nativecontextmenu",{target:e,domEvent:t}),this.moveToMouse(t,!0)},this.moveToMouse=function(t,o){E||(E=i.style.cssText),i.style.cssText=(o?"z-index:100000;":"")+(r.isIE?"opacity:0.1;":"")+"text-indent: -"+(S+b)*e.renderer.characterWidth*.5+"px;";var a=e.container.getBoundingClientRect(),h=s.computedStyle(e.container),l=a.top+(parseInt(h.borderTopWidth)||0),u=a.left+(parseInt(a.borderLeftWidth)||0),c=a.bottom-l-i.clientHeight-2,d=function(t){s.translate(i,t.clientX-u-2,Math.min(t.clientY-l-2,c))};d(t),"mousedown"==t.type&&(e.renderer.$isMousePressed=!0,clearTimeout(W),r.isWin&&n.capture(e.container,d,V))},this.onContextMenuClose=V;var $=function(t){e.textInput.onContextMenu(t),V()};n.addListener(i,"mouseup",$),n.addListener(i,"mousedown",(function(t){t.preventDefault(),V()})),n.addListener(e.renderer.scroller,"contextmenu",$),n.addListener(i,"contextmenu",$),f&&function(t,e,i){var n=null,r=!1;i.addEventListener("keydown",(function(t){n&&clearTimeout(n),r=!0}),!0),i.addEventListener("keyup",(function(t){n=setTimeout((function(){r=!1}),100)}),!0);var s=function(t){if(document.activeElement===i&&!(r||y||e.$mouseHandler.isMousePressed||g)){var n=i.selectionStart,s=i.selectionEnd,o=null,a=0;if(0==n?o=d.up:1==n?o=d.home:s>b&&"\n"==w[s]?o=d.end:n<S&&" "==w[n-1]?(o=d.left,a=p.option):n<S||n==S&&b!=S&&n==s?o=d.left:s>b&&w.slice(0,s).split("\n").length>2?o=d.down:s>b&&" "==w[s-1]?(o=d.right,a=p.option):(s>b||s==b&&b!=S&&n==s)&&(o=d.right),n!==s&&(a|=p.shift),o){if(!e.onCommandKey({},a,o)&&e.commands){o=d.keyCodeToString(o);var h=e.commands.findKeyCommand(a,o);h&&e.execCommand(h)}S=n,b=s,R("")}}};document.addEventListener("selectionchange",s),e.on("destroy",(function(){document.removeEventListener("selectionchange",s)}))}(0,e,i)}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(t,e,i){"use strict";var n=t("../lib/useragent");function r(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(e){t[e]=this[e]}),this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}function s(t,e){if(t.start.row==t.end.row)var i=2*e.column-t.start.column-t.end.column;else i=t.start.row!=t.end.row-1||t.start.column||t.end.column?2*e.row-t.start.row-t.end.row:e.column-4;return i<0?{cursor:t.start,anchor:t.end}:{cursor:t.end,anchor:t.start}}(function(){this.onMouseDown=function(t){var e=t.inSelection(),i=t.getDocumentPosition();this.mousedownEvent=t;var r=this.editor,s=t.getButton();return 0!==s?((r.getSelectionRange().isEmpty()||1==s)&&r.selection.moveToPosition(i),void(2==s&&(r.textInput.onContextMenu(t.domEvent),n.isMozilla||t.preventDefault()))):(this.mousedownEvent.time=Date.now(),!e||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(t),this.startSelect(i,t.domEvent._clicks>1),t.preventDefault()):(this.setState("focusWait"),void this.captureMouse(t)))},this.startSelect=function(t,e){t=t||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(t):e||i.selection.moveToPosition(t),e||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var t,e=this.editor,i=e.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(-1==n)t=this.$clickSelection.end;else if(1==n)t=this.$clickSelection.start;else{var r=s(this.$clickSelection,i);i=r.cursor,t=r.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(i),e.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(t){var e,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),r=i.selection[t](n.row,n.column);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==o&&a<=0)e=this.$clickSelection.end,r.end.row==n.row&&r.end.column==n.column||(n=r.start);else if(1==a&&o>=0)e=this.$clickSelection.start,r.start.row==n.row&&r.start.column==n.column||(n=r.end);else if(-1==o&&1==a)n=r.end,e=r.start;else{var h=s(this.$clickSelection,n);n=h.cursor,e=h.anchor}i.selection.setSelectionAnchor(e.row,e.column)}i.selection.selectToPosition(n),i.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var t,e,i,n,r=(t=this.mousedownEvent.x,e=this.mousedownEvent.y,i=this.x,n=this.y,Math.sqrt(Math.pow(i-t,2)+Math.pow(n-e,2))),s=Date.now();(r>0||s-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(t){var e=t.getDocumentPosition(),i=this.editor,n=i.session.getBracketRange(e);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=i.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},this.onTripleClick=function(t){var e=t.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(e.row,e.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(e.row),this.select()},this.onQuadClick=function(t){var e=this.editor;e.selectAll(),this.$clickSelection=e.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(t){if(!t.getAccelKey()){t.getShiftKey()&&t.wheelY&&!t.wheelX&&(t.wheelX=t.wheelY,t.wheelY=0);var e=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,n=t.domEvent.timeStamp,r=n-i.t,s=r?t.wheelX/r:i.vx,o=r?t.wheelY/r:i.vy;r<550&&(s=(s+i.vx)/2,o=(o+i.vy)/2);var a=Math.abs(s/o),h=!1;return a>=1&&e.renderer.isScrollableBy(t.wheelX*t.speed,0)&&(h=!0),a<=1&&e.renderer.isScrollableBy(0,t.wheelY*t.speed)&&(h=!0),h?i.allowed=n:n-i.allowed<550&&(Math.abs(s)<=1.5*Math.abs(i.vx)&&Math.abs(o)<=1.5*Math.abs(i.vy)?(h=!0,i.allowed=n):i.allowed=0),i.t=n,i.vx=s,i.vy=o,h?(e.renderer.scrollBy(t.wheelX*t.speed,t.wheelY*t.speed),t.stop()):void 0}}}).call(r.prototype),e.DefaultHandlers=r})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(t,e,i){"use strict";t("./lib/oop");var n=t("./lib/dom");function r(t){this.isOpen=!1,this.$element=null,this.$parentNode=t}(function(){this.$init=function(){return this.$element=n.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(t){this.getElement().textContent=t},this.setHtml=function(t){this.getElement().innerHTML=t},this.setPosition=function(t,e){this.getElement().style.left=t+"px",this.getElement().style.top=e+"px"},this.setClassName=function(t){n.addCssClass(this.getElement(),t)},this.show=function(t,e,i){null!=t&&this.setText(t),null!=e&&null!=i&&this.setPosition(e,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(r.prototype),e.Tooltip=r})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(t,e,i){"use strict";var n=t("../lib/dom"),r=t("../lib/oop"),s=t("../lib/event"),o=t("../tooltip").Tooltip;function a(t){o.call(this,t)}r.inherits(a,o),function(){this.setPosition=function(t,e){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),s=this.getHeight();(t+=15)+r>i&&(t-=t+r-i),(e+=15)+s>n&&(e-=20+s),o.prototype.setPosition.call(this,t,e)}}.call(a.prototype),e.GutterHandler=function(t){var e,i,r,o=t.editor,h=o.renderer.$gutterLayer,l=new a(o.container);function u(){e&&(e=clearTimeout(e)),r&&(l.hide(),r=null,o._signal("hideGutterTooltip",l),o.removeEventListener("mousewheel",u))}function c(t){l.setPosition(t.x,t.y)}t.editor.setDefaultHandler("guttermousedown",(function(e){if(o.isFocused()&&0==e.getButton()&&"foldWidgets"!=h.getRegion(e)){var i=e.getDocumentPosition().row,n=o.session.selection;if(e.getShiftKey())n.selectTo(i,0);else{if(2==e.domEvent.detail)return o.selectAll(),e.preventDefault();t.$clickSelection=o.selection.getLineRange(i)}return t.setState("selectByLines"),t.captureMouse(e),e.preventDefault()}})),t.editor.setDefaultHandler("guttermousemove",(function(s){var a=s.domEvent.target||s.domEvent.srcElement;if(n.hasCssClass(a,"ace_fold-widget"))return u();r&&t.$tooltipFollowsMouse&&c(s),i=s,e||(e=setTimeout((function(){e=null,i&&!t.isMousePressed?function(){var e=i.getDocumentPosition().row,n=h.$annotations[e];if(!n)return u();if(e==o.session.getLength()){var s=o.renderer.pixelToScreenCoordinates(0,i.y).row,a=i.$pos;if(s>o.session.documentToScreenRow(a.row,a.column))return u()}if(r!=n)if(r=n.text.join("<br/>"),l.setHtml(r),l.show(),o._signal("showGutterTooltip",l),o.on("mousewheel",u),t.$tooltipFollowsMouse)c(i);else{var d=i.domEvent.target.getBoundingClientRect(),p=l.getElement().style;p.left=d.right+"px",p.top=d.bottom+"px"}}():u()}),50))})),s.addListener(o.renderer.$gutter,"mouseout",(function(t){i=null,r&&!e&&(e=setTimeout((function(){e=null,u()}),50))})),o.on("changeSession",u)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(t,e,i){"use strict";var n=t("../lib/event"),r=t("../lib/useragent"),s=e.MouseEvent=function(t,e){this.domEvent=t,this.editor=e,this.x=this.clientX=t.clientX,this.y=this.clientY=t.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var t=this.editor.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var e=this.getDocumentPosition();this.$inSelection=t.contains(e.row,e.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(s.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(t,e,i){"use strict";var n=t("../lib/dom"),r=t("../lib/event"),s=t("../lib/useragent");function o(t){var e=t.editor,i=n.createElement("img");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(i.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(e){t[e]=this[e]}),this),e.addEventListener("mousedown",this.onMouseDown.bind(t));var o,h,l,u,c,d,p,f,m,g,v,y=e.container,x=0;function E(){var t=d;(function(t,i){var n=Date.now(),r=!i||t.row!=i.row,s=!i||t.column!=i.column;!g||r||s?(e.moveCursorToPosition(t),g=n,v={x:h,y:l}):a(v.x,v.y,h,l)>5?g=null:n-g>=200&&(e.renderer.scrollCursorIntoView(),g=null)})(d=e.renderer.screenToTextCoordinates(h,l),t),function(t,i){var n=Date.now(),r=e.renderer.layerConfig.lineHeight,s=e.renderer.layerConfig.characterWidth,o=e.renderer.scroller.getBoundingClientRect(),a={x:{left:h-o.left,right:o.right-h},y:{top:l-o.top,bottom:o.bottom-l}},u=Math.min(a.x.left,a.x.right),c=Math.min(a.y.top,a.y.bottom),d={row:t.row,column:t.column};u/s<=2&&(d.column+=a.x.left<a.x.right?-3:2),c/r<=1&&(d.row+=a.y.top<a.y.bottom?-1:1);var p=t.row!=d.row,f=t.column!=d.column,g=!i||t.row!=i.row;p||f&&!g?m?n-m>=200&&e.renderer.scrollCursorIntoView(d):m=n:m=null}(d,t)}function T(){c=e.selection.toOrientedRange(),o=e.session.addMarker(c,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),E(),u=setInterval(E,20),x=0,r.addListener(document,"mousemove",S)}function _(){clearInterval(u),e.session.removeMarker(o),o=null,e.selection.fromOrientedRange(c),e.isFocused()&&!f&&e.$resetCursorStyle(),c=null,d=null,x=0,m=null,g=null,r.removeListener(document,"mousemove",S)}this.onDragStart=function(t){if(this.cancelDrag||!y.draggable){var n=this;return setTimeout((function(){n.startSelect(),n.captureMouse(t)}),0),t.preventDefault()}c=e.getSelectionRange();var r=t.dataTransfer;r.effectAllowed=e.getReadOnly()?"copy":"copyMove",s.isOpera&&(e.container.appendChild(i),i.scrollTop=0),r.setDragImage&&r.setDragImage(i,0,0),s.isOpera&&e.container.removeChild(i),r.clearData(),r.setData("Text",e.session.getTextRange()),f=!0,this.setState("drag")},this.onDragEnd=function(t){if(y.draggable=!1,f=!1,this.setState(null),!e.getReadOnly()){var i=t.dataTransfer.dropEffect;p||"move"!=i||e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(t){if(!e.getReadOnly()&&b(t.dataTransfer))return h=t.clientX,l=t.clientY,o||T(),x++,t.dataTransfer.dropEffect=p=C(t),r.preventDefault(t)},this.onDragOver=function(t){if(!e.getReadOnly()&&b(t.dataTransfer))return h=t.clientX,l=t.clientY,o||(T(),x++),null!==w&&(w=null),t.dataTransfer.dropEffect=p=C(t),r.preventDefault(t)},this.onDragLeave=function(t){if(--x<=0&&o)return _(),p=null,r.preventDefault(t)},this.onDrop=function(t){if(d){var i=t.dataTransfer;if(f)switch(p){case"move":c=c.contains(d.row,d.column)?{start:d,end:d}:e.moveText(c,d);break;case"copy":c=e.moveText(c,d,!0)}else{var n=i.getData("Text");c={start:d,end:e.session.insert(d,n)},e.focus(),p=null}return _(),r.preventDefault(t)}},r.addListener(y,"dragstart",this.onDragStart.bind(t)),r.addListener(y,"dragend",this.onDragEnd.bind(t)),r.addListener(y,"dragenter",this.onDragEnter.bind(t)),r.addListener(y,"dragover",this.onDragOver.bind(t)),r.addListener(y,"dragleave",this.onDragLeave.bind(t)),r.addListener(y,"drop",this.onDrop.bind(t));var w=null;function S(){null==w&&(w=setTimeout((function(){null!=w&&o&&_()}),20))}function b(t){var e=t.types;return!e||Array.prototype.some.call(e,(function(t){return"text/plain"==t||"Text"==t}))}function C(t){var e=["copy","copymove","all","uninitialized"],i=s.isMac?t.altKey:t.ctrlKey,n="uninitialized";try{n=t.dataTransfer.effectAllowed.toLowerCase()}catch(t){}var r="none";return i&&e.indexOf(n)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(n)>=0?r="move":e.indexOf(n)>=0&&(r="copy"),r}}function a(t,e,i,n){return Math.sqrt(Math.pow(i-t,2)+Math.pow(n-e,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor;t.container.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var e=s.isWin?"default":"move";t.renderer.setCursorStyle(e),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;s.isIE&&"dragReady"==this.state&&a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&e.dragDrop(),"dragWait"===this.state&&a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,i=t.inSelection(),n=t.getButton();if(1===(t.domEvent.detail||1)&&0===n&&i){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=t.domEvent.target||t.domEvent.srcElement;"unselectable"in r&&(r.unselectable="on"),e.getDragDelay()?(s.isWebKit&&(this.cancelDrag=!0,e.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(o.prototype),e.DragdropHandler=o})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/dom"],(function(t,e,i){"use strict";var n=t("./mouse_event").MouseEvent,r=t("../lib/dom");e.addTouchListeners=function(t,e){var i,s,o,a,h,l,u,c,d,p="scroll",f=0,m=0,g=0,v=0;function y(){var t,i,n;d||(t=window.navigator&&window.navigator.clipboard,i=!1,n=function(n){var s,o,a=n.target.getAttribute("action");if("more"==a||!i)return i=!i,s=e.getCopyText(),o=e.session.getUndoManager().hasUndo(),void d.replaceChild(r.buildDom(i?["span",!s&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],s&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],s&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],t&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),d.firstChild);"paste"==a?t.readText().then((function(t){e.execCommand(a,t)})):a&&("cut"!=a&&"copy"!=a||(t?t.writeText(e.getCopyText()):document.execCommand("copy")),e.execCommand(a)),d.firstChild.style.display="none",i=!1,"openCommandPallete"!=a&&e.focus()},d=r.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(t){p="menu",t.stopPropagation(),t.preventDefault(),e.textInput.focus()},ontouchend:function(t){t.stopPropagation(),t.preventDefault(),n(t)},onclick:n},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],e.container));var s=e.selection.cursor,o=e.renderer.textToScreenCoordinates(s.row,s.column),a=e.container.getBoundingClientRect();d.style.top=o.pageY-a.top-3+"px",d.style.right="10px",d.style.display="",d.firstChild.style.display="none",e.on("input",x)}function x(t){d&&(d.style.display="none"),e.off("input",x)}function E(){h=null,clearTimeout(h);var t=e.selection.getRange(),i=t.contains(u.row,u.column);!t.isEmpty()&&i||(e.selection.moveToPosition(u),e.selection.selectWord()),p="wait",y()}t.addEventListener("contextmenu",(function(t){c&&e.textInput.getElement().focus()})),t.addEventListener("touchstart",(function(t){var r=t.touches;if(h||r.length>1)return clearTimeout(h),h=null,o=-1,void(p="zoom");c=e.$mouseHandler.isMousePressed=!0;var l=e.renderer.layerConfig.lineHeight,d=e.renderer.layerConfig.lineHeight,y=t.timeStamp;a=y;var x=r[0],T=x.clientX,_=x.clientY;Math.abs(i-T)+Math.abs(s-_)>l&&(o=-1),i=t.clientX=T,s=t.clientY=_,g=v=0;var w=new n(t,e);if(u=w.getDocumentPosition(),y-o<500&&1==r.length&&!f)m++,t.preventDefault(),t.button=0,function(){h=null,clearTimeout(h),e.selection.moveToPosition(u);var t=m>=2?e.selection.getLineRange(u.row):e.session.getBracketRange(u);t&&!t.isEmpty()?e.selection.setRange(t):e.selection.selectWord(),p="wait"}();else{m=0;var S=e.selection.cursor,b=e.selection.isEmpty()?S:e.selection.anchor,C=e.renderer.$cursorLayer.getPixelPosition(S,!0),A=e.renderer.$cursorLayer.getPixelPosition(b,!0),R=e.renderer.scroller.getBoundingClientRect(),M=function(t,e){return(t/=d)*t+(e=e/l-.75)*e};if(t.clientX<R.left)return void(p="zoom");var L=M(t.clientX-R.left-C.left,t.clientY-R.top-C.top),O=M(t.clientX-R.left-A.left,t.clientY-R.top-A.top);L<3.5&&O<3.5&&(p=L>O?"cursor":"anchor"),p=O<3.5?"anchor":L<3.5?"cursor":"scroll",h=setTimeout(E,450)}o=y})),t.addEventListener("touchend",(function(t){c=e.$mouseHandler.isMousePressed=!1,l&&clearInterval(l),"zoom"==p?(p="",f=0):h?(e.selection.moveToPosition(u),f=0,y()):"scroll"==p?(f+=60,l=setInterval((function(){f--<=0&&(clearInterval(l),l=null),Math.abs(g)<.01&&(g=0),Math.abs(v)<.01&&(v=0),f<20&&(g*=.9),f<20&&(v*=.9);var t=e.session.getScrollTop();e.renderer.scrollBy(10*g,10*v),t==e.session.getScrollTop()&&(f=0)}),10),t.preventDefault(),x()):y(),clearTimeout(h),h=null})),t.addEventListener("touchmove",(function(t){h&&(clearTimeout(h),h=null);var r=t.touches;if(!(r.length>1||"zoom"==p)){var o=r[0],l=i-o.clientX,u=s-o.clientY;if("wait"==p){if(!(l*l+u*u>4))return t.preventDefault();p="cursor"}i=o.clientX,s=o.clientY,t.clientX=o.clientX,t.clientY=o.clientY;var c=t.timeStamp,d=c-a;if(a=c,"scroll"==p){var f=new n(t,e);f.speed=1,f.wheelX=l,f.wheelY=u,10*Math.abs(l)<Math.abs(u)&&(l=0),10*Math.abs(u)<Math.abs(l)&&(u=0),0!=d&&(g=l/d,v=u/d),e._emit("mousewheel",f),f.propagationStopped||(g=v=0)}else{var m=new n(t,e).getDocumentPosition();"cursor"==p?e.selection.moveCursorToPosition(m):"anchor"==p&&e.selection.setSelectionAnchor(m.row,m.column),e.renderer.scrollCursorIntoView(m),t.preventDefault()}}}))}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(t,e,i){"use strict";var n=t("./dom");e.get=function(t,e){var i=new XMLHttpRequest;i.open("GET",t,!0),i.onreadystatechange=function(){4===i.readyState&&e(i.responseText)},i.send(null)},e.loadScript=function(t,e){var i=n.getDocumentHead(),r=document.createElement("script");r.src=t,i.appendChild(r),r.onload=r.onreadystatechange=function(t,i){!i&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,i||e())}},e.qualifyURL=function(t){var e=document.createElement("a");return e.href=t,e.href}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(t,e,i){"use strict";var n={},r=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(t,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[t]||[],n=this._defaultHandlers[t];if(i.length||n){"object"==typeof e&&e||(e={}),e.type||(e.type=t),e.stopPropagation||(e.stopPropagation=r),e.preventDefault||(e.preventDefault=s),i=i.slice();for(var o=0;o<i.length&&(i[o](e,this),!e.propagationStopped);o++);return n&&!e.defaultPrevented?n(e,this):void 0}},n._signal=function(t,e){var i=(this._eventRegistry||{})[t];if(i){i=i.slice();for(var n=0;n<i.length;n++)i[n](e,this)}},n.once=function(t,e){var i=this;if(this.addEventListener(t,(function n(){i.removeEventListener(t,n),e.apply(null,arguments)})),!e)return new Promise((function(t){e=t}))},n.setDefaultHandler=function(t,e){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[t]){var n=i[t],r=i._disabled_[t];r||(i._disabled_[t]=r=[]),r.push(n);var s=r.indexOf(e);-1!=s&&r.splice(s,1)}i[t]=e},n.removeDefaultHandler=function(t,e){var i=this._defaultHandlers;if(i){var n=i._disabled_[t];if(i[t]==e)n&&this.setDefaultHandler(t,n.pop());else if(n){var r=n.indexOf(e);-1!=r&&n.splice(r,1)}}},n.on=n.addEventListener=function(t,e,i){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[t];return n||(n=this._eventRegistry[t]=[]),-1==n.indexOf(e)&&n[i?"unshift":"push"](e),e},n.off=n.removeListener=n.removeEventListener=function(t,e){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[t];if(i){var n=i.indexOf(e);-1!==n&&i.splice(n,1)}},n.removeAllListeners=function(t){this._eventRegistry&&(this._eventRegistry[t]=[])},e.EventEmitter=n})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,i){var n=t("./oop"),r=t("./event_emitter").EventEmitter,s={setOptions:function(t){Object.keys(t).forEach((function(e){this.setOption(e,t[e])}),this)},getOptions:function(t){var e={};if(t)Array.isArray(t)||(e=t,t=Object.keys(e));else{var i=this.$options;t=Object.keys(i).filter((function(t){return!i[t].hidden}))}return t.forEach((function(t){e[t]=this.getOption(t)}),this),e},setOption:function(t,e){if(this["$"+t]!==e){var i=this.$options[t];if(!i)return o('misspelled option "'+t+'"');if(i.forwardTo)return this[i.forwardTo]&&this[i.forwardTo].setOption(t,e);i.handlesSet||(this["$"+t]=e),i&&i.set&&i.set.call(this,e)}},getOption:function(t){var e=this.$options[t];return e?e.forwardTo?this[e.forwardTo]&&this[e.forwardTo].getOption(t):e&&e.get?e.get.call(this):this["$"+t]:o('misspelled option "'+t+'"')}};function o(t){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function a(t,e){var i=new Error(t);i.data=e,"object"==typeof console&&console.error&&console.error(i),setTimeout((function(){throw i}))}var h=function(){this.$defaultOptions={}};(function(){n.implement(this,r),this.defineOptions=function(t,e,i){return t.$options||(this.$defaultOptions[e]=t.$options={}),Object.keys(i).forEach((function(e){var n=i[e];"string"==typeof n&&(n={forwardTo:n}),n.name||(n.name=e),t.$options[n.name]=n,"initialValue"in n&&(t["$"+n.name]=n.initialValue)})),n.implement(t,s),this},this.resetOptions=function(t){Object.keys(t.$options).forEach((function(e){var i=t.$options[e];"value"in i&&t.setOption(e,i.value)}))},this.setDefaultValue=function(t,e,i){if(!t){for(t in this.$defaultOptions)if(this.$defaultOptions[t][e])break;if(!this.$defaultOptions[t][e])return!1}var n=this.$defaultOptions[t]||(this.$defaultOptions[t]={});n[e]&&(n.forwardTo?this.setDefaultValue(n.forwardTo,e,i):n[e].value=i)},this.setDefaultValues=function(t,e){Object.keys(e).forEach((function(i){this.setDefaultValue(t,i,e[i])}),this)},this.warn=o,this.reportError=a}).call(h.prototype),e.AppConfig=h})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],(function(t,e,n){var r=t("./lib/lang"),s=(t("./lib/oop"),t("./lib/net")),o=t("./lib/app_config").AppConfig;n.exports=e=new o;var a=function(){return this||"undefined"!=typeof window&&window}(),h={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1};e.get=function(t){if(!h.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return h[t]},e.set=function(t,e){if(h.hasOwnProperty(t))h[t]=e;else if(0==this.setDefaultValue("",t,e))throw new Error("Unknown config key: "+t)},e.all=function(){return r.copyObject(h)},e.$modes={},e.moduleUrl=function(t,e){if(h.$moduleUrls[t])return h.$moduleUrls[t];var i=t.split("/"),n="snippets"==(e=e||i[i.length-2]||"")?"/":"-",r=i[i.length-1];if("worker"==e&&"-"==n){var s=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");r=r.replace(s,"")}(!r||r==e)&&i.length>1&&(r=i[i.length-2]);var o=h[e+"Path"];return null==o?o=h.basePath:"/"==n&&(e=n=""),o&&"/"!=o.slice(-1)&&(o+="/"),o+e+n+r+this.get("suffix")},e.setModuleUrl=function(t,e){return h.$moduleUrls[t]=e},e.$loading={},e.loadModule=function(i,n){var r,o;Array.isArray(i)&&(o=i[0],i=i[1]);try{r=t(i)}catch(t){}if(r&&!e.$loading[i])return n&&n(r);if(e.$loading[i]||(e.$loading[i]=[]),e.$loading[i].push(n),!(e.$loading[i].length>1)){var a=function(){t([i],(function(t){e._emit("load.module",{name:i,module:t});var n=e.$loading[i];e.$loading[i]=null,n.forEach((function(e){e&&e(t)}))}))};if(!e.get("packaged"))return a();s.loadScript(e.moduleUrl(i,o),a),l()}};var l=function(){h.basePath||h.workerPath||h.modePath||h.themePath||Object.keys(h.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),l=function(){})};function u(r){if(a&&a.document){h.packaged=r||t.packaged||n.packaged||a.define&&i.amdD.packaged;for(var s,o={},l="",u=document.currentScript||document._currentScript,c=(u&&u.ownerDocument||document).getElementsByTagName("script"),d=0;d<c.length;d++){var p=c[d],f=p.src||p.getAttribute("src");if(f){for(var m=p.attributes,g=0,v=m.length;g<v;g++){var y=m[g];0===y.name.indexOf("data-ace-")&&(o[(s=y.name.replace(/^data-ace-/,""),s.replace(/-(.)/g,(function(t,e){return e.toUpperCase()})))]=y.value)}var x=f.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);x&&(l=x[1])}}for(var E in l&&(o.base=o.base||l,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base,o)void 0!==o[E]&&e.set(E,o[E])}}u(!0),e.init=u,e.version="1.4.7"})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(t,e,i){"use strict";var n=t("../lib/event"),r=t("../lib/useragent"),s=t("./default_handlers").DefaultHandlers,o=t("./default_gutter_handler").GutterHandler,a=t("./mouse_event").MouseEvent,h=t("./dragdrop_handler").DragdropHandler,l=t("./touch_handler").addTouchListeners,u=t("../config"),c=function(t){var e=this;this.editor=t,new s(this),new o(this),new h(this);var i=function(e){(!document.hasFocus||!document.hasFocus()||!t.isFocused()&&document.activeElement==(t.textInput&&t.textInput.getElement()))&&window.focus(),t.focus()},a=t.renderer.getMouseEventTarget();n.addListener(a,"click",this.onMouseEvent.bind(this,"click")),n.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener([a,t.renderer.scrollBarV&&t.renderer.scrollBarV.inner,t.renderer.scrollBarH&&t.renderer.scrollBarH.inner,t.textInput&&t.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),n.addMouseWheelListener(t.container,this.onMouseWheel.bind(this,"mousewheel")),l(t.container,t);var u=t.renderer.$gutter;n.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(a,"mousedown",i),n.addListener(u,"mousedown",i),r.isIE&&t.renderer.scrollBarV&&(n.addListener(t.renderer.scrollBarV.element,"mousedown",i),n.addListener(t.renderer.scrollBarH.element,"mousedown",i)),t.on("mousemove",(function(i){if(!e.state&&!e.$dragDelay&&e.$dragEnabled){var n=t.renderer.screenToTextCoordinates(i.x,i.y),r=t.session.selection.getRange(),s=t.renderer;!r.isEmpty()&&r.insideStart(n.row,n.column)?s.setCursorStyle("default"):s.setCursorStyle("")}}))};(function(){this.onMouseEvent=function(t,e){this.editor._emit(t,new a(e,this.editor))},this.onMouseMove=function(t,e){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(t,new a(e,this.editor))},this.onMouseWheel=function(t,e){var i=new a(e,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=e.wheelX,i.wheelY=e.wheelY,this.editor._emit(t,i)},this.setState=function(t){this.state=t},this.captureMouse=function(t,e){this.x=t.x,this.y=t.y,this.isMousePressed=!0;var i=this.editor,s=this.editor.renderer;s.$isMousePressed=!0;var o=this,h=function(t){if(t){if(r.isWebKit&&!t.which&&o.releaseMouse)return o.releaseMouse();o.x=t.clientX,o.y=t.clientY,e&&e(t),o.mouseEvent=new a(t,o.editor),o.$mouseMoved=!0}},l=function(t){i.off("beforeEndOperation",c),clearInterval(d),u(),o[o.state+"End"]&&o[o.state+"End"](t),o.state="",o.isMousePressed=s.$isMousePressed=!1,s.$keepTextAreaAtCursor&&s.$moveTextAreaToCursor(),o.$onCaptureMouseMove=o.releaseMouse=null,t&&o.onMouseEvent("mouseup",t),i.endOperation()},u=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(r.isOldIE&&"dblclick"==t.domEvent.type)return setTimeout((function(){l(t)}));var c=function(t){o.releaseMouse&&i.curOp.command.name&&i.curOp.selectionChanged&&(o[o.state+"End"]&&o[o.state+"End"](),o.state="",o.releaseMouse())};i.on("beforeEndOperation",c),i.startOperation({command:{name:"mouse"}}),o.$onCaptureMouseMove=h,o.releaseMouse=n.capture(this.editor.container,h,l);var d=setInterval(u,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var t=function(e){e&&e.domEvent&&"contextmenu"!=e.domEvent.type||(this.editor.off("nativecontextmenu",t),e&&e.domEvent&&n.stopEvent(e.domEvent))}.bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)}}).call(c.prototype),u.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),e.MouseHandler=c})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(t,e,i){"use strict";var n=t("../lib/dom");e.FoldHandler=function(t){t.on("click",(function(e){var i=e.getDocumentPosition(),r=t.session,s=r.getFoldAt(i.row,i.column,1);s&&(e.getAccelKey()?r.removeFold(s):r.expandFold(s),e.stop());var o=e.domEvent&&e.domEvent.target;o&&n.hasCssClass(o,"ace_inline_button")&&n.hasCssClass(o,"ace_toggle_wrap")&&(r.setOption("wrap",!r.getUseWrapMode()),t.renderer.scrollCursorIntoView())})),t.on("gutterclick",(function(e){if("foldWidgets"==t.renderer.$gutterLayer.getRegion(e)){var i=e.getDocumentPosition().row,n=t.session;n.foldWidgets&&n.foldWidgets[i]&&t.session.onFoldWidgetClick(i,e),t.isFocused()||t.focus(),e.stop()}})),t.on("gutterdblclick",(function(e){if("foldWidgets"==t.renderer.$gutterLayer.getRegion(e)){var i=e.getDocumentPosition().row,n=t.session,r=n.getParentFoldRangeData(i,!0),s=r.range||r.firstRange;if(s){i=s.start.row;var o=n.getFoldAt(i,n.getLine(i).length,1);o?n.removeFold(o):(n.addFold("...",s),t.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}e.stop()}}))}})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(t,e,i){"use strict";var n=t("../lib/keys"),r=t("../lib/event"),s=function(t){this.$editor=t,this.$data={editor:t},this.$handlers=[],this.setDefaultHandler(t.commands)};(function(){this.setDefaultHandler=function(t){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=t,this.addKeyboardHandler(t,0)},this.setKeyboardHandler=function(t){var e=this.$handlers;if(e[e.length-1]!=t){for(;e[e.length-1]&&e[e.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(e[e.length-1]);this.addKeyboardHandler(t,1)}},this.addKeyboardHandler=function(t,e){if(t){"function"!=typeof t||t.handleKeyboard||(t.handleKeyboard=t);var i=this.$handlers.indexOf(t);-1!=i&&this.$handlers.splice(i,1),null==e?this.$handlers.push(t):this.$handlers.splice(e,0,t),-1==i&&t.attach&&t.attach(this.$editor)}},this.removeKeyboardHandler=function(t){var e=this.$handlers.indexOf(t);return-1!=e&&(this.$handlers.splice(e,1),t.detach&&t.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var t=this.$data,e=t.editor;return this.$handlers.map((function(i){return i.getStatusText&&i.getStatusText(e,t)||""})).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(t,e,i,n){for(var s,o=!1,a=this.$editor.commands,h=this.$handlers.length;h--&&!((s=this.$handlers[h].handleKeyboard(this.$data,t,e,i,n))&&s.command&&((o="null"==s.command||a.exec(s.command,this.$editor,s.args,n))&&n&&-1!=t&&1!=s.passEvent&&1!=s.command.passEvent&&r.stopEvent(n),o)););return o||-1!=t||(s={command:"insertstring"},o=a.exec("insertstring",this.$editor,e)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",s),o},this.onCommandKey=function(t,e,i){var r=n.keyCodeToString(i);return this.$callKeyboardHandlers(e,r,i,t)},this.onTextInput=function(t){return this.$callKeyboardHandlers(-1,t)}}).call(s.prototype),e.KeyBinding=s})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(t,e,i){"use strict";var n=0,r=0,s=!1,o=!1,a=!1,h=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=11,c=18,d=[c,c,c,c,c,c,c,c,c,6,5,6,8,5,c,c,c,c,c,c,c,c,c,c,c,c,c,c,5,5,5,6,8,4,4,u,u,u,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,c,c,c,c,c,c,5,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,9,4,u,u,u,u,4,4,4,4,0,4,4,c,4,4,u,u,2,2,4,0,4,4,4,2,0,4,4,4,4,4],p=[8,8,8,8,8,8,8,8,8,8,8,c,c,c,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,u,u,u,u,u,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8];function f(t,e,i){if(!(r<t))if(1!=t||1!=n||o)for(var s,a,h,l,u=i.length,c=0;c<u;){if(e[c]>=t){for(s=c+1;s<u&&e[s]>=t;)s++;for(a=c,h=s-1;a<h;a++,h--)l=i[a],i[a]=i[h],i[h]=l;c=s}c++}else i.reverse()}function m(t,e,i,r){var h,l,d,p,f=e[r];switch(f){case 0:case 1:s=!1;case 4:case 3:return f;case 2:return s?3:2;case 7:return s=!0,1;case 8:return 4;case 9:return r<1||r+1>=e.length||2!=(h=i[r-1])&&3!=h||2!=(l=e[r+1])&&3!=l?4:(s&&(l=3),l==h?l:4);case 10:return 2==(h=r>0?i[r-1]:5)&&r+1<e.length&&2==e[r+1]?2:4;case u:if(r>0&&2==i[r-1])return 2;if(s)return 4;for(p=r+1,d=e.length;p<d&&e[p]==u;)p++;return p<d&&2==e[p]?2:4;case 12:for(d=e.length,p=r+1;p<d&&12==e[p];)p++;if(p<d){var m=t[r],g=m>=1425&&m<=2303||64286==m;if(h=e[p],g&&(1==h||7==h))return 1}return r<1||5==(h=e[r-1])?4:i[r-1];case 5:return s=!1,o=!0,n;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:s=!1;case c:return 4}}function g(t){var e=t.charCodeAt(0),i=e>>8;return 0==i?e>191?0:d[e]:5==i?/[\u0591-\u05f4]/.test(t)?1:0:6==i?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(t)?12:/[\u0660-\u0669\u066b-\u066c]/.test(t)?3:1642==e?u:/[\u06f0-\u06f9]/.test(t)?2:7:32==i&&e<=8287?p[255&e]:254==i&&e>=65136?7:4}e.L=0,e.R=1,e.EN=2,e.ON_R=3,e.AN=4,e.R_H=5,e.B=6,e.RLE=7,e.DOT="·",e.doBidiReorder=function(t,i,u){if(t.length<2)return{};var d=t.split(""),p=new Array(d.length),v=new Array(d.length),y=[];n=u?1:0,function(t,e,i,u){var c=n?l:h,d=null,p=null,f=null,v=0,y=null,x=-1,E=null,T=null,_=[];if(!u)for(E=0,u=[];E<i;E++)u[E]=g(t[E]);for(r=n,s=!1,o=!1,a=!1,T=0;T<i;T++){if(d=v,_[T]=p=m(t,u,_,T),y=240&(v=c[d][p]),v&=15,e[T]=f=c[v][5],y>0)if(16==y){for(E=x;E<T;E++)e[E]=1;x=-1}else x=-1;if(c[v][6])-1==x&&(x=T);else if(x>-1){for(E=x;E<T;E++)e[E]=f;x=-1}5==u[T]&&(e[T]=0),r|=f}if(a)for(E=0;E<i;E++)if(6==u[E]){e[E]=n;for(var w=E-1;w>=0&&8==u[w];w--)e[w]=n}}(d,y,d.length,i);for(var x=0;x<p.length;p[x]=x,x++);for(f(2,y,p),f(1,y,p),x=0;x<p.length-1;x++)3===i[x]?y[x]=e.AN:1===y[x]&&(i[x]>7&&i[x]<13||4===i[x]||i[x]===c)?y[x]=e.ON_R:x>0&&"ل"===d[x-1]&&/\u0622|\u0623|\u0625|\u0627/.test(d[x])&&(y[x-1]=y[x]=e.R_H,x++);for(d[d.length-1]===e.DOT&&(y[d.length-1]=e.B),""===d[0]&&(y[0]=e.RLE),x=0;x<p.length;x++)v[x]=y[p[x]];return{logicalFromVisual:p,bidiLevels:v}},e.hasBidiCharacters=function(t,e){for(var i=!1,n=0;n<t.length;n++)e[n]=g(t.charAt(n)),i||1!=e[n]&&7!=e[n]&&3!=e[n]||(i=!0);return i},e.getVisualFromLogicalIdx=function(t,e){for(var i=0;i<e.logicalFromVisual.length;i++)if(e.logicalFromVisual[i]==t)return i;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(t,e,i){"use strict";var n=t("./lib/bidiutil"),r=t("./lib/lang"),s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,o=function(t){this.session=t,this.bidiMap={},this.currentRow=null,this.bidiUtil=n,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=s.test(t.getValue())};(function(){this.isBidiRow=function(t,e,i){return!!this.seenBidi&&(t!==this.currentRow&&(this.currentRow=t,this.updateRowLine(e,i),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(t){this.seenBidi?this.currentRow=null:"insert"==t.action&&s.test(t.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var t=0,e=this.session.$screenRowCache;if(e.length){var i=this.session.$getRowCacheIndex(e,this.currentRow);i>=0&&(t=this.session.$docRowCache[i])}return t},this.getSplitIndex=function(){var t=0,e=this.session.$screenRowCache;if(e.length)for(var i,n=this.session.$getRowCacheIndex(e,this.currentRow);this.currentRow-t>0&&(i=this.session.$getRowCacheIndex(e,this.currentRow-t-1))===n;)n=i,t++;else t=this.currentRow;return t},this.updateRowLine=function(t,e){void 0===t&&(t=this.getDocumentRow());var i=t===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(t),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[t];s&&(void 0===e&&(e=this.getSplitIndex()),e>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[n.L],this.line=e<s.length?this.line.substring(s[e-1],s[e]):this.line.substring(s[s.length-1])):this.line=this.line.substring(0,s[e])),e==s.length&&(this.line+=this.showInvisibles?i:n.DOT)}else this.line+=this.showInvisibles?i:n.DOT;var o,a=this.session,h=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(t,e){return"\t"===t||a.isFullWidth(t.charCodeAt(0))?(o="\t"===t?a.getScreenTabSize(e+h):2,h+=o-1,r.stringRepeat(n.DOT,o)):t})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==n.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},this.updateBidiMap=function(){var t=[];n.hasBidiCharacters(this.line,t)||this.isRtlDir?this.bidiMap=n.doBidiReorder(this.line,t,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(t){if(this.characterWidth!==t.$characterSize.width){this.fontMetrics=t;var e=this.characterWidth=t.$characterSize.width,i=t.$measureCharWidth("ה");this.charWidths[n.L]=this.charWidths[n.EN]=this.charWidths[n.ON_R]=e,this.charWidths[n.R]=this.charWidths[n.AN]=i,this.charWidths[n.R_H]=.45*i,this.charWidths[n.B]=this.charWidths[n.RLE]=0,this.currentRow=null}},this.setShowInvisibles=function(t){this.showInvisibles=t,this.currentRow=null},this.setEolChar=function(t){this.EOL=t},this.setContentWidth=function(t){this.contentWidth=t},this.isRtlLine=function(t){return!!this.$isRtl||(null!=t?this.session.getLine(t).charAt(0)==this.RLE:this.isRtlDir)},this.setRtlDirection=function(t,e){for(var i=t.getCursorPosition(),n=t.selection.getSelectionAnchor().row;n<=i.row;n++)e||t.session.getLine(n).charAt(0)!==t.session.$bidiHandler.RLE?e&&t.session.getLine(n).charAt(0)!==t.session.$bidiHandler.RLE&&t.session.doc.insert({column:0,row:n},t.session.$bidiHandler.RLE):t.session.doc.removeInLine(n,0,1)},this.getPosLeft=function(t){t-=this.wrapIndent;var e=this.line.charAt(0)===this.RLE?1:0,i=t>e?this.session.getOverwrite()?t:t-1:e,r=n.getVisualFromLogicalIdx(i,this.bidiMap),s=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&t<=e&&s[r]%2!=0&&r++;for(var a=0;a<r;a++)o+=this.charWidths[s[a]];return!this.session.getOverwrite()&&t>e&&s[r]%2==0&&(o+=this.charWidths[s[r]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},this.getSelections=function(t,e){var i,n=this.bidiMap,r=n.bidiLevels,s=[],o=0,a=Math.min(t,e)-this.wrapIndent,h=Math.max(t,e)-this.wrapIndent,l=!1,u=!1,c=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,p=0;p<r.length;p++)d=n.logicalFromVisual[p],i=r[p],(l=d>=a&&d<h)&&!u?c=o:!l&&u&&s.push({left:c,width:o-c}),o+=this.charWidths[i],u=l;if(l&&p===r.length&&s.push({left:c,width:o-c}),this.isRtlDir)for(var f=0;f<s.length;f++)s[f].left+=this.rtlLineOffset;return s},this.offsetToCol=function(t){this.isRtlDir&&(t-=this.rtlLineOffset);var e=0,i=(t=Math.max(t,0),0),n=0,r=this.bidiMap.bidiLevels,s=this.charWidths[r[n]];for(this.wrapIndent&&(t-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);t>i+s/2;){if(i+=s,n===r.length-1){s=0;break}s=this.charWidths[r[++n]]}return n>0&&r[n-1]%2!=0&&r[n]%2==0?(t<i&&n--,e=this.bidiMap.logicalFromVisual[n]):n>0&&r[n-1]%2==0&&r[n]%2!=0?e=1+(t>i?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===r.length-1&&0===s&&r[n-1]%2==0||!this.isRtlDir&&0===n&&r[n]%2!=0?e=1+this.bidiMap.logicalFromVisual[n]:(n>0&&r[n-1]%2!=0&&0!==s&&n--,e=this.bidiMap.logicalFromVisual[n]),0===e&&this.isRtlDir&&e++,e+this.wrapIndent}}).call(o.prototype),e.BidiHandler=o})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(t,e,i){"use strict";var n=t("./lib/oop"),r=t("./lib/lang"),s=t("./lib/event_emitter").EventEmitter,o=t("./range").Range,a=function(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var e=this;this.cursor.on("change",(function(t){e.$cursorChanged=!0,e.$silent||e._emit("changeCursor"),e.$isEmpty||e.$silent||e._emit("changeSelection"),e.$keepDesiredColumnOnChange||t.old.column==t.value.column||(e.$desiredColumn=null)})),this.anchor.on("change",(function(){e.$anchorChanged=!0,e.$isEmpty||e.$silent||e._emit("changeSelection")}))};(function(){n.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(t,e){this.$isEmpty=!1,this.anchor.setPosition(t,e)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var t=this.anchor,e=this.lead;return t.row>e.row||t.row==e.row&&t.column>e.column},this.getRange=function(){var t=this.anchor,e=this.lead;return this.$isEmpty?o.fromPoints(e,e):this.isBackwards()?o.fromPoints(e,t):o.fromPoints(t,e)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(t,e){var i=e?t.end:t.start,n=e?t.start:t.end;this.$setSelection(i.row,i.column,n.row,n.column)},this.$setSelection=function(t,e,i,n){var r=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,e),this.cursor.setPosition(i,n),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||s)&&this._emit("changeSelection")},this.$moveSelection=function(t){var e=this.lead;this.$isEmpty&&this.setSelectionAnchor(e.row,e.column),t.call(this)},this.selectTo=function(t,e){this.$moveSelection((function(){this.moveCursorTo(t,e)}))},this.selectToPosition=function(t){this.$moveSelection((function(){this.moveCursorToPosition(t)}))},this.moveTo=function(t,e){this.clearSelection(),this.moveCursorTo(t,e)},this.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(t,e){if(void 0===e){var i=t||this.lead;t=i.row,e=i.column}return this.session.getWordRange(t,e)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var t=this.getCursor(),e=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(e)},this.getLineRange=function(t,e){var i,n="number"==typeof t?t:this.lead.row,r=this.session.getFoldLine(n);return r?(n=r.start.row,i=r.end.row):i=n,!0===e?new o(n,0,i,this.session.getLine(i).length):new o(n,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(t,e,i){var n=t.column,r=t.column+e;return i<0&&(n=t.column-e,r=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(n,r).split(" ").length-1==e},this.moveCursorLeft=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(0===e.column)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var i=this.session.getTabSize();e=this.lead,this.wouldMoveIntoSoftTab(e,i,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var t=this.lead.row,e=this.lead.column,i=this.session.documentToScreenRow(t,e),n=this.session.screenToDocumentPosition(i,0),r=this.session.getDisplayLine(t,null,n.row,n.column).match(/^\s*/);r[0].length==e||this.session.$useEmacsStyleLineStart||(n.column+=r[0].length),this.moveCursorToPosition(n)},this.moveCursorLineEnd=function(){var t=this.lead,e=this.session.getDocumentLastRowColumnPosition(t.row,t.column);if(this.lead.column==e.column){var i=this.session.getLine(e.row);if(e.column==i.length){var n=i.search(/\s+$/);n>0&&(e.column=n)}}this.moveCursorTo(e.row,e.column)},this.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,e=this.doc.getLine(t).length;this.moveCursorTo(t,e)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var t=this.lead.row,e=this.lead.column,i=this.doc.getLine(t),n=i.substring(e);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(t,e,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(n)&&(e+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(e)),e>=i.length)return this.moveCursorTo(t,i.length),this.moveCursorRight(),void(t<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(n)&&(e+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,e)}},this.moveCursorLongWordLeft=function(){var t,e=this.lead.row,i=this.lead.column;if(t=this.session.getFoldAt(e,i,-1))this.moveCursorTo(t.start.row,t.start.column);else{var n=this.session.getFoldStringAt(e,i,-1);null==n&&(n=this.doc.getLine(e).substring(0,i));var s=r.stringReverse(n);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(s)&&(i-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),i<=0)return this.moveCursorTo(e,0),this.moveCursorLeft(),void(e>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(s)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,i)}},this.$shortWordEndIndex=function(t){var e,i=0,n=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(t))i=this.session.tokenRe.lastIndex;else{for(;(e=t[i])&&n.test(e);)i++;if(i<1)for(r.lastIndex=0;(e=t[i])&&!r.test(e);)if(r.lastIndex=0,i++,n.test(e)){if(i>2){i--;break}for(;(e=t[i])&&n.test(e);)i++;if(i>2)break}}return r.lastIndex=0,i},this.moveCursorShortWordRight=function(){var t=this.lead.row,e=this.lead.column,i=this.doc.getLine(t),n=i.substring(e),r=this.session.getFoldAt(t,e,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(e==i.length){var s=this.doc.getLength();do{t++,n=this.doc.getLine(t)}while(t<s&&/^\s*$/.test(n));/^\s+/.test(n)||(n=""),e=0}var o=this.$shortWordEndIndex(n);this.moveCursorTo(t,e+o)},this.moveCursorShortWordLeft=function(){var t,e=this.lead.row,i=this.lead.column;if(t=this.session.getFoldAt(e,i,-1))return this.moveCursorTo(t.start.row,t.start.column);var n=this.session.getLine(e).substring(0,i);if(0===i){do{e--,n=this.doc.getLine(e)}while(e>0&&/^\s*$/.test(n));i=n.length,/\s+$/.test(n)||(n="")}var s=r.stringReverse(n),o=this.$shortWordEndIndex(s);return this.moveCursorTo(e,i-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(t,e){var i,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===e&&(0!==t&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var r=this.session.screenToDocumentPosition(n.row+t,n.column,i);0!==t&&0===e&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&(r.row>0||t>0)&&r.row++,this.moveCursorTo(r.row,r.column+e,0===e)},this.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},this.moveCursorTo=function(t,e,i){var n=this.session.getFoldAt(t,e,1);n&&(t=n.start.row,e=n.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(r.charAt(e))&&r.charAt(e-1)&&(this.lead.row==t&&this.lead.column==e+1?e-=1:e+=1),this.lead.setPosition(t,e),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(t,e,i){var n=this.session.screenToDocumentPosition(t,e);this.moveCursorTo(n.row,n.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(t){var e=this.getRange();return t?(t.start.column=e.start.column,t.start.row=e.start.row,t.end.column=e.end.column,t.end.row=e.end.row):t=e,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},this.getRangeOfMovements=function(t){var e=this.getCursor();try{t(this);var i=this.getCursor();return o.fromPoints(e,i)}catch(t){return o.fromPoints(e,e)}finally{this.moveCursorToPosition(e)}},this.toJSON=function(){if(this.rangeCount)var t=this.ranges.map((function(t){var e=t.clone();return e.isBackwards=t.cursor==t.start,e}));else(t=this.getRange()).isBackwards=this.isBackwards();return t},this.fromJSON=function(t){if(null==t.start){if(this.rangeList&&t.length>1){this.toSingleRange(t[0]);for(var e=t.length;e--;){var i=o.fromPoints(t[e].start,t[e].end);t[e].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}t=t[0]}this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},this.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var e=this.ranges.length;e--;)if(!this.ranges[e].isEqual(t[e]))return!1;return!0}}).call(a.prototype),e.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(t,e,i){"use strict";var n=t("./config"),r=2e3,s=function(t){for(var e in this.states=t,this.regExps={},this.matchMappings={},this.states){for(var i=this.states[e],n=[],r=0,s=this.matchMappings[e]={defaultToken:"text"},o="g",a=[],h=0;h<i.length;h++){var l=i[h];if(l.defaultToken&&(s.defaultToken=l.defaultToken),l.caseInsensitive&&(o="gi"),null!=l.regex){l.regex instanceof RegExp&&(l.regex=l.regex.toString().slice(1,-1));var u=l.regex,c=new RegExp("(?:("+u+")|(.))").exec("a").length-2;Array.isArray(l.token)?1==l.token.length||1==c?l.token=l.token[0]:c-1!=l.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:l,groupCount:c-1}),l.token=l.token[0]):(l.tokenArray=l.token,l.token=null,l.onMatch=this.$arrayTokens):"function"!=typeof l.token||l.onMatch||(l.onMatch=c>1?this.$applyToken:l.token),c>1&&(/\\\d/.test(l.regex)?u=l.regex.replace(/\\([0-9]+)/g,(function(t,e){return"\\"+(parseInt(e,10)+r+1)})):(c=1,u=this.removeCapturingGroups(l.regex)),l.splitRegex||"string"==typeof l.token||a.push(l)),s[r]=h,r+=c,n.push(u),l.onMatch||(l.onMatch=null)}}n.length||(s[0]=0,n.push("$")),a.forEach((function(t){t.splitRegex=this.createSplitterRegexp(t.regex,o)}),this),this.regExps[e]=new RegExp("("+n.join(")|(")+")|($)",o)}};(function(){this.$setMaxTokenCount=function(t){r=0|t},this.$applyToken=function(t){var e=this.splitRegex.exec(t).slice(1),i=this.token.apply(this,e);if("string"==typeof i)return[{type:i,value:t}];for(var n=[],r=0,s=i.length;r<s;r++)e[r]&&(n[n.length]={type:i[r],value:e[r]});return n},this.$arrayTokens=function(t){if(!t)return[];var e=this.splitRegex.exec(t);if(!e)return"text";for(var i=[],n=this.tokenArray,r=0,s=n.length;r<s;r++)e[r+1]&&(i[i.length]={type:n[r],value:e[r+1]});return i},this.removeCapturingGroups=function(t){return t.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g,(function(t,e){return e?"(?:":t}))},this.createSplitterRegexp=function(t,e){if(-1!=t.indexOf("(?=")){var i=0,n=!1,r={};t.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(t,e,s,o,a,h){return n?n="]"!=a:a?n=!0:o?(i==r.stack&&(r.end=h+1,r.stack=-1),i--):s&&(i++,1!=s.length&&(r.stack=i,r.start=h)),t})),null!=r.end&&/^\)*$/.test(t.substr(r.end))&&(t=t.substring(0,r.start)+t.substr(r.end))}return"^"!=t.charAt(0)&&(t="^"+t),"$"!=t.charAt(t.length-1)&&(t+="$"),new RegExp(t,(e||"").replace("g",""))},this.getLineTokens=function(t,e){if(e&&"string"!=typeof e){var i=e.slice(0);"#tmp"===(e=i[0])&&(i.shift(),e=i.shift())}else i=[];var n=e||"start",s=this.states[n];s||(n="start",s=this.states[n]);var o=this.matchMappings[n],a=this.regExps[n];a.lastIndex=0;for(var h,l=[],u=0,c=0,d={type:null,value:""};h=a.exec(t);){var p=o.defaultToken,f=null,m=h[0],g=a.lastIndex;if(g-m.length>u){var v=t.substring(u,g-m.length);d.type==p?d.value+=v:(d.type&&l.push(d),d={type:p,value:v})}for(var y=0;y<h.length-2;y++)if(void 0!==h[y+1]){p=(f=s[o[y]]).onMatch?f.onMatch(m,n,i,t):f.token,f.next&&(n="string"==typeof f.next?f.next:f.next(n,i),(s=this.states[n])||(this.reportError("state doesn't exist",n),n="start",s=this.states[n]),o=this.matchMappings[n],u=g,(a=this.regExps[n]).lastIndex=g),f.consumeLineEnd&&(u=g);break}if(m)if("string"==typeof p)f&&!1===f.merge||d.type!==p?(d.type&&l.push(d),d={type:p,value:m}):d.value+=m;else if(p)for(d.type&&l.push(d),d={type:null,value:""},y=0;y<p.length;y++)l.push(p[y]);if(u==t.length)break;if(u=g,c++>r){for(c>2*t.length&&this.reportError("infinite loop with in ace tokenizer",{startState:e,line:t});u<t.length;)d.type&&l.push(d),d={value:t.substring(u,u+=500),type:"overflow"};n="start",i=[];break}}return d.type&&l.push(d),i.length>1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:l,state:i.length?i:n}},this.reportError=n.reportError}).call(s.prototype),e.Tokenizer=s})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(t,e,i){"use strict";var n=t("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(t,e){if(e)for(var i in t){for(var n=t[i],r=0;r<n.length;r++){var s=n[r];(s.next||s.onMatch)&&("string"==typeof s.next&&0!==s.next.indexOf(e)&&(s.next=e+s.next),s.nextState&&0!==s.nextState.indexOf(e)&&(s.nextState=e+s.nextState))}this.$rules[e+i]=n}else for(var i in t)this.$rules[i]=t[i]},this.getRules=function(){return this.$rules},this.embedRules=function(t,e,i,r,s){var o="function"==typeof t?(new t).getRules():t;if(r)for(var a=0;a<r.length;a++)r[a]=e+r[a];else for(var h in r=[],o)r.push(e+h);if(this.addRules(o,e),i){var l=Array.prototype[s?"push":"unshift"];for(a=0;a<r.length;a++)l.apply(this.$rules[r[a]],n.deepCopy(i))}this.$embeds||(this.$embeds=[]),this.$embeds.push(e)},this.getEmbeds=function(){return this.$embeds};var t=function(t,e){return("start"!=t||e.length)&&e.unshift(this.nextState,t),this.nextState},e=function(t,e){return e.shift(),e.shift()||"start"};this.normalizeRules=function(){var i=0,n=this.$rules;Object.keys(n).forEach((function r(s){var o=n[s];o.processed=!0;for(var a=0;a<o.length;a++){var h=o[a],l=null;Array.isArray(h)&&(l=h,h={}),!h.regex&&h.start&&(h.regex=h.start,h.next||(h.next=[]),h.next.push({defaultToken:h.token},{token:h.token+".end",regex:h.end||h.start,next:"pop"}),h.token=h.token+".start",h.push=!0);var u=h.next||h.push;if(u&&Array.isArray(u)){var c=h.stateName;c||("string"!=typeof(c=h.token)&&(c=c[0]||""),n[c]&&(c+=i++)),n[c]=u,h.next=c,r(c)}else"pop"==u&&(h.next=e);if(h.push&&(h.nextState=h.next||h.push,h.next=t,delete h.push),h.rules)for(var d in h.rules)n[d]?n[d].push&&n[d].push.apply(n[d],h.rules[d]):n[d]=h.rules[d];var p="string"==typeof h?h:h.include;if(p&&(l=Array.isArray(p)?p.map((function(t){return n[t]})):n[p]),l){var f=[a,1].concat(l);h.noEscape&&(f=f.filter((function(t){return!t.next}))),o.splice.apply(o,f),a--}h.keywordMap&&(h.token=this.createKeywordMapper(h.keywordMap,h.defaultToken||"text",h.caseInsensitive),delete h.defaultToken)}}),this)},this.createKeywordMapper=function(t,e,i,n){var r=Object.create(null);return Object.keys(t).forEach((function(e){var s=t[e];i&&(s=s.toLowerCase());for(var o=s.split(n||"|"),a=o.length;a--;)r[o[a]]=e})),Object.getPrototypeOf(r)&&(r.__proto__=null),this.$keywordList=Object.keys(r),t=null,i?function(t){return r[t.toLowerCase()]||e}:function(t){return r[t]||e}},this.getKeywords=function(){return this.$keywords}}).call(r.prototype),e.TextHighlightRules=r})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(t,e,i){"use strict";var n=function(){this.$behaviours={}};(function(){this.add=function(t,e,i){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[t]:this.$behaviours[t]={}}this.$behaviours[t][e]=i},this.addBehaviours=function(t){for(var e in t)for(var i in t[e])this.add(e,i,t[e][i])},this.remove=function(t){this.$behaviours&&this.$behaviours[t]&&delete this.$behaviours[t]},this.inherit=function(t,e){if("function"==typeof t)var i=(new t).getBehaviours(e);else i=t.getBehaviours(e);this.addBehaviours(i)},this.getBehaviours=function(t){if(t){for(var e={},i=0;i<t.length;i++)this.$behaviours[t[i]]&&(e[t[i]]=this.$behaviours[t[i]]);return e}return this.$behaviours}}).call(n.prototype),e.Behaviour=n})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(t,e,i){"use strict";var n=t("./range").Range,r=function(t,e,i){this.$session=t,this.$row=e,this.$rowTokens=t.getTokens(e);var n=t.getTokenAt(e,i);this.$tokenIndex=n?n.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var t;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,t||(t=this.$session.getLength()),this.$row>=t)return this.$row=t-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var t=this.$rowTokens,e=this.$tokenIndex,i=t[e].start;if(void 0!==i)return i;for(i=0;e>0;)i+=t[e-=1].value.length;return i},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var t=this.$rowTokens[this.$tokenIndex],e=this.getCurrentTokenColumn();return new n(this.$row,e,this.$row,e+t.value.length)}}).call(r.prototype),e.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(t,e,i){"use strict";var n,r=t("../../lib/oop"),s=t("../behaviour").Behaviour,o=t("../../token_iterator").TokenIterator,a=t("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],l=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},c={'"':'"',"'":"'"},d=function(t){var e=-1;if(t.multiSelect&&(e=t.selection.index,u.rangeCount!=t.multiSelect.rangeCount&&(u={rangeCount:t.multiSelect.rangeCount})),u[e])return n=u[e];n=u[e]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},p=function(t,e,i,n){var r=t.end.row-t.start.row;return{text:i+e+n,selection:[0,t.start.column+1,r,t.end.column+(r?0:1)]}},f=function(t){this.add("braces","insertion",(function(e,i,r,s,o){var h=r.getCursorPosition(),l=s.doc.getLine(h.row);if("{"==o){d(r);var u=r.getSelectionRange(),c=s.doc.getTextRange(u);if(""!==c&&"{"!==c&&r.getWrapBehavioursEnabled())return p(u,c,"{","}");if(f.isSaneInsertion(r,s))return/[\]\}\)]/.test(l[h.column])||r.inMultiSelectMode||t&&t.braces?(f.recordAutoInsert(r,s,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(r,s,"{"),{text:"{",selection:[1,1]})}else if("}"==o){if(d(r),"}"==l.substring(h.column,h.column+1)&&null!==s.$findOpeningBracket("}",{column:h.column+1,row:h.row})&&f.isAutoInsertedClosing(h,l,o))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==o||"\r\n"==o){d(r);var m="";if(f.isMaybeInsertedClosing(h,l)&&(m=a.stringRepeat("}",n.maybeInsertedBrackets),f.clearMaybeInsertedClosing()),"}"===l.substring(h.column,h.column+1)){var g=s.findMatchingBracket({row:h.row,column:h.column+1},"}");if(!g)return null;var v=this.$getIndent(s.getLine(g.row))}else{if(!m)return void f.clearMaybeInsertedClosing();v=this.$getIndent(l)}var y=v+s.getTabString();return{text:"\n"+y+"\n"+v+m,selection:[1,y.length,1,y.length]}}f.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(t,e,i,r,s){var o=r.doc.getTextRange(s);if(!s.isMultiLine()&&"{"==o){if(d(i),"}"==r.doc.getLine(s.start.row).substring(s.end.column,s.end.column+1))return s.end.column++,s;n.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(t,e,i,n,r){if("("==r){d(i);var s=i.getSelectionRange(),o=n.doc.getTextRange(s);if(""!==o&&i.getWrapBehavioursEnabled())return p(s,o,"(",")");if(f.isSaneInsertion(i,n))return f.recordAutoInsert(i,n,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(i);var a=i.getCursorPosition(),h=n.doc.getLine(a.row);if(")"==h.substring(a.column,a.column+1)&&null!==n.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&f.isAutoInsertedClosing(a,h,r))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(t,e,i,n,r){var s=n.doc.getTextRange(r);if(!r.isMultiLine()&&"("==s&&(d(i),")"==n.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("brackets","insertion",(function(t,e,i,n,r){if("["==r){d(i);var s=i.getSelectionRange(),o=n.doc.getTextRange(s);if(""!==o&&i.getWrapBehavioursEnabled())return p(s,o,"[","]");if(f.isSaneInsertion(i,n))return f.recordAutoInsert(i,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(i);var a=i.getCursorPosition(),h=n.doc.getLine(a.row);if("]"==h.substring(a.column,a.column+1)&&null!==n.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&f.isAutoInsertedClosing(a,h,r))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(t,e,i,n,r){var s=n.doc.getTextRange(r);if(!r.isMultiLine()&&"["==s&&(d(i),"]"==n.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("string_dquotes","insertion",(function(t,e,i,n,r){var s=n.$mode.$quotes||c;if(1==r.length&&s[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;d(i);var o=r,a=i.getSelectionRange(),h=n.doc.getTextRange(a);if(!(""===h||1==h.length&&s[h])&&i.getWrapBehavioursEnabled())return p(a,h,o,o);if(!h){var l=i.getCursorPosition(),u=n.doc.getLine(l.row),f=u.substring(l.column-1,l.column),m=u.substring(l.column,l.column+1),g=n.getTokenAt(l.row,l.column),v=n.getTokenAt(l.row,l.column+1);if("\\"==f&&g&&/escape/.test(g.type))return null;var y,x=g&&/string|escape/.test(g.type),E=!v||/string|escape/.test(v.type);if(m==o)(y=x!==E)&&/string\.end/.test(v.type)&&(y=!1);else{if(x&&!E)return null;if(x&&E)return null;var T=n.$mode.tokenRe;T.lastIndex=0;var _=T.test(f);T.lastIndex=0;var w=T.test(f);if(_||w)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var S=u[l.column-2];if(f==o&&(S==o||T.test(S)))return null;y=!0}return{text:y?o+o:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(t,e,i,n,r){var s=n.$mode.$quotes||c,o=n.doc.getTextRange(r);if(!r.isMultiLine()&&s.hasOwnProperty(o)&&(d(i),n.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==o))return r.end.column++,r}))};f.isSaneInsertion=function(t,e){var i=t.getCursorPosition(),n=new o(e,i.row,i.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",h)){if(/[)}\]]/.test(t.session.getLine(i.row)[i.column]))return!0;var r=new o(e,i.row,i.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",h))return!1}return n.stepForward(),n.getCurrentTokenRow()!==i.row||this.$matchTokenType(n.getCurrentToken()||"text",l)},f.$matchTokenType=function(t,e){return e.indexOf(t.type||t)>-1},f.recordAutoInsert=function(t,e,i){var r=t.getCursorPosition(),s=e.doc.getLine(r.row);this.isAutoInsertedClosing(r,s,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=r.row,n.autoInsertedLineEnd=i+s.substr(r.column),n.autoInsertedBrackets++},f.recordMaybeInsert=function(t,e,i){var r=t.getCursorPosition(),s=e.doc.getLine(r.row);this.isMaybeInsertedClosing(r,s)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=r.row,n.maybeInsertedLineStart=s.substr(0,r.column)+i,n.maybeInsertedLineEnd=s.substr(r.column),n.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(t,e,i){return n.autoInsertedBrackets>0&&t.row===n.autoInsertedRow&&i===n.autoInsertedLineEnd[0]&&e.substr(t.column)===n.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(t,e){return n.maybeInsertedBrackets>0&&t.row===n.maybeInsertedRow&&e.substr(t.column)===n.maybeInsertedLineEnd&&e.substr(0,t.column)==n.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},r.inherits(f,s),e.CstyleBehaviour=f})),ace.define("ace/unicode",["require","exports","module"],(function(t,e,i){"use strict";for(var n=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],r=0,s=[],o=0;o<n.length;o+=2)s.push(r+=n[o]),n[o+1]&&s.push(45,r+=n[o+1]);e.wordChars=String.fromCharCode.apply(null,s)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(t,e,i){"use strict";var n=t("../config"),r=t("../tokenizer").Tokenizer,s=t("./text_highlight_rules").TextHighlightRules,o=t("./behaviour/cstyle").CstyleBehaviour,a=t("../unicode"),h=t("../lib/lang"),l=t("../token_iterator").TokenIterator,u=t("../range").Range,c=function(){this.HighlightRules=s};(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+a.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+a.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(t,e,i,n){var r=e.doc,s=!0,o=!0,a=1/0,l=e.getTabSize(),u=!1;if(this.lineCommentStart){Array.isArray(this.lineCommentStart)?(m=this.lineCommentStart.map(h.escapeRegExp).join("|"),p=this.lineCommentStart[0]):(m=h.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart),m=new RegExp("^(\\s*)(?:"+m+") ?"),u=e.getUseSoftTabs(),y=function(t,e){var i=t.match(m);if(i){var n=i[1].length,s=i[0].length;d(t,n,s)||" "!=i[0][s-1]||s--,r.removeInLine(e,n,s)}};var c=p+" ",d=(v=function(t,e){s&&!/\S/.test(t)||(d(t,a,a)?r.insertInLine({row:e,column:a},c):r.insertInLine({row:e,column:a},p))},x=function(t,e){return m.test(t)},function(t,e,i){for(var n=0;e--&&" "==t.charAt(e);)n++;if(n%l!=0)return!1;for(n=0;" "==t.charAt(i++);)n++;return l>2?n%l!=l-1:n%l==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,f=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+h.escapeRegExp(p)+")"),g=new RegExp("(?:"+h.escapeRegExp(f)+")\\s*$"),v=function(t,e){x(t,e)||s&&!/\S/.test(t)||(r.insertInLine({row:e,column:t.length},f),r.insertInLine({row:e,column:a},p))},y=function(t,e){var i;(i=t.match(g))&&r.removeInLine(e,t.length-i[0].length,t.length),(i=t.match(m))&&r.removeInLine(e,i[1].length,i[0].length)},x=function(t,i){if(m.test(t))return!0;for(var n=e.getTokens(i),r=0;r<n.length;r++)if("comment"===n[r].type)return!0}}function E(t){for(var e=i;e<=n;e++)t(r.getLine(e),e)}var T=1/0;E((function(t,e){var i=t.search(/\S/);-1!==i?(i<a&&(a=i),o&&!x(t,e)&&(o=!1)):T>t.length&&(T=t.length)})),a==1/0&&(a=T,s=!1,o=!1),u&&a%l!=0&&(a=Math.floor(a/l)*l),E(o?y:v)},this.toggleBlockComment=function(t,e,i,n){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var s,o,a=(m=new l(e,n.row,n.column)).getCurrentToken(),h=(e.selection,e.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var c,d;a&&/comment/.test(a.type);){if(-1!=(g=a.value.indexOf(r.start))){var p=m.getCurrentTokenRow(),f=m.getCurrentTokenColumn()+g;c=new u(p,f,p,f+r.start.length);break}a=m.stepBackward()}var m;for(a=(m=new l(e,n.row,n.column)).getCurrentToken();a&&/comment/.test(a.type);){var g;if(-1!=(g=a.value.indexOf(r.end))){p=m.getCurrentTokenRow(),f=m.getCurrentTokenColumn()+g,d=new u(p,f,p,f+r.end.length);break}a=m.stepForward()}d&&e.remove(d),c&&(e.remove(c),s=c.start.row,o=-r.start.length)}else o=r.start.length,s=i.start.row,e.insert(i.end,r.end),e.insert(i.start,r.start);h.start.row==s&&(h.start.column+=o),h.end.row==s&&(h.end.column+=o),e.selection.fromOrientedRange(h)}},this.getNextLineIndent=function(t,e,i){return this.$getIndent(e)},this.checkOutdent=function(t,e,i){return!1},this.autoOutdent=function(t,e,i){},this.$getIndent=function(t){return t.match(/^\s*/)[0]},this.createWorker=function(t){return null},this.createModeDelegates=function(t){for(var e in this.$embeds=[],this.$modes={},t)if(t[e]){var i=t[e],r=i.prototype.$id,s=n.$modes[r];s||(n.$modes[r]=s=new i),n.$modes[e]||(n.$modes[e]=s),this.$embeds.push(e),this.$modes[e]=s}var o=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(e=0;e<o.length;e++)!function(t){var i=o[e],n=t[i];t[o[e]]=function(){return this.$delegator(i,arguments,n)}}(this)},this.$delegator=function(t,e,i){var n=e[0]||"start";if("string"!=typeof n){if(Array.isArray(n[2])){var r=n[2][n[2].length-1];if(o=this.$modes[r])return o[t].apply(o,[n[1]].concat([].slice.call(e,1)))}n=n[0]||"start"}for(var s=0;s<this.$embeds.length;s++)if(this.$modes[this.$embeds[s]]){var o,a=n.split(this.$embeds[s]);if(!a[0]&&a[1])return e[0]=a[1],(o=this.$modes[this.$embeds[s]])[t].apply(o,e)}var h=i.apply(this,e);return i?h:void 0},this.transformAction=function(t,e,i,n,r){if(this.$behaviour){var s=this.$behaviour.getBehaviours();for(var o in s)if(s[o][e]){var a=s[o][e].apply(this,arguments);if(a)return a}}},this.getKeywords=function(t){if(!this.completionKeywords){var e=this.$tokenizer.rules,i=[];for(var n in e)for(var r=e[n],s=0,o=r.length;s<o;s++)if("string"==typeof r[s].token)/keyword|support|storage/.test(r[s].token)&&i.push(r[s].regex);else if("object"==typeof r[s].token)for(var a=0,h=r[s].token.length;a<h;a++)/keyword|support|storage/.test(r[s].token[a])&&(n=r[s].regex.match(/\(.+?\)/g)[a],i.push(n.substr(1,n.length-2)));this.completionKeywords=i}return t?i.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(t,e,i,n){return(this.$keywordList||this.$createKeywordList()).map((function(t){return{name:t,value:t,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call(c.prototype),e.Mode=c})),ace.define("ace/apply_delta",["require","exports","module"],(function(t,e,i){"use strict";e.applyDelta=function(t,e,i){var n=e.start.row,r=e.start.column,s=t[n]||"";switch(e.action){case"insert":if(1===e.lines.length)t[n]=s.substring(0,r)+e.lines[0]+s.substring(r);else{var o=[n,1].concat(e.lines);t.splice.apply(t,o),t[n]=s.substring(0,r)+t[n],t[n+e.lines.length-1]+=s.substring(r)}break;case"remove":var a=e.end.column,h=e.end.row;n===h?t[n]=s.substring(0,r)+s.substring(a):t.splice(n,h-n+1,s.substring(0,r)+t[h].substring(a))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,i){"use strict";var n=t("./lib/oop"),r=t("./lib/event_emitter").EventEmitter,s=e.Anchor=function(t,e,i){this.$onChange=this.onChange.bind(this),this.attach(t),void 0===i?this.setPosition(e.row,e.column):this.setPosition(e,i)};(function(){function t(t,e,i){var n=i?t.column<=e.column:t.column<e.column;return t.row<e.row||t.row==e.row&&n}n.implement(this,r),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var i=function(e,i,n){var r="insert"==e.action,s=(r?1:-1)*(e.end.row-e.start.row),o=(r?1:-1)*(e.end.column-e.start.column),a=e.start,h=r?a:e.end;return t(i,a,n)?{row:i.row,column:i.column}:t(h,i,!n)?{row:i.row+s,column:i.column+(i.row==h.row?o:0)}:{row:a.row,column:a.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},this.setPosition=function(t,e,i){var n;if(n=i?{row:t,column:e}:this.$clipPositionToDocument(t,e),this.row!=n.row||this.column!=n.column){var r={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:r,value:n})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(t,e){var i={};return t>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):t<0?(i.row=0,i.column=0):(i.row=t,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,e))),e<0&&(i.column=0),i}}).call(s.prototype)})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(t,e,i){"use strict";var n=t("./lib/oop"),r=t("./apply_delta").applyDelta,s=t("./lib/event_emitter").EventEmitter,o=t("./range").Range,a=t("./anchor").Anchor,h=function(t){this.$lines=[""],0===t.length?this.$lines=[""]:Array.isArray(t)?this.insertMergedLines({row:0,column:0},t):this.insert({row:0,column:0},t)};(function(){n.implement(this,s),this.setValue=function(t){var e=this.getLength()-1;this.remove(new o(0,0,e,this.getLine(e).length)),this.insert({row:0,column:0},t)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(t,e){return new a(this,t,e)},0==="aaa".split(/a/).length?this.$split=function(t){return t.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(t){return t.split(/\r\n|\r|\n/)},this.$detectNewLine=function(t){var e=t.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=e?e[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(t){this.$newLineMode!==t&&(this.$newLineMode=t,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(t){return"\r\n"==t||"\r"==t||"\n"==t},this.getLine=function(t){return this.$lines[t]||""},this.getLines=function(t,e){return this.$lines.slice(t,e+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(t){return this.getLinesForRange(t).join(this.getNewLineCharacter())},this.getLinesForRange=function(t){var e;if(t.start.row===t.end.row)e=[this.getLine(t.start.row).substring(t.start.column,t.end.column)];else{(e=this.getLines(t.start.row,t.end.row))[0]=(e[0]||"").substring(t.start.column);var i=e.length-1;t.end.row-t.start.row==i&&(e[i]=e[i].substring(0,t.end.column))}return e},this.insertLines=function(t,e){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(t,e)},this.removeLines=function(t,e){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(t,e)},this.insertNewLine=function(t){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(t,["",""])},this.insert=function(t,e){return this.getLength()<=1&&this.$detectNewLine(e),this.insertMergedLines(t,this.$split(e))},this.insertInLine=function(t,e){var i=this.clippedPos(t.row,t.column),n=this.pos(t.row,t.column+e.length);return this.applyDelta({start:i,end:n,action:"insert",lines:[e]},!0),this.clonePos(n)},this.clippedPos=function(t,e){var i=this.getLength();void 0===t?t=i:t<0?t=0:t>=i&&(t=i-1,e=void 0);var n=this.getLine(t);return null==e&&(e=n.length),{row:t,column:e=Math.min(Math.max(e,0),n.length)}},this.clonePos=function(t){return{row:t.row,column:t.column}},this.pos=function(t,e){return{row:t,column:e}},this.$clipPosition=function(t){var e=this.getLength();return t.row>=e?(t.row=Math.max(0,e-1),t.column=this.getLine(e-1).length):(t.row=Math.max(0,t.row),t.column=Math.min(Math.max(t.column,0),this.getLine(t.row).length)),t},this.insertFullLines=function(t,e){var i=0;(t=Math.min(Math.max(t,0),this.getLength()))<this.getLength()?(e=e.concat([""]),i=0):(e=[""].concat(e),t--,i=this.$lines[t].length),this.insertMergedLines({row:t,column:i},e)},this.insertMergedLines=function(t,e){var i=this.clippedPos(t.row,t.column),n={row:i.row+e.length-1,column:(1==e.length?i.column:0)+e[e.length-1].length};return this.applyDelta({start:i,end:n,action:"insert",lines:e}),this.clonePos(n)},this.remove=function(t){var e=this.clippedPos(t.start.row,t.start.column),i=this.clippedPos(t.end.row,t.end.column);return this.applyDelta({start:e,end:i,action:"remove",lines:this.getLinesForRange({start:e,end:i})}),this.clonePos(e)},this.removeInLine=function(t,e,i){var n=this.clippedPos(t,e),r=this.clippedPos(t,i);return this.applyDelta({start:n,end:r,action:"remove",lines:this.getLinesForRange({start:n,end:r})},!0),this.clonePos(n)},this.removeFullLines=function(t,e){t=Math.min(Math.max(0,t),this.getLength()-1);var i=(e=Math.min(Math.max(0,e),this.getLength()-1))==this.getLength()-1&&t>0,n=e<this.getLength()-1,r=i?t-1:t,s=i?this.getLine(r).length:0,a=n?e+1:e,h=n?0:this.getLine(a).length,l=new o(r,s,a,h),u=this.$lines.slice(t,e+1);return this.applyDelta({start:l.start,end:l.end,action:"remove",lines:this.getLinesForRange(l)}),u},this.removeNewLine=function(t){t<this.getLength()-1&&t>=0&&this.applyDelta({start:this.pos(t,this.getLine(t).length),end:this.pos(t+1,0),action:"remove",lines:["",""]})},this.replace=function(t,e){return t instanceof o||(t=o.fromPoints(t.start,t.end)),0===e.length&&t.isEmpty()?t.start:e==this.getTextRange(t)?t.end:(this.remove(t),e?this.insert(t.start,e):t.start)},this.applyDeltas=function(t){for(var e=0;e<t.length;e++)this.applyDelta(t[e])},this.revertDeltas=function(t){for(var e=t.length-1;e>=0;e--)this.revertDelta(t[e])},this.applyDelta=function(t,e){var i="insert"==t.action;(i?t.lines.length<=1&&!t.lines[0]:!o.comparePoints(t.start,t.end))||(i&&t.lines.length>2e4?this.$splitAndapplyLargeDelta(t,2e4):(r(this.$lines,t,e),this._signal("change",t)))},this.$splitAndapplyLargeDelta=function(t,e){for(var i=t.lines,n=i.length-e+1,r=t.start.row,s=t.start.column,o=0,a=0;o<n;o=a){a+=e-1;var h=i.slice(o,a);h.push(""),this.applyDelta({start:this.pos(r+o,s),end:this.pos(r+a,s=0),action:t.action,lines:h},!0)}t.lines=i.slice(o),t.start.row=r+o,t.start.column=s,this.applyDelta(t,!0)},this.revertDelta=function(t){this.applyDelta({start:this.clonePos(t.start),end:this.clonePos(t.end),action:"insert"==t.action?"remove":"insert",lines:t.lines.slice()})},this.indexToPosition=function(t,e){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,r=e||0,s=i.length;r<s;r++)if((t-=i[r].length+n)<0)return{row:r,column:t+i[r].length+n};return{row:s-1,column:t+i[s-1].length+n}},this.positionToIndex=function(t,e){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,r=0,s=Math.min(t.row,i.length),o=e||0;o<s;++o)r+=i[o].length+n;return r+t.column}}).call(h.prototype),e.Document=h})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(t,e,i){"use strict";var n=t("./lib/oop"),r=t("./lib/event_emitter").EventEmitter,s=function(t,e){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=t;var i=this;this.$worker=function(){if(i.running){for(var t=new Date,e=i.currentLine,n=-1,r=i.doc,s=e;i.lines[e];)e++;var o=r.getLength(),a=0;for(i.running=!1;e<o;){i.$tokenizeRow(e),n=e;do{e++}while(i.lines[e]);if(++a%5==0&&new Date-t>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=e,-1==n&&(n=e),s<=n&&i.fireUpdateEvent(s,n)}}};(function(){n.implement(this,r),this.setTokenizer=function(t){this.tokenizer=t,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(t){this.doc=t,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(t,e){var i={first:t,last:e};this._signal("update",{data:i})},this.start=function(t){this.currentLine=Math.min(t||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(t){var e=t.start.row,i=t.end.row-e;if(0===i)this.lines[e]=null;else if("remove"==t.action)this.lines.splice(e,i+1,null),this.states.splice(e,i+1,null);else{var n=Array(i+1);n.unshift(e,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(e,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(t){return this.lines[t]||this.$tokenizeRow(t)},this.getState=function(t){return this.currentLine==t&&this.$tokenizeRow(t),this.states[t]||"start"},this.$tokenizeRow=function(t){var e=this.doc.getLine(t),i=this.states[t-1],n=this.tokenizer.getLineTokens(e,i,t);return this.states[t]+""!=n.state+""?(this.states[t]=n.state,this.lines[t+1]=null,this.currentLine>t+1&&(this.currentLine=t+1)):this.currentLine==t&&(this.currentLine=t+1),this.lines[t]=n.tokens}}).call(s.prototype),e.BackgroundTokenizer=s})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(t,e,i){"use strict";var n=t("./lib/lang"),r=(t("./lib/oop"),t("./range").Range),s=function(t,e,i){this.setRegexp(t),this.clazz=e,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(t){this.regExp+""!=t+""&&(this.regExp=t,this.cache=[])},this.update=function(t,e,i,s){if(this.regExp)for(var o=s.firstRow,a=s.lastRow,h=o;h<=a;h++){var l=this.cache[h];null==l&&((l=n.getMatchOffsets(i.getLine(h),this.regExp)).length>this.MAX_RANGES&&(l=l.slice(0,this.MAX_RANGES)),l=l.map((function(t){return new r(h,t.offset,h,t.offset+t.length)})),this.cache[h]=l.length?l:"");for(var u=l.length;u--;)e.drawSingleLineMarker(t,l[u].toScreenRange(i),this.clazz,s)}}}).call(s.prototype),e.SearchHighlight=s})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(t,e,i){"use strict";var n=t("../range").Range;function r(t,e){this.foldData=t,Array.isArray(e)?this.folds=e:e=this.folds=[e];var i=e[e.length-1];this.range=new n(e[0].start.row,e[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(t){t.setFoldLine(this)}),this)}(function(){this.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach((function(e){e.start.row+=t,e.end.row+=t}))},this.addFold=function(t){if(t.sameRow){if(t.start.row<this.startRow||t.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(t),this.folds.sort((function(t,e){return-t.range.compareEnd(e.start.row,e.start.column)})),this.range.compareEnd(t.start.row,t.start.column)>0?(this.end.row=t.end.row,this.end.column=t.end.column):this.range.compareStart(t.end.row,t.end.column)<0&&(this.start.row=t.start.row,this.start.column=t.start.column)}else if(t.start.row==this.end.row)this.folds.push(t),this.end.row=t.end.row,this.end.column=t.end.column;else{if(t.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(t),this.start.row=t.start.row,this.start.column=t.start.column}t.foldLine=this},this.containsRow=function(t){return t>=this.start.row&&t<=this.end.row},this.walk=function(t,e,i){var n,r,s=0,o=this.folds,a=!0;null==e&&(e=this.end.row,i=this.end.column);for(var h=0;h<o.length;h++){if(-1==(r=(n=o[h]).range.compareStart(e,i)))return void t(null,e,i,s,a);if(!t(null,n.start.row,n.start.column,s,a)&&t(n.placeholder,n.start.row,n.start.column,s)||0===r)return;a=!n.sameRow,s=n.end.column}t(null,e,i,s,a)},this.getNextFoldTo=function(t,e){for(var i,n,r=0;r<this.folds.length;r++){if(-1==(n=(i=this.folds[r]).range.compareEnd(t,e)))return{fold:i,kind:"after"};if(0===n)return{fold:i,kind:"inside"}}return null},this.addRemoveChars=function(t,e,i){var n,r,s=this.getNextFoldTo(t,e);if(s)if(n=s.fold,"inside"==s.kind&&n.start.column!=e&&n.start.row!=t)window.console&&window.console.log(t,e,n);else if(n.start.row==t){var o=(r=this.folds).indexOf(n);for(0===o&&(this.start.column+=i);o<r.length;o++){if((n=r[o]).start.column+=i,!n.sameRow)return;n.end.column+=i}this.end.column+=i}},this.split=function(t,e){var i=this.getNextFoldTo(t,e);if(!i||"inside"==i.kind)return null;var n=i.fold,s=this.folds,o=this.foldData,a=s.indexOf(n),h=s[a-1];this.end.row=h.end.row,this.end.column=h.end.column;var l=new r(o,s=s.splice(a,s.length-a));return o.splice(o.indexOf(this)+1,0,l),l},this.merge=function(t){for(var e=t.folds,i=0;i<e.length;i++)this.addFold(e[i]);var n=this.foldData;n.splice(n.indexOf(t),1)},this.toString=function(){var t=[this.range.toString()+": ["];return this.folds.forEach((function(e){t.push(" "+e.toString())})),t.push("]"),t.join("\n")},this.idxToPosition=function(t){for(var e=0,i=0;i<this.folds.length;i++){var n=this.folds[i];if((t-=n.start.column-e)<0)return{row:n.start.row,column:n.start.column+t};if((t-=n.placeholder.length)<0)return n.start;e=n.end.column}return{row:this.end.row,column:this.end.column+t}}}).call(r.prototype),e.FoldLine=r})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(t,e,i){"use strict";var n=t("./range").Range.comparePoints,r=function(){this.ranges=[],this.$bias=1};(function(){this.comparePoints=n,this.pointIndex=function(t,e,i){for(var r=this.ranges,s=i||0;s<r.length;s++){var o=r[s],a=n(t,o.end);if(!(a>0)){var h=n(t,o.start);return 0===a?e&&0!==h?-s-2:s:h>0||0===h&&!e?s:-s-1}}return-s-1},this.add=function(t){var e=!t.isEmpty(),i=this.pointIndex(t.start,e);i<0&&(i=-i-1);var n=this.pointIndex(t.end,e,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,t)},this.addList=function(t){for(var e=[],i=t.length;i--;)e.push.apply(e,this.add(t[i]));return e},this.substractPoint=function(t){var e=this.pointIndex(t);if(e>=0)return this.ranges.splice(e,1)},this.merge=function(){for(var t,e=[],i=this.ranges,r=(i=i.sort((function(t,e){return n(t.start,e.start)})))[0],s=1;s<i.length;s++){t=r,r=i[s];var o=n(t.end,r.start);o<0||(0!=o||t.isEmpty()||r.isEmpty())&&(n(t.end,r.end)<0&&(t.end.row=r.end.row,t.end.column=r.end.column),i.splice(s,1),e.push(r),r=t,s--)}return this.ranges=i,e},this.contains=function(t,e){return this.pointIndex({row:t,column:e})>=0},this.containsPoint=function(t){return this.pointIndex(t)>=0},this.rangeAtPoint=function(t){var e=this.pointIndex(t);if(e>=0)return this.ranges[e]},this.clipRows=function(t,e){var i=this.ranges;if(i[0].start.row>e||i[i.length-1].start.row<t)return[];var n=this.pointIndex({row:t,column:0});n<0&&(n=-n-1);var r=this.pointIndex({row:e,column:0},n);r<0&&(r=-r-1);for(var s=[],o=n;o<r;o++)s.push(i[o]);return s},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(t){this.session&&this.detach(),this.session=t,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(t){for(var e=t.start,i=t.end,n=e.row,r=i.row,s=this.ranges,o=0,a=s.length;o<a&&!((u=s[o]).end.row>=n);o++);if("insert"==t.action){for(var h=r-n,l=-e.column+i.column;o<a&&!((u=s[o]).start.row>n);o++)if(u.start.row==n&&u.start.column>=e.column&&(u.start.column==e.column&&this.$bias<=0||(u.start.column+=l,u.start.row+=h)),u.end.row==n&&u.end.column>=e.column){if(u.end.column==e.column&&this.$bias<0)continue;u.end.column==e.column&&l>0&&o<a-1&&u.end.column>u.start.column&&u.end.column==s[o+1].start.column&&(u.end.column-=l),u.end.column+=l,u.end.row+=h}}else for(h=n-r,l=e.column-i.column;o<a&&!((u=s[o]).start.row>r);o++)u.end.row<r&&(n<u.end.row||n==u.end.row&&e.column<u.end.column)?(u.end.row=n,u.end.column=e.column):u.end.row==r?u.end.column<=i.column?(h||u.end.column>e.column)&&(u.end.column=e.column,u.end.row=e.row):(u.end.column+=l,u.end.row+=h):u.end.row>r&&(u.end.row+=h),u.start.row<r&&(n<u.start.row||n==u.start.row&&e.column<u.start.column)?(u.start.row=n,u.start.column=e.column):u.start.row==r?u.start.column<=i.column?(h||u.start.column>e.column)&&(u.start.column=e.column,u.start.row=e.row):(u.start.column+=l,u.start.row+=h):u.start.row>r&&(u.start.row+=h);if(0!=h&&o<a)for(;o<a;o++){var u;(u=s[o]).start.row+=h,u.end.row+=h}}}).call(r.prototype),e.RangeList=r})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],(function(t,e,i){"use strict";var n=t("../range_list").RangeList,r=t("../lib/oop"),s=e.Fold=function(t,e){this.foldLine=null,this.placeholder=e,this.range=t,this.start=t.start,this.end=t.end,this.sameRow=t.start.row==t.end.row,this.subFolds=this.ranges=[]};function o(t,e){t.row-=e.row,0==t.row&&(t.column-=e.column)}function a(t,e){0==t.row&&(t.column+=e.column),t.row+=e.row}r.inherits(s,n),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(t){this.foldLine=t,this.subFolds.forEach((function(e){e.setFoldLine(t)}))},this.clone=function(){var t=this.range.clone(),e=new s(t,this.placeholder);return this.subFolds.forEach((function(t){e.subFolds.push(t.clone())})),e.collapseChildren=this.collapseChildren,e},this.addSubFold=function(t){if(!this.range.isEqual(t)){var e,i;e=t,i=this.start,o(e.start,i),o(e.end,i);for(var n=t.start.row,r=t.start.column,s=0,a=-1;s<this.subFolds.length&&1==(a=this.subFolds[s].range.compare(n,r));s++);var h=this.subFolds[s],l=0;if(0==a){if(h.range.containsRange(t))return h.addSubFold(t);l=1}n=t.range.end.row,r=t.range.end.column;var u=s;for(a=-1;u<this.subFolds.length&&1==(a=this.subFolds[u].range.compare(n,r));u++);0==a&&u++;for(var c=this.subFolds.splice(s,u-s,t),d=0==a?c.length-1:c.length,p=l;p<d;p++)t.addSubFold(c[p]);return t.setFoldLine(this.foldLine),t}},this.restoreRange=function(t){return function(t,e){a(t.start,e),a(t.end,e)}(t,this.start)}}.call(s.prototype)})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],(function(t,e,i){"use strict";var n=t("../range").Range,r=t("./fold_line").FoldLine,s=t("./fold").Fold,o=t("../token_iterator").TokenIterator;e.Folding=function(){this.getFoldAt=function(t,e,i){var n=this.getFoldLine(t);if(!n)return null;for(var r=n.folds,s=0;s<r.length;s++){var o=r[s].range;if(o.contains(t,e)){if(1==i&&o.isEnd(t,e)&&!o.isEmpty())continue;if(-1==i&&o.isStart(t,e)&&!o.isEmpty())continue;return r[s]}}},this.getFoldsInRange=function(t){var e=t.start,i=t.end,n=this.$foldData,r=[];e.column+=1,i.column-=1;for(var s=0;s<n.length;s++){var o=n[s].range.compareRange(t);if(2!=o){if(-2==o)break;for(var a=n[s].folds,h=0;h<a.length;h++){var l=a[h];if(-2==(o=l.range.compareRange(t)))break;if(2!=o){if(42==o)break;r.push(l)}}}}return e.column-=1,i.column+=1,r},this.getFoldsInRangeList=function(t){if(Array.isArray(t)){var e=[];t.forEach((function(t){e=e.concat(this.getFoldsInRange(t))}),this)}else e=this.getFoldsInRange(t);return e},this.getAllFolds=function(){for(var t=[],e=this.$foldData,i=0;i<e.length;i++)for(var n=0;n<e[i].folds.length;n++)t.push(e[i].folds[n]);return t},this.getFoldStringAt=function(t,e,i,n){if(!(n=n||this.getFoldLine(t)))return null;for(var r,s,o={end:{column:0}},a=0;a<n.folds.length;a++){var h=(s=n.folds[a]).range.compareEnd(t,e);if(-1==h){r=this.getLine(s.start.row).substring(o.end.column,s.start.column);break}if(0===h)return null;o=s}return r||(r=this.getLine(s.start.row).substring(o.end.column)),-1==i?r.substring(0,e-o.end.column):1==i?r.substring(e-o.end.column):r},this.getFoldLine=function(t,e){var i=this.$foldData,n=0;for(e&&(n=i.indexOf(e)),-1==n&&(n=0);n<i.length;n++){var r=i[n];if(r.start.row<=t&&r.end.row>=t)return r;if(r.end.row>t)return null}return null},this.getNextFoldLine=function(t,e){var i=this.$foldData,n=0;for(e&&(n=i.indexOf(e)),-1==n&&(n=0);n<i.length;n++){var r=i[n];if(r.end.row>=t)return r}return null},this.getFoldedRowCount=function(t,e){for(var i=this.$foldData,n=e-t+1,r=0;r<i.length;r++){var s=i[r],o=s.end.row,a=s.start.row;if(o>=e){a<e&&(a>=t?n-=e-a:n=0);break}o>=t&&(n-=a>=t?o-a:o-t+1)}return n},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort((function(t,e){return t.start.row-e.start.row})),t},this.addFold=function(t,e){var i,n=this.$foldData,o=!1;t instanceof s?i=t:(i=new s(e,t)).collapseChildren=e.collapseChildren,this.$clipRangeToDocument(i.range);var a=i.start.row,h=i.start.column,l=i.end.row,u=i.end.column,c=this.getFoldAt(a,h,1),d=this.getFoldAt(l,u,-1);if(c&&d==c)return c.addSubFold(i);c&&!c.range.isStart(a,h)&&this.removeFold(c),d&&!d.range.isEnd(l,u)&&this.removeFold(d);var p=this.getFoldsInRange(i.range);p.length>0&&(this.removeFolds(p),p.forEach((function(t){i.addSubFold(t)})));for(var f=0;f<n.length;f++){var m=n[f];if(l==m.start.row){m.addFold(i),o=!0;break}if(a==m.end.row){if(m.addFold(i),o=!0,!i.sameRow){var g=n[f+1];if(g&&g.start.row==l){m.merge(g);break}}break}if(l<=m.start.row)break}return o||(m=this.$addFoldLine(new r(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(m.start.row,m.start.row):this.$updateRowLengthCache(m.start.row,m.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(t){t.forEach((function(t){this.addFold(t)}),this)},this.removeFold=function(t){var e=t.foldLine,i=e.start.row,n=e.end.row,r=this.$foldData,s=e.folds;if(1==s.length)r.splice(r.indexOf(e),1);else if(e.range.isEnd(t.end.row,t.end.column))s.pop(),e.end.row=s[s.length-1].end.row,e.end.column=s[s.length-1].end.column;else if(e.range.isStart(t.start.row,t.start.column))s.shift(),e.start.row=s[0].start.row,e.start.column=s[0].start.column;else if(t.sameRow)s.splice(s.indexOf(t),1);else{var o=e.split(t.start.row,t.start.column);(s=o.folds).shift(),o.start.row=s[0].start.row,o.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(i,n):this.$updateRowLengthCache(i,n)),this.$modified=!0,this._signal("changeFold",{data:t,action:"remove"})},this.removeFolds=function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i]);e.forEach((function(t){this.removeFold(t)}),this),this.$modified=!0},this.expandFold=function(t){this.removeFold(t),t.subFolds.forEach((function(e){t.restoreRange(e),this.addFold(e)}),this),t.collapseChildren>0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach((function(t){this.expandFold(t)}),this)},this.unfold=function(t,e){var i,r;if(null==t?(i=new n(0,0,this.getLength(),0),e=!0):i="number"==typeof t?new n(t,0,t,this.getLine(t).length):"row"in t?n.fromPoints(t,t):t,r=this.getFoldsInRangeList(i),e)this.removeFolds(r);else for(var s=r;s.length;)this.expandFolds(s),s=this.getFoldsInRangeList(i);if(r.length)return r},this.isRowFolded=function(t,e){return!!this.getFoldLine(t,e)},this.getRowFoldEnd=function(t,e){var i=this.getFoldLine(t,e);return i?i.end.row:t},this.getRowFoldStart=function(t,e){var i=this.getFoldLine(t,e);return i?i.start.row:t},this.getFoldDisplayLine=function(t,e,i,n,r){null==n&&(n=t.start.row),null==r&&(r=0),null==e&&(e=t.end.row),null==i&&(i=this.getLine(e).length);var s=this.doc,o="";return t.walk((function(t,e,i,a){if(!(e<n)){if(e==n){if(i<r)return;a=Math.max(r,a)}o+=null!=t?t:s.getLine(e).substring(a,i)}}),e,i),o},this.getDisplayLine=function(t,e,i,n){var r,s=this.getFoldLine(t);return s?this.getFoldDisplayLine(s,t,e,i,n):(r=this.doc.getLine(t)).substring(n||0,e||r.length)},this.$cloneFoldData=function(){var t=[];return t=this.$foldData.map((function(e){var i=e.folds.map((function(t){return t.clone()}));return new r(t,i)}))},this.toggleFold=function(t){var e,i,n=this.selection.getRange();if(n.isEmpty()){var r=n.start;if(e=this.getFoldAt(r.row,r.column))return void this.expandFold(e);(i=this.findMatchingBracket(r))?1==n.comparePoint(i)?n.end=i:(n.start=i,n.start.column++,n.end.column--):(i=this.findMatchingBracket({row:r.row,column:r.column+1}))?(1==n.comparePoint(i)?n.end=i:n.start=i,n.start.column++):n=this.getCommentFoldRange(r.row,r.column)||n}else{var s=this.getFoldsInRange(n);if(t&&s.length)return void this.expandFolds(s);1==s.length&&(e=s[0])}if(e||(e=this.getFoldAt(n.start.row,n.start.column)),e&&e.range.toString()==n.toString())this.expandFold(e);else{var o="...";if(!n.isMultiLine()){if((o=this.getTextRange(n)).length<4)return;o=o.trim().substring(0,2)+".."}this.addFold(o,n)}},this.getCommentFoldRange=function(t,e,i){var r=new o(this,t,e),s=r.getCurrentToken(),a=s.type;if(s&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var h=new RegExp(a),l=new n;if(1!=i){do{s=r.stepBackward()}while(s&&h.test(s.type));r.stepForward()}if(l.start.row=r.getCurrentTokenRow(),l.start.column=r.getCurrentTokenColumn()+2,r=new o(this,t,e),-1!=i){var u=-1;do{if(s=r.stepForward(),-1==u){var c=this.getState(r.$row);h.test(c)||(u=r.$row)}else if(r.$row>u)break}while(s&&h.test(s.type));s=r.stepBackward()}else s=r.getCurrentToken();return l.end.row=r.getCurrentTokenRow(),l.end.column=r.getCurrentTokenColumn()+s.value.length-2,l}},this.foldAll=function(t,e,i){null==i&&(i=1e5);var n=this.foldWidgets;if(n){e=e||this.getLength();for(var r=t=t||0;r<e;r++)if(null==n[r]&&(n[r]=this.getFoldWidget(r)),"start"==n[r]){var s=this.getFoldWidgetRange(r);if(s&&s.isMultiLine()&&s.end.row<=e&&s.start.row>=t){r=s.end.row;try{var o=this.addFold("...",s);o&&(o.collapseChildren=i)}catch(t){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(t){if(!this.$foldStyles[t])throw new Error("invalid fold style: "+t+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=t){this.$foldStyle=t,"manual"==t&&this.unfold();var e=this.$foldMode;this.$setFolding(null),this.$setFolding(e)}},this.$setFolding=function(t){this.$foldMode!=t&&(this.$foldMode=t,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),t&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=t.getFoldWidget.bind(t,this,this.$foldStyle),this.getFoldWidgetRange=t.getFoldWidgetRange.bind(t,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(t,e){var i=this.foldWidgets;if(!i||e&&i[t])return{};for(var n,r=t-1;r>=0;){var s=i[r];if(null==s&&(s=i[r]=this.getFoldWidget(r)),"start"==s){var o=this.getFoldWidgetRange(r);if(n||(n=o),o&&o.end.row>=t)break}r--}return{range:-1!==r&&o,firstRange:n}},this.onFoldWidgetClick=function(t,e){var i={children:(e=e.domEvent).shiftKey,all:e.ctrlKey||e.metaKey,siblings:e.altKey};if(!this.$toggleFoldWidget(t,i)){var n=e.target||e.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,e){if(this.getFoldWidget){var i=this.getFoldWidget(t),n=this.getLine(t),r="end"===i?-1:1,s=this.getFoldAt(t,-1===r?0:n.length,r);if(s)return e.children||e.all?this.removeFold(s):this.expandFold(s),s;var o=this.getFoldWidgetRange(t,!0);if(o&&!o.isMultiLine()&&(s=this.getFoldAt(o.start.row,o.start.column,1))&&o.isEqual(s.range))return this.removeFold(s),s;if(e.siblings){var a=this.getParentFoldRangeData(t);if(a.range)var h=a.range.start.row+1,l=a.range.end.row;this.foldAll(h,l,e.all?1e4:0)}else e.children?(l=o?o.end.row:this.getLength(),this.foldAll(t+1,l,e.all?1e4:0)):o&&(e.all&&(o.collapseChildren=1e4),this.addFold("...",o));return o}},this.toggleFoldWidget=function(t){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var i=this.$toggleFoldWidget(e,{});if(!i){var n=this.getParentFoldRangeData(e,!0);if(i=n.range||n.firstRange){e=i.start.row;var r=this.getFoldAt(e,this.getLine(e).length,1);r?this.removeFold(r):this.addFold("...",i)}}},this.updateFoldWidgets=function(t){var e=t.start.row,i=t.end.row-e;if(0===i)this.foldWidgets[e]=null;else if("remove"==t.action)this.foldWidgets.splice(e,i+1,null);else{var n=Array(i+1);n.unshift(e,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(t){var e=t.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(t,e,i){"use strict";var n=t("../token_iterator").TokenIterator,r=t("../range").Range;e.BracketMatch=function(){this.findMatchingBracket=function(t,e){if(0==t.column)return null;var i=e||this.getLine(t.row).charAt(t.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],t):this.$findOpeningBracket(n[2],t):null},this.getBracketRange=function(t){var e,i=this.getLine(t.row),n=!0,s=i.charAt(t.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(o||(s=i.charAt(t.column),t={row:t.row,column:t.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),n=!1),!o)return null;if(o[1]){if(!(a=this.$findClosingBracket(o[1],t)))return null;e=r.fromPoints(t,a),n||(e.end.column++,e.start.column--),e.cursor=e.end}else{var a;if(!(a=this.$findOpeningBracket(o[2],t)))return null;e=r.fromPoints(a,t),n||(e.start.column++,e.end.column--),e.cursor=e.start}return e},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(t,e,i){var r=this.$brackets[t],s=1,o=new n(this,e.row,e.column),a=o.getCurrentToken();if(a||(a=o.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var h=e.column-o.getCurrentTokenColumn()-2,l=a.value;;){for(;h>=0;){var u=l.charAt(h);if(u==r){if(0==(s-=1))return{row:o.getCurrentTokenRow(),column:h+o.getCurrentTokenColumn()}}else u==t&&(s+=1);h-=1}do{a=o.stepBackward()}while(a&&!i.test(a.type));if(null==a)break;h=(l=a.value).length-1}return null}},this.$findClosingBracket=function(t,e,i){var r=this.$brackets[t],s=1,o=new n(this,e.row,e.column),a=o.getCurrentToken();if(a||(a=o.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var h=e.column-o.getCurrentTokenColumn();;){for(var l=a.value,u=l.length;h<u;){var c=l.charAt(h);if(c==r){if(0==(s-=1))return{row:o.getCurrentTokenRow(),column:h+o.getCurrentTokenColumn()}}else c==t&&(s+=1);h+=1}do{a=o.stepForward()}while(a&&!i.test(a.type));if(null==a)break;h=0}return null}}}})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(t,e,i){"use strict";var n=t("./lib/oop"),r=t("./lib/lang"),s=t("./bidihandler").BidiHandler,o=t("./config"),a=t("./lib/event_emitter").EventEmitter,h=t("./selection").Selection,l=t("./mode/text").Mode,u=t("./range").Range,c=t("./document").Document,d=t("./background_tokenizer").BackgroundTokenizer,p=t("./search_highlight").SearchHighlight,f=function(t,e){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++f.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof t&&t.getLine||(t=new c(t)),this.setDocument(t),this.selection=new h(this),this.$bidiHandler=new s(this),o.resetOptions(this),this.setMode(e),o._signal("session",this)};f.$uid=0,function(){n.implement(this,a),this.setDocument=function(t){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=t,t.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(t){if(!t)return this.$docRowCache=[],void(this.$screenRowCache=[]);var e=this.$docRowCache.length,i=this.$getRowCacheIndex(this.$docRowCache,t)+1;e>i&&(this.$docRowCache.splice(i,e),this.$screenRowCache.splice(i,e))},this.$getRowCacheIndex=function(t,e){for(var i=0,n=t.length-1;i<=n;){var r=i+n>>1,s=t[r];if(e>s)i=r+1;else{if(!(e<s))return r;n=r-1}}return i-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(t){var e=t.data;this.$resetRowCache(e.start.row)},this.onChange=function(t){this.$modified=!0,this.$bidiHandler.onChange(t),this.$resetRowCache(t.start.row);var e=this.$updateInternalDataOnChange(t);!this.$fromUndo&&this.$undoManager&&(e&&e.length&&(this.$undoManager.add({action:"removeFolds",folds:e},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(t,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(t),this._signal("change",t)},this.setValue=function(t){this.doc.setValue(t),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(t){return this.bgTokenizer.getState(t)},this.getTokens=function(t){return this.bgTokenizer.getTokens(t)},this.getTokenAt=function(t,e){var i,n=this.bgTokenizer.getTokens(t),r=0;if(null==e){var s=n.length-1;r=this.getLine(t).length}else for(s=0;s<n.length&&!((r+=n[s].value.length)>=e);s++);return(i=n[s])?(i.index=s,i.start=r-i.value.length,i):null},this.setUndoManager=function(t){if(this.$undoManager=t,this.$informUndoManager&&this.$informUndoManager.cancel(),t){var e=this;t.addSession(this),this.$syncInformUndoManager=function(){e.$informUndoManager.cancel(),e.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(t){this.setOption("useSoftTabs",t)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(t){this.setOption("tabSize",t)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(t){return this.$useSoftTabs&&t.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(t){this.setOption("navigateWithinSoftTabs",t)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(t){this.setOption("overwrite",t)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(t,e){this.$decorations[t]||(this.$decorations[t]=""),this.$decorations[t]+=" "+e,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(t,e){this.$decorations[t]=(this.$decorations[t]||"").replace(" "+e,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(t){this.$breakpoints=[];for(var e=0;e<t.length;e++)this.$breakpoints[t[e]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(t,e){void 0===e&&(e="ace_breakpoint"),e?this.$breakpoints[t]=e:delete this.$breakpoints[t],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(t){delete this.$breakpoints[t],this._signal("changeBreakpoint",{})},this.addMarker=function(t,e,i,n){var r=this.$markerId++,s={range:t,type:i||"line",renderer:"function"==typeof i?i:null,clazz:e,inFront:!!n,id:r};return n?(this.$frontMarkers[r]=s,this._signal("changeFrontMarker")):(this.$backMarkers[r]=s,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(t,e){if(t.update){var i=this.$markerId++;return t.id=i,t.inFront=!!e,e?(this.$frontMarkers[i]=t,this._signal("changeFrontMarker")):(this.$backMarkers[i]=t,this._signal("changeBackMarker")),t}},this.removeMarker=function(t){var e=this.$frontMarkers[t]||this.$backMarkers[t];e&&(delete(e.inFront?this.$frontMarkers:this.$backMarkers)[t],this._signal(e.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(t){return t?this.$frontMarkers:this.$backMarkers},this.highlight=function(t){if(!this.$searchHighlight){var e=new p(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(e)}this.$searchHighlight.setRegexp(t)},this.highlightLines=function(t,e,i,n){"number"!=typeof e&&(i=e,e=t),i||(i="ace_step");var r=new u(t,0,e,1/0);return r.id=this.addMarker(r,i,"fullLine",n),r},this.setAnnotations=function(t){this.$annotations=t,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(t){var e=t.match(/^.*?(\r?\n)/m);this.$autoNewLine=e?e[1]:"\n"},this.getWordRange=function(t,e){var i=this.getLine(t),n=!1;if(e>0&&(n=!!i.charAt(e-1).match(this.tokenRe)),n||(n=!!i.charAt(e).match(this.tokenRe)),n)var r=this.tokenRe;else r=/^\s+$/.test(i.slice(e-1,e+1))?/\s/:this.nonTokenRe;var s=e;if(s>0){do{s--}while(s>=0&&i.charAt(s).match(r));s++}for(var o=e;o<i.length&&i.charAt(o).match(r);)o++;return new u(t,s,t,o)},this.getAWordRange=function(t,e){for(var i=this.getWordRange(t,e),n=this.getLine(i.end.row);n.charAt(i.end.column).match(/[ \t]/);)i.end.column+=1;return i},this.setNewLineMode=function(t){this.doc.setNewLineMode(t)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(t){this.setOption("useWorker",t)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(t){var e=t.data;this.bgTokenizer.start(e.first),this._signal("tokenizerUpdate",t)},this.$modes=o.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(t,e){if(t&&"object"==typeof t){if(t.getTokenizer)return this.$onChangeMode(t);var i=t,n=i.path}else n=t||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[n]&&!i)return this.$onChangeMode(this.$modes[n]),void(e&&e());this.$modeId=n,o.loadModule(["mode",n],function(t){if(this.$modeId!==n)return e&&e();this.$modes[n]&&!i?this.$onChangeMode(this.$modes[n]):t&&t.Mode&&(t=new t.Mode(i),i||(this.$modes[n]=t,t.$id=n),this.$onChangeMode(t)),e&&e()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(t,e){if(e||(this.$modeId=t.$id),this.$mode!==t){this.$mode=t,this.$stopWorker(),this.$useWorker&&this.$startWorker();var i=t.getTokenizer();if(void 0!==i.addEventListener){var n=this.onReloadTokenizer.bind(this);i.addEventListener("update",n)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(i);else{this.bgTokenizer=new d(i);var r=this;this.bgTokenizer.addEventListener("update",(function(t){r._signal("tokenizerUpdate",t)}))}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=t.tokenRe,this.nonTokenRe=t.nonTokenRe,e||(t.attachToSession&&t.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(t.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(t){o.warn("Could not load worker",t),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(t){this.$scrollTop===t||isNaN(t)||(this.$scrollTop=t,this._signal("changeScrollTop",t))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(t){this.$scrollLeft===t||isNaN(t)||(this.$scrollLeft=t,this._signal("changeScrollLeft",t))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var t=0;return this.lineWidgets.forEach((function(e){e&&e.screenWidth>t&&(t=e.screenWidth)})),this.lineWidgetWidth=t},this.$computeWidth=function(t){if(this.$modified||t){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var e=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,r=0,s=this.$foldData[r],o=s?s.start.row:1/0,a=e.length,h=0;h<a;h++){if(h>o){if((h=s.end.row+1)>=a)break;o=(s=this.$foldData[r++])?s.start.row:1/0}null==i[h]&&(i[h]=this.$getStringScreenWidth(e[h])[0]),i[h]>n&&(n=i[h])}this.screenWidth=n}},this.getLine=function(t){return this.doc.getLine(t)},this.getLines=function(t,e){return this.doc.getLines(t,e)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(t){return this.doc.getTextRange(t||this.selection.getRange())},this.insert=function(t,e){return this.doc.insert(t,e)},this.remove=function(t){return this.doc.remove(t)},this.removeFullLines=function(t,e){return this.doc.removeFullLines(t,e)},this.undoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var i=t.length-1;-1!=i;i--){var n=t[i];"insert"==n.action||"remove"==n.action?this.doc.revertDelta(n):n.folds&&this.addFolds(n.folds)}!e&&this.$undoSelect&&(t.selectionBefore?this.selection.fromJSON(t.selectionBefore):this.selection.setRange(this.$getUndoSelection(t,!0))),this.$fromUndo=!1}},this.redoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var i=0;i<t.length;i++){var n=t[i];"insert"!=n.action&&"remove"!=n.action||this.doc.applyDelta(n)}!e&&this.$undoSelect&&(t.selectionAfter?this.selection.fromJSON(t.selectionAfter):this.selection.setRange(this.$getUndoSelection(t,!1))),this.$fromUndo=!1}},this.setUndoSelect=function(t){this.$undoSelect=t},this.$getUndoSelection=function(t,e){function i(t){return e?"insert"!==t.action:"insert"===t.action}for(var n,r,s=0;s<t.length;s++){var o=t[s];o.start&&(n?i(o)?(r=o.start,-1==n.compare(r.row,r.column)&&n.setStart(r),r=o.end,1==n.compare(r.row,r.column)&&n.setEnd(r)):(r=o.start,-1==n.compare(r.row,r.column)&&(n=u.fromPoints(o.start,o.start))):n=i(o)?u.fromPoints(o.start,o.end):u.fromPoints(o.start,o.start))}return n},this.replace=function(t,e){return this.doc.replace(t,e)},this.moveText=function(t,e,i){var n=this.getTextRange(t),r=this.getFoldsInRange(t),s=u.fromPoints(e,e);if(!i){this.remove(t);var o=t.start.row-t.end.row;(l=o?-t.end.column:t.start.column-t.end.column)&&(s.start.row==t.end.row&&s.start.column>t.end.column&&(s.start.column+=l),s.end.row==t.end.row&&s.end.column>t.end.column&&(s.end.column+=l)),o&&s.start.row>=t.end.row&&(s.start.row+=o,s.end.row+=o)}if(s.end=this.insert(s.start,n),r.length){var a=t.start,h=s.start,l=(o=h.row-a.row,h.column-a.column);this.addFolds(r.map((function(t){return(t=t.clone()).start.row==a.row&&(t.start.column+=l),t.end.row==a.row&&(t.end.column+=l),t.start.row+=o,t.end.row+=o,t})))}return s},this.indentRows=function(t,e,i){i=i.replace(/\t/g,this.getTabString());for(var n=t;n<=e;n++)this.doc.insertInLine({row:n,column:0},i)},this.outdentRows=function(t){for(var e=t.collapseRows(),i=new u(0,0,0,0),n=this.getTabSize(),r=e.start.row;r<=e.end.row;++r){var s=this.getLine(r);i.start.row=r,i.end.row=r;for(var o=0;o<n&&" "==s.charAt(o);++o);o<n&&"\t"==s.charAt(o)?(i.start.column=o,i.end.column=o+1):(i.start.column=0,i.end.column=o),this.remove(i)}},this.$moveLines=function(t,e,i){if(t=this.getRowFoldStart(t),e=this.getRowFoldEnd(e),i<0){if((r=this.getRowFoldStart(t+i))<0)return 0;var n=r-t}else if(i>0){var r;if((r=this.getRowFoldEnd(e+i))>this.doc.getLength()-1)return 0;n=r-e}else t=this.$clipRowToDocument(t),n=(e=this.$clipRowToDocument(e))-t+1;var s=new u(t,0,e,Number.MAX_VALUE),o=this.getFoldsInRange(s).map((function(t){return(t=t.clone()).start.row+=n,t.end.row+=n,t})),a=0==i?this.doc.getLines(t,e):this.doc.removeFullLines(t,e);return this.doc.insertFullLines(t+n,a),o.length&&this.addFolds(o),n},this.moveLinesUp=function(t,e){return this.$moveLines(t,e,-1)},this.moveLinesDown=function(t,e){return this.$moveLines(t,e,1)},this.duplicateLines=function(t,e){return this.$moveLines(t,e,0)},this.$clipRowToDocument=function(t){return Math.max(0,Math.min(t,this.doc.getLength()-1))},this.$clipColumnToRow=function(t,e){return e<0?0:Math.min(this.doc.getLine(t).length,e)},this.$clipPositionToDocument=function(t,e){if(e=Math.max(0,e),t<0)t=0,e=0;else{var i=this.doc.getLength();t>=i?(t=i-1,e=this.doc.getLine(i-1).length):e=Math.min(this.doc.getLine(t).length,e)}return{row:t,column:e}},this.$clipRangeToDocument=function(t){t.start.row<0?(t.start.row=0,t.start.column=0):t.start.column=this.$clipColumnToRow(t.start.row,t.start.column);var e=this.doc.getLength()-1;return t.end.row>e?(t.end.row=e,t.end.column=this.doc.getLine(e).length):t.end.column=this.$clipColumnToRow(t.end.row,t.end.column),t},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(t){if(t!=this.$useWrapMode){if(this.$useWrapMode=t,this.$modified=!0,this.$resetRowCache(0),t){var e=this.getLength();this.$wrapData=Array(e),this.$updateWrapData(0,e-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(t,e){this.$wrapLimitRange.min===t&&this.$wrapLimitRange.max===e||(this.$wrapLimitRange={min:t,max:e},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(t,e){var i=this.$wrapLimitRange;i.max<0&&(i={min:e,max:e});var n=this.$constrainWrapLimit(t,i.min,i.max);return n!=this.$wrapLimit&&n>1&&(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(t,e,i){return e&&(t=Math.max(e,t)),i&&(t=Math.min(i,t)),t},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(t){this.setWrapLimitRange(t,t)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(t){var e=this.$useWrapMode,i=t.action,n=t.start,r=t.end,s=n.row,o=r.row,a=o-s,h=null;if(this.$updating=!0,0!=a)if("remove"===i){this[e?"$wrapData":"$rowLengthCache"].splice(s,a);var l=this.$foldData;h=this.getFoldsInRange(t),this.removeFolds(h);var u=0;if(m=this.getFoldLine(r.row)){m.addRemoveChars(r.row,r.column,n.column-r.column),m.shiftRow(-a);var c=this.getFoldLine(s);c&&c!==m&&(c.merge(m),m=c),u=l.indexOf(m)+1}for(;u<l.length;u++)(m=l[u]).start.row>=r.row&&m.shiftRow(-a);o=s}else{var d=Array(a);d.unshift(s,0);var p=e?this.$wrapData:this.$rowLengthCache;if(p.splice.apply(p,d),l=this.$foldData,u=0,m=this.getFoldLine(s)){var f=m.range.compareInside(n.row,n.column);0==f?(m=m.split(n.row,n.column))&&(m.shiftRow(a),m.addRemoveChars(o,0,r.column-n.column)):-1==f&&(m.addRemoveChars(s,0,r.column-n.column),m.shiftRow(a)),u=l.indexOf(m)+1}for(;u<l.length;u++){var m;(m=l[u]).start.row>=s&&m.shiftRow(a)}}else a=Math.abs(t.start.column-t.end.column),"remove"===i&&(h=this.getFoldsInRange(t),this.removeFolds(h),a=-a),(m=this.getFoldLine(s))&&m.addRemoveChars(s,n.column,a);return e&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,e?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),h},this.$updateRowLengthCache=function(t,e,i){this.$rowLengthCache[t]=null,this.$rowLengthCache[e]=null},this.$updateWrapData=function(i,n){var r,s,o=this.doc.getAllLines(),a=this.getTabSize(),h=this.$wrapData,l=this.$wrapLimit,u=i;for(n=Math.min(n,o.length-1);u<=n;)(s=this.getFoldLine(u,s))?(r=[],s.walk(function(i,n,s,a){var h;if(null!=i){(h=this.$getDisplayTokens(i,r.length))[0]=t;for(var l=1;l<h.length;l++)h[l]=e}else h=this.$getDisplayTokens(o[n].substring(a,s),r.length);r=r.concat(h)}.bind(this),s.end.row,o[s.end.row].length+1),h[s.start.row]=this.$computeWrapSplits(r,l,a),u=s.end.row+1):(r=this.$getDisplayTokens(o[u]),h[u]=this.$computeWrapSplits(r,l,a),u++)};var t=3,e=4;function i(t){return!(t<4352)&&(t>=4352&&t<=4447||t>=4515&&t<=4519||t>=4602&&t<=4607||t>=9001&&t<=9002||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12283||t>=12288&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12589||t>=12593&&t<=12686||t>=12688&&t<=12730||t>=12736&&t<=12771||t>=12784&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=13054||t>=13056&&t<=19903||t>=19968&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=55216&&t<=55238||t>=55243&&t<=55291||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=65281&&t<=65376||t>=65504&&t<=65510)}this.$computeWrapSplits=function(i,n,r){if(0==i.length)return[];var s=[],o=i.length,a=0,h=0,l=this.$wrapAsCode,u=this.$indentedSoftWrap,c=n<=Math.max(2*r,8)||!1===u?0:Math.floor(n/2);function d(t){for(var e=t-a,n=a;n<t;n++){var o=i[n];12!==o&&2!==o||(e-=1)}s.length||(p=function(){var t=0;if(0===c)return t;if(u)for(var e=0;e<i.length;e++){var n=i[e];if(10==n)t+=1;else{if(11!=n){if(12==n)continue;break}t+=r}}return l&&!1!==u&&(t+=r),Math.min(t,c)}(),s.indent=p),h+=e,s.push(h),a=t}for(var p=0;o-a>n-p;){var f=a+n-p;if(i[f-1]>=10&&i[f]>=10)d(f);else if(i[f]!=t&&i[f]!=e){for(var m=Math.max(f-(n-(n>>2)),a-1);f>m&&i[f]<t;)f--;if(l){for(;f>m&&i[f]<t;)f--;for(;f>m&&9==i[f];)f--}else for(;f>m&&i[f]<10;)f--;f>m?d(++f):(2==i[f=a+n]&&f--,d(f-p))}else{for(;f!=a-1&&i[f]!=t;f--);if(f>a){d(f);continue}for(f=a+n;f<i.length&&i[f]==e;f++);if(f==i.length)break;d(f)}}return s},this.$getDisplayTokens=function(t,e){var n,r=[];e=e||0;for(var s=0;s<t.length;s++){var o=t.charCodeAt(s);if(9==o){n=this.getScreenTabSize(r.length+e),r.push(11);for(var a=1;a<n;a++)r.push(12)}else 32==o?r.push(10):o>39&&o<48||o>57&&o<64?r.push(9):o>=4352&&i(o)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(t,e,n){if(0==e)return[0,0];var r,s;for(null==e&&(e=1/0),n=n||0,s=0;s<t.length&&(9==(r=t.charCodeAt(s))?n+=this.getScreenTabSize(n):r>=4352&&i(r)?n+=2:n+=1,!(n>e));s++);return[n,s]},this.lineWidgets=null,this.getRowLength=function(t){if(this.lineWidgets)var e=this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0;else e=0;return this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1+e:1+e},this.getRowLineCount=function(t){return this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1:1},this.getRowWrapIndent=function(t){if(this.$useWrapMode){var e=this.screenToDocumentPosition(t,Number.MAX_VALUE),i=this.$wrapData[e.row];return i.length&&i[0]<e.column?i.indent:0}return 0},this.getScreenLastRowColumn=function(t){var e=this.screenToDocumentPosition(t,Number.MAX_VALUE);return this.documentToScreenColumn(e.row,e.column)},this.getDocumentLastRowColumn=function(t,e){var i=this.documentToScreenRow(t,e);return this.getScreenLastRowColumn(i)},this.getDocumentLastRowColumnPosition=function(t,e){var i=this.documentToScreenRow(t,e);return this.screenToDocumentPosition(i,Number.MAX_VALUE/10)},this.getRowSplitData=function(t){return this.$useWrapMode?this.$wrapData[t]:void 0},this.getScreenTabSize=function(t){return this.$tabSize-(t%this.$tabSize|0)},this.screenToDocumentRow=function(t,e){return this.screenToDocumentPosition(t,e).row},this.screenToDocumentColumn=function(t,e){return this.screenToDocumentPosition(t,e).column},this.screenToDocumentPosition=function(t,e,i){if(t<0)return{row:0,column:0};var n,r,s=0,o=0,a=0,h=0,l=this.$screenRowCache,u=this.$getRowCacheIndex(l,t),c=l.length;if(c&&u>=0){a=l[u],s=this.$docRowCache[u];var d=t>l[c-1]}else d=!c;for(var p=this.getLength()-1,f=this.getNextFoldLine(s),m=f?f.start.row:1/0;a<=t&&!(a+(h=this.getRowLength(s))>t||s>=p);)a+=h,++s>m&&(s=f.end.row+1,m=(f=this.getNextFoldLine(s,f))?f.start.row:1/0),d&&(this.$docRowCache.push(s),this.$screenRowCache.push(a));if(f&&f.start.row<=s)n=this.getFoldDisplayLine(f),s=f.start.row;else{if(a+h<=t||s>p)return{row:p,column:this.getLine(p).length};n=this.getLine(s),f=null}var g=0,v=Math.floor(t-a);if(this.$useWrapMode){var y=this.$wrapData[s];y&&(r=y[v],v>0&&y.length&&(g=y.indent,o=y[v-1]||y[y.length-1],n=n.substring(o)))}return void 0!==i&&this.$bidiHandler.isBidiRow(a+v,s,v)&&(e=this.$bidiHandler.offsetToCol(i)),o+=this.$getStringScreenWidth(n,e-g)[1],this.$useWrapMode&&o>=r&&(o=r-1),f?f.idxToPosition(o):{row:s,column:o}},this.documentToScreenPosition=function(t,e){if(void 0===e)var i=this.$clipPositionToDocument(t.row,t.column);else i=this.$clipPositionToDocument(t,e);t=i.row,e=i.column;var n,r=0,s=null;(n=this.getFoldAt(t,e,1))&&(t=n.start.row,e=n.start.column);var o,a=0,h=this.$docRowCache,l=this.$getRowCacheIndex(h,t),u=h.length;if(u&&l>=0){a=h[l],r=this.$screenRowCache[l];var c=t>h[u-1]}else c=!u;for(var d=this.getNextFoldLine(a),p=d?d.start.row:1/0;a<t;){if(a>=p){if((o=d.end.row+1)>t)break;p=(d=this.getNextFoldLine(o,d))?d.start.row:1/0}else o=a+1;r+=this.getRowLength(a),a=o,c&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var f="";d&&a>=p?(f=this.getFoldDisplayLine(d,t,e),s=d.start.row):(f=this.getLine(t).substring(0,e),s=t);var m=0;if(this.$useWrapMode){var g=this.$wrapData[s];if(g){for(var v=0;f.length>=g[v];)r++,v++;f=f.substring(g[v-1]||0,f.length),m=v>0?g.indent:0}}return{row:r,column:m+this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(t,e){return this.documentToScreenPosition(t,e).column},this.documentToScreenRow=function(t,e){return this.documentToScreenPosition(t,e).row},this.getScreenLength=function(){var t=0,e=null;if(this.$useWrapMode)for(var i=this.$wrapData.length,n=0,r=(a=0,(e=this.$foldData[a++])?e.start.row:1/0);n<i;){var s=this.$wrapData[n];t+=s?s.length+1:1,++n>r&&(n=e.end.row+1,r=(e=this.$foldData[a++])?e.start.row:1/0)}else{t=this.getLength();for(var o=this.$foldData,a=0;a<o.length;a++)t-=(e=o[a]).end.row-e.start.row}return this.lineWidgets&&(t+=this.$getWidgetScreenLength()),t},this.$setFontMetrics=function(t){this.$enableVarChar&&(this.$getStringScreenWidth=function(e,i,n){if(0===i)return[0,0];var r,s;for(i||(i=1/0),n=n||0,s=0;s<e.length&&!((n+="\t"===(r=e.charAt(s))?this.getScreenTabSize(n):t.getCharacterWidth(r))>i);s++);return[n,s]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=i}.call(f.prototype),t("./edit_session/folding").Folding.call(f.prototype),t("./edit_session/bracket_match").BracketMatch.call(f.prototype),o.defineOptions(f.prototype,"session",{wrap:{set:function(t){if(t&&"off"!=t?"free"==t?t=!0:"printMargin"==t?t=-1:"string"==typeof t&&(t=parseInt(t,10)||!1):t=!1,this.$wrap!=t)if(this.$wrap=t,t){var e="number"==typeof t?t:null;this.setWrapLimitRange(e,e),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(t){(t="auto"==t?"text"!=this.$mode.type:"text"!=t)!=this.$wrapAsCode&&(this.$wrapAsCode=t,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(t){this.$useWorker=t,this.$stopWorker(),t&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(t){(t=parseInt(t))>0&&this.$tabSize!==t&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=t,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(t){this.setFoldStyle(t)},handlesSet:!0},overwrite:{set:function(t){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(t){this.doc.setNewLineMode(t)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(t){this.setMode(t)},get:function(){return this.$modeId},handlesSet:!0}}),e.EditSession=f})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(t,e,i){"use strict";var n=t("./lib/lang"),r=t("./lib/oop"),s=t("./range").Range,o=function(){this.$options={}};(function(){this.set=function(t){return r.mixin(this.$options,t),this},this.getOptions=function(){return n.copyObject(this.$options)},this.setOptions=function(t){this.$options=t},this.find=function(t){var e=this.$options,i=this.$matchIterator(t,e);if(!i)return!1;var n=null;return i.forEach((function(t,i,r,o){return n=new s(t,i,r,o),!(i==o&&e.start&&e.start.start&&0!=e.skipCurrent&&n.isEqual(e.start)&&(n=null,1))})),n},this.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var i=e.range,r=i?t.getLines(i.start.row,i.end.row):t.doc.getAllLines(),o=[],a=e.re;if(e.$isMultiLine){var h,l=a.length,u=r.length-l;t:for(var c=a.offset||0;c<=u;c++){for(var d=0;d<l;d++)if(-1==r[c+d].search(a[d]))continue t;var p=r[c],f=r[c+l-1],m=p.length-p.match(a[0])[0].length,g=f.match(a[l-1])[0].length;h&&h.end.row===c&&h.end.column>m||(o.push(h=new s(c,m,c+l-1,g)),l>2&&(c=c+l-2))}}else for(var v=0;v<r.length;v++){var y=n.getMatchOffsets(r[v],a);for(d=0;d<y.length;d++){var x=y[d];o.push(new s(v,x.offset,v,x.offset+x.length))}}if(i){var E=i.start.column,T=i.start.column;for(v=0,d=o.length-1;v<d&&o[v].start.column<E&&o[v].start.row==i.start.row;)v++;for(;v<d&&o[d].end.column>T&&o[d].end.row==i.end.row;)d--;for(o=o.slice(v,d+1),v=0,d=o.length;v<d;v++)o[v].start.row+=i.start.row,o[v].end.row+=i.start.row}return o},this.replace=function(t,e){var i=this.$options,n=this.$assembleRegExp(i);if(i.$isMultiLine)return e;if(n){var r=n.exec(t);if(!r||r[0].length!=t.length)return null;if(e=t.replace(n,e),i.preserveCase){e=e.split("");for(var s=Math.min(t.length,t.length);s--;){var o=t[s];o&&o.toLowerCase()!=o?e[s]=e[s].toUpperCase():e[s]=e[s].toLowerCase()}e=e.join("")}return e}},this.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var i=t.needle;if(!t.needle)return t.re=!1;t.regExp||(i=n.escapeRegExp(i)),t.wholeWord&&(i=function(t,e){function i(t){return/\w/.test(t)||e.regExp?"\\b":""}return i(t[0])+t+i(t[t.length-1])}(i,t));var r=t.caseSensitive?"gm":"gmi";if(t.$isMultiLine=!e&&/[\n\r]/.test(i),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(i,r);try{var s=new RegExp(i,r)}catch(t){s=!1}return t.re=s},this.$assembleMultilineRegExp=function(t,e){for(var i=t.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),n=[],r=0;r<i.length;r++)try{n.push(new RegExp(i[r],e))}catch(t){return!1}return n},this.$matchIterator=function(t,e){var i=this.$assembleRegExp(e);if(!i)return!1;var n=1==e.backwards,r=0!=e.skipCurrent,s=e.range,o=e.start;o||(o=s?s[n?"end":"start"]:t.selection.getRange()),o.start&&(o=o[r!=n?"end":"start"]);var a=s?s.start.row:0,h=s?s.end.row:t.getLength()-1;if(n)var l=function(t){var i=o.row;if(!c(i,o.column,t)){for(i--;i>=a;i--)if(c(i,Number.MAX_VALUE,t))return;if(0!=e.wrap)for(i=h,a=o.row;i>=a;i--)if(c(i,Number.MAX_VALUE,t))return}};else l=function(t){var i=o.row;if(!c(i,o.column,t)){for(i+=1;i<=h;i++)if(c(i,0,t))return;if(0!=e.wrap)for(i=a,h=o.row;i<=h;i++)if(c(i,0,t))return}};if(e.$isMultiLine)var u=i.length,c=function(e,r,s){var o=n?e-u+1:e;if(!(o<0)){var a=t.getLine(o),h=a.search(i[0]);if(!(!n&&h<r||-1===h)){for(var l=1;l<u;l++)if(-1==(a=t.getLine(o+l)).search(i[l]))return;var c=a.match(i[u-1])[0].length;if(!(n&&c>r))return!!s(o,h,o+u-1,c)||void 0}}};else c=n?function(e,n,r){var s,o=t.getLine(e),a=[],h=0;for(i.lastIndex=0;s=i.exec(o);){var l=s[0].length;if(h=s.index,!l){if(h>=o.length)break;i.lastIndex=h+=1}if(s.index+l>n)break;a.push(s.index,l)}for(var u=a.length-1;u>=0;u-=2){var c=a[u-1];if(r(e,c,e,c+(l=a[u])))return!0}}:function(e,n,r){var s,o,a=t.getLine(e);for(i.lastIndex=n;o=i.exec(a);){var h=o[0].length;if(r(e,s=o.index,e,s+h))return!0;if(!h&&(i.lastIndex=s+=1,s>=a.length))return!1}};return{forEach:l}}}).call(o.prototype),e.Search=o})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(t,e,i){"use strict";var n=t("../lib/keys"),r=t("../lib/useragent"),s=n.KEY_MODS;function o(t,e){this.platform=e||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=!0}function a(t,e){o.call(this,t,e),this.$singleCommand=!1}a.prototype=o.prototype,function(){function t(t){return"object"==typeof t&&t.bindKey&&t.bindKey.position||(t.isDefault?-100:0)}this.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},this.removeCommand=function(t,e){var i=t&&("string"==typeof t?t:t.name);t=this.commands[i],e||delete this.commands[i];var n=this.commandKeyBinding;for(var r in n){var s=n[r];if(s==t)delete n[r];else if(Array.isArray(s)){var o=s.indexOf(t);-1!=o&&(s.splice(o,1),1==s.length&&(n[r]=s[0]))}}},this.bindKey=function(t,e,i){if("object"==typeof t&&t&&(null==i&&(i=t.position),t=t[this.platform]),t)return"function"==typeof e?this.addCommand({exec:e,bindKey:t,name:e.name||t}):void t.split("|").forEach((function(t){var n="";if(-1!=t.indexOf(" ")){var r=t.split(/\s+/);t=r.pop(),r.forEach((function(t){var e=this.parseKeys(t),i=s[e.hashId]+e.key;n+=(n?" ":"")+i,this._addCommandToBinding(n,"chainKeys")}),this),n+=" "}var o=this.parseKeys(t),a=s[o.hashId]+o.key;this._addCommandToBinding(n+a,e,i)}),this)},this._addCommandToBinding=function(e,i,n){var r,s=this.commandKeyBinding;if(i)if(!s[e]||this.$singleCommand)s[e]=i;else{Array.isArray(s[e])?-1!=(r=s[e].indexOf(i))&&s[e].splice(r,1):s[e]=[s[e]],"number"!=typeof n&&(n=t(i));var o=s[e];for(r=0;r<o.length&&!(t(o[r])>n);r++);o.splice(r,0,i)}else delete s[e]},this.addCommands=function(t){t&&Object.keys(t).forEach((function(e){var i=t[e];if(i){if("string"==typeof i)return this.bindKey(i,e);"function"==typeof i&&(i={exec:i}),"object"==typeof i&&(i.name||(i.name=e),this.addCommand(i))}}),this)},this.removeCommands=function(t){Object.keys(t).forEach((function(e){this.removeCommand(t[e])}),this)},this.bindKeys=function(t){Object.keys(t).forEach((function(e){this.bindKey(e,t[e])}),this)},this._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},this.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(t){return t})),i=e.pop(),r=n[i];if(n.FUNCTION_KEYS[r])i=n.FUNCTION_KEYS[r].toLowerCase();else{if(!e.length)return{key:i,hashId:-1};if(1==e.length&&"shift"==e[0])return{key:i.toUpperCase(),hashId:-1}}for(var s=0,o=e.length;o--;){var a=n.KEY_MODS[e[o]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+e[o]+" in "+t),!1;s|=a}return{key:i,hashId:s}},this.findKeyCommand=function(t,e){var i=s[t]+e;return this.commandKeyBinding[i]},this.handleKeyboard=function(t,e,i,n){if(!(n<0)){var r=s[e]+i,o=this.commandKeyBinding[r];return t.$keyChain&&(t.$keyChain+=" "+r,o=this.commandKeyBinding[t.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(t.$keyChain&&(e&&4!=e||1!=i.length?(-1==e||n>0)&&(t.$keyChain=""):t.$keyChain=t.$keyChain.slice(0,-r.length-1)),{command:o}):(t.$keyChain=t.$keyChain||r,{command:"null"})}},this.getStatusText=function(t,e){return e.$keyChain||""}}.call(o.prototype),e.HashHandler=o,e.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(t,e,i){"use strict";var n=t("../lib/oop"),r=t("../keyboard/hash_handler").MultiHashHandler,s=t("../lib/event_emitter").EventEmitter,o=function(t,e){r.call(this,e,t),this.byName=this.commands,this.setDefaultHandler("exec",(function(t){return t.command.exec(t.editor,t.args||{})}))};n.inherits(o,r),function(){n.implement(this,s),this.exec=function(t,e,i){if(Array.isArray(t)){for(var n=t.length;n--;)if(this.exec(t[n],e,i))return!0;return!1}if("string"==typeof t&&(t=this.commands[t]),!t)return!1;if(e&&e.$readOnly&&!t.readOnly)return!1;if(0!=this.$checkCommandState&&t.isAvailable&&!t.isAvailable(e))return!1;var r={editor:e,command:t,args:i};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(t){if(!this.$inReplay)return t&&t._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(t){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach((function(e){"string"==typeof e?this.exec(e,t):this.exec(e[0],t,e[1])}),this)}finally{this.$inReplay=!1}}},this.trimMacro=function(t){return t.map((function(t){return"string"!=typeof t[0]&&(t[0]=t[0].name),t[1]||(t=t[0]),t}))}}.call(o.prototype),e.CommandManager=o})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(t,e,i){"use strict";var n=t("../lib/lang"),r=t("../config"),s=t("../range").Range;function o(t,e){return{win:t,mac:e}}e.commands=[{name:"showSettingsMenu",bindKey:o("Ctrl-,","Command-,"),exec:function(t){r.loadModule("ace/ext/settings_menu",(function(e){e.init(t),t.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",bindKey:o("Alt-E","F4"),exec:function(t){r.loadModule("./ext/error_marker",(function(e){e.showErrorMarker(t,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(t){r.loadModule("./ext/error_marker",(function(e){e.showErrorMarker(t,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(t,e){"number"!=typeof e||isNaN(e)||t.gotoLine(e),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:o("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:o("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(t){r.loadModule("ace/ext/searchbox",(function(e){e.Search(t)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(t,e){t.navigateUp(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(t,e){t.navigateDown(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(t,e){t.navigateLeft(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(t,e){t.navigateRight(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var e=t.$copyWithEmptySelection&&t.selection.isEmpty()?t.selection.getLineRange():t.selection.getRange();t._emit("cut",e),e.isEmpty()||t.session.remove(e),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,e){t.$handlePaste(e)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(t){r.loadModule("ace/ext/searchbox",(function(e){e.Search(t,!0)}))}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(t){if(!t.selection.isEmpty())return!1;t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(t){var e=t.selection.getRange();e.start.column=0,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(t){var e=t.selection.getRange();e.end.column=Number.MAX_VALUE,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,e){t.insert(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,e){t.insert(n.stringRepeat(e.text||"",e.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var e=t.selection.getRange();e.start.column=e.end.column=0,e.end.row++,t.selection.setRange(e,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(t){for(var e=t.selection.isBackwards(),i=e?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),r=e?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),o=t.session.doc.getLine(i.row).length,a=t.session.doc.getTextRange(t.selection.getRange()).replace(/\n\s*/," ").length,h=t.session.doc.getLine(i.row),l=i.row+1;l<=r.row+1;l++){var u=n.stringTrimLeft(n.stringTrimRight(t.session.doc.getLine(l)));0!==u.length&&(u=" "+u),h+=u}r.row+1<t.session.doc.getLength()-1&&(h+=t.session.doc.getNewLineCharacter()),t.clearSelection(),t.session.doc.replace(new s(i.row,0,r.row+2,0),h),a>0?(t.selection.moveCursorTo(i.row,i.column),t.selection.selectTo(i.row,i.column+a)):(o=t.session.doc.getLine(i.row).length>o?o+1:o,t.selection.moveCursorTo(i.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(t){var e=t.session.doc.getLength()-1,i=t.session.doc.getLine(e).length,n=t.selection.rangeList.ranges,r=[];n.length<1&&(n=[t.selection.getRange()]);for(var o=0;o<n.length;o++)o==n.length-1&&(n[o].end.row===e&&n[o].end.column===i||r.push(new s(n[o].end.row,n[o].end.column,e,i))),0===o?0===n[o].start.row&&0===n[o].start.column||r.push(new s(0,0,n[o].start.row,n[o].start.column)):r.push(new s(n[o-1].end.row,n[o-1].end.column,n[o].start.row,n[o].start.column));for(t.exitMultiSelectMode(),t.clearSelection(),o=0;o<r.length;o++)t.selection.addRange(r[o],!1)},readOnly:!0,scrollIntoView:"none"},{name:"openCommandPallete",description:"Open command pallete",bindKey:o("F1","F1"),exec:function(t){t.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:o(null,null),exec:function(t){t.prompt({$type:"modes"})},readOnly:!0}]})),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/clipboard"],(function(t,e,i){"use strict";t("./lib/fixoldbrowsers");var n=t("./lib/oop"),r=t("./lib/dom"),s=t("./lib/lang"),o=t("./lib/useragent"),a=t("./keyboard/textinput").TextInput,h=t("./mouse/mouse_handler").MouseHandler,l=t("./mouse/fold_handler").FoldHandler,u=t("./keyboard/keybinding").KeyBinding,c=t("./edit_session").EditSession,d=t("./search").Search,p=t("./range").Range,f=t("./lib/event_emitter").EventEmitter,m=t("./commands/command_manager").CommandManager,g=t("./commands/default_commands").commands,v=t("./config"),y=t("./token_iterator").TokenIterator,x=t("./clipboard"),E=function(t,e,i){var n=t.getContainerElement();this.container=n,this.renderer=t,this.id="editor"+ ++E.$uid,this.commands=new m(o.isMac?"mac":"win",g),"object"==typeof document&&(this.textInput=new a(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new h(this),new l(this)),this.keyBinding=new u(this),this.$search=(new d).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(t,e){e._$emitInputEvent.schedule(31)})),this.setSession(e||i&&i.session||new c("")),v.resetOptions(this),i&&this.setOptions(i),v._signal("editor",this)};E.$uid=0,function(){n.implement(this,f),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(t){if(this.curOp){if(!t||this.curOp.command)return;this.prevOp=this.curOp}t||(this.previousCommand=null,t={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:t.command||{},args:t.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(t){if(this.curOp){if(t&&!1===t.returnValue)return this.curOp=null;if(1==t&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var e=this.curOp.command,i=e&&e.scrollIntoView;if(i){switch(i){case"center-animate":i="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),r=this.renderer.layerConfig;(n.start.row>=r.lastRow||n.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==i&&this.renderer.animateScrolling(this.curOp.scrollTop)}var s=this.selection.toJSON();this.curOp.selectionAfter=s,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(s),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(t){if(this.$mergeUndoDeltas){var e=this.prevOp,i=this.$mergeableCommands,n=e.command&&t.command.name==e.command.name;if("insertstring"==t.command.name){var r=t.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(e.args)),this.mergeNextCommand=!0}else n=n&&-1!==i.indexOf(t.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(t.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(t,e){if(t&&"string"==typeof t&&"ace"!=t){this.$keybindingId=t;var i=this;v.loadModule(["keybinding",t],(function(n){i.$keybindingId==t&&i.keyBinding.setKeyboardHandler(n&&n.handler),e&&e()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(t),e&&e()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(t){if(this.session!=t){this.curOp&&this.endOperation(),this.curOp={};var e=this.session;if(e){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var i=this.session.getSelection();i.off("changeCursor",this.$onCursorChange),i.off("changeSelection",this.$onSelectionChange)}this.session=t,t?(this.$onDocumentChange=this.onDocumentChange.bind(this),t.on("change",this.$onDocumentChange),this.renderer.setSession(t),this.$onChangeMode=this.onChangeMode.bind(this),t.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),t.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),t.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),t.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),t.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),t.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=t.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(t)),this._signal("changeSession",{session:t,oldSession:e}),this.curOp=null,e&&e._signal("changeEditor",{oldEditor:this}),t&&t._signal("changeEditor",{editor:this}),t&&t.bgTokenizer&&t.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(t,e){return this.session.doc.setValue(t),e?1==e?this.navigateFileEnd():-1==e&&this.navigateFileStart():this.selectAll(),t},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(t){this.renderer.onResize(t)},this.setTheme=function(t,e){this.renderer.setTheme(t,e)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(t){this.renderer.setStyle(t)},this.unsetStyle=function(t){this.renderer.unsetStyle(t)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container).fontSize},this.setFontSize=function(t){this.setOption("fontSize",t)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var t=this;this.$highlightPending=!0,setTimeout((function(){t.$highlightPending=!1;var e=t.session;if(e&&e.bgTokenizer){var i=e.findMatchingBracket(t.getCursorPosition());if(i)var n=new p(i.row,i.column,i.row,i.column+1);else e.$mode.getMatching&&(n=e.$mode.getMatching(t.session));n&&(e.$bracketHighlight=e.addMarker(n,"ace_bracket","text"))}}),50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var t=this;this.$highlightTagPending=!0,setTimeout((function(){t.$highlightTagPending=!1;var e=t.session;if(e&&e.bgTokenizer){var i=t.getCursorPosition(),n=new y(t.session,i.row,i.column),r=n.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return e.removeMarker(e.$tagHighlight),void(e.$tagHighlight=null);if(-1==r.type.indexOf("tag-open")||(r=n.stepForward())){var s=r.value,o=0,a=n.stepBackward();if("<"==a.value)do{a=r,(r=n.stepForward())&&r.value===s&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?o++:"</"===a.value&&o--)}while(r&&o>=0);else{do{r=a,a=n.stepBackward(),r&&r.value===s&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?o++:"</"===a.value&&o--)}while(a&&o<=0);n.stepForward()}if(!r)return e.removeMarker(e.$tagHighlight),void(e.$tagHighlight=null);var h=n.getCurrentTokenRow(),l=n.getCurrentTokenColumn(),u=new p(h,l,h,l+r.value.length),c=e.$backMarkers[e.$tagHighlight];e.$tagHighlight&&null!=c&&0!==u.compareRange(c.range)&&(e.removeMarker(e.$tagHighlight),e.$tagHighlight=null),e.$tagHighlight||(e.$tagHighlight=e.addMarker(u,"ace_bracket","text"))}}}),50)}},this.focus=function(){var t=this;setTimeout((function(){t.isFocused()||t.textInput.focus()})),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(t){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",t))},this.onBlur=function(t){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",t))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(t){var e=this.session.$useWrapMode,i=t.start.row==t.end.row?t.end.row:1/0;this.renderer.updateLines(t.start.row,i,e),this._signal("change",t),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(t){var e=t.data;this.renderer.updateLines(e.first,e.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var t,e=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(t=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(t=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(t=!1)),e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var i=new p(t.row,t.column,t.row,1/0);i.id=e.addMarker(i,"ace_active-line","screenLine"),e.$highlightLineMarker=i}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},this.onSelectionChange=function(t){var e=this.session;if(e.$selectionMarker&&e.removeMarker(e.$selectionMarker),e.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var i=this.selection.getRange(),n=this.getSelectionStyle();e.$selectionMarker=e.addMarker(i,"ace_selection",n)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var t=this.session,e=this.getSelectionRange();if(!e.isEmpty()&&!e.isMultiLine()){var i=e.start.column,n=e.end.column,r=t.getLine(e.start.row),s=r.substring(i,n);if(!(s.length>5e3)&&/[\w\d]/.test(s)){var o=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s}),a=r.substring(i-1,n+1);if(o.test(a))return o}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(t){this.renderer.updateText(),this._emit("changeMode",t)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var t=this.getSelectedText(),e=this.session.doc.getNewLineCharacter(),i=!1;if(!t&&this.$copyWithEmptySelection){i=!0;for(var n=this.selection.getAllRanges(),r=0;r<n.length;r++){var s=n[r];r&&n[r-1].start.row==s.start.row||(t+=this.session.getLine(s.start.row)+e)}}var o={text:t};return this._signal("copy",o),x.lineMode=i?o.text:"",o.text},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(t,e){var i={text:t,event:e};this.commands.exec("paste",this,i)},this.$handlePaste=function(t){"string"==typeof t&&(t={text:t}),this._signal("paste",t);var e=t.text,i=e==x.lineMode,n=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)i?n.insert({row:this.selection.lead.row,column:0},e):this.insert(e);else if(i)this.selection.rangeList.ranges.forEach((function(t){n.insert({row:t.start.row,column:0},e)}));else{var r=e.split(/\r\n|\r|\n/),s=this.selection.rangeList.ranges,o=!(2!=r.length||r[0]&&r[1]);if(r.length!=s.length||o)return this.commands.exec("insertstring",this,e);for(var a=s.length;a--;){var h=s[a];h.isEmpty()||n.remove(h),n.insert(h.start,r[a])}}},this.execCommand=function(t,e){return this.commands.exec(t,this,e)},this.insert=function(t,e){var i=this.session,n=i.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()&&!e){var s=n.transformAction(i.getState(r.row),"insertion",this,i,t);s&&(t!==s.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),t=s.text)}if("\t"==t&&(t=this.session.getTabString()),this.selection.isEmpty())this.session.getOverwrite()&&-1==t.indexOf("\n")&&((o=new p.fromPoints(r,r)).end.column+=t.length,this.session.remove(o));else{var o=this.getSelectionRange();r=this.session.remove(o),this.clearSelection()}if("\n"==t||"\r\n"==t){var a=i.getLine(r.row);if(r.column>a.search(/\S|$/)){var h=a.substr(r.column).search(/\S|$/);i.doc.removeInLine(r.row,r.column,r.column+h)}}this.clearSelection();var l=r.column,u=i.getState(r.row),c=(a=i.getLine(r.row),n.checkOutdent(u,a,t));if(i.insert(r,t),s&&s.selection&&(2==s.selection.length?this.selection.setSelectionRange(new p(r.row,l+s.selection[0],r.row,l+s.selection[1])):this.selection.setSelectionRange(new p(r.row+s.selection[0],s.selection[1],r.row+s.selection[2],s.selection[3]))),i.getDocument().isNewLine(t)){var d=n.getNextLineIndent(u,a.slice(0,r.column),i.getTabString());i.insert({row:r.row+1,column:0},d)}c&&n.autoOutdent(u,i,r.row)},this.onTextInput=function(t,e){if(!e)return this.keyBinding.onTextInput(t);this.startOperation({command:{name:"insertstring"}});var i=this.applyComposition.bind(this,t,e);this.selection.rangeCount?this.forEachSelection(i):i(),this.endOperation()},this.applyComposition=function(t,e){var i;(e.extendLeft||e.extendRight)&&((i=this.selection.getRange()).start.column-=e.extendLeft,i.end.column+=e.extendRight,this.selection.setRange(i),t||i.isEmpty()||this.remove()),!t&&this.selection.isEmpty()||this.insert(t,!0),(e.restoreStart||e.restoreEnd)&&((i=this.selection.getRange()).start.column-=e.restoreStart,i.end.column-=e.restoreEnd,this.selection.setRange(i))},this.onCommandKey=function(t,e,i){return this.keyBinding.onCommandKey(t,e,i)},this.setOverwrite=function(t){this.session.setOverwrite(t)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(t){this.setOption("scrollSpeed",t)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(t){this.setOption("dragDelay",t)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(t){this.setOption("selectionStyle",t)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(t){this.setOption("highlightActiveLine",t)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(t){this.setOption("highlightSelectedWord",t)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(t){this.renderer.setAnimatedScroll(t)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(t){this.renderer.setShowInvisibles(t)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(t){this.renderer.setDisplayIndentGuides(t)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(t){this.renderer.setShowPrintMargin(t)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(t){this.renderer.setPrintMarginColumn(t)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(t){this.setOption("readOnly",t)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(t){this.setOption("behavioursEnabled",t)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(t){this.setOption("wrapBehavioursEnabled",t)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(t){this.setOption("showFoldWidgets",t)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(t){this.selection.isEmpty()&&("left"==t?this.selection.selectLeft():this.selection.selectRight());var e=this.getSelectionRange();if(this.getBehavioursEnabled()){var i=this.session,n=i.getState(e.start.row),r=i.getMode().transformAction(n,"deletion",this,i,e);if(0===e.end.column){var s=i.getTextRange(e);if("\n"==s[s.length-1]){var o=i.getLine(e.end.row);/^\s+$/.test(o)&&(e.end.column=o.length)}}r&&(e=r)}this.session.remove(e),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var t=this.getSelectionRange();t.start.column==t.end.column&&t.start.row==t.end.row&&(t.end.column=0,t.end.row++),this.session.remove(t),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var t=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(t)},this.transposeLetters=function(){if(this.selection.isEmpty()){var t=this.getCursorPosition(),e=t.column;if(0!==e){var i,n,r=this.session.getLine(t.row);e<r.length?(i=r.charAt(e)+r.charAt(e-1),n=new p(t.row,e-1,t.row,e+1)):(i=r.charAt(e-1)+r.charAt(e-2),n=new p(t.row,e-2,t.row,e)),this.session.replace(n,i),this.session.selection.moveToPosition(n.end)}}},this.toLowerCase=function(){var t=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var e=this.getSelectionRange(),i=this.session.getTextRange(e);this.session.replace(e,i.toLowerCase()),this.selection.setSelectionRange(t)},this.toUpperCase=function(){var t=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var e=this.getSelectionRange(),i=this.session.getTextRange(e);this.session.replace(e,i.toUpperCase()),this.selection.setSelectionRange(t)},this.indent=function(){var t=this.session,e=this.getSelectionRange();if(!(e.start.row<e.end.row)){if(e.start.column<e.end.column){var i=t.getTextRange(e);if(!/^\s+$/.test(i))return u=this.$getSelectedRows(),void t.indentRows(u.first,u.last,"\t")}var n=t.getLine(e.start.row),r=e.start,o=t.getTabSize(),a=t.documentToScreenColumn(r.row,r.column);if(this.session.getUseSoftTabs())var h=o-a%o,l=s.stringRepeat(" ",h);else{for(h=a%o;" "==n[e.start.column-1]&&h;)e.start.column--,h--;this.selection.setSelectionRange(e),l="\t"}return this.insert(l)}var u=this.$getSelectedRows();t.indentRows(u.first,u.last,"\t")},this.blockIndent=function(){var t=this.$getSelectedRows();this.session.indentRows(t.first,t.last,"\t")},this.blockOutdent=function(){var t=this.session.getSelection();this.session.outdentRows(t.getRange())},this.sortLines=function(){for(var t=this.$getSelectedRows(),e=this.session,i=[],n=t.first;n<=t.last;n++)i.push(e.getLine(n));i.sort((function(t,e){return t.toLowerCase()<e.toLowerCase()?-1:t.toLowerCase()>e.toLowerCase()?1:0}));var r=new p(0,0,0,0);for(n=t.first;n<=t.last;n++){var s=e.getLine(n);r.start.row=n,r.end.row=n,r.end.column=s.length,e.replace(r,i[n-t.first])}},this.toggleCommentLines=function(){var t=this.session.getState(this.getCursorPosition().row),e=this.$getSelectedRows();this.session.getMode().toggleCommentLines(t,this.session,e.first,e.last)},this.toggleBlockComment=function(){var t=this.getCursorPosition(),e=this.session.getState(t.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(e,this.session,i,t)},this.getNumberAt=function(t,e){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;for(var n=this.session.getLine(t);i.lastIndex<e;){var r=i.exec(n);if(r.index<=e&&r.index+r[0].length>=e)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(t){var e=this.selection.getCursor().row,i=this.selection.getCursor().column,n=new p(e,i-1,e,i),r=this.session.getTextRange(n);if(!isNaN(parseFloat(r))&&isFinite(r)){var s=this.getNumberAt(e,i);if(s){var o=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,a=s.start+s.value.length-o,h=parseFloat(s.value);h*=Math.pow(10,a),o!==s.end&&i<o?t*=Math.pow(10,s.end-i-1):t*=Math.pow(10,s.end-i),h+=t;var l=(h/=Math.pow(10,a)).toFixed(a),u=new p(e,s.start,e,s.end);this.session.replace(u,l),this.moveCursorTo(e,Math.max(s.start+1,i+l.length-s.value.length))}}else this.toggleWord()},this.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],this.toggleWord=function(){var t=this.selection.getCursor().row,e=this.selection.getCursor().column;this.selection.selectWord();var i=this.getSelectedText(),n=this.selection.getWordRange().start.column,r=i.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),o=e-n-1;o<0&&(o=0);var a=0,h=0,l=this;i.match(/[A-Za-z0-9_]+/)&&r.forEach((function(e,r){h=a+e.length,o>=a&&o<=h&&(i=e,l.selection.clearSelection(),l.moveCursorTo(t,a+n),l.selection.selectTo(t,h+n)),a=h}));for(var u,c=this.$toggleWordPairs,d=0;d<c.length;d++)for(var p=c[d],f=0;f<=1;f++){var m=+!f,g=i.match(new RegExp("^\\s?_?("+s.escapeRegExp(p[f])+")\\s?$","i"));g&&i.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(g[1])+")($|\\s)","g"))&&(u=i.replace(new RegExp(s.escapeRegExp(p[f]),"i"),(function(t){var e=p[m];return t.toUpperCase()==t?e=e.toUpperCase():t.charAt(0).toUpperCase()==t.charAt(0)&&(e=e.substr(0,0)+p[m].charAt(0).toUpperCase()+e.substr(1)),e})),this.insert(u),u="")}},this.removeLines=function(){var t=this.$getSelectedRows();this.session.removeFullLines(t.first,t.last),this.clearSelection()},this.duplicateSelection=function(){var t=this.selection,e=this.session,i=t.getRange(),n=t.isBackwards();if(i.isEmpty()){var r=i.start.row;e.duplicateLines(r,r)}else{var s=n?i.start:i.end,o=e.insert(s,e.getTextRange(i),!1);i.start=s,i.end=o,t.setSelectionRange(i,n)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(t,e,i){return this.session.moveText(t,e,i)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(t,e){var i,n,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var s=r.toOrientedRange();i=this.$getSelectedRows(s),n=this.session.$moveLines(i.first,i.last,e?0:t),e&&-1==t&&(n=0),s.moveBy(n,0),r.fromOrientedRange(s)}else{var o=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,h=0,l=o.length,u=0;u<l;u++){var c=u;o[u].moveBy(a,0);for(var d=(i=this.$getSelectedRows(o[u])).first,p=i.last;++u<l;){h&&o[u].moveBy(h,0);var f=this.$getSelectedRows(o[u]);if(e&&f.first!=p)break;if(!e&&f.first>p+1)break;p=f.last}for(u--,a=this.session.$moveLines(d,p,e?0:t),e&&-1==t&&(c=u+1);c<=u;)o[c].moveBy(a,0),c++;e||(a=0),h+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(t){return t=(t||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(t.start.row),last:this.session.getRowFoldEnd(t.end.row)}},this.onCompositionStart=function(t){this.renderer.showComposition(t)},this.onCompositionUpdate=function(t){this.renderer.setCompositionText(t)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(t){return t>=this.getFirstVisibleRow()&&t<=this.getLastVisibleRow()},this.isRowFullyVisible=function(t){return t>=this.renderer.getFirstFullyVisibleRow()&&t<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(t,e){var i=this.renderer,n=this.renderer.layerConfig,r=t*Math.floor(n.height/n.lineHeight);!0===e?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===e&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var s=i.scrollTop;i.scrollBy(0,r*n.lineHeight),null!=e&&i.scrollCursorIntoView(null,.5),i.animateScrolling(s)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(t){this.renderer.scrollToRow(t)},this.scrollToLine=function(t,e,i,n){this.renderer.scrollToLine(t,e,i,n)},this.centerSelection=function(){var t=this.getSelectionRange(),e={row:Math.floor(t.start.row+(t.end.row-t.start.row)/2),column:Math.floor(t.start.column+(t.end.column-t.start.column)/2)};this.renderer.alignCursor(e,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(t,e){this.selection.moveCursorTo(t,e)},this.moveCursorToPosition=function(t){this.selection.moveCursorToPosition(t)},this.jumpToMatching=function(t,e){var i=this.getCursorPosition(),n=new y(this.session,i.row,i.column),r=n.getCurrentToken(),s=r||n.stepForward();if(s){var o,a,h=!1,l={},u=i.column-s.start,c={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;u<s.value.length&&!h;u++)if(c[s.value[u]])switch(a=c[s.value[u]]+"."+s.type.replace("rparen","lparen"),isNaN(l[a])&&(l[a]=0),s.value[u]){case"(":case"[":case"{":l[a]++;break;case")":case"]":case"}":l[a]--,-1===l[a]&&(o="bracket",h=!0)}}else-1!==s.type.indexOf("tag-name")&&(isNaN(l[s.value])&&(l[s.value]=0),"<"===r.value?l[s.value]++:"</"===r.value&&l[s.value]--,-1===l[s.value]&&(o="tag",h=!0));h||(r=s,s=n.stepForward(),u=0)}while(s&&!h);if(o){var d,f;if("bracket"===o)(d=this.session.getBracketRange(i))||(f=(d=new p(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+u-1,n.getCurrentTokenRow(),n.getCurrentTokenColumn()+u-1)).start,(e||f.row===i.row&&Math.abs(f.column-i.column)<2)&&(d=this.session.getBracketRange(f)));else if("tag"===o){if(!s||-1===s.type.indexOf("tag-name"))return;var m=s.value;if(0===(d=new p(n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2,n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2)).compare(i.row,i.column)){h=!1;do{s=r,(r=n.stepBackward())&&(-1!==r.type.indexOf("tag-close")&&d.setEnd(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1),s.value===m&&-1!==s.type.indexOf("tag-name")&&("<"===r.value?l[m]++:"</"===r.value&&l[m]--,0===l[m]&&(h=!0)))}while(r&&!h)}s&&s.type.indexOf("tag-name")&&(f=d.start).row==i.row&&Math.abs(f.column-i.column)<2&&(f=d.end)}(f=d&&d.cursor||f)&&(t?d&&e?this.selection.setRange(d):d&&d.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(f.row,f.column):this.selection.moveTo(f.row,f.column))}}},this.gotoLine=function(t,e,i){this.selection.clearSelection(),this.session.unfold({row:t-1,column:e||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(t-1,e||0),this.isRowFullyVisible(t-1)||this.scrollToLine(t-1,!0,i)},this.navigateTo=function(t,e){this.selection.moveTo(t,e)},this.navigateUp=function(t){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var e=this.selection.anchor.getPosition();return this.moveCursorToPosition(e)}this.selection.clearSelection(),this.selection.moveCursorBy(-t||-1,0)},this.navigateDown=function(t){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var e=this.selection.anchor.getPosition();return this.moveCursorToPosition(e)}this.selection.clearSelection(),this.selection.moveCursorBy(t||1,0)},this.navigateLeft=function(t){if(this.selection.isEmpty())for(t=t||1;t--;)this.selection.moveCursorLeft();else{var e=this.getSelectionRange().start;this.moveCursorToPosition(e)}this.clearSelection()},this.navigateRight=function(t){if(this.selection.isEmpty())for(t=t||1;t--;)this.selection.moveCursorRight();else{var e=this.getSelectionRange().end;this.moveCursorToPosition(e)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(t,e){e&&this.$search.set(e);var i=this.$search.find(this.session),n=0;return i?(this.$tryReplace(i,t)&&(n=1),this.selection.setSelectionRange(i),this.renderer.scrollSelectionIntoView(i.start,i.end),n):n},this.replaceAll=function(t,e){e&&this.$search.set(e);var i=this.$search.findAll(this.session),n=0;if(!i.length)return n;var r=this.getSelectionRange();this.selection.moveTo(0,0);for(var s=i.length-1;s>=0;--s)this.$tryReplace(i[s],t)&&n++;return this.selection.setSelectionRange(r),n},this.$tryReplace=function(t,e){var i=this.session.getTextRange(t);return null!==(e=this.$search.replace(i,e))?(t.end=this.session.replace(t,e),t):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(t,e,i){e||(e={}),"string"==typeof t||t instanceof RegExp?e.needle=t:"object"==typeof t&&n.mixin(e,t);var r=this.selection.getRange();null==e.needle&&((t=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),t=this.session.getTextRange(r)),this.$search.set({needle:t})),this.$search.set(e),e.start||this.$search.set({start:r});var s=this.$search.find(this.session);return e.preventScroll?s:s?(this.revealRange(s,i),s):(e.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(t,e){this.find({skipCurrent:!0,backwards:!1},t,e)},this.findPrevious=function(t,e){this.find(t,{skipCurrent:!0,backwards:!0},e)},this.revealRange=function(t,e){this.session.unfold(t),this.selection.setSelectionRange(t);var i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(t.start,t.end,.5),!1!==e&&this.renderer.animateScrolling(i)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(t){if(t){var e,i=this,n=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var s=this.on("changeSelection",(function(){n=!0})),o=this.renderer.on("beforeRender",(function(){n&&(e=i.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(n&&e&&(i.isFocused()||i.searchBox&&i.searchBox.isFocused())){var t=i.renderer,s=t.$cursorLayer.$pixelPos,o=t.layerConfig,a=s.top-o.offset;null!=(n=s.top>=0&&a+e.top<0||!(s.top<o.height&&s.top+e.top+o.lineHeight>window.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=s.left+"px",r.style.height=o.lineHeight+"px",r.scrollIntoView(n)),n=e=null}}));this.setAutoScrollEditorIntoView=function(t){t||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",s),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",o))}}},this.$resetCursorStyle=function(){var t=this.$cursorStyle||"ace",e=this.renderer.$cursorLayer;e&&(e.setSmoothBlinking(/smooth/.test(t)),e.isBlinking=!this.$readOnly&&"wide"!=t,r.setCssClass(e.element,"ace_slim-cursors",/slim/.test(t)))},this.prompt=function(t,e,i){var n=this;v.loadModule("./ext/prompt",(function(r){r.prompt(n,t,e,i)}))}}.call(E.prototype),v.defineOptions(E.prototype,"editor",{selectionStyle:{set:function(t){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:t})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(t){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(t){this.textInput.setReadOnly(t),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(t){this.textInput.setCopyWithEmptySelection(t)},initialValue:!1},cursorStyle:{set:function(t){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(t){this.setAutoScrollEditorIntoView(t)}},keyboardHandler:{set:function(t){this.setKeyboardHandler(t)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(t){this.session.setValue(t)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(t){this.setSession(t)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(t){this.renderer.$gutterLayer.setShowLineNumbers(t),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),t&&this.$relativeLineNumbers?T.attach(this):T.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(t){this.$showLineNumbers&&t?T.attach(this):T.detach(this)}},placeholder:{set:function(t){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var t=this.renderer.$composition||this.getValue();if(t&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),r.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!t&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),r.addCssClass(this.container,"ace_hasPlaceholder");var e=r.createElement("div");e.className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var T={getText:function(t,e){return(Math.abs(t.selection.lead.row-e)||e+1+(e<9?"·":""))+""},getWidth:function(t,e,i){return Math.max(e.toString().length,(i.lastRow+1).toString().length,2)*i.characterWidth},update:function(t,e){e.renderer.$loop.schedule(e.renderer.CHANGE_GUTTER)},attach:function(t){t.renderer.$gutterLayer.$renderer=this,t.on("changeSelection",this.update),this.update(null,t)},detach:function(t){t.renderer.$gutterLayer.$renderer==this&&(t.renderer.$gutterLayer.$renderer=null),t.off("changeSelection",this.update),this.update(null,t)}};e.Editor=E})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(t,e,i){"use strict";var n=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(t){this.$session=t},this.add=function(t,e,i){this.$fromUndo||t!=this.$lastDelta&&(!1!==e&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),t.id=this.$rev=++this.$maxRev),"remove"!=t.action&&"insert"!=t.action||(this.$lastDelta=t),this.lastDeltas.push(t))},this.addSelection=function(t,e){this.selections.push({value:t,rev:e||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(t,e){null==e&&(e=this.$rev+1);for(var i=this.$undoStack,n=i.length;n--;){var r=i[n][0];if(r.id<=t)break;r.id<e&&(r.ignore=!0)}this.lastDeltas=null},this.getSelection=function(t,e){for(var i=this.selections,n=i.length;n--;){var r=i[n];if(r.rev<t)return e&&(r=i[n+1]),r}},this.getRevision=function(){return this.$rev},this.getDeltas=function(t,e){null==e&&(e=this.$rev+1);for(var i=this.$undoStack,n=null,r=0,s=i.length;s--;){var o=i[s][0];if(o.id<e&&!n&&(n=s+1),o.id<=t){r=s+1;break}}return i.slice(r,n)},this.getChangedRanges=function(t,e){null==e&&(e=this.$rev+1)},this.getChangedLines=function(t,e){null==e&&(e=this.$rev+1)},this.undo=function(t,e){this.lastDeltas=null;var i=this.$undoStack;if(function(t,e){for(var i=e;i--;){var n=t[i];if(n&&!n[0].ignore){for(;i<e-1;){var r=u(t[i],t[i+1]);t[i]=r[0],t[i+1]=r[1],i++}return!0}}}(i,i.length)){t||(t=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var n=i.pop(),r=null;return n&&n.length&&(r=t.undoChanges(n,e),this.$redoStack.push(n),this.$syncRev()),this.$fromUndo=!1,r}},this.redo=function(t,e){if(this.lastDeltas=null,t||(t=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var i=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);!function(t,e){for(var i=0;i<e.length;i++)for(var n=e[i],r=0;r<n.length;r++)m(t,n[r])}(this.$redoStack,i),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(t){t[0].id=++this.$maxRev}),this)}var n=this.$redoStack.pop(),r=null;return n&&(r=t.redoChanges(n,e),this.$undoStack.push(n),this.$syncRev()),this.$fromUndo=!1,r},this.$syncRev=function(){var t=this.$undoStack,e=t[t.length-1],i=e&&e[0].id||0;this.$redoStackBaseRev=i,this.$rev=i},this.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},this.canUndo=function(){return this.$undoStack.length>0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(t){null==t&&(t=this.$rev),this.mark=t},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(t){return t?a(t):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(n.prototype);var r=t("./range").Range,s=r.comparePoints;function o(t){return{row:t.row,column:t.column}}function a(t){if(t=t||this,Array.isArray(t))return t.map(a).join("\n");var e="";return t.action?(e="insert"==t.action?"+":"-",e+="["+t.lines+"]"):t.value&&(e=Array.isArray(t.value)?t.value.map(h).join("\n"):h(t.value)),t.start&&(e+=h(t)),(t.id||t.rev)&&(e+="\t("+(t.id||t.rev)+")"),e}function h(t){return t.start.row+":"+t.start.column+"=>"+t.end.row+":"+t.end.column}function l(t,e){var i="insert"==t.action,n="insert"==e.action;if(i&&n)if(s(e.start,t.end)>=0)d(e,t,-1);else{if(!(s(e.start,t.start)<=0))return null;d(t,e,1)}else if(i&&!n)if(s(e.start,t.end)>=0)d(e,t,-1);else{if(!(s(e.end,t.start)<=0))return null;d(t,e,-1)}else if(!i&&n)if(s(e.start,t.start)>=0)d(e,t,1);else{if(!(s(e.start,t.start)<=0))return null;d(t,e,1)}else if(!i&&!n)if(s(e.start,t.start)>=0)d(e,t,1);else{if(!(s(e.end,t.start)<=0))return null;d(t,e,-1)}return[e,t]}function u(t,e){for(var i=t.length;i--;)for(var n=0;n<e.length;n++)if(!l(t[i],e[n])){for(;i<t.length;){for(;n--;)l(e[n],t[i]);n=e.length,i++}return[t,e]}return t.selectionBefore=e.selectionBefore=t.selectionAfter=e.selectionAfter=null,[e,t]}function c(t,e){var i="insert"==t.action,n="insert"==e.action;if(i&&n)s(t.start,e.start)<0?d(e,t,1):d(t,e,1);else if(i&&!n)s(t.start,e.end)>=0?d(t,e,-1):(s(t.start,e.start)<=0||d(t,r.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!i&&n)s(e.start,t.end)>=0?d(e,t,-1):(s(e.start,t.start)<=0||d(e,r.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!i&&!n)if(s(e.start,t.end)>=0)d(e,t,-1);else{var o,a;if(!(s(e.end,t.start)<=0))return s(t.start,e.start)<0&&(o=t,t=f(t,e.start)),s(t.end,e.end)>0&&(a=f(t,e.end)),p(e.end,t.start,t.end,-1),a&&!o&&(t.lines=a.lines,t.start=a.start,t.end=a.end,a=t),[e,o,a].filter(Boolean);d(t,e,-1)}return[e,t]}function d(t,e,i){p(t.start,e.start,e.end,i),p(t.end,e.start,e.end,i)}function p(t,e,i,n){t.row==(1==n?e:i).row&&(t.column+=n*(i.column-e.column)),t.row+=n*(i.row-e.row)}function f(t,e){var i=t.lines,n=t.end;t.end=o(e);var r=t.end.row-t.start.row,s=i.splice(r,i.length),a=r?e.column:e.column-t.start.column;return i.push(s[0].substring(0,a)),s[0]=s[0].substr(a),{start:o(e),end:n,lines:s,action:t.action}}function m(t,e){e=function(t){return{start:o(t.start),end:o(t.end),action:t.action,lines:t.lines.slice()}}(e);for(var i=t.length;i--;){for(var n=t[i],r=0;r<n.length;r++){var s=c(n[r],e);e=s[0],2!=s.length&&(s[2]?(n.splice(r+1,1,s[1],s[2]),r++):s[1]||(n.splice(r,1),r--))}n.length||t.splice(i,1)}return t}r.comparePoints,e.UndoManager=n})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(t,e,i){"use strict";var n=t("../lib/dom"),r=function(t,e){this.element=t,this.canvasHeight=e||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0};(function(){this.moveContainer=function(t){n.translate(this.element,0,-t.firstRowScreen*t.lineHeight%this.canvasHeight-t.offset*this.$offsetCoefficient)},this.pageChanged=function(t,e){return Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)!==Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)},this.computeLineTop=function(t,e,i){var n=e.firstRowScreen*e.lineHeight,r=Math.floor(n/this.canvasHeight);return i.documentToScreenRow(t,0)*e.lineHeight-r*this.canvasHeight},this.computeLineHeight=function(t,e,i){return e.lineHeight*i.getRowLength(t)},this.getLength=function(){return this.cells.length},this.get=function(t){return this.cells[t]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(t){if(Array.isArray(t)){this.cells.push.apply(this.cells,t);for(var e=n.createFragment(this.element),i=0;i<t.length;i++)e.appendChild(t[i].element);this.element.appendChild(e)}else this.cells.push(t),this.element.appendChild(t.element)},this.unshift=function(t){if(Array.isArray(t)){this.cells.unshift.apply(this.cells,t);for(var e=n.createFragment(this.element),i=0;i<t.length;i++)e.appendChild(t[i].element);this.element.firstChild?this.element.insertBefore(e,this.element.firstChild):this.element.appendChild(e)}else this.cells.unshift(t),this.element.insertAdjacentElement("afterbegin",t.element)},this.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},this.$cacheCell=function(t){t&&(t.element.remove(),this.cellCache.push(t))},this.createCell=function(t,e,i,r){var s=this.cellCache.pop();if(!s){var o=n.createElement("div");r&&r(o),this.element.appendChild(o),s={element:o,text:"",row:t}}return s.row=t,s}}).call(r.prototype),e.Lines=r})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines"],(function(t,e,i){"use strict";var n=t("../lib/dom"),r=t("../lib/oop"),s=t("../lib/lang"),o=t("../lib/event_emitter").EventEmitter,a=t("./lines").Lines,h=function(t){this.element=n.createElement("div"),this.element.className="ace_layer ace_gutter-layer",t.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1};function l(t){var e=document.createTextNode("");t.appendChild(e);var i=n.createElement("span");return t.appendChild(i),t}(function(){r.implement(this,o),this.setSession=function(t){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=t,t&&t.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(t,e){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(t,e)},this.removeGutterDecoration=function(t,e){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(t,e)},this.setAnnotations=function(t){this.$annotations=[];for(var e=0;e<t.length;e++){var i=t[e],n=i.row,r=this.$annotations[n];r||(r=this.$annotations[n]={text:[]});var o=i.text;o=o?s.escapeHTML(o):i.html||"",-1===r.text.indexOf(o)&&r.text.push(o);var a=i.type;"error"==a?r.className=" ace_error":"warning"==a&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=a||r.className||(r.className=" ace_info")}},this.$updateAnnotations=function(t){if(this.$annotations.length){var e=t.start.row,i=t.end.row-e;if(0===i);else if("remove"==t.action)this.$annotations.splice(e,i+1,null);else{var n=new Array(i+1);n.unshift(e,1),this.$annotations.splice.apply(this.$annotations,n)}}},this.update=function(t){this.config=t;var e=this.session,i=t.firstRow,n=Math.min(t.lastRow+t.gutterOffset,e.getLength()-1);this.oldLastRow=n,this.config=t,this.$lines.moveContainer(t),this.$updateCursorRow();for(var r=e.getNextFoldLine(i),s=r?r.start.row:1/0,o=null,a=-1,h=i;;){if(h>s&&(h=r.end.row+1,s=(r=e.getNextFoldLine(h,r))?r.start.row:1/0),h>n){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(o=this.$lines.get(++a))?o.row=h:(o=this.$lines.createCell(h,t,this.session,l),this.$lines.push(o)),this.$renderCell(o,t,r,h),h++}this._signal("afterRender"),this.$updateGutterWidth(t)},this.$updateGutterWidth=function(t){var e=this.session,i=e.gutterRenderer||this.$renderer,n=e.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||e.$useWrapMode)&&(r=e.getLength()+n-1);var s=i?i.getWidth(e,r,t):r.toString().length*t.characterWidth,o=this.$padding||this.$computePadding();(s+=o.left+o.right)===this.gutterWidth||isNaN(s)||(this.gutterWidth=s,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",s))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var t=this.session.selection.getCursor();this.$cursorRow!==t.row&&(this.$cursorRow=t.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var t=this.session.selection.cursor.row;if(this.$cursorRow=t,!this.$cursorCell||this.$cursorCell.row!=t){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var e=this.$lines.cells;this.$cursorCell=null;for(var i=0;i<e.length;i++){var n=e[i];if(n.row>=this.$cursorRow){if(n.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(i>0&&r&&r.start.row==e[i-1].row))break;n=e[i-1]}n.element.className="ace_gutter-active-line "+n.element.className,this.$cursorCell=n;break}}}}},this.scrollLines=function(t){var e=this.config;if(this.config=t,this.$updateCursorRow(),this.$lines.pageChanged(e,t))return this.update(t);this.$lines.moveContainer(t);var i=Math.min(t.lastRow+t.gutterOffset,this.session.getLength()-1),n=this.oldLastRow;if(this.oldLastRow=i,!e||n<t.firstRow)return this.update(t);if(i<e.firstRow)return this.update(t);if(e.firstRow<t.firstRow)for(var r=this.session.getFoldedRowCount(e.firstRow,t.firstRow-1);r>0;r--)this.$lines.shift();if(n>i)for(r=this.session.getFoldedRowCount(i+1,n);r>0;r--)this.$lines.pop();t.firstRow<e.firstRow&&this.$lines.unshift(this.$renderLines(t,t.firstRow,e.firstRow-1)),i>n&&this.$lines.push(this.$renderLines(t,n+1,i)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(t)},this.$renderLines=function(t,e,i){for(var n=[],r=e,s=this.session.getNextFoldLine(r),o=s?s.start.row:1/0;r>o&&(r=s.end.row+1,o=(s=this.session.getNextFoldLine(r,s))?s.start.row:1/0),!(r>i);){var a=this.$lines.createCell(r,t,this.session,l);this.$renderCell(a,t,s,r),n.push(a),r++}return n},this.$renderCell=function(t,e,i,r){var s=t.element,o=this.session,a=s.childNodes[0],h=s.childNodes[1],l=o.$firstLineNumber,u=o.$breakpoints,c=o.$decorations,d=o.gutterRenderer||this.$renderer,p=this.$showFoldWidgets&&o.foldWidgets,f=i?i.start.row:Number.MAX_VALUE,m="ace_gutter-cell ";if(this.$highlightGutterLine&&(r==this.$cursorRow||i&&r<this.$cursorRow&&r>=f&&this.$cursorRow<=i.end.row)&&(m+="ace_gutter-active-line ",this.$cursorCell!=t&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=t)),u[r]&&(m+=u[r]),c[r]&&(m+=c[r]),this.$annotations[r]&&(m+=this.$annotations[r].className),s.className!=m&&(s.className=m),p){var g=p[r];null==g&&(g=p[r]=o.getFoldWidget(r))}if(g){m="ace_fold-widget ace_"+g,"start"==g&&r==f&&r<i.end.row?m+=" ace_closed":m+=" ace_open",h.className!=m&&(h.className=m);var v=e.lineHeight+"px";n.setStyle(h.style,"height",v),n.setStyle(h.style,"display","inline-block")}else h&&n.setStyle(h.style,"display","none");var y=(d?d.getText(o,r):r+l).toString();return y!==a.data&&(a.data=y),n.setStyle(t.element.style,"height",this.$lines.computeLineHeight(r,e,o)+"px"),n.setStyle(t.element.style,"top",this.$lines.computeLineTop(r,e,o)+"px"),t.text=y,t},this.$fixedWidth=!1,this.$highlightGutterLine=!0,this.$renderer="",this.setHighlightGutterLine=function(t){this.$highlightGutterLine=t},this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(t){this.$renderer=!t&&{getWidth:function(){return 0},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(t){t?n.addCssClass(this.element,"ace_folding-enabled"):n.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=t,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var t=n.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(t.borderLeftWidth)||0)+(parseInt(t.paddingLeft)||0)+1,this.$padding.right=(parseInt(t.borderRightWidth)||0)+(parseInt(t.paddingRight)||0),this.$padding},this.getRegion=function(t){var e=this.$padding||this.$computePadding(),i=this.element.getBoundingClientRect();return t.x<e.left+i.left?"markers":this.$showFoldWidgets&&t.x>i.right-e.right?"foldWidgets":void 0}}).call(h.prototype),e.Gutter=h})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(t,e,i){"use strict";var n=t("../range").Range,r=t("../lib/dom"),s=function(t){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(t){this.$padding=t},this.setSession=function(t){this.session=t},this.setMarkers=function(t){this.markers=t},this.elt=function(t,e){var i=-1!=this.i&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=e,i.className=t},this.update=function(t){if(t){var e;for(var i in this.config=t,this.i=0,this.markers){var n=this.markers[i];if(n.range){var r=n.range.clipRows(t.firstRow,t.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),n.renderer){var s=this.$getTop(r.start.row,t),o=this.$padding+r.start.column*t.characterWidth;n.renderer(e,r,o,s,t)}else"fullLine"==n.type?this.drawFullLineMarker(e,r,n.clazz,t):"screenLine"==n.type?this.drawScreenLineMarker(e,r,n.clazz,t):r.isMultiLine()?"text"==n.type?this.drawTextMarker(e,r,n.clazz,t):this.drawMultiLineMarker(e,r,n.clazz,t):this.drawSingleLineMarker(e,r,n.clazz+" ace_start ace_br15",t)}else n.update(e,this,this.session,t)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},this.$getTop=function(t,e){return(t-e.firstRowScreen)*e.lineHeight},this.drawTextMarker=function(t,e,i,r,s){for(var o=this.session,a=e.start.row,h=e.end.row,l=a,u=0,c=0,d=o.getScreenLastRowColumn(l),p=new n(l,e.start.column,l,c);l<=h;l++)p.start.row=p.end.row=l,p.start.column=l==a?e.start.column:o.getRowWrapIndent(l),p.end.column=d,u=c,c=d,d=l+1<h?o.getScreenLastRowColumn(l+1):l==h?0:e.end.column,this.drawSingleLineMarker(t,p,i+(l==a?" ace_start":"")+" ace_br"+((l==a||l==a+1&&e.start.column?1:0)|(u<c?2:0)|(c>d?4:0)|(l==h?8:0)),r,l==h?0:1,s)},this.drawMultiLineMarker=function(t,e,i,n,r){var s=this.$padding,o=n.lineHeight,a=this.$getTop(e.start.row,n),h=s+e.start.column*n.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(e.start.row)?((l=e.clone()).end.row=l.start.row,l.end.column=this.session.getLine(l.start.row).length,this.drawBidiSingleLineMarker(t,l,i+" ace_br1 ace_start",n,null,r)):this.elt(i+" ace_br1 ace_start","height:"+o+"px;right:0;top:"+a+"px;left:"+h+"px;"+(r||"")),this.session.$bidiHandler.isBidiRow(e.end.row)){var l;(l=e.clone()).start.row=l.end.row,l.start.column=0,this.drawBidiSingleLineMarker(t,l,i+" ace_br12",n,null,r)}else{a=this.$getTop(e.end.row,n);var u=e.end.column*n.characterWidth;this.elt(i+" ace_br12","height:"+o+"px;width:"+u+"px;top:"+a+"px;left:"+s+"px;"+(r||""))}if(!((o=(e.end.row-e.start.row-1)*n.lineHeight)<=0)){a=this.$getTop(e.start.row+1,n);var c=(e.start.column?1:0)|(e.end.column?0:8);this.elt(i+(c?" ace_br"+c:""),"height:"+o+"px;right:0;top:"+a+"px;left:"+s+"px;"+(r||""))}},this.drawSingleLineMarker=function(t,e,i,n,r,s){if(this.session.$bidiHandler.isBidiRow(e.start.row))return this.drawBidiSingleLineMarker(t,e,i,n,r,s);var o=n.lineHeight,a=(e.end.column+(r||0)-e.start.column)*n.characterWidth,h=this.$getTop(e.start.row,n),l=this.$padding+e.start.column*n.characterWidth;this.elt(i,"height:"+o+"px;width:"+a+"px;top:"+h+"px;left:"+l+"px;"+(s||""))},this.drawBidiSingleLineMarker=function(t,e,i,n,r,s){var o=n.lineHeight,a=this.$getTop(e.start.row,n),h=this.$padding;this.session.$bidiHandler.getSelections(e.start.column,e.end.column).forEach((function(t){this.elt(i,"height:"+o+"px;width:"+t.width+(r||0)+"px;top:"+a+"px;left:"+(h+t.left)+"px;"+(s||""))}),this)},this.drawFullLineMarker=function(t,e,i,n,r){var s=this.$getTop(e.start.row,n),o=n.lineHeight;e.start.row!=e.end.row&&(o+=this.$getTop(e.end.row,n)-s),this.elt(i,"height:"+o+"px;top:"+s+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(t,e,i,n,r){var s=this.$getTop(e.start.row,n),o=n.lineHeight;this.elt(i,"height:"+o+"px;top:"+s+"px;left:0;right:0;"+(r||""))}}).call(s.prototype),e.Marker=s})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(t,e,i){"use strict";var n=t("../lib/oop"),r=t("../lib/dom"),s=t("../lib/lang"),o=t("./lines").Lines,a=t("../lib/event_emitter").EventEmitter,h=function(t){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",t.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)};(function(){n.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var t=this.session.doc,e="\n"==t.getNewLineCharacter()&&"windows"!=t.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(t){this.$padding=t,this.element.style.margin="0 "+t+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(t){this.$fontMetrics=t,this.$fontMetrics.on("changeCharacterSize",function(t){this._signal("changeCharacterSize",t)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(t){this.session=t,t&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(t){return this.showInvisibles!=t&&(this.showInvisibles=t,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(t){return this.displayIndentGuides!=t&&(this.displayIndentGuides=t,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var t=this.session.getTabSize();this.tabSize=t;for(var e=this.$tabStrings=[0],i=1;i<t+1;i++)this.showInvisibles?((n=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",n.textContent=s.stringRepeat(this.TAB_CHAR,i),e.push(n)):e.push(this.dom.createTextNode(s.stringRepeat(" ",i),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n,r="ace_indent-guide",o="",a="";if(this.showInvisibles){r+=" ace_invisible",o=" ace_invisible_space",a=" ace_invisible_tab";var h=s.stringRepeat(this.SPACE_CHAR,this.tabSize),l=s.stringRepeat(this.TAB_CHAR,this.tabSize)}else l=h=s.stringRepeat(" ",this.tabSize);(n=this.dom.createElement("span")).className=r+o,n.textContent=h,this.$tabStrings[" "]=n,(n=this.dom.createElement("span")).className=r+a,n.textContent=l,this.$tabStrings["\t"]=n}},this.updateLines=function(t,e,i){if(this.config.lastRow!=t.lastRow||this.config.firstRow!=t.firstRow)return this.update(t);this.config=t;for(var n=Math.max(e,t.firstRow),r=Math.min(i,t.lastRow),s=this.element.childNodes,o=0,a=t.firstRow;a<n;a++){if(h=this.session.getFoldLine(a)){if(h.containsRow(n)){n=h.start.row;break}a=h.end.row}o++}for(var h,l=!1,u=(a=n,(h=this.session.getNextFoldLine(a))?h.start.row:1/0);a>u&&(a=h.end.row+1,u=(h=this.session.getNextFoldLine(a,h))?h.start.row:1/0),!(a>r);){var c=s[o++];if(c){this.dom.removeChildren(c),this.$renderLine(c,a,a==u&&h),l&&(c.style.top=this.$lines.computeLineTop(a,t,this.session)+"px");var d=t.lineHeight*this.session.getRowLength(a)+"px";c.style.height!=d&&(l=!0,c.style.height=d)}a++}if(l)for(;o<this.$lines.cells.length;){var p=this.$lines.cells[o++];p.element.style.top=this.$lines.computeLineTop(p.row,t,this.session)+"px"}},this.scrollLines=function(t){var e=this.config;if(this.config=t,this.$lines.pageChanged(e,t))return this.update(t);this.$lines.moveContainer(t);var i=t.lastRow,n=e?e.lastRow:-1;if(!e||n<t.firstRow)return this.update(t);if(i<e.firstRow)return this.update(t);if(!e||e.lastRow<t.firstRow)return this.update(t);if(t.lastRow<e.firstRow)return this.update(t);if(e.firstRow<t.firstRow)for(var r=this.session.getFoldedRowCount(e.firstRow,t.firstRow-1);r>0;r--)this.$lines.shift();if(e.lastRow>t.lastRow)for(r=this.session.getFoldedRowCount(t.lastRow+1,e.lastRow);r>0;r--)this.$lines.pop();t.firstRow<e.firstRow&&this.$lines.unshift(this.$renderLinesFragment(t,t.firstRow,e.firstRow-1)),t.lastRow>e.lastRow&&this.$lines.push(this.$renderLinesFragment(t,e.lastRow+1,t.lastRow))},this.$renderLinesFragment=function(t,e,i){for(var n=[],s=e,o=this.session.getNextFoldLine(s),a=o?o.start.row:1/0;s>a&&(s=o.end.row+1,a=(o=this.session.getNextFoldLine(s,o))?o.start.row:1/0),!(s>i);){var h=this.$lines.createCell(s,t,this.session),l=h.element;this.dom.removeChildren(l),r.setStyle(l.style,"height",this.$lines.computeLineHeight(s,t,this.session)+"px"),r.setStyle(l.style,"top",this.$lines.computeLineTop(s,t,this.session)+"px"),this.$renderLine(l,s,s==a&&o),this.$useLineGroups()?l.className="ace_line_group":l.className="ace_line",n.push(h),s++}return n},this.update=function(t){this.$lines.moveContainer(t),this.config=t;for(var e=t.firstRow,i=t.lastRow,n=this.$lines;n.getLength();)n.pop();n.push(this.$renderLinesFragment(t,e,i))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(t,e,i,n){for(var r,o=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,h=this.dom.createFragment(this.element),l=0;r=a.exec(n);){var u=r[1],c=r[2],d=r[3],p=r[4],f=r[5];if(o.showInvisibles||!c){var m=l!=r.index?n.slice(l,r.index):"";if(l=r.index+r[0].length,m&&h.appendChild(this.dom.createTextNode(m,this.element)),u){var g=o.session.getScreenTabSize(e+r.index);h.appendChild(o.$tabStrings[g].cloneNode(!0)),e+=g-1}else c?o.showInvisibles?((y=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",y.textContent=s.stringRepeat(o.SPACE_CHAR,c.length),h.appendChild(y)):h.appendChild(this.com.createTextNode(c,this.element)):d?((y=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",y.textContent=s.stringRepeat(o.SPACE_CHAR,d.length),h.appendChild(y)):p?(e+=1,(y=this.dom.createElement("span")).style.width=2*o.config.characterWidth+"px",y.className=o.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",y.textContent=o.showInvisibles?o.SPACE_CHAR:p,h.appendChild(y)):f&&(e+=1,(y=this.dom.createElement("span")).style.width=2*o.config.characterWidth+"px",y.className="ace_cjk",y.textContent=f,h.appendChild(y))}}if(h.appendChild(this.dom.createTextNode(l?n.slice(l):n,this.element)),this.$textToken[i.type])t.appendChild(h);else{var v="ace_"+i.type.replace(/\./g," ace_"),y=this.dom.createElement("span");"fold"==i.type&&(y.style.width=i.value.length*this.config.characterWidth+"px"),y.className=v,y.appendChild(h),t.appendChild(y)}return e+n.length},this.renderIndentGuide=function(t,e,i){var n=e.search(this.$indentGuideRe);if(n<=0||n>=i)return e;if(" "==e[0]){for(var r=(n-=n%this.tabSize)/this.tabSize,s=0;s<r;s++)t.appendChild(this.$tabStrings[" "].cloneNode(!0));return e.substr(n)}if("\t"==e[0]){for(s=0;s<n;s++)t.appendChild(this.$tabStrings["\t"].cloneNode(!0));return e.substr(n)}return e},this.$createLineElement=function(t){var e=this.dom.createElement("div");return e.className="ace_line",e.style.height=this.config.lineHeight+"px",e},this.$renderWrappedLine=function(t,e,i){var n=0,r=0,o=i[0],a=0,h=this.$createLineElement();t.appendChild(h);for(var l=0;l<e.length;l++){var u=e[l],c=u.value;if(0==l&&this.displayIndentGuides){if(n=c.length,!(c=this.renderIndentGuide(h,c,o)))continue;n-=c.length}if(n+c.length<o)a=this.$renderToken(h,a,u,c),n+=c.length;else{for(;n+c.length>=o;)a=this.$renderToken(h,a,u,c.substring(0,o-n)),c=c.substring(o-n),n=o,h=this.$createLineElement(),t.appendChild(h),h.appendChild(this.dom.createTextNode(s.stringRepeat(" ",i.indent),this.element)),a=0,o=i[++r]||Number.MAX_VALUE;0!=c.length&&(n+=c.length,a=this.$renderToken(h,a,u,c))}}i[i.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(h,a,null,"",!0)},this.$renderSimpleLine=function(t,e){var i=0,n=e[0],r=n.value;this.displayIndentGuides&&(r=this.renderIndentGuide(t,r)),r&&(i=this.$renderToken(t,i,n,r));for(var s=1;s<e.length;s++){if(i+(r=(n=e[s]).value).length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(t,i,n,r);i=this.$renderToken(t,i,n,r)}},this.$renderOverflowMessage=function(t,e,i,n,r){i&&this.$renderToken(t,e,i,n.slice(0,this.MAX_LINE_LENGTH-e));var s=this.dom.createElement("span");s.className="ace_inline_button ace_keyword ace_toggle_wrap",s.textContent=r?"<hide>":"<click to see more...>",t.appendChild(s)},this.$renderLine=function(t,e,i){if(i||0==i||(i=this.session.getFoldLine(e)),i)var n=this.$getFoldLineTokens(e,i);else n=this.session.getTokens(e);var r=t;if(n.length){var s=this.session.getRowSplitData(e);s&&s.length?(this.$renderWrappedLine(t,n,s),r=t.lastChild):(r=t,this.$useLineGroups()&&(r=this.$createLineElement(),t.appendChild(r)),this.$renderSimpleLine(r,n))}else this.$useLineGroups()&&(r=this.$createLineElement(),t.appendChild(r));if(this.showInvisibles&&r){i&&(e=i.end.row);var o=this.dom.createElement("span");o.className="ace_invisible ace_invisible_eol",o.textContent=e==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(o)}},this.$getFoldLineTokens=function(t,e){var i=this.session,n=[],r=i.getTokens(t);return e.walk((function(t,e,s,o,a){null!=t?n.push({type:"fold",value:t}):(a&&(r=i.getTokens(e)),r.length&&function(t,e,i){for(var r=0,s=0;s+t[r].value.length<e;)if(s+=t[r].value.length,++r==t.length)return;for(s!=e&&((o=t[r].value.substring(e-s)).length>i-e&&(o=o.substring(0,i-e)),n.push({type:t[r].type,value:o}),s=e+o.length,r+=1);s<i&&r<t.length;){var o;(o=t[r].value).length+s>i?n.push({type:t[r].type,value:o.substring(0,i-s)}):n.push(t[r]),s+=o.length,r+=1}}(r,o,s))}),e.end.row,this.session.getLine(e.end.row).length),n},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(h.prototype),e.Text=h})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(t,e,i){"use strict";var n=t("../lib/dom"),r=function(t){this.element=n.createElement("div"),this.element.className="ace_layer ace_cursor-layer",t.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),n.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(t){for(var e=this.cursors,i=e.length;i--;)n.setStyle(e[i].style,"opacity",t?"":"0")},this.$startCssAnimation=function(){for(var t=this.cursors,e=t.length;e--;)t[e].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){n.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){n.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(t){this.$padding=t},this.setSession=function(t){this.session=t},this.setBlinking=function(t){t!=this.isBlinking&&(this.isBlinking=t,this.restartTimer())},this.setBlinkInterval=function(t){t!=this.blinkInterval&&(this.blinkInterval=t,this.restartTimer())},this.setSmoothBlinking=function(t){t!=this.smoothBlinking&&(this.smoothBlinking=t,n.setCssClass(this.element,"ace_smooth-blinking",t),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var t=n.createElement("div");return t.className="ace_cursor",this.element.appendChild(t),this.cursors.push(t),t},this.removeCursor=function(){if(this.cursors.length>1){var t=this.cursors.pop();return t.parentNode.removeChild(t),t}},this.hideCursor=function(){this.isVisible=!1,n.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,n.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var t=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&n.removeCssClass(this.element,"ace_smooth-blinking"),t(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&setTimeout(function(){n.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),n.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var e=function(){this.timeoutId=setTimeout((function(){t(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){t(!0),e()}),this.blinkInterval),e()}else this.$stopCssAnimation()},this.getPixelPosition=function(t,e){if(!this.config||!this.session)return{left:0,top:0};t||(t=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(t);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,t.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),top:(i.row-(e?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(t,e){return t.top>=0&&t.top<e.maxHeight},this.update=function(t){this.config=t;var e=this.session.$selectionMarkers,i=0,r=0;void 0!==e&&0!==e.length||(e=[{cursor:null}]),i=0;for(var s=e.length;i<s;i++){var o=this.getPixelPosition(e[i].cursor,!0);if(!((o.top>t.height+t.offset||o.top<0)&&i>1)){var a=this.cursors[r++]||this.addCursor(),h=a.style;this.drawCursor?this.drawCursor(a,o,t,e[i],this.session):this.isCursorInView(o,t)?(n.setStyle(h,"display","block"),n.translate(a,o.left,o.top),n.setStyle(h,"width",Math.round(t.characterWidth)+"px"),n.setStyle(h,"height",t.lineHeight+"px")):n.setStyle(h,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(t){t!=this.overwrite&&(this.overwrite=t,t?n.addCssClass(this.element,"ace_overwrite-cursors"):n.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),e.Cursor=r})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(t,e,i){"use strict";var n=t("./lib/oop"),r=t("./lib/dom"),s=t("./lib/event"),o=t("./lib/event_emitter").EventEmitter,a=32768,h=function(t){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)};(function(){n.implement(this,o),this.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1}}).call(h.prototype);var l=function(t,e){h.call(this,t),this.scrollTop=0,this.scrollHeight=0,e.$scrollbarWidth=this.width=r.scrollbarWidth(t.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};n.inherits(l,h),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var t=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-t)/(this.coeff-t)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(t){this.element.style.height=t+"px"},this.setInnerHeight=this.setScrollHeight=function(t){this.scrollHeight=t,t>a?(this.coeff=a/t,t=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=t+"px"},this.setScrollTop=function(t){this.scrollTop!=t&&(this.skipEvent=!0,this.scrollTop=t,this.element.scrollTop=t*this.coeff)}}.call(l.prototype);var u=function(t,e){h.call(this,t),this.scrollLeft=0,this.height=e.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(u,h),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(t){this.element.style.width=t+"px"},this.setInnerWidth=function(t){this.inner.style.width=t+"px"},this.setScrollWidth=function(t){this.inner.style.width=t+"px"},this.setScrollLeft=function(t){this.scrollLeft!=t&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=t)}}.call(u.prototype),e.ScrollBar=l,e.ScrollBarV=l,e.ScrollBarH=u,e.VScrollBar=l,e.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(t,e,i){"use strict";var n=t("./lib/event"),r=function(t,e){this.onRender=t,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=e||window;var i=this;this._flush=function(t){i.pending=!1;var e=i.changes;if(e&&(n.blockIdle(100),i.changes=0,i.onRender(e)),i.changes){if(i.$recursionLimit--<0)return;i.schedule()}else i.$recursionLimit=2}};(function(){this.schedule=function(t){this.changes=this.changes|t,this.changes&&!this.pending&&(n.nextFrame(this._flush),this.pending=!0)},this.clear=function(t){var e=this.changes;return this.changes=0,e}}).call(r.prototype),e.RenderLoop=r})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(t,e,i){var n=t("../lib/oop"),r=t("../lib/dom"),s=t("../lib/lang"),o=t("../lib/event"),a=t("../lib/useragent"),h=t("../lib/event_emitter").EventEmitter,l=256,u="function"==typeof ResizeObserver,c=200,d=e.FontMetrics=function(t){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),t.appendChild(this.el),this.$measureNode.innerHTML=s.stringRepeat("X",l),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()};(function(){n.implement(this,h),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(t,e){t.width=t.height="auto",t.left=t.top="0px",t.visibility="hidden",t.position="absolute",t.whiteSpace="pre",a.isIE<8?t["font-family"]="inherit":t.font="inherit",t.overflow=e?"hidden":"visible"},this.checkForSizeChanges=function(t){if(void 0===t&&(t=this.$measureSizes()),t&&(this.$characterSize.width!==t.width||this.$characterSize.height!==t.height)){this.$measureNode.style.fontWeight="bold";var e=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=t,this.charSizes=Object.create(null),this.allowBoldFonts=e&&e.width===t.width&&e.height===t.height,this._emit("changeCharacterSize",{data:t})}},this.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver((function(e){var i=e[0].contentRect;t.checkForSizeChanges({height:i.height,width:i.width/l})})),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var t=this;return this.$pollSizeChangesTimer=o.onIdle((function e(){t.checkForSizeChanges(),o.onIdle(e,500)}),500)},this.setPolling=function(t){t?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(t){var e={height:(t||this.$measureNode).clientHeight,width:(t||this.$measureNode).clientWidth/l};return 0===e.width||0===e.height?null:e},this.$measureCharWidth=function(t){return this.$main.innerHTML=s.stringRepeat(t,l),this.$main.getBoundingClientRect().width/l},this.getCharacterWidth=function(t){var e=this.charSizes[t];return void 0===e&&(e=this.charSizes[t]=this.$measureCharWidth(t)/this.$characterSize.width),e},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function t(e){return e?(window.getComputedStyle(e).zoom||1)*t(e.parentElement):1},this.$initTransformMeasureNodes=function(){var t=function(t,e){return["div",{style:"position: absolute;top:"+t+"px;left:"+e+"px;"}]};this.els=r.buildDom([t(0,0),t(c,0),t(0,c),t(c,c)],this.el)},this.transformCoordinates=function(t,e){function i(t,e,i){var n=t[1]*e[0]-t[0]*e[1];return[(-e[1]*i[0]+e[0]*i[1])/n,(+t[1]*i[0]-t[0]*i[1])/n]}function n(t,e){return[t[0]-e[0],t[1]-e[1]]}function r(t,e){return[t[0]+e[0],t[1]+e[1]]}function s(t,e){return[t*e[0],t*e[1]]}function o(t){var e=t.getBoundingClientRect();return[e.left,e.top]}t&&(t=s(1/this.$getZoom(this.el),t)),this.els||this.$initTransformMeasureNodes();var a=o(this.els[0]),h=o(this.els[1]),l=o(this.els[2]),u=o(this.els[3]),d=i(n(u,h),n(u,l),n(r(h,l),r(u,a))),p=s(1+d[0],n(h,a)),f=s(1+d[1],n(l,a));if(e){var m=e,g=d[0]*m[0]/c+d[1]*m[1]/c+1,v=r(s(m[0],p),s(m[1],f));return r(s(1/g/c,v),a)}var y=n(t,a),x=i(n(p,s(d[0],y)),n(f,s(d[1],y)),y);return s(c,x)}}).call(d.prototype)})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],(function(t,e,i){"use strict";var n=t("./lib/oop"),r=t("./lib/dom"),s=t("./config"),o=t("./layer/gutter").Gutter,a=t("./layer/marker").Marker,h=t("./layer/text").Text,l=t("./layer/cursor").Cursor,u=t("./scrollbar").HScrollBar,c=t("./scrollbar").VScrollBar,d=t("./renderloop").RenderLoop,p=t("./layer/font_metrics").FontMetrics,f=t("./lib/event_emitter").EventEmitter,m='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;perspective: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);opacity: 0.7;transform-origin: left;text-indent: 10px;}',g=t("./lib/useragent"),v=g.isIE;r.importCssString(m,"ace_editor.css");var y=function(t,e){var i=this;this.container=t||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(e),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var n=this.$textLayer=new h(this.content);this.canvas=n.element,this.$markerFront=new a(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new c(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",(function(t){i.$scrollAnimation||i.session.setScrollTop(t.data-i.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(t){i.$scrollAnimation||i.session.setScrollLeft(t.data-i.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",(function(t){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._signal("changeCharacterSize",t)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!g.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,f),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(t){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=t,t&&this.scrollMargin.top&&t.getScrollTop()<=0&&t.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(t),this.$markerBack.setSession(t),this.$markerFront.setSession(t),this.$gutterLayer.setSession(t),this.$textLayer.setSession(t),t&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(t,e,i){if(void 0===e&&(e=1/0),this.$changedLines?(this.$changedLines.firstRow>t&&(this.$changedLines.firstRow=t),this.$changedLines.lastRow<e&&(this.$changedLines.lastRow=e)):this.$changedLines={firstRow:t,lastRow:e},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!i)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(t){t?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(t,e,i,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=t?1:0;var r=this.container;n||(n=r.clientHeight||r.scrollHeight),i||(i=r.clientWidth||r.scrollWidth);var s=this.$updateCachedSize(t,e,i,n);if(!this.$size.scrollerHeight||!i&&!n)return this.resizing=0;t&&(this.$gutterLayer.$padding=null),t?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(t,e,i,n){n-=this.$extraHeight||0;var s=0,o=this.$size,a={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};if(n&&(t||o.height!=n)&&(o.height=n,s|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL),i&&(t||o.width!=i)){s|=this.CHANGE_SIZE,o.width=i,null==e&&(e=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=e,r.setStyle(this.scrollBarH.element.style,"left",e+"px"),r.setStyle(this.scroller.style,"left",e+this.margin.left+"px"),o.scrollerWidth=Math.max(0,i-e-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var h=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",h),r.setStyle(this.scroller.style,"right",h),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||t)&&(s|=this.CHANGE_FULL)}return o.$dirty=!i||!n,s&&this._signal("resize",a),s},this.onGutterResize=function(t){var e=this.$showGutter?t:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var t=this.$size.scrollerWidth-2*this.$padding,e=Math.floor(t/this.characterWidth);return this.session.adjustWrapLimit(e,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(t){this.setOption("animatedScroll",t)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(t){this.setOption("showInvisibles",t),this.session.$bidiHandler.setShowInvisibles(t)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(t){this.setOption("displayIndentGuides",t)},this.setShowPrintMargin=function(t){this.setOption("showPrintMargin",t)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(t){this.setOption("printMarginColumn",t)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(t){return this.setOption("showGutter",t)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},this.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var t=r.createElement("div");t.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",t.appendChild(this.$printMarginEl),this.content.insertBefore(t,this.content.firstChild)}var e=this.$printMarginEl.style;e.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",e.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var t=this.textarea.style,e=this.$composition;if(this.$keepTextAreaAtCursor||e){var i=this.$cursorLayer.$pixelPos;if(i){e&&e.markerRange&&(i=this.$cursorLayer.getPixelPosition(e.markerRange.start,!0));var n=this.layerConfig,s=i.top,o=i.left;s-=n.offset;var a=e&&e.useTextareaForIME?this.lineHeight:v?0:1;if(s<0||s>n.height-a)r.translate(this.textarea,0,0);else{var h=1,l=this.$size.height-a;if(e)if(e.useTextareaForIME){var u=this.textarea.value;h=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else s+=this.lineHeight+2;else s+=this.lineHeight;(o-=this.scrollLeft)>this.$size.scrollerWidth-h&&(o=this.$size.scrollerWidth-h),o+=this.gutterWidth+this.margin.left,r.setStyle(t,"height",a+"px"),r.setStyle(t,"width",h+"px"),r.translate(this.textarea,Math.min(o,this.$size.scrollerWidth-h),Math.min(s,l))}}}else r.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var t=this.layerConfig,e=t.lastRow;return this.session.documentToScreenRow(e,0)*t.lineHeight-this.session.getScrollTop()>t.height-t.lineHeight?e-1:e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(t){this.$padding=t,this.$textLayer.setPadding(t),this.$cursorLayer.setPadding(t),this.$markerFront.setPadding(t),this.$markerBack.setPadding(t),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(t,e,i,n){var r=this.scrollMargin;r.top=0|t,r.bottom=0|e,r.right=0|n,r.left=0|i,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.setMargin=function(t,e,i,n){var r=this.margin;r.top=0|t,r.bottom=0|e,r.right=0|n,r.left=0|i,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(t){this.setOption("hScrollBarAlwaysVisible",t)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(t){this.setOption("vScrollBarAlwaysVisible",t)},this.$updateScrollBarV=function(){var t=this.layerConfig.maxHeight,e=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(t-=(e-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>t-e&&(t=this.scrollTop+e,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(t+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(t,e){if(this.$changes&&(t|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(t||e)){if(this.$size.$dirty)return this.$changes|=t,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var i=this.layerConfig;if(t&this.CHANGE_FULL||t&this.CHANGE_SIZE||t&this.CHANGE_TEXT||t&this.CHANGE_LINES||t&this.CHANGE_SCROLL||t&this.CHANGE_H_SCROLL){if(t|=this.$computeLayerConfig()|this.$loop.clear(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight;n>0&&(this.scrollTop=n,t|=this.CHANGE_SCROLL,t|=this.$computeLayerConfig()|this.$loop.clear())}i=this.layerConfig,this.$updateScrollBarV(),t&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-i.offset);var s=i.width+2*this.$padding+"px",o=i.minHeight+"px";r.setStyle(this.content.style,"width",s),r.setStyle(this.content.style,"height",o)}if(t&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-i.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),t&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),void this._signal("afterRender");if(t&this.CHANGE_SCROLL)return this.$changedLines=null,t&this.CHANGE_TEXT||t&this.CHANGE_LINES?this.$textLayer.update(i):this.$textLayer.scrollLines(i),this.$showGutter&&(t&this.CHANGE_GUTTER||t&this.CHANGE_LINES?this.$gutterLayer.update(i):this.$gutterLayer.scrollLines(i)),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),void this._signal("afterRender");t&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i)):t&this.CHANGE_LINES?(this.$updateLines()||t&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(i):t&this.CHANGE_TEXT||t&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(i):t&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(i),t&this.CHANGE_CURSOR&&(this.$cursorLayer.update(i),this.$moveTextAreaToCursor()),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(i),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(i),this._signal("afterRender")}else this.$changes|=t},this.$autosize=function(){var t=this.session.getScreenLength()*this.lineHeight,e=this.$maxLines*this.lineHeight,i=Math.min(e,Math.max((this.$minLines||1)*this.lineHeight,t))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(i+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&i>this.$maxPixelHeight&&(i=this.$maxPixelHeight);var n=!(i<=2*this.lineHeight)&&t>e;if(i!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var r=this.container.clientWidth;this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,i),this.desiredHeight=i,this._signal("autosize")}},this.$computeLayerConfig=function(){var t=this.session,e=this.$size,i=e.height<=2*this.lineHeight,n=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),s=!i&&(this.$hScrollBarAlwaysVisible||e.scrollerWidth-r-2*this.$padding<0),o=this.$horizScroll!==s;o&&(this.$horizScroll=s,this.scrollBarH.setVisible(s));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var h=e.scrollerHeight+this.lineHeight,l=!this.$maxLines&&this.$scrollPastEnd?(e.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;n+=l;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,n-e.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,r+2*this.$padding-e.scrollerWidth+u.right)));var c=!i&&(this.$vScrollBarAlwaysVisible||e.scrollerHeight-n+l<0||this.scrollTop>u.top),d=a!==c;d&&(this.$vScroll=c,this.scrollBarV.setVisible(c));var p,f,m=this.scrollTop%this.lineHeight,g=Math.ceil(h/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),y=v+g,x=this.lineHeight;v=t.screenToDocumentRow(v,0);var E=t.getFoldLine(v);E&&(v=E.start.row),p=t.documentToScreenRow(v,0),f=t.getRowLength(v)*x,y=Math.min(t.screenToDocumentRow(y,0),t.getLength()-1),h=e.scrollerHeight+t.getRowLength(y)*x+f,m=this.scrollTop-p*x;var T=0;return(this.layerConfig.width!=r||o)&&(T=this.CHANGE_H_SCROLL),(o||d)&&(T|=this.$updateCachedSize(!0,this.gutterWidth,e.width,e.height),this._signal("scrollbarVisibilityChanged"),d&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:p,lastRow:y,lineHeight:x,characterWidth:this.characterWidth,minHeight:h,maxHeight:n,offset:m,gutterOffset:x?Math.max(0,Math.ceil((m+e.height-e.scrollerHeight)/x)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),T},this.$updateLines=function(){if(this.$changedLines){var t=this.$changedLines.firstRow,e=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(t>i.lastRow+1||e<i.firstRow))return e===1/0?(this.$showGutter&&this.$gutterLayer.update(i),void this.$textLayer.update(i)):(this.$textLayer.updateLines(i,t,e),!0)}},this.$getLongestLine=function(){var t=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(t+=1),this.$textLayer&&t>this.$textLayer.MAX_LINE_LENGTH&&(t=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(t*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(t,e){this.$gutterLayer.addGutterDecoration(t,e)},this.removeGutterDecoration=function(t,e){this.$gutterLayer.removeGutterDecoration(t,e)},this.updateBreakpoints=function(t){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(t){this.$gutterLayer.setAnnotations(t),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(t,e,i){this.scrollCursorIntoView(t,i),this.scrollCursorIntoView(e,i)},this.scrollCursorIntoView=function(t,e,i){if(0!==this.$size.scrollerHeight){var n=this.$cursorLayer.getPixelPosition(t),r=n.left,s=n.top,o=i&&i.top||0,a=i&&i.bottom||0,h=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;h+o>s?(e&&h+o>s+this.lineHeight&&(s-=e*this.$size.scrollerHeight),0===s&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):h+this.$size.scrollerHeight-a<s+this.lineHeight&&(e&&h+this.$size.scrollerHeight-a<s-this.lineHeight&&(s+=e*this.$size.scrollerHeight),this.session.setScrollTop(s+this.lineHeight+a-this.$size.scrollerHeight));var l=this.scrollLeft;l>r?(r<this.$padding+2*this.layerConfig.characterWidth&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):l+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):l<=this.$padding&&r-l<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(t){this.session.setScrollTop(t*this.lineHeight)},this.alignCursor=function(t,e){"number"==typeof t&&(t={row:t,column:0});var i=this.$cursorLayer.getPixelPosition(t),n=this.$size.scrollerHeight-this.lineHeight,r=i.top-n*(e||0);return this.session.setScrollTop(r),r},this.STEPS=8,this.$calcSteps=function(t,e){var i,n,r=0,s=this.STEPS,o=[];for(r=0;r<s;++r)o.push((i=r/this.STEPS,n=t,(e-t)*(Math.pow(i-1,3)+1)+n));return o},this.scrollToLine=function(t,e,i,n){var r=this.$cursorLayer.getPixelPosition({row:t,column:0}).top;e&&(r-=this.$size.scrollerHeight/2);var s=this.scrollTop;this.session.setScrollTop(r),!1!==i&&this.animateScrolling(s,n)},this.animateScrolling=function(t,e){var i=this.scrollTop;if(this.$animatedScroll){var n=this;if(t!=i){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(t=r[0])==i)return}var s=n.$calcSteps(t,i);this.$scrollAnimation={from:t,to:i,steps:s},clearInterval(this.$timer),n.session.setScrollTop(s.shift()),n.session.$scrollTop=i,this.$timer=setInterval((function(){s.length?(n.session.setScrollTop(s.shift()),n.session.$scrollTop=i):null!=i?(n.session.$scrollTop=-1,n.session.setScrollTop(i),i=null):(n.$timer=clearInterval(n.$timer),n.$scrollAnimation=null,e&&e())}),10)}}},this.scrollToY=function(t){this.scrollTop!==t&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=t)},this.scrollToX=function(t){this.scrollLeft!==t&&(this.scrollLeft=t),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(t,e){this.session.setScrollTop(e),this.session.setScrollLeft(e)},this.scrollBy=function(t,e){e&&this.session.setScrollTop(this.session.getScrollTop()+e),t&&this.session.setScrollLeft(this.session.getScrollLeft()+t)},this.isScrollableBy=function(t,e){return e<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||e>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||t<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||t>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},this.pixelToScreenCoordinates=function(t,e){var i;if(this.$hasCssTransforms){i={top:0,left:0};var n=this.$fontMetrics.transformCoordinates([t,e]);t=n[1]-this.gutterWidth-this.margin.left,e=n[0]}else i=this.scroller.getBoundingClientRect();var r=t+this.scrollLeft-i.left-this.$padding,s=r/this.characterWidth,o=Math.floor((e+this.scrollTop-i.top)/this.lineHeight),a=this.$blockCursor?Math.floor(s):Math.round(s);return{row:o,column:a,side:s-a>0?1:-1,offsetX:r}},this.screenToTextCoordinates=function(t,e){var i;if(this.$hasCssTransforms){i={top:0,left:0};var n=this.$fontMetrics.transformCoordinates([t,e]);t=n[1]-this.gutterWidth-this.margin.left,e=n[0]}else i=this.scroller.getBoundingClientRect();var r=t+this.scrollLeft-i.left-this.$padding,s=r/this.characterWidth,o=this.$blockCursor?Math.floor(s):Math.round(s),a=Math.floor((e+this.scrollTop-i.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(o,0),r)},this.textToScreenCoordinates=function(t,e){var i=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(t,e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,t)?this.session.$bidiHandler.getPosLeft(n.column):Math.round(n.column*this.characterWidth)),s=n.row*this.lineHeight;return{pageX:i.left+r-this.scrollLeft,pageY:i.top+s-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(t){this.$composition=t,t.cssText||(t.cssText=this.textarea.style.cssText),t.useTextareaForIME=this.$useTextareaForIME,this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):t.markerId=this.session.addMarker(t.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(t){var e=this.session.selection.cursor;this.addToken(t,"composition_placeholder",e.row,e.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,this.$composition=null,this.$cursorLayer.element.style.display="")},this.addToken=function(t,e,i,n){var r=this.session;r.bgTokenizer.lines[i]=null;var s={type:e,value:t},o=r.getTokens(i);if(null==n)o.push(s);else for(var a=0,h=0;h<o.length;h++){var l=o[h];if(n<=(a+=l.value.length)){var u=l.value.length-(a-n),c=l.value.slice(0,u),d=l.value.slice(u);o.splice(h,1,{type:l.type,value:c},s,{type:l.type,value:d});break}}this.updateLines(i,i)},this.setTheme=function(t,e){var i=this;if(this.$themeId=t,i._dispatchEvent("themeChange",{theme:t}),t&&"string"!=typeof t)o(t);else{var n=t||this.$options.theme.initialValue;s.loadModule(["theme",n],o)}function o(n){if(i.$themeId!=t)return e&&e();if(!n||!n.cssClass)throw new Error("couldn't load module "+t+" or it didn't call define");n.$id&&(i.$themeId=n.$id),r.importCssString(n.cssText,n.cssClass,i.container),i.theme&&r.removeCssClass(i.container,i.theme.cssClass);var s="padding"in n?n.padding:"padding"in(i.theme||{})?4:i.$padding;i.$padding&&s!=i.$padding&&i.setPadding(s),i.$theme=n.cssClass,i.theme=n,r.addCssClass(i.container,n.cssClass),r.setCssClass(i.container,"ace_dark",n.isDark),i.$size&&(i.$size.width=0,i.$updateSizeAsync()),i._dispatchEvent("themeLoaded",{theme:n}),e&&e()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(t,e){r.setCssClass(this.container,t,!1!==e)},this.unsetStyle=function(t){r.removeCssClass(this.container,t)},this.setCursorStyle=function(t){r.setStyle(this.scroller.style,"cursor",t)},this.setMouseCursor=function(t){r.setStyle(this.scroller.style,"cursor",t)},this.attachToShadowRoot=function(){r.importCssString(m,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy()}}).call(y.prototype),s.defineOptions(y.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(t){this.$textLayer.setShowInvisibles(t)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(t){"number"==typeof t&&(this.$printMarginColumn=t),this.$showPrintMargin=!!t,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(t){this.$gutter.style.display=t?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(t){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",t)},initialValue:!1},showFoldWidgets:{set:function(t){this.$gutterLayer.setShowFoldWidgets(t),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(t){this.$textLayer.setDisplayIndentGuides(t)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(t){this.$gutterLayer.setHighlightGutterLine(t),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(t){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(t){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(t){"number"==typeof t&&(t+="px"),this.container.style.fontSize=t,this.updateFontSize()},initialValue:12},fontFamily:{set:function(t){this.container.style.fontFamily=t,this.updateFontSize()}},maxLines:{set:function(t){this.updateFull()}},minLines:{set:function(t){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(t){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(t){t=+t||0,this.$scrollPastEnd!=t&&(this.$scrollPastEnd=t,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(t){this.$gutterLayer.$fixedWidth=!!t,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(t){this.setTheme(t)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!g.isMobile&&!g.isIE}}),e.VirtualRenderer=y})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(t,e,i){"use strict";var n=t("../lib/oop"),r=t("../lib/net"),s=t("../lib/event_emitter").EventEmitter,o=t("../config");function a(t){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(o.get("loadWorkerFromBlob")){var e=function(t){var e="importScripts('"+r.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch(t){var i=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return i.append(e),i.getBlob("application/javascript")}}(t),i=(window.URL||window.webkitURL).createObjectURL(e);return new Worker(i)}return new Worker(t)}var h=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){n.implement(this,s),this.$createWorkerFromOldConfig=function(e,i,n,r,s){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),o.get("packaged")||!t.toUrl)r=r||o.moduleUrl(i,"worker");else{var h=this.$normalizePath;r=r||h(t.toUrl("ace/worker/worker.js",null,"_"));var l={};e.forEach((function(e){l[e]=h(t.toUrl(e,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=a(r),s&&this.send("importScripts",s),this.$worker.postMessage({init:!0,tlns:l,module:i,classname:n}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var i=this.callbacks[e.id];i&&(i(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data)}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return r.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,i){if(i){var n=this.callbackId++;this.callbacks[n]=i,e.push(n)}this.send(t,e)},this.emit=function(t,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker.postMessage({event:t,data:{data:e.data}})}catch(t){console.error(t.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==t.action?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(h.prototype),e.UIWorkerClient=function(t,e,i){var n=null,r=!1,a=Object.create(s),l=[],u=new h({messageBuffer:l,terminate:function(){},postMessage:function(t){l.push(t),n&&(r?setTimeout(c):c())}});u.setEmitSync=function(t){r=t};var c=function(){var t=l.shift();t.command?n[t.command].apply(n,t.args):t.event&&a._signal(t.event,t.data)};return a.postMessage=function(t){u.onMessage({data:t})},a.callback=function(t,e){this.postMessage({type:"call",id:e,data:t})},a.emit=function(t,e){this.postMessage({type:"event",name:t,data:e})},o.loadModule(["worker",e],(function(t){for(n=new t[i](a);l.length;)c()})),u},e.WorkerClient=h,e.createWorker=a})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(t,e,i){"use strict";var n=t("./range").Range,r=t("./lib/event_emitter").EventEmitter,s=t("./lib/oop"),o=function(t,e,i,n,r,s){var o=this;this.length=e,this.session=t,this.doc=t.getDocument(),this.mainClass=r,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout((function(){o.onCursorChange()}))},this.$pos=i;var a=t.getUndoManager().$undoStack||t.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)};(function(){s.implement(this,r),this.setup=function(){var t=this,e=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=e.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=i.addMarker(new n(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(i){var n=e.createAnchor(i.row,i.column);n.$insertRight=!0,n.detach(),t.others.push(n)})),i.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,e=this;this.othersActive=!0,this.others.forEach((function(i){i.markerId=t.addMarker(new n(i.row,i.column,i.row,i.column+e.length),e.othersClass,null,!1)}))}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t<this.others.length;t++)this.session.removeMarker(this.others[t].markerId)}},this.onUpdate=function(t){if(this.$updating)return this.updateAnchors(t);var e=t;if(e.start.row===e.end.row&&e.start.row===this.pos.row){this.$updating=!0;var i="insert"===t.action?e.end.column-e.start.column:e.start.column-e.end.column,r=e.start.column>=this.pos.column&&e.start.column<=this.pos.column+this.length+1,s=e.start.column-this.pos.column;if(this.updateAnchors(t),r&&(this.length+=i),r&&!this.session.$fromUndo)if("insert"===t.action)for(var o=this.others.length-1;o>=0;o--){var a={row:(h=this.others[o]).row,column:h.column+s};this.doc.insertMergedLines(a,t.lines)}else if("remove"===t.action)for(o=this.others.length-1;o>=0;o--){var h;a={row:(h=this.others[o]).row,column:h.column+s},this.doc.remove(new n(a.row,a.column,a.row,a.column-i))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(t){this.pos.onChange(t);for(var e=this.others.length;e--;)this.others[e].onChange(t);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var t=this,e=this.session,i=function(i,r){e.removeMarker(i.markerId),i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),r,null,!1)};i(this.pos,this.mainClass);for(var r=this.others.length;r--;)i(this.others[r],this.othersClass)}},this.onCursorChange=function(t){if(!this.$updating&&this.session){var e=this.session.selection.getCursor();e.row===this.pos.row&&e.column>=this.pos.column&&e.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var t=this.session.getUndoManager(),e=(t.$undoStack||t.$undostack).length-this.$undoStackDepth,i=0;i<e;i++)t.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(o.prototype),e.PlaceHolder=o})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(t,e,i){var n=t("../lib/event"),r=t("../lib/useragent");function s(t,e){return t.row==e.row&&t.column==e.column}e.onMouseDown=function(t){var e=t.domEvent,i=e.altKey,o=e.shiftKey,a=e.ctrlKey,h=t.getAccelKey(),l=t.getButton();if(a&&r.isMac&&(l=e.button),t.editor.inMultiSelectMode&&2==l)t.editor.textInput.onContextMenu(t.domEvent);else if(a||i||h){if(0===l){var u,c=t.editor,d=c.selection,p=c.inMultiSelectMode,f=t.getDocumentPosition(),m=d.getCursor(),g=t.inSelection()||d.isEmpty()&&s(f,m),v=t.x,y=t.y,x=c.session,E=c.renderer.pixelToScreenCoordinates(v,y),T=E;if(c.$mouseHandler.$enableJumpToDef)a&&i||h&&i?u=o?"block":"add":i&&c.$blockSelectEnabled&&(u="block");else if(h&&!i){if(u="add",!p&&o)return}else i&&c.$blockSelectEnabled&&(u="block");if(u&&r.isMac&&e.ctrlKey&&c.$mouseHandler.cancelContextMenu(),"add"==u){if(!p&&g)return;if(!p){var _=d.toOrientedRange();c.addSelectionMarker(_)}var w=d.rangeList.rangeAtPoint(f);c.inVirtualSelectionMode=!0,o&&(w=null,_=d.ranges[0]||_,c.removeSelectionMarker(_)),c.once("mouseup",(function(){var t=d.toOrientedRange();w&&t.isEmpty()&&s(w.cursor,t.cursor)?d.substractPoint(t.cursor):(o?d.substractPoint(_.cursor):_&&(c.removeSelectionMarker(_),d.addRange(_)),d.addRange(t)),c.inVirtualSelectionMode=!1}))}else if("block"==u){var S;t.stop(),c.inVirtualSelectionMode=!0;var b=[],C=function(){var t=c.renderer.pixelToScreenCoordinates(v,y),e=x.screenToDocumentPosition(t.row,t.column,t.offsetX);s(T,t)&&s(e,d.lead)||(T=t,c.selection.moveToPosition(e),c.renderer.scrollCursorIntoView(),c.removeSelectionMarkers(b),b=d.rectangularRangeBlock(T,E),c.$mouseHandler.$clickSelection&&1==b.length&&b[0].isEmpty()&&(b[0]=c.$mouseHandler.$clickSelection.clone()),b.forEach(c.addSelectionMarker,c),c.updateSelectionMarkers())};p&&!h?d.toSingleRange():!p&&h&&(S=d.toOrientedRange(),c.addSelectionMarker(S)),o?E=x.documentToScreenPosition(d.lead):d.moveToPosition(f),T={row:-1,column:-1};var A=C;n.capture(c.container,(function(t){v=t.clientX,y=t.clientY}),(function(t){C(),clearInterval(R),c.removeSelectionMarkers(b),b.length||(b=[d.toOrientedRange()]),S&&(c.removeSelectionMarker(S),d.toSingleRange(S));for(var e=0;e<b.length;e++)d.addRange(b[e]);c.inVirtualSelectionMode=!1,c.$mouseHandler.$clickSelection=null}));var R=setInterval((function(){A()}),20);return t.preventDefault()}}}else 0===l&&t.editor.inMultiSelectMode&&t.editor.exitMultiSelectMode()}})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(t,e,i){e.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(t){t.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(t){t.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(t){t.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(t){t.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(t){t.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(t){t.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(t){t.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(t){t.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",description:"Split into lines",exec:function(t){t.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(t){t.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(t){t.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],e.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(t){t.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(t){return t&&t.inMultiSelectMode}}];var n=t("../keyboard/hash_handler").HashHandler;e.keyboardHandler=new n(e.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(t,e,i){var n=t("./range_list").RangeList,r=t("./range").Range,s=t("./selection").Selection,o=t("./mouse/multi_select_handler").onMouseDown,a=t("./lib/event"),h=t("./lib/lang"),l=t("./commands/multi_select_commands");e.commands=l.defaultCommands.concat(l.multiSelectCommands);var u=new(0,t("./search").Search),c=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(c.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(t,e){if(t){if(!this.inMultiSelectMode&&0===this.rangeCount){var i=this.toOrientedRange();if(this.rangeList.add(i),this.rangeList.add(t),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),e||this.fromOrientedRange(t);this.rangeList.removeAll(),this.rangeList.add(i),this.$onAddRange(i)}t.cursor||(t.cursor=t.end);var n=this.rangeList.add(t);return this.$onAddRange(t),n.length&&this.$onRemoveRange(n),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),e||this.fromOrientedRange(t)}},this.toSingleRange=function(t){t=t||this.ranges[0];var e=this.rangeList.removeAll();e.length&&this.$onRemoveRange(e),t&&this.fromOrientedRange(t)},this.substractPoint=function(t){var e=this.rangeList.substractPoint(t);if(e)return this.$onRemoveRange(e),e[0]},this.mergeOverlappingRanges=function(){var t=this.rangeList.merge();t.length&&this.$onRemoveRange(t)},this.$onAddRange=function(t){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(t),this._signal("addRange",{range:t})},this.$onRemoveRange=function(t){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var e=this.rangeList.ranges.pop();t.push(e),this.rangeCount=0}for(var i=t.length;i--;){var n=this.ranges.indexOf(t[i]);this.ranges.splice(n,1)}this._signal("removeRange",{ranges:t}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(e=e||this.ranges[0])&&!e.isEqual(this.getRange())&&this.fromOrientedRange(e)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new n,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var t=this.rangeList.ranges,e=t[t.length-1],i=r.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(i,e.cursor==e.start)}else{i=this.getRange();var n=this.isBackwards(),s=i.start.row,o=i.end.row;if(s==o){if(n)var a=i.end,h=i.start;else a=i.start,h=i.end;return this.addRange(r.fromPoints(h,h)),void this.addRange(r.fromPoints(a,a))}var l=[],u=this.getLineRange(s,!0);u.start.column=i.start.column,l.push(u);for(var c=s+1;c<o;c++)l.push(this.getLineRange(c,!0));(u=this.getLineRange(o,!0)).end.column=i.end.column,l.push(u),l.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var t=this.rangeList.ranges,e=t[t.length-1],i=r.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(i,e.cursor==e.start)}else{var n=this.session.documentToScreenPosition(this.cursor),s=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(n,s).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(t,e,i){var n=[],s=t.column<e.column;if(s)var o=t.column,a=e.column,h=t.offsetX,l=e.offsetX;else o=e.column,a=t.column,h=e.offsetX,l=t.offsetX;var u,c,d,p=t.row<e.row;if(p)var f=t.row,m=e.row;else f=e.row,m=t.row;o<0&&(o=0),f<0&&(f=0),f==m&&(i=!0);for(var g=f;g<=m;g++){var v=r.fromPoints(this.session.screenToDocumentPosition(g,o,h),this.session.screenToDocumentPosition(g,a,l));if(v.isEmpty()){if(u&&(d=u,(c=v.end).row==d.row&&c.column==d.column))break;u=v.end}v.cursor=s?v.start:v.end,n.push(v)}if(p&&n.reverse(),!i){for(var y=n.length-1;n[y].isEmpty()&&y>0;)y--;if(y>0)for(var x=0;n[x].isEmpty();)x++;for(var E=y;E>=x;E--)n[E].isEmpty()&&n.splice(E,1)}return n}}.call(s.prototype);var d=t("./editor").Editor;function p(t){t.$multiselectOnSessionChange||(t.$onAddRange=t.$onAddRange.bind(t),t.$onRemoveRange=t.$onRemoveRange.bind(t),t.$onMultiSelect=t.$onMultiSelect.bind(t),t.$onSingleSelect=t.$onSingleSelect.bind(t),t.$multiselectOnSessionChange=e.onSessionChange.bind(t),t.$checkMultiselectChange=t.$checkMultiselectChange.bind(t),t.$multiselectOnSessionChange(t),t.on("changeSession",t.$multiselectOnSessionChange),t.on("mousedown",o),t.commands.addCommands(l.defaultCommands),function(t){if(t.textInput){var e=t.textInput.getElement(),i=!1;a.addListener(e,"keydown",(function(e){var r=18==e.keyCode&&!(e.ctrlKey||e.shiftKey||e.metaKey);t.$blockSelectEnabled&&r?i||(t.renderer.setMouseCursor("crosshair"),i=!0):i&&n()})),a.addListener(e,"keyup",n),a.addListener(e,"blur",n)}function n(e){i&&(t.renderer.setMouseCursor(""),i=!1)}}(t))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(t){t.cursor||(t.cursor=t.end);var e=this.getSelectionStyle();return t.marker=this.session.addMarker(t,"ace_selection",e),this.session.$selectionMarkers.push(t),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,t},this.removeSelectionMarker=function(t){if(t.marker){this.session.removeMarker(t.marker);var e=this.session.$selectionMarkers.indexOf(t);-1!=e&&this.session.$selectionMarkers.splice(e,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(t){for(var e=this.session.$selectionMarkers,i=t.length;i--;){var n=t[i];if(n.marker){this.session.removeMarker(n.marker);var r=e.indexOf(n);-1!=r&&e.splice(r,1)}}this.session.selectionMarkerCount=e.length},this.$onAddRange=function(t){this.addSelectionMarker(t.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(t){this.removeSelectionMarkers(t.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(t){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(t){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(t){var e=t.command,i=t.editor;if(i.multiSelect){if(e.multiSelectAction)"forEach"==e.multiSelectAction?n=i.forEachSelection(e,t.args):"forEachLine"==e.multiSelectAction?n=i.forEachSelection(e,t.args,!0):"single"==e.multiSelectAction?(i.exitMultiSelectMode(),n=e.exec(i,t.args||{})):n=e.multiSelectAction(i,t.args||{});else{var n=e.exec(i,t.args||{});i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(t,e,i){if(!this.inVirtualSelectionMode){var n,r=i&&i.keepOrder,o=1==i||i&&i.$byLines,a=this.session,h=this.selection,l=h.rangeList,u=(r?h:l).ranges;if(!u.length)return t.exec?t.exec(this,e||{}):t(this,e||{});var c=h._eventRegistry;h._eventRegistry={};var d=new s(a);this.inVirtualSelectionMode=!0;for(var p=u.length;p--;){if(o)for(;p>0&&u[p].start.row==u[p-1].end.row;)p--;d.fromOrientedRange(u[p]),d.index=p,this.selection=a.selection=d;var f=t.exec?t.exec(this,e||{}):t(this,e||{});n||void 0===f||(n=f),d.toOrientedRange(u[p])}d.detach(),this.selection=a.selection=h,this.inVirtualSelectionMode=!1,h._eventRegistry=c,h.mergeOverlappingRanges(),h.ranges[0]&&h.fromOrientedRange(h.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),n}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var t="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var e=this.multiSelect.rangeList.ranges,i=[],n=0;n<e.length;n++)i.push(this.session.getTextRange(e[n]));var r=this.session.getDocument().getNewLineCharacter();(t=i.join(r)).length==(i.length-1)*r.length&&(t="")}else this.selection.isEmpty()||(t=this.session.getTextRange(this.getSelectionRange()));return t},this.$checkMultiselectChange=function(t,e){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var i=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&e==this.multiSelect.anchor)return;var n=e==this.multiSelect.anchor?i.cursor==i.start?i.end:i.start:i.cursor;n.row!=e.row||this.session.$clipPositionToDocument(n.row,n.column).column!=e.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(t,e,i){if((e=e||{}).needle=t||e.needle,null==e.needle){var n=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();e.needle=this.session.getTextRange(n)}this.$search.set(e);var r=this.$search.findAll(this.session);if(!r.length)return 0;var s=this.multiSelect;i||s.toSingleRange(r[0]);for(var o=r.length;o--;)s.addRange(r[o],!0);return n&&s.rangeList.rangeAtPoint(n.start)&&s.addRange(n,!0),r.length},this.selectMoreLines=function(t,e){var i=this.selection.toOrientedRange(),n=i.cursor==i.end,s=this.session.documentToScreenPosition(i.cursor);this.selection.$desiredColumn&&(s.column=this.selection.$desiredColumn);var o,a=this.session.screenToDocumentPosition(s.row+t,s.column);if(i.isEmpty())l=a;else var h=this.session.documentToScreenPosition(n?i.end:i.start),l=this.session.screenToDocumentPosition(h.row+t,h.column);if(n?(o=r.fromPoints(a,l)).cursor=o.start:(o=r.fromPoints(l,a)).cursor=o.end,o.desiredColumn=s.column,this.selection.inMultiSelectMode){if(e)var u=i.cursor}else this.selection.addRange(i);this.selection.addRange(o),u&&this.selection.substractPoint(u)},this.transposeSelections=function(t){for(var e=this.session,i=e.multiSelect,n=i.ranges,r=n.length;r--;)if((a=n[r]).isEmpty()){var s=e.getWordRange(a.start.row,a.start.column);a.start.row=s.start.row,a.start.column=s.start.column,a.end.row=s.end.row,a.end.column=s.end.column}i.mergeOverlappingRanges();var o=[];for(r=n.length;r--;){var a=n[r];o.unshift(e.getTextRange(a))}for(t<0?o.unshift(o.pop()):o.push(o.shift()),r=n.length;r--;)s=(a=n[r]).clone(),e.replace(a,o[r]),a.start.row=s.start.row,a.start.column=s.start.column;i.fromOrientedRange(i.ranges[0])},this.selectMore=function(t,e,i){var n=this.session,r=n.multiSelect.toOrientedRange();if(!r.isEmpty()||((r=n.getWordRange(r.start.row,r.start.column)).cursor=-1==t?r.start:r.end,this.multiSelect.addRange(r),!i)){var s=n.getTextRange(r),o=function(t,e,i){return u.$options.wrap=!0,u.$options.needle=e,u.$options.backwards=-1==i,u.find(t)}(n,s,t);o&&(o.cursor=-1==t?o.start:o.end,this.session.unfold(o),this.multiSelect.addRange(o),this.renderer.scrollCursorIntoView(null,.5)),e&&this.multiSelect.substractPoint(r.cursor)}},this.alignCursors=function(){var t=this.session,e=t.multiSelect,i=e.ranges,n=-1,s=i.filter((function(t){if(t.cursor.row==n)return!0;n=t.cursor.row}));if(i.length&&s.length!=i.length-1){s.forEach((function(t){e.substractPoint(t.cursor)}));var o=0,a=1/0,l=i.map((function(e){var i=e.cursor,n=t.getLine(i.row).substr(i.column).search(/\S/g);return-1==n&&(n=0),i.column>o&&(o=i.column),n<a&&(a=n),n}));i.forEach((function(e,i){var n=e.cursor,s=o-n.column,u=l[i]-a;s>u?t.insert(n,h.stringRepeat(" ",s-u)):t.remove(new r(n.row,n.column,n.row,n.column-s+u)),e.start.column=e.end.column=o,e.start.row=e.end.row=n.row,e.cursor=e.end})),e.fromOrientedRange(i[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),c=u.start.row,d=u.end.row,p=c==d;if(p){var f,m=this.session.getLength();do{f=this.session.getLine(d)}while(/[=:]/.test(f)&&++d<m);do{f=this.session.getLine(c)}while(/[=:]/.test(f)&&--c>0);c<0&&(c=0),d>=m&&(d=m-1)}var g=this.session.removeFullLines(c,d);g=this.$reAlignText(g,p),this.session.insert({row:c,column:0},g.join("\n")+"\n"),p||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(t,e){var i,n,r,s=!0,o=!0;return t.map((function(t){var e=t.match(/(\s*)(.*?)(\s*)([=:].*)/);return e?null==i?(i=e[1].length,n=e[2].length,r=e[3].length,e):(i+n+r!=e[1].length+e[2].length+e[3].length&&(o=!1),i!=e[1].length&&(s=!1),i>e[1].length&&(i=e[1].length),n<e[2].length&&(n=e[2].length),r>e[3].length&&(r=e[3].length),e):[t]})).map(e?l:s?o?function(t){return t[2]?a(i+n-t[2].length)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}:l:function(t){return t[2]?a(i)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]});function a(t){return h.stringRepeat(" ",t)}function l(t){return t[2]?a(i)+t[2]+a(n-t[2].length+r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}}}).call(d.prototype),e.onSessionChange=function(t){var e=t.session;e&&!e.multiSelect&&(e.$selectionMarkers=[],e.selection.$initRangeList(),e.multiSelect=e.selection),this.multiSelect=e&&e.multiSelect;var i=t.oldSession;i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.multiSelect.anchor.off("change",this.$checkMultiselectChange)),e&&(e.multiSelect.on("addRange",this.$onAddRange),e.multiSelect.on("removeRange",this.$onRemoveRange),e.multiSelect.on("multiSelect",this.$onMultiSelect),e.multiSelect.on("singleSelect",this.$onSingleSelect),e.multiSelect.lead.on("change",this.$checkMultiselectChange),e.multiSelect.anchor.on("change",this.$checkMultiselectChange)),e&&this.inMultiSelectMode!=e.selection.inMultiSelectMode&&(e.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},e.MultiSelect=p,t("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(t){p(this),t?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",o)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",o))},value:!0},enableBlockSelect:{set:function(t){this.$blockSelectEnabled=t},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(t,e,i){"use strict";var n=t("../../range").Range,r=e.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(t,e,i){var n=t.getLine(i);return this.foldingStartMarker.test(n)?"start":"markbeginend"==e&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(t,e,i){return null},this.indentationBlock=function(t,e,i){var r=/\S/,s=t.getLine(e),o=s.search(r);if(-1!=o){for(var a=i||s.length,h=t.getLength(),l=e,u=e;++e<h;){var c=t.getLine(e).search(r);if(-1!=c){if(c<=o){var d=t.getTokenAt(e,0);if(!d||"string"!==d.type)break}u=e}}if(u>l){var p=t.getLine(u).length;return new n(l,a,u,p)}}},this.openingBracketBlock=function(t,e,i,r,s){var o={row:i,column:r+1},a=t.$findClosingBracket(e,o,s);if(a){var h=t.foldWidgets[a.row];return null==h&&(h=t.getFoldWidget(a.row)),"start"==h&&a.row>o.row&&(a.row--,a.column=t.getLine(a.row).length),n.fromPoints(o,a)}},this.closingBracketBlock=function(t,e,i,r,s){var o={row:i,column:r},a=t.$findOpeningBracket(e,o);if(a)return a.column++,o.column--,n.fromPoints(a,o)}}).call(r.prototype)})),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],(function(t,e,i){"use strict";e.isDark=!1,e.cssClass="ace-tm",e.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e.$id="ace/theme/textmate",t("../lib/dom").importCssString(e.cssText,e.cssClass)})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],(function(t,e,i){"use strict";t("./lib/oop");var n=t("./lib/dom");function r(t){this.session=t,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}t("./range").Range,function(){this.getRowLength=function(t){var e;return e=this.lineWidgets&&this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0,this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1+e:1+e},this.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach((function(e){e&&e.rowCount&&!e.hidden&&(t+=e.rowCount)})),t},this.$onChangeEditor=function(t){this.attach(t.editor)},this.attach=function(t){t&&t.widgetManager&&t.widgetManager!=this&&t.widgetManager.detach(),this.editor!=t&&(this.detach(),this.editor=t,t&&(t.widgetManager=this,t.renderer.on("beforeRender",this.measureWidgets),t.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(t){var e=this.editor;if(e){this.editor=null,e.widgetManager=null,e.renderer.off("beforeRender",this.measureWidgets),e.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach((function(t){t&&t.el&&t.el.parentNode&&(t._inDocument=!1,t.el.parentNode.removeChild(t.el))}))}},this.updateOnFold=function(t,e){var i=e.lineWidgets;if(i&&t.action){for(var n=t.data,r=n.start.row,s=n.end.row,o="add"==t.action,a=r+1;a<s;a++)i[a]&&(i[a].hidden=o);i[s]&&(o?i[r]?i[s].hidden=o:i[r]=i[s]:(i[r]==i[s]&&(i[r]=void 0),i[s].hidden=o))}},this.updateOnChange=function(t){var e=this.session.lineWidgets;if(e){var i=t.start.row,n=t.end.row-i;if(0===n);else if("remove"==t.action)e.splice(i+1,n).forEach((function(t){t&&this.removeLineWidget(t)}),this),this.$updateRows();else{var r=new Array(n);r.unshift(i,0),e.splice.apply(e,r),this.$updateRows()}}},this.$updateRows=function(){var t=this.session.lineWidgets;if(t){var e=!0;t.forEach((function(t,i){if(t)for(e=!1,t.row=i;t.$oldWidget;)t.$oldWidget.row=i,t=t.$oldWidget})),e&&(this.session.lineWidgets=null)}},this.addLineWidget=function(t){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var e=this.session.lineWidgets[t.row];e&&(t.$oldWidget=e,e.el&&e.el.parentNode&&(e.el.parentNode.removeChild(e.el),e._inDocument=!1)),this.session.lineWidgets[t.row]=t,t.session=this.session;var i=this.editor.renderer;t.html&&!t.el&&(t.el=n.createElement("div"),t.el.innerHTML=t.html),t.el&&(n.addCssClass(t.el,"ace_lineWidgetContainer"),t.el.style.position="absolute",t.el.style.zIndex=5,i.container.appendChild(t.el),t._inDocument=!0),t.coverGutter||(t.el.style.zIndex=3),null==t.pixelHeight&&(t.pixelHeight=t.el.offsetHeight),null==t.rowCount&&(t.rowCount=t.pixelHeight/i.layerConfig.lineHeight);var r=this.session.getFoldAt(t.row,0);if(t.$fold=r,r){var s=this.session.lineWidgets;t.row!=r.end.row||s[r.start.row]?t.hidden=!0:s[r.start.row]=t}return this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows(),this.renderWidgets(null,i),this.onWidgetChanged(t),t},this.removeLineWidget=function(t){if(t._inDocument=!1,t.session=null,t.el&&t.el.parentNode&&t.el.parentNode.removeChild(t.el),t.editor&&t.editor.destroy)try{t.editor.destroy()}catch(t){}if(this.session.lineWidgets){var e=this.session.lineWidgets[t.row];if(e==t)this.session.lineWidgets[t.row]=t.$oldWidget,t.$oldWidget&&this.onWidgetChanged(t.$oldWidget);else for(;e;){if(e.$oldWidget==t){e.$oldWidget=t.$oldWidget;break}e=e.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(t){for(var e=this.session.lineWidgets,i=e&&e[t],n=[];i;)n.push(i),i=i.$oldWidget;return n},this.onWidgetChanged=function(t){this.session._changedWidgets.push(t),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(t,e){var i=this.session._changedWidgets,n=e.layerConfig;if(i&&i.length){for(var r=1/0,s=0;s<i.length;s++){var o=i[s];if(o&&o.el&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,e.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/n.characterWidth));var a=o.h/n.lineHeight;o.coverLine&&(a-=this.session.getRowLineCount(o.row))<0&&(a=0),o.rowCount!=a&&(o.rowCount=a,o.row<r&&(r=o.row))}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(t,e){var i=e.layerConfig,n=this.session.lineWidgets;if(n){for(var r=Math.min(this.firstRow,i.firstRow),s=Math.max(this.lastRow,i.lastRow,n.length);r>0&&!n[r];)r--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,e.$cursorLayer.config=i;for(var o=r;o<=s;o++){var a=n[o];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,e.container.appendChild(a.el));var h=e.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;a.coverLine||(h+=i.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=h-i.offset+"px";var l=a.coverGutter?0:e.gutterWidth;a.fixedWidth||(l-=e.scrollLeft),a.el.style.left=l+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=i.width+2*i.padding+"px"),a.fixedWidth?a.el.style.right=e.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}.call(r.prototype),e.LineWidgets=r})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],(function(t,e,i){"use strict";var n=t("../line_widgets").LineWidgets,r=t("../lib/dom"),s=t("../range").Range;e.showErrorMarker=function(t,e){var i=t.session;i.widgetManager||(i.widgetManager=new n(i),i.widgetManager.attach(t));var o=t.getCursorPosition(),a=o.row,h=i.widgetManager.getWidgetsAtRow(a).filter((function(t){return"errorMarker"==t.type}))[0];h?h.destroy():a-=e;var l,u=function(t,e,i){var n=t.getAnnotations().sort(s.comparePoints);if(n.length){var r=function(t,e,i){for(var n=0,r=t.length-1;n<=r;){var s=n+r>>1,o=i(e,t[s]);if(o>0)n=s+1;else{if(!(o<0))return s;r=s-1}}return-(n+1)}(n,{row:e,column:-1},s.comparePoints);r<0&&(r=-r-1),r>=n.length?r=i>0?0:n.length-1:0===r&&i<0&&(r=n.length-1);var o=n[r];if(o&&i){if(o.row===e){do{o=n[r+=i]}while(o&&o.row===e);if(!o)return n.slice()}var a=[];e=o.row;do{a[i<0?"unshift":"push"](o),o=n[r+=i]}while(o&&o.row==e);return a.length&&a}}}(i,a,e);if(u){var c=u[0];o.column=(c.pos&&"number"!=typeof c.column?c.pos.sc:c.column)||0,o.row=c.row,l=t.renderer.$gutterLayer.$annotations[o.row]}else{if(h)return;l={text:["Looks good!"],className:"ace_ok"}}t.session.unfold(o.row),t.selection.moveToPosition(o);var d={row:o.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},p=d.el.appendChild(r.createElement("div")),f=d.el.appendChild(r.createElement("div"));f.className="error_widget_arrow "+l.className;var m=t.renderer.$cursorLayer.getPixelPosition(o).left;f.style.left=m+t.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",p.className="error_widget "+l.className,p.innerHTML=l.text.join("<br>"),p.appendChild(r.createElement("div"));var g=function(t,e,i){if(0===e&&("esc"===i||"return"===i))return d.destroy(),{command:"null"}};d.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(g),i.widgetManager.removeLineWidget(d),t.off("changeSelection",d.destroy),t.off("changeSession",d.destroy),t.off("mouseup",d.destroy),t.off("change",d.destroy))},t.keyBinding.addKeyboardHandler(g),t.on("changeSelection",d.destroy),t.on("changeSession",d.destroy),t.on("mouseup",d.destroy),t.on("change",d.destroy),t.session.widgetManager.addLineWidget(d),d.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")})),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],(function(t,e,n){"use strict";t("./lib/fixoldbrowsers");var r=t("./lib/dom"),s=t("./lib/event"),o=t("./range").Range,a=t("./editor").Editor,h=t("./edit_session").EditSession,l=t("./undomanager").UndoManager,u=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),e.config=t("./config"),e.require=t,e.define=i.amdD,e.edit=function(t,i){if("string"==typeof t){var n=t;if(!(t=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}if(t&&t.env&&t.env.editor instanceof a)return t.env.editor;var o="";if(t&&/input|textarea/i.test(t.tagName)){var h=t;o=h.value,t=r.createElement("pre"),h.parentNode.replaceChild(t,h)}else t&&(o=t.textContent,t.innerHTML="");var l=e.createEditSession(o),c=new a(new u(t),l,i),d={document:l,editor:c,onResize:c.resize.bind(c,null)};return h&&(d.textarea=h),s.addListener(window,"resize",d.onResize),c.on("destroy",(function(){s.removeListener(window,"resize",d.onResize),d.editor.container.env=null})),c.container.env=c.env=d,c},e.createEditSession=function(t,e){var i=new h(t,e);return i.setUndoManager(new l),i},e.Range=o,e.Editor=a,e.EditSession=h,e.UndoManager=l,e.VirtualRenderer=u,e.version=e.config.version})),ace.require(["ace/ace"],(function(e){for(var i in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(i)&&(window.ace[i]=e[i]);window.ace.default=window.ace,t&&(t.exports=window.ace)})),t.exports={ace:ace}},655:(t,e,i)=>{"use strict";var n=i(379),r=i.n(n),s=i(795),o=i.n(s),a=i(569),h=i.n(a),l=i(565),u=i.n(l),c=i(216),d=i.n(c),p=i(589),f=i.n(p),m=i(827),g={};g.styleTagTransform=f(),g.setAttributes=u(),g.insert=h().bind(null,"html"),g.domAPI=o(),g.insertStyleElement=d(),r()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals},379:t=>{"use strict";var e=[];function i(t){for(var i=-1,n=0;n<e.length;n++)if(e[n].identifier===t){i=n;break}return i}function n(t,n){for(var s={},o=[],a=0;a<t.length;a++){var h=t[a],l=n.base?h[0]+n.base:h[0],u=s[l]||0,c="".concat(l," ").concat(u);s[l]=u+1;var d=i(c),p={css:h[1],media:h[2],sourceMap:h[3],supports:h[4],layer:h[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var f=r(p,n);n.byIndex=a,e.splice(a,0,{identifier:c,updater:f,references:1})}o.push(c)}return o}function r(t,e){var i=e.domAPI(e);return i.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,r){var s=n(t=t||[],r=r||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=i(s[o]);e[a].references--}for(var h=n(t,r),l=0;l<s.length;l++){var u=i(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=h}}},569:t=>{"use strict";var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},216:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,i)=>{"use strict";t.exports=function(t){var e=i.nc;e&&t.setAttribute("nonce",e)}},795:t=>{"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(i){!function(t,e,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,r&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var s=i.sourceMap;s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},630:(t,e,i)=>{"use strict";i.r(e),i.d(e,{EmbeddedFrontend:()=>kn,Spector:()=>Bn});var n,r=function(){function t(){}return t.isBuildableProgram=function(t){return!!t&&!!t[this.rebuildProgramFunctionName]},t.rebuildProgram=function(t,e,i,n,r){this.isBuildableProgram(t)&&t[this.rebuildProgramFunctionName](e,i,n,r)},t.rebuildProgramFunctionName="__SPECTOR_rebuildProgram",t}();!function(t){t[t.noLog=0]="noLog",t[t.error=1]="error",t[t.warning=2]="warning",t[t.info=3]="info"}(n||(n={}));var s,o=function(){function t(){}return t.error=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];this.level>0&&console.error(t,e)},t.warn=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];this.level>1&&console.warn(t,e)},t.info=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];this.level>2&&console.log(t,e)},t.level=n.warning,t}(),a=function(){function t(){this.callbacks=[],this.counter=-1}return t.prototype.add=function(t,e){return this.counter++,e&&(t=t.bind(e)),this.callbacks[this.counter]=t,this.counter},t.prototype.remove=function(t){delete this.callbacks[t]},t.prototype.clear=function(){this.callbacks={}},t.prototype.trigger=function(t){for(var e in this.callbacks)this.callbacks.hasOwnProperty(e)&&this.callbacks[e](t)},t}(),h=function(){function t(){if(window.performance&&window.performance.now)this.nowFunction=this.dateBasedPerformanceNow.bind(this);else{var t=new Date;this.nowFunction=t.getTime.bind(t)}}return t.prototype.dateBasedPerformanceNow=function(){return performance.timing.navigationStart+performance.now()},Object.defineProperty(t,"now",{get:function(){return t.instance.nowFunction()},enumerable:!1,configurable:!0}),t.instance=new t,t}(),l=function(){function t(t){this.options=t}return t.prototype.appendAnalysis=function(t){t.analyses=t.analyses||[];var e=this.getAnalysis(t);t.analyses.push(e)},t.prototype.getAnalysis=function(t){var e={analyserName:this.analyserName};return this.appendToAnalysis(t,e),e},t}(),u=(s=function(t,e){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},s(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),Object.defineProperty(e.prototype,"analyserName",{get:function(){return e.analyserName},enumerable:!1,configurable:!0}),e.prototype.appendToAnalysis=function(t,e){if(t.commands){for(var i={},n=0,r=t.commands;n<r.length;n++){var s=r[n];i[s.name]=i[s.name]||0,i[s.name]++}var o=Object.keys(i).map((function(t){return[t,i[t]]}));o.sort((function(t,e){var i=e[1]-t[1];return 0===i?t[0].localeCompare(e[0]):i}));for(var a=0,h=o;a<h.length;a++){var l=h[a];e[l[0]]=l[1]}}},e.analyserName="Commands",e}(l),d=["drawArrays","drawElements","drawArraysInstanced","drawArraysInstancedANGLE","drawElementsInstanced","drawElementsInstancedANGLE","drawRangeElements","multiDrawArraysInstancedBaseInstanceWEBGL","multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL"],p=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),Object.defineProperty(e.prototype,"analyserName",{get:function(){return e.analyserName},enumerable:!1,configurable:!0}),e.prototype.appendToAnalysis=function(t,e){if(t.commands){e.total=t.commands.length,e.draw=0,e.clear=0;for(var i=0,n=t.commands;i<n.length;i++){var r=n[i];"clear"===r.name?e.clear++:d.indexOf(r.name)>-1&&e.draw++}}},e.analyserName="CommandsSummary",e}(l),m=function(){function t(){}return t.isWebGlConstant=function(t){return null!==v[t]&&void 0!==v[t]},t.stringifyWebGlConstant=function(t,e){if(null==t)return"";if(0===t)return this.zeroMeaningByCommand[e]||"0";if(1===t)return this.oneMeaningByCommand[e]||"1";var i=v[t];return i?i.name:t+""},t.DEPTH_BUFFER_BIT={name:"DEPTH_BUFFER_BIT",value:256,description:"Passed to clear to clear the current depth buffer."},t.STENCIL_BUFFER_BIT={name:"STENCIL_BUFFER_BIT",value:1024,description:"Passed to clear to clear the current stencil buffer."},t.COLOR_BUFFER_BIT={name:"COLOR_BUFFER_BIT",value:16384,description:"Passed to clear to clear the current color buffer."},t.POINTS={name:"POINTS",value:0,description:"Passed to drawElements or drawArrays to draw single points."},t.LINES={name:"LINES",value:1,description:"Passed to drawElements or drawArrays to draw lines. Each vertex connects to the one after it."},t.LINE_LOOP={name:"LINE_LOOP",value:2,description:"Passed to drawElements or drawArrays to draw lines. Each set of two vertices is treated as a separate line segment."},t.LINE_STRIP={name:"LINE_STRIP",value:3,description:"Passed to drawElements or drawArrays to draw a connected group of line segments from the first vertex to the last."},t.TRIANGLES={name:"TRIANGLES",value:4,description:"Passed to drawElements or drawArrays to draw triangles. Each set of three vertices creates a separate triangle."},t.TRIANGLE_STRIP={name:"TRIANGLE_STRIP",value:5,description:"Passed to drawElements or drawArrays to draw a connected group of triangles."},t.TRIANGLE_FAN={name:"TRIANGLE_FAN",value:6,description:"Passed to drawElements or drawArrays to draw a connected group of triangles. Each vertex connects to the previous and the first vertex in the fan."},t.ZERO={name:"ZERO",value:0,description:"Passed to blendFunc or blendFuncSeparate to turn off a component."},t.ONE={name:"ONE",value:1,description:"Passed to blendFunc or blendFuncSeparate to turn on a component."},t.SRC_COLOR={name:"SRC_COLOR",value:768,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by the source elements color."},t.ONE_MINUS_SRC_COLOR={name:"ONE_MINUS_SRC_COLOR",value:769,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the source elements color."},t.SRC_ALPHA={name:"SRC_ALPHA",value:770,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by the source's alpha."},t.ONE_MINUS_SRC_ALPHA={name:"ONE_MINUS_SRC_ALPHA",value:771,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the source's alpha."},t.DST_ALPHA={name:"DST_ALPHA",value:772,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by the destination's alpha."},t.ONE_MINUS_DST_ALPHA={name:"ONE_MINUS_DST_ALPHA",value:773,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the destination's alpha."},t.DST_COLOR={name:"DST_COLOR",value:774,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by the destination's color."},t.ONE_MINUS_DST_COLOR={name:"ONE_MINUS_DST_COLOR",value:775,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by one minus the destination's color."},t.SRC_ALPHA_SATURATE={name:"SRC_ALPHA_SATURATE",value:776,description:"Passed to blendFunc or blendFuncSeparate to multiply a component by the minimum of source's alpha or one minus the destination's alpha."},t.CONSTANT_COLOR={name:"CONSTANT_COLOR",value:32769,description:"Passed to blendFunc or blendFuncSeparate to specify a constant color blend function."},t.ONE_MINUS_CONSTANT_COLOR={name:"ONE_MINUS_CONSTANT_COLOR",value:32770,description:"Passed to blendFunc or blendFuncSeparate to specify one minus a constant color blend function."},t.CONSTANT_ALPHA={name:"CONSTANT_ALPHA",value:32771,description:"Passed to blendFunc or blendFuncSeparate to specify a constant alpha blend function."},t.ONE_MINUS_CONSTANT_ALPHA={name:"ONE_MINUS_CONSTANT_ALPHA",value:32772,description:"Passed to blendFunc or blendFuncSeparate to specify one minus a constant alpha blend function."},t.FUNC_ADD={name:"FUNC_ADD",value:32774,description:"Passed to blendEquation or blendEquationSeparate to set an addition blend function."},t.FUNC_SUBSTRACT={name:"FUNC_SUBSTRACT",value:32778,description:"Passed to blendEquation or blendEquationSeparate to specify a subtraction blend function (source - destination)."},t.FUNC_REVERSE_SUBTRACT={name:"FUNC_REVERSE_SUBTRACT",value:32779,description:"Passed to blendEquation or blendEquationSeparate to specify a reverse subtraction blend function (destination - source)."},t.BLEND_EQUATION={name:"BLEND_EQUATION",value:32777,description:"Passed to getParameter to get the current RGB blend function."},t.BLEND_EQUATION_RGB={name:"BLEND_EQUATION_RGB",value:32777,description:"Passed to getParameter to get the current RGB blend function. Same as BLEND_EQUATION"},t.BLEND_EQUATION_ALPHA={name:"BLEND_EQUATION_ALPHA",value:34877,description:"Passed to getParameter to get the current alpha blend function. Same as BLEND_EQUATION"},t.BLEND_DST_RGB={name:"BLEND_DST_RGB",value:32968,description:"Passed to getParameter to get the current destination RGB blend function."},t.BLEND_SRC_RGB={name:"BLEND_SRC_RGB",value:32969,description:"Passed to getParameter to get the current destination RGB blend function."},t.BLEND_DST_ALPHA={name:"BLEND_DST_ALPHA",value:32970,description:"Passed to getParameter to get the current destination alpha blend function."},t.BLEND_SRC_ALPHA={name:"BLEND_SRC_ALPHA",value:32971,description:"Passed to getParameter to get the current source alpha blend function."},t.BLEND_COLOR={name:"BLEND_COLOR",value:32773,description:"Passed to getParameter to return a the current blend color."},t.ARRAY_BUFFER_BINDING={name:"ARRAY_BUFFER_BINDING",value:34964,description:"Passed to getParameter to get the array buffer binding."},t.ELEMENT_ARRAY_BUFFER_BINDING={name:"ELEMENT_ARRAY_BUFFER_BINDING",value:34965,description:"Passed to getParameter to get the current element array buffer."},t.LINE_WIDTH={name:"LINE_WIDTH",value:2849,description:"Passed to getParameter to get the current lineWidth (set by the lineWidth method)."},t.ALIASED_POINT_SIZE_RANGE={name:"ALIASED_POINT_SIZE_RANGE",value:33901,description:"Passed to getParameter to get the current size of a point drawn with gl.POINTS"},t.ALIASED_LINE_WIDTH_RANGE={name:"ALIASED_LINE_WIDTH_RANGE",value:33902,description:"Passed to getParameter to get the range of available widths for a line. Returns a length-2 array with the lo value at 0, and hight at 1."},t.CULL_FACE_MODE={name:"CULL_FACE_MODE",value:2885,description:"Passed to getParameter to get the current value of cullFace. Should return FRONT, BACK, or FRONT_AND_BACK"},t.FRONT_FACE={name:"FRONT_FACE",value:2886,description:"Passed to getParameter to determine the current value of frontFace. Should return CW or CCW."},t.DEPTH_RANGE={name:"DEPTH_RANGE",value:2928,description:"Passed to getParameter to return a length-2 array of floats giving the current depth range."},t.DEPTH_WRITEMASK={name:"DEPTH_WRITEMASK",value:2930,description:"Passed to getParameter to determine if the depth write mask is enabled."},t.DEPTH_CLEAR_VALUE={name:"DEPTH_CLEAR_VALUE",value:2931,description:"Passed to getParameter to determine the current depth clear value."},t.DEPTH_FUNC={name:"DEPTH_FUNC",value:2932,description:"Passed to getParameter to get the current depth function. Returns NEVER, ALWAYS, LESS, EQUAL, LEQUAL, GREATER, GEQUAL, or NOTEQUAL."},t.STENCIL_CLEAR_VALUE={name:"STENCIL_CLEAR_VALUE",value:2961,description:"Passed to getParameter to get the value the stencil will be cleared to."},t.STENCIL_FUNC={name:"STENCIL_FUNC",value:2962,description:"Passed to getParameter to get the current stencil function. Returns NEVER, ALWAYS, LESS, EQUAL, LEQUAL, GREATER, GEQUAL, or NOTEQUAL."},t.STENCIL_FAIL={name:"STENCIL_FAIL",value:2964,description:"Passed to getParameter to get the current stencil fail function. Should return KEEP, REPLACE, INCR, DECR, INVERT, INCR_WRAP, or DECR_WRAP."},t.STENCIL_PASS_DEPTH_FAIL={name:"STENCIL_PASS_DEPTH_FAIL",value:2965,description:"Passed to getParameter to get the current stencil fail function should the depth buffer test fail. Should return KEEP, REPLACE, INCR, DECR, INVERT, INCR_WRAP, or DECR_WRAP."},t.STENCIL_PASS_DEPTH_PASS={name:"STENCIL_PASS_DEPTH_PASS",value:2966,description:"Passed to getParameter to get the current stencil fail function should the depth buffer test pass. Should return KEEP, REPLACE, INCR, DECR, INVERT, INCR_WRAP, or DECR_WRAP."},t.STENCIL_REF={name:"STENCIL_REF",value:2967,description:"Passed to getParameter to get the reference value used for stencil tests."},t.STENCIL_VALUE_MASK={name:"STENCIL_VALUE_MASK",value:2963,description:" "},t.STENCIL_WRITEMASK={name:"STENCIL_WRITEMASK",value:2968,description:" "},t.STENCIL_BACK_FUNC={name:"STENCIL_BACK_FUNC",value:34816,description:" "},t.STENCIL_BACK_FAIL={name:"STENCIL_BACK_FAIL",value:34817,description:" "},t.STENCIL_BACK_PASS_DEPTH_FAIL={name:"STENCIL_BACK_PASS_DEPTH_FAIL",value:34818,description:" "},t.STENCIL_BACK_PASS_DEPTH_PASS={name:"STENCIL_BACK_PASS_DEPTH_PASS",value:34819,description:" "},t.STENCIL_BACK_REF={name:"STENCIL_BACK_REF",value:36003,description:" "},t.STENCIL_BACK_VALUE_MASK={name:"STENCIL_BACK_VALUE_MASK",value:36004,description:" "},t.STENCIL_BACK_WRITEMASK={name:"STENCIL_BACK_WRITEMASK",value:36005,description:" "},t.VIEWPORT={name:"VIEWPORT",value:2978,description:"Returns an Int32Array with four elements for the current viewport dimensions."},t.SCISSOR_BOX={name:"SCISSOR_BOX",value:3088,description:"Returns an Int32Array with four elements for the current scissor box dimensions."},t.COLOR_CLEAR_VALUE={name:"COLOR_CLEAR_VALUE",value:3106,description:" "},t.COLOR_WRITEMASK={name:"COLOR_WRITEMASK",value:3107,description:" "},t.UNPACK_ALIGNMENT={name:"UNPACK_ALIGNMENT",value:3317,description:" "},t.PACK_ALIGNMENT={name:"PACK_ALIGNMENT",value:3333,description:" "},t.MAX_TEXTURE_SIZE={name:"MAX_TEXTURE_SIZE",value:3379,description:" "},t.MAX_VIEWPORT_DIMS={name:"MAX_VIEWPORT_DIMS",value:3386,description:" "},t.SUBPIXEL_BITS={name:"SUBPIXEL_BITS",value:3408,description:" "},t.RED_BITS={name:"RED_BITS",value:3410,description:" "},t.GREEN_BITS={name:"GREEN_BITS",value:3411,description:" "},t.BLUE_BITS={name:"BLUE_BITS",value:3412,description:" "},t.ALPHA_BITS={name:"ALPHA_BITS",value:3413,description:" "},t.DEPTH_BITS={name:"DEPTH_BITS",value:3414,description:" "},t.STENCIL_BITS={name:"STENCIL_BITS",value:3415,description:" "},t.POLYGON_OFFSET_UNITS={name:"POLYGON_OFFSET_UNITS",value:10752,description:" "},t.POLYGON_OFFSET_FACTOR={name:"POLYGON_OFFSET_FACTOR",value:32824,description:" "},t.TEXTURE_BINDING_2D={name:"TEXTURE_BINDING_2D",value:32873,description:" "},t.SAMPLE_BUFFERS={name:"SAMPLE_BUFFERS",value:32936,description:" "},t.SAMPLES={name:"SAMPLES",value:32937,description:" "},t.SAMPLE_COVERAGE_VALUE={name:"SAMPLE_COVERAGE_VALUE",value:32938,description:" "},t.SAMPLE_COVERAGE_INVERT={name:"SAMPLE_COVERAGE_INVERT",value:32939,description:" "},t.COMPRESSED_TEXTURE_FORMATS={name:"COMPRESSED_TEXTURE_FORMATS",value:34467,description:" "},t.VENDOR={name:"VENDOR",value:7936,description:" "},t.RENDERER={name:"RENDERER",value:7937,description:" "},t.VERSION={name:"VERSION",value:7938,description:" "},t.IMPLEMENTATION_COLOR_READ_TYPE={name:"IMPLEMENTATION_COLOR_READ_TYPE",value:35738,description:" "},t.IMPLEMENTATION_COLOR_READ_FORMAT={name:"IMPLEMENTATION_COLOR_READ_FORMAT",value:35739,description:" "},t.BROWSER_DEFAULT_WEBGL={name:"BROWSER_DEFAULT_WEBGL",value:37444,description:" "},t.STATIC_DRAW={name:"STATIC_DRAW",value:35044,description:"Passed to bufferData as a hint about whether the contents of the buffer are likely to be used often and not change often."},t.STREAM_DRAW={name:"STREAM_DRAW",value:35040,description:"Passed to bufferData as a hint about whether the contents of the buffer are likely to not be used often."},t.DYNAMIC_DRAW={name:"DYNAMIC_DRAW",value:35048,description:"Passed to bufferData as a hint about whether the contents of the buffer are likely to be used often and change often."},t.ARRAY_BUFFER={name:"ARRAY_BUFFER",value:34962,description:"Passed to bindBuffer or bufferData to specify the type of buffer being used."},t.ELEMENT_ARRAY_BUFFER={name:"ELEMENT_ARRAY_BUFFER",value:34963,description:"Passed to bindBuffer or bufferData to specify the type of buffer being used."},t.BUFFER_SIZE={name:"BUFFER_SIZE",value:34660,description:"Passed to getBufferParameter to get a buffer's size."},t.BUFFER_USAGE={name:"BUFFER_USAGE",value:34661,description:"Passed to getBufferParameter to get the hint for the buffer passed in when it was created."},t.CURRENT_VERTEX_ATTRIB={name:"CURRENT_VERTEX_ATTRIB",value:34342,description:"Passed to getVertexAttrib to read back the current vertex attribute."},t.VERTEX_ATTRIB_ARRAY_ENABLED={name:"VERTEX_ATTRIB_ARRAY_ENABLED",value:34338,description:" "},t.VERTEX_ATTRIB_ARRAY_SIZE={name:"VERTEX_ATTRIB_ARRAY_SIZE",value:34339,description:" "},t.VERTEX_ATTRIB_ARRAY_STRIDE={name:"VERTEX_ATTRIB_ARRAY_STRIDE",value:34340,description:" "},t.VERTEX_ATTRIB_ARRAY_TYPE={name:"VERTEX_ATTRIB_ARRAY_TYPE",value:34341,description:" "},t.VERTEX_ATTRIB_ARRAY_NORMALIZED={name:"VERTEX_ATTRIB_ARRAY_NORMALIZED",value:34922,description:" "},t.VERTEX_ATTRIB_ARRAY_POINTER={name:"VERTEX_ATTRIB_ARRAY_POINTER",value:34373,description:" "},t.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING={name:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",value:34975,description:" "},t.CULL_FACE={name:"CULL_FACE",value:2884,description:"Passed to enable/disable to turn on/off culling. Can also be used with getParameter to find the current culling method."},t.FRONT={name:"FRONT",value:1028,description:"Passed to cullFace to specify that only front faces should be drawn."},t.BACK={name:"BACK",value:1029,description:"Passed to cullFace to specify that only back faces should be drawn."},t.FRONT_AND_BACK={name:"FRONT_AND_BACK",value:1032,description:"Passed to cullFace to specify that front and back faces should be drawn."},t.BLEND={name:"BLEND",value:3042,description:"Passed to enable/disable to turn on/off blending. Can also be used with getParameter to find the current blending method."},t.DEPTH_TEST={name:"DEPTH_TEST",value:2929,description:"Passed to enable/disable to turn on/off the depth test. Can also be used with getParameter to query the depth test."},t.DITHER={name:"DITHER",value:3024,description:"Passed to enable/disable to turn on/off dithering. Can also be used with getParameter to find the current dithering method."},t.POLYGON_OFFSET_FILL={name:"POLYGON_OFFSET_FILL",value:32823,description:"Passed to enable/disable to turn on/off the polygon offset. Useful for rendering hidden-line images, decals, and or solids with highlighted edges. Can also be used with getParameter to query the scissor test."},t.SAMPLE_ALPHA_TO_COVERAGE={name:"SAMPLE_ALPHA_TO_COVERAGE",value:32926,description:"Passed to enable/disable to turn on/off the alpha to coverage. Used in multi-sampling alpha channels."},t.SAMPLE_COVERAGE={name:"SAMPLE_COVERAGE",value:32928,description:"Passed to enable/disable to turn on/off the sample coverage. Used in multi-sampling."},t.SCISSOR_TEST={name:"SCISSOR_TEST",value:3089,description:"Passed to enable/disable to turn on/off the scissor test. Can also be used with getParameter to query the scissor test."},t.STENCIL_TEST={name:"STENCIL_TEST",value:2960,description:"Passed to enable/disable to turn on/off the stencil test. Can also be used with getParameter to query the stencil test."},t.NO_ERROR={name:"NO_ERROR",value:0,description:"Returned from getError."},t.INVALID_ENUM={name:"INVALID_ENUM",value:1280,description:"Returned from getError."},t.INVALID_VALUE={name:"INVALID_VALUE",value:1281,description:"Returned from getError."},t.INVALID_OPERATION={name:"INVALID_OPERATION",value:1282,description:"Returned from getError."},t.OUT_OF_MEMORY={name:"OUT_OF_MEMORY",value:1285,description:"Returned from getError."},t.CONTEXT_LOST_WEBGL={name:"CONTEXT_LOST_WEBGL",value:37442,description:"Returned from getError."},t.CW={name:"CW",value:2304,description:"Passed to frontFace to specify the front face of a polygon is drawn in the clockwise direction"},t.CCW={name:"CCW",value:2305,description:"Passed to frontFace to specify the front face of a polygon is drawn in the counter clockwise direction"},t.DONT_CARE={name:"DONT_CARE",value:4352,description:"There is no preference for this behavior."},t.FASTEST={name:"FASTEST",value:4353,description:"The most efficient behavior should be used."},t.NICEST={name:"NICEST",value:4354,description:"The most correct or the highest quality option should be used."},t.GENERATE_MIPMAP_HINT={name:"GENERATE_MIPMAP_HINT",value:33170,description:"Hint for the quality of filtering when generating mipmap images with WebGLRenderingContext.generateMipmap()."},t.BYTE={name:"BYTE",value:5120,description:" "},t.UNSIGNED_BYTE={name:"UNSIGNED_BYTE",value:5121,description:" "},t.SHORT={name:"SHORT",value:5122,description:" "},t.UNSIGNED_SHORT={name:"UNSIGNED_SHORT",value:5123,description:" "},t.INT={name:"INT",value:5124,description:" "},t.UNSIGNED_INT={name:"UNSIGNED_INT",value:5125,description:" "},t.FLOAT={name:"FLOAT",value:5126,description:" "},t.DEPTH_COMPONENT={name:"DEPTH_COMPONENT",value:6402,description:" "},t.ALPHA={name:"ALPHA",value:6406,description:" "},t.RGB={name:"RGB",value:6407,description:" "},t.RGBA={name:"RGBA",value:6408,description:" "},t.LUMINANCE={name:"LUMINANCE",value:6409,description:" "},t.LUMINANCE_ALPHA={name:"LUMINANCE_ALPHA",value:6410,description:" "},t.UNSIGNED_SHORT_4_4_4_4={name:"UNSIGNED_SHORT_4_4_4_4",value:32819,description:" "},t.UNSIGNED_SHORT_5_5_5_1={name:"UNSIGNED_SHORT_5_5_5_1",value:32820,description:" "},t.UNSIGNED_SHORT_5_6_5={name:"UNSIGNED_SHORT_5_6_5",value:33635,description:" "},t.FRAGMENT_SHADER={name:"FRAGMENT_SHADER",value:35632,description:"Passed to createShader to define a fragment shader."},t.VERTEX_SHADER={name:"VERTEX_SHADER",value:35633,description:"Passed to createShader to define a vertex shader"},t.COMPILE_STATUS={name:"COMPILE_STATUS",value:35713,description:"Passed to getShaderParamter to get the status of the compilation. Returns false if the shader was not compiled. You can then query getShaderInfoLog to find the exact error"},t.DELETE_STATUS={name:"DELETE_STATUS",value:35712,description:"Passed to getShaderParamter to determine if a shader was deleted via deleteShader. Returns true if it was, false otherwise."},t.LINK_STATUS={name:"LINK_STATUS",value:35714,description:"Passed to getProgramParameter after calling linkProgram to determine if a program was linked correctly. Returns false if there were errors. Use getProgramInfoLog to find the exact error."},t.VALIDATE_STATUS={name:"VALIDATE_STATUS",value:35715,description:"Passed to getProgramParameter after calling validateProgram to determine if it is valid. Returns false if errors were found."},t.ATTACHED_SHADERS={name:"ATTACHED_SHADERS",value:35717,description:"Passed to getProgramParameter after calling attachShader to determine if the shader was attached correctly. Returns false if errors occurred."},t.ACTIVE_ATTRIBUTES={name:"ACTIVE_ATTRIBUTES",value:35721,description:"Passed to getProgramParameter to get the number of attributes active in a program."},t.ACTIVE_UNIFORMS={name:"ACTIVE_UNIFORMS",value:35718,description:"Passed to getProgramParamter to get the number of uniforms active in a program."},t.MAX_VERTEX_ATTRIBS={name:"MAX_VERTEX_ATTRIBS",value:34921,description:" "},t.MAX_VERTEX_UNIFORM_VECTORS={name:"MAX_VERTEX_UNIFORM_VECTORS",value:36347,description:" "},t.MAX_VARYING_VECTORS={name:"MAX_VARYING_VECTORS",value:36348,description:" "},t.MAX_COMBINED_TEXTURE_IMAGE_UNITS={name:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",value:35661,description:" "},t.MAX_VERTEX_TEXTURE_IMAGE_UNITS={name:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",value:35660,description:" "},t.MAX_TEXTURE_IMAGE_UNITS={name:"MAX_TEXTURE_IMAGE_UNITS",value:34930,description:"Implementation dependent number of maximum texture units. At least 8."},t.MAX_FRAGMENT_UNIFORM_VECTORS={name:"MAX_FRAGMENT_UNIFORM_VECTORS",value:36349,description:" "},t.SHADER_TYPE={name:"SHADER_TYPE",value:35663,description:" "},t.SHADING_LANGUAGE_VERSION={name:"SHADING_LANGUAGE_VERSION",value:35724,description:" "},t.CURRENT_PROGRAM={name:"CURRENT_PROGRAM",value:35725,description:" "},t.NEVER={name:"NEVER",value:512,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn."},t.ALWAYS={name:"ALWAYS",value:519,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn."},t.LESS={name:"LESS",value:513,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value."},t.EQUAL={name:"EQUAL",value:514,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value."},t.LEQUAL={name:"LEQUAL",value:515,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value."},t.GREATER={name:"GREATER",value:516,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value."},t.GEQUAL={name:"GEQUAL",value:518,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value."},t.NOTEQUAL={name:"NOTEQUAL",value:517,description:"Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value."},t.KEEP={name:"KEEP",value:7680,description:" "},t.REPLACE={name:"REPLACE",value:7681,description:" "},t.INCR={name:"INCR",value:7682,description:" "},t.DECR={name:"DECR",value:7683,description:" "},t.INVERT={name:"INVERT",value:5386,description:" "},t.INCR_WRAP={name:"INCR_WRAP",value:34055,description:" "},t.DECR_WRAP={name:"DECR_WRAP",value:34056,description:" "},t.NEAREST={name:"NEAREST",value:9728,description:" "},t.LINEAR={name:"LINEAR",value:9729,description:" "},t.NEAREST_MIPMAP_NEAREST={name:"NEAREST_MIPMAP_NEAREST",value:9984,description:" "},t.LINEAR_MIPMAP_NEAREST={name:"LINEAR_MIPMAP_NEAREST",value:9985,description:" "},t.NEAREST_MIPMAP_LINEAR={name:"NEAREST_MIPMAP_LINEAR",value:9986,description:" "},t.LINEAR_MIPMAP_LINEAR={name:"LINEAR_MIPMAP_LINEAR",value:9987,description:" "},t.TEXTURE_MAG_FILTER={name:"TEXTURE_MAG_FILTER",value:10240,description:" "},t.TEXTURE_MIN_FILTER={name:"TEXTURE_MIN_FILTER",value:10241,description:" "},t.TEXTURE_WRAP_S={name:"TEXTURE_WRAP_S",value:10242,description:" "},t.TEXTURE_WRAP_T={name:"TEXTURE_WRAP_T",value:10243,description:" "},t.TEXTURE_2D={name:"TEXTURE_2D",value:3553,description:" "},t.TEXTURE={name:"TEXTURE",value:5890,description:" "},t.TEXTURE_CUBE_MAP={name:"TEXTURE_CUBE_MAP",value:34067,description:" "},t.TEXTURE_BINDING_CUBE_MAP={name:"TEXTURE_BINDING_CUBE_MAP",value:34068,description:" "},t.TEXTURE_CUBE_MAP_POSITIVE_X={name:"TEXTURE_CUBE_MAP_POSITIVE_X",value:34069,description:" "},t.TEXTURE_CUBE_MAP_NEGATIVE_X={name:"TEXTURE_CUBE_MAP_NEGATIVE_X",value:34070,description:" "},t.TEXTURE_CUBE_MAP_POSITIVE_Y={name:"TEXTURE_CUBE_MAP_POSITIVE_Y",value:34071,description:" "},t.TEXTURE_CUBE_MAP_NEGATIVE_Y={name:"TEXTURE_CUBE_MAP_NEGATIVE_Y",value:34072,description:" "},t.TEXTURE_CUBE_MAP_POSITIVE_Z={name:"TEXTURE_CUBE_MAP_POSITIVE_Z",value:34073,description:" "},t.TEXTURE_CUBE_MAP_NEGATIVE_Z={name:"TEXTURE_CUBE_MAP_NEGATIVE_Z",value:34074,description:" "},t.MAX_CUBE_MAP_TEXTURE_SIZE={name:"MAX_CUBE_MAP_TEXTURE_SIZE",value:34076,description:" "},t.TEXTURE0={name:"TEXTURE0",value:33984,description:"A texture unit."},t.TEXTURE1={name:"TEXTURE1",value:33985,description:"A texture unit."},t.TEXTURE2={name:"TEXTURE2",value:33986,description:"A texture unit."},t.TEXTURE3={name:"TEXTURE3",value:33987,description:"A texture unit."},t.TEXTURE4={name:"TEXTURE4",value:33988,description:"A texture unit."},t.TEXTURE5={name:"TEXTURE5",value:33989,description:"A texture unit."},t.TEXTURE6={name:"TEXTURE6",value:33990,description:"A texture unit."},t.TEXTURE7={name:"TEXTURE7",value:33991,description:"A texture unit."},t.TEXTURE8={name:"TEXTURE8",value:33992,description:"A texture unit."},t.TEXTURE9={name:"TEXTURE9",value:33993,description:"A texture unit."},t.TEXTURE10={name:"TEXTURE10",value:33994,description:"A texture unit."},t.TEXTURE11={name:"TEXTURE11",value:33995,description:"A texture unit."},t.TEXTURE12={name:"TEXTURE12",value:33996,description:"A texture unit."},t.TEXTURE13={name:"TEXTURE13",value:33997,description:"A texture unit."},t.TEXTURE14={name:"TEXTURE14",value:33998,description:"A texture unit."},t.TEXTURE15={name:"TEXTURE15",value:33999,description:"A texture unit."},t.TEXTURE16={name:"TEXTURE16",value:34e3,description:"A texture unit."},t.TEXTURE17={name:"TEXTURE17",value:34001,description:"A texture unit."},t.TEXTURE18={name:"TEXTURE18",value:34002,description:"A texture unit."},t.TEXTURE19={name:"TEXTURE19",value:34003,description:"A texture unit."},t.TEXTURE20={name:"TEXTURE20",value:34004,description:"A texture unit."},t.TEXTURE21={name:"TEXTURE21",value:34005,description:"A texture unit."},t.TEXTURE22={name:"TEXTURE22",value:34006,description:"A texture unit."},t.TEXTURE23={name:"TEXTURE23",value:34007,description:"A texture unit."},t.TEXTURE24={name:"TEXTURE24",value:34008,description:"A texture unit."},t.TEXTURE25={name:"TEXTURE25",value:34009,description:"A texture unit."},t.TEXTURE26={name:"TEXTURE26",value:34010,description:"A texture unit."},t.TEXTURE27={name:"TEXTURE27",value:34011,description:"A texture unit."},t.TEXTURE28={name:"TEXTURE28",value:34012,description:"A texture unit."},t.TEXTURE29={name:"TEXTURE29",value:34013,description:"A texture unit."},t.TEXTURE30={name:"TEXTURE30",value:34014,description:"A texture unit."},t.TEXTURE31={name:"TEXTURE31",value:34015,description:"A texture unit."},t.ACTIVE_TEXTURE={name:"ACTIVE_TEXTURE",value:34016,description:"The current active texture unit."},t.REPEAT={name:"REPEAT",value:10497,description:" "},t.CLAMP_TO_EDGE={name:"CLAMP_TO_EDGE",value:33071,description:" "},t.MIRRORED_REPEAT={name:"MIRRORED_REPEAT",value:33648,description:" "},t.FLOAT_VEC2={name:"FLOAT_VEC2",value:35664,description:" "},t.FLOAT_VEC3={name:"FLOAT_VEC3",value:35665,description:" "},t.FLOAT_VEC4={name:"FLOAT_VEC4",value:35666,description:" "},t.INT_VEC2={name:"INT_VEC2",value:35667,description:" "},t.INT_VEC3={name:"INT_VEC3",value:35668,description:" "},t.INT_VEC4={name:"INT_VEC4",value:35669,description:" "},t.BOOL={name:"BOOL",value:35670,description:" "},t.BOOL_VEC2={name:"BOOL_VEC2",value:35671,description:" "},t.BOOL_VEC3={name:"BOOL_VEC3",value:35672,description:" "},t.BOOL_VEC4={name:"BOOL_VEC4",value:35673,description:" "},t.FLOAT_MAT2={name:"FLOAT_MAT2",value:35674,description:" "},t.FLOAT_MAT3={name:"FLOAT_MAT3",value:35675,description:" "},t.FLOAT_MAT4={name:"FLOAT_MAT4",value:35676,description:" "},t.SAMPLER_2D={name:"SAMPLER_2D",value:35678,description:" "},t.SAMPLER_CUBE={name:"SAMPLER_CUBE",value:35680,description:" "},t.LOW_FLOAT={name:"LOW_FLOAT",value:36336,description:" "},t.MEDIUM_FLOAT={name:"MEDIUM_FLOAT",value:36337,description:" "},t.HIGH_FLOAT={name:"HIGH_FLOAT",value:36338,description:" "},t.LOW_INT={name:"LOW_INT",value:36339,description:" "},t.MEDIUM_INT={name:"MEDIUM_INT",value:36340,description:" "},t.HIGH_INT={name:"HIGH_INT",value:36341,description:" "},t.FRAMEBUFFER={name:"FRAMEBUFFER",value:36160,description:" "},t.RENDERBUFFER={name:"RENDERBUFFER",value:36161,description:" "},t.RGBA4={name:"RGBA4",value:32854,description:" "},t.RGB5_A1={name:"RGB5_A1",value:32855,description:" "},t.RGB565={name:"RGB565",value:36194,description:" "},t.DEPTH_COMPONENT16={name:"DEPTH_COMPONENT16",value:33189,description:" "},t.STENCIL_INDEX={name:"STENCIL_INDEX",value:6401,description:" "},t.STENCIL_INDEX8={name:"STENCIL_INDEX8",value:36168,description:" "},t.DEPTH_STENCIL={name:"DEPTH_STENCIL",value:34041,description:" "},t.RENDERBUFFER_WIDTH={name:"RENDERBUFFER_WIDTH",value:36162,description:" "},t.RENDERBUFFER_HEIGHT={name:"RENDERBUFFER_HEIGHT",value:36163,description:" "},t.RENDERBUFFER_INTERNAL_FORMAT={name:"RENDERBUFFER_INTERNAL_FORMAT",value:36164,description:" "},t.RENDERBUFFER_RED_SIZE={name:"RENDERBUFFER_RED_SIZE",value:36176,description:" "},t.RENDERBUFFER_GREEN_SIZE={name:"RENDERBUFFER_GREEN_SIZE",value:36177,description:" "},t.RENDERBUFFER_BLUE_SIZE={name:"RENDERBUFFER_BLUE_SIZE",value:36178,description:" "},t.RENDERBUFFER_ALPHA_SIZE={name:"RENDERBUFFER_ALPHA_SIZE",value:36179,description:" "},t.RENDERBUFFER_DEPTH_SIZE={name:"RENDERBUFFER_DEPTH_SIZE",value:36180,description:" "},t.RENDERBUFFER_STENCIL_SIZE={name:"RENDERBUFFER_STENCIL_SIZE",value:36181,description:" "},t.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE={name:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",value:36048,description:" "},t.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME={name:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",value:36049,description:" "},t.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL={name:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",value:36050,description:" "},t.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE={name:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",value:36051,description:" "},t.COLOR_ATTACHMENT0={name:"COLOR_ATTACHMENT0",value:36064,description:" "},t.DEPTH_ATTACHMENT={name:"DEPTH_ATTACHMENT",value:36096,description:" "},t.STENCIL_ATTACHMENT={name:"STENCIL_ATTACHMENT",value:36128,description:" "},t.DEPTH_STENCIL_ATTACHMENT={name:"DEPTH_STENCIL_ATTACHMENT",value:33306,description:" "},t.NONE={name:"NONE",value:0,description:" "},t.FRAMEBUFFER_COMPLETE={name:"FRAMEBUFFER_COMPLETE",value:36053,description:" "},t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT={name:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",value:36054,description:" "},t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT={name:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",value:36055,description:" "},t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS={name:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",value:36057,description:" "},t.FRAMEBUFFER_UNSUPPORTED={name:"FRAMEBUFFER_UNSUPPORTED",value:36061,description:" "},t.FRAMEBUFFER_BINDING={name:"FRAMEBUFFER_BINDING",value:36006,description:" "},t.RENDERBUFFER_BINDING={name:"RENDERBUFFER_BINDING",value:36007,description:" "},t.MAX_RENDERBUFFER_SIZE={name:"MAX_RENDERBUFFER_SIZE",value:34024,description:" "},t.INVALID_FRAMEBUFFER_OPERATION={name:"INVALID_FRAMEBUFFER_OPERATION",value:1286,description:" "},t.UNPACK_FLIP_Y_WEBGL={name:"UNPACK_FLIP_Y_WEBGL",value:37440,description:" "},t.UNPACK_PREMULTIPLY_ALPHA_WEBGL={name:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",value:37441,description:" "},t.UNPACK_COLORSPACE_CONVERSION_WEBGL={name:"UNPACK_COLORSPACE_CONVERSION_WEBGL",value:37443,description:" "},t.READ_BUFFER={name:"READ_BUFFER",value:3074,description:" "},t.UNPACK_ROW_LENGTH={name:"UNPACK_ROW_LENGTH",value:3314,description:" "},t.UNPACK_SKIP_ROWS={name:"UNPACK_SKIP_ROWS",value:3315,description:" "},t.UNPACK_SKIP_PIXELS={name:"UNPACK_SKIP_PIXELS",value:3316,description:" "},t.PACK_ROW_LENGTH={name:"PACK_ROW_LENGTH",value:3330,description:" "},t.PACK_SKIP_ROWS={name:"PACK_SKIP_ROWS",value:3331,description:" "},t.PACK_SKIP_PIXELS={name:"PACK_SKIP_PIXELS",value:3332,description:" "},t.TEXTURE_BINDING_3D={name:"TEXTURE_BINDING_3D",value:32874,description:" "},t.UNPACK_SKIP_IMAGES={name:"UNPACK_SKIP_IMAGES",value:32877,description:" "},t.UNPACK_IMAGE_HEIGHT={name:"UNPACK_IMAGE_HEIGHT",value:32878,description:" "},t.MAX_3D_TEXTURE_SIZE={name:"MAX_3D_TEXTURE_SIZE",value:32883,description:" "},t.MAX_ELEMENTS_VERTICES={name:"MAX_ELEMENTS_VERTICES",value:33e3,description:" "},t.MAX_ELEMENTS_INDICES={name:"MAX_ELEMENTS_INDICES",value:33001,description:" "},t.MAX_TEXTURE_LOD_BIAS={name:"MAX_TEXTURE_LOD_BIAS",value:34045,description:" "},t.MAX_FRAGMENT_UNIFORM_COMPONENTS={name:"MAX_FRAGMENT_UNIFORM_COMPONENTS",value:35657,description:" "},t.MAX_VERTEX_UNIFORM_COMPONENTS={name:"MAX_VERTEX_UNIFORM_COMPONENTS",value:35658,description:" "},t.MAX_ARRAY_TEXTURE_LAYERS={name:"MAX_ARRAY_TEXTURE_LAYERS",value:35071,description:" "},t.MIN_PROGRAM_TEXEL_OFFSET={name:"MIN_PROGRAM_TEXEL_OFFSET",value:35076,description:" "},t.MAX_PROGRAM_TEXEL_OFFSET={name:"MAX_PROGRAM_TEXEL_OFFSET",value:35077,description:" "},t.MAX_VARYING_COMPONENTS={name:"MAX_VARYING_COMPONENTS",value:35659,description:" "},t.FRAGMENT_SHADER_DERIVATIVE_HINT={name:"FRAGMENT_SHADER_DERIVATIVE_HINT",value:35723,description:" "},t.RASTERIZER_DISCARD={name:"RASTERIZER_DISCARD",value:35977,description:" "},t.VERTEX_ARRAY_BINDING={name:"VERTEX_ARRAY_BINDING",value:34229,description:" "},t.MAX_VERTEX_OUTPUT_COMPONENTS={name:"MAX_VERTEX_OUTPUT_COMPONENTS",value:37154,description:" "},t.MAX_FRAGMENT_INPUT_COMPONENTS={name:"MAX_FRAGMENT_INPUT_COMPONENTS",value:37157,description:" "},t.MAX_SERVER_WAIT_TIMEOUT={name:"MAX_SERVER_WAIT_TIMEOUT",value:37137,description:" "},t.MAX_ELEMENT_INDEX={name:"MAX_ELEMENT_INDEX",value:36203,description:" "},t.RED={name:"RED",value:6403,description:" "},t.RGB8={name:"RGB8",value:32849,description:" "},t.RGBA8={name:"RGBA8",value:32856,description:" "},t.RGB10_A2={name:"RGB10_A2",value:32857,description:" "},t.TEXTURE_3D={name:"TEXTURE_3D",value:32879,description:" "},t.TEXTURE_WRAP_R={name:"TEXTURE_WRAP_R",value:32882,description:" "},t.TEXTURE_MIN_LOD={name:"TEXTURE_MIN_LOD",value:33082,description:" "},t.TEXTURE_MAX_LOD={name:"TEXTURE_MAX_LOD",value:33083,description:" "},t.TEXTURE_BASE_LEVEL={name:"TEXTURE_BASE_LEVEL",value:33084,description:" "},t.TEXTURE_MAX_LEVEL={name:"TEXTURE_MAX_LEVEL",value:33085,description:" "},t.TEXTURE_COMPARE_MODE={name:"TEXTURE_COMPARE_MODE",value:34892,description:" "},t.TEXTURE_COMPARE_FUNC={name:"TEXTURE_COMPARE_FUNC",value:34893,description:" "},t.SRGB={name:"SRGB",value:35904,description:" "},t.SRGB8={name:"SRGB8",value:35905,description:" "},t.SRGB8_ALPHA8={name:"SRGB8_ALPHA8",value:35907,description:" "},t.COMPARE_REF_TO_TEXTURE={name:"COMPARE_REF_TO_TEXTURE",value:34894,description:" "},t.RGBA32F={name:"RGBA32F",value:34836,description:" "},t.RGB32F={name:"RGB32F",value:34837,description:" "},t.RGBA16F={name:"RGBA16F",value:34842,description:" "},t.RGB16F={name:"RGB16F",value:34843,description:" "},t.TEXTURE_2D_ARRAY={name:"TEXTURE_2D_ARRAY",value:35866,description:" "},t.TEXTURE_BINDING_2D_ARRAY={name:"TEXTURE_BINDING_2D_ARRAY",value:35869,description:" "},t.R11F_G11F_B10F={name:"R11F_G11F_B10F",value:35898,description:" "},t.RGB9_E5={name:"RGB9_E5",value:35901,description:" "},t.RGBA32UI={name:"RGBA32UI",value:36208,description:" "},t.RGB32UI={name:"RGB32UI",value:36209,description:" "},t.RGBA16UI={name:"RGBA16UI",value:36214,description:" "},t.RGB16UI={name:"RGB16UI",value:36215,description:" "},t.RGBA8UI={name:"RGBA8UI",value:36220,description:" "},t.RGB8UI={name:"RGB8UI",value:36221,description:" "},t.RGBA32I={name:"RGBA32I",value:36226,description:" "},t.RGB32I={name:"RGB32I",value:36227,description:" "},t.RGBA16I={name:"RGBA16I",value:36232,description:" "},t.RGB16I={name:"RGB16I",value:36233,description:" "},t.RGBA8I={name:"RGBA8I",value:36238,description:" "},t.RGB8I={name:"RGB8I",value:36239,description:" "},t.RED_INTEGER={name:"RED_INTEGER",value:36244,description:" "},t.RGB_INTEGER={name:"RGB_INTEGER",value:36248,description:" "},t.RGBA_INTEGER={name:"RGBA_INTEGER",value:36249,description:" "},t.R8={name:"R8",value:33321,description:" "},t.RG8={name:"RG8",value:33323,description:" "},t.R16F={name:"R16F",value:33325,description:" "},t.R32F={name:"R32F",value:33326,description:" "},t.RG16F={name:"RG16F",value:33327,description:" "},t.RG32F={name:"RG32F",value:33328,description:" "},t.R8I={name:"R8I",value:33329,description:" "},t.R8UI={name:"R8UI",value:33330,description:" "},t.R16I={name:"R16I",value:33331,description:" "},t.R16UI={name:"R16UI",value:33332,description:" "},t.R32I={name:"R32I",value:33333,description:" "},t.R32UI={name:"R32UI",value:33334,description:" "},t.RG8I={name:"RG8I",value:33335,description:" "},t.RG8UI={name:"RG8UI",value:33336,description:" "},t.RG16I={name:"RG16I",value:33337,description:" "},t.RG16UI={name:"RG16UI",value:33338,description:" "},t.RG32I={name:"RG32I",value:33339,description:" "},t.RG32UI={name:"RG32UI",value:33340,description:" "},t.R8_SNORM={name:"R8_SNORM",value:36756,description:" "},t.RG8_SNORM={name:"RG8_SNORM",value:36757,description:" "},t.RGB8_SNORM={name:"RGB8_SNORM",value:36758,description:" "},t.RGBA8_SNORM={name:"RGBA8_SNORM",value:36759,description:" "},t.RGB10_A2UI={name:"RGB10_A2UI",value:36975,description:" "},t.TEXTURE_IMMUTABLE_FORMAT={name:"TEXTURE_IMMUTABLE_FORMAT",value:37167,description:" "},t.TEXTURE_IMMUTABLE_LEVELS={name:"TEXTURE_IMMUTABLE_LEVELS",value:33503,description:" "},t.UNSIGNED_INT_2_10_10_10_REV={name:"UNSIGNED_INT_2_10_10_10_REV",value:33640,description:" "},t.UNSIGNED_INT_10F_11F_11F_REV={name:"UNSIGNED_INT_10F_11F_11F_REV",value:35899,description:" "},t.UNSIGNED_INT_5_9_9_9_REV={name:"UNSIGNED_INT_5_9_9_9_REV",value:35902,description:" "},t.FLOAT_32_UNSIGNED_INT_24_8_REV={name:"FLOAT_32_UNSIGNED_INT_24_8_REV",value:36269,description:" "},t.UNSIGNED_INT_24_8={name:"UNSIGNED_INT_24_8",value:34042,description:" "},t.HALF_FLOAT={name:"HALF_FLOAT",value:5131,description:" "},t.RG={name:"RG",value:33319,description:" "},t.RG_INTEGER={name:"RG_INTEGER",value:33320,description:" "},t.INT_2_10_10_10_REV={name:"INT_2_10_10_10_REV",value:36255,description:" "},t.CURRENT_QUERY={name:"CURRENT_QUERY",value:34917,description:" "},t.QUERY_RESULT={name:"QUERY_RESULT",value:34918,description:" "},t.QUERY_RESULT_AVAILABLE={name:"QUERY_RESULT_AVAILABLE",value:34919,description:" "},t.ANY_SAMPLES_PASSED={name:"ANY_SAMPLES_PASSED",value:35887,description:" "},t.ANY_SAMPLES_PASSED_CONSERVATIVE={name:"ANY_SAMPLES_PASSED_CONSERVATIVE",value:36202,description:" "},t.MAX_DRAW_BUFFERS={name:"MAX_DRAW_BUFFERS",value:34852,description:" "},t.DRAW_BUFFER0={name:"DRAW_BUFFER0",value:34853,description:" "},t.DRAW_BUFFER1={name:"DRAW_BUFFER1",value:34854,description:" "},t.DRAW_BUFFER2={name:"DRAW_BUFFER2",value:34855,description:" "},t.DRAW_BUFFER3={name:"DRAW_BUFFER3",value:34856,description:" "},t.DRAW_BUFFER4={name:"DRAW_BUFFER4",value:34857,description:" "},t.DRAW_BUFFER5={name:"DRAW_BUFFER5",value:34858,description:" "},t.DRAW_BUFFER6={name:"DRAW_BUFFER6",value:34859,description:" "},t.DRAW_BUFFER7={name:"DRAW_BUFFER7",value:34860,description:" "},t.DRAW_BUFFER8={name:"DRAW_BUFFER8",value:34861,description:" "},t.DRAW_BUFFER9={name:"DRAW_BUFFER9",value:34862,description:" "},t.DRAW_BUFFER10={name:"DRAW_BUFFER10",value:34863,description:" "},t.DRAW_BUFFER11={name:"DRAW_BUFFER11",value:34864,description:" "},t.DRAW_BUFFER12={name:"DRAW_BUFFER12",value:34865,description:" "},t.DRAW_BUFFER13={name:"DRAW_BUFFER13",value:34866,description:" "},t.DRAW_BUFFER14={name:"DRAW_BUFFER14",value:34867,description:" "},t.DRAW_BUFFER15={name:"DRAW_BUFFER15",value:34868,description:" "},t.MAX_COLOR_ATTACHMENTS={name:"MAX_COLOR_ATTACHMENTS",value:36063,description:" "},t.COLOR_ATTACHMENT1={name:"COLOR_ATTACHMENT1",value:36065,description:" "},t.COLOR_ATTACHMENT2={name:"COLOR_ATTACHMENT2",value:36066,description:" "},t.COLOR_ATTACHMENT3={name:"COLOR_ATTACHMENT3",value:36067,description:" "},t.COLOR_ATTACHMENT4={name:"COLOR_ATTACHMENT4",value:36068,description:" "},t.COLOR_ATTACHMENT5={name:"COLOR_ATTACHMENT5",value:36069,description:" "},t.COLOR_ATTACHMENT6={name:"COLOR_ATTACHMENT6",value:36070,description:" "},t.COLOR_ATTACHMENT7={name:"COLOR_ATTACHMENT7",value:36071,description:" "},t.COLOR_ATTACHMENT8={name:"COLOR_ATTACHMENT8",value:36072,description:" "},t.COLOR_ATTACHMENT9={name:"COLOR_ATTACHMENT9",value:36073,description:" "},t.COLOR_ATTACHMENT10={name:"COLOR_ATTACHMENT10",value:36074,description:" "},t.COLOR_ATTACHMENT11={name:"COLOR_ATTACHMENT11",value:36075,description:" "},t.COLOR_ATTACHMENT12={name:"COLOR_ATTACHMENT12",value:36076,description:" "},t.COLOR_ATTACHMENT13={name:"COLOR_ATTACHMENT13",value:36077,description:" "},t.COLOR_ATTACHMENT14={name:"COLOR_ATTACHMENT14",value:36078,description:" "},t.COLOR_ATTACHMENT15={name:"COLOR_ATTACHMENT15",value:36079,description:" "},t.SAMPLER_3D={name:"SAMPLER_3D",value:35679,description:" "},t.SAMPLER_2D_SHADOW={name:"SAMPLER_2D_SHADOW",value:35682,description:" "},t.SAMPLER_2D_ARRAY={name:"SAMPLER_2D_ARRAY",value:36289,description:" "},t.SAMPLER_2D_ARRAY_SHADOW={name:"SAMPLER_2D_ARRAY_SHADOW",value:36292,description:" "},t.SAMPLER_CUBE_SHADOW={name:"SAMPLER_CUBE_SHADOW",value:36293,description:" "},t.INT_SAMPLER_2D={name:"INT_SAMPLER_2D",value:36298,description:" "},t.INT_SAMPLER_3D={name:"INT_SAMPLER_3D",value:36299,description:" "},t.INT_SAMPLER_CUBE={name:"INT_SAMPLER_CUBE",value:36300,description:" "},t.INT_SAMPLER_2D_ARRAY={name:"INT_SAMPLER_2D_ARRAY",value:36303,description:" "},t.UNSIGNED_INT_SAMPLER_2D={name:"UNSIGNED_INT_SAMPLER_2D",value:36306,description:" "},t.UNSIGNED_INT_SAMPLER_3D={name:"UNSIGNED_INT_SAMPLER_3D",value:36307,description:" "},t.UNSIGNED_INT_SAMPLER_CUBE={name:"UNSIGNED_INT_SAMPLER_CUBE",value:36308,description:" "},t.UNSIGNED_INT_SAMPLER_2D_ARRAY={name:"UNSIGNED_INT_SAMPLER_2D_ARRAY",value:36311,description:" "},t.MAX_SAMPLES={name:"MAX_SAMPLES",value:36183,description:" "},t.SAMPLER_BINDING={name:"SAMPLER_BINDING",value:35097,description:" "},t.PIXEL_PACK_BUFFER={name:"PIXEL_PACK_BUFFER",value:35051,description:" "},t.PIXEL_UNPACK_BUFFER={name:"PIXEL_UNPACK_BUFFER",value:35052,description:" "},t.PIXEL_PACK_BUFFER_BINDING={name:"PIXEL_PACK_BUFFER_BINDING",value:35053,description:" "},t.PIXEL_UNPACK_BUFFER_BINDING={name:"PIXEL_UNPACK_BUFFER_BINDING",value:35055,description:" "},t.COPY_READ_BUFFER={name:"COPY_READ_BUFFER",value:36662,description:" "},t.COPY_WRITE_BUFFER={name:"COPY_WRITE_BUFFER",value:36663,description:" "},t.COPY_READ_BUFFER_BINDING={name:"COPY_READ_BUFFER_BINDING",value:36662,description:" "},t.COPY_WRITE_BUFFER_BINDING={name:"COPY_WRITE_BUFFER_BINDING",value:36663,description:" "},t.FLOAT_MAT2x3={name:"FLOAT_MAT2x3",value:35685,description:" "},t.FLOAT_MAT2x4={name:"FLOAT_MAT2x4",value:35686,description:" "},t.FLOAT_MAT3x2={name:"FLOAT_MAT3x2",value:35687,description:" "},t.FLOAT_MAT3x4={name:"FLOAT_MAT3x4",value:35688,description:" "},t.FLOAT_MAT4x2={name:"FLOAT_MAT4x2",value:35689,description:" "},t.FLOAT_MAT4x3={name:"FLOAT_MAT4x3",value:35690,description:" "},t.UNSIGNED_INT_VEC2={name:"UNSIGNED_INT_VEC2",value:36294,description:" "},t.UNSIGNED_INT_VEC3={name:"UNSIGNED_INT_VEC3",value:36295,description:" "},t.UNSIGNED_INT_VEC4={name:"UNSIGNED_INT_VEC4",value:36296,description:" "},t.UNSIGNED_NORMALIZED={name:"UNSIGNED_NORMALIZED",value:35863,description:" "},t.SIGNED_NORMALIZED={name:"SIGNED_NORMALIZED",value:36764,description:" "},t.VERTEX_ATTRIB_ARRAY_INTEGER={name:"VERTEX_ATTRIB_ARRAY_INTEGER",value:35069,description:" "},t.VERTEX_ATTRIB_ARRAY_DIVISOR={name:"VERTEX_ATTRIB_ARRAY_DIVISOR",value:35070,description:" "},t.TRANSFORM_FEEDBACK_BUFFER_MODE={name:"TRANSFORM_FEEDBACK_BUFFER_MODE",value:35967,description:" "},t.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS={name:"MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",value:35968,description:" "},t.TRANSFORM_FEEDBACK_VARYINGS={name:"TRANSFORM_FEEDBACK_VARYINGS",value:35971,description:" "},t.TRANSFORM_FEEDBACK_BUFFER_START={name:"TRANSFORM_FEEDBACK_BUFFER_START",value:35972,description:" "},t.TRANSFORM_FEEDBACK_BUFFER_SIZE={name:"TRANSFORM_FEEDBACK_BUFFER_SIZE",value:35973,description:" "},t.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN={name:"TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",value:35976,description:" "},t.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS={name:"MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",value:35978,description:" "},t.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS={name:"MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",value:35979,description:" "},t.INTERLEAVED_ATTRIBS={name:"INTERLEAVED_ATTRIBS",value:35980,description:" "},t.SEPARATE_ATTRIBS={name:"SEPARATE_ATTRIBS",value:35981,description:" "},t.TRANSFORM_FEEDBACK_BUFFER={name:"TRANSFORM_FEEDBACK_BUFFER",value:35982,description:" "},t.TRANSFORM_FEEDBACK_BUFFER_BINDING={name:"TRANSFORM_FEEDBACK_BUFFER_BINDING",value:35983,description:" "},t.TRANSFORM_FEEDBACK={name:"TRANSFORM_FEEDBACK",value:36386,description:" "},t.TRANSFORM_FEEDBACK_PAUSED={name:"TRANSFORM_FEEDBACK_PAUSED",value:36387,description:" "},t.TRANSFORM_FEEDBACK_ACTIVE={name:"TRANSFORM_FEEDBACK_ACTIVE",value:36388,description:" "},t.TRANSFORM_FEEDBACK_BINDING={name:"TRANSFORM_FEEDBACK_BINDING",value:36389,description:" "},t.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING={name:"FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING",value:33296,description:" "},t.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE={name:"FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE",value:33297,description:" "},t.FRAMEBUFFER_ATTACHMENT_RED_SIZE={name:"FRAMEBUFFER_ATTACHMENT_RED_SIZE",value:33298,description:" "},t.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE={name:"FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",value:33299,description:" "},t.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE={name:"FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",value:33300,description:" "},t.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE={name:"FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",value:33301,description:" "},t.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE={name:"FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",value:33302,description:" "},t.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE={name:"FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",value:33303,description:" "},t.FRAMEBUFFER_DEFAULT={name:"FRAMEBUFFER_DEFAULT",value:33304,description:" "},t.DEPTH24_STENCIL8={name:"DEPTH24_STENCIL8",value:35056,description:" "},t.DRAW_FRAMEBUFFER_BINDING={name:"DRAW_FRAMEBUFFER_BINDING",value:36006,description:" "},t.READ_FRAMEBUFFER={name:"READ_FRAMEBUFFER",value:36008,description:" "},t.DRAW_FRAMEBUFFER={name:"DRAW_FRAMEBUFFER",value:36009,description:" "},t.READ_FRAMEBUFFER_BINDING={name:"READ_FRAMEBUFFER_BINDING",value:36010,description:" "},t.RENDERBUFFER_SAMPLES={name:"RENDERBUFFER_SAMPLES",value:36011,description:" "},t.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER={name:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER",value:36052,description:" "},t.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE={name:"FRAMEBUFFER_INCOMPLETE_MULTISAMPLE",value:36182,description:" "},t.UNIFORM_BUFFER={name:"UNIFORM_BUFFER",value:35345,description:" "},t.UNIFORM_BUFFER_BINDING={name:"UNIFORM_BUFFER_BINDING",value:35368,description:" "},t.UNIFORM_BUFFER_START={name:"UNIFORM_BUFFER_START",value:35369,description:" "},t.UNIFORM_BUFFER_SIZE={name:"UNIFORM_BUFFER_SIZE",value:35370,description:" "},t.MAX_VERTEX_UNIFORM_BLOCKS={name:"MAX_VERTEX_UNIFORM_BLOCKS",value:35371,description:" "},t.MAX_FRAGMENT_UNIFORM_BLOCKS={name:"MAX_FRAGMENT_UNIFORM_BLOCKS",value:35373,description:" "},t.MAX_COMBINED_UNIFORM_BLOCKS={name:"MAX_COMBINED_UNIFORM_BLOCKS",value:35374,description:" "},t.MAX_UNIFORM_BUFFER_BINDINGS={name:"MAX_UNIFORM_BUFFER_BINDINGS",value:35375,description:" "},t.MAX_UNIFORM_BLOCK_SIZE={name:"MAX_UNIFORM_BLOCK_SIZE",value:35376,description:" "},t.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS={name:"MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",value:35377,description:" "},t.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS={name:"MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",value:35379,description:" "},t.UNIFORM_BUFFER_OFFSET_ALIGNMENT={name:"UNIFORM_BUFFER_OFFSET_ALIGNMENT",value:35380,description:" "},t.ACTIVE_UNIFORM_BLOCKS={name:"ACTIVE_UNIFORM_BLOCKS",value:35382,description:" "},t.UNIFORM_TYPE={name:"UNIFORM_TYPE",value:35383,description:" "},t.UNIFORM_SIZE={name:"UNIFORM_SIZE",value:35384,description:" "},t.UNIFORM_BLOCK_INDEX={name:"UNIFORM_BLOCK_INDEX",value:35386,description:" "},t.UNIFORM_OFFSET={name:"UNIFORM_OFFSET",value:35387,description:" "},t.UNIFORM_ARRAY_STRIDE={name:"UNIFORM_ARRAY_STRIDE",value:35388,description:" "},t.UNIFORM_MATRIX_STRIDE={name:"UNIFORM_MATRIX_STRIDE",value:35389,description:" "},t.UNIFORM_IS_ROW_MAJOR={name:"UNIFORM_IS_ROW_MAJOR",value:35390,description:" "},t.UNIFORM_BLOCK_BINDING={name:"UNIFORM_BLOCK_BINDING",value:35391,description:" "},t.UNIFORM_BLOCK_DATA_SIZE={name:"UNIFORM_BLOCK_DATA_SIZE",value:35392,description:" "},t.UNIFORM_BLOCK_ACTIVE_UNIFORMS={name:"UNIFORM_BLOCK_ACTIVE_UNIFORMS",value:35394,description:" "},t.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES={name:"UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",value:35395,description:" "},t.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER={name:"UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",value:35396,description:" "},t.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER={name:"UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",value:35398,description:" "},t.OBJECT_TYPE={name:"OBJECT_TYPE",value:37138,description:" "},t.SYNC_CONDITION={name:"SYNC_CONDITION",value:37139,description:" "},t.SYNC_STATUS={name:"SYNC_STATUS",value:37140,description:" "},t.SYNC_FLAGS={name:"SYNC_FLAGS",value:37141,description:" "},t.SYNC_FENCE={name:"SYNC_FENCE",value:37142,description:" "},t.SYNC_GPU_COMMANDS_COMPLETE={name:"SYNC_GPU_COMMANDS_COMPLETE",value:37143,description:" "},t.UNSIGNALED={name:"UNSIGNALED",value:37144,description:" "},t.SIGNALED={name:"SIGNALED",value:37145,description:" "},t.ALREADY_SIGNALED={name:"ALREADY_SIGNALED",value:37146,description:" "},t.TIMEOUT_EXPIRED={name:"TIMEOUT_EXPIRED",value:37147,description:" "},t.CONDITION_SATISFIED={name:"CONDITION_SATISFIED",value:37148,description:" "},t.WAIT_FAILED={name:"WAIT_FAILED",value:37149,description:" "},t.SYNC_FLUSH_COMMANDS_BIT={name:"SYNC_FLUSH_COMMANDS_BIT",value:1,description:" "},t.COLOR={name:"COLOR",value:6144,description:" "},t.DEPTH={name:"DEPTH",value:6145,description:" "},t.STENCIL={name:"STENCIL",value:6146,description:" "},t.MIN={name:"MIN",value:32775,description:" "},t.MAX={name:"MAX",value:32776,description:" "},t.DEPTH_COMPONENT24={name:"DEPTH_COMPONENT24",value:33190,description:" "},t.STREAM_READ={name:"STREAM_READ",value:35041,description:" "},t.STREAM_COPY={name:"STREAM_COPY",value:35042,description:" "},t.STATIC_READ={name:"STATIC_READ",value:35045,description:" "},t.STATIC_COPY={name:"STATIC_COPY",value:35046,description:" "},t.DYNAMIC_READ={name:"DYNAMIC_READ",value:35049,description:" "},t.DYNAMIC_COPY={name:"DYNAMIC_COPY",value:35050,description:" "},t.DEPTH_COMPONENT32F={name:"DEPTH_COMPONENT32F",value:36012,description:" "},t.DEPTH32F_STENCIL8={name:"DEPTH32F_STENCIL8",value:36013,description:" "},t.INVALID_INDEX={name:"INVALID_INDEX",value:4294967295,description:" "},t.TIMEOUT_IGNORED={name:"TIMEOUT_IGNORED",value:-1,description:" "},t.MAX_CLIENT_WAIT_TIMEOUT_WEBGL={name:"MAX_CLIENT_WAIT_TIMEOUT_WEBGL",value:37447,description:" "},t.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE={name:"VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE",value:35070,description:"Describes the frequency divisor used for instanced rendering.",extensionName:"ANGLE_instanced_arrays"},t.UNMASKED_VENDOR_WEBGL={name:"UNMASKED_VENDOR_WEBGL",value:37445,description:"Passed to getParameter to get the vendor string of the graphics driver.",extensionName:"ANGLE_instanced_arrays"},t.UNMASKED_RENDERER_WEBGL={name:"UNMASKED_RENDERER_WEBGL",value:37446,description:"Passed to getParameter to get the renderer string of the graphics driver.",extensionName:"WEBGL_debug_renderer_info"},t.MAX_TEXTURE_MAX_ANISOTROPY_EXT={name:"MAX_TEXTURE_MAX_ANISOTROPY_EXT",value:34047,description:"Returns the maximum available anisotropy.",extensionName:"EXT_texture_filter_anisotropic"},t.TEXTURE_MAX_ANISOTROPY_EXT={name:"TEXTURE_MAX_ANISOTROPY_EXT",value:34046,description:"Passed to texParameter to set the desired maximum anisotropy for a texture.",extensionName:"EXT_texture_filter_anisotropic"},t.COMPRESSED_RGB_S3TC_DXT1_EXT={name:"COMPRESSED_RGB_S3TC_DXT1_EXT",value:33776,description:"A DXT1-compressed image in an RGB image format.",extensionName:"WEBGL_compressed_texture_s3tc"},t.COMPRESSED_RGBA_S3TC_DXT1_EXT={name:"COMPRESSED_RGBA_S3TC_DXT1_EXT",value:33777,description:"A DXT1-compressed image in an RGB image format with a simple on/off alpha value.",extensionName:"WEBGL_compressed_texture_s3tc"},t.COMPRESSED_RGBA_S3TC_DXT3_EXT={name:"COMPRESSED_RGBA_S3TC_DXT3_EXT",value:33778,description:"A DXT3-compressed image in an RGBA image format. Compared to a 32-bit RGBA texture, it offers 4:1 compression.",extensionName:"WEBGL_compressed_texture_s3tc"},t.COMPRESSED_RGBA_S3TC_DXT5_EXT={name:"COMPRESSED_RGBA_S3TC_DXT5_EXT",value:33779,description:"A DXT5-compressed image in an RGBA image format. It also provides a 4:1 compression, but differs to the DXT3 compression in how the alpha compression is done.",extensionName:"WEBGL_compressed_texture_s3tc"},t.COMPRESSED_R11_EAC={name:"COMPRESSED_R11_EAC",value:37488,description:"One-channel (red) unsigned format compression.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_SIGNED_R11_EAC={name:"COMPRESSED_SIGNED_R11_EAC",value:37489,description:"One-channel (red) signed format compression.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_RG11_EAC={name:"COMPRESSED_RG11_EAC",value:37490,description:"Two-channel (red and green) unsigned format compression.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_SIGNED_RG11_EAC={name:"COMPRESSED_SIGNED_RG11_EAC",value:37491,description:"Two-channel (red and green) signed format compression.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_RGB8_ETC2={name:"COMPRESSED_RGB8_ETC2",value:37492,description:"Compresses RBG8 data with no alpha channel.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_RGBA8_ETC2_EAC={name:"COMPRESSED_RGBA8_ETC2_EAC",value:37493,description:"Compresses RGBA8 data. The RGB part is encoded the same as RGB_ETC2, but the alpha part is encoded separately.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_SRGB8_ETC2={name:"COMPRESSED_SRGB8_ETC2",value:37494,description:"Compresses sRBG8 data with no alpha channel.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC={name:"COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",value:37495,description:"Compresses sRGBA8 data. The sRGB part is encoded the same as SRGB_ETC2, but the alpha part is encoded separately.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2={name:"COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",value:37496,description:"Similar to RGB8_ETC, but with ability to punch through the alpha channel, which means to make it completely opaque or transparent.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2={name:"COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",value:37497,description:"Similar to SRGB8_ETC, but with ability to punch through the alpha channel, which means to make it completely opaque or transparent.",extensionName:"WEBGL_compressed_texture_etc"},t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG={name:"COMPRESSED_RGB_PVRTC_4BPPV1_IMG",value:35840,description:"RGB compression in 4-bit mode. One block for each 4×4 pixels.",extensionName:"WEBGL_compressed_texture_pvrtc"},t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG={name:"COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",value:35842,description:"RGBA compression in 4-bit mode. One block for each 4×4 pixels.",extensionName:"WEBGL_compressed_texture_pvrtc"},t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG={name:"COMPRESSED_RGB_PVRTC_2BPPV1_IMG",value:35841,description:"RGB compression in 2-bit mode. One block for each 8×4 pixels.",extensionName:"WEBGL_compressed_texture_pvrtc"},t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG={name:"COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",value:35843,description:"RGBA compression in 2-bit mode. One block for each 8×4 pixe",extensionName:"WEBGL_compressed_texture_pvrtc"},t.COMPRESSED_RGB_ETC1_WEBGL={name:"COMPRESSED_RGB_ETC1_WEBGL",value:36196,description:"Compresses 24-bit RGB data with no alpha channel.",extensionName:"WEBGL_compressed_texture_etc1"},t.COMPRESSED_RGB_ATC_WEBGL={name:"COMPRESSED_RGB_ATC_WEBGL",value:35986,description:"Compresses RGB textures with no alpha channel.",extensionName:"WEBGL_compressed_texture_atc"},t.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL={name:"COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",value:35986,description:"Compresses RGBA textures using explicit alpha encoding (useful when alpha transitions are sharp).",extensionName:"WEBGL_compressed_texture_atc"},t.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL={name:"COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",value:34798,description:"Compresses RGBA textures using interpolated alpha encoding (useful when alpha transitions are gradient).",extensionName:"WEBGL_compressed_texture_atc"},t.UNSIGNED_INT_24_8_WEBGL={name:"UNSIGNED_INT_24_8_WEBGL",value:34042,description:"Unsigned integer type for 24-bit depth texture data.",extensionName:"WEBGL_depth_texture"},t.HALF_FLOAT_OES={name:"HALF_FLOAT_OES",value:36193,description:"Half floating-point type (16-bit).",extensionName:"OES_texture_half_float"},t.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT={name:"FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT",value:33297,description:" ",extensionName:"WEBGL_color_buffer_float"},t.UNSIGNED_NORMALIZED_EXT={name:"UNSIGNED_NORMALIZED_EXT",value:35863,description:" ",extensionName:"WEBGL_color_buffer_float"},t.MIN_EXT={name:"MIN_EXT",value:32775,description:"Produces the minimum color components of the source and destination colors.",extensionName:"EXT_blend_minmax"},t.MAX_EXT={name:"MAX_EXT",value:32776,description:"Produces the maximum color components of the source and destination colors.",extensionName:"EXT_blend_minmax"},t.SRGB_EXT={name:"SRGB_EXT",value:35904,description:"Unsized sRGB format that leaves the precision up to the driver.",extensionName:"EXT_sRGB"},t.SRGB_ALPHA_EXT={name:"SRGB_ALPHA_EXT",value:35906,description:"Unsized sRGB format with unsized alpha component.",extensionName:"EXT_sRGB"},t.SRGB8_ALPHA8_EXT={name:"SRGB8_ALPHA8_EXT",value:35907,description:"Sized (8-bit) sRGB and alpha formats.",extensionName:"EXT_sRGB"},t.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT={name:"FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT",value:33296,description:"Returns the framebuffer color encoding.",extensionName:"EXT_sRGB"},t.FRAGMENT_SHADER_DERIVATIVE_HINT_OES={name:"FRAGMENT_SHADER_DERIVATIVE_HINT_OES",value:35723,description:"Indicates the accuracy of the derivative calculation for the GLSL built-in functions: dFdx, dFdy, and fwidth.",extensionName:"OES_standard_derivatives"},t.COLOR_ATTACHMENT0_WEBGL={name:"COLOR_ATTACHMENT0_WEBGL",value:36064,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT1_WEBGL={name:"COLOR_ATTACHMENT1_WEBGL",value:36065,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT2_WEBGL={name:"COLOR_ATTACHMENT2_WEBGL",value:36066,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT3_WEBGL={name:"COLOR_ATTACHMENT3_WEBGL",value:36067,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT4_WEBGL={name:"COLOR_ATTACHMENT4_WEBGL",value:36068,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT5_WEBGL={name:"COLOR_ATTACHMENT5_WEBGL",value:36069,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT6_WEBGL={name:"COLOR_ATTACHMENT6_WEBGL",value:36070,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT7_WEBGL={name:"COLOR_ATTACHMENT7_WEBGL",value:36071,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT8_WEBGL={name:"COLOR_ATTACHMENT8_WEBGL",value:36072,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT9_WEBGL={name:"COLOR_ATTACHMENT9_WEBGL",value:36073,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT10_WEBGL={name:"COLOR_ATTACHMENT10_WEBGL",value:36074,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT11_WEBGL={name:"COLOR_ATTACHMENT11_WEBGL",value:36075,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT12_WEBGL={name:"COLOR_ATTACHMENT12_WEBGL",value:36076,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT13_WEBGL={name:"COLOR_ATTACHMENT13_WEBGL",value:36077,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT14_WEBGL={name:"COLOR_ATTACHMENT14_WEBGL",value:36078,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.COLOR_ATTACHMENT15_WEBGL={name:"COLOR_ATTACHMENT15_WEBGL",value:36079,description:"Framebuffer color attachment point",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER0_WEBGL={name:"DRAW_BUFFER0_WEBGL",value:34853,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER1_WEBGL={name:"DRAW_BUFFER1_WEBGL",value:34854,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER2_WEBGL={name:"DRAW_BUFFER2_WEBGL",value:34855,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER3_WEBGL={name:"DRAW_BUFFER3_WEBGL",value:34856,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER4_WEBGL={name:"DRAW_BUFFER4_WEBGL",value:34857,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER5_WEBGL={name:"DRAW_BUFFER5_WEBGL",value:34858,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER6_WEBGL={name:"DRAW_BUFFER6_WEBGL",value:34859,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER7_WEBGL={name:"DRAW_BUFFER7_WEBGL",value:34860,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER8_WEBGL={name:"DRAW_BUFFER8_WEBGL",value:34861,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER9_WEBGL={name:"DRAW_BUFFER9_WEBGL",value:34862,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER10_WEBGL={name:"DRAW_BUFFER10_WEBGL",value:34863,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER11_WEBGL={name:"DRAW_BUFFER11_WEBGL",value:34864,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER12_WEBGL={name:"DRAW_BUFFER12_WEBGL",value:34865,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER13_WEBGL={name:"DRAW_BUFFER13_WEBGL",value:34866,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER14_WEBGL={name:"DRAW_BUFFER14_WEBGL",value:34867,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.DRAW_BUFFER15_WEBGL={name:"DRAW_BUFFER15_WEBGL",value:34868,description:"Draw buffer",extensionName:"WEBGL_draw_buffers"},t.MAX_COLOR_ATTACHMENTS_WEBGL={name:"MAX_COLOR_ATTACHMENTS_WEBGL",value:36063,description:"Maximum number of framebuffer color attachment points",extensionName:"WEBGL_draw_buffers"},t.MAX_DRAW_BUFFERS_WEBGL={name:"MAX_DRAW_BUFFERS_WEBGL",value:34852,description:"Maximum number of draw buffers",extensionName:"WEBGL_draw_buffers"},t.VERTEX_ARRAY_BINDING_OES={name:"VERTEX_ARRAY_BINDING_OES",value:34229,description:"The bound vertex array object (VAO).",extensionName:"VERTEX_ARRAY_BINDING_OES"},t.QUERY_COUNTER_BITS_EXT={name:"QUERY_COUNTER_BITS_EXT",value:34916,description:"The number of bits used to hold the query result for the given target.",extensionName:"EXT_disjoint_timer_query"},t.CURRENT_QUERY_EXT={name:"CURRENT_QUERY_EXT",value:34917,description:"The currently active query.",extensionName:"EXT_disjoint_timer_query"},t.QUERY_RESULT_EXT={name:"QUERY_RESULT_EXT",value:34918,description:"The query result.",extensionName:"EXT_disjoint_timer_query"},t.QUERY_RESULT_AVAILABLE_EXT={name:"QUERY_RESULT_AVAILABLE_EXT",value:34919,description:"A Boolean indicating whether or not a query result is available.",extensionName:"EXT_disjoint_timer_query"},t.TIME_ELAPSED_EXT={name:"TIME_ELAPSED_EXT",value:35007,description:"Elapsed time (in nanoseconds).",extensionName:"EXT_disjoint_timer_query"},t.TIMESTAMP_EXT={name:"TIMESTAMP_EXT",value:36392,description:"The current time.",extensionName:"EXT_disjoint_timer_query"},t.GPU_DISJOINT_EXT={name:"GPU_DISJOINT_EXT",value:36795,description:"A Boolean indicating whether or not the GPU performed any disjoint operation.",extensionName:"EXT_disjoint_timer_query"},t.zeroMeaningByCommand={getError:"NO_ERROR",blendFunc:"ZERO",blendFuncSeparate:"ZERO",readBuffer:"NONE",getFramebufferAttachmentParameter:"NONE",texParameterf:"NONE",texParameteri:"NONE",drawArrays:"POINTS",drawElements:"POINTS",drawArraysInstanced:"POINTS",drawArraysInstancedAngle:"POINTS",drawBuffers:"POINTS",drawElementsInstanced:"POINTS",drawRangeElements:"POINTS"},t.oneMeaningByCommand={blendFunc:"ONE",blendFuncSeparate:"ONE",drawArrays:"LINES",drawElements:"LINES",drawArraysInstanced:"LINES",drawArraysInstancedAngle:"LINES",drawBuffers:"LINES",drawElementsInstanced:"LINES",drawRangeElements:"LINES"},t}(),g={},v={};!function(){for(var t in m)if(m.hasOwnProperty(t)){var e=m[t];g[e.name]=e,v[e.value]=e}}();var y=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return y(e,t),Object.defineProperty(e.prototype,"analyserName",{get:function(){return e.analyserName},enumerable:!1,configurable:!0}),e.prototype.appendToAnalysis=function(t,e){if(t.commands){for(var i={total:0,totalTriangles:0,totalTriangleStrip:0,totalTriangleFan:0,totalLines:0,totalLineStrip:0,totalLineLoop:0,totalPoints:0},n=0,r=t.commands;n<r.length;n++){var s=r[n];"drawArrays"===s.name&&s.commandArguments.length>=3||"drawArraysInstanced"===s.name&&s.commandArguments.length>=3||"drawArraysInstancedANGLE"===s.name&&s.commandArguments.length>=3?this.appendToPrimitives(i,s.commandArguments[0],s.commandArguments[2]):"drawElements"===s.name&&s.commandArguments.length>=2||"drawElementsInstanced"===s.name&&s.commandArguments.length>=2||"drawElementsInstancedANGLE"===s.name&&s.commandArguments.length>=2?this.appendToPrimitives(i,s.commandArguments[0],s.commandArguments[1]):"drawRangeElements"===s.name&&s.commandArguments.length>=4&&this.appendToPrimitives(i,s.commandArguments[0],s.commandArguments[3])}e.total=i.total,e.triangles=i.totalTriangles,e.triangleStrip=i.totalTriangleStrip,e.triangleFan=i.totalTriangleFan,e.lines=i.totalLines,e.lineStrip=i.totalLineStrip,e.lineLoop=i.totalLineLoop,e.points=i.totalPoints}},e.prototype.appendToPrimitives=function(t,e,i){e===m.POINTS.value?t.totalPoints+=i:e===m.LINES.value?t.totalLines+=i:e===m.LINE_STRIP.value?t.totalLineStrip+=i:e===m.LINE_LOOP.value?t.totalLineLoop+=i:e===m.TRIANGLES.value?t.totalTriangles+=i:e===m.TRIANGLE_STRIP.value?t.totalTriangleStrip+=i:e===m.TRIANGLE_FAN.value&&(t.totalTriangleFan+=i),t.total+=i},e.analyserName="Primitives",e}(l),E=function(){function t(t){this.contextInformation=t,this.analysers=[],this.initAnalysers()}return t.prototype.appendAnalyses=function(t){for(var e in this.analysers)this.analysers.hasOwnProperty(e)&&this.analysers[e].appendAnalysis(t)},t.prototype.initAnalysers=function(){this.analysers.push(new c(this.contextInformation),new f(this.contextInformation),new x(this.contextInformation))},t}(),T=function(){function t(){}return t.storeOriginFunction=function(t,e){if(t&&t[e]){var i=this.getOriginFunctionName(e);t[i]||(t[i]=t[e])}},t.storePrototypeOriginFunction=function(t,e){if(t&&t.prototype[e]){var i=this.getOriginFunctionName(e);t.prototype[i]||(t.prototype[i]=t.prototype[e])}},t.executePrototypeOriginFunction=function(t,e,i,n){if(t){var r=this.getOriginFunctionName(i);if(e.prototype[r])return t[r]||(t[r]=e.prototype[r]),this.executeFunction(t,r,n)}},t.executeOriginFunction=function(t,e,i){if(t){var n=this.getOriginFunctionName(e);if(t[n])return this.executeFunction(t,n,i)}},t.executeFunction=function(t,e,i){var n=i;if(void 0===n||0===n.length)return t[e]();switch(n.length){case 1:return t[e](n[0]);case 2:return t[e](n[0],n[1]);case 3:return t[e](n[0],n[1],n[2]);case 4:return t[e](n[0],n[1],n[2],n[3]);case 5:return t[e](n[0],n[1],n[2],n[3],n[4]);case 6:return t[e](n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6]);case 8:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]);case 9:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8]);case 10:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9]);case 11:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10]);case 12:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11]);case 13:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12]);case 14:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13]);case 15:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14]);case 16:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);case 17:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15],n[16]);case 18:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15],n[16],n[17]);case 19:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15],n[16],n[17],n[18]);case 20:return t[e](n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15],n[16],n[17],n[18],n[19]);default:return t[e].apply(t,n)}},t.getOriginFunctionName=function(t){return this.originFunctionPrefix+t},t.originFunctionPrefix="__SPECTOR_Origin_",t}(),_=function(){function t(){}return t.getStackTrace=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0);var i=[];try{throw new Error("Errorator.")}catch(t){if(t.stack)for(var n=0,r=(s=t.stack.split("\n")).length;n<r;n++)s[n].match(/^\s*[A-Za-z0-9\-_\$]+\(/)?i.push(s[n]):0===s[n].indexOf(" at ")?(s[n]=s[n].replace(" at ",""),i.push(s[n])):-1!==s[n].indexOf("/<@http")?(s[n]=s[n].substring(s[n].indexOf("/<@http")+3),i.push(s[n])):-1!==s[n].indexOf("@http")&&(s[n]=s[n].replace("@http"," (http"),s[n]=s[n]+")",i.push(s[n]));else if(t.message){var s;for(n=0,r=(s=t.message.split("\n")).length;n<r;n++)if(s[n].match(/^\s*[A-Za-z0-9\-_\$]+\(/)){var o=s[n];s[n+1]&&(o+=" at "+s[n+1],n++),i.push(o)}}}if(!i)for(var a=arguments.callee.caller;a;){var h=a.toString(),l=h.substring(h.indexOf("function")+8,h.indexOf(""))||"anonymous";i.push(l),a=a.caller}if(i){for(i.shift(),n=0;n<t&&i.length>0;n++)i.shift();for(n=0;n<e&&i.length>0;n++)i.pop()}return i},t}(),w=function(){function t(){}return t.getWebGlObjectTag=function(e){return e[t.SPECTOROBJECTTAGKEY]},t.attachWebGlObjectTag=function(e,i){i.displayText=t.stringifyWebGlObjectTag(i),e[t.SPECTOROBJECTTAGKEY]=i},t.stringifyWebGlObjectTag=function(t){return t?"".concat(t.typeName," - ID: ").concat(t.id):"No tag available."},t.SPECTOROBJECTTAGKEY="__SPECTOR_Object_TAG",t}(),S=function(){function t(){this.id=0}return Object.defineProperty(t.prototype,"type",{get:function(){return window[this.typeName]||null},enumerable:!1,configurable:!0}),t.prototype.tagWebGlObject=function(t){if(this.type){var e;if(!t)return e;if(e=w.getWebGlObjectTag(t))return e;if(t instanceof this.type){var i=this.getNextId();return e={typeName:this.typeName,id:i},w.attachWebGlObjectTag(t,e),e}return e}},t.prototype.getNextId=function(){return this.id++},t}(),b=function(){function t(t){this.options=t}return t.prototype.createCapture=function(t,e,i){var n=_.getStackTrace(4,1),r=0===t.name.indexOf("uniform")?this.stringifyUniform(t.arguments):this.stringify(t.arguments,t.result),s={id:e,startTime:t.startTime,commandEndTime:t.endTime,endTime:0,name:t.name,commandArguments:t.arguments,result:t.result,stackTrace:n,status:0,marker:i,text:r};this.transformCapture(s);for(var o=0;o<s.commandArguments.length;o++){var a=s.commandArguments[o];a&&a.length&&a.length>50&&(s.commandArguments[o]="Array Length: "+a.length)}if(s.commandArguments){var h=[];for(o=0;o<s.commandArguments.length;o++){var l=s.commandArguments[o];void 0===l?h.push(void 0):null===l?h.push(null):h.push(JSON.parse(this.stringifyJSON(l)))}s.commandArguments=h}return s.result&&(s.result=JSON.parse(this.stringifyJSON(s.result))),s},t.prototype.stringifyJSON=function(t){try{return JSON.stringify(t)}catch(t){return null}},t.prototype.transformCapture=function(t){},t.prototype.stringify=function(t,e){var i=this.spiedCommandName;return t&&t.length>0&&(i+=": "+this.stringifyArgs(t).join(", ")),e&&(i+=" -> "+this.stringifyResult(e)),i},t.prototype.stringifyUniform=function(t){var e=this.spiedCommandName;if(t&&t.length>0){var i=[];i.push(this.stringifyValue(t[0]));for(var n=1;n<t.length;n++)if("number"==typeof t[n]){var r=t[n]+"";i.push(r)}else r=this.stringifyValue(t[n]),i.push(r);e+=": "+i.join(", ")}return e},t.prototype.stringifyArgs=function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],r=this.stringifyValue(n);e.push(r)}return e},t.prototype.stringifyResult=function(t){if(t)return this.stringifyValue(t)},t.prototype.stringifyValue=function(t){if(null===t)return"null";if(void 0===t)return"undefined";var e=w.getWebGlObjectTag(t);return e?e.displayText:"number"==typeof t&&m.isWebGlConstant(t)?m.stringifyWebGlConstant(t,this.spiedCommandName):"string"==typeof t?t:t instanceof HTMLImageElement?t.src:t instanceof ArrayBuffer?"[--("+t.byteLength+")--]":t.length?"[..("+t.length+")..]":t},t}(),C=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];if(t.length>0){var i=t[0],n=this.stringifyValue(i);e.push(n)}return t.length>1&&(i=""+t[1],e.push(i)),t.length>2&&e.push(t[2]),e},e.commandName="bindAttribLocation",e}(b),R=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return R(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[],i=this.options.context.getParameter(m.READ_FRAMEBUFFER_BINDING.value),n=this.options.tagWebGlObject(i);e.push("READ FROM: "+this.stringifyValue(n));var r=this.options.context.getParameter(m.DRAW_FRAMEBUFFER_BINDING.value),s=this.options.tagWebGlObject(r);e.push("WRITE TO: "+this.stringifyValue(s));for(var o=0;o<8;o++)e.push(t[o]);return(t[8]&m.DEPTH_BUFFER_BIT.value)===m.DEPTH_BUFFER_BIT.value&&e.push(m.DEPTH_BUFFER_BIT.name),(t[8]&m.STENCIL_BUFFER_BIT.value)===m.STENCIL_BUFFER_BIT.value&&e.push(m.STENCIL_BUFFER_BIT.name),(t[8]&m.COLOR_BUFFER_BIT.value)===m.COLOR_BUFFER_BIT.value&&e.push(m.COLOR_BUFFER_BIT.name),e.push(m.stringifyWebGlConstant(t[9],"blitFrameBuffer")),e},e.commandName="blitFrameBuffer",e}(b),L=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return(t[0]&m.DEPTH_BUFFER_BIT.value)===m.DEPTH_BUFFER_BIT.value&&e.push(m.DEPTH_BUFFER_BIT.name),(t[0]&m.STENCIL_BUFFER_BIT.value)===m.STENCIL_BUFFER_BIT.value&&e.push(m.STENCIL_BUFFER_BIT.name),(t[0]&m.COLOR_BUFFER_BIT.value)===m.COLOR_BUFFER_BIT.value&&e.push(m.COLOR_BUFFER_BIT.name),e},e.commandName="clear",e}(b),P=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),F=["lineWidth"],I=function(t){function e(e,i){var n=t.call(this,e)||this;return n.internalSpiedCommandName=i,n.isDeprecated=F.indexOf(n.spiedCommandName)>-1,n}return P(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return this.internalSpiedCommandName},enumerable:!1,configurable:!0}),e.prototype.transformCapture=function(t){this.isDeprecated&&(t.status=50)},e}(b),D=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return D(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(t[0]),e},e.commandName="disableVertexAttribArray",e}(b),k=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),B=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return k(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(m.stringifyWebGlConstant(t[0],"drawArrays")),e.push(t[1]),e.push(t[2]),e},e.commandName="drawArrays",e}(b),U=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return U(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(m.stringifyWebGlConstant(t[0],"drawArraysInstanced")),e.push(t[1]),e.push(t[2]),e.push(t[3]),e},e.commandName="drawArraysInstanced",e}(b),W=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),X=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return W(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(m.stringifyWebGlConstant(t[0],"drawArraysInstancedANGLE")),e.push(t[1]),e.push(t[2]),e.push(t[3]),e},e.commandName="drawArraysInstancedANGLE",e}(b),V=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return V(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(m.stringifyWebGlConstant(t[0],"drawElements")),e.push(t[1]),e.push(m.stringifyWebGlConstant(t[2],"drawElements")),e.push(t[3]),e},e.commandName="drawElements",e}(b),H=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return H(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(m.stringifyWebGlConstant(t[0],"drawElementsInstancedANGLE")),e.push(t[1]),e.push(m.stringifyWebGlConstant(t[2],"drawElementsInstancedANGLE")),e.push(t[3]),e.push(t[4]),e},e.commandName="drawElementsInstancedANGLE",e}(b),Y=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Y(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(m.stringifyWebGlConstant(t[0],"drawElementsInstanced")),e.push(t[1]),e.push(m.stringifyWebGlConstant(t[2],"drawElementsInstanced")),e.push(t[3]),e.push(t[4]),e},e.commandName="drawElementsInstanced",e}(b),K=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(m.stringifyWebGlConstant(t[0],"drawRangeElements")),e.push(t[1]),e.push(t[2]),e.push(t[3]),e.push(m.stringifyWebGlConstant(t[4],"drawRangeElements")),e.push(t[5]),e},e.commandName="drawRangeElements",e}(b),Z=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Z(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyResult=function(t){if(t)return"name: ".concat(t.name,", size: ").concat(t.size,", type: ").concat(t.type)},e.commandName="getActiveAttrib",e}(b),J=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return J(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyResult=function(t){if(t)return"name: ".concat(t.name,", size: ").concat(t.size,", type: ").concat(t.type)},e.commandName="getActiveUniform",e}(b),et=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),it=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return et(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyResult=function(t){return t?"true":"false"},e.commandName="getExtension",e}(b),nt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return nt(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyResult=function(t){if(!t)return"null";var e=w.getWebGlObjectTag(t);return e?e.displayText:t},e.commandName="getParameter",e}(b),st=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return st(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyResult=function(t){if(t)return"min: ".concat(t.rangeMin,", max: ").concat(t.rangeMax,", precision: ").concat(t.precision)},e.commandName="getShaderPrecisionFormat",e}(b),at=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return at(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyResult=function(t){if(t)return"name: ".concat(t.name,", size: ").concat(t.size,", type: ").concat(t.type)},e.commandName="getTransformFeedbackVarying",e}(b),lt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lt(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(m.stringifyWebGlConstant(t[0],"multiDrawArraysInstancedBaseInstanceWEBGL")),e.push("drawCount=".concat(t[9])),e.push(t[2]),e.push(t[4]),e.push(t[6]),e.push(t[8]),e},e.commandName="multiDrawArraysInstancedBaseInstanceWEBGL",e}(b),ct=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ct(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(m.stringifyWebGlConstant(t[0],"multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL")),e.push(m.stringifyWebGlConstant(t[3],"multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL")),e.push("drawCount=".concat(t[11])),e.push(t[2]),e.push(t[4]),e.push(t[6]),e.push(t[8]),e.push(t[10]),e},e.commandName="multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL",e}(b),pt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pt(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){for(var e=[],i=0;i<4;i++)e.push(t[i].toFixed(0));return e},e.commandName="scissor",e}(b);function mt(t){return null==t?"":"".concat(t.toFixed(0)," (0b").concat((t>>>0).toString(2),")")}var gt,vt,yt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yt(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(mt(t[0])),e},e.commandName="stencilMask",e}(b),Et=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Et(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(m.stringifyWebGlConstant(t[0],"stencilMaskSeparate")),e.push(mt(t[1])),e},e.commandName="stencilMaskSeparate",e}(b),_t=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _t(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(m.stringifyWebGlConstant(t[0],"stencilFunc")),e.push(mt(t[1])),e.push(mt(t[2])),e},e.commandName="stencilFunc",e}(b),St=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return St(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(m.stringifyWebGlConstant(t[0],"stencilFuncSeparate")),e.push(m.stringifyWebGlConstant(t[1],"stencilFuncSeparate")),e.push(mt(t[2])),e.push(mt(t[3])),e},e.commandName="stencilFuncSeparate",e}(b),Ct=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),At=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ct(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(t[0]),e.push(t[1]),e.push(m.stringifyWebGlConstant(t[2],"vertexAttribPointer")),e.push(t[3]),e.push(t[4]),e.push(t[5]),e},e.commandName="vertexAttribPointer",e}(b),Rt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Rt(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){for(var e=[],i=0;i<4;i++)e.push(t[i].toFixed(0));return e},e.commandName="viewport",e}(b),Lt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Lt(e,t),Object.defineProperty(e.prototype,"spiedCommandName",{get:function(){return e.commandName},enumerable:!1,configurable:!0}),e.prototype.stringifyArgs=function(t){var e=[];return e.push(t[0]),e},e.commandName="enableVertexAttribArray",e}(b),Pt=function(){function t(t){this.spiedCommandName=t.spiedCommandName,this.spiedCommandRunningContext=t.spiedCommandRunningContext,this.spiedCommand=this.spiedCommandRunningContext[this.spiedCommandName],T.storeOriginFunction(this.spiedCommandRunningContext,this.spiedCommandName),this.callback=t.callback,this.commandOptions={context:t.context,contextVersion:t.contextVersion,extensions:t.extensions,toggleCapture:t.toggleCapture},this.initCustomCommands(),this.initCommand()}return t.prototype.spy=function(){this.spiedCommandRunningContext[this.spiedCommandName]=this.overloadedCommand},t.prototype.unSpy=function(){this.spiedCommandRunningContext[this.spiedCommandName]=this.spiedCommand},t.prototype.createCapture=function(t,e,i){return this.command.createCapture(t,e,i)},t.prototype.initCommand=function(){t.customCommandsConstructors[this.spiedCommandName]?this.command=t.customCommandsConstructors[this.spiedCommandName](this.commandOptions):this.command=new I(this.commandOptions,this.spiedCommandName),this.overloadedCommand=this.getSpy()},t.prototype.getSpy=function(){var t=this;return function(){var e=h.now,i=T.executeOriginFunction(t.spiedCommandRunningContext,t.spiedCommandName,arguments),n=h.now,r={name:t.spiedCommandName,arguments:arguments,result:i,startTime:e,endTime:n};return t.callback(t,r),i}},t.prototype.initCustomCommands=function(){var e;t.customCommandsConstructors||(t.customCommandsConstructors=((e={})[A.commandName]=function(t){return new A(t)},e[M.commandName]=function(t){return new M(t)},e[O.commandName]=function(t){return new O(t)},e[N.commandName]=function(t){return new N(t)},e[B.commandName]=function(t){return new B(t)},e[G.commandName]=function(t){return new G(t)},e[X.commandName]=function(t){return new X(t)},e[$.commandName]=function(t){return new $(t)},e[j.commandName]=function(t){return new j(t)},e[z.commandName]=function(t){return new z(t)},e[q.commandName]=function(t){return new q(t)},e[Q.commandName]=function(t){return new Q(t)},e[tt.commandName]=function(t){return new tt(t)},e[it.commandName]=function(t){return new it(t)},e[rt.commandName]=function(t){return new rt(t)},e[ot.commandName]=function(t){return new ot(t)},e[ht.commandName]=function(t){return new ht(t)},e[ut.commandName]=function(t){return new ut(t)},e[dt.commandName]=function(t){return new dt(t)},e[ft.commandName]=function(t){return new ft(t)},e[xt.commandName]=function(t){return new xt(t)},e[Tt.commandName]=function(t){return new Tt(t)},e[wt.commandName]=function(t){return new wt(t)},e[bt.commandName]=function(t){return new bt(t)},e[At.commandName]=function(t){return new At(t)},e[Mt.commandName]=function(t){return new Mt(t)},e[Ot.commandName]=function(t){return new Ot(t)},e))},t}(),Ft=function(){function t(t){this.options=t,this.context=t.context,this.contextVersion=t.contextVersion,this.extensions=t.extensions,this.toggleCapture=t.toggleCapture,this.consumeCommands=this.getConsumeCommands(),this.changeCommandsByState=this.getChangeCommandsByState(),this.commandNameToStates=this.getCommandNameToStates()}return Object.defineProperty(t.prototype,"requireStartAndStopStates",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.startCapture=function(t,e,i){return this.quickCapture=e,this.fullCapture=i,this.capturedCommandsByState={},t&&this.requireStartAndStopStates&&(this.currentState={},this.readFromContextNoSideEffects()),this.copyCurrentStateToPrevious(),this.currentState={},this.previousState},t.prototype.stopCapture=function(){return this.requireStartAndStopStates&&this.readFromContextNoSideEffects(),this.analyse(void 0),this.currentState},t.prototype.registerCallbacks=function(t){for(var e in this.changeCommandsByState)if(this.changeCommandsByState.hasOwnProperty(e))for(var i=0,n=this.changeCommandsByState[e];i<n.length;i++){var r=n[i];t[r]=t[r]||[],t[r].push(this.onChangeCommand.bind(this))}for(var s=0,o=this.consumeCommands;s<o.length;s++){var a=o[s];t[a]=t[a]||[],t[a].push(this.onConsumeCommand.bind(this))}},t.prototype.getStateData=function(){return this.currentState},t.prototype.getConsumeCommands=function(){return[]},t.prototype.getChangeCommandsByState=function(){return{}},t.prototype.copyCurrentStateToPrevious=function(){this.currentState&&(this.previousState=this.currentState)},t.prototype.onChangeCommand=function(t){for(var e=0,i=this.commandNameToStates[t.name];e<i.length;e++){var n=i[e];if(!this.isValidChangeCommand(t,n))return;this.capturedCommandsByState[n]=this.capturedCommandsByState[n]||[],this.capturedCommandsByState[n].push(t)}},t.prototype.isValidChangeCommand=function(t,e){return!0},t.prototype.onConsumeCommand=function(t){this.isValidConsumeCommand(t)&&(this.readFromContextNoSideEffects(),this.analyse(t),this.storeCommandIds(),t[this.stateName]=this.currentState,this.startCapture(!1,this.quickCapture,this.fullCapture))},t.prototype.isValidConsumeCommand=function(t){return this.lastCommandName=null==t?void 0:t.name,!0},t.prototype.analyse=function(t){for(var e in this.capturedCommandsByState)if(this.capturedCommandsByState.hasOwnProperty(e)){var i=this.capturedCommandsByState[e],n=i.length-1;if(n>=0)if(t){for(var r=0;r<n;r++){var s=i[r];s.consumeCommandId=t.id,this.changeCommandCaptureStatus(s,30)}var o=this.isStateEnableNoSideEffects(e,t.commandArguments);(a=i[n]).consumeCommandId=t.id,this.areStatesEquals(this.currentState[e],this.previousState[e])?this.changeCommandCaptureStatus(a,30):o?this.changeCommandCaptureStatus(a,40):this.changeCommandCaptureStatus(a,20)}else for(r=0;r<i.length;r++){var a=i[r];this.changeCommandCaptureStatus(a,10)}}},t.prototype.storeCommandIds=function(){for(var t=["unusedCommandIds","disabledCommandIds","redundantCommandIds","validCommandIds"],e=0,i=t;e<i.length;e++){var n=i[e];this.currentState[n]=[]}for(var r in this.capturedCommandsByState)if(this.capturedCommandsByState.hasOwnProperty(r))for(var s=0,o=this.capturedCommandsByState[r];s<o.length;s++){var a=o[s];switch(a.status){case 10:this.currentState.unusedCommandIds.push(a.id);break;case 20:this.currentState.disabledCommandIds.push(a.id);break;case 30:this.currentState.redundantCommandIds.push(a.id);break;case 40:this.currentState.validCommandIds.push(a.id)}}for(var h=0,l=t;h<l.length;h++)n=l[h],this.currentState[n].length||delete this.currentState[n]},t.prototype.changeCommandCaptureStatus=function(t,e){return t.status<e&&(t.status=e,!0)},t.prototype.areStatesEquals=function(t,e){if(typeof t!=typeof e)return!1;if(t&&!e)return!1;if(e&&!t)return!1;if(null==t)return!0;if(t.length&&e.length&&"string"!=typeof t){if(t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}return t===e},t.prototype.isStateEnable=function(t,e){return!0},t.prototype.getSpectorData=function(t){if(t)return{__SPECTOR_Object_TAG:w.getWebGlObjectTag(t)||this.options.tagWebGlObject(t),__SPECTOR_Object_CustomData:t.__SPECTOR_Object_CustomData,__SPECTOR_Metadata:t.__SPECTOR_Metadata}},t.prototype.readFromContextNoSideEffects=function(){this.toggleCapture(!1),this.readFromContext(),this.toggleCapture(!0)},t.prototype.isStateEnableNoSideEffects=function(t,e){this.toggleCapture(!1);var i=this.isStateEnable(t,e);return this.toggleCapture(!0),i},t.prototype.getCommandNameToStates=function(){var t={};for(var e in this.changeCommandsByState)if(this.changeCommandsByState.hasOwnProperty(e))for(var i=0,n=this.changeCommandsByState[e];i<n.length;i++){var r=n[i];t[r]=t[r]||[],t[r].push(e)}return t},t}(),It=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return It(e,t),e.prototype.getWebgl1Parameters=function(){return[]},e.prototype.getWebgl2Parameters=function(){return[]},e.prototype.getChangeCommandsByState=function(){this.parameters=[],this.parameters.push(this.getWebgl1Parameters()),this.contextVersion>1&&this.parameters.push(this.getWebgl2Parameters());for(var t={},e=1;e<=this.contextVersion&&!(e>this.parameters.length);e++)if(this.parameters[e-1])for(var i=0,n=this.parameters[e-1];i<n.length;i++){var r=n[i];if(r.changeCommands)for(var s=0,o=r.changeCommands;s<o.length;s++){var a=o[s];t[r.constant.name]=t[r.constant.name]||[],t[r.constant.name].push(a)}}return t},e.prototype.readFromContext=function(){for(var t=1;t<=this.contextVersion&&!(t>this.parameters.length);t++)for(var e=0,i=this.parameters[t-1];e<i.length;e++){var n=i[e],r=this.readParameterFromContext(n),s=w.getWebGlObjectTag(r);if(s)this.currentState[n.constant.name]=s;else{var o=this.stringifyParameterValue(r,n);this.currentState[n.constant.name]=o}}},e.prototype.readParameterFromContext=function(t){return t.constant.extensionName&&!this.extensions[t.constant.extensionName]?"Extension ".concat(t.constant.extensionName," is unavailable."):this.context.getParameter(t.constant.value)},e.prototype.stringifyParameterValue=function(t,e){if(null===t)return"null";if(void 0===t)return"undefined";if(30===e.returnType)return mt(t);if("number"==typeof t&&m.isWebGlConstant(t)){if(20===e.returnType){var i=e.changeCommands&&e.changeCommands[0]||"";return m.stringifyWebGlConstant(t,i)}return t}if(t.length&&"string"!=typeof t){for(var n=[],r=0;r<t.length;r++)n.push(t[r]);return n}return t},e}(Ft),Nt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Nt(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.PACK_ALIGNMENT,changeCommands:["pixelStorei"]},{constant:m.UNPACK_ALIGNMENT,changeCommands:["pixelStorei"]},{constant:m.UNPACK_COLORSPACE_CONVERSION_WEBGL,returnType:20,changeCommands:["pixelStorei"]},{constant:m.UNPACK_FLIP_Y_WEBGL,changeCommands:["pixelStorei"]},{constant:m.UNPACK_PREMULTIPLY_ALPHA_WEBGL,changeCommands:["pixelStorei"]}]},e.prototype.getWebgl2Parameters=function(){return[{constant:m.PACK_ROW_LENGTH,changeCommands:["pixelStorei"]},{constant:m.PACK_SKIP_PIXELS,changeCommands:["pixelStorei"]},{constant:m.PACK_SKIP_ROWS,changeCommands:["pixelStorei"]},{constant:m.UNPACK_IMAGE_HEIGHT,changeCommands:["pixelStorei"]},{constant:m.UNPACK_SKIP_PIXELS,changeCommands:["pixelStorei"]},{constant:m.UNPACK_SKIP_ROWS,changeCommands:["pixelStorei"]},{constant:m.UNPACK_SKIP_IMAGES,changeCommands:["pixelStorei"]}]},e.prototype.getConsumeCommands=function(){return["readPixels","texImage2D","texSubImage2D"]},e.prototype.isValidChangeCommand=function(t,e){return g[e].value===t.commandArguments[0]},e.stateName="AlignmentState",e}(Dt),Bt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bt(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.BLEND,changeCommands:["enable","disable"]},{constant:m.BLEND_COLOR,changeCommands:["blendColor"]},{constant:m.BLEND_DST_ALPHA,returnType:20,changeCommands:["blendFunc","blendFuncSeparate"]},{constant:m.BLEND_DST_RGB,returnType:20,changeCommands:["blendFunc","blendFuncSeparate"]},{constant:m.BLEND_EQUATION_ALPHA,returnType:20,changeCommands:["blendEquation","blendEquationSeparate"]},{constant:m.BLEND_EQUATION_RGB,returnType:20,changeCommands:["blendEquation","blendEquationSeparate"]},{constant:m.BLEND_SRC_ALPHA,returnType:20,changeCommands:["blendFunc","blendFuncSeparate"]},{constant:m.BLEND_SRC_RGB,returnType:20,changeCommands:["blendFunc","blendFuncSeparate"]}]},e.prototype.isValidChangeCommand=function(t,e){return"enable"!==t.name&&"disable"!==t.name||t.commandArguments[0]===m.BLEND.value},e.prototype.getConsumeCommands=function(){return d},e.prototype.isStateEnable=function(t,e){return this.context.isEnabled(m.BLEND.value)},e.stateName="BlendState",e}(Dt),Gt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Gt(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.COLOR_CLEAR_VALUE,changeCommands:["clearColor"]},{constant:m.DEPTH_CLEAR_VALUE,changeCommands:["clearDepth"]},{constant:m.STENCIL_CLEAR_VALUE,changeCommands:["clearStencil"]}]},e.prototype.getConsumeCommands=function(){return["clear"]},e.prototype.isStateEnable=function(t,e){switch(t){case m.COLOR_CLEAR_VALUE.name:return m.COLOR_BUFFER_BIT.value===(e[0]&m.COLOR_BUFFER_BIT.value);case m.DEPTH_CLEAR_VALUE.name:return m.DEPTH_BUFFER_BIT.value===(e[0]&m.DEPTH_BUFFER_BIT.value);case m.STENCIL_CLEAR_VALUE.name:return m.STENCIL_BUFFER_BIT.value===(e[0]&m.STENCIL_BUFFER_BIT.value)}return!1},e.stateName="ClearState",e}(Dt),Xt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xt(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.COLOR_WRITEMASK,changeCommands:["colorMask"]}]},e.prototype.getConsumeCommands=function(){return d},e.stateName="ColorState",e}(Dt),$t=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return $t(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.SAMPLE_COVERAGE_VALUE,changeCommands:["sampleCoverage"]},{constant:m.SAMPLE_COVERAGE_INVERT,changeCommands:["sampleCoverage"]}]},e.prototype.getWebgl2Parameters=function(){return[{constant:m.SAMPLE_COVERAGE,changeCommands:["enable","disable"]},{constant:m.SAMPLE_ALPHA_TO_COVERAGE,changeCommands:["enable","disable"]}]},e.prototype.isValidChangeCommand=function(t,e){return"enable"!==t.name&&"disable"!==t.name||(t.commandArguments[0]===m.SAMPLE_COVERAGE.value?e===m.SAMPLE_COVERAGE.name:t.commandArguments[0]===m.SAMPLE_ALPHA_TO_COVERAGE.value&&e===m.SAMPLE_ALPHA_TO_COVERAGE.name)},e.prototype.getConsumeCommands=function(){return d},e.prototype.isStateEnable=function(t,e){return 2===this.contextVersion&&this.context.isEnabled(m.SAMPLE_COVERAGE.value)},e.stateName="CoverageState",e}(Dt),zt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return zt(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.CULL_FACE,changeCommands:["enable","disable"]},{constant:m.CULL_FACE_MODE,returnType:20,changeCommands:["cullFace"]}]},e.prototype.getConsumeCommands=function(){return d},e.prototype.isValidChangeCommand=function(t,e){return"enable"!==t.name&&"disable"!==t.name||t.commandArguments[0]===m.CULL_FACE.value},e.prototype.isStateEnable=function(t,e){return this.context.isEnabled(m.CULL_FACE.value)},e.stateName="CullState",e}(Dt),jt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return jt(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.DEPTH_TEST,changeCommands:["enable","disable"]},{constant:m.DEPTH_FUNC,returnType:20,changeCommands:["depthFunc"]},{constant:m.DEPTH_RANGE,changeCommands:["depthRange"]},{constant:m.DEPTH_WRITEMASK,changeCommands:["depthMask"]}]},e.prototype.getConsumeCommands=function(){return d},e.prototype.isValidChangeCommand=function(t,e){return"enable"!==t.name&&"disable"!==t.name||t.commandArguments[0]===m.DEPTH_TEST.value},e.prototype.isStateEnable=function(t,e){return this.context.isEnabled(m.DEPTH_TEST.value)},e.stateName="DepthState",e}(Dt),qt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return qt(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.DITHER,changeCommands:["enable","disable"]},{constant:m.VIEWPORT,changeCommands:["viewPort"]},{constant:m.FRONT_FACE,returnType:20,changeCommands:["frontFace"]},{constant:m.FRAGMENT_SHADER_DERIVATIVE_HINT_OES,changeCommands:["hint"]}]},e.prototype.getWebgl2Parameters=function(){return[{constant:m.RASTERIZER_DISCARD,changeCommands:["enable","disable"]},{constant:m.FRAGMENT_SHADER_DERIVATIVE_HINT,changeCommands:["hint"]}]},e.prototype.isValidChangeCommand=function(t,e){return"enable"===t.name||"disable"===t.name?t.commandArguments[0]===m.DITHER.value?e===m.DITHER.name:t.commandArguments[0]===m.RASTERIZER_DISCARD.value&&e===m.RASTERIZER_DISCARD.name:"hint"!==t.name||(t.commandArguments[0]===m.FRAGMENT_SHADER_DERIVATIVE_HINT_OES.value?e===m.FRAGMENT_SHADER_DERIVATIVE_HINT_OES.name:t.commandArguments[0]===m.FRAGMENT_SHADER_DERIVATIVE_HINT.value&&e===m.FRAGMENT_SHADER_DERIVATIVE_HINT.name)},e.prototype.getConsumeCommands=function(){return d},e.prototype.isStateEnable=function(t,e){switch(t){case m.DITHER.name:return this.context.isEnabled(m.DITHER.value);case m.RASTERIZER_DISCARD.name:return this.context.isEnabled(m.RASTERIZER_DISCARD.value)}return!0},e.stateName="DrawState",e}(Dt),Qt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Qt(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.GENERATE_MIPMAP_HINT,changeCommands:["hint"]}]},e.prototype.getConsumeCommands=function(){return["generateMipmap"]},e.stateName="MipmapHintState",e}(Dt),te=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return te(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.POLYGON_OFFSET_FILL,changeCommands:["enable","disable"]},{constant:m.POLYGON_OFFSET_FACTOR,changeCommands:["polygonOffset"]},{constant:m.POLYGON_OFFSET_UNITS,changeCommands:["polygonOffset"]}]},e.prototype.isValidChangeCommand=function(t,e){return"enable"!==t.name&&"disable"!==t.name||t.commandArguments[0]===m.POLYGON_OFFSET_FILL.value},e.prototype.getConsumeCommands=function(){return d},e.prototype.isStateEnable=function(t,e){return this.context.isEnabled(m.POLYGON_OFFSET_FILL.value)},e.stateName="PolygonOffsetState",e}(Dt),ie=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ne=function(t,e,i){if(i||2===arguments.length)for(var n,r=0,s=e.length;r<s;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))},re=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ie(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.SCISSOR_TEST,changeCommands:["enable","disable"]},{constant:m.SCISSOR_BOX,changeCommands:["scissor"]}]},e.prototype.isValidChangeCommand=function(t,e){return"enable"!==t.name&&"disable"!==t.name||t.commandArguments[0]===m.SCISSOR_TEST.value},e.prototype.getConsumeCommands=function(){return ne(ne([],d,!0),["clear"],!1)},e.prototype.isStateEnable=function(t,e){return this.context.isEnabled(m.SCISSOR_TEST.value)},e.stateName="ScissorState",e}(Dt),se=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),oe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return se(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.STENCIL_TEST,changeCommands:["enable","disable"]},{constant:m.STENCIL_BACK_FAIL,returnType:20,changeCommands:["stencilOp","stencilOpSeparate"]},{constant:m.STENCIL_BACK_FUNC,returnType:20,changeCommands:["stencilFunc","stencilFuncSeparate"]},{constant:m.STENCIL_BACK_PASS_DEPTH_FAIL,returnType:20,changeCommands:["stencilOp","stencilOpSeparate"]},{constant:m.STENCIL_BACK_PASS_DEPTH_PASS,returnType:20,changeCommands:["stencilOp","stencilOpSeparate"]},{constant:m.STENCIL_BACK_REF,changeCommands:["stencilFunc","stencilFuncSeparate"]},{constant:m.STENCIL_BACK_VALUE_MASK,returnType:30,changeCommands:["stencilFunc","stencilFuncSeparate"]},{constant:m.STENCIL_BACK_WRITEMASK,returnType:30,changeCommands:["stencilMask","stencilMaskSeparate"]},{constant:m.STENCIL_FAIL,returnType:20,changeCommands:["stencilOp","stencilOpSeparate"]},{constant:m.STENCIL_FUNC,returnType:20,changeCommands:["stencilFunc","stencilFuncSeparate"]},{constant:m.STENCIL_PASS_DEPTH_FAIL,returnType:20,changeCommands:["stencilOp","stencilOpSeparate"]},{constant:m.STENCIL_PASS_DEPTH_PASS,returnType:20,changeCommands:["stencilOp","stencilOpSeparate"]},{constant:m.STENCIL_REF,changeCommands:["stencilFunc","stencilFuncSeparate"]},{constant:m.STENCIL_VALUE_MASK,returnType:30,changeCommands:["stencilFunc","stencilFuncSeparate"]},{constant:m.STENCIL_WRITEMASK,returnType:30,changeCommands:["stencilMask","stencilMaskSeparate"]}]},e.prototype.readFromContext=function(){t.prototype.readFromContext.call(this);var e=this.context,i=m.FRAMEBUFFER.value,n=m.STENCIL_ATTACHMENT.value,r=0;e.getParameter(m.FRAMEBUFFER_BINDING.value)?this.context.getFramebufferAttachmentParameter(i,n,m.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.value)!==m.NONE.value&&(this.contextVersion>1?r=this.context.getFramebufferAttachmentParameter(i,n,m.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE.value):this.context.getFramebufferAttachmentParameter(i,n,m.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME.value)===m.RENDERBUFFER.value&&(r=e.getRenderbufferParameter(e.RENDERBUFFER,e.RENDERBUFFER_STENCIL_SIZE))):r=this.readParameterFromContext({constant:m.STENCIL_BITS}),this.currentState[m.STENCIL_BITS.name]=""+r},e.prototype.isValidChangeCommand=function(t,i){return"enable"===t.name||"disable"===t.name?t.commandArguments[0]===m.STENCIL_TEST.value:"stencilOp"===t.name||"stencilOpSeparate"===t.name?e.stencilOpStates.indexOf(t.commandArguments[0])>0:"stencilFunc"===t.name||"stencilFuncSeparate"===t.name?e.stencilFuncStates.indexOf(t.commandArguments[0])>0:"stencilMask"!==t.name&&"stencilMaskSeparate"!==t.name||e.stencilMaskStates.indexOf(t.commandArguments[0])>0},e.prototype.getConsumeCommands=function(){return d},e.prototype.isStateEnable=function(t,e){return this.context.isEnabled(m.STENCIL_TEST.value)},e.stateName="StencilState",e.stencilOpStates=[m.STENCIL_BACK_FAIL.value,m.STENCIL_BACK_PASS_DEPTH_FAIL.value,m.STENCIL_BACK_PASS_DEPTH_PASS.value,m.STENCIL_FAIL.value,m.STENCIL_PASS_DEPTH_FAIL.value,m.STENCIL_PASS_DEPTH_PASS.value],e.stencilFuncStates=[m.STENCIL_BACK_FUNC.value,m.STENCIL_BACK_REF.value,m.STENCIL_BACK_VALUE_MASK.value,m.STENCIL_FUNC.value,m.STENCIL_REF.value,m.STENCIL_VALUE_MASK.value],e.stencilMaskStates=[m.STENCIL_BACK_WRITEMASK.value,m.STENCIL_WRITEMASK.value],e}(Dt),ae=function(){function t(){}return t.isSupportedCombination=function(t,e,i){return t=t||m.UNSIGNED_BYTE.value,((e=e||m.RGBA.value)===m.RGB.value||e===m.RGBA.value)&&(i===m.RGB.value||i===m.RGBA.value||i===m.RGBA8.value||i===m.RGBA16F.value||i===m.RGBA32F.value||i===m.RGB16F.value||i===m.RGB32F.value||i===m.R11F_G11F_B10F.value||i===m.SRGB8.value||i===m.SRGB8_ALPHA8.value)&&this.isSupportedComponentType(t)},t.readPixels=function(t,e,i,n,r,s){t.getError();var o,a=n*r*4;if(s===m.UNSIGNED_BYTE.value?o=new Uint8Array(a):(s=m.FLOAT.value,o=new Float32Array(a)),t.readPixels(e,i,n,r,t.RGBA,s,o),!t.getError()){if(s===m.UNSIGNED_BYTE.value)return o;for(var h=new Uint8Array(n*r*4),l=0;l<r;l++)for(var u=0;u<n;u++)h[l*n*4+4*u+0]=255*Math.min(Math.max(o[l*n*4+4*u+0],0),1),h[l*n*4+4*u+1]=255*Math.min(Math.max(o[l*n*4+4*u+1],0),1),h[l*n*4+4*u+2]=255*Math.min(Math.max(o[l*n*4+4*u+2],0),1),h[l*n*4+4*u+3]=255*Math.min(Math.max(o[l*n*4+4*u+3],0),1);return h}},t.isSupportedComponentType=function(t){return t===m.UNSIGNED_BYTE.value||t===m.UNSIGNED_SHORT_4_4_4_4.value||t===m.UNSIGNED_SHORT_5_5_5_1.value||t===m.UNSIGNED_SHORT_5_6_5.value||t===m.HALF_FLOAT.value||t===m.HALF_FLOAT_OES.value||t===m.FLOAT.value},t}(),he=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),le=function(t){function e(e){var i=t.call(this,e)||this;return i.captureFrameBuffer=e.context.createFramebuffer(),i.workingCanvas=document.createElement("canvas"),i.workingContext2D=i.workingCanvas.getContext("2d"),i.captureCanvas=document.createElement("canvas"),i.captureContext2D=i.captureCanvas.getContext("2d"),i.captureContext2D.imageSmoothingEnabled=!0,i.captureContext2D.mozImageSmoothingEnabled=!0,i.captureContext2D.oImageSmoothingEnabled=!0,i.captureContext2D.webkitImageSmoothingEnabled=!0,i.captureContext2D.msImageSmoothingEnabled=!0,i}return he(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),e.prototype.getConsumeCommands=function(){return function(t,e,i){if(i||2===arguments.length)for(var n,r=0,s=e.length;r<s;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))}(["clear","clearBufferfv","clearBufferiv","clearBufferuiv","clearBufferfi"],d,!0)},e.prototype.readFromContext=function(){var t=this.context;this.currentState.Attachments=[];var e=this.context.getParameter(m.FRAMEBUFFER_BINDING.value);if(!e)return this.currentState.FrameBuffer=null,void this.getCapture(t,"Canvas COLOR_ATTACHMENT",0,0,t.drawingBufferWidth,t.drawingBufferHeight,0,0,m.UNSIGNED_BYTE.value);var i=t.getParameter(t.VIEWPORT),n=i[0],r=i[1],s=i[2],o=i[3];this.currentState.FrameBuffer=this.getSpectorData(e);var a=this.context.checkFramebufferStatus(m.FRAMEBUFFER.value);if(this.currentState.FrameBufferStatus=v[a].name,a===m.FRAMEBUFFER_COMPLETE.value)if(this.extensions[m.MAX_DRAW_BUFFERS_WEBGL.extensionName])for(var h=this.context.getParameter(m.MAX_DRAW_BUFFERS_WEBGL.value),l=0;l<h;l++)this.readFrameBufferAttachmentFromContext(this.context,e,g["COLOR_ATTACHMENT"+l+"_WEBGL"],n,r,s,o);else if(this.contextVersion>1)for(h=this.context.getParameter(m.MAX_DRAW_BUFFERS.value),l=0;l<h;l++)this.readFrameBufferAttachmentFromContext(this.context,e,g["COLOR_ATTACHMENT"+l],n,r,s,o);else this.readFrameBufferAttachmentFromContext(this.context,e,g.COLOR_ATTACHMENT0,n,r,s,o)},e.prototype.readFrameBufferAttachmentFromContext=function(t,e,i,n,r,s,o){var a=m.FRAMEBUFFER.value,h=this.context.getFramebufferAttachmentParameter(a,i.value,m.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.value);if(h!==m.NONE.value){var l=this.context.getFramebufferAttachmentParameter(a,i.value,m.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME.value);if(l){var u=this.contextVersion>1?this.context.getFramebufferAttachmentParameter(a,i.value,m.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE.value):m.UNSIGNED_BYTE.value;h===m.RENDERBUFFER.value?this.readFrameBufferAttachmentFromRenderBuffer(t,e,i,n,r,s,o,a,u,l):h===m.TEXTURE.value&&this.readFrameBufferAttachmentFromTexture(t,e,i,n,r,s,o,a,u,l)}}},e.prototype.readFrameBufferAttachmentFromRenderBuffer=function(t,e,i,n,r,s,o,a,h,l){var u=0,c=0;if(l.__SPECTOR_Object_CustomData){var d=l.__SPECTOR_Object_CustomData;if(s=d.width,o=d.height,u=d.samples,c=d.internalFormat,!u&&!ae.isSupportedCombination(h,m.RGBA.value,c))return}else s+=n,o+=r;if(n=r=0,u){var p=t,f=t.createRenderbuffer(),g=t.getParameter(t.RENDERBUFFER_BINDING);t.bindRenderbuffer(t.RENDERBUFFER,f),t.renderbufferStorage(t.RENDERBUFFER,c,s,o),t.bindRenderbuffer(t.RENDERBUFFER,g),t.bindFramebuffer(m.FRAMEBUFFER.value,this.captureFrameBuffer),t.framebufferRenderbuffer(m.FRAMEBUFFER.value,m.COLOR_ATTACHMENT0.value,m.RENDERBUFFER.value,f);var v=p.getParameter(p.READ_FRAMEBUFFER_BINDING),y=p.getParameter(p.DRAW_FRAMEBUFFER_BINDING);p.bindFramebuffer(p.READ_FRAMEBUFFER,e),p.bindFramebuffer(p.DRAW_FRAMEBUFFER,this.captureFrameBuffer),p.blitFramebuffer(0,0,s,o,0,0,s,o,t.COLOR_BUFFER_BIT,t.NEAREST),p.bindFramebuffer(m.FRAMEBUFFER.value,this.captureFrameBuffer),p.bindFramebuffer(p.READ_FRAMEBUFFER,v),p.bindFramebuffer(p.DRAW_FRAMEBUFFER,y),this.context.checkFramebufferStatus(m.FRAMEBUFFER.value)===m.FRAMEBUFFER_COMPLETE.value&&this.getCapture(t,i.name,n,r,s,o,0,0,m.UNSIGNED_BYTE.value),t.bindFramebuffer(m.FRAMEBUFFER.value,e),t.deleteRenderbuffer(f)}else t.bindFramebuffer(m.FRAMEBUFFER.value,this.captureFrameBuffer),t.framebufferRenderbuffer(m.FRAMEBUFFER.value,m.COLOR_ATTACHMENT0.value,m.RENDERBUFFER.value,l),this.context.checkFramebufferStatus(m.FRAMEBUFFER.value)===m.FRAMEBUFFER_COMPLETE.value&&this.getCapture(t,i.name,n,r,s,o,0,0,h),t.bindFramebuffer(m.FRAMEBUFFER.value,e)},e.prototype.readFrameBufferAttachmentFromTexture=function(t,e,i,n,r,s,o,a,h,l){var u=0;this.contextVersion>1&&(u=this.context.getFramebufferAttachmentParameter(a,i.value,m.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER.value));var c=this.context.getFramebufferAttachmentParameter(a,i.value,m.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL.value),d=this.context.getFramebufferAttachmentParameter(a,i.value,m.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE.value),p=(d>0?v[d].name:m.TEXTURE_2D.name,!1),f=h;if(l.__SPECTOR_Object_CustomData){var g=l.__SPECTOR_Object_CustomData;if(s=g.width,o=g.height,f=g.type,p=g.target===m.TEXTURE_2D_ARRAY.name,!ae.isSupportedCombination(g.type,g.format,g.internalFormat))return}else s+=n,o+=r;n=r=0,t.bindFramebuffer(m.FRAMEBUFFER.value,this.captureFrameBuffer),u>0||p?t.framebufferTextureLayer(m.FRAMEBUFFER.value,m.COLOR_ATTACHMENT0.value,l,c,u):t.framebufferTexture2D(m.FRAMEBUFFER.value,m.COLOR_ATTACHMENT0.value,d||m.TEXTURE_2D.value,l,c),this.context.checkFramebufferStatus(m.FRAMEBUFFER.value)===m.FRAMEBUFFER_COMPLETE.value&&this.getCapture(t,i.name,n,r,s,o,d,u,f),t.bindFramebuffer(m.FRAMEBUFFER.value,e)},e.prototype.getCapture=function(t,i,n,r,s,a,h,l,u){var c={attachmentName:i,src:null,textureCubeMapFace:h?v[h].name:null,textureLayer:l};if(!this.quickCapture)try{var d=ae.readPixels(t,n,r,s,a,u);if(d){this.workingCanvas.width=s,this.workingCanvas.height=a;var p=this.workingContext2D.createImageData(Math.ceil(s),Math.ceil(a));if(p.data.set(d),this.workingContext2D.putImageData(p,0,0),this.fullCapture)this.captureCanvas.width=this.workingCanvas.width,this.captureCanvas.height=this.workingCanvas.height;else{var f=s/a;f<1?(this.captureCanvas.width=e.captureBaseSize*f,this.captureCanvas.height=e.captureBaseSize):f>1?(this.captureCanvas.width=e.captureBaseSize,this.captureCanvas.height=e.captureBaseSize/f):(this.captureCanvas.width=e.captureBaseSize,this.captureCanvas.height=e.captureBaseSize)}this.captureCanvas.width=Math.max(this.captureCanvas.width,1),this.captureCanvas.height=Math.max(this.captureCanvas.height,1),this.captureContext2D.globalCompositeOperation="copy",this.captureContext2D.scale(1,-1),this.captureContext2D.translate(0,-this.captureCanvas.height),this.captureContext2D.drawImage(this.workingCanvas,0,0,s,a,0,0,this.captureCanvas.width,this.captureCanvas.height),this.captureContext2D.setTransform(1,0,0,1,0,0),this.captureContext2D.globalCompositeOperation="source-over",c.src=this.captureCanvas.toDataURL()}}catch(t){o.warn("Spector can not capture the visual state: "+t)}this.currentState.Attachments.push(c)},e.prototype.analyse=function(t){},e.stateName="VisualState",e.captureBaseSize=256,e}(Ft),ue=function(){function t(t){this.context=t.context,this.captureFrameBuffer=t.context.createFramebuffer(),this.workingCanvas=document.createElement("canvas"),this.workingContext2D=this.workingCanvas.getContext("2d"),this.captureCanvas=document.createElement("canvas"),this.captureContext2D=this.captureCanvas.getContext("2d"),this._setSmoothing(!0)}return t.prototype.appendTextureState=function(t,e,i,n){if(void 0===i&&(i=null),e){var r=e.__SPECTOR_Object_CustomData;if(r&&(this.fullCapture=n,r.type&&(t.textureType=this.getWebGlConstant(r.type)),r.format&&(t.format=this.getWebGlConstant(r.format)),r.internalFormat&&(t.internalFormat=this.getWebGlConstant(r.internalFormat)),t.width=r.width,t.height=r.height,r.depth&&(t.depth=r.depth),i)){var s="NEAREST"===t.samplerMagFilter||"NEAREST"===t.magFilter;t.visual=this.getTextureVisualState(i,e,r,s)}}},t.prototype.getTextureVisualState=function(e,i,n,r){try{var s=this.context,o={};if(!ae.isSupportedCombination(n.type,n.format,n.internalFormat))return o;var a=this.context.getParameter(m.FRAMEBUFFER_BINDING.value);s.bindFramebuffer(m.FRAMEBUFFER.value,this.captureFrameBuffer);try{var h=n.width,l=n.height;if(e===m.TEXTURE_3D&&n.depth)for(var u=s,c=0;c<n.depth;c++)c>2&&c<n.depth-3||(u.framebufferTextureLayer(m.FRAMEBUFFER.value,m.COLOR_ATTACHMENT0.value,i,0,c),o["3D Layer "+c]=this.getCapture(s,0,0,h,l,n.type,r));else if(e===m.TEXTURE_2D_ARRAY&&n.depth)for(u=s,c=0;c<n.depth;c++)c>2&&c<n.depth-3||(u.framebufferTextureLayer(m.FRAMEBUFFER.value,m.COLOR_ATTACHMENT0.value,i,0,c),o["Layer "+c]=this.getCapture(s,0,0,h,l,n.type,r));else if(e===m.TEXTURE_CUBE_MAP)for(var d=0,p=t.cubeMapFaces;d<p.length;d++){var f=p[d];s.framebufferTexture2D(m.FRAMEBUFFER.value,m.COLOR_ATTACHMENT0.value,f.value,i,0),o[f.name]=this.getCapture(s,0,0,h,l,n.type,r)}else s.framebufferTexture2D(m.FRAMEBUFFER.value,m.COLOR_ATTACHMENT0.value,m.TEXTURE_2D.value,i,0),o[m.TEXTURE_2D.name]=this.getCapture(s,0,0,h,l,n.type,r)}catch(t){}return s.bindFramebuffer(m.FRAMEBUFFER.value,a),o}catch(t){}},t.prototype.getCapture=function(t,e,i,n,r,s,o){try{if(this.context.checkFramebufferStatus(m.FRAMEBUFFER.value)!==m.FRAMEBUFFER_COMPLETE.value)return;s=s||m.UNSIGNED_BYTE.value;var a=ae.readPixels(t,e,i,n,r,s);if(!a)return;this.workingCanvas.width=n,this.workingCanvas.height=r;var h=this.workingContext2D.createImageData(n,r);if(h.data.set(a),this.workingContext2D.putImageData(h,0,0),this.fullCapture)this.captureCanvas.width=this.workingCanvas.width,this.captureCanvas.height=this.workingCanvas.height;else{var l=n/r;l<1?(this.captureCanvas.width=le.captureBaseSize*l,this.captureCanvas.height=le.captureBaseSize):l>1?(this.captureCanvas.width=le.captureBaseSize,this.captureCanvas.height=le.captureBaseSize/l):(this.captureCanvas.width=le.captureBaseSize,this.captureCanvas.height=le.captureBaseSize)}return this.captureCanvas.width=Math.max(this.captureCanvas.width,1),this.captureCanvas.height=Math.max(this.captureCanvas.height,1),this.captureContext2D.globalCompositeOperation="copy",this.captureContext2D.scale(1,-1),this.captureContext2D.translate(0,-this.captureCanvas.height),this._setSmoothing(!o),this.captureContext2D.drawImage(this.workingCanvas,0,0,n,r,0,0,this.captureCanvas.width,this.captureCanvas.height),this.captureContext2D.setTransform(1,0,0,1,0,0),this.captureContext2D.globalCompositeOperation="source-over",this.captureCanvas.toDataURL()}catch(t){}},t.prototype.getWebGlConstant=function(t){var e=v[t];return e?e.name:t+""},t.prototype._setSmoothing=function(t){this.captureContext2D.imageSmoothingEnabled=t,this.captureContext2D.mozImageSmoothingEnabled=t,this.captureContext2D.oImageSmoothingEnabled=t,this.captureContext2D.webkitImageSmoothingEnabled=t,this.captureContext2D.msImageSmoothingEnabled=t},t.captureBaseSize=64,t.cubeMapFaces=[m.TEXTURE_CUBE_MAP_POSITIVE_X,m.TEXTURE_CUBE_MAP_POSITIVE_Y,m.TEXTURE_CUBE_MAP_POSITIVE_Z,m.TEXTURE_CUBE_MAP_NEGATIVE_X,m.TEXTURE_CUBE_MAP_NEGATIVE_Y,m.TEXTURE_CUBE_MAP_NEGATIVE_Z],t}(),ce=function(){function t(t){this.context=t.context}return t.prototype.getUboValue=function(e,i,n,r){var s=t.uboTypes[r];if(s){var o=new s.arrayBufferView(n*s.lengthMultiplier),a=this.context,h=a.getIndexedParameter(m.UNIFORM_BUFFER_BINDING.value,e);if(h){var l=a.getIndexedParameter(m.UNIFORM_BUFFER_START.value,e),u=a.getParameter(m.UNIFORM_BUFFER_BINDING.value);try{a.bindBuffer(m.UNIFORM_BUFFER.value,h),a.getBufferSubData(m.UNIFORM_BUFFER.value,l+i,o)}catch(t){return}u&&a.bindBuffer(m.UNIFORM_BUFFER.value,u)}return Array.prototype.slice.call(o)}},t.uboTypes=((gt={})[m.BOOL.value]={arrayBufferView:Uint8Array,lengthMultiplier:1},gt[m.BOOL_VEC2.value]={arrayBufferView:Uint8Array,lengthMultiplier:2},gt[m.BOOL_VEC3.value]={arrayBufferView:Uint8Array,lengthMultiplier:3},gt[m.BOOL_VEC4.value]={arrayBufferView:Uint8Array,lengthMultiplier:4},gt[m.INT.value]={arrayBufferView:Int32Array,lengthMultiplier:1},gt[m.INT_VEC2.value]={arrayBufferView:Int32Array,lengthMultiplier:2},gt[m.INT_VEC3.value]={arrayBufferView:Int32Array,lengthMultiplier:3},gt[m.INT_VEC4.value]={arrayBufferView:Int32Array,lengthMultiplier:4},gt[m.UNSIGNED_INT.value]={arrayBufferView:Uint32Array,lengthMultiplier:1},gt[m.UNSIGNED_INT_VEC2.value]={arrayBufferView:Uint32Array,lengthMultiplier:2},gt[m.UNSIGNED_INT_VEC3.value]={arrayBufferView:Uint32Array,lengthMultiplier:3},gt[m.UNSIGNED_INT_VEC4.value]={arrayBufferView:Uint32Array,lengthMultiplier:4},gt[m.FLOAT.value]={arrayBufferView:Float32Array,lengthMultiplier:1},gt[m.FLOAT_VEC2.value]={arrayBufferView:Float32Array,lengthMultiplier:2},gt[m.FLOAT_VEC3.value]={arrayBufferView:Float32Array,lengthMultiplier:3},gt[m.FLOAT_VEC4.value]={arrayBufferView:Float32Array,lengthMultiplier:4},gt[m.FLOAT_MAT2.value]={arrayBufferView:Float32Array,lengthMultiplier:4},gt[m.FLOAT_MAT2x3.value]={arrayBufferView:Float32Array,lengthMultiplier:6},gt[m.FLOAT_MAT2x4.value]={arrayBufferView:Float32Array,lengthMultiplier:8},gt[m.FLOAT_MAT3.value]={arrayBufferView:Float32Array,lengthMultiplier:9},gt[m.FLOAT_MAT3x2.value]={arrayBufferView:Float32Array,lengthMultiplier:6},gt[m.FLOAT_MAT3x4.value]={arrayBufferView:Float32Array,lengthMultiplier:12},gt[m.FLOAT_MAT4.value]={arrayBufferView:Float32Array,lengthMultiplier:16},gt[m.FLOAT_MAT4x2.value]={arrayBufferView:Float32Array,lengthMultiplier:8},gt[m.FLOAT_MAT4x3.value]={arrayBufferView:Float32Array,lengthMultiplier:12},gt[m.SAMPLER_2D.value]={arrayBufferView:Uint8Array,lengthMultiplier:1},gt[m.SAMPLER_CUBE.value]={arrayBufferView:Uint8Array,lengthMultiplier:1},gt),t}(),de=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),pe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return de(e,t),Object.defineProperty(e.prototype,"typeName",{get:function(){return"WebGLBuffer"},enumerable:!1,configurable:!0}),e}(S),fe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return de(e,t),Object.defineProperty(e.prototype,"typeName",{get:function(){return"WebGLFramebuffer"},enumerable:!1,configurable:!0}),e}(S),me=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return de(e,t),Object.defineProperty(e.prototype,"typeName",{get:function(){return"WebGLProgram"},enumerable:!1,configurable:!0}),e.saveInGlobalStore=function(t){var e=w.getWebGlObjectTag(t);e&&(this.store[e.id]=t)},e.getFromGlobalStore=function(t){return this.store[t]},e.updateInGlobalStore=function(t,e){if(e){var i=this.getFromGlobalStore(t);if(i){var n=w.getWebGlObjectTag(i);n&&(w.attachWebGlObjectTag(e,n),this.store[n.id]=e)}}},e.store={},e}(S),ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return de(e,t),Object.defineProperty(e.prototype,"typeName",{get:function(){return"WebGLQuery"},enumerable:!1,configurable:!0}),e}(S),ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return de(e,t),Object.defineProperty(e.prototype,"typeName",{get:function(){return"WebGLRenderbuffer"},enumerable:!1,configurable:!0}),e}(S),ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return de(e,t),Object.defineProperty(e.prototype,"typeName",{get:function(){return"WebGLSampler"},enumerable:!1,configurable:!0}),e}(S),xe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return de(e,t),Object.defineProperty(e.prototype,"typeName",{get:function(){return"WebGLShader"},enumerable:!1,configurable:!0}),e}(S),Ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return de(e,t),Object.defineProperty(e.prototype,"typeName",{get:function(){return"WebGLSync"},enumerable:!1,configurable:!0}),e}(S),Te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return de(e,t),Object.defineProperty(e.prototype,"typeName",{get:function(){return"WebGLTexture"},enumerable:!1,configurable:!0}),e}(S),_e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return de(e,t),Object.defineProperty(e.prototype,"typeName",{get:function(){return"WebGLTransformFeedback"},enumerable:!1,configurable:!0}),e}(S),we=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return de(e,t),Object.defineProperty(e.prototype,"typeName",{get:function(){return"WebGLUniformLocation"},enumerable:!1,configurable:!0}),e}(S),Se=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return de(e,t),Object.defineProperty(e.prototype,"typeName",{get:function(){return"WebGLVertexArrayObject"},enumerable:!1,configurable:!0}),e}(S),be=function(){function t(){}return t.getProgramData=function(t,e){for(var i={LINK_STATUS:t.getProgramParameter(e,m.LINK_STATUS.value),VALIDATE_STATUS:t.getProgramParameter(e,m.VALIDATE_STATUS.value)},n=t.getAttachedShaders(e),r=new Array(2),s=0,o=0,a=n;o<a.length;o++){var h=a[o],l=this.readShaderFromContext(t,h);s+=l.source.length,l.shaderType===m.FRAGMENT_SHADER.name?r[1]=l:r[0]=l}return{programStatus:i,shaders:r,length:s}},t.readShaderFromContext=function(t,e){var i=t.getShaderSource(e),n=t.getExtension("WEBGL_debug_shaders"),r=n?n.getTranslatedShaderSource(e):null,s=t.getShaderParameter(e,m.SHADER_TYPE.value)===m.FRAGMENT_SHADER.value,o=e&&e.__SPECTOR_Metadata&&e.__SPECTOR_Metadata.name?e.__SPECTOR_Metadata.name:this.readNameFromShaderSource(i);return o||(o=s?"Fragment":"Vertex"),{COMPILE_STATUS:t.getShaderParameter(e,m.COMPILE_STATUS.value),shaderType:s?m.FRAGMENT_SHADER.name:m.VERTEX_SHADER.name,name:o,source:i,translatedSource:r}},t.readNameFromShaderSource=function(t){try{var e="",i=void 0,n=/#define[\s]+SHADER_NAME[\s]+([\S]+)(\n|$)/gi;if(null!==(i=n.exec(t))&&(i.index===n.lastIndex&&n.lastIndex++,e=i[1]),""===e){var r=/#define[\s]+SHADER_NAME_B64[\s]+([\S]+)(\n|$)/gi;null!==(i=r.exec(t))&&(i.index===r.lastIndex&&r.lastIndex++,e=i[1]),e&&(e=decodeURIComponent(atob(e)))}return e}catch(t){return null}},t}(),Ce=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ae=function(){return Ae=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},Ae.apply(this,arguments)},Re=function(t){function e(e){var i=t.call(this,e)||this;return i.drawCallTextureInputState=new ue(e),i.drawCallUboInputState=new ce(e),i}return Ce(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return e.stateName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requireStartAndStopStates",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.getConsumeCommands=function(){return d},e.prototype.getChangeCommandsByState=function(){return{}},e.prototype.readFromContext=function(){var t,i,n=this.context.getParameter(m.CURRENT_PROGRAM.value);if(n){this.currentState.frameBuffer=this.readFrameBufferFromContext();var s=n.__SPECTOR_Object_CustomData?n.__SPECTOR_Object_CustomData:be.getProgramData(this.context,n);if(this.currentState.programStatus=Ae({},s.programStatus),this.currentState.programStatus.program=this.getSpectorData(n),this.currentState.programStatus.RECOMPILABLE=r.isBuildableProgram(n),this.currentState.programStatus.RECOMPILABLE&&me.saveInGlobalStore(n),this.currentState.shaders=s.shaders,(null===(t=this.lastCommandName)||void 0===t?void 0:t.indexOf("Elements"))>=0){var o=this.context.getParameter(this.context.ELEMENT_ARRAY_BUFFER_BINDING);o&&(this.currentState.elementArray={},this.currentState.elementArray.arrayBuffer=this.getSpectorData(o))}var a=this.context.getProgramParameter(n,m.ACTIVE_ATTRIBUTES.value);this.currentState.attributes=[];for(var h=0;h<a;h++){var l=this.readAttributeFromContext(n,h);this.currentState.attributes.push(l)}var u=this.context.getProgramParameter(n,m.ACTIVE_UNIFORMS.value);this.currentState.uniforms=[];var c=[];for(h=0;h<u;h++){c.push(h);var d=this.readUniformFromContext(n,h);this.currentState.uniforms.push(d)}if(this.contextVersion>1){var p=this.context.getProgramParameter(n,m.ACTIVE_UNIFORM_BLOCKS.value);for(this.currentState.uniformBlocks=[],h=0;h<p;h++){var f=this.readUniformBlockFromContext(n,h);this.currentState.uniformBlocks.push(f)}if(this.readUniformsFromContextIntoState(n,c,this.currentState.uniforms,this.currentState.uniformBlocks),this.context.getParameter(m.TRANSFORM_FEEDBACK_ACTIVE.value)){var g=this.context.getProgramParameter(n,m.TRANSFORM_FEEDBACK_BUFFER_MODE.value);this.currentState.transformFeedbackMode=this.getWebGlConstant(g),this.currentState.transformFeedbacks=[];var v=this.context.getProgramParameter(n,m.TRANSFORM_FEEDBACK_VARYINGS.value);for(h=0;h<v;h++){var y=this.readTransformFeedbackFromContext(n,h);this.currentState.transformFeedbacks.push(y)}}}for(h=0;h<c.length;h++){var x=null!==(i=(d=this.currentState.uniforms[h]).value)&&void 0!==i?i:d.values;if(null!=x){var E=e.samplerTypes[d.typeValue];if(E)if(x.length){d.textures=[];for(var T=0;T<x.length;T++)d.textures.push(this.readTextureFromContext(x[T].value,E))}else d.texture=this.readTextureFromContext(x,E)}delete d.typeValue}}},e.prototype.readFrameBufferFromContext=function(){var t=this.context.getParameter(m.FRAMEBUFFER_BINDING.value);if(!t)return null;var e={};if(e.frameBuffer=this.getSpectorData(t),this.readFrameBufferAttachmentFromContext(m.DEPTH_ATTACHMENT.value)&&(e.depthAttachment=this.readFrameBufferAttachmentFromContext(m.DEPTH_ATTACHMENT.value)),this.readFrameBufferAttachmentFromContext(m.STENCIL_ATTACHMENT.value)&&(e.stencilAttachment=this.readFrameBufferAttachmentFromContext(m.STENCIL_ATTACHMENT.value)),this.extensions[m.MAX_DRAW_BUFFERS_WEBGL.extensionName]){e.colorAttachments=[];for(var i=this.context.getParameter(m.MAX_DRAW_BUFFERS_WEBGL.value),n=0;n<i;n++)(s=this.readFrameBufferAttachmentFromContext(g["COLOR_ATTACHMENT"+n+"_WEBGL"].value))&&e.colorAttachments.push(s)}else if(this.contextVersion>1){var r=this.context;for(e.colorAttachments=[],i=r.getParameter(m.MAX_DRAW_BUFFERS.value),n=0;n<i;n++)(s=this.readFrameBufferAttachmentFromContext(g["COLOR_ATTACHMENT"+n].value))&&e.colorAttachments.push(s)}else{var s;(s=this.readFrameBufferAttachmentFromContext(g.COLOR_ATTACHMENT0.value))&&(e.colorAttachments=[s])}return e},e.prototype.readFrameBufferAttachmentFromContext=function(t){var e=m.FRAMEBUFFER.value,i=this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.value);if(i!==m.NONE.value){var n={},r=this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME.value);if(i===m.RENDERBUFFER.value){if(n.type="RENDERBUFFER",n.buffer=this.getSpectorData(r),r){var s=r.__SPECTOR_Object_CustomData;s&&(s.internalFormat&&(n.internalFormat=this.getWebGlConstant(s.internalFormat)),n.width=s.width,n.height=s.height,n.msaaSamples=s.samples)}}else if(i===m.TEXTURE.value){n.type="TEXTURE",n.texture=this.getSpectorData(r),n.textureLevel=this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL.value);var o=this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE.value);n.textureCubeMapFace=this.getWebGlConstant(o),this.drawCallTextureInputState.appendTextureState(n,r,null,this.fullCapture)}return this.extensions.EXT_sRGB&&(n.encoding=this.getWebGlConstant(this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT.value))),this.contextVersion>1&&(n.alphaSize=this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE.value),n.blueSize=this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE.value),n.encoding=this.getWebGlConstant(this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING.value)),n.componentType=this.getWebGlConstant(this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE.value)),n.depthSize=this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE.value),n.greenSize=this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE.value),n.redSize=this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_RED_SIZE.value),n.stencilSize=this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE.value),i===m.TEXTURE.value&&(n.textureLayer=this.context.getFramebufferAttachmentParameter(e,t,m.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER.value))),n}},e.prototype.readAttributeFromContext=function(t,e){var i=this.context.getActiveAttrib(t,e),n=this.context.getAttribLocation(t,i.name);if(-1===n)return{name:i.name,size:i.size,type:this.getWebGlConstant(i.type),location:-1};var r=this.context.getVertexAttrib(n,m.CURRENT_VERTEX_ATTRIB.value),s=this.context.getVertexAttrib(n,m.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING.value),o={name:i.name,size:i.size,type:this.getWebGlConstant(i.type),location:n,offsetPointer:this.context.getVertexAttribOffset(n,m.VERTEX_ATTRIB_ARRAY_POINTER.value),bufferBinding:this.getSpectorData(s),enabled:this.context.getVertexAttrib(n,m.VERTEX_ATTRIB_ARRAY_ENABLED.value),arraySize:this.context.getVertexAttrib(n,m.VERTEX_ATTRIB_ARRAY_SIZE.value),stride:this.context.getVertexAttrib(n,m.VERTEX_ATTRIB_ARRAY_STRIDE.value),arrayType:this.getWebGlConstant(this.context.getVertexAttrib(n,m.VERTEX_ATTRIB_ARRAY_TYPE.value)),normalized:this.context.getVertexAttrib(n,m.VERTEX_ATTRIB_ARRAY_NORMALIZED.value),vertexAttrib:Array.prototype.slice.call(r)};return this.extensions[m.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE.extensionName]?o.divisor=this.context.getVertexAttrib(n,m.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE.value):this.contextVersion>1&&(o.integer=this.context.getVertexAttrib(n,m.VERTEX_ATTRIB_ARRAY_INTEGER.value),o.divisor=this.context.getVertexAttrib(n,m.VERTEX_ATTRIB_ARRAY_DIVISOR.value)),this.appendBufferCustomData(o,s),o},e.prototype.readUniformFromContext=function(t,e){var i=this.context.getActiveUniform(t,e),n=this.context.getUniformLocation(t,i.name);if(n){if(i.size>1&&i.name&&i.name.indexOf("[0]")===i.name.length-3){for(var r=[],s=0;s<i.size;s++){var o=this.context.getUniformLocation(t,i.name.replace("[0]","["+s+"]"));o&&((a=this.context.getUniform(t,o)).length&&(a=Array.prototype.slice.call(a)),r.push({value:a}))}return{name:i.name.replace("[0]",""),size:i.size,type:this.getWebGlConstant(i.type),typeValue:i.type,location:this.getSpectorData(n),values:r}}var a;return(a=this.context.getUniform(t,n)).length&&(a=Array.prototype.slice.call(a)),{name:i.name,size:i.size,type:this.getWebGlConstant(i.type),typeValue:i.type,location:this.getSpectorData(n),value:a}}return{name:i.name,size:i.size,type:this.getWebGlConstant(i.type),typeValue:i.type}},e.prototype.readTextureFromContext=function(t,e){var i=this.context.getParameter(m.ACTIVE_TEXTURE.value);this.context.activeTexture(m.TEXTURE0.value+t);var n={magFilter:this.getWebGlConstant(this.context.getTexParameter(e.value,m.TEXTURE_MAG_FILTER.value)),minFilter:this.getWebGlConstant(this.context.getTexParameter(e.value,m.TEXTURE_MIN_FILTER.value)),wrapS:this.getWebGlConstant(this.context.getTexParameter(e.value,m.TEXTURE_WRAP_S.value)),wrapT:this.getWebGlConstant(this.context.getTexParameter(e.value,m.TEXTURE_WRAP_T.value))};if(this.extensions[m.TEXTURE_MAX_ANISOTROPY_EXT.extensionName]&&(n.anisotropy=this.context.getTexParameter(e.value,m.TEXTURE_MAX_ANISOTROPY_EXT.value)),this.contextVersion>1){n.baseLevel=this.context.getTexParameter(e.value,m.TEXTURE_BASE_LEVEL.value),n.immutable=this.context.getTexParameter(e.value,m.TEXTURE_IMMUTABLE_FORMAT.value),n.immutableLevels=this.context.getTexParameter(e.value,m.TEXTURE_IMMUTABLE_LEVELS.value),n.maxLevel=this.context.getTexParameter(e.value,m.TEXTURE_MAX_LEVEL.value);var r=this.context.getParameter(m.SAMPLER_BINDING.value);if(r){n.sampler=this.getSpectorData(r);var s=this.context;n.samplerMaxLod=s.getSamplerParameter(r,m.TEXTURE_MAX_LOD.value),n.samplerMinLod=s.getSamplerParameter(r,m.TEXTURE_MIN_LOD.value),n.samplerCompareFunc=this.getWebGlConstant(s.getSamplerParameter(r,m.TEXTURE_COMPARE_FUNC.value)),n.samplerCompareMode=this.getWebGlConstant(s.getSamplerParameter(r,m.TEXTURE_COMPARE_MODE.value)),n.samplerWrapS=this.getWebGlConstant(s.getSamplerParameter(r,m.TEXTURE_WRAP_S.value)),n.samplerWrapT=this.getWebGlConstant(s.getSamplerParameter(r,m.TEXTURE_WRAP_T.value)),n.samplerWrapR=this.getWebGlConstant(s.getSamplerParameter(r,m.TEXTURE_WRAP_R.value)),n.samplerMagFilter=this.getWebGlConstant(s.getSamplerParameter(r,m.TEXTURE_MAG_FILTER.value)),n.samplerMinFilter=this.getWebGlConstant(s.getSamplerParameter(r,m.TEXTURE_MIN_FILTER.value))}else n.maxLod=this.context.getTexParameter(e.value,m.TEXTURE_MAX_LOD.value),n.minLod=this.context.getTexParameter(e.value,m.TEXTURE_MIN_LOD.value),n.compareFunc=this.getWebGlConstant(this.context.getTexParameter(e.value,m.TEXTURE_COMPARE_FUNC.value)),n.compareMode=this.getWebGlConstant(this.context.getTexParameter(e.value,m.TEXTURE_COMPARE_MODE.value)),n.wrapR=this.getWebGlConstant(this.context.getTexParameter(e.value,m.TEXTURE_WRAP_R.value))}var o=this.getTextureStorage(e);if(o){var a=this.quickCapture?null:e;this.drawCallTextureInputState.appendTextureState(n,o,a,this.fullCapture)}return this.context.activeTexture(i),n},e.prototype.getTextureStorage=function(t){return t===m.TEXTURE_2D?this.context.getParameter(m.TEXTURE_BINDING_2D.value):t===m.TEXTURE_CUBE_MAP?this.context.getParameter(m.TEXTURE_BINDING_CUBE_MAP.value):t===m.TEXTURE_3D?this.context.getParameter(m.TEXTURE_BINDING_3D.value):t===m.TEXTURE_2D_ARRAY?this.context.getParameter(m.TEXTURE_BINDING_2D_ARRAY.value):void 0},e.prototype.readUniformsFromContextIntoState=function(t,e,i,n){for(var r=this.context,s=r.getActiveUniforms(t,e,m.UNIFORM_TYPE.value),o=r.getActiveUniforms(t,e,m.UNIFORM_SIZE.value),a=r.getActiveUniforms(t,e,m.UNIFORM_BLOCK_INDEX.value),h=r.getActiveUniforms(t,e,m.UNIFORM_OFFSET.value),l=r.getActiveUniforms(t,e,m.UNIFORM_ARRAY_STRIDE.value),u=r.getActiveUniforms(t,e,m.UNIFORM_MATRIX_STRIDE.value),c=r.getActiveUniforms(t,e,m.UNIFORM_IS_ROW_MAJOR.value),d=0;d<e.length;d++){var p=i[d];if(p.type=this.getWebGlConstant(s[d]),p.size=o[d],p.blockIndice=a[d],p.blockIndice>-1&&(p.blockName=r.getActiveUniformBlockName(t,p.blockIndice)),p.offset=h[d],p.arrayStride=l[d],p.matrixStride=u[d],p.rowMajor=c[d],p.blockIndice>-1){var f=n[a[d]].bindingPoint;p.value=this.drawCallUboInputState.getUboValue(f,p.offset,p.size,s[d])}}},e.prototype.readTransformFeedbackFromContext=function(t,e){var i=this.context,n=i.getTransformFeedbackVarying(t,e),r=i.getIndexedParameter(m.TRANSFORM_FEEDBACK_BUFFER_BINDING.value,e),s={name:n.name,size:n.size,type:this.getWebGlConstant(n.type),buffer:this.getSpectorData(r),bufferSize:i.getIndexedParameter(m.TRANSFORM_FEEDBACK_BUFFER_SIZE.value,e),bufferStart:i.getIndexedParameter(m.TRANSFORM_FEEDBACK_BUFFER_START.value,e)};return this.appendBufferCustomData(s,r),s},e.prototype.readUniformBlockFromContext=function(t,e){var i=this.context,n=i.getActiveUniformBlockParameter(t,e,m.UNIFORM_BLOCK_BINDING.value),r=i.getIndexedParameter(m.UNIFORM_BUFFER_BINDING.value,n),s={name:i.getActiveUniformBlockName(t,e),bindingPoint:n,size:i.getActiveUniformBlockParameter(t,e,m.UNIFORM_BLOCK_DATA_SIZE.value),activeUniformCount:i.getActiveUniformBlockParameter(t,e,m.UNIFORM_BLOCK_ACTIVE_UNIFORMS.value),vertex:i.getActiveUniformBlockParameter(t,e,m.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER.value),fragment:i.getActiveUniformBlockParameter(t,e,m.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER.value),buffer:this.getSpectorData(r)};return this.appendBufferCustomData(s,r),s},e.prototype.appendBufferCustomData=function(t,e){if(e){var i=e.__SPECTOR_Object_CustomData;i&&(i.usage&&(t.bufferUsage=this.getWebGlConstant(i.usage)),t.bufferLength=i.length,i.offset&&(t.bufferOffset=i.offset),i.sourceLength&&(t.bufferSourceLength=i.sourceLength))}},e.prototype.getWebGlConstant=function(t){var e=v[t];return e?e.name:t},e.stateName="DrawCall",e.samplerTypes=((vt={})[m.SAMPLER_2D.value]=m.TEXTURE_2D,vt[m.SAMPLER_CUBE.value]=m.TEXTURE_CUBE_MAP,vt[m.SAMPLER_3D.value]=m.TEXTURE_3D,vt[m.SAMPLER_2D_SHADOW.value]=m.TEXTURE_2D,vt[m.SAMPLER_2D_ARRAY.value]=m.TEXTURE_2D_ARRAY,vt[m.SAMPLER_2D_ARRAY_SHADOW.value]=m.TEXTURE_2D_ARRAY,vt[m.SAMPLER_CUBE_SHADOW.value]=m.TEXTURE_CUBE_MAP,vt[m.INT_SAMPLER_2D.value]=m.TEXTURE_2D,vt[m.INT_SAMPLER_3D.value]=m.TEXTURE_3D,vt[m.INT_SAMPLER_CUBE.value]=m.TEXTURE_CUBE_MAP,vt[m.INT_SAMPLER_2D_ARRAY.value]=m.TEXTURE_2D_ARRAY,vt[m.UNSIGNED_INT_SAMPLER_2D.value]=m.TEXTURE_2D,vt[m.UNSIGNED_INT_SAMPLER_3D.value]=m.TEXTURE_3D,vt[m.UNSIGNED_INT_SAMPLER_CUBE.value]=m.TEXTURE_CUBE_MAP,vt[m.UNSIGNED_INT_SAMPLER_2D_ARRAY.value]=m.TEXTURE_2D_ARRAY,vt),e}(Ft),Me=function(){function t(t){this.contextInformation=t,this.stateTrackers=[],this.onCommandCapturedCallbacks={},this.initStateTrackers()}return t.prototype.startCapture=function(t,e,i){for(var n=0,r=this.stateTrackers;n<r.length;n++){var s=r[n],o=s.startCapture(!0,e,i);s.requireStartAndStopStates&&(t.initState[s.stateName]=o)}},t.prototype.stopCapture=function(t){for(var e=0,i=this.stateTrackers;e<i.length;e++){var n=i[e],r=n.stopCapture();n.requireStartAndStopStates&&(t.endState[n.stateName]=r)}},t.prototype.captureState=function(t){var e=this.onCommandCapturedCallbacks[t.name];if(e)for(var i=0,n=e;i<n.length;i++)(0,n[i])(t)},t.prototype.initStateTrackers=function(){this.stateTrackers.push(new kt(this.contextInformation),new Ut(this.contextInformation),new Wt(this.contextInformation),new Vt(this.contextInformation),new Ht(this.contextInformation),new Yt(this.contextInformation),new Kt(this.contextInformation),new Zt(this.contextInformation),new Jt(this.contextInformation),new ee(this.contextInformation),new re(this.contextInformation),new oe(this.contextInformation),new le(this.contextInformation),new Re(this.contextInformation));for(var t=0,e=this.stateTrackers;t<e.length;t++)e[t].registerCallbacks(this.onCommandCapturedCallbacks)},t}(),Le=function(){function t(e){this.options=e,this.createCommandNames=this.getCreateCommandNames(),this.updateCommandNames=this.getUpdateCommandNames(),this.deleteCommandNames=this.getDeleteCommandNames(),this.startTime=h.now,this.memoryPerSecond={},this.totalMemory=0,this.frameMemory=0,this.capturing=!1,t.initializeByteSizeFormat()}return t.initializeByteSizeFormat=function(){var t;this.byteSizePerInternalFormat||(this.byteSizePerInternalFormat=((t={})[m.R8.value]=1,t[m.R16F.value]=2,t[m.R32F.value]=4,t[m.R8UI.value]=1,t[m.RG8.value]=2,t[m.RG16F.value]=4,t[m.RG32F.value]=8,t[m.ALPHA.value]=1,t[m.RGB.value]=3,t[m.RGBA.value]=4,t[m.LUMINANCE.value]=1,t[m.LUMINANCE_ALPHA.value]=2,t[m.DEPTH_COMPONENT.value]=1,t[m.DEPTH_STENCIL.value]=2,t[m.SRGB_EXT.value]=3,t[m.SRGB_ALPHA_EXT.value]=4,t[m.RGB8.value]=3,t[m.SRGB8.value]=3,t[m.RGB565.value]=2,t[m.R11F_G11F_B10F.value]=4,t[m.RGB9_E5.value]=2,t[m.RGB16F.value]=6,t[m.RGB32F.value]=12,t[m.RGB8UI.value]=3,t[m.RGBA8.value]=4,t[m.RGB5_A1.value]=2,t[m.RGBA16F.value]=8,t[m.RGBA32F.value]=16,t[m.RGBA8UI.value]=4,t[m.COMPRESSED_R11_EAC.value]=4,t[m.COMPRESSED_SIGNED_R11_EAC.value]=4,t[m.COMPRESSED_RG11_EAC.value]=4,t[m.COMPRESSED_SIGNED_RG11_EAC.value]=4,t[m.COMPRESSED_RGB8_ETC2.value]=4,t[m.COMPRESSED_RGBA8_ETC2_EAC.value]=4,t[m.COMPRESSED_SRGB8_ETC2.value]=4,t[m.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC.value]=4,t[m.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2.value]=4,t[m.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2.value]=4,t[m.COMPRESSED_RGB_S3TC_DXT1_EXT.value]=.5,t[m.COMPRESSED_RGBA_S3TC_DXT3_EXT.value]=1,t[m.COMPRESSED_RGBA_S3TC_DXT5_EXT.value]=1,t[m.COMPRESSED_RGB_PVRTC_4BPPV1_IMG.value]=.5,t[m.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG.value]=.5,t[m.COMPRESSED_RGB_PVRTC_2BPPV1_IMG.value]=.25,t[m.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG.value]=.25,t[m.COMPRESSED_RGB_ETC1_WEBGL.value]=.5,t[m.COMPRESSED_RGB_ATC_WEBGL.value]=.5,t[m.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL.value]=1,t[m.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL.value]=1,t))},t.prototype.registerCallbacks=function(t){for(var e=0,i=this.createCommandNames;e<i.length;e++)t[a=i[e]]=t[a]||[],t[a].push(this.createWithoutSideEffects.bind(this));for(var n=0,r=this.updateCommandNames;n<r.length;n++)t[a=r[n]]=t[a]||[],t[a].push(this.updateWithoutSideEffects.bind(this));for(var s=0,o=this.deleteCommandNames;s<o.length;s++){var a;t[a=o[s]]=t[a]||[],t[a].push(this.deleteWithoutSideEffects.bind(this))}},t.prototype.startCapture=function(){this.frameMemory=0,this.capturing=!0},t.prototype.stopCapture=function(){this.frameMemory=0,this.capturing=!1},t.prototype.appendRecordedInformation=function(t){t.frameMemory[this.objectName]=this.frameMemory,t.memory[this.objectName]=this.memoryPerSecond},t.prototype.create=function(t){},t.prototype.createWithoutSideEffects=function(t){this.options.toggleCapture(!1),this.create(t),this.options.toggleCapture(!0)},t.prototype.updateWithoutSideEffects=function(t){if(t&&0!==t.arguments.length){this.options.toggleCapture(!1);var e=t.arguments[0],i=this.getBoundInstance(e);if(i)if(w.getWebGlObjectTag(i)){var n=this.getWebGlConstant(e),r=this.update(t,n,i);this.changeMemorySize(r),this.options.toggleCapture(!0)}else this.options.toggleCapture(!0);else this.options.toggleCapture(!0)}},t.prototype.deleteWithoutSideEffects=function(t){if(t&&t.arguments&&!(t.arguments.length<1)){var e=t.arguments[0];if(e){this.options.toggleCapture(!1);var i=this.delete(e);this.changeMemorySize(-i),this.options.toggleCapture(!0)}}},t.prototype.changeMemorySize=function(t){this.totalMemory+=t,this.capturing&&(this.frameMemory+=t);var e=h.now-this.startTime,i=Math.round(e/1e3);this.memoryPerSecond[i]=this.totalMemory},t.prototype.getWebGlConstant=function(t){var e=v[t];return e?e.name:t+""},t.prototype.getByteSizeForInternalFormat=function(e){return t.byteSizePerInternalFormat[e]||4},t}(),Oe=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Oe(e,t),Object.defineProperty(e.prototype,"objectName",{get:function(){return"Buffer"},enumerable:!1,configurable:!0}),e.prototype.getCreateCommandNames=function(){return["createBuffer"]},e.prototype.getUpdateCommandNames=function(){return["bufferData"]},e.prototype.getDeleteCommandNames=function(){return["deleteBuffer"]},e.prototype.getBoundInstance=function(t){var e=this.options.context;return t===m.ARRAY_BUFFER.value?e.getParameter(m.ARRAY_BUFFER_BINDING.value):t===m.ELEMENT_ARRAY_BUFFER.value?e.getParameter(m.ELEMENT_ARRAY_BUFFER_BINDING.value):t===m.COPY_READ_BUFFER.value?e.getParameter(m.COPY_READ_BUFFER_BINDING.value):t===m.COPY_WRITE_BUFFER.value?e.getParameter(m.COPY_WRITE_BUFFER_BINDING.value):t===m.TRANSFORM_FEEDBACK_BUFFER.value?e.getParameter(m.TRANSFORM_FEEDBACK_BUFFER_BINDING.value):t===m.UNIFORM_BUFFER.value?e.getParameter(m.UNIFORM_BUFFER_BINDING.value):t===m.PIXEL_PACK_BUFFER.value?e.getParameter(m.PIXEL_PACK_BUFFER_BINDING.value):t===m.PIXEL_UNPACK_BUFFER.value?e.getParameter(m.PIXEL_UNPACK_BUFFER_BINDING.value):void 0},e.prototype.delete=function(t){var e=t.__SPECTOR_Object_CustomData;return e?e.length:0},e.prototype.update=function(t,e,i){var n=this.getCustomData(e,t);if(!n)return 0;var r=i.__SPECTOR_Object_CustomData?i.__SPECTOR_Object_CustomData.length:0;return i.__SPECTOR_Object_CustomData=n,n.length-r},e.prototype.getCustomData=function(t,e){var i=this.getLength(e);return e.arguments.length>=4?{target:t,length:i,usage:e.arguments[2],offset:e.arguments[3],sourceLength:e.arguments[1]?e.arguments[1].length:-1}:3===e.arguments.length?{target:t,length:i,usage:e.arguments[2]}:void 0},e.prototype.getLength=function(t){var e=-1,i=0;return 5===t.arguments.length&&(e=t.arguments[4],i=t.arguments[3]),e<=0&&(e="number"==typeof t.arguments[1]?t.arguments[1]:t.arguments[1]&&(t.arguments[1].byteLength||t.arguments[1].length)||0),e-i},e}(Le),Fe=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fe(e,t),Object.defineProperty(e.prototype,"objectName",{get:function(){return"Renderbuffer"},enumerable:!1,configurable:!0}),e.prototype.getCreateCommandNames=function(){return["createRenderbuffer"]},e.prototype.getUpdateCommandNames=function(){return["renderbufferStorage","renderbufferStorageMultisample"]},e.prototype.getDeleteCommandNames=function(){return["deleteRenderbuffer"]},e.prototype.getBoundInstance=function(t){var e=this.options.context;if(t===m.RENDERBUFFER.value)return e.getParameter(m.RENDERBUFFER_BINDING.value)},e.prototype.delete=function(t){var e=t.__SPECTOR_Object_CustomData;return e?e.length:0},e.prototype.update=function(t,e,i){var n=this.getCustomData(t,e);if(!n)return 0;var r=i.__SPECTOR_Object_CustomData?i.__SPECTOR_Object_CustomData.length:0;return n.length=n.width*n.height*this.getByteSizeForInternalFormat(n.internalFormat),i.__SPECTOR_Object_CustomData=n,n.length-r},e.prototype.getCustomData=function(t,e){return 4===t.arguments.length?{target:e,internalFormat:t.arguments[1],width:t.arguments[2],height:t.arguments[3],length:0,samples:0}:{target:e,internalFormat:t.arguments[2],width:t.arguments[3],height:t.arguments[4],length:0,samples:t.arguments[1]}},e}(Le),De=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ne=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return De(e,t),Object.defineProperty(e.prototype,"objectName",{get:function(){return"Texture2d"},enumerable:!1,configurable:!0}),e.prototype.getCreateCommandNames=function(){return["createTexture"]},e.prototype.getUpdateCommandNames=function(){return["texImage2D","compressedTexImage2D","texStorage2D"]},e.prototype.getDeleteCommandNames=function(){return["deleteTexture"]},e.prototype.getBoundInstance=function(t){var e=this.options.context;return t===m.TEXTURE_2D.value?e.getParameter(m.TEXTURE_BINDING_2D.value):t===m.TEXTURE_CUBE_MAP_POSITIVE_X.value||t===m.TEXTURE_CUBE_MAP_POSITIVE_Y.value||t===m.TEXTURE_CUBE_MAP_POSITIVE_Z.value||t===m.TEXTURE_CUBE_MAP_NEGATIVE_X.value||t===m.TEXTURE_CUBE_MAP_NEGATIVE_Y.value||t===m.TEXTURE_CUBE_MAP_NEGATIVE_Z.value?e.getParameter(m.TEXTURE_BINDING_CUBE_MAP.value):void 0},e.prototype.delete=function(t){var e=t.__SPECTOR_Object_CustomData;return e?e.target===m.TEXTURE_2D_ARRAY.name||e.target===m.TEXTURE_3D.name?0:e.length:0},e.prototype.update=function(t,e,i){var n=this.getCustomData(t,e,i);if(!n)return 0;var r=i.__SPECTOR_Object_CustomData?i.__SPECTOR_Object_CustomData.length:0;if(n.isCompressed){if(t.arguments.length>=7){var s=t.arguments[6];n.length="number"==typeof s?s:null==s?void 0:s.byteLength}}else{var o="TEXTURE_2D"===e?1:6,a=n.internalFormat;a===m.RGBA.value&&(n.type===m.FLOAT.value&&(a=m.RGBA32F.value),n.type===m.HALF_FLOAT_OES.value&&(a=m.RGBA16F.value)),n.length=n.width*n.height*o*this.getByteSizeForInternalFormat(a)}return n.length=0|n.length,i.__SPECTOR_Object_CustomData=n,n.length-r},e.prototype.getCustomData=function(t,e,i){return"texImage2D"===t.name?this.getTexImage2DCustomData(t,e,i):"compressedTexImage2D"===t.name?this.getCompressedTexImage2DCustomData(t,e,i):"texStorage2D"===t.name?this.getTexStorage2DCustomData(t,e,i):void 0},e.prototype.getTexStorage2DCustomData=function(t,e,i){var n;return 5===t.arguments.length&&(n={target:e,internalFormat:t.arguments[2],width:t.arguments[3],height:t.arguments[4],length:0,isCompressed:!1}),n},e.prototype.getCompressedTexImage2DCustomData=function(t,e,i){var n;if(0===t.arguments[1])return t.arguments.length>=7&&(n={target:e,internalFormat:t.arguments[2],width:t.arguments[3],height:t.arguments[4],length:0,isCompressed:!0}),n},e.prototype.getTexImage2DCustomData=function(t,e,i){var n;if(0===t.arguments[1])return t.arguments.length>=8?n={target:e,internalFormat:t.arguments[2],width:t.arguments[3],height:t.arguments[4],format:t.arguments[6],type:t.arguments[7],length:0,isCompressed:!1}:6===t.arguments.length&&(n={target:e,internalFormat:t.arguments[2],width:t.arguments[5].width,height:t.arguments[5].height,format:t.arguments[3],type:t.arguments[4],length:0,isCompressed:!1}),n},e}(Le),ke=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Be=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ke(e,t),Object.defineProperty(e.prototype,"objectName",{get:function(){return"Texture3d"},enumerable:!1,configurable:!0}),e.prototype.getCreateCommandNames=function(){return["createTexture"]},e.prototype.getUpdateCommandNames=function(){return["texImage3D","compressedTexImage3D","texStorage3D"]},e.prototype.getDeleteCommandNames=function(){return["deleteTexture"]},e.prototype.getBoundInstance=function(t){var e=this.options.context;return t===m.TEXTURE_2D_ARRAY.value?e.getParameter(m.TEXTURE_BINDING_2D_ARRAY.value):t===m.TEXTURE_3D.value?e.getParameter(m.TEXTURE_BINDING_3D.value):void 0},e.prototype.delete=function(t){var e=t.__SPECTOR_Object_CustomData;return e?e.target!==m.TEXTURE_2D_ARRAY.name&&e.target!==m.TEXTURE_3D.name?0:e.length:0},e.prototype.update=function(t,e,i){if(t.arguments.length>=2&&0!==t.arguments[1])return 0;var n=this.getCustomData(t,e,i);if(!n)return 0;var r=i.__SPECTOR_Object_CustomData?i.__SPECTOR_Object_CustomData.length:0;if(n.isCompressed){if(t.arguments.length>=7){var s=t.arguments[6];n.length="number"==typeof s?s:null==s?void 0:s.byteLength}}else n.length=n.width*n.height*n.depth*this.getByteSizeForInternalFormat(n.internalFormat);return n.length=0|n.length,i.__SPECTOR_Object_CustomData=n,n.length-r},e.prototype.getCustomData=function(t,e,i){return"texImage3D"===t.name?this.getTexImage3DCustomData(t,e,i):"compressedTexImage3D"===t.name?this.getCompressedTexImage3DCustomData(t,e,i):"texStorage3D"===t.name?this.getTexStorage3DCustomData(t,e,i):void 0},e.prototype.getTexStorage3DCustomData=function(t,e,i){var n;return 6===t.arguments.length&&(n={target:e,internalFormat:t.arguments[2],width:t.arguments[3],height:t.arguments[4],depth:t.arguments[5],length:0,isCompressed:!1}),n},e.prototype.getCompressedTexImage3DCustomData=function(t,e,i){var n;if(0===t.arguments[1])return t.arguments.length>=8&&(n={target:e,internalFormat:t.arguments[2],width:t.arguments[3],height:t.arguments[4],depth:t.arguments[5],length:0,isCompressed:!0}),n},e.prototype.getTexImage3DCustomData=function(t,e,i){var n;if(0===t.arguments[1])return t.arguments.length>=9&&(n={target:e,internalFormat:t.arguments[2],width:t.arguments[3],height:t.arguments[4],depth:t.arguments[5],format:t.arguments[7],type:t.arguments[8],length:0,isCompressed:!1}),n},e}(Le),Ue=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ue(e,t),Object.defineProperty(e.prototype,"objectName",{get:function(){return"Program"},enumerable:!1,configurable:!0}),e.prototype.getCreateCommandNames=function(){return["createProgram"]},e.prototype.getUpdateCommandNames=function(){return["linkProgram"]},e.prototype.getDeleteCommandNames=function(){return["deleteProgram"]},e.prototype.getBoundInstance=function(t){return t},e.prototype.delete=function(t){var e=t.__SPECTOR_Object_CustomData;return e?e.length:0},e.prototype.update=function(t,e,i){if(t.arguments.length>=1&&!t.arguments[0])return 0;var n=this.getCustomData(i);if(!n)return 0;var r=i.__SPECTOR_Object_CustomData?i.__SPECTOR_Object_CustomData.length:0;return i.__SPECTOR_Object_CustomData=n,n.length-r},e.prototype.getCustomData=function(t){var e=this.options.context;return be.getProgramData(e,t)},e}(Le),We=function(){function t(t){this.contextInformation=t,this.onCommandCallbacks={},this.recorders=[],this.initRecorders()}return t.prototype.recordCommand=function(t){var e=this.onCommandCallbacks[t.name];if(e)for(var i=0,n=e;i<n.length;i++)(0,n[i])(t)},t.prototype.startCapture=function(){for(var t=0,e=this.recorders;t<e.length;t++)e[t].startCapture()},t.prototype.stopCapture=function(){for(var t=0,e=this.recorders;t<e.length;t++)e[t].stopCapture()},t.prototype.appendRecordedInformation=function(t){for(var e=0,i=this.recorders;e<i.length;e++)i[e].appendRecordedInformation(t)},t.prototype.initRecorders=function(){this.recorders.push(new Pe(this.contextInformation),new Ie(this.contextInformation),new Ne(this.contextInformation),new Be(this.contextInformation),new Ge(this.contextInformation));for(var t=0,e=this.recorders;t<e.length;t++)e[t].registerCallbacks(this.onCommandCallbacks)},t}(),Xe=function(){function t(t){this.contextInformation=t,this.webGlObjects=[],this.initWebglObjects()}return t.prototype.tagWebGlObjects=function(t){for(var e=0,i=this.webGlObjects;e<i.length;e++){for(var n=i[e],r=0;r<t.arguments.length;r++){var s=t.arguments[r];if(n.tagWebGlObject(s))break}if(n.tagWebGlObject(t.result))break}},t.prototype.tagWebGlObject=function(t){for(var e=0,i=this.webGlObjects;e<i.length;e++){var n=i[e].tagWebGlObject(t);if(n)return n}},t.prototype.initWebglObjects=function(){this.webGlObjects.push(new pe,new fe,new me,new ge,new ve,new ye,new Ee,new Te,new _e,new we,new Se,new xe)},t}(),Ve=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$e=function(t){function e(e){var i=t.call(this,e)||this;return i.extensionDefinition=[[{name:"ANGLE_instanced_arrays",description:""},{name:"EXT_blend_minmax",description:""},{name:"EXT_color_buffer_float",description:""},{name:"EXT_color_buffer_half_float",description:""},{name:"EXT_disjoint_timer_query",description:""},{name:"EXT_frag_depth",description:""},{name:"EXT_sRGB",description:""},{name:"EXT_shader_texture_lod",description:""},{name:"EXT_texture_filter_anisotropic",description:""},{name:"OES_element_index_uint",description:""},{name:"OES_standard_derivatives",description:""},{name:"OES_texture_float",description:""},{name:"OES_texture_float_linear",description:""},{name:"OES_texture_half_float",description:""},{name:"OES_texture_half_float_linear",description:""},{name:"OES_vertex_array_object",description:""},{name:"WEBGL_color_buffer_float",description:""},{name:"WEBGL_compressed_texture_astc",description:""},{name:"WEBGL_compressed_texture_atc",description:""},{name:"WEBGL_compressed_texture_etc",description:""},{name:"WEBGL_compressed_texture_etc1",description:""},{name:"WEBGL_compressed_texture_pvrtc",description:""},{name:"WEBGL_compressed_texture_s3tc",description:""},{name:"WEBGL_depth_texture",description:""},{name:"WEBGL_draw_buffers",description:""}],[{name:"EXT_color_buffer_float",description:""},{name:"EXT_disjoint_timer_query",description:""},{name:"EXT_disjoint_timer_query_webgl2",description:""},{name:"EXT_texture_filter_anisotropic",description:""},{name:"OES_texture_float_linear",description:""},{name:"WEBGL_compressed_texture_astc",description:""},{name:"WEBGL_compressed_texture_atc",description:""},{name:"WEBGL_compressed_texture_etc",description:""},{name:"WEBGL_compressed_texture_etc1",description:""},{name:"WEBGL_compressed_texture_pvrtc",description:""},{name:"WEBGL_compressed_texture_s3tc",description:""},{name:"WEBGL_multi_draw_instanced_base_vertex_base_instance",description:""}]],i.currentState=i.startCapture(!0,i.quickCapture,i.fullCapture),i}return Ve(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return"Extensions"},enumerable:!1,configurable:!0}),e.prototype.getExtensions=function(){return this.extensions},e.prototype.readFromContext=function(){for(var t=0,e=1===this.contextVersion?this.extensionDefinition[0]:this.extensionDefinition[1];t<e.length;t++){var i=e[t],n=this.context.getExtension(i.name);n?(this.currentState[i.name]=!0,this.extensions[i.name]=n):this.currentState[i.name]=!1}},e}(Ft),He=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ze=function(t){function e(e){var i=t.call(this,e)||this;return i.currentState=i.startCapture(!0,i.quickCapture,i.fullCapture),i}return He(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return"CompressedTextures"},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.COMPRESSED_TEXTURE_FORMATS}]},e.prototype.stringifyParameterValue=function(t,e){for(var i=[],n=0,r=t;n<r.length;n++){var s=r[n];i.push(m.stringifyWebGlConstant(s,"getParameter"))}return i},e}(Dt),Ye=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),je=function(t){function e(e){var i=t.call(this,e)||this;return i.currentState=i.startCapture(!0,i.quickCapture,i.fullCapture),i}return Ye(e,t),Object.defineProperty(e.prototype,"stateName",{get:function(){return"Capabilities"},enumerable:!1,configurable:!0}),e.prototype.getWebgl1Parameters=function(){return[{constant:m.RENDERER},{constant:m.VENDOR},{constant:m.VERSION},{constant:m.SHADING_LANGUAGE_VERSION},{constant:m.SAMPLES},{constant:m.SAMPLE_BUFFERS},{constant:m.RED_BITS},{constant:m.GREEN_BITS},{constant:m.BLUE_BITS},{constant:m.ALPHA_BITS},{constant:m.DEPTH_BITS},{constant:m.STENCIL_BITS},{constant:m.SUBPIXEL_BITS},{constant:m.LINE_WIDTH},{constant:m.ALIASED_LINE_WIDTH_RANGE},{constant:m.ALIASED_POINT_SIZE_RANGE},{constant:m.IMPLEMENTATION_COLOR_READ_FORMAT,returnType:20},{constant:m.IMPLEMENTATION_COLOR_READ_TYPE,returnType:20},{constant:m.MAX_COMBINED_TEXTURE_IMAGE_UNITS},{constant:m.MAX_CUBE_MAP_TEXTURE_SIZE},{constant:m.MAX_FRAGMENT_UNIFORM_VECTORS},{constant:m.MAX_RENDERBUFFER_SIZE},{constant:m.MAX_TEXTURE_IMAGE_UNITS},{constant:m.MAX_TEXTURE_SIZE},{constant:m.MAX_VARYING_VECTORS},{constant:m.MAX_VERTEX_ATTRIBS},{constant:m.MAX_VERTEX_TEXTURE_IMAGE_UNITS},{constant:m.MAX_VERTEX_UNIFORM_VECTORS},{constant:m.MAX_VIEWPORT_DIMS},{constant:m.MAX_TEXTURE_MAX_ANISOTROPY_EXT},{constant:m.MAX_COLOR_ATTACHMENTS_WEBGL},{constant:m.MAX_DRAW_BUFFERS_WEBGL}]},e.prototype.getWebgl2Parameters=function(){return[{constant:m.MAX_3D_TEXTURE_SIZE},{constant:m.MAX_ARRAY_TEXTURE_LAYERS},{constant:m.MAX_CLIENT_WAIT_TIMEOUT_WEBGL},{constant:m.MAX_COLOR_ATTACHMENTS},{constant:m.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS},{constant:m.MAX_COMBINED_UNIFORM_BLOCKS},{constant:m.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS},{constant:m.MAX_DRAW_BUFFERS},{constant:m.MAX_ELEMENT_INDEX},{constant:m.MAX_ELEMENTS_INDICES},{constant:m.MAX_ELEMENTS_VERTICES},{constant:m.MAX_FRAGMENT_INPUT_COMPONENTS},{constant:m.MAX_FRAGMENT_UNIFORM_BLOCKS},{constant:m.MAX_FRAGMENT_UNIFORM_COMPONENTS},{constant:m.MAX_PROGRAM_TEXEL_OFFSET},{constant:m.MAX_SAMPLES},{constant:m.MAX_SERVER_WAIT_TIMEOUT},{constant:m.MAX_TEXTURE_LOD_BIAS},{constant:m.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS},{constant:m.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS},{constant:m.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS},{constant:m.MAX_UNIFORM_BLOCK_SIZE},{constant:m.MAX_UNIFORM_BUFFER_BINDINGS},{constant:m.MAX_VARYING_COMPONENTS},{constant:m.MAX_VERTEX_OUTPUT_COMPONENTS},{constant:m.MAX_VERTEX_UNIFORM_BLOCKS},{constant:m.MAX_VERTEX_UNIFORM_COMPONENTS},{constant:m.MIN_PROGRAM_TEXEL_OFFSET}]},e}(Dt),Ke=function(){function t(t){this.options=t,this.commandId=0,this.context=t.context,this.version=t.version,this.onMaxCommand=new a,this.capturing=!1,this.globalCapturing=!0,this.contextInformation={context:this.context,contextVersion:this.version,toggleCapture:this.toggleGlobalCapturing.bind(this),tagWebGlObject:this.tagWebGlObject.bind(this),extensions:{}},this.commandSpies={},this.stateSpy=new Me(this.contextInformation),this.recorderSpy=new We(this.contextInformation),this.webGlObjectSpy=new Xe(this.contextInformation),this.analyser=new E(this.contextInformation),this.initStaticCapture(),t.recordAlways&&this.spy()}return t.prototype.spy=function(){this.spyContext(this.context);var t=this.contextInformation.extensions;for(var e in t)t.hasOwnProperty(e)&&this.spyContext(t[e])},t.prototype.unSpy=function(){for(var t in this.commandSpies)this.commandSpies.hasOwnProperty(t)&&this.commandSpies[t].unSpy()},t.prototype.startCapture=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=!1),void 0===i&&(i=!1);var n=h.now;this.maxCommands=t,this.options.recordAlways||this.spy(),this.capturing=!0,this.commandId=0,this.currentCapture={canvas:this.canvasCapture,context:this.contextCapture,commands:[],initState:{},endState:{},startTime:n,listenCommandsStartTime:0,listenCommandsEndTime:0,endTime:0,analyses:[],frameMemory:{},memory:{}},this.currentCapture.canvas.width=this.context.canvas.width,this.currentCapture.canvas.height=this.context.canvas.height,this.currentCapture.canvas.clientWidth=this.context.canvas.clientWidth||this.context.canvas.width,this.currentCapture.canvas.clientHeight=this.context.canvas.clientHeight||this.context.canvas.height,this.stateSpy.startCapture(this.currentCapture,e,i),this.recorderSpy.startCapture(),this.currentCapture.listenCommandsStartTime=h.now},t.prototype.stopCapture=function(){var t=h.now;return this.options.recordAlways||this.unSpy(),this.capturing=!1,this.stateSpy.stopCapture(this.currentCapture),this.recorderSpy.stopCapture(),this.currentCapture.listenCommandsEndTime=t,this.currentCapture.endTime=h.now,this.recorderSpy.appendRecordedInformation(this.currentCapture),this.analyser.appendAnalyses(this.currentCapture),this.currentCapture},t.prototype.isCapturing=function(){return this.globalCapturing&&this.capturing},t.prototype.setMarker=function(t){this.marker=t},t.prototype.clearMarker=function(){this.marker=null},t.prototype.log=function(t){this.currentCapture.commands.push({name:"LOG",text:t,commandArguments:[],commandEndTime:h.now,endTime:h.now,stackTrace:[],marker:"",status:40,startTime:h.now,result:void 0,id:this.getNextCommandCaptureId()})},t.prototype.getNextCommandCaptureId=function(){return this.commandId++},t.prototype.onCommand=function(t,e){if(this.globalCapturing&&(this.webGlObjectSpy.tagWebGlObjects(e),this.recorderSpy.recordCommand(e),this.isCapturing())){var i=t.createCapture(e,this.getNextCommandCaptureId(),this.marker);this.stateSpy.captureState(i),this.currentCapture.commands.push(i),i.endTime=h.now,this.maxCommands>0&&this.currentCapture.commands.length===this.maxCommands&&this.onMaxCommand.trigger(this)}},t.prototype.spyContext=function(e){var i=[];for(var n in e)n&&i.push(n);for(var r=0;r<i.length;r++)if(n=i[r],!~t.unSpyableMembers.indexOf(n))try{"number"!=typeof e[n]&&this.spyFunction(n,e)}catch(t){o.error("Cant Spy member: "+n),o.error(t)}},t.prototype.initStaticCapture=function(){var t=new $e(this.contextInformation),e=t.getExtensions();for(var i in e)e.hasOwnProperty(i)&&(this.contextInformation.extensions[i]=e[i]);var n=new je(this.contextInformation),r=new ze(this.contextInformation);this.contextCapture={version:this.version,contextAttributes:this.context.getContextAttributes(),capabilities:n.getStateData(),extensions:t.getStateData(),compressedTextures:r.getStateData()},this.canvasCapture={width:this.context.canvas.width,height:this.context.canvas.height,clientWidth:this.context.canvas.clientWidth||this.context.canvas.width,clientHeight:this.context.canvas.clientHeight||this.context.canvas.height,browserAgent:navigator?navigator.userAgent:""}},t.prototype.spyFunction=function(t,e){if(0!==t.indexOf("__SPECTOR_Origin_")){if(!this.commandSpies[t]){var i=function(t,e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);for(var n in e)i.hasOwnProperty(n)||(i[n]=e[n]);return i}(this.contextInformation,{spiedCommandName:t,spiedCommandRunningContext:e,callback:this.onCommand.bind(this)});this.commandSpies[t]=new Pt(i)}this.commandSpies[t].spy()}},t.prototype.toggleGlobalCapturing=function(t){this.globalCapturing=t},t.prototype.tagWebGlObject=function(t){return this.webGlObjectSpy.tagWebGlObject(t)},t.unSpyableMembers=["canvas","drawingBufferWidth","drawingBufferHeight","glp","drawingBufferColorSpace","unpackColorSpace"],t}(),qe=function(){function t(e){this.spiedWindow=e||window,this.lastFrame=0,this.speedRatio=1,this.willPlayNextFrame=!1,this.onFrameStart=new a,this.onFrameEnd=new a,this.onError=new a,this.lastSixtyFramesDuration=[],this.lastSixtyFramesCurrentIndex=0,this.lastSixtyFramesPreviousStart=0;for(var i=0;i<t.fpsWindowSize;i++)this.lastSixtyFramesDuration[i]=0;this.init()}return t.prototype.playNextFrame=function(){this.willPlayNextFrame=!0},t.prototype.changeSpeedRatio=function(t){this.speedRatio=t},t.prototype.getFps=function(){for(var e=0,i=0;i<t.fpsWindowSize;i++)e+=this.lastSixtyFramesDuration[i];return 0===e?0:6e4/e},t.prototype.init=function(){for(var e=this,i=0,n=t.requestAnimationFrameFunctions;i<n.length;i++){var r=n[i];this.spyRequestAnimationFrame(r,this.spiedWindow)}for(var s=0,o=t.setTimerFunctions;s<o.length;s++)r=o[s],this.spySetTimer(r);this.spiedWindow.VRDisplay&&this.spiedWindow.addEventListener("vrdisplaypresentchange",(function(t){e.spyRequestAnimationFrame("requestAnimationFrame",t.display)}))},t.prototype.spyRequestAnimationFrame=function(t,e){var i=this;T.storeOriginFunction(e,t),e[t]=function(){var n=arguments[0],r=i.getCallback(i,n,(function(){i.spiedWindow[t](n)}));return T.executeOriginFunction(e,t,[r])}},t.prototype.spySetTimer=function(e){var i=this,n=this.spiedWindow,r="setTimeout"===e;T.storeOriginFunction(n,e),n[e]=function(){var s=arguments[0],o=arguments[1],a=Array.prototype.slice.call(arguments);return t.setTimerCommonValues.indexOf(o)>-1&&(a[0]=i.getCallback(i,s,r?function(){n[e](s)}:null)),T.executeOriginFunction(n,e,a)}},t.prototype.getCallback=function(e,i,n){return void 0===n&&(n=null),function(){var r=h.now;if(e.lastFrame=++e.lastFrame%e.speedRatio,e.willPlayNextFrame||e.speedRatio&&!e.lastFrame){e.onFrameStart.trigger(e);try{i.apply(e.spiedWindow,arguments)}catch(t){e.onError.trigger(t)}e.lastSixtyFramesCurrentIndex=(e.lastSixtyFramesCurrentIndex+1)%t.fpsWindowSize,e.lastSixtyFramesDuration[e.lastSixtyFramesCurrentIndex]=r-e.lastSixtyFramesPreviousStart,e.onFrameEnd.trigger(e),e.willPlayNextFrame=!1}else n&&n();e.lastSixtyFramesPreviousStart=r}},t.requestAnimationFrameFunctions=["requestAnimationFrame","msRequestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame"],t.setTimerFunctions=["setTimeout","setInterval"],t.setTimerCommonValues=[0,15,16,33,32,40],t.fpsWindowSize=60,t}(),Ze=function(){function t(t){this.canvas=t,this.onContextRequested=new a,this.init()}return t.prototype.init=function(){var t=this,e=function(){var e=this instanceof HTMLCanvasElement?HTMLCanvasElement:OffscreenCanvas,i=t.canvas?T.executeOriginFunction(this,"getContext",arguments):T.executePrototypeOriginFunction(this,e,"getContext",arguments);if(arguments.length>0&&"2d"===arguments[0])return i;if(i){var n=Array.prototype.slice.call(arguments),r="webgl2"===n[0]||"experimental-webgl2"===n[0]?2:1;t.onContextRequested.trigger({context:i,contextVersion:r})}return i};this.canvas?(T.storeOriginFunction(this.canvas,"getContext"),this.canvas.getContext=e):(T.storePrototypeOriginFunction(HTMLCanvasElement,"getContext"),HTMLCanvasElement.prototype.getContext=e,"undefined"!=typeof OffscreenCanvas&&(T.storePrototypeOriginFunction(OffscreenCanvas,"getContext"),OffscreenCanvas.prototype.getContext=e))},t}(),Qe=i(379),Je=i.n(Qe),ti=i(795),ei=i.n(ti),ii=i(569),ni=i.n(ii),ri=i(565),si=i.n(ri),oi=i(216),ai=i.n(oi),hi=i(589),li=i.n(hi),ui=i(866),ci={};ci.styleTagTransform=li(),ci.setAttributes=si(),ci.insert=ni().bind(null,"html"),ci.domAPI=ei(),ci.insertStyleElement=ai(),Je()(ui.Z,ci),ui.Z&&ui.Z.locals&&ui.Z.locals;var di,pi,fi,mi=function(){function t(t,e){this.placeHolder=t,this.stateStore=e}return t.prototype.compose=function(t){var e=this.stateStore.getStatesToProcess(),i=!1;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],s=this.stateStore.getLastOperation(r),o=this.stateStore.getComponentInstance(r),a=this.stateStore.getData(r);o.render(a,r,s),i=!0}if(i){var h=this.stateStore.getLastOperation(t);this.composeInContainer(this.placeHolder,Number.MAX_VALUE,t,h)}},t.prototype.composeChildren=function(t,e){if(e)for(var i=this.stateStore.getChildrenIds(t),n=0,r=0;r<i.length;r++){var s=i[r],o=this.stateStore.getLastOperation(s);this.composeInContainer(e,n,s,o),50!==o&&n++}},t.prototype.composeInContainer=function(t,e,i,n){var r=this.stateStore.getComponentInstance(i).composeInContainer(t,e,n);this.composeChildren(i,r)},t}(),gi=function(){function t(){this.store={},this.idGenerator=0,this.pendingOperation={}}return t.prototype.getLastOperation=function(t){return this.store[t].lastOperation},t.prototype.getData=function(t){return this.store[t].data},t.prototype.getComponentInstance=function(t){return this.store[t].componentInstance},t.prototype.getParentId=function(t){return this.store[t].parent?this.store[t].parent.id:-1},t.prototype.getChildrenIds=function(t){for(var e=[],i=0,n=this.store[t].children;i<n.length;i++){var r=n[i];e.push(r.id)}return e},t.prototype.hasChildren=function(t){return this.store[t].children.length>0},t.prototype.add=function(t,e){var i=this.getNewId();return this.pendingOperation[i]=i,this.store[i]={data:t,id:i,parent:null,children:[],componentInstance:e,lastOperation:20},i},t.prototype.update=function(t,e){this.store[t],this.pendingOperation[t]=t,this.store[t].data=e,this.store[t].lastOperation=40},t.prototype.addChild=function(t,e,i){var n=this.store[t],r=this.add(e,i);this.pendingOperation[r]=r;var s=this.store[r];return s.parent=n,n.children.push(s),r},t.prototype.insertChildAt=function(t,e,i,n){var r=this.store[t],s=this.add(i,n);this.pendingOperation[s]=s;var o=this.store[s];return o.parent=r,e>=r.children.length?r.children.push(o):e>=0?r.children.splice(e,0,o):r.children.unshift(o),s},t.prototype.removeChildById=function(t,e){for(var i=this.store[t],n=i.children.length-1;n>=0;n--)if(i.children[n].id===e){this.removeChildAt(t,n);break}},t.prototype.removeChildAt=function(t,e){var i,n=this.store[t];e>n.children.length-1?(i=n.children[n.children.length-1],n.children[n.children.length-1].parent=null,n.children.splice(n.children.length-1,1)):e>=0?(i=n.children[e],n.children[e].parent=null,n.children.splice(e,1)):(i=n.children[0],n.children[0].parent=null,n.children.splice(0,1)),i.parent=null,this.remove(i.id)},t.prototype.remove=function(t){var e=this.store[t];e.parent?(this.store[e.parent.id],this.removeChildById(e.parent.id,t)):(this.removeChildren(t),this.store[t].lastOperation=50,this.pendingOperation[t]=t)},t.prototype.removeChildren=function(t){for(var e=this.store[t];e.children.length;)this.remove(e.children[0].id)},t.prototype.getStatesToProcess=function(){return this.pendingOperation},t.prototype.flushPendingOperations=function(){for(var t in this.pendingOperation)this.pendingOperation[t]&&(50===this.store[t].lastOperation?delete this.store[t]:this.store[t].lastOperation=0);this.pendingOperation={}},t.prototype.getNewId=function(){return++this.idGenerator},t}(),vi=function(){function t(t){this.component=t}return t.prototype.render=function(t,e,i){0!==i&&(50!==i?this.domNode=this.component.render(t,e):this.removeNode())},t.prototype.composeInContainer=function(t,e,i){if(50===i)return this.removeNode(),null;var n=this.cachedCurrentChildrenContainer;if(0===i)return n;var r=this.domNode,s=r.getAttribute("childrencontainer")?r:r.querySelector("[childrenContainer]");if(s&&n)for(var o=n.children;o.length>0;)s.appendChild(o[0]);if(this.cachedCurrentChildrenContainer=s,e>=t.children.length)t.appendChild(r),this.cachedCurrentDomNode&&40===i&&(this.cachedCurrentDomNode.remove?this.cachedCurrentDomNode.remove():this.cachedCurrentDomNode.parentNode&&this.cachedCurrentDomNode.parentNode.removeChild(this.cachedCurrentDomNode));else{var a=t.children[e];t.insertBefore(r,a),40===i&&t.removeChild(a)}return this.cachedCurrentDomNode=this.domNode,s},t.prototype.removeNode=function(){this.domNode&&this.domNode.parentElement&&(this.domNode.remove?this.domNode.remove():this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode)),this.cachedCurrentDomNode&&this.cachedCurrentDomNode.parentElement&&(this.cachedCurrentDomNode.remove?this.cachedCurrentDomNode.remove():this.cachedCurrentDomNode.parentNode&&this.cachedCurrentDomNode.parentNode.removeChild(this.cachedCurrentDomNode))},t.idGenerator=0,t}(),yi=function(){function t(t){this.stateStore=new gi,this.compositor=new mi(t,this.stateStore),this.willRender=!1,this.rootStateId=-1}return t.prototype.addRootState=function(t,e,i){void 0===i&&(i=!1);var n=new vi(e),r=this.stateStore.add(t,n);return this.rootStateId=r,this.setForRender(i),r},t.prototype.addChildState=function(t,e,i,n){void 0===n&&(n=!1);var r=this.insertChildState(t,e,Number.MAX_VALUE,i);return this.setForRender(n),r},t.prototype.insertChildState=function(t,e,i,n,r){void 0===r&&(r=!1);var s=new vi(n),o=this.stateStore.insertChildAt(t,i,e,s);return this.setForRender(r),o},t.prototype.updateState=function(t,e,i){void 0===i&&(i=!1),this.stateStore.update(t,e),this.setForRender(i)},t.prototype.removeState=function(t,e){void 0===e&&(e=!1),this.stateStore.remove(t),this.setForRender(e)},t.prototype.removeChildrenStates=function(t,e){void 0===e&&(e=!1),this.stateStore.removeChildren(t),this.setForRender(e)},t.prototype.getState=function(t){return this.stateStore.getData(t)},t.prototype.getGenericState=function(t){return this.getState(t)},t.prototype.getChildrenState=function(t){var e=this;return this.stateStore.getChildrenIds(t).map((function(i){return e.stateStore.getData(t)}))},t.prototype.getChildrenGenericState=function(t){return this.getChildrenState(t)},t.prototype.hasChildren=function(t){return this.stateStore.hasChildren(t)},t.prototype.updateAllChildrenState=function(t,e){for(var i=0,n=this.stateStore.getChildrenIds(t);i<n.length;i++){var r=n[i],s=this.getGenericState(r);e(s),this.updateState(r,s)}},t.prototype.updateAllChildrenGenericState=function(t,e){this.updateAllChildrenState(t,e)},t.prototype.setForRender=function(e){this.willRender||(this.willRender=!0,e?this.compose():setTimeout(this.compose.bind(this),t.REFRESHRATEINMILLISECONDS))},t.prototype.compose=function(){this.willRender=!1,this.compositor.compose(this.rootStateId),this.stateStore.flushPendingOperations()},t.REFRESHRATEINMILLISECONDS=100,t}(),xi=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ei=function(t){function e(){var e=t.call(this)||this;return e.events={},e}return xi(e,t),e.prototype.addEventListener=function(t,e,i){return void 0===i&&(i=null),this.events[t]?this.events[t].add(e,i):-1},e.prototype.removeEventListener=function(t,e){this.events[t]&&this.events[t].remove(e)},e.prototype.renderElementFromTemplate=function(t,e,i){var n=this.createFromHtml(t);return this.bindCommands(n,e,i),n},e.prototype.bindCommands=function(t,e,i){t.getAttribute("commandname")&&this.bindCommand(t,e,i);for(var n=t.querySelectorAll("[commandName]"),r=0;r<n.length;r++){var s=n[r];this.bindCommand(s,e,i)}},e.prototype.bindCommand=function(t,e,i){var n=t.getAttribute("commandname"),r=t.getAttribute("commandeventbinding")||"";0===r.length&&(r="click");var s="true"===t.getAttribute("usecapture"),o="true"===t.getAttribute("stoppropagation");this.createEvent(n),this.mapEventListener(t,r,n,e,i,s,o)},e.prototype.mapEventListener=function(t,e,i,n,r,s,o){void 0===s&&(s=!1),void 0===o&&(o=!1);var a=this;o?t.addEventListener(e,(function(t){return t.stopPropagation(),t.preventDefault(),a.triggerEvent(i,this,n,r),!1}),s):t.addEventListener(e,(function(){a.triggerEvent(i,this,n,r)}),s)},e.prototype.createEvent=function(t){if(!this.events[t]){var e=new a;this.events[t]=e}return this.events[t]},e.prototype.triggerEvent=function(t,e,i,n){this.events[t].trigger({sender:e,stateId:n,state:i})},e}(function(){function t(){this.dummyTextGeneratorElement=document.createElement("div")}return t.prototype.createFromHtml=function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstElementChild},t.prototype.htmlTemplate=function(t){for(var e=this,i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=t.raw,s="";return i.forEach((function(t,i){var n=r[i];Array.isArray(t)&&(t=t.join("")),n&&n.length>0&&"$"===n[n.length-1]?n=n.slice(0,-1):t=e.htmlEscape(t),s+=n,s+=t})),s+=r[r.length-1]},t.prototype.htmlEscape=function(t){return null==t||0===t.length?t:(this.dummyTextGeneratorElement.innerText=t,this.dummyTextGeneratorElement.innerHTML)},t}()),Ti=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ti(e,t),e.prototype.render=function(t,e){var i,r,s=this.htmlTemplate(di||(i=['<div>\n <div childrenContainer="true" class="captureMenuComponent ','">\n </div>\n <div class="captureMenuLogComponent ','">\n <span class="','">',"<span>\n </div>\n </div>"],r=['<div>\n <div childrenContainer="true" class="captureMenuComponent ','">\n </div>\n <div class="captureMenuLogComponent ','">\n <span class="','">',"<span>\n </div>\n </div>"],Object.defineProperty?Object.defineProperty(i,"raw",{value:r}):i.raw=r,di=i),t?"active":"",t.logVisible?"active":"",t.logLevel===n.error?"error":"",t.logText);return this.renderElementFromTemplate(s,t,e)},e}(Ei),wi=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Si=function(t){function e(){var e=t.call(this)||this;return e.onCanvasSelected=e.createEvent("onCanvasSelected"),e}return wi(e,t),e.prototype.render=function(t,e){var i=document.createElement("li"),n=document.createElement("span");return n.innerText="Id: ".concat(t.id," - Size: ").concat(t.width,"*").concat(t.height),i.appendChild(n),this.mapEventListener(i,"click","onCanvasSelected",t,e),i},e}(Ei),bi=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ci=function(t){function e(){var e=t.call(this)||this;return e.onCaptureRequested=e.createEvent("onCaptureRequested"),e.onPlayRequested=e.createEvent("onPlayRequested"),e.onPauseRequested=e.createEvent("onPauseRequested"),e.onPlayNextFrameRequested=e.createEvent("onPlayNextFrameRequested"),e}return bi(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate(pi||(i=['\n <div class="captureMenuActionsComponent">\n <div commandName="onCaptureRequested">\n </div>\n $',"\n </div>"],n=['\n <div class="captureMenuActionsComponent">\n <div commandName="onCaptureRequested">\n </div>\n $',"\n </div>"],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,pi=i),t?'<div commandName="onPauseRequested">\n </div>':'<div commandName="onPlayRequested">\n </div>\n <div commandName="onPlayNextFrameRequested">\n </div>');return this.renderElementFromTemplate(r,t,e)},e}(Ei),Ai=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ri=function(t){function e(){var e=t.call(this)||this;return e.onCanvasSelection=e.createEvent("onCanvasSelection"),e}return Ai(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate(fi||(i=['\n <div class="canvasListComponent">\n <span commandName="onCanvasSelection">\n ','\n </span>\n <ul childrenContainer="true" style="','"></ul>\n </div>'],n=['\n <div class="canvasListComponent">\n <span commandName="onCanvasSelection">\n ','\n </span>\n <ul childrenContainer="true" style="','"></ul>\n </div>'],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,fi=i),t.currentCanvasInformation?"".concat(t.currentCanvasInformation.id," (").concat(t.currentCanvasInformation.width,"*").concat(t.currentCanvasInformation.height,")"):"Choose Canvas...",t.showList?"display:block;visibility:visible":"display:none;visibility:hidden");return this.renderElementFromTemplate(r,t,e)},e}(Ei),Mi=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Li=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Mi(e,t),e.prototype.render=function(t,e){var i=document.createElement("span");return i.className="fpsCounterComponent",i.innerText=t.toFixed(2)+" Fps",i},e}(Ei),Oi=function(){function t(e){void 0===e&&(e={});var i=this;this.options=e,this.rootPlaceHolder=e.rootPlaceHolder||document.body,this.mvx=new yi(this.rootPlaceHolder),this.isTrackingCanvas=!1,this.onCanvasSelected=new a,this.onCaptureRequested=new a,this.onPauseRequested=new a,this.onPlayRequested=new a,this.onPlayNextFrameRequested=new a,this.captureMenuComponent=new _i,this.canvasListComponent=new Ri,this.canvasListItemComponent=new Si,this.actionsComponent=new Ci,this.fpsCounterComponent=new Li,this.rootStateId=this.mvx.addRootState({visible:!0,logLevel:n.info,logText:t.SelectCanvasHelpText,logVisible:!this.options.hideLog},this.captureMenuComponent),this.canvasListStateId=this.mvx.addChildState(this.rootStateId,{currentCanvasInformation:null,showList:!1},this.canvasListComponent),this.actionsStateId=this.mvx.addChildState(this.rootStateId,!0,this.actionsComponent),this.fpsStateId=this.mvx.addChildState(this.rootStateId,0,this.fpsCounterComponent),this.actionsComponent.onCaptureRequested.add((function(){var e=i.getSelectedCanvasInformation();e&&i.updateMenuStateLog(n.info,t.PleaseWaitHelpText,!0),setTimeout((function(){i.onCaptureRequested.trigger(e)}),200)})),this.actionsComponent.onPauseRequested.add((function(){i.onPauseRequested.trigger(i.getSelectedCanvasInformation()),i.mvx.updateState(i.actionsStateId,!1)})),this.actionsComponent.onPlayRequested.add((function(){i.onPlayRequested.trigger(i.getSelectedCanvasInformation()),i.mvx.updateState(i.actionsStateId,!0)})),this.actionsComponent.onPlayNextFrameRequested.add((function(){i.onPlayNextFrameRequested.trigger(i.getSelectedCanvasInformation())})),this.canvasListComponent.onCanvasSelection.add((function(e){i.mvx.updateState(i.canvasListStateId,{currentCanvasInformation:null,showList:!e.state.showList}),i.updateMenuStateLog(n.info,t.SelectCanvasHelpText),i.onCanvasSelected.trigger(null),i.isTrackingCanvas&&i.trackPageCanvases(),e.state.showList?i.showMenuStateLog():i.hideMenuStateLog()})),this.canvasListItemComponent.onCanvasSelected.add((function(e){i.mvx.updateState(i.canvasListStateId,{currentCanvasInformation:e.state,showList:!1}),i.onCanvasSelected.trigger(e.state),i.updateMenuStateLog(n.info,t.ActionsHelpText),i.showMenuStateLog()}))}return t.prototype.getSelectedCanvasInformation=function(){return this.mvx.getGenericState(this.canvasListStateId).currentCanvasInformation},t.prototype.trackPageCanvases=function(){if(this.isTrackingCanvas=!0,document.body){var t=document.body.querySelectorAll("canvas");this.updateCanvasesList(t)}},t.prototype.updateCanvasesList=function(t){this.updateCanvasesListInformationInternal(t,(function(t){return{id:t.id,width:t.width,height:t.height,ref:t}}))},t.prototype.updateCanvasesListInformation=function(t){this.updateCanvasesListInformationInternal(t,(function(t){return{id:t.id,width:t.width,height:t.height,ref:t.ref}}))},t.prototype.display=function(){this.updateMenuStateVisibility(!0)},t.prototype.hide=function(){this.updateMenuStateVisibility(!1)},t.prototype.captureComplete=function(e){e?this.updateMenuStateLog(n.error,e):this.updateMenuStateLog(n.info,t.ActionsHelpText)},t.prototype.setFPS=function(t){this.mvx.updateState(this.fpsStateId,t)},t.prototype.updateCanvasesListInformationInternal=function(e,i){this.mvx.removeChildrenStates(this.canvasListStateId);for(var r=[],s=0;s<e.length;s++){var o=i(e[s]);r.push(o),this.mvx.addChildState(this.canvasListStateId,o,this.canvasListItemComponent)}var a=r.length,h=this.mvx.getGenericState(this.canvasListStateId).showList;if(!h)if(1===a){var l=r[0];this.mvx.updateState(this.canvasListStateId,{currentCanvasInformation:l,showList:h}),this.updateMenuStateLog(n.info,t.ActionsHelpText),this.onCanvasSelected.trigger(l)}else this.updateMenuStateLog(n.info,t.SelectCanvasHelpText),this.onCanvasSelected.trigger(null)},t.prototype.hideMenuStateLog=function(){var t=this.mvx.getGenericState(this.rootStateId);this.mvx.updateState(this.rootStateId,{visible:t.visible,logLevel:t.logLevel,logText:t.logText,logVisible:!1})},t.prototype.showMenuStateLog=function(){var t=this.mvx.getGenericState(this.rootStateId);this.mvx.updateState(this.rootStateId,{visible:t.visible,logLevel:t.logLevel,logText:t.logText,logVisible:!this.options.hideLog})},t.prototype.updateMenuStateLog=function(t,e,i){void 0===i&&(i=!1);var n=this.mvx.getGenericState(this.rootStateId);this.mvx.updateState(this.rootStateId,{visible:n.visible,logLevel:t,logText:e,logVisible:!this.options.hideLog},i)},t.prototype.updateMenuStateVisibility=function(t){var e=this.mvx.getGenericState(this.rootStateId);this.mvx.updateState(this.rootStateId,{visible:t,logLevel:e.logLevel,logText:e.logText,logVisible:e.logVisible})},t.SelectCanvasHelpText="Please, select a canvas in the list above.",t.ActionsHelpText="Record with the red button, you can also pause or continue playing the current scene.",t.PleaseWaitHelpText="Capturing, be patient (this can take up to 3 minutes)...",t}(),Pi=i(625),Fi={};Fi.styleTagTransform=li(),Fi.setAttributes=si(),Fi.insert=ni().bind(null,"html"),Fi.domAPI=ei(),Fi.insertStyleElement=ai(),Je()(Pi.Z,Fi),Pi.Z&&Pi.Z.locals&&Pi.Z.locals;var Ii,Di,Ni,ki,Bi,Ui,Gi,Wi,Xi,Vi,$i,Hi,zi,Yi,ji,Ki,qi=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zi=function(t){function e(){var e=t.call(this)||this;return e.onCaptureLoaded=new a,e}return qi(e,t),e.prototype.render=function(t,e){var i,n,r=this,s=this.htmlTemplate(Ii||(i=['\n <div class="captureListComponent ','">\n <div class="openCaptureFile">\n <Span>Drag files here to open a previously saved capture.</span>\n </div>\n <ul childrenContainer="true"></ul>\n </div>'],n=['\n <div class="captureListComponent ','">\n <div class="openCaptureFile">\n <Span>Drag files here to open a previously saved capture.</span>\n </div>\n <ul childrenContainer="true"></ul>\n </div>'],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,Ii=i),t?"active":""),o=this.renderElementFromTemplate(s,t,e),a=o.querySelector(".openCaptureFile");return a.addEventListener("dragenter",(function(t){return r.drag(t),!1}),!1),a.addEventListener("dragover",(function(t){return r.drag(t),!1}),!1),a.addEventListener("drop",(function(t){r.drop(t)}),!1),o},e.prototype.drag=function(t){t.stopPropagation(),t.preventDefault()},e.prototype.drop=function(t){t.stopPropagation(),t.preventDefault(),this.loadFiles(t)},e.prototype.loadFiles=function(t){var e=this,i=null;if(t&&t.dataTransfer&&t.dataTransfer.files&&(i=t.dataTransfer.files),t&&t.target&&t.target.files&&(i=t.target.files),i&&i.length>0)for(var n=function(t){var n=i[t].name.toLowerCase().split(".").pop();if(i[t].type,"json"===n){var r=i[t],s=new FileReader;s.onerror=function(t){o.error("Error while reading file: "+r.name+t)},s.onload=function(t){try{var i=JSON.parse(t.target.result);e.onCaptureLoaded.trigger(i)}catch(t){o.error("Error while reading file: "+r.name+t)}},s.readAsText(r)}},r=0;r<i.length;r++)n(r)},e}(Ei),Qi=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ji=function(t){function e(){var e=t.call(this)||this;return e.onCaptureSelected=e.createEvent("onCaptureSelected"),e.onSaveRequested=e.createEvent("onSaveRequested"),e}return Qi(e,t),e.prototype.render=function(t,e){var i=document.createElement("li");if(t.active&&(i.className="active"),t.capture.endState.VisualState.Attachments)for(var n=0,r=t.capture.endState.VisualState.Attachments;n<r.length;n++){var s=r[n],o=document.createElement("img");o.src=encodeURI(s.src),i.appendChild(o)}else{var a=document.createElement("span");a.innerText=t.capture.endState.VisualState.FrameBufferStatus,i.appendChild(a)}var h=document.createElement("span");h.innerText=new Date(t.capture.startTime).toTimeString().split(" ")[0],i.appendChild(h);var l=document.createElement("a");return l.href="#",l.className="captureListItemSave",this.mapEventListener(l,"click","onSaveRequested",t,e,!1,!0),h.appendChild(l),this.mapEventListener(i,"click","onCaptureSelected",t,e),i},e}(Ei),tn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),en=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tn(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate(Di||(i=['\n <div class="visualStateListComponent">\n <ul childrenContainer="true"></ul>\n </div>'],n=['\n <div class="visualStateListComponent">\n <ul childrenContainer="true"></ul>\n </div>'],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,Di=i));return this.renderElementFromTemplate(r,t,e)},e}(Ei),nn=function(){function t(){}return t.scrollIntoView=function(t){for(var e=t.getBoundingClientRect(),i=t.parentElement;i&&i.clientHeight===i.offsetHeight;)i=i.parentElement;if(i){var n=i.getBoundingClientRect();e.top<n.top?t.scrollIntoView(!0):e.bottom>n.bottom&&t.scrollIntoView(!1)}},t}(),rn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sn=function(t){function e(){var e=t.call(this)||this;return e.onVisualStateSelected=e.createEvent("onVisualStateSelected"),e}return rn(e,t),e.prototype.render=function(t,e){var i=document.createElement("li");if(t.active&&(i.className="active",setTimeout((function(){nn.scrollIntoView(i)}),1)),t.VisualState.Attachments)for(var n=0,r=t.VisualState.Attachments;n<r.length;n++){var s=r[n];if(s.src){var o=document.createElement("img");if(o.src=encodeURI(s.src),i.appendChild(o),t.VisualState.Attachments.length>1){var a=document.createElement("span");a.innerText=s.attachmentName,i.appendChild(a)}if(s.textureLayer){var h=document.createElement("span");h.innerText="Layer: "+s.textureLayer,i.appendChild(h)}if(s.textureCubeMapFace){var l=document.createElement("span");l.innerText=s.textureCubeMapFace,i.appendChild(l)}}}else{var u=document.createElement("span");u.innerText=t.VisualState.FrameBufferStatus,i.appendChild(u)}var c=document.createElement("span");return c.innerText=t.VisualState.FrameBuffer?"Frame buffer: "+t.VisualState.FrameBuffer.__SPECTOR_Object_TAG.id:"Canvas frame buffer",i.appendChild(c),this.mapEventListener(i,"click","onVisualStateSelected",t,e),i},e}(Ei),on=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),an=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return on(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate(Ni||(i=['\n <div class="commandListComponent">\n <ul childrenContainer="true"></ul>\n </div>'],n=['\n <div class="commandListComponent">\n <ul childrenContainer="true"></ul>\n </div>'],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,Ni=i));return this.renderElementFromTemplate(r,t,e)},e}(Ei),hn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ln=function(t){function e(){var e=t.call(this)||this;return e.onCommandSelected=e.createEvent("onCommandSelected"),e.onVertexSelected=e.createEvent("onVertexSelected"),e.onFragmentSelected=e.createEvent("onFragmentSelected"),e}return hn(e,t),e.prototype.render=function(t,e){var i=document.createElement("li"),n="unknown";switch(t.capture.status){case 50:n="deprecated";break;case 10:n="unused";break;case 20:n="disabled";break;case 30:n="redundant";break;case 40:n="valid"}if(t.capture.VisualState&&(i.className=" drawCall"),t.active&&(i.className=" active",setTimeout((function(){nn.scrollIntoView(i)}),1)),t.capture.marker){var r=document.createElement("span");r.className=n+" marker important",r.innerText=t.capture.marker+" ",r.style.fontWeight="1000",i.appendChild(r)}if("LOG"===t.capture.name){var s=document.createElement("span");s.className=n+" marker important",s.innerText=t.capture.text+" ",s.style.fontWeight="1000",i.appendChild(s)}else{var o=document.createElement("span"),a=t.capture.text;a=a.replace(t.capture.name,'<span class=" '.concat(n,' important">').concat(t.capture.name,"</span>")),o.innerHTML=a,i.appendChild(o)}if(t.capture.VisualState&&"clear"!==t.capture.name)try{var h=t.capture.DrawCall.shaders[0],l=t.capture.DrawCall.shaders[1],u=document.createElement("a");u.innerText=h.name,u.href="#",i.appendChild(u),this.mapEventListener(u,"click","onVertexSelected",t,e);var c=document.createElement("a");c.innerText=l.name,c.href="#",i.appendChild(c),this.mapEventListener(c,"click","onFragmentSelected",t,e)}catch(t){}return this.mapEventListener(i,"click","onCommandSelected",t,e),i},e}(Ei),un=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),cn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return un(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate(ki||(i=['\n <div class="commandDetailComponent" childrenContainer="true">\n </div>'],n=['\n <div class="commandDetailComponent" childrenContainer="true">\n </div>'],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,ki=i));return this.renderElementFromTemplate(r,t,e)},e}(Ei),dn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return dn(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate(Bi||(i=['\n <div class="jsonContentComponent" childrenContainer="true">\n </div>'],n=['\n <div class="jsonContentComponent" childrenContainer="true">\n </div>'],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,Bi=i));return this.renderElementFromTemplate(r,t,e)},e}(Ei),fn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return fn(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate(Ui||(i=['\n <div class="jsonGroupComponent">\n <div class="jsonGroupComponentTitle">','</div>\n <ul childrenContainer="true"></ul>\n </div>'],n=['\n <div class="jsonGroupComponent">\n <div class="jsonGroupComponentTitle">','</div>\n <ul childrenContainer="true"></ul>\n </div>'],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,Ui=i),t?t.replace(/([A-Z])/g," $1").trim():"");return this.renderElementFromTemplate(r,t,e)},e}(Ei),gn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return gn(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate(Gi||(i=['\n <li><span class="jsonItemComponentKey">',': </span><span class="jsonItemComponentValue">',"</span><li>"],n=['\n <li><span class="jsonItemComponentKey">',': </span><span class="jsonItemComponentValue">',"</span><li>"],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,Gi=i),t.key,t.value);return this.renderElementFromTemplate(r,t,e)},e}(Ei),yn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yn(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate(Wi||(i=['\n <li class="jsonItemImageHolder"><div class="jsonItemImage"><img src="','" style="','" /><span>',"</span></div></li>"],n=['\n <li class="jsonItemImageHolder"><div class="jsonItemImage"><img src="','" style="','" /><span>',"</span></div></li>"],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,Wi=i),t.value,t.pixelated?"image-rendering: pixelated;":"",t.key);return this.renderElementFromTemplate(r,t,e)},e}(Ei),En=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Tn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return En(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate(Xi||(i=['\n <li><span class="jsonItemComponentKey">',': </span>\n <span class="jsonItemComponentValue">',' (<a href="','" target="_blank" class="jsonSourceItemComponentOpen">Open help page</a>)\n </span>\n <li>'],n=['\n <li><span class="jsonItemComponentKey">',': </span>\n <span class="jsonItemComponentValue">',' (<a href="','" target="_blank" class="jsonSourceItemComponentOpen">Open help page</a>)\n </span>\n <li>'],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,Xi=i),t.key,t.value,t.help);return this.renderElementFromTemplate(r,t,e)},e}(Ei),_n=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _n(e,t),e.prototype.render=function(t,e){var i=document.createElement("div");if(i.className="jsonVisualStateItemComponent",t.Attachments)for(var n=0,r=t.Attachments;n<r.length;n++){var s=r[n];if(s.src){var o=document.createElement("img");if(o.src=encodeURI(s.src),i.appendChild(o),t.Attachments.length>1){var a=document.createElement("span");a.innerText=s.attachmentName,i.appendChild(a)}}}else{var h=document.createElement("span");h.innerText=t.FrameBufferStatus,i.appendChild(h)}var l=document.createElement("span");return l.innerText=t.FrameBuffer?t.FrameBuffer.__SPECTOR_Object_TAG.displayText:"Canvas frame buffer",i.appendChild(l),i},e}(Ei),Sn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bn=function(t){function e(){var e=t.call(this)||this;return e.onCapturesClicked=e.createEvent("onCapturesClicked"),e.onCommandsClicked=e.createEvent("onCommandsClicked"),e.onInformationClicked=e.createEvent("onInformationClicked"),e.onInitStateClicked=e.createEvent("onInitStateClicked"),e.onEndStateClicked=e.createEvent("onEndStateClicked"),e.onCloseClicked=e.createEvent("onCloseClicked"),e.onSearchTextChanged=e.createEvent("onSearchTextChanged"),e.onSearchTextCleared=e.createEvent("onSearchTextCleared"),e}return Sn(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate(Vi||(i=['<ul class="resultViewMenuComponent">\n <li class="resultViewMenuOpen resultViewMenuSmall"><a href="#" role="button">Menu</a></li>\n\n <li class="searchContainer">\n <input type="text" placeHolder="Search..." value="','" commandName="onSearchTextChanged" commandEventBinding="change">\n <a class="clearSearch" stoppropagation="true" CommandName="onSearchTextCleared">X</a>\n </li>\n <li><a class="',' href="#" role="button" commandName="onCapturesClicked">Captures</a></li>\n <li><a class="',' href="#" role="button" commandName="onInformationClicked">Information</a></li>\n <li><a class="',' href="#" role="button" commandName="onInitStateClicked">Init State</a></li>\n <li>\n <a class="',' href="#" role="button" commandName="onCommandsClicked">\n Commands','\n </a>\n </li>\n <li><a class="',' href="#" role="button" commandName="onEndStateClicked">End State</a></li>\n <li><a role="button" commandName="onCloseClicked" stoppropagation="true">Close</a></li>\n </ul>'],n=['<ul class="resultViewMenuComponent">\n <li class="resultViewMenuOpen resultViewMenuSmall"><a href="#" role="button">Menu</a></li>\n\n <li class="searchContainer">\n <input type="text" placeHolder="Search..." value="','" commandName="onSearchTextChanged" commandEventBinding="change">\n <a class="clearSearch" stoppropagation="true" CommandName="onSearchTextCleared">X</a>\n </li>\n <li><a class="',' href="#" role="button" commandName="onCapturesClicked">Captures</a></li>\n <li><a class="',' href="#" role="button" commandName="onInformationClicked">Information</a></li>\n <li><a class="',' href="#" role="button" commandName="onInitStateClicked">Init State</a></li>\n <li>\n <a class="',' href="#" role="button" commandName="onCommandsClicked">\n Commands','\n </a>\n </li>\n <li><a class="',' href="#" role="button" commandName="onEndStateClicked">End State</a></li>\n <li><a role="button" commandName="onCloseClicked" stoppropagation="true">Close</a></li>\n </ul>'],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,Vi=i),t.searchText,0===t.status?"active":"",10===t.status?"active":"",20===t.status?"active":"",40===t.status?"active":"",t.commandCount>0?" ("+t.commandCount+")":"",30===t.status?"active":""),s=this.renderElementFromTemplate(r,t,e),o=s.querySelector(".resultViewMenuOpen"),a=s.querySelectorAll("li:not(.resultViewMenuSmall)");return o.addEventListener("click",(function(t){if("true"===o.getAttribute("open")){o.setAttribute("open","false");for(var e=0;e<a.length;e++)a[e].style.display="none",a[e].style.visibility="hidden"}else for(o.setAttribute("open","true"),e=0;e<a.length;e++)a[e].style.display="block",a[e].style.visibility="visible"})),s},e}(Ei),Cn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),An=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Cn(e,t),e.prototype.render=function(t,e){return this.renderElementFromTemplate('<div childrenContainer="true" class="resultViewContentComponent"></div>',t,e)},e}(Ei),Rn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Rn(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate($i||(i=['\n <div childrenContainer="true" class="resultViewComponent ','">\n </div>'],n=['\n <div childrenContainer="true" class="resultViewComponent ','">\n </div>'],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,$i=i),t?"active":"");return this.renderElementFromTemplate(r,t,e)},e}(Ei),Ln=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),On=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},Pn=function(t){function e(){var e=t.call(this)||this;return e.onTranslatedVertexSourceClicked=e.createEvent("onTranslatedVertexSourceClicked"),e.onTranslatedFragmentSourceClicked=e.createEvent("onTranslatedFragmentSourceClicked"),e.onVertexSourceClicked=e.createEvent("onVertexSourceClicked"),e.onFragmentSourceClicked=e.createEvent("onFragmentSourceClicked"),e.onSourceCodeCloseClicked=e.createEvent("onSourceCodeCloseClicked"),e.onSourceCodeChanged=e.createEvent("onSourceCodeChanged"),e}return Ln(e,t),e.prototype.showError=function(t){if(this.editor){var e=[];if(t=t||"")for(var i=/^.*ERROR:\W([0-9]+):([0-9]+):(.*)$/gm,n=i.exec(t);null!=n;)e.push({row:+n[2]-1,column:n[1],text:n[3]||"Error",type:"error"}),n=i.exec(t);this.editor.getSession().setAnnotations(e)}},e.prototype.render=function(t,e){var i,n=this,r=t.fragment?t.sourceFragment:t.sourceVertex;i=t.translated?t.fragment?t.translatedSourceFragment:t.translatedSourceVertex:r?this._indentIfdef(this._beautify(r)):"";var s=this.htmlTemplate(ji||(ji=On(['\n <div class="sourceCodeComponentContainer">\n <div class="sourceCodeMenuComponentContainer">\n <ul class="sourceCodeMenuComponent">\n $',"\n $",'\n <li><a class="','" href="#" role="button" commandName="onVertexSourceClicked">Vertex</a></li>\n <li><a class="','" href="#" role="button" commandName="onFragmentSourceClicked">Fragment</a></li>\n <li><a href="#" role="button" commandName="onSourceCodeCloseClicked">Close</a></li>\n </ul>\n </div>\n $',"\n </div>"],['\n <div class="sourceCodeComponentContainer">\n <div class="sourceCodeMenuComponentContainer">\n <ul class="sourceCodeMenuComponent">\n $',"\n $",'\n <li><a class="','" href="#" role="button" commandName="onVertexSourceClicked">Vertex</a></li>\n <li><a class="','" href="#" role="button" commandName="onFragmentSourceClicked">Fragment</a></li>\n <li><a href="#" role="button" commandName="onSourceCodeCloseClicked">Close</a></li>\n </ul>\n </div>\n $',"\n </div>"])),t.translatedSourceVertex?this.htmlTemplate(Hi||(Hi=On(['<li><a class="','" href="#" role="button" commandName="onTranslatedVertexSourceClicked">Translated Vertex</a></li>'],['<li><a class="','" href="#" role="button" commandName="onTranslatedVertexSourceClicked">Translated Vertex</a></li>'])),!t.fragment&&t.translated?"active":""):"",t.translatedSourceFragment?this.htmlTemplate(zi||(zi=On(['<li><a class="','" href="#" role="button" commandName="onTranslatedFragmentSourceClicked">Translated Fragment</a></li>'],['<li><a class="','" href="#" role="button" commandName="onTranslatedFragmentSourceClicked">Translated Fragment</a></li>'])),t.fragment&&t.translated?"active":""):"",t.fragment||t.translated?"":"active",t.fragment&&!t.translated?"active":"",this.htmlTemplate(Yi||(Yi=On(['<div class="sourceCodeComponent">',"</div>"],['<div class="sourceCodeComponent">',"</div>"])),i)),o=this.renderElementFromTemplate(s.replace(/<br>/g,"\n"),t,e);this.editor=ace.edit(o.querySelector(".sourceCodeComponent")),this.editor.setTheme("ace/theme/monokai"),this.editor.getSession().setMode("ace/mode/glsl"),this.editor.setShowPrintMargin(!1);var a=-1;return this.editor.setReadOnly(!t.editable&&!t.translated),this.editor.getSession().on("change",(function(i){-1!==a&&clearTimeout(a),a=setTimeout((function(){n._triggerCompilation(n.editor,t,o,e)}),1500)})),o},e.prototype._triggerCompilation=function(t,e,i,n){e.fragment?e.sourceFragment=t.getValue():e.sourceVertex=t.getValue(),this.triggerEvent("onSourceCodeChanged",i,e,n)},e.prototype._beautify=function(t,i){void 0===i&&(i=0),t=t.trim(),t=this._adaptComments(t);for(var n,r=this._getBracket(t),s=r.firstIteration,o=r.lastIteration,a="",h=0;h<i;h++)a+=" ";if(-1===s)n=t=(t=(t=(t=(t=(t=(t=(t=a+t).replace(/;(?![^\(]*\))\s*(\/\/.*)?/g,(function(t){return t.trim()+"\n"}))).replace(/\s*([*+-/=><\s]*=)\s*/g,(function(t){return" "+t.trim()+" "}))).replace(/\s*(,)\s*/g,(function(t){return t.trim()+" "}))).replace(/\n[ \t]+/g,"\n")).replace(/\n/g,"\n"+a)).replace(/\s+$/g,"")).replace(/\n+$/g,"");else{var l=t.substr(0,s),u=t.substr(o+1,t.length),c=t.substr(s+1,o-s-1).trim(),d=this._beautify(c,i+1);n=(n=(n=this._beautify(l,i)+" {\n"+d+"\n"+a+"}\n"+this._beautify(u,i)).replace(/\s*\n+\s*;/g,";")).replace(/#endif[\t \f\v]*{/g,"\n {")}return(n=(n=n.replace(e.semicolonReplacementKeyRegex,";")).replace(e.openCurlyReplacementKeyRegex,"{")).replace(e.closeCurlyReplacementKeyRegex,"}")},e.prototype._adaptComments=function(t){for(var i=!1,n=!1,r=0;r<t.length;r++){var s=t[r];"/"===s?"*"===t[r-1]?n=!1:"*"===t[r+1]?i||(n=!0,r++):"/"===t[r+1]&&(n||(i=!0,r++)):"\n"===s?i=!1:";"===s?(i||n)&&(t=t.substr(0,r)+e.semicolonReplacementKey+t.substr(r+1)):"{"===s?(i||n)&&(t=t.substr(0,r)+e.openCurlyReplacementKey+t.substr(r+1)):"}"===s&&(i||n)&&(t=t.substr(0,r)+e.closeCurlyReplacementKey+t.substr(r+1))}return t},e.prototype._getBracket=function(t,e){void 0===e&&(e=-1);for(var i=t.indexOf("{",e),n=1,r=i,s=0,o=0,a=t.substr(i+1).split("");o<a.length;o++){var h=a[o];if(r++,"{"===h&&n++,"}"===h&&n--,0===n){s=r;break}}return i>-1&&0===s?this._getBracket(t,i+1):{firstIteration:i,lastIteration:s}},e.prototype._indentIfdef=function(t){for(var e=0,i=t.split("\n"),n=0;n<i.length;n++){var r=i[n];-1!==r.indexOf("#endif")&&e--,-1!==r.indexOf("#else")&&e--;for(var s="",o=0;o<e;o++)s+=" ";i[n]=s+r,-1===r.indexOf("#if")&&-1===r.indexOf("#else")||e++}return i.join("\n")},e.semicolonReplacementKey="[[[semicolonReplacementKey]]]",e.semicolonReplacementKeyRegex=new RegExp("\\[\\[\\[semicolonReplacementKey\\]\\]\\]","g"),e.openCurlyReplacementKey="[[[openCurlyReplacementKey]]]",e.openCurlyReplacementKeyRegex=new RegExp("\\[\\[\\[openCurlyReplacementKey\\]\\]\\]","g"),e.closeCurlyReplacementKey="[[[closeCurlyReplacementKey]]]",e.closeCurlyReplacementKeyRegex=new RegExp("\\[\\[\\[closeCurlyReplacementKey\\]\\]\\]","g"),e}(Ei),Fn=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fn(e,t),e.prototype.render=function(t,e){var i,n,r=this.htmlTemplate(Ki||(i=['\n <div childrenContainer="true" class="','"></div>'],n=['\n <div childrenContainer="true" class="','"></div>'],Object.defineProperty?Object.defineProperty(i,"raw",{value:n}):i.raw=n,Ki=i),t?"informationColumnLeftComponent":"informationColumnRightComponent");return this.renderElementFromTemplate(r,t,e)},e}(Ei),Dn=function(){function t(){}return t.getMDNLink=function(e){var i=t.WebGL2Functions[e];if(i)return t.WebGL2RootUrl+i;var n=t.WebGLFunctions[e];return n?t.WebGLRootUrl+n:t.WebGLRootUrl+e},t.WebGL2RootUrl="https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/",t.WebGLRootUrl="https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/",t.WebGL2Functions={beginQuery:"beginQuery",beginTransformFeedback:"beginTransformFeedback",bindBufferBase:"bindBufferBase",bindBufferRange:"bindBufferRange",bindSampler:"bindSampler",bindTransformFeedback:"bindTransformFeedback",bindVertexArray:"bindVertexArray",blitFramebuffer:"blitFramebuffer",clearBufferfv:"clearBuffer",clearBufferiv:"clearBuffer",clearBufferuiv:"clearBuffer",clearBufferfi:"clearBuffer",clientWaitSync:"clientWaitSync",compressedTexImage3D:"compressedTexImage3D",compressedTexSubImage3D:"compressedTexSubImage3D",copyBufferSubData:"copyBufferSubData",copyTexSubImage3D:"copyTexSubImage3D",createQuery:"createQuery",createSampler:"createSampler",createTransformFeedback:"createTransformFeedback",createVertexArray:"createVertexArray",deleteQuery:"deleteQuery",deleteSampler:"deleteSampler",deleteSync:"deleteSync",deleteTransformFeedback:"deleteTransformFeedback",deleteVertexArray:"deleteVertexArray",drawArraysInstanced:"drawArraysInstanced",drawBuffers:"drawBuffers",drawElementsInstanced:"drawElementsInstanced",drawRangeElements:"drawRangeElements",endQuery:"endQuery",endTransformFeedback:"endTransformFeedback",fenceSync:"fenceSync",framebufferTextureLayer:"framebufferTextureLayer",getActiveUniformBlockName:"getActiveUniformBlockName",getActiveUniformBlockParameter:"getActiveUniformBlockParameter",getActiveUniforms:"getActiveUniforms",getBufferSubData:"getBufferSubData",getFragDataLocation:"getFragDataLocation",getIndexedParameter:"getIndexedParameter",getInternalformatParameter:"getInternalformatParameter",getQuery:"getQuery",getQueryParameter:"getQueryParameter",getSamplerParameter:"getSamplerParameter",getSyncParameter:"getSyncParameter",getTransformFeedbackVarying:"getTransformFeedbackVarying",getUniformBlockIndex:"getUniformBlockIndex",getUniformIndices:"getUniformIndices",invalidateFramebuffer:"invalidateFramebuffer",invalidateSubFramebuffer:"invalidateSubFramebuffer",isQuery:"isQuery",isSampler:"isSampler",isSync:"isSync",isTransformFeedback:"isTransformFeedback",isVertexArray:"isVertexArray",pauseTransformFeedback:"pauseTransformFeedback",readBuffer:"readBuffer",renderbufferStorageMultisample:"renderbufferStorageMultisample",resumeTransformFeedback:"resumeTransformFeedback",samplerParameteri:"samplerParameter",samplerParameterf:"samplerParameter",texImage3D:"texImage3D",texStorage2D:"texStorage2D",texStorage3D:"texStorage3D",texSubImage3D:"texSubImage3D",transformFeedbackVaryings:"transformFeedbackVaryings",uniform1ui:"uniform",uniform2ui:"uniform",uniform3ui:"uniform",uniform4ui:"uniform",uniform1fv:"uniform",uniform2fv:"uniform",uniform3fv:"uniform",uniform4fv:"uniform",uniform1iv:"uniform",uniform2iv:"uniform",uniform3iv:"uniform",uniform4iv:"uniform",uniform1uiv:"uniform",uniform2uiv:"uniform",uniform3uiv:"uniform",uniform4uiv:"uniform",uniformBlockBinding:"uniformBlockBinding",uniformMatrix2fv:"uniformMatrix",uniformMatrix3x2fv:"uniformMatrix",uniformMatrix4x2fv:"uniformMatrix",uniformMatrix2x3fv:"uniformMatrix",uniformMatrix3fv:"uniformMatrix",uniformMatrix4x3fv:"uniformMatrix",uniformMatrix2x4fv:"uniformMatrix",uniformMatrix3x4fv:"uniformMatrix",uniformMatrix4fv:"uniformMatrix",vertexAttribDivisor:"vertexAttribDivisor",vertexAttribI4i:"vertexAttribI",vertexAttribI4ui:"vertexAttribI",vertexAttribI4iv:"vertexAttribI",vertexAttribI4uiv:"vertexAttribI",vertexAttribIPointer:"vertexAttribIPointer",waitSync:"waitSync"},t.WebGLFunctions={uniform1f:"uniform",uniform1fv:"uniform",uniform1i:"uniform",uniform1iv:"uniform",uniform2f:"uniform",uniform2fv:"uniform",uniform2i:"uniform",uniform2iv:"uniform",uniform3f:"uniform",uniform3i:"uniform",uniform3iv:"uniform",uniform4f:"uniform",uniform4fv:"uniform",uniform4i:"uniform",uniform4iv:"uniform",uniformMatrix2fv:"uniformMatrix",uniformMatrix3fv:"uniformMatrix",uniformMatrix4fv:"uniformMatrix",vertexAttrib1f:"vertexAttrib",vertexAttrib2f:"vertexAttrib",vertexAttrib3f:"vertexAttrib",vertexAttrib4f:"vertexAttrib",vertexAttrib1fv:"vertexAttrib",vertexAttrib2fv:"vertexAttrib",vertexAttrib3fv:"vertexAttrib",vertexAttrib4fv:"vertexAttrib"},t}(),Nn=function(){function t(t){void 0===t&&(t=null);var e=this;this.rootPlaceHolder=t,this.onSourceCodeChanged=new a,this.rootPlaceHolder=t||document.body,this.mvx=new yi(this.rootPlaceHolder),this.searchText="",this.currentCommandId=-1,this.visible=!1,this.commandCount=0,this.commandListStateId=-1,this.commandDetailStateId=-1,this.currentCaptureStateId=-1,this.currentCommandStateId=-1,this.currentVisualStateId=-1,this.visualStateListStateId=-1,this.initVisualStateId=-1,this.sourceCodeComponentStateId=-1,this.captureListComponent=new Zi,this.captureListItemComponent=new Ji,this.visualStateListComponent=new en,this.visualStateListItemComponent=new sn,this.commandListComponent=new an,this.commandListItemComponent=new ln,this.commandDetailComponent=new cn,this.jsonContentComponent=new pn,this.jsonGroupComponent=new mn,this.jsonItemComponent=new vn,this.jsonImageItemComponent=new xn,this.jsonHelpItemComponent=new Tn,this.jsonVisualStateItemComponent=new wn,this.resultViewMenuComponent=new bn,this.resultViewContentComponent=new An,this.resultViewComponent=new Mn,this.sourceCodeComponent=new Pn,this.informationColumnComponent=new In,this.rootStateId=this.mvx.addRootState(null,this.resultViewComponent),this.menuStateId=this.mvx.addChildState(this.rootStateId,null,this.resultViewMenuComponent),this.contentStateId=this.mvx.addChildState(this.rootStateId,null,this.resultViewContentComponent),this.captureListStateId=this.mvx.addChildState(this.rootStateId,!1,this.captureListComponent),this.initKeyboardEvents(),this.initMenuComponent(),this.captureListComponent.onCaptureLoaded.add((function(t){e.addCapture(t)})),this.captureListItemComponent.onCaptureSelected.add((function(t){e.selectCapture(t.stateId)})),this.captureListItemComponent.onSaveRequested.add((function(t){e.saveCapture(t.state.capture)})),this.visualStateListItemComponent.onVisualStateSelected.add((function(t){e.selectVisualState(t.stateId)})),this.commandListItemComponent.onCommandSelected.add((function(t){e.selectCommand(t.stateId)})),this.commandListItemComponent.onVertexSelected.add((function(t){e.selectCommand(t.stateId),e.openShader(!1)})),this.commandListItemComponent.onFragmentSelected.add((function(t){e.selectCommand(t.stateId),e.openShader(!0)})),this.sourceCodeComponent.onSourceCodeCloseClicked.add((function(){e.displayCurrentCapture()})),this.sourceCodeComponent.onTranslatedVertexSourceClicked.add((function(t){var i=e.mvx.getGenericState(e.sourceCodeComponentStateId);i.fragment=!1,i.translated=!0,e.mvx.updateState(e.sourceCodeComponentStateId,i)})),this.sourceCodeComponent.onTranslatedFragmentSourceClicked.add((function(t){var i=e.mvx.getGenericState(e.sourceCodeComponentStateId);i.fragment=!0,i.translated=!0,e.mvx.updateState(e.sourceCodeComponentStateId,i)})),this.sourceCodeComponent.onVertexSourceClicked.add((function(t){var i=e.mvx.getGenericState(e.sourceCodeComponentStateId);i.fragment=!1,i.translated=!1,e.mvx.updateState(e.sourceCodeComponentStateId,i)})),this.sourceCodeComponent.onFragmentSourceClicked.add((function(t){var i=e.mvx.getGenericState(e.sourceCodeComponentStateId);i.fragment=!0,i.translated=!1,e.mvx.updateState(e.sourceCodeComponentStateId,i)})),this.sourceCodeComponent.onSourceCodeChanged.add((function(t){e.onSourceCodeChanged.trigger({programId:t.state.programId,sourceFragment:t.state.sourceFragment,sourceVertex:t.state.sourceVertex,translatedSourceFragment:t.state.translatedSourceFragment,translatedSourceVertex:t.state.translatedSourceVertex})})),this.updateViewState()}return t.prototype.saveCapture=function(t){var e=JSON.stringify(t,null,4),i=new Blob([e],{type:"octet/stream"}),n="capture "+new Date(t.startTime).toTimeString().split(" ")[0]+".json";if(navigator.msSaveBlob)navigator.msSaveBlob(i,n);else{var r=document.createElement("a"),s=window.URL.createObjectURL(i);r.setAttribute("href",s),r.setAttribute("download",n),r.click()}},t.prototype.selectCapture=function(t){this.currentCommandId=-1,this.currentCaptureStateId=t,this.displayCurrentCapture()},t.prototype.selectCommand=function(t){this.currentCommandStateId=t,this.currentVisualStateId=this.displayCurrentCommand(),this.displayCurrentVisualState()},t.prototype.selectVisualState=function(t){this.currentVisualStateId=t,this.currentCommandStateId=this.displayCurrentVisualState(),this.displayCurrentCommand()},t.prototype.display=function(t){this.visible=!0,this.updateViewState(),t&&this.addCapture(t)},t.prototype.hide=function(){this.visible=!1,this.updateViewState()},t.prototype.addCapture=function(t){var e=this.mvx.insertChildState(this.captureListStateId,{capture:t,active:!1},0,this.captureListItemComponent);return this.selectCapture(e),e},t.prototype.showSourceCodeError=function(t){this.sourceCodeComponent.showError(t)},t.prototype.initKeyboardEvents=function(){var t=this;this.rootPlaceHolder.addEventListener("keydown",(function(e){40===t.mvx.getGenericState(t.menuStateId).status&&(38===e.keyCode?(e.preventDefault(),e.stopPropagation(),t.selectPreviousCommand()):40===e.keyCode?(e.preventDefault(),e.stopPropagation(),t.selectNextCommand()):33===e.keyCode?(e.preventDefault(),e.stopPropagation(),t.selectPreviousVisualState()):34===e.keyCode&&(e.preventDefault(),e.stopPropagation(),t.selectNextVisualState()))}))},t.prototype.openShader=function(t){this.mvx.removeChildrenStates(this.contentStateId);var e=this.mvx.getGenericState(this.currentCommandStateId);this.sourceCodeComponentStateId=this.mvx.addChildState(this.contentStateId,{programId:e.capture.DrawCall.programStatus.program.__SPECTOR_Object_TAG.id,nameVertex:e.capture.DrawCall.shaders[0].name,nameFragment:e.capture.DrawCall.shaders[1].name,sourceVertex:e.capture.DrawCall.shaders[0].source,sourceFragment:e.capture.DrawCall.shaders[1].source,translatedSourceVertex:e.capture.DrawCall.shaders[0].translatedSource,translatedSourceFragment:e.capture.DrawCall.shaders[1].translatedSource,fragment:t,translated:!1,editable:e.capture.DrawCall.programStatus.RECOMPILABLE},this.sourceCodeComponent),this.commandDetailStateId=this.mvx.addChildState(this.contentStateId,null,this.commandDetailComponent),this.displayCurrentCommandDetail(e)},t.prototype.selectPreviousCommand=function(){var t=this.mvx.getGenericState(this.currentCommandStateId);t.previousCommandStateId<0||this.selectCommand(t.previousCommandStateId)},t.prototype.selectNextCommand=function(){var t=this.mvx.getGenericState(this.currentCommandStateId);t.nextCommandStateId<0||this.selectCommand(t.nextCommandStateId)},t.prototype.selectPreviousVisualState=function(){var t=this.mvx.getGenericState(this.currentVisualStateId);t.previousVisualStateId<0||this.selectVisualState(t.previousVisualStateId)},t.prototype.selectNextVisualState=function(){var t=this.mvx.getGenericState(this.currentVisualStateId);t.nextVisualStateId<0||this.selectVisualState(t.nextVisualStateId)},t.prototype.initMenuComponent=function(){var t=this;this.mvx.updateState(this.menuStateId,{status:0,searchText:this.searchText,commandCount:0}),this.resultViewMenuComponent.onCloseClicked.add((function(e){t.hide()})),this.resultViewMenuComponent.onCapturesClicked.add((function(e){t.displayCaptures()})),this.resultViewMenuComponent.onCommandsClicked.add((function(e){t.displayCurrentCapture()})),this.resultViewMenuComponent.onInformationClicked.add((function(e){t.displayInformation()})),this.resultViewMenuComponent.onInitStateClicked.add((function(e){t.displayInitState()})),this.resultViewMenuComponent.onEndStateClicked.add((function(e){t.displayEndState()})),this.resultViewMenuComponent.onSearchTextChanged.add((function(e){t.search(e.sender.value)})),this.resultViewMenuComponent.onSearchTextCleared.add((function(e){t.mvx.updateState(t.menuStateId,{status:e.state.status,searchText:"",commandCount:e.state.commandCount}),t.search("")}))},t.prototype.onCaptureRelatedAction=function(t){var e=this.mvx.getGenericState(this.currentCaptureStateId);return this.commandCount=e.capture.commands.length,this.mvx.removeChildrenStates(this.contentStateId),this.mvx.updateState(this.menuStateId,{status:t,searchText:this.searchText,commandCount:this.commandCount}),this.mvx.getGenericState(this.captureListStateId)&&this.mvx.updateState(this.captureListStateId,!1),e.capture},t.prototype.displayCaptures=function(){this.mvx.updateState(this.menuStateId,{status:0,searchText:this.searchText,commandCount:this.commandCount}),this.mvx.updateState(this.captureListStateId,!0)},t.prototype.displayInformation=function(){var t=this.onCaptureRelatedAction(10),e=this.mvx.addChildState(this.contentStateId,!0,this.informationColumnComponent),i=this.mvx.addChildState(this.contentStateId,!1,this.informationColumnComponent),n=this.mvx.addChildState(e,null,this.jsonContentComponent);this.displayJSONGroup(n,"Canvas",t.canvas),this.displayJSONGroup(n,"Context",t.context);for(var r=this.mvx.addChildState(i,null,this.jsonContentComponent),s=0,o=t.analyses;s<o.length;s++){var a=o[s];"Primitives"===a.analyserName?this.displayJSONGroup(r,"Vertices count",a):this.displayJSONGroup(r,a.analyserName,a)}this.displayJSONGroup(r,"Frame Memory Changes",t.frameMemory),this.displayJSONGroup(r,"Total Memory (seconds since application start: bytes)",t.memory)},t.prototype.displayJSON=function(t,e){for(var i in e.VisualState&&this.mvx.addChildState(t,e.VisualState,this.jsonVisualStateItemComponent),e)if("VisualState"!==i&&"analyserName"!==i&&"source"!==i&&"translatedSource"!==i){var n=e[i];if("visual"===i)for(var r in n)n.hasOwnProperty(r)&&n[r]&&this.mvx.addChildState(t,{key:r,value:n[r],pixelated:"NEAREST"===e.samplerMagFilter||"NEAREST"===e.magFilter},this.jsonImageItemComponent);else{var s=this.getJSONAsString(t,i,n);if(null==s)continue;if(this.toFilter(i)&&this.toFilter(n))continue;this.mvx.addChildState(t,{key:i,value:s},this.jsonItemComponent)}n&&n.__SPECTOR_Metadata&&this.displayJSONGroup(t,"Metadata",n.__SPECTOR_Metadata)}},t.prototype.getJSONAsString=function(t,e,i){if(null===i)return"null";if(void 0===i)return"undefined";if("number"==typeof i)return Math.floor(i)===i?i.toFixed(0):i.toFixed(4);if("string"==typeof i)return i;if("boolean"==typeof i)return i?"true":"false";if(0===i.length)return"Empty Array";if(i.length){for(var n=[],r=0;r<i.length;r++){var s=this.getJSONAsString(t,"".concat(e,"(").concat(r.toFixed(0),")"),i[r]);null!==s&&n.push(s)}return 0===n.length?null:n.join(", ")}return i.help?(this.mvx.addChildState(t,{key:e,value:i.name,help:i.help},this.jsonHelpItemComponent),null):i.__SPECTOR_Object_TAG?i.__SPECTOR_Object_TAG.displayText:i.displayText?i.displayText:("object"==typeof i&&this.displayJSONGroup(t,e,i),null)},t.prototype.displayJSONGroup=function(t,e,i){if(i){var n=this.mvx.addChildState(t,e,this.jsonGroupComponent);this.displayJSON(n,i),this.mvx.hasChildren(n)||this.mvx.removeState(n)}},t.prototype.displayInitState=function(){var t=this.onCaptureRelatedAction(20),e=this.mvx.addChildState(this.contentStateId,null,this.jsonContentComponent);this.displayJSON(e,t.initState)},t.prototype.displayEndState=function(){var t=this.onCaptureRelatedAction(30),e=this.mvx.addChildState(this.contentStateId,null,this.jsonContentComponent);this.displayJSON(e,t.endState)},t.prototype.displayCurrentCapture=function(){var t=this.onCaptureRelatedAction(40);this.mvx.updateAllChildrenGenericState(this.captureListStateId,(function(t){return t.active=!1,t})),this.mvx.updateState(this.currentCaptureStateId,{capture:t,active:!0}),this.createVisualStates(t),this.commandListStateId=this.mvx.addChildState(this.contentStateId,null,this.commandListComponent),this.commandDetailStateId=this.mvx.addChildState(this.contentStateId,null,this.commandDetailComponent),this.createCommands(t)},t.prototype.displayCurrentCommand=function(){if(40!==this.mvx.getGenericState(this.menuStateId).status)return-1;var t=this.mvx.getGenericState(this.currentCommandStateId),e=t.capture;return this.currentCommandId=e.id,this.mvx.updateAllChildrenGenericState(this.commandListStateId,(function(t){return t.active=!1,t})),this.mvx.updateState(this.currentCommandStateId,{capture:e,visualStateId:t.visualStateId,previousCommandStateId:t.previousCommandStateId,nextCommandStateId:t.nextCommandStateId,active:!0}),this.displayCurrentCommandDetail(t)},t.prototype.displayCurrentCommandDetail=function(t){var e=t.capture;this.mvx.removeChildrenStates(this.commandDetailStateId);var i=this.mvx.getGenericState(t.visualStateId);this.mvx.addChildState(this.commandDetailStateId,i.VisualState,this.jsonVisualStateItemComponent);var n="Unknown";switch(e.status){case 50:n="Deprecated";break;case 10:n="Unused";break;case 20:n="Disabled";break;case 30:n="Redundant";break;case 40:n="Valid"}var r=Dn.getMDNLink(e.name);for(var s in e.result?this.displayJSONGroup(this.commandDetailStateId,"Global",{name:{help:r,name:e.name},duration:e.commandEndTime-e.startTime,result:e.result,status:n}):"LOG"!==e.name&&this.displayJSONGroup(this.commandDetailStateId,"Global",{name:{help:r,name:e.name},duration:e.commandEndTime-e.startTime,status:n}),e)"VisualState"!==s&&"result"!==s&&"object"==typeof e[s]&&this.displayJSONGroup(this.commandDetailStateId,s,e[s]);return t.visualStateId},t.prototype.displayCurrentVisualState=function(){if(40!==this.mvx.getGenericState(this.menuStateId).status)return null;var t=this.mvx.getGenericState(this.currentVisualStateId);return t.commandStateId===Number.MIN_VALUE?this.displayInitState():t.commandStateId===Number.MAX_VALUE&&this.displayEndState(),this.mvx.updateAllChildrenGenericState(this.visualStateListStateId,(function(t){return t.active=!1,t})),t.active=!0,this.mvx.updateState(this.currentVisualStateId,t),t.commandStateId},t.prototype.createVisualStates=function(t){this.visualStateListStateId=this.mvx.addChildState(this.contentStateId,null,this.visualStateListComponent),this.mvx.removeChildrenStates(this.visualStateListStateId),this.initVisualStateId=this.mvx.addChildState(this.visualStateListStateId,{VisualState:t.initState.VisualState,time:t.startTime,commandStateId:Number.MIN_VALUE,active:!1},this.visualStateListItemComponent)},t.prototype.createCommands=function(t){this.mvx.removeChildrenStates(this.commandListStateId);for(var e=this.initVisualStateId,i=!1,n=null,r=-1,s=null,o=-1,a=0;a<t.commands.length;a++){var h=t.commands[a];if(!this.toFilter(h.marker)||!this.toFilter(h.name)||h.id===this.currentCommandId||"LOG"===h.name&&!this.toFilter(h.text)){var l={capture:h,previousCommandStateId:r,nextCommandStateId:-1,visualStateId:void 0,active:!1},u=this.mvx.addChildState(this.commandListStateId,l,this.commandListItemComponent);if(n&&((n=this.mvx.getGenericState(r)).nextCommandStateId=u,this.mvx.updateState(r,n)),r=u,n=l,h.VisualState){var c={VisualState:h.VisualState,time:h.endTime,commandStateId:u,active:!1,previousVisualStateId:o,nextVisualStateId:-1};e=this.mvx.addChildState(this.visualStateListStateId,c,this.visualStateListItemComponent),s&&((s=this.mvx.getGenericState(o)).nextVisualStateId=e,this.mvx.updateState(o,s)),s=c,o=e,i=!0}else if(!i){var d=this.mvx.getGenericState(this.initVisualStateId);d.commandStateId=u,d.previousVisualStateId=-1,d.nextVisualStateId=-1,this.mvx.updateState(this.initVisualStateId,d),s=d,o=e,i=!0}l.visualStateId=e,this.mvx.updateState(u,l),(-1===this.currentCommandId&&0===a||this.currentCommandId===h.id)&&(this.currentCommandStateId=u,this.displayCurrentCommand(),this.currentVisualStateId=e,this.displayCurrentVisualState())}}},t.prototype.updateViewState=function(){this.mvx.updateState(this.rootStateId,this.visible)},t.prototype.toFilter=function(t){return t=(t+="").toLowerCase(),!!(this.searchText&&this.searchText.length>2&&-1===t.indexOf(this.searchText.toLowerCase()))},t.prototype.search=function(t){switch(this.searchText=t,this.mvx.getGenericState(this.menuStateId).status){case 0:case 40:this.displayCurrentCapture();break;case 30:this.displayEndState();break;case 10:this.displayInformation();break;case 20:this.displayInitState()}this.searchText=""},t}(),kn={CaptureMenu:Oi,ResultView:Nn},Bn=function(){function t(){this.noFrameTimeout=-1,this.captureNextFrames=0,this.captureNextCommands=0,this.quickCapture=!1,this.fullCapture=!1,this.retry=0,this.contexts=[],this.timeSpy=new qe,this.onCaptureStarted=new a,this.onCapture=new a,this.onError=new a,this.timeSpy.onFrameStart.add(this.onFrameStart,this),this.timeSpy.onFrameEnd.add(this.onFrameEnd,this),this.timeSpy.onError.add(this.onErrorInternal,this)}return t.getFirstAvailable3dContext=function(t){return this.tryGetContextFromHelperField(t)||this.tryGetContextFromCanvas(t,"webgl")||this.tryGetContextFromCanvas(t,"experimental-webgl")||this.tryGetContextFromCanvas(t,"webgl2")||this.tryGetContextFromCanvas(t,"experimental-webgl2")},t.tryGetContextFromHelperField=function(t){var e=t instanceof HTMLCanvasElement?t.getAttribute("__spector_context_type"):t.__spector_context_type;if(e)return this.tryGetContextFromCanvas(t,e)},t.tryGetContextFromCanvas=function(t,e){var i;try{i=t.getContext(e)}catch(t){}return i},t.prototype.displayUI=function(t){var e=this;void 0===t&&(t=!1),this.captureMenu||(this.getCaptureUI(),this.captureMenu.onPauseRequested.add(this.pause,this),this.captureMenu.onPlayRequested.add(this.play,this),this.captureMenu.onPlayNextFrameRequested.add(this.playNextFrame,this),this.captureMenu.onCaptureRequested.add((function(t){t&&e.captureCanvas(t.ref)}),this),setInterval((function(){e.captureMenu.setFPS(e.getFps())}),1e3),t||this.captureMenu.trackPageCanvases(),this.captureMenu.display()),this.resultView||(this.getResultUI(),this.onCapture.add((function(t){e.resultView.display(),e.resultView.addCapture(t)})))},t.prototype.getResultUI=function(t){var e=this;return void 0===t&&(t=null),this.resultView||(this.resultView=new Nn(t),this.resultView.onSourceCodeChanged.add((function(t){e.rebuildProgramFromProgramId(t.programId,t.sourceVertex,t.sourceFragment,(function(i){e.referenceNewProgram(t.programId,i),e.resultView.showSourceCodeError(null)}),(function(t){e.resultView.showSourceCodeError(t)}))}))),this.resultView},t.prototype.getCaptureUI=function(){return this.captureMenu||(this.captureMenu=new Oi),this.captureMenu},t.prototype.rebuildProgramFromProgramId=function(t,e,i,n,r){var s=me.getFromGlobalStore(t);this.rebuildProgram(s,e,i,n,r)},t.prototype.rebuildProgram=function(t,e,i,n,s){r.rebuildProgram(t,e,i,n,s)},t.prototype.referenceNewProgram=function(t,e){me.updateInGlobalStore(t,e)},t.prototype.pause=function(){this.timeSpy.changeSpeedRatio(0)},t.prototype.play=function(){this.timeSpy.changeSpeedRatio(1)},t.prototype.playNextFrame=function(){this.timeSpy.playNextFrame()},t.prototype.drawOnlyEveryXFrame=function(t){this.timeSpy.changeSpeedRatio(t)},t.prototype.getFps=function(){return this.timeSpy.getFps()},t.prototype.spyCanvases=function(){this.canvasSpy?this.onErrorInternal("Already spying canvas."):(this.canvasSpy=new Ze,this.canvasSpy.onContextRequested.add(this.spyContext,this))},t.prototype.spyCanvas=function(t){this.canvasSpy?this.onErrorInternal("Already spying canvas."):(this.canvasSpy=new Ze(t),this.canvasSpy.onContextRequested.add(this.spyContext,this))},t.prototype.getAvailableContexts=function(){return this.getAvailableContexts()},t.prototype.captureCanvas=function(e,i,n,r){void 0===i&&(i=0),void 0===n&&(n=!1),void 0===r&&(r=!1);var s=this.getAvailableContextSpyByCanvas(e);if(s)this.captureContextSpy(s,i,n,r);else{var a=t.getFirstAvailable3dContext(e);a?this.captureContext(a,i,n,r):o.error("No webgl context available on the chosen canvas.")}},t.prototype.captureContext=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=!1),void 0===n&&(n=!1);var r=this.getAvailableContextSpyByCanvas(t.canvas);r||((r=t.getIndexedParameter?new Ke({context:t,version:2,recordAlways:!1}):new Ke({context:t,version:1,recordAlways:!1})).onMaxCommand.add(this.stopCapture,this),this.contexts.push({canvas:r.context.canvas,contextSpy:r})),r&&this.captureContextSpy(r,e,i,n)},t.prototype.captureContextSpy=function(t,e,i,n){var r=this;void 0===e&&(e=0),void 0===i&&(i=!1),void 0===n&&(n=!1),this.quickCapture=i,this.fullCapture=n,this.capturingContext?this.onErrorInternal("Already capturing a context."):(this.retry=0,this.capturingContext=t,this.capturingContext.setMarker(this.marker),(e=Math.min(e,1e4))>0?this.captureCommands(e):this.captureFrames(1),this.noFrameTimeout=setTimeout((function(){e>0?r.stopCapture():r.capturingContext&&r.retry>1?r.onErrorInternal("No frames with gl commands detected. Try moving the camera."):r.onErrorInternal("No frames detected. Try moving the camera or implementing requestAnimationFrame.")}),1e4))},t.prototype.captureNextFrame=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1),t instanceof HTMLCanvasElement||self.OffscreenCanvas&&t instanceof OffscreenCanvas?this.captureCanvas(t,0,e,i):this.captureContext(t,0,e,i)},t.prototype.startCapture=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1),t instanceof HTMLCanvasElement||self.OffscreenCanvas&&t instanceof OffscreenCanvas?this.captureCanvas(t,e,i,n):this.captureContext(t,e,i,n)},t.prototype.stopCapture=function(){if(this.capturingContext){var t=this.capturingContext.stopCapture();if(t.commands.length>0)return this.noFrameTimeout>-1&&clearTimeout(this.noFrameTimeout),this.triggerCapture(t),this.capturingContext=void 0,this.captureNextFrames=0,this.captureNextCommands=0,t;0===this.captureNextCommands&&(this.retry++,this.captureFrames(1))}},t.prototype.setMarker=function(t){this.marker=t,this.capturingContext&&this.capturingContext.setMarker(t)},t.prototype.clearMarker=function(){this.marker=null,this.capturingContext&&this.capturingContext.clearMarker()},t.prototype.log=function(t){this.capturingContext&&this.capturingContext.log(t)},t.prototype.captureFrames=function(t){this.captureNextFrames=t,this.captureNextCommands=0,this.playNextFrame()},t.prototype.captureCommands=function(t){this.captureNextFrames=0,this.captureNextCommands=t,this.play(),this.capturingContext?(this.onCaptureStarted.trigger(void 0),this.capturingContext.startCapture(t,this.quickCapture,this.fullCapture)):(this.onErrorInternal("No context to capture from."),this.captureNextCommands=0)},t.prototype.spyContext=function(t){var e=this.getAvailableContextSpyByCanvas(t.context.canvas);e||((e=new Ke({context:t.context,version:t.contextVersion,recordAlways:!0})).onMaxCommand.add(this.stopCapture,this),this.contexts.push({canvas:e.context.canvas,contextSpy:e})),e.spy()},t.prototype.getAvailableContextSpyByCanvas=function(t){for(var e=0,i=this.contexts;e<i.length;e++){var n=i[e];if(n.canvas===t)return n.contextSpy}},t.prototype.onFrameStart=function(){this.captureNextCommands>0||(this.captureNextFrames>0?(this.capturingContext&&(this.onCaptureStarted.trigger(void 0),this.capturingContext.startCapture(0,this.quickCapture,this.fullCapture)),this.captureNextFrames--):this.capturingContext=void 0)},t.prototype.onFrameEnd=function(){this.captureNextCommands>0||0===this.captureNextFrames&&this.stopCapture()},t.prototype.triggerCapture=function(t){this.captureMenu&&this.captureMenu.captureComplete(null),this.onCapture.trigger(t)},t.prototype.onErrorInternal=function(t){if(o.error(t),this.noFrameTimeout>-1&&clearTimeout(this.noFrameTimeout),!this.capturingContext)throw t;this.capturingContext=void 0,this.captureNextFrames=0,this.captureNextCommands=0,this.retry=0,this.captureMenu&&this.captureMenu.captureComplete(t),this.onError.trigger(t)},t}()},18:(t,e,i)=>{t=i.nmd(t),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],(function(t,e,i){"use strict";var n=t("../lib/dom"),r=t("../lib/lang"),s=t("../lib/event"),o='.ace_search {background-color: #ddd;color: #666;border: 1px solid #cbcbcb;border-top: 0 none;overflow: hidden;margin: 0;padding: 4px 6px 0 4px;position: absolute;top: 0;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {margin: 0 20px 4px 0;overflow: hidden;line-height: 1.9;}.ace_replace_form {margin-right: 0;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {border-radius: 3px 0 0 3px;background-color: white;color: black;border: 1px solid #cbcbcb;border-right: 0 none;outline: 0;padding: 0;font-size: inherit;margin: 0;line-height: inherit;padding: 0 6px;min-width: 17em;vertical-align: top;min-height: 1.8em;box-sizing: content-box;}.ace_searchbtn {border: 1px solid #cbcbcb;line-height: inherit;display: inline-block;padding: 0 6px;background: #fff;border-right: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;margin: 0;position: relative;color: #666;}.ace_searchbtn:last-child {border-radius: 0 3px 3px 0;border-right: 1px solid #cbcbcb;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn:hover {background-color: #eef1f6;}.ace_searchbtn.prev, .ace_searchbtn.next {padding: 0px 0.7em}.ace_searchbtn.prev:after, .ace_searchbtn.next:after {content: "";border: solid 2px #888;width: 0.5em;height: 0.5em;border-width: 2px 0 0 2px;display:inline-block;transform: rotate(-45deg);}.ace_searchbtn.next:after {border-width: 0 2px 2px 0 ;}.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;font: 16px/16px Arial;padding: 0;height: 14px;width: 14px;top: 9px;right: 7px;position: absolute;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;box-sizing: border-box!important;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;clear: both;}.ace_search_counter {float: left;font-family: arial;padding: 0 8px;}',a=t("../keyboard/hash_handler").HashHandler,h=t("../lib/keys");n.importCssString(o,"ace_searchbox");var l=function(t,e,i){var r=n.createElement("div");n.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:"Search for",spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},""],["span",{action:"findNext",class:"ace_searchbtn next"},""],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},"All"]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:"Replace with",spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},"Replace"],["span",{action:"replaceAll",class:"ace_searchbtn"},"All"]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:"Toggle Replace mode",style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:"RegExp Search"},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:"CaseSensitive Search"},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:"Whole Word Search"},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:"Search In Selection"},"S"]]],r),this.element=r.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(t),n.importCssString(o,"ace_searchbox",t.container)};(function(){this.setEditor=function(t){t.searchBox=this,t.renderer.scroller.appendChild(this.element),this.editor=t},this.setSession=function(t){this.searchRange=null,this.$syncOptions(!0)},this.$initElements=function(t){this.searchBox=t.querySelector(".ace_search_form"),this.replaceBox=t.querySelector(".ace_replace_form"),this.searchOption=t.querySelector("[action=searchInSelection]"),this.replaceOption=t.querySelector("[action=toggleReplace]"),this.regExpOption=t.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=t.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=t.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=t.querySelector(".ace_search_counter")},this.$init=function(){var t=this.element;this.$initElements(t);var e=this;s.addListener(t,"mousedown",(function(t){setTimeout((function(){e.activeInput.focus()}),0),s.stopPropagation(t)})),s.addListener(t,"click",(function(t){var i=(t.target||t.srcElement).getAttribute("action");i&&e[i]?e[i]():e.$searchBarKb.commands[i]&&e.$searchBarKb.commands[i].exec(e),s.stopPropagation(t)})),s.addCommandKeyListener(t,(function(t,i,n){var r=h.keyCodeToString(n),o=e.$searchBarKb.findKeyCommand(i,r);o&&o.exec&&(o.exec(e),s.stopEvent(t))})),this.$onChange=r.delayedCall((function(){e.find(!1,!1)})),s.addListener(this.searchInput,"input",(function(){e.$onChange.schedule(20)})),s.addListener(this.searchInput,"focus",(function(){e.activeInput=e.searchInput,e.searchInput.value&&e.highlight()})),s.addListener(this.replaceInput,"focus",(function(){e.activeInput=e.replaceInput,e.searchInput.value&&e.highlight()}))},this.$closeSearchBarKb=new a([{bindKey:"Esc",name:"closeSearchBar",exec:function(t){t.searchBox.hide()}}]),this.$searchBarKb=new a,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f":function(t){var e=t.isReplace=!t.isReplace;t.replaceBox.style.display=e?"":"none",t.replaceOption.checked=!1,t.$syncOptions(),t.searchInput.focus()},"Ctrl-H|Command-Option-F":function(t){t.editor.getReadOnly()||(t.replaceOption.checked=!0,t.$syncOptions(),t.replaceInput.focus())},"Ctrl-G|Command-G":function(t){t.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(t){t.findPrev()},esc:function(t){setTimeout((function(){t.hide()}))},Return:function(t){t.activeInput==t.replaceInput&&t.replace(),t.findNext()},"Shift-Return":function(t){t.activeInput==t.replaceInput&&t.replace(),t.findPrev()},"Alt-Return":function(t){t.activeInput==t.replaceInput&&t.replaceAll(),t.findAll()},Tab:function(t){(t.activeInput==t.replaceInput?t.searchInput:t.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(t){t.regExpOption.checked=!t.regExpOption.checked,t.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(t){t.caseSensitiveOption.checked=!t.caseSensitiveOption.checked,t.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(t){t.wholeWordOption.checked=!t.wholeWordOption.checked,t.$syncOptions()}},{name:"toggleReplace",exec:function(t){t.replaceOption.checked=!t.replaceOption.checked,t.$syncOptions()}},{name:"searchInSelection",exec:function(t){t.searchOption.checked=!t.searchRange,t.setSearchRange(t.searchOption.checked&&t.editor.getSelectionRange()),t.$syncOptions()}}]),this.setSearchRange=function(t){this.searchRange=t,t?this.searchRangeMarker=this.editor.session.addMarker(t,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},this.$syncOptions=function(t){n.setCssClass(this.replaceOption,"checked",this.searchRange),n.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",n.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),n.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),n.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var e=this.editor.getReadOnly();this.replaceOption.style.display=e?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!e?"":"none",this.find(!1,!1,t)},this.highlight=function(t){this.editor.session.highlight(t||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(t,e,i){var r=!this.editor.find(this.searchInput.value,{skipCurrent:t,backwards:e,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:i,range:this.searchRange})&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",r),this.editor._emit("findSearchBox",{match:!r}),this.highlight(),this.updateCounter()},this.updateCounter=function(){var t=this.editor,e=t.$search.$options.re,i=0,n=0;if(e){var r=this.searchRange?t.session.getTextRange(this.searchRange):t.getValue(),s=t.session.doc.positionToIndex(t.selection.anchor);this.searchRange&&(s-=t.session.doc.positionToIndex(this.searchRange.start));for(var o,a=e.lastIndex=0;(o=e.exec(r))&&(i++,(a=o.index)<=s&&n++,!(i>999))&&(o[0]||(e.lastIndex=a+=1,!(a>=r.length))););}this.searchCounter.textContent=n+" of "+(i>999?"999+":i)},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var t=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(t,e){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=e,t&&(this.searchInput.value=t),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){var t=document.activeElement;return t==this.searchInput||t==this.replaceInput}}).call(l.prototype),e.SearchBox=l,e.Search=function(t,e){(t.searchBox||new l(t)).show(t.session.getTextRange(),e)}})),ace.require(["ace/ext/searchbox"],(function(e){t&&(t.exports=e)}))},176:(t,e,i)=>{t=i.nmd(t),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(t,e,i){"use strict";var n=t("../lib/oop"),r=t("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},s.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};n.inherits(s,r),s.getTagRule=function(t){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(t){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:t}},s.getEndRule=function(t){return{token:"comment.doc",regex:"\\*\\/",next:t}},e.DocCommentHighlightRules=s})),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],(function(t,e,i){"use strict";var n=t("../lib/oop"),r=t("./doc_comment_highlight_rules").DocCommentHighlightRules,s=t("./text_highlight_rules").TextHighlightRules,o=e.cFunctions="\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b",a=function(){var t=this.$keywords=this.createKeywordMapper({"keyword.control":"break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using","storage.type":"asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template|char16_t|char32_t","storage.modifier":"const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local","keyword.operator":"and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace","variable.language":"this","constant.language":"NULL|true|false|TRUE|FALSE|nullptr"},"identifier"),e=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source,i="%"+/(\d+\$)?/.source+/[#0\- +']*/.source+/[,;:_]?/.source+/((-?\d+)|\*(-?\d+\$)?)?/.source+/(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source+/(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source+/(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+e+"|.)?'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:e},{token:"constant.language.escape",regex:i},{token:"string.end",regex:'"|$',next:"start"},{defaultToken:"string"}]},{token:"string.start",regex:'R"\\(',stateName:"rawString",next:[{token:"string.end",regex:'\\)"',next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef|version)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:"support.function.C99.c",regex:o},{token:t,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"},{token:"keyword.operator",regex:/--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(r,"doc-",[r.getEndRule("start")]),this.normalizeRules()};n.inherits(a,s),e.c_cppHighlightRules=a})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(t,e,i){"use strict";var n=t("../range").Range,r=function(){};(function(){this.checkOutdent=function(t,e){return!!/^\s+$/.test(t)&&/^\s*\}/.test(e)},this.autoOutdent=function(t,e){var i=t.getLine(e).match(/^(\s*\})/);if(!i)return 0;var r=i[1].length,s=t.findMatchingBracket({row:e,column:r});if(!s||s.row==e)return 0;var o=this.$getIndent(t.getLine(s.row));t.replace(new n(e,0,e,r-1),o)},this.$getIndent=function(t){return t.match(/^\s*/)[0]}}).call(r.prototype),e.MatchingBraceOutdent=r})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(t,e,i){"use strict";var n=t("../../lib/oop"),r=t("../../range").Range,s=t("./fold_mode").FoldMode,o=e.FoldMode=function(t){t&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+t.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+t.end)))};n.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(t,e,i){var n=t.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var r=this._getFoldWidgetBase(t,e,i);return!r&&this.startRegionRe.test(n)?"start":r},this.getFoldWidgetRange=function(t,e,i,n){var r,s=t.getLine(i);if(this.startRegionRe.test(s))return this.getCommentRegionBlock(t,s,i);if(r=s.match(this.foldingStartMarker)){var o=r.index;if(r[1])return this.openingBracketBlock(t,r[1],i,o);var a=t.getCommentFoldRange(i,o+r[0].length,1);return a&&!a.isMultiLine()&&(n?a=this.getSectionRange(t,i):"all"!=e&&(a=null)),a}return"markbegin"!==e&&(r=s.match(this.foldingStopMarker))?(o=r.index+r[0].length,r[1]?this.closingBracketBlock(t,r[1],i,o):t.getCommentFoldRange(i,o,-1)):void 0},this.getSectionRange=function(t,e){for(var i=t.getLine(e),n=i.search(/\S/),s=e,o=i.length,a=e+=1,h=t.getLength();++e<h;){var l=(i=t.getLine(e)).search(/\S/);if(-1!==l){if(n>l)break;var u=this.getFoldWidgetRange(t,"all",e);if(u){if(u.start.row<=s)break;if(u.isMultiLine())e=u.end.row;else if(n==l)break}a=e}}return new r(s,o,a,t.getLine(a).length)},this.getCommentRegionBlock=function(t,e,i){for(var n=e.search(/\s*$/),s=t.getLength(),o=i,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,h=1;++i<s;){e=t.getLine(i);var l=a.exec(e);if(l&&(l[1]?h--:h++,!h))break}if(i>o)return new r(o,n,i,e.length)}}.call(o.prototype)})),ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],(function(t,e,i){"use strict";var n=t("../lib/oop"),r=t("./text").Mode,s=t("./c_cpp_highlight_rules").c_cppHighlightRules,o=t("./matching_brace_outdent").MatchingBraceOutdent,a=(t("../range").Range,t("./behaviour/cstyle").CstyleBehaviour),h=t("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new h};n.inherits(l,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(t,e,i){var n=this.$getIndent(e),r=this.getTokenizer().getLineTokens(e,t),s=r.tokens,o=r.state;if(s.length&&"comment"==s[s.length-1].type)return n;if("start"==t)(a=e.match(/^.*[\{\(\[]\s*$/))&&(n+=i);else if("doc-start"==t){if("start"==o)return"";var a;(a=e.match(/^\s*(\/?)\*/))&&(a[1]&&(n+=" "),n+="* ")}return n},this.checkOutdent=function(t,e,i){return this.$outdent.checkOutdent(e,i)},this.autoOutdent=function(t,e,i){this.$outdent.autoOutdent(e,i)},this.$id="ace/mode/c_cpp"}.call(l.prototype),e.Mode=l})),ace.define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"],(function(t,e,i){"use strict";var n=t("../lib/oop"),r=t("./c_cpp_highlight_rules").c_cppHighlightRules,s=function(){var t=this.createKeywordMapper({"variable.language":"this",keyword:"layout|attribute|const|uniform|varying|break|continue|do|for|while|if|else|in|out|inout|float|int|void|bool|true|false|lowp|mediump|highp|precision|invariant|discard|return|mat2|mat3|mat4|vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4|sampler2D|samplerCube|struct","constant.language":"radians|degrees|sin|cos|tan|asin|acos|atan|pow|exp|log|exp2|log2|sqrt|inversesqrt|abs|sign|floor|ceil|fract|mod|min|max|clamp|mix|step|smoothstep|length|distance|dot|cross|normalize|faceforward|reflect|refract|matrixCompMult|lessThan|lessThanEqual|greaterThan|greaterThanEqual|equal|notEqual|any|all|not|dFdx|dFdy|fwidth|texture2D|texture2DProj|texture2DLod|texture2DProjLod|textureCube|textureCubeLod|gl_MaxVertexAttribs|gl_MaxVertexUniformVectors|gl_MaxVaryingVectors|gl_MaxVertexTextureImageUnits|gl_MaxCombinedTextureImageUnits|gl_MaxTextureImageUnits|gl_MaxFragmentUniformVectors|gl_MaxDrawBuffers|gl_DepthRangeParameters|gl_DepthRange|gl_Position|gl_PointSize|gl_FragCoord|gl_FrontFacing|gl_PointCoord|gl_FragColor|gl_FragData"},"identifier");this.$rules=(new r).$rules,this.$rules.start.forEach((function(e){"function"==typeof e.token&&(e.token=t)}))};n.inherits(s,r),e.glslHighlightRules=s})),ace.define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/glsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],(function(t,e,i){"use strict";var n=t("../lib/oop"),r=t("./c_cpp").Mode,s=t("./glsl_highlight_rules").glslHighlightRules,o=t("./matching_brace_outdent").MatchingBraceOutdent,a=(t("../range").Range,t("./behaviour/cstyle").CstyleBehaviour),h=t("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new h};n.inherits(l,r),function(){this.$id="ace/mode/glsl"}.call(l.prototype),e.Mode=l})),ace.require(["ace/mode/glsl"],(function(e){t&&(t.exports=e)}))},793:(t,e,i)=>{t=i.nmd(t),ace.define("ace/theme/monokai",["require","exports","module","ace/lib/dom"],(function(t,e,i){e.isDark=!0,e.cssClass="ace-monokai",e.cssText=".ace-monokai .ace_gutter {background: #2F3129;color: #8F908A}.ace-monokai .ace_print-margin {width: 1px;background: #555651}.ace-monokai {background-color: #272822;color: #F8F8F2}.ace-monokai .ace_cursor {color: #F8F8F0}.ace-monokai .ace_marker-layer .ace_selection {background: #49483E}.ace-monokai.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #272822;}.ace-monokai .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-monokai .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #49483E}.ace-monokai .ace_marker-layer .ace_active-line {background: #202020}.ace-monokai .ace_gutter-active-line {background-color: #272727}.ace-monokai .ace_marker-layer .ace_selected-word {border: 1px solid #49483E}.ace-monokai .ace_invisible {color: #52524d}.ace-monokai .ace_entity.ace_name.ace_tag,.ace-monokai .ace_keyword,.ace-monokai .ace_meta.ace_tag,.ace-monokai .ace_storage {color: #F92672}.ace-monokai .ace_punctuation,.ace-monokai .ace_punctuation.ace_tag {color: #fff}.ace-monokai .ace_constant.ace_character,.ace-monokai .ace_constant.ace_language,.ace-monokai .ace_constant.ace_numeric,.ace-monokai .ace_constant.ace_other {color: #AE81FF}.ace-monokai .ace_invalid {color: #F8F8F0;background-color: #F92672}.ace-monokai .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #AE81FF}.ace-monokai .ace_support.ace_constant,.ace-monokai .ace_support.ace_function {color: #66D9EF}.ace-monokai .ace_fold {background-color: #A6E22E;border-color: #F8F8F2}.ace-monokai .ace_storage.ace_type,.ace-monokai .ace_support.ace_class,.ace-monokai .ace_support.ace_type {font-style: italic;color: #66D9EF}.ace-monokai .ace_entity.ace_name.ace_function,.ace-monokai .ace_entity.ace_other,.ace-monokai .ace_entity.ace_other.ace_attribute-name,.ace-monokai .ace_variable {color: #A6E22E}.ace-monokai .ace_variable.ace_parameter {font-style: italic;color: #FD971F}.ace-monokai .ace_string {color: #E6DB74}.ace-monokai .ace_comment {color: #75715E}.ace-monokai .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y}",t("../lib/dom").importCssString(e.cssText,e.cssClass)})),ace.require(["ace/theme/monokai"],(function(e){t&&(t.exports=e)}))}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={id:n,loaded:!1,exports:{}};return t[n](s,s.exports,i),s.loaded=!0,s.exports}return i.amdD=function(){throw new Error("define cannot be used indirect")},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),i.nc=void 0,i(819),i(176),i(793),i(655),i(18),i(630)})(),t.exports=e()},88155:t=>{t.exports=function(t,e,i){return{instance:e,placementID:t,shown:!1,video:i}}},25366:(t,e,i)=>{var n=i(88155),r=i(83419),s=i(45893),o=i(50792),a=i(74758),h=i(90490),l=i(76026),u=new r({Extends:o,initialize:function(t){o.call(this),this.game=t,this.data=new s(this),this.on("setdata",this.setDataHandler,this),this.on("changedata",this.changeDataHandler,this),this.hasLoaded=!1,this.dataLocked=!1,this.supportedAPIs=[],this.entryPoint="",this.entryPointData=null,this.contextID=null,this.contextType=null,this.locale=null,this.platform=null,this.version=null,this.playerID=null,this.playerName=null,this.playerPhotoURL=null,this.playerCanSubscribeBot=!1,this.paymentsReady=!1,this.catalog=[],this.purchases=[],this.leaderboards={},this.ads=[]},setDataHandler:function(t,e,i){if(!this.dataLocked){var n={};n[e]=i;var r=this;FBInstant.player.setDataAsync(n).then((function(){r.emit("savedata",n)}))}},changeDataHandler:function(t,e,i){if(!this.dataLocked){var n={};n[e]=i;var r=this;FBInstant.player.setDataAsync(n).then((function(){r.emit("savedata",n)}))}},showLoadProgress:function(t){return t.load.on("progress",(function(t){this.hasLoaded||FBInstant.setLoadingProgress(100*t)}),this),t.load.on("complete",(function(){this.hasLoaded||(this.hasLoaded=!0,FBInstant.startGameAsync().then(this.gameStartedHandler.bind(this)))}),this),this},gameStarted:function(){this.hasLoaded?this.gameStartedHandler():(this.hasLoaded=!0,FBInstant.startGameAsync().then(this.gameStartedHandler.bind(this)))},gameStartedHandler:function(){var t=FBInstant.getSupportedAPIs(),e={},i=function(t){return t[1].toUpperCase()};t.forEach((function(t){t=t.replace(/\../g,i),e[t]=!0})),this.supportedAPIs=e,this.getID(),this.getType(),this.getLocale(),this.getPlatform(),this.getSDKVersion(),this.getPlayerID(),this.getPlayerName(),this.getPlayerPhotoURL();var n=this;FBInstant.onPause((function(){n.emit("pause")})),FBInstant.getEntryPointAsync().then((function(t){n.entryPoint=t,n.entryPointData=FBInstant.getEntryPointData(),n.emit("startgame")})).catch((function(t){console.warn(t)})),this.supportedAPIs.paymentsPurchaseAsync&&FBInstant.payments.onReady((function(){n.paymentsReady=!0})).catch((function(t){console.warn(t)}))},checkAPI:function(t){return!!this.supportedAPIs[t]},getID:function(){return!this.contextID&&this.supportedAPIs.contextGetID&&(this.contextID=FBInstant.context.getID()),this.contextID},getType:function(){return!this.contextType&&this.supportedAPIs.contextGetType&&(this.contextType=FBInstant.context.getType()),this.contextType},getLocale:function(){return!this.locale&&this.supportedAPIs.getLocale&&(this.locale=FBInstant.getLocale()),this.locale},getPlatform:function(){return!this.platform&&this.supportedAPIs.getPlatform&&(this.platform=FBInstant.getPlatform()),this.platform},getSDKVersion:function(){return!this.version&&this.supportedAPIs.getSDKVersion&&(this.version=FBInstant.getSDKVersion()),this.version},getPlayerID:function(){return!this.playerID&&this.supportedAPIs.playerGetID&&(this.playerID=FBInstant.player.getID()),this.playerID},getPlayerName:function(){return!this.playerName&&this.supportedAPIs.playerGetName&&(this.playerName=FBInstant.player.getName()),this.playerName},getPlayerPhotoURL:function(){return!this.playerPhotoURL&&this.supportedAPIs.playerGetPhoto&&(this.playerPhotoURL=FBInstant.player.getPhoto()),this.playerPhotoURL},loadPlayerPhoto:function(t,e){return this.playerPhotoURL&&(t.load.setCORS("anonymous"),t.load.image(e,this.playerPhotoURL),t.load.once("filecomplete-image-"+e,(function(){this.emit("photocomplete",e)}),this),t.load.start()),this},canSubscribeBot:function(){if(this.supportedAPIs.playerCanSubscribeBotAsync){var t=this;FBInstant.player.canSubscribeBotAsync().then((function(){t.playerCanSubscribeBot=!0,t.emit("cansubscribebot")})).catch((function(e){t.emit("cansubscribebotfail",e)}))}else this.emit("cansubscribebotfail");return this},subscribeBot:function(){if(this.playerCanSubscribeBot){var t=this;FBInstant.player.subscribeBotAsync().then((function(){t.emit("subscribebot")})).catch((function(e){t.emit("subscribebotfail",e)}))}else this.emit("subscribebotfail");return this},getData:function(t){if(!this.checkAPI("playerGetDataAsync"))return this;Array.isArray(t)||(t=[t]);var e=this;return FBInstant.player.getDataAsync(t).then((function(t){for(var i in e.dataLocked=!0,t)e.data.set(i,t[i]);e.dataLocked=!1,e.emit("getdata",t)})),this},saveData:function(t){if(!this.checkAPI("playerSetDataAsync"))return this;var e=this;return FBInstant.player.setDataAsync(t).then((function(){e.emit("savedata",t)})).catch((function(t){e.emit("savedatafail",t)})),this},flushData:function(){if(!this.checkAPI("playerFlushDataAsync"))return this;var t=this;return FBInstant.player.flushDataAsync().then((function(){t.emit("flushdata")})).catch((function(e){t.emit("flushdatafail",e)})),this},getStats:function(t){if(!this.checkAPI("playerGetStatsAsync"))return this;var e=this;return FBInstant.player.getStatsAsync(t).then((function(t){e.emit("getstats",t)})).catch((function(t){e.emit("getstatsfail",t)})),this},saveStats:function(t){if(!this.checkAPI("playerSetStatsAsync"))return this;var e={};for(var i in t)"number"==typeof t[i]&&(e[i]=t[i]);var n=this;return FBInstant.player.setStatsAsync(e).then((function(){n.emit("savestats",e)})).catch((function(t){n.emit("savestatsfail",t)})),this},incStats:function(t){if(!this.checkAPI("playerIncrementStatsAsync"))return this;var e={};for(var i in t)"number"==typeof t[i]&&(e[i]=t[i]);var n=this;return FBInstant.player.incrementStatsAsync(e).then((function(t){n.emit("incstats",t)})).catch((function(t){n.emit("incstatsfail",t)})),this},saveSession:function(t){return this.checkAPI("setSessionData")?(JSON.stringify(t).length<=1e3?FBInstant.setSessionData(t):console.warn("Session data too long. Max 1000 chars."),this):this},openShare:function(t,e,i,n){return this._share("SHARE",t,e,i,n)},openInvite:function(t,e,i,n){return this._share("INVITE",t,e,i,n)},openRequest:function(t,e,i,n){return this._share("REQUEST",t,e,i,n)},openChallenge:function(t,e,i,n){return this._share("CHALLENGE",t,e,i,n)},_share:function(t,e,i,n,r){if(!this.checkAPI("shareAsync"))return this;if(void 0===r&&(r={}),i)var s=this.game.textures.getBase64(i,n);var o={intent:t,image:s,text:e,data:r},a=this;return FBInstant.shareAsync(o).then((function(){a.emit("resume")})),this},isSizeBetween:function(t,e){return this.checkAPI("contextIsSizeBetween")?FBInstant.context.isSizeBetween(t,e):this},switchContext:function(t){if(!this.checkAPI("contextSwitchAsync"))return this;if(t!==this.contextID){var e=this;FBInstant.context.switchAsync(t).then((function(){e.contextID=FBInstant.context.getID(),e.emit("switch",e.contextID)})).catch((function(t){e.emit("switchfail",t)}))}return this},chooseContext:function(t){if(!this.checkAPI("contextChooseAsync"))return this;var e=this;return FBInstant.context.chooseAsync(t).then((function(){e.contextID=FBInstant.context.getID(),e.emit("choose",e.contextID)})).catch((function(t){e.emit("choosefail",t)})),this},createContext:function(t){if(!this.checkAPI("contextCreateAsync"))return this;var e=this;return FBInstant.context.createAsync(t).then((function(){e.contextID=FBInstant.context.getID(),e.emit("create",e.contextID)})).catch((function(t){e.emit("createfail",t)})),this},getPlayers:function(){if(!this.checkAPI("playerGetConnectedPlayersAsync"))return this;var t=this;return FBInstant.player.getConnectedPlayersAsync().then((function(e){t.emit("players",e)})).catch((function(e){t.emit("playersfail",e)})),this},getCatalog:function(){if(!this.paymentsReady)return this;var t=this,e=this.catalog;return FBInstant.payments.getCatalogAsync().then((function(i){e=[],i.forEach((function(t){e.push(h(t))})),t.emit("getcatalog",e)})).catch((function(e){t.emit("getcatalogfail",e)})),this},getProduct:function(t){for(var e=0;e<this.catalog.length;e++)if(this.catalog[e].productID===t)return this.catalog[e];return null},purchase:function(t,e){if(!this.paymentsReady)return this;var i={productID:t};e&&(i.developerPayload=e);var n=this;return FBInstant.payments.purchaseAsync(i).then((function(t){var e=l(t);n.emit("purchase",e)})).catch((function(t){n.emit("purchasefail",t)})),this},getPurchases:function(){if(!this.paymentsReady)return this;var t=this,e=this.purchases;return FBInstant.payments.getPurchasesAsync().then((function(i){e=[],i.forEach((function(t){e.push(l(t))})),t.emit("getpurchases",e)})).catch((function(e){t.emit("getpurchasesfail",e)})),this},consumePurchase:function(t){if(!this.paymentsReady)return this;var e=this;return FBInstant.payments.consumePurchaseAsync(t).then((function(){e.emit("consumepurchase",t)})).catch((function(t){e.emit("consumepurchasefail",t)})),this},update:function(t,e,i,n,r,s){return this._update("CUSTOM",t,e,i,n,r,s)},updateLeaderboard:function(t,e,i,n,r,s){return this._update("LEADERBOARD",t,e,i,n,r,s)},_update:function(t,e,i,n,r,s,o){if(!this.checkAPI("shareAsync"))return this;if(void 0===e&&(e=""),"string"==typeof i&&(i={default:i}),void 0===o&&(o={}),n)var a=this.game.textures.getBase64(n,r);var h={action:t,cta:e,image:a,text:i,template:s,data:o,strategy:"IMMEDIATE",notification:"NO_PUSH"},l=this;return FBInstant.updateAsync(h).then((function(){l.emit("update")})).catch((function(t){l.emit("updatefail",t)})),this},switchGame:function(t,e){if(!this.checkAPI("switchGameAsync"))return this;if(e&&JSON.stringify(e).length>1e3)return console.warn("Switch Game data too long. Max 1000 chars."),this;var i=this;return FBInstant.switchGameAsync(t,e).then((function(){i.emit("switchgame",t)})).catch((function(t){i.emit("switchgamefail",t)})),this},createShortcut:function(){var t=this;return FBInstant.canCreateShortcutAsync().then((function(e){e&&FBInstant.createShortcutAsync().then((function(){t.emit("shortcutcreated")})).catch((function(e){t.emit("shortcutfailed",e)}))})),this},quit:function(){FBInstant.quit()},log:function(t,e,i){return this.checkAPI("logEvent")?(void 0===i&&(i={}),t.length>=2&&t.length<=40&&FBInstant.logEvent(t,parseFloat(e),i),this):this},preloadAds:function(t){if(!this.checkAPI("getInterstitialAdAsync"))return this;var e;Array.isArray(t)||(t=[t]);var i=this,r=0;for(e=0;e<this.ads.length;e++)this.ads[e].shown||r++;if(r+t.length>=3)return console.warn("Too many AdInstances. Show an ad before loading more"),this;for(e=0;e<t.length;e++){var s,o=t[e];FBInstant.getInterstitialAdAsync(o).then((function(t){return s=t,t.loadAsync()})).then((function(){var t=n(o,s,!1);i.ads.push(t),i.emit("adloaded",t)})).catch((function(t){"ADS_NO_FILL"===t.code?i.emit("adsnofill",o):"ADS_FREQUENT_LOAD"===t.code?i.emit("adsfrequentload",o):console.warn(t)}))}return this},preloadVideoAds:function(t){if(!this.checkAPI("getRewardedVideoAsync"))return this;var e;Array.isArray(t)||(t=[t]);var i=this,r=0;for(e=0;e<this.ads.length;e++)this.ads[e].shown||r++;if(r+t.length>=3)return console.warn("Too many AdInstances. Show an ad before loading more"),this;for(e=0;e<t.length;e++){var s,o=t[e];FBInstant.getRewardedVideoAsync(o).then((function(t){return s=t,t.loadAsync()})).then((function(){var t=n(o,s,!0);i.ads.push(t),i.emit("adloaded",t)})).catch((function(t){"ADS_NO_FILL"===t.code?i.emit("adsnofill",o):"ADS_FREQUENT_LOAD"===t.code?i.emit("adsfrequentload",o):console.warn(t)}))}return this},showAd:function(t){for(var e=this,i=0;i<this.ads.length;i++){var n=this.ads[i];if(n.placementID===t&&!n.shown){n.instance.showAsync().then((function(){n.shown=!0,e.emit("adfinished",n)})).catch((function(t){"ADS_NOT_LOADED"===t.code?e.emit("adsnotloaded",n):"RATE_LIMITED"===t.code&&e.emit("adratelimited",n),e.emit("adshowerror",t,n)}));break}}return this},showVideo:function(t){for(var e=this,i=0;i<this.ads.length;i++){var n=this.ads[i];if(n.placementID===t&&n.video&&!n.shown){n.instance.showAsync().then((function(){n.shown=!0,e.emit("adfinished",n)})).catch((function(t){"ADS_NOT_LOADED"===t.code?e.emit("adsnotloaded",n):"RATE_LIMITED"===t.code&&e.emit("adratelimited",n),e.emit("adshowerror",t,n)}));break}}return this},matchPlayer:function(t,e){if(void 0===t&&(t=null),void 0===e&&(e=!1),!this.checkAPI("matchPlayerAsync"))return this;var i=this;return FBInstant.matchPlayerAsync(t,e).then((function(){i.getID(),i.getType(),i.emit("matchplayer",i.contextID,i.contextType)})),this},getLeaderboard:function(t){if(!this.checkAPI("getLeaderboardAsync"))return this;var e=this;return FBInstant.getLeaderboardAsync(t).then((function(i){var n=new a(e,i);e.leaderboards[t]=n,e.emit("getleaderboard",n)})).catch((function(t){console.warn(t)})),this},destroy:function(){FBInstant.quit(),this.data.destroy(),this.removeAllListeners(),this.catalog=[],this.purchases=[],this.leaderboards=[],this.ads=[],this.game=null}});t.exports=u},74758:(t,e,i)=>{var n=i(83419),r=i(50792),s=i(57294),o=new n({Extends:r,initialize:function(t,e){r.call(this),this.plugin=t,this.ref=e,this.name=e.getName(),this.contextID=e.getContextID(),this.entryCount=0,this.playerScore=null,this.scores=[],this.getEntryCount()},getEntryCount:function(){var t=this;return this.ref.getEntryCountAsync().then((function(e){t.entryCount=e,t.emit("getentrycount",e,t.name)})).catch((function(t){console.warn(t)})),this},setScore:function(t,e){void 0===e&&(e=""),"object"==typeof e&&(e=JSON.stringify(e));var i=this;return this.ref.setScoreAsync(t,e).then((function(t){if(t){var e=s(t);i.playerScore=e,i.emit("setscore",e,i.name)}else i.emit("setscore",null,i.name)})).catch((function(t){console.warn(t)})),this},getPlayerScore:function(){var t=this;return this.ref.getPlayerEntryAsync().then((function(e){if(e){var i=s(e);t.playerScore=i,t.emit("getplayerscore",i,t.name)}else t.emit("getplayerscore",null,t.name)})).catch((function(t){console.warn(t)})),this},getScores:function(t,e){void 0===t&&(t=10),void 0===e&&(e=0);var i=this;return this.ref.getEntriesAsync(t,e).then((function(t){i.scores=[],t.forEach((function(t){i.scores.push(s(t))})),i.emit("getscores",i.scores,i.name)})).catch((function(t){console.warn(t)})),this},getConnectedScores:function(){var t=this;return this.ref.getConnectedPlayerEntriesAsync().then((function(e){t.scores=[],e.forEach((function(e){t.scores.push(s(e))})),t.emit("getconnectedscores",t.scores,t.name)})).catch((function(t){console.warn(t)})),this}});t.exports=o},57294:t=>{t.exports=function(t){return{score:t.getScore(),scoreFormatted:t.getFormattedScore(),timestamp:t.getTimestamp(),rank:t.getRank(),data:t.getExtraData(),playerName:t.getPlayer().getName(),playerPhotoURL:t.getPlayer().getPhoto(),playerID:t.getPlayer().getID()}}},90490:(t,e,i)=>{var n=i(95540);t.exports=function(t){return{title:n(t,"title",""),productID:n(t,"productID",""),description:n(t,"description",""),imageURI:n(t,"imageURI",""),price:n(t,"price",""),priceCurrencyCode:n(t,"priceCurrencyCode","")}}},76026:(t,e,i)=>{var n=i(95540);t.exports=function(t){return{developerPayload:n(t,"developerPayload",""),paymentID:n(t,"paymentID",""),productID:n(t,"productID",""),purchaseTime:n(t,"purchaseTime",""),purchaseToken:n(t,"purchaseToken",""),signedRequest:n(t,"signedRequest","")}}},11517:(t,e,i)=>{var n=i(38829);t.exports=function(t,e,i,r){for(var s=t[0],o=1;o<t.length;o++){var a=t[o];n(a,s,e,i,r),s=a}return t}},80318:(t,e,i)=>{var n=i(66979);t.exports=function(t,e,i,r,s){return n(t,"angle",e,i,r,s)}},60757:t=>{t.exports=function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n];e.call(i,r)}return t}},69927:t=>{t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=i;n<t.length;n++){var r=t[n],s=!0;for(var o in e)r[o]!==e[o]&&(s=!1);if(s)return r}return null}},32265:t=>{t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=t.length-1;n>=i;n--){var r=t[n],s=!0;for(var o in e)r[o]!==e[o]&&(s=!1);if(s)return r}return null}},94420:(t,e,i)=>{var n=i(11879),r=i(60461),s=i(95540),o=i(29747),a=new(i(41481))({sys:{queueDepthSort:o,events:{once:o}}},0,0,1,1).setOrigin(0,0);t.exports=function(t,e){void 0===e&&(e={});var i=e.hasOwnProperty("width"),o=e.hasOwnProperty("height"),h=s(e,"width",-1),l=s(e,"height",-1),u=s(e,"cellWidth",1),c=s(e,"cellHeight",u),d=s(e,"position",r.TOP_LEFT),p=s(e,"x",0),f=s(e,"y",0),m=0,g=0,v=h*u,y=l*c;a.setPosition(p,f),a.setSize(u,c);for(var x=0;x<t.length;x++)if(n(t[x],a,d),i&&-1===h)a.x+=u;else if(o&&-1===l)a.y+=c;else if(o&&!i){if(g+=c,a.y+=c,g===y&&(g=0,m+=u,a.y=f,a.x+=u,m===v))break}else if(m+=u,a.x+=u,m===v&&(m=0,g+=c,a.x=p,a.y+=c,g===y))break;return t}},41721:(t,e,i)=>{var n=i(66979);t.exports=function(t,e,i,r,s){return n(t,"alpha",e,i,r,s)}},67285:(t,e,i)=>{var n=i(66979);t.exports=function(t,e,i,r,s){return n(t,"x",e,i,r,s)}},9074:(t,e,i)=>{var n=i(66979);t.exports=function(t,e,i,r,s,o,a){return null==i&&(i=e),n(t,"x",e,r,o,a),n(t,"y",i,s,o,a)}},75222:(t,e,i)=>{var n=i(66979);t.exports=function(t,e,i,r,s){return n(t,"y",e,i,r,s)}},22983:t=>{t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var r=i,s=(n-i)/t.length,o=e.x,a=e.y,h=e.radius,l=0;l<t.length;l++)t[l].x=o+h*Math.cos(r),t[l].y=a+h*Math.sin(r),r+=s;return t}},95253:t=>{t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var r=i,s=(n-i)/t.length,o=e.width/2,a=e.height/2,h=0;h<t.length;h++)t[h].x=e.x+o*Math.cos(r),t[h].y=e.y+a*Math.sin(r),r+=s;return t}},88505:(t,e,i)=>{var n=i(15258),r=i(26708);t.exports=function(t,e,i){var s;s=i?r(e,i,t.length):n(e,t.length);for(var o=0;o<t.length;o++){var a=t[o],h=s[o];a.x=h.x,a.y=h.y}return t}},41346:(t,e,i)=>{var n=i(14649),r=i(86003),s=i(49498);t.exports=function(t,e,i){void 0===i&&(i=0);var o=n(e,!1,t.length);i>0?r(o,i):i<0&&s(o,Math.abs(i));for(var a=0;a<t.length;a++)t[a].x=o[a].x,t[a].y=o[a].y;return t}},11575:(t,e,i)=>{var n=i(84993);t.exports=function(t,e,i){var r=n({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),s=n({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),o=n({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);r.pop(),s.pop(),o.pop();for(var a=(r=r.concat(s,o)).length/t.length,h=0,l=0;l<t.length;l++){var u=t[l],c=r[Math.floor(h)];u.x=c.x,u.y=c.y,h+=a}return t}},29953:t=>{t.exports=function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n];r.anims&&r.anims.play(e,i)}return t}},66979:t=>{t.exports=function(t,e,i,n,r,s){var o;void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=1);var a=0,h=t.length;if(1===s)for(o=r;o<h;o++)t[o][e]+=i+a*n,a++;else for(o=r;o>=0;o--)t[o][e]+=i+a*n,a++;return t}},43967:t=>{t.exports=function(t,e,i,n,r,s){var o;void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=1);var a=0,h=t.length;if(1===s)for(o=r;o<h;o++)t[o][e]=i+a*n,a++;else for(o=r;o>=0;o--)t[o][e]=i+a*n,a++;return t}},88926:(t,e,i)=>{var n=i(28176);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},33286:(t,e,i)=>{var n=i(24820);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},96e3:(t,e,i)=>{var n=i(65822);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},28789:(t,e,i)=>{var n=i(26597);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},97154:(t,e,i)=>{var n=i(90260);t.exports=function(t,e){for(var i=0;i<t.length;i++)n(e,t[i]);return t}},20510:(t,e,i)=>{var n=i(66979);t.exports=function(t,e,i,r,s){return n(t,"rotation",e,i,r,s)}},91051:(t,e,i)=>{var n=i(1163),r=i(20339);t.exports=function(t,e,i){for(var s=e.x,o=e.y,a=0;a<t.length;a++){var h=t[a];n(h,s,o,i,Math.max(1,r(h.x,h.y,s,o)))}return t}},76332:(t,e,i)=>{var n=i(1163);t.exports=function(t,e,i,r){var s=e.x,o=e.y;if(0===r)return t;for(var a=0;a<t.length;a++)n(t[a],s,o,i,r);return t}},61619:(t,e,i)=>{var n=i(66979);t.exports=function(t,e,i,r,s){return n(t,"scaleX",e,i,r,s)}},94868:(t,e,i)=>{var n=i(66979);t.exports=function(t,e,i,r,s,o,a){return null==i&&(i=e),n(t,"scaleX",e,r,o,a),n(t,"scaleY",i,s,o,a)}},95532:(t,e,i)=>{var n=i(66979);t.exports=function(t,e,i,r,s){return n(t,"scaleY",e,i,r,s)}},8689:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s){return n(t,"alpha",e,i,r,s)}},2645:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r){return n(t,"blendMode",e,0,i,r)}},32372:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s){return n(t,"depth",e,i,r,s)}},85373:t=>{t.exports=function(t,e,i){for(var n=0;n<t.length;n++)t[n].setInteractive(e,i);return t}},81583:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s,o,a){return null==i&&(i=e),n(t,"originX",e,r,o,a),n(t,"originY",i,s,o,a),t.forEach((function(t){t.updateDisplayOrigin()})),t}},79939:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s){return n(t,"rotation",e,i,r,s)}},2699:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s,o,a){return null==i&&(i=e),n(t,"scaleX",e,r,o,a),n(t,"scaleY",i,s,o,a)}},98739:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s){return n(t,"scaleX",e,i,r,s)}},98476:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s){return n(t,"scaleY",e,i,r,s)}},6207:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s,o,a){return null==i&&(i=e),n(t,"scrollFactorX",e,r,o,a),n(t,"scrollFactorY",i,s,o,a)}},6607:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s){return n(t,"scrollFactorX",e,i,r,s)}},72248:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s){return n(t,"scrollFactorY",e,i,r,s)}},14036:t=>{t.exports=function(t,e,i,n,r){for(var s=0;s<t.length;s++)t[s].setTint(e,i,n,r);return t}},50159:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r){return n(t,"visible",e,0,i,r)}},77597:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s){return n(t,"x",e,i,r,s)}},83194:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s,o,a){return null==i&&(i=e),n(t,"x",e,r,o,a),n(t,"y",i,s,o,a)}},67678:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,r,s){return n(t,"y",e,i,r,s)}},35850:(t,e,i)=>{var n=i(26099);t.exports=function(t,e,i,r,s){var o,a;void 0===r&&(r=0),void 0===s&&(s=new n);var h=t.length;if(1===h)o=t[0].x,a=t[0].y,t[0].x=e,t[0].y=i;else{var l=1,u=0;0===r&&(u=h-1,l=h-2),o=t[u].x,a=t[u].y,t[u].x=e,t[u].y=i;for(var c=0;c<h;c++)if(!(l>=h||-1===l)){var d=t[l],p=d.x,f=d.y;d.x=o,d.y=a,o=p,a=f,0===r?l--:l++}}return s.x=o,s.y=a,s}},8628:(t,e,i)=>{var n=i(33680);t.exports=function(t){return n(t)}},21837:(t,e,i)=>{var n=i(7602);t.exports=function(t,e,i,r,s){void 0===s&&(s=!1);var o,a=Math.abs(r-i)/t.length;if(s)for(o=0;o<t.length;o++)t[o][e]+=n(o*a,i,r);else for(o=0;o<t.length;o++)t[o][e]=n(o*a,i,r);return t}},21910:(t,e,i)=>{var n=i(54261);t.exports=function(t,e,i,r,s){void 0===s&&(s=!1);var o,a=Math.abs(r-i)/t.length;if(s)for(o=0;o<t.length;o++)t[o][e]+=n(o*a,i,r);else for(o=0;o<t.length;o++)t[o][e]=n(o*a,i,r);return t}},62054:t=>{t.exports=function(t,e,i,n,r){if(void 0===r&&(r=!1),0===t.length)return t;if(1===t.length)return r?t[0][e]+=(n+i)/2:t[0][e]=(n+i)/2,t;var s,o=Math.abs(n-i)/(t.length-1);if(r)for(s=0;s<t.length;s++)t[s][e]+=s*o+i;else for(s=0;s<t.length;s++)t[s][e]=s*o+i;return t}},79815:t=>{t.exports=function(t){for(var e=0;e<t.length;e++)t[e].visible=!t[e].visible;return t}},39665:(t,e,i)=>{var n=i(15994);t.exports=function(t,e,i){void 0===i&&(i=0);for(var r=0;r<t.length;r++){var s=t[r];s.x=n(s.x,e.left-i,e.right+i),s.y=n(s.y,e.top-i,e.bottom+i)}return t}},61061:(t,e,i)=>{t.exports={AlignTo:i(11517),Angle:i(80318),Call:i(60757),GetFirst:i(69927),GetLast:i(32265),GridAlign:i(94420),IncAlpha:i(41721),IncX:i(67285),IncXY:i(9074),IncY:i(75222),PlaceOnCircle:i(22983),PlaceOnEllipse:i(95253),PlaceOnLine:i(88505),PlaceOnRectangle:i(41346),PlaceOnTriangle:i(11575),PlayAnimation:i(29953),PropertyValueInc:i(66979),PropertyValueSet:i(43967),RandomCircle:i(88926),RandomEllipse:i(33286),RandomLine:i(96e3),RandomRectangle:i(28789),RandomTriangle:i(97154),Rotate:i(20510),RotateAround:i(91051),RotateAroundDistance:i(76332),ScaleX:i(61619),ScaleXY:i(94868),ScaleY:i(95532),SetAlpha:i(8689),SetBlendMode:i(2645),SetDepth:i(32372),SetHitArea:i(85373),SetOrigin:i(81583),SetRotation:i(79939),SetScale:i(2699),SetScaleX:i(98739),SetScaleY:i(98476),SetScrollFactor:i(6207),SetScrollFactorX:i(6607),SetScrollFactorY:i(72248),SetTint:i(14036),SetVisible:i(50159),SetX:i(77597),SetXY:i(83194),SetY:i(67678),ShiftPosition:i(35850),Shuffle:i(8628),SmootherStep:i(21910),SmoothStep:i(21837),Spread:i(62054),ToggleVisible:i(79815),WrapInRectangle:i(39665)}},42099:(t,e,i)=>{var n=i(45319),r=i(83419),s=i(74943),o=i(81957),a=i(41138),h=i(35154),l=i(90126),u=new r({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,h(i,"frames",[]),h(i,"defaultTextureKey",null),h(i,"sortFrames",!0)),this.frameRate=h(i,"frameRate",null),this.duration=h(i,"duration",null),this.msPerFrame,this.skipMissedFrames=h(i,"skipMissedFrames",!0),this.delay=h(i,"delay",0),this.repeat=h(i,"repeat",0),this.repeatDelay=h(i,"repeatDelay",0),this.yoyo=h(i,"yoyo",!1),this.showBeforeDelay=h(i,"showBeforeDelay",!1),this.showOnStart=h(i,"showOnStart",!1),this.hideOnComplete=h(i,"hideOnComplete",!1),this.randomFrame=h(i,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(s.PAUSE_ALL,this.pause,this),this.manager.on(s.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,n){null===i&&null===n?(t.frameRate=24,t.duration=24/e*1e3):i&&null===n?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=n,t.duration=e/n*1e3),t.msPerFrame=1e3/t.frameRate},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),r=this.frames.slice(t);this.frames=n.concat(i,r)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t<this.frames.length},getFirstTick:function(t){t.accumulator=0,t.nextTick=t.currentFrame.duration?t.currentFrame.duration:t.msPerFrame},getFrameAt:function(t){return this.frames[t]},getFrames:function(t,e,i,n){void 0===n&&(n=!0);var r,s,o,u,c=[],d=1;if("string"==typeof e){if(u=e,!t.exists(u))return console.warn('Texture "%s" not found',u),c;var p=t.get(u).getFrameNames();n&&l(p),e=[],p.forEach((function(t){e.push({key:u,frame:t})}))}if(!Array.isArray(e)||0===e.length)return c;for(o=0;o<e.length;o++){var f=e[o],m=h(f,"key",i);if(m){var g=h(f,"frame",0),v=t.getFrame(m,g);v?((s=new a(m,g,d,v)).duration=h(f,"duration",0),s.isFirst=!r,r&&(r.nextFrame=s,s.prevFrame=r),c.push(s),r=s,d++):console.warn('Texture "%s" not found',m)}}if(c.length>0){s.isLast=!0,s.nextFrame=c[0],c[0].prevFrame=s;var y=1/(c.length-1);for(o=0;o<c.length;o++)c[o].progress=o*y}return c},getNextTick:function(t){t.accumulator-=t.nextTick,t.nextTick=t.currentFrame.duration?t.currentFrame.duration:t.msPerFrame},getFrameByProgress:function(t){return t=n(t,0,1),o(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t.yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t.inReverse===!e&&t.repeatCounter>0)return(0===t.repeatDelay||t.pendingRepeat)&&(t.forward=e),void this.repeatAnimation(t);if(t.inReverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?(t.inReverse&&!t.forward||(t.forward=!0),this.repeatAnimation(t)):t.complete():this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.setCurrentFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop){if(0===t._pendingStopValue)return t.stop();t._pendingStopValue--}t.repeatDelay>0&&!t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t.repeatDelay):(t.repeatCounter--,t.forward?t.setCurrentFrame(t.currentFrame.nextFrame):t.setCurrentFrame(t.currentFrame.prevFrame),t.isPlaying&&(this.getNextTick(t),t.handleRepeat()))},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach((function(e){t.frames.push(e.toJSON())})),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),n=0;n<e;n++)(t=this.frames[n]).index=n+1,t.isFirst=!1,t.isLast=!1,t.progress=n*i,0===n?(t.isFirst=!0,1===e?(t.isLast=!0,t.nextFrame=t,t.prevFrame=t):(t.isLast=!1,t.prevFrame=this.frames[e-1],t.nextFrame=this.frames[n+1])):n===e-1&&e>1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(s.PAUSE_ALL,this.pause,this),this.manager.off(s.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var t=0;t<this.frames.length;t++)this.frames[t].destroy();this.frames=[],this.manager=null}});t.exports=u},41138:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e,i,n,r){void 0===r&&(r=!1),this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=r},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=n},60848:(t,e,i)=>{var n=i(42099),r=i(83419),s=i(90330),o=i(50792),a=i(74943),h=i(8443),l=i(95540),u=i(35154),c=i(36383),d=i(20283),p=i(41836),f=new r({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new s,this.mixes=new s,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var n=this.anims,r=this.mixes,s="string"==typeof t?t:t.key,o="string"==typeof e?e:e.key;if(n.has(s)&&n.has(o)){var a=r.get(s);a||(a={}),a[o]=i,r.set(s,a)}return this},removeMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,r=i.get(n);if(r)if(e){var s="string"==typeof e?e:e.key;r.hasOwnProperty(s)&&delete r[s]}else e||i.delete(n);return this},getMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,r="string"==typeof e?e:e.key,s=i.get(n);return s&&s.hasOwnProperty(r)?s[r]:0},add:function(t,e){return this.anims.has(t)?(console.warn("Animation key exists: "+t),this):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e),this)},exists:function(t){return this.anims.has(t)},createFromAseprite:function(t,e,i){var n=[],r=this.game.cache.json.get(t);if(!r)return console.warn("No Aseprite data found for: "+t),n;var s=this,o=u(r,"meta",null),a=u(r,"frames",null);o&&a&&u(o,"frameTags",[]).forEach((function(r){var o=[],h=l(r,"name",null),u=l(r,"from",0),d=l(r,"to",0),p=l(r,"direction","forward");if(h&&(!e||e&&e.indexOf(h)>-1)){for(var f=0,m=u;m<=d;m++){var g=m.toString(),v=a[g];if(v){var y=l(v,"duration",c.MAX_SAFE_INTEGER);o.push({key:t,frame:g,duration:y}),f+=y}}"reverse"===p&&(o=o.reverse());var x,E={key:h,frames:o,duration:f,yoyo:"pingpong"===p};i?i.anims&&(x=i.anims.create(E)):x=s.create(E),x&&n.push(x)}}));return n},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))?console.warn("AnimationManager key already exists: "+e):(i=new n(this,e,t),this.anims.set(e,i),this.emit(a.ADD_ANIMATION,e,i))),i},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var n=0;n<t.anims.length;n++)i.push(this.create(t.anims[n]));t.hasOwnProperty("globalTimeScale")&&(this.globalTimeScale=t.globalTimeScale)}else t.hasOwnProperty("key")&&"frame"===t.type&&i.push(this.create(t));return i},generateFrameNames:function(t,e){var i=u(e,"prefix",""),n=u(e,"start",0),r=u(e,"end",0),s=u(e,"suffix",""),o=u(e,"zeroPad",0),a=u(e,"outputArray",[]),h=u(e,"frames",!1);if(!this.textureManager.exists(t))return console.warn('Texture "%s" not found',t),a;var l,c=this.textureManager.get(t);if(!c)return a;if(e)for(h||(h=d(n,r)),l=0;l<h.length;l++){var f=i+p(h[l],o,"0",1)+s;c.has(f)?a.push({key:t,frame:f}):console.warn('Frame "%s" not found in texture "%s"',f,t)}else for(h=c.getFrameNames(),l=0;l<h.length;l++)a.push({key:t,frame:h[l]});return a},generateFrameNumbers:function(t,e){var i=u(e,"start",0),n=u(e,"end",-1),r=u(e,"first",!1),s=u(e,"outputArray",[]),o=u(e,"frames",!1);if(!this.textureManager.exists(t))return console.warn('Texture "%s" not found',t),s;var a=this.textureManager.get(t);if(!a)return s;r&&a.has(r)&&s.push({key:t,frame:r}),o||(-1===n&&(n=a.frameTotal-2),o=d(i,n));for(var h=0;h<o.length;h++){var l=o[h];a.has(l)?s.push({key:t,frame:l}):console.warn('Frame "%s" not found in texture "%s"',l,t)}return s},get:function(t){return this.anims.get(t)},getAnimsFromTexture:function(t){for(var e=this.textureManager.get(t).key,i=this.anims.getArray(),n=[],r=0;r<i.length;r++)for(var s=i[r],o=s.frames,a=0;a<o.length;a++)if(o[a].textureKey===e){n.push(s.key);break}return n},pauseAll:function(){return this.paused||(this.paused=!0,this.emit(a.PAUSE_ALL)),this},play:function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)e[i].anims.play(t);return this},staggerPlay:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=!0),Array.isArray(e)||(e=[e]);var r=e.length;n||r--;for(var s=0;s<e.length;s++){var o=i<0?Math.abs(i)*(r-s):i*s;e[s].anims.playAfterDelay(t,o)}return this},remove:function(t){var e=this.get(t);return e&&(this.emit(a.REMOVE_ANIMATION,t,e),this.anims.delete(t),this.removeMix(t)),e},resumeAll:function(){return this.paused&&(this.paused=!1,this.emit(a.RESUME_ALL)),this},toJSON:function(t){var e={anims:[],globalTimeScale:this.globalTimeScale};return void 0!==t&&""!==t?e.anims.push(this.anims.get(t).toJSON()):this.anims.each((function(t,i){e.anims.push(i.toJSON())})),e},destroy:function(){this.anims.clear(),this.mixes.clear(),this.textureManager=null,this.game=null}});t.exports=f},9674:(t,e,i)=>{var n=i(42099),r=i(30976),s=i(83419),o=i(90330),a=i(74943),h=i(95540),l=new s({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(a.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){var e=this.parent;if(void 0===t)return this.nextAnimsQueue.length=0,this.nextAnim=null,e;Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];this.nextAnim?this.nextAnimsQueue.push(n):this.nextAnim=n}return this.parent},getName:function(){return this.currentAnim?this.currentAnim.key:""},getFrameName:function(){return this.currentFrame?this.currentFrame.textureFrame:""},load:function(t){this.isPlaying&&this.stop();var e=this.animationManager,i="string"==typeof t?t:h(t,"key",null),n=this.exists(i)?this.get(i):e.get(i);if(n){this.currentAnim=n;var s=n.getTotalFrames(),o=h(t,"frameRate",n.frameRate),a=h(t,"duration",n.duration);n.calculateDuration(this,s,a,o),this.delay=h(t,"delay",n.delay),this.repeat=h(t,"repeat",n.repeat),this.repeatDelay=h(t,"repeatDelay",n.repeatDelay),this.yoyo=h(t,"yoyo",n.yoyo),this.showBeforeDelay=h(t,"showBeforeDelay",n.showBeforeDelay),this.showOnStart=h(t,"showOnStart",n.showOnStart),this.hideOnComplete=h(t,"hideOnComplete",n.hideOnComplete),this.skipMissedFrames=h(t,"skipMissedFrames",n.skipMissedFrames),this.randomFrame=h(t,"randomFrame",n.randomFrame),this.timeScale=h(t,"timeScale",this.timeScale);var l=h(t,"startFrame",0);l>s&&(l=0),this.randomFrame&&(l=r(0,s-1));var u=n.frames[l];0!==l||this.forward||(u=n.getLastFrame()),this.currentFrame=u}else console.warn("Missing animation: "+i);return this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){if(this.isPlaying){var i=this.nextAnim,n=this.nextAnimsQueue;i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e}else this.delayCounter=e,this.play(t,!0);return this.parent},playAfterRepeat:function(t,e){if(void 0===e&&(e=1),this.isPlaying){var i=this.nextAnim,n=this.nextAnimsQueue;i&&n.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e}else this.play(t);return this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent,r="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===r)return n;if(i&&this.isPlaying){var s=this.animationManager.getMix(i.key,t);if(s>0)return this.playAfterDelay(t,s)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){void 0===e&&(e=!1);var i="string"==typeof t?t:t.key;return e&&this.isPlaying&&this.currentAnim.key===i?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t))},startAnimation:function(t){this.load(t);var e=this.currentAnim,i=this.parent;return e?(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame),i):i},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(a.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(a.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(a.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(a.ANIMATION_COMPLETE,a.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim;if(i){var n=this.currentFrame,r=this.parent,s=n.textureFrame;r.emit(t,i,n,r,s),e&&r.emit(e+i.key,i,n,r,s)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;if(!t)return 0;var e=t.progress;return this.inReverse&&(e*=-1),e},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},setRepeat:function(t){return this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},globalRemove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent;return i?(e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),i.getFirstTick(this),this.emitEvents(a.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!t,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(i.frames[0]),this.parent):n},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(t)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)}return this.parent},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopAfterRepeat:function(t){return void 0===t&&(t=1),-1!==this.repeatCounter&&t>this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale*this.animationManager.globalTimeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var n=0;do{this.forward?i.nextFrame(this):i.previousFrame(this),n++}while(this.isPlaying&&this.accumulator>this.nextTick&&n<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(a.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))?console.warn("Animation key already exists: "+e):(i=new n(this,e,t),this.anims||(this.anims=new o),this.anims.set(e,i))),i},createFromAseprite:function(t,e){return this.animationManager.createFromAseprite(t,e,this.parent)},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(a.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=l},57090:t=>{t.exports="add"},25312:t=>{t.exports="animationcomplete"},89580:t=>{t.exports="animationcomplete-"},52860:t=>{t.exports="animationrepeat"},63850:t=>{t.exports="animationrestart"},99085:t=>{t.exports="animationstart"},28087:t=>{t.exports="animationstop"},1794:t=>{t.exports="animationupdate"},52562:t=>{t.exports="pauseall"},57953:t=>{t.exports="remove"},68339:t=>{t.exports="resumeall"},74943:(t,e,i)=>{t.exports={ADD_ANIMATION:i(57090),ANIMATION_COMPLETE:i(25312),ANIMATION_COMPLETE_KEY:i(89580),ANIMATION_REPEAT:i(52860),ANIMATION_RESTART:i(63850),ANIMATION_START:i(99085),ANIMATION_STOP:i(28087),ANIMATION_UPDATE:i(1794),PAUSE_ALL:i(52562),REMOVE_ANIMATION:i(57953),RESUME_ALL:i(68339)}},60421:(t,e,i)=>{t.exports={Animation:i(42099),AnimationFrame:i(41138),AnimationManager:i(60848),AnimationState:i(9674),Events:i(74943)}},2161:(t,e,i)=>{var n=i(83419),r=i(90330),s=i(50792),o=i(24736),a=new n({initialize:function(){this.entries=new r,this.events=new s},add:function(t,e){return this.entries.set(t,e),this.events.emit(o.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(o.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=a},24047:(t,e,i)=>{var n=i(2161),r=i(83419),s=i(8443),o=new r({initialize:function(t){this.game=t,this.binary=new n,this.bitmapFont=new n,this.json=new n,this.physics=new n,this.shader=new n,this.audio=new n,this.video=new n,this.text=new n,this.html=new n,this.obj=new n,this.tilemap=new n,this.xml=new n,this.custom={},this.game.events.once(s.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new n),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e<t.length;e++)this[t[e]].destroy(),this[t[e]]=null;for(var i in this.custom)this.custom[i].destroy();this.custom=null,this.game=null}});t.exports=o},51464:t=>{t.exports="add"},59261:t=>{t.exports="remove"},24736:(t,e,i)=>{t.exports={ADD:i(51464),REMOVE:i(59261)}},83388:(t,e,i)=>{t.exports={BaseCache:i(2161),CacheManager:i(24047),Events:i(24736)}},71911:(t,e,i)=>{var n=i(83419),r=i(31401),s=i(39506),o=i(50792),a=i(19715),h=i(87841),l=i(61340),u=i(80333),c=i(26099),d=new n({Extends:o,Mixins:[r.AlphaSingle,r.Visible],initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,r=.5*this.height;return i.x=t-n,i.y=e-r,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],r=e[2],s=e[3],o=i*s-n*r;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,p=this.y,f=p+d,m=this.x,g=m+c,v=this.culledObjects,y=t.length;o=1/o,v.length=0;for(var x=0;x<y;++x){var E=t[x];if(E.hasOwnProperty("width")&&!E.parentContainer){var T=E.width,_=E.height,w=E.x-l*E.scrollFactorX-T*E.originX,S=E.y-u*E.scrollFactorY-_*E.originY;(w+T)*i+(S+_)*r+a>m&&w*i+S*r+a<g&&(w+T)*n+(S+_)*s+h>p&&w*n+S*s+h<f&&v.push(E)}else v.push(E)}return v},getWorldPoint:function(t,e,i){void 0===i&&(i=new c);var n=this.matrix.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],l=n[5],u=r*a-s*o;if(!u)return i.x=t,i.y=e,i;var d=a*(u=1/u),p=-s*u,f=-o*u,m=r*u,g=(o*l-a*h)*u,v=(s*h-r*l)*u,y=Math.cos(this.rotation),x=Math.sin(this.rotation),E=this.zoomX,T=this.zoomY,_=this.scrollX,w=this.scrollY,S=t+(_*y-w*x)*E,b=e+(_*x+w*y)*T;return i.x=S*d+b*f+g,i.y=S*p+b*m+v,i},ignore:function(t){var e=this.id;Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];Array.isArray(n)?this.ignore(n):n.isParent?this.ignore(n.getChildren()):n.cameraFilter|=e}return this},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,n=.5*e,r=this.zoomX,s=this.zoomY,o=this.matrix,a=t*this.originX,h=e*this.originY,l=this.scrollX,u=this.scrollY;this.useBounds&&(l=this.clampX(l),u=this.clampY(u)),this.scrollX=l,this.scrollY=u;var c=l+i,d=u+n;this.midPoint.set(c,d);var p=t/r,f=e/s;this.worldView.setTo(c-p/2,d-f/2,p,f),o.applyITRS(this.x+a,this.y+h,this.rotation,r,s),o.translate(-a,-h)},clampX:function(t){var e=this._bounds,i=this.displayWidth,n=e.x+(i-this.width)/2,r=Math.max(n,n+e.width-i);return t<n?t=n:t>r&&(t=r),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,r=Math.max(n,n+e.height-i);return t<n?t=n:t>r&&(t=r),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=s(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,r){return void 0===r&&(r=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,r?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t,e){void 0===e&&(e=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t,this.isSceneCamera=e;var i=t.sys;return this.sceneManager=i.game.scene,this.scaleManager=i.scale,this.cameraManager=i.cameras,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),0===t&&(t=.001),0===e&&(e=.001),this.zoomX=t,this.zoomY=e,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},setIsSceneCamera:function(t){return this.isSceneCamera=t,this},updateSystem:function(){if(this.scaleManager&&this.isSceneCamera){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){t!==this._scrollX&&(this._scrollX=t,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(t){t!==this._scrollY&&(this._scrollY=t,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(t){this._zoomX=t,this._zoomY=t,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(t){this._zoomX=t,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(t){this._zoomY=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});t.exports=d},38058:(t,e,i)=>{var n=i(71911),r=i(67502),s=i(45319),o=i(83419),a=i(31401),h=i(20052),l=i(19715),u=i(28915),c=i(87841),d=i(26099),p=new o({Extends:n,Mixins:[a.PostPipeline],initialize:function(t,e,i,r){n.call(this,t,e,i,r),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new h.Fade(this),this.flashEffect=new h.Flash(this),this.shakeEffect=new h.Shake(this),this.panEffect=new h.Pan(this),this.rotateToEffect=new h.RotateTo(this),this.zoomEffect=new h.Zoom(this),this.lerp=new d(1,1),this.followOffset=new d,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new c(0,0,t,e),this._follow){var i=this.width/2,n=this.height/2,s=this._follow.x-this.followOffset.x,o=this._follow.y-this.followOffset.y;this.midPoint.set(s,o),this.scrollX=s-i,this.scrollY=o-n}r(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(t,e,i,n,r,s){return this.fadeEffect.start(!1,t,e,i,n,!0,r,s)},fadeOut:function(t,e,i,n,r,s){return this.fadeEffect.start(!0,t,e,i,n,!0,r,s)},fadeFrom:function(t,e,i,n,r,s,o){return this.fadeEffect.start(!1,t,e,i,n,r,s,o)},fade:function(t,e,i,n,r,s,o){return this.fadeEffect.start(!0,t,e,i,n,r,s,o)},flash:function(t,e,i,n,r,s,o){return this.flashEffect.start(t,e,i,n,r,s,o)},shake:function(t,e,i,n,r){return this.shakeEffect.start(t,e,i,n,r)},pan:function(t,e,i,n,r,s,o){return this.panEffect.start(t,e,i,n,r,s,o)},rotateTo:function(t,e,i,n,r,s,o){return this.rotateToEffect.start(t,e,i,n,r,s,o)},zoomTo:function(t,e,i,n,r,s){return this.zoomEffect.start(t,e,i,n,r,s)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,n=.5*e,s=this.zoom,o=this.matrix,a=t*this.originX,h=e*this.originY,c=this._follow,d=this.deadzone,p=this.scrollX,f=this.scrollY;d&&r(d,this.midPoint.x,this.midPoint.y);var m=!1;if(c&&!this.panEffect.isRunning){var g=this.lerp,v=c.x-this.followOffset.x,y=c.y-this.followOffset.y;d?(v<d.x?p=u(p,p-(d.x-v),g.x):v>d.right&&(p=u(p,p+(v-d.right),g.x)),y<d.y?f=u(f,f-(d.y-y),g.y):y>d.bottom&&(f=u(f,f+(y-d.bottom),g.y))):(p=u(p,v-a,g.x),f=u(f,y-h,g.y)),m=!0}this.useBounds&&(p=this.clampX(p),f=this.clampY(f)),this.scrollX=p,this.scrollY=f;var x=p+i,E=f+n;this.midPoint.set(x,E);var T=t/s,_=e/s,w=Math.floor(x-T/2),S=Math.floor(E-_/2);this.worldView.setTo(w,S,T,_),o.applyITRS(Math.floor(this.x+a),Math.floor(this.y+h),this.rotation,s,s),o.translate(-a,-h),this.shakeEffect.preRender(),m&&this.emit(l.FOLLOW_UPDATE,this,c)},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,r,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===r&&(r=0),void 0===o&&(o=r),this._follow=t,this.roundPixels=e,i=s(i,0,1),n=s(n,0,1),this.lerp.set(i,n),this.followOffset.set(r,o);var a=this.width/2,h=this.height/2,l=t.x-r,u=t.y-o;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=p},32743:(t,e,i)=>{var n=i(38058),r=i(83419),s=i(95540),o=i(37277),a=i(37303),h=i(97480),l=i(44594),u=new r({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,t.sys.events.once(l.BOOT,this.boot,this),t.sys.events.on(l.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new n(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(h.RESIZE,this.onResize,this),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on(l.UPDATE,this.update,this),e.once(l.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,r,s,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===r&&(r=this.scene.sys.scale.height),void 0===s&&(s=!1),void 0===o&&(o="");var a=new n(t,e,i,r);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),s&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var n=!1,r=0;r<t.length;r++){var s=t[r];s&&s.id===e&&(n=!0)}if(!n)return e;e<<=1}return 0},getTotal:function(t){void 0===t&&(t=!1);for(var e=0,i=this.cameras,n=0;n<i.length;n++){var r=i[n];(!t||t&&r.visible)&&e++}return e},fromJSON:function(t){Array.isArray(t)||(t=[t]);for(var e=this.scene.sys.scale.width,i=this.scene.sys.scale.height,n=0;n<t.length;n++){var r=t[n],o=s(r,"x",0),a=s(r,"y",0),h=s(r,"width",e),l=s(r,"height",i),u=this.add(o,a,h,l);u.name=s(r,"name",""),u.zoom=s(r,"zoom",1),u.rotation=s(r,"rotation",0),u.scrollX=s(r,"scrollX",0),u.scrollY=s(r,"scrollY",0),u.roundPixels=s(r,"roundPixels",!1),u.visible=s(r,"visible",!0);var c=s(r,"backgroundColor",!1);c&&u.setBackgroundColor(c);var d=s(r,"bounds",null);if(d){var p=s(d,"x",0),f=s(d,"y",0),m=s(d,"width",e),g=s(d,"height",i);u.setBounds(p,f,m,g)}}return this},getCamera:function(t){for(var e=this.cameras,i=0;i<e.length;i++)if(e[i].name===t)return e[i];return null},getCamerasBelowPointer:function(t){for(var e=this.cameras,i=t.x,n=t.y,r=[],s=0;s<e.length;s++){var o=e[s];o.visible&&o.inputEnabled&&a(o,i,n)&&r.unshift(o)}return r},remove:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0,n=this.cameras,r=0;r<t.length;r++){var s=n.indexOf(t[r]);-1!==s&&(e?n[s].destroy():n[s].renderList=[],n.splice(s,1),i++)}return!this.main&&n[0]&&(this.main=n[0]),i},render:function(t,e){for(var i=this.scene,n=this.cameras,r=0;r<n.length;r++){var s=n[r];if(s.visible&&s.alpha>0){s.preRender();var o=this.getVisibleChildren(e.getChildren(),s);t.render(i,o,s)}}},getVisibleChildren:function(t,e){return t.filter((function(t){return t.willRender(e)}))},resetAll:function(){for(var t=0;t<this.cameras.length;t++)this.cameras[t].destroy();return this.cameras=[],this.main=this.add(),this.main},update:function(t,e){for(var i=0;i<this.cameras.length;i++)this.cameras[i].update(t,e)},onResize:function(t,e,i,n,r){for(var s=0;s<this.cameras.length;s++){var o=this.cameras[s];0===o._x&&0===o._y&&o._width===n&&o._height===r&&o.setSize(e.width,e.height)}},resize:function(t,e){for(var i=0;i<this.cameras.length;i++)this.cameras[i].setSize(t,e)},shutdown:function(){this.main=void 0;for(var t=0;t<this.cameras.length;t++)this.cameras[t].destroy();this.cameras=[];var e=this.systems.events;e.off(l.UPDATE,this.update,this),e.off(l.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.default.destroy(),this.systems.events.off(l.START,this.start,this),this.systems.events.off(l.DESTROY,this.destroy,this),this.systems.game.scale.off(h.RESIZE,this.onResize,this),this.scene=null,this.systems=null}});o.register("CameraManager",u,"cameras"),t.exports=u},5020:(t,e,i)=>{var n=i(45319),r=i(83419),s=i(19715),o=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=r,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?s.FADE_OUT_START:s.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,n,r),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this.direction?this.progress:1-this.progress:(this.alpha=this.direction?1:0,this.effectComplete()))},postRenderCanvas:function(t){if(!this.isRunning&&!this.isComplete)return!1;var e=this.camera;return t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(t,e){if(!this.isRunning&&!this.isComplete)return!1;var i=this.camera,n=this.red/255,r=this.green/255,s=this.blue/255;return t.drawFillRect(i.x,i.y,i.width,i.height,e(s,r,n,1),this.alpha),!0},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.isComplete=!0;var t=this.direction?s.FADE_OUT_COMPLETE:s.FADE_IN_COMPLETE;this.camera.emit(t,this.camera,this)},reset:function(){this.isRunning=!1,this.isComplete=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=o},10662:(t,e,i)=>{var n=i(45319),r=i(83419),s=i(19715),o=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r,o,a){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===n&&(n=255),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=n,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,this.camera.emit(s.FLASH_START,this.camera,this,t,e,i,n)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration?this.alpha=this._alpha*(1-this.progress):this.effectComplete())},postRenderCanvas:function(t){if(!this.isRunning)return!1;var e=this.camera;return t.fillStyle="rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")",t.fillRect(e.x,e.y,e.width,e.height),!0},postRenderWebGL:function(t,e){if(!this.isRunning)return!1;var i=this.camera,n=this.red/255,r=this.green/255,s=this.blue/255;return t.drawFillRect(i.x,i.y,i.width,i.height,e(s,r,n,1),this.alpha),!0},effectComplete:function(){this.alpha=this._alpha,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(s.FLASH_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=o},20359:(t,e,i)=>{var n=i(45319),r=i(83419),s=i(62640),o=i(19715),a=i(26099),h=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new a,this.current=new a,this.destination=new a,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r,a,h){void 0===i&&(i=1e3),void 0===n&&(n=s.Linear),void 0===r&&(r=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene);var l=this.camera;return!r&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(l.scrollX,l.scrollY),this.destination.set(t,e),l.getScroll(t,e,this.current),"string"==typeof n&&s.hasOwnProperty(n)?this.ease=s[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.camera.emit(o.PAN_START,this.camera,this,i,t,e)),l},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var r=this.camera;if(this._elapsed<this.duration){var s=this.ease(i);r.getScroll(this.destination.x,this.destination.y,this.current);var o=this.source.x+(this.current.x-this.source.x)*s,a=this.source.y+(this.current.y-this.source.y)*s;r.setScroll(o,a),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,i,o,a)}else r.centerOn(this.destination.x,this.destination.y),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,i,r.scrollX,r.scrollY),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.PAN_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=h},34208:(t,e,i)=>{var n=i(45319),r=i(83419),s=i(19715),o=i(62640),a=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(t,e,i,n,r,a,h){void 0===i&&(i=1e3),void 0===n&&(n=o.Linear),void 0===r&&(r=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),void 0===e&&(e=!1),this.shortestPath=e;var l=t;t<0?(l=-1*t,this.clockwise=!1):this.clockwise=!0;var u=360*Math.PI/180;l-=Math.floor(l/u)*u;var c=this.camera;if(!r&&this.isRunning)return c;if(this.isRunning=!0,this.duration=i,this.progress=0,this.source=c.rotation,this.destination=l,"string"==typeof n&&o.hasOwnProperty(n)?this.ease=o[n]:"function"==typeof n&&(this.ease=n),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.shortestPath){var d=0,p=0;(d=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(p=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>p&&(this.clockwise=!1)}return this.camera.emit(s.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var r=this.camera;if(this._elapsed<this.duration){var s=this.ease(i);this.current=r.rotation;var o=0,a=360*Math.PI/180,h=this.destination,l=this.current;!1===this.clockwise&&(h=this.current,l=this.destination),o=h>=l?Math.abs(h-l):Math.abs(h+a)-l;var u=0;u=this.clockwise?r.rotation+o*s:r.rotation-o*s,r.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,i,u)}else r.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,r,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(s.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=a},30330:(t,e,i)=>{var n=i(45319),r=i(83419),s=i(19715),o=i(26099),a=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===r&&(r=this.camera.scene),!i&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=r,this.camera.emit(s.SHAKE_START,this.camera,this,t,e)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed<this.duration){var i=this.intensity,r=this.camera.width,s=this.camera.height,o=this.camera.zoom;this._offsetX=(Math.random()*i.x*r*2-i.x*r)*o,this._offsetY=(Math.random()*i.y*s*2-i.y*s)*o,this.camera.roundPixels&&(this._offsetX=Math.round(this._offsetX),this._offsetY=Math.round(this._offsetY))}else this.effectComplete()},effectComplete:function(){this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(s.SHAKE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._offsetX=0,this._offsetY=0,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.intensity=null}});t.exports=a},45641:(t,e,i)=>{var n=i(45319),r=i(83419),s=i(62640),o=i(19715),a=new r({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,r,a){void 0===e&&(e=1e3),void 0===i&&(i=s.Linear),void 0===n&&(n=!1),void 0===r&&(r=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&s.hasOwnProperty(i)?this.ease=s[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._elapsed<this.duration?(this.camera.zoom=this.source+(this.destination-this.source)*this.ease(this.progress),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.camera.zoom)):(this.camera.zoom=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress,this.destination),this.effectComplete()))},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.ZOOM_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null}});t.exports=a},20052:(t,e,i)=>{t.exports={Fade:i(5020),Flash:i(10662),Pan:i(20359),Shake:i(30330),RotateTo:i(34208),Zoom:i(45641)}},16438:t=>{t.exports="cameradestroy"},32726:t=>{t.exports="camerafadeincomplete"},87807:t=>{t.exports="camerafadeinstart"},45917:t=>{t.exports="camerafadeoutcomplete"},95666:t=>{t.exports="camerafadeoutstart"},47056:t=>{t.exports="cameraflashcomplete"},91261:t=>{t.exports="cameraflashstart"},45047:t=>{t.exports="followupdate"},81927:t=>{t.exports="camerapancomplete"},74264:t=>{t.exports="camerapanstart"},54419:t=>{t.exports="postrender"},79330:t=>{t.exports="prerender"},93183:t=>{t.exports="camerarotatecomplete"},80112:t=>{t.exports="camerarotatestart"},62252:t=>{t.exports="camerashakecomplete"},86017:t=>{t.exports="camerashakestart"},539:t=>{t.exports="camerazoomcomplete"},51892:t=>{t.exports="camerazoomstart"},19715:(t,e,i)=>{t.exports={DESTROY:i(16438),FADE_IN_COMPLETE:i(32726),FADE_IN_START:i(87807),FADE_OUT_COMPLETE:i(45917),FADE_OUT_START:i(95666),FLASH_COMPLETE:i(47056),FLASH_START:i(91261),FOLLOW_UPDATE:i(45047),PAN_COMPLETE:i(81927),PAN_START:i(74264),POST_RENDER:i(54419),PRE_RENDER:i(79330),ROTATE_COMPLETE:i(93183),ROTATE_START:i(80112),SHAKE_COMPLETE:i(62252),SHAKE_START:i(86017),ZOOM_COMPLETE:i(539),ZOOM_START:i(51892)}},87969:(t,e,i)=>{t.exports={Camera:i(38058),BaseCamera:i(71911),CameraManager:i(32743),Effects:i(20052),Events:i(19715)}},63091:(t,e,i)=>{var n=i(83419),r=i(35154),s=new n({initialize:function(t){this.camera=r(t,"camera",null),this.left=r(t,"left",null),this.right=r(t,"right",null),this.up=r(t,"up",null),this.down=r(t,"down",null),this.zoomIn=r(t,"zoomIn",null),this.zoomOut=r(t,"zoomOut",null),this.zoomSpeed=r(t,"zoomSpeed",.01),this.minZoom=r(t,"minZoom",.001),this.maxZoom=r(t,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=r(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=r(t,"speed.x",0),this.speedY=r(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoom<this.minZoom&&(e.zoom=this.minZoom)):this.zoomOut&&this.zoomOut.isDown&&(e.zoom+=this.zoomSpeed,e.zoom>this.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=s},58818:(t,e,i)=>{var n=i(83419),r=i(35154),s=new n({initialize:function(t){this.camera=r(t,"camera",null),this.left=r(t,"left",null),this.right=r(t,"right",null),this.up=r(t,"up",null),this.down=r(t,"down",null),this.zoomIn=r(t,"zoomIn",null),this.zoomOut=r(t,"zoomOut",null),this.zoomSpeed=r(t,"zoomSpeed",.01),this.minZoom=r(t,"minZoom",.001),this.maxZoom=r(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=r(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=r(t,"acceleration.x",0),this.accelY=r(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=r(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=r(t,"drag.x",0),this.dragY=r(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var n=r(t,"maxSpeed",null);"number"==typeof n?(this.maxSpeedX=n,this.maxSpeedY=n):(this.maxSpeedX=r(t,"maxSpeed.x",0),this.maxSpeedY=r(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<this.minZoom?e.zoom=this.minZoom:e.zoom>this.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=s},38865:(t,e,i)=>{t.exports={FixedKeyControl:i(63091),SmoothedKeyControl:i(58818)}},26638:(t,e,i)=>{t.exports={Controls:i(38865),Scene2D:i(87969)}},8054:(t,e,i)=>{var n={VERSION:"3.80.0",BlendModes:i(10312),ScaleModes:i(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=n},69547:(t,e,i)=>{var n=i(83419),r=i(8054),s=i(42363),o=i(82264),a=i(95540),h=i(35154),l=i(41212),u=i(29747),c=i(75508),d=i(36060),p=i(80333),f=new n({initialize:function(t){void 0===t&&(t={});var e=h(t,"scale",null);this.width=h(e,"width",1024,t),this.height=h(e,"height",768,t),this.zoom=h(e,"zoom",1,t),this.parent=h(e,"parent",void 0,t),this.scaleMode=h(e,e?"mode":"scaleMode",0,t),this.expandParent=h(e,"expandParent",!0,t),this.autoRound=h(e,"autoRound",!1,t),this.autoCenter=h(e,"autoCenter",0,t),this.resizeInterval=h(e,"resizeInterval",500,t),this.fullscreenTarget=h(e,"fullscreenTarget",null,t),this.minWidth=h(e,"min.width",0,t),this.maxWidth=h(e,"max.width",0,t),this.minHeight=h(e,"min.height",0,t),this.maxHeight=h(e,"max.height",0,t),this.snapWidth=h(e,"snap.width",0,t),this.snapHeight=h(e,"snap.height",0,t),this.renderType=h(t,"type",r.AUTO),this.canvas=h(t,"canvas",null),this.context=h(t,"context",null),this.canvasStyle=h(t,"canvasStyle",null),this.customEnvironment=h(t,"customEnvironment",!1),this.sceneConfig=h(t,"scene",null),this.seed=h(t,"seed",[(Date.now()*Math.random()).toString()]),c.RND=new c.RandomDataGenerator(this.seed),this.gameTitle=h(t,"title",""),this.gameURL=h(t,"url","https://phaser.io"),this.gameVersion=h(t,"version",""),this.autoFocus=h(t,"autoFocus",!0),this.stableSort=h(t,"stableSort",-1),-1===this.stableSort&&(this.stableSort=o.browser.es2019?1:0),o.features.stableSort=this.stableSort,this.domCreateContainer=h(t,"dom.createContainer",!1),this.domPointerEvents=h(t,"dom.pointerEvents","none"),this.inputKeyboard=h(t,"input.keyboard",!0),this.inputKeyboardEventTarget=h(t,"input.keyboard.target",window),this.inputKeyboardCapture=h(t,"input.keyboard.capture",[]),this.inputMouse=h(t,"input.mouse",!0),this.inputMouseEventTarget=h(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=h(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=h(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=h(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=h(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=h(t,"input.touch",o.input.touch),this.inputTouchEventTarget=h(t,"input.touch.target",null),this.inputTouchCapture=h(t,"input.touch.capture",!0),this.inputActivePointers=h(t,"input.activePointers",1),this.inputSmoothFactor=h(t,"input.smoothFactor",0),this.inputWindowEvents=h(t,"input.windowEvents",!0),this.inputGamepad=h(t,"input.gamepad",!1),this.inputGamepadEventTarget=h(t,"input.gamepad.target",window),this.disableContextMenu=h(t,"disableContextMenu",!1),this.audio=h(t,"audio",{}),this.hideBanner=!1===h(t,"banner",null),this.hidePhaser=h(t,"banner.hidePhaser",!1),this.bannerTextColor=h(t,"banner.text","#ffffff"),this.bannerBackgroundColor=h(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=h(t,"fps",null),this.disablePreFX=h(t,"disablePreFX",!1),this.disablePostFX=h(t,"disablePostFX",!1);var i=h(t,"render",null);this.pipeline=h(i,"pipeline",null,t),this.autoMobilePipeline=h(i,"autoMobilePipeline",!0,t),this.defaultPipeline=h(i,"defaultPipeline",d.MULTI_PIPELINE,t),this.antialias=h(i,"antialias",!0,t),this.antialiasGL=h(i,"antialiasGL",!0,t),this.mipmapFilter=h(i,"mipmapFilter","",t),this.desynchronized=h(i,"desynchronized",!1,t),this.roundPixels=h(i,"roundPixels",!0,t),this.pixelArt=h(i,"pixelArt",1!==this.zoom,t),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=h(i,"transparent",!1,t),this.clearBeforeRender=h(i,"clearBeforeRender",!0,t),this.preserveDrawingBuffer=h(i,"preserveDrawingBuffer",!1,t),this.premultipliedAlpha=h(i,"premultipliedAlpha",!0,t),this.failIfMajorPerformanceCaveat=h(i,"failIfMajorPerformanceCaveat",!1,t),this.powerPreference=h(i,"powerPreference","default",t),this.batchSize=h(i,"batchSize",4096,t),this.maxTextures=h(i,"maxTextures",-1,t),this.maxLights=h(i,"maxLights",10,t);var n=h(t,"backgroundColor",0);this.backgroundColor=p(n),this.transparent&&(this.backgroundColor=p(0),this.backgroundColor.alpha=0),this.preBoot=h(t,"callbacks.preBoot",u),this.postBoot=h(t,"callbacks.postBoot",u),this.physics=h(t,"physics",{}),this.defaultPhysicsSystem=h(this.physics,"default",!1),this.loaderBaseURL=h(t,"loader.baseURL",""),this.loaderPath=h(t,"loader.path",""),this.loaderMaxParallelDownloads=h(t,"loader.maxParallelDownloads",o.os.android?6:32),this.loaderCrossOrigin=h(t,"loader.crossOrigin",void 0),this.loaderResponseType=h(t,"loader.responseType",""),this.loaderAsync=h(t,"loader.async",!0),this.loaderUser=h(t,"loader.user",""),this.loaderPassword=h(t,"loader.password",""),this.loaderTimeout=h(t,"loader.timeout",0),this.loaderWithCredentials=h(t,"loader.withCredentials",!1),this.loaderImageLoadType=h(t,"loader.imageLoadType","XHR"),this.loaderLocalScheme=h(t,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=h(t,"fx.glow.quality",.1),this.glowFXDistance=h(t,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=h(t,"plugins",null),m=s.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:l(f)&&(this.installGlobalPlugins=a(f,"global",[]),this.installScenePlugins=a(f,"scene",[]),Array.isArray(f.default)?m=f.default:Array.isArray(f.defaultMerge)&&(m=m.concat(f.defaultMerge)))),this.defaultPlugins=m;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=h(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=h(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=h(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=r.WEBGL:window.FORCE_CANVAS&&(this.renderType=r.CANVAS))}});t.exports=f},86054:(t,e,i)=>{var n=i(20623),r=i(27919),s=i(8054),o=i(89357);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===s.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==s.HEADLESS)if(e.renderType===s.AUTO&&(e.renderType=o.webGL?s.WEBGL:s.CANVAS),e.renderType===s.WEBGL){if(!o.webGL)throw new Error("Cannot create WebGL context, aborting.")}else{if(e.renderType!==s.CANVAS)throw new Error("Unknown value for renderer type: "+e.renderType);if(!o.canvas)throw new Error("Cannot create Canvas context, aborting.")}e.antialias||r.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;(e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=r.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==s.HEADLESS)&&(a=i(68627),h=i(74797),e.renderType===s.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},96391:(t,e,i)=>{var n=i(8054);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var r,s=e.audio,o=t.device.audio;if(r=o.webAudio&&!s.disableWebAudio?"Web Audio":s.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a,h="",l=[h];if(Array.isArray(e.bannerBackgroundColor))e.bannerBackgroundColor.forEach((function(t){h=h.concat("%c "),l.push("background: "+t),a=t})),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a;else h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor);l.push("background: transparent"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / ")));e.hidePhaser||(h=h.concat("Phaser v"+n.VERSION+"-FB ("+i+" | "+r+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},50127:(t,e,i)=>{var n=i(40366),r=i(60848),s=i(24047),o=i(27919),a=i(83419),h=i(69547),l=i(83719),u=i(86054),c=i(45893),d=i(96391),p=i(82264),f=i(57264),m=i(50792),g=i(8443),v=i(7003),y=i(37277),x=i(77332),E=i(76531),T=i(60903),_=i(69442),w=i(17130),S=i(65898),b=i(51085),C=i(14747),A=i(25366),R=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new m,this.anims=new r(this),this.textures=new w(this),this.cache=new s(this),this.registry=new c(this,new m),this.input=new v(this,this.config),this.scene=new T(this,this.config.sceneConfig),this.device=p,this.scale=new E(this,this.config),this.sound=null,this.sound=C.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.facebook=new A(this),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,f(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(_.READY,this.texturesReady,this),this.events.emit(g.BOOT),window&&(window.PHASER_GAME=this)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(g.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)),b(this);var t=this.events;t.on(g.HIDDEN,this.onHidden,this),t.on(g.VISIBLE,this.onVisible,this),t.on(g.BLUR,this.onBlur,this),t.on(g.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(g.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(g.POST_RENDER,n,t,e)}},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e),this.scene.isProcessing=!1,i.emit(g.PRE_RENDER,null,t,e),i.emit(g.POST_RENDER,null,t,e)}},onHidden:function(){this.loop.pause(),this.events.emit(g.PAUSE)},pause:function(){var t=this.isPaused;this.isPaused=!0,t||this.events.emit(g.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(g.RESUME)},resume:function(){var t=this.isPaused;this.isPaused=!1,t&&this.events.emit(g.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(g.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=R},65898:(t,e,i)=>{var n=i(83419),r=i(35154),s=i(29747),o=i(43092),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=r(e,"min",5),this.targetFps=r(e,"target",60),this.fpsLimit=r(e,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=s,this.forceSetTimeOut=r(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=r(e,"deltaHistory",10),this.panicMax=r(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=r(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=Math.min(this._target,this.deltaHistory[e]);this.delta=0,this.deltaIndex=0,this._coolDown=this.panicMax},start:function(t){if(this.started)return this;this.started=!0,this.running=!0;for(var e=0;e<this.deltaSmoothingMax;e++)this.deltaHistory[e]=this._target;this.resetDelta(),this.startTime=window.performance.now(),this.callback=t;var i=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(i,this.forceSetTimeOut,this._target)},smoothDelta:function(t){var e=this.deltaIndex,i=this.deltaHistory,n=this.deltaSmoothingMax;(this._coolDown>0||!this.inFocus)&&(this._coolDown--,t=Math.min(t,this._target)),t>this._min&&(t=i[e],t=Math.min(t,this._min)),i[e]=t,this.deltaIndex++,this.deltaIndex>=n&&(this.deltaIndex=0);for(var r=0,s=0;s<n;s++)r+=i[s];return r/=n},updateFPS:function(t){this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0},stepLimitFPS:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta+=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(t,this.delta),this.delta=0),this.lastTime=t,this.frame++},step:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.callback(t,e),this.lastTime=t,this.frame++},tick:function(){var t=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(t):this.step(t)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){void 0===t&&(t=!1);var e=window.performance.now();if(!this.running){t&&(this.startTime+=-this.lastTime+(this.lastTime+e));var i=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(i,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});t.exports=a},51085:(t,e,i)=>{var n=i(8443);t.exports=function(t){var e,i=t.events;if(void 0!==document.hidden)e="visibilitychange";else{["webkit","moz","ms"].forEach((function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")}))}e&&document.addEventListener(e,(function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)}),!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},97217:t=>{t.exports="blur"},47548:t=>{t.exports="boot"},19814:t=>{t.exports="contextlost"},68446:t=>{t.exports="destroy"},41700:t=>{t.exports="focus"},25432:t=>{t.exports="hidden"},65942:t=>{t.exports="pause"},59211:t=>{t.exports="postrender"},47789:t=>{t.exports="poststep"},39066:t=>{t.exports="prerender"},460:t=>{t.exports="prestep"},16175:t=>{t.exports="ready"},42331:t=>{t.exports="resume"},11966:t=>{t.exports="step"},32969:t=>{t.exports="systemready"},94830:t=>{t.exports="visible"},8443:(t,e,i)=>{t.exports={BLUR:i(97217),BOOT:i(47548),CONTEXT_LOST:i(19814),DESTROY:i(68446),FOCUS:i(41700),HIDDEN:i(25432),PAUSE:i(65942),POST_RENDER:i(59211),POST_STEP:i(47789),PRE_RENDER:i(39066),PRE_STEP:i(460),READY:i(16175),RESUME:i(42331),STEP:i(11966),SYSTEM_READY:i(32969),VISIBLE:i(94830)}},42857:(t,e,i)=>{t.exports={Config:i(69547),CreateRenderer:i(86054),DebugHeader:i(96391),Events:i(8443),TimeStep:i(65898),VisibilityHandler:i(51085)}},99584:(t,e,i)=>{var n=i(5290),r=i(27919),s=i(35154);t.exports=function(t){var e=s(t,"data",[]),i=s(t,"canvas",null),o=s(t,"palette",n),a=s(t,"pixelWidth",1),h=s(t,"pixelHeight",a),l=s(t,"resizeCanvas",!0),u=s(t,"clearCanvas",!0),c=s(t,"preRender",null),d=s(t,"postRender",null),p=Math.floor(Math.abs(e[0].length*a)),f=Math.floor(Math.abs(e.length*h));i||(i=r.create2D(this,p,f),l=!1,u=!1),l&&(i.width=p,i.height=f);var m=i.getContext("2d",{willReadFrequently:!0});u&&m.clearRect(0,0,p,f),c&&c(i,m);for(var g=0;g<e.length;g++)for(var v=e[g],y=0;y<v.length;y++){var x=v[y];"."!==x&&" "!==x&&(m.fillStyle=o[x],m.fillRect(y*a,g*h,a,h))}return d&&d(i,m),i}},15822:(t,e,i)=>{t.exports={GenerateTexture:i(99584),Palettes:i(57763)}},5290:t=>{t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},23816:t=>{t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},9866:t=>{t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},77552:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},92259:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},57763:(t,e,i)=>{t.exports={ARNE16:i(5290),C64:i(23816),CGA:i(9866),JMP:i(77552),MSX:i(92259)}},46728:(t,e,i)=>{var n=i(83419),r=i(36316),s=i(80021),o=i(26099),a=new n({Extends:s,initialize:function(t,e,i,n){s.call(this,"CubicBezierCurve"),Array.isArray(t)&&(n=new o(t[6],t[7]),i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=n},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,n=this.p1,s=this.p2,a=this.p3;return e.set(r(t,i.x,n.x,s.x,a.x),r(t,i.y,n.y,s.y,a.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var n=1;n<i.length;n++)t.lineTo(i[n].x,i[n].y);return t.strokePath(),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y,this.p3.x,this.p3.y]}}});a.fromJSON=function(t){var e=t.points,i=new o(e[0],e[1]),n=new o(e[2],e[3]),r=new o(e[4],e[5]),s=new o(e[6],e[7]);return new a(i,n,r,s)},t.exports=a},80021:(t,e,i)=>{var n=i(83419),r=i(19217),s=i(87841),o=i(26099),a=new n({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new s),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var n=Math.max(1,Math.round(i/e));return r(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),r=0;i.push(0);for(var s=1;s<=t;s++)r+=(e=this.getPoint(s/t,this._tmpVec2B)).distance(n),i.push(r),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++){var r=this.getUtoTmapping(n/t,null,t);i.push(this.getPoint(r))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=1e-4,n=t-i,r=t+i;return n<0&&(n=0),r>1&&(r=1),this.getPoint(n,this._tmpVec2A),this.getPoint(r,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,r=this.getLengths(i),s=0,o=r.length;n=e?Math.min(e,r[o-1]):t*r[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=r[s=Math.floor(h+(l-h)/2)]-n)<0)h=s+1;else{if(!(a>0)){l=s;break}l=s-1}if(r[s=l]===n)return s/(o-1);var u=r[s];return(s+(n-u)/(r[s+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},73825:(t,e,i)=>{var n=i(83419),r=i(80021),s=i(39506),o=i(35154),a=i(43396),h=i(26099),l=new n({Extends:r,initialize:function(t,e,i,n,a,l,u,c){if("object"==typeof t){var d=t;t=o(d,"x",0),e=o(d,"y",0),i=o(d,"xRadius",0),n=o(d,"yRadius",i),a=o(d,"startAngle",0),l=o(d,"endAngle",360),u=o(d,"clockwise",!1),c=o(d,"rotation",0)}else void 0===n&&(n=i),void 0===a&&(a=0),void 0===l&&(l=360),void 0===u&&(u=!1),void 0===c&&(c=0);r.call(this,"EllipseCurve"),this.p0=new h(t,e),this._xRadius=i,this._yRadius=n,this._startAngle=s(a),this._endAngle=s(l),this._clockwise=u,this._rotation=s(c)},getStartPoint:function(t){return void 0===t&&(t=new h),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new h);for(var i=2*Math.PI,n=this._endAngle-this._startAngle,r=Math.abs(n)<Number.EPSILON;n<0;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=r?0:i),this._clockwise&&!r&&(n===i?n=-i:n-=i);var s=this._startAngle+t*n,o=this.p0.x+this._xRadius*Math.cos(s),a=this.p0.y+this._yRadius*Math.sin(s);if(0!==this._rotation){var l=Math.cos(this._rotation),u=Math.sin(this._rotation),c=o-this.p0.x,d=a-this.p0.y;o=c*l-d*u+this.p0.x,a=c*u+d*l+this.p0.y}return e.set(o,a)},setXRadius:function(t){return this.xRadius=t,this},setYRadius:function(t){return this.yRadius=t,this},setWidth:function(t){return this.xRadius=t/2,this},setHeight:function(t){return this.yRadius=t/2,this},setStartAngle:function(t){return this.startAngle=t,this},setEndAngle:function(t){return this.endAngle=t,this},setClockwise:function(t){return this.clockwise=t,this},setRotation:function(t){return this.rotation=t,this},x:{get:function(){return this.p0.x},set:function(t){this.p0.x=t}},y:{get:function(){return this.p0.y},set:function(t){this.p0.y=t}},xRadius:{get:function(){return this._xRadius},set:function(t){this._xRadius=t}},yRadius:{get:function(){return this._yRadius},set:function(t){this._yRadius=t}},startAngle:{get:function(){return a(this._startAngle)},set:function(t){this._startAngle=s(t)}},endAngle:{get:function(){return a(this._endAngle)},set:function(t){this._endAngle=s(t)}},clockwise:{get:function(){return this._clockwise},set:function(t){this._clockwise=t}},angle:{get:function(){return a(this._rotation)},set:function(t){this._rotation=s(t)}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t}},toJSON:function(){return{type:this.type,x:this.p0.x,y:this.p0.y,xRadius:this._xRadius,yRadius:this._yRadius,startAngle:a(this._startAngle),endAngle:a(this._endAngle),clockwise:this._clockwise,rotation:a(this._rotation)}}});l.fromJSON=function(t){return new l(t)},t.exports=l},33951:(t,e,i)=>{var n=i(83419),r=i(80021),s=i(19217),o=i(87841),a=i(26099),h=new n({Extends:r,initialize:function(t,e){r.call(this,"LineCurve"),Array.isArray(t)&&(e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.arcLengthDivisions=1},getBounds:function(t){return void 0===t&&(t=new o),s([this.p0,this.p1],t)},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return void 0===t&&(t=1),t},getPoint:function(t,e){return void 0===e&&(e=new a),1===t?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(t,e){return void 0===e&&(e=new a),e.copy(this.p1).subtract(this.p0).normalize(),e},getUtoTmapping:function(t,e,i){var n;if(e){var r=this.getLengths(i),s=r[r.length-1];n=Math.min(e,s)/s}else n=t;return n},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});h.fromJSON=function(t){var e=t.points,i=new a(e[0],e[1]),n=new a(e[2],e[3]);return new h(i,n)},t.exports=h},14744:(t,e,i)=>{var n=i(83419),r=i(80021),s=i(32112),o=i(26099),a=new n({Extends:r,initialize:function(t,e,i){r.call(this,"QuadraticBezierCurve"),Array.isArray(t)&&(i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,n=this.p1,r=this.p2;return e.set(s(t,i.x,n.x,r.x),s(t,i.y,n.y,r.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var n=1;n<i.length;n++)t.lineTo(i[n].x,i[n].y);return t.strokePath(),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y,this.p2.x,this.p2.y]}}});a.fromJSON=function(t){var e=t.points,i=new o(e[0],e[1]),n=new o(e[2],e[3]),r=new o(e[4],e[5]);return new a(i,n,r)},t.exports=a},42534:(t,e,i)=>{var n=i(87842),r=i(83419),s=i(80021),o=i(26099),a=new r({Extends:s,initialize:function(t){void 0===t&&(t=[]),s.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;e<t.length;e++){var i=new o;"number"==typeof t[e]?(i.x=t[e],i.y=t[e+1],e++):Array.isArray(t[e])?(i.x=t[e][0],i.y=t[e][1]):(i.x=t[e].x,i.y=t[e].y),this.points.push(i)}return this},addPoint:function(t,e){var i=new o(t,e);return this.points.push(i),i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.points[0])},getResolution:function(t){return t*this.points.length},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.points,r=(i.length-1)*t,s=Math.floor(r),a=r-s,h=i[0===s?s:s-1],l=i[s],u=i[s>i.length-2?i.length-1:s+1],c=i[s>i.length-3?i.length-1:s+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e<this.points.length;e++)t.push(this.points[e].x),t.push(this.points[e].y);return{type:this.type,points:t}}});a.fromJSON=function(t){return new a(t.points)},t.exports=a},25410:(t,e,i)=>{t.exports={Path:i(46669),MoveTo:i(68618),CubicBezier:i(46728),Curve:i(80021),Ellipse:i(73825),Line:i(33951),QuadraticBezier:i(14744),Spline:i(42534)}},68618:(t,e,i)=>{var n=i(83419),r=i(26099),s=new n({initialize:function(t,e){this.active=!1,this.p0=new r(t,e)},getPoint:function(t,e){return void 0===e&&(e=new r),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=s},46669:(t,e,i)=>{var n=i(83419),r=i(46728),s=i(73825),o=i(39429),a=i(33951),h=i(68618),l=i(14744),u=i(87841),c=i(42534),d=i(26099),p=i(36383),f=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,s,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,n),h=new d(s,o),l=new d(t,e)),this.add(new r(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var r,s,o=this.getEndPoint();return t instanceof d?(r=t,s=e):(r=new d(i,n),s=new d(t,e)),this.add(new l(o,r,s))},draw:function(t,e){for(var i=0;i<this.curves.length;i++){var n=this.curves[i];n.active&&n.draw(t,e)}return t},ellipseTo:function(t,e,i,n,r,o){var a=new s(0,0,t,e,i,n,r,o),h=this.getEndPoint(this._tmpVec2A),l=a.getStartPoint(this._tmpVec2B);return h.subtract(l),a.x=h.x,a.y=h.y,this.add(a)},fromJSON:function(t){this.curves=[],this.cacheLengths=[],this.startPoint.set(t.x,t.y),this.autoClose=t.autoClose;for(var e=0;e<t.curves.length;e++){var i=t.curves[e];switch(i.type){case"LineCurve":this.add(a.fromJSON(i));break;case"EllipseCurve":this.add(s.fromJSON(i));break;case"SplineCurve":this.add(c.fromJSON(i));break;case"CubicBezierCurve":this.add(r.fromJSON(i));break;case"QuadraticBezierCurve":this.add(l.fromJSON(i))}}return this},getBounds:function(t,e){void 0===t&&(t=new u),void 0===e&&(e=16),t.x=Number.MAX_VALUE,t.y=Number.MAX_VALUE;for(var i=new u,n=p.MIN_SAFE_INTEGER,r=p.MIN_SAFE_INTEGER,s=0;s<this.curves.length;s++){var o=this.curves[s];o.active&&(o.getBounds(i,e),t.x=Math.min(t.x,i.x),t.y=Math.min(t.y,i.y),n=Math.max(n,i.right),r=Math.max(r,i.bottom))}return t.right=n,t.bottom=r,t},getCurveLengths:function(){if(this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0;i<this.curves.length;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t,t},getCurveAt:function(t){for(var e=t*this.getLength(),i=this.getCurveLengths(),n=0;n<i.length;){if(i[n]>=e)return this.curves[n];n++}return null},getEndPoint:function(t){return void 0===t&&(t=new d),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=i){var s=n[r]-i,o=this.curves[r],a=o.getLength(),h=0===a?0:1-s/a;return o.getPointAt(h,e)}r++}return null},getPoints:function(t,e){t||e||(t=this.defaultDivisions);for(var i,n=[],r=0;r<this.curves.length;r++){var s=this.curves[r];if(s.active)for(var o=s.getResolution(t),a=s.getPoints(o,e),h=0;h<a.length;h++){var l=a[h];i&&i.equals(l)||(n.push(l),i=l)}}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),r=0;r<n.length;){if(n[r]>=i){var s=n[r]-i,o=this.curves[r],a=o.getLength(),h=0===a?0:1-s/a;return o.getTangentAt(h,e)}r++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):"object"==typeof t?this._tmpVec2B.setFromObject(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e<this.curves.length;e++)t.push(this.curves[e].toJSON());return{type:"Path",x:this.startPoint.x,y:this.startPoint.y,autoClose:this.autoClose,curves:t}},updateArcLengths:function(){this.cacheLengths=[],this.getCurveLengths()},destroy:function(){this.curves.length=0,this.cacheLengths.length=0,this.startPoint=void 0}});o.register("path",(function(t,e){return new f(t,e)})),t.exports=f},45893:(t,e,i)=>{var n=i(83419),r=i(24882),s=new n({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n<t.length;n++)i.push(e[t[n]]);return i}return e[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if("string"==typeof t)return this.setValue(t,e);for(var i in t)this.setValue(i,t[i]);return this},inc:function(t,e){if(this._frozen)return this;void 0===e&&(e=1);var i=this.get(t);return void 0===i&&(i=0),this.set(t,i+e),this},toggle:function(t){return this._frozen||this.set(t,!this.get(t)),this},setValue:function(t,e){if(this._frozen)return this;if(this.has(t))this.values[t]=e;else{var i=this,n=this.list,s=this.events,o=this.parent;Object.defineProperty(this.values,t,{enumerable:!0,configurable:!0,get:function(){return n[t]},set:function(e){if(!i._frozen){var a=n[t];n[t]=e,s.emit(r.CHANGE_DATA,o,t,e,a),s.emit(r.CHANGE_DATA_KEY+t,o,e,a)}}}),n[t]=e,s.emit(r.SET_DATA,o,t,e)}return this},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var r in this.list)i[1]=r,i[2]=this.list[r],t.apply(e,i);return this},merge:function(t,e){for(var i in void 0===e&&(e=!0),t)t.hasOwnProperty(i)&&(e||!e&&!this.has(i))&&this.setValue(i,t[i]);return this},remove:function(t){if(this._frozen)return this;if(!Array.isArray(t))return this.removeValue(t);for(var e=0;e<t.length;e++)this.removeValue(t[e]);return this},removeValue:function(t){if(this.has(t)){var e=this.list[t];delete this.list[t],delete this.values[t],this.events.emit(r.REMOVE_DATA,this.parent,t,e)}return this},pop:function(t){var e=void 0;return!this._frozen&&this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(r.REMOVE_DATA,this.parent,t,e)),e},has:function(t){return this.list.hasOwnProperty(t)},setFreeze:function(t){return this._frozen=t,this},reset:function(){for(var t in this.list)delete this.list[t],delete this.values[t];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(r.CHANGE_DATA),this.events.off(r.SET_DATA),this.events.off(r.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t=0;for(var e in this.list)void 0!==this.list[e]&&t++;return t}}});t.exports=s},63646:(t,e,i)=>{var n=i(83419),r=i(45893),s=i(37277),o=i(44594),a=new n({Extends:r,initialize:function(t){r.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){r.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});s.register("DataManagerPlugin",a,"data"),t.exports=a},10700:t=>{t.exports="changedata"},93608:t=>{t.exports="changedata-"},60883:t=>{t.exports="destroy"},69780:t=>{t.exports="removedata"},22166:t=>{t.exports="setdata"},24882:(t,e,i)=>{t.exports={CHANGE_DATA:i(10700),CHANGE_DATA_KEY:i(93608),DESTROY:i(60883),REMOVE_DATA:i(69780),SET_DATA:i(22166)}},44965:(t,e,i)=>{t.exports={DataManager:i(45893),DataManagerPlugin:i(63646),Events:i(24882)}},7098:(t,e,i)=>{var n=i(84148),r={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return r;r.audioData=!!window.Audio,r.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var n=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(n||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(n)};if(r.ogg=i('ogg; codecs="vorbis"'),r.opus=i('ogg; codecs="opus"',"opus"),r.mp3=i("mpeg"),r.wav=i("wav"),r.m4a=i("x-m4a"),r.aac=i("aac"),r.flac=i("flac","x-flac"),r.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(n.edge)r.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var s=parseInt(RegExp.$1,10),o=parseInt(RegExp.$2,10);(10===s&&o>=11||s>10)&&(r.dolby=!0)}}}catch(t){}return r}()},84148:(t,e,i)=>{var n,r=i(25892),s={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(n=navigator.userAgent,/Edg\/\d+/.test(n)?(s.edge=!0,s.es2019=!0):/OPR/.test(n)?(s.opera=!0,s.es2019=!0):/Chrome\/(\d+)/.test(n)&&!r.windowsPhone?(s.chrome=!0,s.chromeVersion=parseInt(RegExp.$1,10),s.es2019=s.chromeVersion>69):/Firefox\D+(\d+)/.test(n)?(s.firefox=!0,s.firefoxVersion=parseInt(RegExp.$1,10),s.es2019=s.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(n)&&r.iOS?(s.mobileSafari=!0,s.es2019=!0):/MSIE (\d+\.\d+);/.test(n)?(s.ie=!0,s.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(n)&&!r.windowsPhone?(s.safari=!0,s.safariVersion=parseInt(RegExp.$1,10),s.es2019=s.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(s.ie=!0,s.trident=!0,s.tridentVersion=parseInt(RegExp.$1,10),s.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(s.silk=!0),s)},89289:(t,e,i)=>{var n,r,s,o=i(27919),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(s=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(s,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+r},s.src=n+"AP804Oa6"+r,!1),a.supportInverseAlpha=function(){var t=o.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),n=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return o.remove(this),n}()),a)},89357:(t,e,i)=>{var n=i(25892),r=i(84148),s=i(27919),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return o;o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=s.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=s.create2D(this),n=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return a=n.data instanceof Uint8ClampedArray,s.remove(t),s.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(o.getUserMedia=!1),!n.iOS&&(r.ie||r.firefox||r.chrome)&&(o.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},91639:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",n="FullScreen",r=["request"+i,"request"+n,"webkitRequest"+i,"webkitRequest"+n,"msRequest"+i,"msRequest"+n,"mozRequest"+n,"mozRequest"+i];for(t=0;t<r.length;t++)if(document.documentElement[r[t]]){e.available=!0,e.request=r[t];break}var s=["cancel"+n,"exit"+i,"webkitCancel"+n,"webkitExit"+i,"msCancel"+n,"msExit"+i,"mozCancel"+n,"mozExit"+i];if(e.available)for(t=0;t<s.length;t++)if(document[s[t]]){e.cancel=s[t];break}return window.Element&&Element.ALLOW_KEYBOARD_INPUT&&!/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)&&(e.keyboard=!0),Object.defineProperty(e,"active",{get:function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}}),e}()},31784:(t,e,i)=>{var n=i(84148),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},25892:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},43267:(t,e,i)=>{var n=i(95540),r={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};t.exports=function(){if("function"==typeof importScripts)return r;var t=document.createElement("video"),e=!!t.canPlayType,i=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(i,"")&&(r.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(i,"")&&(r.h264=!0,r.mp4=!0),t.canPlayType("video/x-m4v").replace(i,"")&&(r.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(i,"")&&(r.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(i,"")&&(r.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(i,"")&&(r.hls=!0))}catch(t){}return t.parentNode&&t.parentNode.removeChild(t),r.getVideoURL=function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i,s=n(t[e],"url",t[e]);if(0===s.indexOf("blob:"))return{url:s,type:""};if(i=0===s.indexOf("data:")?s.split(",")[0].match(/\/(.*?);/):s.match(/\.([a-zA-Z0-9]+)($|\?)/),i=n(t[e],"type",i?i[1]:"").toLowerCase(),r[i])return{url:s,type:i}}return null},r}()},82264:(t,e,i)=>{t.exports={os:i(25892),browser:i(84148),features:i(89357),input:i(31784),audio:i(7098),video:i(43267),fullscreen:i(91639),canvasFeatures:i(89289)}},89422:(t,e,i)=>{var n=i(83419),r=new Float32Array(20),s=new n({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(t){return this._matrix.set(t),this._dirty=!0,this},reset:function(){var t=this._matrix;return t.fill(0),t[0]=1,t[6]=1,t[12]=1,t[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var t=this._data;return this._dirty&&(t.set(this._matrix),t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._dirty=!1),t},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,n=-.5*(i-1);return this.multiply([i,n,n,0,0,n,i,n,0,0,n,n,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),n=Math.sin(t),r=.213,s=.715,o=.072;return this.multiply([r+.787*i+n*-r,s+i*-s+n*-s,o+i*-o+.928*n,0,0,r+i*-r+.143*n,s+i*(1-s)+.14*n,o+i*-o+-.283*n,0,0,r+i*-r+-.787*n,s+i*-s+n*s,o+.928*i+n*o,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply(s.BLACK_WHITE,t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,n=-.5*(i-1);return this.multiply([i,0,0,0,n,0,i,0,0,n,0,0,i,0,n,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply(s.NEGATIVE,t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply(s.DESATURATE_LUMINANCE,t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply(s.SEPIA,t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply(s.LSD,t)},brown:function(t){return void 0===t&&(t=!1),this.multiply(s.BROWN,t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply(s.VINTAGE,t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply(s.KODACHROME,t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply(s.TECHNICOLOR,t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply(s.POLAROID,t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply(s.SHIFT_BGR,t)},multiply:function(t,e){void 0===e&&(e=!1),e||this.reset();var i=this._matrix,n=r;return n.set(i),i.set([n[0]*t[0]+n[1]*t[5]+n[2]*t[10]+n[3]*t[15],n[0]*t[1]+n[1]*t[6]+n[2]*t[11]+n[3]*t[16],n[0]*t[2]+n[1]*t[7]+n[2]*t[12]+n[3]*t[17],n[0]*t[3]+n[1]*t[8]+n[2]*t[13]+n[3]*t[18],n[0]*t[4]+n[1]*t[9]+n[2]*t[14]+n[3]*t[19]+n[4],n[5]*t[0]+n[6]*t[5]+n[7]*t[10]+n[8]*t[15],n[5]*t[1]+n[6]*t[6]+n[7]*t[11]+n[8]*t[16],n[5]*t[2]+n[6]*t[7]+n[7]*t[12]+n[8]*t[17],n[5]*t[3]+n[6]*t[8]+n[7]*t[13]+n[8]*t[18],n[5]*t[4]+n[6]*t[9]+n[7]*t[14]+n[8]*t[19]+n[9],n[10]*t[0]+n[11]*t[5]+n[12]*t[10]+n[13]*t[15],n[10]*t[1]+n[11]*t[6]+n[12]*t[11]+n[13]*t[16],n[10]*t[2]+n[11]*t[7]+n[12]*t[12]+n[13]*t[17],n[10]*t[3]+n[11]*t[8]+n[12]*t[13]+n[13]*t[18],n[10]*t[4]+n[11]*t[9]+n[12]*t[14]+n[13]*t[19]+n[14],n[15]*t[0]+n[16]*t[5]+n[17]*t[10]+n[18]*t[15],n[15]*t[1]+n[16]*t[6]+n[17]*t[11]+n[18]*t[16],n[15]*t[2]+n[16]*t[7]+n[17]*t[12]+n[18]*t[17],n[15]*t[3]+n[16]*t[8]+n[17]*t[13]+n[18]*t[18],n[15]*t[4]+n[16]*t[9]+n[17]*t[14]+n[18]*t[19]+n[19]]),this._dirty=!0,this}});s.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],s.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],s.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],s.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],s.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],s.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],s.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],s.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],s.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],s.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],s.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t.exports=s},51767:(t,e,i)=>{var n=i(83419),r=i(29747),s=new n({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=r,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this._rgb=[t,e,i],this.onChange(),this},equals:function(t,e,i){var n=this._rgb;return n[0]===t&&n[1]===e&&n[2]===i},onChange:function(){this.dirty=!0;var t=this._rgb;this.onChangeCallback.call(this,t[0],t[1],t[2])},r:{get:function(){return this._rgb[0]},set:function(t){this._rgb[0]=t,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(t){this._rgb[1]=t,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(t){this._rgb[2]=t,this.onChange()}},destroy:function(){this.onChangeCallback=null}});t.exports=s},60461:t=>{t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},54312:(t,e,i)=>{var n=i(62235),r=i(35893),s=i(86327),o=i(88417);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)+i),s(t,n(e)+a),t}},46768:(t,e,i)=>{var n=i(62235),r=i(26541),s=i(86327),o=i(385);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)-i),s(t,n(e)+a),t}},35827:(t,e,i)=>{var n=i(62235),r=i(54380),s=i(86327),o=i(40136);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)+i),s(t,n(e)+a),t}},46871:(t,e,i)=>{var n=i(66786),r=i(35893),s=i(7702);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,r(e)+i,s(e)+o),t}},5198:(t,e,i)=>{var n=i(7702),r=i(26541),s=i(20786),o=i(385);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)-i),s(t,n(e)+a),t}},11879:(t,e,i)=>{var n=i(60461),r=[];r[n.BOTTOM_CENTER]=i(54312),r[n.BOTTOM_LEFT]=i(46768),r[n.BOTTOM_RIGHT]=i(35827),r[n.CENTER]=i(46871),r[n.LEFT_CENTER]=i(5198),r[n.RIGHT_CENTER]=i(80503),r[n.TOP_CENTER]=i(89698),r[n.TOP_LEFT]=i(922),r[n.TOP_RIGHT]=i(21373),r[n.LEFT_BOTTOM]=r[n.BOTTOM_LEFT],r[n.LEFT_TOP]=r[n.TOP_LEFT],r[n.RIGHT_BOTTOM]=r[n.BOTTOM_RIGHT],r[n.RIGHT_TOP]=r[n.TOP_RIGHT];t.exports=function(t,e,i,n,s){return r[i](t,e,n,s)}},80503:(t,e,i)=>{var n=i(7702),r=i(54380),s=i(20786),o=i(40136);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)+i),s(t,n(e)+a),t}},89698:(t,e,i)=>{var n=i(35893),r=i(17717),s=i(88417),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,n(e)+i),o(t,r(e)-a),t}},922:(t,e,i)=>{var n=i(26541),r=i(17717),s=i(385),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,n(e)-i),o(t,r(e)-a),t}},21373:(t,e,i)=>{var n=i(54380),r=i(17717),s=i(40136),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,n(e)+i),o(t,r(e)-a),t}},91660:(t,e,i)=>{t.exports={BottomCenter:i(54312),BottomLeft:i(46768),BottomRight:i(35827),Center:i(46871),LeftCenter:i(5198),QuickSet:i(11879),RightCenter:i(80503),TopCenter:i(89698),TopLeft:i(922),TopRight:i(21373)}},71926:(t,e,i)=>{var n=i(60461),r=i(79291),s={In:i(91660),To:i(16694)};s=r(!1,s,n),t.exports=s},21578:(t,e,i)=>{var n=i(62235),r=i(35893),s=i(88417),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,r(e)+i),o(t,n(e)+a),t}},10210:(t,e,i)=>{var n=i(62235),r=i(26541),s=i(385),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,r(e)-i),o(t,n(e)+a),t}},82341:(t,e,i)=>{var n=i(62235),r=i(54380),s=i(40136),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,r(e)+i),o(t,n(e)+a),t}},87958:(t,e,i)=>{var n=i(62235),r=i(26541),s=i(86327),o=i(40136);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)-i),s(t,n(e)+a),t}},40080:(t,e,i)=>{var n=i(7702),r=i(26541),s=i(20786),o=i(40136);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)-i),s(t,n(e)+a),t}},88466:(t,e,i)=>{var n=i(26541),r=i(17717),s=i(40136),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,n(e)-i),o(t,r(e)-a),t}},38829:(t,e,i)=>{var n=i(60461),r=[];r[n.BOTTOM_CENTER]=i(21578),r[n.BOTTOM_LEFT]=i(10210),r[n.BOTTOM_RIGHT]=i(82341),r[n.LEFT_BOTTOM]=i(87958),r[n.LEFT_CENTER]=i(40080),r[n.LEFT_TOP]=i(88466),r[n.RIGHT_BOTTOM]=i(19211),r[n.RIGHT_CENTER]=i(34609),r[n.RIGHT_TOP]=i(48741),r[n.TOP_CENTER]=i(49440),r[n.TOP_LEFT]=i(81288),r[n.TOP_RIGHT]=i(61323);t.exports=function(t,e,i,n,s){return r[i](t,e,n,s)}},19211:(t,e,i)=>{var n=i(62235),r=i(54380),s=i(86327),o=i(385);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)+i),s(t,n(e)+a),t}},34609:(t,e,i)=>{var n=i(7702),r=i(54380),s=i(20786),o=i(385);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,r(e)+i),s(t,n(e)+a),t}},48741:(t,e,i)=>{var n=i(54380),r=i(17717),s=i(385),o=i(66737);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,n(e)+i),o(t,r(e)-a),t}},49440:(t,e,i)=>{var n=i(35893),r=i(17717),s=i(86327),o=i(88417);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),s(t,r(e)-a),t}},81288:(t,e,i)=>{var n=i(26541),r=i(17717),s=i(86327),o=i(385);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),s(t,r(e)-a),t}},61323:(t,e,i)=>{var n=i(54380),r=i(17717),s=i(86327),o=i(40136);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),s(t,r(e)-a),t}},16694:(t,e,i)=>{t.exports={BottomCenter:i(21578),BottomLeft:i(10210),BottomRight:i(82341),LeftBottom:i(87958),LeftCenter:i(40080),LeftTop:i(88466),QuickSet:i(38829),RightBottom:i(19211),RightCenter:i(34609),RightTop:i(48741),TopCenter:i(49440),TopLeft:i(81288),TopRight:i(61323)}},66786:(t,e,i)=>{var n=i(88417),r=i(20786);t.exports=function(t,e,i){return n(t,e),r(t,i)}},62235:t=>{t.exports=function(t){return t.y+t.height-t.height*t.originY}},72873:(t,e,i)=>{var n=i(62235),r=i(26541),s=i(54380),o=i(17717),a=i(87841);t.exports=function(t,e){void 0===e&&(e=new a);var i=r(t),h=o(t);return e.x=i,e.y=h,e.width=s(t)-i,e.height=n(t)-h,e}},35893:t=>{t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},7702:t=>{t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},26541:t=>{t.exports=function(t){return t.x-t.width*t.originX}},87431:t=>{t.exports=function(t){return t.width*t.originX}},46928:t=>{t.exports=function(t){return t.height*t.originY}},54380:t=>{t.exports=function(t){return t.x+t.width-t.width*t.originX}},17717:t=>{t.exports=function(t){return t.y-t.height*t.originY}},86327:t=>{t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},88417:t=>{t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},20786:t=>{t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},385:t=>{t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},40136:t=>{t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},66737:t=>{t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},58724:(t,e,i)=>{t.exports={CenterOn:i(66786),GetBottom:i(62235),GetBounds:i(72873),GetCenterX:i(35893),GetCenterY:i(7702),GetLeft:i(26541),GetOffsetX:i(87431),GetOffsetY:i(46928),GetRight:i(54380),GetTop:i(17717),SetBottom:i(86327),SetCenterX:i(88417),SetCenterY:i(20786),SetLeft:i(385),SetRight:i(40136),SetTop:i(66737)}},20623:t=>{t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach((function(e){t.style["image-rendering"]=e})),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},27919:(t,e,i)=>{var n,r,s,o=i(8054),a=i(68703),h=[],l=!1;t.exports=(s=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,s){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===s&&(s=!1);var c=r(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),s&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d",{willReadFrequently:!1})),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:r=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e<h.length;e++){var i=h[e];if(!i.parent&&i.type===t)return i}return null},free:function(){return h.length-s()},pool:h,remove:function(t){var e=t instanceof HTMLCanvasElement;h.forEach((function(i){(e&&i.canvas===t||!e&&i.parent===t)&&(i.parent=null,i.canvas.width=1,i.canvas.height=1)}))},total:s})},68703:t=>{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i<e.length;i++){var n=e[i]+"mageSmoothingEnabled";if(n in t)return n}return null},isEnabled:function(t){return null!==i?t[i]:null}}},65208:t=>{t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},91610:t=>{t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach((function(i){t.style[i+"user-select"]=e})),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},26253:(t,e,i)=>{t.exports={CanvasInterpolation:i(20623),CanvasPool:i(27919),Smoothing:i(68703),TouchAction:i(65208),UserSelect:i(91610)}},40987:(t,e,i)=>{var n=i(83419),r=i(37589),s=i(1e3),o=i(7537),a=i(87837),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,n,r){return void 0===n&&(n=255),void 0===r&&(r=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(r)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=r(e,i,n),this._color32=s(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),r=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,r)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),n=Math.max(0,Math.min(255,n-Math.round(-t/100*255))),this.setTo(e,i,n)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},92728:(t,e,i)=>{var n=i(37589);t.exports=function(t){void 0===t&&(t=1024);var e,i=[],r=255,s=255,o=0,a=0;for(e=0;e<=r;e++)i.push({r:s,g:e,b:a,color:n(s,e,a)});for(o=255,e=r;e>=0;e--)i.push({r:e,g:o,b:a,color:n(e,o,a)});for(s=0,e=0;e<=r;e++,o--)i.push({r:s,g:o,b:e,color:n(s,o,e)});for(o=0,a=255,e=0;e<=r;e++,a--,s++)i.push({r:s,g:o,b:a,color:n(s,o,a)});if(1024===t)return i;var h=[],l=0,u=1024/t;for(e=0;e<t;e++)h.push(i[Math.floor(l)]),l+=u;return h}},91588:t=>{t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},62957:t=>{t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},37589:t=>{t.exports=function(t,e,i){return t<<16|e<<8|i}},1e3:t=>{t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},62183:(t,e,i)=>{var n=i(40987),r=i(89528);t.exports=function(t,e,i){var s=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;s=r(l,h,t+1/3),o=r(l,h,t),a=r(l,h,t-1/3)}return(new n).setGLTo(s,o,a,1)}},27939:(t,e,i)=>{var n=i(7537);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],r=0;r<=359;r++)i.push(n(r/359,t,e));return i}},7537:(t,e,i)=>{var n=i(37589);function r(t,e,i,n){var r=(t+6*e)%6,s=Math.min(r,4-r,1);return Math.round(255*(n-n*i*Math.max(0,s)))}t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1);var o=r(5,t,e,i),a=r(3,t,e,i),h=r(1,t,e,i);return s?s.setTo?s.setTo(o,a,h,s.alpha,!0):(s.r=o,s.g=a,s.b=h,s.color=n(o,a,h),s):{r:o,g:a,b:h,color:n(o,a,h)}}},70238:(t,e,i)=>{var n=i(40987);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,n){return e+e+i+i+n+n}));var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var r=parseInt(i[1],16),s=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(r,s,o)}return e}},89528:t=>{t.exports=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},30100:(t,e,i)=>{var n=i(40987),r=i(90664);t.exports=function(t){var e=r(t);return new n(e.r,e.g,e.b,e.a)}},90664:t=>{t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},13699:(t,e,i)=>{var n=i(28915),r=function(t,e,i,r,s,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,r,l),g:n(e,s,l),b:n(i,o,l)}};t.exports={RGBWithRGB:r,ColorWithRGB:function(t,e,i,n,s,o){return void 0===s&&(s=100),void 0===o&&(o=0),r(t.r,t.g,t.b,e,i,n,s,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),r(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},68957:(t,e,i)=>{var n=i(40987);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},87388:(t,e,i)=>{var n=i(40987);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var r=parseInt(i[1],10),s=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(r,s,o,255*a)}return e}},87837:t=>{t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var r=Math.min(t,e,i),s=Math.max(t,e,i),o=s-r,a=0,h=0===s?0:o/s,l=s;return s!==r&&(s===t?a=(e-i)/o+(e<i?6:0):s===e?a=(i-t)/o+2:s===i&&(a=(t-e)/o+4),a/=6),n.hasOwnProperty("_h")?(n._h=a,n._s=h,n._v=l):(n.h=a,n.s=h,n.v=l),n}},75723:(t,e,i)=>{var n=i(62957);t.exports=function(t,e,i,r,s){return void 0===r&&(r=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+n(r)+n(t)+n(e)+n(i)}},85386:(t,e,i)=>{var n=i(30976),r=i(40987);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new r(n(t,e),n(t,e),n(t,e))}},80333:(t,e,i)=>{var n=i(70238),r=i(30100),s=i(68957),o=i(87388);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return r(t);case"object":return s(t)}}},3956:(t,e,i)=>{var n=i(40987);n.ColorSpectrum=i(92728),n.ColorToRGBA=i(91588),n.ComponentToHex=i(62957),n.GetColor=i(37589),n.GetColor32=i(1e3),n.HexStringToColor=i(70238),n.HSLToColor=i(62183),n.HSVColorWheel=i(27939),n.HSVToRGB=i(7537),n.HueToComponent=i(89528),n.IntegerToColor=i(30100),n.IntegerToRGB=i(90664),n.Interpolate=i(13699),n.ObjectToColor=i(68957),n.RandomRGB=i(85386),n.RGBStringToColor=i(87388),n.RGBToHSV=i(87837),n.RGBToString=i(75723),n.ValueToColor=i(80333),t.exports=n},27460:(t,e,i)=>{t.exports={Align:i(71926),BaseShader:i(73894),Bounds:i(58724),Canvas:i(26253),Color:i(3956),ColorMatrix:i(89422),Masks:i(69781),RGB:i(51767)}},6858:(t,e,i)=>{var n=i(83419),r=i(39429),s=new n({initialize:function(t,e,i,n,r,s){e||(e=t.sys.make.image({x:i,y:n,key:r,frame:s,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});r.register("bitmapMask",(function(t,e,i,n,r){return new s(this.scene,t,e,i,n,r)})),t.exports=s},80661:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,r=this.geometryMask,s=t.maskCount,o=255;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,s,o),n.stencilOp(n.KEEP,n.KEEP,n.INCR),s++):(n.stencilFunc(n.EQUAL,s+1,o),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),this.level=s,r.renderWebGL(t,r,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s,o):n.stencilFunc(n.EQUAL,s,o)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var n=t.maskStack[t.maskStack.length-1];n.mask.applyStencil(t,n.camera,!1),t.currentCameraMask.mask!==n.mask?(i.mask=n.mask,i.camera=n.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},69781:(t,e,i)=>{t.exports={BitmapMask:i(6858),GeometryMask:i(80661)}},73894:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e,i,n){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===n&&(n=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=n}});t.exports=n},40366:t=>{t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return i||(i=document.body),i.appendChild(t),t}},83719:(t,e,i)=>{var n=i(40366);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+e.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},57264:(t,e,i)=>{var n=i(25892);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},57811:t=>{t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},45818:(t,e,i)=>{var n=i(13560);t.exports=function(t,e){var i=window.screen,r=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return r&&"string"==typeof r.type?r.type:"string"==typeof r?r:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?n.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?n.ORIENTATION.LANDSCAPE:void 0:e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},74403:t=>{t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},56836:t=>{t.exports=function(t){var e="";try{if(window.DOMParser)e=(new DOMParser).parseFromString(t,"text/xml");else(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},35846:t=>{t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},43092:(t,e,i)=>{var n=i(83419),r=i(29747),s=new n({initialize:function(){this.isRunning=!1,this.callback=r,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var t=this;this.step=function e(i){t.callback(i),t.isRunning&&(t.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){t.isRunning&&(t.timeOutID=window.setTimeout(e,t.delay)),t.callback(window.performance.now())}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.delay=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=r}});t.exports=s},84902:(t,e,i)=>{var n={AddToDOM:i(40366),DOMContentLoaded:i(57264),GetInnerHeight:i(57811),GetScreenOrientation:i(45818),GetTarget:i(74403),ParseXML:i(56836),RemoveFromDOM:i(35846),RequestAnimationFrame:i(43092)};t.exports=n},47565:(t,e,i)=>{var n=i(83419),r=i(50792),s=i(37277),o=new n({Extends:r,initialize:function(){r.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});s.register("EventEmitter",o,"events"),t.exports=o},93055:(t,e,i)=>{t.exports={EventEmitter:i(47565)}},20122:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,s.BARREL,t),this.amount=e}});t.exports=o},32251:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e,i,n,o,a,h){void 0===i&&(i=1),void 0===n&&(n=1),void 0===o&&(o=1),void 0===a&&(a=1),void 0===h&&(h=4),r.call(this,s.BLOOM,t),this.steps=h,this.offsetX=i,this.offsetY=n,this.blurStrength=o,this.strength=a,this.glcolor=[1,1,1],null!=e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=o},9047:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=2),void 0===n&&(n=2),void 0===o&&(o=1),void 0===h&&(h=4),r.call(this,s.BLUR,t),this.quality=e,this.x=i,this.y=n,this.steps=h,this.strength=o,this.glcolor=[1,1,1],null!=a&&(this.color=a)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=o},27885:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e,i,n,o,a,h,l){void 0===e&&(e=.5),void 0===i&&(i=1),void 0===n&&(n=.2),void 0===o&&(o=!1),void 0===a&&(a=1),void 0===h&&(h=1),void 0===l&&(l=1),r.call(this,s.BOKEH,t),this.radius=e,this.amount=i,this.contrast=n,this.isTiltShift=o,this.strength=l,this.blurX=a,this.blurY=h}});t.exports=o},12578:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e,i,n,o,a){void 0===e&&(e=8),void 0===o&&(o=1),void 0===a&&(a=.005),r.call(this,s.CIRCLE,t),this.scale=o,this.feather=a,this.thickness=e,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],null!=i&&(this.color=i),null!=n&&(this.backgroundColor=n)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundColor:{get:function(){var t=this.glcolor2;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor2;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(t){this.glcolor2[3]=t}}});t.exports=o},15802:(t,e,i)=>{var n=i(83419),r=i(89422),s=i(14811),o=new n({Extends:r,initialize:function(t){r.call(this),this.type=s.COLOR_MATRIX,this.gameObject=t,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});t.exports=o},72898:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e){this.type=t,this.gameObject=e,this.active=!0},setActive:function(t){return this.active=t,this},destroy:function(){this.gameObject=null,this.active=!1}});t.exports=n},44553:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e,i,n){void 0===e&&(e="__WHITE"),void 0===i&&(i=.005),void 0===n&&(n=.005),r.call(this,s.DISPLACEMENT,t),this.x=i,this.y=n,this.glTexture,this.setTexture(e)},setTexture:function(t){var e=this.gameObject.scene.sys.textures.getFrame(t);return e&&(this.glTexture=e.glTexture),this}});t.exports=o},68531:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e,i,n,o){void 0===i&&(i=4),void 0===n&&(n=0),void 0===o&&(o=!1),r.call(this,s.GLOW,t),this.outerStrength=i,this.innerStrength=n,this.knockout=o,this.glcolor=[1,1,1,1],void 0!==e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=o},37102:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e,i,n,o,a,h,l,u){void 0===n&&(n=.2),void 0===o&&(o=0),void 0===a&&(a=0),void 0===h&&(h=0),void 0===l&&(l=1),void 0===u&&(u=0),r.call(this,s.GRADIENT,t),this.alpha=n,this.size=u,this.fromX=o,this.fromY=a,this.toX=h,this.toY=l,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],null!=e&&(this.color1=e),null!=i&&(this.color2=i)},color1:{get:function(){var t=this.glcolor1;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor1;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}},color2:{get:function(){var t=this.glcolor2;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor2;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}}});t.exports=o},86886:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,s.PIXELATE,t),this.amount=e}});t.exports=o},92322:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e,i,n,o,a,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=.1),void 0===o&&(o=1),void 0===h&&(h=6),void 0===l&&(l=1),r.call(this,s.SHADOW,t),this.x=e,this.y=i,this.decay=n,this.power=o,this.glcolor=[0,0,0,1],this.samples=h,this.intensity=l,void 0!==a&&(this.color=a)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=o},39563:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e,i,n,o){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===n&&(n=3),void 0===o&&(o=!1),r.call(this,s.SHINE,t),this.speed=e,this.lineWidth=i,this.gradient=n,this.reveal=o}});t.exports=o},56448:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e,i,n,o){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===n&&(n=.5),void 0===o&&(o=.5),r.call(this,s.VIGNETTE,t),this.x=e,this.y=i,this.radius=n,this.strength=o}});t.exports=o},38433:(t,e,i)=>{var n=i(83419),r=i(72898),s=i(14811),o=new n({Extends:r,initialize:function(t,e,i,n,o){void 0===e&&(e=.1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=!1),r.call(this,s.WIPE,t),this.progress=0,this.wipeWidth=e,this.direction=i,this.axis=n,this.reveal=o}});t.exports=o},14811:t=>{t.exports={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19}},66064:(t,e,i)=>{var n=i(79291),r=i(14811),s={Barrel:i(20122),Controller:i(72898),Bloom:i(32251),Blur:i(9047),Bokeh:i(27885),Circle:i(12578),ColorMatrix:i(15802),Displacement:i(44553),Glow:i(68531),Gradient:i(37102),Pixelate:i(86886),Shadow:i(92322),Shine:i(39563),Vignette:i(56448),Wipe:i(38433)};s=n(!1,s,r),t.exports=s},25305:(t,e,i)=>{var n=i(10312),r=i(23568);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var s=r(i,"scale",null);"number"==typeof s?e.setScale(s):null!==s&&(e.scaleX=r(s,"x",1),e.scaleY=r(s,"y",1));var o=r(i,"scrollFactor",null);"number"==typeof o?e.setScrollFactor(o):null!==o&&(e.scrollFactorX=r(o,"x",1),e.scrollFactorY=r(o,"y",1)),e.rotation=r(i,"rotation",0);var a=r(i,"angle",null);null!==a&&(e.angle=a),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),u=r(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=r(i,"blendMode",n.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},13059:(t,e,i)=>{var n=i(23568);t.exports=function(t,e){var i=n(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var r=t.anims,s=n(i,"key",void 0);if(s){var o=n(i,"startFrame",void 0),a=n(i,"delay",0),h=n(i,"repeat",0),l=n(i,"repeatDelay",0),u=n(i,"yoyo",!1),c=n(i,"play",!1),d=n(i,"delayedPlay",0),p={key:s,delay:a,repeat:h,repeatDelay:l,yoyo:u,startFrame:o};c?r.play(p):d>0?r.playAfterDelay(p,d):r.load(p)}}return t}},8050:(t,e,i)=>{var n=i(83419),r=i(73162),s=i(37277),o=i(51708),a=i(44594),h=i(19186),l=new n({Extends:r,initialize:function(t){r.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.events.once(a.DESTROY,this.destroy,this)},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.parentContainer&&t.parentContainer.remove(t),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(o.ADDED_TO_SCENE,t,this.scene),this.events.emit(a.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(o.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(a.REMOVED_FROM_SCENE,t,this.scene)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(h(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list;t.length;)t[0].destroy(!0);this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});s.register("DisplayList",l,"displayList"),t.exports=l},95643:(t,e,i)=>{var n=i(83419),r=i(53774),s=i(45893),o=i(50792),a=i(51708),h=i(44594),l=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(a.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(a.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},44603:(t,e,i)=>{var n=i(83419),r=i(37277),s=i(44594),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(s.BOOT,this.boot,this),this.events.on(s.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(s.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},r.register("GameObjectCreator",o,"make"),t.exports=o},39429:(t,e,i)=>{var n=i(83419),r=i(37277),s=i(44594),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(s.BOOT,this.boot,this),this.events.on(s.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(s.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},r.register("GameObjectFactory",o,"add"),t.exports=o},91296:(t,e,i)=>{var n=i(61340),r=new n,s=new n,o=new n,a={camera:r,sprite:s,calc:o};t.exports=function(t,e,i){var n=r,h=s,l=o;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),n.multiply(h,l),a}},45027:(t,e,i)=>{var n=i(83419),r=i(25774),s=i(37277),o=i(44594),a=new n({Extends:r,initialize:function(t){r.call(this),this.checkQueue=!0,this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(o.PRE_UPDATE,this.update,this),t.on(o.UPDATE,this.sceneUpdate,this),t.once(o.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var i=this._active,n=i.length,r=0;r<n;r++){var s=i[r];s.active&&s.preUpdate.call(s,t,e)}},shutdown:function(){for(var t=this._active.length;t--;)this._active[t].destroy(!0);for(t=this._pending.length;t--;)this._pending[t].destroy(!0);for(t=this._destroy.length;t--;)this._destroy[t].destroy(!0);this._toProcess=0,this._pending=[],this._active=[],this._destroy=[],this.removeAllListeners();var e=this.systems.events;e.off(o.PRE_UPDATE,this.update,this),e.off(o.UPDATE,this.sceneUpdate,this),e.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.systems.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});s.register("UpdateList",a,"updateList"),t.exports=a},3217:t=>{t.exports=function(t,e,i,n,r,s,o,a,h,l,u,c,d,p,f){var m=i.x-e.displayOriginX+r,g=i.y-e.displayOriginY+s,v=m+i.w,y=g+i.h,x=o.getXRound(m,g,a),E=o.getYRound(m,g,a),T=o.getXRound(m,y,a),_=o.getYRound(m,y,a),w=o.getXRound(v,y,a),S=o.getYRound(v,y,a),b=o.getXRound(v,g,a),C=o.getYRound(v,g,a);t.batchQuad(e,x,E,T,_,w,S,b,C,n.u0,n.v0,n.u1,n.v1,h,l,u,c,d,p,f)}},53048:t=>{t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),void 0===n)return n={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var r,s,o,a,h=t.text,l=h.length,u=t.maxWidth,c=t.wordWrapCharCode,d=Number.MAX_VALUE,p=Number.MAX_VALUE,f=0,m=0,g=t.fontData.chars,v=t.fontData.lineHeight,y=t.letterSpacing,x=t.lineSpacing,E=0,T=0,_=0,w=null,S=t._align,b=0,C=0,A=t.fontSize/t.fontData.size,R=A*t.scaleX,M=A*t.scaleY,L=null,O=0,P=[],F=Number.MAX_VALUE,I=0,D=0,N=0,k=[],B=[],U=null;if(u>0){for(r=0;r<l;r++)if(10!==(_=h.charCodeAt(r))){if(w=g[_]){if(null!==L)var G=w.kerning[O];_===c?null!==U&&(k.push({word:U.word,i:U.i,x:U.x*R,y:U.y*M,w:U.w*R,h:U.h*M,cr:!1}),U=null):(null===U&&(U={word:"",i:r,x:E,y:T,w:0,h:v,cr:!1}),U.word=U.word.concat(h[r]),U.w+=w.xOffset+w.xAdvance+(void 0!==G?G:0)),E+=w.xAdvance+y,L=w,O=_}}else null!==U&&(k.push({word:U.word,i:U.i,x:U.x*R,y:U.y*M,w:U.w*R,h:U.h*M,cr:!0}),U=null),E=0,T+=v+x,L=null;var W;null!==U&&k.push({word:U.word,i:U.i,x:U.x*R,y:U.y*M,w:U.w*R,h:U.h*M,cr:!1}),E=0,T=0,L=null,O=0;var X=0,V=[];for(r=0;r<k.length;r++){var $=k[r],H=$.x,z=$.x+$.w;if(W)X=H-(H-(W.x+W.w)+W.w),W=null;H-X>u||z-X>u?(V.push($.i-1),$.cr?(V.push($.i+$.word.length),X=0,W=null):W=$):$.cr&&(V.push($.i+$.word.length),X=0,W=null)}for(r=V.length-1;r>=0;r--)s=h,o=V[r],a="\n",h=s.substr(0,o)+a+s.substr(o+1);n.wrappedText=h,l=h.length,k=[],U=null}var Y=0;for(r=0;r<l;r++)if(10!==(_=h.charCodeAt(r))){if(w=g[_]){if(b=E,C=T,null!==L){var j=w.kerning[O];b+=void 0!==j?j:0}d>b&&(d=b),p>C&&(p=C);var K=b+w.xAdvance,q=C+v;f<K&&(f=K),m<q&&(m=q);var Z=w.xOffset+w.xAdvance+(void 0!==j?j:0);_===c?null!==U&&(k.push({word:U.word,i:U.i,x:U.x*R,y:U.y*M,w:U.w*R,h:U.h*M}),U=null):(null===U&&(U={word:"",i:Y,x:E,y:T,w:0,h:v}),U.word=U.word.concat(h[r]),U.w+=Z),B.push({i:Y,idx:r,char:h[r],code:_,x:(w.xOffset+b)*A,y:(w.yOffset+T)*A,w:w.width*A,h:w.height*A,t:T*A,r:K*A,b:v*A,line:D,glyph:w}),E+=w.xAdvance+y+(void 0!==j?j:0),L=w,O=_,N=K*A,Y++}}else null!==U&&(k.push({word:U.word,i:U.i,x:U.x*R,y:U.y*M,w:U.w*R,h:U.h*M}),U=null),E=0,T+=v+x,L=null,P[D]=N,N>I&&(I=N),N<F&&(F=N),D++,N=0;if(null!==U&&k.push({word:U.word,i:U.i,x:U.x*R,y:U.y*M,w:U.w*R,h:U.h*M}),P[D]=N,N>I&&(I=N),N<F&&(F=N),S>0)for(var Q=0;Q<B.length;Q++){var J=B[Q];if(1===S){var tt=(I-P[J.line])/2;J.x+=tt,J.r+=tt}else if(2===S){var et=I-P[J.line];J.x+=et,J.r+=et}}var it=n.local,nt=n.global,rt=n.lines;return it.x=d*A,it.y=p*A,it.width=f*A,it.height=m*A,nt.x=t.x-t._displayOriginX+d*R,nt.y=t.y-t._displayOriginY+p*M,nt.width=f*R,nt.height=m*M,rt.shortest=F,rt.longest=I,rt.lengths=P,e&&(it.x=Math.ceil(it.x),it.y=Math.ceil(it.y),it.width=Math.ceil(it.width),it.height=Math.ceil(it.height),nt.x=Math.ceil(nt.x),nt.y=Math.ceil(nt.y),nt.width=Math.ceil(nt.width),nt.height=Math.ceil(nt.height),rt.shortest=Math.ceil(F),rt.longest=Math.ceil(I)),i&&(t._displayOriginX=t.originX*it.width,t._displayOriginY=t.originY*it.height,nt.x=t.x-t._displayOriginX*t.scaleX,nt.y=t.y-t._displayOriginY*t.scaleY,e&&(nt.x=Math.ceil(nt.x),nt.y=Math.ceil(nt.y))),n.words=k,n.characters=B,n.lines.height=v,n.scale=A,n.scaleX=t.scaleX,n.scaleY=t.scaleY,n}},61327:(t,e,i)=>{var n=i(21859);t.exports=function(t,e,i,r,s,o,a){var h=t.sys.textures.get(i),l=h.get(r),u=t.sys.cache.xml.get(s);if(l&&u){var c=n(u,l,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:c,texture:i,frame:r,fromAtlas:!0}),!0}return!1}},6925:(t,e,i)=>{var n=i(35154);t.exports=function(t,e){var i=e.width,r=e.height,s=Math.floor(i/2),o=Math.floor(r/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=t.sys.textures.getFrame(h),u=l.cutX,c=l.cutY,d=l.source.width,p=l.source.height,f=n(e,"offset.x",0),m=n(e,"offset.y",0),g=n(e,"spacing.x",0),v=n(e,"spacing.y",0),y=n(e,"lineSpacing",0),x=n(e,"charsPerRow",null);null===x&&(x=d/i)>a.length&&(x=a.length);for(var E=f,T=m,_={retroFont:!0,font:h,size:i,lineHeight:r+y,chars:{}},w=0,S=0;S<a.length;S++){var b=a.charCodeAt(S),C=(u+E)/d,A=(c+T)/p,R=(u+E+i)/d,M=(c+T+r)/p;_.chars[b]={x:E,y:T,width:i,height:r,centerX:s,centerY:o,xOffset:0,yOffset:0,xAdvance:i,data:{},kerning:{},u0:C,v0:A,u1:R,v1:M},++w===x?(w=0,E=f,T+=r+v):E+=i+g}return{data:_,frame:null,texture:h}}}},21859:t=>{function e(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,i,n,r,s){void 0===n&&(n=0),void 0===r&&(r=0);var o=i.cutX,a=i.cutY,h=i.source.width,l=i.source.height,u=i.sourceIndex,c={},d=t.getElementsByTagName("info")[0],p=t.getElementsByTagName("common")[0];c.font=d.getAttribute("face"),c.size=e(d,"size"),c.lineHeight=e(p,"lineHeight")+r,c.chars={};var f=t.getElementsByTagName("char"),m=void 0!==i&&i.trimmed;if(m)var g=i.height,v=i.width;for(var y=0;y<f.length;y++){var x=f[y],E=e(x,"id"),T=String.fromCharCode(E),_=e(x,"x"),w=e(x,"y"),S=e(x,"width"),b=e(x,"height");m&&(_<v&&(v=_),w<g&&(g=w)),m&&0!==g&&0!==v&&(_-=i.x,w-=i.y);var C=(o+_)/h,A=(a+w)/l,R=(o+_+S)/h,M=(a+w+b)/l;if(c.chars[E]={x:_,y:w,width:S,height:b,centerX:Math.floor(S/2),centerY:Math.floor(b/2),xOffset:e(x,"xoffset"),yOffset:e(x,"yoffset"),xAdvance:e(x,"xadvance")+n,data:{},kerning:{},u0:C,v0:A,u1:R,v1:M},s&&0!==S&&0!==b){var L=s.add(T,u,_,w,S,b);L&&L.setUVs(S,b,C,A,R,M)}}var O=t.getElementsByTagName("kerning");for(y=0;y<O.length;y++){var P=O[y],F=e(P,"first"),I=e(P,"second"),D=e(P,"amount");c.chars[I].kerning[F]=D}return c}},196:(t,e,i)=>{var n=i(87662),r=i(79291),s={Parse:i(6925)};s=r(!1,s,n),t.exports=s},87662:t=>{t.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},2638:(t,e,i)=>{var n=i(22186),r=i(83419),s=i(12310),o=new r({Extends:n,Mixins:[s],initialize:function(t,e,i,r,s,o,a){n.call(this,t,e,i,r,s,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},86741:(t,e,i)=>{var n=i(20926);t.exports=function(t,e,i,r){var s=e._text,o=s.length,a=t.currentContext;if(0!==o&&n(t,a,e,i,r)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.displayCallback,u=e.callbackData,c=e.fontData.chars,d=e.fontData.lineHeight,p=e._letterSpacing,f=0,m=0,g=0,v=null,y=0,x=0,E=0,T=0,_=0,w=0,S=null,b=0,C=e.frame.source.image,A=h.cutX,R=h.cutY,M=0,L=0,O=e._fontSize/e.fontData.size,P=e._align,F=0,I=0;e.getTextBounds(!1);var D=e._bounds.lines;1===P?I=(D.longest-D.lengths[0])/2:2===P&&(I=D.longest-D.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);var N=i.roundPixels;e.cropWidth>0&&e.cropHeight>0&&(a.beginPath(),a.rect(0,0,e.cropWidth,e.cropHeight),a.clip());for(var k=0;k<o;k++)if(L=O,M=0,10!==(g=s.charCodeAt(k))){if(v=c[g]){if(y=A+v.x,x=R+v.y,E=v.width,T=v.height,_=v.xOffset+f-e.scrollX,w=v.yOffset+m-e.scrollY,null!==S){var B=v.kerning[b];_+=void 0!==B?B:0}if(l){u.index=k,u.charCode=g,u.x=_,u.y=w,u.scale=L,u.rotation=M,u.data=v.data;var U=l(u);_=U.x,w=U.y,L=U.scale,M=U.rotation}_*=L,w*=L,_+=I,f+=v.xAdvance+p+(void 0!==B?B:0),S=v,b=g,0!==E&&0!==T&&32!==g&&(N&&(_=Math.round(_),w=Math.round(w)),a.save(),a.translate(_,w),a.rotate(M),a.scale(L,L),a.drawImage(C,y,x,E,T,0,0,E,T),a.restore())}}else F++,1===P?I=(D.longest-D.lengths[F])/2:2===P&&(I=D.longest-D.lengths[F]),f=0,m+=d,S=null;a.restore()}}},11164:(t,e,i)=>{var n=i(2638),r=i(25305),s=i(44603),o=i(23568);s.register("dynamicBitmapText",(function(t,e){void 0===t&&(t={});var i=o(t,"font",""),s=o(t,"text",""),a=o(t,"size",!1),h=new n(this.scene,0,0,i,s,a);return void 0!==e&&(t.add=e),r(this.scene,h,t),h}))},72566:(t,e,i)=>{var n=i(2638);i(39429).register("dynamicBitmapText",(function(t,e,i,r,s){return this.displayList.add(new n(this.scene,t,e,i,r,s))}))},12310:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(73482),s=i(86741),t.exports={renderWebGL:r,renderCanvas:s}},73482:(t,e,i)=>{var n=i(91296),r=i(61340),s=i(70554),o=new r;t.exports=function(t,e,i,r){var a=e.text,h=a.length;if(0!==h){i.addToRenderList(e);var l=t.pipelines.set(e.pipeline,e),u=n(e,i,r);t.pipelines.preBatch(e);var c=u.sprite,d=u.calc,p=o,f=e.cropWidth>0||e.cropHeight>0;f&&(l.flush(),t.pushScissor(d.tx,d.ty,e.cropWidth*d.scaleX,e.cropHeight*d.scaleY));var m,g,v=e.frame.glTexture,y=e.tintFill,x=s.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),E=s.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),T=s.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),_=s.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),w=l.setGameObject(e),S=0,b=0,C=0,A=0,R=e.letterSpacing,M=0,L=0,O=e.scrollX,P=e.scrollY,F=e.fontData,I=F.chars,D=F.lineHeight,N=e.fontSize/F.size,k=0,B=e._align,U=0,G=0,W=e.getTextBounds(!1);e.maxWidth>0&&(h=(a=W.wrappedText).length);var X=e._bounds.lines;1===B?G=(X.longest-X.lengths[0])/2:2===B&&(G=X.longest-X.lengths[0]);for(var V=i.roundPixels,$=e.displayCallback,H=e.callbackData,z=0;z<h;z++)if(10!==(C=a.charCodeAt(z))){if(m=I[C]){M=m.width,L=m.height;var Y=m.xOffset+S-O,j=m.yOffset+b-P;if(null!==g){var K=m.kerning[A];Y+=void 0!==K?K:0}if(S+=m.xAdvance+R,g=m,A=C,0!==M&&0!==L&&32!==C){if(N=e.fontSize/e.fontData.size,k=0,$){H.color=0,H.tint.topLeft=x,H.tint.topRight=E,H.tint.bottomLeft=T,H.tint.bottomRight=_,H.index=z,H.charCode=C,H.x=Y,H.y=j,H.scale=N,H.rotation=k,H.data=m.data;var q=$(H);Y=q.x,j=q.y,N=q.scale,k=q.rotation,q.color?(x=q.color,E=q.color,T=q.color,_=q.color):(x=q.tint.topLeft,E=q.tint.topRight,T=q.tint.bottomLeft,_=q.tint.bottomRight),x=s.getTintAppendFloatAlpha(x,i.alpha*e._alphaTL),E=s.getTintAppendFloatAlpha(E,i.alpha*e._alphaTR),T=s.getTintAppendFloatAlpha(T,i.alpha*e._alphaBL),_=s.getTintAppendFloatAlpha(_,i.alpha*e._alphaBR)}Y*=N,j*=N,Y-=e.displayOriginX,j-=e.displayOriginY,Y+=G,p.applyITRS(Y,j,k,N,N),d.multiply(p,c);var Z=m.u0,Q=m.v0,J=m.u1,tt=m.v1,et=M,it=L,nt=c.e,rt=c.f,st=it*c.c+c.e,ot=it*c.d+c.f,at=et*c.a+it*c.c+c.e,ht=et*c.b+it*c.d+c.f,lt=et*c.a+c.e,ut=et*c.b+c.f;V&&(nt=Math.round(nt),rt=Math.round(rt),st=Math.round(st),ot=Math.round(ot),at=Math.round(at),ht=Math.round(ht),lt=Math.round(lt),ut=Math.round(ut)),l.shouldFlush(6)&&(l.flush(),w=l.setGameObject(e)),l.batchQuad(e,nt,rt,st,ot,at,ht,lt,ut,Z,Q,J,tt,x,E,T,_,y,v,w)}}}else U++,1===B?G=(X.longest-X.lengths[U])/2:2===B&&(G=X.longest-X.lengths[U]),S=0,b+=D,g=null;f&&(l.flush(),t.popScissor()),t.pipelines.postBatch(e)}}},22186:(t,e,i)=>{var n=i(83419),r=i(45319),s=i(31401),o=i(95643),a=i(53048),h=i(61327),l=i(21859),u=i(87841),c=i(18658),d=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.PostPipeline,s.ScrollFactor,s.Texture,s.Tint,s.Transform,s.Visible,c],initialize:function(t,e,i,n,r,s,h){void 0===r&&(r=""),void 0===h&&(h=0),o.call(this,t,"BitmapText"),this.font=n;var l=this.scene.sys.cache.bitmapFont.get(n);l||console.warn("Invalid BitmapText key: "+n),this.fontData=l.data,this._text="",this._fontSize=s||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=h,this._bounds=a(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=l.fromAtlas,this.setTexture(l.texture,l.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(r)},setLeftAlign:function(){return this._align=d.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=d.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=d.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this._letterSpacing=t,this._dirty=!0,this},setLineSpacing:function(t){return void 0===t&&(t=0),this.lineSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=.5),this.dropShadowX=t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=n,this},setCharacterTint:function(t,e,i,n,s,o,a){void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=!1),void 0===n&&(n=-1),void 0===s&&(s=n,o=n,a=n);var h=this.text.length;-1===e&&(e=h),t<0&&(t=h+t),t=r(t,0,h-1);for(var l=r(t+e,t,h),u=this.charColors,c=t;c<l;c++){var d=u[c];if(-1===n)u[c]=null;else{var p=i?1:0;d?(d.tintEffect=p,d.tintTL=n,d.tintTR=s,d.tintBL=o,d.tintBR=a):u[c]={tintEffect:p,tintTL:n,tintTR:s,tintBL:o,tintBR:a}}}return this},setWordTint:function(t,e,i,n,r,s,o){void 0===e&&(e=1);for(var a=this.getTextBounds().words,h="number"==typeof t,l=0,u=0;u<a.length;u++){var c=a[u];if((h&&u===t||!h&&c.word===t)&&(this.setCharacterTint(c.i,c.word.length,i,n,r,s,o),++l===e))return this}return this},getTextBounds:function(t){var e=this._bounds;return(this._dirty||t||this.scaleX!==e.scaleX||this.scaleY!==e.scaleY)&&(a(this,t,!0,e),this._dirty=!1),e},getCharacterAt:function(t,e,i){for(var n=this.getLocalPoint(t,e,null,i),r=this.getTextBounds().characters,s=new u,o=0;o<r.length;o++){var a=r[o];if(s.setTo(a.x,a.t,a.r-a.x,a.b),s.contains(n.x,n.y))return a}return null},updateDisplayOrigin:function(){return this._dirty=!0,this.getTextBounds(!1),this},setFont:function(t,e,i){void 0===e&&(e=this._fontSize),void 0===i&&(i=this._align);var n=this.scene.sys.cache.bitmapFont.get(t);return n&&(this.font=t,this.fontData=n.data,this._fontSize=e,this._align=i,this.fromAtlas=!0===n.fromAtlas,this.setTexture(n.texture,n.frame),a(this,!1,!0,this._bounds)),this},setMaxWidth:function(t,e){return this._maxWidth=t,this._dirty=!0,void 0!==e&&(this.wordWrapCharCode=e),this},align:{set:function(t){this._align=t,this._dirty=!0},get:function(){return this._align}},text:{set:function(t){this.setText(t)},get:function(){return this._text}},fontSize:{set:function(t){this._fontSize=t,this._dirty=!0},get:function(){return this._fontSize}},letterSpacing:{set:function(t){this._letterSpacing=t,this._dirty=!0},get:function(){return this._letterSpacing}},lineSpacing:{set:function(t){this._lineSpacing=t,this._dirty=!0},get:function(){return this._lineSpacing}},maxWidth:{set:function(t){this._maxWidth=t,this._dirty=!0},get:function(){return this._maxWidth}},width:{get:function(){return this.getTextBounds(!1),this._bounds.global.width}},height:{get:function(){return this.getTextBounds(!1),this._bounds.global.height}},displayWidth:{get:function(){return this.width}},displayHeight:{get:function(){return this.height}},toJSON:function(){var t=s.ToJSON(this),e={font:this.font,text:this.text,fontSize:this.fontSize,letterSpacing:this.letterSpacing,lineSpacing:this.lineSpacing,align:this.align};return t.data=e,t},preDestroy:function(){this.charColors.length=0,this._bounds=null,this.fontData=null}});d.ALIGN_LEFT=0,d.ALIGN_CENTER=1,d.ALIGN_RIGHT=2,d.ParseFromAtlas=h,d.ParseXMLBitmapFont=l,t.exports=d},37289:(t,e,i)=>{var n=i(20926);t.exports=function(t,e,i,r){var s=e._text,o=s.length,a=t.currentContext;if(0!==o&&n(t,a,e,i,r)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.fontData.chars,u=e.fontData.lineHeight,c=e._letterSpacing,d=e._lineSpacing,p=0,f=0,m=0,g=null,v=0,y=0,x=0,E=0,T=0,_=0,w=null,S=0,b=h.source.image,C=h.cutX,A=h.cutY,R=e._fontSize/e.fontData.size,M=e._align,L=0,O=0,P=e.getTextBounds(!1);e.maxWidth>0&&(o=(s=P.wrappedText).length);var F=e._bounds.lines;1===M?O=(F.longest-F.lengths[0])/2:2===M&&(O=F.longest-F.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);for(var I=i.roundPixels,D=0;D<o;D++)if(10!==(m=s.charCodeAt(D))){if(g=l[m]){if(v=C+g.x,y=A+g.y,x=g.width,E=g.height,T=g.xOffset+p,_=g.yOffset+f,null!==w){var N=g.kerning[S];T+=void 0!==N?N:0}T*=R,_*=R,T+=O,p+=g.xAdvance+c+(void 0!==N?N:0),w=g,S=m,0!==x&&0!==E&&32!==m&&(I&&(T=Math.round(T),_=Math.round(_)),a.save(),a.translate(T,_),a.scale(R,R),a.drawImage(b,v,y,x,E,0,0,x,E),a.restore())}}else L++,1===M?O=(F.longest-F.lengths[L])/2:2===M&&(O=F.longest-F.lengths[L]),p=0,f+=u+d,w=null;a.restore()}}},57336:(t,e,i)=>{var n=i(22186),r=i(25305),s=i(44603),o=i(23568),a=i(35154);s.register("bitmapText",(function(t,e){void 0===t&&(t={});var i=a(t,"font",""),s=o(t,"text",""),h=o(t,"size",!1),l=a(t,"align",0),u=new n(this.scene,0,0,i,s,h,l);return void 0!==e&&(t.add=e),r(this.scene,u,t),u}))},34914:(t,e,i)=>{var n=i(22186);i(39429).register("bitmapText",(function(t,e,i,r,s,o){return this.displayList.add(new n(this.scene,t,e,i,r,s,o))}))},18658:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(33590),s=i(37289),t.exports={renderWebGL:r,renderCanvas:s}},33590:(t,e,i)=>{var n=i(3217),r=i(91296),s=i(70554);t.exports=function(t,e,i,o){if(0!==e._text.length){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline,e),h=r(e,i,o).calc;t.pipelines.preBatch(e);var l,u,c,d=i.roundPixels,p=i.alpha,f=e.charColors,m=e.tintFill,g=s.getTintAppendFloatAlpha,v=g(e.tintTopLeft,p*e._alphaTL),y=g(e.tintTopRight,p*e._alphaTR),x=g(e.tintBottomLeft,p*e._alphaBL),E=g(e.tintBottomRight,p*e._alphaBR),T=e.frame.glTexture,_=a.setGameObject(e),w=e.getTextBounds(!1).characters,S=e.dropShadowX,b=e.dropShadowY;if(0!==S||0!==b){var C=e.dropShadowColor,A=e.dropShadowAlpha,R=g(C,p*A*e._alphaTL),M=g(C,p*A*e._alphaTR),L=g(C,p*A*e._alphaBL),O=g(C,p*A*e._alphaBR);for(l=0;l<w.length;l++)c=(u=w[l]).glyph,32!==u.code&&0!==c.width&&0!==c.height&&n(a,e,u,c,S,b,h,d,R,M,L,O,1,T,_)}for(l=0;l<w.length;l++)if(c=(u=w[l]).glyph,32!==u.code&&0!==c.width&&0!==c.height)if(a.shouldFlush(6)&&(a.flush(),_=a.setGameObject(e)),f[u.i]){var P=f[u.i],F=P.tintEffect,I=g(P.tintTL,p*e._alphaTL),D=g(P.tintTR,p*e._alphaTR),N=g(P.tintBL,p*e._alphaBL),k=g(P.tintBR,p*e._alphaBR);n(a,e,u,c,0,0,h,d,I,D,N,k,F,T,_)}else n(a,e,u,c,0,0,h,d,v,y,x,E,m,T,_);t.pipelines.postBatch(e)}}},6107:(t,e,i)=>{var n=i(48011),r=i(46590),s=i(83419),o=i(31401),a=i(4327),h=i(95643),l=i(73162),u=new s({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,n],initialize:function(t,e,i,n,r){h.call(this,t,"Blitter"),this.setTexture(n,r),this.setPosition(e,i),this.initPipeline(),this.initPostPipeline(),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,n,s){void 0===n&&(n=!0),void 0===s&&(s=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new r(this,t,e,i,n);return this.children.addAt(o,s,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,n){for(var r=this.createMultiple(e,i,n),s=0;s<r.length;s++){var o=r[s];t.call(this,o,s)}return r},createMultiple:function(t,e,i){void 0===e&&(e=this.frame.name),void 0===i&&(i=!0),Array.isArray(e)||(e=[e]);var n=[],r=this;return e.forEach((function(e){for(var s=0;s<t;s++)n.push(r.create(0,0,e,i))})),n},childCanRender:function(t){return t.visible&&t.alpha>0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},72396:t=>{t.exports=function(t,e,i,n){var r=e.getRenderList();if(0!==r.length){var s=t.currentContext,o=i.alpha*e.alpha;if(0!==o){i.addToRenderList(e),s.globalCompositeOperation=t.blendModes[e.blendMode],s.imageSmoothingEnabled=!e.frame.source.scaleMode;var a=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;s.save(),n&&n.copyToContext(s);for(var l=i.roundPixels,u=0;u<r.length;u++){var c=r[u],d=c.flipX||c.flipY,p=c.frame,f=p.canvasData,m=p.x,g=p.y,v=1,y=1,x=c.alpha*o;0!==x&&(s.globalAlpha=x,d?(c.flipX&&(v=-1,m-=f.width),c.flipY&&(y=-1,g-=f.height),f.width>0&&f.height>0&&(s.save(),s.translate(c.x+a,c.y+h),s.scale(v,y),s.drawImage(p.source.image,f.x,f.y,f.width,f.height,m,g,f.width,f.height),s.restore())):(l&&(m=Math.round(m),g=Math.round(g)),f.width>0&&f.height>0&&s.drawImage(p.source.image,f.x,f.y,f.width,f.height,m+c.x+a,g+c.y+h,f.width,f.height)))}s.restore()}}}},9403:(t,e,i)=>{var n=i(6107),r=i(25305),s=i(44603),o=i(23568);s.register("blitter",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),s=o(t,"frame",null),a=new n(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),r(this.scene,a,t),a}))},12709:(t,e,i)=>{var n=i(6107);i(39429).register("blitter",(function(t,e,i,r){return this.displayList.add(new n(this.scene,t,e,i,r))}))},48011:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(99485),s=i(72396),t.exports={renderWebGL:r,renderCanvas:s}},99485:(t,e,i)=>{var n=i(61340),r=i(70554),s=new n;t.exports=function(t,e,i,n){var o=e.getRenderList(),a=i.alpha*e.alpha;if(0!==o.length&&0!==a){i.addToRenderList(e);var h=t.pipelines.set(this.pipeline,e),l=i.scrollX*e.scrollFactorX,u=i.scrollY*e.scrollFactorY,c=s.copyFrom(i.matrix);n&&(c.multiplyWithOffset(n,-l,-u),l=0,u=0);var d=e.x-l,p=e.y-u,f=-1;t.pipelines.preBatch(e);for(var m=0;m<o.length;m++){var g=o[m],v=g.frame,y=g.alpha*a;if(0!==y){var x=v.width,E=v.height,T=d+g.x+v.x,_=p+g.y+v.y;g.flipX&&(x*=-1,T+=v.width),g.flipY&&(E*=-1,_+=v.height);var w=c.setQuad(T,_,T+x,_+E),S=r.getTintAppendFloatAlpha(g.tint,y);if(v.sourceIndex!==f){var b=h.setGameObject(e,v);f=v.sourceIndex}h.batchQuad(e,w[0],w[1],w[2],w[3],w[4],w[5],w[6],w[7],v.u0,v.v0,v.u1,v.v1,S,S,S,S,false,v.glTexture,b)&&(f=-1)}}t.pipelines.postBatch(e)}}},46590:(t,e,i)=>{var n=i(83419),r=i(4327),s=new n({initialize:function(t,e,i,n,r){this.parent=t,this.x=e,this.y=i,this.frame=n,this.data={},this.tint=16777215,this._visible=r,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof r&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}});t.exports=s},16005:(t,e,i)=>{var n=i(45319),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},88509:(t,e,i)=>{var n=i(45319),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},90065:(t,e,i)=>{var n=i(10312),r={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},94215:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},61683:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},89272:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},47059:(t,e,i)=>{var n=i(83419),r=i(66064),s=i(19133),o=new n({initialize:function(t,e){this.gameObject=t,this.isPost=e,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(t){return void 0===t&&(t=0),this.padding=t,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(t){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,void 0!==t&&(this.padding=t),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var t=this.list,e=0;e<t.length;e++)t[e].destroy();this.list=[]}return this.enabled=!1,this.gameObject},remove:function(t){var e;if(this.isPost){var i=this.gameObject.getPostPipeline(String(t.type));for(Array.isArray(i)||(i=[i]),e=0;e<i.length;e++){var n=i[e];if(n.controller===t){this.gameObject.removePostPipeline(n),t.destroy();break}}}else{var r=this.list;for(e=0;e<r.length;e++)r[e]===t&&(s(r,e),t.destroy())}return this.gameObject},disable:function(t){return void 0===t&&(t=!1),this.isPost||this.gameObject.resetPipeline(),this.enabled=!1,t&&this.clear(),this.gameObject},add:function(t,e){if(!this.isPost)return this.enabled||this.enable(),this.list.push(t),t;var i=String(t.type);this.gameObject.setPostPipeline(i,e);var n=this.gameObject.getPostPipeline(i);return n?(Array.isArray(n)&&(n=n.pop()),n.controller=t,t):void 0},addGlow:function(t,e,i,n,s,o){return this.add(new r.Glow(this.gameObject,t,e,i,n),{quality:s,distance:o})},addShadow:function(t,e,i,n,s,o,a){return this.add(new r.Shadow(this.gameObject,t,e,i,n,s,o,a))},addPixelate:function(t){return this.add(new r.Pixelate(this.gameObject,t))},addVignette:function(t,e,i,n){return this.add(new r.Vignette(this.gameObject,t,e,i,n))},addShine:function(t,e,i,n){return this.add(new r.Shine(this.gameObject,t,e,i,n))},addBlur:function(t,e,i,n,s,o){return this.add(new r.Blur(this.gameObject,t,e,i,n,s,o))},addGradient:function(t,e,i,n,s,o,a,h){return this.add(new r.Gradient(this.gameObject,t,e,i,n,s,o,a,h))},addBloom:function(t,e,i,n,s,o){return this.add(new r.Bloom(this.gameObject,t,e,i,n,s,o))},addColorMatrix:function(){return this.add(new r.ColorMatrix(this.gameObject))},addCircle:function(t,e,i,n,s){return this.add(new r.Circle(this.gameObject,t,e,i,n,s))},addBarrel:function(t){return this.add(new r.Barrel(this.gameObject,t))},addDisplacement:function(t,e,i){return this.add(new r.Displacement(this.gameObject,t,e,i))},addWipe:function(t,e,i){return this.add(new r.Wipe(this.gameObject,t,e,i))},addReveal:function(t,e,i){return this.add(new r.Wipe(this.gameObject,t,e,i,!0))},addBokeh:function(t,e,i){return this.add(new r.Bokeh(this.gameObject,t,e,i))},addTiltShift:function(t,e,i,n,s,o){return this.add(new r.Bokeh(this.gameObject,t,e,i,!0,n,s,o))},destroy:function(){this.clear(),this.gameObject=null}});t.exports=o},54434:t=>{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},8004:(t,e,i)=>{var n=i(87841),r=i(11520),s=i(26099),o={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t,e){return void 0===t&&(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getTopLeft:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new s),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,s,o,a,h,l;if(void 0===t&&(t=new n),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),r=t.x,s=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,s=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,o,h),t.y=Math.min(i,s,a,l),t.width=Math.max(e,r,o,h)-t.x,t.height=Math.max(i,s,a,l)-t.y,t}};t.exports=o},8573:(t,e,i)=>{var n=i(6858),r=i(80661),s={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,r,s){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new n(this.scene,t,e,i,r,s)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new r(this.scene,t)}};t.exports=s},27387:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},37640:(t,e,i)=>{var n=i(39506),r=i(57355),s=i(35154),o=i(86353),a=i(26099),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:o.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=s(t,"from",0),t.to=s(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=s(t,"rotationOffset",0);var l=s(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new a(this.x,this.y)),this.pathVector||(this.pathVector=new a),this.pathDelta||(this.pathDelta=new a),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=o.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+n(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t&&t.data){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===o.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==o.PLAYING_FORWARD&&e.state!==o.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var s=this.x,a=this.y;this.setPosition(r.x,r.y);var h=this.x-s,l=this.y-a;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+n(this.pathRotationOffset))}}};t.exports=h},72699:(t,e,i)=>{var n=i(62644),r={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(t){this.pipelineData={};var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(i){void 0===t&&(t=i.default);var n=i.get(t);if(n)return this.defaultPipeline=n,this.pipeline=n,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){var o=s.get(t);o&&(this.pipeline=o),e&&(this.pipelineData=i?n(e):e)}return this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},resetPipeline:function(t){return void 0===t&&(t=!1),this.pipeline=this.defaultPipeline,t&&(this.pipelineData={}),null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=r},17581:(t,e,i)=>{var n=i(62644),r=i(47059),s=i(19133),o={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(t){this.postPipelines=[],this.postPipelineData={},this.postFX=new r(this,!0),t&&(this.preFX=new r(this,!1))},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var s=r.pipelines;if(s){Array.isArray(t)||(t=[t]);for(var o=0;o<t.length;o++){var a=s.getPostPipeline(t[o],this,e);a&&this.postPipelines.push(a)}e&&(this.postPipelineData=i?n(e):e)}return this.hasPostPipeline=this.postPipelines.length>0,this},setPostPipelineData:function(t,e){var i=this.postPipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,n=[],r=0;r<i.length;r++){var s=i[r];(e&&s.name===t||!e&&s instanceof t)&&n.push(s)}return 1===n.length?n[0]:n},resetPostPipeline:function(t){void 0===t&&(t=!1);for(var e=this.postPipelines,i=0;i<e.length;i++)e[i].destroy();this.postPipelines=[],this.hasPostPipeline=!1,t&&(this.postPipelineData={})},removePostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,n=i.length-1;n>=0;n--){var r=i[n];(e&&r.name===t||!e&&r===t)&&(r.destroy(),s(i,n))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};t.exports=o},80227:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},16736:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},37726:(t,e,i)=>{var n=i(4327),r={texture:null,frame:null,isCropped:!1,setTexture:function(t,e,i,n){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e,i,n)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof n?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=r},79812:(t,e,i)=>{var n=i(4327),r={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof n?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=r},27472:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,n=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},53774:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},16901:(t,e,i)=>{var n=i(36383),r=i(61340),s=i(85955),o=i(86554),a=i(30954),h=i(26099),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return a(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=o(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(e||(e=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,n){i||(i=new h),n||(n=this.scene.sys.cameras.main);var r=n.scrollX,o=n.scrollY,a=t+r*this.scrollFactorX-r,l=e+o*this.scrollFactorY-o;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,l,i):s(a,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},61340:(t,e,i)=>{var n=i(83419),r=i(36383),s=i(26099),o=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),this.matrix=new Float32Array([t,e,i,n,r,s,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||s?r.TAU-(s>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3];return n[0]=r*i+o*e,n[1]=s*i+a*e,n[2]=r*-e+o*i,n[3]=s*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],p=n[3],f=n[4],m=n[5],g=void 0===e?i:e.matrix;return g[0]=u*r+c*o,g[1]=u*s+c*a,g[2]=d*r+p*o,g[3]=d*s+p*a,g[4]=f*r+m*o+h,g[5]=f*s+m*a+l,g},multiplyWithOffset:function(t,e,i){var n=this.matrix,r=t.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=e*s+i*a+n[4],u=e*o+i*h+n[5],c=r[0],d=r[1],p=r[2],f=r[3],m=r[4],g=r[5];return n[0]=c*s+d*a,n[1]=c*o+d*h,n[2]=p*s+f*a,n[3]=p*o+f*h,n[4]=m*s+g*a+l,n[5]=m*o+g*h+u,this},transform:function(t,e,i,n,r,s){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=r*a+s*l+c,o[5]=r*h+s*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*r+e*o+h,i.y=t*s+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=e*r-i*n;return t[0]=r/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-r*s)/a,t[5]=-(e*o-i*s)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){return t.setTransform(this),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,r,s){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=r,o[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],r=e[2],s=e[3],o=i*s-n*r;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(r||s){var h=Math.sqrt(r*r+s*s);t.rotation=.5*Math.PI-(s>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,r){var s=this.matrix,o=Math.sin(i),a=Math.cos(i);return s[4]=t,s[5]=e,s[0]=a*n,s[1]=o*n,s[2]=-o*r,s[3]=a*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new s);var n=this.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(r*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=r*c*e+-o*c*t+(-u*r+l*o)*c,i},setQuad:function(t,e,i,n,r,s){void 0===r&&(r=!1),void 0===s&&(s=this.quad);var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return r?(s[0]=Math.round(t*a+e*l+c),s[1]=Math.round(t*h+e*u+d),s[2]=Math.round(t*a+n*l+c),s[3]=Math.round(t*h+n*u+d),s[4]=Math.round(i*a+n*l+c),s[5]=Math.round(i*h+n*u+d),s[6]=Math.round(i*a+e*l+c),s[7]=Math.round(i*h+e*u+d)):(s[0]=t*a+e*l+c,s[1]=t*h+e*u+d,s[2]=t*a+n*l+c,s[3]=t*h+n*u+d,s[4]=i*a+n*l+c,s[5]=i*h+n*u+d,s[6]=i*a+e*l+c,s[7]=i*h+e*u+d),s},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.round(n)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.round(n)),n},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=o},59715:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},31401:(t,e,i)=>{t.exports={Alpha:i(16005),AlphaSingle:i(88509),BlendMode:i(90065),ComputedSize:i(94215),Crop:i(61683),Depth:i(89272),Flip:i(54434),FX:i(47059),GetBounds:i(8004),Mask:i(8573),Origin:i(27387),PathFollower:i(37640),Pipeline:i(72699),PostPipeline:i(17581),ScrollFactor:i(80227),Size:i(16736),Texture:i(37726),TextureCrop:i(79812),Tint:i(27472),ToJSON:i(53774),Transform:i(16901),TransformMatrix:i(61340),Visible:i(59715)}},31559:(t,e,i)=>{var n=i(37105),r=i(10312),s=i(83419),o=i(31401),a=i(51708),h=i(95643),l=i(87841),u=i(29959),c=i(36899),d=i(26099),p=new s({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.PostPipeline,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(e,i),this.setBlendMode(r.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,r=!1;t.setEmpty();for(var s=0;s<i.length;s++){var o=i[s];o.getBounds&&(o.getBounds(n),r?c(n,t,t):(t.setTo(n.x,n.y,n.width,n.height),r=!0))}}return t},addHandler:function(t){t.once(a.DESTROY,this.onChildDestroyed,this),this.exclusive&&(t.parentContainer&&t.parentContainer.remove(t),t.parentContainer=this,t.removeFromDisplayList(),t.addedToScene())},removeHandler:function(t){t.off(a.DESTROY,this.remove,this),this.exclusive&&(t.parentContainer=null,t.removedFromScene(),t.addToDisplayList())},pointToContainer:function(t,e){void 0===e&&(e=new d),this.parentContainer?this.parentContainer.pointToContainer(t,e):(e.x=t.x,e.y=t.y);var i=this.tempTransformMatrix;return i.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),i.invert(),i.transformPoint(t.x,t.y,e),e},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(t){return n.Add(this.list,t,this.maxSize,this.addHandler,this),this},addAt:function(t,e){return n.AddAt(this.list,t,e,this.maxSize,this.addHandler,this),this},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),n.StableSort(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,r){return n.GetFirst(this.list,t,e,i,r)},getAll:function(t,e,i,r){return n.GetAll(this.list,t,e,i,r)},count:function(t,e,i,r){return n.CountAllMatching(this.list,t,e,i,r)},swap:function(t,e){return n.Swap(this.list,t,e),this},moveTo:function(t,e){return n.MoveTo(this.list,t,e),this},moveAbove:function(t,e){return n.MoveAbove(this.list,t,e),this},moveBelow:function(t,e){return n.MoveBelow(this.list,t,e),this},remove:function(t,e){var i=n.Remove(this.list,t,this.removeHandler,this);if(e&&i){Array.isArray(i)||(i=[i]);for(var r=0;r<i.length;r++)i[r].destroy()}return this},removeAt:function(t,e){var i=n.RemoveAt(this.list,t,this.removeHandler,this);return e&&i&&i.destroy(),this},removeBetween:function(t,e,i){var r=n.RemoveBetween(this.list,t,e,this.removeHandler,this);if(i)for(var s=0;s<r.length;s++)r[s].destroy();return this},removeAll:function(t){var e=this.list;if(t){for(var i=0;i<e.length;i++)e[i]&&e[i].scene&&(e[i].off(a.DESTROY,this.onChildDestroyed,this),e[i].destroy());this.list=[]}else n.RemoveBetween(e,0,e.length,this.removeHandler,this);return this},bringToTop:function(t){return n.BringToTop(this.list,t),this},sendToBack:function(t){return n.SendToBack(this.list,t),this},moveUp:function(t){return n.MoveUp(this.list,t),this},moveDown:function(t){return n.MoveDown(this.list,t),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e,i){return n.Replace(this.list,t,e)&&(this.addHandler(e),this.removeHandler(t),i&&t.destroy()),this},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,r){return n.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,n=[null],r=this.list.slice(),s=r.length;for(i=2;i<arguments.length;i++)n.push(arguments[i]);for(i=0;i<s;i++)n[0]=r[i],t.apply(e,n);return this},iterate:function(t,e){var i,n=[null];for(i=2;i<arguments.length;i++)n.push(arguments[i]);for(i=0;i<this.list.length;i++)n[0]=this.list[i],t.apply(e,n);return this},setScrollFactor:function(t,e,i){return void 0===e&&(e=t),void 0===i&&(i=!1),this.scrollFactorX=t,this.scrollFactorY=e,i&&(n.SetAll(this.list,"scrollFactorX",t),n.SetAll(this.list,"scrollFactorY",e)),this},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]},onChildDestroyed:function(t){n.Remove(this.list,t),this.exclusive&&(t.parentContainer=null,t.removedFromScene())}});t.exports=p},53584:t=>{t.exports=function(t,e,i,n){i.addToRenderList(e);var r=e.list;if(0!==r.length){var s=e.localTransform;n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var a=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u<r.length;u++){var c=r[u];if(c.willRender(i)){var d=c.alpha,p=c.scrollFactorX,f=c.scrollFactorY;o||c.blendMode===t.currentBlendMode||t.setBlendMode(c.blendMode),c.setScrollFactor(p*h,f*l),c.setAlpha(d*a),c.renderCanvas(t,c,i,s),c.setAlpha(d),c.setScrollFactor(p,f)}}e.mask&&e.mask.postRenderCanvas(t)}}},77143:(t,e,i)=>{var n=i(25305),r=i(31559),s=i(44603),o=i(23568),a=i(95540);s.register("container",(function(t,e){void 0===t&&(t={});var i=o(t,"x",0),s=o(t,"y",0),h=a(t,"children",null),l=new r(this.scene,i,s,h);return void 0!==e&&(t.add=e),n(this.scene,l,t),l}))},24961:(t,e,i)=>{var n=i(31559);i(39429).register("container",(function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))}))},29959:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(72249),s=i(53584),t.exports={renderWebGL:r,renderCanvas:s}},72249:t=>{t.exports=function(t,e,i,n){i.addToRenderList(e);var r=e.list,s=r.length;if(0!==s){var o=e.localTransform;n?(o.loadIdentity(),o.multiply(n),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c<s;c++){var d=r[c];if(d.willRender(i)){var p,f,m,g;if(void 0!==d.alphaTopLeft)p=d.alphaTopLeft,f=d.alphaTopRight,m=d.alphaBottomLeft,g=d.alphaBottomRight;else{var v=d.alpha;p=v,f=v,m=v,g=v}var y=d.scrollFactorX,x=d.scrollFactorY;a||d.blendMode===t.currentBlendMode||t.setBlendMode(d.blendMode);var E=d.mask;E&&E.preRenderWebGL(t,d,i);var T=d.type;T!==t.currentType&&(t.newType=!0,t.currentType=T),t.nextTypeMatch=c<s-1&&r[c+1].type===t.currentType,d.setScrollFactor(y*l,x*u),d.setAlpha(p*h,f*h,m*h,g*h),d.renderWebGL(t,d,i,o,e),d.setAlpha(p,f,m,g),d.setScrollFactor(y,x),E&&E.postRenderWebGL(t,i),t.newType=!1}}t.pipelines.postBatch(e)}}},47407:t=>{t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(t,e,i)=>{var n=i(83419),r=i(31401),s=i(441),o=i(95643),a=i(41212),h=i(35846),l=i(44594),u=i(61369),c=new n({Extends:o,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Origin,r.ScrollFactor,r.Transform,r.Visible,s],initialize:function(t,e,i,n,r,s){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),r,s):this.createElement(n,r,s):n&&this.setElement(n,r,s),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this),t.sys.events.on(l.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e<t.length;e++)this.node.addEventListener(t[e],this.handler,!1)}return this},removeListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e<t.length;e++)this.node.removeEventListener(t[e],this.handler)}return this},dispatchNativeEvent:function(t){this.emit(t.type,t)},createElement:function(t,e,i){return this.setElement(document.createElement(t),e,i)},setElement:function(t,e,i){var n;if(this.removeElement(),"string"==typeof t?("#"===t[0]&&(t=t.substr(1)),n=document.getElementById(t)):"object"==typeof t&&1===t.nodeType&&(n=t),!n)return this;if(this.node=n,e&&a(e))for(var r in e)n.style[r]=e[r];else"string"==typeof e&&(n.style=e);return n.style.zIndex="0",n.style.display="inline",n.style.position="absolute",n.phaser=this,this.parent&&this.parent.appendChild(n),i&&(n.innerText=i),this.updateSize()},createFromCache:function(t,e){var i=this.cache.get(t);return i&&this.createFromHTML(i,e),this},createFromHTML:function(t,e){void 0===e&&(e="div"),this.removeElement();var i=document.createElement(e);return this.node=i,i.style.zIndex="0",i.style.display="inline",i.style.position="absolute",i.phaser=this,this.parent&&this.parent.appendChild(i),i.innerHTML=t,this.updateSize()},removeElement:function(){return this.node&&(h(this.node),this.node=null),this},updateSize:function(){var t=this.node,e=t.getBoundingClientRect();return this.width=t.clientWidth,this.height=t.clientHeight,this.displayWidth=e.width||0,this.displayHeight=e.height||0,this},getChildByProperty:function(t,e){if(this.node)for(var i=this.node.querySelectorAll("*"),n=0;n<i.length;n++)if(i[n][t]===e)return i[n];return null},getChildByID:function(t){return this.getChildByProperty("id",t)},getChildByName:function(t){return this.getChildByProperty("name",t)},setClassName:function(t){return this.node&&(this.node.className=t,this.updateSize()),this},setText:function(t){return this.node&&(this.node.innerText=t,this.updateSize()),this},setHTML:function(t){return this.node&&(this.node.innerHTML=t,this.updateSize()),this},preRender:function(){var t=this.parentContainer,e=this.node;e&&t&&!t.willRender()&&(e.style.display="none")},willRender:function(){return!0},preDestroy:function(){this.removeElement(),this.scene.sys.events.off(l.SLEEP,this.handleSceneEvent,this),this.scene.sys.events.off(l.WAKE,this.handleSceneEvent,this),this.scene.sys.events.off(l.PRE_RENDER,this.preRender,this)}});t.exports=c},49381:(t,e,i)=>{var n=i(47407),r=i(95643),s=i(61340),o=new s,a=new s,h=new s;t.exports=function(t,e,i,s){if(e.node){var l=e.node.style,u=e.scene.sys.settings;if(!l||!u.visible||r.RENDER_MASK!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender())l.display="none";else{var c=e.parentContainer,d=i.alpha*e.alpha;c&&(d*=c.alpha);var p=o,f=a,m=h,g=0,v=0,y="0%",x="0%";s?(g=e.width*e.scaleX*e.originX,v=e.height*e.scaleY*e.originY,f.applyITRS(e.x-g,e.y-v,e.rotation,e.scaleX,e.scaleY),p.copyFrom(i.matrix),p.multiplyWithOffset(s,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),f.e=e.x-g,f.f=e.y-v,p.multiply(f,m)):(g=e.width*e.originX,v=e.height*e.originY,f.applyITRS(e.x-g,e.y-v,e.rotation,e.scaleX,e.scaleY),p.copyFrom(i.matrix),y=100*e.originX+"%",x=100*e.originY+"%",f.e-=i.scrollX*e.scrollFactorX,f.f-=i.scrollY*e.scrollFactorY,p.multiply(f,m)),e.transformOnly||(l.display="block",l.opacity=d,l.zIndex=e._depth,l.pointerEvents=e.pointerEvents,l.mixBlendMode=n[e._blendMode]),l.transform=m.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",l.transformOrigin=y+" "+x}}}},2611:(t,e,i)=>{var n=i(3069);i(39429).register("dom",(function(t,e,i,r,s){var o=new n(this.scene,t,e,i,r,s);return this.displayList.add(o),o}))},441:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(49381),s=i(49381),t.exports={renderWebGL:r,renderCanvas:s}},62980:t=>{t.exports="addedtoscene"},41337:t=>{t.exports="destroy"},44947:t=>{t.exports="removedfromscene"},49358:t=>{t.exports="complete"},35163:t=>{t.exports="created"},97249:t=>{t.exports="error"},19483:t=>{t.exports="locked"},56059:t=>{t.exports="loop"},26772:t=>{t.exports="metadata"},64437:t=>{t.exports="playing"},83411:t=>{t.exports="play"},75780:t=>{t.exports="seeked"},67799:t=>{t.exports="seeking"},63500:t=>{t.exports="stalled"},55541:t=>{t.exports="stop"},53208:t=>{t.exports="textureready"},4992:t=>{t.exports="unlocked"},12:t=>{t.exports="unsupported"},51708:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(62980),DESTROY:i(41337),REMOVED_FROM_SCENE:i(44947),VIDEO_COMPLETE:i(49358),VIDEO_CREATED:i(35163),VIDEO_ERROR:i(97249),VIDEO_LOCKED:i(19483),VIDEO_LOOP:i(56059),VIDEO_METADATA:i(26772),VIDEO_PLAY:i(83411),VIDEO_PLAYING:i(64437),VIDEO_SEEKED:i(75780),VIDEO_SEEKING:i(67799),VIDEO_STALLED:i(63500),VIDEO_STOP:i(55541),VIDEO_TEXTURE:i(53208),VIDEO_UNLOCKED:i(4992),VIDEO_UNSUPPORTED:i(12)}},42421:(t,e,i)=>{var n=i(83419),r=i(31401),s=i(95643),o=i(64993),a=new n({Extends:s,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.Origin,r.ScrollFactor,r.Size,r.Texture,r.Tint,r.Transform,r.Visible,o],initialize:function(t){s.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});t.exports=a},70217:()=>{},56315:(t,e,i)=>{var n=i(42421);i(39429).register("extern",(function(){var t=new n(this.scene);return this.displayList.add(t),t}))},64993:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(80287),s=i(70217),t.exports={renderWebGL:r,renderCanvas:s}},80287:(t,e,i)=>{var n=i(91296);t.exports=function(t,e,i,r){t.pipelines.clear();var s=n(e,i,r).calc;e.render.call(e,t,i,s),t.pipelines.rebind()}},85592:t=>{t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},43831:(t,e,i)=>{var n=i(71911),r=i(83419),s=i(85592),o=i(31401),a=i(8497),h=i(95643),l=i(95540),u=i(35154),c=i(36383),d=i(84503),p=new r({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.PostPipeline,o.Transform,o.Visible,o.ScrollFactor,d],initialize:function(t,e){var i=u(e,"x",0),n=u(e,"y",0);h.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(e)},setDefaultStyles:function(t){return u(t,"lineStyle",null)&&(this.defaultStrokeWidth=u(t,"lineStyle.width",1),this.defaultStrokeColor=u(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=u(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),u(t,"fillStyle",null)&&(this.defaultFillColor=u(t,"fillStyle.color",16777215),this.defaultFillAlpha=u(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(s.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(s.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,r,o,a,h){return void 0===r&&(r=1),void 0===o&&(o=r),void 0===a&&(a=r),void 0===h&&(h=r),this.commandBuffer.push(s.GRADIENT_FILL_STYLE,r,o,a,h,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,r,o){return void 0===o&&(o=1),this.commandBuffer.push(s.GRADIENT_LINE_STYLE,t,o,e,i,n,r),this},beginPath:function(){return this.commandBuffer.push(s.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(s.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(s.FILL_PATH),this},fill:function(){return this.commandBuffer.push(s.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(s.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(s.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,c.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,c.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(s.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var r=this._lineWidth/2,s=t-r,o=t+r;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(s,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(s,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,r){void 0===r&&(r=20);var s=r,o=r,a=r,h=r;"number"!=typeof r&&(s=l(r,"tl",20),o=l(r,"tr",20),a=l(r,"bl",20),h=l(r,"br",20));var u=s>=0,d=o>=0,p=a>=0,f=h>=0;return s=Math.abs(s),o=Math.abs(o),a=Math.abs(a),h=Math.abs(h),this.beginPath(),this.moveTo(t+s,e),this.lineTo(t+i-o,e),d?this.arc(t+i-o,e+o,o,-c.TAU,0):this.arc(t+i,e,o,Math.PI,c.TAU,!0),this.lineTo(t+i,e+n-h),f?this.arc(t+i-h,e+n-h,h,0,c.TAU):this.arc(t+i,e+n,h,-c.TAU,Math.PI,!0),this.lineTo(t+a,e+n),p?this.arc(t+a,e+n-a,a,c.TAU,Math.PI):this.arc(t,e+n,a,0,-c.TAU,!0),this.lineTo(t,e+s),u?this.arc(t+s,e+s,s,-Math.PI,-c.TAU):this.arc(t,e,s,c.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,r){void 0===r&&(r=20);var s=r,o=r,a=r,h=r,u=Math.min(i,n)/2;"number"!=typeof r&&(s=l(r,"tl",20),o=l(r,"tr",20),a=l(r,"bl",20),h=l(r,"br",20));var d=s>=0,p=o>=0,f=a>=0,m=h>=0;return s=Math.min(Math.abs(s),u),o=Math.min(Math.abs(o),u),a=Math.min(Math.abs(a),u),h=Math.min(Math.abs(h),u),this.beginPath(),this.moveTo(t+s,e),this.lineTo(t+i-o,e),this.moveTo(t+i-o,e),p?this.arc(t+i-o,e+o,o,-c.TAU,0):this.arc(t+i,e,o,Math.PI,c.TAU,!0),this.lineTo(t+i,e+n-h),this.moveTo(t+i,e+n-h),m?this.arc(t+i-h,e+n-h,h,0,c.TAU):this.arc(t+i,e+n,h,-c.TAU,Math.PI,!0),this.lineTo(t+a,e+n),this.moveTo(t+a,e+n),f?this.arc(t+a,e+n-a,a,c.TAU,Math.PI):this.arc(t,e+n,a,0,-c.TAU,!0),this.lineTo(t,e+s),this.moveTo(t,e+s),d?this.arc(t+s,e+s,s,-Math.PI,-c.TAU):this.arc(t,e,s,c.TAU,0,!0),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(s.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,r,o){return this.commandBuffer.push(s.FILL_TRIANGLE,t,e,i,n,r,o),this},strokeTriangle:function(t,e,i,n,r,o){return this.commandBuffer.push(s.STROKE_TRIANGLE,t,e,i,n,r,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(s.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(s.MOVE_TO,t,e),this},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var r=1;r<n;r++)this.lineTo(t[r].x,t[r].y);return e&&this.lineTo(t[0].x,t[0].y),i&&this.closePath(),this.strokePath(),this},fillPoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var r=1;r<n;r++)this.lineTo(t[r].x,t[r].y);return e&&this.lineTo(t[0].x,t[0].y),i&&this.closePath(),this.fillPath(),this},strokeEllipseShape:function(t,e){void 0===e&&(e=32);var i=t.getPoints(e);return this.strokePoints(i,!0)},strokeEllipse:function(t,e,i,n,r){void 0===r&&(r=32);var s=new a(t,e,i,n).getPoints(r);return this.strokePoints(s,!0)},fillEllipseShape:function(t,e){void 0===e&&(e=32);var i=t.getPoints(e);return this.fillPoints(i,!0)},fillEllipse:function(t,e,i,n,r){void 0===r&&(r=32);var s=new a(t,e,i,n).getPoints(r);return this.fillPoints(s,!0)},arc:function(t,e,i,n,r,o,a){return void 0===o&&(o=!1),void 0===a&&(a=0),this.commandBuffer.push(s.ARC,t,e,i,n,r,o,a),this},slice:function(t,e,i,n,r,o,a){return void 0===o&&(o=!1),void 0===a&&(a=0),this.commandBuffer.push(s.BEGIN_PATH),this.commandBuffer.push(s.MOVE_TO,t,e),this.commandBuffer.push(s.ARC,t,e,i,n,r,o,a),this.commandBuffer.push(s.CLOSE_PATH),this},save:function(){return this.commandBuffer.push(s.SAVE),this},restore:function(){return this.commandBuffer.push(s.RESTORE),this},translateCanvas:function(t,e){return this.commandBuffer.push(s.TRANSLATE,t,e),this},scaleCanvas:function(t,e){return this.commandBuffer.push(s.SCALE,t,e),this},rotateCanvas:function(t){return this.commandBuffer.push(s.ROTATE,t),this},clear:function(){return this.commandBuffer.length=0,this.defaultFillColor>-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,r,s=this.scene.sys,o=s.game.renderer;void 0===e&&(e=s.scale.width),void 0===i&&(i=s.scale.height),p.TargetCamera.setScene(this.scene),p.TargetCamera.setViewport(0,0,e,i),p.TargetCamera.scrollX=this.x,p.TargetCamera.scrollY=this.y;var a={willReadFrequently:!0};if("string"==typeof t)if(s.textures.exists(t)){var h=(n=s.textures.get(t)).getSourceImage();h instanceof HTMLCanvasElement&&(r=h.getContext("2d",a))}else r=(n=s.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d",a);else t instanceof HTMLCanvasElement&&(r=t.getContext("2d",a));return r&&(this.renderCanvas(o,this,p.TargetCamera,null,r,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});p.TargetCamera=new n,t.exports=p},32768:(t,e,i)=>{var n=i(85592),r=i(20926);t.exports=function(t,e,i,s,o,a){var h=e.commandBuffer,l=h.length,u=o||t.currentContext;if(0!==l&&r(t,u,e,i,s)){i.addToRenderList(e);var c=1,d=1,p=0,f=0,m=1,g=0,v=0,y=0;u.beginPath();for(var x=0;x<l;++x){switch(h[x]){case n.ARC:u.arc(h[x+1],h[x+2],h[x+3],h[x+4],h[x+5],h[x+6]),x+=7;break;case n.LINE_STYLE:m=h[x+1],p=h[x+2],c=h[x+3],g=(16711680&p)>>>16,v=(65280&p)>>>8,y=255&p,u.strokeStyle="rgba("+g+","+v+","+y+","+c+")",u.lineWidth=m,x+=3;break;case n.FILL_STYLE:f=h[x+1],d=h[x+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,y=255&f,u.fillStyle="rgba("+g+","+v+","+y+","+d+")",x+=2;break;case n.BEGIN_PATH:u.beginPath();break;case n.CLOSE_PATH:u.closePath();break;case n.FILL_PATH:a||u.fill();break;case n.STROKE_PATH:a||u.stroke();break;case n.FILL_RECT:a?u.rect(h[x+1],h[x+2],h[x+3],h[x+4]):u.fillRect(h[x+1],h[x+2],h[x+3],h[x+4]),x+=4;break;case n.FILL_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.fill(),x+=6;break;case n.STROKE_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.stroke(),x+=6;break;case n.LINE_TO:u.lineTo(h[x+1],h[x+2]),x+=2;break;case n.MOVE_TO:u.moveTo(h[x+1],h[x+2]),x+=2;break;case n.LINE_FX_TO:u.lineTo(h[x+1],h[x+2]),x+=5;break;case n.MOVE_FX_TO:u.moveTo(h[x+1],h[x+2]),x+=5;break;case n.SAVE:u.save();break;case n.RESTORE:u.restore();break;case n.TRANSLATE:u.translate(h[x+1],h[x+2]),x+=2;break;case n.SCALE:u.scale(h[x+1],h[x+2]),x+=2;break;case n.ROTATE:u.rotate(h[x+1]),x+=1;break;case n.GRADIENT_FILL_STYLE:x+=5;break;case n.GRADIENT_LINE_STYLE:x+=6}}u.restore()}}},87079:(t,e,i)=>{var n=i(44603),r=i(43831);n.register("graphics",(function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new r(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i}))},1201:(t,e,i)=>{var n=i(43831);i(39429).register("graphics",(function(t){return this.displayList.add(new n(this.scene,t))}))},84503:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(77545),s=i(32768),s=i(32768),t.exports={renderWebGL:r,renderCanvas:s}},77545:(t,e,i)=>{var n=i(85592),r=i(91296),s=i(61340),o=i(70554),a=function(t,e,i){this.x=t,this.y=e,this.width=i},h=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new a(t,e,i)},l=[],u=new s;t.exports=function(t,e,i,s){if(0!==e.commandBuffer.length){i.addToRenderList(e);var c=t.pipelines.set(e.pipeline,e);t.pipelines.preBatch(e);for(var d=r(e,i,s).calc,p=u.loadIdentity(),f=e.commandBuffer,m=i.alpha*e.alpha,g=1,v=c.fillTint,y=c.strokeTint,x=0,E=0,T=0,_=2*Math.PI,w=[],S=0,b=!0,C=null,A=o.getTintAppendFloatAlpha,R=0;R<f.length;R++)switch(f[R]){case n.BEGIN_PATH:w.length=0,C=null,b=!0;break;case n.CLOSE_PATH:b=!1,C&&C.points.length&&C.points.push(C.points[0]);break;case n.FILL_PATH:for(S=0;S<w.length;S++)c.batchFillPath(w[S].points,p,d);break;case n.STROKE_PATH:for(S=0;S<w.length;S++)c.batchStrokePath(w[S].points,g,b,p,d);break;case n.LINE_STYLE:g=f[++R];var M=A(f[++R],f[++R]*m);y.TL=M,y.TR=M,y.BL=M,y.BR=M;break;case n.FILL_STYLE:var L=A(f[++R],f[++R]*m);v.TL=L,v.TR=L,v.BL=L,v.BR=L;break;case n.GRADIENT_FILL_STYLE:var O=f[++R]*m,P=f[++R]*m,F=f[++R]*m,I=f[++R]*m;v.TL=A(f[++R],O),v.TR=A(f[++R],P),v.BL=A(f[++R],F),v.BR=A(f[++R],I);break;case n.GRADIENT_LINE_STYLE:g=f[++R];var D=f[++R]*m;y.TL=A(f[++R],D),y.TR=A(f[++R],D),y.BL=A(f[++R],D),y.BR=A(f[++R],D);break;case n.ARC:var N=0,k=f[++R],B=f[++R],U=f[++R],G=f[++R],W=f[++R],X=f[++R],V=f[++R];for(W-=G,X?W<-_?W=-_:W>0&&(W=W%_-_):W>_?W=_:W<0&&(W=_+W%_),null===C&&(C=new h(k+Math.cos(G)*U,B+Math.sin(G)*U,g),w.push(C),N+=.01);N<1+V;)T=W*N+G,x=k+Math.cos(T)*U,E=B+Math.sin(T)*U,C.points.push(new a(x,E,g)),N+=.01;T=W+G,x=k+Math.cos(T)*U,E=B+Math.sin(T)*U,C.points.push(new a(x,E,g));break;case n.FILL_RECT:c.batchFillRect(f[++R],f[++R],f[++R],f[++R],p,d);break;case n.FILL_TRIANGLE:c.batchFillTriangle(f[++R],f[++R],f[++R],f[++R],f[++R],f[++R],p,d);break;case n.STROKE_TRIANGLE:c.batchStrokeTriangle(f[++R],f[++R],f[++R],f[++R],f[++R],f[++R],g,p,d);break;case n.LINE_TO:null!==C?C.points.push(new a(f[++R],f[++R],g)):(C=new h(f[++R],f[++R],g),w.push(C));break;case n.MOVE_TO:C=new h(f[++R],f[++R],g),w.push(C);break;case n.SAVE:l.push(p.copyToArray());break;case n.RESTORE:p.copyFromArray(l.pop());break;case n.TRANSLATE:k=f[++R],B=f[++R],p.translate(k,B);break;case n.SCALE:k=f[++R],B=f[++R],p.scale(k,B);break;case n.ROTATE:p.rotate(f[++R])}t.pipelines.postBatch(e)}}},26479:(t,e,i)=>{var n=i(61061),r=i(83419),s=i(51708),o=i(50792),a=i(46710),h=i(95540),l=i(35154),u=i(97022),c=i(41212),d=i(88492),p=i(35072),f=i(68287),m=new r({Extends:o,initialize:function(t,e,i){o.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?c(e[0])&&(i=e,e=null):c(e)&&(i=e,e=null),this.scene=t,this.children=new p,this.isParent=!0,this.type="Group",this.classType=h(i,"classType",f),this.name=h(i,"name",""),this.active=h(i,"active",!0),this.maxSize=h(i,"maxSize",-1),this.defaultKey=h(i,"defaultKey",null),this.defaultFrame=h(i,"defaultFrame",null),this.runChildUpdate=h(i,"runChildUpdate",!1),this.createCallback=h(i,"createCallback",null),this.removeCallback=h(i,"removeCallback",null),this.createMultipleCallback=h(i,"createMultipleCallback",null),this.internalCreateCallback=h(i,"internalCreateCallback",null),this.internalRemoveCallback=h(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(s.ADDED_TO_SCENE,this.addedToScene,this),this.on(s.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,n,r,s){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===r&&(r=!0),void 0===s&&(s=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return o.addToDisplayList(this.scene.sys.displayList),o.addToUpdateList(),o.visible=r,o.setActive(s),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i<t.length;i++){var n=this.createFromConfig(t[i]);e=e.concat(n)}return e},createFromConfig:function(t){if(this.isFull())return[];this.classType=h(t,"classType",this.classType);var e=h(t,"key",void 0),i=h(t,"frame",null),r=h(t,"visible",!0),s=h(t,"active",!0),o=[];if(void 0===e)return o;Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);var a=h(t,"repeat",0),c=h(t,"randomKey",!1),p=h(t,"randomFrame",!1),f=h(t,"yoyo",!1),m=h(t,"quantity",!1),g=h(t,"frameQuantity",1),v=h(t,"max",0),y=d(e,i,{max:v,qty:m||g,random:c,randomB:p,repeat:a,yoyo:f});t.createCallback&&(this.createCallback=t.createCallback),t.removeCallback&&(this.removeCallback=t.removeCallback),t.internalCreateCallback&&(this.internalCreateCallback=t.internalCreateCallback),t.internalRemoveCallback&&(this.internalRemoveCallback=t.internalRemoveCallback);for(var x=0;x<y.length;x++){var E=this.create(0,0,y[x].a,y[x].b,r,s);if(!E)break;o.push(E)}if(u(t,"setXY")){var T=l(t,"setXY.x",0),_=l(t,"setXY.y",0),w=l(t,"setXY.stepX",0),S=l(t,"setXY.stepY",0);n.SetXY(o,T,_,w,S)}if(u(t,"setRotation")){var b=l(t,"setRotation.value",0),C=l(t,"setRotation.step",0);n.SetRotation(o,b,C)}if(u(t,"setScale")){var A=l(t,"setScale.x",1),R=l(t,"setScale.y",A),M=l(t,"setScale.stepX",0),L=l(t,"setScale.stepY",0);n.SetScale(o,A,R,M,L)}if(u(t,"setOrigin")){var O=l(t,"setOrigin.x",.5),P=l(t,"setOrigin.y",O),F=l(t,"setOrigin.stepX",0),I=l(t,"setOrigin.stepY",0);n.SetOrigin(o,O,P,F,I)}if(u(t,"setAlpha")){var D=l(t,"setAlpha.value",1),N=l(t,"setAlpha.step",0);n.SetAlpha(o,D,N)}if(u(t,"setDepth")){var k=l(t,"setDepth.value",0),B=l(t,"setDepth.step",0);n.SetDepth(o,k,B)}if(u(t,"setScrollFactor")){var U=l(t,"setScrollFactor.x",1),G=l(t,"setScrollFactor.y",U),W=l(t,"setScrollFactor.stepX",0),X=l(t,"setScrollFactor.stepY",0);n.SetScrollFactor(o,U,G,W,X)}var V=h(t,"hitArea",null),$=h(t,"hitAreaCallback",null);V&&n.SetHitArea(o,V,$);var H=h(t,"gridAlign",!1);return H&&n.GridAlign(o,H),this.createMultipleCallback&&this.createMultipleCallback.call(this,o),o},preUpdate:function(t,e){if(this.runChildUpdate&&0!==this.children.size)for(var i=this.children.entries.slice(),n=0;n<i.length;n++){var r=i[n];r.active&&r.update(t,e)}},add:function(t,e){return void 0===e&&(e=!1),this.isFull()||(this.children.set(t),this.internalCreateCallback&&this.internalCreateCallback.call(this,t),this.createCallback&&this.createCallback.call(this,t),e&&(t.addToDisplayList(this.scene.sys.displayList),t.addToUpdateList()),t.on(s.DESTROY,this.remove,this)),this},addMultiple:function(t,e){if(void 0===e&&(e=!1),Array.isArray(t))for(var i=0;i<t.length;i++)this.add(t[i],e);return this},remove:function(t,e,i){return void 0===e&&(e=!1),void 0===i&&(i=!1),this.children.contains(t)?(this.children.delete(t),this.internalRemoveCallback&&this.internalRemoveCallback.call(this,t),this.removeCallback&&this.removeCallback.call(this,t),t.off(s.DESTROY,this.remove,this),i?t.destroy():e&&(t.removeFromDisplayList(),t.removeFromUpdateList()),this):this},clear:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.children,n=0;n<i.size;n++){var r=i.entries[n];r.off(s.DESTROY,this.remove,this),e?r.destroy():t&&(r.removeFromDisplayList(),r.removeFromUpdateList())}return this.children.clear(),this},contains:function(t){return this.children.contains(t)},getChildren:function(){return this.children.entries},getLength:function(){return this.children.size},getMatching:function(t,e,i,n){return a(this.children.entries,t,e,i,n)},getFirst:function(t,e,i,n,r,s,o){return this.getHandler(!0,1,t,e,i,n,r,s,o)},getFirstNth:function(t,e,i,n,r,s,o,a){return this.getHandler(!0,t,e,i,n,r,s,o,a)},getLast:function(t,e,i,n,r,s,o){return this.getHandler(!1,1,t,e,i,n,r,s,o)},getLastNth:function(t,e,i,n,r,s,o,a){return this.getHandler(!1,t,e,i,n,r,s,o,a)},getHandler:function(t,e,i,n,r,s,o,a,h){var l,u;void 0===i&&(i=!1),void 0===n&&(n=!1);var c=0,d=this.children.entries;if(t)for(u=0;u<d.length;u++)if((l=d[u]).active===i){if(++c===e)break}else l=null;else for(u=d.length-1;u>=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof r&&(l.x=r),"number"==typeof s&&(l.y=s),l):n?this.create(r,s,o,a,h):null},get:function(t,e,i,n,r){return this.getFirst(!1,!0,t,e,i,n,r)},getFirstAlive:function(t,e,i,n,r,s){return this.getFirst(!0,t,e,i,n,r,s)},getFirstDead:function(t,e,i,n,r,s){return this.getFirst(!1,t,e,i,n,r,s)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i<this.children.size;i++)this.children.entries[i].active===t&&e++;return e},getTotalUsed:function(){return this.countActive()},getTotalFree:function(){var t=this.getTotalUsed();return(-1===this.maxSize?999999999999:this.maxSize)-t},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},propertyValueSet:function(t,e,i,r,s){return n.PropertyValueSet(this.children.entries,t,e,i,r,s),this},propertyValueInc:function(t,e,i,r,s){return n.PropertyValueInc(this.children.entries,t,e,i,r,s),this},setX:function(t,e){return n.SetX(this.children.entries,t,e),this},setY:function(t,e){return n.SetY(this.children.entries,t,e),this},setXY:function(t,e,i,r){return n.SetXY(this.children.entries,t,e,i,r),this},incX:function(t,e){return n.IncX(this.children.entries,t,e),this},incY:function(t,e){return n.IncY(this.children.entries,t,e),this},incXY:function(t,e,i,r){return n.IncXY(this.children.entries,t,e,i,r),this},shiftPosition:function(t,e,i){return n.ShiftPosition(this.children.entries,t,e,i),this},angle:function(t,e){return n.Angle(this.children.entries,t,e),this},rotate:function(t,e){return n.Rotate(this.children.entries,t,e),this},rotateAround:function(t,e){return n.RotateAround(this.children.entries,t,e),this},rotateAroundDistance:function(t,e,i){return n.RotateAroundDistance(this.children.entries,t,e,i),this},setAlpha:function(t,e){return n.SetAlpha(this.children.entries,t,e),this},setTint:function(t,e,i,r){return n.SetTint(this.children.entries,t,e,i,r),this},setOrigin:function(t,e,i,r){return n.SetOrigin(this.children.entries,t,e,i,r),this},scaleX:function(t,e){return n.ScaleX(this.children.entries,t,e),this},scaleY:function(t,e){return n.ScaleY(this.children.entries,t,e),this},scaleXY:function(t,e,i,r){return n.ScaleXY(this.children.entries,t,e,i,r),this},setDepth:function(t,e){return n.SetDepth(this.children.entries,t,e),this},setBlendMode:function(t){return n.SetBlendMode(this.children.entries,t),this},setHitArea:function(t,e){return n.SetHitArea(this.children.entries,t,e),this},shuffle:function(){return n.Shuffle(this.children.entries),this},kill:function(t){this.children.contains(t)&&t.setActive(!1)},killAndHide:function(t){this.children.contains(t)&&(t.setActive(!1),t.setVisible(!1))},setVisible:function(t,e,i){return n.SetVisible(this.children.entries,t,e,i),this},toggleVisible:function(){return n.ToggleVisible(this.children.entries),this},destroy:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1),this.scene&&!this.ignoreDestroy&&(this.emit(s.DESTROY,this),this.removeAllListeners(),this.scene.sys.updateList.remove(this),this.clear(e,t),this.scene=void 0,this.children=void 0)}});t.exports=m},94975:(t,e,i)=>{var n=i(44603),r=i(26479);n.register("group",(function(t){return new r(this.scene,null,t)}))},3385:(t,e,i)=>{var n=i(26479);i(39429).register("group",(function(t,e){return this.updateList.add(new n(this.scene,t,e))}))},88571:(t,e,i)=>{var n=i(83419),r=i(31401),s=i(95643),o=i(59819),a=new n({Extends:s,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,o],initialize:function(t,e,i,n,r){s.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});t.exports=a},40652:t=>{t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},82459:(t,e,i)=>{var n=i(25305),r=i(44603),s=i(23568),o=i(88571);r.register("image",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),r=s(t,"frame",null),a=new o(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,a,t),a}))},2117:(t,e,i)=>{var n=i(88571);i(39429).register("image",(function(t,e,i,r){return this.displayList.add(new n(this.scene,t,e,i,r))}))},59819:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(99517),s=i(40652),t.exports={renderWebGL:r,renderCanvas:s}},99517:t=>{t.exports=function(t,e,i,n){i.addToRenderList(e),this.pipeline.batchSprite(e,i,n)}},77856:(t,e,i)=>{var n={Events:i(51708),DisplayList:i(8050),GameObjectCreator:i(44603),GameObjectFactory:i(39429),UpdateList:i(45027),Components:i(31401),GetCalcMatrix:i(91296),BuildGameObject:i(25305),BuildGameObjectAnimation:i(13059),GameObject:i(95643),BitmapText:i(22186),Blitter:i(6107),Bob:i(46590),Container:i(31559),DOMElement:i(3069),DynamicBitmapText:i(2638),Extern:i(42421),Graphics:i(43831),Group:i(26479),Image:i(88571),Layer:i(93595),Particles:i(18404),PathFollower:i(1159),RenderTexture:i(591),RetroFont:i(196),Rope:i(77757),Sprite:i(68287),Text:i(50171),GetTextSize:i(14220),MeasureText:i(79557),TextStyle:i(35762),TileSprite:i(20839),Zone:i(41481),Video:i(18471),Shape:i(17803),Arc:i(23629),Curve:i(89),Ellipse:i(19921),Grid:i(30479),IsoBox:i(61475),IsoTriangle:i(16933),Line:i(57847),Polygon:i(24949),Rectangle:i(74561),Star:i(55911),Triangle:i(36931),Factories:{Blitter:i(12709),Container:i(24961),DOMElement:i(2611),DynamicBitmapText:i(72566),Extern:i(56315),Graphics:i(1201),Group:i(3385),Image:i(2117),Layer:i(20005),Particles:i(676),PathFollower:i(90145),RenderTexture:i(60505),Rope:i(96819),Sprite:i(46409),StaticBitmapText:i(34914),Text:i(68005),TileSprite:i(91681),Zone:i(84175),Video:i(89025),Arc:i(42563),Curve:i(40511),Ellipse:i(1543),Grid:i(34137),IsoBox:i(3933),IsoTriangle:i(49803),Line:i(2481),Polygon:i(64827),Rectangle:i(87959),Star:i(93697),Triangle:i(45245)},Creators:{Blitter:i(9403),Container:i(77143),DynamicBitmapText:i(11164),Graphics:i(87079),Group:i(94975),Image:i(82459),Layer:i(25179),Particles:i(92730),RenderTexture:i(34495),Rope:i(26209),Sprite:i(15567),StaticBitmapText:i(57336),Text:i(71259),TileSprite:i(14167),Zone:i(95261),Video:i(11511)}};n.Shader=i(20071),n.Mesh=i(4703),n.NineSlice=i(28103),n.PointLight=i(80321),n.Plane=i(33663),n.Factories.Shader=i(74177),n.Factories.Mesh=i(9225),n.Factories.NineSlice=i(47521),n.Factories.PointLight=i(71255),n.Factories.Plane=i(30985),n.Creators.Shader=i(54935),n.Creators.Mesh=i(20527),n.Creators.NineSlice=i(28279),n.Creators.PointLight=i(39829),n.Creators.Plane=i(56015),n.Light=i(41432),n.LightsManager=i(61356),n.LightsPlugin=i(88992),t.exports=n},93595:(t,e,i)=>{var n=i(10312),r=i(83419),s=i(31401),o=i(53774),a=i(45893),h=i(50792),l=i(51708),u=i(73162),c=i(33963),d=i(44594),p=i(19186),f=new r({Extends:u,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Mask,s.PostPipeline,s.Visible,h,c],initialize:function(t,e){u.call(this,t),h.call(this),this.scene=t,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),e&&this.add(e),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(t,e){return this.data||(this.data=new a(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new a(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new a(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new a(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return o(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){var e=t.displayList;e&&e!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(l.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(p(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(l.ADDED_TO_SCENE,this,this.scene),t.events.emit(d.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(l.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(d.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(t){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var e=this.list;e.length;)e[0].destroy(t);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=f},2956:t=>{t.exports=function(t,e,i){var n=e.list;if(0!==n.length){e.depthSort();var r=-1!==e.blendMode;r||t.setBlendMode(0);var s=e._alpha;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var o=0;o<n.length;o++){var a=n[o];if(a.willRender(i)){var h=a.alpha;r||a.blendMode===t.currentBlendMode||t.setBlendMode(a.blendMode),a.setAlpha(h*s),a.renderCanvas(t,a,i),a.setAlpha(h)}}e.mask&&e.mask.postRenderCanvas(t)}}},25179:(t,e,i)=>{var n=i(25305),r=i(93595),s=i(44603),o=i(23568);s.register("layer",(function(t,e){void 0===t&&(t={});var i=o(t,"children",null),s=new r(this.scene,i);return void 0!==e&&(t.add=e),n(this.scene,s,t),s}))},20005:(t,e,i)=>{var n=i(93595);i(39429).register("layer",(function(t){return this.displayList.add(new n(this.scene,t))}))},33963:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(15869),s=i(2956),t.exports={renderWebGL:r,renderCanvas:s}},15869:t=>{t.exports=function(t,e,i){var n=e.list,r=n.length;if(0!==r){e.depthSort(),t.pipelines.preBatch(e);var s=-1!==e.blendMode;s||t.setBlendMode(0);for(var o=e.alpha,a=0;a<r;a++){var h=n[a];if(h.willRender(i)){var l,u,c,d;if(void 0!==h.alphaTopLeft)l=h.alphaTopLeft,u=h.alphaTopRight,c=h.alphaBottomLeft,d=h.alphaBottomRight;else{var p=h.alpha;l=p,u=p,c=p,d=p}s||h.blendMode===t.currentBlendMode||t.setBlendMode(h.blendMode);var f=h.mask;f&&f.preRenderWebGL(t,h,i);var m=h.type;m!==t.currentType&&(t.newType=!0,t.currentType=m),t.nextTypeMatch=a<r-1&&n[a+1].type===t.currentType,h.setAlpha(l*o,u*o,c*o,d*o),h.renderWebGL(t,h,i),h.setAlpha(l,u,c,d),f&&f.postRenderWebGL(t,i),t.newType=!1}}t.pipelines.postBatch(e)}}},41432:(t,e,i)=>{var n=i(96503),r=i(83419),s=i(31401),o=i(51767),a=i(70554),h=new r({Extends:n,Mixins:[s.Origin,s.ScrollFactor,s.Transform,s.Visible],initialize:function(t,e,i,r,s,a,h){n.call(this,t,e,i),this.color=new o(r,s,a),this.intensity=h,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(i)},displayWidth:{get:function(){return this.diameter},set:function(t){this.diameter=t}},displayHeight:{get:function(){return this.diameter},set:function(t){this.diameter=t}},width:{get:function(){return this.diameter},set:function(t){this.diameter=t}},height:{get:function(){return this.diameter},set:function(t){this.diameter=t}},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){var e=a.getFloatsFromUintRGB(t);return this.color.set(e[0],e[1],e[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this}});h.RENDER_MASK=15,t.exports=h},61356:(t,e,i)=>{var n=i(81491),r=i(83419),s=i(20339),o=i(41432),a=i(80321),h=i(51767),l=i(19133),u=i(19186),c=i(70554),d=new r({initialize:function(){this.lights=[],this.ambientColor=new h(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,n,r,s){return this.systems.displayList.add(new a(this.scene,t,e,i,n,r,s))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(t){for(var e=this.lights,i=t.worldView,r=[],o=0;o<e.length;o++){var a=e[o];a.willRender(t)&&n(a,i)&&r.push({light:a,distance:s(a.x,a.y,i.centerX,i.centerY)})}return r.length>this.maxLights&&(u(r,this.sortByDistance),r=r.slice(0,this.maxLights)),this.visibleLights=r.length,r},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){var e=c.getFloatsFromUintRGB(t);return this.ambientColor.set(e[0],e[1],e[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===n&&(n=16777215),void 0===r&&(r=1);var s=c.getFloatsFromUintRGB(n),a=new o(t,e,i,s[0],s[1],s[2],r);return this.lights.push(a),a},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&l(this.lights,e),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=d},88992:(t,e,i)=>{var n=i(83419),r=i(61356),s=i(37277),o=i(44594),a=new n({Extends:r,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(o.BOOT,this.boot,this),r.call(this)},boot:function(){var t=this.systems.events;t.on(o.SHUTDOWN,this.shutdown,this),t.on(o.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});s.register("LightsPlugin",a,"lights"),t.exports=a},4703:(t,e,i)=>{var n=i(83419),r=i(31401),s=i(39506),o=i(83997),a=i(95643),h=i(34684),l=i(92515),u=i(91296),c=i(37867),d=i(29807),p=i(43396),f=i(19186),m=i(25836),g=i(39318),v=new n({Extends:a,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Size,r.Texture,r.Transform,r.Visible,d],initialize:function(t,e,i,n,r,s,o,h,l,u,d,p){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n="__WHITE"),a.call(this,t,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new m,this.modelScale=new m(1,1,1),this.modelRotation=new m,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new c,this.viewPosition=new m,this.viewMatrix=new c,this.projectionMatrix=new c,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var f=t.sys.renderer;this.setPosition(e,i),this.setTexture(n,r),this.setSize(f.width,f.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(f.width,f.height),s&&this.addVertices(s,o,h,l,u,d,p)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(t){return this.viewPosition.addScale(m.LEFT,t),this.dirtyCache[10]=1,this},panY:function(t){return this.viewPosition.y+=m.DOWN.y*t,this.dirtyCache[10]=1,this},panZ:function(t){return this.viewPosition.z+=t,this.dirtyCache[10]=1,this},setPerspective:function(t,e,i,n,r){return void 0===i&&(i=45),void 0===n&&(n=.01),void 0===r&&(r=1e3),this.fov=i,this.projectionMatrix.perspective(s(i),t/e,n,r),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(t,e,i,n){return void 0===t&&(t=this.scene.sys.renderer.getAspectRatio()),void 0===e&&(e=1),void 0===i&&(i=-1e3),void 0===n&&(n=1e3),this.fov=0,this.projectionMatrix.ortho(-t,t,-e,e,i,n),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach((function(t){t.destroy()})),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(t,e,i,n,r,s,o,a,l){var u,c=this.scene.sys.cache.obj.get(t);return c&&(u=h(c,this,e,i,n,r,s,o,a,l)),u&&0!==u.verts.length||console.warn("Mesh.addVerticesFromObj data empty:",t),this},sortByDepth:function(t,e){return t.depth-e.depth},depthSort:function(){return f(this.faces,this.sortByDepth),this},addVertex:function(t,e,i,n,r,s,o){var a=new g(t,e,i,n,r,s,o);return this.vertices.push(a),a},addFace:function(t,e,i){var n=new o(t,e,i);return this.faces.push(n),this.dirtyCache[9]=-1,n},addVertices:function(t,e,i,n,r,s,o){var a=l(t,e,i,n,r,s,o);return a?(this.faces=this.faces.concat(a.faces),this.vertices=this.vertices.concat(a.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(t){return this.faces[t]},hasFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var n=u(this,i).calc,r=this.faces,s=0;s<r.length;s++){if(r[s].contains(t,e,n))return!0}return!1},getFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var n=u(this,i).calc,r=this.faces,s=[],o=0;o<r.length;o++){var a=r[o];a.contains(t,e,n)&&s.push(a)}return f(s,this.sortByDepth)},setDebug:function(t,e){return this.debugGraphic=t,this.debugCallback=t||e?e||this.renderDebug:null,this},isDirty:function(){var t=this.modelPosition,e=this.modelRotation,i=this.modelScale,n=this.dirtyCache,r=t.x,s=t.y,o=t.z,a=e.x,h=e.y,l=e.z,u=i.x,c=i.y,d=i.z,p=this.getFaceCount(),f=n[0],m=n[1],g=n[2],v=n[3],y=n[4],x=n[5],E=n[6],T=n[7],_=n[8],w=n[9];return n[0]=r,n[1]=s,n[2]=o,n[3]=a,n[4]=h,n[5]=l,n[6]=u,n[7]=c,n[8]=d,n[9]=p,f!==r||m!==s||g!==o||v!==a||y!==h||x!==l||E!==u||T!==c||_!==d||w!==p},preUpdate:function(){this.totalRendered=this.totalFrame,this.totalFrame=0;var t=this.dirtyCache;if(this.ignoreDirtyCache||t[10]||this.isDirty()){var e=this.width,i=this.height,n=this.viewMatrix,r=this.viewPosition;t[10]&&(n.identity(),n.translate(r),n.invert(),t[10]=0);var s=this.transformMatrix;s.setWorldMatrix(this.modelRotation,this.modelPosition,this.modelScale,this.viewMatrix,this.projectionMatrix);for(var o=r.z,a=this.faces,h=0;h<a.length;h++)a[h].transformCoordinatesLocal(s,e,i,o);this.depthSort()}},renderDebug:function(t,e){for(var i=t.debugGraphic,n=0;n<e.length;n++){var r=e[n],s=r.vertex1.tx,o=r.vertex1.ty,a=r.vertex2.tx,h=r.vertex2.ty,l=r.vertex3.tx,u=r.vertex3.ty;i.strokeTriangle(s,o,a,h,l,u)}},preDestroy:function(){this.clear(),this.debugCallback=null,this.debugGraphic=null},clearTint:function(){return this.setTint()},setInteractive:function(t){void 0===t&&(t={});var e=function(t,e,i){for(var n=this.faces,r=0;r<n.length;r++){if(n[r].contains(e,i))return!0}return!1}.bind(this);return this.scene.sys.input.enable(this,t,e),this},setTint:function(t){void 0===t&&(t=16777215);for(var e=this.vertices,i=0;i<e.length;i++)e[i].color=t;return this},uvScroll:function(t,e){for(var i=this.faces,n=0;n<i.length;n++)i[n].scrollUV(t,e);return this},uvScale:function(t,e){for(var i=this.faces,n=0;n<i.length;n++)i[n].scaleUV(t,e);return this},tint:{set:function(t){this.setTint(t)}},rotateX:{get:function(){return p(this.modelRotation.x)},set:function(t){this.modelRotation.x=s(t)}},rotateY:{get:function(){return p(this.modelRotation.y)},set:function(t){this.modelRotation.y=s(t)}},rotateZ:{get:function(){return p(this.modelRotation.z)},set:function(t){this.modelRotation.z=s(t)}}});t.exports=v},36488:t=>{t.exports=function(){}},20527:(t,e,i)=>{var n=i(25305),r=i(44603),s=i(23568),o=i(35154),a=i(4703);r.register("mesh",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),r=s(t,"frame",null),h=o(t,"vertices",[]),l=o(t,"uvs",[]),u=o(t,"indicies",[]),c=o(t,"containsZ",!1),d=o(t,"normals",[]),p=o(t,"colors",16777215),f=o(t,"alphas",1),m=new a(this.scene,0,0,i,r,h,l,u,c,d,p,f);return void 0!==e&&(t.add=e),n(this.scene,m,t),m}))},9225:(t,e,i)=>{var n=i(4703);i(39429).register("mesh",(function(t,e,i,r,s,o,a,h,l,u,c){return this.displayList.add(new n(this.scene,t,e,i,r,s,o,a,h,l,u,c))}))},29807:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(48833),s=i(36488),t.exports={renderWebGL:r,renderCanvas:s}},48833:(t,e,i)=>{var n=i(91296);t.exports=function(t,e,i,r){var s=e.faces,o=s.length;if(0!==o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline,e),h=n(e,i,r).calc;t.pipelines.preBatch(e);for(var l=a.setGameObject(e),u=a.vertexViewF32,c=a.vertexViewU32,d=a.vertexCount*a.currentShader.vertexComponentCount-1,p=e.tintFill,f=[],m=e.debugCallback,g=h.a,v=h.b,y=h.c,x=h.d,E=h.e,T=h.f,_=e.viewPosition.z,w=e.hideCCW,S=i.roundPixels,b=i.alpha*e.alpha,C=0,A=0;A<o;A++){var R=s[A];R.isInView(i,w,_,b,g,v,y,x,E,T,S)&&(a.shouldFlush(3)&&(a.flush(),l=a.setGameObject(e),d=0),d=R.load(u,c,d,l,p),C++,a.vertexCount+=3,a.currentBatch.count=a.vertexCount-a.currentBatch.start,m&&f.push(R))}e.totalFrame+=C,m&&m.call(e,e,f),t.pipelines.postBatch(e)}}},28103:(t,e,i)=>{var n=i(83419),r=i(31401),s=i(95643),o=i(78023),a=i(39318),h=new n({Extends:s,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Texture,r.Transform,r.Visible,o],initialize:function(t,e,i,n,r,o,h,l,u,c,d){s.call(this,t,"NineSlice"),this._width,this._height,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth,this.rightWidth,this.topHeight,this.bottomHeight,this.tint=16777215,this.tintFill=!1;var p=t.textures.getFrame(n,r);this.is3Slice=!c&&!d,p.scale9&&(this.is3Slice=p.is3Slice);for(var f=this.is3Slice?18:54,m=0;m<f;m++)this.vertices.push(new a);this.setPosition(e,i),this.setTexture(n,r),this.setSlices(o,h,l,u,c,d,!1),this.updateDisplayOrigin(),this.initPipeline(),this.initPostPipeline()},setSlices:function(t,e,i,n,r,s,o){void 0===i&&(i=10),void 0===n&&(n=10),void 0===r&&(r=0),void 0===s&&(s=0),void 0===o&&(o=!1);var a=this.frame,h=!1;if(this.is3Slice&&o&&0!==r&&0!==s&&(h=!0),h)console.warn("Cannot change 9 slice to 3 slice");else{if(a.scale9&&!o){var l=a.data.scale9Borders,u=l.x,c=l.y;i=u,n=a.width-l.w-u,r=c,s=a.height-l.h-c,void 0===t&&(t=a.width),void 0===e&&(e=a.height)}else void 0===t&&(t=256),void 0===e&&(e=256);this._width=t,this._height=e,this.leftWidth=i,this.rightWidth=n,this.topHeight=r,this.bottomHeight=s,this.is3Slice&&(e=a.height,this._height=e,this.topHeight=e,this.bottomHeight=0),this.updateVertices(),this.updateUVs()}return this},updateUVs:function(){var t=this.leftWidth,e=this.rightWidth,i=this.topHeight,n=this.bottomHeight,r=this.frame.width,s=this.frame.height;this.updateQuadUVs(0,0,0,t/r,i/s),this.updateQuadUVs(6,t/r,0,1-e/r,i/s),this.updateQuadUVs(12,1-e/r,0,1,i/s),this.is3Slice||(this.updateQuadUVs(18,0,i/s,t/r,1-n/s),this.updateQuadUVs(24,t/r,i/s,1-e/r,1-n/s),this.updateQuadUVs(30,1-e/r,i/s,1,1-n/s),this.updateQuadUVs(36,0,1-n/s,t/r,1),this.updateQuadUVs(42,t/r,1-n/s,1-e/r,1),this.updateQuadUVs(48,1-e/r,1-n/s,1,1))},updateVertices:function(){var t=this.leftWidth,e=this.rightWidth,i=this.topHeight,n=this.bottomHeight,r=this.width,s=this.height;this.updateQuad(0,-.5,.5,t/r-.5,.5-i/s),this.updateQuad(6,t/r-.5,.5,.5-e/r,.5-i/s),this.updateQuad(12,.5-e/r,.5,.5,.5-i/s),this.is3Slice||(this.updateQuad(18,-.5,.5-i/s,t/r-.5,n/s-.5),this.updateQuad(24,t/r-.5,.5-i/s,.5-e/r,n/s-.5),this.updateQuad(30,.5-e/r,.5-i/s,.5,n/s-.5),this.updateQuad(36,-.5,n/s-.5,t/r-.5,-.5),this.updateQuad(42,t/r-.5,n/s-.5,.5-e/r,-.5),this.updateQuad(48,.5-e/r,n/s-.5,.5,-.5))},updateQuad:function(t,e,i,n,r){var s=this.width,o=this.height,a=this.originX,h=this.originY,l=this.vertices;l[t+0].resize(e,i,s,o,a,h),l[t+1].resize(e,r,s,o,a,h),l[t+2].resize(n,i,s,o,a,h),l[t+3].resize(e,r,s,o,a,h),l[t+4].resize(n,r,s,o,a,h),l[t+5].resize(n,i,s,o,a,h)},updateQuadUVs:function(t,e,i,n,r){var s=this.vertices,o=this.frame,a=o.u0,h=o.v0,l=o.u1,u=o.v1;if(0!==a||1!==l){var c=l-a;e=a+e*c,n=a+n*c}if(0!==h||1!==u){var d=u-h;i=h+i*d,r=h+r*d}s[t+0].setUVs(e,i),s[t+1].setUVs(e,r),s[t+2].setUVs(n,i),s[t+3].setUVs(e,r),s[t+4].setUVs(n,r),s[t+5].setUVs(n,i)},clearTint:function(){return this.setTint(16777215),this},setTint:function(t){return void 0===t&&(t=16777215),this.tint=t,this.tintFill=!1,this},setTintFill:function(t){return this.setTint(t),this.tintFill=!0,this},isTinted:{get:function(){return 16777215!==this.tint}},width:{get:function(){return this._width},set:function(t){this._width=Math.max(t,this.leftWidth+this.rightWidth),this.updateVertices()}},height:{get:function(){return this._height},set:function(t){this.is3Slice||(this._height=Math.max(t,this.topHeight+this.bottomHeight),this.updateVertices())}},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){this.width=t,this.height=e,this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=this.width,i.hitArea.height=this.height),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},originX:{get:function(){return this._originX},set:function(t){this._originX=t,this.updateVertices()}},originY:{get:function(){return this._originY},set:function(t){this._originY=t,this.updateVertices()}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this._originX=t,this._originY=e,this.updateVertices(),this.updateDisplayOrigin()},setSizeToFrame:function(){if(this.is3Slice){var t=this.frame.height;this._height=t,this.topHeight=t,this.bottomHeight=0}return this.updateUVs(),this},preDestroy:function(){this.vertices=[]}});t.exports=h},28279:(t,e,i)=>{var n=i(25305),r=i(44603),s=i(23568),o=i(35154),a=i(28103);r.register("nineslice",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),r=s(t,"frame",null),h=o(t,"width",256),l=o(t,"height",256),u=o(t,"leftWidth",10),c=o(t,"rightWidth",10),d=o(t,"topHeight",0),p=o(t,"bottomHeight",0),f=new a(this.scene,0,0,i,r,h,l,u,c,d,p);return void 0!==e&&(t.add=e),n(this.scene,f,t),f}))},47521:(t,e,i)=>{var n=i(28103);i(39429).register("nineslice",(function(t,e,i,r,s,o,a,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,r,s,o,a,h,l,u))}))},78023:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(52230),t.exports={renderWebGL:r,renderCanvas:s}},52230:(t,e,i)=>{var n=i(91296),r=i(70554);t.exports=function(t,e,i,s){var o=e.vertices,a=o.length;if(0!==a){i.addToRenderList(e);var h=t.pipelines.set(e.pipeline,e),l=n(e,i,s,!1).calc;t.pipelines.preBatch(e);var u=h.setGameObject(e),c=h.vertexViewF32,d=h.vertexViewU32,p=h.vertexCount*h.currentShader.vertexComponentCount-1,f=i.roundPixels,m=e.tintFill,g=i.alpha*e.alpha,v=r.getTintAppendFloatAlpha(e.tint,g),y=h.vertexAvailable(),x=-1;y<a&&(x=y);for(var E=0;E<a;E++){var T=o[E];E===x&&(h.flush(),u=h.setGameObject(e),p=0),c[++p]=l.getXRound(T.vx,T.vy,f),c[++p]=l.getYRound(T.vx,T.vy,f),c[++p]=T.u,c[++p]=T.v,c[++p]=u,c[++p]=m,d[++p]=v,h.vertexCount++,h.currentBatch.count=h.vertexCount-h.currentBatch.start}t.pipelines.postBatch(e)}}},76472:(t,e,i)=>{var n=i(83419),r=i(44777),s=i(37589),o=i(6113),a=i(91389),h=i(90664),l=new n({Extends:r,initialize:function(t){r.call(this,t,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return null===this.propertyValue?0:9},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,n=this.defaultUpdate;if(9===this.method){this.start=t[0],this.ease=o("Linear"),this.interpolation=a("linear"),i=this.easedValueEmit,n=this.easeValueUpdate,e=t[0],this.active=!0;for(var r=0;r<t.length;r++){var s=h(t[r]);this.r.push(s.r),this.g.push(s.g),this.b.push(s.b)}}return this.onEmit=i,this.onUpdate=n,this.current=e,this},setEase:function(t){this.easeName=t,this.ease=o(t)},easedValueEmit:function(){return this.current=this.start,this.start},easeValueUpdate:function(t,e,i){var n=this.ease(i),r=this.interpolation(this.r,n),o=this.interpolation(this.g,n),a=this.interpolation(this.b,n),h=s(r,o,a);return this.current=h,h}});t.exports=l},44777:(t,e,i)=>{var n=i(30976),r=i(45319),s=i(83419),o=i(99472),a=i(6113),h=i(95540),l=i(91389),u=i(77720),c=i(15994),d=new s({initialize:function(t,e,i){void 0===i&&(i=!1),this.propertyKey=t,this.propertyValue=e,this.defaultValue=e,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=i,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=h(t,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){var e;switch(this.method){case 1:case 3:case 8:e=t;break;case 2:this.propertyValue.indexOf(t)>=0&&(e=t);break;case 4:var i=(this.end-this.start)/this.steps;e=u(t,i),this.counter=e;break;case 5:case 6:case 7:e=r(t,this.start,this.end);break;case 9:e=this.start[0]}return this.current=e,this},getMethod:function(){var t=this.propertyValue;if(null===t)return 0;var e=typeof t;if("number"===e)return 1;if(Array.isArray(t))return 2;if("function"===e)return 3;if("object"===e){if(this.hasBoth(t,"start","end"))return this.has(t,"steps")?4:5;if(this.hasBoth(t,"min","max"))return 6;if(this.has(t,"random"))return 7;if(this.hasEither(t,"onEmit","onUpdate"))return 8;if(this.hasEither(t,"values","interpolation"))return 9}return 0},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,n=this.defaultUpdate;switch(this.method){case 1:i=this.staticValueEmit;break;case 2:i=this.randomStaticValueEmit,e=t[0];break;case 3:this._onEmit=t,i=this.proxyEmit;break;case 4:this.start=t.start,this.end=t.end,this.steps=t.steps,this.counter=this.start,this.yoyo=!!this.has(t,"yoyo")&&t.yoyo,this.direction=0,i=this.steppedEmit,e=this.start;break;case 5:this.start=t.start,this.end=t.end;var r=this.has(t,"ease")?t.ease:"Linear";this.ease=a(r,t.easeParams),i=this.has(t,"random")&&t.random?this.randomRangedValueEmit:this.easedValueEmit,n=this.easeValueUpdate,e=this.start;break;case 6:this.start=t.min,this.end=t.max,i=this.has(t,"int")&&t.int?this.randomRangedIntEmit:this.randomRangedValueEmit,e=this.start;break;case 7:var s=t.random;Array.isArray(s)&&(this.start=s[0],this.end=s[1]),i=this.randomRangedIntEmit,e=this.start;break;case 8:this._onEmit=this.has(t,"onEmit")?t.onEmit:this.defaultEmit,this._onUpdate=this.has(t,"onUpdate")?t.onUpdate:this.defaultUpdate,i=this.proxyEmit,n=this.proxyUpdate;break;case 9:this.start=t.values;var o=this.has(t,"ease")?t.ease:"Linear";this.ease=a(o,t.easeParams),this.interpolation=l(t.interpolation),i=this.easedValueEmit,n=this.easeValueUpdate,e=this.start[0]}return this.onEmit=i,this.onUpdate=n,this.current=e,this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},proxyEmit:function(t,e,i){var n=this._onEmit(t,e,i);return this.current=n,n},proxyUpdate:function(t,e,i,n){var r=this._onUpdate(t,e,i,n);return this.current=r,r},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[t],this.current},randomRangedValueEmit:function(t,e){var i=o(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i,i},randomRangedIntEmit:function(t,e){var i=n(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i,i},steppedEmit:function(){var t,e=this.counter,i=e,n=(this.end-this.start)/this.steps;this.yoyo?(0===this.direction?(i+=n)>=this.end&&(t=i-this.end,i=this.end-t,this.direction=1):(i-=n)<=this.start&&(t=this.start-i,i=this.start+t,this.direction=0),this.counter=i):this.counter=c(i+n,this.start,this.end);return this.current=e,e},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(t,e,i){var n,r=t.data[e],s=this.ease(i);return n=this.interpolation?this.interpolation(this.start,s):(r.max-r.min)*s+r.min,this.current=n,n},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});t.exports=d},24502:(t,e,i)=>{var n=i(83419),r=i(95540),s=i(20286),o=new n({Extends:s,initialize:function(t,e,i,n,o){if("object"==typeof t){var a=t;t=r(a,"x",0),e=r(a,"y",0),i=r(a,"power",0),n=r(a,"epsilon",100),o=r(a,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===o&&(o=50);s.call(this,t,e,!0),this._gravity=o,this._power=i*o,this._epsilon=n*n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,r=i*i+n*n;if(0!==r){var s=Math.sqrt(r);r<this._epsilon&&(r=this._epsilon);var o=this._power*e/(r*s)*100;t.velocityX+=i*o,t.velocityY+=n*o}},epsilon:{get:function(){return Math.sqrt(this._epsilon)},set:function(t){this._epsilon=t*t}},power:{get:function(){return this._power/this._gravity},set:function(t){this._power=t*this._gravity}},gravity:{get:function(){return this._gravity},set:function(t){var e=this.power;this._gravity=t,this.power=e}}});t.exports=o},56480:(t,e,i)=>{var n=i(9674),r=i(45319),s=i(83419),o=i(39506),a=i(87841),h=i(11520),l=i(26099),u=new s({initialize:function(t){this.emitter=t,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new l,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=t.scene,this.anims=new n(this),this.bounds=new a},emit:function(t,e,i,n,r,s){return this.emitter.emit(t,e,i,n,r,s)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e},fire:function(t,e){var i=this.emitter,n=i.ops,r=i.getAnim();if(r?this.anims.play(r):(this.frame=i.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(i.getEmitZone(this),void 0===t?this.x+=n.x.onEmit(this,"x"):n.x.steps>0?this.x+=t+n.x.onEmit(this,"x"):this.x+=t,void 0===e?this.y+=n.y.onEmit(this,"y"):n.y.steps>0?this.y+=e+n.y.onEmit(this,"y"):this.y+=e,this.life=n.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=n.delay.onEmit(this,"delay"),this.holdCurrent=n.hold.onEmit(this,"hold"),this.scaleX=n.scaleX.onEmit(this,"scaleX"),this.scaleY=n.scaleY.active?n.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=n.rotate.onEmit(this,"rotate"),this.rotation=o(this.angle),i.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),0===this.delayCurrent&&i.getDeathZone(this))return this.lifeCurrent=0,!1;var s=n.speedX.onEmit(this,"speedX"),a=n.speedY.active?n.speedY.onEmit(this,"speedY"):s;if(i.radial){var h=o(n.angle.onEmit(this,"angle"));this.velocityX=Math.cos(h)*Math.abs(s),this.velocityY=Math.sin(h)*Math.abs(a)}else if(i.moveTo){var l=n.moveToX.onEmit(this,"moveToX"),u=n.moveToY.onEmit(this,"moveToY"),c=this.life/1e3;this.velocityX=(l-this.x)/c,this.velocityY=(u-this.y)/c}else this.velocityX=s,this.velocityY=a;return i.acceleration&&(this.accelerationX=n.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=n.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=n.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=n.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=n.bounce.onEmit(this,"bounce"),this.alpha=n.alpha.onEmit(this,"alpha"),n.color.active?this.tint=n.color.onEmit(this,"tint"):this.tint=n.tint.onEmit(this,"tint"),!0},update:function(t,e,i){if(this.lifeCurrent<=0)return!(this.holdCurrent>0)||(this.holdCurrent-=t,this.holdCurrent<=0);if(this.delayCurrent>0)return this.delayCurrent-=t,!1;this.anims.update(0,t);var n=this.emitter,s=n.ops,a=1-this.lifeCurrent/this.life;if(this.lifeT=a,this.x=s.x.onUpdate(this,"x",a,this.x),this.y=s.y.onUpdate(this,"y",a,this.y),n.moveTo){var h=s.moveToX.onUpdate(this,"moveToX",a,n.moveToX),l=s.moveToY.onUpdate(this,"moveToY",a,n.moveToY),u=this.lifeCurrent/1e3;this.velocityX=(h-this.x)/u,this.velocityY=(l-this.y)/u}return this.computeVelocity(n,t,e,i,a),this.scaleX=s.scaleX.onUpdate(this,"scaleX",a,this.scaleX),s.scaleY.active?this.scaleY=s.scaleY.onUpdate(this,"scaleY",a,this.scaleY):this.scaleY=this.scaleX,this.angle=s.rotate.onUpdate(this,"rotate",a,this.angle),this.rotation=o(this.angle),n.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=r(s.alpha.onUpdate(this,"alpha",a,this.alpha),0,1),s.color.active?this.tint=s.color.onUpdate(this,"color",a,this.tint):this.tint=s.tint.onUpdate(this,"tint",a,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(t,e,i,n,s){var o=t.ops,a=this.velocityX,h=this.velocityY,l=o.accelerationX.onUpdate(this,"accelerationX",s,this.accelerationX),u=o.accelerationY.onUpdate(this,"accelerationY",s,this.accelerationY),c=o.maxVelocityX.onUpdate(this,"maxVelocityX",s,this.maxVelocityX),d=o.maxVelocityY.onUpdate(this,"maxVelocityY",s,this.maxVelocityY);this.bounce=o.bounce.onUpdate(this,"bounce",s,this.bounce),a+=t.gravityX*i+l*i,h+=t.gravityY*i+u*i,a=r(a,-c,c),h=r(h,-d,d),this.velocityX=a,this.velocityY=h,this.x+=a*i,this.y+=h*i,t.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var p=0;p<n.length;p++){var f=n[p];f.active&&f.update(this,e,i,s)}},setSizeToFrame:function(){},getBounds:function(t){void 0===t&&(t=this.emitter.getWorldTransformMatrix());var e=Math.abs(t.scaleX)*this.scaleX,i=Math.abs(t.scaleY)*this.scaleY,n=this.x,r=this.y,s=this.rotation,o=this.frame.width*e/2,a=this.frame.height*i/2,u=this.bounds,c=new l(n-o,r-a),d=new l(n+o,r-a),p=new l(n-o,r+a),f=new l(n+o,r+a);return 0!==s&&(h(c,n,r,s),h(d,n,r,s),h(p,n,r,s),h(f,n,r,s)),t.transformPoint(c.x,c.y,c),t.transformPoint(d.x,d.y,d),t.transformPoint(p.x,p.y,p),t.transformPoint(f.x,f.y,f),u.x=Math.min(c.x,d.x,p.x,f.x),u.y=Math.min(c.y,d.y,p.y,f.y),u.width=Math.max(c.x,d.x,p.x,f.x)-u.x,u.height=Math.max(c.y,d.y,p.y,f.y)-u.y,u},destroy:function(){this.anims.destroy(),this.anims=null,this.emitter=null,this.texture=null,this.frame=null,this.scene=null}});t.exports=u},69601:(t,e,i)=>{var n=i(83419),r=i(20286),s=i(87841),o=new n({Extends:r,initialize:function(t,e,i,n,o,a,h,l){void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),void 0===l&&(l=!0),r.call(this,t,e,!0),this.bounds=new s(t,e,i,n),this.collideLeft=o,this.collideRight=a,this.collideTop=h,this.collideBottom=l},update:function(t){var e=this.bounds,i=-t.bounce,n=t.worldPosition;n.x<e.x&&this.collideLeft?(t.x+=e.x-n.x,t.velocityX*=i):n.x>e.right&&this.collideRight&&(t.x-=n.x-e.right,t.velocityX*=i),n.y<e.y&&this.collideTop?(t.y+=e.y-n.y,t.velocityY*=i):n.y>e.bottom&&this.collideBottom&&(t.y-=n.y-e.bottom,t.velocityY*=i)}});t.exports=o},31600:(t,e,i)=>{var n=i(83419),r=i(31401),s=i(53774),o=i(43459),a=i(26388),h=i(19909),l=i(76472),u=i(44777),c=i(20696),d=i(95643),p=i(95540),f=i(26546),m=i(24502),g=i(1985),v=i(97022),y=i(86091),x=i(73162),E=i(20074),T=i(56480),_=i(68875),w=i(87841),S=i(59996),b=i(72905),C=i(90668),A=i(19186),R=i(61340),M=i(26099),L=i(15994),O=i(69601),P=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],F=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],I=new n({Extends:d,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Texture,r.Transform,r.Visible,C],initialize:function(t,e,i,n,r){d.call(this,t,"ParticleEmitter"),this.particleClass=T,this.ops={accelerationX:new u("accelerationX",0),accelerationY:new u("accelerationY",0),alpha:new u("alpha",1),angle:new u("angle",{min:0,max:360},!0),bounce:new u("bounce",0),color:new l("color"),delay:new u("delay",0,!0),hold:new u("hold",0,!0),lifespan:new u("lifespan",1e3,!0),maxVelocityX:new u("maxVelocityX",1e4),maxVelocityY:new u("maxVelocityY",1e4),moveToX:new u("moveToX",0),moveToY:new u("moveToY",0),quantity:new u("quantity",1,!0),rotate:new u("rotate",0),scaleX:new u("scaleX",1),scaleY:new u("scaleY",1),speedX:new u("speedX",0,!0),speedY:new u("speedY",0,!0),tint:new u("tint",16777215),x:new u("x",0),y:new u("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.follow=null,this.followOffset=new M,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this.skipping=!1,this.worldMatrix=new R,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new x(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(e,i),this.setTexture(n),r&&this.setConfig(r)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(t){if(!t)return this;var e=0,i="",n=this.ops;for(e=0;e<F.length;e++)n[i=F[e]].loadConfig(t);for(e=0;e<P.length;e++)v(t,i=P[e])&&(this[i]=p(t,i));if(this.acceleration=0!==this.accelerationX||0!==this.accelerationY,this.moveTo=0!==this.moveToX&&0!==this.moveToY,v(t,"speed")&&(n.speedX.loadConfig(t,"speed"),n.speedY.active=!1),(g(t,["speedX","speedY"])||this.moveTo)&&(this.radial=!1),v(t,"scale")&&(n.scaleX.loadConfig(t,"scale"),n.scaleY.active=!1),v(t,"callbackScope")){var r=p(t,"callbackScope",null);this.emitCallbackScope=r,this.deathCallbackScope=r}if(v(t,"emitZone")&&this.addEmitZone(t.emitZone),v(t,"deathZone")&&this.addDeathZone(t.deathZone),v(t,"bounds")){var s=this.addParticleBounds(t.bounds);s.collideLeft=p(t,"collideLeft",!0),s.collideRight=p(t,"collideRight",!0),s.collideTop=p(t,"collideTop",!0),s.collideBottom=p(t,"collideBottom",!0)}return v(t,"followOffset")&&this.followOffset.setFromObject(p(t,"followOffset",0)),v(t,"texture")&&this.setTexture(t.texture),v(t,"frame")?this.setEmitterFrame(t.frame):v(t,"anim")&&this.setAnim(t.anim),v(t,"reserve")&&this.reserve(t.reserve),v(t,"advance")&&this.fastForward(t.advance),this.resetCounters(this.frequency,this.emitting),this.emitting&&this.emit(c.START,this),this},toJSON:function(){var t=s(this),e=0,i="";for(e=0;e<P.length;e++)t[i=P[e]]=this[i];var n=this.ops;for(e=0;e<F.length;e++)n[i=F[e]]&&(t[i]=n[i].toJSON());return n.speedY.active||(delete t.speedX,t.speed=n.speedX.toJSON()),this.scaleX===this.scaleY&&(delete t.scaleX,delete t.scaleY,t.scale=n.scaleX.toJSON()),t},resetCounters:function(t,e){var i=this.counters;i.fill(0),i[0]=t,e&&(i[5]=1)},startFollow:function(t,e,i,n){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=!1),this.follow=t,this.followOffset.set(e,i),this.trackVisible=n,this},stopFollow:function(){return this.follow=null,this.followOffset.set(0,0),this.trackVisible=!1,this},getFrame:function(){var t,e=this.frames,i=e.length;return 1===i?t=e[0]:this.randomFrame?t=f(e):(t=e[this.currentFrame],this.frameCounter++,this.frameCounter===this.frameQuantity&&(this.frameCounter=0,this.currentFrame++,this.currentFrame===i&&(this.currentFrame=0))),this.texture.get(t)},setEmitterFrame:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomFrame=e,this.frameQuantity=i,this.currentFrame=0;var n=typeof t;if(this.frames.length=0,Array.isArray(t))this.frames=this.frames.concat(t);else if("string"===n||"number"===n)this.frames.push(t);else if("object"===n){var r=t;(t=p(r,"frames",null))&&(this.frames=this.frames.concat(t));var s=p(r,"cycle",!1);this.randomFrame=!s,this.frameQuantity=p(r,"quantity",i)}return 1===this.frames.length&&(this.frameQuantity=1,this.randomFrame=!1),this},getAnim:function(){var t=this.anims,e=t.length;if(0===e)return null;if(1===e)return t[0];if(this.randomAnim)return f(t);var i=t[this.currentAnim];return this.animCounter++,this.animCounter>=this.animQuantity&&(this.animCounter=0,this.currentAnim=L(this.currentAnim+1,0,e)),i},setAnim:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomAnim=e,this.animQuantity=i,this.currentAnim=0;var n=typeof t;if(this.anims.length=0,Array.isArray(t))this.anims=this.anims.concat(t);else if("string"===n)this.anims.push(t);else if("object"===n){var r=t;(t=p(r,"anims",null))&&(this.anims=this.anims.concat(t));var s=p(r,"cycle",!1);this.randomAnim=!s,this.animQuantity=p(r,"quantity",i)}return 1===this.anims.length&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(t){return void 0===t&&(t=!0),this.radial=t,this},addParticleBounds:function(t,e,i,n,r,s,o,a){if("object"==typeof t){var h=t;t=h.x,e=h.y,i=v(h,"w")?h.w:h.width,n=v(h,"h")?h.h:h.height}return this.addParticleProcessor(new O(t,e,i,n,r,s,o,a))},setParticleSpeed:function(t,e){return void 0===e&&(e=t),this.ops.speedX.onChange(t),t===e?this.ops.speedY.active=!1:this.ops.speedY.onChange(e),this.radial=!0,this},setParticleScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.ops.scaleX.onChange(t),this.ops.scaleY.onChange(e),this},setParticleGravity:function(t,e){return this.gravityX=t,this.gravityY=e,this},setParticleAlpha:function(t){return this.ops.alpha.onChange(t),this},setParticleTint:function(t){return this.ops.tint.onChange(t),this},setEmitterAngle:function(t){return this.ops.angle.onChange(t),this},setParticleLifespan:function(t){return this.ops.lifespan.onChange(t),this},setQuantity:function(t){return this.quantity=t,this},setFrequency:function(t,e){return this.frequency=t,this.flowCounter=t>0?t:0,e&&(this.quantity=e),this},addDeathZone:function(t){var e;Array.isArray(t)||(t=[t]);for(var i=[],n=0;n<t.length;n++)if((e=t[n])instanceof a)i.push(e);else if("function"==typeof e.contains)e=new a(e,!0),i.push(e);else{var r=p(e,"type","onEnter"),s=p(e,"source",null);if(s&&"function"==typeof s.contains)e=new a(s,"onEnter"===r),i.push(e)}return this.deathZones=this.deathZones.concat(i),i},removeDeathZone:function(t){return b(this.deathZones,t),this},clearDeathZones:function(){return this.deathZones.length=0,this},addEmitZone:function(t){var e;Array.isArray(t)||(t=[t]);for(var i=[],n=0;n<t.length;n++)if((e=t[n])instanceof _||e instanceof h)i.push(e);else{var r=p(e,"source",null);if(r){var s=p(e,"type","random");if("random"===s&&"function"==typeof r.getRandomPoint)e=new _(r),i.push(e);else if("edge"===s&&"function"==typeof r.getPoints){var o=p(e,"quantity",1),a=p(e,"stepRate",0),l=p(e,"yoyo",!1),u=p(e,"seamless",!0),c=p(e,"total",-1);e=new h(r,o,a,l,u,c),i.push(e)}}}return this.emitZones=this.emitZones.concat(i),i},removeEmitZone:function(t){return b(this.emitZones,t),this.zoneIndex=0,this},clearEmitZones:function(){return this.emitZones.length=0,this.zoneIndex=0,this},getEmitZone:function(t){var e=this.emitZones,i=e.length;if(0!==i){var n=e[this.zoneIndex];n.getPoint(t),n.total>-1&&(this.zoneTotal++,this.zoneTotal===n.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===i&&(this.zoneIndex=0)))}},getDeathZone:function(t){for(var e=this.deathZones,i=0;i<e.length;i++){var n=e[i];if(n.willKill(t))return this.emit(c.DEATH_ZONE,this,t,n),!0}return!1},setEmitZone:function(t){var e;return(e=isFinite(t)?t:this.emitZones.indexOf(t))>=0&&(this.zoneIndex=e),this},addParticleProcessor:function(t){return this.processors.exists(t)||(t.emitter&&t.emitter.removeParticleProcessor(t),this.processors.add(t),t.emitter=this),t},removeParticleProcessor:function(t){return this.processors.exists(t)&&(this.processors.remove(t,!0),t.emitter=null),t},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(t){return this.addParticleProcessor(new m(t))},reserve:function(t){var e=this.dead;if(this.maxParticles>0){var i=this.getParticleCount();i+t>this.maxParticles&&(t=this.maxParticles-(i+t))}for(var n=0;n<t;n++)e.push(new this.particleClass(this));return this},getAliveParticleCount:function(){return this.alive.length},getDeadParticleCount:function(){return this.dead.length},getParticleCount:function(){return this.getAliveParticleCount()+this.getDeadParticleCount()},atLimit:function(){return this.maxParticles>0&&this.getParticleCount()>=this.maxParticles||this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,r=0;r<n;r++)t.call(e,i[r],this);return this},forEachDead:function(t,e){for(var i=this.dead,n=i.length,r=0;r<n;r++)t.call(e,i[r],this);return this},start:function(t,e){return void 0===t&&(t=0),this.emitting||(t>0&&this.fastForward(t),this.emitting=!0,this.resetCounters(this.frequency,!0),void 0!==e&&(this.duration=Math.abs(e)),this.emit(c.START,this)),this},stop:function(t){return void 0===t&&(t=!1),this.emitting&&(this.emitting=!1,t&&this.killAll(),this.emit(c.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(t,e){return void 0===t&&(t=""),void 0===e&&(e=this.true),this.sortProperty=t,this.sortOrderAsc=e,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(t){return t=""!==this.sortProperty?this.depthSortCallback:null,this.sortCallback=t,this},depthSort:function(){return A(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(t,e){var i=this.sortProperty;return this.sortOrderAsc?t[i]-e[i]:e[i]-t[i]},flow:function(t,e,i){return void 0===e&&(e=1),this.emitting=!1,this.frequency=t,this.quantity=e,void 0!==i&&(this.stopAfter=i),this.start()},explode:function(t,e,i){this.frequency=-1,this.resetCounters(-1,!0);var n=this.emitParticle(t,e,i);return this.emit(c.EXPLODE,this,n),n},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},emitParticle:function(t,e,i){if(!this.atLimit()){void 0===t&&(t=this.ops.quantity.onEmit());for(var n=this.dead,r=this.stopAfter,s=this.follow?this.follow.x+this.followOffset.x:e,o=this.follow?this.follow.y+this.followOffset.y:i,a=0;a<t;a++){var h=n.pop();if(h||(h=new this.particleClass(this)),h.fire(s,o)?(this.particleBringToTop?this.alive.push(h):this.alive.unshift(h),this.emitCallback&&this.emitCallback.call(this.emitCallbackScope,h,this)):this.dead.push(h),r>0&&(this.stopCounter++,this.stopCounter>=r))break;if(this.atLimit())break}return h}},fastForward:function(t,e){void 0===e&&(e=1e3/60);var i=0;for(this.skipping=!0;i<Math.abs(t);)this.preUpdate(0,e),i+=e;return this.skipping=!1,this},preUpdate:function(t,e){var i=(e*=this.timeScale)/1e3;this.trackVisible&&(this.visible=this.follow.visible),this.getWorldTransformMatrix(this.worldMatrix);var n=this.getProcessors(),r=this.alive,s=this.dead,o=0,a=[],h=r.length;for(o=0;o<h;o++){var l=r[o];l.update(e,i,n)&&a.push({index:o,particle:l})}if((h=a.length)>0){var u=this.deathCallback,d=this.deathCallbackScope;for(o=h-1;o>=0;o--){var p=a[o];r.splice(p.index,1),s.push(p.particle),u&&u.call(d,p.particle),p.particle.setPosition()}}if(this.emitting||this.skipping){if(0===this.frequency)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=e;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=e,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())}else 1===this.completeFlag&&0===r.length&&(this.completeFlag=0,this.emit(c.COMPLETE,this))},overlap:function(t){for(var e=this.getWorldTransformMatrix(),i=this.alive,n=i.length,r=[],s=0;s<n;s++){var o=i[s];S(t,o.getBounds(e))&&r.push(o)}return r},getBounds:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=1e3/60),void 0===n&&(n=new w);var r,s,a=this.getWorldTransformMatrix(),h=this.alive,l=!1;if(n.setTo(0,0,0,0),e>0){var u=0;for(this.skipping=!0;u<Math.abs(e);){for(this.preUpdate(0,i),r=0;r<h.length;r++)s=h[r].getBounds(a),l?E(n,s):(l=!0,o(s,n));u+=i}this.skipping=!1}else for(r=0;r<h.length;r++)s=h[r].getBounds(a),l?E(n,s):(l=!0,o(s,n));return t>0&&y(n,t,t),n},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(t){this.ops.x.onChange(t)}},particleY:{get:function(){return this.ops.y.current},set:function(t){this.ops.y.onChange(t)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(t){this.ops.accelerationX.onChange(t)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(t){this.ops.accelerationY.onChange(t)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(t){this.ops.maxVelocityX.onChange(t)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(t){this.ops.maxVelocityY.onChange(t)}},speed:{get:function(){return this.ops.speedX.current},set:function(t){this.ops.speedX.onChange(t),this.ops.speedY.onChange(t)}},speedX:{get:function(){return this.ops.speedX.current},set:function(t){this.ops.speedX.onChange(t)}},speedY:{get:function(){return this.ops.speedY.current},set:function(t){this.ops.speedY.onChange(t)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(t){this.ops.moveToX.onChange(t)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(t){this.ops.moveToY.onChange(t)}},bounce:{get:function(){return this.ops.bounce.current},set:function(t){this.ops.bounce.onChange(t)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(t){this.ops.scaleX.onChange(t)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(t){this.ops.scaleY.onChange(t)}},particleColor:{get:function(){return this.ops.color.current},set:function(t){this.ops.color.onChange(t)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(t){this.ops.color.setEase(t)}},particleTint:{get:function(){return this.ops.tint.current},set:function(t){this.ops.tint.onChange(t)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(t){this.ops.alpha.onChange(t)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(t){this.ops.lifespan.onChange(t)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(t){this.ops.angle.onChange(t)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(t){this.ops.rotate.onChange(t)}},quantity:{get:function(){return this.ops.quantity.current},set:function(t){this.ops.quantity.onChange(t)}},delay:{get:function(){return this.ops.delay.current},set:function(t){this.ops.delay.onChange(t)}},hold:{get:function(){return this.ops.hold.current},set:function(t){this.ops.hold.onChange(t)}},flowCounter:{get:function(){return this.counters[0]},set:function(t){this.counters[0]=t}},frameCounter:{get:function(){return this.counters[1]},set:function(t){this.counters[1]=t}},animCounter:{get:function(){return this.counters[2]},set:function(t){this.counters[2]=t}},elapsed:{get:function(){return this.counters[3]},set:function(t){this.counters[3]=t}},stopCounter:{get:function(){return this.counters[4]},set:function(t){this.counters[4]=t}},completeFlag:{get:function(){return this.counters[5]},set:function(t){this.counters[5]=t}},zoneIndex:{get:function(){return this.counters[6]},set:function(t){this.counters[6]=t}},zoneTotal:{get:function(){return this.counters[7]},set:function(t){this.counters[7]=t}},currentFrame:{get:function(){return this.counters[8]},set:function(t){this.counters[8]=t}},currentAnim:{get:function(){return this.counters[9]},set:function(t){this.counters[9]=t}},preDestroy:function(){var t;this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var e=this.ops;for(t=0;t<F.length;t++){e[F[t]].destroy()}for(t=0;t<this.alive.length;t++)this.alive[t].destroy();for(t=0;t<this.dead.length;t++)this.dead[t].destroy();this.ops=null,this.alive=[],this.dead=[],this.worldMatrix.destroy()}});t.exports=I},9871:(t,e,i)=>{var n=i(59996),r=i(61340),s=new r,o=new r,a=new r,h=new r;t.exports=function(t,e,i,r){var l=s,u=o,c=a,d=h;r?(d.loadIdentity(),d.multiply(r),d.translate(e.x,e.y),d.rotate(e.rotation),d.scale(e.scaleX,e.scaleY)):d.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var p=t.currentContext,f=i.roundPixels,m=i.alpha,g=e.alpha,v=e.alive,y=v.length,x=e.viewBounds;if(e.visible&&0!==y&&(!x||n(x,i.worldView))){e.sortCallback&&e.depthSort(),i.addToRenderList(e);var E=e.scrollFactorX,T=e.scrollFactorY;p.save(),p.globalCompositeOperation=t.blendModes[e.blendMode];for(var _=0;_<y;_++){var w=v[_],S=w.alpha*g*m;if(!(S<=0||0===w.scaleX||0===w.scaleY)){c.applyITRS(w.x,w.y,w.rotation,w.scaleX,w.scaleY),l.copyFrom(i.matrix),l.multiplyWithOffset(d,-i.scrollX*E,-i.scrollY*T),c.e=w.x,c.f=w.y,l.multiply(c,u);var b=w.frame,C=b.canvasData;if(C.width>0&&C.height>0){var A=-b.halfWidth,R=-b.halfHeight;p.globalAlpha=S,p.save(),u.setToContext(p),f&&(A=Math.round(A),R=Math.round(R)),p.imageSmoothingEnabled=!b.source.scaleMode,p.drawImage(b.source.image,C.x,C.y,C.width,C.height,A,R,C.width,C.height),p.restore()}}}p.restore()}}},92730:(t,e,i)=>{var n=i(25305),r=i(44603),s=i(23568),o=i(95540),a=i(31600);r.register("particles",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),r=o(t,"config",null),h=new a(this.scene,0,0,i);return void 0!==e&&(t.add=e),n(this.scene,h,t),r&&h.setConfig(r),h}))},676:(t,e,i)=>{var n=i(39429),r=i(31600);n.register("particles",(function(t,e,i,n){return void 0!==t&&"string"==typeof t&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new r(this.scene,t,e,i,n))}))},90668:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(21188),s=i(9871),t.exports={renderWebGL:r,renderCanvas:s}},21188:(t,e,i)=>{var n=i(59996),r=i(61340),s=i(70554),o=new r,a=new r,h=new r,l=new r;t.exports=function(t,e,i,r){var u=t.pipelines.set(e.pipeline),c=o,d=a,p=h,f=l;r?(f.loadIdentity(),f.multiply(r),f.translate(e.x,e.y),f.rotate(e.rotation),f.scale(e.scaleX,e.scaleY)):f.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var m=s.getTintAppendFloatAlpha,g=i.alpha,v=e.alpha;t.pipelines.preBatch(e);var y=e.alive,x=y.length,E=e.viewBounds;if(0!==x&&(!E||n(E,i.worldView))){e.sortCallback&&e.depthSort(),i.addToRenderList(e),c.copyFrom(i.matrix),c.multiplyWithOffset(f,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),t.setBlendMode(e.blendMode),e.mask&&(e.mask.preRenderWebGL(t,e,i),t.pipelines.set(e.pipeline));for(var T,_,w=e.tintFill,S=0;S<x;S++){var b=y[S],C=b.alpha*v*g;if(!(C<=0||0===b.scaleX||0===b.scaleY)){p.applyITRS(b.x,b.y,b.rotation,b.scaleX,b.scaleY),p.e=b.x,p.f=b.y,c.multiply(p,d);var A=b.frame;A.glTexture!==_&&(_=A.glTexture,T=u.setGameObject(e,A));var R=-A.halfWidth,M=-A.halfHeight,L=d.setQuad(R,M,R+A.width,M+A.height),O=m(b.tint,C);u.shouldFlush(6)&&(u.flush(),T=u.setGameObject(e,A)),u.batchQuad(e,L[0],L[1],L[2],L[3],L[4],L[5],L[6],L[7],A.u0,A.v0,A.u1,A.v1,O,O,O,O,w,_,T)}}e.mask&&e.mask.postRenderWebGL(t,i),t.pipelines.postBatch(e)}}},20286:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=!0),this.emitter,this.x=t,this.y=e,this.active=i},update:function(){},destroy:function(){this.emitter=null}});t.exports=n},9774:t=>{t.exports="complete"},812:t=>{t.exports="deathzone"},30522:t=>{t.exports="explode"},96695:t=>{t.exports="start"},18677:t=>{t.exports="stop"},20696:(t,e,i)=>{t.exports={COMPLETE:i(9774),DEATH_ZONE:i(812),EXPLODE:i(30522),START:i(96695),STOP:i(18677)}},18404:(t,e,i)=>{t.exports={EmitterColorOp:i(76472),EmitterOp:i(44777),Events:i(20696),GravityWell:i(24502),Particle:i(56480),ParticleBounds:i(69601),ParticleEmitter:i(31600),ParticleProcessor:i(20286),Zones:i(21024)}},26388:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=t.worldPosition,i=this.source.contains(e.x,e.y);return i&&this.killOnEnter||!i&&!this.killOnEnter}});t.exports=n},19909:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e,i,n,r,s){void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===s&&(s=-1),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=r,this._length=0,this._direction=0,this.total=s,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._length<i&&this.counter>this._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},68875:(t,e,i)=>{var n=i(83419),r=i(26099),s=new n({initialize:function(t){this.source=t,this._tempVec=new r,this.total=-1},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=s},21024:(t,e,i)=>{t.exports={DeathZone:i(26388),EdgeZone:i(19909),RandomZone:i(68875)}},1159:(t,e,i)=>{var n=i(83419),r=i(31401),s=i(68287),o=new n({Extends:s,Mixins:[r.PathFollower],initialize:function(t,e,i,n,r,o){s.call(this,t,i,n,r,o),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=o},90145:(t,e,i)=>{var n=i(39429),r=i(1159);n.register("follower",(function(t,e,i,n,s){var o=new r(this.scene,t,e,i,n,s);return this.displayList.add(o),this.updateList.add(o),o}))},33663:(t,e,i)=>{var n=i(9674),r=i(83419),s=i(48803),o=i(90664),a=i(4703),h=i(45650),l=new r({Extends:a,initialize:function(t,e,i,r,s,o,h,l){r||(r="__DEFAULT"),a.call(this,t,e,i,r,s),this.type="Plane",this.anims=new n(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(o,h,l),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return.5}},originY:{get:function(){return.5}},setGridSize:function(t,e,i){void 0===t&&(t=8),void 0===e&&(e=8),void 0===i&&(i=!1);var n=!1;return i&&(n=!0),this.gridWidth=t,this.gridHeight=e,this.isTiled=i,this.clear(),s({mesh:this,widthSegments:t,heightSegments:e,isOrtho:!1,tile:i,flipY:n}),this},setSizeToFrame:function(t){void 0===t&&(t=!0);var e=this.frame;if(this.setPerspective(this.width/e.width,this.height/e.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!t)return this;var i,n,r=this.gridWidth,s=this.gridHeight,o=this.vertices,a=e.u0,h=e.u1,l=e.v0,u=e.v1,c=0;if(this.isTiled)for(l=e.v1,u=e.v0,n=0;n<s;n++)for(i=0;i<r;i++)o[c++].setUVs(a,u),o[c++].setUVs(a,l),o[c++].setUVs(h,u),o[c++].setUVs(a,l),o[c++].setUVs(h,l),o[c++].setUVs(h,u);else{var d=r+1,p=s+1,f=h-a,m=u-l,g=[];for(n=0;n<p;n++)for(i=0;i<d;i++){var v=a+f*(i/r),y=l+m*(n/s);g.push(v,y)}for(n=0;n<s;n++)for(i=0;i<r;i++){var x=2*(i+d*n),E=2*(i+d*(n+1)),T=2*(i+1+d*(n+1)),_=2*(i+1+d*n);o[c++].setUVs(g[x],g[x+1]),o[c++].setUVs(g[E],g[E+1]),o[c++].setUVs(g[_],g[_+1]),o[c++].setUVs(g[E],g[E+1]),o[c++].setUVs(g[T],g[T+1]),o[c++].setUVs(g[_],g[_+1])}}return this},setViewHeight:function(t){void 0===t&&(t=this.frame.height);var e=this.fov*(Math.PI/180);this.viewPosition.z=this.height/t/Math.tan(e/2),this.dirtyCache[10]=1},createCheckerboard:function(t,e,i,n,r){void 0===t&&(t=16777215),void 0===e&&(e=255),void 0===i&&(i=255),void 0===n&&(n=255),void 0===r&&(r=128);for(var s=o(t),a=o(e),l=[],u=0;u<16;u++)for(var c=0;c<16;c++)u<8&&c<8||u>7&&c>7?l.push(s.r,s.g,s.b,i):l.push(a.r,a.g,a.b,n);var d=this.scene.sys.textures.addUint8Array(h(),new Uint8Array(l),16,16);return this.removeCheckerboard(),this.setTexture(d),this.setSizeToFrame(),this.setViewHeight(r),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},preUpdate:function(t,e){a.prototype.preUpdate.call(this,t,e),this.anims.update(t,e)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});t.exports=l},56015:(t,e,i)=>{var n=i(25305),r=i(13059),s=i(44603),o=i(23568),a=i(35154),h=i(33663);s.register("plane",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),s=o(t,"frame",null),l=a(t,"width",8),u=a(t,"height",8),c=a(t,"tile",!1),d=new h(this.scene,0,0,i,s,l,u,c);void 0!==e&&(t.add=e);var p=a(t,"checkerboard",null);if(p){var f=a(p,"color1",16777215),m=a(p,"color2",255),g=a(p,"alpha1",255),v=a(p,"alpha2",255),y=a(p,"height",128);d.createCheckerboard(f,m,g,v,y)}return n(this.scene,d,t),r(d,t),d}))},30985:(t,e,i)=>{var n=i(33663);i(39429).register("plane",(function(t,e,i,r,s,o,a){return this.displayList.add(new n(this.scene,t,e,i,r,s,o,a))}))},80321:(t,e,i)=>{var n=i(83419),r=i(31401),s=i(95643),o=i(30100),a=i(36060),h=i(67277),l=new n({Extends:s,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Transform,r.Visible,h],initialize:function(t,e,i,n,r,h,l){void 0===n&&(n=16777215),void 0===r&&(r=128),void 0===h&&(h=1),void 0===l&&(l=.1),s.call(this,t,"PointLight"),this.initPipeline(a.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(e,i),this.color=o(n),this.intensity=h,this.attenuation=l,this.width=2*r,this.height=2*r,this._radius=r},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.width=2*t,this.height=2*t}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});t.exports=l},39829:(t,e,i)=>{var n=i(25305),r=i(44603),s=i(23568),o=i(80321);r.register("pointlight",(function(t,e){void 0===t&&(t={});var i=s(t,"color",16777215),r=s(t,"radius",128),a=s(t,"intensity",1),h=s(t,"attenuation",.1),l=new o(this.scene,0,0,i,r,a,h);return void 0!==e&&(t.add=e),n(this.scene,l,t),l}))},71255:(t,e,i)=>{var n=i(39429),r=i(80321);n.register("pointlight",(function(t,e,i,n,s,o){return this.displayList.add(new r(this.scene,t,e,i,n,s,o))}))},67277:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(57787),t.exports={renderWebGL:r,renderCanvas:s}},57787:(t,e,i)=>{var n=i(91296);t.exports=function(t,e,i,r){i.addToRenderList(e);var s=t.pipelines.set(e.pipeline),o=n(e,i,r).calc,a=e.width,h=e.height,l=-e._radius,u=-e._radius,c=l+a,d=u+h,p=o.getX(0,0),f=o.getY(0,0),m=o.getX(l,u),g=o.getY(l,u),v=o.getX(l,d),y=o.getY(l,d),x=o.getX(c,d),E=o.getY(c,d),T=o.getX(c,u),_=o.getY(c,u);t.pipelines.preBatch(e),s.batchPointLight(e,i,m,g,v,y,x,E,T,_,p,f),t.pipelines.postBatch(e)}},591:(t,e,i)=>{var n=i(83419),r=i(81320),s=i(88571),o=new n({Extends:s,initialize:function(t,e,i,n,o){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=32),void 0===o&&(o=32);var a=new r(t.sys.textures,"",n,o);s.call(this,t,e,i,a),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(t,e){this.width=t,this.height=e,this.texture.setSize(t,e),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},resize:function(t,e){return this.setSize(t,e),this},saveTexture:function(t){var e=this.texture;return e.key=t,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(t,e,i,n,r,s){return this.texture.fill(t,e,i,n,r,s),this},clear:function(){return this.texture.clear(),this},stamp:function(t,e,i,n,r){return this.texture.stamp(t,e,i,n,r),this},erase:function(t,e,i){return this.texture.erase(t,e,i),this},draw:function(t,e,i,n,r){return this.texture.draw(t,e,i,n,r),this},drawFrame:function(t,e,i,n,r,s){return this.texture.drawFrame(t,e,i,n,r,s),this},repeat:function(t,e,i,n,r,s,o,a,h){return this.texture.repeat(t,e,i,n,r,s,o,a,h),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(t,e,i,n,r){return this.texture.batchDraw(t,e,i,n,r),this},batchDrawFrame:function(t,e,i,n,r,s){return this.texture.batchDrawFrame(t,e,i,n,r,s),this},endDraw:function(t){return this.texture.endDraw(t),this},snapshotArea:function(t,e,i,n,r,s,o){return this.texture.snapshotArea(t,e,i,n,r,s,o),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});t.exports=o},34495:(t,e,i)=>{var n=i(25305),r=i(44603),s=i(23568),o=i(591);r.register("renderTexture",(function(t,e){void 0===t&&(t={});var i=s(t,"x",0),r=s(t,"y",0),a=s(t,"width",32),h=s(t,"height",32),l=new o(this.scene,i,r,a,h);return void 0!==e&&(t.add=e),n(this.scene,l,t),l}))},60505:(t,e,i)=>{var n=i(39429),r=i(591);n.register("renderTexture",(function(t,e,i,n){return this.displayList.add(new r(this.scene,t,e,i,n))}))},77757:(t,e,i)=>{var n=i(9674),r=i(83419),s=i(31401),o=i(95643),a=i(36060),h=i(38745),l=i(26099),u=new r({Extends:o,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Flip,s.Mask,s.Pipeline,s.PostPipeline,s.Size,s.Texture,s.Transform,s.Visible,s.ScrollFactor,h],initialize:function(t,e,i,r,s,h,u,c,d){void 0===r&&(r="__DEFAULT"),void 0===h&&(h=2),void 0===u&&(u=!0),o.call(this,t,"Rope"),this.anims=new n(this),this.points=h,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===r,this.dirty=!1,this.horizontal=u,this._flipX=!1,this._flipY=!1,this._perp=new l,this.debugCallback=null,this.debugGraphic=null,this.setTexture(r,s),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline(a.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(h)&&this.resizeArrays(h.length),this.setPoints(h,c,d),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){var i=this.anims.currentFrame;this.anims.update(t,e),this.anims.currentFrame!==i&&(this.updateUVs(),this.updateVertices())},play:function(t,e,i){return this.anims.play(t,e,i),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(t,e,i))},setVertical:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(t,e,i)):this},setTintFill:function(t){return void 0===t&&(t=!1),this.tintFill=t,this},setAlphas:function(t,e){var i=this.points.length;if(i<1)return this;var n,r=this.alphas;void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]);var s=0;if(void 0!==e)for(n=0;n<i;n++)r[s=2*n]=t,r[s+1]=e;else if(t.length===i)for(n=0;n<i;n++)r[s=2*n]=t[n],r[s+1]=t[n];else{var o=t[0];for(n=0;n<i;n++)s=2*n,t.length>s&&(o=t[s]),r[s]=o,t.length>s+1&&(o=t[s+1]),r[s+1]=o}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,n=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var r=0;if(t.length===e)for(i=0;i<e;i++)n[r=2*i]=t[i],n[r+1]=t[i];else{var s=t[0];for(i=0;i<e;i++)r=2*i,t.length>r&&(s=t[r]),n[r]=s,t.length>r+1&&(s=t[r+1]),n[r+1]=s}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,r,s,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(s=-this.frame.halfWidth,r=this.frame.width/(o-1),n=0;n<o;n++)t.push({x:s+n*r,y:0});else for(s=-this.frame.halfHeight,r=this.frame.height/(o-1),n=0;n<o;n++)t.push({x:0,y:s+n*r})}var a=t.length,h=this.points.length;return a<1?(console.warn("Rope: Not enough points given"),this):(1===a&&(t.unshift({x:0,y:0}),a++),h!==a&&this.resizeArrays(a),this.dirty=!0,this.points=t,this.updateUVs(),null!=e&&this.setColors(e),null!=i&&this.setAlphas(i),this)},updateUVs:function(){for(var t=this.uv,e=this.points.length,i=this.frame.u0,n=this.frame.v0,r=this.frame.u1,s=this.frame.v1,o=(r-i)/(e-1),a=(s-n)/(e-1),h=0;h<e;h++){var l,u,c,d,p=4*h;this.horizontal?(this._flipX?(l=r-h*o,c=r-h*o):(l=i+h*o,c=i+h*o),this._flipY?(u=s,d=n):(u=n,d=s)):(this._flipX?(l=i,c=r):(l=r,c=i),this._flipY?(u=s-h*a,d=s-h*a):(u=n+h*a,d=n+h*a)),t[p+0]=l,t[p+1]=u,t[p+2]=c,t[p+3]=d}return this},resizeArrays:function(t){var e=this.colors,i=this.alphas;this.vertices=new Float32Array(4*t),this.uv=new Float32Array(4*t),e=new Uint32Array(2*t),i=new Float32Array(2*t);for(var n=0;n<2*t;n++)e[n]=16777215,i[n]=1;return this.colors=e,this.alphas=i,this.dirty=!0,this},updateVertices:function(){var t=this._perp,e=this.points,i=this.vertices,n=e.length;if(this.dirty=!1,!(n<1)){for(var r,s=e[0],o=this.horizontal?this.frame.halfHeight:this.frame.halfWidth,a=0;a<n;a++){var h=e[a],l=4*a;r=a<n-1?e[a+1]:h,t.x=r.y-s.y,t.y=-(r.x-s.x);var u=t.length();t.x/=u,t.y/=u,t.x*=o,t.y*=o,i[l]=h.x+t.x,i[l+1]=h.y+t.y,i[l+2]=h.x-t.x,i[l+3]=h.y-t.y,s=h}return this}},setDebug:function(t,e){return this.debugGraphic=t,this.debugCallback=t||e?e||this.renderDebugVerts:null,this},renderDebugVerts:function(t,e,i){var n=t.debugGraphic,r=i[0],s=i[1],o=i[2],a=i[3];n.lineBetween(r,s,o,a);for(var h=4;h<e;h+=4){var l=i[h+0],u=i[h+1],c=i[h+2],d=i[h+3];n.lineBetween(r,s,l,u),n.lineBetween(o,a,c,d),n.lineBetween(o,a,l,u),n.lineBetween(l,u,c,d),r=l,s=u,o=c,a=d}},preDestroy:function(){this.anims.destroy(),this.anims=void 0,this.points=null,this.vertices=null,this.uv=null,this.colors=null,this.alphas=null,this.debugCallback=null,this.debugGraphic=null},flipX:{get:function(){return this._flipX},set:function(t){return this._flipX=t,this.updateUVs()}},flipY:{get:function(){return this._flipY},set:function(t){return this._flipY=t,this.updateUVs()}}});t.exports=u},95262:t=>{t.exports=function(){}},26209:(t,e,i)=>{var n=i(25305),r=i(44603),s=i(23568),o=i(35154),a=i(77757);r.register("rope",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),r=s(t,"frame",null),h=s(t,"horizontal",!0),l=o(t,"points",void 0),u=o(t,"colors",void 0),c=o(t,"alphas",void 0),d=new a(this.scene,0,0,i,r,l,h,u,c);return void 0!==e&&(t.add=e),n(this.scene,d,t),d}))},96819:(t,e,i)=>{var n=i(77757);i(39429).register("rope",(function(t,e,i,r,s,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,r,s,o,a,h))}))},38745:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(20439),s=i(95262),t.exports={renderWebGL:r,renderCanvas:s}},20439:(t,e,i)=>{var n=i(91296),r=i(70554);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),a=n(e,i,s).calc,h=e.vertices,l=e.uv,u=e.colors,c=e.alphas,d=e.alpha,p=r.getTintAppendFloatAlpha,f=i.roundPixels,m=h.length,g=Math.floor(.5*m);o.flush(),t.pipelines.preBatch(e);var v=o.setGameObject(e),y=o.vertexViewF32,x=o.vertexViewU32,E=o.vertexCount*o.currentShader.vertexComponentCount-1,T=0,_=e.tintFill;e.dirty&&e.updateVertices();for(var w=e.debugCallback,S=[],b=0;b<m;b+=2){var C=h[b+0],A=h[b+1],R=C*a.a+A*a.c+a.e,M=C*a.b+A*a.d+a.f;f&&(R=Math.round(R),M=Math.round(M)),y[++E]=R,y[++E]=M,y[++E]=l[b+0],y[++E]=l[b+1],y[++E]=v,y[++E]=_,x[++E]=p(u[T],i.alpha*(c[T]*d)),T++,w&&(S[b+0]=R,S[b+1]=M)}w&&w.call(e,e,m,S),o.vertexCount+=g,o.currentBatch.count=o.vertexCount-o.currentBatch.start,t.pipelines.postBatch(e)}},20071:(t,e,i)=>{var n=i(83419),r=i(31401),s=i(95643),o=i(95540),a=i(79291),h=i(61622),l=i(25479),u=i(61340),c=i(95428),d=i(92503),p=new n({Extends:s,Mixins:[r.ComputedSize,r.Depth,r.GetBounds,r.Mask,r.Origin,r.ScrollFactor,r.Transform,r.Visible,l],initialize:function(t,e,i,n,r,o,a,h){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=128),void 0===o&&(o=128),s.call(this,t,"Shader"),this.blendMode=-1,this.shader;var l=t.sys.renderer;this.renderer=l,this.gl=l.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=l.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=l.width,this._rendererHeight=l.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,n),this.setSize(r,o),this.setOrigin(.5,.5),this.setShader(e,a,h),this.renderer.on(d.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(t){return!!this.renderToTexture||!(s.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){if(void 0===e&&(e=!1),!this.renderToTexture){var i=this.width,n=this.height,r=this.renderer;this.glTexture=r.createTextureFromSource(null,i,n,0),this.glTexture.flipY=e,this.framebuffer=r.createFramebuffer(i,n,this.glTexture,!1),this._rendererWidth=i,this._rendererHeight=n,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture))}return this.shader&&(r.pipelines.clear(),this.load(),this.flush(),r.pipelines.rebind()),this},setShader:function(t,e,i){if(this.renderer.contextLost)return this._deferSetShader={key:t,textures:e,textureData:i},this;if(void 0===e&&(e=[]),"string"==typeof t){var n=this.scene.sys.cache.shader;if(!n.has(t))return console.warn("Shader missing: "+t),this;this.shader=n.get(t)}else this.shader=t;var r=this.gl,s=this.renderer;this.program&&s.deleteProgram(this.program);var o=s.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);r.uniformMatrix4fv(r.getUniformLocation(o.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),r.uniformMatrix4fv(r.getUniformLocation(o.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),r.uniform2f(r.getUniformLocation(o.webGLProgram,"uResolution"),this.width,this.height),this.program=o;var h=new Date,l={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[h.getFullYear(),h.getMonth(),h.getDate(),60*h.getHours()*60+60*h.getMinutes()+h.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=a(!0,{},this.shader.uniforms,l):this.uniforms=l;for(var u=0;u<4;u++)e[u]&&this.setSampler2D("iChannel"+u,e[u],u,i);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,n){if(this.renderer.contextLost)this._deferProjOrtho={left:t,right:e,bottom:i,top:n};else{var r=1/(t-e),s=1/(i-n),o=this.projectionMatrix;o[0]=-2*r,o[5]=-2*s,o[10]=-.001,o[12]=(t+e)*r,o[13]=(n+i)*s,o[14]=-0;var a=this.program,h=this.gl;this.renderer.setProgram(a),h.uniformMatrix4fv(h.getUniformLocation(a.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i}},initUniforms:function(){var t=this.renderer.glFuncMap,e=this.program;for(var i in this._textureCount=0,this.uniforms){var n=this.uniforms[i],r=n.type,s=t[r];n.uniformLocation=this.renderer.createUniformLocation(e,i),"sampler2D"!==r&&(n.glMatrix=s.matrix,n.glValueLength=s.length,n.glFunc=s.func)}},setSampler2DBuffer:function(t,e,i,n,r,s){void 0===r&&(r=0),void 0===s&&(s={});var o=this.uniforms[t];return o.value=e,s.width=i,s.height=n,o.textureData=s,this._textureCount=r,this.initSampler2D(o),this},setSampler2D:function(t,e,i,n){void 0===i&&(i=0);var r=this.scene.sys.textures;if(r.exists(e)){var s=r.getFrame(e);if(s.glTexture&&s.glTexture.isRenderTexture)return this.setSampler2DBuffer(t,s.glTexture,s.width,s.height,i,n);var o=this.uniforms[t],a=s.source;o.textureKey=e,o.source=a.image,o.value=s.glTexture,a.isGLTexture&&(n||(n={}),n.width=a.width,n.height=a.height),n&&(o.textureData=n),this._textureCount=i,this.initSampler2D(o)}return this},setUniform:function(t,e){return h(this.uniforms,t,e),this},getUniform:function(t){return o(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){if(t.value){var e=this.gl;e.activeTexture(e.TEXTURE0+this._textureCount),e.bindTexture(e.TEXTURE_2D,t.value.webGLTexture);var i=t.textureData;if(i&&!t.value.isRenderTexture){var n=t.value,r=e[o(i,"magFilter","linear").toUpperCase()],s=e[o(i,"minFilter","linear").toUpperCase()],a=e[o(i,"wrapS","repeat").toUpperCase()],h=e[o(i,"wrapT","repeat").toUpperCase()],l=e[o(i,"format","rgba").toUpperCase()];if(i.repeat&&(a=e.REPEAT,h=e.REPEAT),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!i.flipY),i.width){var u=o(i,"width",512),c=o(i,"height",2),d=o(i,"border",0);e.texImage2D(e.TEXTURE_2D,0,l,u,c,d,l,e.UNSIGNED_BYTE,null),n.width=u,n.height=c}else e.texImage2D(e.TEXTURE_2D,0,l,e.RGBA,e.UNSIGNED_BYTE,t.source);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,h),n.magFilter=r,n.minFilter=s,n.wrapS=a,n.wrapT=h,n.format=l,n.flipY=!!i.flipY,n.pixels=t.source}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var t,e,i,n,r,s=this.gl,o=this.uniforms,a=0;for(var h in o)i=(t=o[h]).glFunc,e=t.glValueLength,n=t.uniformLocation,null!==(r=t.value)&&(1===e?t.glMatrix?i.call(s,n.webGLUniformLocation,t.transpose,r):i.call(s,n.webGLUniformLocation,r):2===e?i.call(s,n.webGLUniformLocation,r.x,r.y):3===e?i.call(s,n.webGLUniformLocation,r.x,r.y,r.z):4===e?i.call(s,n.webGLUniformLocation,r.x,r.y,r.z,r.w):"sampler2D"===t.type&&(s.activeTexture(s.TEXTURE0+a),s.bindTexture(s.TEXTURE_2D,r.webGLTexture),s.uniform1i(n.webGLUniformLocation,a),a++))},load:function(t){var e=this.gl,i=this.width,n=this.height,r=this.renderer,s=this.program,o=this.viewMatrix;if(!this.renderToTexture){var a=-this._displayOriginX,h=-this._displayOriginY;o[0]=t[0],o[1]=t[1],o[4]=t[2],o[5]=t[3],o[8]=t[4],o[9]=t[5],o[12]=o[0]*a+o[4]*h,o[13]=o[1]*a+o[5]*h}e.useProgram(s.webGLProgram),e.uniformMatrix4fv(e.getUniformLocation(s.webGLProgram,"uViewMatrix"),!1,o),e.uniformMatrix4fv(e.getUniformLocation(s.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),e.uniform2f(e.getUniformLocation(s.webGLProgram,"uResolution"),this.width,this.height);var l=this.uniforms,u=l.resolution;u.value.x=i,u.value.y=n,l.time.value=r.game.loop.getDuration();var c=this.pointer;if(c){var d=l.mouse,p=c.x/i,f=1-c.y/n;d.value.x=p.toFixed(2),d.value.y=f.toFixed(2)}this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,n=this.gl,r=this.vertexBuffer,s=this.renderer,o=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(s.setFramebuffer(this.framebuffer),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT)),n.bindBuffer(n.ARRAY_BUFFER,r.webGLBuffer);var a=n.getAttribLocation(i.webGLProgram,"inPosition");-1!==a&&(n.enableVertexAttribArray(a),n.vertexAttribPointer(a,2,n.FLOAT,!1,o,0));var h=this.vertexViewF32;h[3]=e,h[4]=t,h[5]=e,h[8]=t,h[9]=e,h[10]=t;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,6*o)),n.drawArrays(n.TRIANGLES,0,6),this.renderToTexture&&s.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(null!==this._deferSetShader){var t=this._deferSetShader.key,e=this._deferSetShader.textures,i=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(t,e,i)}if(null!==this._deferProjOrtho){var n=this._deferProjOrtho.left,r=this._deferProjOrtho.right,s=this._deferProjOrtho.bottom,o=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(n,r,s,o)}},preDestroy:function(){var t=this.renderer;t.off(d.RESTORE_WEBGL,this.onContextRestored,this),t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(t.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),c(this.uniforms,(function(e){t.deleteUniformLocation(e.uniformLocation),e.uniformLocation=null}))}});t.exports=p},80464:t=>{t.exports=function(){}},54935:(t,e,i)=>{var n=i(25305),r=i(44603),s=i(23568),o=i(20071);r.register("shader",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),r=s(t,"x",0),a=s(t,"y",0),h=s(t,"width",128),l=s(t,"height",128),u=new o(this.scene,i,r,a,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u}))},74177:(t,e,i)=>{var n=i(20071);i(39429).register("shader",(function(t,e,i,r,s,o,a){return this.displayList.add(new n(this.scene,t,e,i,r,s,o,a))}))},25479:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(19257),s=i(80464),t.exports={renderWebGL:r,renderCanvas:s}},19257:(t,e,i)=>{var n=i(91296);t.exports=function(t,e,i,r){if(e.shader){if(i.addToRenderList(e),t.pipelines.clear(),e.renderToTexture)e.load(),e.flush();else{var s=n(e,i,r).calc;t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(s.matrix),e.flush()}t.pipelines.rebind()}}},10441:(t,e,i)=>{var n=i(70554);t.exports=function(t,e,i,r,s,o){for(var a=n.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*r),h=i.pathData,l=i.pathIndexes,u=0;u<l.length;u+=3){var c=2*l[u],d=2*l[u+1],p=2*l[u+2],f=h[c+0]-s,m=h[c+1]-o,g=h[d+0]-s,v=h[d+1]-o,y=h[p+0]-s,x=h[p+1]-o,E=e.getX(f,m),T=e.getY(f,m),_=e.getX(g,v),w=e.getY(g,v),S=e.getX(y,x),b=e.getY(y,x);t.batchTri(i,E,T,_,w,S,b,0,0,1,1,a,a,a,2)}}},65960:t=>{t.exports=function(t,e,i,n){var r=i||e.fillColor,s=n||e.fillAlpha,o=(16711680&r)>>>16,a=(65280&r)>>>8,h=255&r;t.fillStyle="rgba("+o+","+a+","+h+","+s+")"}},75177:t=>{t.exports=function(t,e,i,n){var r=i||e.strokeColor,s=n||e.strokeAlpha,o=(16711680&r)>>>16,a=(65280&r)>>>8,h=255&r;t.strokeStyle="rgba("+o+","+a+","+h+","+s+")",t.lineWidth=e.lineWidth}},17803:(t,e,i)=>{var n=i(83419),r=i(31401),s=i(95643),o=i(23031),a=new n({Extends:s,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Transform,r.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),s.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}});t.exports=a},34682:(t,e,i)=>{var n=i(70554);t.exports=function(t,e,i,r,s){var o=t.strokeTint,a=n.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-r,p=h[1]-s;e.closePath||(l-=2);for(var f=2;f<l;f+=2){var m=h[f]-r,g=h[f+1]-s;t.batchLine(d,p,m,g,c,c,u,f-2,!!e.closePath&&f===l-1),d=m,p=g}}},23629:(t,e,i)=>{var n=i(13609),r=i(83419),s=i(39506),o=i(94811),a=i(96503),h=i(36383),l=i(17803),u=new r({Extends:l,Mixins:[n],initialize:function(t,e,i,n,r,s,o,h,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===r&&(r=0),void 0===s&&(s=360),void 0===o&&(o=!1),l.call(this,t,"Arc",new a(0,0,n)),this._startAngle=r,this._endAngle=s,this._anticlockwise=o,this._iterations=.01,this.setPosition(e,i);var c=2*this.geom.radius;this.setSize(c,c),void 0!==h&&this.setFillStyle(h,u),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){this.geom.radius=t;var e=2*t;this.setSize(e,e),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return void 0===t&&(t=.01),this.iterations=t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},updateData:function(){var t=this._iterations,e=t,i=this.geom.radius,n=s(this._startAngle),r=s(this._endAngle),a=i,l=i;r-=n,this._anticlockwise?r<-h.PI2?r=-h.PI2:r>0&&(r=-h.PI2+r%h.PI2):r>h.PI2?r=h.PI2:r<0&&(r=h.PI2+r%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=r*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=r+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},42542:(t,e,i)=>{var n=i(39506),r=i(65960),s=i(75177),o=i(20926);t.exports=function(t,e,i,a){i.addToRenderList(e);var h=t.currentContext;if(o(t,h,e,i,a)){var l=e.radius;h.beginPath(),h.arc(l-e.originX*(2*l),l-e.originY*(2*l),l,n(e._startAngle),n(e._endAngle),e.anticlockwise),e.closePath&&h.closePath(),e.isFilled&&(r(h,e),h.fill()),e.isStroked&&(s(h,e),h.stroke()),h.restore()}}},42563:(t,e,i)=>{var n=i(23629),r=i(39429);r.register("arc",(function(t,e,i,r,s,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,r,s,o,a,h))})),r.register("circle",(function(t,e,i,r,s){return this.displayList.add(new n(this.scene,t,e,i,0,360,!1,r,s))}))},13609:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(41447),s=i(42542),t.exports={renderWebGL:r,renderCanvas:s}},41447:(t,e,i)=>{var n=i(91296),r=i(10441),s=i(34682);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&r(a,l,e,d,u,c),e.isStroked&&s(a,e,d,u,c),t.pipelines.postBatch(e)}},89:(t,e,i)=>{var n=i(83419),r=i(33141),s=i(94811),o=i(87841),a=i(17803),h=new n({Extends:a,Mixins:[r],initialize:function(t,e,i,n,r,s){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==r&&this.setFillStyle(r,s),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),r=0;r<n.length;r++)i.push(n[r].x,n[r].y);return i.push(n[0].x,n[0].y),this.pathIndexes=s(i),this.pathData=i,this}});t.exports=h},3170:(t,e,i)=>{var n=i(65960),r=i(75177),s=i(20926);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=e._displayOriginX+e._curveBounds.x,l=e._displayOriginY+e._curveBounds.y,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f<c;f+=2){var m=u[f]-h,g=u[f+1]-l;a.lineTo(m,g)}e.closePath&&a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(r(a,e),a.stroke()),a.restore()}}},40511:(t,e,i)=>{var n=i(39429),r=i(89);n.register("curve",(function(t,e,i,n,s){return this.displayList.add(new r(this.scene,t,e,i,n,s))}))},33141:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(53987),s=i(3170),t.exports={renderWebGL:r,renderCanvas:s}},53987:(t,e,i)=>{var n=i(10441),r=i(91296),s=i(34682);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=r(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX+e._curveBounds.x,c=e._displayOriginY+e._curveBounds.y,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(a,l,e,d,u,c),e.isStroked&&s(a,e,d,u,c),t.pipelines.postBatch(e)}},19921:(t,e,i)=>{var n=i(83419),r=i(94811),s=i(54205),o=i(8497),a=i(17803),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,r,s,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===r&&(r=128),a.call(this,t,"Ellipse",new o(n/2,r/2,n,r)),this._smoothness=64,this.setPosition(e,i),this.width=n,this.height=r,void 0!==s&&this.setFillStyle(s,h),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setPosition(t/2,e/2),this.geom.setSize(t,e),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i<e.length;i++)t.push(e[i].x,e[i].y);return t.push(e[0].x,e[0].y),this.pathIndexes=r(t),this.pathData=t,this}});t.exports=h},7930:(t,e,i)=>{var n=i(65960),r=i(75177),s=i(20926);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f<c;f+=2){var m=u[f]-h,g=u[f+1]-l;a.lineTo(m,g)}a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(r(a,e),a.stroke()),a.restore()}}},1543:(t,e,i)=>{var n=i(19921);i(39429).register("ellipse",(function(t,e,i,r,s,o){return this.displayList.add(new n(this.scene,t,e,i,r,s,o))}))},54205:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(19467),s=i(7930),t.exports={renderWebGL:r,renderCanvas:s}},19467:(t,e,i)=>{var n=i(10441),r=i(91296),s=i(34682);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=r(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(a,l,e,d,u,c),e.isStroked&&s(a,e,d,u,c),t.pipelines.postBatch(e)}},30479:(t,e,i)=>{var n=i(83419),r=i(17803),s=i(26015),o=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,n,s,o,a,h,l,u,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===s&&(s=128),void 0===o&&(o=32),void 0===a&&(a=32),r.call(this,t,"Grid",null),this.cellWidth=o,this.cellHeight=a,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(n,s),this.setFillStyle(h,l),void 0!==u&&this.setOutlineStyle(u,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=o},49912:(t,e,i)=>{var n=i(65960),r=i(75177),s=i(20926);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=-e._displayOriginX,l=-e._displayOriginY,u=i.alpha*e.alpha,c=e.width,d=e.height,p=e.cellWidth,f=e.cellHeight,m=Math.ceil(c/p),g=Math.ceil(d/f),v=p,y=f,x=p-(m*p-c),E=f-(g*f-d),T=e.showCells,_=e.showAltCells,w=e.showOutline,S=0,b=0,C=0,A=0,R=0;if(w&&(v--,y--,x===p&&x--,E===f&&E--),T&&e.fillAlpha>0)for(n(a,e),b=0;b<g;b++)for(_&&(C=b%2),S=0;S<m;S++)_&&C?C=0:(C++,A=S<m-1?v:x,R=b<g-1?y:E,a.fillRect(h+S*p,l+b*f,A,R));if(_&&e.altFillAlpha>0)for(n(a,e,e.altFillColor,e.altFillAlpha*u),b=0;b<g;b++)for(_&&(C=b%2),S=0;S<m;S++)!_||C?(C=0,A=S<m-1?v:x,R=b<g-1?y:E,a.fillRect(h+S*p,l+b*f,A,R)):C=1;if(w&&e.outlineFillAlpha>0){for(r(a,e,e.outlineFillColor,e.outlineFillAlpha*u),S=1;S<m;S++){var M=S*p;a.beginPath(),a.moveTo(M+h,l),a.lineTo(M+h,d+l),a.stroke()}for(b=1;b<g;b++){var L=b*f;a.beginPath(),a.moveTo(h,L+l),a.lineTo(h+c,L+l),a.stroke()}}a.restore()}}},34137:(t,e,i)=>{var n=i(39429),r=i(30479);n.register("grid",(function(t,e,i,n,s,o,a,h,l,u){return this.displayList.add(new r(this.scene,t,e,i,n,s,o,a,h,l,u))}))},26015:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(46161),s=i(49912),t.exports={renderWebGL:r,renderCanvas:s}},46161:(t,e,i)=>{var n=i(91296),r=i(70554);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=n(e,i,s);o.calcMatrix.copyFrom(a.calc).translate(-e._displayOriginX,-e._displayOriginY);var h,l,u=i.alpha*e.alpha,c=e.width,d=e.height,p=e.cellWidth,f=e.cellHeight,m=Math.ceil(c/p),g=Math.ceil(d/f),v=p,y=f,x=p-(m*p-c),E=f-(g*f-d),T=e.showCells,_=e.showAltCells,w=e.showOutline,S=0,b=0,C=0,A=0,R=0;if(w&&(v--,y--,x===p&&x--,E===f&&E--),t.pipelines.preBatch(e),T&&e.fillAlpha>0)for(h=o.fillTint,l=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,b=0;b<g;b++)for(_&&(C=b%2),S=0;S<m;S++)_&&C?C=0:(C++,A=S<m-1?v:x,R=b<g-1?y:E,o.batchFillRect(S*p,b*f,A,R));if(_&&e.altFillAlpha>0)for(h=o.fillTint,l=r.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,b=0;b<g;b++)for(_&&(C=b%2),S=0;S<m;S++)!_||C?(C=0,A=S<m-1?v:x,R=b<g-1?y:E,o.batchFillRect(S*p,b*f,A,R)):C=1;if(w&&e.outlineFillAlpha>0){var M=o.strokeTint,L=r.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*u);for(M.TL=L,M.TR=L,M.BL=L,M.BR=L,S=1;S<m;S++){var O=S*p;o.batchLine(O,0,O,d,1,1,1,0,!1)}for(b=1;b<g;b++){var P=b*f;o.batchLine(0,P,c,P,1,1,1,0,!1)}}t.pipelines.postBatch(e)}},61475:(t,e,i)=>{var n=i(99651),r=i(83419),s=i(17803),o=new r({Extends:s,Mixins:[n],initialize:function(t,e,i,n,r,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===r&&(r=32),void 0===o&&(o=15658734),void 0===a&&(a=10066329),void 0===h&&(h=13421772),s.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,r),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},11508:(t,e,i)=>{var n=i(65960),r=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,s)&&e.isFilled){var a=e.width,h=e.height,l=a/2,u=a/e.projection;e.showTop&&(n(o,e,e.fillTop),o.beginPath(),o.moveTo(-l,-h),o.lineTo(0,-u-h),o.lineTo(l,-h),o.lineTo(l,-1),o.lineTo(0,u-1),o.lineTo(-l,-1),o.lineTo(-l,-h),o.fill()),e.showLeft&&(n(o,e,e.fillLeft),o.beginPath(),o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.lineTo(-l,-h),o.lineTo(-l,0),o.fill()),e.showRight&&(n(o,e,e.fillRight),o.beginPath(),o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.lineTo(l,-h),o.lineTo(l,0),o.fill()),o.restore()}}},3933:(t,e,i)=>{var n=i(39429),r=i(61475);n.register("isobox",(function(t,e,i,n,s,o,a){return this.displayList.add(new r(this.scene,t,e,i,n,s,o,a))}))},99651:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(68149),s=i(11508),t.exports={renderWebGL:r,renderCanvas:s}},68149:(t,e,i)=>{var n=i(91296),r=i(70554);t.exports=function(t,e,i,s){i.addToRenderList(e);var o,a,h,l,u,c,d,p,f,m=t.pipelines.set(e.pipeline),g=n(e,i,s),v=m.calcMatrix.copyFrom(g.calc),y=e.width,x=e.height,E=y/2,T=y/e.projection,_=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&(o=r.getTintAppendFloatAlpha(e.fillTop,_),a=v.getX(-E,-x),h=v.getY(-E,-x),l=v.getX(0,-T-x),u=v.getY(0,-T-x),c=v.getX(E,-x),d=v.getY(E,-x),p=v.getX(0,T-x),f=v.getY(0,T-x),m.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),e.showLeft&&(o=r.getTintAppendFloatAlpha(e.fillLeft,_),a=v.getX(-E,0),h=v.getY(-E,0),l=v.getX(0,T),u=v.getY(0,T),c=v.getX(0,T-x),d=v.getY(0,T-x),p=v.getX(-E,-x),f=v.getY(-E,-x),m.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),e.showRight&&(o=r.getTintAppendFloatAlpha(e.fillRight,_),a=v.getX(E,0),h=v.getY(E,0),l=v.getX(0,T),u=v.getY(0,T),c=v.getX(0,T-x),d=v.getY(0,T-x),p=v.getX(E,-x),f=v.getY(E,-x),m.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),t.pipelines.postBatch(e))}},16933:(t,e,i)=>{var n=i(83419),r=i(60561),s=i(17803),o=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r,o,a,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=48),void 0===r&&(r=32),void 0===o&&(o=!1),void 0===a&&(a=15658734),void 0===h&&(h=10066329),void 0===l&&(l=13421772),s.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=a,this.fillLeft=h,this.fillRight=l,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=o,this.isFilled=!0,this.setPosition(e,i),this.setSize(n,r),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},79590:(t,e,i)=>{var n=i(65960),r=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,s)&&e.isFilled){var a=e.width,h=e.height,l=a/2,u=a/e.projection,c=e.isReversed;e.showTop&&c&&(n(o,e,e.fillTop),o.beginPath(),o.moveTo(-l,-h),o.lineTo(0,-u-h),o.lineTo(l,-h),o.lineTo(0,u-h),o.fill()),e.showLeft&&(n(o,e,e.fillLeft),o.beginPath(),c?(o.moveTo(-l,-h),o.lineTo(0,u),o.lineTo(0,u-h)):(o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-h)),o.fill()),e.showRight&&(n(o,e,e.fillRight),o.beginPath(),c?(o.moveTo(l,-h),o.lineTo(0,u),o.lineTo(0,u-h)):(o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-h)),o.fill()),o.restore()}}},49803:(t,e,i)=>{var n=i(39429),r=i(16933);n.register("isotriangle",(function(t,e,i,n,s,o,a,h){return this.displayList.add(new r(this.scene,t,e,i,n,s,o,a,h))}))},60561:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(51503),s=i(79590),t.exports={renderWebGL:r,renderCanvas:s}},51503:(t,e,i)=>{var n=i(91296),r=i(70554);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=n(e,i,s),h=o.calcMatrix.copyFrom(a.calc),l=e.width,u=e.height,c=l/2,d=l/e.projection,p=e.isReversed,f=i.alpha*e.alpha;if(e.isFilled){var m,g,v,y,x,E,T;if(t.pipelines.preBatch(e),e.showTop&&p){m=r.getTintAppendFloatAlpha(e.fillTop,f),g=h.getX(-c,-u),v=h.getY(-c,-u),y=h.getX(0,-d-u),x=h.getY(0,-d-u),E=h.getX(c,-u),T=h.getY(c,-u);var _=h.getX(0,d-u),w=h.getY(0,d-u);o.batchQuad(e,g,v,y,x,E,T,_,w,0,0,1,1,m,m,m,m,2)}e.showLeft&&(m=r.getTintAppendFloatAlpha(e.fillLeft,f),p?(g=h.getX(-c,-u),v=h.getY(-c,-u),y=h.getX(0,d),x=h.getY(0,d),E=h.getX(0,d-u),T=h.getY(0,d-u)):(g=h.getX(-c,0),v=h.getY(-c,0),y=h.getX(0,d),x=h.getY(0,d),E=h.getX(0,d-u),T=h.getY(0,d-u)),o.batchTri(e,g,v,y,x,E,T,0,0,1,1,m,m,m,2)),e.showRight&&(m=r.getTintAppendFloatAlpha(e.fillRight,f),p?(g=h.getX(c,-u),v=h.getY(c,-u),y=h.getX(0,d),x=h.getY(0,d),E=h.getX(0,d-u),T=h.getY(0,d-u)):(g=h.getX(c,0),v=h.getY(c,0),y=h.getX(0,d),x=h.getY(0,d),E=h.getX(0,d-u),T=h.getY(0,d-u)),o.batchTri(e,g,v,y,x,E,T,0,0,1,1,m,m,m,2)),t.pipelines.postBatch(e)}}},57847:(t,e,i)=>{var n=i(83419),r=i(17803),s=i(23031),o=i(36823),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=0),void 0===a&&(a=128),void 0===h&&(h=0),r.call(this,t,"Line",new s(n,o,a,h));var c=Math.max(1,this.geom.right-this.geom.left),d=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(c,d),void 0!==l&&this.setStrokeStyle(1,l,u),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,n){return this.geom.setTo(t,e,i,n),this}});t.exports=a},17440:(t,e,i)=>{var n=i(75177),r=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,s)){var a=e._displayOriginX,h=e._displayOriginY;e.isStroked&&(n(o,e),o.beginPath(),o.moveTo(e.geom.x1-a,e.geom.y1-h),o.lineTo(e.geom.x2-a,e.geom.y2-h),o.stroke()),o.restore()}}},2481:(t,e,i)=>{var n=i(39429),r=i(57847);n.register("line",(function(t,e,i,n,s,o,a,h){return this.displayList.add(new r(this.scene,t,e,i,n,s,o,a,h))}))},36823:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(77385),s=i(17440),t.exports={renderWebGL:r,renderCanvas:s}},77385:(t,e,i)=>{var n=i(91296),r=i(70554);t.exports=function(t,e,i,s){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=n(e,i,s);o.calcMatrix.copyFrom(a.calc);var h=e._displayOriginX,l=e._displayOriginY,u=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isStroked){var c=o.strokeTint,d=r.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*u);c.TL=d,c.TR=d,c.BL=d,c.BR=d,o.batchLine(e.geom.x1-h,e.geom.y1-l,e.geom.x2-h,e.geom.y2-l,e._startWidth/2,e._endWidth/2,1,0,!1,a.sprite,a.camera)}t.pipelines.postBatch(e)}},24949:(t,e,i)=>{var n=i(90273),r=i(83419),s=i(94811),o=i(13829),a=i(25717),h=i(17803),l=i(5469),u=new r({Extends:h,Mixins:[n],initialize:function(t,e,i,n,r,s){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new a(n));var l=o(this.geom);this.setPosition(e,i),this.setSize(l.width,l.height),void 0!==r&&this.setFillStyle(r,s),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e<t;e++)l(this.geom);return this.updateData()},setTo:function(t){this.geom.setTo(t);var e=o(this.geom);return this.setSize(e.width,e.height),this.updateDisplayOrigin(),this.updateData()},updateData:function(){for(var t=[],e=this.geom.points,i=0;i<e.length;i++)t.push(e[i].x,e[i].y);return t.push(e[0].x,e[0].y),this.pathIndexes=s(t),this.pathData=t,this}});t.exports=u},38710:(t,e,i)=>{var n=i(65960),r=i(75177),s=i(20926);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f<c;f+=2){var m=u[f]-h,g=u[f+1]-l;a.lineTo(m,g)}e.closePath&&a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(r(a,e),a.stroke()),a.restore()}}},64827:(t,e,i)=>{var n=i(39429),r=i(24949);n.register("polygon",(function(t,e,i,n,s){return this.displayList.add(new r(this.scene,t,e,i,n,s))}))},90273:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(73695),s=i(38710),t.exports={renderWebGL:r,renderCanvas:s}},73695:(t,e,i)=>{var n=i(10441),r=i(91296),s=i(34682);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=r(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(a,l,e,d,u,c),e.isStroked&&s(a,e,d,u,c),t.pipelines.postBatch(e)}},74561:(t,e,i)=>{var n=i(83419),r=i(87841),s=i(17803),o=i(95597),a=new n({Extends:s,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),s.call(this,t,"Rectangle",new r(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},48682:(t,e,i)=>{var n=i(65960),r=i(75177),s=i(20926);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY;e.isFilled&&(n(a,e),a.fillRect(-h,-l,e.width,e.height)),e.isStroked&&(r(a,e),a.beginPath(),a.rect(-h,-l,e.width,e.height),a.stroke()),a.restore()}}},87959:(t,e,i)=>{var n=i(39429),r=i(74561);n.register("rectangle",(function(t,e,i,n,s,o){return this.displayList.add(new r(this.scene,t,e,i,n,s,o))}))},95597:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(52059),s=i(48682),t.exports={renderWebGL:r,renderCanvas:s}},52059:(t,e,i)=>{var n=i(91296),r=i(34682),s=i(70554);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o);a.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=a.fillTint,p=s.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=p,d.TR=p,d.BL=p,d.BR=p,a.batchFillRect(-l,-u,e.width,e.height)}e.isStroked&&r(a,e,c,l,u),t.pipelines.postBatch(e)}},55911:(t,e,i)=>{var n=i(81991),r=i(83419),s=i(94811),o=i(17803),a=new r({Extends:o,Mixins:[n],initialize:function(t,e,i,n,r,s,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===r&&(r=32),void 0===s&&(s=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=r,this._outerRadius=s,this.setPosition(e,i),this.setSize(2*s,2*s),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,r=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l<e;l++)t.push(a+Math.cos(r)*n,h+Math.sin(r)*n),r+=o,t.push(a+Math.cos(r)*i,h+Math.sin(r)*i),r+=o;return t.push(a,h+-n),this.pathIndexes=s(t),this.pathData=t,this}});t.exports=a},64272:(t,e,i)=>{var n=i(65960),r=i(75177),s=i(20926);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f<c;f+=2){var m=u[f]-h,g=u[f+1]-l;a.lineTo(m,g)}a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(r(a,e),a.stroke()),a.restore()}}},93697:(t,e,i)=>{var n=i(55911);i(39429).register("star",(function(t,e,i,r,s,o,a){return this.displayList.add(new n(this.scene,t,e,i,r,s,o,a))}))},81991:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(57017),s=i(64272),t.exports={renderWebGL:r,renderCanvas:s}},57017:(t,e,i)=>{var n=i(10441),r=i(91296),s=i(34682);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=r(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(a,l,e,d,u,c),e.isStroked&&s(a,e,d,u,c),t.pipelines.postBatch(e)}},36931:(t,e,i)=>{var n=i(83419),r=i(17803),s=i(16483),o=i(96195),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h,l,u,c,d){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=128),void 0===a&&(a=64),void 0===h&&(h=0),void 0===l&&(l=128),void 0===u&&(u=128),r.call(this,t,"Triangle",new s(n,o,a,h,l,u));var p=this.geom.right-this.geom.left,f=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(p,f),void 0!==c&&this.setFillStyle(c,d),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,n,r,s){return this.geom.setTo(t,e,i,n,r,s),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},85172:(t,e,i)=>{var n=i(65960),r=i(75177),s=i(20926);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(s(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.geom.x1-h,c=e.geom.y1-l,d=e.geom.x2-h,p=e.geom.y2-l,f=e.geom.x3-h,m=e.geom.y3-l;a.beginPath(),a.moveTo(u,c),a.lineTo(d,p),a.lineTo(f,m),a.closePath(),e.isFilled&&(n(a,e),a.fill()),e.isStroked&&(r(a,e),a.stroke()),a.restore()}}},45245:(t,e,i)=>{var n=i(39429),r=i(36931);n.register("triangle",(function(t,e,i,n,s,o,a,h,l,u){return this.displayList.add(new r(this.scene,t,e,i,n,s,o,a,h,l,u))}))},96195:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(83253),s=i(85172),t.exports={renderWebGL:r,renderCanvas:s}},83253:(t,e,i)=>{var n=i(91296),r=i(34682),s=i(70554);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o);a.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=a.fillTint,p=s.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=p,d.TR=p,d.BL=p,d.BR=p;var f=e.geom.x1-l,m=e.geom.y1-u,g=e.geom.x2-l,v=e.geom.y2-u,y=e.geom.x3-l,x=e.geom.y3-u;a.batchFillTriangle(f,m,g,v,y,x,h.sprite,h.camera)}e.isStroked&&r(a,e,c,l,u),t.pipelines.postBatch(e)}},68287:(t,e,i)=>{var n=i(9674),r=i(83419),s=i(31401),o=i(95643),a=i(92751),h=new r({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.PostPipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,a],initialize:function(t,e,i,r,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new n(this),this.setTexture(r,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=h},76552:t=>{t.exports=function(t,e,i,n){i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},15567:(t,e,i)=>{var n=i(25305),r=i(13059),s=i(44603),o=i(23568),a=i(68287);s.register("sprite",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),s=o(t,"frame",null),h=new a(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,h,t),r(h,t),h}))},46409:(t,e,i)=>{var n=i(39429),r=i(68287);n.register("sprite",(function(t,e,i,n){return this.displayList.add(new r(this.scene,t,e,i,n))}))},92751:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(9409),s=i(76552),t.exports={renderWebGL:r,renderCanvas:s}},9409:t=>{t.exports=function(t,e,i,n){i.addToRenderList(e),e.pipeline.batchSprite(e,i,n)}},14220:t=>{t.exports=function(t,e,i){var n=t.canvas,r=t.context,s=t.style,o=[],a=0,h=i.length;s.maxLines>0&&s.maxLines<i.length&&(h=s.maxLines),s.syncFont(n,r);for(var l=0;l<h;l++){var u=s.strokeThickness;u+=r.measureText(i[l]).width,i[l].length>1&&(u+=t.letterSpacing*(i[l].length-1)),s.wordWrap&&(u-=r.measureText(" ").width),o[l]=Math.ceil(u),a=Math.max(a,o[l])}var c=e.fontSize+s.strokeThickness,d=c*h,p=t.lineSpacing;return h>1&&(d+=p*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:p,lineHeight:c}}},79557:(t,e,i)=>{var n=i(27919);t.exports=function(t){var e=n.create(this),i=e.getContext("2d",{willReadFrequently:!0});t.syncFont(e,i);var r=i.measureText(t.testString);if("actualBoundingBoxAscent"in r){var s=r.actualBoundingBoxAscent,o=r.actualBoundingBoxDescent;return n.remove(e),{ascent:s,descent:o,fontSize:s+o}}var a=Math.ceil(r.width*t.baselineX),h=a,l=2*h;h=h*t.baselineY|0,e.width=a,e.height=l,i.fillStyle="#f00",i.fillRect(0,0,a,l),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,h);var u={ascent:0,descent:0,fontSize:0},c=i.getImageData(0,0,a,l);if(!c)return u.ascent=h,u.descent=h+6,u.fontSize=u.ascent+u.descent,n.remove(e),u;var d,p,f=c.data,m=f.length,g=4*a,v=0,y=!1;for(d=0;d<h;d++){for(p=0;p<g;p+=4)if(255!==f[v+p]){y=!0;break}if(y)break;v+=g}for(u.ascent=h-d,v=m-g,y=!1,d=l;d>h;d--){for(p=0;p<g;p+=4)if(255!==f[v+p]){y=!0;break}if(y)break;v-=g}return u.descent=d-h,u.fontSize=u.ascent+u.descent,n.remove(e),u}},50171:(t,e,i)=>{var n=i(40366),r=i(27919),s=i(83419),o=i(31401),a=i(95643),h=i(14220),l=i(35154),u=i(35846),c=i(61771),d=i(35762),p=i(45650),f=new s({Extends:a,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,c],initialize:function(t,e,i,n,s){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Text"),this.renderer=t.sys.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=r.create(this),this.context,this.style=new d(this,s),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.letterSpacing=0,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=p(),this.texture=t.sys.textures.addCanvas(this._textureKey,this.canvas),this.context=this.texture.context,this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(n),s&&s.padding&&this.setPadding(s.padding),s&&s.lineSpacing&&this.setLineSpacing(s.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",n(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var n="",r=t.replace(/ +/gi," ").split(this.splitRegExp),s=r.length,o=0;o<s;o++){var a=r[o],h="";if(a=a.replace(/^ *|\s*$/gi,""),e.measureText(a).width<i)n+=a+"\n";else{for(var l=i,u=a.split(" "),c=0;c<u.length;c++){var d=u[c],p=d+" ",f=e.measureText(p).width;if(f>l){if(0===c){for(var m=p;m.length&&(m=m.slice(0,-1),!((f=e.measureText(m).width)<=l)););if(!m.length)throw new Error("wordWrapWidth < a single character");var g=d.substr(m.length);u[c]=g,h+=m}var v=u[c].length?c:c+1,y=u.slice(v).join(" ").replace(/[ \n]*$/gi,"");r.splice(o+1,0,y),s=r.length;break}h+=p,l-=f}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",r=t.split(this.splitRegExp),s=r.length-1,o=e.measureText(" ").width,a=0;a<=s;a++){for(var h=i,l=r[a].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],p=e.measureText(d).width,f=p;c<u&&(f+=o),f>h&&c>0&&(n+="\n",h=i),n+=d,c<u?(n+=" ",h-=f):h-=p}a<s&&(n+="\n")}return n},getWrappedText:function(t){return void 0===t&&(t=this._text),this.style.syncFont(this.canvas,this.context),this.runWordWrap(t).split(this.splitRegExp)},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this._text&&(this._text=t.toString(),this.updateText()),this},appendText:function(t,e){void 0===e&&(e=!0),t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t=t.toString();var i=this._text.concat(e?"\n"+t:t);return i!==this._text&&(this._text=i,this.updateText()),this},setStyle:function(t){return this.style.setStyle(t)},setFont:function(t){return this.style.setFont(t)},setFontFamily:function(t){return this.style.setFontFamily(t)},setFontSize:function(t){return this.style.setFontSize(t)},setFontStyle:function(t){return this.style.setFontStyle(t)},setFixedSize:function(t,e){return this.style.setFixedSize(t,e)},setBackgroundColor:function(t){return this.style.setBackgroundColor(t)},setFill:function(t){return this.style.setFill(t)},setColor:function(t){return this.style.setColor(t)},setStroke:function(t,e){return this.style.setStroke(t,e)},setShadow:function(t,e,i,n,r,s){return this.style.setShadow(t,e,i,n,r,s)},setShadowOffset:function(t,e){return this.style.setShadowOffset(t,e)},setShadowColor:function(t){return this.style.setShadowColor(t)},setShadowBlur:function(t){return this.style.setShadowBlur(t)},setShadowStroke:function(t){return this.style.setShadowStroke(t)},setShadowFill:function(t){return this.style.setShadowFill(t)},setWordWrapWidth:function(t,e){return this.style.setWordWrapWidth(t,e)},setWordWrapCallback:function(t,e){return this.style.setWordWrapCallback(t,e)},setAlign:function(t){return this.style.setAlign(t)},setResolution:function(t){return this.style.setResolution(t)},setLineSpacing:function(t){return this.lineSpacing=t,this.updateText()},setLetterSpacing:function(t){return this.letterSpacing=t,this.updateText()},setPadding:function(t,e,i,n){if("object"==typeof t){var r=t,s=l(r,"x",null);null!==s?(t=s,i=s):(t=l(r,"left",0),i=l(r,"right",t));var o=l(r,"y",null);null!==o?(e=o,n=o):(e=l(r,"top",0),n=l(r,"bottom",e))}else void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=e);return this.padding.left=t,this.padding.top=e,this.padding.right=i,this.padding.bottom=n,this.updateText()},setMaxLines:function(t){return this.style.setMaxLines(t)},setRTL:function(t){void 0===t&&(t=!0);var e=this.style;return e.rtl===t||(e.rtl=t,t?(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",n(this.canvas,this.scene.sys.canvas)):(this.canvas.dir="ltr",this.context.direction="ltr"),"left"===e.align?e.align="right":"right"===e.align&&(e.align="left")),this},updateText:function(){var t=this.canvas,e=this.context,i=this.style,n=i.resolution,r=i.metrics;i.syncFont(t,e);var s=this._text;(i.wordWrapWidth||i.wordWrapCallback)&&(s=this.runWordWrap(this._text));var o,a=s.split(this.splitRegExp),l=h(this,r,a),u=this.padding;0===i.fixedWidth?(this.width=l.width+u.left+u.right,o=l.width):(this.width=i.fixedWidth,(o=this.width-u.left-u.right)<l.width&&(o=l.width)),0===i.fixedHeight?this.height=l.height+u.top+u.bottom:this.height=i.fixedHeight;var c,d,p=this.width,f=this.height;this.updateDisplayOrigin(),p*=n,f*=n,p=Math.max(p,1),f=Math.max(f,1),t.width!==p||t.height!==f?(t.width=p,t.height=f,this.frame.setSize(p,f),i.syncFont(t,e),i.rtl&&(e.direction="rtl")):e.clearRect(0,0,p,f),e.save(),e.scale(n,n),i.backgroundColor&&(e.fillStyle=i.backgroundColor,e.fillRect(0,0,p,f)),i.syncStyle(t,e),e.translate(u.left,u.top);for(var m=0;m<l.lines;m++){if(c=i.strokeThickness/2,d=i.strokeThickness/2+m*l.lineHeight+r.ascent,m>0&&(d+=l.lineSpacing*m),i.rtl)c=p-c-u.left-u.right;else if("right"===i.align)c+=o-l.lineWidths[m];else if("center"===i.align)c+=(o-l.lineWidths[m])/2;else if("justify"===i.align){if(l.lineWidths[m]/l.width>=.85){var g=l.width-l.lineWidths[m],v=e.measureText(" ").width,y=a[m].trim(),x=y.split(" ");g+=(a[m].length-y.length)*v;for(var E=Math.floor(g/v),T=0;E>0;)x[T]+=" ",T=(T+1)%(x.length-1||1),--E;a[m]=x.join(" ")}}if(this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(i.syncShadow(e,i.shadowStroke),e.strokeText(a[m],c,d)),i.color){i.syncShadow(e,i.shadowFill);var _=this.letterSpacing;if(0!==_)for(var w=0,S=a[m].split(""),b=0;b<S.length;b++)e.fillText(S[b],c+w,d),w+=e.measureText(S[b]).width+_;else e.fillText(a[m],c,d)}}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture.spectorMetadata={textureKey:"Text Game Object"});var C=this.input;return C&&!C.customHitArea&&(C.hitArea.width=this.width,C.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){u(this.canvas),r.remove(this.canvas);var t=this.texture;t&&t.destroy()}});t.exports=f},79724:t=>{t.exports=function(t,e,i,n){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,n))}},71259:(t,e,i)=>{var n=i(25305),r=i(44603),s=i(23568),o=i(50171);r.register("text",(function(t,e){void 0===t&&(t={});var i=s(t,"text",""),r=s(t,"style",null),a=s(t,"padding",null);null!==a&&(r.padding=a);var h=new o(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,h,t),h.autoRound=s(t,"autoRound",!0),h.resolution=s(t,"resolution",1),h}))},68005:(t,e,i)=>{var n=i(50171);i(39429).register("text",(function(t,e,i,r){return this.displayList.add(new n(this.scene,t,e,i,r))}))},61771:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(34397),s=i(79724),t.exports={renderWebGL:r,renderCanvas:s}},35762:(t,e,i)=>{var n=i(83419),r=i(23568),s=i(35154),o=i(79557),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(e,!1,!0)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var h=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?s(t,a[n][0],h):r(t,a[n][0],h)}var l=s(t,"font",null);null!==l&&this.setFont(l,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=s(t,"fill",null);null!==u&&(this.color=u);var c=s(t,"metrics",!1);return c?this.metrics={ascent:s(c,"ascent",0),descent:s(c,"descent",0),fontSize:s(c,"fontSize",0)}:!e&&this.metrics||(this.metrics=o(this)),e?this.parent.updateText():this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",r="";if("string"!=typeof t)i=s(t,"fontFamily","Courier"),n=s(t,"fontSize","16px"),r=s(t,"fontStyle","");else{var o=t.split(" "),a=0;r=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&r===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=r,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,n,r,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===r&&(r=!1),void 0===s&&(s=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=r,this.shadowFill=s,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},34397:(t,e,i)=>{var n=i(70554);t.exports=function(t,e,i,r){if(0!==e.width&&0!==e.height){i.addToRenderList(e);var s=e.frame,o=s.width,a=s.height,h=n.getTintAppendFloatAlpha,l=t.pipelines.set(e.pipeline,e),u=l.setTexture2D(s.glTexture,e);l.batchTexture(e,s.glTexture,o,a,e.x,e.y,o/e.style.resolution,a/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,o,a,h(e.tintTopLeft,i.alpha*e._alphaTL),h(e.tintTopRight,i.alpha*e._alphaTR),h(e.tintBottomLeft,i.alpha*e._alphaBL),h(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,r,!1,u)}}},20839:(t,e,i)=>{var n=i(27919),r=i(83419),s=i(31401),o=i(95643),a=i(98439),h=i(68703),l=i(56295),u=i(45650),c=i(26099),d=new r({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Crop,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.PostPipeline,s.ScrollFactor,s.Tint,s.Transform,s.Visible,l],initialize:function(t,e,i,r,s,h,l){var d=t.sys.renderer;o.call(this,t,"TileSprite");var p=t.sys.textures.get(h),f=p.get(l);f.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),f=(p=t.sys.textures.get("__MISSING")).get()),"DynamicTexture"===p.type&&(console.warn("TileSprite cannot use Dynamic Texture"),f=(p=t.sys.textures.get("__MISSING")).get()),r&&s?(r=Math.floor(r),s=Math.floor(s)):(r=f.width,s=f.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,r,s),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=p,this.displayFrame=f,this._crop=this.resetCropObject(),this._textureKey=u(),this.texture=t.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=a(f.width),this.potHeight=a(f.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(e,i),this.setSize(r,s),this.setFrame(l),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=a(e.width),this.potHeight=a(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,n=this.potWidth,r=this.potHeight;this.renderer&&this.renderer.gl||(n=t.cutWidth,r=t.cutHeight),e.clearRect(0,0,n,r),i.width=n,i.height=r,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,r),this.renderer&&this.renderer.gl?(this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern),this.fillPattern.spectorMetadata={textureKey:"TileSprite Game Object"}):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||h.disable(e);var i=this._tileScale.x,n=this._tileScale.y,r=this._tilePosition.x,s=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-r,-s),e.fillStyle=this.fillPattern,e.fillRect(r,s,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var t=this.texture;t&&t.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},46992:t=>{t.exports=function(t,e,i,n){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.frame,i,n)}},14167:(t,e,i)=>{var n=i(25305),r=i(44603),s=i(23568),o=i(20839);r.register("tileSprite",(function(t,e){void 0===t&&(t={});var i=s(t,"x",0),r=s(t,"y",0),a=s(t,"width",512),h=s(t,"height",512),l=s(t,"key",""),u=s(t,"frame",""),c=new o(this.scene,i,r,a,h,l,u);return void 0!==e&&(t.add=e),n(this.scene,c,t),c}))},91681:(t,e,i)=>{var n=i(20839);i(39429).register("tileSprite",(function(t,e,i,r,s,o){return this.displayList.add(new n(this.scene,t,e,i,r,s,o))}))},56295:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(18553),s=i(46992),t.exports={renderWebGL:r,renderCanvas:s}},18553:(t,e,i)=>{var n=i(70554);t.exports=function(t,e,i,r){e.updateCanvas();var s=e.width,o=e.height;if(0!==s&&0!==o){i.addToRenderList(e);var a=n.getTintAppendFloatAlpha,h=t.pipelines.set(e.pipeline,e),l=h.setTexture2D(e.fillPattern,e);h.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,s,o,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*s,e.originY*o,0,0,s,o,a(e.tintTopLeft,i.alpha*e._alphaTL),a(e.tintTopRight,i.alpha*e._alphaTR),a(e.tintBottomLeft,i.alpha*e._alphaBL),a(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,i,r,!1,l)}}},18471:(t,e,i)=>{var n=i(45319),r=i(83419),s=i(31401),o=i(51708),a=i(8443),h=i(95643),l=i(36383),u=i(14463),c=i(45650),d=i(10247),p=new r({Extends:h,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.PostPipeline,s.ScrollFactor,s.TextureCrop,s.Tint,s.Transform,s.Visible,d],initialize:function(t,e,i,n){h.call(this,t,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=c(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.metadata,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._rfvCallbackId=0;var r=t.sys.game;this._device=r.device.video,this.setPosition(e,i),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),r.events.on(a.PAUSE,this.globalPause,this),r.events.on(a.RESUME,this.globalResume,this);var s=t.sys.sound;s&&s.on(u.GLOBAL_MUTE,this.globalMute,this),n&&this.load(n)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(t){var e=this.scene.sys.cache.video.get(t);return e?(this.cacheKey=t,this.loadHandler(e.url,e.noAudio,e.crossOrigin)):console.warn("No video in cache for key: "+t),this},changeSource:function(t,e,i,n,r){void 0===e&&(e=!0),void 0===i&&(i=!1),this.cacheKey!==t&&(this.load(t),e&&this.play(i,n,r))},getVideoKey:function(){return this.cacheKey},loadURL:function(t,e,i){void 0===e&&(e=!1);var n=this._device.getVideoURL(t);return n?(this.cacheKey="",this.loadHandler(n.url,e,i)):console.warn("No supported video format found for "+t),this},loadMediaStream:function(t,e,i){return this.loadHandler(null,e,i,t)},loadHandler:function(t,e,i,n){e||(e=!1);var r=this.video;if(r?(this.removeLoadEventHandlers(),this.stop()):((r=document.createElement("video")).controls=!1,r.setAttribute("playsinline","playsinline"),r.setAttribute("preload","auto"),r.setAttribute("disablePictureInPicture","true")),e?(r.muted=!0,r.defaultMuted=!0,r.setAttribute("autoplay","autoplay")):(r.muted=!1,r.defaultMuted=!1,r.removeAttribute("autoplay")),i?r.setAttribute("crossorigin",i):r.removeAttribute("crossorigin"),n)if("srcObject"in r)try{r.srcObject=n}catch(t){if("TypeError"!==t.name)throw t;r.src=URL.createObjectURL(n)}else r.src=URL.createObjectURL(n);else r.src=t;this.retry=0,this.video=r,this._playCalled=!1,r.load(),this.addLoadEventHandlers();var s=this.scene.sys.textures.get(this._key);return this.setTexture(s),this},requestVideoFrame:function(t,e){var i=this.video;if(i){var n=e.width,r=e.height,s=this.videoTexture,a=this.videoTextureSource,h=!s||a.source!==i;h?(this._codePaused=i.paused,this._codeMuted=i.muted,s?(a.source=i,a.width=n,a.height=r,s.get().setSize(n,r)):((s=this.scene.sys.textures.create(this._key,i,n,r)).add("__BASE",0,0,0,n,r),this.setTexture(s),this.videoTexture=s,this.videoTextureSource=s.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(o.VIDEO_TEXTURE,this,s)),this.setSizeToFrame(),this.updateDisplayOrigin()):a.update(),this.isStalled=!1,this.metadata=e;var l=e.mediaTime;h&&(this._lastUpdate=l,this.emit(o.VIDEO_CREATED,this,n,r),this.frameReady||(this.frameReady=!0,this.emit(o.VIDEO_PLAY,this))),this._playingMarker?l>=this._markerOut&&(i.loop?(i.currentTime=this._markerIn,this.emit(o.VIDEO_LOOP,this)):(this.stop(!1),this.emit(o.VIDEO_COMPLETE,this))):l<this._lastUpdate&&this.emit(o.VIDEO_LOOP,this),this._lastUpdate=l,this._rfvCallbackId=this.video.requestVideoFrameCallback(this.requestVideoFrame.bind(this))}},play:function(t,e,i){void 0===e&&(e=-1),void 0===i&&(i=l.MAX_SAFE_INTEGER);var n=this.video;return!n||this.isPlaying()?(n||console.warn("Video not loaded"),this):(void 0===t&&(t=n.loop),n.loop=t,this._markerIn=e,this._markerOut=i,this._playingMarker=e>-1&&i>e&&i<l.MAX_SAFE_INTEGER,this._playCalled||(this._rfvCallbackId=n.requestVideoFrameCallback(this.requestVideoFrame.bind(this)),this._playCalled=!0,this.createPlayPromise()),this)},addLoadEventHandlers:function(){var t=this.video;t&&(t.addEventListener("error",this._loadCallbackHandler),t.addEventListener("abort",this._loadCallbackHandler),t.addEventListener("loadedmetadata",this._metadataCallbackHandler))},removeLoadEventHandlers:function(){var t=this.video;t&&(t.removeEventListener("error",this._loadCallbackHandler),t.removeEventListener("abort",this._loadCallbackHandler))},addEventHandlers:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.addEventListener(i,e[i])}},removeEventHandlers:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i])}},createPlayPromise:function(t){void 0===t&&(t=!0);var e=this.video,i=e.play();if(void 0!==i){var n=this.playSuccess.bind(this),r=this.playError.bind(this);if(!t){var s=this;r=function(){s.failedPlayAttempts++}}i.then(n).catch(r)}else e.addEventListener("playing",this._callbacks.legacy),t||this.failedPlayAttempts++},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&i>e&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,n,r,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===r&&(r=i),void 0===s&&(s=n);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(r,s),o&&a.context.drawImage(o,t,e,i,n,0,0,r,s)):(a=this.scene.sys.textures.createCanvas(c(),r,s),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,n,0,0,r,s)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(o.VIDEO_UNLOCKED,this));var t=this.scene.sys.sound;t&&t.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(t){var e=t.name;"NotAllowedError"===e?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(o.VIDEO_LOCKED,this)):"NotSupportedError"===e?(this.stop(!1),this.emit(o.VIDEO_UNSUPPORTED,this,t)):(this.stop(!1),this.emit(o.VIDEO_ERROR,this,t))},legacyPlayHandler:function(){var t=this.video;t&&(this.playSuccess(),t.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(o.VIDEO_PLAYING,this)},loadErrorHandler:function(t){this.stop(!1),this.emit(o.VIDEO_ERROR,this,t)},metadataHandler:function(t){this.emit(o.VIDEO_METADATA,this,t)},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,1!==this.scaleX&&(this.scaleX=this.displayWidth/this.width),1!==this.scaleY&&(this.scaleY=this.displayHeight/this.height);var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},stalledHandler:function(t){this.isStalled=!0,this.emit(o.VIDEO_STALLED,this,t)},completeHandler:function(){this._playCalled=!1,this.emit(o.VIDEO_COMPLETE,this)},preUpdate:function(t,e){this.video&&this._playCalled&&this.touchLocked&&this.playWhenUnlocked&&(this.retry+=e,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var n=i*t;this.setCurrentTime(n)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(o.VIDEO_SEEKED,this)},getProgress:function(){var t=this.video;if(t){var e=t.duration;if(e!==1/0&&!isNaN(e))return t.currentTime/e}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,!this.video||this._codePaused||this.video.ended||this.createPlayPromise()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&!e.ended&&(t?e.paused||(this.removeEventHandlers(),e.pause()):t||(this._playCalled?e.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=n(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,t),this.videoTextureSource.setFlipY(e)),this._key=t,this.flipY=e,!!this.videoTexture},stop:function(t){void 0===t&&(t=!0);var e=this.video;return e&&(this.removeEventHandlers(),e.cancelVideoFrameCallback(this._rfvCallbackId),e.pause()),this.retry=0,this._playCalled=!1,t&&this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(u.GLOBAL_MUTE,this.globalMute,this)}});t.exports=p},58352:t=>{t.exports=function(t,e,i,n){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,n))}},11511:(t,e,i)=>{var n=i(25305),r=i(44603),s=i(23568),o=i(18471);r.register("video",(function(t,e){void 0===t&&(t={});var i=s(t,"key",null),r=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),n(this.scene,r,t),r}))},89025:(t,e,i)=>{var n=i(18471);i(39429).register("video",(function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))}))},10247:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(29849),s=i(58352),t.exports={renderWebGL:r,renderCanvas:s}},29849:t=>{t.exports=function(t,e,i,n){e.videoTexture&&(i.addToRenderList(e),e.pipeline.batchSprite(e,i,n))}},41481:(t,e,i)=>{var n=i(10312),r=i(96503),s=i(87902),o=i(83419),a=i(31401),h=i(95643),l=i(87841),u=i(37303),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,r,s){void 0===r&&(r=1),void 0===s&&(s=r),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=r,this.height=s,this.blendMode=n.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var n=this.input;return i&&n&&!n.customHitArea&&(n.hitArea.width=t,n.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new r(0,0,t),s)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(t,e,i){i.addToRenderList(e)},renderWebGL:function(t,e,i){i.addToRenderList(e)}});t.exports=c},95261:(t,e,i)=>{var n=i(44603),r=i(23568),s=i(41481);n.register("zone",(function(t){var e=r(t,"x",0),i=r(t,"y",0),n=r(t,"width",1),o=r(t,"height",n);return new s(this.scene,e,i,n,o)}))},84175:(t,e,i)=>{var n=i(41481);i(39429).register("zone",(function(t,e,i,r){return this.displayList.add(new n(this.scene,t,e,i,r))}))},95166:t=>{t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},96503:(t,e,i)=>{var n=i(83419),r=i(87902),s=i(26241),o=i(79124),a=i(23777),h=i(28176),l=new n({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=a.CIRCLE,this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=l},71562:t=>{t.exports=function(t){return Math.PI*t.radius*2}},92110:(t,e,i)=>{var n=i(2141);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},42250:(t,e,i)=>{var n=i(96503);t.exports=function(t){return new n(t.x,t.y,t.radius)}},87902:t=>{t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},5698:(t,e,i)=>{var n=i(87902);t.exports=function(t,e){return n(t,e.x,e.y)}},70588:(t,e,i)=>{var n=i(87902);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},26394:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},76278:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},2074:(t,e,i)=>{var n=i(87841);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},26241:(t,e,i)=>{var n=i(92110),r=i(62945),s=i(36383),o=i(2141);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=r(e,0,s.PI2);return n(t,a,i)}},79124:(t,e,i)=>{var n=i(71562),r=i(92110),s=i(62945),o=i(36383);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=n(t)/i);for(var h=0;h<e;h++){var l=s(h/e,0,o.PI2);a.push(r(t,l))}return a}},50884:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},39212:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},28176:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){void 0===e&&(e=new n);var i=2*Math.PI*Math.random(),r=Math.random()+Math.random(),s=r>1?2-r:r,o=s*Math.cos(i),a=s*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},88911:(t,e,i)=>{var n=i(96503);n.Area=i(95166),n.Circumference=i(71562),n.CircumferencePoint=i(92110),n.Clone=i(42250),n.Contains=i(87902),n.ContainsPoint=i(5698),n.ContainsRect=i(70588),n.CopyFrom=i(26394),n.Equals=i(76278),n.GetBounds=i(2074),n.GetPoint=i(26241),n.GetPoints=i(79124),n.Offset=i(50884),n.OffsetPoint=i(39212),n.Random=i(28176),t.exports=n},23777:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},78874:t=>{t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},92990:t=>{t.exports=function(t){var e=t.width/2,i=t.height/2,n=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*n/(10+Math.sqrt(4-3*n)))}},79522:(t,e,i)=>{var n=i(2141);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.width/2,s=t.height/2;return i.x=t.x+r*Math.cos(e),i.y=t.y+s*Math.sin(e),i}},58102:(t,e,i)=>{var n=i(8497);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},81154:t=>{t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,r=(i-t.y)/t.height;return(n*=n)+(r*=r)<.25}},46662:(t,e,i)=>{var n=i(81154);t.exports=function(t,e){return n(t,e.x,e.y)}},1632:(t,e,i)=>{var n=i(81154);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},65534:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},8497:(t,e,i)=>{var n=i(83419),r=i(81154),s=i(90549),o=i(48320),a=i(23777),h=i(24820),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},36146:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},23694:(t,e,i)=>{var n=i(87841);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},90549:(t,e,i)=>{var n=i(79522),r=i(62945),s=i(36383),o=i(2141);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=r(e,0,s.PI2);return n(t,a,i)}},48320:(t,e,i)=>{var n=i(92990),r=i(79522),s=i(62945),o=i(36383);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=n(t)/i);for(var h=0;h<e;h++){var l=s(h/e,0,o.PI2);a.push(r(t,l))}return a}},73424:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},44808:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},24820:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random()*Math.PI*2,r=Math.sqrt(Math.random());return e.x=t.x+r*Math.cos(i)*t.width/2,e.y=t.y+r*Math.sin(i)*t.height/2,e}},49203:(t,e,i)=>{var n=i(8497);n.Area=i(78874),n.Circumference=i(92990),n.CircumferencePoint=i(79522),n.Clone=i(58102),n.Contains=i(81154),n.ContainsPoint=i(46662),n.ContainsRect=i(1632),n.CopyFrom=i(65534),n.Equals=i(36146),n.GetBounds=i(23694),n.GetPoint=i(90549),n.GetPoints=i(48320),n.Offset=i(73424),n.OffsetPoint=i(44808),n.Random=i(24820),t.exports=n},55738:(t,e,i)=>{var n=i(23777),r=i(79291),s={Circle:i(88911),Ellipse:i(49203),Intersects:i(91865),Line:i(2529),Mesh:i(73090),Point:i(43711),Polygon:i(58423),Rectangle:i(93232),Triangle:i(84435)};s=r(!1,s,n),t.exports=s},2044:(t,e,i)=>{var n=i(20339);t.exports=function(t,e){return n(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},81491:t=>{t.exports=function(t,e){var i=e.width/2,n=e.height/2,r=Math.abs(t.x-e.x-i),s=Math.abs(t.y-e.y-n),o=i+t.radius,a=n+t.radius;if(r>o||s>a)return!1;if(r<=i||s<=n)return!0;var h=r-i,l=s-n;return h*h+l*l<=t.radius*t.radius}},63376:(t,e,i)=>{var n=i(2141),r=i(2044);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var s,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,p=e.y,f=e.radius;if(u===p)0===(a=(o=-2*p)*o-4*(s=1)*(d*d+(h=(f*f-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+p*p-f*f))?i.push(new n(h,-o/(2*s))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*s))),i.push(new n(h,(-o-Math.sqrt(a))/(2*s))));else{var m=(l-d)/(u-p),g=(f*f-c*c-d*d+l*l-p*p+u*u)/(2*(u-p));0===(a=(o=2*u*m-2*g*m-2*l)*o-4*(s=m*m+1)*(l*l+u*u+g*g-c*c-2*u*g))?(h=-o/(2*s),i.push(new n(h,g-h*m))):a>0&&(h=(-o+Math.sqrt(a))/(2*s),i.push(new n(h,g-h*m)),h=(-o-Math.sqrt(a))/(2*s),i.push(new n(h,g-h*m)))}}return i}},97439:(t,e,i)=>{var n=i(4042),r=i(81491);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var s=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(s,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},4042:(t,e,i)=>{var n=i(2141),r=i(80462);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var s,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,p=e.radius,f=l-a,m=u-h,g=a-c,v=h-d,y=f*f+m*m,x=2*(f*g+m*v),E=x*x-4*y*(g*g+v*v-p*p);if(0===E){var T=-x/(2*y);s=a+T*f,o=h+T*m,T>=0&&T<=1&&i.push(new n(s,o))}else if(E>0){var _=(-x-Math.sqrt(E))/(2*y);s=a+_*f,o=h+_*m,_>=0&&_<=1&&i.push(new n(s,o));var w=(-x+Math.sqrt(E))/(2*y);s=a+w*f,o=h+w*m,w>=0&&w<=1&&i.push(new n(s,o))}}return i}},36100:(t,e,i)=>{var n=i(25836);t.exports=function(t,e,i,r){void 0===i&&(i=!1);var s,o,a,h=t.x1,l=t.y1,u=t.x2,c=t.y2,d=e.x1,p=e.y1,f=u-h,m=c-l,g=e.x2-d,v=e.y2-p,y=f*v-m*g;if(0===y)return null;if(i){if((o=(d+g*(s=(f*(p-l)+m*(h-d))/(g*m-v*f))-h)/f)<0||s<0||s>1)return null;a=o}else{if(o=((l-p)*f-(h-d)*m)/y,(s=((d-h)*v-(p-l)*g)/y)<0||s>1||o<0||o>1)return null;a=s}return void 0===r&&(r=new n),r.set(h+f*a,l+m*a,a)}},3073:(t,e,i)=>{var n=i(36100),r=i(23031),s=i(25836),o=new r,a=new s;t.exports=function(t,e,i,r){void 0===i&&(i=!1),void 0===r&&(r=new s);var h=!1;r.set(),a.set();for(var l=e[e.length-1],u=0;u<e.length;u++){var c=e[u];o.setTo(l.x,l.y,c.x,c.y),l=c,n(t,o,i,a)&&(!h||a.z<r.z)&&(r.copy(a),h=!0)}return h?r:null}},56362:(t,e,i)=>{var n=i(25836),r=i(61369),s=i(3073),o=new n;t.exports=function(t,e,i,n){void 0===n&&(n=new r),Array.isArray(e)||(e=[e]);var a=!1;n.set(),o.set();for(var h=0;h<e.length;h++)s(t,e[h].points,i,o)&&(!a||o.z<n.z)&&(n.set(o.x,o.y,o.z,h),a=!0);return a?n:null}},60646:(t,e,i)=>{var n=i(2141),r=i(76112),s=i(92773);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],c=[r(o,t,u[0]),r(a,t,u[1]),r(h,t,u[2]),r(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},71147:(t,e,i)=>{var n=i(61369),r=i(56362),s=new(i(23031));function o(t,e,i,o,a){var h=Math.cos(t),l=Math.sin(t);s.setTo(e,i,e+h,i+l);var u=r(s,o,!0);u&&a.push(new n(u.x,u.y,t,u.w))}function a(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var n=[],r=[],s=0;s<i.length;s++)for(var h=i[s].points,l=0;l<h.length;l++){var u=Math.atan2(h[l].y-e,h[l].x-t);-1===r.indexOf(u)&&(o(u,t,e,i,n),o(u-1e-5,t,e,i,n),o(u+1e-5,t,e,i,n),r.push(u))}return n.sort(a)}},68389:(t,e,i)=>{var n=i(87841),r=i(59996);t.exports=function(t,e,i){return void 0===i&&(i=new n),r(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},52784:(t,e,i)=>{var n=i(60646),r=i(59996);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var s=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();n(s,e,i),n(o,e,i),n(a,e,i),n(h,e,i)}return i}},26341:(t,e,i)=>{var n=i(89265),r=i(60646);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var s=e.getLineA(),o=e.getLineB(),a=e.getLineC();r(s,t,i),r(o,t,i),r(a,t,i)}return i}},38720:(t,e,i)=>{var n=i(4042),r=i(67636);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e)){var s=t.getLineA(),o=t.getLineB(),a=t.getLineC();n(s,e,i),n(o,e,i),n(a,e,i)}return i}},13882:(t,e,i)=>{var n=i(2141),r=i(2822),s=i(76112);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=[new n,new n,new n],u=[s(o,e,l[0]),s(a,e,l[1]),s(h,e,l[2])],c=0;c<3;c++)u[c]&&i.push(l[c]);return i}},75636:(t,e,i)=>{var n=i(82944),r=i(13882);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var s=e.getLineA(),o=e.getLineB(),a=e.getLineC();r(t,s,i),r(t,o,i),r(t,a,i)}return i}},80462:(t,e,i)=>{var n=i(87902),r=new(i(2141));t.exports=function(t,e,i){if(void 0===i&&(i=r),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var s=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=s*s+o*o,u=s,c=o;if(l>0){var d=(a*s+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*s+c*o>=0&&n(e,i.x,i.y)}},76112:t=>{t.exports=function(t,e,i){var n=t.x1,r=t.y1,s=t.x2,o=t.y2,a=e.x1,h=e.y1,l=e.x2,u=e.y2;if(n===s&&r===o||a===l&&h===u)return!1;var c=(u-h)*(s-n)-(l-a)*(o-r);if(0===c)return!1;var d=((l-a)*(r-h)-(u-h)*(n-a))/c,p=((s-n)*(r-h)-(o-r)*(n-a))/c;return!(d<0||d>1||p<0||p>1)&&(i&&(i.x=n+d*(s-n),i.y=r+d*(o-r)),!0)}},92773:t=>{t.exports=function(t,e){var i=t.x1,n=t.y1,r=t.x2,s=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||r>=o&&r<=h&&s>=a&&s<=l)return!0;if(i<o&&r>=o){if((u=n+(s-n)*(o-i)/(r-i))>a&&u<=l)return!0}else if(i>h&&r<=h&&(u=n+(s-n)*(h-i)/(r-i))>=a&&u<=l)return!0;if(n<a&&s>=a){if((u=i+(r-i)*(a-n)/(s-n))>=o&&u<=h)return!0}else if(n>l&&s<=l&&(u=i+(r-i)*(l-n)/(s-n))>=o&&u<=h)return!0;return!1}},16204:t=>{t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,r=e.y1,s=e.x2,o=e.y2,a=t.x,h=t.y,l=(s-n)*(s-n)+(o-r)*(o-r);if(0===l)return!1;var u=((a-n)*(s-n)+(h-r)*(o-r))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(r-h)*(r-h))<=i;if(u>=0&&u<=1){var c=((r-h)*(s-n)-(n-a)*(o-r))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((s-a)*(s-a)+(o-h)*(o-h))<=i}},14199:(t,e,i)=>{var n=i(16204);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),r=Math.max(e.x1,e.x2),s=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=r&&t.y>=s&&t.y<=o}},59996:t=>{t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0)&&!(t.right<e.x||t.bottom<e.y||t.x>e.right||t.y>e.bottom)}},89265:(t,e,i)=>{var n=i(76112),r=i(37303),s=i(48653),o=i(77493);t.exports=function(t,e){if(e.left>t.right||e.right<t.left||e.top>t.bottom||e.bottom<t.top)return!1;var i=e.getLineA(),a=e.getLineB(),h=e.getLineC();if(r(t,i.x1,i.y1)||r(t,i.x2,i.y2))return!0;if(r(t,a.x1,a.y1)||r(t,a.x2,a.y2))return!0;if(r(t,h.x1,h.y1)||r(t,h.x2,h.y2))return!0;var l=t.getLineA(),u=t.getLineB(),c=t.getLineC(),d=t.getLineD();if(n(i,l)||n(i,u)||n(i,c)||n(i,d))return!0;if(n(a,l)||n(a,u)||n(a,c)||n(a,d))return!0;if(n(h,l)||n(h,u)||n(h,c)||n(h,d))return!0;var p=o(t);return s(e,p,!0).length>0}},84411:t=>{t.exports=function(t,e,i,n,r,s){return void 0===s&&(s=0),!(e>t.right+s||i<t.left-s||n>t.bottom+s||r<t.top-s)}},67636:(t,e,i)=>{var n=i(80462),r=i(10690);t.exports=function(t,e){return!(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top)&&(!!r(t,e.x,e.y)||(!!n(t.getLineA(),e)||(!!n(t.getLineB(),e)||!!n(t.getLineC(),e))))}},2822:(t,e,i)=>{var n=i(76112);t.exports=function(t,e){return!(!t.contains(e.x1,e.y1)&&!t.contains(e.x2,e.y2))||(!!n(t.getLineA(),e)||(!!n(t.getLineB(),e)||!!n(t.getLineC(),e)))}},82944:(t,e,i)=>{var n=i(48653),r=i(71694),s=i(76112);t.exports=function(t,e){if(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top)return!1;var i=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=e.getLineA(),l=e.getLineB(),u=e.getLineC();if(s(i,h)||s(i,l)||s(i,u))return!0;if(s(o,h)||s(o,l)||s(o,u))return!0;if(s(a,h)||s(a,l)||s(a,u))return!0;var c=r(t),d=n(e,c,!0);return d.length>0||(c=r(e),(d=n(t,c,!0)).length>0)}},91865:(t,e,i)=>{t.exports={CircleToCircle:i(2044),CircleToRectangle:i(81491),GetCircleToCircle:i(63376),GetCircleToRectangle:i(97439),GetLineToCircle:i(4042),GetLineToLine:i(36100),GetLineToPoints:i(3073),GetLineToPolygon:i(56362),GetLineToRectangle:i(60646),GetRaysFromPointToPolygon:i(71147),GetRectangleIntersection:i(68389),GetRectangleToRectangle:i(52784),GetRectangleToTriangle:i(26341),GetTriangleToCircle:i(38720),GetTriangleToLine:i(13882),GetTriangleToTriangle:i(75636),LineToCircle:i(80462),LineToLine:i(76112),LineToRectangle:i(92773),PointToLine:i(16204),PointToLineSegment:i(14199),RectangleToRectangle:i(59996),RectangleToTriangle:i(89265),RectangleToValues:i(84411),TriangleToCircle:i(67636),TriangleToLine:i(2822),TriangleToTriangle:i(82944)}},91938:t=>{t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},84993:t=>{t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var n=Math.round(t.x1),r=Math.round(t.y1),s=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(s-n),h=Math.abs(o-r),l=n<s?1:-1,u=r<o?1:-1,c=a-h;i.push({x:n,y:r});for(var d=1;n!==s||r!==o;){var p=c<<1;p>-h&&(c-=h,n+=l),p<a&&(c+=a,r+=u),d%e==0&&i.push({x:n,y:r}),d++}return i}},36469:t=>{t.exports=function(t,e,i){var n=e-(t.x1+t.x2)/2,r=i-(t.y1+t.y2)/2;return t.x1+=n,t.y1+=r,t.x2+=n,t.y2+=r,t}},31116:(t,e,i)=>{var n=i(23031);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2)}},59944:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},59220:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},78177:(t,e,i)=>{var n=i(35001);t.exports=function(t,e,i){void 0===i&&(i=e);var r=n(t),s=t.x2-t.x1,o=t.y2-t.y1;return e&&(t.x1=t.x1-s/r*e,t.y1=t.y1-o/r*e),i&&(t.x2=t.x2+s/r*i,t.y2=t.y2+o/r*i),t}},26708:(t,e,i)=>{var n=i(52816),r=i(6113),s=i(2141);t.exports=function(t,e,i,o,a){void 0===o&&(o=0),void 0===a&&(a=[]);var h,l,u=[],c=t.x1,d=t.y1,p=t.x2-c,f=t.y2-d,m=r(e,a),g=i-1;for(h=0;h<g;h++)l=m(h/g),u.push(new s(c+p*l,d+f*l));if(l=m(1),u.push(new s(c+p*l,d+f*l)),o>0){var v=u[0],y=[v];for(h=1;h<u.length-1;h++){var x=u[h];n(v,x)>=o&&(y.push(x),v=x)}var E=u[u.length-1];return n(v,E)<o&&y.pop(),y.push(E),y}return u}},32125:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},99569:(t,e,i)=>{var n=i(2141);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.x1,s=t.y1,o=t.x2,a=t.y2,h=(o-r)*(o-r)+(a-s)*(a-s);if(0===h)return i;var l=((e.x-r)*(o-r)+(e.y-s)*(a-s))/h;return i.x=r+l*(o-r),i.y=s+l*(a-s),i}},34638:(t,e,i)=>{var n=i(36383),r=i(91938),s=i(2141);t.exports=function(t,e){void 0===e&&(e=new s);var i=r(t)-n.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},13151:(t,e,i)=>{var n=i(2141);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},15258:(t,e,i)=>{var n=i(35001),r=i(2141);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u<e;u++){var c=u/e,d=o+(h-o)*c,p=a+(l-a)*c;s.push(new r(d,p))}return s}},26408:t=>{t.exports=function(t,e){var i=t.x1,n=t.y1,r=t.x2,s=t.y2,o=(r-i)*(r-i)+(s-n)*(s-n);if(0===o)return!1;var a=((n-e.y)*(r-i)-(i-e.x)*(s-n))/o;return Math.abs(a)*Math.sqrt(o)}},98770:t=>{t.exports=function(t){return Math.abs(t.y1-t.y2)}},35001:t=>{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},23031:(t,e,i)=>{var n=i(83419),r=i(13151),s=i(15258),o=i(23777),a=i(65822),h=i(26099),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return s(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},setFromObjects:function(t,e){return this.x1=t.x,this.y1=t.y,this.x2=e.x,this.y2=e.y,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},64795:(t,e,i)=>{var n=i(36383),r=i(15994),s=i(91938);t.exports=function(t){var e=s(t)-n.TAU;return r(e,-Math.PI,Math.PI)}},52616:(t,e,i)=>{var n=i(36383),r=i(91938);t.exports=function(t){return Math.cos(r(t)-n.TAU)}},87231:(t,e,i)=>{var n=i(36383),r=i(91938);t.exports=function(t){return Math.sin(r(t)-n.TAU)}},89662:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},71165:t=>{t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},65822:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},69777:(t,e,i)=>{var n=i(91938),r=i(64795);t.exports=function(t,e){return 2*r(e)-Math.PI-n(t)}},39706:(t,e,i)=>{var n=i(64400);t.exports=function(t,e){var i=(t.x1+t.x2)/2,r=(t.y1+t.y2)/2;return n(t,i,r,e)}},82585:(t,e,i)=>{var n=i(64400);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},64400:t=>{t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*r-a*s+e,t.y1=o*s+a*r+i,o=t.x2-e,a=t.y2-i,t.x2=o*r-a*s+e,t.y2=o*s+a*r+i,t}},62377:t=>{t.exports=function(t,e,i,n,r){return t.x1=e,t.y1=i,t.x2=e+Math.cos(n)*r,t.y2=i+Math.sin(n)*r,t}},71366:t=>{t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},10809:t=>{t.exports=function(t){return Math.abs(t.x1-t.x2)}},2529:(t,e,i)=>{var n=i(23031);n.Angle=i(91938),n.BresenhamPoints=i(84993),n.CenterOn=i(36469),n.Clone=i(31116),n.CopyFrom=i(59944),n.Equals=i(59220),n.Extend=i(78177),n.GetEasedPoints=i(26708),n.GetMidPoint=i(32125),n.GetNearestPoint=i(99569),n.GetNormal=i(34638),n.GetPoint=i(13151),n.GetPoints=i(15258),n.GetShortestDistance=i(26408),n.Height=i(98770),n.Length=i(35001),n.NormalAngle=i(64795),n.NormalX=i(52616),n.NormalY=i(87231),n.Offset=i(89662),n.PerpSlope=i(71165),n.Random=i(65822),n.ReflectAngle=i(69777),n.Rotate=i(39706),n.RotateAroundPoint=i(82585),n.RotateAroundXY=i(64400),n.SetToAngle=i(62377),n.Slope=i(71366),n.Width=i(10809),t.exports=n},83997:(t,e,i)=>{var n=i(83419),r=i(87841),s=i(26099);function o(t,e,i,n){var r=t-i,s=e-n,o=r*r+s*s;return Math.sqrt(o)}var a=new n({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new r,this._inCenter=new s},getInCenter:function(t){void 0===t&&(t=!0);var e,i,n,r,s,a,h=this.vertex1,l=this.vertex2,u=this.vertex3;t?(e=h.x,i=h.y,n=l.x,r=l.y,s=u.x,a=u.y):(e=h.vx,i=h.vy,n=l.vx,r=l.vy,s=u.vx,a=u.vy);var c=o(s,a,n,r),d=o(e,i,s,a),p=o(n,r,e,i),f=c+d+p;return this._inCenter.set((e*c+n*d+s*p)/f,(i*c+r*d+a*p)/f)},contains:function(t,e,i){var n=this.vertex1,r=this.vertex2,s=this.vertex3,o=n.vx,a=n.vy,h=r.vx,l=r.vy,u=s.vx,c=s.vy;if(i){var d=i.a,p=i.b,f=i.c,m=i.d,g=i.e,v=i.f;o=n.vx*d+n.vy*f+g,a=n.vx*p+n.vy*m+v,h=r.vx*d+r.vy*f+g,l=r.vx*p+r.vy*m+v,u=s.vx*d+s.vy*f+g,c=s.vx*p+s.vy*m+v}var y=u-o,x=c-a,E=h-o,T=l-a,_=t-o,w=e-a,S=y*y+x*x,b=y*E+x*T,C=y*_+x*w,A=E*E+T*T,R=E*_+T*w,M=S*A-b*b,L=0===M?0:1/M,O=(A*C-b*R)*L,P=(S*R-b*C)*L;return O>=0&&P>=0&&O+P<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,n=this.vertex3,r=(i.vx-e.vx)*(n.vy-e.vy)-(i.vy-e.vy)*(n.vx-e.vx);return t<=0?r>=0:r<0},load:function(t,e,i,n,r){return i=this.vertex1.load(t,e,i,n,r),i=this.vertex2.load(t,e,i,n,r),i=this.vertex3.load(t,e,i,n,r)},transformCoordinatesLocal:function(t,e,i,n){return this.vertex1.transformCoordinatesLocal(t,e,i,n),this.vertex2.transformCoordinatesLocal(t,e,i,n),this.vertex3.transformCoordinatesLocal(t,e,i,n),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,n=this.bounds;return n.x=Math.min(t.vx,e.vx,i.vx),n.y=Math.min(t.vy,e.vy,i.vy),n.width=Math.max(t.vx,e.vx,i.vx)-n.x,n.height=Math.max(t.vy,e.vy,i.vy)-n.y,this},isInView:function(t,e,i,n,r,s,o,a,h,l,u){this.update(n,r,s,o,a,h,l,u);var c=this.vertex1,d=this.vertex2,p=this.vertex3;if(c.ta<=0&&d.ta<=0&&p.ta<=0)return!1;if(e&&!this.isCounterClockwise(i))return!1;var f=this.bounds;f.x=Math.min(c.tx,d.tx,p.tx),f.y=Math.min(c.ty,d.ty,p.ty),f.width=Math.max(c.tx,d.tx,p.tx)-f.x,f.height=Math.max(c.ty,d.ty,p.ty)-f.y;var m=t.x+t.width,g=t.y+t.height;return!(f.width<=0||f.height<=0||t.width<=0||t.height<=0)&&!(f.right<t.x||f.bottom<t.y||f.x>m||f.y>g)},scrollUV:function(t,e){return this.vertex1.scrollUV(t,e),this.vertex2.scrollUV(t,e),this.vertex3.scrollUV(t,e),this},scaleUV:function(t,e){return this.vertex1.scaleUV(t,e),this.vertex2.scaleUV(t,e),this.vertex3.scaleUV(t,e),this},setColor:function(t){return this.vertex1.color=t,this.vertex2.color=t,this.vertex3.color=t,this},update:function(t,e,i,n,r,s,o,a){return this.vertex1.update(e,i,n,r,s,o,a,t),this.vertex2.update(e,i,n,r,s,o,a,t),this.vertex3.update(e,i,n,r,s,o,a,t),this},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,n=this.vertex2,r=this.vertex3;return i.x+=t,i.y+=e,n.x+=t,n.y+=e,r.x+=t,r.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=a},48803:(t,e,i)=>{var n=i(83997),r=i(95540),s=i(37867),o=i(25836),a=i(39318),h=new o,l=new o,u=new s;t.exports=function(t){var e,i=r(t,"mesh"),s=r(t,"texture",null),o=r(t,"frame"),c=r(t,"width",1),d=r(t,"height",c),p=r(t,"widthSegments",1),f=r(t,"heightSegments",p),m=r(t,"x",0),g=r(t,"y",0),v=r(t,"z",0),y=r(t,"rotateX",0),x=r(t,"rotateY",0),E=r(t,"rotateZ",0),T=r(t,"zIsUp",!0),_=r(t,"isOrtho",!!i&&i.dirtyCache[11]),w=r(t,"colors",[16777215]),S=r(t,"alphas",[1]),b=r(t,"tile",!1),C=r(t,"flipY",!1),A=r(t,"width",null),R={faces:[],verts:[]};if(h.set(m,g,v),l.set(y,x,E),u.fromRotationXYTranslation(l,h,T),!s&&i)s=i.texture,o||(e=i.frame);else if(i&&"string"==typeof s)s=i.scene.sys.textures.get(s);else if(!s)return R;e||(e=s.get(o)),!A&&_&&s&&i&&(c=e.width/i.height,d=e.height/i.height);var M,L,O=c/2,P=d/2,F=Math.floor(p),I=Math.floor(f),D=F+1,N=I+1,k=c/F,B=d/I,U=[],G=[],W=0,X=1,V=0,$=1;e&&(W=e.u0,X=e.u1,C?(V=e.v1,$=e.v0):(V=e.v0,$=e.v1));var H=X-W,z=$-V;for(L=0;L<N;L++){var Y=L*B-P;for(M=0;M<D;M++){var j=M*k-O;G.push(j,-Y);var K=W+H*(M/F),q=V+z*(L/I);U.push(K,q)}}Array.isArray(w)||(w=[w]),Array.isArray(S)||(S=[S]);var Z=0,Q=0;for(L=0;L<I;L++)for(M=0;M<F;M++){var J=2*(M+D*L),tt=2*(M+D*(L+1)),et=2*(M+1+D*(L+1)),it=2*(M+1+D*L),nt=w[Q],rt=S[Z],st=new a(G[J],G[J+1],0,U[J],U[J+1],nt,rt).transformMat4(u),ot=new a(G[tt],G[tt+1],0,U[tt],U[tt+1],nt,rt).transformMat4(u),at=new a(G[it],G[it+1],0,U[it],U[it+1],nt,rt).transformMat4(u),ht=new a(G[tt],G[tt+1],0,U[tt],U[tt+1],nt,rt).transformMat4(u),lt=new a(G[et],G[et+1],0,U[et],U[et+1],nt,rt).transformMat4(u),ut=new a(G[it],G[it+1],0,U[it],U[it+1],nt,rt).transformMat4(u);b&&(st.setUVs(W,$),ot.setUVs(W,V),at.setUVs(X,$),ht.setUVs(W,V),lt.setUVs(X,V),ut.setUVs(X,$)),++Q===w.length&&(Q=0),++Z===S.length&&(Z=0),R.verts.push(st,ot,at,ht,lt,ut),R.faces.push(new n(st,ot,at),new n(ht,lt,ut))}return i&&(i.faces=i.faces.concat(R.faces),i.vertices=i.vertices.concat(R.verts)),R}},34684:(t,e,i)=>{var n=i(83997),r=i(37867),s=i(25836),o=i(39318),a=new s,h=new s,l=new r;t.exports=function(t,e,i,r,s,u,c,d,p,f){void 0===i&&(i=1),void 0===r&&(r=0),void 0===s&&(s=0),void 0===u&&(u=0),void 0===c&&(c=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===f&&(f=!0);var m={faces:[],verts:[]},g=t.materials;a.set(r,s,u),h.set(c,d,p),l.fromRotationXYTranslation(h,a,f);for(var v=0;v<t.models.length;v++)for(var y=t.models[v],x=y.vertices,E=y.textureCoords,T=y.faces,_=0;_<T.length;_++){var w=T[_],S=w.vertices[0],b=w.vertices[1],C=w.vertices[2],A=x[S.vertexIndex],R=x[b.vertexIndex],M=x[C.vertexIndex],L=S.textureCoordsIndex,O=b.textureCoordsIndex,P=C.textureCoordsIndex,F=-1===L?{u:0,v:1}:E[L],I=-1===O?{u:0,v:0}:E[O],D=-1===P?{u:1,v:1}:E[P],N=16777215;""!==w.material&&g[w.material]&&(N=g[w.material]);var k=new o(A.x*i,A.y*i,A.z*i,F.u,F.v,N).transformMat4(l),B=new o(R.x*i,R.y*i,R.z*i,I.u,I.v,N).transformMat4(l),U=new o(M.x*i,M.y*i,M.z*i,D.u,D.v,N).transformMat4(l);m.verts.push(k,B,U),m.faces.push(new n(k,B,U))}return e&&(e.faces=e.faces.concat(m.faces),e.vertices=e.vertices.concat(m.verts)),m}},92515:(t,e,i)=>{var n=i(83997),r=i(39318);t.exports=function(t,e,i,s,o,a,h,l){if(void 0===s&&(s=!1),void 0===a&&(a=16777215),void 0===h&&(h=1),void 0===l&&(l=!1),t.length===e.length||s){var u,c,d,p,f,m,g,v,y,x,E,T={faces:[],vertices:[]},_=s?3:2,w=Array.isArray(a),S=Array.isArray(h);if(Array.isArray(i)&&i.length>0)for(u=0;u<i.length;u++){var b=i[u],C=2*i[u],A=i[u]*_;c=t[A],d=t[A+1],p=s?t[A+2]:0,f=e[C],m=e[C+1],l&&(m=1-m),g=w?a[b]:a,v=S?h[b]:h,y=0,x=0,E=0,o&&(y=o[A],x=o[A+1],E=s?o[A+2]:0),T.vertices.push(new r(c,d,p,f,m,g,v,y,x,E))}else{var R=0,M=0;for(u=0;u<t.length;u+=_)c=t[u],d=t[u+1],p=s?t[u+2]:0,f=e[R],m=e[R+1],g=w?a[M]:a,v=S?h[M]:h,y=0,x=0,E=0,o&&(y=o[u],x=o[u+1],E=s?o[u+2]:0),T.vertices.push(new r(c,d,p,f,m,g,v,y,x,E)),R+=2,M++}for(u=0;u<T.vertices.length;u+=3){var L=T.vertices[u],O=T.vertices[u+1],P=T.vertices[u+2];T.faces.push(new n(L,O,P))}return T}console.warn("GenerateVerts: vertices and uvs count not equal")}},85048:t=>{var e=!0,i="untitled",n="",r="";function s(t){var e=t.indexOf("#");return e>-1?t.substring(0,e):t}function o(t){return 0===t.models.length&&t.models.push({faces:[],name:i,textureCoords:[],vertexNormals:[],vertices:[]}),n="",t.models[t.models.length-1]}function a(t,e){var r=t.length>=2?t[1]:i;e.models.push({faces:[],name:r,textureCoords:[],vertexNormals:[],vertices:[]}),n=""}function h(t){2===t.length&&(n=t[1])}function l(t,e){var i=t.length,n=i>=2?parseFloat(t[1]):0,r=i>=3?parseFloat(t[2]):0,s=i>=4?parseFloat(t[3]):0;o(e).vertices.push({x:n,y:r,z:s})}function u(t,i){var n=t.length,r=n>=2?parseFloat(t[1]):0,s=n>=3?parseFloat(t[2]):0,a=n>=4?parseFloat(t[3]):0;isNaN(r)&&(r=0),isNaN(s)&&(s=0),isNaN(a)&&(a=0),e&&(s=1-s),o(i).textureCoords.push({u:r,v:s,w:a})}function c(t,e){var i=t.length,n=i>=2?parseFloat(t[1]):0,r=i>=3?parseFloat(t[2]):0,s=i>=4?parseFloat(t[3]):0;o(e).vertexNormals.push({x:n,y:r,z:s})}function d(t,e){var i=t.length-1;if(!(i<3)){for(var s={group:n,material:r,vertices:[]},a=0;a<i;a++){var h=t[a+1].split("/"),l=h.length;if(!(l<1||l>3)){var u=0,c=0,d=0;u=parseInt(h[0],10),l>1&&""!==h[1]&&(c=parseInt(h[1],10)),l>2&&(d=parseInt(h[2],10)),0!==u&&(u<0&&(u=o(e).vertices.length+1+u),c-=1,u-=1,d-=1,s.vertices.push({textureCoordsIndex:c,vertexIndex:u,vertexNormalIndex:d}))}}o(e).faces.push(s)}}function p(t,e){t.length>=2&&e.materialLibraries.push(t[1])}function f(t){t.length>=2&&(r=t[1])}t.exports=function(t,i){void 0===i&&(i=!0),e=i;var o={materials:{},materialLibraries:[],models:[]};n="",r="";for(var m=t.split("\n"),g=0;g<m.length;g++){var v=s(m[g]).replace(/\s\s+/g," ").trim().split(" ");switch(v[0].toLowerCase()){case"o":a(v,o);break;case"g":h(v);break;case"v":l(v,o);break;case"vt":u(v,o);break;case"vn":c(v,o);break;case"f":d(v,o);break;case"mtllib":p(v,o);break;case"usemtl":f(v)}}return o}},61485:(t,e,i)=>{var n=i(37589);t.exports=function(t){for(var e={},i=t.split("\n"),r="",s=0;s<i.length;s++){var o=i[s].trim();if(0!==o.indexOf("#")&&""!==o){var a=o.replace(/\s\s+/g," ").trim().split(" ");switch(a[0].toLowerCase()){case"newmtl":r=a[1];break;case"kd":var h=Math.floor(255*a[1]),l=a.length>=2?Math.floor(255*a[2]):h,u=a.length>=3?Math.floor(255*a[3]):h;e[r]=n(h,l,u)}}}return e}},92570:t=>{t.exports=function(t,e,i,n){var r,s;if(void 0===i&&void 0===n){var o=t.getInCenter();r=o.x,s=o.y}var a=Math.cos(e),h=Math.sin(e),l=t.vertex1,u=t.vertex2,c=t.vertex3,d=l.x-r,p=l.y-s;l.set(d*a-p*h+r,d*h+p*a+s),d=u.x-r,p=u.y-s,u.set(d*a-p*h+r,d*h+p*a+s),d=c.x-r,p=c.y-s,c.set(d*a-p*h+r,d*h+p*a+s)}},39318:(t,e,i)=>{var n=i(83419),r=i(70554),s=i(25836),o=new n({Extends:s,initialize:function(t,e,i,n,r,o,a,h,l,u){void 0===o&&(o=16777215),void 0===a&&(a=1),void 0===h&&(h=0),void 0===l&&(l=0),void 0===u&&(u=0),s.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=h,this.ny=l,this.nz=u,this.u=n,this.v=r,this.color=o,this.alpha=a,this.tx=0,this.ty=0,this.ta=0,this.tu=n,this.tv=r},setUVs:function(t,e){return this.u=t,this.v=e,this.tu=t,this.tv=e,this},scrollUV:function(t,e){return this.tu+=t,this.tv+=e,this},scaleUV:function(t,e){return this.tu=this.u*t,this.tv=this.v*e,this},transformCoordinatesLocal:function(t,e,i,n){var r=this.x,s=this.y,o=this.z,a=t.val,h=r*a[0]+s*a[4]+o*a[8]+a[12],l=r*a[1]+s*a[5]+o*a[9]+a[13],u=r*a[2]+s*a[6]+o*a[10]+a[14],c=r*a[3]+s*a[7]+o*a[11]+a[15];this.vx=h/c*e,this.vy=-l/c*i,this.vz=n<=0?u/c:-u/c},resize:function(t,e,i,n,r,s){return this.x=t,this.y=e,this.vx=this.x*i,this.vy=-this.y*n,this.vz=0,r<.5?this.vx+=i*(.5-r):r>.5&&(this.vx-=i*(r-.5)),s<.5?this.vy+=n*(.5-s):s>.5&&(this.vy-=n*(s-.5)),this},update:function(t,e,i,n,r,s,o,a){var h=this.vx*t+this.vy*i+r,l=this.vx*e+this.vy*n+s;return o&&(h=Math.round(h),l=Math.round(l)),this.tx=h,this.ty=l,this.ta=this.alpha*a,this},load:function(t,e,i,n,s){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.tu,t[++i]=this.tv,t[++i]=n,t[++i]=s,e[++i]=r.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=o},73090:(t,e,i)=>{var n={Face:i(83997),GenerateGridVerts:i(48803),GenerateObjVerts:i(34684),GenerateVerts:i(92515),ParseObj:i(85048),ParseObjMaterial:i(61485),RotateFace:i(92570),Vertex:i(39318)};t.exports=n},96550:t=>{t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},99706:(t,e,i)=>{var n=i(2141);t.exports=function(t){return new n(t.x,t.y)}},68010:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y)}},27814:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},73565:t=>{t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},87555:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var r=0;r<i;r++)e.x+=t[r].x,e.y+=t[r].y;e.x/=i,e.y/=i}return e}},28793:t=>{t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},44405:t=>{t.exports=function(t){return t.x*t.x+t.y*t.y}},20873:(t,e,i)=>{var n=i(87841);t.exports=function(t,e){void 0===e&&(e=new n);for(var i=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=0;a<t.length;a++){var h=t[a];h.x>i&&(i=h.x),h.x<r&&(r=h.x),h.y>s&&(s=h.y),h.y<o&&(o=h.y)}return e.x=r,e.y=o,e.width=i-r,e.height=s-o,e}},26152:(t,e,i)=>{var n=i(2141);t.exports=function(t,e,i,r){return void 0===i&&(i=0),void 0===r&&(r=new n),r.x=t.x+(e.x-t.x)*i,r.y=t.y+(e.y-t.y)*i,r}},55767:t=>{t.exports=function(t){return t.setTo(t.y,t.x)}},79432:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){return void 0===e&&(e=new n),e.setTo(-t.x,-t.y)}},2141:(t,e,i)=>{var n=i(83419),r=i(23777),s=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=s},72930:(t,e,i)=>{var n=i(2141),r=i(44405);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=(t.x*e.x+t.y*e.y)/r(e);return 0!==s&&(i.x=s*e.x,i.y=s*e.y),i}},62880:(t,e,i)=>{var n=i(2141);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=t.x*e.x+t.y*e.y;return 0!==r&&(i.x=r*e.x,i.y=r*e.y),i}},15093:(t,e,i)=>{var n=i(28793);t.exports=function(t,e){if(0!==t.x||0!==t.y){var i=n(t);t.x/=i,t.y/=i}return t.x*=e,t.y*=e,t}},43711:(t,e,i)=>{var n=i(2141);n.Ceil=i(96550),n.Clone=i(99706),n.CopyFrom=i(68010),n.Equals=i(27814),n.Floor=i(73565),n.GetCentroid=i(87555),n.GetMagnitude=i(28793),n.GetMagnitudeSq=i(44405),n.GetRectangleFromPoints=i(20873),n.Interpolate=i(26152),n.Invert=i(55767),n.Negative=i(79432),n.Project=i(72930),n.ProjectUnit=i(62880),n.SetMagnitude=i(15093),t.exports=n},12306:(t,e,i)=>{var n=i(25717);t.exports=function(t){return new n(t.points)}},63814:t=>{t.exports=function(t,e,i){for(var n=!1,r=-1,s=t.points.length-1;++r<t.points.length;s=r){var o=t.points[r].x,a=t.points[r].y,h=t.points[s].x,l=t.points[s].y;(a<=i&&i<l||l<=i&&i<a)&&e<(h-o)*(i-a)/(l-a)+o&&(n=!n)}return n}},99338:(t,e,i)=>{var n=i(63814);t.exports=function(t,e){return n(t,e.x,e.y)}},94811:t=>{"use strict";function e(t,e,n){n=n||2;var s,o,a,h,c,d,f,m=e&&e.length,g=m?e[0]*n:t.length,v=i(t,0,g,n,!0),y=[];if(!v||v.next===v.prev)return y;if(m&&(v=function(t,e,n,r){var s,o,a,h=[];for(s=0,o=e.length;s<o;s++)(a=i(t,e[s]*r,s<o-1?e[s+1]*r:t.length,r,!1))===a.next&&(a.steiner=!0),h.push(p(a));for(h.sort(l),s=0;s<h.length;s++)n=u(h[s],n);return n}(t,e,v,n)),t.length>80*n){s=a=t[0],o=h=t[1];for(var x=n;x<g;x+=n)(c=t[x])<s&&(s=c),(d=t[x+1])<o&&(o=d),c>a&&(a=c),d>h&&(h=d);f=0!==(f=Math.max(a-s,h-o))?32767/f:0}return r(v,y,n,s,o,f,0),y}function i(t,e,i,n,r){var s,o;if(r===C(t,e,i,n)>0)for(s=e;s<i;s+=n)o=w(s,t[s],t[s+1],o);else for(s=i-n;s>=e;s-=n)o=w(s,t[s],t[s+1],o);return o&&v(o,o.next)&&(S(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!v(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(S(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function r(t,e,i,l,u,c,p){if(t){!p&&c&&function(t,e,i,n){var r=t;do{0===r.z&&(r.z=d(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,i,n,r,s,o,a,h,l=1;do{for(i=t,t=null,s=null,o=0;i;){for(o++,n=i,a=0,e=0;e<l&&(a++,n=n.nextZ);e++);for(h=l;a>0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(r=i,i=i.nextZ,a--):(r=n,n=n.nextZ,h--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;i=n}s.nextZ=null,l*=2}while(o>1)}(r)}(t,l,u,c);for(var f,m,g=t;t.prev!==t.next;)if(f=t.prev,m=t.next,c?o(t,l,u,c):s(t))e.push(f.i/i|0),e.push(t.i/i|0),e.push(m.i/i|0),S(t),t=m.next,g=m.next;else if((t=m)===g){p?1===p?r(t=a(n(t),e,i),e,i,l,u,c,2):2===p&&h(t,e,i,l,u,c):r(n(t),e,i,l,u,c,1);break}}}function s(t){var e=t.prev,i=t,n=t.next;if(g(e,i,n)>=0)return!1;for(var r=e.x,s=i.x,o=n.x,a=e.y,h=i.y,l=n.y,u=r<s?r<o?r:o:s<o?s:o,c=a<h?a<l?a:l:h<l?h:l,d=r>s?r>o?r:o:s>o?s:o,p=a>h?a>l?a:l:h>l?h:l,m=n.next;m!==e;){if(m.x>=u&&m.x<=d&&m.y>=c&&m.y<=p&&f(r,a,s,h,o,l,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function o(t,e,i,n){var r=t.prev,s=t,o=t.next;if(g(r,s,o)>=0)return!1;for(var a=r.x,h=s.x,l=o.x,u=r.y,c=s.y,p=o.y,m=a<h?a<l?a:l:h<l?h:l,v=u<c?u<p?u:p:c<p?c:p,y=a>h?a>l?a:l:h>l?h:l,x=u>c?u>p?u:p:c>p?c:p,E=d(m,v,e,i,n),T=d(y,x,e,i,n),_=t.prevZ,w=t.nextZ;_&&_.z>=E&&w&&w.z<=T;){if(_.x>=m&&_.x<=y&&_.y>=v&&_.y<=x&&_!==r&&_!==o&&f(a,u,h,c,l,p,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;if(_=_.prevZ,w.x>=m&&w.x<=y&&w.y>=v&&w.y<=x&&w!==r&&w!==o&&f(a,u,h,c,l,p,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;w=w.nextZ}for(;_&&_.z>=E;){if(_.x>=m&&_.x<=y&&_.y>=v&&_.y<=x&&_!==r&&_!==o&&f(a,u,h,c,l,p,_.x,_.y)&&g(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;w&&w.z<=T;){if(w.x>=m&&w.x<=y&&w.y>=v&&w.y<=x&&w!==r&&w!==o&&f(a,u,h,c,l,p,w.x,w.y)&&g(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function a(t,e,i){var r=t;do{var s=r.prev,o=r.next.next;!v(s,o)&&y(s,r,r.next,o)&&T(s,o)&&T(o,s)&&(e.push(s.i/i|0),e.push(r.i/i|0),e.push(o.i/i|0),S(r),S(r.next),r=t=o),r=r.next}while(r!==t);return n(r)}function h(t,e,i,s,o,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&m(h,l)){var u=_(h,l);return h=n(h,h.next),u=n(u,u.next),r(h,e,i,s,o,a,0),void r(u,e,i,s,o,a,0)}l=l.next}h=h.next}while(h!==t)}function l(t,e){return t.x-e.x}function u(t,e){var i=function(t,e){var i,n=e,r=t.x,s=t.y,o=-1/0;do{if(s<=n.y&&s>=n.next.y&&n.next.y!==n.y){var a=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=r&&a>o&&(o=a,i=n.x<n.next.x?n:n.next,a===r))return i}n=n.next}while(n!==e);if(!i)return null;var h,l=i,u=i.x,d=i.y,p=1/0;n=i;do{r>=n.x&&n.x>=u&&r!==n.x&&f(s<d?r:o,s,u,d,s<d?o:r,s,n.x,n.y)&&(h=Math.abs(s-n.y)/(r-n.x),T(n,t)&&(h<p||h===p&&(n.x>i.x||n.x===i.x&&c(i,n)))&&(i=n,p=h)),n=n.next}while(n!==l);return i}(t,e);if(!i)return e;var r=_(i,t);return n(r,r.next),n(i,i.next)}function c(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*r|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*r|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),e=e.next}while(e!==t);return i}function f(t,e,i,n,r,s,o,a){return(r-o)*(e-a)>=(t-o)*(s-a)&&(t-o)*(n-a)>=(i-o)*(e-a)&&(i-o)*(s-a)>=(r-o)*(n-a)}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&y(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(T(t,e)&&T(e,t)&&function(t,e){var i=t,n=!1,r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{i.y>s!=i.next.y>s&&i.next.y!==i.y&&r<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||v(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,i,n){var r=E(g(t,e,i)),s=E(g(t,e,n)),o=E(g(i,n,t)),a=E(g(i,n,e));return r!==s&&o!==a||(!(0!==r||!x(t,i,e))||(!(0!==s||!x(t,n,e))||(!(0!==o||!x(i,t,n))||!(0!==a||!x(i,e,n)))))}function x(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function E(t){return t>0?1:t<0?-1:0}function T(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function _(t,e){var i=new b(t.i,t.x,t.y),n=new b(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function w(t,e,i,n){var r=new b(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function b(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,i,n){for(var r=0,s=e,o=i-n;s<i;s+=n)r+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return r}e.deviation=function(t,e,i,n){var r=e&&e.length,s=r?e[0]*i:t.length,o=Math.abs(C(t,0,s,i));if(r)for(var a=0,h=e.length;a<h;a++){var l=e[a]*i,u=a<h-1?e[a+1]*i:t.length;o-=Math.abs(C(t,l,u,i))}var c=0;for(a=0;a<n.length;a+=3){var d=n[a]*i,p=n[a+1]*i,f=n[a+2]*i;c+=Math.abs((t[d]-t[f])*(t[p+1]-t[d+1])-(t[d]-t[p])*(t[f+1]-t[d+1]))}return 0===o&&0===c?0:Math.abs((c-o)/o)},e.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},n=0,r=0;r<t.length;r++){for(var s=0;s<t[r].length;s++)for(var o=0;o<e;o++)i.vertices.push(t[r][s][o]);r>0&&(n+=t[r-1].length,i.holes.push(n))}return i},t.exports=e},13829:(t,e,i)=>{var n=i(87841);t.exports=function(t,e){void 0===e&&(e=new n);for(var i,r=1/0,s=1/0,o=-r,a=-s,h=0;h<t.points.length;h++)i=t.points[h],r=Math.min(r,i.x),s=Math.min(s,i.y),o=Math.max(o,i.x),a=Math.max(a,i.y);return e.x=r,e.y=s,e.width=o-r,e.height=a-s,e}},26173:t=>{t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i<t.points.length;i++)e.push(t.points[i].x),e.push(t.points[i].y);return e}},9564:(t,e,i)=>{var n=i(35001),r=i(23031),s=i(30052);t.exports=function(t,e,i,o){void 0===o&&(o=[]);var a=t.points,h=s(t);!e&&i>0&&(e=h/i);for(var l=0;l<e;l++)for(var u=h*(l/e),c=0,d=0;d<a.length;d++){var p=a[d],f=a[(d+1)%a.length],m=new r(p.x,p.y,f.x,f.y),g=n(m);if(!(u<c||u>c+g)){var v=m.getPoint((u-c)/g);o.push(v);break}c+=g}return o}},30052:(t,e,i)=>{var n=i(35001),r=i(23031);t.exports=function(t){for(var e=t.points,i=0,s=0;s<e.length;s++){var o=e[s],a=e[(s+1)%e.length],h=new r(o.x,o.y,a.x,a.y);i+=n(h)}return i}},25717:(t,e,i)=>{var n=i(83419),r=i(63814),s=i(9564),o=i(23777),a=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return r(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=0;i<t.length;i++)e={x:0,y:0},"number"==typeof t[i]||"string"==typeof t[i]?(e.x=parseFloat(t[i]),e.y=parseFloat(t[i+1]),i++):Array.isArray(t[i])?(e.x=t[i][0],e.y=t[i][1]):(e.x=t[i].x,e.y=t[i].y),this.points.push(e);return this.calculateArea(),this},calculateArea:function(){if(this.points.length<3)return this.area=0,this.area;for(var t,e,i=0,n=0;n<this.points.length-1;n++)t=this.points[n],i+=((e=this.points[n+1]).x-t.x)*(t.y+e.y);return t=this.points[0],e=this.points[this.points.length-1],i+=(t.x-e.x)*(e.y+t.y),this.area=.5*-i,this.area},getPoints:function(t,e,i){return s(this,t,e,i)}});t.exports=a},8133:t=>{t.exports=function(t){return t.points.reverse(),t}},29524:t=>{function e(t,e,i){var n=e.x,r=e.y,s=i.x-n,o=i.y-r;if(0!==s||0!==o){var a=((t.x-n)*s+(t.y-r)*o)/(s*s+o*o);a>1?(n=i.x,r=i.y):a>0&&(n+=s*a,r+=o*a)}return(s=t.x-n)*s+(o=t.y-r)*o}function i(t,n,r,s,o){for(var a,h=s,l=n+1;l<r;l++){var u=e(t[l],t[n],t[r]);u>h&&(a=l,h=u)}h>s&&(a-n>1&&i(t,n,a,s,o),o.push(t[a]),r-a>1&&i(t,a,r,s,o))}function n(t,e){var n=t.length-1,r=[t[0]];return i(t,0,n,e,r),r.push(t[n]),r}t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var r=t.points;if(r.length>2){var s=e*e;i||(r=function(t,e){for(var i,n,r,s,o,a=t[0],h=[a],l=1,u=t.length;l<u;l++)i=t[l],r=a,s=void 0,o=void 0,s=(n=i).x-r.x,o=n.y-r.y,s*s+o*o>e&&(h.push(i),a=i);return a!==i&&h.push(i),h}(r,s)),t.setTo(n(r,s))}return t}},5469:t=>{var e=function(t,e){return t[0]=e[0],t[1]=e[1],t};t.exports=function(t){var i,n=[],r=t.points;for(i=0;i<r.length;i++)n.push([r[i].x,r[i].y]);var s=[];for(n.length>0&&s.push(e([0,0],n[0])),i=0;i<n.length-1;i++){var o=n[i],a=n[i+1],h=o[0],l=o[1],u=a[0],c=a[1];s.push([.85*h+.15*u,.85*l+.15*c]),s.push([.15*h+.85*u,.15*l+.85*c])}return n.length>1&&s.push(e([0,0],n[n.length-1])),t.setTo(s)}},24709:t=>{t.exports=function(t,e,i){for(var n=t.points,r=0;r<n.length;r++)n[r].x+=e,n[r].y+=i;return t}},58423:(t,e,i)=>{var n=i(25717);n.Clone=i(12306),n.Contains=i(63814),n.ContainsPoint=i(99338),n.Earcut=i(94811),n.GetAABB=i(13829),n.GetNumberArray=i(26173),n.GetPoints=i(9564),n.Perimeter=i(30052),n.Reverse=i(8133),n.Simplify=i(29524),n.Smooth=i(5469),n.Translate=i(24709),t.exports=n},62224:t=>{t.exports=function(t){return t.width*t.height}},98615:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},31688:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t}},67502:t=>{t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},65085:(t,e,i)=>{var n=i(87841);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},37303:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},96553:(t,e,i)=>{var n=i(37303);t.exports=function(t,e){return n(t,e.x,e.y)}},70273:t=>{t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&(e.x>t.x&&e.x<t.right&&e.right>t.x&&e.right<t.right&&e.y>t.y&&e.y<t.bottom&&e.bottom>t.y&&e.bottom<t.bottom)}},43459:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},77493:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},9219:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},53751:(t,e,i)=>{var n=i(8249);t.exports=function(t,e){var i=n(t);return i<n(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},16088:(t,e,i)=>{var n=i(8249);t.exports=function(t,e){var i=n(t);return i>n(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},80774:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},83859:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},19217:(t,e,i)=>{var n=i(87841),r=i(36383);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,s,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=r.MIN_SAFE_INTEGER,u=r.MIN_SAFE_INTEGER,c=0;c<t.length;c++)i=t[c],Array.isArray(i)?(s=i[0],o=i[1]):(s=i.x,o=i.y),a=Math.min(a,s),h=Math.min(h,o),l=Math.max(l,s),u=Math.max(u,o);return e.x=a,e.y=h,e.width=l-a,e.height=u-h,e}},9477:(t,e,i)=>{var n=i(87841);t.exports=function(t,e,i,r,s){return void 0===s&&(s=new n),s.setTo(Math.min(t,i),Math.min(e,r),Math.abs(t-i),Math.abs(e-r))}},8249:t=>{t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},27165:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},20812:(t,e,i)=>{var n=i(13019),r=i(2141);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var s=n(t)*e;return e>.5?(s-=t.width+t.height)<=t.width?(i.x=t.right-s,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(s-t.width)):s<=t.width?(i.x=t.x+s,i.y=t.y):(i.x=t.right,i.y=t.y+(s-t.width)),i}},34819:(t,e,i)=>{var n=i(20812),r=i(13019);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&i>0&&(e=r(t)/i);for(var o=0;o<e;o++){var a=o/e;s.push(n(t,a))}return s}},51313:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},86091:(t,e,i)=>{var n=i(67502);t.exports=function(t,e,i){var r=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,r,s)}},53951:(t,e,i)=>{var n=i(87841),r=i(59996);t.exports=function(t,e,i){return void 0===i&&(i=new n),r(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},14649:(t,e,i)=>{var n=i(13019),r=i(2141);t.exports=function(t,e,i,s){if(void 0===s&&(s=[]),!e&&!i)return s;e?i=Math.round(n(t)/e):e=n(t)/i;for(var o=t.x,a=t.y,h=0,l=0;l<i;l++)switch(s.push(new r(o,a)),h){case 0:(o+=e)>=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return s}},33595:t=>{t.exports=function(t,e){for(var i=t.x,n=t.right,r=t.y,s=t.bottom,o=0;o<e.length;o++)i=Math.min(i,e[o].x),n=Math.max(n,e[o].x),r=Math.min(r,e[o].y),s=Math.max(s,e[o].y);return t.x=i,t.y=r,t.width=n-i,t.height=s-r,t}},20074:t=>{t.exports=function(t,e){var i=Math.min(t.x,e.x),n=Math.max(t.right,e.right);t.x=i,t.width=n-i;var r=Math.min(t.y,e.y),s=Math.max(t.bottom,e.bottom);return t.y=r,t.height=s-r,t}},92171:t=>{t.exports=function(t,e,i){var n=Math.min(t.x,e),r=Math.max(t.right,e);t.x=n,t.width=r-n;var s=Math.min(t.y,i),o=Math.max(t.bottom,i);return t.y=s,t.height=o-s,t}},42981:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},46907:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},60170:t=>{t.exports=function(t,e){return t.x<e.right&&t.right>e.x&&t.y<e.bottom&&t.bottom>e.y}},13019:t=>{t.exports=function(t){return 2*(t.width+t.height)}},85133:(t,e,i)=>{var n=i(2141),r=i(39506);t.exports=function(t,e,i){void 0===i&&(i=new n),e=r(e);var s=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=s>0?t.height/2:t.height/-2;return Math.abs(a*s)<Math.abs(h*o)?h=a*s/o:a=h*o/s,i.x=a+t.centerX,i.y=h+t.centerY,i}},26597:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},86470:(t,e,i)=>{var n=i(30976),r=i(70273),s=i(2141);t.exports=function(t,e,i){if(void 0===i&&(i=new s),r(t,e))switch(n(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},87841:(t,e,i)=>{var n=i(83419),r=i(37303),s=i(20812),o=i(34819),a=i(23777),h=i(23031),l=i(26597),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},94845:t=>{t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},31730:t=>{t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},36899:(t,e,i)=>{var n=i(87841);t.exports=function(t,e,i){void 0===i&&(i=new n);var r=Math.min(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-r,a=Math.max(t.bottom,e.bottom)-s;return i.setTo(r,s,o,a)}},93232:(t,e,i)=>{var n=i(87841);n.Area=i(62224),n.Ceil=i(98615),n.CeilAll=i(31688),n.CenterOn=i(67502),n.Clone=i(65085),n.Contains=i(37303),n.ContainsPoint=i(96553),n.ContainsRect=i(70273),n.CopyFrom=i(43459),n.Decompose=i(77493),n.Equals=i(9219),n.FitInside=i(53751),n.FitOutside=i(16088),n.Floor=i(80774),n.FloorAll=i(83859),n.FromPoints=i(19217),n.FromXY=i(9477),n.GetAspectRatio=i(8249),n.GetCenter=i(27165),n.GetPoint=i(20812),n.GetPoints=i(34819),n.GetSize=i(51313),n.Inflate=i(86091),n.Intersection=i(53951),n.MarchingAnts=i(14649),n.MergePoints=i(33595),n.MergeRect=i(20074),n.MergeXY=i(92171),n.Offset=i(42981),n.OffsetPoint=i(46907),n.Overlaps=i(60170),n.Perimeter=i(13019),n.PerimeterPoint=i(85133),n.Random=i(26597),n.RandomOutside=i(86470),n.SameDimensions=i(94845),n.Scale=i(31730),n.Union=i(36899),t.exports=n},41658:t=>{t.exports=function(t){var e=t.x1,i=t.y1,n=t.x2,r=t.y2,s=t.x3,o=t.y3;return Math.abs(((s-e)*(r-i)-(n-e)*(o-i))/2)}},39208:(t,e,i)=>{var n=i(16483);t.exports=function(t,e,i){var r=i*(Math.sqrt(3)/2);return new n(t,e,t+i/2,e+r,t-i/2,e+r)}},39545:(t,e,i)=>{var n=i(94811),r=i(16483);t.exports=function(t,e,i,s,o){void 0===e&&(e=null),void 0===i&&(i=1),void 0===s&&(s=1),void 0===o&&(o=[]);for(var a,h,l,u,c,d,p,f,m,g=n(t,e),v=0;v<g.length;v+=3)a=g[v],h=g[v+1],l=g[v+2],u=t[2*a]*i,c=t[2*a+1]*s,d=t[2*h]*i,p=t[2*h+1]*s,f=t[2*l]*i,m=t[2*l+1]*s,o.push(new r(u,c,d,p,f,m));return o}},90301:(t,e,i)=>{var n=i(16483);t.exports=function(t,e,i,r){return void 0===r&&(r=i),new n(t,e,t,e-r,t+i,e)}},23707:(t,e,i)=>{var n=i(97523),r=i(13584);t.exports=function(t,e,i,s){void 0===s&&(s=n);var o=s(t),a=e-o.x,h=i-o.y;return r(t,a,h)}},97523:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},24951:(t,e,i)=>{var n=i(26099);function r(t,e,i,n){return t*n-e*i}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x3,s=t.y3,o=t.x1-i,a=t.y1-s,h=t.x2-i,l=t.y2-s,u=2*r(o,a,h,l),c=r(a,o*o+a*a,l,h*h+l*l),d=r(o,o*o+a*a,h,h*h+l*l);return e.x=i-c/u,e.y=s+d/u,e}},85614:(t,e,i)=>{var n=i(96503);t.exports=function(t,e){void 0===e&&(e=new n);var i,r,s=t.x1,o=t.y1,a=t.x2,h=t.y2,l=t.x3,u=t.y3,c=a-s,d=h-o,p=l-s,f=u-o,m=c*(s+a)+d*(o+h),g=p*(s+l)+f*(o+u),v=2*(c*(u-h)-d*(l-a));if(Math.abs(v)<1e-6){var y=Math.min(s,a,l),x=Math.min(o,h,u);i=.5*(Math.max(s,a,l)-y),r=.5*(Math.max(o,h,u)-x),e.x=y+i,e.y=x+r,e.radius=Math.sqrt(i*i+r*r)}else e.x=(f*m-d*g)/v,e.y=(c*g-p*m)/v,i=e.x-s,r=e.y-o,e.radius=Math.sqrt(i*i+r*r);return e}},74422:(t,e,i)=>{var n=i(16483);t.exports=function(t){return new n(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},10690:t=>{t.exports=function(t,e,i){var n=t.x3-t.x1,r=t.y3-t.y1,s=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+r*r,u=n*s+r*o,c=n*a+r*h,d=s*s+o*o,p=s*a+o*h,f=l*d-u*u,m=0===f?0:1/f,g=(d*c-u*p)*m,v=(l*p-u*c)*m;return g>=0&&v>=0&&g+v<1}},48653:t=>{t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var r,s,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,p=t.y2-t.y1,f=u*u+c*c,m=u*d+c*p,g=d*d+p*p,v=f*g-m*m,y=0===v?0:1/v,x=t.x1,E=t.y1,T=0;T<e.length&&(s=(f*(l=d*(o=e[T].x-x)+p*(a=e[T].y-E))-m*(h=u*o+c*a))*y,!((r=(g*h-m*l)*y)>=0&&s>=0&&r+s<1&&(n.push({x:e[T].x,y:e[T].y}),i)));T++);return n}},96006:(t,e,i)=>{var n=i(10690);t.exports=function(t,e){return n(t,e.x,e.y)}},71326:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},71694:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},33522:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},20437:(t,e,i)=>{var n=i(2141),r=i(35001);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=s.x1,i.y=s.y1,i;var h=r(s),l=r(o),u=r(a),c=(h+l+u)*e,d=0;return c<h?(d=c/h,i.x=s.x1+(s.x2-s.x1)*d,i.y=s.y1+(s.y2-s.y1)*d):c>h+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},80672:(t,e,i)=>{var n=i(35001),r=i(2141);t.exports=function(t,e,i,s){void 0===s&&(s=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;!e&&i>0&&(e=d/i);for(var p=0;p<e;p++){var f=d*(p/e),m=0,g=new r;f<l?(m=f/l,g.x=o.x1+(o.x2-o.x1)*m,g.y=o.y1+(o.y2-o.y1)*m):f>l+u?(m=(f-=l+u)/c,g.x=h.x1+(h.x2-h.x1)*m,g.y=h.y1+(h.y2-h.y1)*m):(m=(f-=l)/u,g.x=a.x1+(a.x2-a.x1)*m,g.y=a.y1+(a.y2-a.y1)*m),s.push(g)}return s}},39757:(t,e,i)=>{var n=i(2141);function r(t,e,i,n){var r=t-i,s=e-n,o=r*r+s*s;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x1,s=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=r(h,l,o,a),c=r(i,s,h,l),d=r(o,a,i,s),p=u+c+d;return e.x=(i*u+o*c+h*d)/p,e.y=(s*u+a*c+l*d)/p,e}},13584:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},1376:(t,e,i)=>{var n=i(35001);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),r=t.getLineC();return n(e)+n(i)+n(r)}},90260:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){void 0===e&&(e=new n);var i=t.x2-t.x1,r=t.y2-t.y1,s=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+s*h),e.y=t.y1+(r*a+o*h),e}},52172:(t,e,i)=>{var n=i(99614),r=i(39757);t.exports=function(t,e){var i=r(t);return n(t,i.x,i.y,e)}},49907:(t,e,i)=>{var n=i(99614);t.exports=function(t,e,i){return n(t,e.x,e.y,i)}},99614:t=>{t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*r-a*s+e,t.y1=o*s+a*r+i,o=t.x2-e,a=t.y2-i,t.x2=o*r-a*s+e,t.y2=o*s+a*r+i,o=t.x3-e,a=t.y3-i,t.x3=o*r-a*s+e,t.y3=o*s+a*r+i,t}},16483:(t,e,i)=>{var n=i(83419),r=i(10690),s=i(20437),o=i(80672),a=i(23777),h=i(23031),l=i(90260),u=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=0),this.type=a.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=r,this.y3=s},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n,r,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.x3=r,this.y3=s,this},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},84435:(t,e,i)=>{var n=i(16483);n.Area=i(41658),n.BuildEquilateral=i(39208),n.BuildFromPolygon=i(39545),n.BuildRight=i(90301),n.CenterOn=i(23707),n.Centroid=i(97523),n.CircumCenter=i(24951),n.CircumCircle=i(85614),n.Clone=i(74422),n.Contains=i(10690),n.ContainsArray=i(48653),n.ContainsPoint=i(96006),n.CopyFrom=i(71326),n.Decompose=i(71694),n.Equals=i(33522),n.GetPoint=i(20437),n.GetPoints=i(80672),n.InCenter=i(39757),n.Perimeter=i(1376),n.Offset=i(13584),n.Random=i(90260),n.Rotate=i(52172),n.RotateAroundPoint=i(49907),n.RotateAroundXY=i(99614),t.exports=n},74457:t=>{t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}}},84409:t=>{t.exports=function(t,e){return function(i,n,r,s){var o=t.getPixelAlpha(n,r,s.texture.key,s.frame.name);return o&&o>=e}}},7003:(t,e,i)=>{var n=i(83419),r=i(93301),s=i(50792),o=i(8214),a=i(8443),h=i(78970),l=i(85098),u=i(42515),c=i(36210),d=i(61340),p=i(85955),f=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new s,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){var t=this.game,e=t.events;this.canvas=t.canvas,this.scaleManager=t.scale,this.events.emit(o.MANAGER_BOOT),e.on(a.PRE_RENDER,this.preRender,this),e.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n<i.length;n++){var r=i[n];if(r.sys.input&&r.sys.input.updatePoll(t,e)&&this.globalTopOnly)return}},setDefaultCursor:function(t){this.defaultCursor=t,this.canvas.style.cursor!==t&&(this.canvas.style.cursor=t)},setCursor:function(t){t.cursor&&(this.canvas.style.cursor=t.cursor)},resetCursor:function(t){t.cursor&&this.canvas&&(this.canvas.style.cursor=this.defaultCursor)},addPointer:function(t){void 0===t&&(t=1);var e=[];this.pointersTotal+t>10&&(t=10-this.pointersTotal);for(var i=0;i<t;i++){var n=this.pointers.length,r=new u(this,n);r.smoothFactor=this.config.inputSmoothFactor,this.pointers.push(r),this.pointersTotal++,e.push(r)}return e},updateInputPlugins:function(t,e){var i=this.game.scene.getScenes(!1,!0);this._tempSkip=!1;for(var n=0;n<i.length;n++){var r=i[n];if(r.sys.input)if(r.sys.input.update(t,e)&&this.globalTopOnly||this._tempSkip)return}},onTouchStart:function(t){for(var e=this.pointers,i=[],n=0;n<t.changedTouches.length;n++)for(var s=t.changedTouches[n],o=1;o<this.pointersTotal;o++){var a=e[o];if(!a.active){a.touchstart(s,t),this.activePointer=a,i.push(a);break}}this.updateInputPlugins(r.TOUCH_START,i)},onTouchMove:function(t){for(var e=this.pointers,i=[],n=0;n<t.changedTouches.length;n++)for(var s=t.changedTouches[n],o=1;o<this.pointersTotal;o++){var a=e[o];if(a.active&&a.identifier===s.identifier){var h=document.elementFromPoint(s.clientX,s.clientY)===this.canvas;!this.isOver&&h?this.setCanvasOver(t):this.isOver&&!h&&this.setCanvasOut(t),this.isOver&&(a.touchmove(s,t),this.activePointer=a,i.push(a));break}}this.updateInputPlugins(r.TOUCH_MOVE,i)},onTouchEnd:function(t){for(var e=this.pointers,i=[],n=0;n<t.changedTouches.length;n++)for(var s=t.changedTouches[n],o=1;o<this.pointersTotal;o++){var a=e[o];if(a.active&&a.identifier===s.identifier){a.touchend(s,t),i.push(a);break}}this.updateInputPlugins(r.TOUCH_END,i)},onTouchCancel:function(t){for(var e=this.pointers,i=[],n=0;n<t.changedTouches.length;n++)for(var s=t.changedTouches[n],o=1;o<this.pointersTotal;o++){var a=e[o];if(a.active&&a.identifier===s.identifier){a.touchcancel(s,t),i.push(a);break}}this.updateInputPlugins(r.TOUCH_CANCEL,i)},onMouseDown:function(t){var e=this.mousePointer;e.down(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(r.MOUSE_DOWN,this.mousePointerContainer)},onMouseMove:function(t){var e=this.mousePointer;e.move(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(r.MOUSE_MOVE,this.mousePointerContainer)},onMouseUp:function(t){var e=this.mousePointer;e.up(t),e.updateMotion(),this.activePointer=e,this.updateInputPlugins(r.MOUSE_UP,this.mousePointerContainer)},onMouseWheel:function(t){var e=this.mousePointer;e.wheel(t),this.activePointer=e,this.updateInputPlugins(r.MOUSE_WHEEL,this.mousePointerContainer)},onPointerLockChange:function(t){var e=this.mouse.locked;this.mousePointer.locked=e,this.events.emit(o.POINTERLOCK_CHANGE,t,e)},inputCandidate:function(t,e){var i=t.input;if(!i||!i.enabled||!t.willRender(e))return!1;var n=!0,r=t.parentContainer;if(r)do{if(!r.willRender(e)){n=!1;break}r=r.parentContainer}while(r);return n},hitTest:function(t,e,i,n){void 0===n&&(n=this._tempHitTest);var r=this._tempPoint,s=i.scrollX,o=i.scrollY;n.length=0;var a=t.x,h=t.y;i.getWorldPoint(a,h,r),t.worldX=r.x,t.worldY=r.y;for(var l={x:0,y:0},u=this._tempMatrix,c=this._tempMatrix2,d=0;d<e.length;d++){var f=e[d];if(this.inputCandidate(f,i)){var m=r.x+s*f.scrollFactorX-s,g=r.y+o*f.scrollFactorY-o;f.parentContainer?(f.getWorldTransformMatrix(u,c),u.applyInverse(m,g,l)):p(m,g,f.x,f.y,f.rotation,f.scaleX,f.scaleY,l),this.pointWithinHitArea(f,l.x,l.y)&&n.push(f)}}return n},pointWithinHitArea:function(t,e,i){e+=t.displayOriginX,i+=t.displayOriginY;var n=t.input;return!(!n||!n.hitAreaCallback(n.hitArea,e,i,t))&&(n.localX=e,n.localY=i,!0)},pointWithinInteractiveObject:function(t,e,i){return!!t.hitArea&&(e+=t.gameObject.displayOriginX,i+=t.gameObject.displayOriginY,t.localX=e,t.localY=i,t.hitAreaCallback(t.hitArea,e,i,t))},transformPointer:function(t,e,i,n){var r=t.position,s=t.prevPosition;s.x=r.x,s.y=r.y;var o=this.scaleManager.transformX(e),a=this.scaleManager.transformY(i),h=t.smoothFactor;n&&0!==h?(r.x=o*h+s.x*(1-h),r.y=a*h+s.y*(1-h)):(r.x=o,r.y=a)},destroy:function(){this.events.removeAllListeners(),this.game.events.off(a.PRE_RENDER),this.keyboard&&this.keyboard.destroy(),this.mouse&&this.mouse.destroy(),this.touch&&this.touch.destroy();for(var t=0;t<this.pointers.length;t++)this.pointers[t].destroy();this.pointers=[],this._tempHitTest=[],this._tempMatrix.destroy(),this.canvas=null,this.game=null}});t.exports=f},48205:(t,e,i)=>{var n=i(96503),r=i(87902),s=i(83419),o=i(93301),a=i(74457),h=i(84409),l=i(20339),u=i(8497),c=i(81154),d=i(8214),p=i(50792),f=i(95540),m=i(23777),g=i(89639),v=i(41212),y=i(37277),x=i(87841),E=i(37303),T=i(44594),_=i(16483),w=i(10690),S=new s({Extends:p,initialize:function(t){p.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new p,this.enabled=!0,this.displayList,this.cameras,g.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,t.sys.events.once(T.BOOT,this.boot,this),t.sys.events.on(T.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(T.DESTROY,this.destroy,this),this.pluginEvents.emit(d.BOOT)},start:function(){var t=this.systems.events;t.on(T.TRANSITION_START,this.transitionIn,this),t.on(T.TRANSITION_OUT,this.transitionOut,this),t.on(T.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(T.PRE_UPDATE,this.preUpdate,this),t.once(T.SHUTDOWN,this.shutdown,this),this.manager.events.on(d.GAME_OUT,this.onGameOut,this),this.manager.events.on(d.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(d.START)},onGameOver:function(t){this.isActive()&&this.emit(d.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(d.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(d.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,n=e.length;if(0!==i||0!==n){for(var r=this._list,s=0;s<i;s++){var o=t[s],a=r.indexOf(o);a>-1&&(r.splice(a,1),this.clear(o,!0))}this._pendingRemoval.length=0,this._list=r.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager,r=n.pointers,s=n.pointersTotal;for(i=0;i<s;i++)r[i].updateMotion();if(0===this._list.length)return!1;var o=this.pollRate;if(-1===o)return!1;if(o>0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i<s;i++){var h=0,l=r[i];this._tempZones=[],this._temp=this.hitTestPointer(l),this.sortGameObjects(this._temp,l),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),h+=this.processOverOutEvents(l),2===this.getDragState(l)&&this.processDragThresholdEvent(l,t),h>0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,r=0;r<i;r++){var s=0,a=e[r];switch(this._tempZones=[],this._temp=this.hitTestPointer(a),this.sortGameObjects(this._temp,a),this.sortDropZones(this._tempZones),this.topOnly&&(this._temp.length&&this._temp.splice(1),this._tempZones.length&&this._tempZones.splice(1)),t){case o.MOUSE_DOWN:s+=this.processDragDownEvent(a),s+=this.processDownEvents(a),s+=this.processOverOutEvents(a);break;case o.MOUSE_UP:s+=this.processDragUpEvent(a),s+=this.processUpEvents(a),s+=this.processOverOutEvents(a);break;case o.TOUCH_START:s+=this.processDragDownEvent(a),s+=this.processDownEvents(a),s+=this.processOverEvents(a);break;case o.TOUCH_END:case o.TOUCH_CANCEL:s+=this.processDragUpEvent(a),s+=this.processUpEvents(a),s+=this.processOutEvents(a);break;case o.MOUSE_MOVE:case o.TOUCH_MOVE:s+=this.processDragMoveEvent(a),s+=this.processMoveEvents(a),s+=this.processOverOutEvents(a);break;case o.MOUSE_WHEEL:s+=this.processWheelEvent(a)}s>0&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1),this.disable(t);var i=t.input;i&&(this.removeDebug(t),this.manager.resetCursor(i),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null),e||this.queueForRemoval(t);var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),t},disable:function(t){var e=t.input;e&&(e.enabled=!1,e.dragState=0);for(var i,n=this._drag,r=this._over,s=this.manager,o=0;o<s.pointersTotal;o++)(i=n[o].indexOf(t))>-1&&n[o].splice(i,1),(i=r[o].indexOf(t))>-1&&r[o].splice(i,1);return this},enable:function(t,e,i,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i<e.length;i++){for(var n=e[i],r=this.manager.hitTest(t,this._list,n),s=0;s<r.length;s++){var o=r[s];o.input.dropZone&&this._tempZones.push(o)}if(r.length>0)return t.camera=n,r}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,r=this._eventContainer;n.cancelled=!1;for(var s=!1,o=0;o<i.length;o++){var a=i[o];if(a.input&&a.input.enabled){if(e++,a.emit(d.GAMEOBJECT_POINTER_DOWN,t,a.input.localX,a.input.localY,r),n.cancelled||!a.input||!a.input.enabled){s=!0;break}if(this.emit(d.GAMEOBJECT_DOWN,t,a,r),n.cancelled||!a.input){s=!0;break}}}return!s&&this.manager&&(t.downElement===this.manager.game.canvas?this.emit(d.POINTER_DOWN,t,i):this.emit(d.POINTER_DOWN_OUTSIDE,t)),e},getDragState:function(t){return this._dragState[t.id]},setDragState:function(t,e){this._dragState[t.id]=e},processDragThresholdEvent:function(t,e){var i=!1,n=this.dragTimeThreshold,r=this.dragDistanceThreshold;if((r>0&&l(t.x,t.y,t.downX,t.downY)>=r||n>0&&e>=t.downTime+n)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i<e.length;i++){var n=e[i],r=n.input;r.dragState=2,r.dragStartX=n.x,r.dragStartY=n.y,r.dragStartXGlobal=t.worldX,r.dragStartYGlobal=t.worldY,r.dragX=r.dragStartXGlobal-r.dragStartX,r.dragY=r.dragStartYGlobal-r.dragStartY,n.emit(d.GAMEOBJECT_DRAG_START,t,r.dragX,r.dragY),this.emit(d.DRAG_START,t,n)}return this.setDragState(t,4),e.length},processDragDownEvent:function(t){var e=this._temp;if(0===this._draggable.length||0===e.length||!t.primaryDown||0!==this.getDragState(t))return 0;this.setDragState(t,1);for(var i=[],n=0;n<e.length;n++){var r=e[n];r.input.draggable&&0===r.input.dragState&&i.push(r)}return 0===i.length?(this.setDragState(t,0),0):(i.length>1&&(this.sortGameObjects(i,t),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],n=0;n<i.length;n++){var r,s,o=i[n],a=o.input,h=a.target;if(h){var l=e.indexOf(h);0===l?(o.emit(d.GAMEOBJECT_DRAG_OVER,t,h),this.emit(d.DRAG_OVER,t,o,h)):l>0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.worldX-a.dragStartXGlobal,c=t.worldY-a.dragStartYGlobal,p=o.getParentRotation(),f=u*Math.cos(p)+c*Math.sin(p),m=c*Math.cos(p)-u*Math.sin(p);f*=1/o.parentContainer.scaleX,m*=1/o.parentContainer.scaleY,r=f+a.dragStartX,s=m+a.dragStartY}else r=t.worldX-a.dragX,s=t.worldY-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,r,s),this.emit(d.DRAG,t,o,r,s)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i<e.length;i++){var n=e[i],r=n.input;if(r&&2===r.dragState){r.dragState=0,r.dragX=r.localX-n.displayOriginX,r.dragY=r.localY-n.displayOriginY;var s=!1,o=r.target;o&&(n.emit(d.GAMEOBJECT_DROP,t,o),this.emit(d.DROP,t,n,o),r.target=null,s=!0),n.input&&n.input.enabled&&(n.emit(d.GAMEOBJECT_DRAG_END,t,r.dragX,r.dragY,s),this.emit(d.DRAG_END,t,n,s))}}return this.setDragState(t,0),e.splice(0),0},processMoveEvents:function(t){var e=0,i=this._temp,n=this._eventData,r=this._eventContainer;n.cancelled=!1;for(var s=!1,o=0;o<i.length;o++){var a=i[o];if(a.input&&a.input.enabled){if(e++,a.emit(d.GAMEOBJECT_POINTER_MOVE,t,a.input.localX,a.input.localY,r),n.cancelled||!a.input||!a.input.enabled){s=!0;break}if(this.emit(d.GAMEOBJECT_MOVE,t,a,r),n.cancelled||!a.input||!a.input.enabled){s=!0;break}if(this.topOnly)break}}return s||this.emit(d.POINTER_MOVE,t,i),e},processWheelEvent:function(t){var e=0,i=this._temp,n=this._eventData,r=this._eventContainer;n.cancelled=!1;for(var s=!1,o=t.deltaX,a=t.deltaY,h=t.deltaZ,l=0;l<i.length;l++){var u=i[l];if(u.input&&u.input.enabled){if(e++,u.emit(d.GAMEOBJECT_POINTER_WHEEL,t,o,a,h,r),n.cancelled||!u.input||!u.input.enabled){s=!0;break}if(this.emit(d.GAMEOBJECT_WHEEL,t,u,o,a,h,r),n.cancelled||!u.input||!u.input.enabled){s=!0;break}}}return s||this.emit(d.POINTER_WHEEL,t,i,o,a,h),e},processOverEvents:function(t){var e=this._temp,i=0,n=e.length,r=[];if(n>0){var s=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l<n;l++){var u=e[l];if(u.input&&u.input.enabled){if(r.push(u),s.setCursor(u.input),u.emit(d.GAMEOBJECT_POINTER_OVER,t,u.input.localX,u.input.localY,a),i++,o.cancelled||!u.input||!u.input.enabled){h=!0;break}if(this.emit(d.GAMEOBJECT_OVER,t,u,a),o.cancelled||!u.input||!u.input.enabled){h=!0;break}}}h||this.emit(d.POINTER_OVER,t,r)}return this._over[t.id]=r,i},processOutEvents:function(t){var e=this._over[t.id],i=0,n=e.length;if(n>0){var r=this.manager,s=this._eventData,o=this._eventContainer;s.cancelled=!1;var a=!1;this.sortGameObjects(e,t);for(var h=0;h<n;h++){var l=e[h];if((l=e[h]).input&&l.input.enabled){if(r.resetCursor(l.input),l.emit(d.GAMEOBJECT_POINTER_OUT,t,o),i++,s.cancelled||!l.input||!l.input.enabled){a=!0;break}if(this.emit(d.GAMEOBJECT_OUT,t,l,o),s.cancelled||!l.input||!l.input.enabled){a=!0;break}a||this.emit(d.POINTER_OUT,t,e)}}this._over[t.id]=[]}return i},processOverOutEvents:function(t){var e,i,n=this._temp,r=[],s=[],o=[],a=this._over[t.id],h=this._drag[t.id],l=this.manager;for(e=0;e<a.length;e++)i=a[e],-1===n.indexOf(i)&&-1===h.indexOf(i)?r.push(i):o.push(i);for(e=0;e<n.length;e++)i=n[e],-1===a.indexOf(i)&&s.push(i);var u=r.length,c=0,p=this._eventData,f=this._eventContainer;p.cancelled=!1;var m=!1;if(u>0){for(this.sortGameObjects(r,t),e=0;e<u;e++)if((i=r[e]).input&&i.input.enabled){if(l.resetCursor(i.input),i.emit(d.GAMEOBJECT_POINTER_OUT,t,f),c++,p.cancelled||!i.input||!i.input.enabled){m=!0;break}if(this.emit(d.GAMEOBJECT_OUT,t,i,f),p.cancelled||!i.input||!i.input.enabled){m=!0;break}}m||this.emit(d.POINTER_OUT,t,r)}if(u=s.length,p.cancelled=!1,m=!1,u>0){for(this.sortGameObjects(s,t),e=0;e<u;e++)if((i=s[e]).input&&i.input.enabled){if(l.setCursor(i.input),i.emit(d.GAMEOBJECT_POINTER_OVER,t,i.input.localX,i.input.localY,f),c++,p.cancelled||!i.input||!i.input.enabled){m=!0;break}if(this.emit(d.GAMEOBJECT_OVER,t,i,f),p.cancelled||!i.input||!i.input.enabled){m=!0;break}}m||this.emit(d.POINTER_OVER,t,s)}return a=o.concat(s),this._over[t.id]=this.sortGameObjects(a,t),c},processUpEvents:function(t){var e=this._temp,i=this._eventData,n=this._eventContainer;i.cancelled=!1;for(var r=!1,s=0;s<e.length;s++){var o=e[s];if(o.input&&o.input.enabled){if(o.emit(d.GAMEOBJECT_POINTER_UP,t,o.input.localX,o.input.localY,n),i.cancelled||!o.input||!o.input.enabled){r=!0;break}if(this.emit(d.GAMEOBJECT_UP,t,o,n),i.cancelled||!o.input||!o.input.enabled){r=!0;break}}}return!r&&this.manager&&(t.upElement===this.manager.game.canvas?this.emit(d.POINTER_UP,t,e):this.emit(d.POINTER_UP_OUTSIDE,t)),e.length},queueForInsertion:function(t){return-1===this._pendingInsertion.indexOf(t)&&-1===this._list.indexOf(t)&&this._pendingInsertion.push(t),this},queueForRemoval:function(t){return this._pendingRemoval.push(t),this},setDraggable:function(t,e){void 0===e&&(e=!0),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];n.input.draggable=e;var r=this._draggable.indexOf(n);e&&-1===r?this._draggable.push(n):!e&&r>-1&&this._draggable.splice(r,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,r=!1,s=!1,o=!1,h=!1,l=!0;if(v(e)&&Object.keys(e).length){var u=e,c=t.some((function(t){return t.hasOwnProperty("faces")}));if(!c){e=f(u,"hitArea",null),i=f(u,"hitAreaCallback",null),h=f(u,"pixelPerfect",!1);var d=f(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(d))}n=f(u,"draggable",!1),r=f(u,"dropZone",!1),s=f(u,"cursor",!1),o=f(u,"useHandCursor",!1),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var p=0;p<t.length;p++){var m=t[p];if(h&&"Container"===m.type)console.warn("Cannot pixelPerfect test a Container. Use a custom callback.");else{var g=m.input?m.input:a(m,e,i);g.customHitArea=l,g.dropZone=r,g.cursor=o?"pointer":s,m.input=g,n&&this.setDraggable(m),this.queueForInsertion(m)}}return this},setHitAreaCircle:function(t,e,i,s,o){void 0===o&&(o=r);var a=new n(e,i,s);return this.setHitArea(t,a,o)},setHitAreaEllipse:function(t,e,i,n,r,s){void 0===s&&(s=c);var o=new u(e,i,n,r);return this.setHitArea(t,o,s)},setHitAreaFromTexture:function(t,e){void 0===e&&(e=E),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i],r=n.frame,s=0,o=0;n.width?(s=n.width,o=n.height):r&&(s=r.realWidth,o=r.realHeight),"Container"!==n.type||0!==s&&0!==o?0!==s&&0!==o&&(n.input=a(n,new x(0,0,s,o),e),this.queueForInsertion(n)):console.warn("Container.setInteractive must specify a Shape or call setSize() first")}return this},setHitAreaRectangle:function(t,e,i,n,r,s){void 0===s&&(s=E);var o=new x(e,i,n,r);return this.setHitArea(t,o,s)},setHitAreaTriangle:function(t,e,i,n,r,s,o,a){void 0===a&&(a=w);var h=new _(e,i,n,r,s,o);return this.setHitArea(t,h,a)},enableDebug:function(t,e){void 0===e&&(e=65280);var i=t.input;if(!i||!i.hitArea)return this;var n=i.hitArea,r=n.type,s=i.hitAreaDebug,o=this.systems.add,a=this.systems.updateList;s&&(a.remove(s),s.destroy(),s=null);var h=0,l=0;switch(r){case m.CIRCLE:s=o.arc(0,0,n.radius),h=n.x-n.radius,l=n.y-n.radius;break;case m.ELLIPSE:s=o.ellipse(0,0,n.width,n.height),h=n.x-n.width/2,l=n.y-n.height/2;break;case m.LINE:s=o.line(0,0,n.x1,n.y1,n.x2,n.y2);break;case m.POLYGON:s=o.polygon(0,0,n.points);break;case m.RECTANGLE:s=o.rectangle(0,0,n.width,n.height),h=n.x,l=n.y;break;case m.TRIANGLE:s=o.triangle(0,0,n.x1,n.y1,n.x2,n.y2,n.x3,n.y3)}return s&&(s.isFilled=!1,s.strokeColor=e,s.preUpdate=function(){s.setVisible(t.visible),s.setStrokeStyle(1/t.scale,s.strokeColor),s.setDisplayOrigin(t.displayOriginX,t.displayOriginY);var e=t.x,i=t.y,n=t.rotation,r=t.scaleX,o=t.scaleY;if(t.parentContainer){var a=t.getWorldTransformMatrix();e=a.tx,i=a.ty,n=a.rotation,r=a.scaleX,o=a.scaleY}s.setRotation(n),s.setScale(r,o),s.setPosition(e+h*r,i+l*o),s.setScrollFactor(t.scrollFactorX,t.scrollFactorY),s.setDepth(t.depth)},a.add(s),i.hitAreaDebug=s),this},removeDebug:function(t){var e=t.input;e&&e.hitAreaDebug&&(e.hitAreaDebug.destroy(),e.hitAreaDebug=null);return this},setPollAlways:function(){return this.setPollRate(0)},setPollOnMove:function(){return this.setPollRate(-1)},setPollRate:function(t){return this.pollRate=t,this._pollTimer=0,this},setGlobalTopOnly:function(t){return this.manager.globalTopOnly=t,this},setTopOnly:function(t){return this.topOnly=t,this},sortGameObjects:function(t,e){if(t.length<2||!e.camera)return t;var i=e.camera.renderList;return t.sort((function(t,e){var n=Math.max(i.indexOf(t),0);return Math.max(i.indexOf(e),0)-n}))},sortDropZones:function(t){return t.length<2?t:(this.scene.sys.depthSort(),t.sort(this.sortDropZoneHandler.bind(this)))},sortDropZoneHandler:function(t,e){if(t.parentContainer||e.parentContainer){if(t.parentContainer===e.parentContainer)return e.parentContainer.getIndex(e)-t.parentContainer.getIndex(t);if(t.parentContainer===e)return-1;if(e.parentContainer===t)return 1;for(var i=t.getIndexList(),n=e.getIndexList(),r=Math.min(i.length,n.length),s=0;s<r;s++){var o=i[s],a=n[s];if(o!==a)return a-o}return n.length-i.length}return this.displayList.getIndex(e)-this.displayList.getIndex(t)},stopPropagation:function(){return this.manager._tempSkip=!0,this},addPointer:function(t){return this.manager.addPointer(t)},setDefaultCursor:function(t){return this.manager.setDefaultCursor(t),this},transitionIn:function(){this.enabled=this.settings.transitionAllowInput},transitionComplete:function(){this.settings.transitionAllowInput||(this.enabled=!0)},transitionOut:function(){this.enabled=this.settings.transitionAllowInput},shutdown:function(){this.pluginEvents.emit(d.SHUTDOWN),this._temp.length=0,this._list.length=0,this._draggable.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0,this._dragState.length=0;for(var t=0;t<10;t++)this._drag[t]=[],this._over[t]=[];this.removeAllListeners();var e=this.manager;e.canvas.style.cursor=e.defaultCursor;var i=this.systems.events;i.off(T.TRANSITION_START,this.transitionIn,this),i.off(T.TRANSITION_OUT,this.transitionOut,this),i.off(T.TRANSITION_COMPLETE,this.transitionComplete,this),i.off(T.PRE_UPDATE,this.preUpdate,this),e.events.off(d.GAME_OUT,this.onGameOut,this),e.events.off(d.GAME_OVER,this.onGameOver,this),i.off(T.SHUTDOWN,this.shutdown,this)},resetPointers:function(){for(var t=this.manager.pointers,e=0;e<t.length;e++)t[e].reset()},destroy:function(){this.shutdown(),this.pluginEvents.emit(d.DESTROY),this.pluginEvents.removeAllListeners(),this.scene.sys.events.off(T.START,this.start,this),this.scene=null,this.cameras=null,this.manager=null,this.events=null,this.mouse=null},x:{get:function(){return this.manager.activePointer.x}},y:{get:function(){return this.manager.activePointer.y}},isOver:{get:function(){return this.manager.isOver}},mousePointer:{get:function(){return this.manager.mousePointer}},activePointer:{get:function(){return this.manager.activePointer}},pointer1:{get:function(){return this.manager.pointers[1]}},pointer2:{get:function(){return this.manager.pointers[2]}},pointer3:{get:function(){return this.manager.pointers[3]}},pointer4:{get:function(){return this.manager.pointers[4]}},pointer5:{get:function(){return this.manager.pointers[5]}},pointer6:{get:function(){return this.manager.pointers[6]}},pointer7:{get:function(){return this.manager.pointers[7]}},pointer8:{get:function(){return this.manager.pointers[8]}},pointer9:{get:function(){return this.manager.pointers[9]}},pointer10:{get:function(){return this.manager.pointers[10]}}});y.register("InputPlugin",S,"input"),t.exports=S},89639:(t,e,i)=>{var n=i(35154),r={},s={register:function(t,e,i,n,s){r[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return r[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,s=e.game.config;for(var o in r){var a=r[o].plugin,h=r[o].mapping,l=r[o].settingsKey,u=r[o].configKey;n(i,l,s[u])&&(t[h]=new a(t))}},remove:function(t){r.hasOwnProperty(t)&&delete r[t]}};t.exports=s},42515:(t,e,i)=>{var n=i(31040),r=i(83419),s=i(20339),o=i(43855),a=i(47235),h=i(26099),l=i(25892),u=new r({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=t.getWorldPoint(this.x,this.y);return this.worldX=e.x,this.worldY=e.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,r=this.midPoint.y;if(t!==i||e!==r){var s=a(this.motionFactor,i,t),h=a(this.motionFactor,r,e);o(s,t,.1)&&(s=t),o(h,e,.1)&&(h=e),this.midPoint.set(s,h);var l=t-s,u=e-h;this.velocity.set(l,u),this.angle=n(s,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),l.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?s(this.downX,this.downY,this.x,this.y):s(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,r=this.position.x,s=this.position.y,o=0;o<t;o++){var h=1/t*o;e[o]={x:a(h,i,r),y:a(h,n,s)}}return e},reset:function(){this.event=null,this.downElement=null,this.upElement=null,this.button=0,this.buttons=0,this.position.set(0,0),this.prevPosition.set(0,0),this.midPoint.set(-1,-1),this.velocity.set(0,0),this.angle=0,this.distance=0,this.worldX=0,this.worldY=0,this.downX=0,this.downY=0,this.upX=0,this.upY=0,this.moveTime=0,this.upTime=0,this.downTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.deltaX=0,this.deltaY=0,this.deltaZ=0,this.active=0===this.id},destroy:function(){this.camera=null,this.manager=null,this.position=null},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},time:{get:function(){return this.event?this.event.timeStamp:0}}});t.exports=u},93301:t=>{t.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},7179:t=>{t.exports="boot"},85375:t=>{t.exports="destroy"},39843:t=>{t.exports="dragend"},23388:t=>{t.exports="dragenter"},16133:t=>{t.exports="drag"},27829:t=>{t.exports="dragleave"},53904:t=>{t.exports="dragover"},56058:t=>{t.exports="dragstart"},2642:t=>{t.exports="drop"},88171:t=>{t.exports="gameobjectdown"},36147:t=>{t.exports="dragend"},71692:t=>{t.exports="dragenter"},96149:t=>{t.exports="drag"},81285:t=>{t.exports="dragleave"},74048:t=>{t.exports="dragover"},21322:t=>{t.exports="dragstart"},49378:t=>{t.exports="drop"},86754:t=>{t.exports="gameobjectmove"},86433:t=>{t.exports="gameobjectout"},60709:t=>{t.exports="gameobjectover"},24081:t=>{t.exports="pointerdown"},11172:t=>{t.exports="pointermove"},18907:t=>{t.exports="pointerout"},95579:t=>{t.exports="pointerover"},35368:t=>{t.exports="pointerup"},26972:t=>{t.exports="wheel"},47078:t=>{t.exports="gameobjectup"},73802:t=>{t.exports="gameobjectwheel"},56718:t=>{t.exports="gameout"},25936:t=>{t.exports="gameover"},27503:t=>{t.exports="boot"},50852:t=>{t.exports="process"},96438:t=>{t.exports="update"},59152:t=>{t.exports="pointerlockchange"},47777:t=>{t.exports="pointerdown"},27957:t=>{t.exports="pointerdownoutside"},19444:t=>{t.exports="pointermove"},54251:t=>{t.exports="pointerout"},18667:t=>{t.exports="pointerover"},27192:t=>{t.exports="pointerup"},24652:t=>{t.exports="pointerupoutside"},45132:t=>{t.exports="wheel"},44512:t=>{t.exports="preupdate"},15757:t=>{t.exports="shutdown"},41637:t=>{t.exports="start"},93802:t=>{t.exports="update"},8214:(t,e,i)=>{t.exports={BOOT:i(7179),DESTROY:i(85375),DRAG_END:i(39843),DRAG_ENTER:i(23388),DRAG:i(16133),DRAG_LEAVE:i(27829),DRAG_OVER:i(53904),DRAG_START:i(56058),DROP:i(2642),GAME_OUT:i(56718),GAME_OVER:i(25936),GAMEOBJECT_DOWN:i(88171),GAMEOBJECT_DRAG_END:i(36147),GAMEOBJECT_DRAG_ENTER:i(71692),GAMEOBJECT_DRAG:i(96149),GAMEOBJECT_DRAG_LEAVE:i(81285),GAMEOBJECT_DRAG_OVER:i(74048),GAMEOBJECT_DRAG_START:i(21322),GAMEOBJECT_DROP:i(49378),GAMEOBJECT_MOVE:i(86754),GAMEOBJECT_OUT:i(86433),GAMEOBJECT_OVER:i(60709),GAMEOBJECT_POINTER_DOWN:i(24081),GAMEOBJECT_POINTER_MOVE:i(11172),GAMEOBJECT_POINTER_OUT:i(18907),GAMEOBJECT_POINTER_OVER:i(95579),GAMEOBJECT_POINTER_UP:i(35368),GAMEOBJECT_POINTER_WHEEL:i(26972),GAMEOBJECT_UP:i(47078),GAMEOBJECT_WHEEL:i(73802),MANAGER_BOOT:i(27503),MANAGER_PROCESS:i(50852),MANAGER_UPDATE:i(96438),POINTER_DOWN:i(47777),POINTER_DOWN_OUTSIDE:i(27957),POINTER_MOVE:i(19444),POINTER_OUT:i(54251),POINTER_OVER:i(18667),POINTER_UP:i(27192),POINTER_UP_OUTSIDE:i(24652),POINTER_WHEEL:i(45132),POINTERLOCK_CHANGE:i(59152),PRE_UPDATE:i(44512),SHUTDOWN:i(15757),START:i(41637),UPDATE:i(93802)}},97421:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value)<this.threshold?0:this.value},destroy:function(){this.pad=null,this.events=null}});t.exports=n},28884:(t,e,i)=>{var n=i(83419),r=i(92734),s=new n({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(r.BUTTON_DOWN,e,this,t),this.pad.emit(r.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(r.BUTTON_UP,e,this,t),this.pad.emit(r.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=s},99125:(t,e,i)=>{var n=i(97421),r=i(28884),s=i(83419),o=i(50792),a=i(26099),h=new s({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],s=0;s<e.buttons.length;s++)i.push(new r(this,s));this.buttons=i;var h=[];for(s=0;s<e.axes.length;s++)h.push(new n(this,s));this.axes=h,this.vibration=e.vibrationActuator;var l={value:0,pressed:!1};this._LCLeft=i[14]?i[14]:l,this._LCRight=i[15]?i[15]:l,this._LCTop=i[12]?i[12]:l,this._LCBottom=i[13]?i[13]:l,this._RCLeft=i[2]?i[2]:l,this._RCRight=i[1]?i[1]:l,this._RCTop=i[3]?i[3]:l,this._RCBottom=i[0]?i[0]:l,this._FBLeftTop=i[4]?i[4]:l,this._FBLeftBottom=i[6]?i[6]:l,this._FBRightTop=i[5]?i[5]:l,this._FBRightBottom=i[7]?i[7]:l;var u={value:0};this._HAxisLeft=h[0]?h[0]:u,this._VAxisLeft=h[1]?h[1]:u,this._HAxisRight=h[2]?h[2]:u,this._VAxisRight=h[3]?h[3]:u,this.leftStick=new a,this.rightStick=new a,this._created=performance.now()},getAxisTotal:function(){return this.axes.length},getAxisValue:function(t){return this.axes[t].getValue()},setAxisThreshold:function(t){for(var e=0;e<this.axes.length;e++)this.axes[e].threshold=t},getButtonTotal:function(){return this.buttons.length},getButtonValue:function(t){return this.buttons[t].value},isButtonDown:function(t){return this.buttons[t].pressed},update:function(t){if(!(t.timestamp<this._created)){var e,i=this.buttons,n=t.buttons,r=i.length;for(e=0;e<r;e++)i[e].update(n[e].value);var s=this.axes,o=t.axes;for(r=s.length,e=0;e<r;e++)s[e].update(o[e]);r>=2&&(this.leftStick.set(s[0].getValue(),s[1].getValue()),r>=4&&this.rightStick.set(s[2].getValue(),s[3].getValue()))}},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t<this.buttons.length;t++)this.buttons[t].destroy();for(t=0;t<this.axes.length;t++)this.axes[t].destroy();this.buttons=[],this.axes=[]},connected:{get:function(){return this.pad.connected}},timestamp:{get:function(){return this.pad.timestamp}},left:{get:function(){return this._LCLeft.pressed}},right:{get:function(){return this._LCRight.pressed}},up:{get:function(){return this._LCTop.pressed}},down:{get:function(){return this._LCBottom.pressed}},A:{get:function(){return this._RCBottom.pressed}},Y:{get:function(){return this._RCTop.pressed}},X:{get:function(){return this._RCLeft.pressed}},B:{get:function(){return this._RCRight.pressed}},L1:{get:function(){return this._FBLeftTop.value}},L2:{get:function(){return this._FBLeftBottom.value}},R1:{get:function(){return this._FBRightTop.value}},R2:{get:function(){return this._FBRightBottom.value}}});t.exports=h},56654:(t,e,i)=>{var n=i(83419),r=i(50792),s=i(92734),o=i(99125),a=i(35154),h=i(89639),l=i(8214),u=new n({Extends:r,initialize:function(t){r.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(l.BOOT,this.boot,this),t.pluginEvents.on(l.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=a(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=a(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(l.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on(l.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(l.UPDATE,this.update);for(var t=0;t<this.gamepads.length;t++)this.gamepads[t].removeAllListeners()},disconnectAll:function(){for(var t=0;t<this.gamepads.length;t++)this.gamepads[t].pad.connected=!1},refreshPads:function(){var t=navigator.getGamepads();if(t)for(var e=this.gamepads,i=0;i<t.length;i++){var n=t[i];if(n){var r=n.id,s=n.index,a=e[s];if(a)a.id!==r?(a.destroy(),e[s]=new o(this,n)):a.update(n);else{var h=new o(this,n);e[s]=h,this._pad1?this._pad2?this._pad3?this._pad4||(this._pad4=h):this._pad3=h:this._pad2=h:this._pad1=h}}}else this.disconnectAll()},getAll:function(){for(var t=[],e=this.gamepads,i=0;i<e.length;i++)e[i]&&t.push(e[i]);return t},getPad:function(t){for(var e=this.gamepads,i=0;i<e.length;i++)if(e[i]&&e[i].index===t)return e[i]},update:function(){if(this.enabled){this.refreshPads();var t=this.queue.length;if(0!==t)for(var e=this.queue.splice(0,t),i=0;i<t;i++){var n=e[i],r=this.getPad(n.gamepad.index);"gamepadconnected"===n.type?this.emit(s.CONNECTED,r,n):"gamepaddisconnected"===n.type&&this.emit(s.DISCONNECTED,r,n)}}},shutdown:function(){this.stopListeners(),this.removeAllListeners()},destroy:function(){this.shutdown();for(var t=0;t<this.gamepads.length;t++)this.gamepads[t]&&this.gamepads[t].destroy();this.gamepads=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.target=null},total:{get:function(){return this.gamepads.length}},pad1:{get:function(){return this._pad1}},pad2:{get:function(){return this._pad2}},pad3:{get:function(){return this._pad3}},pad4:{get:function(){return this._pad4}}});h.register("GamepadPlugin",u,"gamepad","gamepad","inputGamepad"),t.exports=u},89651:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},65294:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},90089:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},64894:(t,e,i)=>{t.exports={DUALSHOCK_4:i(65294),SNES_USB:i(89651),XBOX_360:i(90089)}},46008:t=>{t.exports="down"},7629:t=>{t.exports="up"},42206:t=>{t.exports="connected"},86544:t=>{t.exports="disconnected"},94784:t=>{t.exports="down"},14325:t=>{t.exports="up"},92734:(t,e,i)=>{t.exports={BUTTON_DOWN:i(46008),BUTTON_UP:i(7629),CONNECTED:i(42206),DISCONNECTED:i(86544),GAMEPAD_BUTTON_DOWN:i(94784),GAMEPAD_BUTTON_UP:i(14325)}},48646:(t,e,i)=>{t.exports={Axis:i(97421),Button:i(28884),Events:i(92734),Gamepad:i(99125),GamepadPlugin:i(56654),Configs:i(64894)}},14350:(t,e,i)=>{var n=i(93301),r=i(79291),s={CreatePixelPerfectHandler:i(84409),CreateInteractiveObject:i(74457),Events:i(8214),Gamepad:i(48646),InputManager:i(7003),InputPlugin:i(48205),InputPluginCache:i(89639),Keyboard:i(51442),Mouse:i(87078),Pointer:i(42515),Touch:i(95618)};s=r(!1,s,n),t.exports=s},78970:(t,e,i)=>{var n=i(72905),r=i(83419),s=i(8443),o=i(8214),a=i(46032),h=i(29747),l=new r({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(s.POST_STEP,this.postUpdate,this)},startListeners:function(){var t=this;this.onKeyDown=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i<t.length;i++){var n=t[i];"string"==typeof n&&(n=a[n.trim().toUpperCase()]),-1===e.indexOf(n)&&e.push(n)}this.preventDefault=e.length>0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i<t.length;i++){var r=t[i];"string"==typeof r&&(r=a[r.toUpperCase()]),n(e,r)}this.preventDefault=e.length>0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(s.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},28846:(t,e,i)=>{var n=i(83419),r=i(50792),s=i(95922),o=i(8443),a=i(35154),h=i(8214),l=i(89639),u=i(30472),c=i(46032),d=i(87960),p=i(74600),f=i(44594),m=i(56583),g=new n({Extends:r,initialize:function(t){r.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this),this.scene.sys.events.on(f.PAUSE,this.resetKeys,this),this.scene.sys.events.on(f.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n={};if("string"==typeof t){t=t.split(",");for(var r=0;r<t.length;r++){var s=t[r].trim();s&&(n[s]=this.addKey(s,e,i))}}else for(var o in t)n[o]=this.addKey(t[o],e,i);return n},addKey:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n=this.keys;if(t instanceof u){var r=n.indexOf(t);return r>-1?n[r]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new u(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n,r=this.keys;if(t instanceof u){var s=r.indexOf(t);s>-1&&(n=this.keys[s],this.keys[s]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return r[t]&&(n=r[t],r[t]=void 0),n&&(n.plugin=null,i&&this.removeCapture(n.keyCode),e&&n.destroy()),this},removeAllKeys:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.keys,n=0;n<i.length;n++){var r=i[n];r&&(i[n]=void 0,e&&this.removeCapture(r.keyCode),t&&r.destroy())}return this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(void 0===e&&(e=0),this.enabled&&t.isDown){var i=m(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n<e;n++){var r=t[n],o=r.keyCode,a=i[o],h=!1;void 0===r.cancelled&&(r.cancelled=0,r.stopImmediatePropagation=function(){r.cancelled=1},r.stopPropagation=function(){r.cancelled=-1}),-1!==r.cancelled&&(o===this.prevCode&&r.timeStamp===this.prevTime&&r.type===this.prevType||(this.prevCode=o,this.prevTime=r.timeStamp,this.prevType=r.type,"keydown"===r.type?(a&&(h=a.isDown,a.onDown(r)),r.cancelled||a&&h||(p[o]&&this.emit(s.KEY_DOWN+p[o],r),r.cancelled||this.emit(s.ANY_KEY_DOWN,r))):(a&&a.onUp(r),r.cancelled||(p[o]&&this.emit(s.KEY_UP+p[o],r),r.cancelled||this.emit(s.ANY_KEY_UP,r))),1===r.cancelled&&(r.cancelled=0)))}},resetKeys:function(){for(var t=this.keys,e=0;e<t.length;e++)t[e]&&t[e].reset();return this},shutdown:function(){this.removeAllKeys(!0),this.removeAllListeners(),this.sceneInputPlugin.manager.events.off(h.MANAGER_PROCESS,this.update,this),this.game.events.off(o.BLUR,this.resetKeys),this.scene.sys.events.off(f.PAUSE,this.resetKeys,this),this.scene.sys.events.off(f.SLEEP,this.resetKeys,this),this.queue=[]},destroy:function(){this.shutdown();for(var t=this.keys,e=0;e<t.length;e++)t[e]&&t[e].destroy();this.keys=[],this.combos=[],this.queue=[],this.scene=null,this.settings=null,this.sceneInputPlugin=null,this.manager=null},time:{get:function(){return this.sceneInputPlugin.manager.time}}});l.register("KeyboardPlugin",g,"keyboard","keyboard","inputKeyboard"),t.exports=g},66970:t=>{t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},87960:(t,e,i)=>{var n=i(83419),r=i(95922),s=i(95540),o=i(68769),a=i(92803),h=new n({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var n=0;n<e.length;n++){var h=e[n];"string"==typeof h?this.keyCodes.push(h.toUpperCase().charCodeAt(0)):"number"==typeof h?this.keyCodes.push(h):h.hasOwnProperty("keyCode")&&this.keyCodes.push(h.keyCode)}this.current=this.keyCodes[0],this.index=0,this.size=this.keyCodes.length,this.timeLastMatched=0,this.matched=!1,this.timeMatched=0,this.resetOnWrongKey=s(i,"resetOnWrongKey",!0),this.maxKeyDelay=s(i,"maxKeyDelay",0),this.resetOnMatch=s(i,"resetOnMatch",!1),this.deleteOnMatch=s(i,"deleteOnMatch",!1);var l=this;this.onKeyDown=function(t){!l.matched&&l.enabled&&(o(t,l)&&(l.manager.emit(r.COMBO_MATCH,l,t),l.resetOnMatch?a(l):l.deleteOnMatch&&l.destroy()))},this.manager.on(r.ANY_KEY_DOWN,this.onKeyDown)},progress:{get:function(){return this.index/this.size}},destroy:function(){this.enabled=!1,this.keyCodes=[],this.manager.off(r.ANY_KEY_DOWN,this.onKeyDown),this.manager=null}});t.exports=h},68769:(t,e,i)=>{var n=i(66970);t.exports=function(t,e){if(e.matched)return!0;var i=!1,r=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var s=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=s&&(r=!0,i=n(t,e))}else r=!0,i=n(t,e);return!r&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},92803:t=>{t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},92612:t=>{t.exports="keydown"},23345:t=>{t.exports="keyup"},21957:t=>{t.exports="keycombomatch"},44743:t=>{t.exports="down"},3771:t=>{t.exports="keydown-"},46358:t=>{t.exports="keyup-"},75674:t=>{t.exports="up"},95922:(t,e,i)=>{t.exports={ANY_KEY_DOWN:i(92612),ANY_KEY_UP:i(23345),COMBO_MATCH:i(21957),DOWN:i(44743),KEY_DOWN:i(3771),KEY_UP:i(46358),UP:i(75674)}},51442:(t,e,i)=>{t.exports={Events:i(95922),KeyboardManager:i(78970),KeyboardPlugin:i(28846),Key:i(30472),KeyCodes:i(46032),KeyCombo:i(87960),AdvanceKeyCombo:i(66970),ProcessKeyCombo:i(68769),ResetKeyCombo:i(92803),JustDown:i(90229),JustUp:i(38796),DownDuration:i(37015),UpDuration:i(41170)}},37015:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i<e}},90229:t=>{t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},38796:t=>{t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},30472:(t,e,i)=>{var n=i(83419),r=i(50792),s=i(95922),o=new n({Extends:r,initialize:function(t,e){r.call(this),this.plugin=t,this.keyCode=e,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(s.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(s.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(s.UP,this,t))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});t.exports=o},46032:t=>{t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},74600:(t,e,i)=>{var n=i(46032),r={};for(var s in n)r[n[s]]=s;t.exports=r},41170:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i<e}},85098:(t,e,i)=>{var n=i(83419),r=i(89357),s=i(8214),o=i(29747),a=new n({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,this.isTop=!0,t.events.once(s.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},requestPointerLock:function(){if(r.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){r.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,n=i.canvas,s=window&&window.focus&&i.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseMove(t),e.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){s&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseDown(t),e.preventDefaultDown&&t.target===n&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseUp(t),e.preventDefaultUp&&t.target===n&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onMouseWheel(t),e.preventDefaultWheel&&t.target===n&&t.preventDefault()};var o={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,o),t.addEventListener("mouseout",this.onMouseOut,o),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,o),window.top.addEventListener("mouseup",this.onMouseUpWindow,o)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o),this.isTop=!1}r.pointerLock&&(this.pointerLockChange=function(t){var n=e.target;e.locked=document.pointerLockElement===n||document.mozPointerLockElement===n||document.webkitPointerLockElement===n,i.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),r.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},87078:(t,e,i)=>{t.exports={MouseManager:i(85098)}},36210:(t,e,i)=>{var n=i(83419),r=i(8214),s=i(29747),o=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=s,this.onTouchStartWindow=s,this.onTouchMove=s,this.onTouchEnd=s,this.onTouchEndWindow=s,this.onTouchCancel=s,this.onTouchCancelWindow=s,this.isTop=!0,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,n=i.canvas,r=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchStart=function(t){r&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(t),e.capture&&t.cancelable&&t.target===n&&t.preventDefault())},this.onTouchStartWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&i.onTouchStart(t)},this.onTouchEnd=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(t),e.capture&&t.cancelable&&t.target===n&&t.preventDefault())},this.onTouchEndWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==n&&(i.onTouchEnd(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchCancel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(t),e.capture&&t.preventDefault())},this.onTouchCancelWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(t)};var s=this.capture,o={passive:!0},a={passive:!1};if(t.addEventListener("touchstart",this.onTouchStart,s?a:o),t.addEventListener("touchmove",this.onTouchMove,s?a:o),t.addEventListener("touchend",this.onTouchEnd,s?a:o),t.addEventListener("touchcancel",this.onTouchCancel,s?a:o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,a),window.top.addEventListener("touchend",this.onTouchEndWindow,a),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,a)}catch(t){window.addEventListener("touchstart",this.onTouchStartWindow,a),window.addEventListener("touchend",this.onTouchEndWindow,a),window.addEventListener("touchcancel",this.onTouchCancelWindow,a),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),window&&((t=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),t.removeEventListener("touchend",this.onTouchEndWindow),t.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=o},95618:(t,e,i)=>{t.exports={TouchManager:i(36210)}},41299:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(54899),o=i(95540),a=i(98356),h=i(3374),l=i(84376),u=i(92638),c=new n({initialize:function(t,e){if(this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var n=o(e,"url");void 0===n?n=t.path+i+"."+o(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=u(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile,this.base64="string"==typeof n&&0===n.indexOf("data:")},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=a(this,this.loader.baseURL),0===this.src.indexOf("data:")&&(this.base64=!0),this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(n=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,n)},onBase64Load:function(t){this.xhrLoader=t,this.state=r.FILE_LOADED,this.percentComplete=1,this.loader.emit(s.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(s.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=r.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(s.FILE_COMPLETE,e,i,t),this.loader.emit(s.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},74099:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},98356:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},74261:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(35072),o=i(50792),a=i(54899),h=i(74099),l=i(95540),u=i(35154),c=i(37277),d=i(44594),p=i(92638),f=new n({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(l(i,"baseURL",e.loaderBaseURL)),this.setPath(l(i,"path",e.loaderPath)),this.setPrefix(l(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=l(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=p(l(i,"responseType",e.loaderResponseType),l(i,"async",e.loaderAsync),l(i,"user",e.loaderUser),l(i,"password",e.loaderPassword),l(i,"timeout",e.loaderTimeout),l(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=l(i,"crossOrigin",e.loaderCrossOrigin),this.imageLoadType=l(i,"imageLoadType",e.loaderImageLoadType),this.localSchemes=l(i,"localScheme",e.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new s,this.inflight=new s,this.queue=new s,this._deleteQueue=new s,this.totalFailed=0,this.totalComplete=0,this.state=r.LOADER_IDLE,this.multiKeyIndex=0,t.sys.events.once(d.BOOT,this.boot,this),t.sys.events.on(d.START,this.pluginStart,this)},boot:function(){this.systems.events.once(d.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(d.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];this.keyExists(i)||(this.list.set(i),this.emit(a.ADD,i.key,i.type,this,i),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(t){var e=t.hasCacheConflict();return e||this.list.iterate((function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1})),!e&&this.isLoading()&&(this.inflight.iterate((function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1})),this.queue.iterate((function(i){if(i.type===t.type&&i.key===t.key)return e=!0,!1}))),e},addPack:function(t,e){if("string"==typeof e){var i=u(t,e);i&&(t={packKey:i})}var n=0,r=this.baseURL,s=this.path,o=this.prefix;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var h=t[a],c=l(h,"baseURL",r),d=l(h,"path",s),p=l(h,"prefix",o),f=l(h,"files",null),m=l(h,"defaultType","void");if(Array.isArray(f)){this.setBaseURL(c),this.setPath(d),this.setPrefix(p);for(var g=0;g<f.length;g++){var v=f[g],y=v.hasOwnProperty("type")?v.type:m;this[y]&&(this[y](v),n++)}}}return this.setBaseURL(r),this.setPath(s),this.setPrefix(o),n>0},isLoading:function(){return this.state===r.LOADER_LOADING||this.state===r.LOADER_PROCESSING},isReady:function(){return this.state===r.LOADER_IDLE||this.state===r.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=r.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(d.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===r.LOADER_LOADING&&this.list.size>0&&this.inflight.size<this.maxParallelDownloads&&this.checkLoadQueue()},checkLoadQueue:function(){this.list.each((function(t){if((t.state===r.FILE_POPULATED||t.state===r.FILE_PENDING&&this.inflight.size<this.maxParallelDownloads)&&(this.inflight.set(t),this.list.delete(t),t.crossOrigin||(t.crossOrigin=this.crossOrigin),t.load()),this.inflight.size===this.maxParallelDownloads)return!1}),this)},nextFile:function(t,e){this.inflight&&(this.inflight.delete(t),this.updateProgress(),e?(this.totalComplete++,this.queue.set(t),this.emit(a.FILE_LOAD,t),t.onProcess()):(this.totalFailed++,this._deleteQueue.set(t),this.emit(a.FILE_LOAD_ERROR,t),this.fileProcessComplete(t)))},fileProcessComplete:function(t){this.scene&&this.systems&&this.systems.game&&!this.systems.game.pendingDestroy&&(t.state===r.FILE_ERRORED?t.multiFile&&t.multiFile.onFileFailed(t):t.state===r.FILE_COMPLETE&&(t.multiFile?t.multiFile.isReadyToProcess()&&(t.multiFile.addToCache(),t.multiFile.pendingDestroy()):(t.addToCache(),t.pendingDestroy())),this.queue.delete(t),0===this.list.size&&0===this.inflight.size&&0===this.queue.size&&this.loadComplete())},loadComplete:function(){this.emit(a.POST_PROCESS,this),this.list.clear(),this.inflight.clear(),this.queue.clear(),this.progress=1,this.state=r.LOADER_COMPLETE,this.systems.events.off(d.UPDATE,this.update,this),this._deleteQueue.iterateLocal("destroy"),this._deleteQueue.clear(),this.emit(a.COMPLETE,this,this.totalComplete,this.totalFailed)},flagForRemoval:function(t){this._deleteQueue.set(t)},saveJSON:function(t,e){return this.save(JSON.stringify(t),e)},save:function(t,e,i){void 0===e&&(e="file.json"),void 0===i&&(i="application/json");var n=new Blob([t],{type:i}),r=URL.createObjectURL(n),s=document.createElement("a");return s.download=e,s.textContent="Download "+e,s.href=r,s.click(),this},reset:function(){this.list.clear(),this.inflight.clear(),this.queue.clear();var t=this.systems.game.config,e=this.systems.settings.loader;this.setBaseURL(l(e,"baseURL",t.loaderBaseURL)),this.setPath(l(e,"path",t.loaderPath)),this.setPrefix(l(e,"prefix",t.loaderPrefix)),this.state=r.LOADER_IDLE},shutdown:function(){this.reset(),this.state=r.LOADER_SHUTDOWN,this.removeAllListeners(),this.systems.events.off(d.UPDATE,this.update,this),this.systems.events.off(d.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.state=r.LOADER_DESTROYED,this.systems.events.off(d.UPDATE,this.update,this),this.systems.events.off(d.START,this.pluginStart,this),this.list=null,this.inflight=null,this.queue=null,this.scene=null,this.systems=null,this.textureManager=null,this.cacheManager=null,this.sceneManager=null}});c.register("Loader",f,"load"),t.exports=f},3374:(t,e,i)=>{var n=i(79291),r=i(92638);t.exports=function(t,e){var i=void 0===t?r():n({},t);if(e)for(var s in e)void 0!==e[s]&&(i[s]=e[s]);return i}},26430:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(54899),o=new n({initialize:function(t,e,i,n){var s=[];n.forEach((function(t){t&&s.push(t)})),this.loader=t,this.type=e,this.key=i;var o=this.key;t.prefix&&""!==t.prefix&&(this.key=t.prefix+o),this.multiKeyIndex=t.multiKeyIndex++,this.files=s,this.state=r.FILE_PENDING,this.complete=!1,this.pending=s.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var a=0;a<s.length;a++)s[a].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),t.multiFile=this,this.pending++,this.complete=!1,this},onFileComplete:function(t){-1!==this.files.indexOf(t)&&this.pending--},onFileFailed:function(t){-1!==this.files.indexOf(t)&&(this.failed++,console.error('File failed: %s "%s" (via %s "%s")',this.type,this.key,t.type,t.key))},pendingDestroy:function(){if(this.state!==r.FILE_PENDING_DESTROY){var t=this.key,e=this.type;this.loader.emit(s.FILE_COMPLETE,t,e),this.loader.emit(s.FILE_KEY_COMPLETE+e+"-"+t,t,e),this.loader.flagForRemoval(this);for(var i=0;i<this.files.length;i++)this.files[i].pendingDestroy();this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.files=null,this.config=null}});t.exports=o},84376:(t,e,i)=>{var n=i(3374);t.exports=function(t,e){var i=n(e,t.xhrSettings);if(!t.base64){var r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var s in i.headers)r.setRequestHeader(s,i.headers[s]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.ontimeout=t.onError.bind(t,r),r.send(),r}var o=t.url.split(";base64,").pop()||t.url.split(",").pop(),a={responseText:atob(o)};t.onBase64Load(a)}},92638:t=>{t.exports=function(t,e,i,n,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:i,password:n,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},23906:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},42155:t=>{t.exports="addfile"},38991:t=>{t.exports="complete"},27540:t=>{t.exports="filecomplete"},87464:t=>{t.exports="filecomplete-"},94486:t=>{t.exports="loaderror"},13035:t=>{t.exports="load"},38144:t=>{t.exports="fileprogress"},97520:t=>{t.exports="postprocess"},85595:t=>{t.exports="progress"},55680:t=>{t.exports="start"},54899:(t,e,i)=>{t.exports={ADD:i(42155),COMPLETE:i(38991),FILE_COMPLETE:i(27540),FILE_KEY_COMPLETE:i(87464),FILE_LOAD_ERROR:i(94486),FILE_LOAD:i(13035),FILE_PROGRESS:i(38144),POST_PROCESS:i(97520),PROGRESS:i(85595),START:i(55680)}},14135:(t,e,i)=>{var n=i(83419),r=i(74099),s=i(518),o=i(54899),a=new n({Extends:s,initialize:function(t,e,i,n,r){s.call(this,t,e,i,n,r),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),s.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});r.register("animation",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new a(this,t[r]));else this.addFile(new a(this,t,e,n,i));return this})),t.exports=a},76272:(t,e,i)=>{var n=i(83419),r=i(74099),s=i(95540),o=i(19550),a=i(41212),h=i(518),l=i(26430),u=new n({Extends:l,initialize:function(t,e,i,n,r,u){var c,d;if(a(e)){var p=e;e=s(p,"key"),c=new o(t,{key:e,url:s(p,"textureURL"),extension:s(p,"textureExtension","png"),normalMap:s(p,"normalMap"),xhrSettings:s(p,"textureXhrSettings")}),d=new h(t,{key:e,url:s(p,"atlasURL"),extension:s(p,"atlasExtension","json"),xhrSettings:s(p,"atlasXhrSettings")})}else c=new o(t,e,i,r),d=new h(t,e,n,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});r.register("aseprite",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new u(this,t[o]),this.addFile(s.files);else s=new u(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=u},38734:(t,e,i)=>{var n=i(83419),r=i(74099),s=i(95540),o=i(19550),a=i(41212),h=i(518),l=i(26430),u=new n({Extends:l,initialize:function(t,e,i,n,r,u){var c,d;if(a(e)){var p=e;e=s(p,"key"),c=new o(t,{key:e,url:s(p,"textureURL"),extension:s(p,"textureExtension","png"),normalMap:s(p,"normalMap"),xhrSettings:s(p,"textureXhrSettings")}),d=new h(t,{key:e,url:s(p,"atlasURL"),extension:s(p,"atlasExtension","json"),xhrSettings:s(p,"atlasXhrSettings")})}else c=new o(t,e,i,r),d=new h(t,e,n,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),this.complete=!0}}});r.register("atlas",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new u(this,t[o]),this.addFile(s.files);else s=new u(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=u},74599:(t,e,i)=>{var n=i(83419),r=i(74099),s=i(95540),o=i(19550),a=i(41212),h=i(26430),l=i(57318),u=new n({Extends:h,initialize:function(t,e,i,n,r,u){var c,d;if(a(e)){var p=e;e=s(p,"key"),c=new o(t,{key:e,url:s(p,"textureURL"),extension:s(p,"textureExtension","png"),normalMap:s(p,"normalMap"),xhrSettings:s(p,"textureXhrSettings")}),d=new l(t,{key:e,url:s(p,"atlasURL"),extension:s(p,"atlasExtension","xml"),xhrSettings:s(p,"atlasXhrSettings")})}else c=new o(t,e,i,r),d=new l(t,e,n,u);c.linkFile?h.call(this,t,"atlasxml",e,[c,d,c.linkFile]):h.call(this,t,"atlasxml",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),this.complete=!0}}});r.register("atlasXML",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new u(this,t[o]),this.addFile(s.files);else s=new u(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=u},21097:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(89749),l=i(41212),u=new n({Extends:s,initialize:function(t,e,i,n,r){if(l(e)){var o=e;e=a(o,"key"),n=a(o,"xhrSettings"),r=a(o,"context",r)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:n,config:{context:r}};s.call(this,t,h)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,(function(e){t.data=e,t.onProcessComplete()}),(function(e){console.error("Error decoding audio: "+t.key+" - ",e?e.message:null),t.onProcessError()})),this.config.context=null}});u.create=function(t,e,i,n,r){var s=t.systems.game,o=s.config.audio,c=s.device.audio;l(e)&&(i=a(e,"url",[]),n=a(e,"config",{}));var d=u.getAudioURL(s,i);return d?c.webAudio&&!o.disableWebAudio?new u(t,e,d,r,s.sound.context):new h(t,e,d,n):(console.warn('No audio URLs for "%s" matched this device',e),null)},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++){var n=a(e[i],"url",e[i]);if(0===n.indexOf("blob:")||0===n.indexOf("data:"))return{url:n,type:""};var r=n.match(/\.([a-zA-Z0-9]+)($|\?)/);if(r=a(e[i],"type",r?r[1]:"").toLowerCase(),t.device.audio[r])return{url:n,type:r}}return null},o.register("audio",(function(t,e,i,n){var r,s=this.systems.game,o=s.config.audio,a=s.device.audio;if(o.noAudio||!a.webAudio&&!a.audioData)return this;if(Array.isArray(t))for(var h=0;h<t.length;h++)(r=u.create(this,t[h]))&&this.addFile(r);else(r=u.create(this,t,e,i,n))&&this.addFile(r);return this})),t.exports=u},89524:(t,e,i)=>{var n=i(21097),r=i(83419),s=i(74099),o=i(95540),a=i(41212),h=i(518),l=i(26430),u=new r({Extends:l,initialize:function(t,e,i,r,s,u,c){if(a(e)){var d=e;e=o(d,"key"),i=o(d,"jsonURL"),r=o(d,"audioURL"),s=o(d,"audioConfig"),u=o(d,"audioXhrSettings"),c=o(d,"jsonXhrSettings")}var p;if(r){var f=n.create(t,e,r,s,u);f&&(p=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[f,p]),this.config.resourceLoad=!1)}else p=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[p]),this.config.resourceLoad=!0,this.config.audioConfig=s,this.config.audioXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=o(this.config,"audioConfig"),r=o(this.config,"audioXhrSettings"),s=n.create(this.loader,t.key,e,i,r);s&&(this.addToMultiFile(s),this.loader.addFile(s))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});s.register("audioSprite",(function(t,e,i,n,r,s){var o,a=this.systems.game,h=a.config.audio,l=a.device.audio;if(h&&h.noAudio||!l.webAudio&&!l.audioData)return this;if(Array.isArray(t))for(var c=0;c<t.length;c++)(o=new u(this,t[c])).files&&this.addFile(o.files);else(o=new u(this,t,e,i,n,r,s)).files&&this.addFile(o.files);return this}))},85722:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:s,initialize:function(t,e,i,n,r){var o="bin";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"xhrSettings"),o=a(l,"extension",o),r=a(l,"dataType",r)}var u={type:"binary",cache:t.cacheManager.binary,extension:o,responseType:"arraybuffer",key:e,url:i,xhrSettings:n,config:{dataType:r}};s.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});o.register("binary",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,n,i));return this})),t.exports=l},97025:(t,e,i)=>{var n=i(83419),r=i(74099),s=i(95540),o=i(19550),a=i(41212),h=i(26430),l=i(21859),u=i(57318),c=new n({Extends:h,initialize:function(t,e,i,n,r,l){var c,d;if(a(e)){var p=e;e=s(p,"key"),c=new o(t,{key:e,url:s(p,"textureURL"),extension:s(p,"textureExtension","png"),normalMap:s(p,"normalMap"),xhrSettings:s(p,"textureXhrSettings")}),d=new u(t,{key:e,url:s(p,"fontDataURL"),extension:s(p,"fontDataExtension","xml"),xhrSettings:s(p,"fontDataXhrSettings")})}else c=new o(t,e,i,r),d=new u(t,e,n,l);c.linkFile?h.call(this,t,"bitmapfont",e,[c,d,c.linkFile]):h.call(this,t,"bitmapfont",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache();var i=t.cache.get(t.key),n=l(e.data,t.cache.getFrame(t.key),0,0,i);this.loader.cacheManager.bitmapFont.add(t.key,{data:n,texture:t.key,frame:null}),this.complete=!0}}});r.register("bitmapFont",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new c(this,t[o]),this.addFile(s.files);else s=new c(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=c},16024:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:s,initialize:function(t,e,i,n){var r="css";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),r=a(o,"extension",r)}var l={type:"script",cache:!1,extension:r,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,l)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("css",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this})),t.exports=l},69559:(t,e,i)=>{var n=i(38734),r=i(85722),s=i(83419),o=i(74099),a=i(95540),h=i(19550),l=i(41212),u=i(518),c=i(31403),d=i(46975),p=i(59327),f=i(26430),m=i(82038),g=i(55222),v=new s({Extends:f,initialize:function(t,e,i,n){if(i.multiAtlasURL){var s=new u(t,{key:e,url:i.multiAtlasURL,xhrSettings:n,config:i});f.call(this,t,"texture",e,[s])}else{var o=i.textureURL.substr(i.textureURL.length-3);i.type||(i.type="ktx"===o.toLowerCase()?"KTX":"PVR");var a=new r(t,{key:e,url:i.textureURL,extension:o,xhrSettings:n,config:i});if(i.atlasURL){var h=new u(t,{key:e,url:i.atlasURL,xhrSettings:n,config:i});f.call(this,t,"texture",e,[a,h])}else f.call(this,t,"texture",e,[a])}this.config=i},onFileComplete:function(t){if(-1!==this.files.indexOf(t)){if(this.pending--,!this.config.multiAtlasURL)return;if("json"===t.type&&t.data.hasOwnProperty("textures")){var e=t.data.textures,i=this.config,n=this.loader,s=n.baseURL,o=n.path,h=n.prefix,l=a(i,"multiBaseURL",this.baseURL),u=a(i,"multiPath",this.path),c=a(i,"prefix",this.prefix),d=a(i,"textureXhrSettings");l&&n.setBaseURL(l),u&&n.setPath(u),c&&n.setPrefix(c);for(var p=0;p<e.length;p++){var f=e[p].image,m="CMA"+this.multiKeyIndex+"_"+f,g=new r(n,m,f,d);if(this.addToMultiFile(g),n.addFile(g),e[p].normalMap){var v=new r(n,m,e[p].normalMap,d);v.type="normalMap",g.setLink(v),this.addToMultiFile(v),n.addFile(v)}}n.setBaseURL(s),n.setPath(o),n.setPrefix(h)}}},addToCache:function(){function t(t){console.warn('Compressed Texture Invalid: "'+s.key+'". '+t)}if(this.isReadyToProcess()){var e=this.config;if(e.multiAtlasURL)this.addMultiToCache();else{var i,n=this.loader.systems.renderer,r=this.loader.textureManager,s=this.files[0],o=this.files[1];if("PVR"===e.type?i=m(s.data):"KTX"===e.type&&((i=c(s.data))||t("KTX file contains unsupported format.")),i&&!g(i)&&(t("Texture dimensions failed verification. Check the texture format specifications for "+e.format+" 0x"+i.internalFormat.toString(16)+"."),i=null),i&&!n.supportsCompressedTexture(e.format,i.internalFormat)&&(t("Texture format "+e.format+" with internal format "+i.internalFormat+" not supported by the GPU. Texture invalid. This is often due to the texture using sRGB instead of linear RGB."),i=null),i){i.format=n.getCompressedTextureName(e.format,i.internalFormat);var a=o&&o.data?o.data:null;r.addCompressedTexture(s.key,i,a)}}this.complete=!0}},addMultiToCache:function(){for(var t,e=this.config,i=this.files[0],n=[],r=[],s=[],o=this.loader.systems.renderer,a=this.loader.textureManager,h=1;h<this.files.length;h++){var l=this.files[h];if("normalMap"!==l.type)for(var u=l.key.indexOf("_"),d=l.key.substr(u+1),p=l.data,f=0;f<i.data.textures.length;f++){var g=i.data.textures[f];if(g.image===d){"PVR"===e.type?t=m(p):"KTX"===e.type&&(t=c(p)),t&&o.supportsCompressedTexture(e.format,t.internalFormat)&&(t.format=o.getCompressedTextureName(e.format,t.internalFormat),r.push(t),n.push(g),l.linkFile&&s.push(l.linkFile.data));break}}}0===s.length&&(s=void 0),a.addAtlasJSONArray(this.key,r,n,s),this.complete=!0}});o.register("texture",(function(t,e,i){var r=this.systems.renderer,s=function(t,e,i,s){var o={format:null,type:null,textureURL:void 0,atlasURL:void 0,multiAtlasURL:void 0,multiPath:void 0,multiBaseURL:void 0};if(l(e)){var u=e;e=a(u,"key"),i=a(u,"url"),s=a(u,"xhrSettings")}var c=!1;for(var f in i)if(r.supportsCompressedTexture(f)){var m=i[f];"string"==typeof m?o.textureURL=m:o=d(m,o),o.format=f.toUpperCase(),c=!0;break}if(c)if("IMG"===o.format){var g;g=o.multiAtlasURL?new p(t,e,o.multiAtlasURL,o.multiPath,o.multiBaseURL,s).files:o.atlasURL?new n(t,e,o.textureURL,o.atlasURL,s).files:new h(t,e,o.textureURL,s),t.addFile(g)}else{var y=new v(t,e,o,s);t.addFile(y.files)}else console.warn("No supported compressed texture format or IMG fallback",e)};if(Array.isArray(t))for(var o=0;o<t.length;o++)s(this,t[o]);else s(this,t,e,i);return this})),t.exports=v},47931:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=i(73894),u=new n({Extends:s,initialize:function(t,e,i,n,r){var o="glsl";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"shaderType","fragment"),r=a(l,"xhrSettings"),o=a(l,"extension",o)}else void 0===n&&(n="fragment");var u={type:"glsl",cache:t.cacheManager.shader,extension:o,responseType:"text",key:e,url:i,config:{shaderType:n},xhrSettings:r};s.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i=this.getShaderName(e.header),n=this.getShaderType(e.header),r=this.getShaderUniforms(e.header),s=e.shader;if(this.cache.has(i)){var o=this.cache.get(i);"fragment"===n?o.fragmentSrc=s:o.vertexSrc=s,o.uniforms||(o.uniforms=r)}else"fragment"===n?this.cache.add(i,new l(i,s,"",r)):this.cache.add(i,new l(i,"",s,r));e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new l(this.key,this.data)):this.cache.add(this.key,new l(this.key,"",this.data))},getShaderName:function(t){for(var e=0;e<t.length;e++){var i=t[e].trim();if("name:"===i.substring(0,5))return i.substring(5).trim()}return this.key},getShaderType:function(t){for(var e=0;e<t.length;e++){var i=t[e].trim();if("type:"===i.substring(0,5))return i.substring(5).trim()}return this.config.shaderType},getShaderUniforms:function(t){for(var e={},i=0;i<t.length;i++){var n=t[i].trim();if("uniform."===n.substring(0,8)){var r=n.indexOf(":");if(r){var s=n.substring(8,r);try{e[s]=JSON.parse(n.substring(r+1))}catch(t){console.warn("Invalid uniform JSON: "+s)}}}}return e},extractBlock:function(t,e){for(var i=-1,n=-1,r=-1,s=!1,o=!1,a=[],h=[],l=e;l<t.length;l++){var u=t[l].trim();if("---"===u)if(-1===i)i=l,s=!0;else{if(!s){o=!1;break}n=l,s=!1,o=!0}else s?a.push(u):o&&(h.push(u),r=l)}return s||-1===n?null:{header:a,shader:h.join("\n"),offset:r}}});o.register("glsl",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new u(this,t[r]));else this.addFile(new u(this,t,e,i,n));return this})),t.exports=u},89749:(t,e,i)=>{var n=i(83419),r=i(54899),s=i(41299),o=i(95540),a=i(98356),h=i(41212),l=new n({Extends:s,initialize:function(t,e,i,n){if(h(e)){var r=e;e=o(r,"key"),n=o(r,"config",n)}var a={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:n};s.call(this,t,a),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t<this.data.length;t++){var e=this.data[t];e.oncanplaythrough=null,e.onerror=null}this.loader.nextFile(this,!1)},onProgress:function(t){var e=t.target;e.oncanplaythrough=null,e.onerror=null,this.filesLoaded++,this.percentComplete=Math.min(this.filesLoaded/this.filesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete),this.filesLoaded===this.filesTotal&&this.onLoad()},load:function(){this.data=[];var t=this.config&&this.config.instances||1;this.filesTotal=t,this.filesLoaded=0,this.percentComplete=0;for(var e=0;e<t;e++){var i=new Audio;i.dataset||(i.dataset={}),i.dataset.name=this.key+("0"+e).slice(-2),i.dataset.used="false",this.locked?i.dataset.locked="true":(i.dataset.locked="false",i.preload="auto",i.oncanplaythrough=this.onProgress.bind(this),i.onerror=this.onError.bind(this)),this.data.push(i)}for(e=0;e<this.data.length;e++)(i=this.data[e]).src=a(this,this.loader.baseURL),this.locked||i.load();this.locked&&setTimeout(this.onLoad.bind(this))}});t.exports=l},88470:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:s,initialize:function(t,e,i,n){var r="html";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),r=a(o,"extension",r)}var l={type:"text",cache:t.cacheManager.html,extension:r,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,l)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("html",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this})),t.exports=l},14643:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:s,initialize:function(t,e,i,n,r,o){void 0===n&&(n=512),void 0===r&&(r=512);var l="html";if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),o=a(u,"xhrSettings"),l=a(u,"extension",l),n=a(u,"width",n),r=a(u,"height",r)}var c={type:"html",cache:t.textureManager,extension:l,responseType:"text",key:e,url:i,xhrSettings:o,config:{width:n,height:r}};s.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[];i.push('<svg width="'+t+'px" height="'+e+'px" viewBox="0 0 '+t+" "+e+'" xmlns="http://www.w3.org/2000/svg">'),i.push('<foreignObject width="100%" height="100%">'),i.push('<body xmlns="http://www.w3.org/1999/xhtml">'),i.push(this.xhrLoader.responseText),i.push("</body>"),i.push("</foreignObject>"),i.push("</svg>");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=r.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){s.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){s.revokeObjectURL(o.data),o.onProcessError()},s.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("htmlTexture",(function(t,e,i,n,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,i,n,r));return this})),t.exports=l},19550:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=i(98356),u=new n({Extends:s,initialize:function t(e,i,n,r,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),r=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:r,config:o};if(s.call(this,e,d),l){var p=new t(e,this.key,l,r,o);p.type="normalMap",this.setLink(p),e.addFile(p)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){s.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){s.revokeObjectURL(t.data),t.onProcessError()},s.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("spritesheet"===t.type?t.addToCache():"normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});o.register("image",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},518:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(35154),l=i(41212),u=new n({Extends:s,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};s.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new u(this,t[r]));else this.addFile(new u(this,t,e,n,i));return this})),t.exports=u},59327:(t,e,i)=>{var n=i(83419),r=i(74099),s=i(95540),o=i(19550),a=i(41212),h=i(518),l=i(26430),u=new n({Extends:l,initialize:function(t,e,i,n,r,o,u){if(a(e)){var c=e;e=s(c,"key"),i=s(c,"url",!1)?s(c,"url"):s(c,"atlasURL"),o=s(c,"xhrSettings"),n=s(c,"path"),r=s(c,"baseURL"),u=s(c,"textureXhrSettings")}var d=new h(t,e,i,o);l.call(this,t,"multiatlas",e,[d]),this.config.path=n,this.config.baseURL=r,this.config.textureXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,n=this.loader,r=n.baseURL,a=n.path,h=n.prefix,l=s(i,"baseURL",this.baseURL),u=s(i,"path",this.path),c=s(i,"prefix",this.prefix),d=s(i,"textureXhrSettings");n.setBaseURL(l),n.setPath(u),n.setPrefix(c);for(var p=0;p<e.length;p++){var f=e[p].image,m="MA"+this.multiKeyIndex+"_"+f,g=new o(n,m,f,d);if(this.addToMultiFile(g),n.addFile(g),e[p].normalMap){var v=new o(n,m,e[p].normalMap,d);v.type="normalMap",g.setLink(v),this.addToMultiFile(v),n.addFile(v)}}n.setBaseURL(r),n.setPath(a),n.setPrefix(h)}},addToCache:function(){if(this.isReadyToProcess()){for(var t=this.files[0],e=[],i=[],n=[],r=1;r<this.files.length;r++){var s=this.files[r];if("normalMap"!==s.type)for(var o=s.key.indexOf("_"),a=s.key.substr(o+1),h=s.data,l=0;l<t.data.textures.length;l++){var u=t.data.textures[l];if(u.image===a){i.push(h),e.push(u),s.linkFile&&n.push(s.linkFile.data);break}}}0===n.length&&(n=void 0),this.loader.textureManager.addAtlasJSONArray(this.key,i,e,n),this.complete=!0}}});r.register("multiatlas",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new u(this,t[o]),this.addFile(s.files);else s=new u(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=u},99297:(t,e,i)=>{var n=i(83419),r=i(74099),s=i(95540),o=i(41212),a=i(26430),h=i(34328),l=new n({Extends:a,initialize:function(t,e,i,n){var r="js",l=[];if(o(e)){var u=e;e=s(u,"key"),i=s(u,"url"),n=s(u,"xhrSettings"),r=s(u,"extension",r)}Array.isArray(i)||(i=[i]);for(var c=0;c<i.length;c++){var d=new h(t,{key:e+"_"+c.toString(),url:i[c],extension:r,xhrSettings:n});d.onProcess=function(){this.onProcessComplete()},l.push(d)}a.call(this,t,"scripts",e,l)},addToCache:function(){if(this.isReadyToProcess()){for(var t=0;t<this.files.length;t++){var e=this.files[t];e.data=document.createElement("script"),e.data.language="javascript",e.data.type="text/javascript",e.data.defer=!1,e.data.text=e.xhrLoader.responseText,document.head.appendChild(e.data)}this.complete=!0}}});r.register("scripts",(function(t,e,i){var n;if(Array.isArray(t))for(var r=0;r<t.length;r++)n=new l(this,t[r]),this.addFile(n.files);else n=new l(this,t,e,i),this.addFile(n.files);return this})),t.exports=l},41846:(t,e,i)=>{var n=i(83419),r=i(74099),s=i(95540),o=i(41212),a=i(26430),h=i(85048),l=i(61485),u=i(78776),c=new n({Extends:a,initialize:function(t,e,i,n,r,h){var l,c,d=t.cacheManager.obj;if(o(e)){var p=e;e=s(p,"key"),l=new u(t,{key:e,type:"obj",cache:d,url:s(p,"url"),extension:s(p,"extension","obj"),xhrSettings:s(p,"xhrSettings"),config:{flipUV:s(p,"flipUV",r)}}),(n=s(p,"matURL"))&&(c=new u(t,{key:e,type:"mat",cache:d,url:n,extension:s(p,"matExtension","mat"),xhrSettings:s(p,"xhrSettings")}))}else l=new u(t,{key:e,url:i,type:"obj",cache:d,extension:"obj",xhrSettings:h,config:{flipUV:r}}),n&&(c=new u(t,{key:e,url:n,type:"mat",cache:d,extension:"mat",xhrSettings:h}));a.call(this,t,"obj",e,[l,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=h(t.data,t.config.flipUV);e&&(i.materials=l(e.data)),t.cache.add(t.key,i),this.complete=!0}}});r.register("obj",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new c(this,t[o]),this.addFile(s.files);else s=new c(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=c},58610:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(74099),o=i(518),a=new n({Extends:o,initialize:function(t,e,i,n,r){o.call(this,t,e,i,n,r),this.type="packfile"},onProcess:function(){if(this.state!==r.FILE_POPULATED&&(this.state=r.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var t={};t[this.config]=this.data,this.data=t}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});s.register("pack",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new a(this,t[r]));else this.addFile(new a(this,t,e,n,i));return this})),t.exports=a},48988:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:s,initialize:function(t,e,i,n,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),n=a(c,"start"),o=a(c,"mapping")}var d={type:"plugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{start:n,mapping:o}};s.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=r.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=a(e,"start",!1),n=a(e,"mapping",null);if(this.state===r.FILE_POPULATED)t.install(this.key,this.data,i,n);else{this.state=r.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var s=t.install(this.key,window[this.key],i,n);(i||n)&&(this.loader.systems[n]=s,this.loader.scene[n]=s)}this.onProcessComplete()}});o.register("plugin",(function(t,e,i,n,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,i,n,r));return this})),t.exports=l},67397:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:s,initialize:function(t,e,i,n,r){var o="svg";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"svgConfig",{}),r=a(l,"xhrSettings"),o=a(l,"extension",o)}var u={type:"svg",cache:t.textureManager,extension:o,responseType:"text",key:e,url:i,xhrSettings:r,config:{width:a(n,"width"),height:a(n,"height"),scale:a(n,"scale")}};s.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,n=this.config.height,o=this.config.scale;t:if(i&&n||o){var a=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],h=a.hasAttribute("viewBox"),l=parseFloat(a.getAttribute("width")),u=parseFloat(a.getAttribute("height"));if(!h&&l&&u)a.setAttribute("viewBox","0 0 "+l+" "+u);else if(h&&!l&&!u){var c=a.getAttribute("viewBox").split(/\s+|,/);l=c[2],u=c[3]}if(o){if(!l||!u)break t;i=l*o,n=u*o}a.setAttribute("width",i.toString()+"px"),a.setAttribute("height",n.toString()+"px"),e=[(new XMLSerializer).serializeToString(a)]}try{var d=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var p=this,f=!1;this.data.onload=function(){f||s.revokeObjectURL(p.data),p.onProcessComplete()},this.data.onerror=function(){f?p.onProcessError():(f=!0,s.revokeObjectURL(p.data),p.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},s.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("svg",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,i,n));return this})),t.exports=l},88423:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:s,initialize:function(t,e,i,n){var r="js";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),r=a(o,"extension",r)}var l={type:"text",extension:r,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,l)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),e=eval;this.loader.sceneManager.add(this.key,e(t)),this.complete=!0}});o.register("sceneFile",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this})),t.exports=l},56812:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:s,initialize:function(t,e,i,n,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),n=a(c,"systemKey"),o=a(c,"sceneKey")}var d={type:"scenePlugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{systemKey:n,sceneKey:o}};s.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=r.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,n=a(e,"systemKey",i),s=a(e,"sceneKey",i);this.state===r.FILE_POPULATED?t.installScenePlugin(n,this.data,s,this.loader.scene,!0):(this.state=r.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t.installScenePlugin(n,window[this.key],s,this.loader.scene,!0)),this.onProcessComplete()}});o.register("scenePlugin",(function(t,e,i,n,r){if(Array.isArray(t))for(var s=0;s<t.length;s++)this.addFile(new l(this,t[s]));else this.addFile(new l(this,t,e,i,n,r));return this})),t.exports=l},34328:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:s,initialize:function(t,e,i,n,r){var o="js";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),n=a(l,"type","script"),r=a(l,"xhrSettings"),o=a(l,"extension",o)}else void 0===n&&(n="script");var u={type:n,cache:!1,extension:o,responseType:"text",key:e,url:i,xhrSettings:r};s.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("script",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new l(this,t[r]));else this.addFile(new l(this,t,e,i,n));return this})),t.exports=l},85035:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(74099),o=i(19550),a=new n({Extends:o,initialize:function(t,e,i,n,r){o.call(this,t,e,i,r,n),this.type="spritesheet"},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addSpriteSheet(this.key,t.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,t.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});s.register("spritesheet",(function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new a(this,t[r]));else this.addFile(new a(this,t,e,i,n));return this})),t.exports=a},78776:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=new n({Extends:s,initialize:function(t,e,i,n){var r="text",o="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),n=a(u,"xhrSettings"),o=a(u,"extension",o),r=a(u,"type",r),l=a(u,"cache",l)}var c={type:r,cache:l,extension:o,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new l(this,t[n]));else this.addFile(new l(this,t,e,i));return this})),t.exports=l},49477:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=i(80341),u=new n({Extends:s,initialize:function(t,e,i,n){var r="csv";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),r=a(o,"extension",r)}var u={type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:r,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,u),this.tilemapFormat=l.CSV},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t)}});o.register("tilemapCSV",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},40807:(t,e,i)=>{var n=i(83419),r=i(74099),s=i(518),o=i(80341),a=new n({Extends:s,initialize:function(t,e,i,n){s.call(this,t,e,i,n),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.WELTMEISTER,data:this.data};this.cache.add(this.key,t)}});r.register("tilemapImpact",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new a(this,t[n]));else this.addFile(new a(this,t,e,i));return this})),t.exports=a},56775:(t,e,i)=>{var n=i(83419),r=i(74099),s=i(518),o=i(80341),a=new n({Extends:s,initialize:function(t,e,i,n){s.call(this,t,e,i,n),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.TILED_JSON,data:this.data};this.cache.add(this.key,t)}});r.register("tilemapTiledJSON",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new a(this,t[n]));else this.addFile(new a(this,t,e,i));return this})),t.exports=a},25771:(t,e,i)=>{var n=i(83419),r=i(74099),s=i(95540),o=i(19550),a=i(41212),h=i(26430),l=i(78776),u=new n({Extends:h,initialize:function(t,e,i,n,r,u){var c,d;if(a(e)){var p=e;e=s(p,"key"),c=new o(t,{key:e,url:s(p,"textureURL"),extension:s(p,"textureExtension","png"),normalMap:s(p,"normalMap"),xhrSettings:s(p,"textureXhrSettings")}),d=new l(t,{key:e,url:s(p,"atlasURL"),extension:s(p,"atlasExtension","txt"),xhrSettings:s(p,"atlasXhrSettings")})}else c=new o(t,e,i,r),d=new l(t,e,n,u);c.linkFile?h.call(this,t,"unityatlas",e,[c,d,c.linkFile]):h.call(this,t,"unityatlas",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),this.complete=!0}}});r.register("unityAtlas",(function(t,e,i,n,r){var s;if(Array.isArray(t))for(var o=0;o<t.length;o++)s=new u(this,t[o]),this.addFile(s.files);else s=new u(this,t,e,i,n,r),this.addFile(s.files);return this})),t.exports=u},33720:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(98356),h=i(95540),l=i(41212),u=new n({Extends:s,initialize:function(t,e,i,n){if(void 0===n&&(n=!1),l(e)){var r=e;e=h(r,"key"),i=h(r,"url",[]),n=h(r,"noAudio",!1)}var o=t.systems.game.device.video.getVideoURL(i);o||console.warn("VideoFile: No supported format for "+e);var a={type:"video",cache:t.cacheManager.video,extension:o.type,key:e,url:o.url,config:{noAudio:n}};s.call(this,t,a)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=a(this,this.loader.baseURL),this.state=r.FILE_LOADED,this.loader.nextFile(this,!0)}});o.register("video",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},57318:(t,e,i)=>{var n=i(83419),r=i(23906),s=i(41299),o=i(74099),a=i(95540),h=i(41212),l=i(56836),u=new n({Extends:s,initialize:function(t,e,i,n){var r="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),r=a(o,"extension",r)}var l={type:"xml",cache:t.cacheManager.xml,extension:r,responseType:"text",key:e,url:i,xhrSettings:n};s.call(this,t,l)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});o.register("xml",(function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new u(this,t[n]));else this.addFile(new u(this,t,e,i));return this})),t.exports=u},64589:(t,e,i)=>{t.exports={AnimationJSONFile:i(14135),AsepriteFile:i(76272),AtlasJSONFile:i(38734),AtlasXMLFile:i(74599),AudioFile:i(21097),AudioSpriteFile:i(89524),BinaryFile:i(85722),BitmapFontFile:i(97025),CompressedTextureFile:i(69559),CSSFile:i(16024),GLSLFile:i(47931),HTML5AudioFile:i(89749),HTMLFile:i(88470),HTMLTextureFile:i(14643),ImageFile:i(19550),JSONFile:i(518),MultiAtlasFile:i(59327),MultiScriptFile:i(99297),OBJFile:i(41846),PackFile:i(58610),PluginFile:i(48988),SceneFile:i(88423),ScenePluginFile:i(56812),ScriptFile:i(34328),SpriteSheetFile:i(85035),SVGFile:i(67397),TextFile:i(78776),TilemapCSVFile:i(49477),TilemapImpactFile:i(40807),TilemapJSONFile:i(56775),UnityAtlasFile:i(25771),VideoFile:i(33720),XMLFile:i(57318)}},57777:(t,e,i)=>{var n=i(23906),r=i(79291),s={Events:i(54899),FileTypes:i(64589),File:i(41299),FileTypesManager:i(74099),GetURL:i(98356),LoaderPlugin:i(74261),MergeXHRSettings:i(3374),MultiFile:i(26430),XHRLoader:i(84376),XHRSettings:i(92638)};s=r(!1,s,n),t.exports=s},53307:t=>{t.exports=function(t){for(var e=0,i=0;i<t.length;i++)e+=+t[i];return e/t.length}},85710:(t,e,i)=>{var n=i(6411);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},30976:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},87842:t=>{t.exports=function(t,e,i,n,r){var s=.5*(n-e),o=.5*(r-i),a=t*t;return(2*i-2*n+s+o)*(t*a)+(-3*i+3*n-2*s-o)*a+s*t+i}},26302:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.ceil(t*n)/n}},45319:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},39506:(t,e,i)=>{var n=i(36383);t.exports=function(t){return t*n.DEG_TO_RAD}},61241:t=>{t.exports=function(t,e){return Math.abs(t-e)}},38857:(t,e,i)=>{var n=i(45319),r=i(83419),s=i(37867),o=i(29747),a=new s,h=new r({initialize:function t(e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=n,this._order=r,this.onChangeCallback=o},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,n){return void 0===n&&(n=this._order),this._x=t,this._y=e,this._z=i,this._order=n,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),a.fromQuat(t),this.setFromRotationMatrix(a,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,s=r[0],o=r[4],a=r[8],h=r[1],l=r[5],u=r[9],c=r[2],d=r[6],p=r[10],f=0,m=0,g=0,v=.99999;switch(e){case"XYZ":m=Math.asin(n(a,-1,1)),Math.abs(a)<v?(f=Math.atan2(-u,p),g=Math.atan2(-o,s)):f=Math.atan2(d,l);break;case"YXZ":f=Math.asin(-n(u,-1,1)),Math.abs(u)<v?(m=Math.atan2(a,p),g=Math.atan2(h,l)):m=Math.atan2(-c,s);break;case"ZXY":f=Math.asin(n(d,-1,1)),Math.abs(d)<v?(m=Math.atan2(-c,p),g=Math.atan2(-o,l)):g=Math.atan2(h,s);break;case"ZYX":m=Math.asin(-n(c,-1,1)),Math.abs(c)<v?(f=Math.atan2(d,p),g=Math.atan2(h,s)):g=Math.atan2(-o,l);break;case"YZX":g=Math.asin(n(h,-1,1)),Math.abs(h)<v?(f=Math.atan2(-u,l),m=Math.atan2(-c,s)):m=Math.atan2(a,p);break;case"XZY":g=Math.asin(-n(o,-1,1)),Math.abs(o)<v?(f=Math.atan2(d,l),m=Math.atan2(a,s)):f=Math.atan2(-u,p)}return this._x=f,this._y=m,this._z=g,this._order=e,i&&this.onChangeCallback(this),this}});h.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],h.DefaultOrder="XYZ",t.exports=h},6411:t=>{t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},99472:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},77623:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.floor(t*n)/n}},62945:(t,e,i)=>{var n=i(45319);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},38265:t=>{t.exports=function(t,e){return t/e/1e3}},78702:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},94883:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},28915:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},94908:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},94434:(t,e,i)=>{var n=new(i(83419))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*s-o*h,c=-l*r+o*a,d=h*r-s*a,p=e*u+i*c+n*d;return p?(p=1/p,t[0]=u*p,t[1]=(-l*i+n*h)*p,t[2]=(o*i-n*s)*p,t[3]=c*p,t[4]=(l*e-n*a)*p,t[5]=(-o*e+n*r)*p,t[6]=d*p,t[7]=(-h*e+i*a)*p,t[8]=(s*e-i*r)*p,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=s*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*s,t[3]=o*a-r*l,t[4]=e*l-n*a,t[5]=n*r-e*o,t[6]=r*h-s*a,t[7]=i*a-e*h,t[8]=e*s-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*s-o*h)+i*(-l*r+o*a)+n*(h*r-s*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],p=c[1],f=c[2],m=c[3],g=c[4],v=c[5],y=c[6],x=c[7],E=c[8];return e[0]=d*i+p*s+f*h,e[1]=d*n+p*o+f*l,e[2]=d*r+p*a+f*u,e[3]=m*i+g*s+v*h,e[4]=m*n+g*o+v*l,e[5]=m*r+g*a+v*u,e[6]=y*i+x*s+E*h,e[7]=y*n+x*o+E*l,e[8]=y*r+x*a+E*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*s,e[1]=l*n+h*o,e[2]=l*r+h*a,e[3]=l*s-h*i,e[4]=l*o-h*n,e[5]=l*a-h*r,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,o=i+i,a=n+n,h=e*s,l=e*o,u=e*a,c=i*o,d=i*a,p=n*a,f=r*s,m=r*o,g=r*a,v=this.val;return v[0]=1-(c+p),v[3]=l+g,v[6]=u-m,v[1]=l-g,v[4]=1-(h+p),v[7]=d+f,v[2]=u+m,v[5]=d-f,v[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],p=e[10],f=e[11],m=e[12],g=e[13],v=e[14],y=e[15],x=n*h-r*a,E=n*l-s*a,T=n*u-o*a,_=r*l-s*h,w=r*u-o*h,S=s*u-o*l,b=c*g-d*m,C=c*v-p*m,A=c*y-f*m,R=d*v-p*g,M=d*y-f*g,L=p*y-f*v,O=x*L-E*M+T*R+_*A-w*C+S*b;return O?(O=1/O,i[0]=(h*L-l*M+u*R)*O,i[1]=(l*A-a*L-u*C)*O,i[2]=(a*M-h*A+u*b)*O,i[3]=(s*M-r*L-o*R)*O,i[4]=(n*L-s*A+o*C)*O,i[5]=(r*A-n*M-o*b)*O,i[6]=(g*S-v*w+y*_)*O,i[7]=(v*T-m*S-y*E)*O,i[8]=(m*w-g*T+y*x)*O,this):null}});t.exports=n},37867:(t,e,i)=>{var n=i(83419),r=i(25836),s=1e-6,o=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new o(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,n,r,s,o,a,h,l,u,c,d,p,f,m){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=n,g[4]=r,g[5]=s,g[6]=o,g[7]=a,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=d,g[13]=p,g[14]=f,g[15]=m,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var n=a.fromQuat(i).val,r=e.x,s=e.y,o=e.z;return this.setValues(n[0]*r,n[1]*r,n[2]*r,0,n[4]*s,n[5]*s,n[6]*s,0,n[8]*o,n[9]*o,n[10]*o,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],r=t[6],s=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=r,t[11]=t[14],t[12]=n,t[13]=s,t[14]=o,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],m=t[14],g=t[15],v=e*o-i*s,y=e*a-n*s,x=e*h-r*s,E=i*a-n*o,T=i*h-r*o,_=n*h-r*a,w=l*f-u*p,S=l*m-c*p,b=l*g-d*p,C=u*m-c*f,A=u*g-d*f,R=c*g-d*m,M=v*R-y*A+x*C+E*b-T*S+_*w;return M?(M=1/M,this.setValues((o*R-a*A+h*C)*M,(n*A-i*R-r*C)*M,(f*_-m*T+g*E)*M,(c*T-u*_-d*E)*M,(a*b-s*R-h*S)*M,(e*R-n*b+r*S)*M,(m*x-p*_-g*y)*M,(l*_-c*x+d*y)*M,(s*A-o*b+h*w)*M,(i*b-e*A-r*w)*M,(p*T-f*x+g*v)*M,(u*x-l*T-d*v)*M,(o*S-s*C-a*w)*M,(e*C-i*S+n*w)*M,(f*y-p*E-m*v)*M,(l*E-u*y+c*v)*M)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],m=t[14],g=t[15];return this.setValues(o*(c*g-d*m)-u*(a*g-h*m)+f*(a*d-h*c),-(i*(c*g-d*m)-u*(n*g-r*m)+f*(n*d-r*c)),i*(a*g-h*m)-o*(n*g-r*m)+f*(n*h-r*a),-(i*(a*d-h*c)-o*(n*d-r*c)+u*(n*h-r*a)),-(s*(c*g-d*m)-l*(a*g-h*m)+p*(a*d-h*c)),e*(c*g-d*m)-l*(n*g-r*m)+p*(n*d-r*c),-(e*(a*g-h*m)-s*(n*g-r*m)+p*(n*h-r*a)),e*(a*d-h*c)-s*(n*d-r*c)+l*(n*h-r*a),s*(u*g-d*f)-l*(o*g-h*f)+p*(o*d-h*u),-(e*(u*g-d*f)-l*(i*g-r*f)+p*(i*d-r*u)),e*(o*g-h*f)-s*(i*g-r*f)+p*(i*h-r*o),-(e*(o*d-h*u)-s*(i*d-r*u)+l*(i*h-r*o)),-(s*(u*m-c*f)-l*(o*m-a*f)+p*(o*c-a*u)),e*(u*m-c*f)-l*(i*m-n*f)+p*(i*c-n*u),-(e*(o*m-a*f)-s*(i*m-n*f)+p*(i*a-n*o)),e*(o*c-a*u)-s*(i*c-n*u)+l*(i*a-n*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],m=t[14],g=t[15];return(e*o-i*s)*(c*g-d*m)-(e*a-n*s)*(u*g-d*f)+(e*h-r*s)*(u*m-c*f)+(i*a-n*o)*(l*g-d*p)-(i*h-r*o)*(l*m-c*p)+(n*h-r*a)*(l*f-u*p)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],p=e[11],f=e[12],m=e[13],g=e[14],v=e[15],y=t.val,x=y[0],E=y[1],T=y[2],_=y[3];return e[0]=x*i+E*o+T*u+_*f,e[1]=x*n+E*a+T*c+_*m,e[2]=x*r+E*h+T*d+_*g,e[3]=x*s+E*l+T*p+_*v,x=y[4],E=y[5],T=y[6],_=y[7],e[4]=x*i+E*o+T*u+_*f,e[5]=x*n+E*a+T*c+_*m,e[6]=x*r+E*h+T*d+_*g,e[7]=x*s+E*l+T*p+_*v,x=y[8],E=y[9],T=y[10],_=y[11],e[8]=x*i+E*o+T*u+_*f,e[9]=x*n+E*a+T*c+_*m,e[10]=x*r+E*h+T*d+_*g,e[11]=x*s+E*l+T*p+_*v,x=y[12],E=y[13],T=y[14],_=y[15],e[12]=x*i+E*o+T*u+_*f,e[13]=x*n+E*a+T*c+_*m,e[14]=x*r+E*h+T*d+_*g,e[15]=x*s+E*l+T*p+_*v,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,n=e.val,r=i[0],s=i[4],o=i[8],a=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],p=i[6],f=i[10],m=i[14],g=i[3],v=i[7],y=i[11],x=i[15],E=n[0],T=n[4],_=n[8],w=n[12],S=n[1],b=n[5],C=n[9],A=n[13],R=n[2],M=n[6],L=n[10],O=n[14],P=n[3],F=n[7],I=n[11],D=n[15];return this.setValues(r*E+s*S+o*R+a*P,h*E+l*S+u*R+c*P,d*E+p*S+f*R+m*P,g*E+v*S+y*R+x*P,r*T+s*b+o*M+a*F,h*T+l*b+u*M+c*F,d*T+p*b+f*M+m*F,g*T+v*b+y*M+x*F,r*_+s*C+o*L+a*I,h*_+l*C+u*L+c*I,d*_+p*C+f*L+m*I,g*_+v*C+y*L+x*I,r*w+s*A+o*O+a*D,h*w+l*A+u*O+c*D,d*w+p*A+f*O+m*D,g*w+v*A+y*O+x*D)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,s=t.x,o=t.y,a=t.z,h=r*s,l=r*o;return this.setValues(h*s+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*s,0,h*a-n*o,l*a+n*s,r*a*a+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,r=e.y,o=e.z,a=Math.sqrt(n*n+r*r+o*o);if(Math.abs(a)<s)return this;n*=a=1/a,r*=a,o*=a;var h=Math.sin(t),l=Math.cos(t),u=1-l,c=i[0],d=i[1],p=i[2],f=i[3],m=i[4],g=i[5],v=i[6],y=i[7],x=i[8],E=i[9],T=i[10],_=i[11],w=i[12],S=i[13],b=i[14],C=i[15],A=n*n*u+l,R=r*n*u+o*h,M=o*n*u-r*h,L=n*r*u-o*h,O=r*r*u+l,P=o*r*u+n*h,F=n*o*u+r*h,I=r*o*u-n*h,D=o*o*u+l;return this.setValues(c*A+m*R+x*M,d*A+g*R+E*M,p*A+v*R+T*M,f*A+y*R+_*M,c*L+m*O+x*P,d*L+g*O+E*P,p*L+v*O+T*P,f*L+y*O+_*P,c*F+m*I+x*D,d*F+g*I+E*D,p*F+v*I+T*D,f*F+y*I+_*D,w,S,b,C)},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),r=e[4],s=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=r*n+h*i,e[5]=s*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-r*i,e[9]=l*n-s*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),r=e[0],s=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=r*n-h*i,e[1]=s*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=r*i+h*n,e[9]=s*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),r=e[0],s=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=r*n+h*i,e[1]=s*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-r*i,e[5]=l*n-s*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,o=i+i,a=n+n,h=r+r,l=i*o,u=i*a,c=i*h,d=n*a,p=n*h,f=r*h,m=s*o,g=s*a,v=s*h;return this.setValues(1-(d+f),u+v,c-g,0,u-v,1-(l+f),p+m,0,c+g,p-m,1-(l+d),0,e.x,e.y,e.z,1)},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,o=i+i,a=n+n,h=e*s,l=e*o,u=e*a,c=i*o,d=i*a,p=n*a,f=r*s,m=r*o,g=r*a;return this.setValues(1-(c+p),l+g,u-m,0,l-g,1-(h+p),d+f,0,u+m,d-f,1-(h+c),0,0,0,0,1)},frustum:function(t,e,i,n,r,s){var o=1/(e-t),a=1/(n-i),h=1/(r-s);return this.setValues(2*r*o,0,0,0,0,2*r*a,0,0,(e+t)*o,(n+i)*a,(s+r)*h,-1,0,0,s*r*2*h,0)},perspective:function(t,e,i,n){var r=1/Math.tan(t/2),s=1/(i-n);return this.setValues(r/e,0,0,0,0,r,0,0,0,0,(n+i)*s,-1,0,0,2*n*i*s,0)},perspectiveLH:function(t,e,i,n){return this.setValues(2*i/t,0,0,0,0,2*i/e,0,0,0,0,-n/(i-n),1,0,0,i*n/(i-n),0)},ortho:function(t,e,i,n,r,s){var o=t-e,a=i-n,h=r-s;return o=0===o?o:1/o,a=0===a?a:1/a,h=0===h?h:1/h,this.setValues(-2*o,0,0,0,0,-2*a,0,0,0,0,2*h,0,(t+e)*o,(n+i)*a,(s+r)*h,1)},lookAtRH:function(t,e,i){var n=this.val;return c.subVectors(t,e),0===c.getLengthSquared()&&(c.z=1),c.normalize(),l.crossVectors(i,c),0===l.getLengthSquared()&&(1===Math.abs(i.z)?c.x+=1e-4:c.z+=1e-4,c.normalize(),l.crossVectors(i,c)),l.normalize(),u.crossVectors(c,l),n[0]=l.x,n[1]=l.y,n[2]=l.z,n[4]=u.x,n[5]=u.y,n[6]=u.z,n[8]=c.x,n[9]=c.y,n[10]=c.z,this},lookAt:function(t,e,i){var n=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(n-u)<s&&Math.abs(r-c)<s&&Math.abs(o-d)<s)return this.identity();var p=n-u,f=r-c,m=o-d,g=1/Math.sqrt(p*p+f*f+m*m),v=h*(m*=g)-l*(f*=g),y=l*(p*=g)-a*m,x=a*f-h*p;(g=Math.sqrt(v*v+y*y+x*x))?(v*=g=1/g,y*=g,x*=g):(v=0,y=0,x=0);var E=f*x-m*y,T=m*v-p*x,_=p*y-f*v;return(g=Math.sqrt(E*E+T*T+_*_))?(E*=g=1/g,T*=g,_*=g):(E=0,T=0,_=0),this.setValues(v,E,p,0,y,T,f,0,x,_,m,0,-(v*n+y*r+x*o),-(E*n+T*r+_*o),-(p*n+f*r+m*o),1)},yawPitchRoll:function(t,e,i){this.zero(),a.zero(),h.zero();var n=this.val,r=a.val,s=h.val,o=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=o,n[4]=-o,n[5]=l,o=Math.sin(e),l=Math.cos(e),r[0]=1,r[15]=1,r[5]=l,r[10]=l,r[9]=-o,r[6]=o,o=Math.sin(t),l=Math.cos(t),s[5]=1,s[15]=1,s[0]=l,s[2]=-o,s[8]=o,s[10]=l,this.multiplyLocal(a),this.multiplyLocal(h),this},setWorldMatrix:function(t,e,i,n,r){return this.yawPitchRoll(t.y,t.x,t.z),a.scaling(i.x,i.y,i.z),h.xyz(e.x,e.y,e.z),this.multiplyLocal(a),this.multiplyLocal(h),n&&this.multiplyLocal(n),r&&this.multiplyLocal(r),this},multiplyToMat4:function(t,e){var i=this.val,n=t.val,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=i[6],c=i[7],d=i[8],p=i[9],f=i[10],m=i[11],g=i[12],v=i[13],y=i[14],x=i[15],E=n[0],T=n[1],_=n[2],w=n[3],S=n[4],b=n[5],C=n[6],A=n[7],R=n[8],M=n[9],L=n[10],O=n[11],P=n[12],F=n[13],I=n[14],D=n[15];return e.setValues(E*r+T*h+_*d+w*g,T*s+T*l+_*p+w*v,_*o+T*u+_*f+w*y,w*a+T*c+_*m+w*x,S*r+b*h+C*d+A*g,S*s+b*l+C*p+A*v,S*o+b*u+C*f+A*y,S*a+b*c+C*m+A*x,R*r+M*h+L*d+O*g,R*s+M*l+L*p+O*v,R*o+M*u+L*f+O*y,R*a+M*c+L*m+O*x,P*r+F*h+I*d+D*g,P*s+F*l+I*p+D*v,P*o+F*u+I*f+D*y,P*a+F*c+I*m+D*x)},fromRotationXYTranslation:function(t,e,i){var n=e.x,r=e.y,s=e.z,o=Math.sin(t.x),a=Math.cos(t.x),h=Math.sin(t.y),l=Math.cos(t.y),u=n,c=r,d=s,p=-o,f=0-p*h,m=0-a*h,g=p*l,v=a*l;return i||(u=l*n+h*s,c=f*n+a*r+g*s,d=m*n+o*r+v*s),this.setValues(l,f,m,0,0,a,o,0,h,g,v,0,u,c,d,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,n))}}),a=new o,h=new o,l=new r,u=new r,c=new r;t.exports=o},86883:t=>{t.exports=function(t,e,i){return Math.min(t+e,i)}},50040:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},37204:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},65201:t=>{t.exports=function(t,e,i,n){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==n?(r=(n-t)/(n-i))<0&&(r=0):r=1:r<0&&(r=0),r}},15746:(t,e,i)=>{var n=i(83419),r=i(94434),s=i(29747),o=i(25836),a=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new o(1,0,0),c=new o(0,1,0),d=new o,p=new r,f=new n({initialize:function(t,e,i,n){this.onChangeCallback=s,this.set(t,e,i,n)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,n,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=n||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=n*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z,s=this.w;return this.set(i+e*(t.x-i),n+e*(t.y-n),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(u).cross(t).length()<a&&d.copy(c).cross(t),d.normalize(),this.setAxisAngle(d,Math.PI)):i>.999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=p.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(p).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,s=t.x,o=t.y,a=t.z,h=t.w;return this.set(e*h+r*s+i*a-n*o,i*h+r*o+n*s-e*a,n*h+r*a+e*o-i*s,r*h-e*s-i*o-n*a)},slerp:function(t,e){var i=this.x,n=this.y,r=this.z,s=this.w,o=t.x,h=t.y,l=t.z,u=t.w,c=i*o+n*h+r*l+s*u;c<0&&(c=-c,o=-o,h=-h,l=-l,u=-u);var d=1-e,p=e;if(1-c>a){var f=Math.acos(c),m=Math.sin(f);d=Math.sin((1-e)*f)/m,p=Math.sin(e*f)/m}return this.set(d*i+p*o,d*n+p*h,d*r+p*l,d*s+p*u)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n,s=r?1/r:0;return this.set(-t*s,-e*s,-i*s,n*s)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o+r*s,i*o+n*s,n*o-i*s,r*o-e*s)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o-n*s,i*o+r*s,n*o+e*s,r*o-i*s)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o+i*s,i*o-e*s,n*o+r*s,r*o-n*s)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,n=t.y/2,r=t.z/2,s=Math.cos(i),o=Math.cos(n),a=Math.cos(r),h=Math.sin(i),l=Math.sin(n),u=Math.sin(r);switch(t.order){case"XYZ":this.set(h*o*a+s*l*u,s*l*a-h*o*u,s*o*u+h*l*a,s*o*a-h*l*u,e);break;case"YXZ":this.set(h*o*a+s*l*u,s*l*a-h*o*u,s*o*u-h*l*a,s*o*a+h*l*u,e);break;case"ZXY":this.set(h*o*a-s*l*u,s*l*a+h*o*u,s*o*u+h*l*a,s*o*a-h*l*u,e);break;case"ZYX":this.set(h*o*a-s*l*u,s*l*a+h*o*u,s*o*u-h*l*a,s*o*a+h*l*u,e);break;case"YZX":this.set(h*o*a+s*l*u,s*l*a+h*o*u,s*o*u-h*l*a,s*o*a-h*l*u,e);break;case"XZY":this.set(h*o*a-s*l*u,s*l*a-h*o*u,s*o*u+h*l*a,s*o*a+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,n=i[0],r=i[4],s=i[8],o=i[1],a=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=n+a+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(s-l)*e,(o-r)*e,.25/e)):n>a&&n>c?(e=2*Math.sqrt(1+n-a-c),this.set(.25*e,(r+o)/e,(s+l)/e,(u-h)/e)):a>c?(e=2*Math.sqrt(1+a-n-c),this.set((r+o)/e,.25*e,(h+u)/e,(s-l)/e)):(e=2*Math.sqrt(1+c-n-a),this.set((s+l)/e,(h+u)/e,.25*e,(o-r)/e)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var s=h[r],o=h[s];e=Math.sqrt(i[3*r+r]-i[3*s+s]-i[3*o+o]+1),l[r]=.5*e,e=.5/e,l[s]=(i[3*s+r]+i[3*r+s])*e,l[o]=(i[3*o+r]+i[3*r+o])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*o+s]-i[3*s+o])*e}return this.onChangeCallback(this),this}});t.exports=f},43396:(t,e,i)=>{var n=i(36383);t.exports=function(t){return t*n.RAD_TO_DEG}},74362:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},60706:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,r=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=n*e,t}},67421:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},36305:t=>{t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},11520:t=>{t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),o=t.x-e,a=t.y-i;return t.x=o*r-a*s+e,t.y=o*s+a*r+i,t}},1163:t=>{t.exports=function(t,e,i,n,r){var s=n+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},70336:t=>{t.exports=function(t,e,i,n,r){return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},72678:(t,e,i)=>{var n=i(25836),r=i(37867),s=i(15746),o=new r,a=new s,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},2284:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},41013:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},16922:t=>{t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var r=[],s=[],o=0;o<t;o++)e+=(i-=e*n)*n,r[o]=i,s[o]=e;return{sin:s,cos:r,length:t}}},7602:t=>{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},54261:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},44408:(t,e,i)=>{var n=i(26099);t.exports=function(t,e,i,r){void 0===r&&(r=new n);var s=0,o=0;return t>0&&t<=e*i&&(s=t>e-1?t-(o=Math.floor(t/e))*e:t),r.set(s,o)}},85955:(t,e,i)=>{var n=i(26099);t.exports=function(t,e,i,r,s,o,a,h){void 0===h&&(h=new n);var l=Math.sin(s),u=Math.cos(s),c=u*o,d=l*o,p=-l*a,f=u*a,m=1/(c*f+p*-d);return h.x=f*m*t+-p*m*e+(r*p-i*f)*m,h.y=c*m*e+-d*m*t+(-r*c+i*d)*m,h}},26099:(t,e,i)=>{var n=i(83419),r=i(43855),s=new n({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},25836:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new n(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=n*a-r*o,this.y=r*s-i*a,this.z=i*o-n*s,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z;return this.x=i*o-n*s,this.y=n*r-e*o,this.z=e*s-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*s,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*s,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*s,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+n*r[6],this.y=e*r[1]+i*r[4]+n*r[7],this.z=e*r[2]+i*r[5]+n*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12],this.y=r[1]*e+r[5]*i+r[9]*n+r[13],this.z=r[2]*e+r[6]*i+r[10]*n+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=e*r[0]+i*r[4]+n*r[8]+r[12],o=e*r[1]+i*r[5]+n*r[9]+r[13],a=e*r[2]+i*r[6]+n*r[10]+r[14],h=e*r[3]+i*r[7]+n*r[11]+r[15];return this.x=s/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*n-o*i,l=a*i+o*e-r*n,u=a*n+r*i-s*e,c=-r*e-s*i-o*n;return this.x=h*a+c*-r+l*-o-u*-s,this.y=l*a+c*-s+u*-r-h*-o,this.z=u*a+c*-o+h*-s-l*-r,this},project:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=r[0],o=r[1],a=r[2],h=r[3],l=r[4],u=r[5],c=r[6],d=r[7],p=r[8],f=r[9],m=r[10],g=r[11],v=r[12],y=r[13],x=r[14],E=1/(e*h+i*d+n*g+r[15]);return this.x=(e*s+i*l+n*p+v)*E,this.y=(e*o+i*u+n*f+y)*E,this.z=(e*a+i*c+n*m+x)*E,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,o=this.x-i,a=s-this.y-1-n,h=this.z;return this.x=2*o/r-1,this.y=2*a/s-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},61369:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+n*n+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12]*r,this.y=s[1]*e+s[5]*i+s[9]*n+s[13]*r,this.z=s[2]*e+s[6]*i+s[10]*n+s[14]*r,this.w=s[3]*e+s[7]*i+s[11]*n+s[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*n-o*i,l=a*i+o*e-r*n,u=a*n+r*i-s*e,c=-r*e-s*i-o*n;return this.x=h*a+c*-r+l*-o-u*-s,this.y=l*a+c*-s+u*-r-h*-o,this.z=u*a+c*-o+h*-s-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},60417:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},15994:t=>{t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},31040:t=>{t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},55495:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},128:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},41273:t=>{t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},1432:(t,e,i)=>{var n=i(36383);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},12407:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},53993:(t,e,i)=>{var n=i(99472);t.exports=function(){return n(-Math.PI,Math.PI)}},86564:(t,e,i)=>{var n=i(99472);t.exports=function(){return n(-180,180)}},90154:(t,e,i)=>{var n=i(12407);t.exports=function(t){return n(t+Math.PI)}},48736:(t,e,i)=>{var n=i(36383);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e<t?e+=n.PI2:e-=n.PI2),e>t?t+=i:e<t&&(t-=i))),t}},61430:t=>{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},86554:(t,e,i)=>{var n=i(15994);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},30954:(t,e,i)=>{var n=i(15994);t.exports=function(t){return n(t,-180,180)}},25588:(t,e,i)=>{t.exports={Between:i(31040),BetweenPoints:i(55495),BetweenPointsY:i(128),BetweenY:i(41273),CounterClockwise:i(1432),Normalize:i(12407),Random:i(53993),RandomDegrees:i(86564),Reverse:i(90154),RotateTo:i(48736),ShortestBetween:i(61430),Wrap:i(86554),WrapDegrees:i(30954)}},36383:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},20339:t=>{t.exports=function(t,e,i,n){var r=t-i,s=e-n;return Math.sqrt(r*r+s*s)}},52816:t=>{t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},64559:t=>{t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},82340:t=>{t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},14390:t=>{t.exports=function(t,e,i,n,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(n-e,r))}},2243:t=>{t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},89774:t=>{t.exports=function(t,e,i,n){var r=t-i,s=e-n;return r*r+s*s}},50994:(t,e,i)=>{t.exports={Between:i(20339),BetweenPoints:i(52816),BetweenPointsSquared:i(64559),Chebyshev:i(82340),Power:i(14390),Snake:i(2243),Squared:i(89774)}},62640:(t,e,i)=>{var n=i(54178),r=i(41521),s=i(79980),o=i(85433),a=i(99140),h=i(48857),l=i(81596),u=i(59133),c=i(98516),d=i(35248),p=i(82500),f=i(49752);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:p.Out,Expo:h.Out,Circ:s.Out,Elastic:a.Out,Back:n.Out,Bounce:r.Out,Stepped:f,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":p.In,"Expo.easeIn":h.In,"Circ.easeIn":s.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":r.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":p.Out,"Expo.easeOut":h.Out,"Circ.easeOut":s.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":r.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":p.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":s.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":r.InOut}},1639:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},50099:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},41286:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},54178:(t,e,i)=>{t.exports={In:i(1639),Out:i(41286),InOut:i(50099)}},59590:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},41788:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},69905:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},41521:(t,e,i)=>{t.exports={In:i(59590),Out:i(69905),InOut:i(41788)}},91861:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},4177:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},57512:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},79980:(t,e,i)=>{t.exports={In:i(91861),Out:i(57512),InOut:i(4177)}},51150:t=>{t.exports=function(t){return t*t*t}},82820:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},35033:t=>{t.exports=function(t){return--t*t*t+1}},85433:(t,e,i)=>{t.exports={In:i(51150),Out:i(35033),InOut:i(82820)}},69965:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},50665:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},7744:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},99140:(t,e,i)=>{t.exports={In:i(69965),Out:i(7744),InOut:i(50665)}},24590:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},87844:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},89433:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},48857:(t,e,i)=>{t.exports={In:i(24590),Out:i(89433),InOut:i(87844)}},48820:(t,e,i)=>{t.exports={Back:i(54178),Bounce:i(41521),Circular:i(79980),Cubic:i(85433),Elastic:i(99140),Expo:i(48857),Linear:i(81596),Quadratic:i(59133),Quartic:i(98516),Quintic:i(35248),Sine:i(82500),Stepped:i(49752)}},7147:t=>{t.exports=function(t){return t}},81596:(t,e,i)=>{t.exports=i(7147)},34826:t=>{t.exports=function(t){return t*t}},20544:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},92029:t=>{t.exports=function(t){return t*(2-t)}},59133:(t,e,i)=>{t.exports={In:i(34826),Out:i(92029),InOut:i(20544)}},64413:t=>{t.exports=function(t){return t*t*t*t}},78137:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},45840:t=>{t.exports=function(t){return 1- --t*t*t*t}},98516:(t,e,i)=>{t.exports={In:i(64413),Out:i(45840),InOut:i(78137)}},87745:t=>{t.exports=function(t){return t*t*t*t*t}},16509:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},17868:t=>{t.exports=function(t){return--t*t*t*t*t+1}},35248:(t,e,i)=>{t.exports={In:i(87745),Out:i(17868),InOut:i(16509)}},80461:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},34025:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},52768:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},82500:(t,e,i)=>{t.exports={In:i(80461),Out:i(52768),InOut:i(34025)}},72251:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},49752:(t,e,i)=>{t.exports=i(72251)},75698:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},43855:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)<i}},25777:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},5470:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},94977:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t<e+i}},48379:(t,e,i)=>{t.exports={Ceil:i(75698),Equal:i(43855),Floor:i(25777),GreaterThan:i(5470),LessThan:i(94977)}},75508:(t,e,i)=>{var n=i(36383),r=i(79291),s={Angle:i(25588),Distance:i(50994),Easing:i(48820),Fuzzy:i(48379),Interpolation:i(38289),Pow2:i(49001),Snap:i(73697),RandomDataGenerator:i(28453),Average:i(53307),Bernstein:i(85710),Between:i(30976),CatmullRom:i(87842),CeilTo:i(26302),Clamp:i(45319),DegToRad:i(39506),Difference:i(61241),Euler:i(38857),Factorial:i(6411),FloatBetween:i(99472),FloorTo:i(77623),FromPercent:i(62945),GetSpeed:i(38265),IsEven:i(78702),IsEvenStrict:i(94883),Linear:i(28915),LinearXY:i(94908),MaxAdd:i(86883),Median:i(50040),MinSub:i(37204),Percent:i(65201),RadToDeg:i(43396),RandomXY:i(74362),RandomXYZ:i(60706),RandomXYZW:i(67421),Rotate:i(36305),RotateAround:i(11520),RotateAroundDistance:i(1163),RotateTo:i(70336),RoundAwayFromZero:i(2284),RoundTo:i(41013),SinCosTableGenerator:i(16922),SmootherStep:i(54261),SmoothStep:i(7602),ToXY:i(44408),TransformXY:i(85955),Within:i(60417),Wrap:i(15994),Vector2:i(26099),Vector3:i(25836),Vector4:i(61369),Matrix3:i(94434),Matrix4:i(37867),Quaternion:i(15746),RotateVec3:i(72678)};s=r(!1,s,n),t.exports=s},89318:(t,e,i)=>{var n=i(85710);t.exports=function(t,e){for(var i=0,r=t.length-1,s=0;s<=r;s++)i+=Math.pow(1-e,r-s)*Math.pow(e,s)*t[s]*n(r,s);return i}},77259:(t,e,i)=>{var n=i(87842);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return t[0]===t[i]?(e<0&&(s=Math.floor(r=i*(1+e))),n(r-s,t[(s-1+i)%i],t[s],t[(s+1)%i],t[(s+2)%i])):e<0?t[0]-(n(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(n(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(r-s,t[s?s-1:0],t[s],t[i<s+1?i:s+1],t[i<s+2?i:s+2])}},36316:t=>{t.exports=function(t,e,i,n,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,r)}},28392:(t,e,i)=>{var n=i(28915);t.exports=function(t,e){var i=t.length-1,r=i*e,s=Math.floor(r);return e<0?n(t[0],t[1],r):e>1?n(t[i],t[i-1],i-r):n(t[s],t[s+1>i?i:s+1],r-s)}},32112:t=>{t.exports=function(t,e,i,n){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}},47235:(t,e,i)=>{var n=i(7602);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},50178:(t,e,i)=>{var n=i(54261);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},38289:(t,e,i)=>{t.exports={Bezier:i(89318),CatmullRom:i(77259),CubicBezier:i(36316),Linear:i(28392),QuadraticBezier:i(32112),SmoothStep:i(47235),SmootherStep:i(50178)}},98439:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<<Math.ceil(e)}},50030:t=>{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},81230:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},49001:(t,e,i)=>{t.exports={GetNext:i(98439),IsSize:i(50030),IsValue:i(81230)}},28453:(t,e,i)=>{var n=new(i(83419))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n<t.length;n++)e=.02519603282416938*(i+=t.charCodeAt(n)),e-=i=e>>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e<t.length&&null!=t[e];e++){var i=t[e];this.s0-=this.hash(i),this.s0+=~~(this.s0<0),this.s1-=this.hash(i),this.s1+=~~(this.s1<0),this.s2-=this.hash(i),this.s2+=~~(this.s2<0)}},integer:function(){return 4294967296*this.rnd()},frac:function(){return this.rnd()+11102230246251565e-32*(2097152*this.rnd()|0)},real:function(){return this.integer()+this.frac()},integerInRange:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},between:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},realInRange:function(t,e){return this.frac()*(e-t)+t},normal:function(){return 1-2*this.frac()},uuid:function(){var t="",e="";for(e=t="";t++<36;e+=~t%5|3*t&4?(15^t?8^this.frac()*(20^t?16:4):4).toString(16):"-");return e},pick:function(t){return t[this.integerInRange(0,t.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(t){return t[~~(Math.pow(this.frac(),2)*(t.length-.5)+.5)]},timestamp:function(t,e){return this.realInRange(t||9466848e5,e||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(t){return"string"==typeof t&&t.match(/^!rnd/)&&(t=t.split(","),this.c=parseFloat(t[1]),this.s0=parseFloat(t[2]),this.s1=parseFloat(t[3]),this.s2=parseFloat(t[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},63448:t=>{t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},56583:t=>{t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},77720:t=>{t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},73697:(t,e,i)=>{t.exports={Ceil:i(63448),Floor:i(56583),To:i(77720)}},85454:(t,e,i)=>{i(63595);var n=i(8054),r=i(79291),s={Actions:i(61061),Animations:i(60421),BlendModes:i(10312),Cache:i(83388),Cameras:i(26638),Core:i(42857),Class:i(83419),Create:i(15822),Curves:i(25410),Data:i(44965),Display:i(27460),DOM:i(84902),Events:i(93055),FX:i(66064),Game:i(50127),GameObjects:i(77856),Geom:i(55738),Input:i(14350),Loader:i(57777),Math:i(75508),Physics:i(44563),Plugins:i(18922),Renderer:i(36909),Scale:i(93364),ScaleModes:i(29795),Scene:i(97482),Scenes:i(62194),Structs:i(41392),Textures:i(27458),Tilemaps:i(62501),Time:i(90291),Tweens:i(43066),Utils:i(91799)};s.Sound=i(23717),s.FacebookInstantGamesPlugin=i(25366),s=r(!1,s,n),t.exports=s,i.g.Phaser=s},71289:(t,e,i)=>{var n=i(83419),r=i(92209),s=i(88571),o=new n({Extends:s,Mixins:[r.Acceleration,r.Angular,r.Bounce,r.Collision,r.Debug,r.Drag,r.Enable,r.Friction,r.Gravity,r.Immovable,r.Mass,r.Pushable,r.Size,r.Velocity],initialize:function(t,e,i,n,r){s.call(this,t,e,i,n,r),this.body=null}});t.exports=o},86689:(t,e,i)=>{var n=i(83419),r=i(39506),s=i(20339),o=i(89774),a=i(66022),h=i(95540),l=i(46975),u=i(72441),c=i(47956),d=i(37277),p=i(44594),f=i(26099),m=i(82248),g=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,t.sys.events.once(p.BOOT,this.boot,this),t.sys.events.on(p.START,this.start,this)},boot:function(){this.world=new m(this.scene,this.config),this.add=new a(this.world),this.systems.events.once(p.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new m(this.scene,this.config),this.add=new a(this.world));var t=this.systems.events;h(this.config,"customUpdate",!1)||t.on(p.UPDATE,this.world.update,this.world),t.on(p.POST_UPDATE,this.world.postUpdate,this.world),t.once(p.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(p.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(p.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return l(h(e,"arcade",{}),h(t,"arcade",{}))},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i),this.world.collideObjects(t,e,i,n,r,!0)},collide:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i),this.world.collideObjects(t,e,i,n,r,!1)},collideTiles:function(t,e,i,n,r){return this.world.collideTiles(t,e,i,n,r)},overlapTiles:function(t,e,i,n,r){return this.world.overlapTiles(t,e,i,n,r)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,n,r,s){void 0===n&&(n=60);var o=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(o,n),void 0!==r&&void 0!==s&&t.body.maxVelocity.set(r,s),o},accelerateToObject:function(t,e,i,n,r){return this.accelerateTo(t,e.x,e.y,i,n,r)},closest:function(t,e){e||(e=this.world.bodies.entries);for(var i=Number.MAX_VALUE,n=null,r=t.x,s=t.y,a=e.length,h=0;h<a;h++){var l=e[h],u=l.body||l;if(t!==l&&t!==u&&t!==u.gameObject&&t!==u.center){var c=o(r,s,u.center.x,u.center.y);c<i&&(n=l,i=c)}}return n},furthest:function(t,e){e||(e=this.world.bodies.entries);for(var i=-1,n=null,r=t.x,s=t.y,a=e.length,h=0;h<a;h++){var l=e[h],u=l.body||l;if(t!==l&&t!==u&&t!==u.gameObject&&t!==u.center){var c=o(r,s,u.center.x,u.center.y);c>i&&(n=l,i=c)}}return n},moveTo:function(t,e,i,n,r){void 0===n&&(n=60),void 0===r&&(r=0);var o=Math.atan2(i-t.y,e-t.x);return r>0&&(n=s(t.x,t.y,e,i)/(r/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new f),i.setToPolar(r(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new f),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,r,s){return c(this.world,t,e,i,n,r,s)},overlapCirc:function(t,e,i,n,r){return u(this.world,t,e,i,n,r)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(p.UPDATE,this.world.update,this.world),t.off(p.POST_UPDATE,this.world.postUpdate,this.world),t.off(p.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(p.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",g,"arcadePhysics"),t.exports=g},13759:(t,e,i)=>{var n=i(83419),r=i(92209),s=i(68287),o=new n({Extends:s,Mixins:[r.Acceleration,r.Angular,r.Bounce,r.Collision,r.Debug,r.Drag,r.Enable,r.Friction,r.Gravity,r.Immovable,r.Mass,r.Pushable,r.Size,r.Velocity],initialize:function(t,e,i,n,r){s.call(this,t,e,i,n,r),this.body=null}});t.exports=o},37742:(t,e,i)=>{var n=i(83419),r=i(78389),s=i(37747),o=i(63012),a=i(43396),h=i(87841),l=i(37303),u=i(95829),c=i(26099),d=new n({Mixins:[r],initialize:function(t,e){var i=64,n=64,r=void 0!==e;r&&e.displayWidth&&(i=e.displayWidth,n=e.displayHeight),r||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=r?e:void 0,this.isBody=!0,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new c,this.position=new c(e.x-e.scaleX*e.displayOriginX,e.y-e.scaleY*e.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=n,this.sourceWidth=i,this.sourceHeight=n,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(n/2),this.center=new c(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new c,this.newVelocity=new c,this.deltaMax=new c,this.acceleration=new c,this.allowDrag=!0,this.drag=new c,this.allowGravity=!0,this.gravity=new c,this.bounce=new c,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new c(1e4,1e4),this.maxSpeed=-1,this.friction=new c(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=s.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new c(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=u(!1),this.touching=u(!0),this.wasTouching=u(!0),this.blocked=u(!0),this.syncBounds=!1,this.physicsType=s.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new h,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);e.x=i.tx,e.y=i.ty,e.rotation=a(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY;var n=!1;if(this.syncBounds){var r=t.getBounds(this._bounds);this.width=r.width,this.height=r.height,n=!0}else{var s=Math.abs(e.scaleX),o=Math.abs(e.scaleY);this._sx===s&&this._sy===o||(this.width=this.sourceWidth*s,this.height=this.sourceHeight*o,this._sx=s,this._sy=o,n=!0)}n&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var t=this.transform;this.position.x=t.x+t.scaleX*(this.offset.x-t.displayOriginX),this.position.y=t.y+t.scaleY*(this.offset.y-t.displayOriginY),this.updateCenter()},resetFlags:function(t){void 0===t&&(t=!1);var e=this.wasTouching,i=this.touching,n=this.blocked;t?u(!0,e):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),u(!0,i),u(!0,n),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){if(t&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var i=this.position;this.prev.x=i.x,this.prev.y=i.y,this.prevFrame.x=i.x,this.prevFrame.y=i.y}t&&this.update(e)},update:function(t){var e=this.prev,i=this.position,n=this.velocity;if(e.set(i.x,i.y),!this.moves)return this._dx=i.x-e.x,void(this._dy=i.y-e.y);if(this.directControl){var r=this.autoFrame;n.set((i.x-r.x)/t,(i.y-r.y)/t),this.world.updateMotion(this,t),this._dx=i.x-r.x,this._dy=i.y-r.y}else this.world.updateMotion(this,t),this.newVelocity.set(n.x*t,n.y*t),i.add(this.newVelocity),this._dx=i.x-e.x,this._dy=i.y-e.y;var s=n.x,a=n.y;if(this.updateCenter(),this.angle=Math.atan2(a,s),this.speed=Math.sqrt(s*s+a*a),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var h=this.blocked;this.world.emit(o.WORLD_BOUNDS,this,h.up,h.down,h.left,h.right)}},postUpdate:function(){var t=this.position,e=t.x-this.prevFrame.x,i=t.y-this.prevFrame.y,n=this.gameObject;if(this.moves){var r=this.deltaMax.x,o=this.deltaMax.y;0!==r&&0!==e&&(e<0&&e<-r?e=-r:e>0&&e>r&&(e=r)),0!==o&&0!==i&&(i<0&&i<-o?i=-o:i>0&&i>o&&(i=o)),n&&(n.x+=e,n.y+=i)}e<0?this.facing=s.FACING_LEFT:e>0&&(this.facing=s.FACING_RIGHT),i<0?this.facing=s.FACING_UP:i>0&&(this.facing=s.FACING_DOWN),this.allowRotation&&n&&(n.angle+=this.deltaZ()),this._tx=e,this._ty=i,this.autoFrame.set(t.x,t.y)},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.velocity,i=this.blocked,n=this.customBoundsRectangle,r=this.world.checkCollision,s=this.worldBounce?-this.worldBounce.x:-this.bounce.x,o=this.worldBounce?-this.worldBounce.y:-this.bounce.y,a=!1;return t.x<n.x&&r.left?(t.x=n.x,e.x*=s,i.left=!0,a=!0):this.right>n.right&&r.right&&(t.x=n.right-this.width,e.x*=s,i.right=!0,a=!0),t.y<n.y&&r.up?(t.y=n.y,e.y*=o,i.up=!0,a=!0):this.bottom>n.bottom&&r.down&&(t.y=n.bottom-this.height,e.y*=o,i.down=!0,a=!0),a&&(this.blocked.none=!1,this.updateCenter()),a},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setGameObject:function(t,e){return void 0===e&&(e=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=t,t.body&&(t.body=this),this.setSize(),this.world.add(this),this.enable=e,this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(n&&(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight)),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n&&n.getCenter){var r=(n.width-t)/2,s=(n.height-e)/2;this.offset.set(r,s)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i&&(i.setPosition(t,e),this.rotation=i.angle,this.preRotation=i.angle);var n=this.position;i&&i.getTopLeft?i.getTopLeft(n):n.set(t,e),this.prev.copy(n),this.prevFrame.copy(n),this.autoFrame.copy(n),i&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:l(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(t){return void 0===t&&(t=!0),this.directControl=t,this},setCollideWorldBounds:function(t,e,i,n){void 0===t&&(t=!0),this.collideWorldBounds=t;var r=void 0!==e,s=void 0!==i;return(r||s)&&(this.worldBounce||(this.worldBounce=new c),r&&(this.worldBounce.x=e),s&&(this.worldBounce.y=i)),void 0!==n&&(this.onWorldBounds=n),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){return this.setVelocity(t,this.velocity.y)},setVelocityY:function(t){return this.setVelocity(this.velocity.x,t)},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxVelocityX:function(t){return this.maxVelocity.x=t,this},setMaxVelocityY:function(t){return this.maxVelocity.y=t,this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setSlideFactor:function(t,e){return this.slideFactor.set(t,e),this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDamping:function(t){return this.useDamping=t,this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},processX:function(t,e,i,n){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e*this.slideFactor.x);var r=this.blocked;i&&(r.left=!0,r.none=!1),n&&(r.right=!0,r.none=!1)},processY:function(t,e,i,n){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e*this.slideFactor.y);var r=this.blocked;i&&(r.up=!0,r.none=!1),n&&(r.down=!0,r.none=!1)},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=d},79342:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e,i,n,r,s,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=r,this.processCallback=s,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},66022:(t,e,i)=>{var n=i(71289),r=i(13759),s=i(37742),o=i(83419),a=i(37747),h=i(60758),l=i(72624),u=i(71464),c=new o({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,n,r){return this.world.addCollider(t,e,i,n,r)},overlap:function(t,e,i,n,r){return this.world.addOverlap(t,e,i,n,r)},existing:function(t,e){var i=e?a.STATIC_BODY:a.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,r){var s=new n(this.scene,t,e,i,r);return this.sys.displayList.add(s),this.world.enableBody(s,a.STATIC_BODY),s},image:function(t,e,i,r){var s=new n(this.scene,t,e,i,r);return this.sys.displayList.add(s),this.world.enableBody(s,a.DYNAMIC_BODY),s},staticSprite:function(t,e,i,n){var s=new r(this.scene,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),this.world.enableBody(s,a.STATIC_BODY),s},sprite:function(t,e,i,n){var s=new r(this.scene,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),this.world.enableBody(s,a.DYNAMIC_BODY),s},staticGroup:function(t,e){return this.sys.updateList.add(new u(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},body:function(t,e,i,n){var r=new s(this.world);return r.position.set(t,e),i&&n&&r.setSize(i,n),this.world.add(r,a.DYNAMIC_BODY),r},staticBody:function(t,e,i,n){var r=new l(this.world);return r.position.set(t,e),i&&n&&r.setSize(i,n),this.world.add(r,a.STATIC_BODY),r},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=c},79599:t=>{t.exports=function(t){var e=0;if(Array.isArray(t))for(var i=0;i<t.length;i++)e|=t[i];else e=t;return e}},64897:(t,e,i)=>{var n=i(37747);t.exports=function(t,e,i,r){var s=0,o=t.deltaAbsX()+e.deltaAbsX()+r;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(s=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dx<e._dx&&(-(s=t.x-e.width-e.x)>o&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?s=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=s,e.overlapX=s,s}},45170:(t,e,i)=>{var n=i(37747);t.exports=function(t,e,i,r){var s=0,o=t.deltaAbsY()+e.deltaAbsY()+r;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(s=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dy<e._dy&&(-(s=t.y-e.bottom)>o&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?s=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==n.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==n.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=s,e.overlapY=s,s}},60758:(t,e,i)=>{var n=i(13759),r=i(83419),s=i(78389),o=i(37747),a=i(95540),h=i(26479),l=i(41212),u=new r({Extends:h,Mixins:[s],initialize:function(t,e,i,r){if(i||r)if(l(i))r=i,i=null,r.internalCreateCallback=this.createCallbackHandler,r.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(i)&&l(i[0])){var s=this;i.forEach((function(t){t.internalCreateCallback=s.createCallbackHandler,t.internalRemoveCallback=s.removeCallbackHandler,t.classType=a(t,"classType",n)})),r=null}else r={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else r={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=t,r&&(r.classType=a(r,"classType",n)),this.physicsType=o.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this.defaults={setCollideWorldBounds:a(r,"collideWorldBounds",!1),setBoundsRectangle:a(r,"customBoundsRectangle",null),setAccelerationX:a(r,"accelerationX",0),setAccelerationY:a(r,"accelerationY",0),setAllowDrag:a(r,"allowDrag",!0),setAllowGravity:a(r,"allowGravity",!0),setAllowRotation:a(r,"allowRotation",!0),setDamping:a(r,"useDamping",!1),setBounceX:a(r,"bounceX",0),setBounceY:a(r,"bounceY",0),setDragX:a(r,"dragX",0),setDragY:a(r,"dragY",0),setEnable:a(r,"enable",!0),setGravityX:a(r,"gravityX",0),setGravityY:a(r,"gravityY",0),setFrictionX:a(r,"frictionX",0),setFrictionY:a(r,"frictionY",0),setMaxSpeed:a(r,"maxSpeed",-1),setMaxVelocityX:a(r,"maxVelocityX",1e4),setMaxVelocityY:a(r,"maxVelocityY",1e4),setVelocityX:a(r,"velocityX",0),setVelocityY:a(r,"velocityY",0),setAngularVelocity:a(r,"angularVelocity",0),setAngularAcceleration:a(r,"angularAcceleration",0),setAngularDrag:a(r,"angularDrag",0),setMass:a(r,"mass",1),setImmovable:a(r,"immovable",!1)},h.call(this,e,i,r),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,o.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var n=this.getChildren(),r=0;r<n.length;r++)n[r].body.velocity.set(t+r*i,e+r*i);return this},setVelocityX:function(t,e){void 0===e&&(e=0);for(var i=this.getChildren(),n=0;n<i.length;n++)i[n].body.velocity.x=t+n*e;return this},setVelocityY:function(t,e){void 0===e&&(e=0);for(var i=this.getChildren(),n=0;n<i.length;n++)i[n].body.velocity.y=t+n*e;return this}});t.exports=u},3017:t=>{var e,i,n,r,s,o,a,h,l,u,c,d,p,f,m,g,v,y=function(){return u&&m&&i.blocked.right?(e.processX(-v,a,!1,!0),1):l&&g&&i.blocked.left?(e.processX(v,a,!0),1):p&&g&&e.blocked.right?(i.processX(-v,h,!1,!0),2):d&&m&&e.blocked.left?(i.processX(v,h,!0),2):0},x=function(t){if(n&&r)v*=.5,0===t||3===t?(e.processX(v,s),i.processX(-v,o)):(e.processX(-v,s),i.processX(v,o));else if(n&&!r)0===t||3===t?e.processX(v,a,!0):e.processX(-v,a,!1,!0);else if(!n&&r)0===t||3===t?i.processX(-v,h,!1,!0):i.processX(v,h,!0);else{var m=.5*v;0===t?f?(e.processX(v,0,!0),i.processX(0,null,!1,!0)):p?(e.processX(m,0,!0),i.processX(-m,0,!1,!0)):(e.processX(m,i.velocity.x,!0),i.processX(-m,null,!1,!0)):1===t?c?(e.processX(0,null,!1,!0),i.processX(v,0,!0)):u?(e.processX(-m,0,!1,!0),i.processX(m,0,!0)):(e.processX(-m,null,!1,!0),i.processX(m,e.velocity.x,!0)):2===t?f?(e.processX(-v,0,!1,!0),i.processX(0,null,!0)):d?(e.processX(-m,0,!1,!0),i.processX(m,0,!0)):(e.processX(-m,i.velocity.x,!1,!0),i.processX(m,null,!0)):3===t&&(c?(e.processX(0,null,!0),i.processX(-v,0,!1,!0)):l?(e.processX(m,0,!0),i.processX(-m,0,!1,!0)):(e.processX(m,i.velocity.y,!0),i.processX(-m,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.x,n=i.velocity.x,r=Math.sqrt(n*n*i.mass/e.mass)*(n>0?1:-1),a=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(r+a);return a-=h,s=h+(r-=h)*e.bounce.x,o=h+a*i.bounce.x,l&&g?x(0):d&&m?x(1):u&&m?x(2):!(!p||!g)&&x(3)},Set:function(t,s,o){i=s;var x=(e=t).velocity.x,E=i.velocity.x;return n=e.pushable,l=e._dx<0,u=e._dx>0,c=0===e._dx,m=Math.abs(e.right-i.x)<=Math.abs(i.right-e.x),a=E-x*e.bounce.x,r=i.pushable,d=i._dx<0,p=i._dx>0,f=0===i._dx,g=!m,h=x-E*i.bounce.x,v=Math.abs(o),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.x=0:m?i.processX(v,h,!0):i.processX(-v,h,!1,!0),e.moves&&(i.y+=(e.y-e.prev.y)*e.friction.y,i._dy=i.y-i.prev.y)},RunImmovableBody2:function(t){2===t?e.velocity.x=0:g?e.processX(v,a,!0):e.processX(-v,a,!1,!0),i.moves&&(e.y+=(i.y-i.prev.y)*i.friction.y,e._dy=e.y-e.prev.y)}}},47962:t=>{var e,i,n,r,s,o,a,h,l,u,c,d,p,f,m,g,v,y=function(){return u&&m&&i.blocked.down?(e.processY(-v,a,!1,!0),1):l&&g&&i.blocked.up?(e.processY(v,a,!0),1):p&&g&&e.blocked.down?(i.processY(-v,h,!1,!0),2):d&&m&&e.blocked.up?(i.processY(v,h,!0),2):0},x=function(t){if(n&&r)v*=.5,0===t||3===t?(e.processY(v,s),i.processY(-v,o)):(e.processY(-v,s),i.processY(v,o));else if(n&&!r)0===t||3===t?e.processY(v,a,!0):e.processY(-v,a,!1,!0);else if(!n&&r)0===t||3===t?i.processY(-v,h,!1,!0):i.processY(v,h,!0);else{var m=.5*v;0===t?f?(e.processY(v,0,!0),i.processY(0,null,!1,!0)):p?(e.processY(m,0,!0),i.processY(-m,0,!1,!0)):(e.processY(m,i.velocity.y,!0),i.processY(-m,null,!1,!0)):1===t?c?(e.processY(0,null,!1,!0),i.processY(v,0,!0)):u?(e.processY(-m,0,!1,!0),i.processY(m,0,!0)):(e.processY(-m,null,!1,!0),i.processY(m,e.velocity.y,!0)):2===t?f?(e.processY(-v,0,!1,!0),i.processY(0,null,!0)):d?(e.processY(-m,0,!1,!0),i.processY(m,0,!0)):(e.processY(-m,i.velocity.y,!1,!0),i.processY(m,null,!0)):3===t&&(c?(e.processY(0,null,!0),i.processY(-v,0,!1,!0)):l?(e.processY(m,0,!0),i.processY(-m,0,!1,!0)):(e.processY(m,i.velocity.y,!0),i.processY(-m,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.y,n=i.velocity.y,r=Math.sqrt(n*n*i.mass/e.mass)*(n>0?1:-1),a=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(r+a);return a-=h,s=h+(r-=h)*e.bounce.y,o=h+a*i.bounce.y,l&&g?x(0):d&&m?x(1):u&&m?x(2):!(!p||!g)&&x(3)},Set:function(t,s,o){i=s;var x=(e=t).velocity.y,E=i.velocity.y;return n=e.pushable,l=e._dy<0,u=e._dy>0,c=0===e._dy,m=Math.abs(e.bottom-i.y)<=Math.abs(i.bottom-e.y),a=E-x*e.bounce.y,r=i.pushable,d=i._dy<0,p=i._dy>0,f=0===i._dy,g=!m,h=x-E*i.bounce.y,v=Math.abs(o),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.y=0:m?i.processY(v,h,!0):i.processY(-v,h,!1,!0),e.moves&&(i.x+=(e.x-e.prev.x)*e.friction.x,i._dx=i.x-i.prev.x)},RunImmovableBody2:function(t){2===t?e.velocity.y=0:g?e.processY(v,a,!0):e.processY(-v,a,!1,!0),i.moves&&(e.x+=(i.x-i.prev.x)*i.friction.x,e._dx=e.x-e.prev.x)}}},14087:(t,e,i)=>{var n=i(64897),r=i(3017);t.exports=function(t,e,i,s,o){void 0===o&&(o=n(t,e,i,s));var a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateX||e.customSeparateX)return 0!==o||t.embedded&&e.embedded;var l=r.Set(t,e,o);return a||h?(a?r.RunImmovableBody1(l):h&&r.RunImmovableBody2(l),!0):l>0||r.Check()}},89936:(t,e,i)=>{var n=i(45170),r=i(47962);t.exports=function(t,e,i,s,o){void 0===o&&(o=n(t,e,i,s));var a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateY||e.customSeparateY)return 0!==o||t.embedded&&e.embedded;var l=r.Set(t,e,o);return a||h?(a?r.RunImmovableBody1(l):h&&r.RunImmovableBody2(l),!0):l>0||r.Check()}},95829:t=>{t.exports=function(t,e){return void 0===e&&(e={}),e.none=t,e.up=!1,e.down=!1,e.left=!1,e.right=!1,t||(e.up=!0,e.down=!0,e.left=!0,e.right=!0),e}},72624:(t,e,i)=>{var n=i(87902),r=i(83419),s=i(78389),o=i(37747),a=i(37303),h=i(95829),l=i(26099),u=new r({Mixins:[s],initialize:function(t,e){var i=64,n=64,r=void 0!==e;r&&e.displayWidth&&(i=e.displayWidth,n=e.displayHeight),r||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=r?e:void 0,this.isBody=!0,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x-i*e.originX,e.y-n*e.originY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=l.ZERO,this.allowGravity=!1,this.gravity=l.ZERO,this.bounce=l.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=h(!1),this.touching=h(!0),this.wasTouching=h(!0),this.blocked=h(!0),this.physicsType=o.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(n&&n.frame&&(t||(t=n.frame.realWidth),e||(e=n.frame.realHeight)),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n&&n.getCenter){var r=n.displayWidth/2,s=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(r-this.halfWidth,s-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):a(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},71464:(t,e,i)=>{var n=i(13759),r=i(83419),s=i(78389),o=i(37747),a=i(95540),h=i(26479),l=i(41212),u=new r({Extends:h,Mixins:[s],initialize:function(t,e,i,r){i||r?l(i)?(r=i,i=null,r.internalCreateCallback=this.createCallbackHandler,r.internalRemoveCallback=this.removeCallbackHandler,r.createMultipleCallback=this.createMultipleCallbackHandler,r.classType=a(r,"classType",n)):Array.isArray(i)&&l(i[0])?(r=i,i=null,r.forEach((function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=a(t,"classType",n)}))):r={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:r={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:n},this.world=t,this.physicsType=o.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,h.call(this,e,i,r),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,o.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e<t.length;e++)t[e].body.reset();return this}});t.exports=u},82248:(t,e,i)=>{var n=i(55495),r=i(37742),s=i(45319),o=i(83419),a=i(79342),h=i(37747),l=i(20339),u=i(52816),c=i(50792),d=i(63012),p=i(43855),f=i(5470),m=i(94977),g=i(64897),v=i(45170),y=i(96523),x=i(35154),E=i(36383),T=i(25774),_=i(96602),w=i(87841),S=i(59542),b=i(40012),C=i(14087),A=i(89936),R=i(35072),M=i(72624),L=i(2483),O=i(61340),P=i(26099),F=i(15994),I=new o({Extends:c,initialize:function(t,e){c.call(this),this.scene=t,this.bodies=new R,this.staticBodies=new R,this.pendingDestroy=new R,this.colliders=new T,this.gravity=new P(x(e,"gravity.x",0),x(e,"gravity.y",0)),this.bounds=new w(x(e,"x",0),x(e,"y",0),x(e,"width",t.sys.scale.width),x(e,"height",t.sys.scale.height)),this.checkCollision={up:x(e,"checkCollision.up",!0),down:x(e,"checkCollision.down",!0),left:x(e,"checkCollision.left",!0),right:x(e,"checkCollision.right",!0)},this.fps=x(e,"fps",60),this.fixedStep=x(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=x(e,"timeScale",1),this.OVERLAP_BIAS=x(e,"overlapBias",4),this.TILE_BIAS=x(e,"tileBias",16),this.forceX=x(e,"forceX",!1),this.isPaused=x(e,"isPaused",!1),this._total=0,this.drawDebug=x(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:x(e,"debugShowBody",!0),debugShowStaticBody:x(e,"debugShowStaticBody",!0),debugShowVelocity:x(e,"debugShowVelocity",!0),bodyDebugColor:x(e,"debugBodyColor",16711935),staticBodyDebugColor:x(e,"debugStaticBodyColor",255),velocityDebugColor:x(e,"debugVelocityColor",65280)},this.maxEntries=x(e,"maxEntries",16),this.useTree=x(e,"useTree",!0),this.tree=new S(this.maxEntries),this.staticTree=new S(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new O,this._tempMatrix2=new O,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=h.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];if(n.isParent)for(var r=n.getChildren(),s=0;s<r.length;s++){var o=r[s];o.isParent?this.enable(o,e):this.enableBody(o,e)}else this.enableBody(n,e)}},enableBody:function(t,e){return void 0===e&&(e=h.DYNAMIC_BODY),t.hasTransformComponent&&(t.body||(e===h.DYNAMIC_BODY?t.body=new r(this,t):e===h.STATIC_BODY&&(t.body=new M(this,t))),this.add(t.body)),t},add:function(t){return t.physicsType===h.DYNAMIC_BODY?this.bodies.set(t):t.physicsType===h.STATIC_BODY&&(this.staticBodies.set(t),this.staticTree.insert(t)),t.enable=!0,t},disable:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];if(i.isParent)for(var n=i.getChildren(),r=0;r<n.length;r++){var s=n[r];s.isParent?this.disable(s):this.disableBody(s.body)}else this.disableBody(i.body)}},disableBody:function(t){this.remove(t),t.enable=!1},remove:function(t){t.physicsType===h.DYNAMIC_BODY?(this.tree.remove(t),this.bodies.delete(t)):t.physicsType===h.STATIC_BODY&&(this.staticBodies.delete(t),this.staticTree.remove(t))},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},setBounds:function(t,e,i,n,r,s,o,a){return this.bounds.setTo(t,e,i,n),void 0!==r&&this.setBoundsCollision(r,s,o,a),this},setBoundsCollision:function(t,e,i,n){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=!0),this.checkCollision.left=t,this.checkCollision.right=e,this.checkCollision.up=i,this.checkCollision.down=n,this},pause:function(){return this.isPaused=!0,this.emit(d.PAUSE),this},resume:function(){return this.isPaused=!1,this.emit(d.RESUME),this},addCollider:function(t,e,i,n,r){void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i);var s=new a(this,!1,t,e,i,n,r);return this.colliders.add(s),s},addOverlap:function(t,e,i,n,r){void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i);var s=new a(this,!0,t,e,i,n,r);return this.colliders.add(s),s},removeCollider:function(t){return this.colliders.remove(t),this},setFPS:function(t){return this.fps=t,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this},update:function(t,e){if(!this.isPaused&&0!==this.bodies.size){var i,n,r=this._frameTime,s=this._frameTimeMS*this.timeScale;this._elapsed+=e;var o=this.bodies.entries,a=this._elapsed>=s;for(this.fixedStep||(r=.001*e,a=!0,this._elapsed=0),i=0;i<o.length;i++)(n=o[i]).enable&&n.preUpdate(a,r);if(a){this._elapsed-=s,this.stepsLastFrame=1,this.useTree&&(this.tree.clear(),this.tree.load(o));var h=this.colliders.update();for(i=0;i<h.length;i++){var l=h[i];l.active&&l.update()}this.emit(d.WORLD_STEP,r)}for(;this._elapsed>=s;)this._elapsed-=s,this.step(r)}},step:function(t){var e,i,n=this.bodies.entries,r=n.length;for(e=0;e<r;e++)(i=n[e]).enable&&i.update(t);this.useTree&&(this.tree.clear(),this.tree.load(n));var s=this.colliders.update();for(e=0;e<s.length;e++){var o=s[e];o.active&&o.update()}this.emit(d.WORLD_STEP,t),this.stepsLastFrame++},singleStep:function(){this.update(0,this._frameTimeMS),this.postUpdate()},postUpdate:function(){var t,e,i=this.bodies.entries,n=i.length,r=this.bodies,s=this.staticBodies;if(this.stepsLastFrame)for(this.stepsLastFrame=0,t=0;t<n;t++)(e=i[t]).enable&&e.postUpdate();if(this.drawDebug){var o=this.debugGraphic;for(o.clear(),t=0;t<n;t++)(e=i[t]).willDrawDebug()&&e.drawDebug(o);for(n=(i=s.entries).length,t=0;t<n;t++)(e=i[t]).willDrawDebug()&&e.drawDebug(o)}var a=this.pendingDestroy;if(a.size>0){var l=this.tree,u=this.staticTree;for(n=(i=a.entries).length,t=0;t<n;t++)(e=i[t]).physicsType===h.DYNAMIC_BODY?(l.remove(e),r.delete(e)):e.physicsType===h.STATIC_BODY&&(u.remove(e),s.delete(e)),e.world=void 0,e.gameObject=void 0;a.clear()}},updateMotion:function(t,e){t.allowRotation&&this.computeAngularVelocity(t,e),this.computeVelocity(t,e)},computeAngularVelocity:function(t,e){var i=t.angularVelocity,n=t.angularAcceleration,r=t.angularDrag,o=t.maxAngular;n?i+=n*e:t.allowDrag&&r&&(f(i-(r*=e),0,.1)?i-=r:m(i+r,0,.1)?i+=r:i=0);var a=(i=s(i,-o,o))-t.angularVelocity;t.angularVelocity+=a,t.rotation+=t.angularVelocity*e},computeVelocity:function(t,e){var i=t.velocity.x,n=t.acceleration.x,r=t.drag.x,o=t.maxVelocity.x,a=t.velocity.y,h=t.acceleration.y,l=t.drag.y,u=t.maxVelocity.y,c=t.speed,d=t.maxSpeed,g=t.allowDrag,v=t.useDamping;t.allowGravity&&(i+=(this.gravity.x+t.gravity.x)*e,a+=(this.gravity.y+t.gravity.y)*e),n?i+=n*e:g&&r&&(v?(i*=r=Math.pow(r,e),c=Math.sqrt(i*i+a*a),p(c,0,.001)&&(i=0)):f(i-(r*=e),0,.01)?i-=r:m(i+r,0,.01)?i+=r:i=0),h?a+=h*e:g&&l&&(v?(a*=l=Math.pow(l,e),c=Math.sqrt(i*i+a*a),p(c,0,.001)&&(a=0)):f(a-(l*=e),0,.01)?a-=l:m(a+l,0,.01)?a+=l:a=0),i=s(i,-o,o),a=s(a,-u,u),t.velocity.set(i,a),d>-1&&t.velocity.length()>d&&(t.velocity.normalize().scale(d),c=d),t.speed=c},separate:function(t,e,i,n,r){var s,o,a=!1,h=!0;if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return a;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return a;if(t.isCircle||e.isCircle){var l=this.separateCircle(t,e,r);l.result?(a=!0,h=!1):(s=l.x,o=l.y,h=!0)}if(h){var u=!1,c=!1,p=this.OVERLAP_BIAS;r?(u=C(t,e,r,p,s),c=A(t,e,r,p,o)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)<Math.abs(this.gravity.x+t.gravity.x)?(u=C(t,e,r,p,s),this.intersects(t,e)&&(c=A(t,e,r,p,o))):(c=A(t,e,r,p,o),this.intersects(t,e)&&(u=C(t,e,r,p,s))),a=u||c}return a&&(r?(t.onOverlap||e.onOverlap)&&this.emit(d.OVERLAP,t.gameObject,e.gameObject,t,e):(t.onCollide||e.onCollide)&&this.emit(d.COLLIDE,t.gameObject,e.gameObject,t,e)),a},separateCircle:function(t,e,i){g(t,e,!1,0),v(t,e,!1,0);var r=t.isCircle,s=e.isCircle,o=t.center,a=e.center,h=t.immovable,c=e.immovable,d=t.velocity,p=e.velocity,f=0,m=!0;if(r!==s){m=!1;var y=o.x,x=o.y,T=t.halfWidth,_=e.position.x,w=e.position.y,S=e.right,b=e.bottom;s&&(y=a.x,x=a.y,T=e.halfWidth,_=t.position.x,w=t.position.y,S=t.right,b=t.bottom),x<w?y<_?f=l(y,x,_,w)-T:y>S&&(f=l(y,x,S,w)-T):x>b&&(y<_?f=l(y,x,_,b)-T:y>S&&(f=l(y,x,S,b)-T)),f*=-1}else f=t.halfWidth+e.halfWidth-u(o,a);t.overlapR=f,e.overlapR=f;var C=n(o,a),A=(f+E.EPSILON)*Math.cos(C),R=(f+E.EPSILON)*Math.sin(C),M={overlap:f,result:!1,x:A,y:R};if(i&&(!m||m&&0!==f))return M.result=!0,M;if(!m&&0===f||h&&c||t.customSeparateX||e.customSeparateX)return M.x=void 0,M.y=void 0,M;var L=!t.pushable&&!e.pushable;if(m){var O=o.x-a.x,P=o.y-a.y,F=Math.sqrt(Math.pow(O,2)+Math.pow(P,2)),I=(a.x-o.x)/F||0,D=(a.y-o.y)/F||0,N=2*(d.x*I+d.y*D-p.x*I-p.y*D)/(t.mass+e.mass);(h||c)&&(N*=2),h||(d.x=d.x-N/t.mass*I,d.y=d.y-N/t.mass*D,d.multiply(t.bounce)),c||(p.x=p.x+N/e.mass*I,p.y=p.y+N/e.mass*D,p.multiply(e.bounce)),h||c||(A*=.5,R*=.5),h||(t.x-=A,t.y-=R,t.updateCenter()),c||(e.x+=A,e.y+=R,e.updateCenter()),M.result=!0}else!h||t.pushable||L?(t.x-=A,t.y-=R,t.updateCenter()):(!c||e.pushable||L)&&(e.x+=A,e.y+=R,e.updateCenter()),M.x=void 0,M.y=void 0;return M},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?u(t.center,e.center)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.left||t.bottom<=e.top||t.left>=e.right||t.top>=e.bottom))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i),this.collideObjects(t,e,i,n,r,!0)},collide:function(t,e,i,n,r){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i),this.collideObjects(t,e,i,n,r,!1)},collideObjects:function(t,e,i,n,r,s){var o,a;!t.isParent||void 0!==t.physicsType&&void 0!==e&&t!==e||(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o<e.length;o++)this.collideHandler(t,e[o],i,n,r,s);else if(h&&!l)if(e)for(o=0;o<t.length;o++)this.collideHandler(t[o],e,i,n,r,s);else for(o=0;o<t.length;o++){var u=t[o];for(a=o+1;a<t.length;a++)o!==a&&this.collideHandler(u,t[a],i,n,r,s)}else for(o=0;o<t.length;o++)for(a=0;a<e.length;a++)this.collideHandler(t[o],e[a],i,n,r,s);else this.collideHandler(t,e,i,n,r,s);return this._total>0},collideHandler:function(t,e,i,n,r,s){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,r,s);if(!t||!e)return!1;if(t.body||t.isBody){if(e.body||e.isBody)return this.collideSpriteVsSprite(t,e,i,n,r,s);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,r,s);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,r,s)}else if(t.isParent){if(e.body||e.isBody)return this.collideSpriteVsGroup(e,t,i,n,r,s);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,r,s);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,r,s)}else if(t.isTilemap){if(e.body||e.isBody)return this.collideSpriteVsTilemapLayer(e,t,i,n,r,s);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,r,s)}},canCollide:function(t,e){return t&&e&&0!=(t.collisionMask&e.collisionCategory)&&0!=(e.collisionMask&t.collisionCategory)},collideSpriteVsSprite:function(t,e,i,n,r,s){var o=t.isBody?t:t.body,a=e.isBody?e:e.body;return!!this.canCollide(o,a)&&(this.separate(o,a,n,r,s)&&(i&&i.call(r,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,r,s){var o,a,l,u=t.isBody?t:t.body;if(0!==e.length&&u&&u.enable&&!u.checkCollision.none&&this.canCollide(u,e))if(this.useTree||e.physicsType===h.STATIC_BODY){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===h.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(a=d.length,o=0;o<a;o++)u!==(l=d[o])&&l.enable&&!l.checkCollision.none&&e.contains(l.gameObject)&&this.separate(u,l,n,r,s)&&(i&&i.call(r,u.gameObject,l.gameObject),this._total++)}else{var p=e.getChildren(),f=e.children.entries.indexOf(t);for(a=p.length,o=0;o<a;o++)(l=p[o].body)&&o!==f&&l.enable&&this.separate(u,l,n,r,s)&&(i&&i.call(r,u.gameObject,l.gameObject),this._total++)}},collideGroupVsTilemapLayer:function(t,e,i,n,r,s){if(!this.canCollide(t,e))return!1;var o=t.getChildren();if(0===o.length)return!1;for(var a=!1,h=0;h<o.length;h++)(o[h].body||o[h].isBody)&&this.collideSpriteVsTilemapLayer(o[h],e,i,n,r,s)&&(a=!0);return a},collideTiles:function(t,e,i,n,r){return!(0===e.length||t.body&&!t.body.enable||t.isBody&&!t.enable)&&this.collideSpriteVsTilesHandler(t,e,i,n,r,!1,!1)},overlapTiles:function(t,e,i,n,r){return!(0===e.length||t.body&&!t.body.enable||t.isBody&&!t.enable)&&this.collideSpriteVsTilesHandler(t,e,i,n,r,!0,!1)},collideSpriteVsTilemapLayer:function(t,e,i,n,r,s){var o=t.isBody?t:t.body;if(!o.enable||o.checkCollision.none||!this.canCollide(o,e))return!1;var a=e.layer,h=o.x-a.tileWidth*e.scaleX,l=o.y-a.tileHeight*e.scaleY,u=o.width+a.tileWidth*e.scaleX,c=o.height+a.tileHeight*e.scaleY,d=s?null:this.tileFilterOptions,p=y(h,l,u,c,d,e.scene.cameras.main,e.layer);return 0!==p.length&&this.collideSpriteVsTilesHandler(t,p,i,n,r,s,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,r,s,o){for(var a,h,l=t.isBody?t:t.body,u={left:0,right:0,top:0,bottom:0},c=!1,p=0;p<e.length;p++){var f=(h=(a=e[p]).tilemapLayer).tileToWorldXY(a.x,a.y);u.left=f.x,u.top=f.y,u.right=u.left+a.width*h.scaleX,u.bottom=u.top+a.height*h.scaleY,L(u,l)&&(!n||n.call(r,t,a))&&_(a,t)&&(s||b(p,l,a,u,h,this.TILE_BIAS,o))&&(this._total++,c=!0,i&&i.call(r,t,a),s&&l.onOverlap?this.emit(d.TILE_OVERLAP,t,a,l):l.onCollide&&this.emit(d.TILE_COLLIDE,t,a,l))}return c},collideGroupVsGroup:function(t,e,i,n,r,s){if(0!==t.length&&0!==e.length&&this.canCollide(t,e))for(var o=t.getChildren(),a=0;a<o.length;a++)this.collideSpriteVsGroup(o[a],e,i,n,r,s)},wrap:function(t,e){t.body?this.wrapObject(t,e):t.getChildren?this.wrapArray(t.getChildren(),e):Array.isArray(t)?this.wrapArray(t,e):this.wrapObject(t,e)},wrapArray:function(t,e){for(var i=0;i<t.length;i++)this.wrapObject(t[i],e)},wrapObject:function(t,e){void 0===e&&(e=0),t.x=F(t.x,this.bounds.left-e,this.bounds.right+e),t.y=F(t.y,this.bounds.top-e,this.bounds.bottom+e)},shutdown:function(){this.tree.clear(),this.staticTree.clear(),this.bodies.clear(),this.staticBodies.clear(),this.colliders.destroy(),this.removeAllListeners()},destroy:function(){this.shutdown(),this.scene=null,this.debugGraphic&&(this.debugGraphic.destroy(),this.debugGraphic=null)}});t.exports=I},1093:t=>{t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},59023:t=>{t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},62069:t=>{t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i,n){return this.body.setCollideWorldBounds(t,e,i,n),this}}},78389:(t,e,i)=>{var n=i(79599),r={setCollisionCategory:function(t){return(this.body?this.body:this).collisionCategory=t,this},willCollideWith:function(t){return 0!=((this.body?this.body:this).collisionMask&t)},addCollidesWith:function(t){var e=this.body?this.body:this;return e.collisionMask=e.collisionMask|t,this},removeCollidesWith:function(t){var e=this.body?this.body:this;return e.collisionMask=e.collisionMask&~t,this},setCollidesWith:function(t){return(this.body?this.body:this).collisionMask=n(t),this},resetCollisionCategory:function(){var t=this.body?this.body:this;return t.collisionCategory=1,t.collisionMask=1,this}};t.exports=r},87118:t=>{t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},52819:t=>{t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},4074:t=>{var e={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,e,i,n,r){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=e},40831:t=>{t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},26775:t=>{t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},9437:t=>{var e={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=e},30621:t=>{t.exports={setMass:function(t){return this.body.mass=t,this}}},72441:(t,e,i)=>{var n=i(47956),r=i(96503),s=i(2044),o=i(81491);t.exports=function(t,e,i,a,h,l){var u=n(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new r(e,i,a),d=new r,p=[],f=0;f<u.length;f++){var m=u[f];m.isCircle?(d.setTo(m.center.x,m.center.y,m.halfWidth),s(c,d)&&p.push(m)):o(c,m)&&p.push(m)}return p}},47956:t=>{t.exports=function(t,e,i,n,r,s,o){void 0===s&&(s=!0),void 0===o&&(o=!1);var a=[],h=[],l=t.treeMinMax;if(l.minX=e,l.minY=i,l.maxX=e+n,l.maxY=i+r,o&&(h=t.staticTree.search(l)),s&&t.useTree)a=t.tree.search(l);else if(s){var u=t.bodies,c={position:{x:e,y:i},left:e,top:i,right:e+n,bottom:i+r,isCircle:!1},d=t.intersects;u.iterate((function(t){d(t,c)&&a.push(t)}))}return h.concat(a)}},62121:t=>{var e={setPushable:function(t){return void 0===t&&(t=!0),this.body.pushable=t,this}};t.exports=e},29384:t=>{t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},15098:t=>{t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},92209:(t,e,i)=>{t.exports={Acceleration:i(1093),Angular:i(59023),Bounce:i(62069),Collision:i(78389),Debug:i(87118),Drag:i(52819),Enable:i(4074),Friction:i(40831),Gravity:i(26775),Immovable:i(9437),Mass:i(30621),OverlapCirc:i(72441),OverlapRect:i(47956),Pushable:i(62121),Size:i(29384),Velocity:i(15098)}},37747:t=>{t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},20009:t=>{t.exports="collide"},36768:t=>{t.exports="overlap"},60473:t=>{t.exports="pause"},89954:t=>{t.exports="resume"},61804:t=>{t.exports="tilecollide"},7161:t=>{t.exports="tileoverlap"},34689:t=>{t.exports="worldbounds"},16006:t=>{t.exports="worldstep"},63012:(t,e,i)=>{t.exports={COLLIDE:i(20009),OVERLAP:i(36768),PAUSE:i(60473),RESUME:i(89954),TILE_COLLIDE:i(61804),TILE_OVERLAP:i(7161),WORLD_BOUNDS:i(34689),WORLD_STEP:i(16006)}},27064:(t,e,i)=>{var n=i(37747),r=i(79291),s={ArcadePhysics:i(86689),Body:i(37742),Collider:i(79342),Components:i(92209),Events:i(63012),Factory:i(66022),GetCollidesWith:i(79599),GetOverlapX:i(64897),GetOverlapY:i(45170),SeparateX:i(14087),SeparateY:i(89936),Group:i(60758),Image:i(71289),Sprite:i(13759),StaticBody:i(72624),StaticGroup:i(71464),Tilemap:i(55173),World:i(82248)};s=r(!1,s,n),t.exports=s},96602:t=>{t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},36294:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,t.updateCenter(),0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},67013:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,t.updateCenter(),0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},40012:(t,e,i)=>{var n=i(21329),r=i(53442),s=i(2483);t.exports=function(t,e,i,o,a,h,l){var u=o.left,c=o.top,d=o.right,p=o.bottom,f=i.faceLeft||i.faceRight,m=i.faceTop||i.faceBottom;if(l||(f=!0,m=!0),!f&&!m)return!1;var g=0,v=0,y=0,x=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX()<e.deltaAbsY()&&(x=-1),0!==e.deltaX()&&0!==e.deltaY()&&f&&m&&(y=Math.min(Math.abs(e.position.x-d),Math.abs(e.right-u)),x=Math.min(Math.abs(e.position.y-p),Math.abs(e.bottom-c))),y<x){if(f&&0!==(g=n(e,i,u,d,h,l))&&!s(o,e))return!0;m&&(v=r(e,i,c,p,h,l))}else{if(m&&0!==(v=r(e,i,c,p,h,l))&&!s(o,e))return!0;f&&(g=n(e,i,u,d,h,l))}return 0!==g||0!==v}},21329:(t,e,i)=>{var n=i(36294);t.exports=function(t,e,i,r,s,o){var a=0,h=e.faceLeft,l=e.faceRight,u=e.collideLeft,c=e.collideRight;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaX()<0&&c&&t.checkCollision.left?l&&t.x<r&&(a=t.x-r)<-s&&(a=0):t.deltaX()>0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>s&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},53442:(t,e,i)=>{var n=i(67013);t.exports=function(t,e,i,r,s,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y<r&&(a=t.y-r)<-s&&(a=0):t.deltaY()>0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>s&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},2483:t=>{t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},55173:(t,e,i)=>{var n={ProcessTileCallbacks:i(96602),ProcessTileSeparationX:i(36294),ProcessTileSeparationY:i(67013),SeparateTile:i(40012),TileCheckX:i(21329),TileCheckY:i(53442),TileIntersectsBody:i(2483)};t.exports=n},44563:(t,e,i)=>{t.exports={Arcade:i(27064),Matter:i(3875)}},68174:(t,e,i)=>{var n=i(83419),r=i(26099),s=new n({initialize:function(){this.boundsCenter=new r,this.centerDiff=new r},parseBody:function(t){if(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))return!1;var e=this.boundsCenter,i=this.centerDiff,n=t.bounds.max.x-t.bounds.min.x,r=t.bounds.max.y-t.bounds.min.y,s=n*t.centerOfMass.x,o=r*t.centerOfMass.y;return e.set(n/2,r/2),i.set(s-e.x,o-e.y),!0},getTopLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e+n.x+s.x,i+n.y+s.y)}return!1},getTopCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e+s.x,i+n.y+s.y)}return!1},getTopRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e-(n.x-s.x),i+n.y+s.y)}return!1},getLeftCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e+n.x+s.x,i+s.y)}return!1},getCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.centerDiff;return new r(e+n.x,i+n.y)}return!1},getRightCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e-(n.x-s.x),i+s.y)}return!1},getBottomLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e+n.x+s.x,i-(n.y-s.y))}return!1},getBottomCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e+s.x,i-(n.y-s.y))}return!1},getBottomRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,s=this.centerDiff;return new r(e-(n.x-s.x),i-(n.y-s.y))}return!1}});t.exports=s},19933:(t,e,i)=>{var n=i(6790);n.Body=i(22562),n.Composite=i(69351),n.World=i(4372),n.Collision=i(52284),n.Detector=i(81388),n.Pairs=i(99561),n.Pair=i(4506),n.Query=i(73296),n.Resolver=i(66272),n.Constraint=i(48140),n.Common=i(53402),n.Engine=i(48413),n.Events=i(35810),n.Sleeping=i(53614),n.Plugin=i(73832),n.Bodies=i(66280),n.Composites=i(74116),n.Axes=i(66615),n.Bounds=i(15647),n.Svg=i(74058),n.Vector=i(31725),n.Vertices=i(41598),n.World.add=n.Composite.add,n.World.remove=n.Composite.remove,n.World.addComposite=n.Composite.addComposite,n.World.addBody=n.Composite.addBody,n.World.addConstraint=n.Composite.addConstraint,n.World.clear=n.Composite.clear,t.exports=n},28137:(t,e,i)=>{var n=i(66280),r=i(83419),s=i(74116),o=i(48140),a=i(74058),h=i(75803),l=i(23181),u=i(34803),c=i(73834),d=i(19496),p=i(85791),f=i(98713),m=i(41598),g=new r({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,r,s){var o=n.rectangle(t,e,i,r,s);return this.world.add(o),o},trapezoid:function(t,e,i,r,s,o){var a=n.trapezoid(t,e,i,r,s,o);return this.world.add(a),a},circle:function(t,e,i,r,s){var o=n.circle(t,e,i,r,s);return this.world.add(o),o},polygon:function(t,e,i,r,s){var o=n.polygon(t,e,i,r,s);return this.world.add(o),o},fromVertices:function(t,e,i,r,s,o,a){"string"==typeof i&&(i=m.fromPath(i));var h=n.fromVertices(t,e,i,r,s,o,a);return this.world.add(h),h},fromPhysicsEditor:function(t,e,i,n,r){void 0===r&&(r=!0);var s=d.parseBody(t,e,i,n);return r&&!this.world.has(s)&&this.world.add(s),s},fromSVG:function(t,e,i,r,s,o){void 0===r&&(r=1),void 0===s&&(s={}),void 0===o&&(o=!0);for(var h=i.getElementsByTagName("path"),l=[],u=0;u<h.length;u++){var c=a.pathToVertices(h[u],30);1!==r&&m.scale(c,r,r),l.push(c)}var d=n.fromVertices(t,e,l,s);return o&&this.world.add(d),d},fromJSON:function(t,e,i,n,r){void 0===n&&(n={}),void 0===r&&(r=!0);var s=p.parseBody(t,e,i,n);return s&&r&&this.world.add(s),s},imageStack:function(t,e,i,n,r,o,a,h,u){void 0===a&&(a=0),void 0===h&&(h=0),void 0===u&&(u={});var c=this.world,d=this.sys.displayList;u.addToWorld=!1;var p=s.stack(i,n,r,o,a,h,(function(i,n){var r=new l(c,i,n,t,e,u);return d.add(r),r.body}));return c.add(p),p},stack:function(t,e,i,n,r,o,a){var h=s.stack(t,e,i,n,r,o,a);return this.world.add(h),h},pyramid:function(t,e,i,n,r,o,a){var h=s.pyramid(t,e,i,n,r,o,a);return this.world.add(h),h},chain:function(t,e,i,n,r,o){return s.chain(t,e,i,n,r,o)},mesh:function(t,e,i,n,r){return s.mesh(t,e,i,n,r)},newtonsCradle:function(t,e,i,n,r){var o=s.newtonsCradle(t,e,i,n,r);return this.world.add(o),o},car:function(t,e,i,n,r){var o=s.car(t,e,i,n,r);return this.world.add(o),o},softBody:function(t,e,i,n,r,o,a,h,l,u){var c=s.softBody(t,e,i,n,r,o,a,h,l,u);return this.world.add(c),c},joint:function(t,e,i,n,r){return this.constraint(t,e,i,n,r)},spring:function(t,e,i,n,r){return this.constraint(t,e,i,n,r)},constraint:function(t,e,i,n,r){void 0===n&&(n=1),void 0===r&&(r={}),r.bodyA="body"===t.type?t:t.body,r.bodyB="body"===e.type?e:e.body,isNaN(i)||(r.length=i),r.stiffness=n;var s=o.create(r);return this.world.add(s),s},worldConstraint:function(t,e,i,n){void 0===i&&(i=1),void 0===n&&(n={}),n.bodyB="body"===t.type?t:t.body,isNaN(e)||(n.length=e),n.stiffness=i;var r=o.create(n);return this.world.add(r),r},mouseSpring:function(t){return this.pointerConstraint(t)},pointerConstraint:function(t){void 0===t&&(t={}),t.hasOwnProperty("render")||(t.render={visible:!1});var e=new f(this.scene,this.world,t);return this.world.add(e.constraint),e},image:function(t,e,i,n,r){var s=new l(this.world,t,e,i,n,r);return this.sys.displayList.add(s),s},tileBody:function(t,e){return new c(this.world,t,e)},sprite:function(t,e,i,n,r){var s=new u(this.world,t,e,i,n,r);return this.sys.displayList.add(s),this.sys.updateList.add(s),s},gameObject:function(t,e,i){return h(this.world,t,e,i)},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=g},75803:(t,e,i)=>{var n=i(31884),r=i(95540),s=i(26099);t.exports=function(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!0);var a=e.x,h=e.y;if(e.body={temp:!0,position:{x:a,y:h}},[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity].forEach((function(t){for(var i in t)(n=t[i]).get&&"function"==typeof n.get||n.set&&"function"==typeof n.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var n})),e.world=t,e._tempVec2=new s(a,h),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,o);else{var l=r(i,"shape",null);l||(l="rectangle"),i.addToWorld=o,e.setBody(l,i)}return e}},23181:(t,e,i)=>{var n=i(83419),r=i(31884),s=i(95643),o=i(95540),a=i(88571),h=i(72699),l=i(26099),u=new n({Extends:a,Mixins:[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity,h],initialize:function(t,e,i,n,r,a){s.call(this,t.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(n,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);var h=o(a,"shape",null);h?this.setBody(h,a):this.setRectangle(this.width,this.height,a),this.setPosition(e,i),this.initPipeline(),this.initPostPipeline(!0)}});t.exports=u},42045:(t,e,i)=>{var n=i(60461),r=i(66615),s=i(66280),o=i(22562),a=i(68174),h=i(15647),l=i(83419),u=i(52284),c=i(53402),d=i(69351),p=i(74116),f=i(48140),m=i(81388),g=i(20339),v=i(28137),y=i(95540),x=i(35154),E=i(18210),T=i(40178),_=i(6790),w=i(74507),S=i(46975),b=i(4506),C=i(99561),A=i(73832),R=i(37277),M=i(73296),L=i(66272),O=i(44594),P=i(74058),F=i(31725),I=i(41598),D=i(68243);c.setDecomp(i(55973));var N=new l({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=o,this.composite=d,this.collision=u,this.detector=m,this.pair=b,this.pairs=C,this.query=M,this.resolver=L,this.constraint=f,this.bodies=s,this.composites=p,this.axes=r,this.bounds=h,this.svg=P,this.vector=F,this.vertices=I,this.verts=I,this._tempVec2=F.create(),x(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),x(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),x(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),L._restingThresh=x(this.config,"restingThresh",4),L._restingThreshTangent=x(this.config,"restingThreshTangent",6),L._positionDampen=x(this.config,"positionDampen",.9),L._positionWarming=x(this.config,"positionWarming",.8),L._frictionNormalMultiplier=x(this.config,"frictionNormalMultiplier",5),t.sys.events.once(O.BOOT,this.boot,this),t.sys.events.on(O.START,this.start,this)},boot:function(){this.world=new D(this.scene,this.config),this.add=new v(this.world),this.bodyBounds=new a,this.systems.events.once(O.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new D(this.scene,this.config),this.add=new v(this.world));var t=this.systems.events;t.on(O.UPDATE,this.world.update,this.world),t.on(O.POST_UPDATE,this.world.postUpdate,this.world),t.once(O.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return S(y(e,"matter",{}),y(t,"matter",{}))},enableAttractorPlugin:function(){return A.register(E),A.use(_,E),this},enableWrapPlugin:function(){return A.register(w),A.use(_,w),this},enableCollisionEventsPlugin:function(){return A.register(T),A.use(_,T),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(t,e){this.world.step(t,e)},containsPoint:function(t,e,i){t=this.getMatterBodies(t);var n=F.create(e,i);return M.point(t,n).length>0},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var n=F.create(t,e),r=[];return M.point(i,n).forEach((function(t){-1===r.indexOf(t)&&r.push(t)})),r},intersectRect:function(t,e,i,n,r,s){void 0===r&&(r=!1),s=this.getMatterBodies(s);var o={min:{x:t,y:e},max:{x:t+i,y:e+n}},a=[];return M.region(s,o,r).forEach((function(t){-1===a.indexOf(t)&&a.push(t)})),a},intersectRay:function(t,e,i,n,r,s){void 0===r&&(r=1),s=this.getMatterBodies(s);for(var o=[],a=M.ray(s,F.create(t,e),F.create(i,n),r),h=0;h<a.length;h++)o.push(a[h].body);return o},intersectBody:function(t,e){e=this.getMatterBodies(e);for(var i=[],n=M.collides(t,e),r=0;r<n.length;r++){var s=n[r];s.bodyA===t?i.push(s.bodyB):i.push(s.bodyA)}return i},overlap:function(t,e,i,n,r){void 0===i&&(i=null),void 0===n&&(n=null),void 0===r&&(r=i),Array.isArray(t)||(t=[t]),t=this.getMatterBodies(t),e=this.getMatterBodies(e);for(var s=!1,o=0;o<t.length;o++)for(var a=t[o],h=M.collides(a,e),l=0;l<h.length;l++){var u=h[l],c=u.bodyA.id===a.id?u.bodyB:u.bodyA;if(!n||n.call(r,a,c,u))if(s=!0,i)i.call(r,a,c,u);else if(!n)return!0}return s},setCollisionCategory:function(t,e){return(t=this.getMatterBodies(t)).forEach((function(t){t.collisionFilter.category=e})),this},setCollisionGroup:function(t,e){return(t=this.getMatterBodies(t)).forEach((function(t){t.collisionFilter.group=e})),this},setCollidesWith:function(t,e){t=this.getMatterBodies(t);var i=0;if(Array.isArray(e))for(var n=0;n<e.length;n++)i|=e[n];else i=e;return t.forEach((function(t){t.collisionFilter.mask=i})),this},getMatterBodies:function(t){if(!t)return this.world.getAllBodies();Array.isArray(t)||(t=[t]);for(var e=[],i=0;i<t.length;i++){var n=t[i].hasOwnProperty("body")?t[i].body:t[i];e.push(n)}return e},setVelocity:function(t,e,i){t=this.getMatterBodies(t);var n=this._tempVec2;return n.x=e,n.y=i,t.forEach((function(t){o.setVelocity(t,n)})),this},setVelocityX:function(t,e){t=this.getMatterBodies(t);var i=this._tempVec2;return i.x=e,t.forEach((function(t){i.y=t.velocity.y,o.setVelocity(t,i)})),this},setVelocityY:function(t,e){t=this.getMatterBodies(t);var i=this._tempVec2;return i.y=e,t.forEach((function(t){i.x=t.velocity.x,o.setVelocity(t,i)})),this},setAngularVelocity:function(t,e){return(t=this.getMatterBodies(t)).forEach((function(t){o.setAngularVelocity(t,e)})),this},applyForce:function(t,e){t=this.getMatterBodies(t);var i=this._tempVec2;return t.forEach((function(t){i.x=t.position.x,i.y=t.position.y,o.applyForce(t,i,e)})),this},applyForceFromPosition:function(t,e,i,n){t=this.getMatterBodies(t);var r=this._tempVec2;return t.forEach((function(t){void 0===n&&(n=t.angle),r.x=i*Math.cos(n),r.y=i*Math.sin(n),o.applyForce(t,e,r)})),this},applyForceFromAngle:function(t,e,i){t=this.getMatterBodies(t);var n=this._tempVec2;return t.forEach((function(t){void 0===i&&(i=t.angle),n.x=e*Math.cos(i),n.y=e*Math.sin(i),o.applyForce(t,{x:t.position.x,y:t.position.y},n)})),this},getConstraintLength:function(t){var e=t.pointA.x,i=t.pointA.y,n=t.pointB.x,r=t.pointB.y;return t.bodyA&&(e+=t.bodyA.position.x,i+=t.bodyA.position.y),t.bodyB&&(n+=t.bodyB.position.x,r+=t.bodyB.position.y),g(e,i,n,r)},alignBody:function(t,e,i,r){var s;switch(t=t.hasOwnProperty("body")?t.body:t,r){case n.TOP_LEFT:case n.LEFT_TOP:s=this.bodyBounds.getTopLeft(t,e,i);break;case n.TOP_CENTER:s=this.bodyBounds.getTopCenter(t,e,i);break;case n.TOP_RIGHT:case n.RIGHT_TOP:s=this.bodyBounds.getTopRight(t,e,i);break;case n.LEFT_CENTER:s=this.bodyBounds.getLeftCenter(t,e,i);break;case n.CENTER:s=this.bodyBounds.getCenter(t,e,i);break;case n.RIGHT_CENTER:s=this.bodyBounds.getRightCenter(t,e,i);break;case n.LEFT_BOTTOM:case n.BOTTOM_LEFT:s=this.bodyBounds.getBottomLeft(t,e,i);break;case n.BOTTOM_CENTER:s=this.bodyBounds.getBottomCenter(t,e,i);break;case n.BOTTOM_RIGHT:case n.RIGHT_BOTTOM:s=this.bodyBounds.getBottomRight(t,e,i)}return s&&o.setPosition(t,s),this},shutdown:function(){var t=this.systems.events;this.world&&(t.off(O.UPDATE,this.world.update,this.world),t.off(O.POST_UPDATE,this.world.postUpdate,this.world)),t.off(O.SHUTDOWN,this.shutdown,this),this.add&&this.add.destroy(),this.world&&this.world.destroy(),this.add=null,this.world=null},destroy:function(){this.shutdown(),this.scene.sys.events.off(O.START,this.start,this),this.scene=null,this.systems=null}});R.register("MatterPhysics",N,"matterPhysics"),t.exports=N},34803:(t,e,i)=>{var n=i(9674),r=i(83419),s=i(31884),o=i(95643),a=i(95540),h=i(72699),l=i(68287),u=i(26099),c=new r({Extends:l,Mixins:[s.Bounce,s.Collision,s.Force,s.Friction,s.Gravity,s.Mass,s.Sensor,s.SetBody,s.Sleep,s.Static,s.Transform,s.Velocity,h],initialize:function(t,e,i,r,s,h){o.call(this,t.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new n(this),this.setTexture(r,s),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new u(e,i);var l=a(h,"shape",null);l?this.setBody(l,h):this.setRectangle(this.width,this.height,h),this.setPosition(e,i),this.initPipeline(),this.initPostPipeline(!0)}});t.exports=c},73834:(t,e,i)=>{var n=i(66280),r=i(22562),s=i(83419),o=i(31884),a=i(62644),h=i(50792),l=i(95540),u=i(97022),c=i(41598),d=new s({Extends:h,Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.Static],initialize:function(t,e,i){h.call(this),this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var n=l(i,"body",null),s=l(i,"addToWorld",!0);if(n)this.setBody(n,s);else{var o=e.getCollisionGroup();l(o,"objects",[]).length>0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}if(e.flipX||e.flipY){var a={x:e.getCenterX(),y:e.getCenterY()},u=e.flipX?-1:1,c=e.flipY?-1:1;r.scale(n,u,c,a)}},setFromTileRectangle:function(t){void 0===t&&(t={}),u(t,"isStatic")||(t.isStatic=!0),u(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,r=e.y+e.height/2,s=n.rectangle(i,r,e.width,e.height,t);return this.setBody(s,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),u(t,"isStatic")||(t.isStatic=!0),u(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,s=this.tile.getLeft(),o=this.tile.getTop(),h=this.tile.getCollisionGroup(),d=l(h,"objects",[]),p=[],f=0;f<d.length;f++){var m=d[f],g=s+m.x*e,v=o+m.y*i,y=m.width*e,x=m.height*i,E=null;if(m.rectangle)E=n.rectangle(g+y/2,v+x/2,y,x,t);else if(m.ellipse)E=n.circle(g+y/2,v+x/2,y/2,t);else if(m.polygon||m.polyline){var T=(m.polygon?m.polygon:m.polyline).map((function(t){return{x:t.x*e,y:t.y*i}})),_=c.create(T),w=c.centre(_);g+=w.x,v+=w.y,E=n.fromVertices(g,v,_,t)}E&&p.push(E)}if(1===p.length)this.setBody(p[0],t.addToWorld);else if(p.length>1){var S=a(t);S.parts=p,this.setBody(r.create(S),S.addToWorld)}return this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});t.exports=d},19496:(t,e,i)=>{var n=i(66280),r=i(22562),s=i(53402),o=i(95540),a=i(41598),h={parseBody:function(t,e,i,n){void 0===n&&(n={});for(var a=o(i,"fixtures",[]),h=[],l=0;l<a.length;l++)for(var u=this.parseFixture(a[l]),c=0;c<u.length;c++)h.push(u[c]);var d=s.clone(i,!0);s.extend(d,n,!0),delete d.fixtures,delete d.type;var p=r.create(d);return r.setParts(p,h),r.setPosition(p,{x:t,y:e}),p},parseFixture:function(t){var e,i=s.extend({},!1,t);if(delete i.circle,delete i.vertices,t.circle){var r=o(t.circle,"x"),a=o(t.circle,"y"),h=o(t.circle,"radius");e=[n.circle(r,a,h,i)]}else t.vertices&&(e=this.parseVertices(t.vertices,i));return e},parseVertices:function(t,e){void 0===e&&(e={});for(var i=[],o=0;o<t.length;o++)a.clockwiseSort(t[o]),i.push(r.create(s.extend({position:a.centre(t[o]),vertices:t[o]},e)));return n.flagCoincidentParts(i)}};t.exports=h},85791:(t,e,i)=>{var n=i(66280),r=i(22562),s={parseBody:function(t,e,i,s){var o;void 0===s&&(s={});var a=i.vertices;if(1===a.length)s.vertices=a[0],o=r.create(s),n.flagCoincidentParts(o.parts);else{for(var h=[],l=0;l<a.length;l++){var u=r.create({vertices:a[l]});h.push(u)}n.flagCoincidentParts(h),s.parts=h,o=r.create(s)}return o.label=i.label,r.setPosition(o,{x:t,y:e}),o}};t.exports=s},98713:(t,e,i)=>{var n=i(15647),r=i(83419),s=i(69351),o=i(48140),a=i(81388),h=i(1121),l=i(8214),u=i(46975),c=i(53614),d=i(26099),p=i(41598),f=new r({initialize:function(t,e,i){void 0===i&&(i={});this.scene=t,this.world=e,this.camera=null,this.pointer=null,this.active=!0,this.position=new d,this.body=null,this.part=null,this.constraint=o.create(u(i,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(h.BEFORE_UPDATE,this.update,this),t.sys.input.on(l.POINTER_DOWN,this.onDown,this),t.sys.input.on(l.POINTER_UP,this.onUp,this)},onDown:function(t){this.pointer||(this.pointer=t,this.camera=t.camera)},onUp:function(t){t===this.pointer&&(this.pointer=null)},getBody:function(t){var e=this.position,i=this.constraint;this.camera.getWorldPoint(t.x,t.y,e);for(var r=s.allBodies(this.world.localWorld),o=0;o<r.length;o++){var l=r[o];if(!l.ignorePointer&&n.contains(l.bounds,e)&&a.canCollide(l.collisionFilter,i.collisionFilter)&&this.hitTestBody(l,e))return this.world.emit(h.DRAG_START,l,this.part,this),!0}return!1},hitTestBody:function(t,e){for(var i=this.constraint,n=t.parts.length,r=n>1?1:0;r<n;r++){var s=t.parts[r];if(p.contains(s.vertices,e))return i.pointA=e,i.pointB={x:e.x-t.position.x,y:e.y-t.position.y},i.bodyB=t,i.angleB=t.angle,c.set(t,!1),this.part=s,this.body=t,!0}return!1},update:function(){var t=this.pointer,e=this.body;if(this.active&&t)if(t.isDown||!e){if(t.isDown){if(!this.camera||!e&&!this.getBody(t))return;e=this.body;var i=this.position,n=this.constraint;this.camera.getWorldPoint(t.x,t.y,i),n.pointA.x=i.x,n.pointA.y=i.y,c.set(e,!1),this.world.emit(h.DRAG,e,this)}}else this.stopDrag();else e&&this.stopDrag()},stopDrag:function(){var t=this.body,e=this.constraint;e.bodyB=null,e.pointB=null,this.pointer=null,this.body=null,this.part=null,t&&this.world.emit(h.DRAG_END,t,this)},destroy:function(){this.world.removeConstraint(this.constraint),this.pointer=null,this.constraint=null,this.body=null,this.part=null,this.world.off(h.BEFORE_UPDATE,this.update),this.scene.sys.input.off(l.POINTER_DOWN,this.onDown,this),this.scene.sys.input.off(l.POINTER_UP,this.onUp,this)}});t.exports=f},68243:(t,e,i)=>{var n=i(66280),r=i(22562),s=i(83419),o=i(53402),a=i(69351),h=i(48413),l=i(50792),u=i(1121),c=i(95540),d=i(35154),p=i(22562),f=i(35810),m=i(73834),g=i(4372),v=i(31725),y=new s({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.engine=h.create(e),this.localWorld=this.engine.world;var i=d(e,"gravity",null);i?this.setGravity(i.x,i.y,i.scale):!1===i&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=d(e,"enabled",!0),this.getDelta=d(e,"getDelta",this.update60Hz);var n=c(e,"runner",{}),r=c(n,"fps",!1),s=c(n,"fps",60),o=c(n,"delta",1e3/s),a=c(n,"deltaMin",1e3/s),u=c(n,"deltaMax",1e3/(.5*s));r||(s=1e3/o),this.runner={fps:s,deltaSampleSize:c(n,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:c(n,"isFixed",!1),delta:o,deltaMin:a,deltaMax:u},this.autoUpdate=d(e,"autoUpdate",!0);var p=d(e,"debug",!1);if(this.drawDebug="object"==typeof p||p,this.debugGraphic,this.debugConfig={showAxes:c(p,"showAxes",!1),showAngleIndicator:c(p,"showAngleIndicator",!1),angleColor:c(p,"angleColor",15208787),showBroadphase:c(p,"showBroadphase",!1),broadphaseColor:c(p,"broadphaseColor",16757760),showBounds:c(p,"showBounds",!1),boundsColor:c(p,"boundsColor",16777215),showVelocity:c(p,"showVelocity",!1),velocityColor:c(p,"velocityColor",44783),showCollisions:c(p,"showCollisions",!1),collisionColor:c(p,"collisionColor",16094476),showSeparations:c(p,"showSeparations",!1),separationColor:c(p,"separationColor",16753920),showBody:c(p,"showBody",!0),showStaticBody:c(p,"showStaticBody",!0),showInternalEdges:c(p,"showInternalEdges",!1),renderFill:c(p,"renderFill",!1),renderLine:c(p,"renderLine",!0),fillColor:c(p,"fillColor",1075465),fillOpacity:c(p,"fillOpacity",1),lineColor:c(p,"lineColor",2678297),lineOpacity:c(p,"lineOpacity",1),lineThickness:c(p,"lineThickness",1),staticFillColor:c(p,"staticFillColor",857979),staticLineColor:c(p,"staticLineColor",1255396),showSleeping:c(p,"showSleeping",!1),staticBodySleepOpacity:c(p,"staticBodySleepOpacity",.7),sleepFillColor:c(p,"sleepFillColor",4605510),sleepLineColor:c(p,"sleepLineColor",10066585),showSensors:c(p,"showSensors",!0),sensorFillColor:c(p,"sensorFillColor",857979),sensorLineColor:c(p,"sensorLineColor",1255396),showPositions:c(p,"showPositions",!0),positionSize:c(p,"positionSize",4),positionColor:c(p,"positionColor",14697178),showJoint:c(p,"showJoint",!0),jointColor:c(p,"jointColor",14737474),jointLineOpacity:c(p,"jointLineOpacity",1),jointLineThickness:c(p,"jointLineThickness",2),pinSize:c(p,"pinSize",4),pinColor:c(p,"pinColor",4382944),springColor:c(p,"springColor",14697184),anchorColor:c(p,"anchorColor",15724527),anchorSize:c(p,"anchorSize",4),showConvexHulls:c(p,"showConvexHulls",!1),hullColor:c(p,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),c(e,"setBounds",!1)){var f=e.setBounds;if("boolean"==typeof f)this.setBounds();else{var m=c(f,"x",0),g=c(f,"y",0),v=c(f,"width",t.sys.scale.width),y=c(f,"height",t.sys.scale.height),x=c(f,"thickness",64),E=c(f,"left",!0),T=c(f,"right",!0),_=c(f,"top",!0),w=c(f,"bottom",!0);this.setBounds(m,g,v,y,x,E,T,_,w)}}},setCompositeRenderStyle:function(t){var e,i,n,r=t.bodies,s=t.constraints,o=t.composites;for(e=0;e<r.length;e++)n=(i=r[e]).render,this.setBodyRenderStyle(i,n.lineColor,n.lineOpacity,n.lineThickness,n.fillColor,n.fillOpacity);for(e=0;e<s.length;e++)n=(i=s[e]).render,this.setConstraintRenderStyle(i,n.lineColor,n.lineOpacity,n.lineThickness,n.pinSize,n.anchorColor,n.anchorSize);for(e=0;e<o.length;e++)i=o[e],this.setCompositeRenderStyle(i);return this},setBodyRenderStyle:function(t,e,i,n,r,s){var o=t.render,a=this.debugConfig;return o?(null==e&&(e=t.isStatic?a.staticLineColor:a.lineColor),null==i&&(i=a.lineOpacity),null==n&&(n=a.lineThickness),null==r&&(r=t.isStatic?a.staticFillColor:a.fillColor),null==s&&(s=a.fillOpacity),!1!==e&&(o.lineColor=e),!1!==i&&(o.lineOpacity=i),!1!==n&&(o.lineThickness=n),!1!==r&&(o.fillColor=r),!1!==s&&(o.fillOpacity=s),this):this},setConstraintRenderStyle:function(t,e,i,n,r,s,o){var a=t.render,h=this.debugConfig;if(!a)return this;if(null==e){var l=a.type;"line"===l?e=h.jointColor:"pin"===l?e=h.pinColor:"spring"===l&&(e=h.springColor)}return null==i&&(i=h.jointLineOpacity),null==n&&(n=h.jointLineThickness),null==r&&(r=h.pinSize),null==s&&(s=h.anchorColor),null==o&&(o=h.anchorSize),!1!==e&&(a.lineColor=e),!1!==i&&(a.lineOpacity=i),!1!==n&&(a.lineThickness=n),!1!==r&&(a.pinSize=r),!1!==s&&(a.anchorColor=s),!1!==o&&(a.anchorSize=o),this},setEventsProxy:function(){var t=this,e=this.engine,i=this.localWorld;this.drawDebug&&(f.on(i,"compositeModified",(function(e){t.setCompositeRenderStyle(e)})),f.on(i,"beforeAdd",(function(e){for(var i=[].concat(e.object),n=0;n<i.length;n++){var r=i[n],s=r.render;"body"===r.type?t.setBodyRenderStyle(r,s.lineColor,s.lineOpacity,s.lineThickness,s.fillColor,s.fillOpacity):"composite"===r.type?t.setCompositeRenderStyle(r):"constraint"===r.type&&t.setConstraintRenderStyle(r,s.lineColor,s.lineOpacity,s.lineThickness,s.pinSize,s.anchorColor,s.anchorSize)}}))),f.on(i,"beforeAdd",(function(e){t.emit(u.BEFORE_ADD,e)})),f.on(i,"afterAdd",(function(e){t.emit(u.AFTER_ADD,e)})),f.on(i,"beforeRemove",(function(e){t.emit(u.BEFORE_REMOVE,e)})),f.on(i,"afterRemove",(function(e){t.emit(u.AFTER_REMOVE,e)})),f.on(e,"beforeUpdate",(function(e){t.emit(u.BEFORE_UPDATE,e)})),f.on(e,"afterUpdate",(function(e){t.emit(u.AFTER_UPDATE,e)})),f.on(e,"collisionStart",(function(e){var i,n,r=e.pairs;r.length>0&&(i=r[0].bodyA,n=r[0].bodyB),t.emit(u.COLLISION_START,e,i,n)})),f.on(e,"collisionActive",(function(e){var i,n,r=e.pairs;r.length>0&&(i=r[0].bodyA,n=r[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,n)})),f.on(e,"collisionEnd",(function(e){var i,n,r=e.pairs;r.length>0&&(i=r[0].bodyA,n=r[0].bodyB),t.emit(u.COLLISION_END,e,i,n)}))},setBounds:function(t,e,i,n,r,s,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===r&&(r=64),void 0===s&&(s=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(s,"left",t-r,e-r,r,n+2*r),this.updateWall(o,"right",t+i,e-r,r,n+2*r),this.updateWall(a,"top",t,e-r,i,r),this.updateWall(h,"bottom",t,e+n,i,r),this},updateWall:function(t,e,i,n,r,s){var o=this.walls[e];t?(o&&g.remove(this.localWorld,o),i+=r/2,n+=s/2,this.walls[e]=this.create(i,n,r,s,{isStatic:!0,friction:0,frictionStatic:0})):(o&&g.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=.001),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,this.localWorld.gravity.scale=i,this},create:function(t,e,i,r,s){var o=n.rectangle(t,e,i,r,s);return g.add(this.localWorld,o),o},add:function(t){return g.add(this.localWorld,t),this},remove:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i],r=n.body?n.body:n;a.remove(this.localWorld,r,e)}return this},removeConstraint:function(t,e){return a.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i<t.length;i++)new m(this,t[i],e);return this},nextGroup:function(t){return p.nextGroup(t)},nextCategory:function(){return p.nextCategory()},pause:function(){return this.enabled=!1,this.emit(u.PAUSE),this},resume:function(){return this.enabled=!0,this.emit(u.RESUME),this},update:function(t,e){if(this.enabled&&this.autoUpdate){var i=this.engine,n=this.runner,r=i.timing;n.isFixed?e=this.getDelta(t,e):(e=t-n.timePrev||n.delta,n.timePrev=t,n.deltaHistory.push(e),n.deltaHistory=n.deltaHistory.slice(-n.deltaSampleSize),e=(e=(e=Math.min.apply(null,n.deltaHistory))<n.deltaMin?n.deltaMin:e)>n.deltaMax?n.deltaMax:e,n.delta=e),n.timeScalePrev=r.timeScale,n.frameCounter+=1,t-n.counterTimestamp>=1e3&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),h.update(i,e)}},step:function(t){h.update(this.engine,t)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==a.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return a.allBodies(this.localWorld)},getAllConstraints:function(){return a.allConstraints(this.localWorld)},getAllComposites:function(){return a.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=a.allBodies(this.localWorld);this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor)}},renderGrid:function(t,e,i,n){e.lineStyle(1,i,n);for(var r=o.keys(t.buckets),s=0;s<r.length;s++){var a=r[s];if(!(t.buckets[a].length<2)){var h=a.split(/C|R/);e.strokeRect(parseInt(h[1],10)*t.bucketWidth,parseInt(h[2],10)*t.bucketHeight,t.bucketWidth,t.bucketHeight)}}return this},renderSeparations:function(t,e,i){e.lineStyle(1,i,1);for(var n=0;n<t.length;n++){var r=t[n];if(r.isActive){var s=r.collision,o=s.bodyA,a=s.bodyB,h=o.position,l=a.position,u=s.penetration,c=o.isStatic||a.isStatic?1:4;a.isStatic&&(c=0),e.lineBetween(l.x,l.y,l.x-u.x*c,l.y-u.y*c),c=o.isStatic||a.isStatic?1:4,o.isStatic&&(c=0),e.lineBetween(h.x,h.y,h.x-u.x*c,h.y-u.y*c)}}return this},renderCollisions:function(t,e,i){var n,r;for(e.lineStyle(1,i,.5),e.fillStyle(i,1),n=0;n<t.length;n++)if((r=t[n]).isActive)for(var s=0;s<r.activeContacts.length;s++){var o=r.activeContacts[s].vertex;e.fillRect(o.x-2,o.y-2,5,5)}for(n=0;n<t.length;n++)if((r=t[n]).isActive){var a=r.collision,h=r.activeContacts;if(h.length>0){var l=h[0].vertex.x,u=h[0].vertex.y;2===h.length&&(l=(h[0].vertex.x+h[1].vertex.x)/2,u=(h[0].vertex.y+h[1].vertex.y)/2),a.bodyB===a.supports[0].body||a.bodyA.isStatic?e.lineBetween(l-8*a.normal.x,u-8*a.normal.y,l,u):e.lineBetween(l+8*a.normal.x,u+8*a.normal.y,l,u)}}return this},renderBodyBounds:function(t,e,i,n){e.lineStyle(1,i,n);for(var r=0;r<t.length;r++){var s=t[r];if(s.render.visible){var o=s.bounds;if(o)e.strokeRect(o.min.x,o.min.y,o.max.x-o.min.x,o.max.y-o.min.y);else for(var a=s.parts,h=a.length>1?1:0;h<a.length;h++){var l=a[h];e.strokeRect(l.bounds.min.x,l.bounds.min.y,l.bounds.max.x-l.bounds.min.x,l.bounds.max.y-l.bounds.min.y)}}}return this},renderBodyAxes:function(t,e,i,n,r){e.lineStyle(1,n,r);for(var s=0;s<t.length;s++){var o,a,h,l=t[s],u=l.parts;if(l.render.visible)if(i)for(a=u.length>1?1:0;a<u.length;a++)for(o=u[a],h=0;h<o.axes.length;h++){var c=o.axes[h];e.lineBetween(o.position.x,o.position.y,o.position.x+20*c.x,o.position.y+20*c.y)}else for(a=u.length>1?1:0;a<u.length;a++)for(o=u[a],h=0;h<o.axes.length;h++)e.lineBetween(o.position.x,o.position.y,(o.vertices[0].x+o.vertices[o.vertices.length-1].x)/2,(o.vertices[0].y+o.vertices[o.vertices.length-1].y)/2)}return this},renderBodyVelocity:function(t,e,i,n,r){e.lineStyle(r,i,n);for(var s=0;s<t.length;s++){var o=t[s];o.render.visible&&e.lineBetween(o.position.x,o.position.y,o.position.x+2*(o.position.x-o.positionPrev.x),o.position.y+2*(o.position.y-o.positionPrev.y))}return this},renderBodies:function(t){for(var e=this.debugGraphic,i=this.debugConfig,n=i.showBody,r=i.showStaticBody,s=i.showSleeping,o=i.showInternalEdges,a=i.showConvexHulls,h=i.renderFill,l=i.renderLine,u=i.staticBodySleepOpacity,c=i.sleepFillColor,d=i.sleepLineColor,p=i.hullColor,f=0;f<t.length;f++){var m=t[f];if(m.render.visible&&((r||!m.isStatic)&&(n||m.isStatic))){var g=m.render.lineColor,v=m.render.lineOpacity,y=m.render.lineThickness,x=m.render.fillColor,E=m.render.fillOpacity;s&&m.isSleeping&&(m.isStatic?(v*=u,E*=u):(g=d,x=c)),h||(x=null),l||(g=null),this.renderBody(m,e,o,g,v,y,x,E);var T=m.parts.length;a&&T>1&&this.renderConvexHull(m,e,p,y)}}},renderBody:function(t,e,i,n,r,s,o,a){void 0===n&&(n=null),void 0===r&&(r=null),void 0===s&&(s=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h=this.debugConfig,l=h.sensorFillColor,u=h.sensorLineColor,c=t.parts,d=c.length,p=d>1?1:0;p<d;p++){var f=c[p],m=f.render,g=m.opacity;if(m.visible&&0!==g&&(!f.isSensor||h.showSensors)){var v=f.circleRadius;if(e.beginPath(),f.isSensor?(null!==o&&e.fillStyle(l,a*g),null!==n&&e.lineStyle(s,u,r*g)):(null!==o&&e.fillStyle(o,a*g),null!==n&&e.lineStyle(s,n,r*g)),v)e.arc(f.position.x,f.position.y,v,0,2*Math.PI);else{var y=f.vertices,x=y.length;e.moveTo(y[0].x,y[0].y);for(var E=1;E<x;E++){var T=y[E];if(!y[E-1].isInternal||i?e.lineTo(T.x,T.y):e.moveTo(T.x,T.y),E<x&&T.isInternal&&!i){var _=(E+1)%x;e.moveTo(y[_].x,y[_].y)}}e.closePath()}null!==o&&e.fillPath(),null!==n&&e.strokePath()}}if(h.showPositions&&!t.isStatic){var w=t.position.x,S=t.position.y,b=Math.ceil(h.positionSize/2);e.fillStyle(h.positionColor,1),e.fillRect(w-b,S-b,h.positionSize,h.positionSize)}return this},renderConvexHull:function(t,e,i,n){if(void 0===n&&(n=1),t.parts.length>1){var r=t.vertices;e.lineStyle(n,i),e.beginPath(),e.moveTo(r[0].x,r[0].y);for(var s=1;s<r.length;s++)e.lineTo(r[s].x,r[s].y);e.lineTo(r[0].x,r[0].y),e.strokePath()}return this},renderJoints:function(){for(var t=this.debugGraphic,e=a.allConstraints(this.localWorld),i=0;i<e.length;i++){var n=e[i].render,r=n.lineColor,s=n.lineOpacity,o=n.lineThickness,h=n.pinSize,l=n.anchorColor,u=n.anchorSize;this.renderConstraint(e[i],t,r,s,o,h,l,u)}},renderConstraint:function(t,e,i,n,r,s,a,h){var l=t.render;if(!l.visible||!t.pointA||!t.pointB)return this;e.lineStyle(r,i,n);var u,c,d=t.bodyA,p=t.bodyB;if(u=d?v.add(d.position,t.pointA):t.pointA,"pin"===l.type)e.strokeCircle(u.x,u.y,s);else{if(c=p?v.add(p.position,t.pointB):t.pointB,e.beginPath(),e.moveTo(u.x,u.y),"spring"===l.type)for(var f,m=v.sub(c,u),g=v.perp(v.normalise(m)),y=Math.ceil(o.clamp(t.length/5,12,20)),x=1;x<y;x+=1)f=x%2==0?1:-1,e.lineTo(u.x+m.x*(x/y)+g.x*f*4,u.y+m.y*(x/y)+g.y*f*4);e.lineTo(c.x,c.y)}return e.strokePath(),l.anchors&&h>0&&(e.fillStyle(a),e.fillCircle(u.x,u.y,h),e.fillCircle(c.x,c.y,h)),this},resetCollisionIDs:function(){return r._nextCollidingGroupId=1,r._nextNonCollidingGroupId=-1,r._nextCategory=1,this},shutdown:function(){f.off(this.engine),this.removeAllListeners(),g.clear(this.localWorld,!1),h.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=y},70410:t=>{t.exports={setBounce:function(t){return this.body.restitution=t,this}}},66968:t=>{var e={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i<t.length;i++)e|=t[i];else e=t;return this.body.collisionFilter.mask=e,this},setOnCollide:function(t){return this.body.onCollideCallback=t,this},setOnCollideEnd:function(t){return this.body.onCollideEndCallback=t,this},setOnCollideActive:function(t){return this.body.onCollideActiveCallback=t,this},setOnCollideWith:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++){var n=t[i].hasOwnProperty("body")?t[i].body:t[i];this.body.setOnCollideWith(n,e)}return this}};t.exports=e},51607:(t,e,i)=>{var n=i(22562),r={applyForce:function(t){return this._tempVec2.set(this.body.position.x,this.body.position.y),n.applyForce(this.body,this._tempVec2,t),this},applyForceFrom:function(t,e){return n.applyForce(this.body,t,e),this},thrust:function(t){var e=this.body.angle;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(t){var e=this.body.angle-Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(t){var e=this.body.angle+Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(t){var e=this.body.angle-Math.PI;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),n.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};t.exports=r},5436:t=>{var e={setFriction:function(t,e,i){return this.body.friction=t,void 0!==e&&(this.body.frictionAir=e),void 0!==i&&(this.body.frictionStatic=i),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};t.exports=e},39858:t=>{t.exports={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}}},37302:(t,e,i)=>{var n=i(22562),r=i(26099),s={setMass:function(t){return n.setMass(this.body,t),this},setDensity:function(t){return n.setDensity(this.body,t),this},centerOfMass:{get:function(){return new r(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};t.exports=s},39132:t=>{t.exports={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}}},57772:(t,e,i)=>{var n=i(66280),r=i(22562),s=i(43855),o=i(95540),a=i(19496),h=i(85791),l=i(41598),u={setRectangle:function(t,e,i){return this.setBody({type:"rectangle",width:t,height:e},i)},setCircle:function(t,e){return this.setBody({type:"circle",radius:t},e)},setPolygon:function(t,e,i){return this.setBody({type:"polygon",sides:e,radius:t},i)},setTrapezoid:function(t,e,i,n){return this.setBody({type:"trapezoid",width:t,height:e,slope:i},n)},setExistingBody:function(t,e){void 0===e&&(e=!0),this.body&&this.world.remove(this.body,!0),this.body=t;for(var i=0;i<t.parts.length;i++)t.parts[i].gameObject=this;var n=this;if(t.destroy=function(){n.world.remove(n.body,!0),n.body.gameObject=null},e&&(this.world.has(t)&&this.world.remove(t,!0),this.world.add(t)),this._originComponent){var r=t.render.sprite.xOffset,o=t.render.sprite.yOffset,a=t.centerOfMass.x,h=t.centerOfMass.y;if(s(a,.5)&&s(h,.5))this.setOrigin(r+.5,o+.5);else{var l=t.centerOffset.x,u=t.centerOffset.y;this.setOrigin(r+l/this.displayWidth,o+u/this.displayHeight)}}return this},setBody:function(t,e){if(!t)return this;var i;"string"==typeof t&&(t={type:t});var s=o(t,"type","rectangle"),u=o(t,"x",this._tempVec2.x),c=o(t,"y",this._tempVec2.y),d=o(t,"width",this.width),p=o(t,"height",this.height);switch(s){case"rectangle":i=n.rectangle(u,c,d,p,e);break;case"circle":var f=o(t,"radius",Math.max(d,p)/2),m=o(t,"maxSides",25);i=n.circle(u,c,f,e,m);break;case"trapezoid":var g=o(t,"slope",.5);i=n.trapezoid(u,c,d,p,g,e);break;case"polygon":var v=o(t,"sides",5),y=o(t,"radius",Math.max(d,p)/2);i=n.polygon(u,c,v,y,e);break;case"fromVertices":case"fromVerts":var x=o(t,"verts",null);if(x)if("string"==typeof x&&(x=l.fromPath(x)),this.body&&!this.body.hasOwnProperty("temp"))r.setVertices(this.body,x),i=this.body;else{var E=o(t,"flagInternal",!1),T=o(t,"removeCollinear",.01),_=o(t,"minimumArea",10);i=n.fromVertices(u,c,x,e,E,T,_)}break;case"fromPhysicsEditor":i=a.parseBody(u,c,t,e);break;case"fromPhysicsTracer":i=h.parseBody(u,c,t,e)}return i&&this.setExistingBody(i,t.addToWorld),this}};t.exports=u},38083:(t,e,i)=>{var n=i(1121),r=i(53614),s=i(35810),o={setToSleep:function(){return r.set(this.body,!0),this},setAwake:function(){return r.set(this.body,!1),this},setSleepThreshold:function(t){return void 0===t&&(t=60),this.body.sleepThreshold=t,this},setSleepEvents:function(t,e){return this.setSleepStartEvent(t),this.setSleepEndEvent(e),this},setSleepStartEvent:function(t){if(t){var e=this.world;s.on(this.body,"sleepStart",(function(t){e.emit(n.SLEEP_START,t,this)}))}else s.off(this.body,"sleepStart");return this},setSleepEndEvent:function(t){if(t){var e=this.world;s.on(this.body,"sleepEnd",(function(t){e.emit(n.SLEEP_END,t,this)}))}else s.off(this.body,"sleepEnd");return this}};t.exports=o},90556:(t,e,i)=>{var n=i(22562),r={setStatic:function(t){return n.setStatic(this.body,t),this},isStatic:function(){return this.body.isStatic}};t.exports=r},85436:(t,e,i)=>{var n=i(22562),r=i(36383),s=i(86554),o=i(30954),a={x:{get:function(){return this.body.position.x},set:function(t){this._tempVec2.set(t,this.y),n.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(t){this._tempVec2.set(this.x,t),n.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,n.scale(this.body,e,i),n.scale(this.body,t,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,n.scale(this.body,e,i),n.scale(this.body,this._scaleX,t)}},angle:{get:function(){return o(this.body.angle*r.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*r.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(t){this._rotation=s(t),n.setAngle(this.body,this._rotation)}},setPosition:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._tempVec2.set(t,e),n.setPosition(this.body,this._tempVec2),this},setRotation:function(t){return void 0===t&&(t=0),this._rotation=s(t),n.setAngle(this.body,t),this},setFixedRotation:function(){return n.setInertia(this.body,1/0),this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,n.setAngle(this.body,this.rotation),this},setScale:function(t,e,i){void 0===t&&(t=1),void 0===e&&(e=t);var r=1/this._scaleX,s=1/this._scaleY;return this._scaleX=t,this._scaleY=e,n.scale(this.body,r,s,i),n.scale(this.body,t,e,i),this}};t.exports=a},42081:(t,e,i)=>{var n=i(22562),r={setVelocityX:function(t){return this._tempVec2.set(t,this.body.velocity.y),n.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(t){return this._tempVec2.set(this.body.velocity.x,t),n.setVelocity(this.body,this._tempVec2),this},setVelocity:function(t,e){return this._tempVec2.set(t,e),n.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return n.getVelocity(this.body)},setAngularVelocity:function(t){return n.setAngularVelocity(this.body,t),this},getAngularVelocity:function(){return n.getAngularVelocity(this.body)},setAngularSpeed:function(t){return n.setAngularSpeed(this.body,t),this},getAngularSpeed:function(){return n.getAngularSpeed(this.body)}};t.exports=r},31884:(t,e,i)=>{t.exports={Bounce:i(70410),Collision:i(66968),Force:i(51607),Friction:i(5436),Gravity:i(39858),Mass:i(37302),Sensor:i(39132),SetBody:i(57772),Sleep:i(38083),Static:i(90556),Transform:i(85436),Velocity:i(42081)}},85608:t=>{t.exports="afteradd"},1213:t=>{t.exports="afterremove"},25968:t=>{t.exports="afterupdate"},67205:t=>{t.exports="beforeadd"},39438:t=>{t.exports="beforeremove"},44823:t=>{t.exports="beforeupdate"},92593:t=>{t.exports="collisionactive"},60128:t=>{t.exports="collisionend"},76861:t=>{t.exports="collisionstart"},92362:t=>{t.exports="dragend"},76408:t=>{t.exports="drag"},93971:t=>{t.exports="dragstart"},5656:t=>{t.exports="pause"},47861:t=>{t.exports="resume"},79099:t=>{t.exports="sleepend"},35906:t=>{t.exports="sleepstart"},1121:(t,e,i)=>{t.exports={AFTER_ADD:i(85608),AFTER_REMOVE:i(1213),AFTER_UPDATE:i(25968),BEFORE_ADD:i(67205),BEFORE_REMOVE:i(39438),BEFORE_UPDATE:i(44823),COLLISION_ACTIVE:i(92593),COLLISION_END:i(60128),COLLISION_START:i(76861),DRAG_END:i(92362),DRAG:i(76408),DRAG_START:i(93971),PAUSE:i(5656),RESUME:i(47861),SLEEP_END:i(79099),SLEEP_START:i(35906)}},3875:(t,e,i)=>{t.exports={BodyBounds:i(68174),Components:i(31884),Events:i(1121),Factory:i(28137),MatterGameObject:i(75803),Image:i(23181),Matter:i(19933),MatterPhysics:i(42045),PolyDecomp:i(55973),Sprite:i(34803),TileBody:i(73834),PhysicsEditorParser:i(19496),PhysicsJSONParser:i(85791),PointerConstraint:i(98713),World:i(68243)}},22562:(t,e,i)=>{var n={};t.exports=n;var r=i(41598),s=i(31725),o=i(53614),a=i(53402),h=i(15647),l=i(66615);!function(){n._timeCorrection=!0,n._inertiaScale=4,n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,n._baseDelta=1e3/60,n.create=function(e){var i={id:a.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:1e3/60,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=r.centre(e.vertices):e.hasOwnProperty("vertices")||(i.vertices=r.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var n=a.extend(i,e);return t(n,e),n.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},n},n.nextGroup=function(t){return t?n._nextNonCollidingGroupId--:n._nextCollidingGroupId++},n.nextCategory=function(){return n._nextCategory=n._nextCategory<<1,n._nextCategory};var t=function(t,e){if(e=e||{},n.set(t,{bounds:t.bounds||h.create(t.vertices),positionPrev:t.positionPrev||s.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t}),r.rotate(t.vertices,t.angle,t.position),l.rotate(t.axes,t.angle),h.update(t.bounds,t.vertices,t.velocity),n.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia}),1===t.parts.length){var i=t.bounds,o=t.centerOfMass,a=t.centerOffset,u=i.max.x-i.min.x,c=i.max.y-i.min.y;o.x=-(i.min.x-t.position.x)/u,o.y=-(i.min.y-t.position.y)/c,a.x=u*o.x,a.y=c*o.y}};n.set=function(t,e,i){var r;for(r in"string"==typeof e&&(r=e,(e={})[r]=i),e)if(Object.prototype.hasOwnProperty.call(e,r))switch(i=e[r],r){case"isStatic":n.setStatic(t,i);break;case"isSleeping":o.set(t,i);break;case"mass":n.setMass(t,i);break;case"density":n.setDensity(t,i);break;case"inertia":n.setInertia(t,i);break;case"vertices":n.setVertices(t,i);break;case"position":n.setPosition(t,i);break;case"angle":n.setAngle(t,i);break;case"velocity":n.setVelocity(t,i);break;case"angularVelocity":n.setAngularVelocity(t,i);break;case"speed":n.setSpeed(t,i);break;case"angularSpeed":n.setAngularSpeed(t,i);break;case"parts":n.setParts(t,i);break;case"centre":n.setCentre(t,i);break;default:t[r]=i}},n.setStatic=function(t,e){for(var i=0;i<t.parts.length;i++){var n=t.parts[i];e?(n.isStatic||(n._original={restitution:n.restitution,friction:n.friction,mass:n.mass,inertia:n.inertia,density:n.density,inverseMass:n.inverseMass,inverseInertia:n.inverseInertia}),n.restitution=0,n.friction=1,n.mass=n.inertia=n.density=1/0,n.inverseMass=n.inverseInertia=0,n.positionPrev.x=n.position.x,n.positionPrev.y=n.position.y,n.anglePrev=n.angle,n.angularVelocity=0,n.speed=0,n.angularSpeed=0,n.motion=0):n._original&&(n.restitution=n._original.restitution,n.friction=n._original.friction,n.mass=n._original.mass,n.inertia=n._original.inertia,n.density=n._original.density,n.inverseMass=n._original.inverseMass,n.inverseInertia=n._original.inverseInertia,n._original=null),n.isStatic=e}},n.setMass=function(t,e){var i=t.inertia/(t.mass/6);t.inertia=i*(e/6),t.inverseInertia=1/t.inertia,t.mass=e,t.inverseMass=1/t.mass,t.density=t.mass/t.area},n.setDensity=function(t,e){n.setMass(t,e*t.area),t.density=e},n.setInertia=function(t,e){t.inertia=e,t.inverseInertia=1/t.inertia},n.setVertices=function(t,e){e[0].body===t?t.vertices=e:t.vertices=r.create(e,t),t.axes=l.fromVertices(t.vertices),t.area=r.area(t.vertices),n.setMass(t,t.density*t.area);var i=r.centre(t.vertices);r.translate(t.vertices,i,-1),n.setInertia(t,n._inertiaScale*r.inertia(t.vertices,t.mass)),r.translate(t.vertices,t.position),h.update(t.bounds,t.vertices,t.velocity)},n.setParts=function(t,e,i){var s;for(e=e.slice(0),t.parts.length=0,t.parts.push(t),t.parent=t,s=0;s<e.length;s++){var o=e[s];o!==t&&(o.parent=t,t.parts.push(o))}if(1!==t.parts.length){if(i=void 0===i||i){var a=[];for(s=0;s<e.length;s++)a=a.concat(e[s].vertices);r.clockwiseSort(a);var l=r.hull(a),u=r.centre(l);n.setVertices(t,l),r.translate(t.vertices,u)}var c=n._totalProperties(t),d=c.centre.x,p=c.centre.y,f=t.bounds,m=t.centerOfMass,g=t.centerOffset;h.update(f,t.vertices,t.velocity),m.x=-(f.min.x-d)/(f.max.x-f.min.x),m.y=-(f.min.y-p)/(f.max.y-f.min.y),g.x=d,g.y=p,t.area=c.area,t.parent=t,t.position.x=d,t.position.y=p,t.positionPrev.x=d,t.positionPrev.y=p,n.setMass(t,c.mass),n.setInertia(t,c.inertia),n.setPosition(t,c.centre)}},n.setCentre=function(t,e,i){i?(t.positionPrev.x+=e.x,t.positionPrev.y+=e.y,t.position.x+=e.x,t.position.y+=e.y):(t.positionPrev.x=e.x-(t.position.x-t.positionPrev.x),t.positionPrev.y=e.y-(t.position.y-t.positionPrev.y),t.position.x=e.x,t.position.y=e.y)},n.setPosition=function(t,e,i){var n=s.sub(e,t.position);i?(t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.velocity.x=n.x,t.velocity.y=n.y,t.speed=s.magnitude(n)):(t.positionPrev.x+=n.x,t.positionPrev.y+=n.y);for(var o=0;o<t.parts.length;o++){var a=t.parts[o];a.position.x+=n.x,a.position.y+=n.y,r.translate(a.vertices,n),h.update(a.bounds,a.vertices,t.velocity)}},n.setAngle=function(t,e,i){var n=e-t.angle;i?(t.anglePrev=t.angle,t.angularVelocity=n,t.angularSpeed=Math.abs(n)):t.anglePrev+=n;for(var o=0;o<t.parts.length;o++){var a=t.parts[o];a.angle+=n,r.rotate(a.vertices,n,t.position),l.rotate(a.axes,n),h.update(a.bounds,a.vertices,t.velocity),o>0&&s.rotateAbout(a.position,n,t.position,a.position)}},n.setVelocity=function(t,e){var i=t.deltaTime/n._baseDelta;t.positionPrev.x=t.position.x-e.x*i,t.positionPrev.y=t.position.y-e.y*i,t.velocity.x=(t.position.x-t.positionPrev.x)/i,t.velocity.y=(t.position.y-t.positionPrev.y)/i,t.speed=s.magnitude(t.velocity)},n.getVelocity=function(t){var e=n._baseDelta/t.deltaTime;return{x:(t.position.x-t.positionPrev.x)*e,y:(t.position.y-t.positionPrev.y)*e}},n.getSpeed=function(t){return s.magnitude(n.getVelocity(t))},n.setSpeed=function(t,e){n.setVelocity(t,s.mult(s.normalise(n.getVelocity(t)),e))},n.setAngularVelocity=function(t,e){var i=t.deltaTime/n._baseDelta;t.anglePrev=t.angle-e*i,t.angularVelocity=(t.angle-t.anglePrev)/i,t.angularSpeed=Math.abs(t.angularVelocity)},n.getAngularVelocity=function(t){return(t.angle-t.anglePrev)*n._baseDelta/t.deltaTime},n.getAngularSpeed=function(t){return Math.abs(n.getAngularVelocity(t))},n.setAngularSpeed=function(t,e){n.setAngularVelocity(t,a.sign(n.getAngularVelocity(t))*e)},n.translate=function(t,e,i){n.setPosition(t,s.add(t.position,e),i)},n.rotate=function(t,e,i,r){if(i){var s=Math.cos(e),o=Math.sin(e),a=t.position.x-i.x,h=t.position.y-i.y;n.setPosition(t,{x:i.x+(a*s-h*o),y:i.y+(a*o+h*s)},r),n.setAngle(t,t.angle+e,r)}else n.setAngle(t,t.angle+e,r)},n.scale=function(t,e,i,s){var o=0,a=0;s=s||t.position;for(var u=t.inertia===1/0,c=0;c<t.parts.length;c++){var d=t.parts[c];d.scale.x=e,d.scale.y=i,r.scale(d.vertices,e,i,s),d.axes=l.fromVertices(d.vertices),d.area=r.area(d.vertices),n.setMass(d,t.density*d.area),r.translate(d.vertices,{x:-d.position.x,y:-d.position.y}),n.setInertia(d,n._inertiaScale*r.inertia(d.vertices,d.mass)),r.translate(d.vertices,{x:d.position.x,y:d.position.y}),c>0&&(o+=d.area,a+=d.inertia),d.position.x=s.x+(d.position.x-s.x)*e,d.position.y=s.y+(d.position.y-s.y)*i,h.update(d.bounds,d.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(n.setMass(t,t.density*o),n.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null),u&&n.setInertia(t,1/0)},n.update=function(t,e){var i=(e=(void 0!==e?e:1e3/60)*t.timeScale)*e,o=n._timeCorrection?e/(t.deltaTime||e):1,u=1-t.frictionAir*(e/a._baseDelta),c=(t.position.x-t.positionPrev.x)*o,d=(t.position.y-t.positionPrev.y)*o;t.velocity.x=c*u+t.force.x/t.mass*i,t.velocity.y=d*u+t.force.y/t.mass*i,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.deltaTime=e,t.angularVelocity=(t.angle-t.anglePrev)*u*o+t.torque/t.inertia*i,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=s.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var p=0;p<t.parts.length;p++){var f=t.parts[p];r.translate(f.vertices,t.velocity),p>0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(r.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),p>0&&s.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.updateVelocities=function(t){var e=n._baseDelta/t.deltaTime,i=t.velocity;i.x=(t.position.x-t.positionPrev.x)*e,i.y=(t.position.y-t.positionPrev.y)*e,t.speed=Math.sqrt(i.x*i.x+i.y*i.y),t.angularVelocity=(t.angle-t.anglePrev)*e,t.angularSpeed=Math.abs(t.angularVelocity)},n.applyForce=function(t,e,i){var n=e.x-t.position.x,r=e.y-t.position.y;t.force.x+=i.x,t.force.y+=i.y,t.torque+=n*i.y-r*i.x},n._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i<t.parts.length;i++){var n=t.parts[i],r=n.mass!==1/0?n.mass:1;e.mass+=r,e.area+=n.area,e.inertia+=n.inertia,e.centre=s.add(e.centre,s.mult(n.position,r))}return e.centre=s.div(e.centre,e.mass),e}}()},69351:(t,e,i)=>{var n={};t.exports=n;var r=i(35810),s=i(53402),o=i(15647),a=i(22562);n.create=function(t){return s.extend({id:s.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},t)},n.setModified=function(t,e,i,s){if(r.trigger(t,"compositeModified",t),t.isModified=e,e&&t.cache&&(t.cache.allBodies=null,t.cache.allConstraints=null,t.cache.allComposites=null),i&&t.parent&&n.setModified(t.parent,e,i,s),s)for(var o=0;o<t.composites.length;o++){var a=t.composites[o];n.setModified(a,e,i,s)}},n.add=function(t,e){var i=[].concat(e);r.trigger(t,"beforeAdd",{object:e});for(var o=0;o<i.length;o++){var a=i[o];switch(a.type){case"body":if(a.parent!==a){s.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)");break}n.addBody(t,a);break;case"constraint":n.addConstraint(t,a);break;case"composite":n.addComposite(t,a);break;case"mouseConstraint":n.addConstraint(t,a.constraint)}}return r.trigger(t,"afterAdd",{object:e}),t},n.remove=function(t,e,i){var s=[].concat(e);r.trigger(t,"beforeRemove",{object:e});for(var o=0;o<s.length;o++){var a=s[o];switch(a.type){case"body":n.removeBody(t,a,i);break;case"constraint":n.removeConstraint(t,a,i);break;case"composite":n.removeComposite(t,a,i);break;case"mouseConstraint":n.removeConstraint(t,a.constraint)}}return r.trigger(t,"afterRemove",{object:e}),t},n.addComposite=function(t,e){return t.composites.push(e),e.parent=t,n.setModified(t,!0,!0,!1),t},n.removeComposite=function(t,e,i){var r=s.indexOf(t.composites,e);if(-1!==r&&n.removeCompositeAt(t,r),i)for(var o=0;o<t.composites.length;o++)n.removeComposite(t.composites[o],e,!0);return t},n.removeCompositeAt=function(t,e){return t.composites.splice(e,1),n.setModified(t,!0,!0,!1),t},n.addBody=function(t,e){return t.bodies.push(e),n.setModified(t,!0,!0,!1),t},n.removeBody=function(t,e,i){var r=s.indexOf(t.bodies,e);if(-1!==r&&n.removeBodyAt(t,r),i)for(var o=0;o<t.composites.length;o++)n.removeBody(t.composites[o],e,!0);return t},n.removeBodyAt=function(t,e){return t.bodies.splice(e,1),n.setModified(t,!0,!0,!1),t},n.addConstraint=function(t,e){return t.constraints.push(e),n.setModified(t,!0,!0,!1),t},n.removeConstraint=function(t,e,i){var r=s.indexOf(t.constraints,e);if(-1!==r&&n.removeConstraintAt(t,r),i)for(var o=0;o<t.composites.length;o++)n.removeConstraint(t.composites[o],e,!0);return t},n.removeConstraintAt=function(t,e){return t.constraints.splice(e,1),n.setModified(t,!0,!0,!1),t},n.clear=function(t,e,i){if(i)for(var r=0;r<t.composites.length;r++)n.clear(t.composites[r],e,!0);return e?t.bodies=t.bodies.filter((function(t){return t.isStatic})):t.bodies.length=0,t.constraints.length=0,t.composites.length=0,n.setModified(t,!0,!0,!1),t},n.allBodies=function(t){if(t.cache&&t.cache.allBodies)return t.cache.allBodies;for(var e=[].concat(t.bodies),i=0;i<t.composites.length;i++)e=e.concat(n.allBodies(t.composites[i]));return t.cache&&(t.cache.allBodies=e),e},n.allConstraints=function(t){if(t.cache&&t.cache.allConstraints)return t.cache.allConstraints;for(var e=[].concat(t.constraints),i=0;i<t.composites.length;i++)e=e.concat(n.allConstraints(t.composites[i]));return t.cache&&(t.cache.allConstraints=e),e},n.allComposites=function(t){if(t.cache&&t.cache.allComposites)return t.cache.allComposites;for(var e=[].concat(t.composites),i=0;i<t.composites.length;i++)e=e.concat(n.allComposites(t.composites[i]));return t.cache&&(t.cache.allComposites=e),e},n.get=function(t,e,i){var r,s;switch(i){case"body":r=n.allBodies(t);break;case"constraint":r=n.allConstraints(t);break;case"composite":r=n.allComposites(t).concat(t)}return r?0===(s=r.filter((function(t){return t.id.toString()===e.toString()}))).length?null:s[0]:null},n.move=function(t,e,i){return n.remove(t,e),n.add(i,e),t},n.rebase=function(t){for(var e=n.allBodies(t).concat(n.allConstraints(t)).concat(n.allComposites(t)),i=0;i<e.length;i++)e[i].id=s.nextId();return t},n.translate=function(t,e,i){for(var r=i?n.allBodies(t):t.bodies,s=0;s<r.length;s++)a.translate(r[s],e);return t},n.rotate=function(t,e,i,r){for(var s=Math.cos(e),o=Math.sin(e),h=r?n.allBodies(t):t.bodies,l=0;l<h.length;l++){var u=h[l],c=u.position.x-i.x,d=u.position.y-i.y;a.setPosition(u,{x:i.x+(c*s-d*o),y:i.y+(c*o+d*s)}),a.rotate(u,e)}return t},n.scale=function(t,e,i,r,s){for(var o=s?n.allBodies(t):t.bodies,h=0;h<o.length;h++){var l=o[h],u=l.position.x-r.x,c=l.position.y-r.y;a.setPosition(l,{x:r.x+u*e,y:r.y+c*i}),a.scale(l,e,i)}return t},n.bounds=function(t){for(var e=n.allBodies(t),i=[],r=0;r<e.length;r+=1){var s=e[r];i.push(s.bounds.min,s.bounds.max)}return o.create(i)}},4372:(t,e,i)=>{var n={};t.exports=n;var r=i(69351);n.create=r.create,n.add=r.add,n.remove=r.remove,n.clear=r.clear,n.addComposite=r.addComposite,n.addBody=r.addBody,n.addConstraint=r.addConstraint},52284:(t,e,i)=>{var n={};t.exports=n;var r,s,o,a=i(41598),h=i(4506);r=[],s={overlap:0,axis:null},o={overlap:0,axis:null},n.create=function(t,e){return{pair:null,collided:!1,bodyA:t,bodyB:e,parentA:t.parent,parentB:e.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},n.collides=function(t,e,i){if(n._overlapAxes(s,t.vertices,e.vertices,t.axes),s.overlap<=0)return null;if(n._overlapAxes(o,e.vertices,t.vertices,e.axes),o.overlap<=0)return null;var r,l,u=i&&i.table[h.id(t,e)];u?r=u.collision:((r=n.create(t,e)).collided=!0,r.bodyA=t.id<e.id?t:e,r.bodyB=t.id<e.id?e:t,r.parentA=r.bodyA.parent,r.parentB=r.bodyB.parent),t=r.bodyA,e=r.bodyB,l=s.overlap<o.overlap?s:o;var c=r.normal,d=r.supports,p=l.axis,f=p.x,m=p.y;f*(e.position.x-t.position.x)+m*(e.position.y-t.position.y)<0?(c.x=f,c.y=m):(c.x=-f,c.y=-m),r.tangent.x=-c.y,r.tangent.y=c.x,r.depth=l.overlap,r.penetration.x=c.x*r.depth,r.penetration.y=c.y*r.depth;var g=n._findSupports(t,e,c,1),v=0;if(a.contains(t.vertices,g[0])&&(d[v++]=g[0]),a.contains(t.vertices,g[1])&&(d[v++]=g[1]),v<2){var y=n._findSupports(e,t,c,-1);a.contains(e.vertices,y[0])&&(d[v++]=y[0]),v<2&&a.contains(e.vertices,y[1])&&(d[v++]=y[1])}return 0===v&&(d[v++]=g[0]),d.length=v,r},n._overlapAxes=function(t,e,i,n){var r,s,o,a,h,l,u=e.length,c=i.length,d=e[0].x,p=e[0].y,f=i[0].x,m=i[0].y,g=n.length,v=Number.MAX_VALUE,y=0;for(h=0;h<g;h++){var x=n[h],E=x.x,T=x.y,_=d*E+p*T,w=f*E+m*T,S=_,b=w;for(l=1;l<u;l+=1)(a=e[l].x*E+e[l].y*T)>S?S=a:a<_&&(_=a);for(l=1;l<c;l+=1)(a=i[l].x*E+i[l].y*T)>b?b=a:a<w&&(w=a);if((r=(s=S-w)<(o=b-_)?s:o)<v&&(v=r,y=h,r<=0))break}t.axis=n[y],t.overlap=v},n._projectToAxis=function(t,e,i){for(var n=e[0].x*i.x+e[0].y*i.y,r=n,s=1;s<e.length;s+=1){var o=e[s].x*i.x+e[s].y*i.y;o>r?r=o:o<n&&(n=o)}t.min=n,t.max=r},n._findSupports=function(t,e,i,n){var s,o,a,h,l,u=e.vertices,c=u.length,d=t.position.x,p=t.position.y,f=i.x*n,m=i.y*n,g=Number.MAX_VALUE;for(l=0;l<c;l+=1)(h=f*(d-(o=u[l]).x)+m*(p-o.y))<g&&(g=h,s=o);return g=f*(d-(a=u[(c+s.index-1)%c]).x)+m*(p-a.y),f*(d-(o=u[(s.index+1)%c]).x)+m*(p-o.y)<g?(r[0]=s,r[1]=o,r):(r[0]=s,r[1]=a,r)}},43424:t=>{var e={};t.exports=e,e.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}},81388:(t,e,i)=>{var n={};t.exports=n;var r=i(53402),s=i(52284);n.create=function(t){return r.extend({bodies:[],pairs:null},t)},n.setBodies=function(t,e){t.bodies=e.slice(0)},n.clear=function(t){t.bodies=[]},n.collisions=function(t){var e,i,r=[],o=t.pairs,a=t.bodies,h=a.length,l=n.canCollide,u=s.collides;for(a.sort(n._compareBoundsX),e=0;e<h;e++){var c=a[e],d=c.bounds,p=c.bounds.max.x,f=c.bounds.max.y,m=c.bounds.min.y,g=c.isStatic||c.isSleeping,v=c.parts.length,y=1===v;for(i=e+1;i<h;i++){var x=a[i];if((A=x.bounds).min.x>p)break;if(!(f<A.min.y||m>A.max.y)&&(!g||!x.isStatic&&!x.isSleeping)&&l(c.collisionFilter,x.collisionFilter)){var E=x.parts.length;if(y&&1===E)(b=u(c,x,o))&&r.push(b);else for(var T=E>1?1:0,_=v>1?1:0;_<v;_++)for(var w=c.parts[_],S=(d=w.bounds,T);S<E;S++){var b,C=x.parts[S],A=C.bounds;d.min.x>A.max.x||d.max.x<A.min.x||d.max.y<A.min.y||d.min.y>A.max.y||(b=u(w,C,o))&&r.push(b)}}}}return r},n.canCollide=function(t,e){return t.group===e.group&&0!==t.group?t.group>0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)},n._compareBoundsX=function(t,e){return t.bounds.min.x-e.bounds.min.x}},4506:(t,e,i)=>{var n={};t.exports=n;var r=i(43424);n.create=function(t,e){var i=t.bodyA,r=t.bodyB,s={id:n.id(i,r),bodyA:i,bodyB:r,collision:t,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:i.isSensor||r.isSensor,timeCreated:e,timeUpdated:e,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return n.update(s,t,e),s},n.update=function(t,e,i){var n=t.contacts,s=e.supports,o=t.activeContacts,a=e.parentA,h=e.parentB,l=a.vertices.length;t.isActive=!0,t.timeUpdated=i,t.collision=e,t.separation=e.depth,t.inverseMass=a.inverseMass+h.inverseMass,t.friction=a.friction<h.friction?a.friction:h.friction,t.frictionStatic=a.frictionStatic>h.frictionStatic?a.frictionStatic:h.frictionStatic,t.restitution=a.restitution>h.restitution?a.restitution:h.restitution,t.slop=a.slop>h.slop?a.slop:h.slop,e.pair=t,o.length=0;for(var u=0;u<s.length;u++){var c=s[u],d=c.body===a?c.index:l+c.index,p=n[d];p?o.push(p):o.push(n[d]=r.create(c))}},n.setActive=function(t,e,i){e?(t.isActive=!0,t.timeUpdated=i):(t.isActive=!1,t.activeContacts.length=0)},n.id=function(t,e){return t.id<e.id?"A"+t.id+"B"+e.id:"A"+e.id+"B"+t.id}},99561:(t,e,i)=>{var n={};t.exports=n;var r=i(4506),s=i(53402);n.create=function(t){return s.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,s,o,a,h=t.list,l=h.length,u=t.table,c=e.length,d=t.collisionStart,p=t.collisionEnd,f=t.collisionActive;for(d.length=0,p.length=0,f.length=0,a=0;a<l;a++)h[a].confirmedActive=!1;for(a=0;a<c;a++)(o=(n=e[a]).pair)?(o.isActive?f.push(o):d.push(o),r.update(o,n,i),o.confirmedActive=!0):(u[(o=r.create(n,i)).id]=o,d.push(o),h.push(o));var m=[];for(l=h.length,a=0;a<l;a++)(o=h[a]).confirmedActive||(r.setActive(o,!1,i),p.push(o),o.collision.bodyA.isSleeping||o.collision.bodyB.isSleeping||m.push(a));for(a=0;a<m.length;a++)o=h[s=m[a]-a],h.splice(s,1),delete u[o.id]},n.clear=function(t){return t.table={},t.list.length=0,t.collisionStart.length=0,t.collisionActive.length=0,t.collisionEnd.length=0,t}},73296:(t,e,i)=>{var n={};t.exports=n;var r=i(31725),s=i(52284),o=i(15647),a=i(66280),h=i(41598);n.collides=function(t,e){for(var i=[],n=e.length,r=t.bounds,a=s.collides,h=o.overlaps,l=0;l<n;l++){var u=e[l],c=u.parts.length,d=1===c?0:1;if(t!==u&&h(u.bounds,r))for(var p=d;p<c;p++){var f=u.parts[p];if(h(f.bounds,r)){var m=a(f,t);if(m){i.push(m);break}}}}return i},n.ray=function(t,e,i,s){s=s||1e-100;for(var o=r.angle(e,i),h=r.magnitude(r.sub(e,i)),l=.5*(i.x+e.x),u=.5*(i.y+e.y),c=a.rectangle(l,u,h,s,{angle:o}),d=n.collides(c,t),p=0;p<d.length;p+=1){var f=d[p];f.body=f.bodyB=f.bodyA}return d},n.region=function(t,e,i){for(var n=[],r=0;r<t.length;r++){var s=t[r],a=o.overlaps(s.bounds,e);(a&&!i||!a&&i)&&n.push(s)}return n},n.point=function(t,e){for(var i=[],n=0;n<t.length;n++){var r=t[n];if(o.contains(r.bounds,e))for(var s=1===r.parts.length?0:1;s<r.parts.length;s++){var a=r.parts[s];if(o.contains(a.bounds,e)&&h.contains(a.vertices,e)){i.push(r);break}}}return i}},66272:(t,e,i)=>{var n={};t.exports=n;var r=i(41598),s=i(53402),o=i(15647);n._restingThresh=2,n._restingThreshTangent=Math.sqrt(6),n._positionDampen=.9,n._positionWarming=.8,n._frictionNormalMultiplier=5,n._frictionMaxStatic=Number.MAX_VALUE,n.preSolvePosition=function(t){var e,i,n,r=t.length;for(e=0;e<r;e++)(i=t[e]).isActive&&(n=i.activeContacts.length,i.collision.parentA.totalContacts+=n,i.collision.parentB.totalContacts+=n)},n.solvePosition=function(t,e,i){var r,o,a,h,l,u,c,d,p=n._positionDampen*(i||1),f=s.clamp(e/s._baseDelta,0,1),m=t.length;for(r=0;r<m;r++)(o=t[r]).isActive&&!o.isSensor&&(h=(a=o.collision).parentA,l=a.parentB,u=a.normal,o.separation=u.x*(l.positionImpulse.x+a.penetration.x-h.positionImpulse.x)+u.y*(l.positionImpulse.y+a.penetration.y-h.positionImpulse.y));for(r=0;r<m;r++)(o=t[r]).isActive&&!o.isSensor&&(h=(a=o.collision).parentA,l=a.parentB,u=a.normal,d=o.separation-o.slop*f,(h.isStatic||l.isStatic)&&(d*=2),h.isStatic||h.isSleeping||(c=p/h.totalContacts,h.positionImpulse.x+=u.x*d*c,h.positionImpulse.y+=u.y*d*c),l.isStatic||l.isSleeping||(c=p/l.totalContacts,l.positionImpulse.x-=u.x*d*c,l.positionImpulse.y-=u.y*d*c))},n.postSolvePosition=function(t){for(var e=n._positionWarming,i=t.length,s=r.translate,a=o.update,h=0;h<i;h++){var l=t[h],u=l.positionImpulse,c=u.x,d=u.y,p=l.velocity;if(l.totalContacts=0,0!==c||0!==d){for(var f=0;f<l.parts.length;f++){var m=l.parts[f];s(m.vertices,u),a(m.bounds,m.vertices,p),m.position.x+=c,m.position.y+=d}l.positionPrev.x+=c,l.positionPrev.y+=d,c*p.x+d*p.y<0?(u.x=0,u.y=0):(u.x*=e,u.y*=e)}}},n.preSolveVelocity=function(t){var e,i,n=t.length;for(e=0;e<n;e++){var r=t[e];if(r.isActive&&!r.isSensor){var s=r.activeContacts,o=s.length,a=r.collision,h=a.parentA,l=a.parentB,u=a.normal,c=a.tangent;for(i=0;i<o;i++){var d=s[i],p=d.vertex,f=d.normalImpulse,m=d.tangentImpulse;if(0!==f||0!==m){var g=u.x*f+c.x*m,v=u.y*f+c.y*m;h.isStatic||h.isSleeping||(h.positionPrev.x+=g*h.inverseMass,h.positionPrev.y+=v*h.inverseMass,h.anglePrev+=h.inverseInertia*((p.x-h.position.x)*v-(p.y-h.position.y)*g)),l.isStatic||l.isSleeping||(l.positionPrev.x-=g*l.inverseMass,l.positionPrev.y-=v*l.inverseMass,l.anglePrev-=l.inverseInertia*((p.x-l.position.x)*v-(p.y-l.position.y)*g))}}}}},n.solveVelocity=function(t,e){var i,r,o,a,h=e/s._baseDelta,l=h*h*h,u=-n._restingThresh*h,c=n._restingThreshTangent,d=n._frictionNormalMultiplier*h,p=n._frictionMaxStatic,f=t.length;for(o=0;o<f;o++){var m=t[o];if(m.isActive&&!m.isSensor){var g=m.collision,v=g.parentA,y=g.parentB,x=v.velocity,E=y.velocity,T=g.normal.x,_=g.normal.y,w=g.tangent.x,S=g.tangent.y,b=m.activeContacts,C=b.length,A=1/C,R=v.inverseMass+y.inverseMass,M=m.friction*m.frictionStatic*d;for(x.x=v.position.x-v.positionPrev.x,x.y=v.position.y-v.positionPrev.y,E.x=y.position.x-y.positionPrev.x,E.y=y.position.y-y.positionPrev.y,v.angularVelocity=v.angle-v.anglePrev,y.angularVelocity=y.angle-y.anglePrev,a=0;a<C;a++){var L=b[a],O=L.vertex,P=O.x-v.position.x,F=O.y-v.position.y,I=O.x-y.position.x,D=O.y-y.position.y,N=x.x-F*v.angularVelocity,k=x.y+P*v.angularVelocity,B=N-(E.x-D*y.angularVelocity),U=k-(E.y+I*y.angularVelocity),G=T*B+_*U,W=w*B+S*U,X=m.separation+G,V=Math.min(X,1),$=(V=X<0?0:V)*M;W<-$||W>$?(r=W>0?W:-W,(i=m.friction*(W>0?1:-1)*l)<-r?i=-r:i>r&&(i=r)):(i=W,r=p);var H=P*_-F*T,z=I*_-D*T,Y=A/(R+v.inverseInertia*H*H+y.inverseInertia*z*z),j=(1+m.restitution)*G*Y;if(i*=Y,G<u)L.normalImpulse=0;else{var K=L.normalImpulse;L.normalImpulse+=j,L.normalImpulse>0&&(L.normalImpulse=0),j=L.normalImpulse-K}if(W<-c||W>c)L.tangentImpulse=0;else{var q=L.tangentImpulse;L.tangentImpulse+=i,L.tangentImpulse<-r&&(L.tangentImpulse=-r),L.tangentImpulse>r&&(L.tangentImpulse=r),i=L.tangentImpulse-q}var Z=T*j+w*i,Q=_*j+S*i;v.isStatic||v.isSleeping||(v.positionPrev.x+=Z*v.inverseMass,v.positionPrev.y+=Q*v.inverseMass,v.anglePrev+=(P*Q-F*Z)*v.inverseInertia),y.isStatic||y.isSleeping||(y.positionPrev.x-=Z*y.inverseMass,y.positionPrev.y-=Q*y.inverseMass,y.anglePrev-=(I*Q-D*Z)*y.inverseInertia)}}}}},48140:(t,e,i)=>{var n={};t.exports=n;var r=i(41598),s=i(31725),o=i(53614),a=i(15647),h=i(66615),l=i(53402);n._warming=.4,n._torqueDampen=1,n._minLength=1e-6,n.create=function(t){var e=t;e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var i=e.bodyA?s.add(e.bodyA.position,e.pointA):e.pointA,n=e.bodyB?s.add(e.bodyB.position,e.pointB):e.pointB,r=s.magnitude(s.sub(i,n));e.length=void 0!==e.length?e.length:r,e.id=e.id||l.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e<t.length;e+=1){var i=t[e],n=i.constraintImpulse;i.isStatic||0===n.x&&0===n.y&&0===n.angle||(i.position.x+=n.x,i.position.y+=n.y,i.angle+=n.angle)}},n.solveAll=function(t,e){for(var i=l.clamp(e/l._baseDelta,0,1),r=0;r<t.length;r+=1){var s=t[r],o=!s.bodyA||s.bodyA&&s.bodyA.isStatic,a=!s.bodyB||s.bodyB&&s.bodyB.isStatic;(o||a)&&n.solve(t[r],i)}for(r=0;r<t.length;r+=1)o=!(s=t[r]).bodyA||s.bodyA&&s.bodyA.isStatic,a=!s.bodyB||s.bodyB&&s.bodyB.isStatic,o||a||n.solve(t[r],i)},n.solve=function(t,e){var i=t.bodyA,r=t.bodyB,o=t.pointA,a=t.pointB;if(i||r){i&&!i.isStatic&&(s.rotate(o,i.angle-t.angleA,o),t.angleA=i.angle),r&&!r.isStatic&&(s.rotate(a,r.angle-t.angleB,a),t.angleB=r.angle);var h=o,l=a;if(i&&(h=s.add(i.position,o)),r&&(l=s.add(r.position,a)),h&&l){var u=s.sub(h,l),c=s.magnitude(u);c<n._minLength&&(c=n._minLength);var d,p,f,m,g,v=(c-t.length)/c,y=t.stiffness>=1||0===t.length?t.stiffness*e:t.stiffness*e*e,x=t.damping*e,E=s.mult(u,v*y),T=(i?i.inverseMass:0)+(r?r.inverseMass:0),_=T+((i?i.inverseInertia:0)+(r?r.inverseInertia:0));if(x>0){var w=s.create();f=s.div(u,c),g=s.sub(r&&s.sub(r.position,r.positionPrev)||w,i&&s.sub(i.position,i.positionPrev)||w),m=s.dot(f,g)}i&&!i.isStatic&&(p=i.inverseMass/T,i.constraintImpulse.x-=E.x*p,i.constraintImpulse.y-=E.y*p,i.position.x-=E.x*p,i.position.y-=E.y*p,x>0&&(i.positionPrev.x-=x*f.x*m*p,i.positionPrev.y-=x*f.y*m*p),d=s.cross(o,E)/_*n._torqueDampen*i.inverseInertia*(1-t.angularStiffness),i.constraintImpulse.angle-=d,i.angle-=d),r&&!r.isStatic&&(p=r.inverseMass/T,r.constraintImpulse.x+=E.x*p,r.constraintImpulse.y+=E.y*p,r.position.x+=E.x*p,r.position.y+=E.y*p,x>0&&(r.positionPrev.x+=x*f.x*m*p,r.positionPrev.y+=x*f.y*m*p),d=s.cross(a,E)/_*n._torqueDampen*r.inverseInertia*(1-t.angularStiffness),r.constraintImpulse.angle+=d,r.angle+=d)}}},n.postSolveAll=function(t){for(var e=0;e<t.length;e++){var i=t[e],l=i.constraintImpulse;if(!(i.isStatic||0===l.x&&0===l.y&&0===l.angle)){o.set(i,!1);for(var u=0;u<i.parts.length;u++){var c=i.parts[u];r.translate(c.vertices,l),u>0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(r.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&s.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}},n.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+(t.pointA?t.pointA.x:0),y:(t.bodyA?t.bodyA.position.y:0)+(t.pointA?t.pointA.y:0)}},n.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+(t.pointB?t.pointB.x:0),y:(t.bodyB?t.bodyB.position.y:0)+(t.pointB?t.pointB.y:0)}},n.currentLength=function(t){var e=(t.bodyA?t.bodyA.position.x:0)+(t.pointA?t.pointA.x:0),i=(t.bodyA?t.bodyA.position.y:0)+(t.pointA?t.pointA.y:0),n=e-((t.bodyB?t.bodyB.position.x:0)+(t.pointB?t.pointB.x:0)),r=i-((t.bodyB?t.bodyB.position.y:0)+(t.pointB?t.pointB.y:0));return Math.sqrt(n*n+r*r)}},53402:(t,e,i)=>{var n={};t.exports=n,function(){n._baseDelta=1e3/60,n._nextId=0,n._seed=0,n._nowStartTime=+new Date,n._warnedOnce={},n._decomp=null,n.extend=function(t,e){var i,r;"boolean"==typeof e?(i=2,r=e):(i=1,r=!0);for(var s=i;s<arguments.length;s++){var o=arguments[s];if(o)for(var a in o)r&&o[a]&&o[a].constructor===Object?t[a]&&t[a].constructor!==Object?t[a]=o[a]:(t[a]=t[a]||{},n.extend(t[a],r,o[a])):t[a]=o[a]}return t},n.clone=function(t,e){return n.extend({},e,t)},n.keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var i in t)e.push(i);return e},n.values=function(t){var e=[];if(Object.keys){for(var i=Object.keys(t),n=0;n<i.length;n++)e.push(t[i[n]]);return e}for(var r in t)e.push(t[r]);return e},n.get=function(t,e,i,n){e=e.split(".").slice(i,n);for(var r=0;r<e.length;r+=1)t=t[e[r]];return t},n.set=function(t,e,i,r,s){var o=e.split(".").slice(r,s);return n.get(t,e,0,-1)[o[o.length-1]]=i,i},n.shuffle=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(n.random()*(e+1)),r=t[e];t[e]=t[i],t[i]=r}return t},n.choose=function(t){return t[Math.floor(n.random()*t.length)]},n.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},n.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},n.isFunction=function(t){return"function"==typeof t},n.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},n.isString=function(t){return"[object String]"===toString.call(t)},n.clamp=function(t,e,i){return t<e?e:t>i?i:t},n.sign=function(t){return t<0?-1:1},n.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-n._nowStartTime},n.random=function(e,i){return i=void 0!==i?i:1,(e=void 0!==e?e:0)+t()*(i-e)};var t=function(){return n._seed=(9301*n._seed+49297)%233280,n._seed/233280};n.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},n.logLevel=1,n.log=function(){console&&n.logLevel>0&&n.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},n.info=function(){console&&n.logLevel>0&&n.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},n.warn=function(){console&&n.logLevel>0&&n.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},n.warnOnce=function(){var t=Array.prototype.slice.call(arguments).join(" ");n._warnedOnce[t]||(n.warn(t),n._warnedOnce[t]=!0)},n.deprecated=function(t,e,i){t[e]=n.chain((function(){n.warnOnce("🔅 deprecated 🔅",i)}),t[e])},n.nextId=function(){return n._nextId++},n.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1},n.map=function(t,e){if(t.map)return t.map(e);for(var i=[],n=0;n<t.length;n+=1)i.push(e(t[n]));return i},n.topologicalSort=function(t){var e=[],i=[],r=[];for(var s in t)i[s]||r[s]||n._topologicalSort(s,i,r,t,e);return e},n._topologicalSort=function(t,e,i,r,s){var o=r[t]||[];i[t]=!0;for(var a=0;a<o.length;a+=1){var h=o[a];i[h]||(e[h]||n._topologicalSort(h,e,i,r,s))}i[t]=!1,e[t]=!0,s.push(t)},n.chain=function(){for(var t=[],e=0;e<arguments.length;e+=1){var i=arguments[e];i._chained?t.push.apply(t,i._chained):t.push(i)}var n=function(){for(var e,i=new Array(arguments.length),n=0,r=arguments.length;n<r;n++)i[n]=arguments[n];for(n=0;n<t.length;n+=1){var s=t[n].apply(e,i);void 0!==s&&(e=s)}return e};return n._chained=t,n},n.chainPathBefore=function(t,e,i){return n.set(t,e,n.chain(i,n.get(t,e)))},n.chainPathAfter=function(t,e,i){return n.set(t,e,n.chain(n.get(t,e),i))},n.setDecomp=function(t){n._decomp=t},n.getDecomp=function(){var t=n._decomp;try{t||"undefined"==typeof window||(t=window.decomp),t||void 0===i.g||(t=i.g.decomp)}catch(e){t=null}return t}}()},48413:(t,e,i)=>{var n={};t.exports=n;var r=i(53614),s=i(66272),o=i(81388),a=i(99561),h=i(35810),l=i(69351),u=i(48140),c=i(53402),d=i(22562);n.create=function(t){t=t||{};var e=c.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0}},t);return e.world=t.world||l.create({label:"World"}),e.pairs=t.pairs||a.create(),e.detector=t.detector||o.create(),e.grid={buckets:[]},e.world.gravity=e.gravity,e.broadphase=e.grid,e.metrics={},e},n.update=function(t,e){var i,d=c.now(),p=t.world,f=t.detector,m=t.pairs,g=t.timing,v=g.timestamp;e=void 0!==e?e:c._baseDelta,e*=g.timeScale,g.timestamp+=e,g.lastDelta=e;var y={timestamp:g.timestamp,delta:e};h.trigger(t,"beforeUpdate",y);var x=l.allBodies(p),E=l.allConstraints(p);for(p.isModified&&(o.setBodies(f,x),l.setModified(p,!1,!1,!0)),t.enableSleeping&&r.update(x,e),n._bodiesApplyGravity(x,t.gravity),e>0&&n._bodiesUpdate(x,e),h.trigger(t,"beforeSolve",y),u.preSolveAll(x),i=0;i<t.constraintIterations;i++)u.solveAll(E,e);u.postSolveAll(x),f.pairs=t.pairs;var T=o.collisions(f);a.update(m,T,v),t.enableSleeping&&r.afterCollisions(m.list),m.collisionStart.length>0&&h.trigger(t,"collisionStart",{pairs:m.collisionStart,timestamp:g.timestamp,delta:e});var _=c.clamp(20/t.positionIterations,0,1);for(s.preSolvePosition(m.list),i=0;i<t.positionIterations;i++)s.solvePosition(m.list,e,_);for(s.postSolvePosition(x),u.preSolveAll(x),i=0;i<t.constraintIterations;i++)u.solveAll(E,e);for(u.postSolveAll(x),s.preSolveVelocity(m.list),i=0;i<t.velocityIterations;i++)s.solveVelocity(m.list,e);return n._bodiesUpdateVelocities(x),m.collisionActive.length>0&&h.trigger(t,"collisionActive",{pairs:m.collisionActive,timestamp:g.timestamp,delta:e}),m.collisionEnd.length>0&&h.trigger(t,"collisionEnd",{pairs:m.collisionEnd,timestamp:g.timestamp,delta:e}),n._bodiesClearForces(x),h.trigger(t,"afterUpdate",y),t.timing.lastElapsed=c.now()-d,t},n.merge=function(t,e){if(c.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=l.allBodies(t.world),s=0;s<i.length;s++){var o=i[s];r.set(o,!1),o.id=c.nextId()}}},n.clear=function(t){a.clear(t.pairs),o.clear(t.detector)},n._bodiesClearForces=function(t){for(var e=t.length,i=0;i<e;i++){var n=t[i];n.force.x=0,n.force.y=0,n.torque=0}},n._bodiesApplyGravity=function(t,e){var i=void 0!==e.scale?e.scale:.001,n=t.length;if((0!==e.x||0!==e.y)&&0!==i)for(var r=0;r<n;r++){var s=t[r];s.ignoreGravity||s.isStatic||s.isSleeping||(s.force.y+=s.mass*e.y*i,s.force.x+=s.mass*e.x*i)}},n._bodiesUpdate=function(t,e){for(var i=t.length,n=0;n<i;n++){var r=t[n];r.isStatic||r.isSleeping||d.update(r,e)}},n._bodiesUpdateVelocities=function(t){for(var e=t.length,i=0;i<e;i++)d.updateVelocities(t[i])}},35810:(t,e,i)=>{var n={};t.exports=n;var r=i(53402);n.on=function(t,e,i){for(var n,r=e.split(" "),s=0;s<r.length;s++)n=r[s],t.events=t.events||{},t.events[n]=t.events[n]||[],t.events[n].push(i);return i},n.off=function(t,e,i){if(e){"function"==typeof e&&(i=e,e=r.keys(t.events).join(" "));for(var n=e.split(" "),s=0;s<n.length;s++){var o=t.events[n[s]],a=[];if(i&&o)for(var h=0;h<o.length;h++)o[h]!==i&&a.push(o[h]);t.events[n[s]]=a}}else t.events={}},n.trigger=function(t,e,i){var n,s,o,a,h=t.events;if(h&&r.keys(h).length>0){i||(i={}),n=e.split(" ");for(var l=0;l<n.length;l++)if(o=h[s=n[l]]){(a=r.clone(i,!1)).name=s,a.source=t;for(var u=0;u<o.length;u++)o[u].apply(t,[a])}}}},6790:(t,e,i)=>{var n={};t.exports=n;var r=i(73832),s=i(53402);n.name="matter-js",n.version="0.19.0",n.uses=[],n.used=[],n.use=function(){r.use(n,Array.prototype.slice.call(arguments))},n.before=function(t,e){return t=t.replace(/^Matter./,""),s.chainPathBefore(n,t,e)},n.after=function(t,e){return t=t.replace(/^Matter./,""),s.chainPathAfter(n,t,e)}},73832:(t,e,i)=>{var n={};t.exports=n;var r=i(53402);n._registry={},n.register=function(t){if(n.isPlugin(t)||r.warn("Plugin.register:",n.toString(t),"does not implement all required fields."),t.name in n._registry){var e=n._registry[t.name],i=n.versionParse(t.version).number,s=n.versionParse(e.version).number;i>s?(r.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i<s?r.warn("Plugin.register:",n.toString(e),"can not be downgraded to",n.toString(t)):t!==e&&r.warn("Plugin.register:",n.toString(t),"is already registered to different plugin object")}else n._registry[t.name]=t;return t},n.resolve=function(t){return n._registry[n.dependencyParse(t).name]},n.toString=function(t){return"string"==typeof t?t:(t.name||"anonymous")+"@"+(t.version||t.range||"0.0.0")},n.isPlugin=function(t){return t&&t.name&&t.version&&t.install},n.isUsed=function(t,e){return t.used.indexOf(e)>-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),s=r.topologicalSort(i),o=[],a=0;a<s.length;a+=1)if(s[a]!==t.name){var h=n.resolve(s[a]);h?n.isUsed(t,h.name)||(n.isFor(h,t)||(r.warn("Plugin.use:",n.toString(h),"is for",h.for,"but installed on",n.toString(t)+"."),h._warned=!0),h.install?h.install(t):(r.warn("Plugin.use:",n.toString(h),"does not specify an install function."),h._warned=!0),h._warned?(o.push("🔶 "+n.toString(h)),delete h._warned):o.push("✅ "+n.toString(h)),t.used.push(h.name)):o.push("❌ "+s[a])}o.length>0&&!h.silent&&r.info(o.join(" "))}else r.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),s=i.name;if(!(s in(e=e||{}))){t=n.resolve(t)||t,e[s]=r.map(t.uses||[],(function(e){n.isPlugin(e)&&n.register(e);var s=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,s.range)?(r.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(s),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(r.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),s.name}));for(var o=0;o<e[s].length;o+=1)n.dependencies(e[s][o],e);return e}},n.dependencyParse=function(t){return r.isString(t)?(/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-+]+)?))?$/.test(t)||r.warn("Plugin.dependencyParse:",t,"is not a valid dependency string."),{name:t.split("@")[0],range:t.split("@")[1]||"*"}):{name:t.name,range:t.range||t.version}},n.versionParse=function(t){var e=/^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;e.test(t)||r.warn("Plugin.versionParse:",t,"is not a valid version or range.");var i=e.exec(t),n=Number(i[4]),s=Number(i[5]),o=Number(i[6]);return{isRange:Boolean(i[1]||i[2]),version:i[3],range:t,operator:i[1]||i[2]||"",major:n,minor:s,patch:o,parts:[n,s,o],prerelease:i[7],number:1e8*n+1e4*s+o}},n.versionSatisfies=function(t,e){e=e||"*";var i=n.versionParse(e),r=n.versionParse(t);if(i.isRange){if("*"===i.operator||"*"===t)return!0;if(">"===i.operator)return r.number>i.number;if(">="===i.operator)return r.number>=i.number;if("~"===i.operator)return r.major===i.major&&r.minor===i.minor&&r.patch>=i.patch;if("^"===i.operator)return i.major>0?r.major===i.major&&r.number>=i.number:i.minor>0?r.minor===i.minor&&r.patch>=i.patch:r.patch===i.patch}return t===e||"*"===t}},53614:(t,e,i)=>{var n={};t.exports=n;var r=i(22562),s=i(35810),o=i(53402);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e/o._baseDelta,s=n._motionSleepThreshold,a=0;a<t.length;a++){var h=t[a],l=r.getSpeed(h),u=r.getAngularSpeed(h),c=l*l+u*u;if(0===h.force.x&&0===h.force.y){var d=Math.min(h.motion,c),p=Math.max(h.motion,c);h.motion=n._minBias*d+(1-n._minBias)*p,h.sleepThreshold>0&&h.motion<s?(h.sleepCounter+=1,h.sleepCounter>=h.sleepThreshold/i&&n.set(h,!0)):h.sleepCounter>0&&(h.sleepCounter-=1)}else n.set(h,!1)}},n.afterCollisions=function(t){for(var e=n._motionSleepThreshold,i=0;i<t.length;i++){var r=t[i];if(r.isActive){var s=r.collision,o=s.bodyA.parent,a=s.bodyB.parent;if(!(o.isSleeping&&a.isSleeping||o.isStatic||a.isStatic)&&(o.isSleeping||a.isSleeping)){var h=o.isSleeping&&!o.isStatic?o:a,l=h===o?a:o;!h.isStatic&&l.motion>e&&n.set(h,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},66280:(t,e,i)=>{var n={};t.exports=n;var r=i(41598),s=i(53402),o=i(22562),a=i(15647),h=i(31725);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:r.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=r.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(s.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var p={label:"Trapezoid Body",position:{x:t,y:e},vertices:r.fromPath(l)};if(h.chamfer){var f=h.chamfer;p.vertices=r.chamfer(p.vertices,f.radius,f.quality,f.qualityMin,f.qualityMax),delete h.chamfer}return o.create(s.extend({},p,h))},n.circle=function(t,e,i,r,o){r=r||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,s.extend({},a,r))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d<i;d+=1){var p=c+d*l,f=Math.cos(p)*a,m=Math.sin(p)*a;u+="L "+f.toFixed(3)+" "+m.toFixed(3)+" "}var g={label:"Polygon Body",position:{x:t,y:e},vertices:r.fromPath(u)};if(h.chamfer){var v=h.chamfer;g.vertices=r.chamfer(g.vertices,v.radius,v.quality,v.qualityMin,v.qualityMax),delete h.chamfer}return o.create(s.extend({},g,h))},n.fromVertices=function(t,e,i,n,l,u,c,d){var p,f,m,g,v,y,x,E,T,_,w=s.getDecomp();for(p=Boolean(w&&w.quickDecomp),n=n||{},m=[],l=void 0!==l&&l,u=void 0!==u?u:.01,c=void 0!==c?c:10,d=void 0!==d?d:.01,s.isArray(i[0])||(i=[i]),T=0;T<i.length;T+=1)if(v=i[T],!(g=r.isConvex(v))&&!p&&s.warnOnce("Bodies.fromVertices: Install the 'poly-decomp' library and use Common.setDecomp or provide 'decomp' as a global to decompose concave vertices."),g||!p)v=g?r.clockwiseSort(v):r.hull(v),m.push({position:{x:t,y:e},vertices:v});else{var S=v.map((function(t){return[t.x,t.y]}));w.makeCCW(S),!1!==u&&w.removeCollinearPoints(S,u),!1!==d&&w.removeDuplicatePoints&&w.removeDuplicatePoints(S,d);var b=w.quickDecomp(S);for(y=0;y<b.length;y++){var C=b[y].map((function(t){return{x:t[0],y:t[1]}}));c>0&&r.area(C)<c||m.push({position:r.centre(C),vertices:C})}}for(y=0;y<m.length;y++)m[y]=o.create(s.extend(m[y],n));if(l)for(y=0;y<m.length;y++){var A=m[y];for(x=y+1;x<m.length;x++){var R=m[x];if(a.overlaps(A.bounds,R.bounds)){var M=A.vertices,L=R.vertices;for(E=0;E<A.vertices.length;E++)for(_=0;_<R.vertices.length;_++){var O=h.magnitudeSquared(h.sub(M[(E+1)%M.length],L[_])),P=h.magnitudeSquared(h.sub(M[E],L[(_+1)%L.length]));O<5&&P<5&&(M[E].isInternal=!0,L[_].isInternal=!0)}}}}return m.length>1?(f=o.create(s.extend({parts:m.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):m[0]},n.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i<t.length;i++)for(var n=t[i],r=i+1;r<t.length;r++){var s=t[r];if(a.overlaps(n.bounds,s.bounds))for(var o=n.vertices,l=s.vertices,u=0;u<n.vertices.length;u++)for(var c=0;c<s.vertices.length;c++){var d=h.magnitudeSquared(h.sub(o[(u+1)%o.length],l[c])),p=h.magnitudeSquared(h.sub(o[u],l[(c+1)%l.length]));d<e&&p<e&&(o[u].isInternal=!0,l[c].isInternal=!0)}}return t}},74116:(t,e,i)=>{var n={};t.exports=n;var r=i(69351),s=i(48140),o=i(53402),a=i(22562),h=i(66280);n.stack=function(t,e,i,n,s,o,h){for(var l,u=r.create({label:"Stack"}),c=t,d=e,p=0,f=0;f<n;f++){for(var m=0,g=0;g<i;g++){var v=h(c,d,g,f,l,p);if(v){var y=v.bounds.max.y-v.bounds.min.y,x=v.bounds.max.x-v.bounds.min.x;y>m&&(m=y),a.translate(v,{x:.5*x,y:.5*y}),c=v.bounds.max.x+s,r.addBody(u,v),l=v,p+=1}else c+=s}d+=m+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u<l.length;u++){var c=l[u-1],d=l[u],p=c.bounds.max.y-c.bounds.min.y,f=c.bounds.max.x-c.bounds.min.x,m=d.bounds.max.y-d.bounds.min.y,g={bodyA:c,pointA:{x:f*e,y:p*i},bodyB:d,pointB:{x:(d.bounds.max.x-d.bounds.min.x)*n,y:m*a}},v=o.extend(g,h);r.addConstraint(t,s.create(v))}return t.label+=" Chain",t},n.mesh=function(t,e,i,n,a){var h,l,u,c,d,p=t.bodies;for(h=0;h<i;h++){for(l=1;l<e;l++)u=p[l-1+h*e],c=p[l+h*e],r.addConstraint(t,s.create(o.extend({bodyA:u,bodyB:c},a)));if(h>0)for(l=0;l<e;l++)u=p[l+(h-1)*e],c=p[l+h*e],r.addConstraint(t,s.create(o.extend({bodyA:u,bodyB:c},a))),n&&l>0&&(d=p[l-1+(h-1)*e],r.addConstraint(t,s.create(o.extend({bodyA:d,bodyB:c},a)))),n&&l<e-1&&(d=p[l+1+(h-1)*e],r.addConstraint(t,s.create(o.extend({bodyA:d,bodyB:c},a))))}return t.label+=" Mesh",t},n.pyramid=function(t,e,i,r,s,o,h){return n.stack(t,e,i,r,s,o,(function(e,n,o,l,u,c){var d=Math.min(r,Math.ceil(i/2)),p=u?u.bounds.max.x-u.bounds.min.x:0;if(!(l>d||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*p,y:0}),h(t+(u?o*p:0)+o*s,n,o,l,u,c)}))},n.newtonsCradle=function(t,e,i,n,o){for(var a=r.create({label:"Newtons Cradle"}),l=0;l<i;l++){var u=h.circle(t+l*(1.9*n),e+o,n,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),c=s.create({pointA:{x:t+l*(1.9*n),y:e},bodyB:u});r.addBody(a,u),r.addConstraint(a,c)}return a},n.car=function(t,e,i,n,o){var l=a.nextGroup(!0),u=.5*-i+20,c=.5*i-20,d=r.create({label:"Car"}),p=h.rectangle(t,e,i,n,{collisionFilter:{group:l},chamfer:{radius:.5*n},density:2e-4}),f=h.circle(t+u,e+0,o,{collisionFilter:{group:l},friction:.8}),m=h.circle(t+c,e+0,o,{collisionFilter:{group:l},friction:.8}),g=s.create({bodyB:p,pointB:{x:u,y:0},bodyA:f,stiffness:1,length:0}),v=s.create({bodyB:p,pointB:{x:c,y:0},bodyA:m,stiffness:1,length:0});return r.addBody(d,p),r.addBody(d,f),r.addBody(d,m),r.addConstraint(d,g),r.addConstraint(d,v),d},n.softBody=function(t,e,i,r,s,a,l,u,c,d){c=o.extend({inertia:1/0},c),d=o.extend({stiffness:.2,render:{type:"line",anchors:!1}},d);var p=n.stack(t,e,i,r,s,a,(function(t,e){return h.circle(t,e,u,c)}));return n.mesh(p,i,r,l,d),p.label="Soft Body",p}},66615:(t,e,i)=>{var n={};t.exports=n;var r=i(31725),s=i(53402);n.fromVertices=function(t){for(var e={},i=0;i<t.length;i++){var n=(i+1)%t.length,o=r.normalise({x:t[n].y-t[i].y,y:t[i].x-t[n].x}),a=0===o.y?1/0:o.x/o.y;e[a=a.toFixed(3).toString()]=o}return s.values(e)},n.rotate=function(t,e){if(0!==e)for(var i=Math.cos(e),n=Math.sin(e),r=0;r<t.length;r++){var s,o=t[r];s=o.x*i-o.y*n,o.y=o.x*n+o.y*i,o.x=s}}},15647:t=>{var e={};t.exports=e,e.create=function(t){var i={min:{x:0,y:0},max:{x:0,y:0}};return t&&e.update(i,t),i},e.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var n=0;n<e.length;n++){var r=e[n];r.x>t.max.x&&(t.max.x=r.x),r.x<t.min.x&&(t.min.x=r.x),r.y>t.max.y&&(t.max.y=r.y),r.y<t.min.y&&(t.min.y=r.y)}i&&(i.x>0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},e.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},e.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},e.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},e.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},74058:(t,e,i)=>{var n={};t.exports=n;i(15647);var r=i(53402);n.pathToVertices=function(t,e){"undefined"==typeof window||"SVGPathSeg"in window||r.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,s,o,a,h,l,u,c,d,p,f,m=[],g=0,v=0,y=0;e=e||15;var x=function(t,e,i){var n=i%2==1&&i>1;if(!d||t!=d.x||e!=d.y){d&&n?(p=d.x,f=d.y):(p=0,f=0);var r={x:p+t,y:f+e};!n&&d||(d=r),m.push(r),v=p+t,y=f+e}},E=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":v=t.x,y=t.y;break;case"H":v=t.x;break;case"V":y=t.y}x(v,y,t.pathSegType)}};for(n._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i<t.pathSegList.numberOfItems;i+=1)l.push(t.pathSegList.getItem(i));for(u=l.concat();g<o;){if((h=l[t.getPathSegAtLength(g)])!=c){for(;u.length&&u[0]!=h;)E(u.shift());c=h}switch(h.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":a=t.getPointAtLength(g),x(a.x,a.y,0)}g+=e}for(i=0,s=u.length;i<s;++i)E(u[i]);return m},n._svgPathToAbsolute=function(t){for(var e,i,n,r,s,o,a=t.pathSegList,h=0,l=0,u=a.numberOfItems,c=0;c<u;++c){var d=a.getItem(c),p=d.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(p))"x"in d&&(h=d.x),"y"in d&&(l=d.y);else switch("x1"in d&&(n=h+d.x1),"x2"in d&&(s=h+d.x2),"y1"in d&&(r=l+d.y1),"y2"in d&&(o=l+d.y2),"x"in d&&(h+=d.x),"y"in d&&(l+=d.y),p){case"m":a.replaceItem(t.createSVGPathSegMovetoAbs(h,l),c);break;case"l":a.replaceItem(t.createSVGPathSegLinetoAbs(h,l),c);break;case"h":a.replaceItem(t.createSVGPathSegLinetoHorizontalAbs(h),c);break;case"v":a.replaceItem(t.createSVGPathSegLinetoVerticalAbs(l),c);break;case"c":a.replaceItem(t.createSVGPathSegCurvetoCubicAbs(h,l,n,r,s,o),c);break;case"s":a.replaceItem(t.createSVGPathSegCurvetoCubicSmoothAbs(h,l,s,o),c);break;case"q":a.replaceItem(t.createSVGPathSegCurvetoQuadraticAbs(h,l,n,r),c);break;case"t":a.replaceItem(t.createSVGPathSegCurvetoQuadraticSmoothAbs(h,l),c);break;case"a":a.replaceItem(t.createSVGPathSegArcAbs(h,l,d.r1,d.r2,d.angle,d.largeArcFlag,d.sweepFlag),c);break;case"z":case"Z":h=e,l=i}"M"!=p&&"m"!=p||(e=h,i=l)}}},31725:t=>{var e={};t.exports=e,e.create=function(t,e){return{x:t||0,y:e||0}},e.clone=function(t){return{x:t.x,y:t.y}},e.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},e.rotate=function(t,e,i){var n=Math.cos(e),r=Math.sin(e);i||(i={});var s=t.x*n-t.y*r;return i.y=t.x*r+t.y*n,i.x=s,i},e.rotateAbout=function(t,e,i,n){var r=Math.cos(e),s=Math.sin(e);n||(n={});var o=i.x+((t.x-i.x)*r-(t.y-i.y)*s);return n.y=i.y+((t.x-i.x)*s+(t.y-i.y)*r),n.x=o,n},e.normalise=function(t){var i=e.magnitude(t);return 0===i?{x:0,y:0}:{x:t.x/i,y:t.y/i}},e.dot=function(t,e){return t.x*e.x+t.y*e.y},e.cross=function(t,e){return t.x*e.y-t.y*e.x},e.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},e.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},e.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},e.mult=function(t,e){return{x:t.x*e,y:t.y*e}},e.div=function(t,e){return{x:t.x/e,y:t.y/e}},e.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},e.neg=function(t){return{x:-t.x,y:-t.y}},e.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},e._temp=[e.create(),e.create(),e.create(),e.create(),e.create(),e.create()]},41598:(t,e,i)=>{var n={};t.exports=n;var r=i(31725),s=i(53402);n.create=function(t,e){for(var i=[],n=0;n<t.length;n++){var r=t[n],s={x:r.x,y:r.y,index:n,body:e,isInternal:!1};i.push(s)}return i},n.fromPath=function(t,e){var i=[];return t.replace(/L?\s*([-\d.e]+)[\s,]*([-\d.e]+)*/gi,(function(t,e,n){i.push({x:parseFloat(e),y:parseFloat(n)})})),n.create(i,e)},n.centre=function(t){for(var e,i,s,o=n.area(t,!0),a={x:0,y:0},h=0;h<t.length;h++)s=(h+1)%t.length,e=r.cross(t[h],t[s]),i=r.mult(r.add(t[h],t[s]),e),a=r.add(a,i);return r.div(a,6*o)},n.mean=function(t){for(var e={x:0,y:0},i=0;i<t.length;i++)e.x+=t[i].x,e.y+=t[i].y;return r.div(e,t.length)},n.area=function(t,e){for(var i=0,n=t.length-1,r=0;r<t.length;r++)i+=(t[n].x-t[r].x)*(t[n].y+t[r].y),n=r;return e?i/2:Math.abs(i)/2},n.inertia=function(t,e){for(var i,n,s=0,o=0,a=t,h=0;h<a.length;h++)n=(h+1)%a.length,s+=(i=Math.abs(r.cross(a[n],a[h])))*(r.dot(a[n],a[n])+r.dot(a[n],a[h])+r.dot(a[h],a[h])),o+=i;return e/6*(s/o)},n.translate=function(t,e,i){i=void 0!==i?i:1;var n,r=t.length,s=e.x*i,o=e.y*i;for(n=0;n<r;n++)t[n].x+=s,t[n].y+=o;return t},n.rotate=function(t,e,i){if(0!==e){var n,r,s,o,a=Math.cos(e),h=Math.sin(e),l=i.x,u=i.y,c=t.length;for(o=0;o<c;o++)r=(n=t[o]).x-l,s=n.y-u,n.x=l+(r*a-s*h),n.y=u+(r*h+s*a);return t}},n.contains=function(t,e){for(var i,n=e.x,r=e.y,s=t.length,o=t[s-1],a=0;a<s;a++){if(i=t[a],(n-o.x)*(i.y-o.y)+(r-o.y)*(o.x-i.x)>0)return!1;o=i}return!0},n.scale=function(t,e,i,s){if(1===e&&1===i)return t;var o,a;s=s||n.centre(t);for(var h=0;h<t.length;h++)o=t[h],a=r.sub(o,s),t[h].x=s.x+a.x*e,t[h].y=s.y+a.y*i;return t},n.chamfer=function(t,e,i,n,o){e="number"==typeof e?[e]:e||[8],i=void 0!==i?i:-1,n=n||2,o=o||14;for(var a=[],h=0;h<t.length;h++){var l=t[h-1>=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h<e.length?h:e.length-1];if(0!==d){var p=r.normalise({x:u.y-l.y,y:l.x-u.x}),f=r.normalise({x:c.y-u.y,y:u.x-c.x}),m=Math.sqrt(2*Math.pow(d,2)),g=r.mult(s.clone(p),d),v=r.normalise(r.mult(r.add(p,f),.5)),y=r.sub(u,r.mult(v,m)),x=i;-1===i&&(x=1.75*Math.pow(d,.32)),(x=s.clamp(x,n,o))%2==1&&(x+=1);for(var E=Math.acos(r.dot(p,f))/x,T=0;T<x;T++)a.push(r.add(r.rotate(g,E*T),y))}else a.push(u)}return a},n.clockwiseSort=function(t){var e=n.mean(t);return t.sort((function(t,i){return r.angle(e,t)-r.angle(e,i)})),t},n.isConvex=function(t){var e,i,n,r,s=0,o=t.length;if(o<3)return null;for(e=0;e<o;e++)if(n=(e+2)%o,r=(t[i=(e+1)%o].x-t[e].x)*(t[n].y-t[i].y),(r-=(t[i].y-t[e].y)*(t[n].x-t[i].x))<0?s|=1:r>0&&(s|=2),3===s)return!1;return 0!==s||null},n.hull=function(t){var e,i,n=[],s=[];for((t=t.slice(0)).sort((function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y})),i=0;i<t.length;i+=1){for(e=t[i];s.length>=2&&r.cross3(s[s.length-2],s[s.length-1],e)<=0;)s.pop();s.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&r.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),s.pop(),n.concat(s)}},18210:(t,e,i)=>{var n=i(19933),r={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.19.0",silent:!0,install:function(t){t.after("Body.create",(function(){r.Body.init(this)})),t.before("Engine.update",(function(t){r.Engine.update(t)}))},Body:{init:function(t){t.plugin.attractors=t.plugin.attractors||[]}},Engine:{update:function(t){for(var e=n.Composite.allBodies(t.world),i=0;i<e.length;i++){var r=e[i],s=r.plugin.attractors;if(s&&s.length>0)for(var o=0;o<e.length;o++){var a=e[o];if(i!==o)for(var h=0;h<s.length;h++){var l=s[h],u=l;n.Common.isFunction(l)&&(u=l(r,a)),u&&n.Body.applyForce(a,a.position,u)}}}}},Attractors:{gravityConstant:.001,gravity:function(t,e){var i=n.Vector.sub(e.position,t.position),s=n.Vector.magnitudeSquared(i)||1e-4,o=n.Vector.normalise(i),a=-r.Attractors.gravityConstant*(t.mass*e.mass/s),h=n.Vector.mult(o,a);n.Body.applyForce(t,t.position,n.Vector.neg(h)),n.Body.applyForce(e,e.position,h)}}};t.exports=r},40178:t=>{t.exports={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.19.0",silent:!0,install:function(t){t.after("Engine.create",(function(){t.Events.on(this,"collisionStart",(function(e){e.pairs.map((function(e){var i=e.bodyA,n=e.bodyB;i.gameObject&&i.gameObject.emit("collide",i,n,e),n.gameObject&&n.gameObject.emit("collide",n,i,e),t.Events.trigger(i,"onCollide",{pair:e}),t.Events.trigger(n,"onCollide",{pair:e}),i.onCollideCallback&&i.onCollideCallback(e),n.onCollideCallback&&n.onCollideCallback(e),i.onCollideWith[n.id]&&i.onCollideWith[n.id](n,e),n.onCollideWith[i.id]&&n.onCollideWith[i.id](i,e)}))})),t.Events.on(this,"collisionActive",(function(e){e.pairs.map((function(e){var i=e.bodyA,n=e.bodyB;i.gameObject&&i.gameObject.emit("collideActive",i,n,e),n.gameObject&&n.gameObject.emit("collideActive",n,i,e),t.Events.trigger(i,"onCollideActive",{pair:e}),t.Events.trigger(n,"onCollideActive",{pair:e}),i.onCollideActiveCallback&&i.onCollideActiveCallback(e),n.onCollideActiveCallback&&n.onCollideActiveCallback(e)}))})),t.Events.on(this,"collisionEnd",(function(e){e.pairs.map((function(e){var i=e.bodyA,n=e.bodyB;i.gameObject&&i.gameObject.emit("collideEnd",i,n,e),n.gameObject&&n.gameObject.emit("collideEnd",n,i,e),t.Events.trigger(i,"onCollideEnd",{pair:e}),t.Events.trigger(n,"onCollideEnd",{pair:e}),i.onCollideEndCallback&&i.onCollideEndCallback(e),n.onCollideEndCallback&&n.onCollideEndCallback(e)}))}))}))}}},74507:(t,e,i)=>{var n=i(19933),r={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.19.0",silent:!0,install:function(t){t.after("Engine.update",(function(){r.Engine.update(this)}))},Engine:{update:function(t){for(var e=t.world,i=n.Composite.allBodies(e),s=n.Composite.allComposites(e),o=0;o<i.length;o+=1){var a=i[o];a.plugin.wrap&&r.Body.wrap(a,a.plugin.wrap)}for(o=0;o<s.length;o+=1){var h=s[o];h.plugin.wrap&&r.Composite.wrap(h,h.plugin.wrap)}}},Bounds:{wrap:function(t,e){var i=null,n=null;if(void 0!==e.min.x&&void 0!==e.max.x&&(t.min.x>e.max.x?i=e.min.x-t.max.x:t.max.x<e.min.x&&(i=e.max.x-t.min.x)),void 0!==e.min.y&&void 0!==e.max.y&&(t.min.y>e.max.y?n=e.min.y-t.max.y:t.max.y<e.min.y&&(n=e.max.y-t.min.y)),null!==i||null!==n)return{x:i||0,y:n||0}}},Body:{wrap:function(t,e){var i=r.Bounds.wrap(t.bounds,e);return i&&n.Body.translate(t,i),i}},Composite:{bounds:function(t){for(var e=n.Composite.allBodies(t),i=[],r=0;r<e.length;r+=1){var s=e[r];i.push(s.bounds.min,s.bounds.max)}return n.Bounds.create(i)},wrap:function(t,e){var i=r.Bounds.wrap(r.Composite.bounds(t),e);return i&&n.Composite.translate(t,i),i}}};t.exports=r},55973:t=>{function e(t,e,i){i=i||0;var n,r,s,o,a,h,l,u=[0,0];return n=t[1][1]-t[0][1],r=t[0][0]-t[1][0],s=n*t[0][0]+r*t[0][1],o=e[1][1]-e[0][1],a=e[0][0]-e[1][0],h=o*e[0][0]+a*e[0][1],w(l=n*a-o*r,0,i)||(u[0]=(a*s-r*h)/l,u[1]=(n*h-o*s)/l),u}function i(t,e,i,n){var r=e[0]-t[0],s=e[1]-t[1],o=n[0]-i[0],a=n[1]-i[1];if(o*s-a*r==0)return!1;var h=(r*(i[1]-t[1])+s*(t[0]-i[0]))/(o*s-a*r),l=(o*(t[1]-i[1])+a*(i[0]-t[0]))/(a*r-o*s);return h>=0&&h<=1&&l>=0&&l<=1}function n(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return n(t,e,i)>0}function s(t,e,i){return n(t,e,i)>=0}function o(t,e,i){return n(t,e,i)<0}function a(t,e,i){return n(t,e,i)<=0}t.exports={decomp:function(t){var e=E(t);return e.length>0?T(t,e):[t]},quickDecomp:function t(e,i,n,h,l,u,m){u=u||100,m=m||0,l=l||25,i=void 0!==i?i:[],n=n||[],h=h||[];var g=[0,0],v=[0,0],x=[0,0],E=0,T=0,w=0,S=0,b=0,C=0,A=0,R=[],M=[],L=e,O=e;if(O.length<3)return i;if(++m>u)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var P=0;P<e.length;++P)if(f(L,P)){n.push(L[P]),E=T=Number.MAX_VALUE;for(var F=0;F<e.length;++F)r(d(L,P-1),d(L,P),d(L,F))&&a(d(L,P-1),d(L,P),d(L,F-1))&&(x=_(d(L,P-1),d(L,P),d(L,F),d(L,F-1)),o(d(L,P+1),d(L,P),x)&&(w=c(L[P],x))<T&&(T=w,v=x,C=F)),r(d(L,P+1),d(L,P),d(L,F+1))&&a(d(L,P+1),d(L,P),d(L,F))&&(x=_(d(L,P+1),d(L,P),d(L,F),d(L,F+1)),r(d(L,P-1),d(L,P),x)&&(w=c(L[P],x))<E&&(E=w,g=x,b=F));if(C===(b+1)%e.length)x[0]=(v[0]+g[0])/2,x[1]=(v[1]+g[1])/2,h.push(x),P<b?(p(R,L,P,b+1),R.push(x),M.push(x),0!==C&&p(M,L,C,L.length),p(M,L,0,P+1)):(0!==P&&p(R,L,P,L.length),p(R,L,0,b+1),R.push(x),M.push(x),p(M,L,C,P+1));else{if(C>b&&(b+=e.length),S=Number.MAX_VALUE,b<C)return i;for(F=C;F<=b;++F)s(d(L,P-1),d(L,P),d(L,F))&&a(d(L,P+1),d(L,P),d(L,F))&&(w=c(d(L,P),d(L,F)))<S&&y(L,P,F)&&(S=w,A=F%e.length);P<A?(p(R,L,P,A+1),0!==A&&p(M,L,A,O.length),p(M,L,0,P+1)):(0!==P&&p(R,L,P,O.length),p(R,L,0,A+1),p(M,L,A,P+1))}return R.length<M.length?(t(R,i,n,h,l,u,m),t(M,i,n,h,l,u,m)):(t(M,i,n,h,l,u,m),t(R,i,n,h,l,u,m)),i}return i.push(e),i},isSimple:function(t){var e,n=t;for(e=0;e<n.length-1;e++)for(var r=0;r<e-1;r++)if(i(n[e],n[e+1],n[r],n[r+1]))return!1;for(e=1;e<n.length-2;e++)if(i(n[0],n[n.length-1],n[e],n[e+1]))return!1;return!0},removeCollinearPoints:function(t,e){for(var i=0,n=t.length-1;t.length>3&&n>=0;--n)u(d(t,n-1),d(t,n),d(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var n=t[i],r=i-1;r>=0;--r)S(n,t[r],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,n=1;n<t.length;++n)(i[n][1]<i[e][1]||i[n][1]===i[e][1]&&i[n][0]>i[e][0])&&(e=n);return!r(d(t,e-1),d(t,e),d(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var h=[],l=[];function u(t,e,i,r){if(r){var s=h,o=l;s[0]=e[0]-t[0],s[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=s[0]*o[0]+s[1]*o[1],u=Math.sqrt(s[0]*s[0]+s[1]*s[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(u*c))<r}return 0===n(t,e,i)}function c(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function d(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function p(t,e,i,n){for(var r=i;r<n;r++)t.push(e[r])}function f(t,e){return o(d(t,e-1),d(t,e),d(t,e+1))}var m=[],g=[];function v(t,i,n){var r,o,h=m,l=g;if(s(d(t,i+1),d(t,i),d(t,n))&&a(d(t,i-1),d(t,i),d(t,n)))return!1;o=c(d(t,i),d(t,n));for(var u=0;u!==t.length;++u)if((u+1)%t.length!==i&&u!==i&&s(d(t,i),d(t,n),d(t,u+1))&&a(d(t,i),d(t,n),d(t,u))&&(h[0]=d(t,i),h[1]=d(t,n),l[0]=d(t,u),l[1]=d(t,u+1),r=e(h,l),c(d(t,i),r)<o))return!1;return!0}function y(t,e,n){for(var r=0;r!==t.length;++r)if(r!==e&&r!==n&&(r+1)%t.length!==e&&(r+1)%t.length!==n&&i(d(t,e),d(t,n),d(t,r),d(t,r+1)))return!1;return!0}function x(t,e,i,n){var r=n||[];if(function(t){t.length=0}(r),e<i)for(var s=e;s<=i;s++)r.push(t[s]);else{for(s=0;s<=i;s++)r.push(t[s]);for(s=e;s<t.length;s++)r.push(t[s])}return r}function E(t){for(var e=[],i=[],n=[],r=[],s=Number.MAX_VALUE,o=0;o<t.length;++o)if(f(t,o))for(var a=0;a<t.length;++a)if(v(t,o,a)){i=E(x(t,o,a,r)),n=E(x(t,a,o,r));for(var h=0;h<n.length;h++)i.push(n[h]);i.length<s&&(e=i,s=i.length,e.push([d(t,o),d(t,a)]))}return e}function T(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],n=0;n<e.length;n++)for(var r=e[n],s=0;s<i.length;s++){var o=T(i[s],r);if(o){i.splice(s,1),i.push(o[0],o[1]);break}}return i}r=e,n=t.indexOf(r[0]),s=t.indexOf(r[1]);return-1!==n&&-1!==s&&[x(t,n,s),x(t,s,n)]}function _(t,e,i,n,r){r=r||0;var s=e[1]-t[1],o=t[0]-e[0],a=s*t[0]+o*t[1],h=n[1]-i[1],l=i[0]-n[0],u=h*i[0]+l*i[1],c=s*l-h*o;return w(c,0,r)?[0,0]:[(l*a-o*u)/c,(s*u-h*a)/c]}function w(t,e,i){return i=i||0,Math.abs(t-e)<=i}function S(t,e,i){return w(t[0],e[0],i)&&w(t[1],e[1],i)}},52018:(t,e,i)=>{var n=new(i(83419))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},42363:t=>{var e={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};e.Global.push("facebook"),t.exports=e},37277:t=>{var e={},i={},n={register:function(t,i,n,r){void 0===r&&(r=!1),e[t]={plugin:i,mapping:n,custom:r}},registerCustom:function(t,e,n,r){i[t]={plugin:e,mapping:n,data:r}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=n},77332:(t,e,i)=>{var n=i(83419),r=i(8443),s=i(50792),o=i(74099),a=i(44603),h=i(39429),l=i(95540),u=i(37277),c=i(72905),d=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(r.BOOT,this.boot,this)},boot:function(){var t,e,i,n,s,o,a,h=this.game.config,u=h.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t<u.length;t++)e=u[t],i=l(e,"key",null),n=l(e,"plugin",null),s=l(e,"start",!1),o=l(e,"mapping",null),a=l(e,"data",null),i&&(n?this.install(i,n,s,o,a):console.warn("Missing `plugin` for key: "+i));for(u=(u=h.installScenePlugins).concat(this._pendingScene),t=0;t<u.length;t++)e=u[t],i=l(e,"key",null),n=l(e,"plugin",null),o=l(e,"mapping",null),i&&(n?this.installScenePlugin(i,n,o):console.warn("Missing `plugin` for key: "+i));this._pendingGlobal=[],this._pendingScene=[],this.game.events.once(r.DESTROY,this.destroy,this)},addToScene:function(t,e,i){var n,r,s,o=this.game,a=t.scene,h=t.settings.map,l=t.settings.isBooted;for(n=0;n<e.length;n++)o[r=e[n]]?(t[r]=o[r],h.hasOwnProperty(r)&&(a[h[r]]=t[r])):"game"===r&&h.hasOwnProperty(r)&&(a[h[r]]=o);for(var c=0;c<i.length;c++)for(s=i[c],n=0;n<s.length;n++)if(r=s[n],u.hasCore(r)){var d=u.getCore(r),p=d.mapping,f=new d.plugin(a,this,p);t[p]=f,d.custom?a[p]=f:h.hasOwnProperty(p)&&(a[h[p]]=f),l&&f.boot()}for(s=this.plugins,n=0;n<s.length;n++){var m=s[n];m.mapping&&(a[m.mapping]=m.plugin)}},getDefaultScenePlugins:function(){var t=this.game.config.defaultPlugins;return t=t.concat(this.scenePlugins)},installScenePlugin:function(t,e,i,n,r){if(void 0===r&&(r=!1),"function"==typeof e){if(u.hasCore(t)||u.register(t,e,i,!0),-1===this.scenePlugins.indexOf(t))this.scenePlugins.push(t);else if(!r&&u.hasCore(t))return void console.warn("Scene Plugin key in use: "+t);if(n){var s=new e(n,this,t);n.sys[t]=s,i&&""!==i&&(n[i]=s),s.boot()}}else console.warn("Invalid Scene Plugin: "+t)},install:function(t,e,i,n,r){if(void 0===i&&(i=!1),void 0===n&&(n=null),void 0===r&&(r=null),"function"!=typeof e)return console.warn("Invalid Plugin: "+t),null;if(u.hasCustom(t))return console.warn("Plugin key in use: "+t),null;if(null!==n&&(i=!0),this.game.isBooted){if(u.registerCustom(t,e,n,r),i)return this.start(t)}else this._pendingGlobal.push({key:t,plugin:e,start:i,mapping:n,data:r});return null},getIndex:function(t){for(var e=this.plugins,i=0;i<e.length;i++){if(e[i].key===t)return i}return-1},getEntry:function(t){var e=this.getIndex(t);if(-1!==e)return this.plugins[e]},isActive:function(t){var e=this.getEntry(t);return e&&e.active},start:function(t,e){void 0===e&&(e=t);var i=this.getEntry(e);return i&&!i.active?(i.active=!0,i.plugin.start()):i||(i=this.createEntry(t,e)),i?i.plugin:null},createEntry:function(t,e){var i=u.getCustom(t);if(i){var n=new i.plugin(this);i={key:e,plugin:n,active:!0,mapping:i.mapping,data:i.data},this.plugins.push(i),n.init(i.data),n.start()}return i},stop:function(t){var e=this.getEntry(t);return e&&e.active&&(e.active=!1,e.plugin.stop()),this},get:function(t,e){void 0===e&&(e=!0);var i=this.getEntry(t);if(i)return i.plugin;var n=this.getClass(t);return n&&e?(i=this.createEntry(t,t))?i.plugin:null:n||null},getClass:function(t){return u.getCustomClass(t)},removeGlobalPlugin:function(t){var e=this.getEntry(t);e&&c(this.plugins,e),u.removeCustom(t)},removeScenePlugin:function(t){c(this.scenePlugins,t),u.remove(t)},registerGameObject:function(t,e,i){return e&&h.register(t,e),i&&a.register(t,i),this},removeGameObject:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),e&&h.remove(t),i&&a.remove(t),this},registerFileType:function(t,e,i){o.register(t,e),i&&i.sys.load&&(i.sys.load[t]=e)},destroy:function(){for(var t=0;t<this.plugins.length;t++)this.plugins[t].plugin.destroy();u.destroyCustomPlugins(),this.game.noReturn&&u.destroyCorePlugins(),this.game=null,this.plugins=[],this.scenePlugins=[]}});t.exports=d},45145:(t,e,i)=>{var n=i(52018),r=i(83419),s=i(44594),o=new r({Extends:n,initialize:function(t,e,i){n.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},18922:(t,e,i)=>{t.exports={BasePlugin:i(52018),DefaultPlugins:i(42363),PluginCache:i(37277),PluginManager:i(77332),ScenePlugin:i(45145)}},63595:()=>{HTMLVideoElement&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(t){const e=performance.now(),i=this.getVideoPlaybackQuality(),n=this.mozPresentedFrames||this.mozPaintedFrames||i.totalVideoFrames-i.droppedVideoFrames,r=(s,o)=>{const a=this.getVideoPlaybackQuality(),h=this.mozPresentedFrames||this.mozPaintedFrames||a.totalVideoFrames-a.droppedVideoFrames;if(h>n){const n=this.mozFrameDelay||a.totalFrameDelay-i.totalFrameDelay||0,r=o-s;t(o,{presentationTime:o+1e3*n,expectedDisplayTime:o+r,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+r/1e3,presentedFrames:h,processingDuration:n}),delete this._rvfcpolyfillmap[e]}else this._rvfcpolyfillmap[e]=requestAnimationFrame((t=>r(o,t)))};return this._rvfcpolyfillmap[e]=requestAnimationFrame((t=>r(e,t))),e},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(t){cancelAnimationFrame(this._rvfcpolyfillmap[t]),delete this._rvfcpolyfillmap[t]})},10312:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},29795:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},68627:(t,e,i)=>{var n=i(19715),r=i(32880),s=i(83419),o=i(8054),a=i(50792),h=i(92503),l=i(56373),u=i(97480),c=i(69442),d=i(61340),p=new s({Extends:a,initialize:function(t){a.call(this);var e=t.config;this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas;var i={alpha:t.config.transparent,desynchronized:t.config.desynchronized,willReadFrequently:!1};this.gameContext=e.context?e.context:this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=l(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new d,this._tempMatrix2=new d,this._tempMatrix3=new d,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(c.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(u.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.emit(h.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&(t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n))),t.save(),this.drawCount=0,this.emit(h.PRE_RENDER)},render:function(t,e,i){var r=e.length;this.emit(h.RENDER,t,i);var s=i.x,o=i.y,a=i.width,l=i.height,u=i.renderToTexture?i.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(s,o,a,l),u.clip()),i.emit(n.PRE_RENDER,i),this.currentContext=u;var c=i.mask;c&&c.preRenderCanvas(this,null,i._maskCamera),i.transparent||(u.fillStyle=i.backgroundColor.rgba,u.fillRect(s,o,a,l)),u.globalAlpha=i.alpha,u.globalCompositeOperation="source-over",this.drawCount+=r,i.renderToTexture&&i.emit(n.PRE_RENDER,i),i.matrix.copyToContext(u);for(var d=0;d<r;d++){var p=e[d];p.mask&&p.mask.preRenderCanvas(this,p,i),p.renderCanvas(this,p,i),p.mask&&p.mask.postRenderCanvas(this,p,i)}u.setTransform(1,0,0,1,0,0),u.globalCompositeOperation="source-over",u.globalAlpha=1,i.flashEffect.postRenderCanvas(u),i.fadeEffect.postRenderCanvas(u),i.dirty=!1,c&&c.postRenderCanvas(this),u.restore(),i.renderToTexture&&(i.emit(n.POST_RENDER,i),i.renderToGame&&t.sys.context.drawImage(i.canvas,s,o)),i.emit(n.POST_RENDER,i)},postRender:function(){this.gameContext.restore(),this.emit(h.POST_RENDER);var t=this.snapshotState;t.callback&&(r(this.gameCanvas,t),t.callback=null)},snapshotCanvas:function(t,e,i,n,s,o,a,h,l){void 0===i&&(i=!1),this.snapshotArea(n,s,o,a,e,h,l);var u=this.snapshotState;return u.getPixel=i,r(t,u),u.callback=null,this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.gameCanvas.width,this.gameCanvas.height,t,e,i)},snapshotArea:function(t,e,i,n,r,s,o){var a=this.snapshotState;return a.callback=r,a.type=s,a.encoder=o,a.getPixel=!1,a.x=t,a.y=e,a.width=Math.min(i,this.gameCanvas.width),a.height=Math.min(n,this.gameCanvas.height),this},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i),this.snapshotState.getPixel=!0,this},batchSprite:function(t,e,i,n){var r=i.alpha*t.alpha;if(0!==r){var s=this.currentContext,o=this._tempMatrix1,a=this._tempMatrix2,h=e.canvasData,l=h.x,u=h.y,c=e.cutWidth,d=e.cutHeight,p=e.customPivot,f=e.source.resolution,m=t.displayOriginX,g=t.displayOriginY,v=-m+e.x,y=-g+e.y;if(t.isCropped){var x=t._crop;x.flipX===t.flipX&&x.flipY===t.flipY||e.updateCropUVs(x,t.flipX,t.flipY),c=x.cw,d=x.ch,l=x.cx,u=x.cy,v=-m+x.x,y=-g+x.y,t.flipX&&(v>=0?v=-(v+c):v<0&&(v=Math.abs(v)-c)),t.flipY&&(y>=0?y=-(y+d):y<0&&(y=Math.abs(y)-d))}var E=1,T=1;t.flipX&&(p||(v+=-e.realWidth+2*m),E=-1),t.flipY&&(p||(y+=-e.realHeight+2*g),T=-1);var _=t.x,w=t.y;a.applyITRS(_,w,t.rotation,t.scaleX*E,t.scaleY*T),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=_,a.f=w):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY),o.multiply(a),i.roundPixels&&(o.e=Math.round(o.e),o.f=Math.round(o.f)),s.save(),o.setToContext(s),s.globalCompositeOperation=this.blendModes[t.blendMode],s.globalAlpha=r,s.imageSmoothingEnabled=!e.source.scaleMode,t.mask&&t.mask.preRenderCanvas(this,t,i),c>0&&d>0&&(i.roundPixels?s.drawImage(e.source.image,l,u,c,d,Math.round(v),Math.round(y),Math.round(c/f),Math.round(d/f)):s.drawImage(e.source.image,l,u,c,d,v,y,c/f,d/f)),t.mask&&t.mask.postRenderCanvas(this,t,i),s.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=p},55830:(t,e,i)=>{t.exports={CanvasRenderer:i(68627),GetBlendModes:i(56373),SetTransform:i(20926)}},56373:(t,e,i)=>{var n=i(10312),r=i(89289);t.exports=function(){var t=[],e=r.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},20926:(t,e,i)=>{var n=i(91296);t.exports=function(t,e,i,r,s){var o=r.alpha*i.alpha;if(o<=0)return!1;var a=n(i,r,s).calc;return e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=o,e.save(),a.setToContext(e),e.imageSmoothingEnabled=i.frame?!i.frame.source.scaleMode:t.antialias,!0}},63899:t=>{t.exports="losewebgl"},6119:t=>{t.exports="postrender"},48070:t=>{t.exports="prerender"},15640:t=>{t.exports="render"},8912:t=>{t.exports="resize"},87124:t=>{t.exports="restorewebgl"},92503:(t,e,i)=>{t.exports={LOSE_WEBGL:i(63899),POST_RENDER:i(6119),PRE_RENDER:i(48070),RENDER:i(15640),RESIZE:i(8912),RESTORE_WEBGL:i(87124)}},36909:(t,e,i)=>{t.exports={Events:i(92503),Snapshot:i(89966)},t.exports.Canvas=i(55830),t.exports.WebGL=i(4159)},32880:(t,e,i)=>{var n=i(27919),r=i(40987),s=i(95540);t.exports=function(t,e){var i=s(e,"callback"),o=s(e,"type","image/png"),a=s(e,"encoder",.92),h=Math.abs(Math.round(s(e,"x",0))),l=Math.abs(Math.round(s(e,"y",0))),u=Math.floor(s(e,"width",t.width)),c=Math.floor(s(e,"height",t.height));if(s(e,"getPixel",!1)){var d=t.getContext("2d",{willReadFrequently:!1}).getImageData(h,l,1,1).data;i.call(null,new r(d[0],d[1],d[2],d[3]))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var p=n.createWebGL(this,u,c),f=p.getContext("2d",{willReadFrequently:!0});u>0&&c>0&&f.drawImage(t,h,l,u,c,0,0,u,c);var m=new Image;m.onerror=function(){i.call(null),n.remove(p)},m.onload=function(){i.call(null,m),n.remove(p)},m.src=p.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},88815:(t,e,i)=>{var n=i(27919),r=i(40987),s=i(95540);t.exports=function(t,e){var i=t,o=s(e,"callback"),a=s(e,"type","image/png"),h=s(e,"encoder",.92),l=Math.abs(Math.round(s(e,"x",0))),u=Math.abs(Math.round(s(e,"y",0))),c=s(e,"getPixel",!1),d=s(e,"isFramebuffer",!1),p=d?s(e,"bufferWidth",1):i.drawingBufferWidth,f=d?s(e,"bufferHeight",1):i.drawingBufferHeight;if(c){var m=new Uint8Array(4),g=d?u:f-u;i.readPixels(l,g,1,1,i.RGBA,i.UNSIGNED_BYTE,m),o.call(null,new r(m[0],m[1],m[2],m[3]))}else{var v=Math.floor(s(e,"width",p)),y=Math.floor(s(e,"height",f)),x=v*y*4,E=new Uint8Array(x);i.readPixels(l,f-u-y,v,y,i.RGBA,i.UNSIGNED_BYTE,E);for(var T=n.createWebGL(this,v,y),_=T.getContext("2d",{willReadFrequently:!0}),w=_.getImageData(0,0,v,y),S=w.data,b=0;b<y;b++)for(var C=0;C<v;C++){var A=4*((y-b-1)*v+C),R=d?x-4*(b*v+(v-C)):4*(b*v+C);S[R+0]=E[A+0],S[R+1]=E[A+1],S[R+2]=E[A+2],S[R+3]=E[A+3]}_.putImageData(w,0,0);var M=new Image;M.onerror=function(){o.call(null),n.remove(T)},M.onload=function(){o.call(null,M),n.remove(T)},M.src=T.toDataURL(a,h)}}},89966:(t,e,i)=>{t.exports={Canvas:i(32880),WebGL:i(88815)}},7530:(t,e,i)=>{var n=i(83419),r=i(36060),s=i(90330),o=i(82264),a=i(95540),h=i(32302),l=i(63448),u=i(31302),c=i(58918),d=i(14811),p=i(92651),f=i(96569),m=i(56527),g=i(57516),v=i(43439),y=i(81041),x=i(12385),E=i(7589),T=i(95428),_=i(72905),w=new n({initialize:function(t){this.game=t.game,this.renderer=t,this.classes=new s([[r.UTILITY_PIPELINE,E],[r.MULTI_PIPELINE,g],[r.BITMAPMASK_PIPELINE,u],[r.SINGLE_PIPELINE,x],[r.ROPE_PIPELINE,y],[r.LIGHT_PIPELINE,f],[r.POINTLIGHT_PIPELINE,v],[r.MOBILE_PIPELINE,m]]),this.postPipelineClasses=new s,this.pipelines=new s,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(t,e,i){var n=this.renderer,s=this.renderTargets;this.frameInc=Math.floor(a(t,"frameInc",32));var l,u,f=n.width,m=n.height,g=this.game.config.disablePreFX;if(this.game.config.disablePostFX||this.postPipelineClasses.setAll([[String(d.BARREL),c.Barrel],[String(d.BLOOM),c.Bloom],[String(d.BLUR),c.Blur],[String(d.BOKEH),c.Bokeh],[String(d.CIRCLE),c.Circle],[String(d.COLOR_MATRIX),c.ColorMatrix],[String(d.DISPLACEMENT),c.Displacement],[String(d.GLOW),c.Glow],[String(d.GRADIENT),c.Gradient],[String(d.PIXELATE),c.Pixelate],[String(d.SHADOW),c.Shadow],[String(d.SHINE),c.Shine],[String(d.VIGNETTE),c.Vignette],[String(d.WIPE),c.Wipe]]),!g){this.classes.set(r.FX_PIPELINE,p);for(var v=Math.min(f,m),y=Math.ceil(v/this.frameInc),x=1;x<y;x++){var E=x*this.frameInc;s.push(new h(n,E,E)),s.push(new h(n,E,E)),s.push(new h(n,E,E)),this.maxDimension=E}s.push(new h(n,f,m,1,0,!0,!0)),s.push(new h(n,f,m,1,0,!0,!0)),s.push(new h(n,f,m,1,0,!0,!0))}var T=this,_=this.game;if(this.classes.each((function(t,e){l=T.add(t,new e({game:_})),t===r.UTILITY_PIPELINE&&(T.UTILITY_PIPELINE=l,T.fullFrame1=l.fullFrame1,T.fullFrame2=l.fullFrame2,T.halfFrame1=l.halfFrame1,T.halfFrame2=l.halfFrame2)})),this.MULTI_PIPELINE=this.get(r.MULTI_PIPELINE),this.BITMAPMASK_PIPELINE=this.get(r.BITMAPMASK_PIPELINE),this.MOBILE_PIPELINE=this.get(r.MOBILE_PIPELINE),g||(this.FX_PIPELINE=this.get(r.FX_PIPELINE)),t)for(u in t){var w=t[u];(l=new w(_)).name=u,l.isPostFX?this.postPipelineClasses.set(u,w):this.has(u)||(this.classes.set(u,w),this.add(u,l))}this.default=this.get(e),i&&!o.os.desktop&&(this.default=this.MOBILE_PIPELINE)},setDefaultPipeline:function(t){var e=this.get(t);return e&&(this.default=e),e},add:function(t,e){if(!e.isPostFX){var i=this.pipelines,n=this.renderer;return i.has(t)?console.warn("Pipeline exists: "+t):(e.name=t,e.manager=this,i.set(t,e)),e.hasBooted||e.boot(),0===n.width||0===n.height||e.isPreFX||e.resize(n.width,n.height),e}console.warn(t+" is a Post Pipeline. Use `addPostPipeline` instead")},addPostPipeline:function(t,e){this.postPipelineClasses.has(t)||this.postPipelineClasses.set(t,e)},flush:function(){this.current&&this.current.flush()},has:function(t){var e=this.pipelines;return"string"==typeof t?e.has(t):!!e.contains(t)},get:function(t){var e=this.pipelines;return"string"==typeof t?e.get(t):e.contains(t)?t:void 0},getPostPipeline:function(t,e,i){var n,r=this.postPipelineClasses,s="",o=typeof t;if("string"===o||"number"===o?(n=r.get(t),s=t):"function"===o?(r.contains(t)&&(n=t),s=t.name):"object"===o&&(n=r.get(t.name),s=t.name),n){var a=new n(this.game,i);return a.name=s,e&&(a.gameObject=e),this.postPipelineInstances.push(a),a}},removePostPipeline:function(t){_(this.postPipelineInstances,t)},remove:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!0),this.pipelines.delete(t),e&&this.classes.delete(t),i&&this.postPipelineClasses.delete(t)},set:function(t,e,i){if(!t.isPostFX)return this.isCurrent(t,i)||(this.flush(),this.current&&this.current.unbind(),this.current=t,t.bind(i)),t.updateProjectionMatrix(),t.onBind(e),t},preBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=e.length-1;i>=0;i--){var n=e[i];n.active&&n.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i<e.length;i++){var n=e[i];n.active&&n.postBatch(t)}}},preBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=e.length-1;i>=0;i--){var n=e[i];n.active&&n.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i<e.length;i++){var n=e[i];n.active&&n.postBatch(t)}}},isCurrent:function(t,e){var i=this.renderer,n=this.current;return n&&!e&&(e=n.currentShader),!(n!==t||e.program!==i.currentProgram)},copyFrame:function(t,e,i,n,r){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyFrame(t,e,i,n,r),this},copyToGame:function(t){return this.setUtility(this.UTILITY_PIPELINE.copyShader).copyToGame(t),this},drawFrame:function(t,e,i,n){return this.setUtility(this.UTILITY_PIPELINE.colorMatrixShader).drawFrame(t,e,i,n),this},blendFrames:function(t,e,i,n,r){return this.setUtility(this.UTILITY_PIPELINE.linearShader).blendFrames(t,e,i,n,r),this},blendFramesAdditive:function(t,e,i,n,r){return this.setUtility(this.UTILITY_PIPELINE.addShader).blendFramesAdditive(t,e,i,n,r),this},clearFrame:function(t,e){return this.UTILITY_PIPELINE.clearFrame(t,e),this},blitFrame:function(t,e,i,n,r,s){return this.setUtility(this.UTILITY_PIPELINE.copyShader).blitFrame(t,e,i,n,r,s),this},copyFrameRect:function(t,e,i,n,r,s,o,a){return this.UTILITY_PIPELINE.copyFrameRect(t,e,i,n,r,s,o,a),this},forceZero:function(){return this.current&&this.current.forceZero},setMulti:function(){return this.set(this.MULTI_PIPELINE)},setUtility:function(t){return this.UTILITY_PIPELINE.bind(t)},setFX:function(){return this.set(this.FX_PIPELINE)},restoreContext:function(){this.rebind(),this.pipelines.each((function(t,e){e.restoreContext()})),T(this.postPipelineInstances,(function(t){t.restoreContext()}))},rebind:function(t){void 0===t&&this.previous&&(t=this.previous);var e=this.renderer,i=e.gl;i.disable(i.DEPTH_TEST),i.disable(i.CULL_FACE),e.hasActiveStencilMask()?i.clear(i.DEPTH_BUFFER_BIT):(i.disable(i.STENCIL_TEST),i.clear(i.DEPTH_BUFFER_BIT|i.STENCIL_BUFFER_BIT)),i.viewport(0,0,e.width,e.height),e.currentProgram=null,e.setBlendMode(0,!0);var n=e.vaoExtension;n&&n.bindVertexArrayOES(null);var r=this.pipelines.entries;for(var s in r)r[s].glReset=!0;t&&(this.current=t,t.rebind())},clear:function(){var t=this.renderer;this.flush(),this.current?(this.current.unbind(),this.previous=this.current,this.current=null):this.previous=null,t.currentProgram=null,t.setBlendMode(0,!0);var e=t.vaoExtension;e&&e.bindVertexArrayOES(null)},getRenderTarget:function(t){var e=this.renderTargets;if(t>this.maxDimension)return this.targetIndex=e.length-3,e[this.targetIndex];var i=3*(l(t,this.frameInc,0,!0)-1);return this.targetIndex=i,e[i]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});t.exports=w},32302:(t,e,i)=>{var n=i(83419),r=i(92503),s=new n({initialize:function(t,e,i,n,r,s,o,a,h){void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=!0),void 0===o&&(o=!1),void 0===a&&(a=!0),void 0===h&&(h=!0),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=n,this.minFilter=r,this.autoClear=s,this.autoResize=!0,this.hasDepthBuffer=a,this.forceClamp=h,this.resize(e,i),o?this.setAutoResize(!0):this.autoResize=!1},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(r.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(r.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){if((t=Math.round(t*this.scale))<=0&&(t=1),(e=Math.round(e*this.scale))<=0&&(e=1),this.autoResize&&(t!==this.width||e!==this.height)){var i=this.renderer;i.deleteFramebuffer(this.framebuffer),i.deleteTexture(this.texture),this.texture=i.createTextureFromSource(null,t,e,this.minFilter,this.forceClamp),this.framebuffer=i.createFramebuffer(t,e,this.texture,this.hasDepthBuffer),this.width=t,this.height=e}return this},willResize:function(t,e){return(t=Math.round(t*this.scale))<=0&&(t=1),(e=Math.round(e*this.scale))<=0&&(e=1),t!==this.width||e!==this.height},bind:function(t,e,i){void 0===t&&(t=!1);var n=this.renderer;if(t&&n.flush(),e&&i&&this.resize(e,i),n.pushFramebuffer(this.framebuffer,!1,!1),t&&this.adjustViewport(),this.autoClear){var r=this.renderer.gl;r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT)}n.clearStencilMask()},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){void 0===t&&(t=!1);var e=this.renderer;return t&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.off(r.RESIZE,this.resize,this),t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=s},70554:t=>{t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},checkShaderMax:function(t,e){var i=Math.min(16,t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));return e&&-1!==e?Math.min(i,e):i},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",n=0;n<e;n++)n>0&&(i+="\n\telse "),n<e-1&&(i+="if (outTexId < "+n+".5)"),i+="\n\t{",i+="\n\t\ttexture = texture2D(uMainSampler["+n+"], outTexCoord);",i+="\n\t}";return(t=t.replace(/%count%/gi,e.toString())).replace(/%forloop%/gi,i)},setGlowQuality:function(t,e,i,n){return void 0===i&&(i=e.config.glowFXQuality),void 0===n&&(n=e.config.glowFXDistance),t=(t=t.replace(/__SIZE__/gi,(1/i/n).toFixed(7))).replace(/__DIST__/gi,n.toFixed(0)+".0")}}},29100:(t,e,i)=>{var n=i(83419),r=i(62644),s=i(50792),o=i(77085),a=i(95540),h=i(37867),l=i(92503),u=i(32302),c=i(70554),d=i(38683),p=new n({Extends:s,initialize:function(t){s.call(this);var e=t.game,i=e.renderer,n=i.gl;this.name=a(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=n,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=a(t,"topology",n.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=a(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=a(t,"resizeUniform","")},boot:function(){var t,e=this.gl,i=this.config,n=this.renderer;this.isPostFX||(this.projectionMatrix=(new h).identity());var r=this.renderTargets,s=a(i,"renderTarget",!1);"boolean"==typeof s&&s&&(s=1);var c=n.width,d=n.height;if("number"==typeof s)for(t=0;t<s;t++)r.push(new u(n,c,d,1,0,!0));else if(Array.isArray(s))for(t=0;t<s.length;t++){var p=a(s[t],"scale",1),f=a(s[t],"minFilter",0),m=a(s[t],"autoClear",1),g=a(s[t],"autoResize",!1),v=a(s[t],"width",null),y=a(s[t],"height",v);v?r.push(new u(n,v,y,1,f,m,g)):r.push(new u(n,c,d,p,f,m,g))}r.length&&(this.currentRenderTarget=r[0]),this.setShadersFromConfig(i);var x=this.shaders,E=0;for(t=0;t<x.length;t++)x[t].vertexSize>E&&(E=x[t].vertexSize);var T=a(i,"batchSize",n.config.batchSize);this.vertexCapacity=6*T;var _=new ArrayBuffer(this.vertexCapacity*E);this.vertexData=_,this.bytes=new Uint8Array(_),this.vertexViewF32=new Float32Array(_),this.vertexViewU32=new Uint32Array(_);var w=a(i,"vertices",null);for(w?(this.vertexViewF32.set(w),this.vertexBuffer=n.createVertexBuffer(_,e.STATIC_DRAW)):this.vertexBuffer=n.createVertexBuffer(_.byteLength,e.DYNAMIC_DRAW),this.setVertexBuffer(),t=x.length-1;t>=0;t--)x[t].rebind();this.hasBooted=!0,n.on(l.RESIZE,this.resize,this),n.on(l.PRE_RENDER,this.onPreRender,this),n.on(l.RENDER,this.onRender,this),n.on(l.POST_RENDER,this.onPostRender,this),this.emit(o.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e,i){var n=this.renderer;t===this.currentShader&&n.currentProgram===this.currentShader.program||(this.flush(),this.setVertexBuffer(i)&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t);return this},getShaderByName:function(t){for(var e=this.shaders,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},setShadersFromConfig:function(t){var e,i=this.shaders,n=this.renderer;for(e=0;e<i.length;e++)i[e].destroy();var s="vertShader",o="fragShader",h="attributes",l=a(t,s,null),u=c.parseFragmentShaderMaxTextures(a(t,o,null),n.maxTextures),p=a(t,h,null),f=a(t,"shaders",[]),m=f.length;if(0===m)l&&u&&(this.shaders=[new d(this,"default",l,u,r(p))]);else{var g=[];for(e=0;e<m;e++){var v,y,x,E,T=f[e];if("string"==typeof T?(v="default",y=l,x=c.parseFragmentShaderMaxTextures(T,n.maxTextures),E=p):(v=a(T,"name","default"),y=a(T,s,l),x=c.parseFragmentShaderMaxTextures(a(T,o,u),n.maxTextures),E=a(T,h,p)),"default"===v){var _=x.split("\n")[0].trim();_.indexOf("#define SHADER_NAME")>-1&&(v=_.substring(20))}y&&x&&g.push(new d(this,v,y,x,r(E)))}this.shaders=g}return 0===this.shaders.length?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(t){return this.currentBatch={start:this.vertexCount,count:0,texture:[t],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=t,this.batch.push(this.currentBatch),0},addTextureToBatch:function(t){var e=this.currentBatch;e&&(e.texture.push(t),e.unit++,e.maxUnit++)},pushBatch:function(t){if(!this.currentBatch||this.forceZero&&t!==this.currentTexture)return this.createBatch(t);if(t===this.currentTexture)return this.currentUnit;var e=this.currentBatch,i=e.texture.indexOf(t);return-1===i?e.texture.length===this.renderer.maxTextures?this.createBatch(t):(e.unit++,e.maxUnit++,e.texture.push(t),this.currentUnit=e.unit,this.currentTexture=t,e.unit):(this.currentUnit=i,this.currentTexture=t,i)},setGameObject:function(t,e){return void 0===e&&(e=t.frame),this.pushBatch(e.source.glTexture)},shouldFlush:function(t){return void 0===t&&(t=0),this.vertexCount+t>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,n=0;n<i.length;n++)i[n].resize(t,e);return this.setProjectionMatrix(t,e),this.resizeUniform&&this.set2f(this.resizeUniform,t,e),this.emit(o.RESIZE,t,e,this),this.onResize(t,e),this},setProjectionMatrix:function(t,e){var i=this.projectionMatrix;if(!i)return this;this.projectionWidth=t,this.projectionHeight=e,i.ortho(0,t,e,0,-1e3,1e3);for(var n=this.shaders,r="uProjectionMatrix",s=0;s<n.length;s++){var o=n[s];o.hasUniform(r)&&(o.resetUniform(r),o.setMatrix4fv(r,!1,i.val,o))}return this},flipProjectionMatrix:function(t){void 0===t&&(t=!0);var e=this.projectionMatrix;if(!e)return this;var i=this.projectionWidth,n=this.projectionHeight;t?e.ortho(0,i,0,n,-1e3,1e3):e.ortho(0,i,n,0,-1e3,1e3),this.setMatrix4fv("uProjectionMatrix",!1,e.val)},updateProjectionMatrix:function(){if(this.projectionMatrix){var t=this.renderer.projectionWidth,e=this.renderer.projectionHeight;this.projectionWidth===t&&this.projectionHeight===e||this.setProjectionMatrix(t,e)}},bind:function(t){if(void 0===t&&(t=this.currentShader),this.glReset)return this.rebind(t);var e=!1,i=this.gl;return i.getParameter(i.ARRAY_BUFFER_BINDING)!==this.vertexBuffer&&(i.bindBuffer(i.ARRAY_BUFFER,this.vertexBuffer.webGLBuffer),this.activeBuffer=this.vertexBuffer,e=!0),t.bind(e),this.currentShader=t,this.activeTextures.length=0,this.emit(o.BIND,this,t),this.onActive(t),this},rebind:function(t){this.activeBuffer=null,this.setVertexBuffer();for(var e=this.shaders,i=e.length-1;i>=0;i--){var n=e[i].rebind();t&&n!==t||(this.currentShader=n)}return this.activeTextures.length=0,this.emit(o.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var t=this.shaders,e=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,e&&this.setVertexBuffer();for(var i=0;i<t.length;i++){var n=t[i];n.syncUniforms(),e&&n.rebind()}},setVertexBuffer:function(t){if(void 0===t&&(t=this.vertexBuffer),t!==this.activeBuffer){var e=this.gl;return this.gl.bindBuffer(e.ARRAY_BUFFER,t.webGLBuffer),this.activeBuffer=t,!0}return!1},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){if(void 0===t&&(t=!1),this.vertexCount>0){this.emit(o.BEFORE_FLUSH,this,t),this.onBeforeFlush(t);var e=this.gl,i=this.vertexCount,n=this.currentShader.vertexSize,r=this.topology;if(this.active){var s,a,h;this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*n));var l=this.batch,u=this.activeTextures;if(this.forceZero)for(u[0]||e.activeTexture(e.TEXTURE0),s=0;s<l.length;s++)h=(a=l[s]).texture[0],u[0]!==h&&(e.bindTexture(e.TEXTURE_2D,h.webGLTexture),u[0]=h),e.drawArrays(r,a.start,a.count);else for(s=0;s<l.length;s++){a=l[s];for(var c=0;c<=a.maxUnit;c++)h=a.texture[c],u[c]!==h&&(e.activeTexture(e.TEXTURE0+c),e.bindTexture(e.TEXTURE_2D,h.webGLTexture),u[c]=h);e.drawArrays(r,a.start,a.count)}}this.vertexCount=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.emit(o.AFTER_FLUSH,this,t),this.onAfterFlush(t)}return this},onActive:function(){},onBind:function(){},onRebind:function(){},onBatch:function(){},onPreBatch:function(){},onPostBatch:function(){},onPreRender:function(){},onRender:function(){},onPostRender:function(){},onBeforeFlush:function(){},onAfterFlush:function(){},batchVert:function(t,e,i,n,r,s,o){var a=this.vertexViewF32,h=this.vertexViewU32,l=this.vertexCount*this.currentShader.vertexComponentCount-1;a[++l]=t,a[++l]=e,a[++l]=i,a[++l]=n,a[++l]=r,a[++l]=s,h[++l]=o,this.vertexCount++,this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchQuad:function(t,e,i,n,r,s,o,a,h,l,u,c,d,p,f,m,g,v,y,x){void 0===x&&(x=this.currentUnit);var E=!1;this.shouldFlush(6)&&(this.flush(),E=!0),this.currentBatch||(x=this.setTexture2D(y));var T=this.vertexViewF32,_=this.vertexViewU32,w=this.vertexCount*this.currentShader.vertexComponentCount-1;return T[++w]=e,T[++w]=i,T[++w]=l,T[++w]=u,T[++w]=x,T[++w]=v,_[++w]=p,T[++w]=n,T[++w]=r,T[++w]=l,T[++w]=d,T[++w]=x,T[++w]=v,_[++w]=m,T[++w]=s,T[++w]=o,T[++w]=c,T[++w]=d,T[++w]=x,T[++w]=v,_[++w]=g,T[++w]=e,T[++w]=i,T[++w]=l,T[++w]=u,T[++w]=x,T[++w]=v,_[++w]=p,T[++w]=s,T[++w]=o,T[++w]=c,T[++w]=d,T[++w]=x,T[++w]=v,_[++w]=g,T[++w]=a,T[++w]=h,T[++w]=c,T[++w]=u,T[++w]=x,T[++w]=v,_[++w]=f,this.vertexCount+=6,this.currentBatch.count=this.vertexCount-this.currentBatch.start,this.onBatch(t),E},batchTri:function(t,e,i,n,r,s,o,a,h,l,u,c,d,p,f,m,g){void 0===g&&(g=this.currentUnit);var v=!1;this.shouldFlush(3)&&(this.flush(),v=!0),this.currentBatch||(g=this.setTexture2D(m));var y=this.vertexViewF32,x=this.vertexViewU32,E=this.vertexCount*this.currentShader.vertexComponentCount-1;return y[++E]=e,y[++E]=i,y[++E]=a,y[++E]=h,y[++E]=g,y[++E]=f,x[++E]=c,y[++E]=n,y[++E]=r,y[++E]=a,y[++E]=u,y[++E]=g,y[++E]=f,x[++E]=d,y[++E]=s,y[++E]=o,y[++E]=l,y[++E]=u,y[++E]=g,y[++E]=f,x[++E]=p,this.vertexCount+=3,this.currentBatch.count=this.vertexCount-this.currentBatch.start,this.onBatch(t),v},drawFillRect:function(t,e,i,n,r,s,o,a){void 0===o&&(o=this.renderer.whiteTexture),void 0===a&&(a=!0),t=Math.floor(t),e=Math.floor(e);var h=Math.floor(t+i),l=Math.floor(e+n),u=this.setTexture2D(o),d=c.getTintAppendFloatAlphaAndSwap(r,s),p=0,f=1;a&&(p=1,f=0),this.batchQuad(null,t,e,t,l,h,l,h,e,0,p,1,f,d,d,d,d,0,o,u)},setTexture2D:function(t){return void 0===t&&(t=this.renderer.whiteTexture),this.pushBatch(t)},bindTexture:function(t,e){void 0===e&&(e=0);var i=this.gl;return i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,t.webGLTexture),this},bindRenderTarget:function(t,e){return this.bindTexture(t.texture,e)},setTime:function(t,e){return this.set1f(t,this.game.loop.getDuration(),e),this},setBoolean:function(t,e,i){return void 0===i&&(i=this.currentShader),i.setBoolean(t,e),this},set1f:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1f(t,e),this},set2f:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.set2f(t,e,i),this},set3f:function(t,e,i,n,r){return void 0===r&&(r=this.currentShader),r.set3f(t,e,i,n),this},set4f:function(t,e,i,n,r,s){return void 0===s&&(s=this.currentShader),s.set4f(t,e,i,n,r),this},set1fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1fv(t,e),this},set2fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set2fv(t,e),this},set3fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set3fv(t,e),this},set4fv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set4fv(t,e),this},set1iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1iv(t,e),this},set2iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set2iv(t,e),this},set3iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set3iv(t,e),this},set4iv:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set4iv(t,e),this},set1i:function(t,e,i){return void 0===i&&(i=this.currentShader),i.set1i(t,e),this},set2i:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.set2i(t,e,i),this},set3i:function(t,e,i,n,r){return void 0===r&&(r=this.currentShader),r.set3i(t,e,i,n),this},set4i:function(t,e,i,n,r,s){return void 0===s&&(s=this.currentShader),s.set4i(t,e,i,n,r),this},setMatrix2fv:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.setMatrix2fv(t,e,i),this},setMatrix3fv:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.setMatrix3fv(t,e,i),this},setMatrix4fv:function(t,e,i,n){return void 0===n&&(n=this.currentShader),n.setMatrix4fv(t,e,i),this},destroy:function(){var t;this.emit(o.DESTROY,this);var e=this.shaders;for(t=0;t<e.length;t++)e[t].destroy();var i=this.renderTargets;for(t=0;t<i.length;t++)i[t].destroy();var n=this.renderer;return n.deleteBuffer(this.vertexBuffer),n.off(l.RESIZE,this.resize,this),n.off(l.PRE_RENDER,this.onPreRender,this),n.off(l.RENDER,this.onRender,this),n.off(l.POST_RENDER,this.onPostRender,this),this.removeAllListeners(),this.game=null,this.renderer=null,this.manager=null,this.gl=null,this.view=null,this.shaders=null,this.renderTargets=null,this.bytes=null,this.vertexViewF32=null,this.vertexViewU32=null,this.vertexData=null,this.vertexBuffer=null,this.currentShader=null,this.currentRenderTarget=null,this.activeTextures=null,this}});t.exports=p},74797:(t,e,i)=>{var n=i(95428),r=i(72905),s=i(19715),o=i(83419),a=i(8054),h=i(50792),l=i(92503),u=i(50030),c=i(37867),d=i(29747),p=i(7530),f=i(32302),m=i(97480),g=i(69442),v=i(70554),y=i(88815),x=i(26128),E=i(1482),T=i(82751),_=i(84387),w=i(93567),S=i(57183),b=!1,C=i(92129);b=!0;var A=new o({Extends:h,initialize:function(t){h.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!0,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=a.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glAttribLocationWrappers=[],this.glUniformLocationWrappers=[],this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=d,this.contextRestoredHandler=d,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(t){var e,i=this.game,r=this.canvas,s=t.backgroundColor;if(b&&(this.spector=new C.Spector,this.spector.onCapture.add(this.onCapture.bind(this))),!(e=i.config.context?i.config.context:r.getContext("webgl",t.contextCreation)||r.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var o=this,h=function(){var t=e.getSupportedExtensions();o.supportedExtensions=t;var i="ANGLE_instanced_arrays";o.instancedArraysExtension=t.indexOf(i)>-1?e.getExtension(i):null;var n="OES_vertex_array_object";o.vaoExtension=t.indexOf(n)>-1?e.getExtension(n):null};h(),this.contextLostHandler=function(t){o.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),o.emit(l.LOSE_WEBGL,o),t.preventDefault()},r.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.contextRestoredHandler=function(t){if(e.isContextLost())console&&console.log("WebGL Context restored, but context is still lost");else{o.currentProgram=null,o.currentFramebuffer=null,o.setBlendMode(a.BlendModes.NORMAL),e.disable(e.BLEND),e.disable(e.DEPTH_TEST),e.enable(e.CULL_FACE);var i=function(t){t.createResource()};n(o.glTextureWrappers,i),n(o.glBufferWrappers,i),n(o.glFramebufferWrappers,i),n(o.glProgramWrappers,i),n(o.glAttribLocationWrappers,i),n(o.glUniformLocationWrappers,i),o.createTemporaryTextures(),o.pipelines.restoreContext(),o.resize(o.game.scale.baseSize.width,o.game.scale.baseSize.height),h(),o.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),o.emit(l.RESTORE_WEBGL,o),t.preventDefault()}},r.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var u=0;u<=27;u++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats=[e.BYTE,e.SHORT,e.UNSIGNED_BYTE,e.UNSIGNED_SHORT,e.FLOAT],this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}},t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL);return-1!==["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"].indexOf(t.mipmapFilter)&&(this.mipmapFilter=e[t.mipmapFilter]),this.maxTextures=v.checkShaderMax(e,t.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new p(this),this.setBlendMode(a.BlendModes.NORMAL),this.projectionMatrix=(new c).identity(),i.textures.once(g.READY,this.boot,this),this},boot:function(){var t=this.game,e=this.pipelines,i=t.scale.baseSize,n=i.width,r=i.height;this.width=n,this.height=r,this.isBooted=!0,this.renderTarget=new f(this,n,r,1,0,!0,!0),this.maskTarget=new f(this,n,r,1,0,!0,!0),this.maskSource=new f(this,n,r,1,0,!0,!0);var s=t.config;e.boot(s.pipeline,s.defaultPipeline,s.autoMobilePipeline),this.blankTexture=t.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=t.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=t.textures.getFrame("__WHITE").glTexture;var o=this.gl;o.bindFramebuffer(o.FRAMEBUFFER,null),o.enable(o.SCISSOR_TEST),t.scale.on(m.RESIZE,this.onResize,this),this.resize(n,r)},createTemporaryTextures:function(){for(var t=this.gl,e=0;e<this.maxTextures;e++){var i=t.createTexture();t.activeTexture(t.TEXTURE0+e),t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),this.textureIndexes.push(e)}},captureFrame:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1),b&&this.spector&&!this._debugCapture&&(this.spector.captureCanvas(this.canvas,0,t,e),this._debugCapture=!0)},captureNextFrame:function(){b&&this.spector&&!this._debugCapture&&(this._debugCapture=!0,this.spector.captureNextFrame(this.canvas))},getFps:function(){if(b&&this.spector)return this.spector.getFps()},log:function(){if(b&&this.spector){var t=Array.prototype.slice.call(arguments).join(" ");return this.spector.log(t)}},startCapture:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=!1),void 0===i&&(i=!1),b&&this.spector&&!this._debugCapture&&(this.spector.startCapture(this.canvas,t,e,i),this._debugCapture=!0)},stopCapture:function(){if(b&&this.spector&&this._debugCapture)return this.spector.stopCapture()},onCapture:function(t){b&&(this.spector.getResultUI().display(t),this._debugCapture=!1)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},beginCapture:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.renderTarget.bind(!0,t,e),this.setProjectionMatrix(t,e)},endCapture:function(){return this.renderTarget.unbind(!0),this.resetProjectionMatrix(),this.renderTarget},resize:function(t,e){var i=this.gl;return this.width=t,this.height=e,this.setProjectionMatrix(t,e),i.viewport(0,0,t,e),this.drawingBufferHeight=i.drawingBufferHeight,i.scissor(0,i.drawingBufferHeight-e,t,e),this.defaultScissor[2]=t,this.defaultScissor[3]=e,this.emit(l.RESIZE,t,e),this},getCompressedTextures:function(){var t="WEBGL_compressed_texture_",e="WEBKIT_"+t,i=function(i,n){var r=i.getExtension(t+n)||i.getExtension(e+n)||i.getExtension("EXT_texture_compression_"+n);if(r){var s={};for(var o in r)s[r[o]]=o;return s}},n=this.gl;return{ETC:i(n,"etc"),ETC1:i(n,"etc1"),ATC:i(n,"atc"),ASTC:i(n,"astc"),BPTC:i(n,"bptc"),RGTC:i(n,"rgtc"),PVRTC:i(n,"pvrtc"),S3TC:i(n,"s3tc"),S3TCSRGB:i(n,"s3tc_srgb"),IMG:!0}},getCompressedTextureName:function(t,e){var i=this.compression[t.toUpperCase()];if(e in i)return i[e]},supportsCompressedTexture:function(t,e){var i=this.compression[t.toUpperCase()];return!!i&&(!e||e in i)},getAspectRatio:function(){return this.width/this.height},setProjectionMatrix:function(t,e){return t===this.projectionWidth&&e===this.projectionHeight||(this.projectionWidth=t,this.projectionHeight=e,this.projectionMatrix.ortho(0,t,e,0,-1e3,1e3)),this},resetProjectionMatrix:function(){return this.setProjectionMatrix(this.width,this.height)},hasExtension:function(t){return!!this.supportedExtensions&&this.supportedExtensions.indexOf(t)},getExtension:function(t){return this.hasExtension(t)?(t in this.extensions||(this.extensions[t]=this.gl.getExtension(t)),this.extensions[t]):null},flush:function(){this.pipelines.flush()},pushScissor:function(t,e,i,n,r){void 0===r&&(r=this.drawingBufferHeight);var s=[t,e,i,n];return this.scissorStack.push(s),this.setScissor(t,e,i,n,r),this.currentScissor=s,s},setScissor:function(t,e,i,n,r){void 0===r&&(r=this.drawingBufferHeight);var s=this.gl,o=this.currentScissor,a=i>0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),s.scissor(t,r-e-n,i,n))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e=this.currentScissor;if(e){var i=e[0],n=e[1],r=e[2],s=e[3];r>0&&s>0&&t.scissor(i,this.drawingBufferHeight-n-s,r,s)}},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==a.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},pushFramebuffer:function(t,e,i,n,r){return t===this.currentFramebuffer?this:(this.fboStack.push(t),this.setFramebuffer(t,e,i,n,r))},setFramebuffer:function(t,e,i,n,r){if(void 0===e&&(e=!1),void 0===i&&(i=!0),void 0===n&&(n=null),void 0===r&&(r=!1),t===this.currentFramebuffer)return this;var s=this.gl,o=this.width,a=this.height;return t&&t.renderTexture&&i?(o=t.renderTexture.width,a=t.renderTexture.height):this.flush(),t?s.bindFramebuffer(s.FRAMEBUFFER,t.webGLFramebuffer):s.bindFramebuffer(s.FRAMEBUFFER,null),i&&s.viewport(0,0,o,a),n&&s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,n.webGLTexture,0),r&&(s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)),e&&(t?(this.drawingBufferHeight=a,this.pushScissor(0,0,o,a)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t,this},popFramebuffer:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!0);var i=this.fboStack;i.pop();var n=i[i.length-1];return n||(n=null),this.setFramebuffer(n,t,e),n},restoreFramebuffer:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!0);var i=this.fboStack,n=i[i.length-1];n||(n=null),this.currentFramebuffer=null,this.setFramebuffer(n,t,e)},setProgram:function(t){return t!==this.currentProgram&&(this.flush(),this.gl.useProgram(t.webGLProgram),this.currentProgram=t,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(t,e,i,n,r){void 0===r&&(r=!1);var s=this.gl,o=s.NEAREST,h=s.NEAREST,l=s.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var c=u(e,i);if(c&&!r&&(l=s.REPEAT),n===a.ScaleModes.LINEAR&&this.config.antialias){var d=t&&t.compressed,p=!d&&c||d&&t.mipmaps.length>1;o=this.mipmapFilter&&p?this.mipmapFilter:s.LINEAR,h=s.LINEAR}return t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,o,h,l,l,s.RGBA,t):this.createTexture2D(0,o,h,l,l,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,r,s,o,a,h,l,u,c){"number"!=typeof a&&(a=o?o.width:1),"number"!=typeof h&&(h=o?o.height:1);var d=new T(this.gl,t,e,i,n,r,s,o,a,h,l,u,c);return this.glTextureWrappers.push(d),d},createFramebuffer:function(t,e,i,n){this.currentFramebuffer=null;var r=new _(this.gl,t,e,i,n);return this.glFramebufferWrappers.push(r),r},beginBitmapMask:function(t,e){this.gl&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==t&&(this.currentMask.mask=t,this.currentMask.camera=e))},drawBitmapMask:function(t,e,i){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),t.renderWebGL(this,t,e),this.maskSource.unbind(!0),this.maskTarget.unbind();var n=this.gl,r=this.getCurrentStencilMask();r?(n.enable(n.STENCIL_TEST),r.mask.applyStencil(this,r.camera,!0)):this.currentMask.mask=null,this.pipelines.set(i),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,this.maskTarget.texture.webGLTexture),n.activeTexture(n.TEXTURE1),n.bindTexture(n.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(t,e){var i=new E(this.gl,t,e);return this.glProgramWrappers.push(i),i},createVertexBuffer:function(t,e){var i=this.gl,n=new x(i,t,i.ARRAY_BUFFER,e);return this.glBufferWrappers.push(n),n},createAttribLocation:function(t,e){var i=new w(this.gl,t,e);return this.glAttribLocationWrappers.push(i),i},createUniformLocation:function(t,e){var i=new S(this.gl,t,e);return this.glUniformLocationWrappers.push(i),i},createIndexBuffer:function(t,e){var i=this.gl,n=new x(i,t,i.ELEMENT_ARRAY_BUFFER,e);return this.glBufferWrappers.push(n),n},deleteTexture:function(t){if(t)return r(this.glTextureWrappers,t),t.destroy(),this},deleteFramebuffer:function(t){return t?(r(this.fboStack,t),r(this.glFramebufferWrappers,t),t.destroy(),this):this},deleteProgram:function(t){return t&&(r(this.glProgramWrappers,t),t.destroy()),this},deleteAttribLocation:function(t){return t&&(r(this.glAttribLocationWrappers,t),t.destroy()),this},deleteUniformLocation:function(t){return t&&(r(this.glUniformLocationWrappers,t),t.destroy()),this},deleteBuffer:function(t){return t?(r(this.glBufferWrappers,t),t.destroy(),this):this},preRenderCamera:function(t){var e=t.x,i=t.y,n=t.width,r=t.height,o=t.backgroundColor;(t.emit(s.PRE_RENDER,t),this.pipelines.preBatchCamera(t),this.pushScissor(e,i,n,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),o.alphaGL>0)&&this.pipelines.setMulti().drawFillRect(e,i,n,r,v.getTintFromFloats(o.blueGL,o.greenGL,o.redGL,1),o.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=t.flashEffect,i=t.fadeEffect;if(e.isRunning||i.isRunning||i.isComplete){var n=this.pipelines.setMulti();e.postRenderWebGL(n,v.getTintFromFloats),i.postRenderWebGL(n,v.getTintFromFloats)}t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(s.POST_RENDER,t)},preRender:function(){if(!this.contextLost){var t=this.gl;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var e=this.config.backgroundColor;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(l.PRE_RENDER)}},render:function(t,e,i){if(!this.contextLost){var n=e.length;if(this.emit(l.RENDER,t,i),this.preRenderCamera(i),0===n)return this.setBlendMode(a.BlendModes.NORMAL),void this.postRenderCamera(i);this.currentType="";for(var r=this.currentMask,s=0;s<n;s++){this.finalType=s===n-1;var o=e[s],h=o.mask;(r=this.currentMask).mask&&r.mask!==h&&r.mask.postRenderWebGL(this,r.camera),h&&r.mask!==h&&h.preRenderWebGL(this,o,i),o.blendMode!==this.currentBlendMode&&this.setBlendMode(o.blendMode);var u=o.type;u!==this.currentType&&(this.newType=!0,this.currentType=u),this.finalType?this.nextTypeMatch=!1:this.nextTypeMatch=e[s+1].type===this.currentType,o.renderWebGL(this,o,i),this.newType=!1}(r=this.currentMask).mask&&r.mask.postRenderWebGL(this,r.camera),this.setBlendMode(a.BlendModes.NORMAL),this.postRenderCamera(i)}},postRender:function(){if(!this.contextLost){this.flush(),this.emit(l.POST_RENDER);var t=this.snapshotState;t.callback&&(y(this.gl,t),t.callback=null)}},clearStencilMask:function(){this.gl.disable(this.gl.STENCIL_TEST)},restoreStencilMask:function(){var t=this.gl,e=this.getCurrentStencilMask();if(e){var i=e.mask;t.enable(t.STENCIL_TEST),i.invertAlpha?t.stencilFunc(t.NOTEQUAL,i.level,255):t.stencilFunc(t.EQUAL,i.level,255)}},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight,t,e,i)},snapshotArea:function(t,e,i,n,r,s,o){var a=this.snapshotState;return a.callback=r,a.type=s,a.encoder=o,a.getPixel=!1,a.x=t,a.y=e,a.width=i,a.height=n,this},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i),this.snapshotState.getPixel=!0,this},snapshotFramebuffer:function(t,e,i,n,r,s,o,a,h,l,u){void 0===r&&(r=!1),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=e),void 0===h&&(h=i),"pixel"===l&&(r=!0,l="image/png");var c=this.currentFramebuffer;this.snapshotArea(s,o,a,h,n,l,u);var d=this.snapshotState;return d.getPixel=r,d.isFramebuffer=!0,d.bufferWidth=e,d.bufferHeight=i,d.width=Math.min(d.width,e),d.height=Math.min(d.height,i),this.setFramebuffer(t),y(this.gl,d),this.setFramebuffer(c),d.callback=null,d.isFramebuffer=!1,this},canvasToTexture:function(t,e,i,n){return void 0===i&&(i=!1),void 0===n&&(n=!1),e?this.updateCanvasTexture(t,e,n,i):this.createCanvasTexture(t,i,n)},createCanvasTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,r=n.NEAREST,s=n.NEAREST,o=t.width,a=t.height,h=n.CLAMP_TO_EDGE,l=u(o,a);return!e&&l&&(h=n.REPEAT),this.config.antialias&&(r=l&&this.mipmapFilter?this.mipmapFilter:n.LINEAR,s=n.LINEAR),this.createTexture2D(0,r,s,h,h,n.RGBA,t,o,a,!0,!1,i)},updateCanvasTexture:function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1);var r=this.gl,s=r.NEAREST,o=r.NEAREST,a=t.width,h=t.height,l=r.CLAMP_TO_EDGE,c=u(a,h);return!n&&c&&(l=r.REPEAT),this.config.antialias&&(s=c&&this.mipmapFilter?this.mipmapFilter:r.LINEAR,o=r.LINEAR),e.update(t,a,h,i,l,l,s,o),e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,r=n.NEAREST,s=n.NEAREST,o=t.videoWidth,a=t.videoHeight,h=n.CLAMP_TO_EDGE,l=u(o,a);return!e&&l&&(h=n.REPEAT),this.config.antialias&&(r=l&&this.mipmapFilter?this.mipmapFilter:n.LINEAR,s=n.LINEAR),this.createTexture2D(0,r,s,h,h,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1);var r=this.gl,s=r.NEAREST,o=r.NEAREST,a=t.videoWidth,h=t.videoHeight,l=r.CLAMP_TO_EDGE,c=u(a,h);return!n&&c&&(l=r.REPEAT),this.config.antialias&&(s=c&&this.mipmapFilter?this.mipmapFilter:r.LINEAR,o=r.LINEAR),e.update(t,a,h,i,l,l,s,o),e},createUint8ArrayTexture:function(t,e,i){var n=this.gl,r=n.NEAREST,s=n.NEAREST,o=n.CLAMP_TO_EDGE;return u(e,i)&&(o=n.REPEAT),this.createTexture2D(0,r,s,o,o,n.RGBA,t,e,i)},setTextureFilter:function(t,e){var i=this.gl,n=0===e?i.LINEAR:i.NEAREST;i.activeTexture(i.TEXTURE0);var r=i.getParameter(i.TEXTURE_BINDING_2D);return i.bindTexture(i.TEXTURE_2D,t.webGLTexture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),t.minFilter=n,t.magFilter=n,r&&i.bindTexture(i.TEXTURE_2D,r),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.removeEventListener("webglcontextrestored",this.contextRestoredHandler,!1);var t=function(t){t.destroy()};n(this.glAttribLocationWrappers,t),n(this.glBufferWrappers,t),n(this.glFramebufferWrappers,t),n(this.glProgramWrappers,t),n(this.glTextureWrappers,t),n(this.glUniformLocationWrappers,t),this.maskTarget.destroy(),this.maskSource.destroy(),this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null,b&&(this.spector=null)}});t.exports=A},38683:(t,e,i)=>{var n=i(83419),r=i(95428),s=i(95540),o=i(14500),a=new n({initialize:function(t,e,i,n,r){this.pipeline=t,this.name=e,this.renderer=t.renderer,this.gl=this.renderer.gl,this.fragSrc=n,this.vertSrc=i,this.program=this.renderer.createProgram(i,n),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(r),this.createUniforms()},createAttributes:function(t){var e=0,i=0,n=[];this.vertexComponentCount=0;for(var r=0;r<t.length;r++){var a=t[r],h=a.name,l=s(a,"size",1),u=s(a,"type",o.FLOAT),c=u.enum,d=u.size,p=!!a.normalized;n.push({name:h,size:l,type:c,normalized:p,offset:i,enabled:!1,location:-1}),4===d?e+=l:e++,i+=l*d}this.vertexSize=i,this.vertexComponentCount=e,this.attributes=n},bind:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),e&&this.pipeline.flush(),this.renderer.setProgram(this.program),t&&this.setAttribPointers(),this},rebind:function(){return this.renderer.setProgram(this.program),this.setAttribPointers(!0),this},setAttribPointers:function(t){void 0===t&&(t=!1);for(var e=this.gl,i=this.renderer,n=this.vertexSize,r=this.attributes,s=this.program,o=0;o<r.length;o++){var a=r[o],h=a.size,l=a.type,u=a.offset,c=a.enabled,d=a.location,p=!!a.normalized;if(t){-1!==d&&i.deleteAttribLocation(d);var f=this.renderer.createAttribLocation(s,a.name);f.webGLAttribLocation>=0?(e.enableVertexAttribArray(f.webGLAttribLocation),e.vertexAttribPointer(f.webGLAttribLocation,h,l,p,n,u),a.enabled=!0,a.location=f):-1!==f.webGLAttribLocation&&e.disableVertexAttribArray(f.webGLAttribLocation)}else c?e.vertexAttribPointer(d.webGLAttribLocation,h,l,p,n,u):!c&&-1!==d&&d.webGLAttribLocation>-1&&(e.disableVertexAttribArray(d.webGLAttribLocation),a.location=-1)}return this},createUniforms:function(){var t,e,i,n=this.gl,r=this.program,s=this.uniforms,o=n.getProgramParameter(r.webGLProgram,n.ACTIVE_UNIFORMS);for(t=0;t<o;t++){var a=n.getActiveUniform(r.webGLProgram,t);if(a){e=a.name,null!==(i=this.renderer.createUniformLocation(r,e))&&(s[e]={name:e,location:i,setter:null,value1:null,value2:null,value3:null,value4:null});var h=e.indexOf("[");h>0&&(e=e.substr(0,h),s.hasOwnProperty(e)||null!==(i=this.renderer.createUniformLocation(r,e))&&(s[e]={name:e,location:i,setter:null,value1:null,value2:null,value3:null,value4:null}))}}return this},syncUniforms:function(){var t=this.gl;for(var e in this.renderer.setProgram(this.program),this.uniforms){var i=this.uniforms[e];i.setter&&i.setter.call(t,i.location.webGLUniformLocation,i.value1,i.value2,i.value3,i.value4)}},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){var e=this.uniforms[t];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this},setUniform1:function(t,e,i,n){var r=this.uniforms[e];return r?((n||r.value1!==i)&&(r.setter||(r.setter=t),r.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,r.location.webGLUniformLocation,i),this.pipeline.currentShader=this),this):this},setUniform2:function(t,e,i,n,r){var s=this.uniforms[e];return s?((r||s.value1!==i||s.value2!==n)&&(s.setter||(s.setter=t),s.value1=i,s.value2=n,this.renderer.setProgram(this.program),t.call(this.gl,s.location.webGLUniformLocation,i,n),this.pipeline.currentShader=this),this):this},setUniform3:function(t,e,i,n,r,s){var o=this.uniforms[e];return o?((s||o.value1!==i||o.value2!==n||o.value3!==r)&&(o.setter||(o.setter=t),o.value1=i,o.value2=n,o.value3=r,this.renderer.setProgram(this.program),t.call(this.gl,o.location.webGLUniformLocation,i,n,r),this.pipeline.currentShader=this),this):this},setUniform4:function(t,e,i,n,r,s,o){var a=this.uniforms[e];return a?((o||a.value1!==i||a.value2!==n||a.value3!==r||a.value4!==s)&&(a.setter||(a.setter=t),a.value1=i,a.value2=n,a.value3=r,a.value4=s,this.renderer.setProgram(this.program),t.call(this.gl,a.location.webGLUniformLocation,i,n,r,s),this.pipeline.currentShader=this),this):this},setBoolean:function(t,e){return this.setUniform1(this.gl.uniform1i,t,Number(e))},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,n){return this.setUniform3(this.gl.uniform3f,t,e,i,n)},set4f:function(t,e,i,n,r){return this.setUniform4(this.gl.uniform4f,t,e,i,n,r)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e,!0)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e,!0)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e,!0)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e,!0)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e,!0)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e,!0)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e,!0)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e,!0)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,n){return this.setUniform3(this.gl.uniform3i,t,e,i,n)},set4i:function(t,e,i,n,r){return this.setUniform4(this.gl.uniform4i,t,e,i,n,r)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i,!0)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i,!0)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i,!0)},createProgram:function(t,e){return void 0===t&&(t=this.vertSrc),void 0===e&&(e=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=t,this.fragSrc=e,this.program=this.renderer.createProgram(t,e),this.createUniforms(),this.rebind()},destroy:function(){var t=this.renderer;r(this.uniforms,(function(e){t.deleteUniformLocation(e.location)})),this.uniforms=null,r(this.attributes,(function(e){t.deleteAttribLocation(e.location)})),this.attributes=null,t.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});t.exports=a},14500:t=>{t.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},4159:(t,e,i)=>{var n=i(14500),r=i(79291),s={PipelineManager:i(7530),Pipelines:i(96615),RenderTarget:i(32302),Utils:i(70554),WebGLPipeline:i(29100),WebGLRenderer:i(74797),WebGLShader:i(38683),Wrappers:i(9503)};s=r(!1,s,n),t.exports=s},31302:(t,e,i)=>{var n=i(83419),r=i(95540),s=i(78908),o=i(85191),a=i(14500),h=i(29100),l=new n({Extends:h,initialize:function(t){t.fragShader=r(t,"fragShader",s),t.vertShader=r(t,"vertShader",o),t.batchSize=r(t,"batchSize",1),t.vertices=r(t,"vertices",[-1,1,-1,-7,7,1]),t.attributes=r(t,"attributes",[{name:"inPosition",size:2,type:a.FLOAT}]),h.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(t,e){h.prototype.resize.call(this,t,e),this.set2f("uResolution",t,e)},beginMask:function(t,e,i){this.renderer.beginBitmapMask(t,i)},endMask:function(t,e,i){var n=this.gl,r=this.renderer,s=t.bitmapMask;s&&n&&(r.drawBitmapMask(s,e,this),i&&this.set2f("uResolution",i.width,i.height),this.set1i("uInvertMaskAlpha",t.invertAlpha),n.drawArrays(this.topology,0,3),i&&this.set2f("uResolution",this.width,this.height),n.bindTexture(n.TEXTURE_2D,null))}});t.exports=l},92651:(t,e,i)=>{var n=i(83419),r=i(58918),s=i(14811),o=i(95540),a=i(43558),h=i(89350),l=i(70554),u=new n({Extends:a,initialize:function(t){t.shaders=[l.setGlowQuality(h.FXGlowFrag,t.game),h.FXShadowFrag,h.FXPixelateFrag,h.FXVignetteFrag,h.FXShineFrag,h.FXBlurLowFrag,h.FXBlurMedFrag,h.FXBlurHighFrag,h.FXGradientFrag,h.FXBloomFrag,h.ColorMatrixFrag,h.FXCircleFrag,h.FXBarrelFrag,h.FXDisplacementFrag,h.FXWipeFrag,h.FXBokehFrag],a.call(this,t);var e=this.game;this.glow=new r.Glow(e),this.shadow=new r.Shadow(e),this.pixelate=new r.Pixelate(e),this.vignette=new r.Vignette(e),this.shine=new r.Shine(e),this.gradient=new r.Gradient(e),this.circle=new r.Circle(e),this.barrel=new r.Barrel(e),this.wipe=new r.Wipe(e),this.bokeh=new r.Bokeh(e);var i=[];i[s.GLOW]=this.onGlow,i[s.SHADOW]=this.onShadow,i[s.PIXELATE]=this.onPixelate,i[s.VIGNETTE]=this.onVignette,i[s.SHINE]=this.onShine,i[s.BLUR]=this.onBlur,i[s.GRADIENT]=this.onGradient,i[s.BLOOM]=this.onBloom,i[s.COLOR_MATRIX]=this.onColorMatrix,i[s.CIRCLE]=this.onCircle,i[s.BARREL]=this.onBarrel,i[s.DISPLACEMENT]=this.onDisplacement,i[s.WIPE]=this.onWipe,i[s.BOKEH]=this.onBokeh,this.fxHandlers=i,this.source,this.target,this.swap},onDraw:function(t,e,i){this.source=t,this.target=e,this.swap=i;var n=t.width,r=t.height,s=this.tempSprite,o=this.fxHandlers;if(s&&s.preFX)for(var a=s.preFX.list,h=0;h<a.length;h++){var l=a[h];l.active&&o[l.type].call(this,l,n,r)}this.drawToGame(this.source)},runDraw:function(){var t=this.source,e=this.target;this.copy(t,e),this.source=e,this.target=t},onGlow:function(t,e,i){var n=this.shaders[s.GLOW];this.setShader(n),this.glow.onPreRender(t,n,e,i),this.runDraw()},onShadow:function(t){var e=this.shaders[s.SHADOW];this.setShader(e),this.shadow.onPreRender(t,e),this.runDraw()},onPixelate:function(t,e,i){var n=this.shaders[s.PIXELATE];this.setShader(n),this.pixelate.onPreRender(t,n,e,i),this.runDraw()},onVignette:function(t){var e=this.shaders[s.VIGNETTE];this.setShader(e),this.vignette.onPreRender(t,e),this.runDraw()},onShine:function(t,e,i){var n=this.shaders[s.SHINE];this.setShader(n),this.shine.onPreRender(t,n,e,i),this.runDraw()},onBlur:function(t,e,i){var n=o(t,"quality"),r=this.shaders[s.BLUR+n];this.setShader(r),this.set1i("uMainSampler",0),this.set2f("resolution",e,i),this.set1f("strength",o(t,"strength")),this.set3fv("color",o(t,"glcolor"));for(var a=o(t,"x"),h=o(t,"y"),l=o(t,"steps"),u=0;u<l;u++)this.set2f("offset",a,0),this.runDraw(),this.set2f("offset",0,h),this.runDraw()},onGradient:function(t){var e=this.shaders[s.GRADIENT];this.setShader(e),this.gradient.onPreRender(t,e),this.runDraw()},onBloom:function(t,e,i){var n=this.shaders[s.BLOOM];this.copySprite(this.source,this.swap),this.setShader(n),this.set1i("uMainSampler",0),this.set1f("strength",o(t,"blurStrength")),this.set3fv("color",o(t,"glcolor"));for(var r=2/e*o(t,"offsetX"),a=2/i*o(t,"offsetY"),h=o(t,"steps"),l=0;l<h;l++)this.set2f("offset",r,0),this.runDraw(),this.set2f("offset",0,a),this.runDraw();this.blendFrames(this.swap,this.source,this.target,o(t,"strength")),this.copySprite(this.target,this.source)},onColorMatrix:function(t){this.setShader(this.colorMatrixShader),this.set1fv("uColorMatrix",t.getData()),this.set1f("uAlpha",t.alpha),this.runDraw()},onCircle:function(t,e,i){var n=this.shaders[s.CIRCLE];this.setShader(n),this.circle.onPreRender(t,n,e,i),this.runDraw()},onBarrel:function(t){var e=this.shaders[s.BARREL];this.setShader(e),this.barrel.onPreRender(t,e),this.runDraw()},onDisplacement:function(t){this.setShader(this.shaders[s.DISPLACEMENT]),this.set1i("uDisplacementSampler",1),this.set2f("amount",t.x,t.y),this.bindTexture(t.glTexture,1),this.runDraw()},onWipe:function(t){var e=this.shaders[s.WIPE];this.setShader(e),this.wipe.onPreRender(t,e),this.runDraw()},onBokeh:function(t,e,i){var n=this.shaders[s.BOKEH];this.setShader(n),this.bokeh.onPreRender(t,n,e,i),this.runDraw()},destroy:function(){return this.glow.destroy(),this.shadow.destroy(),this.pixelate.destroy(),this.vignette.destroy(),this.shine.destroy(),this.gradient.destroy(),this.circle.destroy(),this.barrel.destroy(),this.wipe.destroy(),this.bokeh.destroy(),this.fxHandlers=null,this.source=null,this.target=null,this.swap=null,a.prototype.destroy.call(this),this}});t.exports=u},96569:(t,e,i)=>{var n=i(83419),r=i(95540),s=i(31063),o=i(57516),a=i(61340),h=i(26099),l=i(29100),u=new n({Extends:o,initialize:function(t){var e=r(t,"fragShader",s);t.fragShader=e.replace("%LIGHT_COUNT%",t.game.renderer.config.maxLights),o.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new h,this._tempMatrix=new a,this._tempMatrix2=new a},boot:function(){l.prototype.boot.call(this)},onRender:function(t,e){var i=t.sys.lights;if(this.lightsActive=!1,i&&i.active){var n,r=i.getLights(e),s=r.length;this.lightsActive=!0;var o=this.renderer.height,a=e.matrix,h=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",e.x,e.y,e.rotation,e.zoom),this.set3f("uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),this.set1i("uLightCount",s),n=0;n<s;n++){var l=r[n].light,u=l.color,c="uLights["+n+"].";a.transformPoint(l.x,l.y,h),this.set2f(c+"position",h.x-e.scrollX*l.scrollFactorX*e.zoom,o-(h.y-e.scrollY*l.scrollFactorY*e.zoom)),this.set3f(c+"color",u.r,u.g,u.b),this.set1f(c+"intensity",l.intensity),this.set1f(c+"radius",l.radius)}this.currentNormalMapRotation=null}},setNormalMapRotation:function(t){if(t!==this.currentNormalMapRotation||0===this.vertexCount){this.vertexCount>0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),r=Math.sin(i);e[1]=r,e[3]=-r,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},setTexture2D:function(t,e){var i=this.renderer;void 0===t&&(t=i.whiteTexture);var n=this.getNormalMap(e);this.isNewNormalMap(t,n)&&(this.flush(),this.createBatch(t),this.addTextureToBatch(n),this.currentNormalMap=n);var r=0;e&&e.parentContainer?r=e.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2).rotationNormalized:e&&(r=e.rotation);return this.setNormalMapRotation(r),0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=e.glTexture,n=this.getNormalMap(t);if(this.isNewNormalMap(i,n)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(n),this.currentNormalMap=n),t.parentContainer){var r=t.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(r.rotationNormalized)}else this.setNormalMapRotation(t.rotation);return 0},isNewNormalMap:function(t,e){return this.currentTexture!==t||this.currentNormalMap!==e},getNormalMap:function(t){var e;return t?(t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=Array.isArray(t.tileset)?t.tileset[0].image.dataSource[0]:t.tileset.image.dataSource[0]),e?e.glTexture:this.renderer.normalMap):this.renderer.normalMap},batchSprite:function(t,e,i){this.lightsActive&&o.prototype.batchSprite.call(this,t,e,i)},batchTexture:function(t,e,i,n,r,s,a,h,l,u,c,d,p,f,m,g,v,y,x,E,T,_,w,S,b,C,A,R,M,L,O,P){this.lightsActive&&o.prototype.batchTexture.call(this,t,e,i,n,r,s,a,h,l,u,c,d,p,f,m,g,v,y,x,E,T,_,w,S,b,C,A,R,M,L,O,P)},batchTextureFrame:function(t,e,i,n,r,s,a){this.lightsActive&&o.prototype.batchTextureFrame.call(this,t,e,i,n,r,s,a)}});t.exports=u},56527:(t,e,i)=>{var n=i(83419),r=i(95540),s=i(57516),o=i(45561),a=i(60722),h=i(14500),l=i(29100),u=new n({Extends:s,initialize:function(t){t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),t.forceZero=!0,t.resizeUniform="uResolution",s.call(this,t)},boot:function(){l.prototype.boot.call(this);var t=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",t.width,t.height),this.set1i("uRoundPixels",t.config.roundPixels)}});t.exports=u},57516:(t,e,i)=>{var n=i(83419),r=i(94811),s=i(95540),o=i(98840),a=i(44667),h=i(61340),l=i(70554),u=i(14500),c=i(29100),d=new n({Extends:c,initialize:function(t){var e=t.game.renderer,i=s(t,"fragShader",o);t.fragShader=l.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=s(t,"vertShader",a),t.attributes=s(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),t.resizeUniform="uResolution",c.call(this,t),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){c.prototype.boot.call(this);var t=this.renderer;this.set1iv("uMainSampler",t.textureIndexes),this.set2f("uResolution",t.width,t.height),this.set1i("uRoundPixels",t.config.roundPixels)},batchSprite:function(t,e,i){this.manager.set(this,t);var n=this._tempMatrix1,r=this._tempMatrix2,s=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,u=o.v0,c=o.u1,d=o.v1,p=o.x,f=o.y,m=o.cutWidth,g=o.cutHeight,v=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,E=-y+p,T=-x+f;if(t.isCropped){var _=t._crop;_.flipX===t.flipX&&_.flipY===t.flipY||o.updateCropUVs(_,t.flipX,t.flipY),h=_.u0,u=_.v0,c=_.u1,d=_.v1,m=_.width,g=_.height,E=-y+(p=_.x),T=-x+(f=_.y)}var w=1,S=1;t.flipX&&(v||(E+=-o.realWidth+2*y),w=-1),(t.flipY||o.source.isGLTexture&&o.source.isRenderTexture&&!a.flipY)&&(v||(T+=-o.realHeight+2*x),S=-1);var b=t.x,C=t.y;r.applyITRS(b,C,t.rotation,t.scaleX*w,t.scaleY*S),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),r.e=b,r.f=C):(r.e-=e.scrollX*t.scrollFactorX,r.f-=e.scrollY*t.scrollFactorY),n.multiply(r,s);var A=s.setQuad(E,T,E+m,T+g),R=l.getTintAppendFloatAlpha,M=e.alpha,L=R(t.tintTopLeft,M*t._alphaTL),O=R(t.tintTopRight,M*t._alphaTR),P=R(t.tintBottomLeft,M*t._alphaBL),F=R(t.tintBottomRight,M*t._alphaBR);this.shouldFlush(6)&&this.flush();var I=this.setGameObject(t,o);this.manager.preBatch(t),this.currentShader.set1i("uRoundPixels",e.roundPixels),this.batchQuad(t,A[0],A[1],A[2],A[3],A[4],A[5],A[6],A[7],h,u,c,d,L,O,P,F,t.tintFill,a,I),this.manager.postBatch(t)},batchTexture:function(t,e,i,n,r,s,o,a,h,l,u,c,d,p,f,m,g,v,y,x,E,T,_,w,S,b,C,A,R,M,L,O,P){void 0===P&&(P=!1),this.manager.set(this,t);var F=this._tempMatrix1,I=this._tempMatrix2,D=this._tempMatrix3,N=v/i+C,k=y/n+A,B=(v+x)/i+C,U=(y+E)/n+A,G=o,W=a,X=-m,V=-g;if(t.isCropped){var $=t._crop,H=$.width,z=$.height;G=H,W=z,o=H,a=z;var Y=v=$.x,j=y=$.y;c&&(Y=x-$.x-H),d&&(j=E-$.y-z),N=Y/i+C,k=j/n+A,B=(Y+H)/i+C,U=(j+z)/n+A,X=-m+v,V=-g+y}c&&(G*=-1,X+=o),(d^=!L&&e.isRenderTexture?1:0)&&(W*=-1,V+=a),I.applyITRS(r,s,u,h,l),F.copyFrom(R.matrix),M?(F.multiplyWithOffset(M,-R.scrollX*p,-R.scrollY*f),I.e=r,I.f=s):(I.e-=R.scrollX*p,I.f-=R.scrollY*f),F.multiply(I,D);var K=D.setQuad(X,V,X+G,V+W);null==O&&(O=this.setTexture2D(e)),t&&!P&&this.manager.preBatch(t),this.currentShader.set1i("uRoundPixels",R.roundPixels),this.batchQuad(t,K[0],K[1],K[2],K[3],K[4],K[5],K[6],K[7],N,k,B,U,T,_,w,S,b,e,O),t&&!P&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,n,r,s,o){this.manager.set(this);var a=this._tempMatrix1.copyFrom(s),h=this._tempMatrix2;o?a.multiply(o,h):h=a;var u=h.setQuad(e,i,e+t.width,i+t.height),c=this.setTexture2D(t.source.glTexture);n=l.getTintAppendFloatAlpha(n,r),this.batchQuad(null,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,c)},batchFillRect:function(t,e,i,n,r,s){this.renderer.pipelines.set(this);var o=this.calcMatrix;s&&s.multiply(r,o);var a=o.setQuad(t,e,t+i,e+n),h=this.fillTint;this.batchQuad(null,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],0,0,1,1,h.TL,h.TR,h.BL,h.BR,2)},batchFillTriangle:function(t,e,i,n,r,s,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),p=h.getX(r,s),f=h.getY(r,s),m=this.fillTint;this.currentShader.set1i("uRoundPixels",!1),this.batchTri(null,l,u,c,d,p,f,0,0,1,1,m.TL,m.TR,m.BL,2)},batchStrokeTriangle:function(t,e,i,n,r,s,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=r,l[2].y=s,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var n=this.calcMatrix;i&&i.multiply(e,n);for(var s,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=0;d<a;++d)o=t[d],h.push(o.x,o.y);a=(s=r(h)).length,this.currentShader.set1i("uRoundPixels",!1);for(var p=0;p<a;p+=3){var f=2*s[p+0],m=2*s[p+1],g=2*s[p+2],v=h[f+0],y=h[f+1],x=h[m+0],E=h[m+1],T=h[g+0],_=h[g+1],w=n.getX(v,y),S=n.getY(v,y),b=n.getX(x,E),C=n.getY(x,E),A=n.getX(T,_),R=n.getY(T,_);this.batchTri(null,w,S,b,C,A,R,0,0,1,1,l,u,c,2)}h.length=0},batchStrokePath:function(t,e,i,n,r){this.renderer.pipelines.set(this),this.prevQuad[4]=0,this.firstQuad[4]=0;for(var s=t.length-1,o=0;o<s;o++){var a=t[o],h=t[o+1];this.batchLine(a.x,a.y,h.x,h.y,a.width/2,h.width/2,e,o,!i&&o===s-1,n,r)}},batchLine:function(t,e,i,n,r,s,o,a,h,l,u){this.renderer.pipelines.set(this);var c=this.calcMatrix;u&&u.multiply(l,c);var d=i-t,p=n-e,f=Math.sqrt(d*d+p*p);if(0!==f){var m=r*(n-e)/f,g=r*(t-i)/f,v=s*(n-e)/f,y=s*(t-i)/f,x=i-v,E=n-y,T=t-m,_=e-g,w=i+v,S=n+y,b=t+m,C=e+g,A=c.getX(x,E),R=c.getY(x,E),M=c.getX(T,_),L=c.getY(T,_),O=c.getX(w,S),P=c.getY(w,S),F=c.getX(b,C),I=c.getY(b,C),D=this.strokeTint,N=D.TL,k=D.TR,B=D.BL,U=D.BR;if(this.currentShader.set1i("uRoundPixels",!1),this.batchQuad(null,F,I,M,L,A,R,O,P,0,0,1,1,N,k,B,U,2),!(o<=2)){var G=this.prevQuad,W=this.firstQuad;a>0&&G[4]?this.batchQuad(null,F,I,M,L,G[0],G[1],G[2],G[3],0,0,1,1,N,k,B,U,2):(W[0]=F,W[1]=I,W[2]=M,W[3]=L,W[4]=1),h&&W[4]?this.batchQuad(null,A,R,O,P,W[0],W[1],W[2],W[3],0,0,1,1,N,k,B,U,2):(G[0]=A,G[1]=R,G[2]=O,G[3]=P,G[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,c.prototype.destroy.call(this),this}});t.exports=d},43439:(t,e,i)=>{var n=i(83419),r=i(95540),s=i(4127),o=i(89924),a=i(29100),h=new n({Extends:a,initialize:function(t){t.vertShader=r(t,"vertShader",o),t.fragShader=r(t,"fragShader",s),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),a.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,n,r,s,o,a,h,l,u,c){var d=t.color,p=t.intensity,f=t.radius,m=t.attenuation,g=d.r*p,v=d.g*p,y=d.b*p,x=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,n,u,c,f,m,g,v,y,x),this.batchLightVert(r,s,u,c,f,m,g,v,y,x),this.batchLightVert(o,a,u,c,f,m,g,v,y,x),this.batchLightVert(i,n,u,c,f,m,g,v,y,x),this.batchLightVert(o,a,u,c,f,m,g,v,y,x),this.batchLightVert(h,l,u,c,f,m,g,v,y,x),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(t,e,i,n,r,s,o,a,h,l){var u=this.vertexViewF32,c=this.vertexCount*this.currentShader.vertexComponentCount-1;u[++c]=t,u[++c]=e,u[++c]=i,u[++c]=n,u[++c]=r,u[++c]=s,u[++c]=o,u[++c]=a,u[++c]=h,u[++c]=l,this.vertexCount++}});t.exports=h},84057:(t,e,i)=>{var n=i(83419),r=i(89422),s=i(95540),o=i(27681),a=i(49627),h=i(29100),l=new n({Extends:h,initialize:function(t){t.renderTarget=s(t,"renderTarget",1),t.fragShader=s(t,"fragShader",o),t.vertShader=s(t,"vertShader",a),t.attributes=s(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new r,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2;var e=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",e.width,e.height),this.set1i("uRoundPixels",e.config.roundPixels);for(var i=this.renderTargets,n=0;n<i.length;n++)i[n].autoResize=!0},postBatch:function(t){return this.hasBooted||(this.bootFX(),this.currentRenderTarget&&this.currentRenderTarget.bind()),this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(t){this.bindAndDraw(t)},getController:function(t){return void 0!==t?t:this.controller?this.controller:this},copySprite:function(t,e,i){void 0===i&&(i=!1);var n=this.gl;n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,t.texture.webGLTexture);var r=n.getParameter(n.FRAMEBUFFER_BINDING);n.bindFramebuffer(n.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e.texture.webGLTexture,0),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.bufferData(n.ARRAY_BUFFER,this.vertexData,n.STATIC_DRAW),n.drawArrays(n.TRIANGLES,0,6),i&&(n.bindTexture(n.TEXTURE_2D,null),n.bindFramebuffer(n.FRAMEBUFFER,r))},copyFrame:function(t,e,i,n,r){this.manager.copyFrame(t,e,i,n,r)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,n,r){this.manager.blendFrames(t,e,i,n,r)},blendFramesAdditive:function(t,e,i,n,r){this.manager.blendFramesAdditive(t,e,i,n,r)},clearFrame:function(t,e){this.manager.clearFrame(t,e)},blitFrame:function(t,e,i,n,r,s){this.manager.blitFrame(t,e,i,n,r,s)},copyFrameRect:function(t,e,i,n,r,s,o,a){this.manager.copyFrameRect(t,e,i,n,r,s,o,a)},bindAndDraw:function(t,e,i,n,r){void 0===i&&(i=!0),void 0===n&&(n=!0);var s=this.gl,o=this.renderer;this.bind(r),this.set1i("uMainSampler",0),e?(s.viewport(0,0,e.width,e.height),s.bindFramebuffer(s.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e.texture.webGLTexture,0),i&&(n?s.clearColor(0,0,0,0):s.clearColor(0,0,0,1),s.clear(s.COLOR_BUFFER_BIT))):(o.popFramebuffer(!1,!1),o.currentFramebuffer||s.viewport(0,0,o.width,o.height)),o.restoreStencilMask(),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,t.texture.webGLTexture),s.bufferData(s.ARRAY_BUFFER,this.vertexData,s.STATIC_DRAW),s.drawArrays(s.TRIANGLES,0,6),e&&(s.bindTexture(s.TEXTURE_2D,null),s.bindFramebuffer(s.FRAMEBUFFER,o.currentFramebuffer.webGLFramebuffer))},destroy:function(){return this.controller&&this.controller.destroy(),this.gameObject=null,this.controller=null,this.colorMatrix=null,this.fullFrame1=null,this.fullFrame2=null,this.halfFrame1=null,this.halfFrame2=null,this.manager.removePostPipeline(this),h.prototype.destroy.call(this),this}});t.exports=l},43558:(t,e,i)=>{var n=i(10312),r=i(67502),s=i(83419),o=i(96293),a=i(95540),h=i(57516),l=i(27681),u=i(87841),c=i(32302),d=i(45561),p=i(60722),f=i(29100),m=new s({Extends:h,initialize:function(t){var e=a(t,"fragShader",l),i=a(t,"vertShader",p),n=a(t,"drawShader",l),r=[{name:"DrawSprite",fragShader:d,vertShader:p},{name:"CopySprite",fragShader:e,vertShader:i},{name:"DrawGame",fragShader:n,vertShader:p},{name:"ColorMatrix",fragShader:o}],s=a(t,"shaders",[]);t.shaders=r.concat(s),t.vertShader||(t.vertShader=i),t.batchSize=1,h.call(this,t),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new u,this.targetBounds=new u,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){f.prototype.boot.call(this);var t=this.shaders,e=this.renderer;this.drawSpriteShader=t[0],this.copyShader=t[1],this.gameShader=t[2],this.colorMatrixShader=t[3],this.fsTarget=new c(e,e.width,e.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var i=new ArrayBuffer(168);this.quadVertexData=i,this.quadVertexViewF32=new Float32Array(i),this.quadVertexBuffer=e.createVertexBuffer(i,this.gl.STATIC_DRAW),this.onResize(e.width,e.height),this.currentShader=this.copyShader,this.set2f("uResolution",e.width,e.height),this.set1i("uRoundPixels",e.config.roundPixels)},onResize:function(t,e){var i=this.quadVertexViewF32;i[1]=e,i[22]=e,i[14]=t,i[28]=t,i[35]=t,i[36]=e},batchQuad:function(t,e,i,n,s,o,a,h,l,u,c,d,p,f,m,g,v,y,x){var E=Math.min(e,n,o,h),T=Math.min(i,s,a,l),_=Math.max(e,n,o,h)-E,w=Math.max(i,s,a,l)-T,S=this.spriteBounds.setTo(E,T,_,w),b=t?t.preFX.padding:0,C=_+2*b,A=w+2*b,R=Math.abs(Math.max(C,A)),M=this.manager.getRenderTarget(R),L=this.targetBounds.setTo(0,0,M.width,M.height);r(L,S.centerX,S.centerY),this.tempSprite=t;var O=this.gl,P=this.renderer;P.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",P.width,P.height),this.set1i("uRoundPixels",P.config.roundPixels),this.flipProjectionMatrix(!0),t&&(this.onDrawSprite(t,M),t.preFX.onFX(this));var F=this.fsTarget;return this.flush(),O.viewport(0,0,P.width,P.height),O.bindFramebuffer(O.FRAMEBUFFER,F.framebuffer.webGLFramebuffer),O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,F.texture.webGLTexture,0),O.clearColor(0,0,0,0),O.clear(O.COLOR_BUFFER_BIT),this.setTexture2D(x),this.batchVert(e,i,u,c,0,y,f),this.batchVert(n,s,u,p,0,y,g),this.batchVert(o,a,d,p,0,y,v),this.batchVert(e,i,u,c,0,y,f),this.batchVert(o,a,d,p,0,y,v),this.batchVert(h,l,d,c,0,y,m),this.flush(),this.flipProjectionMatrix(!1),O.activeTexture(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,M.texture.webGLTexture),O.copyTexSubImage2D(O.TEXTURE_2D,0,0,0,L.x,L.y,L.width,L.height),O.bindFramebuffer(O.FRAMEBUFFER,null),O.bindTexture(O.TEXTURE_2D,null),this.onBatch(t),this.currentShader=this.copyShader,this.onDraw(M,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(t,e,i,r,s,o,a){void 0===i&&(i=!0),void 0===r&&(r=!0),void 0===s&&(s=!1),void 0===a&&(a=this.copyShader);var h=this.gl,l=this.tempSprite;o&&(a=this.colorMatrixShader),this.currentShader=a;var u=this.setVertexBuffer(this.quadVertexBuffer);a.bind(u,!1);var c=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",c.width,c.height),this.set1i("uRoundPixels",c.config.roundPixels),l.preFX.onFXCopy(this),this.onCopySprite(t,e,l),o&&(this.set1fv("uColorMatrix",o.getData()),this.set1f("uAlpha",o.alpha)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,t.texture.webGLTexture),t.height>e.height)h.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var d=e.height-t.height;h.viewport(0,d,t.width,t.height),this.resetUVs()}if(h.bindFramebuffer(h.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,e.texture.webGLTexture,0),i&&(h.clearColor(0,0,0,Number(!r)),h.clear(h.COLOR_BUFFER_BIT)),s){var p=this.renderer.currentBlendMode;this.renderer.setBlendMode(n.ERASE)}h.bufferData(h.ARRAY_BUFFER,this.quadVertexData,h.STATIC_DRAW),h.drawArrays(h.TRIANGLES,0,6),s&&this.renderer.setBlendMode(p),h.bindFramebuffer(h.FRAMEBUFFER,null)},copy:function(t,e){var i=this.gl;this.set1i("uMainSampler",0),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t.texture.webGLTexture),i.viewport(0,0,t.width,t.height),this.setUVs(0,0,0,1,1,1,1,0),i.bindFramebuffer(i.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,e.texture.webGLTexture,0),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.bufferData(i.ARRAY_BUFFER,this.quadVertexData,i.STATIC_DRAW),i.drawArrays(i.TRIANGLES,0,6),i.bindFramebuffer(i.FRAMEBUFFER,null)},blendFrames:function(t,e,i,n,r){this.manager.blendFrames(t,e,i,n,r)},blendFramesAdditive:function(t,e,i,n,r){this.manager.blendFramesAdditive(t,e,i,n,r)},drawToGame:function(t){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(t)},copyToGame:function(t){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(t)},bindAndDraw:function(t){var e=this.gl,i=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(t.texture);var n=this._tempMatrix1.loadIdentity(),r=this.targetBounds.x,s=this.targetBounds.y,o=r+t.width,a=s+t.height,h=n.getX(r,s),l=n.getX(r,a),u=n.getX(o,a),c=n.getX(o,s),d=n.getY(r,s),p=n.getY(r,a),f=n.getY(o,a),m=n.getY(o,s),g=16777215;this.batchVert(h,d,0,0,0,0,g),this.batchVert(l,p,0,1,0,0,g),this.batchVert(u,f,1,1,0,0,g),this.batchVert(h,d,0,0,0,0,g),this.batchVert(u,f,1,1,0,0,g),this.batchVert(c,m,1,0,0,0,g),i.restoreFramebuffer(!1,!0),i.currentFramebuffer||e.viewport(0,0,i.width,i.height),i.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(t){this.drawToGame(t)},setUVs:function(t,e,i,n,r,s,o,a){var h=this.quadVertexViewF32;h[2]=t,h[3]=e,h[9]=i,h[10]=n,h[16]=r,h[17]=s,h[23]=t,h[24]=e,h[30]=r,h[31]=s,h[37]=o,h[38]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.renderer.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,h.prototype.destroy.call(this),this}});t.exports=m},81041:(t,e,i)=>{var n=i(83419),r=i(95540),s=i(57516),o=new n({Extends:s,initialize:function(t){t.topology=5,t.batchSize=r(t,"batchSize",256),s.call(this,t)}});t.exports=o},12385:(t,e,i)=>{var n=i(83419),r=i(95540),s=i(57516),o=i(45561),a=i(60722),h=i(29100),l=new n({Extends:s,initialize:function(t){t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.forceZero=!0,s.call(this,t)},boot:function(){h.prototype.boot.call(this);var t=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",t.width,t.height),this.set1i("uRoundPixels",t.config.roundPixels)}});t.exports=l},7589:(t,e,i)=>{var n=i(35407),r=i(10312),s=i(83419),o=i(89422),a=i(96293),h=i(36682),l=i(95540),u=i(48247),c=i(49627),d=i(29100),p=new s({Extends:d,initialize:function(t){t.renderTarget=l(t,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),t.vertShader=l(t,"vertShader",c),t.shaders=l(t,"shaders",[{name:"Copy",fragShader:h},{name:"AddBlend",fragShader:n},{name:"LinearBlend",fragShader:u},{name:"ColorMatrix",fragShader:a}]),t.attributes=l(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,d.call(this,t),this.colorMatrix=new o,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,n,r){void 0===i&&(i=1),void 0===n&&(n=!0),void 0===r&&(r=!0);var s=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,t.texture.webGLTexture),e?(s.viewport(0,0,e.width,e.height),s.bindFramebuffer(s.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,e.texture.webGLTexture,0)):s.viewport(0,0,t.width,t.height),n&&(r?s.clearColor(0,0,0,0):s.clearColor(0,0,0,1),s.clear(s.COLOR_BUFFER_BIT)),s.bufferData(s.ARRAY_BUFFER,this.vertexData,s.STATIC_DRAW),s.drawArrays(s.TRIANGLES,0,6),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindTexture(s.TEXTURE_2D,null)},blitFrame:function(t,e,i,n,s,o,a){void 0===i&&(i=1),void 0===n&&(n=!0),void 0===s&&(s=!0),void 0===o&&(o=!1),void 0===a&&(a=!1);var h=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,t.texture.webGLTexture),t.height>e.height)h.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var l=e.height-t.height;h.viewport(0,l,t.width,t.height)}if(h.bindFramebuffer(h.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,e.texture.webGLTexture,0),n&&(s?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),o){var u=this.renderer.currentBlendMode;this.renderer.setBlendMode(r.ERASE)}a&&this.flipY(),h.bufferData(h.ARRAY_BUFFER,this.vertexData,h.STATIC_DRAW),h.drawArrays(h.TRIANGLES,0,6),o&&this.renderer.setBlendMode(u),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,n,r,s,o,a){void 0===o&&(o=!0),void 0===a&&(a=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer.webGLFramebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture.webGLTexture,0),o&&(a?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture.webGLTexture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,n,r,s),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture.webGLTexture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6)},drawFrame:function(t,e,i,n){void 0===i&&(i=!0),void 0===n&&(n=this.colorMatrix);var r=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",n.getData()),this.set1f("uAlpha",n.alpha),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture.webGLTexture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture.webGLTexture,0)):r.viewport(0,0,t.width,t.height),i?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blendFrames:function(t,e,i,n,r,s){void 0===n&&(n=1),void 0===r&&(r=!0),void 0===s&&(s=this.linearShader);var o=this.gl;this.setShader(s),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",n),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture.webGLTexture),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,e.texture.webGLTexture),i?(o.bindFramebuffer(o.FRAMEBUFFER,i.framebuffer.webGLFramebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,i.texture.webGLTexture,0),o.viewport(0,0,i.width,i.height)):o.viewport(0,0,t.width,t.height),r?o.clearColor(0,0,0,0):o.clearColor(0,0,0,1),o.clear(o.COLOR_BUFFER_BIT),o.bufferData(o.ARRAY_BUFFER,this.vertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),o.bindFramebuffer(o.FRAMEBUFFER,null),o.bindTexture(o.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,n,r){this.blendFrames(t,e,i,n,r,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl;i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer.webGLFramebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT);var n=this.renderer.currentFramebuffer;i.bindFramebuffer(i.FRAMEBUFFER,n.webGLFramebuffer)},setUVs:function(t,e,i,n,r,s,o,a){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=n,h[10]=r,h[11]=s,h[14]=t,h[15]=e,h[18]=r,h[19]=s,h[22]=o,h[23]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});t.exports=p},36060:t=>{t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"}},84817:t=>{t.exports="pipelineafterflush"},36712:t=>{t.exports="pipelinebeforeflush"},40285:t=>{t.exports="pipelinebind"},65918:t=>{t.exports="pipelineboot"},92852:t=>{t.exports="pipelinedestroy"},56072:t=>{t.exports="pipelinerebind"},57566:t=>{t.exports="pipelineresize"},77085:(t,e,i)=>{t.exports={AFTER_FLUSH:i(84817),BEFORE_FLUSH:i(36712),BIND:i(40285),BOOT:i(65918),DESTROY:i(92852),REBIND:i(56072),RESIZE:i(57566)}},54812:(t,e,i)=>{var n=i(83419),r=i(99155),s=i(84057),o=new n({Extends:s,initialize:function(t){s.call(this,{game:t,fragShader:r}),this.amount=1},onPreRender:function(t,e){t=this.getController(t),this.set1f("amount",t.amount,e)}});t.exports=o},67329:(t,e,i)=>{var n=i(83419),r=i(24400),s=i(84057),o=new n({Extends:s,initialize:function(t){s.call(this,{game:t,fragShader:r}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(t){t=this.getController(t),this.set1f("strength",t.blurStrength),this.set3fv("color",t.glcolor)},onDraw:function(t){var e=this.getController(),i=this.fullFrame1,n=this.fullFrame2;this.copyFrame(t,n);for(var r=2/t.width*e.offsetX,s=2/t.height*e.offsetY,o=0;o<e.steps;o++)this.set2f("offset",r,0),this.copySprite(t,i),this.set2f("offset",0,s),this.copySprite(i,t);this.blendFrames(n,t,i,e.strength),this.copyToGame(i)}});t.exports=o},8861:(t,e,i)=>{var n=i(83419),r=i(41514),s=i(51078),o=i(94328),a=i(84057),h=new n({Extends:a,initialize:function(t){a.call(this,{game:t,shaders:[{name:"Gaussian5",fragShader:r},{name:"Gaussian9",fragShader:s},{name:"Gaussian13",fragShader:o}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(t){var e=this.getController(),i=this.gl,n=this.fullFrame1,r=i.getParameter(i.FRAMEBUFFER_BINDING);this.bind(this.shaders[e.quality]),i.activeTexture(i.TEXTURE0),i.viewport(0,0,t.width,t.height),this.set1i("uMainSampler",0),this.set2f("resolution",t.width,t.height),this.set1f("strength",e.strength),this.set3fv("color",e.glcolor);for(var s=0;s<e.steps;s++)this.set2f("offset",e.x,0),this.copySprite(t,n),this.set2f("offset",0,e.y),this.copySprite(n,t);i.bindFramebuffer(i.FRAMEBUFFER,r),i.bindTexture(i.TEXTURE_2D,null),this.copyToGame(t)}});t.exports=h},51051:(t,e,i)=>{var n=i(83419),r=i(90610),s=i(84057),o=new n({Extends:s,initialize:function(t){s.call(this,{game:t,fragShader:r}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(t,e,i,n){t=this.getController(t),this.set1f("radius",t.radius,e),this.set1f("amount",t.amount,e),this.set1f("contrast",t.contrast,e),this.set1f("strength",t.strength,e),this.set2f("blur",t.blurX,t.blurY,e),this.setBoolean("isTiltShift",t.isTiltShift,e),i&&n&&this.set2f("resolution",i,n,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=o},89428:(t,e,i)=>{var n=i(83419),r=i(91899),s=i(84057),o=new n({Extends:s,initialize:function(t){s.call(this,{game:t,fragShader:r}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(t,e,i,n){t=this.getController(t),this.set1f("scale",t.scale,e),this.set1f("feather",t.feather,e),this.set1f("thickness",t.thickness,e),this.set3fv("color",t.glcolor,e),this.set4fv("backgroundColor",t.glcolor2,e),i&&n&&this.set2f("resolution",i,n,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=o},88904:(t,e,i)=>{var n=i(83419),r=i(84057),s=new n({Extends:r,initialize:function(t){r.call(this,{game:t})},onDraw:function(t){var e=this.fullFrame1;this.controller?this.manager.drawFrame(t,e,!0,this.controller):this.drawFrame(t,e),this.copyToGame(e)}});t.exports=s},63563:(t,e,i)=>{var n=i(83419),r=i(47838),s=i(84057),o=new n({Extends:s,initialize:function(t){s.call(this,{game:t,fragShader:r}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(t){var e=this.game.textures.getFrame(t);e&&(this.glTexture=e.glTexture)},onDraw:function(t){var e=this.getController(),i=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",e.x,e.y),this.bindTexture(e.glTexture,1),this.copySprite(t,i),this.copyToGame(i)}});t.exports=o},94045:(t,e,i)=>{var n=i(83419),r=i(95540),s=i(98656),o=i(84057),a=i(70554),h=new n({Extends:o,initialize:function(t,e){var i=r(e,"quality",.1),n=r(e,"distance",10);o.call(this,{game:t,fragShader:a.setGlowQuality(s,t,i,n)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(t,e,i,n){t=this.getController(t),this.set1f("outerStrength",t.outerStrength,e),this.set1f("innerStrength",t.innerStrength,e),this.set4fv("glowColor",t.glcolor,e),this.setBoolean("knockout",t.knockout,e),i&&n&&this.set2f("resolution",i,n,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=h},74088:(t,e,i)=>{var n=i(83419),r=i(70463),s=i(84057),o=new n({Extends:s,initialize:function(t){s.call(this,{game:t,fragShader:r}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(t,e){t=this.getController(t),this.set1f("alpha",t.alpha,e),this.set1i("size",t.size,e),this.set3fv("color1",t.glcolor1,e),this.set3fv("color2",t.glcolor2,e),this.set2f("positionFrom",t.fromX,t.fromY,e),this.set2f("positionTo",t.toX,t.toY,e)}});t.exports=o},99636:(t,e,i)=>{var n=i(83419),r=i(50831),s=i(84057),o=new n({Extends:s,initialize:function(t){s.call(this,{game:t,fragShader:r}),this.amount=1},onPreRender:function(t,e,i,n){t=this.getController(t),this.set1f("amount",t.amount,e),i&&n&&this.set2f("resolution",i,n,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=o},34700:(t,e,i)=>{var n=i(83419),r=i(92595),s=i(84057),o=new n({Extends:s,initialize:function(t){s.call(this,{game:t,fragShader:r}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(t,e){var i=(t=this.getController(t)).samples;this.set1i("samples",i,e),this.set1f("intensity",t.intensity,e),this.set1f("decay",t.decay,e),this.set1f("power",t.power/i,e),this.set2f("lightPosition",t.x,t.y,e),this.set4fv("color",t.glcolor,e)}});t.exports=o},91157:(t,e,i)=>{var n=i(83419),r=i(72464),s=i(84057),o=new n({Extends:s,initialize:function(t){s.call(this,{game:t,fragShader:r}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(t,e,i,n){t=this.getController(t),this.setTime("time",e),this.set1f("speed",t.speed,e),this.set1f("lineWidth",t.lineWidth,e),this.set1f("gradient",t.gradient,e),this.setBoolean("reveal",t.reveal,e),i&&n&&this.set2f("resolution",i,n,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=o},27797:(t,e,i)=>{var n=i(83419),r=i(39249),s=i(84057),o=new n({Extends:s,initialize:function(t){s.call(this,{game:t,fragShader:r}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(t,e){t=this.getController(t),this.set1f("radius",t.radius,e),this.set1f("strength",t.strength,e),this.set2f("position",t.x,t.y,e)}});t.exports=o},67603:(t,e,i)=>{var n=i(83419),r=i(2878),s=i(84057),o=new n({Extends:s,initialize:function(t){s.call(this,{game:t,fragShader:r}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(t,e){var i=(t=this.getController(t)).progress,n=t.wipeWidth,r=t.direction,s=t.axis;this.set4f("config",i,n,r,s,e),this.setBoolean("reveal",t.reveal,e)}});t.exports=o},58918:(t,e,i)=>{var n={Barrel:i(54812),Bloom:i(67329),Blur:i(8861),Bokeh:i(51051),Circle:i(89428),ColorMatrix:i(88904),Displacement:i(63563),Glow:i(94045),Gradient:i(74088),Pixelate:i(99636),Shadow:i(34700),Shine:i(91157),Vignette:i(27797),Wipe:i(67603)};t.exports=n},96615:(t,e,i)=>{var n=i(36060),r=i(79291),s={FX:i(58918),BitmapMaskPipeline:i(31302),Events:i(77085),FXPipeline:i(92651),LightPipeline:i(96569),MobilePipeline:i(56527),MultiPipeline:i(57516),PointLightPipeline:i(43439),PostFXPipeline:i(84057),PreFXPipeline:i(43558),RopePipeline:i(81041),SinglePipeline:i(12385),UtilityPipeline:i(7589)};s=r(!1,s,n),t.exports=s},35407:t=>{t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join("\n")},78908:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join("\n")},85191:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join("\n")},96293:t=>{t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join("\n")},36682:t=>{t.exports=["#define SHADER_NAME PHASER_COPY_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uBrightness;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}"].join("\n")},99155:t=>{t.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join("\n")},24400:t=>{t.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join("\n")},94328:t=>{t.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},41514:t=>{t.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},51078:t=>{t.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},90610:t=>{t.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join("\n")},91899:t=>{t.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join("\n")},47838:t=>{t.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join("\n")},98656:t=>{t.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join("\n")},70463:t=>{t.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join("\n")},50831:t=>{t.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join("\n")},92595:t=>{t.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join("\n")},72464:t=>{t.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{","\tvec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join("\n")},39249:t=>{t.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," \tcol = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join("\n")},2878:t=>{t.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join("\n")},31063:t=>{t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","precision mediump float;","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = %LIGHT_COUNT%;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}"].join("\n")},48247:t=>{t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}"].join("\n")},41214:t=>{t.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join("\n")},39653:t=>{t.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join("\n")},62143:t=>{t.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},47940:t=>{t.exports=["#define SHADER_NAME PHASER_MOBILE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform int uRoundPixels;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," if (uRoundPixels == 1)"," {"," gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;"," }"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},98840:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler[%count%];","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture;"," %forloop%"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},44667:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform int uRoundPixels;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," if (uRoundPixels == 1)"," {"," gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;"," }"," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},4127:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","precision mediump float;","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);"," float distToSurf = length(center - gl_FragCoord.xy);"," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);"," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);"," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join("\n")},89924:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}"].join("\n")},27681:t=>{t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join("\n")},49627:t=>{t.exports=["#define SHADER_NAME PHASER_QUAD_VS","precision mediump float;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outFragCoord;","varying vec2 outTexCoord;","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;"," gl_Position = vec4(inPosition, 0, 1);","}"].join("\n")},45561:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},60722:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform int uRoundPixels;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," if (uRoundPixels == 1)"," {"," gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;"," }"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},89350:(t,e,i)=>{t.exports={AddBlendFrag:i(35407),BitmapMaskFrag:i(78908),BitmapMaskVert:i(85191),ColorMatrixFrag:i(96293),CopyFrag:i(36682),FXBarrelFrag:i(99155),FXBloomFrag:i(24400),FXBlurHighFrag:i(94328),FXBlurLowFrag:i(41514),FXBlurMedFrag:i(51078),FXBokehFrag:i(90610),FXCircleFrag:i(91899),FXDisplacementFrag:i(47838),FXGlowFrag:i(98656),FXGradientFrag:i(70463),FXPixelateFrag:i(50831),FXShadowFrag:i(92595),FXShineFrag:i(72464),FXVignetteFrag:i(39249),FXWipeFrag:i(2878),LightFrag:i(31063),LinearBlendFrag:i(48247),MeshFrag:i(41214),MeshVert:i(39653),MobileFrag:i(62143),MobileVert:i(47940),MultiFrag:i(98840),MultiVert:i(44667),PointLightFrag:i(4127),PointLightVert:i(89924),PostFXFrag:i(27681),QuadVert:i(49627),SingleFrag:i(45561),SingleVert:i(60722)}},93567:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e,i){this.webGLAttribLocation=-1,this.gl=t,this.program=e,this.name=i,this.createResource()},createResource:function(){if(null!==this.program.webGLProgram){var t=this.gl;t.isContextLost()||(this.webGLAttribLocation=t.getAttribLocation(this.program.webGLProgram,this.name))}else this.webGLAttribLocation=-1},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});t.exports=n},26128:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e,i,n){this.webGLBuffer=null,this.gl=t,this.initialDataOrSize=e,this.bufferType=i,this.bufferUsage=n,this.createResource()},createResource:function(){if(null!==this.initialDataOrSize){var t=this.gl;if(!t.isContextLost()){var e=this.bufferType,i=t.createBuffer();this.webGLBuffer=i,t.bindBuffer(e,this.webGLBuffer),t.bufferData(e,this.initialDataOrSize,this.bufferUsage),t.bindBuffer(e,null)}}},destroy:function(){var t=this.gl;t.isContextLost()||t.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});t.exports=n},84387:(t,e,i)=>{var n=i(83419),r={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},s=new n({initialize:function(t,e,i,n,r){this.webGLFramebuffer=null,this.gl=t,this.width=e,this.height=i,this.renderTexture=n,this.addDepthStencilBuffer=!!r,this.createResource()},createResource:function(){var t=this.gl;if(!t.isContextLost()){var e,i=this.renderTexture,n=t.createFramebuffer();if(this.webGLFramebuffer=n,t.bindFramebuffer(t.FRAMEBUFFER,n),i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i.webGLTexture,0),(e=t.checkFramebufferStatus(t.FRAMEBUFFER))!==t.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(r[e]||e));if(this.addDepthStencilBuffer){var s=t.createRenderbuffer();t.bindRenderbuffer(t.RENDERBUFFER,s),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,s)}t.bindFramebuffer(t.FRAMEBUFFER,null)}},destroy:function(){if(null!==this.webGLFramebuffer){var t=this.gl;if(!t.isContextLost()){t.bindFramebuffer(t.FRAMEBUFFER,this.webGLFramebuffer);var e=t.getFramebufferAttachmentParameter(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);null!==e&&(t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,null,0),t.deleteTexture(e));var i=t.getFramebufferAttachmentParameter(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);null!==i&&t.deleteRenderbuffer(i),t.bindFramebuffer(t.FRAMEBUFFER,null),t.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});t.exports=s},1482:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e,i){this.webGLProgram=null,this.gl=t,this.vertexSource=e,this.fragmentSource=i,this.createResource()},createResource:function(){var t=this.gl;if(!t.isContextLost()){var e=t.createProgram(),i=t.createShader(t.VERTEX_SHADER),n=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(i,this.vertexSource),t.shaderSource(n,this.fragmentSource),t.compileShader(i),t.compileShader(n);var r="Shader failed:\n";if(!t.getShaderParameter(i,t.COMPILE_STATUS))throw new Error("Vertex "+r+t.getShaderInfoLog(i));if(!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error("Fragment "+r+t.getShaderInfoLog(n));if(t.attachShader(e,i),t.attachShader(e,n),t.linkProgram(e),!t.getProgramParameter(e,t.LINK_STATUS))throw new Error("Link "+r+t.getProgramInfoLog(e));t.useProgram(e),this.webGLProgram=e}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});t.exports=n},82751:(t,e,i)=>{var n=i(83419),r=i(50030),s=new n({initialize:function(t,e,i,n,r,s,o,a,h,l,u,c,d){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=t,this.mipLevel=e,this.minFilter=i,this.magFilter=n,this.wrapT=r,this.wrapS=s,this.format=o,this.pixels=a,this.width=h,this.height=l,this.pma=null==u||u,this.forceSize=!!c,this.flipY=!!d,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var t=this.gl;if(!t.isContextLost())if(this.pixels instanceof s)this.webGLTexture=this.pixels.webGLTexture;else{var e=t.createTexture();t.activeTexture(t.TEXTURE0);var i=t.getParameter(t.TEXTURE_BINDING_2D);t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,this.minFilter),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,this.magFilter),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,this.wrapS),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,this.wrapT),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),this.flipY&&t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0);var n=this.pixels,o=this.mipLevel,a=this.width,h=this.height,l=this.format,u=!1;if(null==n)t.texImage2D(t.TEXTURE_2D,o,l,a,h,0,l,t.UNSIGNED_BYTE,null),u=r(a,h);else if(n.compressed){a=n.width,h=n.height,u=n.generateMipmap;for(var c=0;c<n.mipmaps.length;c++)t.compressedTexImage2D(t.TEXTURE_2D,c,n.internalFormat,n.mipmaps[c].width,n.mipmaps[c].height,0,n.mipmaps[c].data)}else n instanceof Uint8Array?t.texImage2D(t.TEXTURE_2D,o,l,a,h,0,l,t.UNSIGNED_BYTE,n):(this.forceSize||(a=n.width,h=n.height),t.texImage2D(t.TEXTURE_2D,o,l,l,t.UNSIGNED_BYTE,n),u=r(a,h));u&&t.generateMipmap(t.TEXTURE_2D),e.__SPECTOR_Metadata=this.__SPECTOR_Metadata,i&&t.bindTexture(t.TEXTURE_2D,i),this.webGLTexture=e}},update:function(t,e,i,n,s,o,a,h){if(0!==e&&0!==i){this.pixels=t,this.width=e,this.height=i,this.flipY=n,this.wrapS=s,this.wrapT=o,this.minFilter=a,this.magFilter=h;var l=this.gl;if(!l.isContextLost()){l.activeTexture(l.TEXTURE0);var u=l.getParameter(l.TEXTURE_BINDING_2D);l.bindTexture(l.TEXTURE_2D,this.webGLTexture),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,this.minFilter),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,this.magFilter),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,this.wrapS),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,this.wrapT),l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,n),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),l.texImage2D(l.TEXTURE_2D,0,l.RGBA,l.RGBA,l.UNSIGNED_BYTE,t);var c=this.pixels;!r(e,i)||c.compressed||c instanceof Uint8Array||l.generateMipmap(l.TEXTURE_2D),u&&l.bindTexture(l.TEXTURE_2D,u)}}},spectorMetadata:{get:function(){return this.__SPECTOR_Metadata},set:function(t){this.__SPECTOR_Metadata=t,this.gl.isContextLost()||(this.webGLTexture.__SPECTOR_Metadata=t)}},destroy:function(){null!==this.webGLTexture&&(this.gl.isContextLost()||this.pixels instanceof s||this.gl.deleteTexture(this.webGLTexture),this.pixels=null,this.webGLTexture=null,this.gl=null)}});t.exports=s},57183:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e,i){this.webGLUniformLocation=null,this.gl=t,this.program=e,this.name=i,this.createResource()},createResource:function(){if(null!==this.program.webGLProgram){var t=this.gl;t.isContextLost()||(this.webGLUniformLocation=t.getUniformLocation(this.program.webGLProgram,this.name))}else this.webGLUniformLocation=null},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});t.exports=n},9503:(t,e,i)=>{var n={WebGLAttribLocationWrapper:i(93567),WebGLBufferWrapper:i(26128),WebGLProgramWrapper:i(1482),WebGLTextureWrapper:i(82751),WebGLFramebufferWrapper:i(84387),WebGLUniformLocationWrapper:i(57183)};t.exports=n},76531:(t,e,i)=>{var n=i(13560),r=i(83419),s=i(50792),o=i(97480),a=i(8443),h=i(57811),l=i(74403),u=i(45818),c=i(29747),d=i(87841),p=i(86555),f=i(56583),m=i(26099),g=i(38058),v=new r({Extends:s,initialize:function(t){s.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new p,this.gameSize=new p,this.baseSize=new p,this.displaySize=new p,this.scaleMode=n.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new m(1,1),this.autoRound=!1,this.autoCenter=n.CENTER.NO_CENTER,this.orientation=n.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(a.BOOT,this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==n.SCALE_MODE.RESIZE&&this.scaleMode!==n.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===n.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),t.events.once(a.READY,this.refresh,this),t.events.once(a.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,r=t.scaleMode,s=t.zoom,o=t.autoRound;if("string"==typeof e)if("%"!==e.substr(-1))e=parseInt(e,10);else{var a=this.parentSize.width;0===a&&(a=window.innerWidth);var h=parseInt(e,10)/100;e=Math.floor(a*h)}if("string"==typeof i)if("%"!==i.substr(-1))i=parseInt(i,10);else{var l=this.parentSize.height;0===l&&(l=window.innerHeight);var c=parseInt(i,10)/100;i=Math.floor(l*c)}this.scaleMode=r,this.autoRound=o,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,o&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),s===n.ZOOM.MAX_ZOOM&&(s=this.getMaxZoom()),this.zoom=s,1!==s&&(this._resetZoom=!0),this.baseSize.setSize(e,i),o&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*s,t.minHeight*s),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*s,t.maxHeight*s),this.displaySize.setSize(e,i),(t.snapWidth>0||t.snapHeight>0)&&this.displaySize.setSnap(t.snapWidth,t.snapHeight),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=e.width,n=e.height;if(t.width!==i||t.height!==n)return t.setSize(i,n),!0;if(this.canvas){var r=this.canvasBounds,s=this.canvas.getBoundingClientRect();if(s.x!==r.x||s.y!==r.y)return!0}return!1},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound;i&&(t=Math.floor(t),e=Math.floor(e));var n=this.width,r=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t,e),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(n,r)},resize:function(t,e){var i=this.zoom,n=this.autoRound;n&&(t=Math.floor(t),e=Math.floor(e));var r=this.width,s=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t,e),n&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i,e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var o=this.canvas.style,a=t*i,h=e*i;return n&&(a=Math.floor(a),h=Math.floor(h)),a===t&&h===e||(o.width=a+"px",o.height=h+"px"),this.refresh(r,s)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displaySize.setSnap(t,e),this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,r=i.style;r.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",r.marginLeft=n.marginLeft,r.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,r=this.gameSize.width,s=this.gameSize.height,o=this.zoom,a=this.autoRound;if(this.scaleMode===n.SCALE_MODE.NONE)this.displaySize.setSize(r*o,s*o),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1);else if(this.scaleMode===n.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e;else if(this.scaleMode===n.SCALE_MODE.EXPAND){this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px";var h=this.parentSize.width/this.gameSize.width,l=this.parentSize.height/this.gameSize.height;h<l?this.baseSize.setSize(this.gameSize.width,this.parentSize.height/h):this.baseSize.setSize(this.displaySize.width/l,this.gameSize.height),t=this.baseSize.width,e=this.baseSize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e}else this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px";this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=f(this.parentSize.width,this.gameSize.width,0,!0),e=f(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,r=e.getBoundingClientRect(),s=r.width,o=r.height,a=Math.floor((this.parentSize.width-s)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t)}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.domlisteners;if(e.orientationChange=function(){t.updateBounds(),t._checkOrientation=!0,t.dirty=!0,t.refresh()},e.windowResize=function(){t.updateBounds(),t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach((function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(t,e){t instanceof g||(e=t,t=void 0),void 0===e&&(e=new d);var i,n,r=this.baseSize,s=this.parentSize,o=this.canvasBounds,a=this.displayScale,h=o.x>=0?0:-o.x*a.x,l=o.y>=0?0:-o.y*a.y;return i=s.width>=o.width?r.width:r.width-(o.width-s.width)*a.x,n=s.height>=o.height?r.height:r.height-(o.height-s.height)*a.y,e.setTo(h,l,i,n),t&&(e.width/=t.zoomX,e.height/=t.zoomY,e.centerX=t.centerX+t.scrollX,e.centerY=t.centerY+t.scrollY),e},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.domlisteners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach((function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},64743:t=>{t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:t=>{t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},81050:t=>{t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:t=>{t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(t,e,i)=>{var n={CENTER:i(64743),ORIENTATION:i(39218),SCALE_MODE:i(81050),ZOOM:i(80805)};t.exports=n},56139:t=>{t.exports="enterfullscreen"},2336:t=>{t.exports="fullscreenfailed"},47412:t=>{t.exports="fullscreenunsupported"},51452:t=>{t.exports="leavefullscreen"},20666:t=>{t.exports="orientationchange"},47945:t=>{t.exports="resize"},97480:(t,e,i)=>{t.exports={ENTER_FULLSCREEN:i(56139),FULLSCREEN_FAILED:i(2336),FULLSCREEN_UNSUPPORTED:i(47412),LEAVE_FULLSCREEN:i(51452),ORIENTATION_CHANGE:i(20666),RESIZE:i(47945)}},93364:(t,e,i)=>{var n=i(79291),r=i(13560),s={Center:i(64743),Events:i(97480),Orientation:i(39218),ScaleManager:i(76531),ScaleModes:i(81050),Zoom:i(80805)};s=n(!1,s,r.CENTER),s=n(!1,s,r.ORIENTATION),s=n(!1,s,r.SCALE_MODE),s=n(!1,s,r.ZOOM),t.exports=s},27397:(t,e,i)=>{var n=i(95540),r=i(35355);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var s=[];if(e&&s.push(r(e+"Physics")),i)for(var o in i)o=r(o.concat("Physics")),-1===s.indexOf(o)&&s.push(o);return s}}},52106:(t,e,i)=>{var n=i(95540);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},87033:t=>{var e={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};e.facebook="facebook",t.exports=e},97482:(t,e,i)=>{var n=i(83419),r=i(2368),s=new n({initialize:function(t){this.sys=new r(this,t),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.facebook,this.scale,this.plugins,this.renderer},update:function(){}});t.exports=s},60903:(t,e,i)=>{var n=i(83419),r=i(89993),s=i(44594),o=i(8443),a=i(35154),h=i(54899),l=i(29747),u=i(97482),c=i(2368),d=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)this._pending.push({key:"default",scene:e[i],autoStart:0===i,data:{}})}t.events.once(o.READY,this.bootQueue,this)},bootQueue:function(){if(!this.isBooted){var t,e,i,n;for(this.systemScene=this.createSceneFromInstance("__SYSTEM",new u),this.game.events.emit(o.SYSTEM_READY,this.systemScene,this),t=0;t<this._pending.length;t++){var r;i=(e=this._pending[t]).key,(n=e.scene)instanceof u?r=this.createSceneFromInstance(i,n):"object"==typeof n?r=this.createSceneFromObject(i,n):"function"==typeof n&&(r=this.createSceneFromFunction(i,n)),i=r.sys.settings.key,this.keys[i]=r,this.scenes.push(r),this._data[i]&&(r.sys.settings.data=this._data[i].data,this._data[i].autoStart&&(e.autoStart=!0)),(e.autoStart||r.sys.settings.active)&&this._start.push(i)}for(this._pending.length=0,this._data={},this.isBooted=!0,t=0;t<this._start.length;t++)e=this._start[t],this.start(e);this._start.length=0}},processQueue:function(){var t=this._pending.length,e=this._queue.length;if(0!==t||0!==e){var i,n;if(t){for(i=0;i<t;i++)n=this._pending[i],this.add(n.key,n.scene,n.autoStart,n.data);for(i=0;i<this._start.length;i++)n=this._start[i],this.start(n);this._start.length=0,this._pending.length=0}for(i=0;i<this._queue.length;i++)this[(n=this._queue[i]).op](n.keyA,n.keyB);this._queue.length=0}},add:function(t,e,i,n){return void 0===i&&(i=!1),void 0===n&&(n={}),this.isProcessing||!this.isBooted?(this._pending.push({key:t,scene:e,autoStart:i,data:n}),this.isBooted||(this._data[t]={data:n}),null):(t=this.getKey(t,e),e instanceof u?r=this.createSceneFromInstance(t,e):"object"==typeof e?(e.key=t,r=this.createSceneFromObject(t,e)):"function"==typeof e&&(r=this.createSceneFromFunction(t,e)),r.sys.settings.data=n,t=r.sys.settings.key,this.keys[t]=r,this.scenes.push(r),(i||r.sys.settings.active)&&(this._pending.length?this._start.push(t):this.start(t)),r);var r},remove:function(t){if(this.isProcessing)this._queue.push({op:"remove",keyA:t,keyB:null});else{var e=this.getScene(t);if(!e||e.sys.isTransitioning())return this;var i=this.scenes.indexOf(e),n=e.sys.settings.key;i>-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;i.sceneUpdate=l,t.init&&(t.init.call(t,n.data),n.status=r.INIT,n.isTransition&&i.events.emit(s.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),n.status=r.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start()):this.create(t)},loadComplete:function(t){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(t.scene)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>r.START&&n.settings.status<=r.RUNNING&&n.step(t,e),n.scenePlugin&&n.scenePlugin._target&&n.scenePlugin.step(t,e)}},render:function(t){for(var e=0;e<this.scenes.length;e++){var i=this.scenes[e].sys;i.settings.visible&&i.settings.status>=r.LOADING&&i.settings.status<r.SLEEPING&&i.render(t)}this.isProcessing=!1},create:function(t){var e=t.sys,i=e.settings;t.create&&(i.status=r.CREATING,t.create.call(t,i.data),i.status===r.DESTROYED)||(i.isTransition&&e.events.emit(s.TRANSITION_START,i.transitionFrom,i.transitionDuration),t.update&&(e.sceneUpdate=t.update),i.status=r.RUNNING,e.events.emit(s.CREATE,t))},createSceneFromFunction:function(t,e){var i=new e;if(i instanceof u){var n=i.sys.settings.key;if(""!==n&&(t=n),this.keys.hasOwnProperty(t))throw new Error("Cannot add a Scene with duplicate key: "+t);return this.createSceneFromInstance(t,i)}return i.sys=new c(i),i.sys.settings.key=t,i.sys.init(this.game),i},createSceneFromInstance:function(t,e){return""===e.sys.settings.key&&(e.sys.settings.key=t),e.sys.init(this.game),e},createSceneFromObject:function(t,e){var i=new u(e),n=i.sys.settings.key;""!==n?t=n:i.sys.settings.key=t,i.sys.init(this.game);for(var r=["init","preload","create","update","render"],s=0;s<r.length;s++){var o=a(e,r[s],null);o&&(i[r[s]]=o)}if(e.hasOwnProperty("extend"))for(var h in e.extend)if(e.extend.hasOwnProperty(h)){var l=e.extend[h];"data"===h&&i.hasOwnProperty("data")&&"object"==typeof l?i.data.merge(l):"sys"!==h&&(i[h]=l)}return i},getKey:function(t,e){if(t||(t="default"),"function"==typeof e)return t;if(e instanceof u?t=e.sys.settings.key:"object"==typeof e&&e.hasOwnProperty("key")&&(t=e.key),this.keys.hasOwnProperty(t))throw new Error("Cannot add a Scene with duplicate key: "+t);return t},getScenes:function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);for(var i=[],n=this.scenes,r=0;r<n.length;r++){var s=n[r];s&&(!t||t&&s.sys.isActive())&&i.push(s)}return e?i.reverse():i},getScene:function(t){if("string"==typeof t){if(this.keys[t])return this.keys[t]}else for(var e=0;e<this.scenes.length;e++)if(t===this.scenes[e])return t;return null},isActive:function(t){var e=this.getScene(t);return e?e.sys.isActive():null},isPaused:function(t){var e=this.getScene(t);return e?e.sys.isPaused():null},isVisible:function(t){var e=this.getScene(t);return e?e.sys.isVisible():null},isSleeping:function(t){var e=this.getScene(t);return e?e.sys.isSleeping():null},pause:function(t,e){var i=this.getScene(t);return i&&i.sys.pause(e),this},resume:function(t,e){var i=this.getScene(t);return i&&i.sys.resume(e),this},sleep:function(t,e){var i=this.getScene(t);return i&&!i.sys.isTransitioning()&&i.sys.sleep(e),this},wake:function(t,e){var i=this.getScene(t);return i&&i.sys.wake(e),this},run:function(t,e){var i=this.getScene(t);if(!i){for(var n=0;n<this._pending.length;n++)if(this._pending[n].key===t){this.queueOp("start",t,e);break}return this}i.sys.isSleeping()?i.sys.wake(e):i.sys.isPaused()?i.sys.resume(e):this.start(t,e)},start:function(t,e){if(!this.isBooted)return this._data[t]={autoStart:!0,data:e},this;var i=this.getScene(t);if(!i)return console.warn("Scene not found for key: "+t),this;var n,s=i.sys,o=s.settings.status;if(o>=r.START&&o<=r.CREATING)return this;if(o>=r.RUNNING&&o<=r.SLEEPING)s.shutdown(),s.sceneUpdate=l,s.start(e);else if(s.sceneUpdate=l,s.start(e),s.load&&(n=s.load),n&&s.settings.hasOwnProperty("pack")&&(n.reset(),n.addPack({payload:s.settings.pack})))return s.settings.status=r.LOADING,n.once(h.COMPLETE,this.payloadComplete,this),n.start(),this;return this.bootScene(i),this},stop:function(t,e){var i=this.getScene(t);if(i&&!i.sys.isTransitioning()&&i.sys.settings.status!==r.SHUTDOWN){var n=i.sys.load;n&&(n.off(h.COMPLETE,this.loadComplete,this),n.off(h.COMPLETE,this.payloadComplete,this)),i.sys.shutdown(e)}return this},switch:function(t,e){var i=this.getScene(t),n=this.getScene(e);return i&&n&&i!==n&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){var e=this.getScene(t);return this.scenes.indexOf(e)},bringToTop:function(t){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e<this.scenes.length){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.push(i)}}return this},sendToBack:function(t){if(this.isProcessing)this._queue.push({op:"sendToBack",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e>0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),r=this.getAt(i);this.scenes[e]=r,this.scenes[i]=n}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e<this.scenes.length-1){var i=e+1,n=this.getScene(t),r=this.getAt(i);this.scenes[e]=r,this.scenes[i]=n}}return this},moveAbove:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveAbove",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(-1!==i&&-1!==n&&n<i){var r=this.getAt(n);this.scenes.splice(n,1),this.scenes.splice(i+(n>i),0,r)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(-1!==i&&-1!==n&&n>i){var r=this.getAt(n);this.scenes.splice(n,1),0===i?this.scenes.unshift(r):this.scenes.splice(i-(n<i),0,r)}}return this},queueOp:function(t,e,i){return this._queue.push({op:t,keyA:e,keyB:i}),this},swapPosition:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"swapPosition",keyA:t,keyB:e});else{var i=this.getIndex(t),n=this.getIndex(e);if(i!==n&&-1!==i&&-1!==n){var r=this.getAt(i);this.scenes[i]=this.scenes[n],this.scenes[n]=r}}return this},dump:function(){for(var t=[],e=["pending","init","start","loading","creating","running","paused","sleeping","shutdown","destroyed"],i=0;i<this.scenes.length;i++){var n=this.scenes[i].sys,s=!n.settings.visible||n.settings.status!==r.RUNNING&&n.settings.status!==r.PAUSED?"[-] ":"[*] ";s+=n.settings.key+" ("+e[n.settings.status]+")",t.push(s)}console.log(t.join("\n"))},destroy:function(){for(var t=0;t<this.scenes.length;t++){this.scenes[t].sys.destroy()}this.systemScene.sys.destroy(),this.update=l,this.scenes=[],this._pending=[],this._start=[],this._queue=[],this.game=null,this.systemScene=null}});t.exports=d},52209:(t,e,i)=>{var n=i(45319),r=i(83419),s=i(44594),o=i(95540),a=i(37277),h=new r({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(s.BOOT,this.boot,this),t.sys.events.on(s.START,this.pluginStart,this)},boot:function(){this.systems.events.once(s.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(s.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var r=o(t,"onUpdate",null);r&&(this._onUpdate=r,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=n,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(o(t,"data")):this.manager.start(e,o(t,"data"));var l=o(t,"onStart",null),u=o(t,"onStartScope",this.scene);return l&&l.call(u,this.scene,i,n),this.systems.events.emit(s.TRANSITION_OUT,i,n),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;t.events.emit(s.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getStatus:function(t){var e=this.manager.getScene(t);if(e)return e.sys.getStatus()},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(s.SHUTDOWN,this.shutdown,this),t.off(s.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(s.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},55681:(t,e,i)=>{var n=i(89993),r=i(35154),s=i(46975),o=i(87033),a={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:n.PENDING,key:r(t,"key",""),active:r(t,"active",!1),visible:r(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:r(t,"pack",!1),cameras:r(t,"cameras",null),map:r(t,"map",s(o,r(t,"mapAdd",{}))),physics:r(t,"physics",{}),loader:r(t,"loader",{}),plugins:r(t,"plugins",!1),input:r(t,"input",{})}}};t.exports=a},2368:(t,e,i)=>{var n=i(83419),r=i(89993),s=i(42363),o=i(44594),a=i(27397),h=i(52106),l=i(29747),u=i(55681),c=new n({initialize:function(t,e){this.scene=t,this.game,this.renderer,this.facebook,this.config=e,this.settings=u.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=l},init:function(t){this.settings.status=r.INIT,this.sceneUpdate=l,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,s.Global,[s.CoreScene,h(this),a(this)]),this.events.emit(o.BOOT,this),this.settings.isBooted=!0},step:function(t,e){var i=this.events;i.emit(o.PRE_UPDATE,t,e),i.emit(o.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),i.emit(o.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.events.emit(o.PRE_RENDER,t),this.cameras.render(t,e),this.events.emit(o.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){var e=this.settings,i=this.getStatus();return i!==r.CREATING&&i!==r.RUNNING?console.warn("Cannot pause non-running Scene",e.key):this.settings.active&&(e.status=r.PAUSED,e.active=!1,this.events.emit(o.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=r.RUNNING,i.active=!0,e.emit(o.RESUME,this,t)),this},sleep:function(t){var e=this.settings,i=this.getStatus();return i!==r.CREATING&&i!==r.RUNNING?console.warn("Cannot sleep non-running Scene",e.key):(e.status=r.SLEEPING,e.active=!1,e.visible=!1,this.events.emit(o.SLEEP,this,t)),this},wake:function(t){var e=this.events,i=this.settings;return i.status=r.RUNNING,i.active=!0,i.visible=!0,e.emit(o.WAKE,this,t),i.isTransition&&e.emit(o.TRANSITION_WAKE,i.transitionFrom,i.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var t=this.settings.status;return t>r.PENDING&&t<=r.RUNNING},isSleeping:function(){return this.settings.status===r.SLEEPING},isActive:function(){return this.settings.status===r.RUNNING},isPaused:function(){return this.settings.status===r.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){var e=this.events,i=this.settings;t&&(i.data=t),i.status=r.START,i.active=!0,i.visible=!0,e.emit(o.START,this),e.emit(o.READY,this,t)},shutdown:function(t){var e=this.events,i=this.settings;e.off(o.TRANSITION_INIT),e.off(o.TRANSITION_START),e.off(o.TRANSITION_COMPLETE),e.off(o.TRANSITION_OUT),i.status=r.SHUTDOWN,i.active=!1,i.visible=!1,e.emit(o.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=r.DESTROYED,e.active=!1,e.visible=!1,t.emit(o.DESTROY,this),t.removeAllListeners();for(var i=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],n=0;n<i.length;n++)this[i[n]]=null}});t.exports=c},89993:t=>{t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},69830:t=>{t.exports="addedtoscene"},7919:t=>{t.exports="boot"},46763:t=>{t.exports="create"},11763:t=>{t.exports="destroy"},71555:t=>{t.exports="pause"},36735:t=>{t.exports="postupdate"},3809:t=>{t.exports="prerender"},90716:t=>{t.exports="preupdate"},58262:t=>{t.exports="ready"},91633:t=>{t.exports="removedfromscene"},10319:t=>{t.exports="render"},87132:t=>{t.exports="resume"},81961:t=>{t.exports="shutdown"},90194:t=>{t.exports="sleep"},6265:t=>{t.exports="start"},33178:t=>{t.exports="transitioncomplete"},43063:t=>{t.exports="transitioninit"},11259:t=>{t.exports="transitionout"},61611:t=>{t.exports="transitionstart"},45209:t=>{t.exports="transitionwake"},22966:t=>{t.exports="update"},21747:t=>{t.exports="wake"},44594:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(69830),BOOT:i(7919),CREATE:i(46763),DESTROY:i(11763),PAUSE:i(71555),POST_UPDATE:i(36735),PRE_RENDER:i(3809),PRE_UPDATE:i(90716),READY:i(58262),REMOVED_FROM_SCENE:i(91633),RENDER:i(10319),RESUME:i(87132),SHUTDOWN:i(81961),SLEEP:i(90194),START:i(6265),TRANSITION_COMPLETE:i(33178),TRANSITION_INIT:i(43063),TRANSITION_OUT:i(11259),TRANSITION_START:i(61611),TRANSITION_WAKE:i(45209),UPDATE:i(22966),WAKE:i(21747)}},62194:(t,e,i)=>{var n=i(89993),r=i(79291),s={Events:i(44594),GetPhysicsPlugins:i(27397),GetScenePlugins:i(52106),SceneManager:i(60903),ScenePlugin:i(52209),Settings:i(55681),Systems:i(2368)};s=r(!1,s,n),t.exports=s},30341:(t,e,i)=>{var n=i(83419),r=i(50792),s=i(14463),o=i(79291),a=i(29747),h=new n({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.stop(),this.emit(s.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},85034:(t,e,i)=>{var n=i(83419),r=i(41786),s=i(50792),o=i(14463),a=i(8443),h=i(46710),l=i(58731),u=i(29747),c=i(26099),d=new n({Extends:s,initialize:function(t){s.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new c,t.events.on(a.BLUR,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:u,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var s=r(e),o=i.spritemap[n];s.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:s})}return i},get:function(t){return l(this.sounds,"key",t)},getAll:function(t){return t?h(this.sounds,"key",t):h(this.sounds)},getAllPlaying:function(){return h(this.sounds,"isPlaying",!0)},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeAll:function(){this.sounds.forEach((function(t){t.destroy()})),this.sounds.length=0},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound((function(t){t.pause()})),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(t){t.resume()})),this.emit(o.RESUME_ALL,this)},setListenerPosition:u,stopAll:function(){this.forEachActiveSound((function(t){t.stop()})),this.emit(o.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach((function(t){t.stop()&&e++})),e},unlock:u,onBlur:u,onFocus:u,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach((function(i){i.update(t,e)}))},destroy:function(){this.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach((function(n,r){n&&!n.pendingRemove&&t.call(e||i,n,r,i.sounds)}))},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=d},14747:(t,e,i)=>{var n=i(33684),r=i(25960),s=i(57490),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new r(t):i.webAudio&&!e.disableWebAudio?new s(t):new n(t)}};t.exports=o},19723:t=>{t.exports="complete"},98882:t=>{t.exports="decodedall"},57506:t=>{t.exports="decoded"},73146:t=>{t.exports="destroy"},11305:t=>{t.exports="detune"},40577:t=>{t.exports="detune"},30333:t=>{t.exports="mute"},20394:t=>{t.exports="rate"},21802:t=>{t.exports="volume"},1299:t=>{t.exports="looped"},99190:t=>{t.exports="loop"},97125:t=>{t.exports="mute"},89259:t=>{t.exports="pan"},79986:t=>{t.exports="pauseall"},17586:t=>{t.exports="pause"},19618:t=>{t.exports="play"},42306:t=>{t.exports="rate"},10387:t=>{t.exports="resumeall"},48959:t=>{t.exports="resume"},9960:t=>{t.exports="seek"},19180:t=>{t.exports="stopall"},98328:t=>{t.exports="stop"},50401:t=>{t.exports="unlocked"},52498:t=>{t.exports="volume"},14463:(t,e,i)=>{t.exports={COMPLETE:i(19723),DECODED:i(57506),DECODED_ALL:i(98882),DESTROY:i(73146),DETUNE:i(11305),GLOBAL_DETUNE:i(40577),GLOBAL_MUTE:i(30333),GLOBAL_RATE:i(20394),GLOBAL_VOLUME:i(21802),LOOP:i(99190),LOOPED:i(1299),MUTE:i(97125),PAN:i(89259),PAUSE_ALL:i(79986),PAUSE:i(17586),PLAY:i(19618),RATE:i(42306),RESUME_ALL:i(10387),RESUME:i(48959),SEEK:i(9960),STOP_ALL:i(19180),STOP:i(98328),UNLOCKED:i(50401),VOLUME:i(52498)}},64895:(t,e,i)=>{var n=i(30341),r=i(83419),s=i(14463),o=i(45319),a=new r({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('No cached audio asset with key "'+e);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,n.call(this,t,e,i)},play:function(t,e){return!this.manager.isLocked(this,"play",[t,e])&&(!!n.prototype.play.call(this,t,e)&&(!!this.pickAndPlayAudioTag()&&(this.emit(s.PLAY,this),!0)))},pause:function(){return!this.manager.isLocked(this,"pause")&&(!(this.startTime>0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(s.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(s.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(s.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t<this.tags.length;t++){var e=this.tags[t];if("false"===e.dataset.used)return e.dataset.used="true",this.audio=e,!0}if(!this.manager.override)return!1;var i=[];this.manager.forEachActiveSound((function(t){t.key===this.key&&t.audio&&i.push(t)}),this),i.sort((function(t,e){return t.loop===e.loop?e.seek/e.duration-t.seek/t.duration:t.loop?1:-1}));var n=i[0];return this.audio=n.audio,n.reset(),n.audio=null,n.startTime=0,n.previousTime=0,!0},playCatchPromise:function(){var t=this.audio.play();t&&t.catch((function(t){console.warn(t)}))},stopAndReleaseAudioTag:function(){this.startTime=0,this.previousTime=0,this.audio&&(this.audio.pause(),this.audio.dataset.used="false",this.audio=null)},reset:function(){n.prototype.stop.call(this)},onBlur:function(){this.isPlaying=!1,this.isPaused=!0,this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.currentConfig.delay=Math.max(0,(this.startTime-window.performance.now())/1e3),this.stopAndReleaseAudioTag()},onFocus:function(){this.isPlaying=!0,this.isPaused=!1,this.pickAndPlayAudioTag()},update:function(t){if(this.isPlaying)if(this.startTime>0)this.startTime<t-this.manager.audioPlayDelay&&(this.audio.currentTime+=Math.max(0,t-this.startTime)/1e3,this.startTime=0,this.previousTime=this.audio.currentTime,this.playCatchPromise());else{var e=this.currentMarker?this.currentMarker.start:0,i=e+this.duration,n=this.audio.currentTime;if(this.currentConfig.loop)n>=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,n-i),n=this.audio.currentTime):n<e&&(this.audio.currentTime+=e,n=this.audio.currentTime),n<this.previousTime&&this.emit(s.LOOPED,this);else if(n>=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(s.COMPLETE,this);this.previousTime=n}},destroy:function(){n.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=o(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(s.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(s.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,s.RATE,t)||(this.calculateRate(),this.emit(s.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,s.DETUNE,t)||(this.calculateRate(),this.emit(s.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(s.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(s.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(s.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=a},33684:(t,e,i)=>{var n=i(85034),r=i(83419),s=i(14463),o=i(64895),a=new r({Extends:n,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,n.call(this,t)},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each((function(e,i){for(var n=0;n<i.length;n++)if("true"===i[n].dataset.locked)return t.locked=!0,!1;return!0})),this.locked){var e=!1,i=function(){e=!0},n=function(){if(e)e=!1;else{document.body.removeEventListener("touchmove",i),document.body.removeEventListener("touchend",n);var r=[];if(t.game.cache.audio.entries.each((function(t,e){for(var i=0;i<e.length;i++){var n=e[i];"true"===n.dataset.locked&&r.push(n)}return!0})),0!==r.length){var s=r[r.length-1];s.oncanplaythrough=function(){s.oncanplaythrough=null,r.forEach((function(t){t.dataset.locked="false"})),t.unlocked=!0},r.forEach((function(t){t.load()}))}}};this.once(s.UNLOCKED,(function(){for(this.forEachActiveSound((function(t){null===t.currentMarker&&0===t.duration&&(t.duration=t.tags[0].duration),t.totalDuration=t.tags[0].duration}));this.lockedActionsQueue.length;){var t=this.lockedActionsQueue.shift();t.sound[t.prop].apply?t.sound[t.prop].apply(t.sound,t.value||[]):t.sound[t.prop]=t.value}}),this),document.body.addEventListener("touchmove",i,!1),document.body.addEventListener("touchend",n,!1)}},onBlur:function(){this.forEachActiveSound((function(t){t.isPlaying&&(this.onBlurPausedSounds.push(t),t.onBlur())}))},onFocus:function(){this.onBlurPausedSounds.forEach((function(t){t.onFocus()})),this.onBlurPausedSounds.length=0},destroy:function(){n.prototype.destroy.call(this),this.onBlurPausedSounds.length=0,this.onBlurPausedSounds=null},isLocked:function(t,e,i){return"true"===t.tags[0].dataset.locked&&(this.lockedActionsQueue.push({sound:t,prop:e,value:i}),!0)},setMute:function(t){return this.mute=t,this},mute:{get:function(){return this._mute},set:function(t){this._mute=t,this.forEachActiveSound((function(t){t.updateMute()})),this.emit(s.GLOBAL_MUTE,this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this._volume},set:function(t){this._volume=t,this.forEachActiveSound((function(t){t.updateVolume()})),this.emit(s.GLOBAL_VOLUME,this,t)}}});t.exports=a},23717:(t,e,i)=>{t.exports={SoundManagerCreator:i(14747),Events:i(14463),BaseSound:i(30341),BaseSoundManager:i(85034),WebAudioSound:i(71741),WebAudioSoundManager:i(57490),HTML5AudioSound:i(64895),HTML5AudioSoundManager:i(33684),NoAudioSound:i(4603),NoAudioSoundManager:i(25960)}},4603:(t,e,i)=>{var n=i(30341),r=i(83419),s=i(50792),o=i(79291),a=i(29747),h=function(){return!1},l=function(){return null},u=function(){return this},c=new r({Extends:s,initialize:function(t,e,i){void 0===i&&(i={}),s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:h,updateMarker:h,removeMarker:l,play:h,pause:h,resume:h,stop:h,setMute:u,setVolume:u,setRate:u,setDetune:u,setSeek:u,setLoop:u,setPan:u,applyConfig:l,resetConfig:l,update:a,calculateRate:l,destroy:function(){n.prototype.destroy.call(this)}});t.exports=c},25960:(t,e,i)=>{var n=i(85034),r=i(83419),s=i(50792),o=i(4603),a=i(29747),h=new r({Extends:s,initialize:function(t){s.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},get:function(t){return n.prototype.get.call(this,t)},getAll:function(t){return n.prototype.getAll.call(this,t)},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeAll:function(){return n.prototype.removeAll.call(this)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},stopByKey:function(t){return n.prototype.stopByKey.call(this,t)},onBlur:a,onFocus:a,onGameBlur:a,onGameFocus:a,pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,unlock:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},71741:(t,e,i)=>{var n=i(30341),r=i(83419),s=i(14463),o=i(95540),a=new r({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),t.context.createPanner&&(this.spatialNode=t.context.createPanner(),this.volumeNode.connect(this.spatialNode)),t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),t.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(t.destination)):t.context.createPanner?this.spatialNode.connect(t.destination):this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(s.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime<this.startTime)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.getCurrentTime(),this.stopAndRemoveBufferSource(),this.emit(s.PAUSE,this),!0))},resume:function(){return!(this.manager.context.currentTime<this.startTime)&&(!!n.prototype.resume.call(this)&&(this.createAndStartBufferSource(),this.emit(s.RESUME,this),!0))},stop:function(){return!!n.prototype.stop.call(this)&&(this.stopAndRemoveBufferSource(),this.emit(s.STOP,this),!0)},createAndStartBufferSource:function(){var t=this.currentConfig.seek,e=this.currentConfig.delay,i=this.manager.context.currentTime+e,n=(this.currentMarker?this.currentMarker.start:0)+t,r=this.duration-t;this.playTime=i-t,this.startTime=i,this.source=this.createBufferSource(),this.applyConfig(),this.source.start(Math.max(0,i),Math.max(0,n),Math.max(0,r)),this.resetConfig()},createAndStartLoopBufferSource:function(){var t=this.getLoopTime(),e=this.currentMarker?this.currentMarker.start:0,i=this.duration;this.loopTime=t,this.loopSource=this.createBufferSource(),this.loopSource.playbackRate.setValueAtTime(this.totalRate,0),this.loopSource.start(Math.max(0,t),Math.max(0,e),Math.max(0,i))},createBufferSource:function(){var t=this,e=this.manager.context.createBufferSource();return e.buffer=this.audioBuffer,e.connect(this.muteNode),e.onended=function(e){e.target===t.source&&(t.currentConfig.loop?t.hasLooped=!0:t.hasEnded=!0)},e},stopAndRemoveBufferSource:function(){if(this.source){var t=this.source;this.source=null,t.stop(),t.disconnect()}this.playTime=0,this.startTime=0,this.hasEnded=!1,this.stopAndRemoveLoopBufferSource()},stopAndRemoveLoopBufferSource:function(){this.loopSource&&(this.loopSource.stop(),this.loopSource.disconnect(),this.loopSource=null),this.loopTime=0},applyConfig:function(){this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:1});var t=this.currentConfig.source;if(t&&this.manager.context.createPanner){var e=this.spatialNode;e.panningModel=o(t,"panningModel","equalpower"),e.distanceModel=o(t,"distanceModel","inverse"),e.orientationX.value=o(t,"orientationX",0),e.orientationY.value=o(t,"orientationY",0),e.orientationZ.value=o(t,"orientationZ",-1),e.refDistance=o(t,"refDistance",1),e.maxDistance=o(t,"maxDistance",1e4),e.rolloffFactor=o(t,"rolloffFactor",1),e.coneInnerAngle=o(t,"coneInnerAngle",360),e.coneOuterAngle=o(t,"coneOuterAngle",0),e.coneOuterGain=o(t,"coneOuterGain",0),this.spatialSource=o(t,"follow",null),this.spatialSource||(e.positionX.value=o(t,"x",0),e.positionY.value=o(t,"y",0),e.positionZ.value=o(t,"z",0))}n.prototype.applyConfig.call(this)},x:{get:function(){return this.spatialNode?this.spatialNode.positionX:0},set:function(t){this.spatialNode&&(this.spatialNode.positionX.value=t)}},y:{get:function(){return this.spatialNode?this.spatialNode.positionY:0},set:function(t){this.spatialNode&&(this.spatialNode.positionY.value=t)}},update:function(){if(this.isPlaying&&this.spatialSource){var t=o(this.spatialSource,"x",null),e=o(this.spatialSource,"y",null);t&&t!==this._spatialx&&(this._spatialx=this.spatialNode.positionX.value=t),e&&e!==this._spatialy&&(this._spatialy=this.spatialNode.positionY.value=e)}this.hasEnded?(n.prototype.stop.call(this),this.stopAndRemoveBufferSource(),this.emit(s.COMPLETE,this)):this.hasLooped&&(this.hasLooped=!1,this.source=this.loopSource,this.loopSource=null,this.playTime=this.startTime=this.loopTime,this.rateUpdates.length=0,this.rateUpdates.push({time:0,rate:this.totalRate}),this.createAndStartLoopBufferSource(),this.emit(s.LOOPED,this))},destroy:function(){this.pendingRemove||(n.prototype.destroy.call(this),this.audioBuffer=null,this.stopAndRemoveBufferSource(),this.muteNode.disconnect(),this.muteNode=null,this.volumeNode.disconnect(),this.volumeNode=null,this.pannerNode&&(this.pannerNode.disconnect(),this.pannerNode=null),this.spatialNode&&(this.spatialNode.disconnect(),this.spatialNode=null,this.spatialSource=null),this.rateUpdates.length=0,this.rateUpdates=null)},calculateRate:function(){n.prototype.calculateRate.call(this);var t=this.manager.context.currentTime;this.source&&"number"==typeof this.totalRate&&this.source.playbackRate.setValueAtTime(this.totalRate,t),this.isPlaying&&(this.rateUpdates.push({time:Math.max(this.startTime,t)-this.playTime,rate:this.totalRate}),this.loopSource&&(this.stopAndRemoveLoopBufferSource(),this.createAndStartLoopBufferSource()))},getCurrentTime:function(){for(var t=0,e=0;e<this.rateUpdates.length;e++){t+=((e<this.rateUpdates.length-1?this.rateUpdates[e+1].time:this.manager.context.currentTime-this.playTime)-this.rateUpdates[e].time)*this.rateUpdates[e].rate}return t},getLoopTime:function(){for(var t=0,e=0;e<this.rateUpdates.length-1;e++)t+=(this.rateUpdates[e+1].time-this.rateUpdates[e].time)*this.rateUpdates[e].rate;var i=this.rateUpdates[this.rateUpdates.length-1];return this.playTime+i.time+(this.duration-t)/i.rate},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.calculateRate(),this.emit(s.RATE,this,t)}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.calculateRate(),this.emit(s.DETUNE,this,t)}},setDetune:function(t){return this.detune=t,this},mute:{get:function(){return 0===this.muteNode.gain.value},set:function(t){this.currentConfig.mute=t,this.muteNode.gain.setValueAtTime(t?0:1,0),this.emit(s.MUTE,this,t)}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.volumeNode.gain.value},set:function(t){this.currentConfig.volume=t,this.volumeNode.gain.setValueAtTime(t,0),this.emit(s.VOLUME,this,t)}},setVolume:function(t){return this.volume=t,this},seek:{get:function(){return this.isPlaying?this.manager.context.currentTime<this.startTime?this.startTime-this.playTime:this.getCurrentTime():this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.context.currentTime<this.startTime||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.currentConfig.seek=t,this.isPlaying&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource()),this.emit(s.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.isPlaying&&(this.stopAndRemoveLoopBufferSource(),t&&this.createAndStartLoopBufferSource()),this.emit(s.LOOP,this,t)}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.pannerNode?this.pannerNode.pan.value:0},set:function(t){this.currentConfig.pan=t,this.pannerNode&&this.pannerNode.pan.setValueAtTime(t,this.manager.context.currentTime),this.emit(s.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=a},57490:(t,e,i)=>{var n=i(53134),r=i(85034),s=i(83419),o=i(14463),a=i(8443),h=i(71741),l=i(95540),u=new s({Extends:r,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),r.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(a.BOOT,this.unlock,this)},createAudioContext:function(t){var e=t.config.audio;return e.context?(e.context.resume(),e.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new h(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var r=this.game.cache.audio,s=i.length,a=0;a<i.length;a++){var h=i[a],l=h.key,u=h.data;"string"==typeof u&&(u=n(u));var c=function(t,e){r.add(t,e),this.emit(o.DECODED,t),0===--s&&this.emit(o.DECODED_ALL)}.bind(this,l),d=function(t,e){console.error("Error decoding audio: "+t+" - ",e?e.message:""),0===--s&&this.emit(o.DECODED_ALL)}.bind(this,l);this.context.decodeAudioData(u,c,d)}},setListenerPosition:function(t,e){return void 0===t&&(t=this.game.scale.width/2),void 0===e&&(e=this.game.scale.height/2),this.listenerPosition.set(t,e),this},unlock:function(){var t=this,e=document.body,i=function i(){if(t.context&&e){var n=e.removeEventListener.bind(e);t.context.resume().then((function(){n("touchstart",i),n("touchend",i),n("click",i),n("keydown",i),t.unlocked=!0}),(function(){n("touchstart",i),n("touchend",i),n("click",i),n("keydown",i)}))}};e&&(e.addEventListener("touchstart",i,!1),e.addEventListener("touchend",i,!1),e.addEventListener("click",i,!1),e.addEventListener("keydown",i,!1))},onBlur:function(){this.locked||this.context.suspend()},onFocus:function(){var t=this.context;!t||this.locked||"suspended"!==t.state&&"interrupted"!==t.state||t.resume()},update:function(t,e){var i=this.context.listener;if(i&&void 0!==i.positionX){var n=l(this.listenerPosition,"x",null),s=l(this.listenerPosition,"y",null);n&&n!==this._spatialx&&(this._spatialx=i.positionX.value=n),s&&s!==this._spatialy&&(this._spatialy=i.positionY.value=s)}r.prototype.update.call(this,t,e),this.gameLostFocus||this.onFocus()},destroy:function(){if(this.destination=null,this.masterVolumeNode.disconnect(),this.masterVolumeNode=null,this.masterMuteNode.disconnect(),this.masterMuteNode=null,this.game.config.audio.context)this.context.suspend();else{var t=this;this.context.close().then((function(){t.context=null}))}r.prototype.destroy.call(this)},setMute:function(t){return this.mute=t,this},mute:{get:function(){return 0===this.masterMuteNode.gain.value},set:function(t){this.masterMuteNode.gain.setValueAtTime(t?0:1,0),this.emit(o.GLOBAL_MUTE,this,t)}},setVolume:function(t){return this.volume=t,this},volume:{get:function(){return this.masterVolumeNode.gain.value},set:function(t){this.masterVolumeNode.gain.setValueAtTime(t,0),this.emit(o.GLOBAL_VOLUME,this,t)}}});t.exports=u},73162:(t,e,i)=>{var n=i(37105),r=i(83419),s=i(29747),o=i(19186),a=new r({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=s,this.removeCallback=s,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,r){return n.GetFirst(this.list,t,e,i,r)},getAll:function(t,e,i,r){return n.GetAll(this.list,t,e,i,r)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},moveAbove:function(t,e){return n.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return n.MoveBelow(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,r){return n.SetAll(this.list,t,e,i,r),this},each:function(t,e){for(var i=[null],n=2;n<arguments.length;n++)i.push(arguments[n]);for(n=0;n<this.list.length;n++)i[0]=this.list[n],t.apply(e,i)},shutdown:function(){this.removeAll(),this.list=[]},destroy:function(){this.removeAll(),this.parent=null,this.addCallback=null,this.removeCallback=null},length:{get:function(){return this.list.length}},first:{get:function(){return this.position=0,this.list.length>0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return this.position>0?(this.position--,this.list[this.position]):null}}});t.exports=a},90330:(t,e,i)=>{var n=new(i(83419))({initialize:function(t){this.entries={},this.size=0,this.setAll(t)},setAll:function(t){if(Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e][0],t[e][1]);return this},set:function(t,e){return this.has(t)||this.size++,this.entries[t]=e,this},get:function(t){if(this.has(t))return this.entries[t]},getArray:function(){var t=[],e=this.entries;for(var i in e)t.push(e[i]);return t},has:function(t){return this.entries.hasOwnProperty(t)},delete:function(t){return this.has(t)&&(delete this.entries[t],this.size--),this},clear:function(){return Object.keys(this.entries).forEach((function(t){delete this.entries[t]}),this),this.size=0,this},keys:function(){return Object.keys(this.entries)},values:function(){var t=[],e=this.entries;for(var i in e)t.push(e[i]);return t},dump:function(){var t=this.entries;for(var e in console.group("Map"),t)console.log(e,t[e]);console.groupEnd()},each:function(t){var e=this.entries;for(var i in e)if(!1===t(i,e[i]))break;return this},contains:function(t){var e=this.entries;for(var i in e)if(e[i]===t)return!0;return!1},merge:function(t,e){void 0===e&&(e=!1);var i=this.entries,n=t.entries;for(var r in n)i.hasOwnProperty(r)&&e?i[r]=n[r]:this.set(r,n[r]);return this}});t.exports=n},25774:(t,e,i)=>{var n=i(83419),r=i(50792),s=i(82348),o=new n({Extends:r,initialize:function(){r.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(t){return this._active.indexOf(t)>-1},isPending:function(t){return this._toProcess>0&&this._pending.indexOf(t)>-1},isDestroying:function(t){return this._destroy.indexOf(t)>-1},add:function(t){return this.checkQueue&&this.isActive(t)&&!this.isDestroying(t)||this.isPending(t)||(this._pending.push(t),this._toProcess++),t},remove:function(t){if(this.isPending(t)){var e=this._pending,i=e.indexOf(t);-1!==i&&e.splice(i,1)}else this.isActive(t)&&(this._destroy.push(t),this._toProcess++);return t},removeAll:function(){for(var t=this._active,e=this._destroy,i=t.length;i--;)e.push(t[i]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,n=this._active;for(t=0;t<i.length;t++){e=i[t];var r=n.indexOf(e);-1!==r&&(n.splice(r,1),this.emit(s.PROCESS_QUEUE_REMOVE,e))}for(i.length=0,i=this._pending,t=0;t<i.length;t++)e=i[t],(!this.checkQueue||this.checkQueue&&-1===n.indexOf(e))&&(n.push(e),this.emit(s.PROCESS_QUEUE_ADD,e));return i.length=0,this._toProcess=0,n},getActive:function(){return this._active},length:{get:function(){return this._active.length}},destroy:function(){this._toProcess=0,this._pending=[],this._active=[],this._destroy=[]}});t.exports=o},59542:(t,e,i)=>{var n=i(43886);function r(t){if(!(this instanceof r))return new r(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function s(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function o(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,n,r){r||(r=m(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var s,o=e;o<i;o++)s=t.children[o],h(r,t.leaf?n(s):s);return r}function h(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,r,s){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=r||(o=e+Math.ceil((i-e)/r/2)*r,n(t,o,e,i,s),a.push(e,o,o,i))}r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!f(t,e))return i;for(var r,s,o,a,h=[];e;){for(r=0,s=e.children.length;r<s;r++)o=e.children[r],f(t,a=e.leaf?n(o):o)&&(e.leaf?i.push(o):p(t,a)?this._all(o,i):h.push(o));e=h.pop()}return i},collides:function(t){var e=this.data,i=this.toBBox;if(!f(t,e))return!1;for(var n,r,s,o,a=[];e;){for(n=0,r=e.children.length;n<r;n++)if(s=e.children[n],f(t,o=e.leaf?i(s):s)){if(e.leaf||p(t,o))return!0;a.push(s)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(t,e){if(!t)return this;for(var i,n,r,o,a=this.data,h=this.toBBox(t),l=[],u=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=u.pop(),o=!0),a.leaf&&-1!==(r=s(t,a.children,e)))return a.children.splice(r,1),l.push(a),this._condense(l),this;o||a.leaf||!p(a,h)?n?(i++,a=n.children[i],o=!1):a=null:(l.push(a),u.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},_build:function(t,e,i,n){var r,s=i-e+1,a=this._maxEntries;if(s<=a)return o(r=m(t.slice(e,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,n-1))),(r=m([])).leaf=!1,r.height=n;var h,l,u,c,d=Math.ceil(s/a),p=d*Math.ceil(Math.sqrt(a));for(g(t,e,i,p,this.compareMinX),h=e;h<=i;h+=p)for(g(t,h,u=Math.min(h+p-1,i),d,this.compareMinY),l=h;l<=u;l+=d)c=Math.min(l+d-1,u),r.children.push(this._build(t,l,c,n-1));return o(r,this.toBBox),r},_chooseSubtree:function(t,e,i,n){for(var r,s,o,a,h,l,u,d,p,f;n.push(e),!e.leaf&&n.length-1!==i;){for(u=d=1/0,r=0,s=e.children.length;r<s;r++)h=c(o=e.children[r]),p=t,f=o,(l=(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-h)<d?(d=l,u=h<u?h:u,a=o):l===d&&h<u&&(u=h,a=o);e=a||e.children[0]}return e},_insert:function(t,e,i){var n=this.toBBox,r=i?t:n(t),s=[],o=this._chooseSubtree(r,this.data,e,s);for(o.children.push(t),h(o,r);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(r,s,e)},_split:function(t,e){var i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var s=this._chooseSplitIndex(i,r,n),a=m(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,r,s,o,h,l,u,d,p,f,m,g,v,y;for(l=u=1/0,n=e;n<=i-e;n++)r=a(t,0,n,this.toBBox),s=a(t,n,i,this.toBBox),p=r,f=s,m=void 0,g=void 0,v=void 0,y=void 0,m=Math.max(p.minX,f.minX),g=Math.max(p.minY,f.minY),v=Math.min(p.maxX,f.maxX),y=Math.min(p.maxY,f.maxY),o=Math.max(0,v-m)*Math.max(0,y-g),h=c(r)+c(s),o<l?(l=o,d=n,u=h<u?h:u):o===l&&h<u&&(u=h,d=n);return d},_chooseSplitAxis:function(t,e,i){var n=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)},_allDistMargin:function(t,e,i,n){t.children.sort(n);var r,s,o=this.toBBox,l=a(t,0,e,o),u=a(t,i-e,i,o),c=d(l)+d(u);for(r=e;r<i-e;r++)s=t.children[r],h(l,t.leaf?o(s):s),c+=d(l);for(r=i-e-1;r>=e;r--)s=t.children[r],h(u,t.leaf?o(s):s),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=r},35072:(t,e,i)=>{var n=new(i(83419))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e<t.length;e++)this.set(t[e])},set:function(t){return-1===this.entries.indexOf(t)&&this.entries.push(t),this},get:function(t,e){for(var i=0;i<this.entries.length;i++){var n=this.entries[i];if(n[t]===e)return n}},getArray:function(){return this.entries.slice(0)},delete:function(t){var e=this.entries.indexOf(t);return e>-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t<this.entries.length;t++){var e=this.entries[t];console.log(e)}console.groupEnd()},each:function(t,e){var i,n=this.entries.slice(),r=n.length;if(e)for(i=0;i<r&&!1!==t.call(e,n[i],i);i++);else for(i=0;i<r&&!1!==t(n[i],i);i++);return this},iterate:function(t,e){var i,n=this.entries.length;if(e)for(i=0;i<n&&!1!==t.call(e,this.entries[i],i);i++);else for(i=0;i<n&&!1!==t(this.entries[i],i);i++);return this},iterateLocal:function(t){var e,i=[];for(e=1;e<arguments.length;e++)i.push(arguments[e]);var n=this.entries.length;for(e=0;e<n;e++){var r=this.entries[e];r[t].apply(r,i)}return this},clear:function(){return this.entries.length=0,this},contains:function(t){return this.entries.indexOf(t)>-1},union:function(t){var e=new n;return t.entries.forEach((function(t){e.set(t)})),this.entries.forEach((function(t){e.set(t)})),e},intersect:function(t){var e=new n;return this.entries.forEach((function(i){t.contains(i)&&e.set(i)})),e},difference:function(t){var e=new n;return this.entries.forEach((function(i){t.contains(i)||e.set(i)})),e},size:{get:function(){return this.entries.length},set:function(t){return t<this.entries.length?this.entries.length=t:this.entries.length}}});t.exports=n},86555:(t,e,i)=>{var n=i(45319),r=i(83419),s=i(56583),o=i(26099),a=new r({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(s(t,this.snapTo.x)),this._height=this.getNewHeight(s(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(s(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(s(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(s(t,this.snapTo.x)),this._height=this.getNewHeight(s(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,r=0===e?1:t/e;return i&&this.aspectRatio>r||!i&&this.aspectRatio<r?(e=(t=s(t,n.x))/this.aspectRatio,n.y>0&&(t=(e=s(e,n.y))*this.aspectRatio)):(i&&this.aspectRatio<r||!i&&this.aspectRatio>r)&&(t=(e=s(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=s(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},15238:t=>{t.exports="add"},56187:t=>{t.exports="remove"},82348:(t,e,i)=>{t.exports={PROCESS_QUEUE_ADD:i(15238),PROCESS_QUEUE_REMOVE:i(56187)}},41392:(t,e,i)=>{t.exports={Events:i(82348),List:i(73162),Map:i(90330),ProcessQueue:i(25774),RTree:i(59542),Set:i(35072),Size:i(86555)}},57382:(t,e,i)=>{var n=i(83419),r=i(45319),s=i(40987),o=i(8054),a=i(50030),h=i(79237),l=new n({Extends:h,initialize:function(t,e,i,n,r){h.call(this,t,e,i,n,r),this.add("__BASE",0,0,0,n,r),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=n,this.height=r,this.imageData=this.context.getImageData(0,0,n,r),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===o.WEBGL&&this.refresh(),this},draw:function(t,e,i,n){return void 0===n&&(n=!0),this.context.drawImage(i,t,e),n&&this.update(),this},drawFrame:function(t,e,i,n,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=!0);var s=this.manager.getFrame(t,e);if(s){var o=s.canvasData,a=s.cutWidth,h=s.cutHeight,l=s.source.resolution;this.context.drawImage(s.source.image,o.x,o.y,a,h,i,n,a/l,h/l),r&&this.update()}return this},setPixel:function(t,e,i,n,r,s){if(void 0===s&&(s=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),this.getIndex(t,e)>-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=r,o.data[3]=s,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,r,s,o){return void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,r,s,o),this},getData:function(t,e,i,n){return t=r(Math.floor(t),0,this.width-1),e=r(Math.floor(e),0,this.height-1),i=r(i,1,this.width-t),n=r(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new s);var n=this.getIndex(t,e);if(n>-1){var r=this.data,o=r[n+0],a=r[n+1],h=r[n+2],l=r[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=r(t,0,this.width),a=r(t+i,0,this.width),h=r(e,0,this.height),l=r(e+n,0,this.height),u=new s,c=[],d=h;d<l;d++){for(var p=[],f=o;f<a;f++)u=this.getPixel(f,d,u),p.push({x:f,y:d,color:u.color,alpha:u.alphaGL});c.push(p)}return c},getIndex:function(t,e){return t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e)),t<this.width&&e<this.height?4*(t+e*this.width):-1},refresh:function(){return this._source.update(),this},getCanvas:function(){return this.canvas},getContext:function(){return this.context},clear:function(t,e,i,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===r&&(r=!0),this.context.clearRect(t,e,i,n),r&&this.update(),this},setSize:function(t,e){return void 0===e&&(e=t),t===this.width&&e===this.height||(this.canvas.width=t,this.canvas.height=e,this._source.width=t,this._source.height=e,this._source.isPowerOf2=a(t,e),this.frames.__BASE.setSize(t,e,0,0),this.width=t,this.height=e,this.refresh()),this},destroy:function(){h.prototype.destroy.call(this),this._source=null,this.canvas=null,this.context=null,this.imageData=null,this.data=null,this.pixels=null,this.buffer=null}});t.exports=l},81320:(t,e,i)=>{var n=i(10312),r=i(71911),s=i(27919),o=i(83419),a=i(8054),h=i(4327),l=i(95540),u=i(36060),c=i(32302),d=i(79237),p=i(70554),f=new o({Extends:d,initialize:function(t,e,i,n){void 0===i&&(i=256),void 0===n&&(n=256),this.type="DynamicTexture";var o=t.game.renderer,h=o&&o.type===a.CANVAS,l=h?s.create2D(this,i,n):[this];d.call(this,t,e,l,i,n),this.add("__BASE",0,0,0,i,n),this.renderer=o,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=h?l:null,this.context=h?l.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new r(0,0,i,n).setScene(t.game.scene.systemScene,!1),this.renderTarget=h?null:new c(o,i,n,1,0,!1,!0,!0,!1),this.pipeline=h?null:o.pipelines.get(u.SINGLE_PIPELINE),this.setSize(i,n)},setSize:function(t,e){void 0===e&&(e=t);var i=this.get(),n=i.source;if(t!==this.width||e!==this.height){this.canvas&&(this.canvas.width=t,this.canvas.height=e);var r=this.renderTarget;r&&(r.willResize(t,e)&&r.resize(t,e),r.texture!==n.glTexture&&this.renderer.deleteTexture(n.glTexture),this.setFromRenderTarget()),this.camera.setSize(t,e),n.width=t,n.height=e,i.setSize(t,e),this.width=t,this.height=e}else{var s=this.getSourceImage();i.cutX+t>s.width&&(t=s.width-i.cutX),i.cutY+e>s.height&&(e=s.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)}return this},setFromRenderTarget:function(){var t=this.get().source,e=this.renderTarget;return t.isRenderTexture=!0,t.isGLTexture=!0,t.glTexture=e.texture,t.glTexture.flipY=!0,this},setIsSpriteTexture:function(t){return this.isSpriteTexture=t,this},fill:function(t,e,i,n,r,s){var o=this.camera,a=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=this.width),void 0===s&&(s=this.height);var h=t>>16&255,l=t>>8&255,u=255&t,c=this.renderTarget;if(o.preRender(),c){c.bind(!0);var d=this.pipeline.manager.set(this.pipeline),f=a.width/c.width,m=a.height/c.height,g=c.height-(n+s);d.drawFillRect(i*f,g*m,r*f,s*m,p.getTintFromFloats(u/255,l/255,h/255,1),e),c.unbind(!0)}else{var v=this.context;a.setContext(v),v.globalCompositeOperation="source-over",v.fillStyle="rgba("+h+","+l+","+u+","+e+")",v.fillRect(i,n,r,s),a.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.context,e=this.renderTarget;e?e.clear():t&&(t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.width,this.height),t.restore()),this.dirty=!1}return this},stamp:function(t,e,i,n,r){void 0===i&&(i=0),void 0===n&&(n=0);var s=l(r,"alpha",1),o=l(r,"tint",16777215),a=l(r,"angle",0),h=l(r,"rotation",0),u=l(r,"scale",1),c=l(r,"scaleX",u),d=l(r,"scaleY",u),p=l(r,"originX",.5),f=l(r,"originY",.5),m=l(r,"blendMode",0),g=l(r,"erase",!1),v=l(r,"skipBatch",!1),y=this.manager.resetStamp(s,o);return y.setAngle(0),0!==a?y.setAngle(a):0!==h&&y.setRotation(h),y.setScale(c,d),y.setTexture(t,e),y.setOrigin(p,f),y.setBlendMode(m),g&&(this._eraseMode=!0),v?this.batchGameObject(y,i,n):this.draw(y,i,n),g&&(this._eraseMode=!1),this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i),this._eraseMode=!1,this},draw:function(t,e,i,n,r){return this.beginDraw(),this.batchDraw(t,e,i,n,r),this.endDraw(),this},drawFrame:function(t,e,i,n,r,s){return this.beginDraw(),this.batchDrawFrame(t,e,i,n,r,s),this.endDraw(),this},repeat:function(t,e,i,n,r,s,o,a,l){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=this.width),void 0===s&&(s=this.height),void 0===o&&(o=1),void 0===a&&(a=16777215),void 0===l&&(l=!1),!(e=t instanceof h?t:this.manager.getFrame(t,e)))return this;var u=this.manager.resetStamp(o,a);u.setFrame(e),u.setOrigin(0);var c=e.width,d=e.height;r=Math.floor(r),s=Math.floor(s);var p=Math.ceil(r/c),f=Math.ceil(s/d),m=p*c-r,g=f*d-s;m>0&&(m=c-m),g>0&&(g=d-g),i<0&&(p+=Math.ceil(Math.abs(i)/c)),n<0&&(f+=Math.ceil(Math.abs(n)/d));var v=i,y=n,x=!1,E=this.manager.stampCrop.setTo(0,0,c,d);l||this.beginDraw();for(var T=0;T<f;T++)if(y+d<0)y+=d;else{for(var _=0;_<p;_++)x=!1,v+c<0||(v<0&&(x=!0,E.width=c+v,E.x=c-E.width),y<0&&(x=!0,E.height=d+y,E.y=d-E.height),m>0&&_===p-1&&(x=!0,E.width=m),g>0&&T===f-1&&(x=!0,E.height=g),x&&u.setCrop(E),this.batchGameObject(u,v,y),u.isCropped=!1,E.setTo(0,0,c,d)),v+=c;v=i,y+=d}return l||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var t=this.camera,e=this.renderer,i=this.renderTarget;t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(t,e,i,n,r){return Array.isArray(t)||(t=[t]),this.batchList(t,e,i,n,r),this},batchDrawFrame:function(t,e,i,n,r,s){void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===s&&(s=16777215);var o=this.manager.getFrame(t,e);return o&&(this.renderTarget?this.pipeline.batchTextureFrame(o,i,n,s,r,this.camera.matrix,null):this.batchTextureFrame(o,i,n,r,s)),this},endDraw:function(t){if(void 0===t&&(t=this._eraseMode),this.isDrawing){var e=this.renderer,i=this.renderTarget;if(i){var n=e.endCapture();e.pipelines.setUtility().blitFrame(n,i,1,!1,!1,t,this.isSpriteTexture),e.resetScissor(),e.resetViewport()}else e.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(t,e,i,n,r){var s=t.length;if(0!==s)for(var o=0;o<s;o++){var a=t[o];a&&a!==this&&(a.renderWebGL||a.renderCanvas?this.batchGameObject(a,e,i):a.isParent||a.list?this.batchGroup(a.getChildren(),e,i):"string"==typeof a?this.batchTextureFrameKey(a,null,e,i,n,r):a instanceof h?this.batchTextureFrame(a,e,i,n,r):Array.isArray(a)&&this.batchList(a,e,i,n,r))}},batchGroup:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);for(var n=0;n<t.length;n++){var r=t[n];r.willRender(this.camera)&&this.batchGameObject(r,r.x+e,r.y+i)}},batchGameObject:function(t,e,i){void 0===e&&(e=t.x),void 0===i&&(i=t.y);var r=t.x,s=t.y,o=this.camera,a=this.renderer,h=this._eraseMode,l=t.mask;if(t.setPosition(e,i),this.canvas){if(h){var u=t.blendMode;t.blendMode=n.ERASE}l&&l.preRenderCanvas(a,t,o),t.renderCanvas(a,t,o,null),l&&l.postRenderCanvas(a,t,o),h&&(t.blendMode=u)}else a&&(l&&l.preRenderWebGL(a,t,o),h||a.setBlendMode(t.blendMode),t.renderWebGL(a,t,o),l&&l.postRenderWebGL(a,o,this.renderTarget));t.setPosition(r,s)},batchTextureFrameKey:function(t,e,i,n,r,s){var o=this.manager.getFrame(t,e);o&&this.batchTextureFrame(o,i,n,r,s)},batchTextureFrame:function(t,e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=16777215);var s=this.camera.matrix;if(this.renderTarget)this.pipeline.batchTextureFrame(t,e,i,r,n,s,null);else{var o=this.context,a=t.canvasData,h=t.source.image;o.save(),o.globalCompositeOperation=this._eraseMode?"destination-out":"source-over",o.globalAlpha=n,s.setToContext(o),a.width>0&&a.height>0&&o.drawImage(h,a.x,a.y,a.width,a.height,e,i,a.width,a.height),o.restore()}},snapshotArea:function(t,e,i,n,r,s,o){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,r,!1,t,e,i,n,s,o):this.renderer.snapshotCanvas(this.canvas,r,!1,t,e,i,n,s,o),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(t,e,i,n){var r=this.manager.resetStamp();r.setTexture(this),r.setOrigin(0),r.renderWebGL(t,r,i,n)},renderCanvas:function(){},destroy:function(){var t=this.manager.stamp;t&&t.texture===this&&this.manager.resetStamp(),d.prototype.destroy.call(this),s.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});t.exports=f},4327:(t,e,i)=>{var n=i(83419),r=i(45319),s=i(79291),o=new n({initialize:function(t,e,i,n,r,s,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(s,o,n,r)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var r=this.data,s=r.cut;s.x=i,s.y=n,s.w=t,s.h=e,s.r=i+t,s.b=n+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e);var o=r.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,r,s){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=r,a.h=s,a.r=i+r,a.b=n+s,this.x=i,this.y=n,this.width=r,this.height=s,this.halfWidth=.5*r,this.halfHeight=.5*s,this.centerX=Math.floor(r/2),this.centerY=Math.floor(s/2),this.updateUVs()},setScale9:function(t,e,i,n){var r=this.data;return r.scale9=!0,r.is3Slice=0===e&&n===this.height,r.scale9Borders.x=t,r.scale9Borders.y=e,r.scale9Borders.w=i,r.scale9Borders.h=n,this},setCropUVs:function(t,e,i,n,s,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,p=this.realHeight,f=h+(e=r(e,0,d)),m=l+(i=r(i,0,p)),g=n=r(n,0,d-e),v=s=r(s,0,p-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,E=e+(n=r(n,0,u-e)),T=i+(s=r(s,0,c-i));if(!(x.r<e||x.b<i||x.x>E||x.y>T)){var _=Math.max(x.x,e),w=Math.max(x.y,i),S=Math.min(x.r,E)-_,b=Math.min(x.b,T)-w;g=S,v=b,f=o?h+(u-(_-x.x)-S):h+(_-x.x),m=a?l+(c-(w-x.y)-b):l+(w-x.y),e=_,i=w,n=S,s=b}else f=0,m=0,g=0,v=0}else o&&(f=h+(u-e-n)),a&&(m=l+(c-i-s));var C=this.source.width,A=this.source.height;return t.u0=Math.max(0,f/C),t.v0=Math.max(0,m/A),t.u1=Math.min(1,(f+g)/C),t.v1=Math.min(1,(m+v)/A),t.x=e,t.y=i,t.cx=f,t.cy=m,t.cw=g,t.ch=v,t.width=n,t.height=s,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,n,r,s){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=r,this.v1=s,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,r=this.data.drawImage;r.width=i,r.height=n;var s=this.source.width,o=this.source.height;return this.u0=t/s,this.v0=e/o,this.u1=(t+i)/s,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=s(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null,this.customData=null,this.data=null},glTexture:{get:function(){return this.source.glTexture}},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},79237:(t,e,i)=>{var n=i(83419),r=i(4327),s=i(11876),o='Texture "%s" has no frame "%s"',a=new n({initialize:function(t,e,i,n,r){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var o=0;o<i.length;o++)this.source.push(new s(this,i[o],n,r))},add:function(t,e,i,n,s,o){if(this.has(t))return null;var a=new r(this,t,e,i,n,s,o);return this.frames[t]=a,"__BASE"===this.firstFrame&&(this.firstFrame=t),this.frameTotal++,a},remove:function(t){return!!this.has(t)&&(this.get(t).destroy(),delete this.frames[t],!0)},has:function(t){return this.frames.hasOwnProperty(t)},get:function(t){t||(t=this.firstFrame);var e=this.frames[t];return e||(console.warn(o,this.key,t),e=this.frames[this.firstFrame]),e},getTextureSourceIndex:function(t){for(var e=0;e<this.source.length;e++)if(this.source[e]===t)return e;return-1},getFramesFromTextureSource:function(t,e){void 0===e&&(e=!1);var i=[];for(var n in this.frames)if("__BASE"!==n||e){var r=this.frames[n];r.sourceIndex===t&&i.push(r)}return i},getFrameBounds:function(t){void 0===t&&(t=0);for(var e=this.getFramesFromTextureSource(t),i=1/0,n=1/0,r=0,s=0,o=0;o<e.length;o++){var a=e[o];a.cutX<i&&(i=a.cutX),a.cutY<n&&(n=a.cutY),a.cutX+a.cutWidth>r&&(r=a.cutX+a.cutWidth),a.cutY+a.cutHeight>s&&(s=a.cutY+a.cutHeight)}return{x:i,y:n,width:r-i,height:s-n}},getFrameNames:function(t){void 0===t&&(t=!1);var e=Object.keys(this.frames);if(!t){var i=e.indexOf("__BASE");-1!==i&&e.splice(i,1)}return e},getSourceImage:function(t){null!=t&&1!==this.frameTotal||(t="__BASE");var e=this.frames[t];return e?e.source.image:(console.warn(o,this.key,t),this.frames.__BASE.source.image)},getDataSourceImage:function(t){null!=t&&1!==this.frameTotal||(t="__BASE");var e,i=this.frames[t];return i?e=i.sourceIndex:(console.warn(o,this.key,t),e=this.frames.__BASE.sourceIndex),this.dataSource[e].image},setDataSource:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=this.source[e];this.dataSource.push(new s(this,t[e],i.width,i.height))}},setFilter:function(t){var e;for(e=0;e<this.source.length;e++)this.source[e].setFilter(t);for(e=0;e<this.dataSource.length;e++)this.dataSource[e].setFilter(t)},destroy:function(){var t,e=this.source,i=this.dataSource;for(t=0;t<e.length;t++)e[t]&&e[t].destroy();for(t=0;t<i.length;t++)i[t]&&i[t].destroy();for(var n in this.frames){var r=this.frames[n];r&&r.destroy()}this.source=[],this.dataSource=[],this.frames={},this.manager.removeKey(this.key),this.manager=null}});t.exports=a},17130:(t,e,i)=>{var n=i(27919),r=i(57382),s=i(83419),o=i(40987),a=i(8054),h=i(81320),l=i(50792),u=i(69442),c=i(4327),d=i(8443),p=i(99584),f=i(35154),m=i(88571),g=i(41212),v=i(61309),y=i(87841),x=i(79237),E=new s({Extends:l,initialize:function(t){l.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=n.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new y,this.silentWarnings=!1,t.events.once(d.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(u.LOAD,this.updatePending,this),this.on(u.ERROR,this.updatePending,this);var t=this.game.config;this.addBase64("__DEFAULT",t.defaultImage),this.addBase64("__MISSING",t.missingImage),this.addBase64("__WHITE",t.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(d.DESTROY,this.destroy,this),this.game.events.once(d.SYSTEM_READY,(function(t){this.stamp=new m(t).setOrigin(0)}),this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(u.LOAD),this.off(u.ERROR),this.emit(u.READY))},checkKey:function(t){return!this.exists(t)||(this.silentWarnings||console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return this.silentWarnings||console.warn("No texture found matching key: "+t),this;t=this.get(t)}var e=t.key;return this.list.hasOwnProperty(e)&&(t.destroy(),this.emit(u.REMOVE,e),this.emit(u.REMOVE_KEY+e)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,n=new Image;n.onerror=function(){i.emit(u.ERROR,t)},n.onload=function(){var e=i.create(t,n);v.Image(e,0),i.emit(u.ADD,t,e),i.emit(u.ADD_KEY+t,e),i.emit(u.LOAD,t,e)},n.src=e}return this},getBase64:function(t,e,i,r){void 0===i&&(i="image/png"),void 0===r&&(r=.92);var s="",o=this.getFrame(t,e);if(o&&(o.source.isRenderTexture||o.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(o){var a=o.canvasData,h=n.create2D(this,a.width,a.height),l=h.getContext("2d",{willReadFrequently:!0});a.width>0&&a.height>0&&l.drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),s=h.toDataURL(i,r),n.remove(h)}return s},addImage:function(t,e,i){var n=null;return this.checkKey(t)&&(n=this.create(t,e),v.Image(n,0),i&&n.setDataSource(i),this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)),n},addGLTexture:function(t,e){var i=null;if(this.checkKey(t)){var n=e.width,r=e.height;(i=this.create(t,e,n,r)).add("__BASE",0,0,0,n,r),this.emit(u.ADD,t,i),this.emit(u.ADD_KEY+t,i)}return i},addCompressedTexture:function(t,e,i){var n=null;if(this.checkKey(t)){if((n=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),i){var r=function(t,e,i){Array.isArray(i.textures)||Array.isArray(i.frames)?v.JSONArray(t,e,i):v.JSONHash(t,e,i)};if(Array.isArray(i))for(var s=0;s<i.length;s++)r(n,s,i[s]);else r(n,0,i)}this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)}return n},addRenderTexture:function(t,e){var i=null;return this.checkKey(t)&&((i=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),this.emit(u.ADD,t,i),this.emit(u.ADD_KEY+t,i)),i},generate:function(t,e){if(this.checkKey(t)){var i=n.create(this,1,1);return e.canvas=i,p(e),this.addCanvas(t,i)}return null},createCanvas:function(t,e,i){if(void 0===e&&(e=256),void 0===i&&(i=256),this.checkKey(t)){var r=n.create(this,e,i,a.CANVAS,!0);return this.addCanvas(t,r)}return null},addCanvas:function(t,e,i){void 0===i&&(i=!1);var n=null;return i?n=new r(this,t,e,e.width,e.height):this.checkKey(t)&&(n=new r(this,t,e,e.width,e.height),this.list[t]=n,this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)),n},addDynamicTexture:function(t,e,i){var n=null;return"string"!=typeof t||this.exists(t)?t=(n=t).key:n=new h(this,t,e,i),this.checkKey(t)?(this.list[t]=n,this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)):n=null,n},addAtlas:function(t,e,i,n){return Array.isArray(i.textures)||Array.isArray(i.frames)?this.addAtlasJSONArray(t,e,i,n):this.addAtlasJSONHash(t,e,i,n)},addAtlasJSONArray:function(t,e,i,n){var r=null;if(e instanceof x?(t=e.key,r=e):this.checkKey(t)&&(r=this.create(t,e)),r){if(Array.isArray(i))for(var s=1===i.length,o=0;o<r.source.length;o++){var a=s?i[0]:i[o];v.JSONArray(r,o,a)}else v.JSONArray(r,0,i);n&&r.setDataSource(n),this.emit(u.ADD,t,r),this.emit(u.ADD_KEY+t,r)}return r},addAtlasJSONHash:function(t,e,i,n){var r=null;if(e instanceof x?(t=e.key,r=e):this.checkKey(t)&&(r=this.create(t,e)),r){if(Array.isArray(i))for(var s=0;s<i.length;s++)v.JSONHash(r,s,i[s]);else v.JSONHash(r,0,i);n&&r.setDataSource(n),this.emit(u.ADD,t,r),this.emit(u.ADD_KEY+t,r)}return r},addAtlasXML:function(t,e,i,n){var r=null;return e instanceof x?(t=e.key,r=e):this.checkKey(t)&&(r=this.create(t,e)),r&&(v.AtlasXML(r,0,i),n&&r.setDataSource(n),this.emit(u.ADD,t,r),this.emit(u.ADD_KEY+t,r)),r},addUnityAtlas:function(t,e,i,n){var r=null;return e instanceof x?(t=e.key,r=e):this.checkKey(t)&&(r=this.create(t,e)),r&&(v.UnityYAML(r,0,i),n&&r.setDataSource(n),this.emit(u.ADD,t,r),this.emit(u.ADD_KEY+t,r)),r},addSpriteSheet:function(t,e,i,n){var r=null;if(e instanceof x?(t=e.key,r=e):this.checkKey(t)&&(r=this.create(t,e)),r){var s=r.source[0].width,o=r.source[0].height;v.SpriteSheet(r,0,0,0,s,o,i),n&&r.setDataSource(n),this.emit(u.ADD,t,r),this.emit(u.ADD_KEY+t,r)}return r},addSpriteSheetFromAtlas:function(t,e){if(!this.checkKey(t))return null;var i=f(e,"atlas",null),n=f(e,"frame",null);if(i&&n){var r=this.get(i).get(n);if(r){var s=r.source.image;s||(s=r.source.glTexture);var o=this.create(t,s);return r.trimmed?v.SpriteSheetFromAtlas(o,r,e):v.SpriteSheet(o,0,r.cutX,r.cutY,r.cutWidth,r.cutHeight,e),this.emit(u.ADD,t,o),this.emit(u.ADD_KEY+t,o),o}}},addUint8Array:function(t,e,i,n){if(!this.checkKey(t)||e.length/4!=i*n)return null;var r=this.create(t,e,i,n);return r.add("__BASE",0,0,0,i,n),this.emit(u.ADD,t,r),this.emit(u.ADD_KEY+t,r),r},create:function(t,e,i,n){var r=null;return this.checkKey(t)&&(r=new x(this,t,e,i,n),this.list[t]=r),r},exists:function(t){return this.list.hasOwnProperty(t)},get:function(t){return void 0===t&&(t="__DEFAULT"),this.list[t]?this.list[t]:t instanceof x?t:t instanceof c?t.texture:this.list.__MISSING},cloneFrame:function(t,e){if(this.list[t])return this.list[t].get(e).clone()},getFrame:function(t,e){if(this.list[t])return this.list[t].get(e)},parseFrame:function(t){if(t)return"string"==typeof t?this.getFrame(t):Array.isArray(t)&&2===t.length?this.getFrame(t[0],t[1]):g(t)?this.getFrame(t.key,t.frame):t instanceof x?t.get():t instanceof c?t:void 0},getTextureKeys:function(){var t=[];for(var e in this.list)"__DEFAULT"!==e&&"__MISSING"!==e&&"__WHITE"!==e&&"__NORMAL"!==e&&t.push(e);return t},getPixel:function(t,e,i,n){var r=this.getFrame(i,n);if(r){t-=r.x,e-=r.y;var s=r.data.cut;if(t+=s.x,e+=s.y,t>=s.x&&t<s.r&&e>=s.y&&e<s.b){var a=this._tempContext;a.clearRect(0,0,1,1),a.drawImage(r.source.image,t,e,1,1,0,0,1,1);var h=a.getImageData(0,0,1,1);return new o(h.data[0],h.data[1],h.data[2],h.data[3])}}return null},getPixelAlpha:function(t,e,i,n){var r=this.getFrame(i,n);if(r){t-=r.x,e-=r.y;var s=r.data.cut;if(t+=s.x,e+=s.y,t>=s.x&&t<s.r&&e>=s.y&&e<s.b){var o=this._tempContext;return o.clearRect(0,0,1,1),o.drawImage(r.source.image,t,e,1,1,0,0,1,1),o.getImageData(0,0,1,1).data[3]}}return null},setTexture:function(t,e,i){return this.list[e]&&(t.texture=this.list[e],t.frame=t.texture.get(i)),t},renameTexture:function(t,e){var i=this.get(t);return!(!i||t===e)&&(i.key=e,this.list[e]=i,delete this.list[t],!0)},each:function(t,e){for(var i=[null],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var r in this.list)i[0]=this.list[r],t.apply(e,i)},resetStamp:function(t,e){void 0===t&&(t=1),void 0===e&&(e=16777215);var i=this.stamp;return i.setCrop(),i.setPosition(0),i.setAngle(0),i.setScale(1),i.setAlpha(t),i.setTint(e),i.setTexture("__WHITE"),i},destroy:function(){for(var t in this.list)this.list[t].destroy();this.list={},this.stamp.destroy(),this.game=null,this.stamp=null,n.remove(this._tempCanvas)}});t.exports=E},11876:(t,e,i)=>{var n=i(27919),r=i(83419),s=i(50030),o=i(29795),a=i(82751),h=new r({initialize:function(t,e,i,n,r){void 0===r&&(r=!1);var h=t.manager.game;this.renderer=h.renderer,this.texture=t,this.source=e,this.image=e.compressed?null:e,this.compressionAlgorithm=e.compressed?e.format:null,this.resolution=1,this.width=i||e.naturalWidth||e.videoWidth||e.width||0,this.height=n||e.naturalHeight||e.videoHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type||"DynamicTexture"===e.type,this.isGLTexture=e instanceof a,this.isPowerOf2=s(this.width,this.height),this.glTexture=null,this.flipY=r,this.init(h)},init:function(t){var e=this.renderer;if(e){var i=this.source;if(e.gl){var n=this.image,r=this.flipY,s=this.width,o=this.height,a=this.scaleMode;this.isCanvas?this.glTexture=e.createCanvasTexture(n,!1,r):this.isVideo?this.glTexture=e.createVideoTexture(n,!1,r):this.isRenderTexture?this.glTexture=e.createTextureFromSource(null,s,o,a):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=e.createTextureFromSource(i,void 0,void 0,a):i instanceof Uint8Array?this.glTexture=e.createUint8ArrayTexture(i,s,o,a):this.glTexture=e.createTextureFromSource(n,s,o,a),this.glTexture.spectorMetadata={textureKey:this.texture.key}}else this.isRenderTexture&&(this.image=i.canvas)}t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return void 0===t&&(t=!0),this.flipY=t,this},update:function(){var t=this.renderer,e=this.image,i=this.flipY,n=t.gl;n&&this.isCanvas?t.updateCanvasTexture(e,this.glTexture,i):n&&this.isVideo&&t.updateVideoTexture(e,this.glTexture,i)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&n.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=h},19673:t=>{t.exports={LINEAR:0,NEAREST:1}},44538:t=>{t.exports="addtexture"},63486:t=>{t.exports="addtexture-"},94851:t=>{t.exports="onerror"},29099:t=>{t.exports="onload"},8678:t=>{t.exports="ready"},86415:t=>{t.exports="removetexture"},30879:t=>{t.exports="removetexture-"},69442:(t,e,i)=>{t.exports={ADD:i(44538),ADD_KEY:i(63486),ERROR:i(94851),LOAD:i(29099),READY:i(8678),REMOVE:i(86415),REMOVE_KEY:i(30879)}},27458:(t,e,i)=>{var n=i(79291),r=i(19673),s={CanvasTexture:i(57382),DynamicTexture:i(81320),Events:i(69442),FilterMode:r,Frame:i(4327),Parsers:i(61309),Texture:i(79237),TextureManager:i(17130),TextureSource:i(11876)};s=n(!1,s,r),t.exports=s},89905:t=>{t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,s=i.getElementsByTagName("SubTexture"),o=0;o<s.length;o++){var a=s[o].attributes,h=a.name.value,l=parseInt(a.x.value,10),u=parseInt(a.y.value,10),c=parseInt(a.width.value,10),d=parseInt(a.height.value,10);if(r=t.add(h,e,l,u,c,d),a.frameX){var p=Math.abs(parseInt(a.frameX.value,10)),f=Math.abs(parseInt(a.frameY.value,10)),m=parseInt(a.frameWidth.value,10),g=parseInt(a.frameHeight.value,10);r.setTrim(c,d,p,f,m,g)}}return t}console.warn("Invalid Texture Atlas XML given")}},72893:t=>{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},4832:t=>{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},78566:(t,e,i)=>{var n=i(41786);t.exports=function(t,e,i){if(i.frames||i.textures){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height);for(var s,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a<o.length;a++){var h=o[a];if(s=t.add(h.filename,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h)){h.trimmed&&s.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(s.rotated=!0,s.updateUVsInverted());var l=h.anchor||h.pivot;l&&(s.customPivot=!0,s.pivotX=l.x,s.pivotY=l.y),h.scale9Borders&&s.setScale9(h.scale9Borders.x,h.scale9Borders.y,h.scale9Borders.w,h.scale9Borders.h),s.customData=n(h)}else console.warn("Invalid atlas json, frame already exists: "+h.filename)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Array")}},39711:(t,e,i)=>{var n=i(41786);t.exports=function(t,e,i){if(i.frames){var r=t.source[e];t.add("__BASE",e,0,0,r.width,r.height);var s,o=i.frames;for(var a in o)if(o.hasOwnProperty(a)){var h=o[a];if(s=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h)){h.trimmed&&s.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(s.rotated=!0,s.updateUVsInverted());var l=h.anchor||h.pivot;l&&(s.customPivot=!0,s.pivotX=l.x,s.pivotY=l.y),h.scale9Borders&&s.setScale9(h.scale9Borders.x,h.scale9Borders.y,h.scale9Borders.w,h.scale9Borders.h),s.customData=n(h)}else console.warn("Invalid atlas json, frame already exists: "+a)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},31403:t=>{t.exports=function(t){var e,i=[171,75,84,88,32,49,49,187,13,10,26,10],n=new Uint8Array(t,0,12);for(e=0;e<n.length;e++)if(n[e]!==i[e])return void console.warn("KTXParser - Invalid file format");var r=Uint32Array.BYTES_PER_ELEMENT,s=new DataView(t,12,13*r),o=67305985===s.getUint32(0,!0);if(0===s.getUint32(1*r,o)){var a=s.getUint32(4*r,o),h=s.getUint32(6*r,o),l=s.getUint32(7*r,o),u=Math.max(1,s.getUint32(11*r,o)),c=s.getUint32(12*r,o),d=new Array(u),p=64+c,f=h,m=l;for(e=0;e<u;e++){var g=new Int32Array(t,p,1)[0];p+=4,d[e]={data:new Uint8Array(t,p,g),width:f,height:m},f=Math.max(1,f>>1),m=Math.max(1,m>>1),p+=g}return{mipmaps:d,width:h,height:l,internalFormat:a,compressed:!0,generateMipmap:!1}}console.warn("KTXParser - Only compressed formats supported")}},82038:t=>{function e(t,e,i,n,r,s,o){return void 0===o&&(o=16),Math.floor((t+i)/r)*Math.floor((e+n)/s)*o}function i(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function n(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function r(t,e){return Math.ceil(t/4)*Math.ceil(e/4)*16}function s(t,i){return e(t,i,3,3,4,4,8)}function o(t,i){return e(t,i,3,3,4,4)}var a={0:{sizeFunc:i,glFormat:[35841]},1:{sizeFunc:i,glFormat:[35843]},2:{sizeFunc:n,glFormat:[35840]},3:{sizeFunc:n,glFormat:[35842]},6:{sizeFunc:s,glFormat:[36196]},7:{sizeFunc:s,glFormat:[33776,35916]},8:{sizeFunc:o,glFormat:[33777,35917]},9:{sizeFunc:o,glFormat:[33778,35918]},11:{sizeFunc:o,glFormat:[33779,35919]},14:{sizeFunc:r,glFormat:[36494,36495]},15:{sizeFunc:r,glFormat:[36492,36493]},22:{sizeFunc:s,glFormat:[37492,37493]},23:{sizeFunc:o,glFormat:[37496,37497]},24:{sizeFunc:s,glFormat:[37494,37495]},25:{sizeFunc:s,glFormat:[37488]},26:{sizeFunc:o,glFormat:[37490]},27:{sizeFunc:o,glFormat:[37808,37840]},28:{sizeFunc:function(t,i){return e(t,i,4,3,5,4)},glFormat:[37809,37841]},29:{sizeFunc:function(t,i){return e(t,i,4,4,5,5)},glFormat:[37810,37842]},30:{sizeFunc:function(t,i){return e(t,i,5,4,6,5)},glFormat:[37811,37843]},31:{sizeFunc:function(t,i){return e(t,i,5,5,6,6)},glFormat:[37812,37844]},32:{sizeFunc:function(t,i){return e(t,i,7,4,8,5)},glFormat:[37813,37845]},33:{sizeFunc:function(t,i){return e(t,i,7,5,8,6)},glFormat:[37814,37846]},34:{sizeFunc:function(t,i){return e(t,i,7,7,8,8)},glFormat:[37815,37847]},35:{sizeFunc:function(t,i){return e(t,i,9,4,10,5)},glFormat:[37816,37848]},36:{sizeFunc:function(t,i){return e(t,i,9,5,10,6)},glFormat:[37817,37849]},37:{sizeFunc:function(t,i){return e(t,i,9,7,10,8)},glFormat:[37818,37850]},38:{sizeFunc:function(t,i){return e(t,i,9,9,10,10)},glFormat:[37819,37851]},39:{sizeFunc:function(t,i){return e(t,i,11,9,12,10)},glFormat:[37820,37852]},40:{sizeFunc:function(t,i){return e(t,i,11,11,12,12)},glFormat:[37821,37853]}};t.exports=function(t){for(var e=new Uint32Array(t,0,13),i=55727696===e[0]?e[2]:e[3],n=e[4],r=a[i].glFormat[n],s=a[i].sizeFunc,o=e[11],h=e[7],l=e[6],u=52+e[12],c=new Uint8Array(t,u),d=new Array(o),p=0,f=h,m=l,g=0;g<o;g++){var v=s(f,m);d[g]={data:new Uint8Array(c.buffer,c.byteOffset+p,v),width:f,height:m},f=Math.max(1,f>>1),m=Math.max(1,m>>1),p+=v}return{mipmaps:d,width:h,height:l,internalFormat:r,compressed:!0,generateMipmap:!1}}},75549:(t,e,i)=>{var n=i(95540);t.exports=function(t,e,i,r,s,o,a){var h=n(a,"frameWidth",null),l=n(a,"frameHeight",h);if(null===h)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=t.source[e];t.add("__BASE",e,0,0,u.width,u.height);var c=n(a,"startFrame",0),d=n(a,"endFrame",-1),p=n(a,"margin",0),f=n(a,"spacing",0),m=Math.floor((s-p+f)/(h+f))*Math.floor((o-p+f)/(l+f));0===m&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",t.key),(c>m||c<-m)&&(c=0),c<0&&(c=m+c),(-1===d||d>m||d<c)&&(d=m);for(var g=p,v=p,y=0,x=0,E=0,T=0;T<m;T++){y=0,x=0;var _=g+h,w=v+l;_>s&&(y=_-s),w>o&&(x=w-o),T>=c&&T<=d&&(t.add(E,e,i+g,r+v,h-y,l-x),E++),(g+=h+f)+h>s&&(g=p,v+=l+f)}return t}},47534:(t,e,i)=>{var n=i(95540);t.exports=function(t,e,i){var r=n(i,"frameWidth",null),s=n(i,"frameHeight",r);if(!r)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=n(i,"startFrame",0),l=n(i,"endFrame",-1),u=n(i,"margin",0),c=n(i,"spacing",0),d=e.cutX,p=e.cutY,f=e.cutWidth,m=e.cutHeight,g=e.realWidth,v=e.realHeight,y=Math.floor((g-u+c)/(r+c)),x=Math.floor((v-u+c)/(s+c)),E=y*x,T=e.x,_=r-T,w=r-(g-f-T),S=e.y,b=s-S,C=s-(v-m-S);(h>E||h<-E)&&(h=0),h<0&&(h=E+h),-1!==l&&(E=h+(l+1));for(var A=u,R=u,M=0,L=0;L<x;L++){for(var O=0===L,P=L===x-1,F=0;F<y;F++){var I=0===F,D=F===y-1;if(a=t.add(M,0,d+A,p+R,r,s),I||O||D||P){var N=I?T:0,k=O?S:0,B=0,U=0;I&&(B+=r-_),D&&(B+=r-w),O&&(U+=s-b),P&&(U+=s-C);var G=r-B,W=s-U;a.cutWidth=G,a.cutHeight=W,a.setTrim(r,s,N,k,G,W)}A+=c,A+=I?_:D?w:r,M++}A=u,R+=c,R+=O?b:P?C:s}return t}},86147:t=>{var e=0,i=function(t,i,n,r){var s=e-r.y-r.height;t.add(n,i,r.x,s,r.width,r.height)};t.exports=function(t,n,r){var s=t.source[n];t.add("__BASE",n,0,0,s.width,s.height),e=s.height;for(var o=r.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},c=0;c<o.length;c++){var d=o[c].match(a);if(d){var p="- "===d[1],f=d[2],m=d[3];if(p&&(l!==h&&(i(t,n,l,u),h=l),u={x:0,y:0,width:0,height:0}),"name"!==f)switch(f){case"x":case"y":case"width":case"height":u[f]=parseInt(m,10)}else l=m}}return l!==h&&i(t,n,l,u),t}},55222:(t,e,i)=>{var n=i(50030);function r(t){for(var e=t.mipmaps,i=0;i<e.length;i++){var n=e[i].width,r=e[i].height;if((n<<i)%4!=0||(r<<i)%4!=0)return console.warn("BPTC, RGTC, and S3TC dimensions must be a multiple of 4 pixels, and each successive mip level must be half the size of the previous level, rounded down. Mip level "+i+" is "+n+"x"+r),!1}return!0}function s(){return!0}function o(t){var e=t.mipmaps[0];return!!n(e.width,e.height)||(console.warn("PVRTC base dimensions must be power of two. Base level is "+e.width+"x"+e.height),!1)}function a(t){var e=t.mipmaps[0];return e.width%4==0&&e.height%4==0||(console.warn("S3TC SRGB base dimensions must be a multiple of 4 pixels. Base level is "+e.width+"x"+e.height+" pixels"),!1)}var h={37488:s,37489:s,37490:s,37491:s,37492:s,37493:s,37494:s,37495:s,37496:s,37497:s,36196:s,37808:s,37809:s,37810:s,37811:s,37812:s,37813:s,37814:s,37815:s,37816:s,37817:s,37818:s,37819:s,37820:s,37821:s,37840:s,37841:s,37842:s,37843:s,37844:s,37845:s,37846:s,37847:s,37848:s,37849:s,37850:s,37851:s,37852:s,37853:s,36492:r,36493:r,36494:r,36495:r,36283:r,36284:r,36285:r,36286:r,35840:o,35841:o,35842:o,35843:o,33776:r,33777:r,33778:r,33779:r,35916:a,35917:a,35918:a,35919:a};t.exports=function(t){for(var e=t.mipmaps,i=1;i<e.length;i++){var r=e[i].width,s=e[i].height;if(!n(r,s))return console.warn("Mip level "+i+" is not a power-of-two size: "+r+"x"+s),!1}var o=h[t.internalFormat];return o?o(t):(console.warn("No format checker found for internal format "+t.internalFormat+". Assuming valid."),!0)}},61309:(t,e,i)=>{t.exports={AtlasXML:i(89905),Canvas:i(72893),Image:i(4832),JSONArray:i(78566),JSONHash:i(39711),KTXParser:i(31403),PVRParser:i(82038),SpriteSheet:i(75549),SpriteSheetFromAtlas:i(47534),UnityYAML:i(86147)}},80341:t=>{t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(t,e,i)=>{var n=new(i(83419))({initialize:function(t,e,i,n,r,s,o){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===r&&(r=0),void 0===s&&(s=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|n,this.imageMargin=0|r,this.imageSpacing=0|s,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},addImage:function(t,e){return this.images.push({gid:t,image:e}),this.total++,this}});t.exports=n},27462:(t,e,i)=>{var n=new(i(83419))({initialize:function(t){if(this.gids=[],void 0!==t)for(var e=0;e<t.length;++e)for(var i=t[e],n=0;n<i.total;++n)this.gids[i.firstgid+n]=i;this._gids=this.gids},enabled:{get:function(){return!!this.gids},set:function(t){this.gids=t?this._gids:void 0}},getTypeIncludingTile:function(t){if(void 0!==t.type&&""!==t.type)return t.type;if(this.gids&&void 0!==t.gid){var e=this.gids[t.gid];if(e){var i=e.getTileData(t.gid);if(i)return i.type}}},setTextureAndFrame:function(t,e,i,n){if(null===e&&this.gids&&void 0!==n.gid){var r=this.gids[n.gid];r&&(null===e&&void 0!==r.image&&(e=r.image.key),null===i&&(i=n.gid-r.firstgid),t.scene.textures.getFrame(e,i)||(e=null,i=null))}t.setTexture(e,i)},setPropertiesFromTiledObject:function(t,e){if(void 0!==this.gids&&void 0!==e.gid){var i=this.gids[e.gid];void 0!==i&&this.setFromJSON(t,i.getTileProperties(e.gid))}this.setFromJSON(t,e.properties)},setFromJSON:function(t,e){if(e)if(Array.isArray(e))for(var i=0;i<e.length;i++){var n=e[i];void 0!==t[n.name]?t[n.name]=n.value:t.setData(n.name,n.value)}else for(var r in e)void 0!==t[r]?t[r]=e[r]:t.setData(r,e[r])}});t.exports=n},31989:(t,e,i)=>{var n=i(80341),r=i(87010),s=i(46177),o=i(49075);t.exports=function(t,e,i,a,h,l,u,c){void 0===i&&(i=32),void 0===a&&(a=32),void 0===h&&(h=10),void 0===l&&(l=10),void 0===c&&(c=!1);var d=null;if(Array.isArray(u))d=s(void 0!==e?e:"map",n.ARRAY_2D,u,i,a,c);else if(void 0!==e){var p=t.cache.tilemap.get(e);p?d=s(e,p.format,p.data,i,a,c):console.warn("No map data found for key "+e)}return null===d&&(d=new r({tileWidth:i,tileHeight:a,width:h,height:l})),new o(t,d)}},23029:(t,e,i)=>{var n=i(83419),r=i(31401),s=i(91907),o=i(62644),a=i(93232),h=new n({Mixins:[r.AlphaSingle,r.Flip,r.Visible],initialize:function(t,e,i,n,r,s,o,a){this.layer=t,this.index=e,this.x=i,this.y=n,this.width=r,this.height=s,this.right,this.bottom,this.baseWidth=void 0!==o?o:r,this.baseHeight=void 0!==a?a:s,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(t,e){return!(t<this.pixelX||e<this.pixelY||t>this.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=o(t.properties),this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).x:this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new a),e.x=this.getLeft(t),e.y=this.getTop(t),e.width=this.getRight(t)-e.x,e.height=this.getBottom(t)-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,r){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===r&&(r=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,r)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){var t=this.layer.orientation;if(t===s.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(t===s.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(t===s.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(t===s.HEXAGONAL){var e,i,n=this.layer.staggerAxis,r=this.layer.staggerIndex,o=this.layer.hexSideLength;"y"===n?(i=(this.baseHeight-o)/2+o,this.pixelX="odd"===r?this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*i):"x"===n&&(e=(this.baseWidth-o)/2+o,this.pixelX=this.x*e,this.pixelY="odd"===r?this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=h},49075:(t,e,i)=>{var n=i(84101),r=i(83419),s=i(39506),o=i(80341),a=i(95540),h=i(14977),l=i(27462),u=i(91907),c=i(36305),d=i(19133),p=i(68287),f=i(23029),m=i(81086),g=i(20442),v=i(33629),y=new r({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tiles=e.tiles,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;var i=this.orientation;this._convert={WorldToTileXY:m.GetWorldToTileXYFunction(i),WorldToTileX:m.GetWorldToTileXFunction(i),WorldToTileY:m.GetWorldToTileYFunction(i),TileToWorldXY:m.GetTileToWorldXYFunction(i),TileToWorldX:m.GetTileToWorldXFunction(i),TileToWorldY:m.GetTileToWorldYFunction(i),GetTileCorners:m.GetTileCornersFunction(i)}},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),e.indexOf(t)>-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,r,s,a,h,l){if(void 0===t)return null;null==e&&(e=t);var u=this.scene.sys.textures;if(!u.exists(e))return console.warn('Texture key "%s" not found',e),null;var c=u.get(e),d=this.getTilesetIndex(t);if(null===d&&this.format===o.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',t,this.tilesets),null;var p=this.tilesets[d];return p?(p.setTileSize(i,r),p.setSpacing(s,a),p.setImage(c),p):(void 0===i&&(i=this.tileWidth),void 0===r&&(r=this.tileHeight),void 0===s&&(s=0),void 0===a&&(a=0),void 0===h&&(h=0),void 0===l&&(l={x:0,y:0}),(p=new v(t,h,i,r,s,a,void 0,void 0,l)).setImage(c),this.tilesets.push(p),this.tiles=n(this),p)},copy:function(t,e,i,n,r,s,o,a){return null!==(a=this.getLayer(a))?(m.Copy(t,e,i,n,r,s,o,a),this):null},createBlankLayer:function(t,e,i,n,r,s,o,a){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=this.width),void 0===s&&(s=this.height),void 0===o&&(o=this.tileWidth),void 0===a&&(a=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var l,u=new h({name:t,tileWidth:o,tileHeight:a,width:r,height:s,orientation:this.orientation}),c=0;c<s;c++){l=[];for(var d=0;d<r;d++)l.push(new f(u,-1,d,c,o,a,this.tileWidth,this.tileHeight));u.data.push(l)}this.layers.push(u),this.currentLayerIndex=this.layers.length-1;var p=new g(this.scene,this,this.currentLayerIndex,e,i,n);return p.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(p),p},createLayer:function(t,e,i,n){var r=this.getLayerIndex(t);if(null===r)return console.warn("Invalid Tilemap Layer ID: "+t),"string"==typeof t&&console.warn("Valid tilelayer names: %o",this.getTileLayerNames()),null;var s=this.layers[r];if(s.tilemapLayer)return console.warn("Tilemap Layer ID already exists:"+t),null;this.currentLayerIndex=r,void 0===i&&(i=s.x),void 0===n&&(n=s.y);var o=new g(this.scene,this,r,e,i,n);return o.setRenderOrder(this.renderOrder),this.scene.sys.displayList.add(o),o},createFromObjects:function(t,e,i){void 0===i&&(i=!0);var n=[],r=this.getObjectLayer(t);if(!r)return console.warn("createFromObjects: Invalid objectLayerName given: "+t),n;var o=new l(i?this.tilesets:void 0);Array.isArray(e)||(e=[e]);for(var h=r.objects,d=0;d<e.length;d++){var f,m=e[d],g=a(m,"id",null),v=a(m,"gid",null),y=a(m,"name",null),x=a(m,"type",null);o.enabled=!a(m,"ignoreTileset",null);for(var E=[],T=0;T<h.length;T++)f=h[T],(null===g&&null===v&&null===y&&null===x||null!==g&&f.id===g||null!==v&&f.gid===v||null!==y&&f.name===y||null!==x&&o.getTypeIncludingTile(f)===x)&&E.push(f);for(var _=a(m,"classType",p),w=a(m,"scene",this.scene),S=a(m,"container",null),b=a(m,"key",null),C=a(m,"frame",null),A=0;A<E.length;A++){f=E[A];var R=new _(w);if(R.setName(f.name),R.setPosition(f.x,f.y),o.setTextureAndFrame(R,b,C,f),f.width&&(R.displayWidth=f.width),f.height&&(R.displayHeight=f.height),this.orientation===u.ISOMETRIC){var M=this.tileWidth/this.tileHeight,L={x:R.x-R.y,y:(R.x+R.y)/M};R.x=L.x,R.y=L.y}var O={x:R.originX*f.width,y:(R.originY-(f.gid?1:0))*f.height};if(f.rotation){var P=s(f.rotation);c(O,P),R.rotation=P}R.x+=O.x,R.y+=O.y,void 0===f.flippedHorizontal&&void 0===f.flippedVertical||R.setFlip(f.flippedHorizontal,f.flippedVertical),f.visible||(R.visible=!1),o.setPropertiesFromTiledObject(R,f),S?S.add(R):w.add.existing(R),n.push(R)}}return n},createFromTiles:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:m.CreateFromTiles(t,e,i,n,r,s)},fill:function(t,e,i,n,r,s,o){return void 0===s&&(s=!0),null===(o=this.getLayer(o))?null:(m.Fill(t,e,i,n,r,s,o),this)},filterObjects:function(t,e,i){if("string"==typeof t){var n=t;if(!(t=this.getObjectLayer(t)))return console.warn("No object layer found with the name: "+n),null}return t.objects.filter(e,i)},filterTiles:function(t,e,i,n,r,s,o,a){return null===(a=this.getLayer(a))?null:m.FilterTiles(t,e,i,n,r,s,o,a)},findByIndex:function(t,e,i,n){return null===(n=this.getLayer(n))?null:m.FindByIndex(t,e,i,n)},findObject:function(t,e,i){if("string"==typeof t){var n=t;if(!(t=this.getObjectLayer(t)))return console.warn("No object layer found with the name: "+n),null}return t.objects.find(e,i)||null},findTile:function(t,e,i,n,r,s,o,a){return null===(a=this.getLayer(a))?null:m.FindTile(t,e,i,n,r,s,o,a)},forEachTile:function(t,e,i,n,r,s,o,a){return null===(a=this.getLayer(a))?null:(m.ForEachTile(t,e,i,n,r,s,o,a),this)},getImageIndex:function(t){return this.getIndex(this.images,t)},getImageLayerNames:function(){return this.images&&Array.isArray(this.images)?this.images.map((function(t){return t.name})):[]},getIndex:function(t,e){for(var i=0;i<t.length;i++)if(t[i].name===e)return i;return null},getLayer:function(t){var e=this.getLayerIndex(t);return null!==e?this.layers[e]:null},getObjectLayer:function(t){var e=this.getIndex(this.objects,t);return null!==e?this.objects[e]:null},getObjectLayerNames:function(){return this.objects&&Array.isArray(this.objects)?this.objects.map((function(t){return t.name})):[]},getLayerIndex:function(t){return void 0===t?this.currentLayerIndex:"string"==typeof t?this.getLayerIndexByName(t):"number"==typeof t&&t<this.layers.length?t:t instanceof g&&t.tilemap===this?t.layerIndex:null},getLayerIndexByName:function(t){return this.getIndex(this.layers,t)},getTileAt:function(t,e,i,n){return null===(n=this.getLayer(n))?null:m.GetTileAt(t,e,i,n)},getTileAtWorldXY:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:m.GetTileAtWorldXY(t,e,i,n,r)},getTileLayerNames:function(){return this.layers&&Array.isArray(this.layers)?this.layers.map((function(t){return t.name})):[]},getTilesWithin:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:m.GetTilesWithin(t,e,i,n,r,s)},getTilesWithinShape:function(t,e,i,n){return null===(n=this.getLayer(n))?null:m.GetTilesWithinShape(t,e,i,n)},getTilesWithinWorldXY:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:m.GetTilesWithinWorldXY(t,e,i,n,r,s,o)},getTileset:function(t){var e=this.getIndex(this.tilesets,t);return null!==e?this.tilesets[e]:null},getTilesetIndex:function(t){return this.getIndex(this.tilesets,t)},hasTileAt:function(t,e,i){return null===(i=this.getLayer(i))?null:m.HasTileAt(t,e,i)},hasTileAtWorldXY:function(t,e,i,n){return null===(n=this.getLayer(n))?null:m.HasTileAtWorldXY(t,e,i,n)},layer:{get:function(){return this.layers[this.currentLayerIndex]},set:function(t){this.setLayer(t)}},putTileAt:function(t,e,i,n,r){return void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:m.PutTileAt(t,e,i,n,r)},putTileAtWorldXY:function(t,e,i,n,r,s){return void 0===n&&(n=!0),null===(s=this.getLayer(s))?null:m.PutTileAtWorldXY(t,e,i,n,r,s)},putTilesAt:function(t,e,i,n,r){return void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:(m.PutTilesAt(t,e,i,n,r),this)},randomize:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:(m.Randomize(t,e,i,n,r,s),this)},calculateFacesAt:function(t,e,i){return null===(i=this.getLayer(i))?null:(m.CalculateFacesAt(t,e,i),this)},calculateFacesWithin:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:(m.CalculateFacesWithin(t,e,i,n,r),this)},removeLayer:function(t){var e=this.getLayerIndex(t);if(null!==e){d(this.layers,e);for(var i=e;i<this.layers.length;i++)this.layers[i].tilemapLayer&&this.layers[i].tilemapLayer.layerIndex--;return this.currentLayerIndex===e&&(this.currentLayerIndex=0),this}return null},destroyLayer:function(t){var e=this.getLayerIndex(t);return null!==e?((t=this.layers[e]).tilemapLayer.destroy(),d(this.layers,e),this.currentLayerIndex===e&&(this.currentLayerIndex=0),this):null},removeAllLayers:function(){for(var t=this.layers,e=0;e<t.length;e++)t[e].tilemapLayer&&t[e].tilemapLayer.destroy(!1);return t.length=0,this.currentLayerIndex=0,this},removeTile:function(t,e,i){void 0===e&&(e=-1),void 0===i&&(i=!0);var n=[];Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var s=t[r];n.push(this.removeTileAt(s.x,s.y,!0,i,s.tilemapLayer)),e>-1&&this.putTileAt(e,s.x,s.y,i,s.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,r){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:m.RemoveTileAt(t,e,i,n,r)},removeTileAtWorldXY:function(t,e,i,n,r,s){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(s=this.getLayer(s))?null:m.RemoveTileAtWorldXY(t,e,i,n,r,s)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===u.ORTHOGONAL&&m.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n<i.length;n++)m.RenderDebug(t,e,i[n]);return this},replaceByIndex:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:(m.ReplaceByIndex(t,e,i,n,r,s,o),this)},setCollision:function(t,e,i,n,r){return void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===r&&(r=!0),null===(n=this.getLayer(n))?null:(m.SetCollision(t,e,i,n,r),this)},setCollisionBetween:function(t,e,i,n,r){return void 0===i&&(i=!0),void 0===n&&(n=!0),null===(r=this.getLayer(r))?null:(m.SetCollisionBetween(t,e,i,n,r),this)},setCollisionByProperty:function(t,e,i,n){return void 0===e&&(e=!0),void 0===i&&(i=!0),null===(n=this.getLayer(n))?null:(m.SetCollisionByProperty(t,e,i,n),this)},setCollisionByExclusion:function(t,e,i,n){return void 0===e&&(e=!0),void 0===i&&(i=!0),null===(n=this.getLayer(n))?null:(m.SetCollisionByExclusion(t,e,i,n),this)},setCollisionFromCollisionGroup:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),null===(i=this.getLayer(i))?null:(m.SetCollisionFromCollisionGroup(t,e,i),this)},setTileIndexCallback:function(t,e,i,n){return null===(n=this.getLayer(n))?null:(m.SetTileIndexCallback(t,e,i,n),this)},setTileLocationCallback:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:(m.SetTileLocationCallback(t,e,i,n,r,s,o),this)},setLayer:function(t){var e=this.getLayerIndex(t);return null!==e&&(this.currentLayerIndex=e),this},setBaseTileSize:function(t,e){this.tileWidth=t,this.tileHeight=e,this.widthInPixels=this.width*t,this.heightInPixels=this.height*e;for(var i=0;i<this.layers.length;i++){this.layers[i].baseTileWidth=t,this.layers[i].baseTileHeight=e;for(var n=this.layers[i].data,r=this.layers[i].width,s=this.layers[i].height,o=0;o<s;o++)for(var a=0;a<r;a++){var h=n[o][a];null!==h&&h.setSize(void 0,void 0,t,e)}}return this},setLayerTileSize:function(t,e,i){if(null===(i=this.getLayer(i)))return this;i.tileWidth=t,i.tileHeight=e;for(var n=i.data,r=i.width,s=i.height,o=0;o<s;o++)for(var a=0;a<r;a++){var h=n[o][a];null!==h&&h.setSize(t,e)}return this},shuffle:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:(m.Shuffle(t,e,i,n,r),this)},swapByIndex:function(t,e,i,n,r,s,o){return null===(o=this.getLayer(o))?null:(m.SwapByIndex(t,e,i,n,r,s,o),this)},tileToWorldX:function(t,e,i){return null===(i=this.getLayer(i))?null:this._convert.TileToWorldX(t,e,i)},tileToWorldY:function(t,e,i){return null===(i=this.getLayer(i))?null:this._convert.TileToWorldY(t,e,i)},tileToWorldXY:function(t,e,i,n,r){return null===(r=this.getLayer(r))?null:this._convert.TileToWorldXY(t,e,i,n,r)},getTileCorners:function(t,e,i,n){return null===(n=this.getLayer(n))?null:this._convert.GetTileCorners(t,e,i,n)},weightedRandomize:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:(m.WeightedRandomize(e,i,n,r,t,s),this)},worldToTileX:function(t,e,i,n){return null===(n=this.getLayer(n))?null:this._convert.WorldToTileX(t,e,i,n)},worldToTileY:function(t,e,i,n){return null===(n=this.getLayer(n))?null:this._convert.WorldToTileY(t,e,i,n)},worldToTileXY:function(t,e,i,n,r,s){return null===(s=this.getLayer(s))?null:this._convert.WorldToTileXY(t,e,i,n,r,s)},destroy:function(){this.removeAllLayers(),this.tiles.length=0,this.tilesets.length=0,this.objects.length=0,this.scene=null}});t.exports=y},45939:(t,e,i)=>{var n=i(44603),r=i(31989);n.register("tilemap",(function(t){var e=void 0!==t?t:{};return r(this.scene,e.key,e.tileWidth,e.tileHeight,e.width,e.height,e.data,e.insertNull)}))},46029:(t,e,i)=>{var n=i(39429),r=i(31989);n.register("tilemap",(function(t,e,i,n,s,o,a){return null===t&&(t=void 0),null===e&&(e=void 0),null===i&&(i=void 0),null===n&&(n=void 0),null===s&&(s=void 0),r(this.scene,t,e,i,n,s,o,a)}))},20442:(t,e,i)=>{var n=i(83419),r=i(78389),s=i(31401),o=i(95643),a=i(81086),h=i(19218),l=i(26099),u=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.PostPipeline,s.Transform,s.Visible,s.ScrollFactor,r,h],initialize:function(t,e,i,n,r,s){o.call(this,t,"TilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=a.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new l,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(r,s),this.setOrigin(0,0),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var s=t[r];if("string"==typeof s&&(s=n.getTileset(s)),s){i.push(s);for(var o=s.firstgid,a=0;a<s.total;a++)e[o+a]=s}}this.gidMap=e,this.tileset=i},setRenderOrder:function(t){return"string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return a.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,r){return a.CreateFromTiles(t,e,i,n,r,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,r,s,o){return a.Copy(t,e,i,n,r,s,o,this.layer),this},fill:function(t,e,i,n,r,s){return a.Fill(t,e,i,n,r,s,this.layer),this},filterTiles:function(t,e,i,n,r,s,o){return a.FilterTiles(t,e,i,n,r,s,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,r,s,o){return a.FindTile(t,e,i,n,r,s,o,this.layer)},forEachTile:function(t,e,i,n,r,s,o){return a.ForEachTile(t,e,i,n,r,s,o,this.layer),this},setTint:function(t,e,i,n,r,s){void 0===t&&(t=16777215);return this.forEachTile((function(e){e.tint=t,e.tintFill=!1}),this,e,i,n,r,s)},setTintFill:function(t,e,i,n,r,s){void 0===t&&(t=16777215);return this.forEachTile((function(e){e.tint=t,e.tintFill=!0}),this,e,i,n,r,s)},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return a.GetTileAtWorldXY(t,e,i,n,this.layer)},getIsoTileAtWorldXY:function(t,e,i,n,r){void 0===i&&(i=!0);var s=this.tempVec;return a.IsometricWorldToTileXY(t,e,!0,s,r,this.layer,i),this.getTileAt(s.x,s.y,n)},getTilesWithin:function(t,e,i,n,r){return a.GetTilesWithin(t,e,i,n,r,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,r,s){return a.GetTilesWithinWorldXY(t,e,i,n,r,s,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return a.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,r){return a.PutTileAtWorldXY(t,e,i,n,r,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,r){return a.Randomize(t,e,i,n,r,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,r){return a.RemoveTileAtWorldXY(t,e,i,n,r,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,r,s){return a.ReplaceByIndex(t,e,i,n,r,s,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,n){return a.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return a.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,r,s){return a.SetTileLocationCallback(t,e,i,n,r,s,this.layer),this},shuffle:function(t,e,i,n){return a.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,r,s){return a.SwapByIndex(t,e,i,n,r,s,this.layer),this},tileToWorldX:function(t,e){return this.tilemap.tileToWorldX(t,e,this)},tileToWorldY:function(t,e){return this.tilemap.tileToWorldY(t,e,this)},tileToWorldXY:function(t,e,i,n){return this.tilemap.tileToWorldXY(t,e,i,n,this)},getTileCorners:function(t,e,i){return this.tilemap.getTileCorners(t,e,i,this)},weightedRandomize:function(t,e,i,n,r){return a.WeightedRandomize(e,i,n,r,t,this.layer),this},worldToTileX:function(t,e,i){return this.tilemap.worldToTileX(t,e,i,this)},worldToTileY:function(t,e,i){return this.tilemap.worldToTileY(t,e,i,this)},worldToTileXY:function(t,e,i,n,r){return this.tilemap.worldToTileXY(t,e,i,n,r,this)},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))}});t.exports=u},16153:(t,e,i)=>{var n=i(61340),r=new n,s=new n,o=new n;t.exports=function(t,e,i,n){var a=e.cull(i),h=a.length,l=i.alpha*e.alpha;if(!(0===h||l<=0)){var u=r,c=s,d=o;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(i.matrix);var p=t.currentContext,f=e.gidMap;p.save(),n?(u.multiplyWithOffset(n,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d),d.copyToContext(p)):(c.e-=i.scrollX*e.scrollFactorX,c.f-=i.scrollY*e.scrollFactorY,c.copyToContext(p)),(!t.antialias||e.scaleX>1||e.scaleY>1)&&(p.imageSmoothingEnabled=!1);for(var m=0;m<h;m++){var g=a[m],v=f[g.index];if(v){var y=v.image.getSourceImage(),x=v.getTileTextureCoordinates(g.index),E=v.tileWidth,T=v.tileHeight;if(null!==x&&0!==E&&0!==T){var _=.5*E,w=.5*T;x.x+=v.tileOffset.x,x.y+=v.tileOffset.y,p.save(),p.translate(g.pixelX+_,g.pixelY+w),0!==g.rotation&&p.rotate(g.rotation),(g.flipX||g.flipY)&&p.scale(g.flipX?-1:1,g.flipY?-1:1),p.globalAlpha=l*g.alpha,p.drawImage(y,x.x,x.y,E,T,-_,-w,E,T),p.restore()}}}p.restore()}}},19218:(t,e,i)=>{var n=i(29747),r=n,s=n;r=i(99558),s=i(16153),t.exports={renderWebGL:r,renderCanvas:s}},99558:(t,e,i)=>{var n=i(70554);t.exports=function(t,e,i){var r=e.cull(i),s=r.length,o=i.alpha*e.alpha;if(!(0===s||o<=0)){var a=e.gidMap,h=t.pipelines.set(e.pipeline,e),l=n.getTintAppendFloatAlpha,u=e.scrollFactorX,c=e.scrollFactorY,d=e.x,p=e.y,f=e.scaleX,m=e.scaleY;t.pipelines.preBatch(e);for(var g=0;g<s;g++){var v=r[g],y=a[v.index];if(y){var x=y.getTileTextureCoordinates(v.index),E=y.tileWidth,T=y.tileHeight;if(x&&0!==E&&0!==T){var _=.5*E,w=.5*T,S=y.glTexture,b=h.setTexture2D(S,e),C=E,A=T,R=x.x,M=x.y,L=y.tileOffset.x,O=y.tileOffset.y,P=l(v.tint,o*v.alpha);h.batchTexture(e,S,S.width,S.height,d+v.pixelX*f+(_*f-L),p+v.pixelY*m+(w*m-O),E,T,f,m,v.rotation,v.flipX,v.flipY,u,c,_,w,R,M,C,A,P,P,P,P,v.tintFill,0,0,i,null,!0,b,!0)}}}t.pipelines.postBatch(e)}}},33629:(t,e,i)=>{var n=i(83419),r=i(26099),s=new n({initialize:function(t,e,i,n,s,o,a,h,l){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a={}),void 0===h&&(h={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=o,this.tileProperties=a,this.tileData=h,this.tileOffset=new r,void 0!==l&&this.tileOffset.set(l.x,l.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t<this.firstgid+this.total},getTileTextureCoordinates:function(t){return this.containsTileIndex(t)?this.texCoordinates[t-this.firstgid]:null},setImage:function(t){this.image=t;var e=t.get(),i=t.getFrameBounds();return this.glTexture=e.source.glTexture,e.width>i.width||e.height>i.height?this.updateTileData(e.width,e.height):this.updateTileData(i.width,i.height,i.x,i.y),this},setTileSize:function(t,e){return void 0!==t&&(this.tileWidth=t),void 0!==e&&(this.tileHeight=e),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(t,e){return void 0!==t&&(this.tileMargin=t),void 0!==e&&(this.tileSpacing=e),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=(e-2*this.tileMargin+this.tileSpacing)/(this.tileHeight+this.tileSpacing),s=(t-2*this.tileMargin+this.tileSpacing)/(this.tileWidth+this.tileSpacing);r%1==0&&s%1==0||console.warn("Image tile area not tile size multiple in: "+this.name),r=Math.floor(r),s=Math.floor(s),this.rows=r,this.columns=s,this.total=r*s,this.texCoordinates.length=0;for(var o=this.tileMargin+i,a=this.tileMargin+n,h=0;h<this.rows;h++){for(var l=0;l<this.columns;l++)this.texCoordinates.push({x:o,y:a}),o+=this.tileWidth+this.tileSpacing;o=this.tileMargin+i,a+=this.tileHeight+this.tileSpacing}return this}});t.exports=s},72023:(t,e,i)=>{var n=i(7423);t.exports=function(t,e,i){var r=n(t,e,!0,i),s=n(t,e-1,!0,i),o=n(t,e+1,!0,i),a=n(t-1,e,!0,i),h=n(t+1,e,!0,i),l=r&&r.collides;return l&&(r.faceTop=!0,r.faceBottom=!0,r.faceLeft=!0,r.faceRight=!0),s&&s.collides&&(l&&(r.faceTop=!1),s.faceBottom=!l),o&&o.collides&&(l&&(r.faceBottom=!1),o.faceTop=!l),a&&a.collides&&(l&&(r.faceLeft=!1),a.faceRight=!l),h&&h.collides&&(l&&(r.faceRight=!1),h.faceLeft=!l),r&&!r.collides&&r.resetFaces(),r}},42573:(t,e,i)=>{var n=i(7423),r=i(7386);t.exports=function(t,e,i,s,o){for(var a=null,h=null,l=null,u=null,c=r(t,e,i,s,null,o),d=0;d<c.length;d++){var p=c[d];p&&(p.collides?(a=n(p.x,p.y-1,!0,o),h=n(p.x,p.y+1,!0,o),l=n(p.x-1,p.y,!0,o),u=n(p.x+1,p.y,!0,o),p.faceTop=!a||!a.collides,p.faceBottom=!h||!h.collides,p.faceLeft=!l||!l.collides,p.faceRight=!u||!u.collides):p.resetFaces())}}},33528:(t,e,i)=>{var n=new(i(26099));t.exports=function(t,e,i,r){var s=i.tilemapLayer,o=s.cullPaddingX,a=s.cullPaddingY,h=s.tilemap.tileToWorldXY(t,e,n,r,s);return h.x>r.worldView.x+s.scaleX*i.tileWidth*(-o-.5)&&h.x<r.worldView.right+s.scaleX*i.tileWidth*(o-.5)&&h.y>r.worldView.y+s.scaleY*i.tileHeight*(-a-1)&&h.y<r.worldView.bottom+s.scaleY*i.tileHeight*(a-.5)}},1785:(t,e,i)=>{var n=i(42573),r=i(7386),s=i(62991),o=i(23029);t.exports=function(t,e,i,a,h,l,u,c){void 0===u&&(u=!0);var d=r(t,e,i,a,null,c),p=[];d.forEach((function(t){var e=new o(t.layer,t.index,t.x,t.y,t.width,t.height,t.baseWidth,t.baseHeight);e.copy(t),p.push(e)}));for(var f=h-t,m=l-e,g=0;g<p.length;g++){var v=p[g],y=v.x+f,x=v.y+m;s(y,x,c)&&c.data[x][y]&&(v.x=y,v.y=x,v.updatePixelXY(),c.data[x][y]=v)}u&&n(h-1,l-1,i+2,a+2,c),d.length=0,p.length=0}},78419:(t,e,i)=>{var n=i(62644),r=i(7386),s=i(27987);t.exports=function(t,e,i,o,a,h){i||(i={}),Array.isArray(t)||(t=[t]);var l=h.tilemapLayer;o||(o=l.scene),a||(a=o.cameras.main);var u,c=h.width,d=h.height,p=r(0,0,c,d,null,h),f=[],m=function(t,e,i){for(var n=0;n<i.length;n++){var r=i[n];t.hasOwnProperty(r)||(t[r]=e[r])}};for(u=0;u<p.length;u++){var g=p[u],v=n(i);if(-1!==t.indexOf(g.index)){var y=l.tileToWorldXY(g.x,g.y,void 0,a,h);v.x=y.x,v.y=y.y,m(v,g,["rotation","flipX","flipY","alpha","visible","tint"]),v.hasOwnProperty("origin")||(v.x+=.5*g.width,v.y+=.5*g.height),v.hasOwnProperty("useSpriteSheet")&&(v.key=g.tileset.image,v.frame=g.index-1),f.push(o.make.sprite(v))}}if(Array.isArray(e))for(u=0;u<t.length;u++)s(t[u],e[u],0,0,c,d,h);else if(null!==e)for(u=0;u<t.length;u++)s(t[u],e,0,0,c,d,h);return f}},19545:(t,e,i)=>{var n=i(87841),r=i(63448),s=i(56583),o=new n;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,n=t.tilemapLayer,a=Math.floor(i.tileWidth*n.scaleX),h=Math.floor(i.tileHeight*n.scaleY),l=s(e.worldView.x-n.x,a,0,!0)-n.cullPaddingX,u=r(e.worldView.right-n.x,a,0,!0)+n.cullPaddingX,c=s(e.worldView.y-n.y,h,0,!0)-n.cullPaddingY,d=r(e.worldView.bottom-n.y,h,0,!0)+n.cullPaddingY;return o.setTo(l,c,u-l,d-c)}},30003:(t,e,i)=>{var n=i(19545),r=i(32483);t.exports=function(t,e,i,s){void 0===i&&(i=[]),void 0===s&&(s=0),i.length=0;var o=t.tilemapLayer,a=n(t,e);return(o.skipCull||1!==o.scrollFactorX||1!==o.scrollFactorY)&&(a.left=0,a.right=t.width,a.top=0,a.bottom=t.height),r(t,a,s,i),i}},35137:(t,e,i)=>{var n=i(7386),r=i(42573),s=i(20576);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=n(e,i,o,a,null,l),d=0;d<c.length;d++)c[d].index=t,s(c[d],u);h&&r(e-1,i-1,o+2,a+2,l)}},40253:(t,e,i)=>{var n=i(7386);t.exports=function(t,e,i,r,s,o,a,h){return n(i,r,s,o,a,h).filter(t,e)}},52692:t=>{t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=!1);var r,s,o,a=0;if(i){for(s=n.height-1;s>=0;s--)for(r=n.width-1;r>=0;r--)if((o=n.data[s][r])&&o.index===t){if(a===e)return o;a+=1}}else for(s=0;s<n.height;s++)for(r=0;r<n.width;r++)if((o=n.data[s][r])&&o.index===t){if(a===e)return o;a+=1}return null}},66151:(t,e,i)=>{var n=i(7386);t.exports=function(t,e,i,r,s,o,a,h){return n(i,r,s,o,a,h).find(t,e)||null}},97560:(t,e,i)=>{var n=i(7386);t.exports=function(t,e,i,r,s,o,a,h){n(i,r,s,o,a,h).forEach(t,e)}},43305:(t,e,i)=>{var n=i(91907),r=i(30003),s=i(9474),o=i(14018),a=i(29747),h=i(54503);t.exports=function(t){return t===n.ORTHOGONAL?r:t===n.HEXAGONAL?s:t===n.STAGGERED?h:t===n.ISOMETRIC?o:a}},7423:(t,e,i)=>{var n=i(62991);t.exports=function(t,e,i,r){if(void 0===i&&(i=!1),n(t,e,r)){var s=r.data[e][t]||null;return s?-1===s.index?i?s:null:s:null}return null}},60540:(t,e,i)=>{var n=i(7423),r=new(i(26099));t.exports=function(t,e,i,s,o){return o.tilemapLayer.worldToTileXY(t,e,!0,r,s),n(r.x,r.y,i,o)}},55826:(t,e,i)=>{var n=i(26099);t.exports=function(t,e,i,r){var s=r.baseTileWidth,o=r.baseTileHeight,a=r.tilemapLayer,h=0,l=0;a&&(i||(i=a.scene.cameras.main),h=a.x+i.scrollX*(1-a.scrollFactorX),l=a.y+i.scrollY*(1-a.scrollFactorY),s*=a.scaleX,o*=a.scaleY);var u=h+t*s,c=l+e*o;return[new n(u,c),new n(u+s,c),new n(u+s,c+o),new n(u,c+o)]}},11758:(t,e,i)=>{var n=i(91907),r=i(27229),s=i(29747),o=i(55826);t.exports=function(t){return t===n.ORTHOGONAL?o:t===n.ISOMETRIC?s:t===n.HEXAGONAL?r:(n.STAGGERED,s)}},39167:(t,e,i)=>{var n=i(91907),r=i(29747),s=i(97281);t.exports=function(t){return t===n.ORTHOGONAL?s:r}},62e3:(t,e,i)=>{var n=i(91907),r=i(19951),s=i(14127),o=i(29747),a=i(97202),h=i(70326);t.exports=function(t){return t===n.ORTHOGONAL?h:t===n.ISOMETRIC?s:t===n.HEXAGONAL?r:t===n.STAGGERED?a:o}},5984:(t,e,i)=>{var n=i(91907),r=i(29747),s=i(28054),o=i(29650);t.exports=function(t){return t===n.ORTHOGONAL?o:t===n.STAGGERED?s:r}},7386:(t,e,i)=>{var n=i(95540);t.exports=function(t,e,i,r,s,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===r&&(r=o.height),s||(s={});var a=n(s,"isNotEmpty",!1),h=n(s,"isColliding",!1),l=n(s,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(r+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+r>o.height&&(r=Math.max(o.height-e,0));for(var u=[],c=e;c<e+r;c++)for(var d=t;d<t+i;d++){var p=o.data[c][d];if(null!==p){if(a&&-1===p.index)continue;if(h&&!p.collides)continue;if(l&&!p.hasInterestingFace)continue;u.push(p)}}return u}},91141:(t,e,i)=>{var n=i(55738),r=i(7386),s=i(91865),o=i(29747),a=i(26099),h=function(t,e){return s.RectangleToTriangle(e,t)},l=new a,u=new a,c=new a;t.exports=function(t,e,i,a){if(void 0===t)return[];var d=o;t instanceof n.Circle?d=s.CircleToRectangle:t instanceof n.Rectangle?d=s.RectangleToRectangle:t instanceof n.Triangle?d=h:t instanceof n.Line&&(d=s.LineToRectangle),a.tilemapLayer.worldToTileXY(t.left,t.top,!0,u,i);var p=u.x,f=u.y;a.tilemapLayer.worldToTileXY(t.right,t.bottom,!1,c,i);var m=Math.ceil(c.x),g=Math.ceil(c.y),v=Math.max(m-p,1),y=Math.max(g-f,1),x=r(p,f,v,y,e,a),E=a.tileWidth,T=a.tileHeight;a.tilemapLayer&&(E*=a.tilemapLayer.scaleX,T*=a.tilemapLayer.scaleY);for(var _=[],w=new n.Rectangle(0,0,E,T),S=0;S<x.length;S++){var b=x[S];a.tilemapLayer.tileToWorldXY(b.x,b.y,l,i),w.x=l.x,w.y=l.y,d(t,w)&&_.push(b)}return _}},96523:(t,e,i)=>{var n=i(7386),r=i(26099),s=new r,o=new r;t.exports=function(t,e,i,r,a,h,l){var u=l.tilemapLayer.tilemap._convert.WorldToTileXY;u(t,e,!0,s,h,l);var c=s.x,d=s.y;u(t+i,e+r,!1,o,h,l);var p=Math.ceil(o.x),f=Math.ceil(o.y);return n(c,d,p-c,f-d,a,l)}},96113:(t,e,i)=>{var n=i(91907),r=i(20242),s=i(10095);t.exports=function(t){return t===n.ORTHOGONAL?s:r}},16926:(t,e,i)=>{var n=i(91907),r=i(86625),s=i(96897),o=i(29747),a=i(15108),h=i(85896);t.exports=function(t){return t===n.ORTHOGONAL?h:t===n.ISOMETRIC?s:t===n.HEXAGONAL?r:t===n.STAGGERED?a:o}},55762:(t,e,i)=>{var n=i(91907),r=i(20242),s=i(51900),o=i(63288);t.exports=function(t){return t===n.ORTHOGONAL?o:t===n.STAGGERED?s:r}},45091:(t,e,i)=>{var n=i(62991);t.exports=function(t,e,i){if(n(t,e,i)){var r=i.data[e][t];return null!==r&&r.index>-1}return!1}},24152:(t,e,i)=>{var n=i(45091),r=new(i(26099));t.exports=function(t,e,i,s){s.tilemapLayer.worldToTileXY(t,e,!0,r,i);var o=r.x,a=r.y;return n(o,a,s)}},90454:(t,e,i)=>{var n=i(63448),r=i(56583);t.exports=function(t,e){var i,s,o,a,h=t.tilemapLayer.tilemap,l=t.tilemapLayer,u=Math.floor(h.tileWidth*l.scaleX),c=Math.floor(h.tileHeight*l.scaleY),d=t.hexSideLength;if("y"===t.staggerAxis){var p=(c-d)/2+d;i=r(e.worldView.x-l.x,u,0,!0)-l.cullPaddingX,s=n(e.worldView.right-l.x,u,0,!0)+l.cullPaddingX,o=r(e.worldView.y-l.y,p,0,!0)-l.cullPaddingY,a=n(e.worldView.bottom-l.y,p,0,!0)+l.cullPaddingY}else{var f=(u-d)/2+d;i=r(e.worldView.x-l.x,f,0,!0)-l.cullPaddingX,s=n(e.worldView.right-l.x,f,0,!0)+l.cullPaddingX,o=r(e.worldView.y-l.y,c,0,!0)-l.cullPaddingY,a=n(e.worldView.bottom-l.y,c,0,!0)+l.cullPaddingY}return{left:i,right:s,top:o,bottom:a}}},9474:(t,e,i)=>{var n=i(90454),r=i(32483);t.exports=function(t,e,i,s){void 0===i&&(i=[]),void 0===s&&(s=0),i.length=0;var o=t.tilemapLayer,a=n(t,e);return o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY&&(a.left=0,a.right=t.width,a.top=0,a.bottom=t.height),r(t,a,s,i),i}},27229:(t,e,i)=>{var n=i(19951),r=i(26099),s=new r;t.exports=function(t,e,i,o){var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(a*=l.scaleX,h*=l.scaleY);var u,c,d=n(t,e,s,i,o),p=[],f=.5773502691896257;"y"===o.staggerAxis?(u=f*a,c=h/2):(u=a/2,c=f*h);for(var m=0;m<6;m++){var g=2*Math.PI*(.5-m)/6;p.push(new r(d.x+u*Math.cos(g),d.y+c*Math.sin(g)))}return p}},19951:(t,e,i)=>{var n=i(26099);t.exports=function(t,e,i,r,s){i||(i=new n);var o=s.baseTileWidth,a=s.baseTileHeight,h=s.tilemapLayer,l=0,u=0;h&&(r||(r=h.scene.cameras.main),l=h.x+r.scrollX*(1-h.scrollFactorX),u=h.y+r.scrollY*(1-h.scrollFactorY),o*=h.scaleX,a*=h.scaleY);var c,d,p=o/2,f=a/2;return"y"===s.staggerAxis?(c=l+o*t+o,d=u+1.5*e*f+f,e%2==0&&("odd"===this.staggerIndex?c-=p:c+=p)):"x"===this.staggerAxis&&"odd"===this.staggerIndex&&(c=l+1.5*t*p+p,d=u+a*t+a,t%2==0&&("odd"===this.staggerIndex?d-=f:d+=f)),i.set(c,d)}},86625:(t,e,i)=>{var n=i(26099);t.exports=function(t,e,i,r,s,o){r||(r=new n);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(s||(s=l.scene.cameras.main),t-=l.x+s.scrollX*(1-l.scrollFactorX),e-=l.y+s.scrollY*(1-l.scrollFactorY),a*=l.scaleX,h*=l.scaleY);var u,c,d,p,f,m=.5773502691896257,g=-.3333333333333333,v=.6666666666666666,y=a/2,x=h/2;"y"===o.staggerAxis?(d=m*(u=(t-y)/(m*a))+g*(c=(e-x)/x),p=0*u+v*c):(d=g*(u=(t-y)/y)+m*(c=(e-x)/(m*h)),p=v*u+0*c),f=-d-p;var E,T=Math.round(d),_=Math.round(p),w=Math.round(f),S=Math.abs(T-d),b=Math.abs(_-p),C=Math.abs(w-f);S>b&&S>C?T=-_-w:b>C&&(_=-T-w);var A=_;return E="odd"===o.staggerIndex?A%2==0?_/2+T:_/2+T-.5:A%2==0?_/2+T:_/2+T+.5,r.set(E,A)}},62991:t=>{t.exports=function(t,e,i){return t>=0&&t<i.width&&e>=0&&e<i.height}},14018:(t,e,i)=>{var n=i(33528);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var s,o,a,h=t.tilemapLayer,l=t.data,u=t.width,c=t.height,d=h.skipCull,p=u,f=c;if(0===r)for(o=0;o<f;o++)for(s=0;s<p;s++)(a=l[o][s])&&-1!==a.index&&a.visible&&0!==a.alpha&&(d||n(s,o,t,e))&&i.push(a);else if(1===r)for(o=0;o<f;o++)for(s=p;s>=0;s--)(a=l[o][s])&&-1!==a.index&&a.visible&&0!==a.alpha&&(d||n(s,o,t,e))&&i.push(a);else if(2===r)for(o=f;o>=0;o--)for(s=0;s<p;s++)(a=l[o][s])&&-1!==a.index&&a.visible&&0!==a.alpha&&(d||n(s,o,t,e))&&i.push(a);else if(3===r)for(o=f;o>=0;o--)for(s=p;s>=0;s--)(a=l[o][s])&&-1!==a.index&&a.visible&&0!==a.alpha&&(d||n(s,o,t,e))&&i.push(a);return h.tilesDrawn=i.length,h.tilesTotal=u*c,i}},14127:(t,e,i)=>{var n=i(26099);t.exports=function(t,e,i,r,s){i||(i=new n);var o=s.baseTileWidth,a=s.baseTileHeight,h=s.tilemapLayer,l=0,u=0;h&&(r||(r=h.scene.cameras.main),l=h.x+r.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+r.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+o/2*(t-e),d=u+(t+e)*(a/2);return i.set(c,d)}},96897:(t,e,i)=>{var n=i(26099);t.exports=function(t,e,i,r,s,o,a){r||(r=new n);var h=o.baseTileWidth,l=o.baseTileHeight,u=o.tilemapLayer;u&&(s||(s=u.scene.cameras.main),e-=u.y+s.scrollY*(1-u.scrollFactorY),l*=u.scaleY,t-=u.x+s.scrollX*(1-u.scrollFactorX),h*=u.scaleX);var c=h/2,d=l/2;a||(e-=l);var p=.5*((t-=c)/c+e/d),f=.5*(-t/c+e/d);return i&&(p=Math.floor(p),f=Math.floor(f)),r.set(p,f)}},71558:(t,e,i)=>{var n=i(23029),r=i(62991),s=i(72023),o=i(20576);t.exports=function(t,e,i,a,h){if(void 0===a&&(a=!0),!r(e,i,h))return null;var l,u=h.data[i][e],c=u&&u.collides;t instanceof n?(null===h.data[i][e]&&(h.data[i][e]=new n(h,t.index,e,i,h.tileWidth,h.tileHeight)),h.data[i][e].copy(t)):(l=t,null===h.data[i][e]?h.data[i][e]=new n(h,l,e,i,h.tileWidth,h.tileHeight):h.data[i][e].index=l);var d=h.data[i][e],p=-1!==h.collideIndexes.indexOf(d.index);if(-1===(l=t instanceof n?t.index:t))d.width=h.tileWidth,d.height=h.tileHeight;else{var f=h.tilemapLayer.tilemap,m=f.tiles[l][2],g=f.tilesets[m];d.width=g.tileWidth,d.height=g.tileHeight}return o(d,p),a&&c!==d.collides&&s(e,i,h),d}},26303:(t,e,i)=>{var n=i(71558),r=new(i(26099));t.exports=function(t,e,i,s,o,a){return a.tilemapLayer.worldToTileXY(e,i,!0,r,o,a),n(t,r.x,r.y,s,a)}},14051:(t,e,i)=>{var n=i(42573),r=i(71558);t.exports=function(t,e,i,s,o){if(void 0===s&&(s=!0),!Array.isArray(t))return null;Array.isArray(t[0])||(t=[t]);for(var a=t.length,h=t[0].length,l=0;l<a;l++)for(var u=0;u<h;u++){var c=t[l][u];r(c,e+u,i+l,!1,o)}s&&n(e-1,i-1,h+2,a+2,o)}},77389:(t,e,i)=>{var n=i(7386),r=i(26546);t.exports=function(t,e,i,s,o,a){var h,l=n(t,e,i,s,{},a);if(!o)for(o=[],h=0;h<l.length;h++)-1===o.indexOf(l[h].index)&&o.push(l[h].index);for(h=0;h<l.length;h++)l[h].index=r(o)}},63557:(t,e,i)=>{var n=i(23029),r=i(62991),s=i(72023);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!0),void 0===o&&(o=!0),!r(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,a.tileWidth,a.tileHeight),o&&h&&h.collides&&s(t,e,a),h):null}},94178:(t,e,i)=>{var n=i(63557),r=new(i(26099));t.exports=function(t,e,i,s,o,a){return a.tilemapLayer.worldToTileXY(t,e,!0,r,o,a),n(r.x,r.y,i,s,a)}},15533:(t,e,i)=>{var n=i(7386),r=i(3956),s=new r(105,210,231,150),o=new r(243,134,48,200),a=new r(40,39,37,150);t.exports=function(t,e,i){void 0===e&&(e={});var r=void 0!==e.tileColor?e.tileColor:s,h=void 0!==e.collidingTileColor?e.collidingTileColor:o,l=void 0!==e.faceColor?e.faceColor:a,u=n(0,0,i.width,i.height,null,i);t.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),t.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var c=0;c<u.length;c++){var d=u[c],p=d.width,f=d.height,m=d.pixelX,g=d.pixelY,v=d.collides?h:r;null!==v&&(t.fillStyle(v.color,v.alpha/255),t.fillRect(m,g,p,f)),m+=1,g+=1,p-=2,f-=2,null!==l&&(t.lineStyle(1,l.color,l.alpha/255),d.faceTop&&t.lineBetween(m,g,m+p,g),d.faceRight&&t.lineBetween(m+p,g,m+p,g+f),d.faceBottom&&t.lineBetween(m,g+f,m+p,g+f),d.faceLeft&&t.lineBetween(m,g,m,g+f))}}},27987:(t,e,i)=>{var n=i(7386);t.exports=function(t,e,i,r,s,o,a){for(var h=n(i,r,s,o,null,a),l=0;l<h.length;l++)h[l]&&h[l].index===t&&(h[l].index=e)}},32483:t=>{t.exports=function(t,e,i,n){var r,s,o,a=t.data,h=t.width,l=t.height,u=t.tilemapLayer,c=Math.max(0,e.left),d=Math.min(h,e.right),p=Math.max(0,e.top),f=Math.min(l,e.bottom);if(0===i)for(s=p;s<f;s++)for(r=c;a[s]&&r<d;r++)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(1===i)for(s=p;s<f;s++)for(r=d;a[s]&&r>=c;r--)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(2===i)for(s=f;s>=p;s--)for(r=c;a[s]&&r<d;r++)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);else if(3===i)for(s=f;s>=p;s--)for(r=d;a[s]&&r>=c;r--)(o=a[s][r])&&-1!==o.index&&o.visible&&0!==o.alpha&&n.push(o);return u.tilesDrawn=n.length,u.tilesTotal=h*l,n}},57068:(t,e,i)=>{var n=i(20576),r=i(42573),s=i(9589);t.exports=function(t,e,i,o,a){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===a&&(a=!0),Array.isArray(t)||(t=[t]);for(var h=0;h<t.length;h++)s(t[h],e,o);if(a)for(var l=0;l<o.height;l++)for(var u=0;u<o.width;u++){var c=o.data[l][u];c&&-1!==t.indexOf(c.index)&&n(c,e)}i&&r(0,0,o.width,o.height,o)}},37266:(t,e,i)=>{var n=i(20576),r=i(42573),s=i(9589);t.exports=function(t,e,i,o,a,h){if(void 0===i&&(i=!0),void 0===o&&(o=!0),void 0===h&&(h=!0),!(t>e)){for(var l=t;l<=e;l++)s(l,i,a);if(h)for(var u=0;u<a.height;u++)for(var c=0;c<a.width;c++){var d=a.data[u][c];d&&d.index>=t&&d.index<=e&&n(d,i)}o&&r(0,0,a.width,a.height,a)}}},75661:(t,e,i)=>{var n=i(20576),r=i(42573),s=i(9589);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a<o.height;a++)for(var h=0;h<o.width;h++){var l=o.data[a][h];l&&-1===t.indexOf(l.index)&&(n(l,e),s(l.index,e,o))}i&&r(0,0,o.width,o.height,o)}},64740:(t,e,i)=>{var n=i(20576),r=i(42573),s=i(97022);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;a<o.height;a++)for(var h=0;h<o.width;h++){var l=o.data[a][h];if(l)for(var u in t)if(s(l.properties,u)){var c=t[u];Array.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++)l.properties[u]===c[d]&&n(l,e)}}i&&r(0,0,o.width,o.height,o)}},63307:(t,e,i)=>{var n=i(20576),r=i(42573);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var s=0;s<i.height;s++)for(var o=0;o<i.width;o++){var a=i.data[s][o];if(a){var h=a.getCollisionGroup();h&&h.objects&&h.objects.length>0&&n(a,t)}}e&&r(0,0,i.width,i.height,i)}},9589:t=>{t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},20576:t=>{t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},79583:t=>{t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var r=0,s=t.length;r<s;r++)n.callbacks[t[r]]=null!==e?{callback:e,callbackContext:i}:void 0}},93254:(t,e,i)=>{var n=i(7386);t.exports=function(t,e,i,r,s,o,a){for(var h=n(t,e,i,r,null,a),l=0;l<h.length;l++)h[l].setCollisionCallback(s,o)}},32903:(t,e,i)=>{var n=i(7386),r=i(33680);t.exports=function(t,e,i,s,o){var a=n(t,e,i,s,null,o),h=a.map((function(t){return t.index}));r(h);for(var l=0;l<a.length;l++)a[l].index=h[l]}},61325:(t,e,i)=>{var n=i(63448),r=i(56583);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,s=t.tilemapLayer,o=Math.floor(i.tileWidth*s.scaleX),a=Math.floor(i.tileHeight*s.scaleY);return{left:r(e.worldView.x-s.x,o,0,!0)-s.cullPaddingX,right:n(e.worldView.right-s.x,o,0,!0)+s.cullPaddingX,top:r(e.worldView.y-s.y,a/2,0,!0)-s.cullPaddingY,bottom:n(e.worldView.bottom-s.y,a/2,0,!0)+s.cullPaddingY}}},54503:(t,e,i)=>{var n=i(61325),r=i(32483);t.exports=function(t,e,i,s){void 0===i&&(i=[]),void 0===s&&(s=0),i.length=0;var o=t.tilemapLayer,a=n(t,e);return o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY&&(a.left=0,a.right=t.width,a.top=0,a.bottom=t.height),r(t,a,s,i),i}},97202:(t,e,i)=>{var n=i(26099);t.exports=function(t,e,i,r,s){i||(i=new n);var o=s.baseTileWidth,a=s.baseTileHeight,h=s.tilemapLayer,l=0,u=0;h&&(r||(r=h.scene.cameras.main),l=h.x+r.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+r.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+t*o+e%2*(o/2),d=u+e*(a/2);return i.set(c,d)}},28054:t=>{t.exports=function(t,e,i){var n=i.baseTileHeight,r=i.tilemapLayer,s=0;return r&&(void 0===e&&(e=r.scene.cameras.main),s=r.y+e.scrollY*(1-r.scrollFactorY),n*=r.scaleY),s+t*(n/2)+n}},15108:(t,e,i)=>{var n=i(26099);t.exports=function(t,e,i,r,s,o){r||(r=new n);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(s||(s=l.scene.cameras.main),e-=l.y+s.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+s.scrollX*(1-l.scrollFactorX),a*=l.scaleX);var u=i?Math.floor(e/(h/2)):e/(h/2),c=i?Math.floor((t+u%2*.5*a)/a):(t+u%2*.5*a)/a;return r.set(c,u)}},51900:t=>{t.exports=function(t,e,i,n){var r=n.baseTileHeight,s=n.tilemapLayer;return s&&(i||(i=s.scene.cameras.main),t-=s.y+i.scrollY*(1-s.scrollFactorY),r*=s.scaleY),e?Math.floor(t/(r/2)):t/(r/2)}},86560:(t,e,i)=>{var n=i(7386);t.exports=function(t,e,i,r,s,o,a){for(var h=n(i,r,s,o,null,a),l=0;l<h.length;l++)h[l]&&(h[l].index===t?h[l].index=e:h[l].index===e&&(h[l].index=t))}},97281:t=>{t.exports=function(t,e,i){var n=i.baseTileWidth,r=i.tilemapLayer,s=0;return r&&(e||(e=r.scene.cameras.main),s=r.x+e.scrollX*(1-r.scrollFactorX),n*=r.scaleX),s+t*n}},70326:(t,e,i)=>{var n=i(97281),r=i(29650),s=i(26099);t.exports=function(t,e,i,o,a){return i||(i=new s(0,0)),i.x=n(t,o,a),i.y=r(e,o,a),i}},29650:t=>{t.exports=function(t,e,i){var n=i.baseTileHeight,r=i.tilemapLayer,s=0;return r&&(e||(e=r.scene.cameras.main),s=r.y+e.scrollY*(1-r.scrollFactorY),n*=r.scaleY),s+t*n}},77366:(t,e,i)=>{var n=i(7386),r=i(75508);t.exports=function(t,e,i,s,o,a){if(o){var h,l=n(t,e,i,s,null,a),u=0;for(h=0;h<o.length;h++)u+=o[h].weight;if(!(u<=0))for(h=0;h<l.length;h++){for(var c=r.RND.frac()*u,d=0,p=-1,f=0;f<o.length;f++)if(c<=(d+=o[f].weight)){var m=o[f].index;p=Array.isArray(m)?m[Math.floor(r.RND.frac()*m.length)]:m;break}l[h].index=p}}}},10095:(t,e,i)=>{var n=i(85896),r=new(i(26099));t.exports=function(t,e,i,s){return n(t,0,e,r,i,s),r.x}},85896:(t,e,i)=>{var n=i(26099);t.exports=function(t,e,i,r,s,o){void 0===i&&(i=!0),r||(r=new n);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(s||(s=l.scene.cameras.main),t-=l.x+s.scrollX*(1-l.scrollFactorX),e-=l.y+s.scrollY*(1-l.scrollFactorY),a*=l.scaleX,h*=l.scaleY);var u=t/a,c=e/h;return i&&(u=Math.floor(u),c=Math.floor(c)),r.set(u,c)}},63288:(t,e,i)=>{var n=i(85896),r=new(i(26099));t.exports=function(t,e,i,s){return n(0,t,e,r,i,s),r.y}},81086:(t,e,i)=>{t.exports={CalculateFacesAt:i(72023),CalculateFacesWithin:i(42573),CheckIsoBounds:i(33528),Copy:i(1785),CreateFromTiles:i(78419),CullBounds:i(19545),CullTiles:i(30003),Fill:i(35137),FilterTiles:i(40253),FindByIndex:i(52692),FindTile:i(66151),ForEachTile:i(97560),GetCullTilesFunction:i(43305),GetTileAt:i(7423),GetTileAtWorldXY:i(60540),GetTileCorners:i(55826),GetTileCornersFunction:i(11758),GetTilesWithin:i(7386),GetTilesWithinShape:i(91141),GetTilesWithinWorldXY:i(96523),GetTileToWorldXFunction:i(39167),GetTileToWorldXYFunction:i(62e3),GetTileToWorldYFunction:i(5984),GetWorldToTileXFunction:i(96113),GetWorldToTileXYFunction:i(16926),GetWorldToTileYFunction:i(55762),HasTileAt:i(45091),HasTileAtWorldXY:i(24152),HexagonalCullBounds:i(90454),HexagonalCullTiles:i(9474),HexagonalGetTileCorners:i(27229),HexagonalTileToWorldXY:i(19951),HexagonalWorldToTileXY:i(86625),IsInLayerBounds:i(62991),IsometricCullTiles:i(14018),IsometricTileToWorldXY:i(14127),IsometricWorldToTileXY:i(96897),PutTileAt:i(71558),PutTileAtWorldXY:i(26303),PutTilesAt:i(14051),Randomize:i(77389),RemoveTileAt:i(63557),RemoveTileAtWorldXY:i(94178),RenderDebug:i(15533),ReplaceByIndex:i(27987),RunCull:i(32483),SetCollision:i(57068),SetCollisionBetween:i(37266),SetCollisionByExclusion:i(75661),SetCollisionByProperty:i(64740),SetCollisionFromCollisionGroup:i(63307),SetLayerCollisionIndex:i(9589),SetTileCollision:i(20576),SetTileIndexCallback:i(79583),SetTileLocationCallback:i(93254),Shuffle:i(32903),StaggeredCullBounds:i(61325),StaggeredCullTiles:i(54503),StaggeredTileToWorldXY:i(97202),StaggeredTileToWorldY:i(28054),StaggeredWorldToTileXY:i(15108),StaggeredWorldToTileY:i(51900),SwapByIndex:i(86560),TileToWorldX:i(97281),TileToWorldXY:i(70326),TileToWorldY:i(29650),WeightedRandomize:i(77366),WorldToTileX:i(10095),WorldToTileXY:i(85896),WorldToTileY:i(63288)}},91907:t=>{t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(t,e,i)=>{var n={ORIENTATION:i(91907)};t.exports=n},62501:(t,e,i)=>{var n=i(79291),r=i(21829),s={Components:i(81086),Parsers:i(57442),Formats:i(80341),ImageCollection:i(16536),ParseToTilemap:i(31989),Tile:i(23029),Tilemap:i(49075),TilemapCreator:i(45939),TilemapFactory:i(46029),Tileset:i(33629),TilemapLayer:i(20442),Orientation:i(91907),LayerData:i(14977),MapData:i(87010),ObjectLayer:i(48700)};s=n(!1,s,r.ORIENTATION),t.exports=s},14977:(t,e,i)=>{var n=i(83419),r=i(91907),s=i(95540),o=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","layer"),this.id=s(t,"id",0),this.x=s(t,"x",0),this.y=s(t,"y",0),this.width=s(t,"width",0),this.height=s(t,"height",0),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.baseTileWidth=s(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=s(t,"baseTileHeight",this.tileHeight),this.orientation=s(t,"orientation",r.ORTHOGONAL),this.widthInPixels=s(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=s(t,"alpha",1),this.visible=s(t,"visible",!0),this.properties=s(t,"properties",[]),this.indexes=s(t,"indexes",[]),this.collideIndexes=s(t,"collideIndexes",[]),this.callbacks=s(t,"callbacks",[]),this.bodies=s(t,"bodies",[]),this.data=s(t,"data",[]),this.tilemapLayer=s(t,"tilemapLayer",null),this.hexSideLength=s(t,"hexSideLength",0),this.staggerAxis=s(t,"staggerAxis","y"),this.staggerIndex=s(t,"staggerIndex","odd")}});t.exports=o},87010:(t,e,i)=>{var n=i(83419),r=i(91907),s=i(95540),o=new n({initialize:function(t){void 0===t&&(t={}),this.name=s(t,"name","map"),this.width=s(t,"width",0),this.height=s(t,"height",0),this.infinite=s(t,"infinite",!1),this.tileWidth=s(t,"tileWidth",0),this.tileHeight=s(t,"tileHeight",0),this.widthInPixels=s(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=s(t,"heightInPixels",this.height*this.tileHeight),this.format=s(t,"format",null),this.orientation=s(t,"orientation",r.ORTHOGONAL),this.renderOrder=s(t,"renderOrder","right-down"),this.version=s(t,"version","1"),this.properties=s(t,"properties",{}),this.layers=s(t,"layers",[]),this.images=s(t,"images",[]),this.objects=s(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=s(t,"collision",{}),this.tilesets=s(t,"tilesets",[]),this.imageCollections=s(t,"imageCollections",[]),this.tiles=s(t,"tiles",[]),this.hexSideLength=s(t,"hexSideLength",0),this.staggerAxis=s(t,"staggerAxis","y"),this.staggerIndex=s(t,"staggerIndex","odd")}});t.exports=o},48700:(t,e,i)=>{var n=i(83419),r=i(95540),s=new n({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","object layer"),this.id=r(t,"id",0),this.opacity=r(t,"opacity",1),this.properties=r(t,"properties",{}),this.propertyTypes=r(t,"propertytypes",{}),this.type=r(t,"type","objectgroup"),this.visible=r(t,"visible",!0),this.objects=r(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});t.exports=s},6641:(t,e,i)=>{var n=i(91907);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?n.ISOMETRIC:"staggered"===t?n.STAGGERED:"hexagonal"===t?n.HEXAGONAL:n.ORTHOGONAL}},46177:(t,e,i)=>{var n=i(80341),r=i(2342),s=i(82593),o=i(46594),a=i(87021);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=r(t,i,h,l,u);break;case n.CSV:c=s(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},2342:(t,e,i)=>{var n=i(80341),r=i(14977),s=i(87010),o=i(23029);t.exports=function(t,e,i,a,h){for(var l=new r({tileWidth:i,tileHeight:a}),u=new s({name:t,tileWidth:i,tileHeight:a,format:n.ARRAY_2D,layers:[l]}),c=[],d=e.length,p=0,f=0;f<e.length;f++){c[f]=[];for(var m=e[f],g=0;g<m.length;g++){var v=parseInt(m[g],10);isNaN(v)||-1===v?c[f][g]=h?null:new o(l,-1,g,f,i,a):c[f][g]=new o(l,v,g,f,i,a)}0===p&&(p=m.length)}return u.width=l.width=p,u.height=l.height=d,u.widthInPixels=l.widthInPixels=p*i,u.heightInPixels=l.heightInPixels=d*a,l.data=c,u}},82593:(t,e,i)=>{var n=i(80341),r=i(2342);t.exports=function(t,e,i,s,o){var a=e.trim().split("\n").map((function(t){return t.split(",")})),h=r(t,a,i,s,o);return h.format=n.CSV,h}},6656:(t,e,i)=>{var n=i(14977),r=i(23029);t.exports=function(t,e){for(var i=[],s=0;s<t.layer.length;s++){for(var o=t.layer[s],a=new n({name:o.name,width:o.width,height:o.height,tileWidth:o.tilesize,tileHeight:o.tilesize,visible:1===o.visible}),h=[],l=[],u=0;u<o.data.length;u++){for(var c=0;c<o.data[u].length;c++){var d,p=o.data[u][c]-1;d=p>-1?new r(a,p,c,u,o.tilesize,o.tilesize):e?null:new r(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},96483:(t,e,i)=>{var n=i(33629);t.exports=function(t){for(var e=[],i=[],r=0;r<t.layer.length;r++){var s=t.layer[r],o=s.tilesetName;""!==o&&-1===i.indexOf(o)&&(i.push(o),e.push(new n(o,0,s.tilesize,s.tilesize,0,0)))}return e}},87021:(t,e,i)=>{var n=i(80341),r=i(87010),s=i(6656),o=i(96483);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var a=0,h=0,l=0;l<e.layer.length;l++)e.layer[l].width>a&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new r({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=s(e,i),u.tilesets=o(e),u}},52833:(t,e,i)=>{t.exports={ParseTileLayers:i(6656),ParseTilesets:i(96483),ParseWeltmeister:i(87021)}},57442:(t,e,i)=>{t.exports={FromOrientationString:i(6641),Parse:i(46177),Parse2DArray:i(2342),ParseCSV:i(82593),Impact:i(52833),Tiled:i(96761)}},51233:(t,e,i)=>{var n=i(79291);t.exports=function(t){for(var e,i,r,s,o,a=0;a<t.layers.length;a++){e=t.layers[a],s=null;for(var h=0;h<e.data.length;h++){o=e.data[h];for(var l=0;l<o.length;l++)null===(i=o[l])||i.index<0||(r=t.tiles[i.index][2],s=t.tilesets[r],i.width=s.tileWidth,i.height=s.tileHeight,s.tileProperties&&s.tileProperties[i.index-s.firstgid]&&(i.properties=n(i.properties,s.tileProperties[i.index-s.firstgid])))}}}},41868:t=>{t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),r=0;r<i;r+=4)n[r/4]=(e.charCodeAt(r)|e.charCodeAt(r+1)<<8|e.charCodeAt(r+2)<<16|e.charCodeAt(r+3)<<24)>>>0;return n}},84101:(t,e,i)=>{var n=i(33629);t.exports=function(t){var e,i,r=[];for(e=0;e<t.imageCollections.length;e++)for(var s=t.imageCollections[e],o=s.images,a=0;a<o.length;a++){var h=o[a];(i=new n(h.image,h.gid,s.imageWidth,s.imageHeight,0,0)).updateTileData(s.imageWidth,s.imageHeight),t.tilesets.push(i)}for(e=0;e<t.tilesets.length;e++)for(var l=(i=t.tilesets[e]).tileMargin,u=i.tileMargin,c=0,d=0,p=0,f=i.firstgid;f<i.firstgid+i.total&&(r[f]=[l,u,e],l+=i.tileWidth+i.tileSpacing,++c!==i.total)&&(++d!==i.columns||(l=i.tileMargin,u+=i.tileHeight+i.tileSpacing,d=0,++p!==i.rows));f++);return r}},79677:(t,e,i)=>{var n=i(95540);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var r=e.x+n(e,"startx",0)*t.tilewidth+n(e,"offsetx",0),s=e.y+n(e,"starty",0)*t.tileheight+n(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+r,y:i.y+s}}},29920:t=>{var e=2147483648,i=1073741824,n=536870912;t.exports=function(t){var r=Boolean(t&e),s=Boolean(t&i),o=Boolean(t&n);t&=536870911;var a=0,h=!1;return r&&s&&o?(a=Math.PI/2,h=!0):r&&s&&!o?(a=Math.PI,h=!1):r&&!s&&o?(a=Math.PI/2,h=!1):!r||s||o?!r&&s&&o?(a=3*Math.PI/2,h=!1):r||!s||o?r||s||!o?r||s||o||(a=0,h=!1):(a=3*Math.PI/2,h=!0):(a=Math.PI,h=!0):(a=0,h=!0),{gid:t,flippedHorizontal:r,flippedVertical:s,flippedAntiDiagonal:o,rotation:a,flipped:h}}},12635:(t,e,i)=>{var n=i(95540),r=i(79677);t.exports=function(t){for(var e=[],i=[],s=r(t);s.i<s.layers.length||i.length>0;)if(s.i>=s.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=i.pop()}else{var o=s.layers[s.i];if(s.i++,"imagelayer"===o.type){var a=n(o,"offsetx",0)+n(o,"startx",0),h=n(o,"offsety",0)+n(o,"starty",0);e.push({name:s.name+o.name,image:o.image,x:s.x+a+o.x,y:s.y+h+o.y,alpha:s.opacity*o.opacity,visible:s.visible&&o.visible,properties:n(o,"properties",{})})}else if("group"===o.type){var l=r(t,o,s);i.push(s),s=l}}return e}},46594:(t,e,i)=>{var n=i(51233),r=i(84101),s=i(91907),o=i(62644),a=i(80341),h=i(6641),l=i(87010),u=i(12635),c=i(22611),d=i(28200),p=i(24619);t.exports=function(t,e,i){var f=o(e),m=new l({width:f.width,height:f.height,name:t,tileWidth:f.tilewidth,tileHeight:f.tileheight,orientation:h(f.orientation),format:a.TILED_JSON,version:f.version,properties:f.properties,renderOrder:f.renderorder,infinite:f.infinite});m.orientation===s.HEXAGONAL&&(m.hexSideLength=f.hexsidelength,m.staggerAxis=f.staggeraxis,m.staggerIndex=f.staggerindex),m.layers=d(f,i),m.images=u(f);var g=p(f);return m.tilesets=g.tilesets,m.imageCollections=g.imageCollections,m.objects=c(f),m.tiles=r(m),n(m),m}},52205:(t,e,i)=>{var n=i(18254),r=i(29920),s=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=n(t,o);if(a.x+=e,a.y+=i,t.gid){var h=r(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(s):t.polygon?a.polygon=t.polygon.map(s):t.ellipse?a.ellipse=t.ellipse:t.text?a.text=t.text:t.point?a.point=!0:a.rectangle=!0;return a}},22611:(t,e,i)=>{var n=i(95540),r=i(52205),s=i(48700),o=i(79677);t.exports=function(t){for(var e=[],i=[],a=o(t);a.i<a.layers.length||i.length>0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+n(h,"startx",0)+n(h,"offsetx",0),u=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],d=0;d<h.objects.length;d++){var p=r(h.objects[d],l,u);c.push(p)}var f=new s(h);f.objects=c,e.push(f)}else if("group"===h.type){var m=o(t,h,a);i.push(a),a=m}}return e}},28200:(t,e,i)=>{var n=i(41868),r=i(91907),s=i(79677),o=i(6641),a=i(95540),h=i(14977),l=i(29920),u=i(23029);t.exports=function(t,e){for(var i=a(t,"infinite",!1),c=[],d=[],p=s(t);p.i<p.layers.length||d.length>0;)if(p.i>=p.layers.length){if(d.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}p=d.pop()}else{var f=p.layers[p.i];if(p.i++,"tilelayer"===f.type)if(f.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+f.name+"'");else{if(f.encoding&&"base64"===f.encoding){if(f.chunks)for(var m=0;m<f.chunks.length;m++)f.chunks[m].data=n(f.chunks[m].data);f.data&&(f.data=n(f.data)),delete f.encoding}var g,v,y,x,E=[],T=0;if(i){var _=a(f,"startx",0)+f.x,w=a(f,"starty",0)+f.y;(g=new h({name:p.name+f.name,id:f.id,x:p.x+a(f,"offsetx",0)+_*t.tilewidth,y:p.y+a(f,"offsety",0)+w*t.tileheight,width:f.width,height:f.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:p.opacity*f.opacity,visible:p.visible&&f.visible,properties:a(f,"properties",[]),orientation:o(t.orientation)})).orientation===r.HEXAGONAL&&(g.hexSideLength=t.hexsidelength,g.staggerAxis=t.staggeraxis,g.staggerIndex=t.staggerindex);for(var S=0;S<f.height;S++){E[S]=[null];for(var b=0;b<f.width;b++)E[S][b]=null}for(S=0,N=f.chunks.length;S<N;S++)for(var C=f.chunks[S],A=C.x-_,R=C.y-w,M=0,L=0,O=C.data.length;L<O;L++){var P=T+A,F=M+R;(v=l(C.data[L])).gid>0?((y=new u(g,v.gid,P,F,t.tilewidth,t.tileheight)).rotation=v.rotation,y.flipX=v.flipped,E[F][P]=y):(x=e?null:new u(g,-1,P,F,t.tilewidth,t.tileheight),E[F][P]=x),++T===C.width&&(M++,T=0)}}else{(g=new h({name:p.name+f.name,id:f.id,x:p.x+a(f,"offsetx",0)+f.x,y:p.y+a(f,"offsety",0)+f.y,width:f.width,height:f.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:p.opacity*f.opacity,visible:p.visible&&f.visible,properties:a(f,"properties",[]),orientation:o(t.orientation)})).orientation===r.HEXAGONAL&&(g.hexSideLength=t.hexsidelength,g.staggerAxis=t.staggeraxis,g.staggerIndex=t.staggerindex);for(var I=[],D=0,N=f.data.length;D<N;D++)(v=l(f.data[D])).gid>0?((y=new u(g,v.gid,T,E.length,t.tilewidth,t.tileheight)).rotation=v.rotation,y.flipX=v.flipped,I.push(y)):(x=e?null:new u(g,-1,T,E.length,t.tilewidth,t.tileheight),I.push(x)),++T===f.width&&(E.push(I),T=0,I=[])}g.data=E,c.push(g)}else if("group"===f.type){var k=s(t,f,p);d.push(p),p=k}}return c}},24619:(t,e,i)=>{var n=i(33629),r=i(16536),s=i(52205),o=i(57880);t.exports=function(t){for(var e,i=[],a=[],h=null,l=0;l<t.tilesets.length;l++){var u=t.tilesets[l];if(u.source)console.warn("External tilesets unsupported. Use Embed Tileset and re-export");else if(u.image){var c=new n(u.name,u.firstgid,u.tilewidth,u.tileheight,u.margin,u.spacing,void 0,void 0,u.tileoffset);if(t.version>1){var d=void 0,p=void 0;if(Array.isArray(u.tiles)){d=d||{},p=p||{};for(var f=0;f<u.tiles.length;f++){var m=u.tiles[f];if(m.properties){var g={};m.properties.forEach((function(t){g[t.name]=t.value})),p[m.id]=g}if(m.objectgroup&&((d[m.id]||(d[m.id]={})).objectgroup=m.objectgroup,m.objectgroup.objects)){var v=m.objectgroup.objects.map((function(t){return s(t)}));d[m.id].objectgroup.objects=v}m.animation&&((d[m.id]||(d[m.id]={})).animation=m.animation),m.type&&((d[m.id]||(d[m.id]={})).type=m.type)}}Array.isArray(u.wangsets)&&(d=d||{},p=p||{},o(u.wangsets,d)),d&&(c.tileData=d,c.tileProperties=p)}else if(u.tileproperties&&(c.tileProperties=u.tileproperties),u.tiles)for(e in c.tileData=u.tiles,c.tileData){var y=c.tileData[e].objectgroup;if(y&&y.objects){var x=y.objects.map((function(t){return s(t)}));c.tileData[e].objectgroup.objects=x}}c.updateTileData(u.imagewidth,u.imageheight),i.push(c)}else{var E=new r(u.name,u.firstgid,u.tilewidth,u.tileheight,u.margin,u.spacing,u.properties),T=0;for(f=0;f<u.tiles.length;f++){var _=(m=u.tiles[f]).image,w=parseInt(m.id,10),S=u.firstgid+w;E.addImage(S,_),T=Math.max(w,T)}E.maxId=T,a.push(E)}h&&(h.lastgid=u.firstgid-1),h=u}return{tilesets:i,imageCollections:a}}},57880:t=>{t.exports=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],r=i;if(n.name&&""!==n.name&&(r=n.name),Array.isArray(n.wangtiles)&&n.wangtiles.length>0){var s,o,a,h={},l={};if(Array.isArray(n.edgecolors))for(s=0;s<n.edgecolors.length;s++)a=1+s,""!==(o=n.edgecolors[s]).name&&(h[a]=o.name);if(Array.isArray(n.cornercolors))for(s=0;s<n.cornercolors.length;s++)a=1+s,""!==(o=n.cornercolors[s]).name&&(l[a]=o.name);if(Array.isArray(n.colors))for(s=0;s<n.colors.length;s++)a=1+s,""!==(o=n.colors[s]).name&&(h[a]=l[a]=o.name);for(var u=[h,l,h,l,h,l,h,l],c=0;c<n.wangtiles.length;c++){var d=n.wangtiles[c],p=e[d.tileid]||(e[d.tileid]={});p=p.wangid||(p.wangid={});for(var f=[],m=0;m<Math.min(u.length,d.wangid.length);m++)if(0!==(o=d.wangid[m])){var g=u[m][o];void 0===g?f.push(o):f.push(g)}else f.push(void 0);p[r]=f}}}}},96761:(t,e,i)=>{t.exports={AssignTileProperties:i(51233),Base64Decode:i(41868),BuildTilesetIndex:i(84101),CreateGroupLayer:i(79677),ParseGID:i(29920),ParseImageLayers:i(12635),ParseJSONTiled:i(46594),ParseObject:i(52205),ParseObjectLayers:i(22611),ParseTileLayers:i(28200),ParseTilesets:i(24619)}},33385:(t,e,i)=>{var n=i(83419),r=i(37277),s=i(44594),o=i(94880),a=i(72905),h=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(s.BOOT,this.boot,this),t.sys.events.on(s.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(s.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var t=this.systems.events;t.on(s.PRE_UPDATE,this.preUpdate,this),t.on(s.UPDATE,this.update,this),t.once(s.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;return t instanceof o?(e=t,this.removeEvent(e),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?999999999999:e.repeat):e=new o(t),this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,n){return this.addEvent({delay:t,callback:e,args:i,callbackScope:n})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];a(this._pendingRemoval,i),a(this._pendingInsertion,i),a(this._active,i)}return this},removeAllEvents:function(){return this._pendingRemoval=this._pendingRemoval.concat(this._active),this},preUpdate:function(){var t=this._pendingRemoval.length,e=this._pendingInsertion.length;if(0!==t||0!==e){var i,n;for(i=0;i<t;i++){n=this._pendingRemoval[i];var r=this._active.indexOf(n);r>-1&&this._active.splice(r,1),n.destroy()}for(i=0;i<e;i++)n=this._pendingInsertion[i],this._active.push(n);this._pendingRemoval.length=0,this._pendingInsertion.length=0}},update:function(t,e){if(this.now=t,!this.paused){e*=this.timeScale;for(var i=0;i<this._active.length;i++){var n=this._active[i];if(!n.paused&&(n.elapsed+=e*n.timeScale,n.elapsed>=n.delay)){var r=n.elapsed-n.delay;if(n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0){if(n.repeatCount--,r>=n.delay)for(;r>=n.delay&&n.repeatCount>0;)n.callback&&n.callback.apply(n.callbackScope,n.args),r-=n.delay,n.repeatCount--;n.elapsed=r,n.hasDispatched=!1}else n.hasDispatched&&this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t<this._pendingInsertion.length;t++)this._pendingInsertion[t].destroy();for(t=0;t<this._active.length;t++)this._active[t].destroy();for(t=0;t<this._pendingRemoval.length;t++)this._pendingRemoval[t].destroy();this._active.length=0,this._pendingRemoval.length=0,this._pendingInsertion.length=0;var e=this.systems.events;e.off(s.PRE_UPDATE,this.preUpdate,this),e.off(s.UPDATE,this.update,this),e.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(s.START,this.start,this),this.scene=null,this.systems=null}});r.register("Clock",h,"time"),t.exports=h},96120:(t,e,i)=>{var n=i(83419),r=i(50792),s=i(39429),o=i(95540),a=i(44594),h=i(89809),l=new n({Extends:r,initialize:function(t,e){r.call(this),this.scene=t,this.systems=t.sys,this.elapsed=0,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var i=this.systems.events;i.on(a.PRE_UPDATE,this.preUpdate,this),i.on(a.UPDATE,this.update,this),i.once(a.SHUTDOWN,this.destroy,this),e&&this.add(e)},preUpdate:function(t,e){this.paused||(this.elapsed+=e)},update:function(){if(!this.paused&&!this.complete){var t,e,i=this.events,n=!1,r=this.systems;for(t=0;t<i.length;t++){var s=i[t];if(!s.complete&&s.time<=this.elapsed){if(s.complete=!0,this.totalComplete++,e=s.target?s.target:this,s.if&&!s.if.call(e,s))continue;if(s.once&&(n=!0),s.set&&s.target)for(var o in s.set)s.target[o]=s.set[o];this.iteration&&s.repeat++,s.loop&&s.repeat&&s.loop.call(e),s.tween&&r.tweens.add(s.tween),s.sound&&("string"==typeof s.sound?r.sound.play(s.sound):r.sound.play(s.sound.key,s.sound.config)),s.event&&this.emit(s.event,e),s.run&&s.run.call(e),s.stop&&this.stop()}}if(n)for(t=0;t<i.length;t++)i[t].complete&&i[t].once&&(i.splice(t,1),t--);this.totalComplete>=i.length&&(0!==this.loop&&(-1===this.loop||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(h.COMPLETE,this)}},play:function(t){return void 0===t&&(t=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,t&&this.reset(),this},pause:function(){return this.paused=!0,this},repeat:function(t){return void 0!==t&&!0!==t||(t=-1),!1===t&&(t=0),this.loop=t,this},resume:function(){return this.paused=!1,this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(t){void 0===t&&(t=!1),this.elapsed=0,t||(this.iteration=0);for(var e=0;e<this.events.length;e++)this.events[e].complete=!1,t||(this.events[e].repeat=0);return this.play(!1)},add:function(t){Array.isArray(t)||(t=[t]);var e=this.events,i=0;e.length>0&&(i=e[e.length-1].time);for(var n=0;n<t.length;n++){var r=t[n],s=o(r,"at",0),a=o(r,"in",null);null!==a&&(s=this.elapsed+a);var h=o(r,"from",null);null!==h&&(s=i+h),e.push({complete:!1,time:s,repeat:0,if:o(r,"if",null),run:o(r,"run",null),loop:o(r,"loop",null),event:o(r,"event",null),target:o(r,"target",null),set:o(r,"set",null),tween:o(r,"tween",null),sound:o(r,"sound",null),once:o(r,"once",!1),stop:o(r,"stop",!1)}),i=s}return this.complete=!1,this},clear:function(){return this.events=[],this.elapsed=0,this.paused=!0,this},isPlaying:function(){return!this.paused&&!this.complete},getProgress:function(){return Math.min(this.totalComplete,this.events.length)/this.events.length},destroy:function(){var t=this.systems.events;t.off(a.PRE_UPDATE,this.preUpdate,this),t.off(a.UPDATE,this.update,this),t.off(a.SHUTDOWN,this.destroy,this),this.scene=null,this.systems=null,this.events=[]}});s.register("timeline",(function(t){return new l(this.scene,t)})),t.exports=l},94880:(t,e,i)=>{var n=i(83419),r=i(95540),s=new n({initialize:function(t){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(t)},reset:function(t){if(this.delay=r(t,"delay",0),this.repeat=r(t,"repeat",0),this.loop=r(t,"loop",!1),this.callback=r(t,"callback",void 0),this.callbackScope=r(t,"callbackScope",this),this.args=r(t,"args",[]),this.timeScale=r(t,"timeScale",1),this.startAt=r(t,"startAt",0),this.paused=r(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,0===this.delay&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=s},35945:t=>{t.exports="complete"},89809:(t,e,i)=>{t.exports={COMPLETE:i(35945)}},90291:(t,e,i)=>{t.exports={Clock:i(33385),Events:i(89809),Timeline:i(96120),TimerEvent:i(94880)}},40382:(t,e,i)=>{var n=i(72905),r=i(83419),s=i(43491),o=i(88032),a=i(37277),h=i(44594),l=i(93109),u=i(86081),c=i(8357),d=i(43960),p=i(26012),f=new r({initialize:function(t){this.scene=t,this.events=t.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(h.UPDATE,this.update,this),this.events.once(h.SHUTDOWN,this.shutdown,this)},create:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i<t.length;i++){var n=t[i];n instanceof u||n instanceof d?e.push(n):Array.isArray(n.tweens)?e.push(p(this,n)):e.push(c(this,n))}return 1===e.length?e[0]:e},add:function(t){var e=t,i=this.tweens;return e instanceof u||e instanceof d||(e=Array.isArray(e.tweens)?p(this,e):c(this,e)),i.push(e.reset()),e},addMultiple:function(t){for(var e,i=[],n=this.tweens,r=0;r<t.length;r++)(e=t[r])instanceof u||e instanceof d||(e=Array.isArray(e.tweens)?p(this,e):c(this,e)),n.push(e.reset()),i.push(e);return i},chain:function(t){var e=p(this,t);return this.tweens.push(e.init()),e},getChainedTweens:function(t){return t.getChainedTweens()},has:function(t){return this.tweens.indexOf(t)>-1},existing:function(t){return this.has(t)||this.tweens.push(t.reset()),this},addCounter:function(t){var e=o(this,t);return this.tweens.push(e.reset()),e},stagger:function(t,e){return l(t,e)},setLagSmooth:function(t,e){return void 0===t&&(t=1/1e-8),void 0===e&&(e=0),this.maxLag=t,this.lagSkip=Math.min(e,this.maxLag),this},setFps:function(t){return void 0===t&&(t=240),this.gap=1e3/t,this.nextTime=1e3*this.time+this.gap,this},getDelta:function(t){var e=Date.now()-this.prevTime;e>this.maxLag&&(this.startTime+=e-this.lagSkip),this.prevTime+=e;var i=this.prevTime-this.startTime,n=i-this.nextTime,r=i-1e3*this.time;return n>0||t?(i/=1e3,this.time=i,this.nextTime+=n+(n>=this.gap?4:this.gap-n)):r=0,r},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(t){void 0===t&&(t=!1);var e=this.getDelta(t);if(!(e<=0)){var i,n;this.processing=!0;var r=[],s=this.tweens;for(i=0;i<s.length;i++)(n=s[i]).update(e)&&r.push(n);var o=r.length;if(o&&s.length>0){for(i=0;i<o;i++){n=r[i];var a=s.indexOf(n);a>-1&&(n.isPendingRemove()||n.isDestroyed())&&(s.splice(a,1),n.destroy())}r.length=0}this.processing=!1}},remove:function(t){return this.processing?t.setPendingRemoveState():(n(this.tweens,t),t.setRemovedState()),this},reset:function(t){return this.existing(t),t.seek(),t.setActiveState(),this},makeActive:function(t){return this.existing(t),t.setActiveState(),this},each:function(t,e){var i,n=[null];for(i=1;i<arguments.length;i++)n.push(arguments[i]);return this.tweens.forEach((function(i){n[0]=i,t.apply(e,n)})),this},getTweens:function(){return this.tweens.slice()},getTweensOf:function(t){for(var e=[],i=this.tweens,n=(t=Array.isArray(t)?s(t):[t]).length,r=0;r<i.length;r++)for(var o=i[r],a=0;a<n;a++)!o.isDestroyed()&&o.hasTarget(t[a])&&e.push(o);return e},getGlobalTimeScale:function(){return this.timeScale},setGlobalTimeScale:function(t){return this.timeScale=t,this},isTweening:function(t){for(var e,i=this.tweens,n=0;n<i.length;n++)if((e=i[n]).isPlaying()&&e.hasTarget(t))return!0;return!1},killAll:function(){for(var t=this.processing?this.getTweens():this.tweens,e=0;e<t.length;e++)t[e].destroy();return this.processing||(t.length=0),this},killTweensOf:function(t){for(var e=this.getTweensOf(t),i=0;i<e.length;i++)e[i].destroy();return this},pauseAll:function(){return this.paused=!0,this},resumeAll:function(){return this.paused=!1,this},shutdown:function(){this.killAll(),this.tweens=[],this.events.off(h.UPDATE,this.update,this),this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.events=null}});a.register("TweenManager",f,"tweens"),t.exports=f},57355:t=>{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},6113:(t,e,i)=>{var n=i(62640),r=i(35355);t.exports=function(t,e){var i=n.Power0;if("string"==typeof t)if(n.hasOwnProperty(t))i=n[t];else{var s="";if(t.indexOf(".")){var o=(s=t.substring(t.indexOf(".")+1)).toLowerCase();"in"===o?s="easeIn":"out"===o?s="easeOut":"inout"===o&&(s="easeInOut")}t=r(t.substring(0,t.indexOf(".")+1)+s),n.hasOwnProperty(t)&&(i=n[t])}else"function"==typeof t&&(i=t);if(!e)return i;var a=e.slice(0);return a.unshift(0),function(t){return a[0]=t,i.apply(this,a)}}},91389:(t,e,i)=>{var n=i(89318),r=i(77259),s={bezier:n,catmull:r,catmullrom:r,linear:i(28392)};t.exports=function(t){if(null===t)return null;var e=s.linear;return"string"==typeof t?s.hasOwnProperty(t)&&(e=s[t]):"function"==typeof t&&(e=t),e}},55292:t=>{t.exports=function(t,e,i){var n;t.hasOwnProperty(e)?n="function"===typeof t[e]?function(i,n,r,s,o,a){return t[e](i,n,r,s,o,a)}:function(){return t[e]}:n="function"==typeof i?i:function(){return i};return n}},82985:(t,e,i)=>{var n=i(81076);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substring(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substring(0,1)&&i.push({key:e,value:t[e]});return i}},62329:(t,e,i)=>{var n=i(35154);t.exports=function(t){var e=n(t,"targets",null);return null===e||("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e])),e}},17777:(t,e,i)=>{var n=i(30976),r=i(99472);function s(t){return!!t.getActive&&"function"==typeof t.getActive}function o(t){return!!t.getStart&&"function"==typeof t.getStart}function a(t){return!!t.getEnd&&"function"==typeof t.getEnd}var h=function(t,e){var i,l,u=function(t,e,i){return i},c=function(t,e,i){return i},d=null,p=typeof e;if("number"===p)u=function(){return e};else if(Array.isArray(e))c=function(){return e[0]},u=function(){return e[e.length-1]};else if("string"===p){var f=e.toLowerCase(),m="random"===f.substring(0,6),g="int"===f.substring(0,3);if(m||g){var v=f.indexOf("("),y=f.indexOf(")"),x=f.indexOf(",");if(!(v&&y&&x))throw new Error("invalid random() format");var E=parseFloat(f.substring(v+1,x)),T=parseFloat(f.substring(x+1,y));u=m?function(){return r(E,T)}:function(){return n(E,T)}}else{f=f[0];var _=parseFloat(e.substr(2));switch(f){case"+":u=function(t,e,i){return i+_};break;case"-":u=function(t,e,i){return i-_};break;case"*":u=function(t,e,i){return i*_};break;case"/":u=function(t,e,i){return i/_};break;default:u=function(){return parseFloat(e)}}}}else if("function"===p)u=e;else if("object"===p)if(o(l=e)||a(l)||s(l))s(e)&&(d=e.getActive),a(e)&&(u=e.getEnd),o(e)&&(c=e.getStart);else if(e.hasOwnProperty("value"))i=h(t,e.value);else{var w=e.hasOwnProperty("to"),S=e.hasOwnProperty("from"),b=e.hasOwnProperty("start");if(w&&(S||b)){if(i=h(t,e.to),b){var C=h(t,e.start);i.getActive=C.getEnd}if(S){var A=h(t,e.from);i.getStart=A.getEnd}}}return i||(i={getActive:d,getEnd:u,getStart:c}),i};t.exports=h},88032:(t,e,i)=>{var n=i(70402),r=i(69902),s=i(23568),o=i(57355),a=i(6113),h=i(55292),l=i(35154),u=i(17777),c=i(269),d=i(86081);t.exports=function(t,e,i){if(e instanceof d)return e.parent=t,e;i=void 0===i?r:c(r,i);var p=l(e,"from",0),f=l(e,"to",1),m=[{value:p}],g=l(e,"delay",i.delay),v=l(e,"easeParams",i.easeParams),y=l(e,"ease",i.ease),x=u("value",f),E=new d(t,m),T=E.add(0,"value",x.getEnd,x.getStart,x.getActive,a(l(e,"ease",y),l(e,"easeParams",v)),h(e,"delay",g),l(e,"duration",i.duration),o(e,"yoyo",i.yoyo),l(e,"hold",i.hold),l(e,"repeat",i.repeat),l(e,"repeatDelay",i.repeatDelay),!1,!1);T.start=p,T.current=p,E.completeDelay=s(e,"completeDelay",0),E.loop=Math.round(s(e,"loop",0)),E.loopDelay=Math.round(s(e,"loopDelay",0)),E.paused=o(e,"paused",!1),E.persist=o(e,"persist",!1),E.callbackScope=l(e,"callbackScope",E);for(var _=n.TYPES,w=0;w<_.length;w++){var S=_[w],b=l(e,S,!1);if(b){var C=l(e,S+"Params",[]);E.setCallback(S,b,C)}}return E}},93109:(t,e,i)=>{var n=i(6113),r=i(35154),s=i(36383);t.exports=function(t,e){var i;void 0===e&&(e={});var o=r(e,"start",0),a=r(e,"ease",null),h=r(e,"grid",null),l=r(e,"from",0),u="first"===l,c="center"===l,d="last"===l,p="number"==typeof l,f=Array.isArray(t),m=f?parseFloat(t[0]):parseFloat(t),g=f?parseFloat(t[1]):0,v=Math.max(m,g);if(f&&(o+=m),h){var y=h[0],x=h[1],E=0,T=0,_=0,w=0,S=[];d?(E=y-1,T=x-1):p?(E=l%y,T=Math.floor(l/y)):c&&(E=(y-1)/2,T=(x-1)/2);for(var b=s.MIN_SAFE_INTEGER,C=0;C<x;C++){S[C]=[];for(var A=0;A<y;A++){_=E-A,w=T-C;var R=Math.sqrt(_*_+w*w);R>b&&(b=R),S[C][A]=R}}}var M=a?n(a):null;return i=h?function(t,e,i,n){var r,s=0,a=n%y,h=Math.floor(n/y);if(a>=0&&a<y&&h>=0&&h<x&&(s=S[h][a]),f){var l=g-m;r=M?s/b*l*M(s/b):s/b*l}else r=M?s*m*M(s/b):s*m;return r+o}:function(t,e,i,n,r){var s,a,h;(r--,u?s=n:c?s=Math.abs(r/2-n):d?s=r-n:p&&(s=Math.abs(l-n)),f)?(h=c?(g-m)/r*(2*s):(g-m)/r*s,a=M?h*M(s/r):h):a=M?r*v*M(s/r):s*m;return a+o},i}},8357:(t,e,i)=>{var n=i(70402),r=i(69902),s=i(23568),o=i(57355),a=i(6113),h=i(91389),l=i(55292),u=i(82985),c=i(62329),d=i(35154),p=i(17777),f=i(269),m=i(86081);t.exports=function(t,e,i){if(e instanceof m)return e.parent=t,e;i=void 0===i?r:f(r,i);var g=c(e);!g&&i.targets&&(g=i.targets);for(var v=u(e),y=d(e,"delay",i.delay),x=d(e,"duration",i.duration),E=d(e,"easeParams",i.easeParams),T=d(e,"ease",i.ease),_=d(e,"hold",i.hold),w=d(e,"repeat",i.repeat),S=d(e,"repeatDelay",i.repeatDelay),b=o(e,"yoyo",i.yoyo),C=o(e,"flipX",i.flipX),A=o(e,"flipY",i.flipY),R=d(e,"interpolation",i.interpolation),M=function(t,e,i,n){if("texture"===i){var r=n,s=void 0;Array.isArray(n)?(r=n[0],s=n[1]):n.hasOwnProperty("value")?(r=n.value,Array.isArray(n.value)?(r=n.value[0],s=n.value[1]):"string"==typeof n.value&&(r=n.value)):"string"==typeof n&&(r=n),t.addFrame(e,r,s,l(n,"delay",y),d(n,"duration",x),d(n,"hold",_),d(n,"repeat",w),d(n,"repeatDelay",S),o(n,"flipX",C),o(n,"flipY",A))}else{var u=p(i,n),c=h(d(n,"interpolation",R));t.add(e,i,u.getEnd,u.getStart,u.getActive,a(d(n,"ease",T),d(n,"easeParams",E)),l(n,"delay",y),d(n,"duration",x),o(n,"yoyo",b),d(n,"hold",_),d(n,"repeat",w),d(n,"repeatDelay",S),o(n,"flipX",C),o(n,"flipY",A),c,c?n:null)}},L=new m(t,g),O=0;O<v.length;O++)for(var P=v[O].key,F=v[O].value,I=0;I<g.length;I++)"scale"!==P||g[I].hasOwnProperty("scale")?M(L,I,P,F):(M(L,I,"scaleX",F),M(L,I,"scaleY",F));L.completeDelay=s(e,"completeDelay",0),L.loop=Math.round(s(e,"loop",0)),L.loopDelay=Math.round(s(e,"loopDelay",0)),L.paused=o(e,"paused",!1),L.persist=o(e,"persist",!1),L.callbackScope=d(e,"callbackScope",L);for(var D=n.TYPES,N=0;N<D.length;N++){var k=D[N],B=d(e,k,!1);if(B){var U=d(e,k+"Params",[]);L.setCallback(k,B,U)}}return L}},26012:(t,e,i)=>{var n=i(70402),r=i(23568),s=i(57355),o=i(62329),a=i(35154),h=i(8357),l=i(43960);t.exports=function(t,e){if(e instanceof l)return e.parent=t,e;var i,u=new l(t);u.startDelay=a(e,"delay",0),u.completeDelay=r(e,"completeDelay",0),u.loop=Math.round(r(e,"loop",a(e,"repeat",0))),u.loopDelay=Math.round(r(e,"loopDelay",a(e,"repeatDelay",0))),u.paused=s(e,"paused",!1),u.persist=s(e,"persist",!1),u.callbackScope=a(e,"callbackScope",u);var c=n.TYPES;for(i=0;i<c.length;i++){var d=c[i],p=a(e,d,!1);if(p){var f=a(e,d+"Params",[]);u.setCallback(d,p,f)}}var m=a(e,"tweens",null);if(Array.isArray(m)){var g=[],v=o(e),y=void 0;for(v&&(y={targets:v}),i=0;i<m.length;i++)g.push(h(u,m[i],y));u.add(g)}return u}},30231:(t,e,i)=>{t.exports={GetBoolean:i(57355),GetEaseFunction:i(6113),GetInterpolationFunction:i(91389),GetNewValue:i(55292),GetProps:i(82985),GetTargets:i(62329),GetValueOp:i(17777),NumberTweenBuilder:i(88032),StaggerBuilder:i(93109),TweenBuilder:i(8357)}},73685:t=>{t.exports="active"},98540:t=>{t.exports="complete"},67233:t=>{t.exports="loop"},2859:t=>{t.exports="pause"},98336:t=>{t.exports="repeat"},25764:t=>{t.exports="resume"},32193:t=>{t.exports="start"},84371:t=>{t.exports="stop"},70766:t=>{t.exports="update"},55659:t=>{t.exports="yoyo"},842:(t,e,i)=>{t.exports={TWEEN_ACTIVE:i(73685),TWEEN_COMPLETE:i(98540),TWEEN_LOOP:i(67233),TWEEN_PAUSE:i(2859),TWEEN_RESUME:i(25764),TWEEN_REPEAT:i(98336),TWEEN_START:i(32193),TWEEN_STOP:i(84371),TWEEN_UPDATE:i(70766),TWEEN_YOYO:i(55659)}},43066:(t,e,i)=>{var n={States:i(86353),Builders:i(30231),Events:i(842),TweenManager:i(40382),Tween:i(86081),TweenData:i(48177),TweenFrameData:i(42220),BaseTween:i(70402),TweenChain:i(43960)};t.exports=n},70402:(t,e,i)=>{var n=i(83419),r=i(50792),s=i(842),o=i(86353),a=new n({Extends:r,initialize:function(t){r.call(this),this.parent=t,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=o.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(s.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(s.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(s.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(s.TWEEN_COMPLETE,"onComplete")},complete:function(t){return void 0===t&&(t=0),t?(this.setCompleteDelayState(),this.countdown=t):this.onCompleteHandler(),this},completeAfterLoop:function(t){return void 0===t&&(t=0),this.loopCounter>t&&(this.loopCounter=t),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return!this.parent||this.isRemoved()||this.isPendingRemove()||this.isDestroyed()||(this.dispatchEvent(s.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(t){this.countdown-=t,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(s.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(t){return this.countdown-=t,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(s.TWEEN_START,"onStart"),t=0),t},updateCompleteDelay:function(t){this.countdown-=t,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(t,e,i){return void 0===i&&(i=[]),this.callbacks.hasOwnProperty(t)&&(this.callbacks[t]={func:e,params:i}),this},setPendingState:function(){this.state=o.PENDING},setActiveState:function(){this.state=o.ACTIVE},setLoopDelayState:function(){this.state=o.LOOP_DELAY},setCompleteDelayState:function(){this.state=o.COMPLETE_DELAY},setStartDelayState:function(){this.state=o.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=o.PENDING_REMOVE},setRemovedState:function(){this.state=o.REMOVED},setFinishedState:function(){this.state=o.FINISHED},setDestroyedState:function(){this.state=o.DESTROYED},isPending:function(){return this.state===o.PENDING},isActive:function(){return this.state===o.ACTIVE},isLoopDelayed:function(){return this.state===o.LOOP_DELAY},isCompleteDelayed:function(){return this.state===o.COMPLETE_DELAY},isStartDelayed:function(){return this.state===o.START_DELAY},isPendingRemove:function(){return this.state===o.PENDING_REMOVE},isRemoved:function(){return this.state===o.REMOVED},isFinished:function(){return this.state===o.FINISHED},isDestroyed:function(){return this.state===o.DESTROYED},destroy:function(){this.data&&this.data.forEach((function(t){t.destroy()})),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});a.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],t.exports=a},95042:(t,e,i)=>{var n=i(83419),r=i(842),s=i(86353),o=new n({initialize:function(t,e,i,n,r,s,o,a,h,l){this.tween=t,this.targetIndex=e,this.duration=n,this.totalDuration=0,this.delay=0,this.getDelay=i,this.yoyo=r,this.hold=s,this.repeat=o,this.repeatDelay=a,this.repeatCounter=0,this.flipX=h,this.flipY=l,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(t){void 0===t&&(t=this.current),this.tween.targets[this.targetIndex][this.key]=t},setCreatedState:function(){this.state=s.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=s.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=s.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=s.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=s.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=s.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=s.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=s.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===s.CREATED},isDelayed:function(){return this.state===s.DELAY},isPendingRender:function(){return this.state===s.PENDING_RENDER},isPlayingForward:function(){return this.state===s.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===s.PLAYING_BACKWARD},isHolding:function(){return this.state===s.HOLD_DELAY},isRepeating:function(){return this.state===s.REPEAT_DELAY},isComplete:function(){return this.state===s.COMPLETE},setStateFromEnd:function(t){this.yoyo?this.onRepeat(t,!0,!0):this.repeatCounter>0?this.onRepeat(t,!0,!1):this.setCompleteState()},setStateFromStart:function(t){this.repeatCounter>0?this.onRepeat(t,!1):this.setCompleteState()},reset:function(){var t=this.tween,e=t.totalTargets,i=this.targetIndex,n=t.targets[i],r=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(n,r,0,i,e,t),this.repeatCounter=-1===this.repeat?s.MAX:this.repeat,this.setPendingRenderState();var o=this.duration+this.hold;this.yoyo&&(o+=this.duration);var a=o+this.repeatDelay;this.totalDuration=this.delay+o,-1===this.repeat?(this.totalDuration+=a*s.MAX,t.isInfinite=!0):this.repeat>0&&(this.totalDuration+=a*this.repeat),this.totalDuration>t.duration&&(t.duration=this.totalDuration),this.delay<t.startDelay&&(t.startDelay=this.delay),this.delay>0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(t,e,i){var n=this.tween,s=n.totalTargets,o=this.targetIndex,a=n.targets[o],h=this.key,l="texture"!==h;if(this.elapsed=t,this.progress=t/this.duration,this.flipX&&a.toggleFlipX(),this.flipY&&a.toggleFlipY(),l&&(e||i)&&(this.start=this.getStartValue(a,h,this.start,o,s,n)),i)return this.setPlayingBackwardState(),void this.dispatchEvent(r.TWEEN_YOYO,"onYoyo");this.repeatCounter--,l&&(this.end=this.getEndValue(a,h,this.start,o,s,n)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-t,l&&(this.current=this.start,a[h]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});t.exports=o},69902:t=>{t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null}},81076:t=>{t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},86081:(t,e,i)=>{var n=i(70402),r=i(83419),s=i(842),o=i(44603),a=i(39429),h=i(36383),l=i(86353),u=i(48177),c=i(42220),d=new r({Extends:n,initialize:function(t,e){n.call(this,t),this.targets=e,this.totalTargets=e.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(t,e,i,n,r,s,o,a,h,l,c,d,p,f,m,g){var v=new u(this,t,e,i,n,r,s,o,a,h,l,c,d,p,f,m,g);return this.totalData=this.data.push(v),v},addFrame:function(t,e,i,n,r,s,o,a,h,l){var u=new c(this,t,e,i,n,r,s,o,a,h,l);return this.totalData=this.data.push(u),u},getValue:function(t){void 0===t&&(t=0);var e=null;return this.data&&(e=this.data[t].current),e},hasTarget:function(t){return this.targets&&-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){if(void 0===i&&(i=!1),"texture"!==t)for(var n=0;n<this.totalData;n++){var r=this.data[n];r.key===t&&(r.isPlayingForward()||r.isPlayingBackward())&&(r.end=e,i&&(r.start=r.current))}return this},restart:function(){switch(this.state){case l.REMOVED:case l.FINISHED:this.seek(),this.parent.makeActive(this);break;case l.PENDING:case l.PENDING_REMOVE:this.parent.reset(this);break;case l.DESTROYED:console.warn("Cannot restart destroyed Tween",this);break;default:this.seek()}return this.paused=!1,this.hasStarted=!1,this},nextState:function(){if(this.loopCounter>0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(s.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,n.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(t,e,i){if(void 0===t&&(t=0),void 0===e&&(e=16.6),void 0===i&&(i=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;i||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(s.TWEEN_ACTIVE,"onActive");var n=this.paused;if(this.paused=!1,t>0){for(var r=Math.floor(t/e),o=t-r*e,a=0;a<r;a++)this.update(e);o>0&&this.update(o)}return this.paused=n,this.isSeeking=!1,this},initTweenData:function(t){void 0===t&&(t=!1),this.duration=0,this.startDelay=h.MAX_SAFE_INTEGER;for(var e=this.data,i=0;i<this.totalData;i++)e[i].reset(t);this.duration=Math.max(this.duration,.01);var n=this.duration,r=this.completeDelay,s=this.loopCounter,o=this.loopDelay;this.totalDuration=s>0?n+r+(n+o)*s:n+r},reset:function(t){return void 0===t&&(t=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,-1===this.loop&&(this.isInfinite=!0,this.loopCounter=l.MAX),t||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(s.TWEEN_ACTIVE,"onActive")),this},update:function(t){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(t*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(t),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(t),!1;this.hasStarted||(this.startDelay-=t,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(s.TWEEN_START,"onStart"),t=0));var e=!1;if(this.isActive())for(var i=this.data,n=0;n<this.totalData;n++)i[n].update(t)&&(e=!0);this.elapsed+=t,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=t,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),e||this.nextState();var r=this.isPendingRemove();return r&&this.persist&&(this.setFinishedState(),r=!1),r},forward:function(t){return this.update(t),this},rewind:function(t){return this.update(-t),this},dispatchEvent:function(t,e){if(!this.isSeeking){this.emit(t,this,this.targets);var i=this.callbacks[e];i&&i.func.apply(this.callbackScope,[this,this.targets].concat(i.params))}},destroy:function(){n.prototype.destroy.call(this),this.targets=null}});a.register("tween",(function(t){return this.scene.sys.tweens.add(t)})),o.register("tween",(function(t){return this.scene.sys.tweens.create(t)})),t.exports=d},43960:(t,e,i)=>{var n=i(72905),r=i(70402),s=i(83419),o=i(842),a=i(44603),h=i(39429),l=i(86353),u=new s({Extends:r,initialize:function(t){r.call(this,t),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?l.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive"),this},add:function(t){var e=this.parent.create(t);Array.isArray(e)||(e=[e]);for(var i=this.data,n=0;n<e.length;n++){var r=e[n];r.parent=this,i.push(r.reset())}return this.totalData=i.length,this},remove:function(t){return n(this.data,t),t.setRemovedState(),t===this.currentTween&&this.nextTween(),this.totalData=this.data.length,this},hasTarget:function(t){for(var e=this.data,i=0;i<this.totalData;i++)if(e[i].hasTarget(t))return!0;return!1},restart:function(){return this.isDestroyed()?(console.warn("Cannot restart destroyed TweenChain",this),this):(this.isRemoved()&&this.parent.makeActive(this),this.resetTweens(),this.paused=!1,this.init())},reset:function(t){return t.seek(),t.setActiveState(),this},makeActive:function(t){return t.reset(),t.setActiveState(),this},nextState:function(){if(this.loopCounter>0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(o.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var t=this.data,e=this.totalData,i=0;i<e;i++)t[i].reset(!1);this.currentIndex=0,this.currentTween=t[0]},update:function(t){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.isFinished()||this.paused)return!1;t*=this.parent.timeScale,this.isLoopDelayed()?this.updateLoopCountdown(t):this.isCompleteDelayed()?this.updateCompleteDelay(t):this.isStartDelayed()&&(t=this.updateStartCountdown(t));var e=!1;return this.isActive()&&this.currentTween&&(this.currentTween.update(t)&&this.nextTween()&&this.nextState(),(e=this.isPendingRemove())&&this.persist&&(this.setFinishedState(),e=!1)),e},nextTween:function(){return this.currentIndex++,this.currentIndex===this.totalData||(this.setCurrentTween(this.currentIndex),!1)},setCurrentTween:function(t){this.currentIndex=t,this.currentTween=this.data[t],this.currentTween.setActiveState(),this.currentTween.dispatchEvent(o.TWEEN_ACTIVE,"onActive")},dispatchEvent:function(t,e){this.emit(t,this);var i=this.callbacks[e];i&&i.func.apply(this.callbackScope,[this].concat(i.params))},destroy:function(){r.prototype.destroy.call(this),this.currentTween=null}});h.register("tweenchain",(function(t){return this.scene.sys.tweens.chain(t)})),a.register("tweenchain",(function(t){return this.scene.sys.tweens.create(t)})),t.exports=u},48177:(t,e,i)=>{var n=i(95042),r=i(45319),s=i(83419),o=i(842),a=new s({Extends:n,initialize:function(t,e,i,r,s,o,a,h,l,u,c,d,p,f,m,g,v){n.call(this,t,e,h,l,u,c,d,p,f,m),this.key=i,this.getActiveValue=o,this.getEndValue=r,this.getStartValue=s,this.ease=a,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=g,this.interpolationData=v},reset:function(t){n.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex],i=this.key;t&&(e[i]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(e[i]=this.getActiveValue(e,i,0))},update:function(t){var e=this.tween,i=e.totalTargets,n=this.targetIndex,s=e.targets[n],a=this.key;if(!s)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(s,a,s[a],n,i,e),this.end=this.getEndValue(s,a,this.start,n,i,e),this.current=this.start,s[a]=this.start,this.setPlayingForwardState(),!0;var h=this.isPlayingForward(),l=this.isPlayingBackward();if(h||l){var u=this.elapsed,c=this.duration,d=0,p=!1;(u+=t)>=c?(d=u-c,u=c,p=!0):u<0&&(u=0);var f=r(u/c,0,1);if(this.elapsed=u,this.progress=f,this.previous=this.current,p)h?(this.current=this.end,s[a]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(d)):(this.current=this.start,s[a]=this.start,this.setStateFromStart(d));else{h||(f=1-f);var m=this.ease(f);this.interpolation?this.current=this.interpolation(this.interpolationData,m):this.current=this.start+(this.end-this.start)*m,s[a]=this.current}this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var n=i.targets[this.targetIndex],r=this.key,s=this.current,o=this.previous;i.emit(t,i,r,n,s,o);var a=i.callbacks[e];a&&a.func.apply(i.callbackScope,[i,n,r,s,o].concat(a.params))}},destroy:function(){n.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});t.exports=a},42220:(t,e,i)=>{var n=i(95042),r=i(45319),s=i(83419),o=i(842),a=new s({Extends:n,initialize:function(t,e,i,r,s,o,a,h,l,u,c){n.call(this,t,e,s,o,!1,a,h,l,u,c),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=r,this.yoyo=0!==h},reset:function(t){n.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=e.texture.key,this.startFrame=e.frame.name),t&&e.setTexture(this.startTexture,this.startFrame)},update:function(t){var e=this.tween,i=this.targetIndex,n=e.targets[i];if(!n)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&n.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var s=this.isPlayingForward(),a=this.isPlayingBackward();if(s||a){var h=this.elapsed,l=this.duration,u=0,c=!1;(h+=t)>=l?(u=h-l,h=l,c=!0):h<0&&(h=0);var d=r(h/l,0,1);this.elapsed=h,this.progress=d,c&&(s?(n.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(u)):(n.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(u))),this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var n=i.targets[this.targetIndex],r=this.key;i.emit(t,i,r,n);var s=i.callbacks[e];s&&s.func.apply(i.callbackScope,[i,n,r].concat(s.params))}},destroy:function(){n.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});t.exports=a},86353:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},83419:t=>{function e(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function n(t,n,r,o){for(var a in n)if(n.hasOwnProperty(a)){var h=e(n,a,r);if(!1!==h){if(i((o||t).prototype,a)){if(s.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=n[a]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)n(t,e[i].prototype||e[i])}}function s(t){var e,i;if(t||(t={}),t.initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");e=t.initialize,delete t.initialize}else if(t.Extends){var s=t.Extends;e=function(){s.apply(this,arguments)}}else e=function(){};t.Extends?(e.prototype=Object.create(t.Extends.prototype),e.prototype.constructor=e,i=t.Extends,delete t.Extends):e.prototype.constructor=e;var o=null;return t.Mixins&&(o=t.Mixins,delete t.Mixins),r(e,o),n(e,t,!0,i),e}s.extend=n,s.mixin=r,s.ignoreFinals=!1,t.exports=s},29747:t=>{t.exports=function(){}},20242:t=>{t.exports=function(){return null}},71146:t=>{t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t),i>0){var s=i-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(r,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>s&&(e.splice(s),o=s);for(var a=0;a<o;a++){var h=e[a];t.push(h),n&&n.call(r,h)}return e}},51067:t=>{t.exports=function(t,e,i,n,r,s){if(void 0===i&&(i=0),void 0===s&&(s=t),n>0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(s,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(s,l)}return e}},66905:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i<t.length&&(t.splice(i,1),t.push(e)),e}},21612:(t,e,i)=>{var n=i(82011);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var o=0;if(n(t,r,s))for(var a=r;a<s;a++){t[a][e]===i&&o++}return o}},95428:t=>{t.exports=function(t,e,i){var n,r=[null];for(n=3;n<arguments.length;n++)r.push(arguments[n]);for(n=0;n<t.length;n++)r[0]=t[n],e.apply(i,r);return t}},36914:(t,e,i)=>{var n=i(82011);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s)){var o,a=[null];for(o=5;o<arguments.length;o++)a.push(arguments[o]);for(o=r;o<s;o++)a[0]=t[o],e.apply(i,a)}return t}},81957:t=>{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,r,s=1;if(i){if(t<e[0][i])return e[0];for(;e[s][i]<t;)s++}else for(;e[s]<t;)s++;return s>e.length&&(s=e.length),i?(n=e[s-1][i],(r=e[s][i])-t<=t-n?e[s]:e[s-1]):(n=e[s-1],(r=e[s])-t<=t-n?r:n)}},43491:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var n=0;n<t.length;n++)Array.isArray(t[n])?e(t[n],i):i.push(t[n]);return i};t.exports=e},46710:(t,e,i)=>{var n=i(82011);t.exports=function(t,e,i,r,s){void 0===r&&(r=0),void 0===s&&(s=t.length);var o=[];if(n(t,r,s))for(var a=r;a<s;a++){var h=t[a];(!e||e&&void 0===i&&h.hasOwnProperty(e)||e&&void 0!==i&&h[e]===i)&&o.push(h)}return o}},58731:(t,e,i)=>{var n=i(82011);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var o=r;o<s;o++){var a=t[o];if(!e||e&&void 0===i&&a.hasOwnProperty(e)||e&&void 0!==i&&a[e]===i)return a}return null}},26546:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return void 0===t[n]?null:t[n]}},85835:t=>{t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return n>r||(t.splice(n,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},83371:t=>{t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return n<r||(t.splice(n,1),0===r?t.unshift(e):t.splice(r,0,e)),t}},70864:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var n=t[i-1],r=t.indexOf(n);t[i]=n,t[r]=e}return t}},69693:t=>{t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},40853:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i<t.length-1){var n=t[i+1],r=t.indexOf(n);t[i]=n,t[r]=e}return t}},20283:t=>{t.exports=function(t,e,i,n){var r,s=[],o=!1;if((i||n)&&(o=!0,i||(i=""),n||(n="")),e<t)for(r=t;r>=e;r--)o?s.push(i+r.toString()+n):s.push(r);else for(r=t;r<=e;r++)o?s.push(i+r.toString()+n):s.push(r);return s}},593:(t,e,i)=>{var n=i(2284);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],s=Math.max(n((e-t)/(i||1)),0),o=0;o<s;o++)r.push(t),t+=i;return r}},43886:t=>{function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t,r,s,o,a){for(void 0===s&&(s=0),void 0===o&&(o=t.length-1),void 0===a&&(a=i);o>s;){if(o-s>600){var h=o-s+1,l=r-s+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),p=Math.max(s,Math.floor(r-l*c/h+d)),f=Math.min(o,Math.floor(r+(h-l)*c/h+d));n(t,r,p,f,a)}var m=t[r],g=s,v=o;for(e(t,s,r),a(t[o],m)>0&&e(t,s,o);g<v;){for(e(t,g,v),g++,v--;a(t[g],m)<0;)g++;for(;a(t[v],m)>0;)v--}0===a(t[s],m)?e(t,s,v):e(t,++v,o),v<=r&&(s=v+1),r<=v&&(o=v-1)}};t.exports=n},88492:(t,e,i)=>{var n=i(35154),r=i(33680),s=function(t,e,i){for(var n=[],r=0;r<t.length;r++)for(var s=0;s<e.length;s++)for(var o=0;o<i;o++)n.push({a:t[r],b:e[s]});return n};t.exports=function(t,e,i){var o=n(i,"max",0),a=n(i,"qty",1),h=n(i,"random",!1),l=n(i,"randomB",!1),u=n(i,"repeat",0),c=n(i,"yoyo",!1),d=[];if(l&&r(e),-1===u)if(0===o)u=0;else{var p=t.length*e.length*a;c&&(p*=2),u=Math.ceil(o/p)}for(var f=0;f<=u;f++){var m=s(t,e,a);h&&r(m),d=d.concat(m),c&&(m.reverse(),d=d.concat(m))}return o&&d.splice(o),d}},72905:(t,e,i)=>{var n=i(19133);t.exports=function(t,e,i,r){var s;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(s=t.indexOf(e))?(n(t,s),i&&i.call(r,e),e):null;for(var o=e.length-1,a=[];o>=0;){var h=e[o];-1!==(s=t.indexOf(h))&&(n(t,s),a.push(h),i&&i.call(r,h)),o--}return a}},60248:(t,e,i)=>{var n=i(19133);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var s=n(t,e);return i&&i.call(r,s),s}},81409:(t,e,i)=>{var n=i(82011);t.exports=function(t,e,i,r,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(r)for(var h=0;h<a.length;h++){var l=a[h];r.call(s,l)}return a}return[]}},31856:(t,e,i)=>{var n=i(19133);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return n(t,r)}},42169:t=>{t.exports=function(t,e,i){var n=t.indexOf(e),r=t.indexOf(i);return-1!==n&&-1===r&&(t[n]=i,!0)}},86003:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)i=t.shift(),t.push(i);return i}},49498:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)i=t.pop(),t.unshift(i);return i}},82011:t=>{t.exports=function(t,e,i,n){var r=t.length;if(e<0||e>r||e>=i||i>r){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},89545:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},17810:(t,e,i)=>{var n=i(82011);t.exports=function(t,e,i,r,s){if(void 0===r&&(r=0),void 0===s&&(s=t.length),n(t,r,s))for(var o=r;o<s;o++){var a=t[o];a.hasOwnProperty(e)&&(a[e]=i)}return t}},33680:t=>{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},90126:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},19133:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],r=e;r<i;r++)t[r]=t[r+1];return t.length=i,n}}},19186:(t,e,i)=>{var n=i(82264);function r(t,e){return String(t).localeCompare(e)}function s(t,e,i,n){var r,s,o,a,h,l=t.length,u=0,c=2*i;for(r=0;r<l;r+=c)for(o=(s=r+i)+i,s>l&&(s=l),o>l&&(o=l),a=r,h=s;;)if(a<s&&h<o)e(t[a],t[h])<=0?n[u++]=t[a++]:n[u++]=t[h++];else if(a<s)n[u++]=t[a++];else{if(!(h<o))break;n[u++]=t[h++]}}t.exports=function(t,e){if(void 0===e&&(e=r),!t||t.length<2)return t;if(n.features.stableSort)return t.sort(e);var i=function(t,e){var i=t.length;if(i<=1)return t;for(var n=new Array(i),r=1;r<i;r*=2){s(t,e,r,n);var o=t;t=n,n=o}return t}(t,e);return i!==t&&s(i,null,t.length,t),t}},25630:t=>{t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[r]=e,t}},37105:(t,e,i)=>{t.exports={Matrix:i(54915),Add:i(71146),AddAt:i(51067),BringToTop:i(66905),CountAllMatching:i(21612),Each:i(95428),EachInRange:i(36914),FindClosestInSorted:i(81957),Flatten:i(43491),GetAll:i(46710),GetFirst:i(58731),GetRandom:i(26546),MoveDown:i(70864),MoveTo:i(69693),MoveUp:i(40853),MoveAbove:i(85835),MoveBelow:i(83371),NumberArray:i(20283),NumberArrayStep:i(593),QuickSelect:i(43886),Range:i(88492),Remove:i(72905),RemoveAt:i(60248),RemoveBetween:i(81409),RemoveRandomElement:i(31856),Replace:i(42169),RotateLeft:i(86003),RotateRight:i(49498),SafeRange:i(82011),SendToBack:i(89545),SetAll:i(17810),Shuffle:i(33680),SortByDigits:i(90126),SpliceOne:i(19133),StableSort:i(19186),Swap:i(25630)}},86922:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i<t.length;i++)if(t[i].length!==e)return!1;return!0}},63362:(t,e,i)=>{var n=i(41836),r=i(86922);t.exports=function(t){var e="";if(!r(t))return e;for(var i=0;i<t.length;i++){for(var s=0;s<t[i].length;s++){var o=t[i][s].toString();e+="undefined"!==o?n(o,2):"?",s<t[i].length-1&&(e+=" |")}if(i<t.length-1){e+="\n";for(var a=0;a<t[i].length;a++)e+="---",a<t[i].length-1&&(e+="+");e+="\n"}}return e}},92598:t=>{t.exports=function(t){return t.reverse()}},21224:t=>{t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},98717:(t,e,i)=>{var n=i(37829);t.exports=function(t){return n(t,180)}},44657:(t,e,i)=>{var n=i(37829);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i<e;i++)t=n(t,90);return t}},37829:(t,e,i)=>{var n=i(86922),r=i(2429);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i<t.length;i++)t[i].reverse();t.reverse()}return t}},92632:(t,e,i)=>{var n=i(37829);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i<e;i++)t=n(t,-90);return t}},69512:(t,e,i)=>{var n=i(86003),r=i(49498);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?n(t,Math.abs(i)):r(t,i)),0!==e)for(var s=0;s<t.length;s++){var o=t[s];e<0?n(o,Math.abs(e)):r(o,e)}return t}},2429:t=>{t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),r=0;r<i;r++){n[r]=new Array(e);for(var s=e-1;s>-1;s--)n[r][s]=t[s][r]}return n}},54915:(t,e,i)=>{t.exports={CheckMatrix:i(86922),MatrixToString:i(63362),ReverseColumns:i(92598),ReverseRows:i(21224),Rotate180:i(98717),RotateLeft:i(44657),RotateMatrix:i(37829),RotateRight:i(92632),Translate:i(69512),TransposeMatrix:i(2429)}},71334:t=>{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,i){for(var n=new Uint8Array(t),r=n.length,s=i?"data:"+i+";base64,":"",o=0;o<r;o+=3)s+=e[n[o]>>2],s+=e[(3&n[o])<<4|n[o+1]>>4],s+=e[(15&n[o+1])<<2|n[o+2]>>6],s+=e[63&n[o+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},53134:t=>{for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),n=0;n<64;n++)i[e.charCodeAt(n)]=n;t.exports=function(t){var e,n,r,s,o=(t=t.substr(t.indexOf(",")+1)).length,a=.75*o,h=0;"="===t[o-1]&&(a--,"="===t[o-2]&&a--);for(var l=new ArrayBuffer(a),u=new Uint8Array(l),c=0;c<o;c+=4)e=i[t.charCodeAt(c)],n=i[t.charCodeAt(c+1)],r=i[t.charCodeAt(c+2)],s=i[t.charCodeAt(c+3)],u[h++]=e<<2|n>>4,u[h++]=(15&n)<<4|r>>2,u[h++]=(3&r)<<6|63&s;return l}},65839:(t,e,i)=>{t.exports={ArrayBufferToBase64:i(71334),Base64ToArrayBuffer:i(53134)}},91799:(t,e,i)=>{t.exports={Array:i(37105),Base64:i(65839),Objects:i(1183),String:i(31749),NOOP:i(29747),NULL:i(20242)}},41786:t=>{t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},62644:t=>{var e=function(t){var i,n,r;if("object"!=typeof t||null===t)return t;for(r in i=Array.isArray(t)?[]:{},t)n=t[r],i[r]=e(n);return i};t.exports=e},79291:(t,e,i)=>{var n=i(41212),r=function(){var t,e,i,s,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l<u;l++)if(null!=(t=arguments[l]))for(e in t)i=h[e],h!==(s=t[e])&&(c&&s&&(n(s)||(o=Array.isArray(s)))?(o?(o=!1,a=i&&Array.isArray(i)?i:[]):a=i&&n(i)?i:{},h[e]=r(c,a,s)):void 0!==s&&(h[e]=s));return h};t.exports=r},23568:(t,e,i)=>{var n=i(75508),r=i(35154);t.exports=function(t,e,i){var s=r(t,e,null);if(null===s)return i;if(Array.isArray(s))return n.RND.pick(s);if("object"==typeof s){if(s.hasOwnProperty("randInt"))return n.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return n.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if("function"==typeof s)return s(e);return s}},95540:t=>{t.exports=function(t,e,i){var n=typeof t;return t&&"number"!==n&&"string"!==n&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},82840:(t,e,i)=>{var n=i(35154),r=i(45319);t.exports=function(t,e,i,s,o){void 0===o&&(o=i);var a=n(t,e,o);return r(a,i,s)}},35154:t=>{t.exports=function(t,e,i,n){if(!t&&!n||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(n&&n.hasOwnProperty(e))return n[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),s=t,o=n,a=i,h=i,l=!0,u=!0,c=0;c<r.length;c++)s&&s.hasOwnProperty(r[c])?(a=s[r[c]],s=s[r[c]]):l=!1,o&&o.hasOwnProperty(r[c])?(h=o[r[c]],o=o[r[c]]):u=!1;return l?a:u?h:i}return i}},69036:t=>{t.exports=function(t,e){for(var i=0;i<e.length;i++)if(!t.hasOwnProperty(e[i]))return!1;return!0}},1985:t=>{t.exports=function(t,e){for(var i=0;i<e.length;i++)if(t.hasOwnProperty(e[i]))return!0;return!1}},97022:t=>{t.exports=function(t,e){return t.hasOwnProperty(e)}},41212:t=>{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},46975:(t,e,i)=>{var n=i(41786);t.exports=function(t,e){var i=n(t);for(var r in e)i.hasOwnProperty(r)||(i[r]=e[r]);return i}},269:(t,e,i)=>{var n=i(41786);t.exports=function(t,e){var i=n(t);for(var r in e)i.hasOwnProperty(r)&&(i[r]=e[r]);return i}},18254:(t,e,i)=>{var n=i(97022);t.exports=function(t,e){for(var i={},r=0;r<e.length;r++){var s=e[r];n(t,s)&&(i[s]=t[s])}return i}},61622:t=>{t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),r=t,s=t,o=0;o<n.length;o++){if(!r.hasOwnProperty(n[o]))return!1;s=r,r=r[n[o]]}return s[n[n.length-1]]=i,!0}return!1}},1183:(t,e,i)=>{t.exports={Clone:i(41786),DeepCopy:i(62644),Extend:i(79291),GetAdvancedValue:i(23568),GetFastValue:i(95540),GetMinMaxValue:i(82840),GetValue:i(35154),HasAll:i(69036),HasAny:i(1985),HasValue:i(97022),IsPlainObject:i(41212),Merge:i(46975),MergeRight:i(269),Pick:i(18254),SetValue:i(61622)}},27902:t=>{t.exports=function(t,e){return t.replace(/%([0-9]+)/g,(function(t,i){return e[Number(i)-1]}))}},41836:t=>{t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===n&&(n=3);var r=0;if(e+1>=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var s=Math.ceil((r=e-t.length)/2);t=new Array(r-s+1).join(i)+t+new Array(s+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},33628:t=>{t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e-1)+t.slice(e)}},27671:t=>{t.exports=function(t){return t.split("").reverse().join("")}},45650:t=>{t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}},35355:t=>{t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},31749:(t,e,i)=>{t.exports={Format:i(27902),Pad:i(41836),RemoveAt:i(33628),Reverse:i(27671),UppercaseFirst:i(35355),UUID:i(45650)}}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,i),s.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i(85454)})())); |