text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).rexmousewheelscrollerplugin=e()}(void 0,function(){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function t(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&n(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function n(t,e){return(n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(i){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=u(i);if(r){var n=u(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}(this,t)}}function f(t){return t instanceof a}var e={setEventEmitter:function(t,e){return void 0===e&&(e=Phaser.Events.EventEmitter),this._privateEE=!0===t||void 0===t,this._eventEmitter=this._privateEE?new e:t,this},destroyEventEmitter:function(){return this._eventEmitter&&this._privateEE&&this._eventEmitter.shutdown(),this},getEventEmitter:function(){return this._eventEmitter},on:function(){return this._eventEmitter&&this._eventEmitter.on.apply(this._eventEmitter,arguments),this},once:function(){return this._eventEmitter&&this._eventEmitter.once.apply(this._eventEmitter,arguments),this},off:function(){return this._eventEmitter&&this._eventEmitter.off.apply(this._eventEmitter,arguments),this},emit:function(t){return this._eventEmitter&&t&&this._eventEmitter.emit.apply(this._eventEmitter,arguments),this},addListener:function(){return this._eventEmitter&&this._eventEmitter.addListener.apply(this._eventEmitter,arguments),this},removeListener:function(){return this._eventEmitter&&this._eventEmitter.removeListener.apply(this._eventEmitter,arguments),this},removeAllListeners:function(){return this._eventEmitter&&this._eventEmitter.removeAllListeners.apply(this._eventEmitter,arguments),this},listenerCount:function(){return this._eventEmitter?this._eventEmitter.listenerCount.apply(this._eventEmitter,arguments):0},listeners:function(){return this._eventEmitter?this._eventEmitter.listeners.apply(this._eventEmitter,arguments):[]},eventNames:function(){return this._eventEmitter?this._eventEmitter.eventNames.apply(this._eventEmitter,arguments):[]}},a=Phaser.Scene,l=Phaser.Utils.Objects.GetValue,p=function(){function i(t,e){var n;o(this,i),this.parent=t,this.scene=null==(n=t)||"object"!==r(n)?null:f(n)?n:n.scene&&f(n.scene)?n.scene:n.parent&&n.parent.scene&&f(n.parent.scene)?n.parent.scene:void 0,this.isShutdown=!1,this.setEventEmitter(l(e,"eventEmitter",!0)),this.parent&&this.parent===this.scene?this.scene.sys.events.once("shutdown",this.onSceneDestroy,this):this.parent&&this.parent.once&&this.parent.once("destroy",this.onParentDestroy,this)}return t(i,[{key:"shutdown",value:function(){this.isShutdown||(this.parent&&this.parent===this.scene?this.scene.sys.events.off("shutdown",this.onSceneDestroy,this):this.parent&&this.parent.once&&this.parent.off("destroy",this.onParentDestroy,this),this.destroyEventEmitter(),this.parent=void 0,this.scene=void 0,this.isShutdown=!0)}},{key:"destroy",value:function(t){this.shutdown(t)}},{key:"onSceneDestroy",value:function(){this.destroy(!0)}},{key:"onParentDestroy",value:function(t,e){this.destroy(e)}}]),i}();Object.assign(p.prototype,e);var v=Phaser.Utils.Objects.GetValue,y=function(){s(r,p);var i=h(r);function r(t,e){var n;(o(this,r),(n=i.call(this,t,e)).parent!==n.scene?n.focusMode=v(e,"focus",!1):n.focusMode=!1,n.setSpeed(v(e,"speed",.1)),n.setEnable(v(e,"enable",!0)),n.focusMode)?(t=n.parent).setInteractive(v(e,"inputConfig",void 0)).on("wheel",function(t,e,n,i,r){this.enable&&this.scroll(n)},c(n)):n.scene.input.on("wheel",n.onSceneScroll,c(n));return n}return t(r,[{key:"destroy",value:function(){this.focusMode||this.scene.input.off("wheel",this.onSceneScroll,this)}},{key:"onSceneScroll",value:function(t,e,n,i){this.enable&&this.scroll(i)}},{key:"setEnable",value:function(t){return void 0===t&&(t=!0),this.enable=t,this}},{key:"setSpeed",value:function(t){return this.speed=t,this}},{key:"scroll",value:function(t){t*=this.speed,this.emit("scroll",t,this.parent,this)}}]),r}();return function(){s(n,Phaser.Plugins.BasePlugin);var e=h(n);function n(t){return o(this,n),e.call(this,t)}return t(n,[{key:"start",value:function(){this.game.events.on("destroy",this.destroy,this)}},{key:"add",value:function(t,e){return new y(t,e)}}]),n}()});
  