UNPKG

phaser3-rex-plugins

Version:
2 lines (1 loc) 40 kB
!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).rexcircularprogressplugin=e();}(undefined,(function(){function t(e){return t="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(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,(n=s.key,r=void 0,"symbol"==typeof(r=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===e?String:Number)(t)}(n,"string"))?r:String(r)),s);}var n,r;}function s(t,e,s){return e&&i(t.prototype,e),s&&i(t,s),Object.defineProperty(t,"prototype",{writable:!1}),t}function n(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&&a(t,e);}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function h(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 function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function o(t){var e=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 i,s=r(t);if(e){var n=r(this).constructor;i=Reflect.construct(s,arguments,n);}else i=s.apply(this,arguments);return h(this,i)}}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,i){var s=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}(t,e);if(s){var n=Object.getOwnPropertyDescriptor(s,e);return n.get?n.get.call(arguments.length<3?t:i):n.value}},u.apply(this,arguments)}function l(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return c(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}var f=Phaser.GameObjects.GetCalcMatrix,d=Phaser.Renderer.Canvas.SetTransform,p={renderWebGL:function(t,e,i,s){e.updateData(),i.addToRenderList(e);var n=t.pipelines.set(e.pipeline),r=f(e,i,s),a=n.calcMatrix.copyFrom(r.calc),h=e._displayOriginX,o=e._displayOriginY,u=i.alpha*e.alpha;t.pipelines.preBatch(e);for(var l=e.geom,c=0,d=l.length;c<d;c++)l[c].webglRender(n,a,u,h,o);t.pipelines.postBatch(e);},renderCanvas:function(t,e,i,s){e.updateData(),i.addToRenderList(e);var n=t.currentContext;if(d(t,n,e,i,s)){for(var r=e._displayOriginX,a=e._displayOriginY,h=e.geom,o=0,u=h.length;o<u;o++)h[o].canvasRender(n,r,a);n.restore();}}},v=function(e){if("object"!==t(e)||null===e)return e;if(Array.isArray(e))e.length=0;else for(var i in e)delete e[i];return e},y=Phaser.GameObjects.Shape,g=Phaser.Utils.Array.Remove,k=function(t){n(r,t);var i=o(r);function r(t,s,n,a,h){var o;return e(this,r),void 0===s&&(s=0),void 0===n&&(n=0),void 0===a&&(a=2),void 0===h&&(h=a),(o=i.call(this,t,"rexShapes",[]))._width=-1,o._height=-1,o.dirty=!0,o.isSizeChanged=!0,o.shapes={},o.setPosition(s,n),o.setSize(a,h),o.updateDisplayOrigin(),o}return s(r,[{key:"width",get:function(){return this._width},set:function(t){this.setSize(t,this._height);}},{key:"height",get:function(){return this._height},set:function(t){this.setSize(this._width,t);}},{key:"setDirty",value:function(t){return void 0===t&&(t=!0),this.dirty=t,this}},{key:"setSize",value:function(t,e){this.isSizeChanged=this.isSizeChanged||this._width!==t||this._height!==e,this.dirty=this.dirty||this.isSizeChanged,this._width=t,this._height=e,this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this}},{key:"resize",value:function(t,e){return this.setSize(t,e),this}},{key:"fillColor",get:function(){return this._fillColor},set:function(t){this.setFillStyle(t,this._fillAlpha);}},{key:"fillAlpha",get:function(){return this._fillAlpha},set:function(t){this.setFillStyle(this._fillColor,t);}},{key:"setFillStyle",value:function(t,e){return void 0===e&&(e=1),this.dirty=this.dirty||this.fillColor!==t||this.fillAlpha!==e,this._fillColor=t,this._fillAlpha=e,this}},{key:"lineWidth",get:function(){return this._lineWidth},set:function(t){this.setStrokeStyle(t,this._strokeColor,this._strokeAlpha);}},{key:"strokeColor",get:function(){return this._strokeColor},set:function(t){this.setStrokeStyle(this._lineWidth,t,this._strokeAlpha);}},{key:"strokeAlpha",get:function(){return this._strokeAlpha},set:function(t){this.setStrokeStyle(this._lineWidth,this._strokeColor,t);}},{key:"setStrokeStyle",value:function(t,e,i){return void 0===i&&(i=1),this.dirty=this.dirty||this.lineWidth!==t||this.strokeColor!==e||this.strokeAlpha!==i,this._lineWidth=t,this._strokeColor=e,this._strokeAlpha=i,this}},{key:"updateShapes",value:function(){}},{key:"updateData",value:function(){if(!this.dirty)return this;this.updateShapes();for(var t=this.geom,e=0,i=t.length;e<i;e++){var s=t[e];s.dirty&&s.updateData();}return this.isSizeChanged=!1,this.dirty=!1,this}},{key:"clear",value:function(){return this.geom.length=0,v(this.shapes),this}},{key:"getShape",value:function(t){return this.shapes[t]}},{key:"getShapes",value:function(){return this.geom}},{key:"addShape",value:function(t){this.geom.push(t);var e=t.name;return e&&(this.shapes[e]=t),this.dirty=!0,this}},{key:"deleteShape",value:function(t){var e=this.getShape(t);return e&&(delete this.shapes[t],g(this.geom,e)),this}}]),r}(y);Object.assign(k.prototype,p);var m=Phaser.Math.Linear,b=Phaser.Math.Percent,P={setValue:function(t,e,i){return null==t||(void 0!==e&&(t=b(t,e,i)),this.value=t),this},addValue:function(t,e,i){return void 0!==e&&(t=b(t,e,i)),this.value+=t,this},getValue:function(t,e){var i=this.value;return void 0!==t&&(i=m(t,e,i)),i}},D={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):[]}},_=Phaser.Scene,C=function(t){return t instanceof _},S=Phaser.Game,T=function(t){return t instanceof S},w=Phaser.Utils.Objects.GetValue,E=function(){function i(t,s){e(this,i),this.setParent(t),this.isShutdown=!1,this.setEventEmitter(w(s,"eventEmitter",!0)),this.parent&&(this.parent===this.scene?this.scene.sys.events.once("shutdown",this.onEnvDestroy,this):this.parent===this.game?this.game.events.once("shutdown",this.onEnvDestroy,this):this.parent.once&&this.parent.once("destroy",this.onParentDestroy,this));}return s(i,[{key:"shutdown",value:function(t){this.isShutdown||(this.parent&&(this.parent===this.scene?this.scene.sys.events.off("shutdown",this.onEnvDestroy,this):this.parent===this.game?this.game.events.off("shutdown",this.onEnvDestroy,this):this.parent.once&&this.parent.off("destroy",this.onParentDestroy,this)),this.destroyEventEmitter(),this.parent=void 0,this.scene=void 0,this.game=void 0,this.isShutdown=!0);}},{key:"destroy",value:function(t){this.shutdown(t);}},{key:"onEnvDestroy",value:function(){this.destroy(!0);}},{key:"onParentDestroy",value:function(t,e){this.destroy(e);}},{key:"setParent",value:function(e){var i;return this.parent=e,this.scene=null==(i=e)||"object"!==t(i)?null:C(i)?i:i.scene&&C(i.scene)?i.scene:i.parent&&i.parent.scene&&C(i.parent.scene)?i.parent.scene:null,this.game=function(e){return null==e||"object"!==t(e)?null:T(e)?e:T(e.game)?e.game:C(e)?e.sys.game:C(e.scene)?e.scene.sys.game:void 0}(e),this}}]),i}();Object.assign(E.prototype,D);var A=Phaser.Utils.Objects.GetValue,R=function(t){n(a,t);var i=o(a);function a(t,s){var n;return e(this,a),(n=i.call(this,t,s))._isRunning=!1,n.isPaused=!1,n.tickingState=!1,n.setTickingMode(A(s,"tickingMode",1)),n}return s(a,[{key:"boot",value:function(){2!==this.tickingMode||this.tickingState||this.startTicking();}},{key:"shutdown",value:function(t){this.isShutdown||(this.stop(),this.tickingState&&this.stopTicking(),u(r(a.prototype),"shutdown",this).call(this,t));}},{key:"setTickingMode",value:function(t){"string"==typeof t&&(t=O[t]),this.tickingMode=t;}},{key:"startTicking",value:function(){this.tickingState=!0;}},{key:"stopTicking",value:function(){this.tickingState=!1;}},{key:"isRunning",get:function(){return this._isRunning},set:function(t){this._isRunning!==t&&(this._isRunning=t,1===this.tickingMode&&t!=this.tickingState&&(t?this.startTicking():this.stopTicking()));}},{key:"start",value:function(){return this.isPaused=!1,this.isRunning=!0,this}},{key:"pause",value:function(){return this.isRunning&&(this.isPaused=!0,this.isRunning=!1),this}},{key:"resume",value:function(){return this.isPaused&&(this.isRunning=!0),this}},{key:"stop",value:function(){return this.isPaused=!1,this.isRunning=!1,this}},{key:"complete",value:function(){this.isPaused=!1,this.isRunning=!1,this.emit("complete",this.parent,this);}}]),a}(E),O={no:0,lazy:1,always:2},j=Phaser.Utils.Objects.GetValue,V=function(t){n(a,t);var i=o(a);function a(t,s){var n;e(this,a);var r=(n=i.call(this,t,s)).scene?"update":"step";return n.tickEventName=j(s,"tickEventName",r),n.isSceneTicker=!X(n.tickEventName),n}return s(a,[{key:"startTicking",value:function(){u(r(a.prototype),"startTicking",this).call(this),this.isSceneTicker?this.scene.sys.events.on(this.tickEventName,this.update,this):this.game.events.on(this.tickEventName,this.update,this);}},{key:"stopTicking",value:function(){u(r(a.prototype),"stopTicking",this).call(this),this.isSceneTicker&&this.scene?this.scene.sys.events.off(this.tickEventName,this.update,this):this.game&&this.game.events.off(this.tickEventName,this.update,this);}}]),a}(R),X=function(t){return "step"===t||"poststep"===t},L=Phaser.Utils.Objects.GetValue,M=Phaser.Math.Clamp,Y=function(){function t(i){e(this,t),this.resetFromJSON(i);}return s(t,[{key:"resetFromJSON",value:function(t){this.state=L(t,"state",z),this.timeScale=L(t,"timeScale",1),this.delay=L(t,"delay",0),this.repeat=L(t,"repeat",0),this.repeatCounter=L(t,"repeatCounter",0),this.repeatDelay=L(t,"repeatDelay",0),this.duration=L(t,"duration",0),this.nowTime=L(t,"nowTime",0),this.justRestart=L(t,"justRestart",!1);}},{key:"toJSON",value:function(){return {state:this.state,timeScale:this.timeScale,delay:this.delay,repeat:this.repeat,repeatCounter:this.repeatCounter,repeatDelay:this.repeatDelay,duration:this.duration,nowTime:this.nowTime,justRestart:this.justRestart}}},{key:"destroy",value:function(){}},{key:"setTimeScale",value:function(t){return this.timeScale=t,this}},{key:"setDelay",value:function(t){return void 0===t&&(t=0),this.delay=t,this}},{key:"setDuration",value:function(t){return this.duration=t,this}},{key:"setRepeat",value:function(t){return this.repeat=t,this}},{key:"setRepeatInfinity",value:function(){return this.repeat=-1,this}},{key:"setRepeatDelay",value:function(t){return this.repeatDelay=t,this}},{key:"start",value:function(){return this.nowTime=this.delay>0?-this.delay:0,this.state=this.nowTime>=0?F:x,this.repeatCounter=0,this}},{key:"stop",value:function(){return this.state=z,this}},{key:"update",value:function(t,e){this.state!==z&&this.state!==G&&0!==e&&0!==this.timeScale&&(this.nowTime+=e*this.timeScale,this.justRestart=!1,this.nowTime>=this.duration?-1===this.repeat||this.repeatCounter<this.repeat?(this.repeatCounter++,this.justRestart=!0,this.nowTime-=this.duration,this.repeatDelay>0&&(this.nowTime-=this.repeatDelay,this.state=B)):(this.nowTime=this.duration,this.state=G):this.nowTime>=0&&(this.state=F));}},{key:"t",get:function(){var t;switch(this.state){case z:case x:case B:t=0;break;case F:t=this.nowTime/this.duration;break;case G:t=1;}return M(t,0,1)},set:function(t){(t=M(t,-1,1))<0?(this.state=x,this.nowTime=-this.delay*t):(this.state=F,this.nowTime=this.duration*t,1===t&&0!==this.repeat&&this.repeatCounter++);}},{key:"setT",value:function(t){return this.t=t,this}},{key:"isIdle",get:function(){return this.state===z}},{key:"isDelay",get:function(){return this.state===x}},{key:"isCountDown",get:function(){return this.state===F}},{key:"isRunning",get:function(){return this.state===x||this.state===F}},{key:"isDone",get:function(){return this.state===G}},{key:"isOddIteration",get:function(){return 1==(1&this.repeatCounter)}},{key:"isEvenIteration",get:function(){return 0==(1&this.repeatCounter)}}]),t}(),z=0,x=1,F=2,B=3,G=-1,N=function(t){n(a,t);var i=o(a);function a(t,s){var n;return e(this,a),(n=i.call(this,t,s)).timer=new Y,n}return s(a,[{key:"shutdown",value:function(t){this.isShutdown||(u(r(a.prototype),"shutdown",this).call(this,t),this.timer.destroy(),this.timer=void 0);}},{key:"start",value:function(){return this.timer.start(),u(r(a.prototype),"start",this).call(this),this}},{key:"stop",value:function(){return this.timer.stop(),u(r(a.prototype),"stop",this).call(this),this}},{key:"complete",value:function(){return this.timer.stop(),u(r(a.prototype),"complete",this).call(this),this}}]),a}(V),I=Phaser.Utils.Objects.GetValue,U=Phaser.Utils.Objects.GetAdvancedValue,W=Phaser.Tweens.Builders.GetEaseFunction,J=function(t){n(a,t);var i=o(a);function a(){return e(this,a),i.apply(this,arguments)}return s(a,[{key:"resetFromJSON",value:function(t){return this.timer.resetFromJSON(I(t,"timer")),this.setEnable(I(t,"enable",!0)),this.setTarget(I(t,"target",this.parent)),this.setDelay(U(t,"delay",0)),this.setDuration(U(t,"duration",1e3)),this.setEase(I(t,"ease","Linear")),this.setRepeat(I(t,"repeat",0)),this}},{key:"setEnable",value:function(t){return null==t&&(t=!0),this.enable=t,this}},{key:"setTarget",value:function(t){return void 0===t&&(t=this.parent),this.target=t,this}},{key:"setDelay",value:function(t){return this.delay=t,this}},{key:"setDuration",value:function(t){return this.duration=t,this}},{key:"setRepeat",value:function(t){return this.repeat=t,this}},{key:"setRepeatDelay",value:function(t){return this.repeatDelay=t,this}},{key:"setEase",value:function(t){return void 0===t&&(t="Linear"),this.ease=t,this.easeFn=W(t),this}},{key:"start",value:function(){return this.timer.isRunning||u(r(a.prototype),"start",this).call(this),this}},{key:"restart",value:function(){return this.timer.stop(),this.start.apply(this,arguments),this}},{key:"stop",value:function(t){return void 0===t&&(t=!1),u(r(a.prototype),"stop",this).call(this),t&&(this.timer.setT(1),this.updateGameObject(this.target,this.timer),this.complete()),this}},{key:"update",value:function(t,e){if(!this.isRunning||!this.enable||!this.parent.active)return this;var i=this.target,s=this.timer;return s.update(t,e),s.isDelay||this.updateGameObject(i,s),this.emit("update",i,this),s.isDone&&this.complete(),this}},{key:"updateGameObject",value:function(t,e){}}]),a}(N),q=Phaser.Utils.Objects.GetValue,K=Phaser.Math.Linear,Q=function(t){n(a,t);var i=o(a);function a(t,s){var n;return e(this,a),(n=i.call(this,t,s)).resetFromJSON(),n.boot(),n}return s(a,[{key:"start",value:function(t){if(this.timer.isRunning)return this;var e=this.target;this.propertyKey=q(t,"key","value");var i=e[this.propertyKey];return this.fromValue=q(t,"from",i),this.toValue=q(t,"to",i),this.setEase(q(t,"ease",this.ease)),this.setDuration(q(t,"duration",this.duration)),this.setRepeat(q(t,"repeat",0)),this.setDelay(q(t,"delay",0)),this.setRepeatDelay(q(t,"repeatDelay",0)),this.timer.setDuration(this.duration).setRepeat(this.repeat).setDelay(this.delay).setRepeatDelay(this.repeatDelay),e[this.propertyKey]=this.fromValue,u(r(a.prototype),"start",this).call(this),this}},{key:"updateGameObject",value:function(t,e){var i=e.t;i=this.easeFn(i),t[this.propertyKey]=K(this.fromValue,this.toValue,i);}}]),a}(J),H=Phaser.Math.Percent,$={setEaseValuePropName:function(t){return this.easeValuePropName=t,this},setEaseValueDuration:function(t){return this.easeValueDuration=t,this},setEaseValueFunction:function(t){return this.easeFunction=t,this},stopEaseValue:function(){return this.easeValueTask&&this.easeValueTask.stop(),this},easeValueTo:function(t,e,i){return null==t||(void 0!==e&&(t=H(t,e,i)),void 0===this.easeValueTask&&(this.easeValueTask=new Q(this,{eventEmitter:null})),this.easeValueTask.restart({key:this.easeValuePropName,to:t,duration:this.easeValueDuration,ease:this.easeFunction})),this},easeValueRepeat:function(t,e,i,s){return void 0===i&&(i=-1),void 0===s&&(s=0),void 0===this.easeValueTask&&(this.easeValueTask=new Q(this,{eventEmitter:null})),this.easeValueTask.restart({key:this.easeValuePropName,from:t,to:e,duration:this.easeValueDuration,ease:this.easeFunction,repeat:i,repeatDelay:s}),this}},Z=Phaser.Utils.Objects.GetValue,tt=Phaser.Math.Clamp;var et={fillStyle:function(t,e){return null==t?this.isFilled=!1:(void 0===e&&(e=1),this.isFilled=!0,this.fillColor=t,this.fillAlpha=e),this},lineStyle:function(t,e,i){return null==t||null==e?this.isStroked=!1:(void 0===i&&(i=1),this.isStroked=!0,this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i),this}},it={enableData:function(){return void 0===this.data&&(this.data={}),this},setData:function(t,e){if(this.enableData(),1===arguments.length){var i=t;for(t in i)this.data[t]=i[t];}else this.data[t]=e;return this},getData:function(t,e){return this.enableData(),void 0===t?this.data:function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var s=e.split("."),n=t,r=i,a=0;a<s.length;a++){if(!n.hasOwnProperty(s[a])){r=i;break}r=n[s[a]],n=n[s[a]];}return r}return i}return i}(this.data,t,e)},incData:function(t,e,i){return void 0===i&&(i=0),this.enableData(),this.setData(t,this.getData(t,i)+e),this},mulData:function(t,e,i){return void 0===i&&(i=0),this.enableData(),this.setData(t,this.getData(t,i)*e),this},clearData:function(){return this.data&&v(this.data),this}},st=function(){function t(){e(this,t),this.name=void 0,this.dirty=!0,this.data=void 0,this.isFilled=!1,this.fillColor=void 0,this.fillAlpha=1,this.isStroked=!1,this.lineWidth=1,this.strokeColor=void 0,this.strokeAlpha=1;}return s(t,[{key:"setName",value:function(t){return this.name=t,this}},{key:"reset",value:function(){return this.fillStyle().lineStyle(),this}},{key:"webglRender",value:function(t,e,i,s,n){}},{key:"canvasRender",value:function(t,e,i){}},{key:"updateData",value:function(){this.dirty=!1;}}]),t}();Object.assign(st.prototype,et,it);var nt=Phaser.Renderer.WebGL.Utils,rt=Phaser.Renderer.WebGL.Utils,at=function(t,e,i,s){var n=i||e.fillColor,r=s||e.fillAlpha,a=(16711680&n)>>>16,h=(65280&n)>>>8,o=255&n;t.fillStyle="rgba("+a+","+h+","+o+","+r+")";},ht=function(t,e,i,s){var n=i||e.strokeColor,r=s||e.strokeAlpha,a=(16711680&n)>>>16,h=(65280&n)>>>8,o=255&n;t.strokeStyle="rgba("+a+","+h+","+o+","+r+")",t.lineWidth=e.lineWidth;},ot=Phaser.Geom.Polygon.Earcut,ut=function(t){n(a,t);var i=o(a);function a(){var t;return e(this,a),(t=i.call(this)).pathData=[],t.pathIndexes=[],t.closePath=!1,t}return s(a,[{key:"updateData",value:function(){return this.pathIndexes=ot(this.pathData),u(r(a.prototype),"updateData",this).call(this),this}},{key:"webglRender",value:function(t,e,i,s,n){this.isFilled&&function(t,e,i,s,n,r){for(var a=nt.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*s),h=i.pathData,o=i.pathIndexes,u=0;u<o.length;u+=3){var l=2*o[u],c=2*o[u+1],f=2*o[u+2],d=h[l+0]-n,p=h[l+1]-r,v=h[c+0]-n,y=h[c+1]-r,g=h[f+0]-n,k=h[f+1]-r,m=e.getX(d,p),b=e.getY(d,p),P=e.getX(v,y),D=e.getY(v,y),_=e.getX(g,k),C=e.getY(g,k);t.batchTri(i,m,b,P,D,_,C,0,0,1,1,a,a,a,2);}}(t,e,this,i,s,n),this.isStroked&&function(t,e,i,s,n){var r=t.strokeTint,a=rt.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i);r.TL=a,r.TR=a,r.BL=a,r.BR=a;var h=e.pathData,o=h.length-1,u=e.lineWidth,l=u/2,c=h[0]-s,f=h[1]-n;e.closePath||(o-=2);for(var d=2;d<o;d+=2){var p=h[d]-s,v=h[d+1]-n;t.batchLine(c,f,p,v,l,l,u,d-2,!!e.closePath&&d===o-1),c=p,f=v;}}(t,this,i,s,n);}},{key:"canvasRender",value:function(t,e,i){var s=this.pathData,n=s.length-1,r=s[0]-e,a=s[1]-i;t.beginPath(),t.moveTo(r,a),this.closePath||(n-=2);for(var h=2;h<n;h+=2){var o=s[h]-e,u=s[h+1]-i;t.lineTo(o,u);}this.closePath&&t.closePath(),this.isFilled&&(at(t,this),t.fill()),this.isStroked&&(ht(t,this),t.stroke());}}]),a}(st),lt=function(t,e,i){var s=i.length;if(s>=2){var n=i[s-2],r=i[s-1];if(t===n&&e===r)return i}return i.push(t,e),i},ct=Phaser.Math.DegToRad,ft=function(t,e,i,s,n,r,a,h,o){a&&r>n?r-=360:!a&&r<n&&(r+=360);var u=ct(r-n)/h;n=ct(n);for(var l=0;l<=h;l++){var c=n+u*l,f=t+i*Math.cos(c),d=e+s*Math.sin(c);lt(f,d,o);}return o},dt=Phaser.Math.DegToRad,pt=function(t){n(r,t);var i=o(r);function r(t,s,n){return e(this,r),i.call(this,t,s,n,n,0,360)}return s(r)}(function(t){n(a,t);var i=o(a);function a(t,s,n,r,h,o,u,l){var c;return e(this,a),void 0===t&&(t=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===h&&(h=0),void 0===o&&(o=360),void 0===u&&(u=!1),void 0===l&&(l=!1),(c=i.call(this)).setCenterPosition(t,s),c.setRadius(n,r),c.setAngle(h,o,u),c.setPie(l),c.setIterations(32),c}return s(a,[{key:"x",get:function(){return this._x},set:function(t){this.dirty=this.dirty||this._x!==t,this._x=t;}},{key:"y",get:function(){return this._y},set:function(t){this.dirty=this.dirty||this._y!==t,this._y=t;}},{key:"setCenterPosition",value:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this}},{key:"radiusX",get:function(){return this._radiusX},set:function(t){this.dirty=this.dirty||this._radiusX!==t,this._radiusX=t;}},{key:"radiusY",get:function(){return this._radiusY},set:function(t){this.dirty=this.dirty||this._radiusY!==t,this._radiusY=t;}},{key:"setRadius",value:function(t,e){return void 0===e&&(e=t),this.radiusX=t,this.radiusY=e,this}},{key:"startAngle",get:function(){return this._startAngle},set:function(t){this.dirty=this.dirty||this._startAngle!==t,this._startAngle=t;}},{key:"endAngle",get:function(){return this._endAngle},set:function(t){this.dirty=this.dirty||this._endAngle!==t,this._endAngle=t;}},{key:"anticlockwise",get:function(){return this._anticlockwise},set:function(t){this.dirty=this.dirty||this._anticlockwise!==t,this._anticlockwise=t;}},{key:"setAngle",value:function(t,e,i){return void 0===i&&(i=!1),this.startAngle=t,this.endAngle=e,this.anticlockwise=i,this}},{key:"pie",get:function(){return this._pie},set:function(t){this.dirty=this.dirty||this._pie!==t,this._pie=t;}},{key:"setPie",value:function(t){return void 0===t&&(t=!0),this.pie=t,this}},{key:"iterations",get:function(){return this._iterations},set:function(t){this.dirty=this.dirty||this._iterations!==t,this._iterations=t;}},{key:"setIterations",value:function(t){return this.iterations=t,this}},{key:"updateData",value:function(){return this.pathData.length=0,this.pie&&this.pathData.push(this.x,this.y),ft(this.x,this.y,this.radiusX,this.radiusY,this.startAngle,this.endAngle,this.anticlockwise,this.iterations,this.pathData),this.pie&&this.pathData.push(this.x,this.y),this.pathData.push(this.pathData[0],this.pathData[1]),u(r(a.prototype),"updateData",this).call(this),this}},{key:"canvasRender",value:function(t,e,i){t.beginPath();var s=this.x-e,n=this.y-i,r=dt(this.startAngle),a=dt(this.endAngle);this.pie&&(t.moveTo(s,n),t.lineTo(s+Math.cos(r)*this.radiusX,n+Math.sin(r)*this.radiusY)),t.ellipse(s,n,this.radiusX,this.radiusY,0,r,a,this.anticlockwise),this.pie&&t.lineTo(s,n),this.isFilled&&(at(t,this),t.fill()),this.isStroked&&(ht(t,this),t.stroke());}}]),a}(ut)),vt=Phaser.Math.Interpolation.QuadraticBezier,yt=Phaser.Math.Interpolation.CubicBezier,gt=function(t){var e=t.length;if(e<2)return t;var i=t[e-2],s=t[e-1];return t.push(i),t.push(s),t},kt={clear:function(){return this.start(),this},start:function(){return this.startAt(),this},startAt:function(t,e){return this.restorePathData(),this.accumulationLengths=void 0,function(t,e,i){i.length=0,null!=t&&i.push(t,e);}(t,e,this.pathData),this.firstPointX=t,this.firstPointY=e,this.lastPointX=t,this.lastPointY=e,this},lineTo:function(t,e,i){return void 0===i&&(i=!1),i&&(t+=this.lastPointX,e+=this.lastPointY),lt(t,e,this.pathData),this.lastPointX=t,this.lastPointY=e,this},verticalLineTo:function(t,e){return this.lineTo(t,this.lastPointY,e),this},horizontalLineTo:function(t,e){return this.lineTo(this.lastPointX,t,e),this},ellipticalArc:function(t,e,i,s,n,r,a){return void 0===a&&(a=!1),ft(t,e,i,s,n,r,a,this.iterations,this.pathData),this.lastPointX=this.pathData[this.pathData.length-2],this.lastPointY=this.pathData[this.pathData.length-1],this},arc:function(t,e,i,s,n,r){return this.ellipticalArc(t,e,i,i,s,n,r),this},quadraticBezierTo:function(t,e,i,s){return function(t,e,i,s,n,r){for(var a=r.length,h=r[a-2],o=r[a-1],u=1,l=n-1;u<=l;u++){var c=u/l;r.push(vt(c,h,t,i),vt(c,o,e,s));}}(t,e,i,s,this.iterations,this.pathData),this.lastPointX=i,this.lastPointY=s,this.lastCX=t,this.lastCY=e,this},smoothQuadraticBezierTo:function(t,e){var i=2*this.lastPointX-this.lastCX,s=2*this.lastPointY-this.lastCY;return this.quadraticBezierTo(i,s,t,e),this},cubicBezierCurveTo:function(t,e,i,s,n,r){return function(t,e,i,s,n,r,a,h){for(var o=h.length,u=h[o-2],l=h[o-1],c=1,f=a-1;c<=f;c++){var d=c/f;h.push(yt(d,u,t,i,n),yt(d,l,e,s,r));}}(t,e,i,s,n,r,this.iterations,this.pathData),this.lastPointX=n,this.lastPointY=r,this.lastCX=i,this.lastCY=s,this},smoothCubicBezierCurveTo:function(t,e,i,s){var n=2*this.lastPointX-this.lastCX,r=2*this.lastPointY-this.lastCY;return this.cubicBezierCurveTo(n,r,t,e,i,s),this},close:function(){var t=this.pathData[0],e=this.pathData[1];return t===this.lastPointX&&e===this.lastPointY||this.lineTo(t,e),this.closePath=!0,this},end:function(){return gt(this.pathData),this}},mt=Phaser.Math.RotateAround,bt=Phaser.Math.DegToRad,Pt=Phaser.Math.RotateAround,Dt={rotateAround:function(t,e,i){if(0===this.pathData.length)return this;!function(t,e,i,s){for(var n={x:0,y:0},r=0,a=s.length-1;r<a;r+=2)n.x=s[r],n.y=s[r+1],mt(n,t,e,i),s[r]=n.x,s[r+1]=n.y;}(t,e,i=bt(i),this.pathData);var s=this.pathData.length;if(this.lastPointX=this.pathData[s-2],this.lastPointY=this.pathData[s-1],void 0!==this.lastCX){var n={x:this.lastCX,y:this.lastCY};Pt(n,t,e,i),this.lastCX=n.x,this.lastCY=n.y;}return this},scale:function(t,e,i,s){if(0===this.pathData.length)return this;if(function(t,e,i,s,n){for(var r=0,a=n.length-1;r<a;r+=2){var h=n[r]-t,o=n[r+1]-e;h*=i,o*=s,n[r]=h+t,n[r+1]=o+e;}}(t,e,i,s,this.pathData),this.lastPointX=this.pathData[pathDataCnt-2],this.lastPointY=this.pathData[pathDataCnt-1],void 0!==this.lastCX){var n=this.lastCX-t,r=this.lastCY-e;n*=i,r*=s,this.lastCX=n+t,this.lastCY=r+e;}return this},offset:function(t,e){return function(t,e,i){for(var s=0,n=i.length-1;s<n;s+=2)i[s]+=t,i[s+1]+=e;}(t,e,this.pathData),this}},_t={savePathData:function(){return this.pathDataSaved||(this.pathDataSave=l(this.pathData),this.pathData.length=0,this.pathDataSaved=!0),this},restorePathData:function(){return this.pathDataSaved?(function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=e.length),t.length=s-i;for(var n=0,r=t.length;n<r;n++)t[n]=e[n+i];}(this.pathData,this.pathDataSave),this.pathDataSave=void 0,this.pathDataSaved=!1,this):this}},Ct=Phaser.Math.Distance.Between,St=Phaser.Math.Wrap,Tt=Phaser.Math.Linear,wt=function(t,e,i,s,n){if(void 0===s&&(s=i,i=0),(i=Rt(i))!==(s=Rt(s))){var r=e[e.length-1],a=r*i,h=r*s;i<s?Et(t,e,a,h,n):(Et(t,e,a,r,n),Et(t,e,0,h,n)),gt(n);}},Et=function(t,e,i,s,n){for(var r=i>0,a=0,h=e.length;a<h;a++){var o=2*a,u=e[a];if(r){if(u<i)continue;if(u==i)r=!1;else {var l=1-(u-i)/(u-e[a-1]);n.push(At(t,o-2,o,l)),n.push(At(t,o-1,o+1,l)),r=!1;}}if(!(u<=s)){l=1-(u-s)/(u-e[a-1]);n.push(At(t,o-2,o,l)),n.push(At(t,o-1,o+1,l));break}if(n.push(t[o]),n.push(t[o+1]),u===s)break}},At=function(t,e,i,s){var n=t[e],r=t[i];return Tt(n,r,s)},Rt=function(t){return 0===t?0:t%1==0?1:St(t,0,1)},Ot={updateAccumulationLengths:function(){if(null==this.accumulationLengths)this.accumulationLengths=[];else if(this.accumulationLengths.length===this.pathData.length/2)return this;for(var t,e,i,s,n=this.accumulationLengths,r=this.pathData,a=0,h=0,o=r.length;h<o;h+=2)i=r[h],s=r[h+1],a+=void 0===t?0:Ct(t,e,i,s),n.push(a),t=i,e=s;return this.totalPathLength=a,this},setDisplayPathSegment:function(t,e){return this.pathDataSaved||(this.updateAccumulationLengths(),this.savePathData()),this.pathData.length=0,wt(this.pathDataSave,this.accumulationLengths,t,e,this.pathData),this},appendFromPathSegment:function(t,e,i){var s;void 0===e?(s=this.pathData).push.apply(s,l(t.pathData)):(t.updateAccumulationLengths(),wt(t.pathData,t.accumulationLengths,e,i,this.pathData));return this.firstPointX=this.pathData[0],this.firstPointY=this.pathData[1],this.lastPointX=this.pathData[this.pathData.length-2],this.lastPointY=this.pathData[this.pathData.length-1],this}},jt=Phaser.Geom.Polygon,Vt=function(){function t(i){e(this,t),void 0===i&&(i=[]),this.pathData=i,this.closePath=!1,this.setIterations(32),this.firstPointX=void 0,this.firstPointY=void 0,this.lastPointX=void 0,this.lastPointY=void 0,this.accumulationLengths=void 0;}return s(t,[{key:"setIterations",value:function(t){return this.iterations=t,this}},{key:"toPoints",value:function(){return function(t,e){void 0===e&&(e=[]);for(var i=0,s=t.length-1;i<s;i+=2)e.push({x:t[i],y:t[i+1]});return e}(this.pathData)}},{key:"toPolygon",value:function(t){return function(t,e){return void 0===e&&(e=new jt),e.setTo(t),e}(this.pathData,t)}}]),t}();Object.assign(Vt.prototype,kt,Dt,_t,Ot,{draw:function(t,e,i){var s=this.toPoints();return e&&t.fillPoints(s,this.closePath,this.closePath),i&&t.strokePoints(s,this.closePath,this.closePath),this}});var Xt=function(t){n(r,t);var i=o(r);function r(){var t;return e(this,r),(t=i.call(this)).builder=new Vt(t.pathData),t}return s(r,[{key:"iterations",get:function(){return this.builder.iterations},set:function(t){this.dirty=this.dirty||this.builder.iterations!==t,this.builder.setIterations(t);}},{key:"setIterations",value:function(t){return this.iterations=t,this}},{key:"lastPointX",get:function(){return this.builder.lastPointX}},{key:"lastPointY",get:function(){return this.builder.lastPointY}},{key:"start",value:function(){return this.builder.start(),this.dirty=!0,this}},{key:"startAt",value:function(t,e){return this.builder.startAt(t,e),this.dirty=!0,this}},{key:"lineTo",value:function(t,e,i){return this.builder.lineTo(t,e,i),this.dirty=!0,this}},{key:"verticalLineTo",value:function(t,e){return this.builder.verticalLineTo(t,e),this.dirty=!0,this}},{key:"horizontalLineTo",value:function(t,e){return this.builder.horizontalLineTo(t,e),this.dirty=!0,this}},{key:"ellipticalArc",value:function(t,e,i,s,n,r,a){return this.builder.ellipticalArc(t,e,i,s,n,r,a),this.dirty=!0,this}},{key:"arc",value:function(t,e,i,s,n,r){return this.builder.arc(t,e,i,s,n,r),this.dirty=!0,this}},{key:"quadraticBezierTo",value:function(t,e,i,s){return this.builder.quadraticBezierTo(t,e,i,s),this.dirty=!0,this}},{key:"smoothQuadraticBezierTo",value:function(t,e){return this.builder.smoothQuadraticBezierTo(t,e),this.dirty=!0,this}},{key:"cubicBezierCurveTo",value:function(t,e,i,s,n,r){return this.builder.cubicBezierCurveTo(t,e,i,s,n,r),this.dirty=!0,this}},{key:"smoothCubicBezierCurveTo",value:function(t,e,i,s){return this.builder.smoothCubicBezierCurveTo(t,e,i,s),this.dirty=!0,this}},{key:"close",value:function(){return this.builder.close(),this.closePath=this.builder.closePath,this.dirty=!0,this}},{key:"end",value:function(){return this.builder.end(),this.dirty=!0,this}},{key:"rotateAround",value:function(t,e,i){return this.builder.rotateAround(t,e,i),this.dirty=!0,this}},{key:"scale",value:function(t,e,i,s){return this.builder.scale(t,e,i,s),this.dirty=!0,this}},{key:"offset",value:function(t,e){return this.builder.offset(t,e),this.dirty=!0,this}},{key:"toPolygon",value:function(t){return this.builder.toPolygon(t)}},{key:"appendPathFrom",value:function(t,e,i){return this.builder.appendFromPathSegment(t.builder,e,i),this}},{key:"copyPathFrom",value:function(t,e,i){return this.builder.clear().appendFromPathSegment(t.builder,e,i),this}},{key:"setDisplayPathSegment",value:function(t,e){return this.builder.setDisplayPathSegment(t,e),this}}]),r}(ut);Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha,Phaser.Utils.Objects.GetValue,Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha;var Lt=Phaser.Math.RadToDeg,Mt=Phaser.Math.DegToRad,Yt=function(t,e,i,s,n,r,a,h){var o=360===Math.abs(a-r),u=Mt(r),l=Mt(a),c=Math.cos(u),f=Math.sin(u),d=Math.cos(l),p=Math.sin(l);return t.startAt(e+c*s,i+f*s),t.arc(e,i,s,r,a,h),o&&0===n||(t.lineTo(e+d*n,i+p*n),n>0&&t.arc(e,i,n,a,r,!h)),t.close(),t},zt={buildShapes:function(){this.addShape((new Xt).setName("track")).addShape((new Xt).setName("bar")).addShape((new pt).setName("center"));},updateShapes:function(){var t=this.radius,e=this.thickness*this.radius,i=this.radius,s=i-e,n=this.getShape("track");null!=this.trackColor&&this.thickness>0?(n.fillStyle(this.trackColor),Yt(n,t,t,i,s,0,360,!1)):n.reset();var r=this.getShape("bar");if(null!=this.barColor&&this.thickness>0){var a,h,o;if(1===this.value)a=!1,h=0,o=360;else a=this.anticlockwise,h=Lt(this.startAngle),o=360*(a?1-this.value:this.value)+h;r.fillStyle(this.barColor),Yt(r,t,t,i,s,h,o,!1);}else r.reset();var u=this.getShape("center");this.centerColor&&s>0?u.setCenterPosition(t,t).setRadius(s).fillStyle(this.centerColor):u.reset();}},xt=Phaser.Utils.Objects.GetValue,Ft=Phaser.Utils.Objects.IsPlainObject,Bt=Phaser.Math.Clamp,Gt=Phaser.Math.DegToRad(270),Nt=function(t){n(a,t);var i=o(a);function a(t,s,n,r,h,o,u){var l;e(this,a),Ft(s)&&(s=xt(u=s,"x",0),n=xt(u,"y",0),r=xt(u,"radius",1),h=xt(u,"barColor",void 0),o=xt(u,"value",0)),void 0===r&&(r=1);var c=2*r;return (l=i.call(this,t,s,n,c,c)).type="rexCircularProgress",l.bootProgressBase(u),l.setRadius(r),l.setTrackColor(xt(u,"trackColor",void 0)),l.setBarColor(h),l.setCenterColor(xt(u,"centerColor",void 0)),l.setThickness(xt(u,"thickness",.2)),l.setStartAngle(xt(u,"startAngle",Gt)),l.setAnticlockwise(xt(u,"anticlockwise",!1)),l.buildShapes(),l.setValue(o),l}return s(a,[{key:"resize",value:function(t,e){return (t=Math.floor(Math.min(t,e)))===this.width||(u(r(a.prototype),"resize",this).call(this,t,t),this.setRadius(t/2)),this}},{key:"radius",get:function(){return this._radius},set:function(t){this.dirty=this.dirty||this._radius!=t,this._radius=t;var e=2*t;this.resize(e,e);}},{key:"setRadius",value:function(t){return this.radius=t,this}},{key:"trackColor",get:function(){return this._trackColor},set:function(t){this.dirty=this.dirty||this._trackColor!=t,this._trackColor=t;}},{key:"setTrackColor",value:function(t){return this.trackColor=t,this}},{key:"barColor",get:function(){return this._barColor},set:function(t){this.dirty=this.dirty||this._barColor!=t,this._barColor=t;}},{key:"setBarColor",value:function(t){return this.barColor=t,this}},{key:"startAngle",get:function(){return this._startAngle},set:function(t){this.dirty=this.dirty||this._startAngle!=t,this._startAngle=t;}},{key:"setStartAngle",value:function(t){return this.startAngle=t,this}},{key:"anticlockwise",get:function(){return this._anticlockwise},set:function(t){this.dirty=this.dirty||this._anticlockwise!=t,this._anticlockwise=t;}},{key:"setAnticlockwise",value:function(t){return void 0===t&&(t=!0),this.anticlockwise=t,this}},{key:"thickness",get:function(){return this._thickness},set:function(t){t=Bt(t,0,1),this.dirty=this.dirty||this._thickness!=t,this._thickness=t;}},{key:"setThickness",value:function(t){return this.thickness=t,this}},{key:"centerColor",get:function(){return this._centerColor},set:function(t){this.dirty=this.dirty||this._centerColor!=t,this._centerColor=t;}},{key:"setCenterColor",value:function(t){return this.centerColor=t,this}}]),a}(function(t){var i=function(t){n(r,t);var i=o(r);function r(){return e(this,r),i.apply(this,arguments)}return s(r,[{key:"bootProgressBase",value:function(t){this.eventEmitter=Z(t,"eventEmitter",this);var e=Z(t,"valuechangeCallback",null);if(null!==e){var i=Z(t,"valuechangeCallbackScope",void 0);this.eventEmitter.on("valuechange",e,i);}return this.setEaseValuePropName("value").setEaseValueDuration(Z(t,"easeValue.duration",0)).setEaseValueFunction(Z(t,"easeValue.ease","Linear")),this}},{key:"value",get:function(){return this._value},set:function(t){t=tt(t,0,1);var e=this._value,i=e!=t;this.dirty=this.dirty||i,this._value=t,i&&this.eventEmitter.emit("valuechange",this._value,e,this.eventEmitter);}}]),r}(t);return Object.assign(i.prototype,P,$),i}(k));function It(t,e,i,s,n,r){var a=new Nt(this.scene,t,e,i,s,n,r);return this.scene.add.existing(a),a}Object.assign(Nt.prototype,zt);var Ut=Phaser.GameObjects.BuildGameObject;function Wt(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new Nt(this.scene,t);return Ut(this.scene,i,t),i}var Jt=function(t){return null==t||""===t||0===t.length},qt=function(t){n(r,Phaser.Plugins.BasePlugin);var i=o(r);function r(t){var s;return e(this,r),s=i.call(this,t),t.registerGameObject("rexCircularProgress",It,Wt),s}return s(r,[{key:"start",value:function(){this.game.events.on("destroy",this.destroy,this);}}]),r}();return function(e,i,s,n){if(void 0===n&&(n="."),"object"===t(e)){if(Jt(i)){if(null==s)return;"object"===t(s)&&(e=s);}else {"string"==typeof i&&(i=i.split(n));var r=i.pop(),a=function(e,i,s){var n=e;if(Jt(i));else {var r;"string"==typeof i&&(i=i.split("."));for(var a=0,h=i.length;a<h;a++){var o;null!=n[r=i[a]]&&"object"===t(n[r])||(o=a===h-1?void 0===s?{}:s:{},n[r]=o),n=n[r];}}return n}(e,i);a[r]=s;}}}(window,"RexPlugins.GameObjects.CircularProgress",Nt),qt}));